@zydon/common 1.4.68 → 1.4.69

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 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/SelectableCards/index.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,oBAAoB,EAAU,MAAM,SAAS,CAAC;AAOvD,QAAA,MAAM,eAAe,yDAOlB,oBAAoB,4CA+JtB,CAAC;AAEF,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/SelectableCards/index.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAU,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAGvD,QAAA,MAAM,eAAe,yDAOlB,oBAAoB,4CAoKtB,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -8,7 +8,7 @@ export interface Option {
8
8
  }[];
9
9
  }
10
10
  export interface SelectableCardsProps {
11
- title: string;
11
+ title: string | ReactNode;
12
12
  action?: ReactNode;
13
13
  loading: boolean;
14
14
  items: Option[];
@@ -1 +1 @@
1
- {"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/components/SelectableCards/props.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,MAAM,WAAW,MAAM;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE;QACP,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;KACf,EAAE,CAAC;CACL;AAED,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;CACrC"}
1
+ {"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/components/SelectableCards/props.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,MAAM,WAAW,MAAM;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE;QACP,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;KACf,EAAE,CAAC;CACL;AAED,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;CACrC"}
@@ -1,4 +1,4 @@
1
- import { p as rt, f as C, n as B, r as mn, c as gn, i as tt, d as Ts, a as yn, v as Vs, w as ie, b as yt, e as K, g as R, t as Pt, h as et, j as Ss, k as bs, l as k, m as nt, o as vn, q as xt, s as vt, u as As, x as Ds, y as Cs, z as at, A as Ms, B as Pn, C as Kt, D as xn, E as Tn, F as w, G as zt, H as dt, P as ws, I as Ls, L as Rs, S as Bs, J as Vn, K as Sn, M as bn, N as Et, O as jt, Q as ye, R as Ht, T as Fs, U as An, V as Dn, W as Es, X as js, Y as Cn, Z as Mn, _ as ks, $ as Is, a0 as Os, a1 as Us, a2 as Ns, a3 as Gs, a4 as $s, a5 as Ks, a6 as zs, a7 as Hs } from "./index-d8872729.js";
1
+ import { p as rt, f as C, n as B, r as mn, c as gn, i as tt, d as Ts, a as yn, v as Vs, w as ie, b as yt, e as K, g as R, t as Pt, h as et, j as Ss, k as bs, l as k, m as nt, o as vn, q as xt, s as vt, u as As, x as Ds, y as Cs, z as at, A as Ms, B as Pn, C as Kt, D as xn, E as Tn, F as w, G as zt, H as dt, P as ws, I as Ls, L as Rs, S as Bs, J as Vn, K as Sn, M as bn, N as Et, O as jt, Q as ye, R as Ht, T as Fs, U as An, V as Dn, W as Es, X as js, Y as Cn, Z as Mn, _ as ks, $ as Is, a0 as Os, a1 as Us, a2 as Ns, a3 as Gs, a4 as $s, a5 as Ks, a6 as zs, a7 as Hs } from "./index-de874ad8.js";
2
2
  import wn, { useContext as _t, useId as _s, useEffect as Ws } from "react";
3
3
  import "@mui/material";
4
4
  import "@emotion/react";
@@ -7766,7 +7766,7 @@ const i0u = ({
7766
7766
  ...a,
7767
7767
  children: n
7768
7768
  }
7769
- ), j11 = () => import("./features-74d03adb.js").then((e) => e.default), pAn = ({ children: e }) => /* @__PURE__ */ d.jsx(Hr1, { strict: !0, features: j11, children: /* @__PURE__ */ d.jsxs(jn.div, { style: { height: "100%" }, children: [
7769
+ ), j11 = () => import("./features-49cf74f2.js").then((e) => e.default), pAn = ({ children: e }) => /* @__PURE__ */ d.jsx(Hr1, { strict: !0, features: j11, children: /* @__PURE__ */ d.jsxs(jn.div, { style: { height: "100%" }, children: [
7770
7770
  " ",
7771
7771
  e,
7772
7772
  " "
@@ -280582,7 +280582,7 @@ const C5u = Ce(XXr)(() => ({
280582
280582
  };
280583
280583
  return /* @__PURE__ */ d.jsxs(T, { gap: 1.5, height: 450, children: [
280584
280584
  /* @__PURE__ */ d.jsxs(T, { direction: "row", justifyContent: "space-between", children: [
280585
- /* @__PURE__ */ d.jsx(je, { variant: "overline", color: "text.disabled", children: e }),
280585
+ typeof e == "string" ? /* @__PURE__ */ d.jsx(je, { variant: "overline", color: "text.disabled", children: e }) : e,
280586
280586
  /* @__PURE__ */ d.jsx(je, { variant: "overline", color: "text.disabled", children: r.length === 0 ? "nenhum selecionado" : C(r.length) })
280587
280587
  ] }),
280588
280588
  /* @__PURE__ */ d.jsxs(T, { direction: "row", alignItems: "center", spacing: 1.5, children: [
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { ae as u, b7 as p, af as d, ag as m, b9 as C, b8 as v, ah as S, ai as T, b_ as g, c2 as k, c1 as A, c0 as P, ba as F, bc as I, bd as h, ak as y, aj as B, al as D, am as x, an as E, ao as M, ap as f, aq as w, be as L, bf as R, bg as N, ar as U, bv as G, as as W, at as H, au as O, av as q, b3 as z, bx as V, bh as j, aw as K, bi as Z, b1 as J, ax as Q, ay as X, by as Y, az as _, a9 as $, aA as aa, aB as sa, bj as ea, aC as oa, ab as ta, aD as ra, aE as ba, bk as ia, bT as la, aF as ca, aG as na, aH as ua, bA as pa, bB as da, bz as ma, bb as Ca, bl as va, aa as Sa, aI as Ta, bm as ga, bn as ka, aJ as Aa, a$ as Pa, aK as Fa, bo as Ia, aL as ha, aM as ya, aN as Ba, aO as Da, b5 as xa, bu as Ea, b2 as Ma, bU as fa, bV as wa, aP as La, aQ as Ra, aR as Na, aS as Ua, b0 as Ga, bt as Wa, bp as Ha, bC as Oa, aT as qa, c6 as za, c7 as Va, c4 as ja, c9 as Ka, c8 as Za, c5 as Ja, bw as Qa, aU as Xa, aV as Ya, bq as _a, b4 as $a, bW as as, aW as ss, aX as es, br as os, aY as ts, a8 as rs, aZ as bs, bs as is, b6 as ls, a_ as cs, bX as ns, cC as us, cD as ps, cw as ds, ca as ms, bY as Cs, ct as vs, cu as Ss, cv as Ts, cb as gs, cF as ks, ad as As, cB as Ps, cA as Fs, cx as Is, cy as hs, cc as ys, cp as Bs, b$ as Ds, cd as xs, ce as Es, cf as Ms, cq as fs, cg as ws, ch as Ls, cr as Rs, ac as Ns, cs as Us, cn as Gs, cm as Ws, cl as Hs, co as Os, ci as qs, bZ as zs, c3 as Vs, cj as js, ck as Ks, cE as Zs, cz as Js, bQ as Qs, bR as Xs, bS as Ys, bJ as _s, bM as $s, bE as ae, bG as se, bL as ee, bD as oe, bK as te, bI as re, bH as be, bO as ie, bP as le, bN as ce, bF as ne } from "./index-d8872729.js";
1
+ import { ae as u, b7 as p, af as d, ag as m, b9 as C, b8 as v, ah as S, ai as T, b_ as g, c2 as k, c1 as A, c0 as P, ba as F, bc as I, bd as h, ak as y, aj as B, al as D, am as x, an as E, ao as M, ap as f, aq as w, be as L, bf as R, bg as N, ar as U, bv as G, as as W, at as H, au as O, av as q, b3 as z, bx as V, bh as j, aw as K, bi as Z, b1 as J, ax as Q, ay as X, by as Y, az as _, a9 as $, aA as aa, aB as sa, bj as ea, aC as oa, ab as ta, aD as ra, aE as ba, bk as ia, bT as la, aF as ca, aG as na, aH as ua, bA as pa, bB as da, bz as ma, bb as Ca, bl as va, aa as Sa, aI as Ta, bm as ga, bn as ka, aJ as Aa, a$ as Pa, aK as Fa, bo as Ia, aL as ha, aM as ya, aN as Ba, aO as Da, b5 as xa, bu as Ea, b2 as Ma, bU as fa, bV as wa, aP as La, aQ as Ra, aR as Na, aS as Ua, b0 as Ga, bt as Wa, bp as Ha, bC as Oa, aT as qa, c6 as za, c7 as Va, c4 as ja, c9 as Ka, c8 as Za, c5 as Ja, bw as Qa, aU as Xa, aV as Ya, bq as _a, b4 as $a, bW as as, aW as ss, aX as es, br as os, aY as ts, a8 as rs, aZ as bs, bs as is, b6 as ls, a_ as cs, bX as ns, cC as us, cD as ps, cw as ds, ca as ms, bY as Cs, ct as vs, cu as Ss, cv as Ts, cb as gs, cF as ks, ad as As, cB as Ps, cA as Fs, cx as Is, cy as hs, cc as ys, cp as Bs, b$ as Ds, cd as xs, ce as Es, cf as Ms, cq as fs, cg as ws, ch as Ls, cr as Rs, ac as Ns, cs as Us, cn as Gs, cm as Ws, cl as Hs, co as Os, ci as qs, bZ as zs, c3 as Vs, cj as js, ck as Ks, cE as Zs, cz as Js, bQ as Qs, bR as Xs, bS as Ys, bJ as _s, bM as $s, bE as ae, bG as se, bL as ee, bD as oe, bK as te, bI as re, bH as be, bO as ie, bP as le, bN as ce, bF as ne } from "./index-de874ad8.js";
2
2
  import "react";
3
3
  import "@mui/material";
4
4
  import "@emotion/react";
@@ -35433,4 +35433,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
35433
35433
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _u2(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function mu2(e){if(Array.isArray(e))return aIn(e)}function sGn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,a)}return n}function dGn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?sGn(Object(n),!0).forEach(function(a){gGn(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sGn(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function gGn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Mmt(e,t){return Cu2(e)||hu2(e,t)||_Gn(e,t)||vu2()}function vu2(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
35434
35434
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _Gn(e,t){if(e){if(typeof e=="string")return aIn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return aIn(e,t)}}function aIn(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function hu2(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var a=[],r=!0,u=!1,c,l;try{for(n=n.call(e);!(r=(c=n.next()).done)&&(a.push(c.value),!(t&&a.length===t));r=!0);}catch(f){u=!0,l=f}finally{try{!r&&n.return!=null&&n.return()}finally{if(u)throw l}}return a}}function Cu2(e){if(Array.isArray(e))return e}var bu2="file-invalid-type",yu2="file-too-large",pu2="file-too-small",Ou2="too-many-files",ju2=function(t){t=Array.isArray(t)&&t.length===1?t[0]:t;var n=Array.isArray(t)?"one of ".concat(t.join(", ")):t;return{code:bu2,message:"File type must be ".concat(n)}},mGn=function(t){return{code:yu2,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},vGn=function(t){return{code:pu2,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},wu2={code:Ou2,message:"Too many files"};function hGn(e,t){var n=e.type==="application/x-moz-file"||du2(e,t);return[n,n?null:ju2(t)]}function CGn(e,t,n){if(jT(e.size))if(jT(t)&&jT(n)){if(e.size>n)return[!1,mGn(n)];if(e.size<t)return[!1,vGn(t)]}else{if(jT(t)&&e.size<t)return[!1,vGn(t)];if(jT(n)&&e.size>n)return[!1,mGn(n)]}return[!0,null]}function jT(e){return e!=null}function Mu2(e){var t=e.files,n=e.accept,a=e.minSize,r=e.maxSize,u=e.multiple,c=e.maxFiles,l=e.validator;return!u&&t.length>1||u&&c>=1&&t.length>c?!1:t.every(function(f){var s=hGn(f,n),g=Mmt(s,1),_=g[0],m=CGn(f,a,r),v=Mmt(m,1),C=v[0],h=l?l(f):null;return _&&C&&!h})}function ZCt(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function UCt(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function bGn(e){e.preventDefault()}function Lu2(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function Pu2(e){return e.indexOf("Edge/")!==-1}function Eu2(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return Lu2(e)||Pu2(e)}function Dc(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(a){for(var r=arguments.length,u=new Array(r>1?r-1:0),c=1;c<r;c++)u[c-1]=arguments[c];return t.some(function(l){return!ZCt(a)&&l&&l.apply(void 0,[a].concat(u)),ZCt(a)})}}function ku2(){return"showOpenFilePicker"in window}function Su2(e){if(jT(e)){var t=Object.entries(e).filter(function(n){var a=Mmt(n,2),r=a[0],u=a[1],c=!0;return yGn(r)||(console.warn('Skipped "'.concat(r,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),c=!1),(!Array.isArray(u)||!u.every(pGn))&&(console.warn('Skipped "'.concat(r,'" because an invalid file extension was provided.')),c=!1),c}).reduce(function(n,a){var r=Mmt(a,2),u=r[0],c=r[1];return dGn(dGn({},n),{},gGn({},u,c))},{});return[{description:"Files",accept:t}]}return e}function Du2(e){if(jT(e))return Object.entries(e).reduce(function(t,n){var a=Mmt(n,2),r=a[0],u=a[1];return[].concat(fGn(t),[r],fGn(u))},[]).filter(function(t){return yGn(t)||pGn(t)}).join(",")}function Bu2(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function Iu2(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function yGn(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||/\w+\/[-+.\w]+/g.test(e)}function pGn(e){return/^.*\.[\w]+$/.test(e)}var Wu2=["children"],$u2=["open"],xu2=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],zu2=["refKey","onChange","onClick"];function Hu2(e){return Vu2(e)||Ru2(e)||OGn(e)||Au2()}function Au2(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
35435
35435
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ru2(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Vu2(e){if(Array.isArray(e))return oIn(e)}function iIn(e,t){return Tu2(e)||Nu2(e,t)||OGn(e,t)||Fu2()}function Fu2(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
35436
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function OGn(e,t){if(e){if(typeof e=="string")return oIn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return oIn(e,t)}}function oIn(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function Nu2(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var a=[],r=!0,u=!1,c,l;try{for(n=n.call(e);!(r=(c=n.next()).done)&&(a.push(c.value),!(t&&a.length===t));r=!0);}catch(f){u=!0,l=f}finally{try{!r&&n.return!=null&&n.return()}finally{if(u)throw l}}return a}}function Tu2(e){if(Array.isArray(e))return e}function jGn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,a)}return n}function kt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?jGn(Object(n),!0).forEach(function(a){uIn(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jGn(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function uIn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function GCt(e,t){if(e==null)return{};var n=Zu2(e,t),a,r;if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(e);for(r=0;r<u.length;r++)a=u[r],!(t.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}function Zu2(e,t){if(e==null)return{};var n={},a=Object.keys(e),r,u;for(u=0;u<a.length;u++)r=a[u],!(t.indexOf(r)>=0)&&(n[r]=e[r]);return n}var cIn=o.forwardRef(function(e,t){var n=e.children,a=GCt(e,Wu2),r=YCt(a),u=r.open,c=GCt(r,$u2);return o.useImperativeHandle(t,function(){return{open:u}},[u]),o.createElement(o.Fragment,null,n(kt(kt({},c),{},{open:u})))});cIn.displayName="Dropzone";var wGn={disabled:!1,getFilesFromEvent:ru2,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};cIn.defaultProps=wGn,cIn.propTypes={children:j.func,accept:j.objectOf(j.arrayOf(j.string)),multiple:j.bool,preventDropOnDocument:j.bool,noClick:j.bool,noKeyboard:j.bool,noDrag:j.bool,noDragEventsBubbling:j.bool,minSize:j.number,maxSize:j.number,maxFiles:j.number,disabled:j.bool,getFilesFromEvent:j.func,onFileDialogCancel:j.func,onFileDialogOpen:j.func,useFsAccessApi:j.bool,autoFocus:j.bool,onDragEnter:j.func,onDragLeave:j.func,onDragOver:j.func,onDrop:j.func,onDropAccepted:j.func,onDropRejected:j.func,onError:j.func,validator:j.func};var lIn={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function YCt(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=kt(kt({},wGn),e),n=t.accept,a=t.disabled,r=t.getFilesFromEvent,u=t.maxSize,c=t.minSize,l=t.multiple,f=t.maxFiles,s=t.onDragEnter,g=t.onDragLeave,_=t.onDragOver,m=t.onDrop,v=t.onDropAccepted,C=t.onDropRejected,h=t.onFileDialogCancel,b=t.onFileDialogOpen,p=t.useFsAccessApi,y=t.autoFocus,M=t.preventDropOnDocument,E=t.noClick,L=t.noKeyboard,w=t.noDrag,k=t.noDragEventsBubbling,D=t.onError,S=t.validator,I=o.useMemo(function(){return Du2(n)},[n]),A=o.useMemo(function(){return Su2(n)},[n]),F=o.useMemo(function(){return typeof b=="function"?b:MGn},[b]),W=o.useMemo(function(){return typeof h=="function"?h:MGn},[h]),z=o.useRef(null),T=o.useRef(null),H=o.useReducer(Uu2,lIn),Z=iIn(H,2),Q=Z[0],J=Z[1],V=Q.isFocused,N=Q.isFileDialogActive,Y=o.useRef(typeof window<"u"&&window.isSecureContext&&p&&ku2()),oe=function(){!Y.current&&N&&setTimeout(function(){if(T.current){var he=T.current.files;he.length||(J({type:"closeDialog"}),W())}},300)};o.useEffect(function(){return window.addEventListener("focus",oe,!1),function(){window.removeEventListener("focus",oe,!1)}},[T,N,W,Y]);var te=o.useRef([]),se=function(he){z.current&&z.current.contains(he.target)||(he.preventDefault(),te.current=[])};o.useEffect(function(){return M&&(document.addEventListener("dragover",bGn,!1),document.addEventListener("drop",se,!1)),function(){M&&(document.removeEventListener("dragover",bGn),document.removeEventListener("drop",se))}},[z,M]),o.useEffect(function(){return!a&&y&&z.current&&z.current.focus(),function(){}},[z,y,a]);var le=o.useCallback(function(q){D?D(q):console.error(q)},[D]),be=o.useCallback(function(q){q.preventDefault(),q.persist(),Pe(q),te.current=[].concat(Hu2(te.current),[q.target]),UCt(q)&&Promise.resolve(r(q)).then(function(he){if(!(ZCt(q)&&!k)){var ot=he.length,He=ot>0&&Mu2({files:he,accept:I,minSize:c,maxSize:u,multiple:l,maxFiles:f,validator:S}),St=ot>0&&!He;J({isDragAccept:He,isDragReject:St,isDragActive:!0,type:"setDraggedFiles"}),s&&s(q)}}).catch(function(he){return le(he)})},[r,s,le,k,I,c,u,l,f,S]),fe=o.useCallback(function(q){q.preventDefault(),q.persist(),Pe(q);var he=UCt(q);if(he&&q.dataTransfer)try{q.dataTransfer.dropEffect="copy"}catch{}return he&&_&&_(q),!1},[_,k]),ne=o.useCallback(function(q){q.preventDefault(),q.persist(),Pe(q);var he=te.current.filter(function(He){return z.current&&z.current.contains(He)}),ot=he.indexOf(q.target);ot!==-1&&he.splice(ot,1),te.current=he,!(he.length>0)&&(J({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),UCt(q)&&g&&g(q))},[z,g,k]),_e=o.useCallback(function(q,he){var ot=[],He=[];q.forEach(function(St){var we=hGn(St,I),en=iIn(we,2),hn=en[0],Bc=en[1],nj=CGn(St,c,u),rj=iIn(nj,2),wT=rj[0],MT=rj[1],LT=S?S(St):null;if(hn&&wT&&!LT)ot.push(St);else{var PT=[Bc,MT];LT&&(PT=PT.concat(LT)),He.push({file:St,errors:PT.filter(function(ET){return ET})})}}),(!l&&ot.length>1||l&&f>=1&&ot.length>f)&&(ot.forEach(function(St){He.push({file:St,errors:[wu2]})}),ot.splice(0)),J({acceptedFiles:ot,fileRejections:He,type:"setFiles"}),m&&m(ot,He,he),He.length>0&&C&&C(He,he),ot.length>0&&v&&v(ot,he)},[J,l,I,c,u,f,m,v,C,S]),We=o.useCallback(function(q){q.preventDefault(),q.persist(),Pe(q),te.current=[],UCt(q)&&Promise.resolve(r(q)).then(function(he){ZCt(q)&&!k||_e(he,q)}).catch(function(he){return le(he)}),J({type:"reset"})},[r,_e,le,k]),U=o.useCallback(function(){if(Y.current){J({type:"openDialog"}),F();var q={multiple:l,types:A};window.showOpenFilePicker(q).then(function(he){return r(he)}).then(function(he){_e(he,null),J({type:"closeDialog"})}).catch(function(he){Bu2(he)?(W(he),J({type:"closeDialog"})):Iu2(he)?(Y.current=!1,T.current?(T.current.value=null,T.current.click()):le(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):le(he)});return}T.current&&(J({type:"openDialog"}),F(),T.current.value=null,T.current.click())},[J,F,W,p,_e,le,A,l]),qe=o.useCallback(function(q){!z.current||!z.current.isEqualNode(q.target)||(q.key===" "||q.key==="Enter"||q.keyCode===32||q.keyCode===13)&&(q.preventDefault(),U())},[z,U]),de=o.useCallback(function(){J({type:"focus"})},[]),re=o.useCallback(function(){J({type:"blur"})},[]),me=o.useCallback(function(){E||(Eu2()?setTimeout(U,0):U())},[E,U]),je=function(he){return a?null:he},K=function(he){return L?null:je(he)},Oe=function(he){return w?null:je(he)},Pe=function(he){k&&he.stopPropagation()},xe=o.useMemo(function(){return function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},he=q.refKey,ot=he===void 0?"ref":he,He=q.role,St=q.onKeyDown,we=q.onFocus,en=q.onBlur,hn=q.onClick,Bc=q.onDragEnter,nj=q.onDragOver,rj=q.onDragLeave,wT=q.onDrop,MT=GCt(q,xu2);return kt(kt(uIn({onKeyDown:K(Dc(St,qe)),onFocus:K(Dc(we,de)),onBlur:K(Dc(en,re)),onClick:je(Dc(hn,me)),onDragEnter:Oe(Dc(Bc,be)),onDragOver:Oe(Dc(nj,fe)),onDragLeave:Oe(Dc(rj,ne)),onDrop:Oe(Dc(wT,We)),role:typeof He=="string"&&He!==""?He:"presentation"},ot,z),!a&&!L?{tabIndex:0}:{}),MT)}},[z,qe,de,re,me,be,fe,ne,We,L,w,a]),ze=o.useCallback(function(q){q.stopPropagation()},[]),Gt=o.useMemo(function(){return function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},he=q.refKey,ot=he===void 0?"ref":he,He=q.onChange,St=q.onClick,we=GCt(q,zu2),en=uIn({accept:I,multiple:l,type:"file",style:{display:"none"},onChange:je(Dc(He,We)),onClick:je(Dc(St,ze)),tabIndex:-1},ot,T);return kt(kt({},en),we)}},[T,n,l,We,a]);return kt(kt({},Q),{},{isFocused:V&&!a,getRootProps:xe,getInputProps:Gt,rootRef:z,inputRef:T,open:je(U)})}function Uu2(e,t){switch(t.type){case"focus":return kt(kt({},e),{},{isFocused:!0});case"blur":return kt(kt({},e),{},{isFocused:!1});case"openDialog":return kt(kt({},lIn),{},{isFileDialogActive:!0});case"closeDialog":return kt(kt({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return kt(kt({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return kt(kt({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return kt({},lIn);default:return e}}function MGn(){}const fIn=({fileRejections:e})=>e.length?d.jsx(O.Paper,{variant:"outlined",sx:{py:1,px:2,mt:3,bgcolor:t=>X(t.palette.error.main,.08),borderColor:t=>X(t.palette.error.main,.24)},children:e.map(({file:t,errors:n})=>{const{path:a,size:r}=tIn(t);return d.jsxs(O.Box,{sx:{my:1},children:[d.jsxs(O.Typography,{variant:"subtitle2",noWrap:!0,children:[a," - ",r?BCt(r):""]}),n.map(u=>d.jsxs(O.Box,{component:"span",sx:{typography:"caption"},children:["- ",u.message]},u.code))]},a)})}):null,Gu2=({file:e})=>{if(!e)return null;const t=typeof e=="string"?e:e.preview;return d.jsx(O.Stack,{position:"absolute",width:1,height:1,maxHeight:"100%",alignItems:"center",justifyContent:"center",top:0,right:0,bottom:0,left:0,padding:2,margin:"auto",children:d.jsx("img",{alt:"file preview",src:t,style:{borderRadius:8,width:"auto",maxWidth:"100%",maxHeight:"100%",height:"auto"}})})},LGn=at("div")(({theme:e})=>({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:`1px dashed ${X(e.palette.grey[500],.32)}`,"&:hover":{opacity:.72}})),PGn=({header:e,description:t,sx:n,...a})=>d.jsxs(O.Stack,{spacing:5,alignItems:"center",justifyContent:"center",direction:{xs:"column",md:"row"},sx:{width:1,textAlign:{xs:"center",md:"left"},...n},...a,children:[d.jsx(IWn,{sx:{width:220}}),d.jsxs("div",{children:[d.jsx(O.Typography,{gutterBottom:!0,variant:"h5",children:e||"Soltar ou selecionar arquivos"}),d.jsx(O.Typography,{variant:"body2",sx:{color:"text.secondary"},children:t||d.jsxs(d.Fragment,{children:["Solte os arquivos aqui ou clique",d.jsx(O.Typography,{variant:"body2",component:"span",sx:{mx:.5,color:"primary.main",textDecoration:"underline"},children:"procurar"}),"na sua máquina"]})})]})]}),EGn=({id:e,disabled:t,multiple:n=!1,error:a,helperText:r,file:u,onDelete:c,files:l,thumbnail:f,onRemove:s,onHandleMainImage:g,mainUrl:_,sx:m,dropZoneProps:v,placeholderProps:C,placeholderAlt:h,image:b,tabIndex:p,preview:y="image",onRemoveAll:M,onUpload:E,...L})=>{const{getRootProps:w,getInputProps:k,isDragActive:D,isDragReject:S,fileRejections:I}=YCt({multiple:n,disabled:t,...L}),A=!!u&&!n,F=A||b,W=l&&n&&l.length>0,z=typeof u=="string",T=S||!!a;return y==="file"?d.jsxs(O.Box,{sx:{width:1,position:"relative",...m},children:[d.jsxs(LGn,{...w(),sx:{...D&&{opacity:.72},...T&&{color:"error.main",bgcolor:"error.lighter",borderColor:"error.light"},...t&&{opacity:.48,pointerEvents:"none"}},children:[d.jsx("input",{...k()}),d.jsx(PGn,{sx:{...A&&{display:"none"}}}),A&&d.jsxs(O.Stack,{component:rn.div,...VT().inUp,spacing:2,direction:"row",alignItems:"center",sx:{my:1,px:1,py:.75,borderRadius:.75,border:H=>`solid 1px ${H.palette.divider}`,...m},children:[d.jsx(nIn,{file:u}),d.jsxs(O.Stack,{flexGrow:1,sx:{minWidth:0},children:[d.jsx(O.Typography,{variant:"subtitle2",noWrap:!0,children:z?u:u.name}),d.jsx(O.Typography,{variant:"caption",sx:{color:"text.secondary"},children:z?"":BCt(u.size)})]}),c&&d.jsx(O.IconButton,{edge:"end",size:"small",onClick:c,children:d.jsx(Ce,{icon:"CLOSE_MARK_BUTTON"})})]})]}),r&&r,d.jsx(fIn,{fileRejections:I}),W&&d.jsxs(d.Fragment,{children:[d.jsx(O.Box,{sx:{my:3},children:d.jsx(rGn,{files:l,thumbnail:f,onRemove:s})}),d.jsxs(O.Stack,{direction:"row",justifyContent:"flex-end",spacing:1.5,children:[M&&d.jsx(O.Button,{color:"inherit",variant:"outlined",size:"small",onClick:M,children:"Remover todos"}),E&&d.jsx(O.Button,{size:"small",variant:"contained",onClick:E,children:"Enviar arquivos"})]})]})]}):d.jsxs(O.Box,{sx:{width:1,position:"relative",...m},children:[d.jsxs(LGn,{...w(),sx:{...D&&{opacity:.72},...T&&{color:"error.main",bgcolor:"error.lighter",borderColor:"error.light"},...t&&{opacity:.48,pointerEvents:"none"},...v},children:[d.jsx("input",{...k(),id:e,tabIndex:p}),h?d.jsx(O.Stack,{sx:{...F&&{opacity:0}},children:h}):d.jsx(PGn,{sx:{...F&&{opacity:0}},header:C==null?void 0:C.title,description:C==null?void 0:C.description}),F&&d.jsx(Gu2,{file:u||b||""})]}),r&&d.jsx(O.FormHelperText,{error:!!a,sx:H=>({mx:"14px",color:t?H.palette.grey[500]:void 0}),children:r}),d.jsx(fIn,{fileRejections:I}),F&&c&&d.jsx(O.IconButton,{size:"small",onClick:c,sx:{top:16,right:16,zIndex:9,position:"absolute",color:H=>X(H.palette.common.white,.8),bgcolor:H=>X(H.palette.grey[900],.72),"&:hover":{bgcolor:H=>X(H.palette.grey[900],.48)}},children:d.jsx(Ce,{icon:"CLOSE_MARK_BUTTON",width:18})}),W&&d.jsx(d.Fragment,{children:d.jsx(O.Box,{sx:{my:3},children:d.jsx(rGn,{files:l,thumbnail:f,onRemove:s,onHandleMainImage:g,mainUrl:_})})})]})},Yu2=({file:e})=>{if(!e)return null;const t=typeof e=="string"?e:e.preview;return d.jsx("img",{alt:"avatar",src:t,style:{zIndex:8,overflow:"hidden",borderRadius:"50%",position:"absolute",width:"calc(100% - 16px)",height:"calc(100% - 16px)"}})},Ku2=at("div")(({theme:e})=>({width:144,height:144,margin:"auto",display:"flex",cursor:"pointer",overflow:"hidden",borderRadius:"50%",alignItems:"center",position:"relative",justifyContent:"center",border:`1px dashed ${X(e.palette.grey[500],.32)}`})),Xu2=at("div")(({theme:e})=>({zIndex:7,display:"flex",borderRadius:"50%",position:"absolute",alignItems:"center",flexDirection:"column",justifyContent:"center",width:"calc(100% - 16px)",height:"calc(100% - 16px)",color:e.palette.text.disabled,backgroundColor:e.palette.background.neutral,transition:e.transitions.create("opacity",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.shorter})})),kGn=({error:e,file:t,image:n,disabled:a,helperText:r,sx:u,tabIndex:c,...l})=>{const{getRootProps:f,getInputProps:s,isDragActive:g,isDragReject:_,fileRejections:m}=YCt({multiple:!1,disabled:a,...l}),v=!!t||n,C=_||!!e;return d.jsxs(d.Fragment,{children:[d.jsxs(Ku2,{...f(),sx:{...g&&{opacity:.72},...C&&{borderColor:"error.light",...v&&{bgcolor:"error.lighter"}},...a&&{opacity:.48,pointerEvents:"none"},...v&&{"&:hover":{"& .placeholder":{opacity:1}}},...u},children:[d.jsx("input",{...s(),tabIndex:c}),v&&d.jsx(Yu2,{file:t||n||""}),d.jsxs(Xu2,{className:"placeholder",sx:{"&:hover":{opacity:.72},...v&&{zIndex:9,opacity:0,color:"common.white",bgcolor:h=>X(h.palette.grey[900],.64)},...C&&{color:"error.main",bgcolor:"error.lighter"}},children:[d.jsx(Ce,{icon:"ADD_IMAGE",width:24,sx:{mb:1}}),d.jsx(O.Typography,{variant:"caption",children:t?"Atualizar foto":"Carregar foto"})]})]}),r&&r,d.jsx(fIn,{fileRejections:m})]})},Qu2=at("div")(({theme:e})=>({width:64,height:64,fontSize:24,display:"flex",flexShrink:0,cursor:"pointer",alignItems:"center",justifyContent:"center",margin:e.spacing(.5),color:e.palette.text.disabled,borderRadius:e.shape.borderRadius,border:`dashed 1px ${e.palette.divider}`,backgroundColor:X(e.palette.grey[500],.08),"&:hover":{opacity:.72}})),Ju2=({placeholderAlt:e,error:t,disabled:n,sx:a,tabIndex:r,...u})=>{const{getRootProps:c,getInputProps:l,isDragActive:f,isDragReject:s}=YCt({disabled:n,...u}),g=s||t;return d.jsxs(Qu2,{...c(),sx:{...f&&{opacity:.72},...g&&{color:"error.main",bgcolor:"error.lighter",borderColor:"error.light"},...n&&{opacity:.48,pointerEvents:"none"},...a},children:[d.jsx("input",{...l(),tabIndex:r}),e||d.jsx(Ce,{icon:"CLOUD_UPLOAD",width:28})]})},SGn=({onFileCropped:e,onImageUploaded:t,onCancel:n})=>{const a=o.useId(),[r,u]=o.useState(),[c,l,f]=xht(),[s,g]=o.useState();return{id:a,setCropModalOpen:f,handleRemove:()=>{e(void 0),t(void 0),f(!1)},toggleCropModalOpen:l,cropModalOpen:c,cancelChanges:()=>{n&&n(),f(!1)},saveChanges:()=>{r!==void 0&&r.getCroppedCanvas().toBlob(b=>{if(!b)return;const p=new File([b],"imagem");e(p),l()},"image/png",1)},previewImage:()=>{r!==void 0&&g(r.getCroppedCanvas().toDataURL())},setCropper:u,preview:s,closePreviewImage:()=>g(void 0)}},DGn=({id:e,open:t,onClose:n,label:a,onSave:r,onRemove:u,onPreview:c,imageSrc:l,aspectRatio:f,onInitialized:s})=>{const[g,_]=o.useState(.5);return d.jsx(YUn,{open:t,onClose:n,dialogTitle:a,actions:d.jsxs(d.Fragment,{children:[d.jsx(O.Button,{variant:"outlined",size:"medium",onClick:n,color:"inherit",children:"Cancelar"}),d.jsx(O.Button,{variant:"contained",size:"medium",onClick:r,children:"Salvar"})]}),fullWidth:!0,maxWidth:"sm",keepMounted:!0,children:d.jsxs(O.Stack,{gap:2,children:[d.jsx(jUn,{imageSrc:l,aspectRatio:f,onInitialized:s,zoom:g,onZoomChange:_}),d.jsxs(O.Stack,{gap:1.5,children:[d.jsxs(O.Stack,{width:1,direction:"row",gap:3,flex:1,alignItems:"center",children:[d.jsx(O.Typography,{variant:"body1",children:"Zoom"}),d.jsx(O.Slider,{value:g,onChange:(m,v)=>_(Array.isArray(v)?v[0]:v),min:.1,max:2,size:"medium",step:.0125})]}),d.jsxs(O.Stack,{direction:"row",gap:2,children:[d.jsx(O.Button,{variant:"outlined",color:"inherit",size:"large",fullWidth:!0,startIcon:d.jsx(Ce,{icon:"DELETE_MARK_BUTTON_02"}),onClick:u,children:"Remover"}),d.jsx(O.Button,{variant:"outlined",color:"inherit",size:"large",fullWidth:!0,startIcon:d.jsx(Ce,{icon:"PLAY_SIMPLE"}),onClick:c,children:"Pré-visualizar"}),d.jsx(O.Button,{variant:"outlined",color:"inherit",size:"large",fullWidth:!0,startIcon:d.jsx(Ce,{icon:"SEARCH_IMAGE"}),component:"label",htmlFor:e,children:"Alterar"})]})]})]})})},qu2=O.styled(O.Stack)({position:"relative",width:"100%",borderRadius:8,overflow:"hidden","&:hover .actions":{display:"flex"}}),ec2=O.styled(O.Stack)(({theme:e})=>({display:"none",position:"absolute",alignItems:"center",justifyContent:"center",flexDirection:"row",gap:12,width:"100%",height:"100%",backgroundColor:O.alpha(e.palette.primary.main,.9),zIndex:999,button:{"&, &:hover, &:focus":{backgroundColor:"#fff"}}})),tc2=O.styled(O.CircularProgress)({position:"absolute",width:"100%",height:"100%",zIndex:99,backgroundColor:"#fff",borderRadius:"50%"}),BGn=({onFileCropped:e,onImageUploaded:t,onCancel:n,aspect:a,label:r,image:u="",uploading:c,file:l,tabIndex:f,...s})=>{const{id:g,setCropModalOpen:_,handleRemove:m,toggleCropModalOpen:v,cropModalOpen:C,cancelChanges:h,saveChanges:b,previewImage:p,setCropper:y,preview:M,closePreviewImage:E}=SGn({onFileCropped:e,onImageUploaded:t,onCancel:n});return d.jsxs(d.Fragment,{children:[d.jsxs(qu2,{children:[c&&d.jsx(yCt,{}),d.jsx(EGn,{...s,id:g,file:l,onDrop:L=>{if(L.length>0){_(!0);const w=new FileReader;w.addEventListener("load",()=>{var D;const k=((D=w.result)==null?void 0:D.toString())||"";t(k),e(void 0)}),w.readAsDataURL(L[0])}},image:u,tabIndex:f}),(l||u)&&d.jsxs(ec2,{className:"actions",children:[d.jsx(O.Button,{color:"inherit",startIcon:d.jsx(Ce,{icon:"DELETE_MARK_BUTTON_02",color:"error.main"}),onClick:m,children:"Remover"}),d.jsx(O.Button,{color:"inherit",startIcon:d.jsx(Ce,{icon:"SEARCH_IMAGE",color:"primary.maon"}),onClick:v,children:"Editar"})]})]}),d.jsx(DGn,{id:g,open:C,onClose:h,label:r,aspectRatio:a,imageSrc:u,onRemove:m,onSave:b,onPreview:p,onInitialized:y}),d.jsx(O.Dialog,{open:!!M,onClose:E,scroll:"body",PaperProps:{sx:{p:2}},children:M&&d.jsx("img",{src:M,alt:"Preview"})})]})},nc2=O.styled(O.Stack)(({theme:e})=>({backgroundColor:"#fff",border:`1px solid ${e.palette.grey[300]}`})),IGn=({children:e,...t})=>d.jsx(nc2,{borderRadius:1,gap:3,padding:3,...t,children:e}),rc2=O.styled(O.Box)(()=>({marginLeft:"4px",fontWeight:"fontWeightBold"})),ac2=O.styled(O.Button)(()=>({fontWeight:"fontWeightSemiBold"})),ic2=O.styled(Ce)(({theme:e})=>({color:e.palette.primary.main})),oc2=({selectedTitle:e,onSelect:t,options:n})=>{const a=USn();return d.jsxs(d.Fragment,{children:[d.jsx(ac2,{disableRipple:!0,color:"inherit",onClick:a.onOpen,endIcon:d.jsx(ic2,{icon:a.open?"CHEVRON_UP":"ARROW_DOWN_SIMPLE"}),children:d.jsx(rc2,{component:"span",children:e.label})}),d.jsx(GUn,{open:a.open,onClose:a.onClose,children:n.map(r=>d.jsx(O.MenuItem,{selected:r.value===e.value,onClick:()=>{a.onClose(),t(r.value)},children:r.label},r.value))})]})},uc2=O.styled(O.Stack)({display:"grid",gridTemplateColumns:"auto auto"}),cc2=O.styled(O.Typography)(({theme:e})=>({color:e.palette.grey[600],display:"flex",gap:"8px",alignItems:"center"})),lc2=O.styled(O.Typography)(({theme:e})=>({textAlign:"right",color:e.palette.grey[800]})),fc2=({data:e,...t})=>e.length===0?null:d.jsx(uc2,{gap:1,...t,children:e.map(n=>[d.jsx(cc2,{variant:"body2",children:n.label},`label:${n.id}`),d.jsx(lc2,{variant:"body2",children:n.value},`value:${n.id}`)])}),sc2=O.styled(O.Stack)(({theme:e})=>({backgroundColor:"#fff",minWidth:"250px",padding:24,minHeight:"100vh",borderRight:`1px solid ${e.palette.grey[300]}`})),dc2=O.styled(O.Stack)(({theme:e})=>({backgroundColor:"#fff",position:"sticky",top:0,zIndex:999,width:"100%",padding:24,gap:24,borderBottom:`1px solid ${e.palette.grey[300]}`})),gc2=O.styled(O.Stack)({flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:24}),_c2=O.styled(O.Stack)(({theme:e})=>({height:"100%",width:"50%",flex:1,[e.breakpoints.down(1680)]:{width:"70%"}})),mc2=O.styled(O.Typography)(({theme:e})=>({color:e.palette.grey[800],fontSize:18,fontWeight:700})),vc2=O.styled(O.Typography)(({theme:e})=>({color:e.palette.grey[500],fontSize:14,fontWeight:400,paddingBottom:24})),hc2=O.styled(O.Button)(({theme:e})=>({paddingTop:6,paddingBottom:6,paddingLeft:0,margin:0,marginBottom:4,marginTop:4,width:"100%",display:"block",cursor:"pointer",color:e.palette.grey[600],textAlign:"left",fontWeight:400,fontSize:14,"> span":{color:e.palette.error.main}})),Cc2=O.styled(Kce)(()=>({height:1,"& .simplebar-content":{height:1}})),bc2=O.styled(O.Stack)(()=>({position:"fixed",width:"202px"})),yc2=({title:e,sections:t,headerLeftContent:n,headerRightContent:a,onClickBack:r})=>d.jsx(O.Stack,{children:d.jsxs(O.Stack,{direction:"row",children:[d.jsx(sc2,{children:d.jsx(Cc2,{children:d.jsxs(bc2,{children:[d.jsx(O.Typography,{variant:"overline",color:"text.disabled",fontWeight:700,children:"ACESSO RÁPIDO"}),t.map((u,c)=>d.jsxs(O.Stack,{children:[d.jsxs(hc2,{onClick:()=>{u.ref.current&&u.ref.current.scrollIntoView({block:"start",behavior:"smooth"})},children:[u.title,u.isRequired&&d.jsx("span",{children:"*"})]}),c<t.length-1&&d.jsx(O.Divider,{})]},c))]})})}),d.jsxs(O.Stack,{width:"100%",alignItems:"center",mb:8,children:[d.jsx(dc2,{children:d.jsxs(gc2,{children:[d.jsxs(O.Stack,{flexDirection:"row",gap:2,alignItems:"center",children:[d.jsx(O.IconButton,{color:"primary",onClick:()=>r(),children:d.jsx(Ce,{icon:"CHEVRON_LEFT"})}),d.jsx(O.Typography,{variant:"h4",children:e}),n]}),d.jsxs(O.Stack,{direction:"row",gap:2,alignItems:"center",minWidth:"max-content",children:[d.jsx(LSn,{disabled:!0}),a]})]})}),d.jsx(_c2,{children:t.map(u=>d.jsxs(O.Stack,{paddingTop:3,paddingBottom:2,alignItems:"start",width:"100%",children:[d.jsx(mc2,{ref:u.ref,children:u.title}),d.jsx(vc2,{children:u.subTitle}),d.jsx(IGn,{width:"100%",borderRadius:1,gap:1.5,padding:3,children:u.child})]},u.title))})]})]})}),pc2=O.styled(O.Box)(({theme:e})=>({padding:24,borderRadius:8,height:"auto",maxWidth:800,backgroundColor:e.palette.background.default,border:`1px solid ${e.palette.grey[300]}`})),Oc2=O.styled(O.Stack)(({theme:e})=>({minHeight:180,maxWidth:700,border:`4px dotted ${e.palette.grey[300]}`,borderRadius:8,backgroundColor:"#fff",padding:24})),jc2=O.styled(O.Box)(()=>({maxWidth:70,maxHeight:40,alignItems:"center","&, img":{flex:1,display:"flex",objectFit:"cover",borderRadius:8}})),wc2=O.styled(O.Box)(({theme:e})=>({backgroundColor:e.palette.background.default,maxWidth:90,maxHeight:80,alignItems:"center","&, img":{flex:1,display:"flex",objectFit:"cover",borderRadius:8}})),WGn=O.styled(O.Stack)(({theme:e})=>({border:`4px dotted ${e.palette.grey[300]}`,borderRadius:8,backgroundColor:"#fff"})),Mc2=O.styled(O.Box)(({theme:e})=>({width:"auto",height:120,overflow:"hidden",padding:2,borderBottom:`4px dotted ${e.palette.grey[300]}`})),Lc2=({titlePreview:e,logoImage:t,brandingName:n,url:a,title:r,description:u,keyWords:c,customTitles:l,productImage:f,child:s,previewLinkImage:g,hasPreviewLink:_})=>d.jsx(pc2,{children:d.jsxs(O.Stack,{gap:3,display:"flex",flex:1,children:[d.jsx(O.Typography,{variant:"overline",color:"text.disabled",children:e??"PRÉ-VISUALIZAÇÃO"}),d.jsxs(Oc2,{children:[d.jsxs(O.Stack,{direction:"row",pb:3,gap:.5,children:[d.jsx(O.Box,{height:0,width:10,children:d.jsx(Ce,{icon:"CIRCLE",width:30,color:"error.main"})}),d.jsx(O.Box,{height:0,width:10,children:d.jsx(Ce,{icon:"CIRCLE",width:30,color:"warning.main"})}),d.jsx(O.Box,{height:0,width:10,children:d.jsx(Ce,{icon:"CIRCLE",width:30,color:"success.main"})})]}),d.jsxs(O.Stack,{flexDirection:"row",gap:2,justifyContent:"space-between",children:[d.jsxs(O.Stack,{gap:1,width:"100%",children:[d.jsxs(O.Stack,{direction:"row",gap:1.5,pb:.5,children:[t&&d.jsx(jc2,{children:d.jsx("img",{alt:"Logo",src:t})}),d.jsxs(O.Stack,{children:[d.jsx(O.Typography,{variant:"overline",color:"grey.600",pb:.5,children:n??"SUAEMPRESA"}),d.jsxs(O.Stack,{direction:"row",gap:2,children:[d.jsx(O.Typography,{variant:"caption",color:"grey.600",children:a??"https://www.exemplo.com"}),d.jsx(Ce,{icon:"MORE_OPTIONS_VERTICAL",width:15,color:"grey.500"})]})]})]}),d.jsx(tj,{variant:"subtitle1",color:"#4E5BEC",overflow:"hidden",textOverflow:"ellipsis",line:5,children:r??"Suampresa | Páscoa 2024: Ovos de chocolate? Que nada! Descontos em tecnologia!"}),d.jsx(tj,{variant:"caption",color:"text.disabled",overflow:"hidden",textOverflow:"ellipsis",line:5,children:u??"A Páscoa chegou e a Sua Empresa está com ofertas chocantes em tecnologia! Descontos de até 50% em notebooks, smartphones, tablets e muito mais!"}),c&&d.jsx(O.Stack,{direction:"row",gap:1,alignItems:"center",children:c.map((m,v)=>d.jsxs(d.Fragment,{children:[d.jsx(O.Typography,{variant:"caption",color:"text.disabled",children:m}),v<c.length-1&&d.jsx(O.Box,{width:4,height:16,children:d.jsx(Ce,{icon:"CIRCLE",color:"text.disabled",width:10})})]}))}),l&&d.jsx(O.Stack,{pt:2,children:l.map((m,v)=>d.jsxs(O.Stack,{gap:1,children:[d.jsx(O.Typography,{variant:"subtitle1",color:"#4E5BEC",children:m.title}),d.jsx(tj,{variant:"caption",color:"text.disabled",overflow:"hidden",textOverflow:"ellipsis",line:1,children:m.description??"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys stansince the 1500"})]},v))}),s]}),f&&d.jsx(wc2,{children:d.jsx("img",{alt:"ProductImage",src:f})})]})]}),_&&d.jsxs(O.Stack,{gap:3,display:"flex",flex:1,width:"100%",children:[d.jsx(O.Typography,{variant:"overline",color:"text.disabled",children:"pré-visualização link de compartilhamento".toUpperCase()}),d.jsxs(WGn,{children:[g&&d.jsx(Mc2,{children:d.jsx("img",{alt:"PreviewLinkImage",src:g,style:{width:"100%",height:"100%",objectFit:"cover",borderRadius:8}})}),d.jsxs(O.Stack,{gap:.2,p:2,width:"100%",children:[d.jsx(O.Typography,{variant:"caption",children:r??"Suampresa | Páscoa 2024: Ovos de chocolate? Que nada! Descontos em tecnologia!"}),d.jsx(O.Typography,{variant:"caption",color:"grey.600",children:u??"A Páscoa chegou e a Sua Empresa está com ofertas chocantes em tecnologia! Descontos de até 50% em notebooks, smartphones, tablets e muito mais!"}),d.jsx(O.Typography,{variant:"caption",color:"grey.500",children:a??"https://www.exemplo.com"})]})]}),d.jsx(WGn,{children:d.jsxs(O.Stack,{direction:"row",gap:1,alignItems:"center",children:[d.jsx(O.Box,{width:100,height:95,bgcolor:"grey.100",p:.5,alignItems:"center",children:d.jsx("img",{alt:"Logo",src:t,style:{width:"100%",height:"100%",objectFit:"contain",borderRadius:8}})}),d.jsxs(O.Stack,{padding:1,gap:.2,width:"80%",children:[d.jsx(tj,{variant:"caption",children:r??"Suampresa | Páscoa 2024: Ovos de chocolate? Que nada! Descontos em tecnologia!"}),d.jsx(tj,{variant:"caption",color:"grey.600",children:u??"A Páscoa chegou e a Sua Empresa está com ofertas chocantes em tecnologia! Descontos de até 50% em notebooks, smartphones, tablets e muito mais!"}),d.jsx(tj,{variant:"caption",color:"grey.500",line:1,children:a??"https://www.exemplo.com"})]})]})})]})]})}),Pc2=O.styled(O.Stack)(({theme:e})=>({border:`1px solid ${O.alpha(e.palette.grey[500],.32)}`,borderRadius:8,alignItems:"center",overflow:"hidden"})),Ec2=O.styled(O.Stack)(()=>({backgroundColor:"#F5F5F5",padding:8,width:"100%",justifyContent:"space-between",alignItems:"center",gap:12,"& .MuiInputBase-root":{backgroundColor:"#fff"}}));O.styled(O.Stack)(({theme:e})=>({border:`1px solid ${O.alpha(e.palette.grey[500],.32)}`,borderRadius:8,alignItems:"center"}));const kc2=O.styled(O.Collapse)(()=>({width:"100%",padding:"12px 16px"})),Sc2=({description:e,name:t,children:n,header:a,onDelete:r})=>{const[u,c]=xht(!0);return d.jsxs(Pc2,{children:[d.jsxs(Ec2,{direction:"row",children:[d.jsxs(O.Stack,{direction:"row",alignItems:"center",gap:1.5,flex:1,children:[d.jsx(O.IconButton,{edge:"end",onClick:c,children:d.jsx(Ce,{icon:u?"CHEVRON_UP":"CHEVRON_RIGHT"})}),d.jsx(O.Typography,{variant:"overline",color:"text.primary",children:t}),d.jsx(O.Typography,{variant:"overline",color:"text.secondary",children:e}),d.jsx(O.Stack,{flex:1,children:a})]}),d.jsx(O.IconButton,{color:"error",onClick:r,children:d.jsx(Ce,{icon:"DELETE_MARK_BUTTON_02"})})]}),d.jsx(kc2,{in:u,timeout:"auto",unmountOnExit:!0,children:n})]})},Dc2=O.styled(O.ToggleButtonGroup)(({theme:e})=>({button:{textTransform:"none"},"& .MuiToggleButton-primary:hover":{backgroundColor:`${e.palette.primary.dark}`,color:e.palette.primary.contrastText},"& button:not(.Mui-selected):hover":{backgroundColor:e.palette.primary.lighter,color:e.palette.primary.main},"& .Mui-selected":{backgroundColor:`${e.palette.primary.main} !important`,color:`${e.palette.primary.contrastText} !important`}})),Bc2=e=>d.jsx(Dc2,{...e}),Ic2=O.styled(O.Card,{shouldForwardProp:e=>e!=="active"})(({theme:e,active:t})=>({boxShadow:"none",cursor:"pointer",borderRadius:8,borderStyle:"solid",borderWidth:1.5,borderColor:t?e.palette.primary.main:e.palette.grey[300],color:e.palette.primary.main,backgroundColor:t?O.alpha(e.palette.primary.main,.04):"white","&:hover":{borderColor:e.palette.primary.main}})),$Gn=({title:e,action:t,loading:n,items:a,values:r,onChange:u})=>{const[c,l]=o.useState(),f=h=>r.includes(h),s=c?a.filter(h=>h.title.toLowerCase().includes(c.toLowerCase())):a,g=h=>{const b=f(h.value);let p;b?p=r.filter(y=>y!==h.value):p=[...r,h.value],u(p)},_=()=>{r.length===a.length?u([]):u(a.map(h=>h.value))},m=new Intl.PluralRules("pt-BR"),v=new Map([["one","selecionado"],["other","selecionados"]]),C=h=>{const b=m.select(h),p=v.get(b);return`${h} ${p}`};return d.jsxs(O.Stack,{gap:1.5,height:450,children:[d.jsxs(O.Stack,{direction:"row",justifyContent:"space-between",children:[d.jsx(O.Typography,{variant:"overline",color:"text.disabled",children:e}),d.jsx(O.Typography,{variant:"overline",color:"text.disabled",children:r.length===0?"nenhum selecionado":C(r.length)})]}),d.jsxs(O.Stack,{direction:"row",alignItems:"center",spacing:1.5,children:[d.jsx(NCt,{fullWidth:!0,size:"small",iconPosition:"start",placeholder:"Buscar",trigger:"change",onSearch:h=>l(h),onKeyDown:h=>{h.key==="Enter"&&h.preventDefault()}}),t?d.jsx(d.Fragment,{children:t}):d.jsx(O.Button,{onClick:_,size:"small",children:d.jsx(O.Typography,{variant:"overline",children:"TODOS"})})]}),d.jsx(Kce,{children:d.jsx(O.Stack,{flex:1,mb:2,children:d.jsx(VCt,{isLoading:n,loading:d.jsx(O.Stack,{alignItems:"center",mt:3,children:d.jsx(O.CircularProgress,{})}),isEmpty:a.length===0,empty:d.jsx(amt,{sx:{svg:{height:140}},text:c?`Não foi possivel encontrar o item "${c}"`:"Nenhum item disponível"}),children:d.jsx(O.Grid,{container:!0,spacing:1.5,children:s.map(h=>d.jsx(O.Grid,{item:!0,xs:4,children:d.jsx(Ic2,{active:f(h.value),onClick:()=>g(h),children:d.jsxs(O.Stack,{padding:1.5,width:"100%",children:[d.jsxs(O.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[d.jsx(O.Typography,{color:f(h.value)?"primary.main":"text.primary",variant:"subtitle2",textAlign:"left",noWrap:!0,children:h.title}),f(h.value)&&d.jsx(Ce,{icon:"CHECK_CIRCLE",width:24})]}),h.options.map(b=>d.jsx(O.Typography,{mt:1,variant:"body2",color:"text.disabled",fontSize:12,textAlign:"left",noWrap:!0,children:`${b.label}: ${b.value}`},b.label))]})})},h.title))})})})})]})},fn=({name:e,helperText:t,rules:n,onChange:a,tabIndex:r,...u})=>{const{control:c}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:c,rules:n,render:({field:{ref:l,...f},fieldState:{error:s}})=>d.jsx(O.TextField,{...f,onChange:g=>{f.onChange(g),a&&a(g)},inputRef:l,fullWidth:!0,error:!!s,helperText:(s==null?void 0:s.message)||t,...u,inputProps:{...u.inputProps,tabIndex:r}})})},Wc2=O.styled(O.IconButton)(({theme:e})=>({svg:{color:`${e.palette.primary.main} !important`}}));O.styled(O.IconButton)(()=>({height:"38px",alignSelf:"center"}));const $c2=O.styled(O.Typography)(()=>({textDecoration:"underline",fontWeight:"600",cursor:"pointer"})),xc2=O.styled(O.Alert)(({theme:e})=>({backgroundColor:`${O.alpha(e.palette.primary.main,.03)}`,border:`1px solid ${O.alpha(e.palette.primary.main,.4)}`,flexDirection:"row",alignItems:"center",padding:"2px 12px",gap:8,borderRadius:8,marginBottom:16,"& svg":{color:e.palette.primary.main}})),zc2=()=>{const e=()=>{const t="https://ajuda.zydon.com.br/pt-BR/articles/9180603-sobre-webhooks";window.open(t,"_blank")};return d.jsx(xc2,{severity:"info",children:d.jsxs(O.Typography,{color:"grey",variant:"caption",children:["Webhooks permitem que serviços externos sejam notificados quando determinados eventos acontecem. Saiba mais"," ",d.jsx($c2,{variant:"caption",color:"primary",onClick:()=>e(),children:"acessando a documentação do Webhook"})]})})},Hc2=[{label:"XML",value:"XML"},{label:"JSON",value:"JSON"},{label:"BYTEA",value:"BYTEA"}],Ac2=[{label:"GET",value:"GET"},{label:"POST",value:"POST"},{label:"DELETE",value:"DELETE"},{label:"PUT",value:"PUT"}],Rc2=({webhookData:e,isEditing:t=!1,haveTip:n=!1})=>{const{control:a}=Be.useFormContext(),{fields:r,append:u,remove:c}=Be.useFieldArray({name:"headers",control:a}),l=()=>{u({value:"",name:""})};return d.jsxs(d.Fragment,{children:[n&&d.jsx(zc2,{}),t&&d.jsx(fn,{name:"name",label:"Nome do webhook"}),d.jsxs(O.Stack,{direction:"row",gap:2,children:[d.jsx(fn,{name:"url",label:"URL de endpoint",rules:{required:{value:!0,message:"Url é obrigatório"}}}),d.jsx(fn,{name:"filter",label:"Filtro"})]}),t&&e&&d.jsxs(d.Fragment,{children:[d.jsx(fn,{variant:"filled",name:"solution",label:"Solução",disabled:!0}),d.jsxs(O.Stack,{direction:"row",gap:2,children:[d.jsx(fn,{variant:"filled",name:"resource",label:"Origem",disabled:!0}),d.jsx(fn,{variant:"filled",name:"resourceID",label:"ID origem",disabled:!0,InputProps:{endAdornment:d.jsx(O.InputAdornment,{position:"end",children:d.jsx(Wc2,{onClick:()=>navigator.clipboard.writeText(e.resource_id),children:d.jsx(Ce,{className:"copyIcon",icon:"COPY_CONTENT"})})})}}),d.jsx(fn,{variant:"filled",name:"event",label:"Evento",disabled:!0})]})]}),d.jsxs(O.Stack,{direction:"row",gap:2,alignItems:"center",children:[d.jsx(KCt,{fullWidth:!0,options:Hc2,name:"content_type",label:"Tipo de conteúdo",required:!0,rules:{required:{value:!0,message:"Campo Tipo de conteúdo é obrigatório"}}}),d.jsx(KCt,{fullWidth:!0,options:Ac2,name:"http_method",label:"Método HTTP",required:!0,rules:{required:{value:!0,message:"Campo Método HTTP é obrigatório"}}})]}),d.jsx(O.Typography,{variant:"overline",color:"grey",children:"Cabeçalho"}),r==null?void 0:r.map((f,s)=>d.jsxs(O.Stack,{direction:"row",gap:2,alignItems:"center",children:[d.jsx(fn,{name:`headers.${s}.name`,label:"Chave",required:!0,rules:{required:{value:!0,message:""}}}),d.jsx(fn,{name:`headers.${s}.value`,label:"Valor"}),d.jsx(O.IconButton,{color:"error",onClick:()=>c(s),children:d.jsx(Ce,{icon:"DELETE_MARK_BUTTON_02"})})]},f.id)),d.jsx(FRn,{actionType:"NEW",size:"large",variant:"outlined",color:"inherit",fullWidth:!0,onClick:()=>l(),children:"Adicionar novo cabeçalho"}),d.jsx(O.Divider,{})]})},KCt=({name:e,helperText:t,rules:n,onSelectOption:a,...r})=>{const{control:u}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:u,rules:n,render:({field:c,fieldState:{error:l}})=>d.jsx(jSn,{...c,...r,onChange:f=>{a&&a(f,c.value),c.onChange(f)},error:!!l,helperText:(l==null?void 0:l.message)||t})})},xGn=({name:e,helperText:t,rules:n,onChange:a,error:r,...u})=>{const{control:c}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:c,rules:n,render:({field:{name:l,onChange:f,value:s,ref:g},fieldState:{error:_}})=>d.jsx(JBn,{ref:g,...u,name:l,value:s,error:r||!!_,helperText:(_==null?void 0:_.message)||t,onChange:({target:{value:m}})=>{a&&a(m),f(m)}})})},Vc2=({name:e,containerProps:t,required:n,rules:a,tabIndex:r})=>{const u=`${e}.zipCode`,c=`${e}.publicPlace`,l=`${e}.number`,f=`${e}.district`,s=`${e}.complement`,g=`${e}.state`,_=`${e}.city`,m=v=>{v.key==="Enter"&&v.preventDefault()};return d.jsxs(O.Stack,{gap:1.5,...t,children:[d.jsxs(O.Stack,{direction:{xs:"column",md:"row"},gap:1.5,flexWrap:"wrap",children:[d.jsx(xGn,{name:u,label:"CEP",mask:[{mask:"00000-000"}],InputProps:{endAdornment:d.jsx(O.InputAdornment,{position:"end",children:d.jsx(O.CircularProgress,{size:24})})},rules:a,onKeyDown:m,required:n,sx:{width:"auto",flex:1,minWidth:160},tabIndex:r}),d.jsxs(O.Stack,{direction:{xs:"column",sm:"row"},gap:1.5,flex:{xs:1,md:"1 1 50%"},children:[d.jsx(fn,{name:c,label:"Logradouro",onKeyDown:m,inputProps:{maxLength:70},sx:{width:"auto",minWidth:250,flex:1},tabIndex:r}),d.jsx(fn,{name:l,label:"Número",onKeyDown:m,inputProps:{maxLength:6},sx:{width:"auto",minWidth:100},tabIndex:r})]})]}),d.jsxs(O.Stack,{direction:{xs:"column",md:"row"},gap:1.5,flexWrap:"wrap",children:[d.jsx(fn,{name:f,label:"Bairro",onKeyDown:m,inputProps:{maxLength:20},sx:{width:"auto",flex:{xs:1,md:"1 1 100px"}},tabIndex:r}),d.jsx(fn,{name:s,label:"Complemento",onKeyDown:m,inputProps:{maxLength:30},sx:{minWidth:200,width:"auto",flex:{xs:1,md:"1 1 500px"}},tabIndex:r})]}),d.jsxs(O.Stack,{gap:1.5,flexWrap:"wrap",direction:{xs:"column",sm:"row"},children:[d.jsx(KCt,{name:g,label:"Estado",options:[],disabled:!0,required:n,sx:{flex:1},tabIndex:r}),d.jsx(fn,{name:_,label:"Cidade",disabled:!0,required:n,sx:{flex:1},tabIndex:r})]})]})},Fc2=({name:e,rules:t,helperText:n,...a})=>{const{control:r}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:r,rules:t,render:({field:u,fieldState:{error:c}})=>d.jsx(MSn,{...u,...a,onChange:l=>{u.onChange(l)},error:!!c,helperText:(c==null?void 0:c.message)||n})})},Nc2=({name:e,rules:t,helperText:n,tabIndex:a,...r})=>{const{control:u}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:u,rules:t,render:({field:c,fieldState:{error:l}})=>d.jsxs("div",{children:[d.jsx(O.FormControlLabel,{control:d.jsx(O.Checkbox,{...c,checked:c.value,tabIndex:a}),...r}),(!!l||n)&&d.jsx(O.FormHelperText,{error:!!l,children:l?l==null?void 0:l.message:n})]})})},Tc2=({row:e,name:t,rules:n,label:a,options:r,spacing:u,helperText:c,required:l,...f})=>{const{control:s}=Be.useFormContext(),g=(_,m)=>_.includes(m)?_.filter(v=>v!==m):[..._,m];return d.jsx(Be.Controller,{name:t,control:s,rules:n,render:({field:{value:_=[],...m},fieldState:{error:v}})=>d.jsxs(O.FormControl,{component:"fieldset",children:[a&&d.jsx(O.FormLabel,{component:"legend",sx:{typography:"body2"},required:l,children:a}),d.jsx(O.FormGroup,{sx:{...e&&{flexDirection:"row"},"& .MuiFormControlLabel-root":{"&:not(:last-of-type)":{mb:u||0},...e&&{mr:0,"&:not(:last-of-type)":{mr:u||2}}}},children:r.map(C=>d.jsx(O.FormControlLabel,{control:d.jsx(O.Checkbox,{checked:_.includes(C.value),onChange:()=>m.onChange(g(_,C.value))}),label:C.label,...f},C.value))}),(!!v||c)&&d.jsx(O.FormHelperText,{error:!!v,sx:C=>({color:f.disabled?C.palette.grey[500]:void 0}),children:v?v==null?void 0:v.message:c})]})})},Zc2=({keyName:e,inputs:t=[],rules:n,tabIndex:a,...r})=>{const u=o.useRef(null),{control:c,setValue:l,formState:{errors:f}}=Be.useFormContext(),s=m=>{const v=m.clipboardData.getData("text").split("");t.map((C,h)=>l(C,v[h])),m.preventDefault()},g=(m,v)=>{const{maxLength:C,value:h,name:b}=m.target,p=b.replace(e,""),y=Number(p),M=document.querySelector(`input[name=${e}${y+1}]`);h.length>C&&(m.target.value=h[0]),h.length>=C&&y<6&&M!==null&&M.focus(),v(m)};W_t("paste",s,u);const _=t.some(m=>f[m]);return d.jsxs(O.Stack,{children:[d.jsx(O.Stack,{direction:"row",spacing:2,justifyContent:"center",ref:u,children:t.map((m,v)=>d.jsx(Be.Controller,{name:`${e}${v+1}`,control:c,rules:n,render:({field:C,fieldState:{error:h}})=>d.jsx(O.TextField,{...r,...C,autoComplete:"none",error:!!h,autoFocus:v===0,placeholder:"-",onChange:b=>{g(b,C.onChange)},onFocus:b=>b.currentTarget.select(),InputProps:{sx:{width:{xs:36,sm:56},height:{xs:36,sm:56},"& input":{p:0,textAlign:"center"}}},inputProps:{maxLength:1,type:"number",tabIndex:a}})},m))}),_&&d.jsx(O.FormHelperText,{error:!0,sx:{px:2},children:"Código é obrigatório"})]})},Uc2=({name:e,rules:t,helperText:n,...a})=>{const{control:r}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:r,rules:{...t,validate:{...t==null?void 0:t.validate,validation:u=>{const c="#"+u.replaceAll("#","");return/^#([0-9A-Fa-f]{3}){1,2}$/.test(c)?!0:"Cor inválida"}}},render:({field:{ref:u,onChange:c,...l},fieldState:{error:f}})=>d.jsx(aTn,{...l,onChangeColor:c,inputRef:u,fullWidth:!0,error:!!f,helperText:(f==null?void 0:f.message)||n,...a})})},Gc2=({name:e,rules:t,tabIndex:n,helperText:a,required:r,...u})=>{const{control:c}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:c,rules:t,render:({field:{ref:l,...f},fieldState:{error:s}})=>{var g;return d.jsx(kT.DatePicker,{inputRef:l,format:"dd/MM/yyyy",localeText:{previousMonth:"Mês anterior",nextMonth:"Próximo mês",fieldDayPlaceholder:()=>"dd",fieldMonthPlaceholder:()=>"mm",fieldYearPlaceholder:()=>"aaaa",...u.localeText},...f,...u,value:f.value?new Date(f.value):null,slotProps:{textField:{...(g=u.slotProps)==null?void 0:g.textField,required:r,error:!!s,helperText:(s==null?void 0:s.message)||a,autoComplete:"off",spellCheck:"false",fullWidth:!0,inputProps:{tabIndex:n}},openPickerButton:{tabIndex:n}}})}})},Yc2=({name:e,label:t,rules:n,tabIndex:a,helperText:r,required:u,...c})=>{const{control:l,setError:f}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:l,rules:n,render:({field:{value:s,onChange:g},fieldState:{error:_}})=>d.jsx(kT.DateRangePicker,{format:"dd/MM/yyyy",localeText:{previousMonth:"Mês anterior",nextMonth:"Próximo mês",fieldDayPlaceholder:()=>"dd",fieldMonthPlaceholder:()=>"mm",fieldYearPlaceholder:()=>"aaaa",...c.localeText},value:[(s==null?void 0:s.startDate)||null,(s==null?void 0:s.endDate)||null],onChange:m=>g({startDate:m[0],endDate:m[1]}),onError:m=>{f(e,{message:m[0]||m[1]||void 0})},...c,slotProps:{textField:({position:m})=>{var v;return{...(v=c.slotProps)==null?void 0:v.textField,required:u,error:!!_,helperText:(_==null?void 0:_.message)||r,autoComplete:"off",spellCheck:"false",fullWidth:!0,label:m==="start"?`${t} (Dt. Início)`:`${t} (Dt. Fim)`,inputProps:{tabIndex:a}}}},sx:{width:1}})})},Kc2=({name:e,rules:t,tabIndex:n,helperText:a,required:r,...u})=>{const{control:c}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:c,rules:t,render:({field:{ref:l,...f},fieldState:{error:s}})=>{var g;return d.jsx(kT.DateTimePicker,{format:"dd/MM/yyyy HH:mm",inputRef:l,localeText:{previousMonth:"Mês anterior",nextMonth:"Próximo mês",fieldDayPlaceholder:()=>"dd",fieldMonthPlaceholder:()=>"mm",fieldYearPlaceholder:()=>"aaaa",fieldHoursPlaceholder:()=>"hh",fieldMinutesPlaceholder:()=>"mm",...u.localeText},...f,...u,value:f.value?new Date(f.value):null,slotProps:{textField:{...(g=u.slotProps)==null?void 0:g.textField,required:r,error:!!s,helperText:(s==null?void 0:s.message)||a,autoComplete:"off",spellCheck:"false",fullWidth:!0,inputProps:{tabIndex:n}},openPickerButton:{tabIndex:n}}})}})},Xc2=({id:e,children:t,onSubmit:n,methods:a,...r})=>d.jsx(Be.FormProvider,{...a,children:d.jsx(O.Stack,{component:"form",id:e,onSubmit:n,flex:1,width:1,noValidate:!0,...r,children:t})}),Qc2=({name:e,helperText:t,rules:n,...a})=>{const{control:r}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:r,rules:n,render:({field:{ref:u,value:c,...l},fieldState:{error:f}})=>d.jsx(YBn,{value:c,inputRef:u,fullWidth:!0,error:!!f,helperText:(f==null?void 0:f.message)||t,...a,...l,name:e})})},Jc2=({name:e,label:t="",rules:n,helperText:a,changed:r,...u})=>{const{control:c}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:c,rules:n,render:({field:l,fieldState:{error:f}})=>d.jsx(O.Autocomplete,{...l,onChange:(s,g)=>{r&&r(g),l.onChange(g)},renderInput:s=>d.jsx(O.TextField,{label:t,error:!!f,helperText:f?f==null?void 0:f.message:a,...s}),...u})})},qc2=({name:e,helperText:t,rules:n,onChange:a,...r})=>{const{control:u}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:u,rules:n,render:({field:c,fieldState:{error:l}})=>d.jsx($Ct,{...c,onChange:f=>{c.onChange(f),a&&a(f)},fullWidth:!0,error:!!l,helperText:(l==null?void 0:l.message)||t,...r})})},el2=({name:e,sx:t,rules:n,passwordSize:a,specialCharacter:r,upperCaseChar:u,numberChar:c,showErrorMessage:l,match:f,...s})=>{const{watch:g}=Be.useFormContext(),_=g(e),[m,v]=o.useState(!1),{hasNumberChar:C,hasSpecialCharacter:h,hasUpperCaseChar:b,isLengthValid:p}=RCt(_,a,c,r,u);return d.jsx(fn,{...s,name:e,type:m?"text":"password",InputProps:{endAdornment:d.jsx(O.InputAdornment,{position:"end",children:d.jsx(O.IconButton,{onClick:()=>v(!m),edge:"end","aria-label":"Mostrar/Ocultar senha",tabIndex:-1,children:d.jsx(Ce,{icon:m?"VIEW_ON":"VIEW_OFF"})})})},rules:{...n,validate:{...n==null?void 0:n.validate,validationPassword:y=>{const M=RCt(y,a,c,r,u);return!M.hasNumberChar||!M.hasSpecialCharacter||!M.hasUpperCaseChar||!M.isLengthValid?"Senha inválida":f&&f.fieldPassword&&g(f.fieldPassword)!==y?"As senhas devem ser iguais":!0}}},sx:{...t,"& .MuiFormHelperText-root":{display:(!h||!b||!p||!C)&&!l?"none":void 0}}})},tl2=({name:e,rules:t,row:n,label:a,options:r,spacing:u,helperText:c,decorated:l,onChange:f,tabIndex:s,required:g,disabled:_,...m})=>{const{control:v}=Be.useFormContext(),C=a?`${e}-${a}`:"";return d.jsx(Be.Controller,{name:e,control:v,rules:t,render:({field:h,fieldState:{error:b}})=>d.jsxs(O.FormControl,{component:"fieldset",sx:{...l&&{paddingLeft:1.5}},children:[a&&d.jsx(O.FormLabel,{component:"legend",id:C,sx:{typography:"body2"},required:g,children:a}),d.jsx(O.RadioGroup,{...m,...h,onChange:(p,y)=>{h.onChange(p),f&&f(p,y)},"aria-labelledby":C,row:n,children:r.map(p=>d.jsx(O.FormControlLabel,{value:p.value,control:d.jsx(O.Radio,{inputProps:{tabIndex:s},disabled:_,checked:p.value===h.value,icon:p.icon,checkedIcon:p.icon}),label:p.label,sx:({palette:y})=>({"&:not(:last-of-type)":{mb:u||0},...n&&{mr:0,"&:not(:last-of-type)":{mr:u||2}},...l&&{border:`1px solid ${O.alpha(y.grey[500],.32)}`,borderRadius:1,padding:.25,paddingRight:(u||0)/2||1,...h.value===p.value&&{borderColor:"primary.main",backgroundColor:O.alpha(y.primary.main,.05)}}})},p.value))}),(!!b||c)&&d.jsx(O.FormHelperText,{error:!!b,sx:p=>({color:_?p.palette.grey[500]:void 0}),children:b?b==null?void 0:b.message:c})]})})},nl2=({name:e,helperText:t,onChange:n,tabIndex:a,size:r,label:u,...c})=>{const{control:l}=Be.useFormContext(),f=s=>d.jsx(O.Switch,{...s,checked:s.value,onChange:(g,_)=>{s.onChange(g),n&&n(g,_)},inputProps:{tabIndex:a},size:r});return d.jsx(Be.Controller,{name:e,control:l,render:({field:s,fieldState:{error:g}})=>d.jsxs("div",{children:[u?d.jsx(O.FormControlLabel,{label:u,control:f(s),...c}):f(s),(!!g||t)&&d.jsx(O.FormHelperText,{error:!!g,sx:_=>({mx:"14px",color:c.disabled?_.palette.grey[500]:void 0}),children:g?g==null?void 0:g.message:t})]})})},rl2=({name:e,rules:t,tabIndex:n,helperText:a,required:r,...u})=>{const{control:c}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:c,rules:t,render:({field:{ref:l,...f},fieldState:{error:s}})=>{var g;return d.jsx(kT.TimePicker,{ampm:!1,format:"HH:mm",inputRef:l,localeText:{fieldHoursPlaceholder:()=>"hh",fieldMinutesPlaceholder:()=>"mm",...u.localeText},...f,...u,value:f.value?new Date(f.value):null,slotProps:{textField:{...(g=u.slotProps)==null?void 0:g.textField,error:!!s,required:r,helperText:(s==null?void 0:s.message)||a,autoComplete:"off",spellCheck:"false",fullWidth:!0,inputProps:{tabIndex:n}},openPickerButton:{tabIndex:n}}})}})},al2=({onFileCropped:e,onImageUploaded:t,onCancel:n,aspect:a,label:r,image:u="",uploading:c,file:l,tabIndex:f,...s})=>{const{id:g,setCropModalOpen:_,handleRemove:m,cropModalOpen:v,cancelChanges:C,saveChanges:h,previewImage:b,setCropper:p,preview:y,closePreviewImage:M}=SGn({onFileCropped:e,onImageUploaded:t,onCancel:n});return d.jsxs(d.Fragment,{children:[d.jsxs(O.Stack,{position:"relative",alignItems:"center",justifyContent:"center",children:[c&&d.jsx(tc2,{}),d.jsx(kGn,{...s,id:g,file:l,onDrop:E=>{if(E.length>0){_(!0);const L=new FileReader;L.addEventListener("load",()=>{var k;const w=((k=L.result)==null?void 0:k.toString())||"";t(w),e(void 0)}),L.readAsDataURL(E[0])}},image:u,tabIndex:f})]}),d.jsx(DGn,{id:g,open:v,onClose:C,label:r,aspectRatio:a,imageSrc:u,onRemove:m,onSave:h,onPreview:b,onInitialized:p}),d.jsx(O.Dialog,{open:!!y,onClose:M,scroll:"body",PaperProps:{sx:{p:2}},children:y&&d.jsx("img",{src:y,alt:"Preview"})})]})};function zGn(e,t){const{watch:n,setValue:a}=Be.useFormContext(),[r,u]=o.useState(t),c=n(e)||[];return{uploadFile:async m=>{if(!m){a(e,void 0),u(void 0);return}a(e,m),u(Object.assign(m,{preview:URL.createObjectURL(m)}))},uploadFiles:async m=>{a(e,[...c,...m.map(v=>Object.assign(v,{preview:URL.createObjectURL(v)}))])},handleDeleteFile:()=>{a(e,void 0),u(void 0)},handleRemoveAll:()=>{a(e,void 0)},handleRemove:m=>{const v=c.filter(C=>C!==m);a(e,v)},file:r,setFileValue:u}}const il2=({name:e,rules:t,helperText:n,aspect:a,label:r,image:u,onFileCropped:c,onImageUploaded:l,onCancel:f,...s})=>{const{control:g}=Be.useFormContext(),{uploadFile:_,file:m,setFileValue:v}=zGn(e);return d.jsx(Be.Controller,{name:e,control:g,rules:t,render:({field:{value:C},fieldState:{error:h}})=>d.jsx(al2,{accept:{"image/*":[]},file:C?m:void 0,onFileCropped:b=>{_(b),c&&c(b)},onImageUploaded:l,onCancel:()=>{v(void 0),f&&f()},error:!!h,disableMultiple:!0,helperText:(!!h||n)&&d.jsx(O.FormHelperText,{error:!!h,sx:{px:2},children:h?h==null?void 0:h.message:n}),aspect:a,label:r,image:u,...s})})},ol2=({name:e,rules:t,helperText:n,aspect:a,label:r,image:u,onFileCropped:c,onImageUploaded:l,onCancel:f,...s})=>{const{control:g}=Be.useFormContext(),{uploadFile:_,file:m,setFileValue:v}=zGn(e);return d.jsx(Be.Controller,{name:e,control:g,rules:t,render:({field:{value:C},fieldState:{error:h}})=>d.jsx(BGn,{accept:{"image/*":[]},file:C?m:void 0,onFileCropped:b=>{_(b),c&&c(b)},onImageUploaded:l,onCancel:()=>{v(void 0),f&&f()},error:!!h,disableMultiple:!0,helperText:(!!h||n)&&d.jsx(O.FormHelperText,{error:!!h,sx:{px:2},children:h?h==null?void 0:h.message:n}),aspect:a,label:r,image:u,...s})})},HGn=O.styled(O.Button)(({theme:e})=>({borderColor:e.palette.grey[300]})),AGn=O.styled(O.Box)(({theme:e})=>({display:"flex",border:`1.5px solid ${e.palette.grey[300]}`,height:450,borderRadius:8,flex:1,overflow:"hidden"})),ul2=({selectedItems:e,items:t,loading:n,searchText:a,onAdd:r,onRemove:u,search:c,itemsTitle:l,selectedItemsTitle:f,additionalContent:s,enableSearchInSelectedItems:g,onSearch:_})=>{const[m,v]=o.useState(""),C=O.debounce(_,400),h=t.filter(W=>!e.some(z=>z.id===W.id)),b=e.filter(W=>{var z;return(z=W.name)==null?void 0:z.toLowerCase().includes(m.toLowerCase())}),p=g?b:t.filter(W=>e.some(z=>z.id===W.id)),[y,M]=o.useState([]),[E,L]=o.useState([]),w=()=>{r(y),M([])},k=()=>{u(E),L([])},D=W=>{L(W?p:[])},S=W=>{M(W?h:[])},I=(W,z)=>{L(z?T=>[...T,W]:T=>T.filter(H=>H.id!==W.id))},A=(W,z)=>{M(z?T=>[...T,W]:T=>T.filter(H=>H.id!==W.id))},F=W=>{W.key==="Enter"&&W.preventDefault()};return d.jsx(O.Stack,{children:d.jsxs(O.Stack,{direction:"row",alignItems:"center",gap:3,children:[d.jsx(AGn,{flex:1,children:d.jsxs(O.Stack,{flex:1,overflow:"hidden",children:[d.jsxs(O.Stack,{direction:"row",gap:1,padding:2,children:[d.jsx(O.Checkbox,{size:"small",indeterminate:y.length>0&&y.length!==h.length,checked:y.length>0&&y.length===h.length,onChange:W=>S(W.target.checked)}),d.jsxs(O.Stack,{children:[d.jsx(O.Typography,{variant:"subtitle2",color:"text.primary",children:`${l} cadastrados(as)`}),d.jsx(O.Typography,{variant:"caption",color:"text.disabled",children:`${y.length}/${h.length} selecionados`})]})]}),d.jsx(O.Divider,{}),d.jsxs(O.Stack,{p:2,flex:1,overflow:"hidden",children:[d.jsxs(O.Stack,{direction:"row",gap:1,children:[d.jsx(NCt,{iconPosition:"start",placeholder:"Buscar",onKeyDown:F,size:"small",fullWidth:!0,trigger:"change",onSearch:W=>C(W)}),s]}),d.jsx(VCt,{isLoading:n,loading:d.jsx(O.Stack,{alignItems:"center",justifyContent:"center",flex:1,children:d.jsx(O.CircularProgress,{})}),isEmpty:h.length===0,empty:d.jsx(amt,{text:c?`Nenhum ${a} encontrado`:`Nenhum ${a} disponível`,sx:{svg:{height:140}}}),children:d.jsx(Kce,{sx:{maxHeight:280},children:h.map(W=>d.jsxs(O.Stack,{gap:1,marginTop:"8px",children:[d.jsxs(O.Stack,{direction:"row",gap:.5,alignItems:"center",marginTop:"8px",children:[d.jsx(O.Checkbox,{size:"small",checked:y.includes(W),onChange:z=>A(W,z.target.checked)}),W.label]}),d.jsx(O.Divider,{})]},W.id))})})]})]})}),d.jsxs(O.Stack,{gap:3,children:[d.jsx(HGn,{variant:"outlined",onClick:w,children:d.jsx(Ce,{icon:"ARROW_RIGHT_SIMPLE"})}),d.jsx(HGn,{variant:"outlined",onClick:k,children:d.jsx(Ce,{icon:"ARROW_LEFT_SIMPLE"})})]}),d.jsx(AGn,{flex:1,children:d.jsxs(O.Stack,{flex:1,overflow:"hidden",children:[d.jsxs(O.Stack,{direction:"row",gap:1,padding:2,children:[d.jsx(O.Checkbox,{size:"small",indeterminate:E.length>0&&E.length!==p.length,checked:E.length>0&&E.length===p.length,onChange:W=>D(W.target.checked)}),d.jsxs(O.Stack,{children:[d.jsx(O.Typography,{variant:"subtitle2",color:"text.primary",children:`${f} selecionados(as)`}),d.jsx(O.Typography,{variant:"caption",color:"text.disabled",children:`${E.length}/${p.length} selecionados`})]})]}),d.jsx(O.Divider,{}),d.jsxs(O.Stack,{p:2,gap:1,overflow:"hidden",children:[g&&d.jsx(NCt,{iconPosition:"start",placeholder:"Buscar",size:"small",fullWidth:!0,trigger:"change",onSearch:W=>v(W??""),onKeyDown:F}),d.jsx(VCt,{isLoading:n,loading:d.jsx(O.Stack,{alignItems:"center",justifyContent:"center",flex:1,children:d.jsx(O.CircularProgress,{})}),isEmpty:p.length===0,empty:d.jsx(amt,{text:m?`Nenhum ${a} encontrado`:`Nenhum ${a} selecionado`,sx:{svg:{height:140},marginTop:"56px",backgroundColor:"transparent"}}),children:d.jsx(Kce,{sx:{maxHeight:280},children:p.map(W=>d.jsxs(O.Stack,{gap:1,children:[d.jsxs(O.Stack,{direction:"row",gap:.5,alignItems:"center",marginTop:"8px",children:[d.jsx(O.Checkbox,{size:"small",checked:E.includes(W),onChange:z=>I(W,z.target.checked)}),W.label]}),d.jsx(O.Divider,{})]},W.id))})})]})]})})]})})},cl2=({name:e,rules:t,...n})=>{const{control:a}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:a,rules:t,render:({field:r})=>d.jsx($Gn,{...r,...n})})},ll2=Object.freeze(Object.defineProperty({__proto__:null,default:jtr},Symbol.toStringTag,{value:"Module"}));R.ActionButton=FRn,R.Address=Vc2,R.Autocomplete=jSn,R.AutocompleteDetailed=MSn,R.AutocompleteDetailedField=Fc2,R.AutocompleteField=KCt,R.BuilderLayout=VBo,R.BuilderSidebar=hAo,R.Carousel=jko,R.CarouselArrowIndex=Rko,R.CarouselArrows=Eko,R.CarouselDots=Pko,R.Checkbox=Nc2,R.Codes=Zc2,R.ColorPickerField=Uc2,R.ColorPickerInput=aTn,R.ColoredLabel=bAo,R.Common=B12,R.CommonSSR=W12,R.Confirm=$12,R.CustomAvatar=wSn,R.CustomAvatarGroup=tVn,R.DataGrid=A12,R.DatePicker=Gc2,R.DateRangePicker=Yc2,R.DateTimePicker=Kc2,R.Delayed=R12,R.DialogAnimate=Ktr,R.Drawer=Q12,R.EmptyContent=fAn,R.EmptyView=amt,R.Error=q12,R.ExpandableGroup=Sc2,R.FabButtonAnimate=gzn,R.Field=fn,R.FixedProgressBar=yCt,R.Form=Xc2,R.FrameSkeleton=yc2,R.HelpButton=LSn,R.Icon=Ce,R.IconButtonAnimate=_zn,R.Iconify=TZn,R.IllustrationEmptyContent=WWn,R.ImageCrop=jUn,R.Incrementer=YBn,R.IncrementerField=Qc2,R.Label=zUn,R.Lightbox=FDo,R.LoadingScreen=Po2,R.MaskedInput=JBn,R.MaskedInputField=xGn,R.MaterialDesignContent=Tyt,R.MenuPopover=GUn,R.Modal=YUn,R.ModalActions=Yo2,R.MotionContainer=lnr,R.MotionLazyContainer=$yt,R.MotionViewport=cnr,R.MultiCheckbox=Tc2,R.MultipleChipField=Jc2,R.NoData=$Wn,R.NumberInput=$Ct,R.NumberInputField=qc2,R.PasswordField=el2,R.PasswordRules=t22,R.PopoverSelect=oc2,R.Portal=KUn,R.RadioGroupField=tl2,R.Result=VCt,R.SavedChanges=j22,R.Scrollbar=Kce,R.SearchInput=NCt,R.SelectableCards=$Gn,R.SelectableCardsField=cl2,R.SeoPreview=Lc2,R.SnackbarContent=Nyt,R.SnackbarProvider=Vzn,R.SplashScreen=w22,R.Steps=P22,R.StyledTab=E22,R.StyledTabs=k22,R.Summary=fc2,R.SwapList=ul2,R.Switch=nl2,R.TRANSITION=xWn,R.TabPanel=S22,R.TableEmptyRows=Gko,R.TableHeadCustom=Kko,R.TableNoData=Zko,R.TablePaginationCustom=Qko,R.TableSelectedAction=Xko,R.TableSkeleton=Uko,R.TextAnimate=Xtr,R.TextMaxLine=tj,R.ThemeProvider=nZn,R.TimePicker=rl2,R.ToggleButtonGroup=Bc2,R.Transition=Hvt,R.Upload=EGn,R.UploadAvatar=kGn,R.UploadAvatarWithCropField=il2,R.UploadBox=Ju2,R.UploadIllustration=IWn,R.UploadWithCrop=BGn,R.UploadWithCropField=ol2,R.Webhook=Rc2,R.WhiteBox=IGn,R.color=sr2,R.compare=tAo,R.cssStyles=Hko,R.emptyRows=Vko,R.file=n22,R.formatNumber=to2,R.formatTime=_22,R.getComparator=Fko,R.loadable=O22,R.m=rn,R.mask=y22,R.number=Ki2,R.routes=v22,R.sort=b22,R.useActiveElement=FBo,R.useApiMessage=fAo,R.useCarousel=wko,R.useCopyToClipboard=NBo,R.useDatagrid=TBo,R.useDeepCompareEffect=rAo,R.useEventCallback=GSn,R.useEventListener=W_t,R.useIsMounting=iAo,R.useIsomorphicLayoutEffect=qVn,R.useLightBox=ZDo,R.useLocalStorage=gAo,R.useOffSetTop=lAo,R.useOnClickOutside=cAo,R.usePagination=uAo,R.usePopover=USn,R.useResponsive=Wyt,R.useSnackbar=Fzn,R.useTable=Nko,R.useTabs=oAo,R.useToggle=xht,R.uuidv4=p22,R.validators=Jo2,R.varBgColor=dQn,R.varBgKenburns=gQn,R.varBgPan=_Qn,R.varBounce=lQn,R.varContainer=lvt,R.varFade=VT,R.varFlip=oQn,R.varHover=sQn,R.varPath=rQn,R.varRotate=fQn,R.varScale=cQn,R.varSlide=uQn,R.varTranEnter=$e,R.varTranExit=Ne,R.varTranHover=aQn,R.varZoom=iQn,Object.defineProperty(R,Symbol.toStringTag,{value:"Module"})});
35436
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function OGn(e,t){if(e){if(typeof e=="string")return oIn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return oIn(e,t)}}function oIn(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function Nu2(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var a=[],r=!0,u=!1,c,l;try{for(n=n.call(e);!(r=(c=n.next()).done)&&(a.push(c.value),!(t&&a.length===t));r=!0);}catch(f){u=!0,l=f}finally{try{!r&&n.return!=null&&n.return()}finally{if(u)throw l}}return a}}function Tu2(e){if(Array.isArray(e))return e}function jGn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,a)}return n}function kt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?jGn(Object(n),!0).forEach(function(a){uIn(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jGn(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function uIn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function GCt(e,t){if(e==null)return{};var n=Zu2(e,t),a,r;if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(e);for(r=0;r<u.length;r++)a=u[r],!(t.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}function Zu2(e,t){if(e==null)return{};var n={},a=Object.keys(e),r,u;for(u=0;u<a.length;u++)r=a[u],!(t.indexOf(r)>=0)&&(n[r]=e[r]);return n}var cIn=o.forwardRef(function(e,t){var n=e.children,a=GCt(e,Wu2),r=YCt(a),u=r.open,c=GCt(r,$u2);return o.useImperativeHandle(t,function(){return{open:u}},[u]),o.createElement(o.Fragment,null,n(kt(kt({},c),{},{open:u})))});cIn.displayName="Dropzone";var wGn={disabled:!1,getFilesFromEvent:ru2,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};cIn.defaultProps=wGn,cIn.propTypes={children:j.func,accept:j.objectOf(j.arrayOf(j.string)),multiple:j.bool,preventDropOnDocument:j.bool,noClick:j.bool,noKeyboard:j.bool,noDrag:j.bool,noDragEventsBubbling:j.bool,minSize:j.number,maxSize:j.number,maxFiles:j.number,disabled:j.bool,getFilesFromEvent:j.func,onFileDialogCancel:j.func,onFileDialogOpen:j.func,useFsAccessApi:j.bool,autoFocus:j.bool,onDragEnter:j.func,onDragLeave:j.func,onDragOver:j.func,onDrop:j.func,onDropAccepted:j.func,onDropRejected:j.func,onError:j.func,validator:j.func};var lIn={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function YCt(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=kt(kt({},wGn),e),n=t.accept,a=t.disabled,r=t.getFilesFromEvent,u=t.maxSize,c=t.minSize,l=t.multiple,f=t.maxFiles,s=t.onDragEnter,g=t.onDragLeave,_=t.onDragOver,m=t.onDrop,v=t.onDropAccepted,C=t.onDropRejected,h=t.onFileDialogCancel,b=t.onFileDialogOpen,p=t.useFsAccessApi,y=t.autoFocus,M=t.preventDropOnDocument,E=t.noClick,L=t.noKeyboard,w=t.noDrag,k=t.noDragEventsBubbling,D=t.onError,S=t.validator,I=o.useMemo(function(){return Du2(n)},[n]),A=o.useMemo(function(){return Su2(n)},[n]),F=o.useMemo(function(){return typeof b=="function"?b:MGn},[b]),W=o.useMemo(function(){return typeof h=="function"?h:MGn},[h]),z=o.useRef(null),T=o.useRef(null),H=o.useReducer(Uu2,lIn),Z=iIn(H,2),Q=Z[0],J=Z[1],V=Q.isFocused,N=Q.isFileDialogActive,Y=o.useRef(typeof window<"u"&&window.isSecureContext&&p&&ku2()),oe=function(){!Y.current&&N&&setTimeout(function(){if(T.current){var he=T.current.files;he.length||(J({type:"closeDialog"}),W())}},300)};o.useEffect(function(){return window.addEventListener("focus",oe,!1),function(){window.removeEventListener("focus",oe,!1)}},[T,N,W,Y]);var te=o.useRef([]),se=function(he){z.current&&z.current.contains(he.target)||(he.preventDefault(),te.current=[])};o.useEffect(function(){return M&&(document.addEventListener("dragover",bGn,!1),document.addEventListener("drop",se,!1)),function(){M&&(document.removeEventListener("dragover",bGn),document.removeEventListener("drop",se))}},[z,M]),o.useEffect(function(){return!a&&y&&z.current&&z.current.focus(),function(){}},[z,y,a]);var le=o.useCallback(function(q){D?D(q):console.error(q)},[D]),be=o.useCallback(function(q){q.preventDefault(),q.persist(),Pe(q),te.current=[].concat(Hu2(te.current),[q.target]),UCt(q)&&Promise.resolve(r(q)).then(function(he){if(!(ZCt(q)&&!k)){var ot=he.length,He=ot>0&&Mu2({files:he,accept:I,minSize:c,maxSize:u,multiple:l,maxFiles:f,validator:S}),St=ot>0&&!He;J({isDragAccept:He,isDragReject:St,isDragActive:!0,type:"setDraggedFiles"}),s&&s(q)}}).catch(function(he){return le(he)})},[r,s,le,k,I,c,u,l,f,S]),fe=o.useCallback(function(q){q.preventDefault(),q.persist(),Pe(q);var he=UCt(q);if(he&&q.dataTransfer)try{q.dataTransfer.dropEffect="copy"}catch{}return he&&_&&_(q),!1},[_,k]),ne=o.useCallback(function(q){q.preventDefault(),q.persist(),Pe(q);var he=te.current.filter(function(He){return z.current&&z.current.contains(He)}),ot=he.indexOf(q.target);ot!==-1&&he.splice(ot,1),te.current=he,!(he.length>0)&&(J({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),UCt(q)&&g&&g(q))},[z,g,k]),_e=o.useCallback(function(q,he){var ot=[],He=[];q.forEach(function(St){var we=hGn(St,I),en=iIn(we,2),hn=en[0],Bc=en[1],nj=CGn(St,c,u),rj=iIn(nj,2),wT=rj[0],MT=rj[1],LT=S?S(St):null;if(hn&&wT&&!LT)ot.push(St);else{var PT=[Bc,MT];LT&&(PT=PT.concat(LT)),He.push({file:St,errors:PT.filter(function(ET){return ET})})}}),(!l&&ot.length>1||l&&f>=1&&ot.length>f)&&(ot.forEach(function(St){He.push({file:St,errors:[wu2]})}),ot.splice(0)),J({acceptedFiles:ot,fileRejections:He,type:"setFiles"}),m&&m(ot,He,he),He.length>0&&C&&C(He,he),ot.length>0&&v&&v(ot,he)},[J,l,I,c,u,f,m,v,C,S]),We=o.useCallback(function(q){q.preventDefault(),q.persist(),Pe(q),te.current=[],UCt(q)&&Promise.resolve(r(q)).then(function(he){ZCt(q)&&!k||_e(he,q)}).catch(function(he){return le(he)}),J({type:"reset"})},[r,_e,le,k]),U=o.useCallback(function(){if(Y.current){J({type:"openDialog"}),F();var q={multiple:l,types:A};window.showOpenFilePicker(q).then(function(he){return r(he)}).then(function(he){_e(he,null),J({type:"closeDialog"})}).catch(function(he){Bu2(he)?(W(he),J({type:"closeDialog"})):Iu2(he)?(Y.current=!1,T.current?(T.current.value=null,T.current.click()):le(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):le(he)});return}T.current&&(J({type:"openDialog"}),F(),T.current.value=null,T.current.click())},[J,F,W,p,_e,le,A,l]),qe=o.useCallback(function(q){!z.current||!z.current.isEqualNode(q.target)||(q.key===" "||q.key==="Enter"||q.keyCode===32||q.keyCode===13)&&(q.preventDefault(),U())},[z,U]),de=o.useCallback(function(){J({type:"focus"})},[]),re=o.useCallback(function(){J({type:"blur"})},[]),me=o.useCallback(function(){E||(Eu2()?setTimeout(U,0):U())},[E,U]),je=function(he){return a?null:he},K=function(he){return L?null:je(he)},Oe=function(he){return w?null:je(he)},Pe=function(he){k&&he.stopPropagation()},xe=o.useMemo(function(){return function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},he=q.refKey,ot=he===void 0?"ref":he,He=q.role,St=q.onKeyDown,we=q.onFocus,en=q.onBlur,hn=q.onClick,Bc=q.onDragEnter,nj=q.onDragOver,rj=q.onDragLeave,wT=q.onDrop,MT=GCt(q,xu2);return kt(kt(uIn({onKeyDown:K(Dc(St,qe)),onFocus:K(Dc(we,de)),onBlur:K(Dc(en,re)),onClick:je(Dc(hn,me)),onDragEnter:Oe(Dc(Bc,be)),onDragOver:Oe(Dc(nj,fe)),onDragLeave:Oe(Dc(rj,ne)),onDrop:Oe(Dc(wT,We)),role:typeof He=="string"&&He!==""?He:"presentation"},ot,z),!a&&!L?{tabIndex:0}:{}),MT)}},[z,qe,de,re,me,be,fe,ne,We,L,w,a]),ze=o.useCallback(function(q){q.stopPropagation()},[]),Gt=o.useMemo(function(){return function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},he=q.refKey,ot=he===void 0?"ref":he,He=q.onChange,St=q.onClick,we=GCt(q,zu2),en=uIn({accept:I,multiple:l,type:"file",style:{display:"none"},onChange:je(Dc(He,We)),onClick:je(Dc(St,ze)),tabIndex:-1},ot,T);return kt(kt({},en),we)}},[T,n,l,We,a]);return kt(kt({},Q),{},{isFocused:V&&!a,getRootProps:xe,getInputProps:Gt,rootRef:z,inputRef:T,open:je(U)})}function Uu2(e,t){switch(t.type){case"focus":return kt(kt({},e),{},{isFocused:!0});case"blur":return kt(kt({},e),{},{isFocused:!1});case"openDialog":return kt(kt({},lIn),{},{isFileDialogActive:!0});case"closeDialog":return kt(kt({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return kt(kt({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return kt(kt({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return kt({},lIn);default:return e}}function MGn(){}const fIn=({fileRejections:e})=>e.length?d.jsx(O.Paper,{variant:"outlined",sx:{py:1,px:2,mt:3,bgcolor:t=>X(t.palette.error.main,.08),borderColor:t=>X(t.palette.error.main,.24)},children:e.map(({file:t,errors:n})=>{const{path:a,size:r}=tIn(t);return d.jsxs(O.Box,{sx:{my:1},children:[d.jsxs(O.Typography,{variant:"subtitle2",noWrap:!0,children:[a," - ",r?BCt(r):""]}),n.map(u=>d.jsxs(O.Box,{component:"span",sx:{typography:"caption"},children:["- ",u.message]},u.code))]},a)})}):null,Gu2=({file:e})=>{if(!e)return null;const t=typeof e=="string"?e:e.preview;return d.jsx(O.Stack,{position:"absolute",width:1,height:1,maxHeight:"100%",alignItems:"center",justifyContent:"center",top:0,right:0,bottom:0,left:0,padding:2,margin:"auto",children:d.jsx("img",{alt:"file preview",src:t,style:{borderRadius:8,width:"auto",maxWidth:"100%",maxHeight:"100%",height:"auto"}})})},LGn=at("div")(({theme:e})=>({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:`1px dashed ${X(e.palette.grey[500],.32)}`,"&:hover":{opacity:.72}})),PGn=({header:e,description:t,sx:n,...a})=>d.jsxs(O.Stack,{spacing:5,alignItems:"center",justifyContent:"center",direction:{xs:"column",md:"row"},sx:{width:1,textAlign:{xs:"center",md:"left"},...n},...a,children:[d.jsx(IWn,{sx:{width:220}}),d.jsxs("div",{children:[d.jsx(O.Typography,{gutterBottom:!0,variant:"h5",children:e||"Soltar ou selecionar arquivos"}),d.jsx(O.Typography,{variant:"body2",sx:{color:"text.secondary"},children:t||d.jsxs(d.Fragment,{children:["Solte os arquivos aqui ou clique",d.jsx(O.Typography,{variant:"body2",component:"span",sx:{mx:.5,color:"primary.main",textDecoration:"underline"},children:"procurar"}),"na sua máquina"]})})]})]}),EGn=({id:e,disabled:t,multiple:n=!1,error:a,helperText:r,file:u,onDelete:c,files:l,thumbnail:f,onRemove:s,onHandleMainImage:g,mainUrl:_,sx:m,dropZoneProps:v,placeholderProps:C,placeholderAlt:h,image:b,tabIndex:p,preview:y="image",onRemoveAll:M,onUpload:E,...L})=>{const{getRootProps:w,getInputProps:k,isDragActive:D,isDragReject:S,fileRejections:I}=YCt({multiple:n,disabled:t,...L}),A=!!u&&!n,F=A||b,W=l&&n&&l.length>0,z=typeof u=="string",T=S||!!a;return y==="file"?d.jsxs(O.Box,{sx:{width:1,position:"relative",...m},children:[d.jsxs(LGn,{...w(),sx:{...D&&{opacity:.72},...T&&{color:"error.main",bgcolor:"error.lighter",borderColor:"error.light"},...t&&{opacity:.48,pointerEvents:"none"}},children:[d.jsx("input",{...k()}),d.jsx(PGn,{sx:{...A&&{display:"none"}}}),A&&d.jsxs(O.Stack,{component:rn.div,...VT().inUp,spacing:2,direction:"row",alignItems:"center",sx:{my:1,px:1,py:.75,borderRadius:.75,border:H=>`solid 1px ${H.palette.divider}`,...m},children:[d.jsx(nIn,{file:u}),d.jsxs(O.Stack,{flexGrow:1,sx:{minWidth:0},children:[d.jsx(O.Typography,{variant:"subtitle2",noWrap:!0,children:z?u:u.name}),d.jsx(O.Typography,{variant:"caption",sx:{color:"text.secondary"},children:z?"":BCt(u.size)})]}),c&&d.jsx(O.IconButton,{edge:"end",size:"small",onClick:c,children:d.jsx(Ce,{icon:"CLOSE_MARK_BUTTON"})})]})]}),r&&r,d.jsx(fIn,{fileRejections:I}),W&&d.jsxs(d.Fragment,{children:[d.jsx(O.Box,{sx:{my:3},children:d.jsx(rGn,{files:l,thumbnail:f,onRemove:s})}),d.jsxs(O.Stack,{direction:"row",justifyContent:"flex-end",spacing:1.5,children:[M&&d.jsx(O.Button,{color:"inherit",variant:"outlined",size:"small",onClick:M,children:"Remover todos"}),E&&d.jsx(O.Button,{size:"small",variant:"contained",onClick:E,children:"Enviar arquivos"})]})]})]}):d.jsxs(O.Box,{sx:{width:1,position:"relative",...m},children:[d.jsxs(LGn,{...w(),sx:{...D&&{opacity:.72},...T&&{color:"error.main",bgcolor:"error.lighter",borderColor:"error.light"},...t&&{opacity:.48,pointerEvents:"none"},...v},children:[d.jsx("input",{...k(),id:e,tabIndex:p}),h?d.jsx(O.Stack,{sx:{...F&&{opacity:0}},children:h}):d.jsx(PGn,{sx:{...F&&{opacity:0}},header:C==null?void 0:C.title,description:C==null?void 0:C.description}),F&&d.jsx(Gu2,{file:u||b||""})]}),r&&d.jsx(O.FormHelperText,{error:!!a,sx:H=>({mx:"14px",color:t?H.palette.grey[500]:void 0}),children:r}),d.jsx(fIn,{fileRejections:I}),F&&c&&d.jsx(O.IconButton,{size:"small",onClick:c,sx:{top:16,right:16,zIndex:9,position:"absolute",color:H=>X(H.palette.common.white,.8),bgcolor:H=>X(H.palette.grey[900],.72),"&:hover":{bgcolor:H=>X(H.palette.grey[900],.48)}},children:d.jsx(Ce,{icon:"CLOSE_MARK_BUTTON",width:18})}),W&&d.jsx(d.Fragment,{children:d.jsx(O.Box,{sx:{my:3},children:d.jsx(rGn,{files:l,thumbnail:f,onRemove:s,onHandleMainImage:g,mainUrl:_})})})]})},Yu2=({file:e})=>{if(!e)return null;const t=typeof e=="string"?e:e.preview;return d.jsx("img",{alt:"avatar",src:t,style:{zIndex:8,overflow:"hidden",borderRadius:"50%",position:"absolute",width:"calc(100% - 16px)",height:"calc(100% - 16px)"}})},Ku2=at("div")(({theme:e})=>({width:144,height:144,margin:"auto",display:"flex",cursor:"pointer",overflow:"hidden",borderRadius:"50%",alignItems:"center",position:"relative",justifyContent:"center",border:`1px dashed ${X(e.palette.grey[500],.32)}`})),Xu2=at("div")(({theme:e})=>({zIndex:7,display:"flex",borderRadius:"50%",position:"absolute",alignItems:"center",flexDirection:"column",justifyContent:"center",width:"calc(100% - 16px)",height:"calc(100% - 16px)",color:e.palette.text.disabled,backgroundColor:e.palette.background.neutral,transition:e.transitions.create("opacity",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.shorter})})),kGn=({error:e,file:t,image:n,disabled:a,helperText:r,sx:u,tabIndex:c,...l})=>{const{getRootProps:f,getInputProps:s,isDragActive:g,isDragReject:_,fileRejections:m}=YCt({multiple:!1,disabled:a,...l}),v=!!t||n,C=_||!!e;return d.jsxs(d.Fragment,{children:[d.jsxs(Ku2,{...f(),sx:{...g&&{opacity:.72},...C&&{borderColor:"error.light",...v&&{bgcolor:"error.lighter"}},...a&&{opacity:.48,pointerEvents:"none"},...v&&{"&:hover":{"& .placeholder":{opacity:1}}},...u},children:[d.jsx("input",{...s(),tabIndex:c}),v&&d.jsx(Yu2,{file:t||n||""}),d.jsxs(Xu2,{className:"placeholder",sx:{"&:hover":{opacity:.72},...v&&{zIndex:9,opacity:0,color:"common.white",bgcolor:h=>X(h.palette.grey[900],.64)},...C&&{color:"error.main",bgcolor:"error.lighter"}},children:[d.jsx(Ce,{icon:"ADD_IMAGE",width:24,sx:{mb:1}}),d.jsx(O.Typography,{variant:"caption",children:t?"Atualizar foto":"Carregar foto"})]})]}),r&&r,d.jsx(fIn,{fileRejections:m})]})},Qu2=at("div")(({theme:e})=>({width:64,height:64,fontSize:24,display:"flex",flexShrink:0,cursor:"pointer",alignItems:"center",justifyContent:"center",margin:e.spacing(.5),color:e.palette.text.disabled,borderRadius:e.shape.borderRadius,border:`dashed 1px ${e.palette.divider}`,backgroundColor:X(e.palette.grey[500],.08),"&:hover":{opacity:.72}})),Ju2=({placeholderAlt:e,error:t,disabled:n,sx:a,tabIndex:r,...u})=>{const{getRootProps:c,getInputProps:l,isDragActive:f,isDragReject:s}=YCt({disabled:n,...u}),g=s||t;return d.jsxs(Qu2,{...c(),sx:{...f&&{opacity:.72},...g&&{color:"error.main",bgcolor:"error.lighter",borderColor:"error.light"},...n&&{opacity:.48,pointerEvents:"none"},...a},children:[d.jsx("input",{...l(),tabIndex:r}),e||d.jsx(Ce,{icon:"CLOUD_UPLOAD",width:28})]})},SGn=({onFileCropped:e,onImageUploaded:t,onCancel:n})=>{const a=o.useId(),[r,u]=o.useState(),[c,l,f]=xht(),[s,g]=o.useState();return{id:a,setCropModalOpen:f,handleRemove:()=>{e(void 0),t(void 0),f(!1)},toggleCropModalOpen:l,cropModalOpen:c,cancelChanges:()=>{n&&n(),f(!1)},saveChanges:()=>{r!==void 0&&r.getCroppedCanvas().toBlob(b=>{if(!b)return;const p=new File([b],"imagem");e(p),l()},"image/png",1)},previewImage:()=>{r!==void 0&&g(r.getCroppedCanvas().toDataURL())},setCropper:u,preview:s,closePreviewImage:()=>g(void 0)}},DGn=({id:e,open:t,onClose:n,label:a,onSave:r,onRemove:u,onPreview:c,imageSrc:l,aspectRatio:f,onInitialized:s})=>{const[g,_]=o.useState(.5);return d.jsx(YUn,{open:t,onClose:n,dialogTitle:a,actions:d.jsxs(d.Fragment,{children:[d.jsx(O.Button,{variant:"outlined",size:"medium",onClick:n,color:"inherit",children:"Cancelar"}),d.jsx(O.Button,{variant:"contained",size:"medium",onClick:r,children:"Salvar"})]}),fullWidth:!0,maxWidth:"sm",keepMounted:!0,children:d.jsxs(O.Stack,{gap:2,children:[d.jsx(jUn,{imageSrc:l,aspectRatio:f,onInitialized:s,zoom:g,onZoomChange:_}),d.jsxs(O.Stack,{gap:1.5,children:[d.jsxs(O.Stack,{width:1,direction:"row",gap:3,flex:1,alignItems:"center",children:[d.jsx(O.Typography,{variant:"body1",children:"Zoom"}),d.jsx(O.Slider,{value:g,onChange:(m,v)=>_(Array.isArray(v)?v[0]:v),min:.1,max:2,size:"medium",step:.0125})]}),d.jsxs(O.Stack,{direction:"row",gap:2,children:[d.jsx(O.Button,{variant:"outlined",color:"inherit",size:"large",fullWidth:!0,startIcon:d.jsx(Ce,{icon:"DELETE_MARK_BUTTON_02"}),onClick:u,children:"Remover"}),d.jsx(O.Button,{variant:"outlined",color:"inherit",size:"large",fullWidth:!0,startIcon:d.jsx(Ce,{icon:"PLAY_SIMPLE"}),onClick:c,children:"Pré-visualizar"}),d.jsx(O.Button,{variant:"outlined",color:"inherit",size:"large",fullWidth:!0,startIcon:d.jsx(Ce,{icon:"SEARCH_IMAGE"}),component:"label",htmlFor:e,children:"Alterar"})]})]})]})})},qu2=O.styled(O.Stack)({position:"relative",width:"100%",borderRadius:8,overflow:"hidden","&:hover .actions":{display:"flex"}}),ec2=O.styled(O.Stack)(({theme:e})=>({display:"none",position:"absolute",alignItems:"center",justifyContent:"center",flexDirection:"row",gap:12,width:"100%",height:"100%",backgroundColor:O.alpha(e.palette.primary.main,.9),zIndex:999,button:{"&, &:hover, &:focus":{backgroundColor:"#fff"}}})),tc2=O.styled(O.CircularProgress)({position:"absolute",width:"100%",height:"100%",zIndex:99,backgroundColor:"#fff",borderRadius:"50%"}),BGn=({onFileCropped:e,onImageUploaded:t,onCancel:n,aspect:a,label:r,image:u="",uploading:c,file:l,tabIndex:f,...s})=>{const{id:g,setCropModalOpen:_,handleRemove:m,toggleCropModalOpen:v,cropModalOpen:C,cancelChanges:h,saveChanges:b,previewImage:p,setCropper:y,preview:M,closePreviewImage:E}=SGn({onFileCropped:e,onImageUploaded:t,onCancel:n});return d.jsxs(d.Fragment,{children:[d.jsxs(qu2,{children:[c&&d.jsx(yCt,{}),d.jsx(EGn,{...s,id:g,file:l,onDrop:L=>{if(L.length>0){_(!0);const w=new FileReader;w.addEventListener("load",()=>{var D;const k=((D=w.result)==null?void 0:D.toString())||"";t(k),e(void 0)}),w.readAsDataURL(L[0])}},image:u,tabIndex:f}),(l||u)&&d.jsxs(ec2,{className:"actions",children:[d.jsx(O.Button,{color:"inherit",startIcon:d.jsx(Ce,{icon:"DELETE_MARK_BUTTON_02",color:"error.main"}),onClick:m,children:"Remover"}),d.jsx(O.Button,{color:"inherit",startIcon:d.jsx(Ce,{icon:"SEARCH_IMAGE",color:"primary.maon"}),onClick:v,children:"Editar"})]})]}),d.jsx(DGn,{id:g,open:C,onClose:h,label:r,aspectRatio:a,imageSrc:u,onRemove:m,onSave:b,onPreview:p,onInitialized:y}),d.jsx(O.Dialog,{open:!!M,onClose:E,scroll:"body",PaperProps:{sx:{p:2}},children:M&&d.jsx("img",{src:M,alt:"Preview"})})]})},nc2=O.styled(O.Stack)(({theme:e})=>({backgroundColor:"#fff",border:`1px solid ${e.palette.grey[300]}`})),IGn=({children:e,...t})=>d.jsx(nc2,{borderRadius:1,gap:3,padding:3,...t,children:e}),rc2=O.styled(O.Box)(()=>({marginLeft:"4px",fontWeight:"fontWeightBold"})),ac2=O.styled(O.Button)(()=>({fontWeight:"fontWeightSemiBold"})),ic2=O.styled(Ce)(({theme:e})=>({color:e.palette.primary.main})),oc2=({selectedTitle:e,onSelect:t,options:n})=>{const a=USn();return d.jsxs(d.Fragment,{children:[d.jsx(ac2,{disableRipple:!0,color:"inherit",onClick:a.onOpen,endIcon:d.jsx(ic2,{icon:a.open?"CHEVRON_UP":"ARROW_DOWN_SIMPLE"}),children:d.jsx(rc2,{component:"span",children:e.label})}),d.jsx(GUn,{open:a.open,onClose:a.onClose,children:n.map(r=>d.jsx(O.MenuItem,{selected:r.value===e.value,onClick:()=>{a.onClose(),t(r.value)},children:r.label},r.value))})]})},uc2=O.styled(O.Stack)({display:"grid",gridTemplateColumns:"auto auto"}),cc2=O.styled(O.Typography)(({theme:e})=>({color:e.palette.grey[600],display:"flex",gap:"8px",alignItems:"center"})),lc2=O.styled(O.Typography)(({theme:e})=>({textAlign:"right",color:e.palette.grey[800]})),fc2=({data:e,...t})=>e.length===0?null:d.jsx(uc2,{gap:1,...t,children:e.map(n=>[d.jsx(cc2,{variant:"body2",children:n.label},`label:${n.id}`),d.jsx(lc2,{variant:"body2",children:n.value},`value:${n.id}`)])}),sc2=O.styled(O.Stack)(({theme:e})=>({backgroundColor:"#fff",minWidth:"250px",padding:24,minHeight:"100vh",borderRight:`1px solid ${e.palette.grey[300]}`})),dc2=O.styled(O.Stack)(({theme:e})=>({backgroundColor:"#fff",position:"sticky",top:0,zIndex:999,width:"100%",padding:24,gap:24,borderBottom:`1px solid ${e.palette.grey[300]}`})),gc2=O.styled(O.Stack)({flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:24}),_c2=O.styled(O.Stack)(({theme:e})=>({height:"100%",width:"50%",flex:1,[e.breakpoints.down(1680)]:{width:"70%"}})),mc2=O.styled(O.Typography)(({theme:e})=>({color:e.palette.grey[800],fontSize:18,fontWeight:700})),vc2=O.styled(O.Typography)(({theme:e})=>({color:e.palette.grey[500],fontSize:14,fontWeight:400,paddingBottom:24})),hc2=O.styled(O.Button)(({theme:e})=>({paddingTop:6,paddingBottom:6,paddingLeft:0,margin:0,marginBottom:4,marginTop:4,width:"100%",display:"block",cursor:"pointer",color:e.palette.grey[600],textAlign:"left",fontWeight:400,fontSize:14,"> span":{color:e.palette.error.main}})),Cc2=O.styled(Kce)(()=>({height:1,"& .simplebar-content":{height:1}})),bc2=O.styled(O.Stack)(()=>({position:"fixed",width:"202px"})),yc2=({title:e,sections:t,headerLeftContent:n,headerRightContent:a,onClickBack:r})=>d.jsx(O.Stack,{children:d.jsxs(O.Stack,{direction:"row",children:[d.jsx(sc2,{children:d.jsx(Cc2,{children:d.jsxs(bc2,{children:[d.jsx(O.Typography,{variant:"overline",color:"text.disabled",fontWeight:700,children:"ACESSO RÁPIDO"}),t.map((u,c)=>d.jsxs(O.Stack,{children:[d.jsxs(hc2,{onClick:()=>{u.ref.current&&u.ref.current.scrollIntoView({block:"start",behavior:"smooth"})},children:[u.title,u.isRequired&&d.jsx("span",{children:"*"})]}),c<t.length-1&&d.jsx(O.Divider,{})]},c))]})})}),d.jsxs(O.Stack,{width:"100%",alignItems:"center",mb:8,children:[d.jsx(dc2,{children:d.jsxs(gc2,{children:[d.jsxs(O.Stack,{flexDirection:"row",gap:2,alignItems:"center",children:[d.jsx(O.IconButton,{color:"primary",onClick:()=>r(),children:d.jsx(Ce,{icon:"CHEVRON_LEFT"})}),d.jsx(O.Typography,{variant:"h4",children:e}),n]}),d.jsxs(O.Stack,{direction:"row",gap:2,alignItems:"center",minWidth:"max-content",children:[d.jsx(LSn,{disabled:!0}),a]})]})}),d.jsx(_c2,{children:t.map(u=>d.jsxs(O.Stack,{paddingTop:3,paddingBottom:2,alignItems:"start",width:"100%",children:[d.jsx(mc2,{ref:u.ref,children:u.title}),d.jsx(vc2,{children:u.subTitle}),d.jsx(IGn,{width:"100%",borderRadius:1,gap:1.5,padding:3,children:u.child})]},u.title))})]})]})}),pc2=O.styled(O.Box)(({theme:e})=>({padding:24,borderRadius:8,height:"auto",maxWidth:800,backgroundColor:e.palette.background.default,border:`1px solid ${e.palette.grey[300]}`})),Oc2=O.styled(O.Stack)(({theme:e})=>({minHeight:180,maxWidth:700,border:`4px dotted ${e.palette.grey[300]}`,borderRadius:8,backgroundColor:"#fff",padding:24})),jc2=O.styled(O.Box)(()=>({maxWidth:70,maxHeight:40,alignItems:"center","&, img":{flex:1,display:"flex",objectFit:"cover",borderRadius:8}})),wc2=O.styled(O.Box)(({theme:e})=>({backgroundColor:e.palette.background.default,maxWidth:90,maxHeight:80,alignItems:"center","&, img":{flex:1,display:"flex",objectFit:"cover",borderRadius:8}})),WGn=O.styled(O.Stack)(({theme:e})=>({border:`4px dotted ${e.palette.grey[300]}`,borderRadius:8,backgroundColor:"#fff"})),Mc2=O.styled(O.Box)(({theme:e})=>({width:"auto",height:120,overflow:"hidden",padding:2,borderBottom:`4px dotted ${e.palette.grey[300]}`})),Lc2=({titlePreview:e,logoImage:t,brandingName:n,url:a,title:r,description:u,keyWords:c,customTitles:l,productImage:f,child:s,previewLinkImage:g,hasPreviewLink:_})=>d.jsx(pc2,{children:d.jsxs(O.Stack,{gap:3,display:"flex",flex:1,children:[d.jsx(O.Typography,{variant:"overline",color:"text.disabled",children:e??"PRÉ-VISUALIZAÇÃO"}),d.jsxs(Oc2,{children:[d.jsxs(O.Stack,{direction:"row",pb:3,gap:.5,children:[d.jsx(O.Box,{height:0,width:10,children:d.jsx(Ce,{icon:"CIRCLE",width:30,color:"error.main"})}),d.jsx(O.Box,{height:0,width:10,children:d.jsx(Ce,{icon:"CIRCLE",width:30,color:"warning.main"})}),d.jsx(O.Box,{height:0,width:10,children:d.jsx(Ce,{icon:"CIRCLE",width:30,color:"success.main"})})]}),d.jsxs(O.Stack,{flexDirection:"row",gap:2,justifyContent:"space-between",children:[d.jsxs(O.Stack,{gap:1,width:"100%",children:[d.jsxs(O.Stack,{direction:"row",gap:1.5,pb:.5,children:[t&&d.jsx(jc2,{children:d.jsx("img",{alt:"Logo",src:t})}),d.jsxs(O.Stack,{children:[d.jsx(O.Typography,{variant:"overline",color:"grey.600",pb:.5,children:n??"SUAEMPRESA"}),d.jsxs(O.Stack,{direction:"row",gap:2,children:[d.jsx(O.Typography,{variant:"caption",color:"grey.600",children:a??"https://www.exemplo.com"}),d.jsx(Ce,{icon:"MORE_OPTIONS_VERTICAL",width:15,color:"grey.500"})]})]})]}),d.jsx(tj,{variant:"subtitle1",color:"#4E5BEC",overflow:"hidden",textOverflow:"ellipsis",line:5,children:r??"Suampresa | Páscoa 2024: Ovos de chocolate? Que nada! Descontos em tecnologia!"}),d.jsx(tj,{variant:"caption",color:"text.disabled",overflow:"hidden",textOverflow:"ellipsis",line:5,children:u??"A Páscoa chegou e a Sua Empresa está com ofertas chocantes em tecnologia! Descontos de até 50% em notebooks, smartphones, tablets e muito mais!"}),c&&d.jsx(O.Stack,{direction:"row",gap:1,alignItems:"center",children:c.map((m,v)=>d.jsxs(d.Fragment,{children:[d.jsx(O.Typography,{variant:"caption",color:"text.disabled",children:m}),v<c.length-1&&d.jsx(O.Box,{width:4,height:16,children:d.jsx(Ce,{icon:"CIRCLE",color:"text.disabled",width:10})})]}))}),l&&d.jsx(O.Stack,{pt:2,children:l.map((m,v)=>d.jsxs(O.Stack,{gap:1,children:[d.jsx(O.Typography,{variant:"subtitle1",color:"#4E5BEC",children:m.title}),d.jsx(tj,{variant:"caption",color:"text.disabled",overflow:"hidden",textOverflow:"ellipsis",line:1,children:m.description??"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys stansince the 1500"})]},v))}),s]}),f&&d.jsx(wc2,{children:d.jsx("img",{alt:"ProductImage",src:f})})]})]}),_&&d.jsxs(O.Stack,{gap:3,display:"flex",flex:1,width:"100%",children:[d.jsx(O.Typography,{variant:"overline",color:"text.disabled",children:"pré-visualização link de compartilhamento".toUpperCase()}),d.jsxs(WGn,{children:[g&&d.jsx(Mc2,{children:d.jsx("img",{alt:"PreviewLinkImage",src:g,style:{width:"100%",height:"100%",objectFit:"cover",borderRadius:8}})}),d.jsxs(O.Stack,{gap:.2,p:2,width:"100%",children:[d.jsx(O.Typography,{variant:"caption",children:r??"Suampresa | Páscoa 2024: Ovos de chocolate? Que nada! Descontos em tecnologia!"}),d.jsx(O.Typography,{variant:"caption",color:"grey.600",children:u??"A Páscoa chegou e a Sua Empresa está com ofertas chocantes em tecnologia! Descontos de até 50% em notebooks, smartphones, tablets e muito mais!"}),d.jsx(O.Typography,{variant:"caption",color:"grey.500",children:a??"https://www.exemplo.com"})]})]}),d.jsx(WGn,{children:d.jsxs(O.Stack,{direction:"row",gap:1,alignItems:"center",children:[d.jsx(O.Box,{width:100,height:95,bgcolor:"grey.100",p:.5,alignItems:"center",children:d.jsx("img",{alt:"Logo",src:t,style:{width:"100%",height:"100%",objectFit:"contain",borderRadius:8}})}),d.jsxs(O.Stack,{padding:1,gap:.2,width:"80%",children:[d.jsx(tj,{variant:"caption",children:r??"Suampresa | Páscoa 2024: Ovos de chocolate? Que nada! Descontos em tecnologia!"}),d.jsx(tj,{variant:"caption",color:"grey.600",children:u??"A Páscoa chegou e a Sua Empresa está com ofertas chocantes em tecnologia! Descontos de até 50% em notebooks, smartphones, tablets e muito mais!"}),d.jsx(tj,{variant:"caption",color:"grey.500",line:1,children:a??"https://www.exemplo.com"})]})]})})]})]})}),Pc2=O.styled(O.Stack)(({theme:e})=>({border:`1px solid ${O.alpha(e.palette.grey[500],.32)}`,borderRadius:8,alignItems:"center",overflow:"hidden"})),Ec2=O.styled(O.Stack)(()=>({backgroundColor:"#F5F5F5",padding:8,width:"100%",justifyContent:"space-between",alignItems:"center",gap:12,"& .MuiInputBase-root":{backgroundColor:"#fff"}}));O.styled(O.Stack)(({theme:e})=>({border:`1px solid ${O.alpha(e.palette.grey[500],.32)}`,borderRadius:8,alignItems:"center"}));const kc2=O.styled(O.Collapse)(()=>({width:"100%",padding:"12px 16px"})),Sc2=({description:e,name:t,children:n,header:a,onDelete:r})=>{const[u,c]=xht(!0);return d.jsxs(Pc2,{children:[d.jsxs(Ec2,{direction:"row",children:[d.jsxs(O.Stack,{direction:"row",alignItems:"center",gap:1.5,flex:1,children:[d.jsx(O.IconButton,{edge:"end",onClick:c,children:d.jsx(Ce,{icon:u?"CHEVRON_UP":"CHEVRON_RIGHT"})}),d.jsx(O.Typography,{variant:"overline",color:"text.primary",children:t}),d.jsx(O.Typography,{variant:"overline",color:"text.secondary",children:e}),d.jsx(O.Stack,{flex:1,children:a})]}),d.jsx(O.IconButton,{color:"error",onClick:r,children:d.jsx(Ce,{icon:"DELETE_MARK_BUTTON_02"})})]}),d.jsx(kc2,{in:u,timeout:"auto",unmountOnExit:!0,children:n})]})},Dc2=O.styled(O.ToggleButtonGroup)(({theme:e})=>({button:{textTransform:"none"},"& .MuiToggleButton-primary:hover":{backgroundColor:`${e.palette.primary.dark}`,color:e.palette.primary.contrastText},"& button:not(.Mui-selected):hover":{backgroundColor:e.palette.primary.lighter,color:e.palette.primary.main},"& .Mui-selected":{backgroundColor:`${e.palette.primary.main} !important`,color:`${e.palette.primary.contrastText} !important`}})),Bc2=e=>d.jsx(Dc2,{...e}),Ic2=O.styled(O.Card,{shouldForwardProp:e=>e!=="active"})(({theme:e,active:t})=>({boxShadow:"none",cursor:"pointer",borderRadius:8,borderStyle:"solid",borderWidth:1.5,borderColor:t?e.palette.primary.main:e.palette.grey[300],color:e.palette.primary.main,backgroundColor:t?O.alpha(e.palette.primary.main,.04):"white","&:hover":{borderColor:e.palette.primary.main}})),$Gn=({title:e,action:t,loading:n,items:a,values:r,onChange:u})=>{const[c,l]=o.useState(),f=h=>r.includes(h),s=c?a.filter(h=>h.title.toLowerCase().includes(c.toLowerCase())):a,g=h=>{const b=f(h.value);let p;b?p=r.filter(y=>y!==h.value):p=[...r,h.value],u(p)},_=()=>{r.length===a.length?u([]):u(a.map(h=>h.value))},m=new Intl.PluralRules("pt-BR"),v=new Map([["one","selecionado"],["other","selecionados"]]),C=h=>{const b=m.select(h),p=v.get(b);return`${h} ${p}`};return d.jsxs(O.Stack,{gap:1.5,height:450,children:[d.jsxs(O.Stack,{direction:"row",justifyContent:"space-between",children:[typeof e=="string"?d.jsx(O.Typography,{variant:"overline",color:"text.disabled",children:e}):e,d.jsx(O.Typography,{variant:"overline",color:"text.disabled",children:r.length===0?"nenhum selecionado":C(r.length)})]}),d.jsxs(O.Stack,{direction:"row",alignItems:"center",spacing:1.5,children:[d.jsx(NCt,{fullWidth:!0,size:"small",iconPosition:"start",placeholder:"Buscar",trigger:"change",onSearch:h=>l(h),onKeyDown:h=>{h.key==="Enter"&&h.preventDefault()}}),t?d.jsx(d.Fragment,{children:t}):d.jsx(O.Button,{onClick:_,size:"small",children:d.jsx(O.Typography,{variant:"overline",children:"TODOS"})})]}),d.jsx(Kce,{children:d.jsx(O.Stack,{flex:1,mb:2,children:d.jsx(VCt,{isLoading:n,loading:d.jsx(O.Stack,{alignItems:"center",mt:3,children:d.jsx(O.CircularProgress,{})}),isEmpty:a.length===0,empty:d.jsx(amt,{sx:{svg:{height:140}},text:c?`Não foi possivel encontrar o item "${c}"`:"Nenhum item disponível"}),children:d.jsx(O.Grid,{container:!0,spacing:1.5,children:s.map(h=>d.jsx(O.Grid,{item:!0,xs:4,children:d.jsx(Ic2,{active:f(h.value),onClick:()=>g(h),children:d.jsxs(O.Stack,{padding:1.5,width:"100%",children:[d.jsxs(O.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[d.jsx(O.Typography,{color:f(h.value)?"primary.main":"text.primary",variant:"subtitle2",textAlign:"left",noWrap:!0,children:h.title}),f(h.value)&&d.jsx(Ce,{icon:"CHECK_CIRCLE",width:24})]}),h.options.map(b=>d.jsx(O.Typography,{mt:1,variant:"body2",color:"text.disabled",fontSize:12,textAlign:"left",noWrap:!0,children:`${b.label}: ${b.value}`},b.label))]})})},h.title))})})})})]})},fn=({name:e,helperText:t,rules:n,onChange:a,tabIndex:r,...u})=>{const{control:c}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:c,rules:n,render:({field:{ref:l,...f},fieldState:{error:s}})=>d.jsx(O.TextField,{...f,onChange:g=>{f.onChange(g),a&&a(g)},inputRef:l,fullWidth:!0,error:!!s,helperText:(s==null?void 0:s.message)||t,...u,inputProps:{...u.inputProps,tabIndex:r}})})},Wc2=O.styled(O.IconButton)(({theme:e})=>({svg:{color:`${e.palette.primary.main} !important`}}));O.styled(O.IconButton)(()=>({height:"38px",alignSelf:"center"}));const $c2=O.styled(O.Typography)(()=>({textDecoration:"underline",fontWeight:"600",cursor:"pointer"})),xc2=O.styled(O.Alert)(({theme:e})=>({backgroundColor:`${O.alpha(e.palette.primary.main,.03)}`,border:`1px solid ${O.alpha(e.palette.primary.main,.4)}`,flexDirection:"row",alignItems:"center",padding:"2px 12px",gap:8,borderRadius:8,marginBottom:16,"& svg":{color:e.palette.primary.main}})),zc2=()=>{const e=()=>{const t="https://ajuda.zydon.com.br/pt-BR/articles/9180603-sobre-webhooks";window.open(t,"_blank")};return d.jsx(xc2,{severity:"info",children:d.jsxs(O.Typography,{color:"grey",variant:"caption",children:["Webhooks permitem que serviços externos sejam notificados quando determinados eventos acontecem. Saiba mais"," ",d.jsx($c2,{variant:"caption",color:"primary",onClick:()=>e(),children:"acessando a documentação do Webhook"})]})})},Hc2=[{label:"XML",value:"XML"},{label:"JSON",value:"JSON"},{label:"BYTEA",value:"BYTEA"}],Ac2=[{label:"GET",value:"GET"},{label:"POST",value:"POST"},{label:"DELETE",value:"DELETE"},{label:"PUT",value:"PUT"}],Rc2=({webhookData:e,isEditing:t=!1,haveTip:n=!1})=>{const{control:a}=Be.useFormContext(),{fields:r,append:u,remove:c}=Be.useFieldArray({name:"headers",control:a}),l=()=>{u({value:"",name:""})};return d.jsxs(d.Fragment,{children:[n&&d.jsx(zc2,{}),t&&d.jsx(fn,{name:"name",label:"Nome do webhook"}),d.jsxs(O.Stack,{direction:"row",gap:2,children:[d.jsx(fn,{name:"url",label:"URL de endpoint",rules:{required:{value:!0,message:"Url é obrigatório"}}}),d.jsx(fn,{name:"filter",label:"Filtro"})]}),t&&e&&d.jsxs(d.Fragment,{children:[d.jsx(fn,{variant:"filled",name:"solution",label:"Solução",disabled:!0}),d.jsxs(O.Stack,{direction:"row",gap:2,children:[d.jsx(fn,{variant:"filled",name:"resource",label:"Origem",disabled:!0}),d.jsx(fn,{variant:"filled",name:"resourceID",label:"ID origem",disabled:!0,InputProps:{endAdornment:d.jsx(O.InputAdornment,{position:"end",children:d.jsx(Wc2,{onClick:()=>navigator.clipboard.writeText(e.resource_id),children:d.jsx(Ce,{className:"copyIcon",icon:"COPY_CONTENT"})})})}}),d.jsx(fn,{variant:"filled",name:"event",label:"Evento",disabled:!0})]})]}),d.jsxs(O.Stack,{direction:"row",gap:2,alignItems:"center",children:[d.jsx(KCt,{fullWidth:!0,options:Hc2,name:"content_type",label:"Tipo de conteúdo",required:!0,rules:{required:{value:!0,message:"Campo Tipo de conteúdo é obrigatório"}}}),d.jsx(KCt,{fullWidth:!0,options:Ac2,name:"http_method",label:"Método HTTP",required:!0,rules:{required:{value:!0,message:"Campo Método HTTP é obrigatório"}}})]}),d.jsx(O.Typography,{variant:"overline",color:"grey",children:"Cabeçalho"}),r==null?void 0:r.map((f,s)=>d.jsxs(O.Stack,{direction:"row",gap:2,alignItems:"center",children:[d.jsx(fn,{name:`headers.${s}.name`,label:"Chave",required:!0,rules:{required:{value:!0,message:""}}}),d.jsx(fn,{name:`headers.${s}.value`,label:"Valor"}),d.jsx(O.IconButton,{color:"error",onClick:()=>c(s),children:d.jsx(Ce,{icon:"DELETE_MARK_BUTTON_02"})})]},f.id)),d.jsx(FRn,{actionType:"NEW",size:"large",variant:"outlined",color:"inherit",fullWidth:!0,onClick:()=>l(),children:"Adicionar novo cabeçalho"}),d.jsx(O.Divider,{})]})},KCt=({name:e,helperText:t,rules:n,onSelectOption:a,...r})=>{const{control:u}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:u,rules:n,render:({field:c,fieldState:{error:l}})=>d.jsx(jSn,{...c,...r,onChange:f=>{a&&a(f,c.value),c.onChange(f)},error:!!l,helperText:(l==null?void 0:l.message)||t})})},xGn=({name:e,helperText:t,rules:n,onChange:a,error:r,...u})=>{const{control:c}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:c,rules:n,render:({field:{name:l,onChange:f,value:s,ref:g},fieldState:{error:_}})=>d.jsx(JBn,{ref:g,...u,name:l,value:s,error:r||!!_,helperText:(_==null?void 0:_.message)||t,onChange:({target:{value:m}})=>{a&&a(m),f(m)}})})},Vc2=({name:e,containerProps:t,required:n,rules:a,tabIndex:r})=>{const u=`${e}.zipCode`,c=`${e}.publicPlace`,l=`${e}.number`,f=`${e}.district`,s=`${e}.complement`,g=`${e}.state`,_=`${e}.city`,m=v=>{v.key==="Enter"&&v.preventDefault()};return d.jsxs(O.Stack,{gap:1.5,...t,children:[d.jsxs(O.Stack,{direction:{xs:"column",md:"row"},gap:1.5,flexWrap:"wrap",children:[d.jsx(xGn,{name:u,label:"CEP",mask:[{mask:"00000-000"}],InputProps:{endAdornment:d.jsx(O.InputAdornment,{position:"end",children:d.jsx(O.CircularProgress,{size:24})})},rules:a,onKeyDown:m,required:n,sx:{width:"auto",flex:1,minWidth:160},tabIndex:r}),d.jsxs(O.Stack,{direction:{xs:"column",sm:"row"},gap:1.5,flex:{xs:1,md:"1 1 50%"},children:[d.jsx(fn,{name:c,label:"Logradouro",onKeyDown:m,inputProps:{maxLength:70},sx:{width:"auto",minWidth:250,flex:1},tabIndex:r}),d.jsx(fn,{name:l,label:"Número",onKeyDown:m,inputProps:{maxLength:6},sx:{width:"auto",minWidth:100},tabIndex:r})]})]}),d.jsxs(O.Stack,{direction:{xs:"column",md:"row"},gap:1.5,flexWrap:"wrap",children:[d.jsx(fn,{name:f,label:"Bairro",onKeyDown:m,inputProps:{maxLength:20},sx:{width:"auto",flex:{xs:1,md:"1 1 100px"}},tabIndex:r}),d.jsx(fn,{name:s,label:"Complemento",onKeyDown:m,inputProps:{maxLength:30},sx:{minWidth:200,width:"auto",flex:{xs:1,md:"1 1 500px"}},tabIndex:r})]}),d.jsxs(O.Stack,{gap:1.5,flexWrap:"wrap",direction:{xs:"column",sm:"row"},children:[d.jsx(KCt,{name:g,label:"Estado",options:[],disabled:!0,required:n,sx:{flex:1},tabIndex:r}),d.jsx(fn,{name:_,label:"Cidade",disabled:!0,required:n,sx:{flex:1},tabIndex:r})]})]})},Fc2=({name:e,rules:t,helperText:n,...a})=>{const{control:r}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:r,rules:t,render:({field:u,fieldState:{error:c}})=>d.jsx(MSn,{...u,...a,onChange:l=>{u.onChange(l)},error:!!c,helperText:(c==null?void 0:c.message)||n})})},Nc2=({name:e,rules:t,helperText:n,tabIndex:a,...r})=>{const{control:u}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:u,rules:t,render:({field:c,fieldState:{error:l}})=>d.jsxs("div",{children:[d.jsx(O.FormControlLabel,{control:d.jsx(O.Checkbox,{...c,checked:c.value,tabIndex:a}),...r}),(!!l||n)&&d.jsx(O.FormHelperText,{error:!!l,children:l?l==null?void 0:l.message:n})]})})},Tc2=({row:e,name:t,rules:n,label:a,options:r,spacing:u,helperText:c,required:l,...f})=>{const{control:s}=Be.useFormContext(),g=(_,m)=>_.includes(m)?_.filter(v=>v!==m):[..._,m];return d.jsx(Be.Controller,{name:t,control:s,rules:n,render:({field:{value:_=[],...m},fieldState:{error:v}})=>d.jsxs(O.FormControl,{component:"fieldset",children:[a&&d.jsx(O.FormLabel,{component:"legend",sx:{typography:"body2"},required:l,children:a}),d.jsx(O.FormGroup,{sx:{...e&&{flexDirection:"row"},"& .MuiFormControlLabel-root":{"&:not(:last-of-type)":{mb:u||0},...e&&{mr:0,"&:not(:last-of-type)":{mr:u||2}}}},children:r.map(C=>d.jsx(O.FormControlLabel,{control:d.jsx(O.Checkbox,{checked:_.includes(C.value),onChange:()=>m.onChange(g(_,C.value))}),label:C.label,...f},C.value))}),(!!v||c)&&d.jsx(O.FormHelperText,{error:!!v,sx:C=>({color:f.disabled?C.palette.grey[500]:void 0}),children:v?v==null?void 0:v.message:c})]})})},Zc2=({keyName:e,inputs:t=[],rules:n,tabIndex:a,...r})=>{const u=o.useRef(null),{control:c,setValue:l,formState:{errors:f}}=Be.useFormContext(),s=m=>{const v=m.clipboardData.getData("text").split("");t.map((C,h)=>l(C,v[h])),m.preventDefault()},g=(m,v)=>{const{maxLength:C,value:h,name:b}=m.target,p=b.replace(e,""),y=Number(p),M=document.querySelector(`input[name=${e}${y+1}]`);h.length>C&&(m.target.value=h[0]),h.length>=C&&y<6&&M!==null&&M.focus(),v(m)};W_t("paste",s,u);const _=t.some(m=>f[m]);return d.jsxs(O.Stack,{children:[d.jsx(O.Stack,{direction:"row",spacing:2,justifyContent:"center",ref:u,children:t.map((m,v)=>d.jsx(Be.Controller,{name:`${e}${v+1}`,control:c,rules:n,render:({field:C,fieldState:{error:h}})=>d.jsx(O.TextField,{...r,...C,autoComplete:"none",error:!!h,autoFocus:v===0,placeholder:"-",onChange:b=>{g(b,C.onChange)},onFocus:b=>b.currentTarget.select(),InputProps:{sx:{width:{xs:36,sm:56},height:{xs:36,sm:56},"& input":{p:0,textAlign:"center"}}},inputProps:{maxLength:1,type:"number",tabIndex:a}})},m))}),_&&d.jsx(O.FormHelperText,{error:!0,sx:{px:2},children:"Código é obrigatório"})]})},Uc2=({name:e,rules:t,helperText:n,...a})=>{const{control:r}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:r,rules:{...t,validate:{...t==null?void 0:t.validate,validation:u=>{const c="#"+u.replaceAll("#","");return/^#([0-9A-Fa-f]{3}){1,2}$/.test(c)?!0:"Cor inválida"}}},render:({field:{ref:u,onChange:c,...l},fieldState:{error:f}})=>d.jsx(aTn,{...l,onChangeColor:c,inputRef:u,fullWidth:!0,error:!!f,helperText:(f==null?void 0:f.message)||n,...a})})},Gc2=({name:e,rules:t,tabIndex:n,helperText:a,required:r,...u})=>{const{control:c}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:c,rules:t,render:({field:{ref:l,...f},fieldState:{error:s}})=>{var g;return d.jsx(kT.DatePicker,{inputRef:l,format:"dd/MM/yyyy",localeText:{previousMonth:"Mês anterior",nextMonth:"Próximo mês",fieldDayPlaceholder:()=>"dd",fieldMonthPlaceholder:()=>"mm",fieldYearPlaceholder:()=>"aaaa",...u.localeText},...f,...u,value:f.value?new Date(f.value):null,slotProps:{textField:{...(g=u.slotProps)==null?void 0:g.textField,required:r,error:!!s,helperText:(s==null?void 0:s.message)||a,autoComplete:"off",spellCheck:"false",fullWidth:!0,inputProps:{tabIndex:n}},openPickerButton:{tabIndex:n}}})}})},Yc2=({name:e,label:t,rules:n,tabIndex:a,helperText:r,required:u,...c})=>{const{control:l,setError:f}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:l,rules:n,render:({field:{value:s,onChange:g},fieldState:{error:_}})=>d.jsx(kT.DateRangePicker,{format:"dd/MM/yyyy",localeText:{previousMonth:"Mês anterior",nextMonth:"Próximo mês",fieldDayPlaceholder:()=>"dd",fieldMonthPlaceholder:()=>"mm",fieldYearPlaceholder:()=>"aaaa",...c.localeText},value:[(s==null?void 0:s.startDate)||null,(s==null?void 0:s.endDate)||null],onChange:m=>g({startDate:m[0],endDate:m[1]}),onError:m=>{f(e,{message:m[0]||m[1]||void 0})},...c,slotProps:{textField:({position:m})=>{var v;return{...(v=c.slotProps)==null?void 0:v.textField,required:u,error:!!_,helperText:(_==null?void 0:_.message)||r,autoComplete:"off",spellCheck:"false",fullWidth:!0,label:m==="start"?`${t} (Dt. Início)`:`${t} (Dt. Fim)`,inputProps:{tabIndex:a}}}},sx:{width:1}})})},Kc2=({name:e,rules:t,tabIndex:n,helperText:a,required:r,...u})=>{const{control:c}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:c,rules:t,render:({field:{ref:l,...f},fieldState:{error:s}})=>{var g;return d.jsx(kT.DateTimePicker,{format:"dd/MM/yyyy HH:mm",inputRef:l,localeText:{previousMonth:"Mês anterior",nextMonth:"Próximo mês",fieldDayPlaceholder:()=>"dd",fieldMonthPlaceholder:()=>"mm",fieldYearPlaceholder:()=>"aaaa",fieldHoursPlaceholder:()=>"hh",fieldMinutesPlaceholder:()=>"mm",...u.localeText},...f,...u,value:f.value?new Date(f.value):null,slotProps:{textField:{...(g=u.slotProps)==null?void 0:g.textField,required:r,error:!!s,helperText:(s==null?void 0:s.message)||a,autoComplete:"off",spellCheck:"false",fullWidth:!0,inputProps:{tabIndex:n}},openPickerButton:{tabIndex:n}}})}})},Xc2=({id:e,children:t,onSubmit:n,methods:a,...r})=>d.jsx(Be.FormProvider,{...a,children:d.jsx(O.Stack,{component:"form",id:e,onSubmit:n,flex:1,width:1,noValidate:!0,...r,children:t})}),Qc2=({name:e,helperText:t,rules:n,...a})=>{const{control:r}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:r,rules:n,render:({field:{ref:u,value:c,...l},fieldState:{error:f}})=>d.jsx(YBn,{value:c,inputRef:u,fullWidth:!0,error:!!f,helperText:(f==null?void 0:f.message)||t,...a,...l,name:e})})},Jc2=({name:e,label:t="",rules:n,helperText:a,changed:r,...u})=>{const{control:c}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:c,rules:n,render:({field:l,fieldState:{error:f}})=>d.jsx(O.Autocomplete,{...l,onChange:(s,g)=>{r&&r(g),l.onChange(g)},renderInput:s=>d.jsx(O.TextField,{label:t,error:!!f,helperText:f?f==null?void 0:f.message:a,...s}),...u})})},qc2=({name:e,helperText:t,rules:n,onChange:a,...r})=>{const{control:u}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:u,rules:n,render:({field:c,fieldState:{error:l}})=>d.jsx($Ct,{...c,onChange:f=>{c.onChange(f),a&&a(f)},fullWidth:!0,error:!!l,helperText:(l==null?void 0:l.message)||t,...r})})},el2=({name:e,sx:t,rules:n,passwordSize:a,specialCharacter:r,upperCaseChar:u,numberChar:c,showErrorMessage:l,match:f,...s})=>{const{watch:g}=Be.useFormContext(),_=g(e),[m,v]=o.useState(!1),{hasNumberChar:C,hasSpecialCharacter:h,hasUpperCaseChar:b,isLengthValid:p}=RCt(_,a,c,r,u);return d.jsx(fn,{...s,name:e,type:m?"text":"password",InputProps:{endAdornment:d.jsx(O.InputAdornment,{position:"end",children:d.jsx(O.IconButton,{onClick:()=>v(!m),edge:"end","aria-label":"Mostrar/Ocultar senha",tabIndex:-1,children:d.jsx(Ce,{icon:m?"VIEW_ON":"VIEW_OFF"})})})},rules:{...n,validate:{...n==null?void 0:n.validate,validationPassword:y=>{const M=RCt(y,a,c,r,u);return!M.hasNumberChar||!M.hasSpecialCharacter||!M.hasUpperCaseChar||!M.isLengthValid?"Senha inválida":f&&f.fieldPassword&&g(f.fieldPassword)!==y?"As senhas devem ser iguais":!0}}},sx:{...t,"& .MuiFormHelperText-root":{display:(!h||!b||!p||!C)&&!l?"none":void 0}}})},tl2=({name:e,rules:t,row:n,label:a,options:r,spacing:u,helperText:c,decorated:l,onChange:f,tabIndex:s,required:g,disabled:_,...m})=>{const{control:v}=Be.useFormContext(),C=a?`${e}-${a}`:"";return d.jsx(Be.Controller,{name:e,control:v,rules:t,render:({field:h,fieldState:{error:b}})=>d.jsxs(O.FormControl,{component:"fieldset",sx:{...l&&{paddingLeft:1.5}},children:[a&&d.jsx(O.FormLabel,{component:"legend",id:C,sx:{typography:"body2"},required:g,children:a}),d.jsx(O.RadioGroup,{...m,...h,onChange:(p,y)=>{h.onChange(p),f&&f(p,y)},"aria-labelledby":C,row:n,children:r.map(p=>d.jsx(O.FormControlLabel,{value:p.value,control:d.jsx(O.Radio,{inputProps:{tabIndex:s},disabled:_,checked:p.value===h.value,icon:p.icon,checkedIcon:p.icon}),label:p.label,sx:({palette:y})=>({"&:not(:last-of-type)":{mb:u||0},...n&&{mr:0,"&:not(:last-of-type)":{mr:u||2}},...l&&{border:`1px solid ${O.alpha(y.grey[500],.32)}`,borderRadius:1,padding:.25,paddingRight:(u||0)/2||1,...h.value===p.value&&{borderColor:"primary.main",backgroundColor:O.alpha(y.primary.main,.05)}}})},p.value))}),(!!b||c)&&d.jsx(O.FormHelperText,{error:!!b,sx:p=>({color:_?p.palette.grey[500]:void 0}),children:b?b==null?void 0:b.message:c})]})})},nl2=({name:e,helperText:t,onChange:n,tabIndex:a,size:r,label:u,...c})=>{const{control:l}=Be.useFormContext(),f=s=>d.jsx(O.Switch,{...s,checked:s.value,onChange:(g,_)=>{s.onChange(g),n&&n(g,_)},inputProps:{tabIndex:a},size:r});return d.jsx(Be.Controller,{name:e,control:l,render:({field:s,fieldState:{error:g}})=>d.jsxs("div",{children:[u?d.jsx(O.FormControlLabel,{label:u,control:f(s),...c}):f(s),(!!g||t)&&d.jsx(O.FormHelperText,{error:!!g,sx:_=>({mx:"14px",color:c.disabled?_.palette.grey[500]:void 0}),children:g?g==null?void 0:g.message:t})]})})},rl2=({name:e,rules:t,tabIndex:n,helperText:a,required:r,...u})=>{const{control:c}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:c,rules:t,render:({field:{ref:l,...f},fieldState:{error:s}})=>{var g;return d.jsx(kT.TimePicker,{ampm:!1,format:"HH:mm",inputRef:l,localeText:{fieldHoursPlaceholder:()=>"hh",fieldMinutesPlaceholder:()=>"mm",...u.localeText},...f,...u,value:f.value?new Date(f.value):null,slotProps:{textField:{...(g=u.slotProps)==null?void 0:g.textField,error:!!s,required:r,helperText:(s==null?void 0:s.message)||a,autoComplete:"off",spellCheck:"false",fullWidth:!0,inputProps:{tabIndex:n}},openPickerButton:{tabIndex:n}}})}})},al2=({onFileCropped:e,onImageUploaded:t,onCancel:n,aspect:a,label:r,image:u="",uploading:c,file:l,tabIndex:f,...s})=>{const{id:g,setCropModalOpen:_,handleRemove:m,cropModalOpen:v,cancelChanges:C,saveChanges:h,previewImage:b,setCropper:p,preview:y,closePreviewImage:M}=SGn({onFileCropped:e,onImageUploaded:t,onCancel:n});return d.jsxs(d.Fragment,{children:[d.jsxs(O.Stack,{position:"relative",alignItems:"center",justifyContent:"center",children:[c&&d.jsx(tc2,{}),d.jsx(kGn,{...s,id:g,file:l,onDrop:E=>{if(E.length>0){_(!0);const L=new FileReader;L.addEventListener("load",()=>{var k;const w=((k=L.result)==null?void 0:k.toString())||"";t(w),e(void 0)}),L.readAsDataURL(E[0])}},image:u,tabIndex:f})]}),d.jsx(DGn,{id:g,open:v,onClose:C,label:r,aspectRatio:a,imageSrc:u,onRemove:m,onSave:h,onPreview:b,onInitialized:p}),d.jsx(O.Dialog,{open:!!y,onClose:M,scroll:"body",PaperProps:{sx:{p:2}},children:y&&d.jsx("img",{src:y,alt:"Preview"})})]})};function zGn(e,t){const{watch:n,setValue:a}=Be.useFormContext(),[r,u]=o.useState(t),c=n(e)||[];return{uploadFile:async m=>{if(!m){a(e,void 0),u(void 0);return}a(e,m),u(Object.assign(m,{preview:URL.createObjectURL(m)}))},uploadFiles:async m=>{a(e,[...c,...m.map(v=>Object.assign(v,{preview:URL.createObjectURL(v)}))])},handleDeleteFile:()=>{a(e,void 0),u(void 0)},handleRemoveAll:()=>{a(e,void 0)},handleRemove:m=>{const v=c.filter(C=>C!==m);a(e,v)},file:r,setFileValue:u}}const il2=({name:e,rules:t,helperText:n,aspect:a,label:r,image:u,onFileCropped:c,onImageUploaded:l,onCancel:f,...s})=>{const{control:g}=Be.useFormContext(),{uploadFile:_,file:m,setFileValue:v}=zGn(e);return d.jsx(Be.Controller,{name:e,control:g,rules:t,render:({field:{value:C},fieldState:{error:h}})=>d.jsx(al2,{accept:{"image/*":[]},file:C?m:void 0,onFileCropped:b=>{_(b),c&&c(b)},onImageUploaded:l,onCancel:()=>{v(void 0),f&&f()},error:!!h,disableMultiple:!0,helperText:(!!h||n)&&d.jsx(O.FormHelperText,{error:!!h,sx:{px:2},children:h?h==null?void 0:h.message:n}),aspect:a,label:r,image:u,...s})})},ol2=({name:e,rules:t,helperText:n,aspect:a,label:r,image:u,onFileCropped:c,onImageUploaded:l,onCancel:f,...s})=>{const{control:g}=Be.useFormContext(),{uploadFile:_,file:m,setFileValue:v}=zGn(e);return d.jsx(Be.Controller,{name:e,control:g,rules:t,render:({field:{value:C},fieldState:{error:h}})=>d.jsx(BGn,{accept:{"image/*":[]},file:C?m:void 0,onFileCropped:b=>{_(b),c&&c(b)},onImageUploaded:l,onCancel:()=>{v(void 0),f&&f()},error:!!h,disableMultiple:!0,helperText:(!!h||n)&&d.jsx(O.FormHelperText,{error:!!h,sx:{px:2},children:h?h==null?void 0:h.message:n}),aspect:a,label:r,image:u,...s})})},HGn=O.styled(O.Button)(({theme:e})=>({borderColor:e.palette.grey[300]})),AGn=O.styled(O.Box)(({theme:e})=>({display:"flex",border:`1.5px solid ${e.palette.grey[300]}`,height:450,borderRadius:8,flex:1,overflow:"hidden"})),ul2=({selectedItems:e,items:t,loading:n,searchText:a,onAdd:r,onRemove:u,search:c,itemsTitle:l,selectedItemsTitle:f,additionalContent:s,enableSearchInSelectedItems:g,onSearch:_})=>{const[m,v]=o.useState(""),C=O.debounce(_,400),h=t.filter(W=>!e.some(z=>z.id===W.id)),b=e.filter(W=>{var z;return(z=W.name)==null?void 0:z.toLowerCase().includes(m.toLowerCase())}),p=g?b:t.filter(W=>e.some(z=>z.id===W.id)),[y,M]=o.useState([]),[E,L]=o.useState([]),w=()=>{r(y),M([])},k=()=>{u(E),L([])},D=W=>{L(W?p:[])},S=W=>{M(W?h:[])},I=(W,z)=>{L(z?T=>[...T,W]:T=>T.filter(H=>H.id!==W.id))},A=(W,z)=>{M(z?T=>[...T,W]:T=>T.filter(H=>H.id!==W.id))},F=W=>{W.key==="Enter"&&W.preventDefault()};return d.jsx(O.Stack,{children:d.jsxs(O.Stack,{direction:"row",alignItems:"center",gap:3,children:[d.jsx(AGn,{flex:1,children:d.jsxs(O.Stack,{flex:1,overflow:"hidden",children:[d.jsxs(O.Stack,{direction:"row",gap:1,padding:2,children:[d.jsx(O.Checkbox,{size:"small",indeterminate:y.length>0&&y.length!==h.length,checked:y.length>0&&y.length===h.length,onChange:W=>S(W.target.checked)}),d.jsxs(O.Stack,{children:[d.jsx(O.Typography,{variant:"subtitle2",color:"text.primary",children:`${l} cadastrados(as)`}),d.jsx(O.Typography,{variant:"caption",color:"text.disabled",children:`${y.length}/${h.length} selecionados`})]})]}),d.jsx(O.Divider,{}),d.jsxs(O.Stack,{p:2,flex:1,overflow:"hidden",children:[d.jsxs(O.Stack,{direction:"row",gap:1,children:[d.jsx(NCt,{iconPosition:"start",placeholder:"Buscar",onKeyDown:F,size:"small",fullWidth:!0,trigger:"change",onSearch:W=>C(W)}),s]}),d.jsx(VCt,{isLoading:n,loading:d.jsx(O.Stack,{alignItems:"center",justifyContent:"center",flex:1,children:d.jsx(O.CircularProgress,{})}),isEmpty:h.length===0,empty:d.jsx(amt,{text:c?`Nenhum ${a} encontrado`:`Nenhum ${a} disponível`,sx:{svg:{height:140}}}),children:d.jsx(Kce,{sx:{maxHeight:280},children:h.map(W=>d.jsxs(O.Stack,{gap:1,marginTop:"8px",children:[d.jsxs(O.Stack,{direction:"row",gap:.5,alignItems:"center",marginTop:"8px",children:[d.jsx(O.Checkbox,{size:"small",checked:y.includes(W),onChange:z=>A(W,z.target.checked)}),W.label]}),d.jsx(O.Divider,{})]},W.id))})})]})]})}),d.jsxs(O.Stack,{gap:3,children:[d.jsx(HGn,{variant:"outlined",onClick:w,children:d.jsx(Ce,{icon:"ARROW_RIGHT_SIMPLE"})}),d.jsx(HGn,{variant:"outlined",onClick:k,children:d.jsx(Ce,{icon:"ARROW_LEFT_SIMPLE"})})]}),d.jsx(AGn,{flex:1,children:d.jsxs(O.Stack,{flex:1,overflow:"hidden",children:[d.jsxs(O.Stack,{direction:"row",gap:1,padding:2,children:[d.jsx(O.Checkbox,{size:"small",indeterminate:E.length>0&&E.length!==p.length,checked:E.length>0&&E.length===p.length,onChange:W=>D(W.target.checked)}),d.jsxs(O.Stack,{children:[d.jsx(O.Typography,{variant:"subtitle2",color:"text.primary",children:`${f} selecionados(as)`}),d.jsx(O.Typography,{variant:"caption",color:"text.disabled",children:`${E.length}/${p.length} selecionados`})]})]}),d.jsx(O.Divider,{}),d.jsxs(O.Stack,{p:2,gap:1,overflow:"hidden",children:[g&&d.jsx(NCt,{iconPosition:"start",placeholder:"Buscar",size:"small",fullWidth:!0,trigger:"change",onSearch:W=>v(W??""),onKeyDown:F}),d.jsx(VCt,{isLoading:n,loading:d.jsx(O.Stack,{alignItems:"center",justifyContent:"center",flex:1,children:d.jsx(O.CircularProgress,{})}),isEmpty:p.length===0,empty:d.jsx(amt,{text:m?`Nenhum ${a} encontrado`:`Nenhum ${a} selecionado`,sx:{svg:{height:140},marginTop:"56px",backgroundColor:"transparent"}}),children:d.jsx(Kce,{sx:{maxHeight:280},children:p.map(W=>d.jsxs(O.Stack,{gap:1,children:[d.jsxs(O.Stack,{direction:"row",gap:.5,alignItems:"center",marginTop:"8px",children:[d.jsx(O.Checkbox,{size:"small",checked:E.includes(W),onChange:z=>I(W,z.target.checked)}),W.label]}),d.jsx(O.Divider,{})]},W.id))})})]})]})})]})})},cl2=({name:e,rules:t,...n})=>{const{control:a}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:a,rules:t,render:({field:r})=>d.jsx($Gn,{...r,...n})})},ll2=Object.freeze(Object.defineProperty({__proto__:null,default:jtr},Symbol.toStringTag,{value:"Module"}));R.ActionButton=FRn,R.Address=Vc2,R.Autocomplete=jSn,R.AutocompleteDetailed=MSn,R.AutocompleteDetailedField=Fc2,R.AutocompleteField=KCt,R.BuilderLayout=VBo,R.BuilderSidebar=hAo,R.Carousel=jko,R.CarouselArrowIndex=Rko,R.CarouselArrows=Eko,R.CarouselDots=Pko,R.Checkbox=Nc2,R.Codes=Zc2,R.ColorPickerField=Uc2,R.ColorPickerInput=aTn,R.ColoredLabel=bAo,R.Common=B12,R.CommonSSR=W12,R.Confirm=$12,R.CustomAvatar=wSn,R.CustomAvatarGroup=tVn,R.DataGrid=A12,R.DatePicker=Gc2,R.DateRangePicker=Yc2,R.DateTimePicker=Kc2,R.Delayed=R12,R.DialogAnimate=Ktr,R.Drawer=Q12,R.EmptyContent=fAn,R.EmptyView=amt,R.Error=q12,R.ExpandableGroup=Sc2,R.FabButtonAnimate=gzn,R.Field=fn,R.FixedProgressBar=yCt,R.Form=Xc2,R.FrameSkeleton=yc2,R.HelpButton=LSn,R.Icon=Ce,R.IconButtonAnimate=_zn,R.Iconify=TZn,R.IllustrationEmptyContent=WWn,R.ImageCrop=jUn,R.Incrementer=YBn,R.IncrementerField=Qc2,R.Label=zUn,R.Lightbox=FDo,R.LoadingScreen=Po2,R.MaskedInput=JBn,R.MaskedInputField=xGn,R.MaterialDesignContent=Tyt,R.MenuPopover=GUn,R.Modal=YUn,R.ModalActions=Yo2,R.MotionContainer=lnr,R.MotionLazyContainer=$yt,R.MotionViewport=cnr,R.MultiCheckbox=Tc2,R.MultipleChipField=Jc2,R.NoData=$Wn,R.NumberInput=$Ct,R.NumberInputField=qc2,R.PasswordField=el2,R.PasswordRules=t22,R.PopoverSelect=oc2,R.Portal=KUn,R.RadioGroupField=tl2,R.Result=VCt,R.SavedChanges=j22,R.Scrollbar=Kce,R.SearchInput=NCt,R.SelectableCards=$Gn,R.SelectableCardsField=cl2,R.SeoPreview=Lc2,R.SnackbarContent=Nyt,R.SnackbarProvider=Vzn,R.SplashScreen=w22,R.Steps=P22,R.StyledTab=E22,R.StyledTabs=k22,R.Summary=fc2,R.SwapList=ul2,R.Switch=nl2,R.TRANSITION=xWn,R.TabPanel=S22,R.TableEmptyRows=Gko,R.TableHeadCustom=Kko,R.TableNoData=Zko,R.TablePaginationCustom=Qko,R.TableSelectedAction=Xko,R.TableSkeleton=Uko,R.TextAnimate=Xtr,R.TextMaxLine=tj,R.ThemeProvider=nZn,R.TimePicker=rl2,R.ToggleButtonGroup=Bc2,R.Transition=Hvt,R.Upload=EGn,R.UploadAvatar=kGn,R.UploadAvatarWithCropField=il2,R.UploadBox=Ju2,R.UploadIllustration=IWn,R.UploadWithCrop=BGn,R.UploadWithCropField=ol2,R.Webhook=Rc2,R.WhiteBox=IGn,R.color=sr2,R.compare=tAo,R.cssStyles=Hko,R.emptyRows=Vko,R.file=n22,R.formatNumber=to2,R.formatTime=_22,R.getComparator=Fko,R.loadable=O22,R.m=rn,R.mask=y22,R.number=Ki2,R.routes=v22,R.sort=b22,R.useActiveElement=FBo,R.useApiMessage=fAo,R.useCarousel=wko,R.useCopyToClipboard=NBo,R.useDatagrid=TBo,R.useDeepCompareEffect=rAo,R.useEventCallback=GSn,R.useEventListener=W_t,R.useIsMounting=iAo,R.useIsomorphicLayoutEffect=qVn,R.useLightBox=ZDo,R.useLocalStorage=gAo,R.useOffSetTop=lAo,R.useOnClickOutside=cAo,R.usePagination=uAo,R.usePopover=USn,R.useResponsive=Wyt,R.useSnackbar=Fzn,R.useTable=Nko,R.useTabs=oAo,R.useToggle=xht,R.uuidv4=p22,R.validators=Jo2,R.varBgColor=dQn,R.varBgKenburns=gQn,R.varBgPan=_Qn,R.varBounce=lQn,R.varContainer=lvt,R.varFade=VT,R.varFlip=oQn,R.varHover=sQn,R.varPath=rQn,R.varRotate=fQn,R.varScale=cQn,R.varSlide=uQn,R.varTranEnter=$e,R.varTranExit=Ne,R.varTranHover=aQn,R.varZoom=iQn,Object.defineProperty(R,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@zydon/common",
3
3
  "private": false,
4
- "version": "1.4.68",
4
+ "version": "1.4.69",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",