@data-c/ui 0.0.143-alpha.0 → 0.0.144-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -126,6 +126,7 @@ interface FilterProps {
126
126
  onApplyFilters?: (filters: any) => void;
127
127
  renderLabel?: (filterLabel: string, filterValue: any) => React$1.ReactNode;
128
128
  disableds?: Array<string>;
129
+ disableFilterControl?: Boolean;
129
130
  }
130
131
  declare function FilterContainer(props: FilterProps): react_jsx_runtime.JSX.Element;
131
132
  declare namespace FilterContainer {
package/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var Ns=Object.create;var rn=Object.defineProperty,zs=Object.defineProperties,Vs=Object.getOwnPropertyDescriptor,Us=Object.getOwnPropertyDescriptors,qs=Object.getOwnPropertyNames,Nt=Object.getOwnPropertySymbols,Ws=Object.getPrototypeOf,nn=Object.prototype.hasOwnProperty,Co=Object.prototype.propertyIsEnumerable;var To=(t,e,r)=>e in t?rn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,y=(t,e)=>{for(var r in e||(e={}))nn.call(e,r)&&To(t,r,e[r]);if(Nt)for(var r of Nt(e))Co.call(e,r)&&To(t,r,e[r]);return t},W=(t,e)=>zs(t,Us(e));var X=(t,e)=>{var r={};for(var n in t)nn.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&Nt)for(var n of Nt(t))e.indexOf(n)<0&&Co.call(t,n)&&(r[n]=t[n]);return r};var le=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Ys=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of qs(e))!nn.call(t,o)&&o!==r&&rn(t,o,{get:()=>e[o],enumerable:!(n=Vs(e,o))||n.enumerable});return t};var qe=(t,e,r)=>(r=t!=null?Ns(Ws(t)):{},Ys(e||!t||!t.__esModule?rn(r,"default",{value:t,enumerable:!0}):r,t));var ue=(t,e,r)=>new Promise((n,o)=>{var i=a=>{try{l(r.next(a))}catch(u){o(u)}},s=a=>{try{l(r.throw(a))}catch(u){o(u)}},l=a=>a.done?n(a.value):Promise.resolve(a.value).then(i,s);l((r=r.apply(t,e)).next())});var Ko=le(j=>{"use strict";var oe=typeof Symbol=="function"&&Symbol.for,Sn=oe?Symbol.for("react.element"):60103,Pn=oe?Symbol.for("react.portal"):60106,Kt=oe?Symbol.for("react.fragment"):60107,Ht=oe?Symbol.for("react.strict_mode"):60108,Zt=oe?Symbol.for("react.profiler"):60114,Xt=oe?Symbol.for("react.provider"):60109,Jt=oe?Symbol.for("react.context"):60110,En=oe?Symbol.for("react.async_mode"):60111,Qt=oe?Symbol.for("react.concurrent_mode"):60111,er=oe?Symbol.for("react.forward_ref"):60112,tr=oe?Symbol.for("react.suspense"):60113,Dl=oe?Symbol.for("react.suspense_list"):60120,rr=oe?Symbol.for("react.memo"):60115,nr=oe?Symbol.for("react.lazy"):60116,Rl=oe?Symbol.for("react.block"):60121,$l=oe?Symbol.for("react.fundamental"):60117,Bl=oe?Symbol.for("react.responder"):60118,Il=oe?Symbol.for("react.scope"):60119;function he(t){if(typeof t=="object"&&t!==null){var e=t.$$typeof;switch(e){case Sn:switch(t=t.type,t){case En:case Qt:case Kt:case Zt:case Ht:case tr:return t;default:switch(t=t&&t.$$typeof,t){case Jt:case er:case nr:case rr:case Xt:return t;default:return e}}case Pn:return e}}}function Go(t){return he(t)===Qt}j.AsyncMode=En;j.ConcurrentMode=Qt;j.ContextConsumer=Jt;j.ContextProvider=Xt;j.Element=Sn;j.ForwardRef=er;j.Fragment=Kt;j.Lazy=nr;j.Memo=rr;j.Portal=Pn;j.Profiler=Zt;j.StrictMode=Ht;j.Suspense=tr;j.isAsyncMode=function(t){return Go(t)||he(t)===En};j.isConcurrentMode=Go;j.isContextConsumer=function(t){return he(t)===Jt};j.isContextProvider=function(t){return he(t)===Xt};j.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===Sn};j.isForwardRef=function(t){return he(t)===er};j.isFragment=function(t){return he(t)===Kt};j.isLazy=function(t){return he(t)===nr};j.isMemo=function(t){return he(t)===rr};j.isPortal=function(t){return he(t)===Pn};j.isProfiler=function(t){return he(t)===Zt};j.isStrictMode=function(t){return he(t)===Ht};j.isSuspense=function(t){return he(t)===tr};j.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===Kt||t===Qt||t===Zt||t===Ht||t===tr||t===Dl||typeof t=="object"&&t!==null&&(t.$$typeof===nr||t.$$typeof===rr||t.$$typeof===Xt||t.$$typeof===Jt||t.$$typeof===er||t.$$typeof===$l||t.$$typeof===Bl||t.$$typeof===Il||t.$$typeof===Rl)};j.typeOf=he});var Ho=le(N=>{"use strict";process.env.NODE_ENV!=="production"&&function(){"use strict";var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,r=t?Symbol.for("react.portal"):60106,n=t?Symbol.for("react.fragment"):60107,o=t?Symbol.for("react.strict_mode"):60108,i=t?Symbol.for("react.profiler"):60114,s=t?Symbol.for("react.provider"):60109,l=t?Symbol.for("react.context"):60110,a=t?Symbol.for("react.async_mode"):60111,u=t?Symbol.for("react.concurrent_mode"):60111,p=t?Symbol.for("react.forward_ref"):60112,c=t?Symbol.for("react.suspense"):60113,m=t?Symbol.for("react.suspense_list"):60120,f=t?Symbol.for("react.memo"):60115,g=t?Symbol.for("react.lazy"):60116,b=t?Symbol.for("react.block"):60121,w=t?Symbol.for("react.fundamental"):60117,B=t?Symbol.for("react.responder"):60118,U=t?Symbol.for("react.scope"):60119;function ee(T){return typeof T=="string"||typeof T=="function"||T===n||T===u||T===i||T===o||T===c||T===m||typeof T=="object"&&T!==null&&(T.$$typeof===g||T.$$typeof===f||T.$$typeof===s||T.$$typeof===l||T.$$typeof===p||T.$$typeof===w||T.$$typeof===B||T.$$typeof===U||T.$$typeof===b)}function P(T){if(typeof T=="object"&&T!==null){var Tt=T.$$typeof;switch(Tt){case e:var C=T.type;switch(C){case a:case u:case n:case i:case o:case c:return C;default:var tt=C&&C.$$typeof;switch(tt){case l:case p:case g:case f:case s:return tt;default:return Tt}}case r:return Tt}}}var M=a,te=u,K=l,Y=s,q=e,v=p,x=n,O=g,d=f,h=r,S=i,E=o,_=c,A=!1;function F(T){return A||(A=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),k(T)||P(T)===a}function k(T){return P(T)===u}function D(T){return P(T)===l}function I(T){return P(T)===s}function R(T){return typeof T=="object"&&T!==null&&T.$$typeof===e}function ae(T){return P(T)===p}function re(T){return P(T)===n}function Fe(T){return P(T)===g}function Xr(T){return P(T)===f}function Jr(T){return P(T)===r}function Qr(T){return P(T)===i}function en(T){return P(T)===o}function tn(T){return P(T)===c}N.AsyncMode=M,N.ConcurrentMode=te,N.ContextConsumer=K,N.ContextProvider=Y,N.Element=q,N.ForwardRef=v,N.Fragment=x,N.Lazy=O,N.Memo=d,N.Portal=h,N.Profiler=S,N.StrictMode=E,N.Suspense=_,N.isAsyncMode=F,N.isConcurrentMode=k,N.isContextConsumer=D,N.isContextProvider=I,N.isElement=R,N.isForwardRef=ae,N.isFragment=re,N.isLazy=Fe,N.isMemo=Xr,N.isPortal=Jr,N.isProfiler=Qr,N.isStrictMode=en,N.isSuspense=tn,N.isValidElementType=ee,N.typeOf=P}()});var _n=le((Ch,wn)=>{"use strict";process.env.NODE_ENV==="production"?wn.exports=Ko():wn.exports=Ho()});var Jo=le((Sh,Xo)=>{"use strict";var Zo=Object.getOwnPropertySymbols,Ll=Object.prototype.hasOwnProperty,jl=Object.prototype.propertyIsEnumerable;function Nl(t){if(t==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}function zl(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de",Object.getOwnPropertyNames(t)[0]==="5")return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;var n=Object.getOwnPropertyNames(e).map(function(i){return e[i]});if(n.join("")!=="0123456789")return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(i){o[i]=i}),Object.keys(Object.assign({},o)).join("")==="abcdefghijklmnopqrst"}catch(i){return!1}}Xo.exports=zl()?Object.assign:function(t,e){for(var r,n=Nl(t),o,i=1;i<arguments.length;i++){r=Object(arguments[i]);for(var s in r)Ll.call(r,s)&&(n[s]=r[s]);if(Zo){o=Zo(r);for(var l=0;l<o.length;l++)jl.call(r,o[l])&&(n[o[l]]=r[o[l]])}}return n}});var or=le((Ph,Qo)=>{"use strict";var Vl="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";Qo.exports=Vl});var On=le((Eh,ei)=>{ei.exports=Function.call.bind(Object.prototype.hasOwnProperty)});var ii=le((wh,oi)=>{"use strict";var Fn=function(){};process.env.NODE_ENV!=="production"&&(ti=or(),ir={},ri=On(),Fn=function(t){var e="Warning: "+t;typeof console!="undefined"&&console.error(e);try{throw new Error(e)}catch(r){}});var ti,ir,ri;function ni(t,e,r,n,o){if(process.env.NODE_ENV!=="production"){for(var i in t)if(ri(t,i)){var s;try{if(typeof t[i]!="function"){var l=Error((n||"React class")+": "+r+" type `"+i+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof t[i]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw l.name="Invariant Violation",l}s=t[i](e,i,n,r,null,ti)}catch(u){s=u}if(s&&!(s instanceof Error)&&Fn((n||"React class")+": type specification of "+r+" `"+i+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof s+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),s instanceof Error&&!(s.message in ir)){ir[s.message]=!0;var a=o?o():"";Fn("Failed "+r+" type: "+s.message+(a!=null?a:""))}}}}ni.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(ir={})};oi.exports=ni});var li=le((_h,ai)=>{"use strict";var Ul=_n(),ql=Jo(),st=or(),kn=On(),si=ii(),at=function(){};process.env.NODE_ENV!=="production"&&(at=function(t){var e="Warning: "+t;typeof console!="undefined"&&console.error(e);try{throw new Error(e)}catch(r){}});function sr(){return null}ai.exports=function(t,e){var r=typeof Symbol=="function"&&Symbol.iterator,n="@@iterator";function o(d){var h=d&&(r&&d[r]||d[n]);if(typeof h=="function")return h}var i="<<anonymous>>",s={array:p("array"),bigint:p("bigint"),bool:p("boolean"),func:p("function"),number:p("number"),object:p("object"),string:p("string"),symbol:p("symbol"),any:c(),arrayOf:m,element:f(),elementType:g(),instanceOf:b,node:ee(),objectOf:B,oneOf:w,oneOfType:U,shape:M,exact:te};function l(d,h){return d===h?d!==0||1/d===1/h:d!==d&&h!==h}function a(d,h){this.message=d,this.data=h&&typeof h=="object"?h:{},this.stack=""}a.prototype=Error.prototype;function u(d){if(process.env.NODE_ENV!=="production")var h={},S=0;function E(A,F,k,D,I,R,ae){if(D=D||i,R=R||k,ae!==st){if(e){var re=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw re.name="Invariant Violation",re}else if(process.env.NODE_ENV!=="production"&&typeof console!="undefined"){var Fe=D+":"+k;!h[Fe]&&S<3&&(at("You are manually calling a React.PropTypes validation function for the `"+R+"` prop on `"+D+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),h[Fe]=!0,S++)}}return F[k]==null?A?F[k]===null?new a("The "+I+" `"+R+"` is marked as required "+("in `"+D+"`, but its value is `null`.")):new a("The "+I+" `"+R+"` is marked as required in "+("`"+D+"`, but its value is `undefined`.")):null:d(F,k,D,I,R)}var _=E.bind(null,!1);return _.isRequired=E.bind(null,!0),_}function p(d){function h(S,E,_,A,F,k){var D=S[E],I=q(D);if(I!==d){var R=v(D);return new a("Invalid "+A+" `"+F+"` of type "+("`"+R+"` supplied to `"+_+"`, expected ")+("`"+d+"`."),{expectedType:d})}return null}return u(h)}function c(){return u(sr)}function m(d){function h(S,E,_,A,F){if(typeof d!="function")return new a("Property `"+F+"` of component `"+_+"` has invalid PropType notation inside arrayOf.");var k=S[E];if(!Array.isArray(k)){var D=q(k);return new a("Invalid "+A+" `"+F+"` of type "+("`"+D+"` supplied to `"+_+"`, expected an array."))}for(var I=0;I<k.length;I++){var R=d(k,I,_,A,F+"["+I+"]",st);if(R instanceof Error)return R}return null}return u(h)}function f(){function d(h,S,E,_,A){var F=h[S];if(!t(F)){var k=q(F);return new a("Invalid "+_+" `"+A+"` of type "+("`"+k+"` supplied to `"+E+"`, expected a single ReactElement."))}return null}return u(d)}function g(){function d(h,S,E,_,A){var F=h[S];if(!Ul.isValidElementType(F)){var k=q(F);return new a("Invalid "+_+" `"+A+"` of type "+("`"+k+"` supplied to `"+E+"`, expected a single ReactElement type."))}return null}return u(d)}function b(d){function h(S,E,_,A,F){if(!(S[E]instanceof d)){var k=d.name||i,D=O(S[E]);return new a("Invalid "+A+" `"+F+"` of type "+("`"+D+"` supplied to `"+_+"`, expected ")+("instance of `"+k+"`."))}return null}return u(h)}function w(d){if(!Array.isArray(d))return process.env.NODE_ENV!=="production"&&(arguments.length>1?at("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):at("Invalid argument supplied to oneOf, expected an array.")),sr;function h(S,E,_,A,F){for(var k=S[E],D=0;D<d.length;D++)if(l(k,d[D]))return null;var I=JSON.stringify(d,function(ae,re){var Fe=v(re);return Fe==="symbol"?String(re):re});return new a("Invalid "+A+" `"+F+"` of value `"+String(k)+"` "+("supplied to `"+_+"`, expected one of "+I+"."))}return u(h)}function B(d){function h(S,E,_,A,F){if(typeof d!="function")return new a("Property `"+F+"` of component `"+_+"` has invalid PropType notation inside objectOf.");var k=S[E],D=q(k);if(D!=="object")return new a("Invalid "+A+" `"+F+"` of type "+("`"+D+"` supplied to `"+_+"`, expected an object."));for(var I in k)if(kn(k,I)){var R=d(k,I,_,A,F+"."+I,st);if(R instanceof Error)return R}return null}return u(h)}function U(d){if(!Array.isArray(d))return process.env.NODE_ENV!=="production"&&at("Invalid argument supplied to oneOfType, expected an instance of array."),sr;for(var h=0;h<d.length;h++){var S=d[h];if(typeof S!="function")return at("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+x(S)+" at index "+h+"."),sr}function E(_,A,F,k,D){for(var I=[],R=0;R<d.length;R++){var ae=d[R],re=ae(_,A,F,k,D,st);if(re==null)return null;re.data&&kn(re.data,"expectedType")&&I.push(re.data.expectedType)}var Fe=I.length>0?", expected one of type ["+I.join(", ")+"]":"";return new a("Invalid "+k+" `"+D+"` supplied to "+("`"+F+"`"+Fe+"."))}return u(E)}function ee(){function d(h,S,E,_,A){return K(h[S])?null:new a("Invalid "+_+" `"+A+"` supplied to "+("`"+E+"`, expected a ReactNode."))}return u(d)}function P(d,h,S,E,_){return new a((d||"React class")+": "+h+" type `"+S+"."+E+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+_+"`.")}function M(d){function h(S,E,_,A,F){var k=S[E],D=q(k);if(D!=="object")return new a("Invalid "+A+" `"+F+"` of type `"+D+"` "+("supplied to `"+_+"`, expected `object`."));for(var I in d){var R=d[I];if(typeof R!="function")return P(_,A,F,I,v(R));var ae=R(k,I,_,A,F+"."+I,st);if(ae)return ae}return null}return u(h)}function te(d){function h(S,E,_,A,F){var k=S[E],D=q(k);if(D!=="object")return new a("Invalid "+A+" `"+F+"` of type `"+D+"` "+("supplied to `"+_+"`, expected `object`."));var I=ql({},S[E],d);for(var R in I){var ae=d[R];if(kn(d,R)&&typeof ae!="function")return P(_,A,F,R,v(ae));if(!ae)return new a("Invalid "+A+" `"+F+"` key `"+R+"` supplied to `"+_+"`.\nBad object: "+JSON.stringify(S[E],null," ")+`
2
- Valid keys: `+JSON.stringify(Object.keys(d),null," "));var re=ae(k,R,_,A,F+"."+R,st);if(re)return re}return null}return u(h)}function K(d){switch(typeof d){case"number":case"string":case"undefined":return!0;case"boolean":return!d;case"object":if(Array.isArray(d))return d.every(K);if(d===null||t(d))return!0;var h=o(d);if(h){var S=h.call(d),E;if(h!==d.entries){for(;!(E=S.next()).done;)if(!K(E.value))return!1}else for(;!(E=S.next()).done;){var _=E.value;if(_&&!K(_[1]))return!1}}else return!1;return!0;default:return!1}}function Y(d,h){return d==="symbol"?!0:h?h["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&h instanceof Symbol:!1}function q(d){var h=typeof d;return Array.isArray(d)?"array":d instanceof RegExp?"object":Y(h,d)?"symbol":h}function v(d){if(typeof d=="undefined"||d===null)return""+d;var h=q(d);if(h==="object"){if(d instanceof Date)return"date";if(d instanceof RegExp)return"regexp"}return h}function x(d){var h=v(d);switch(h){case"array":case"object":return"an "+h;case"boolean":case"date":case"regexp":return"a "+h;default:return h}}function O(d){return!d.constructor||!d.constructor.name?i:d.constructor.name}return s.checkPropTypes=si,s.resetWarningCache=si.resetWarningCache,s.PropTypes=s,s}});var pi=le((Oh,fi)=>{"use strict";var Wl=or();function ui(){}function ci(){}ci.resetWarningCache=ui;fi.exports=function(){function t(n,o,i,s,l,a){if(a!==Wl){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}t.isRequired=t;function e(){return t}var r={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:ci,resetWarningCache:ui};return r.PropTypes=r,r}});var ar=le((Fh,An)=>{process.env.NODE_ENV!=="production"?(di=_n(),mi=!0,An.exports=li()(di.isElement,mi)):An.exports=pi()();var di,mi});var bi=le(z=>{"use strict";var Dn=Symbol.for("react.element"),Rn=Symbol.for("react.portal"),lr=Symbol.for("react.fragment"),ur=Symbol.for("react.strict_mode"),cr=Symbol.for("react.profiler"),fr=Symbol.for("react.provider"),pr=Symbol.for("react.context"),Gl=Symbol.for("react.server_context"),dr=Symbol.for("react.forward_ref"),mr=Symbol.for("react.suspense"),hr=Symbol.for("react.suspense_list"),gr=Symbol.for("react.memo"),yr=Symbol.for("react.lazy"),Kl=Symbol.for("react.offscreen"),xi;xi=Symbol.for("react.module.reference");function ve(t){if(typeof t=="object"&&t!==null){var e=t.$$typeof;switch(e){case Dn:switch(t=t.type,t){case lr:case cr:case ur:case mr:case hr:return t;default:switch(t=t&&t.$$typeof,t){case Gl:case pr:case dr:case yr:case gr:case fr:return t;default:return e}}case Rn:return e}}}z.ContextConsumer=pr;z.ContextProvider=fr;z.Element=Dn;z.ForwardRef=dr;z.Fragment=lr;z.Lazy=yr;z.Memo=gr;z.Portal=Rn;z.Profiler=cr;z.StrictMode=ur;z.Suspense=mr;z.SuspenseList=hr;z.isAsyncMode=function(){return!1};z.isConcurrentMode=function(){return!1};z.isContextConsumer=function(t){return ve(t)===pr};z.isContextProvider=function(t){return ve(t)===fr};z.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===Dn};z.isForwardRef=function(t){return ve(t)===dr};z.isFragment=function(t){return ve(t)===lr};z.isLazy=function(t){return ve(t)===yr};z.isMemo=function(t){return ve(t)===gr};z.isPortal=function(t){return ve(t)===Rn};z.isProfiler=function(t){return ve(t)===cr};z.isStrictMode=function(t){return ve(t)===ur};z.isSuspense=function(t){return ve(t)===mr};z.isSuspenseList=function(t){return ve(t)===hr};z.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===lr||t===cr||t===ur||t===mr||t===hr||t===Kl||typeof t=="object"&&t!==null&&(t.$$typeof===yr||t.$$typeof===gr||t.$$typeof===fr||t.$$typeof===pr||t.$$typeof===dr||t.$$typeof===xi||t.getModuleId!==void 0)};z.typeOf=ve});var vi=le(V=>{"use strict";process.env.NODE_ENV!=="production"&&function(){"use strict";var t=Symbol.for("react.element"),e=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),s=Symbol.for("react.context"),l=Symbol.for("react.server_context"),a=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),c=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),f=Symbol.for("react.offscreen"),g=!1,b=!1,w=!1,B=!1,U=!1,ee;ee=Symbol.for("react.module.reference");function P(C){return!!(typeof C=="string"||typeof C=="function"||C===r||C===o||U||C===n||C===u||C===p||B||C===f||g||b||w||typeof C=="object"&&C!==null&&(C.$$typeof===m||C.$$typeof===c||C.$$typeof===i||C.$$typeof===s||C.$$typeof===a||C.$$typeof===ee||C.getModuleId!==void 0))}function M(C){if(typeof C=="object"&&C!==null){var tt=C.$$typeof;switch(tt){case t:var jt=C.type;switch(jt){case r:case o:case n:case u:case p:return jt;default:var vo=jt&&jt.$$typeof;switch(vo){case l:case s:case a:case m:case c:case i:return vo;default:return tt}}case e:return tt}}}var te=s,K=i,Y=t,q=a,v=r,x=m,O=c,d=e,h=o,S=n,E=u,_=p,A=!1,F=!1;function k(C){return A||(A=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function D(C){return F||(F=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function I(C){return M(C)===s}function R(C){return M(C)===i}function ae(C){return typeof C=="object"&&C!==null&&C.$$typeof===t}function re(C){return M(C)===a}function Fe(C){return M(C)===r}function Xr(C){return M(C)===m}function Jr(C){return M(C)===c}function Qr(C){return M(C)===e}function en(C){return M(C)===o}function tn(C){return M(C)===n}function T(C){return M(C)===u}function Tt(C){return M(C)===p}V.ContextConsumer=te,V.ContextProvider=K,V.Element=Y,V.ForwardRef=q,V.Fragment=v,V.Lazy=x,V.Memo=O,V.Portal=d,V.Profiler=h,V.StrictMode=S,V.Suspense=E,V.SuspenseList=_,V.isAsyncMode=k,V.isConcurrentMode=D,V.isContextConsumer=I,V.isContextProvider=R,V.isElement=ae,V.isForwardRef=re,V.isFragment=Fe,V.isLazy=Xr,V.isMemo=Jr,V.isPortal=Qr,V.isProfiler=en,V.isStrictMode=tn,V.isSuspense=T,V.isSuspenseList=Tt,V.isValidElementType=P,V.typeOf=M}()});var Ti=le((zh,$n)=>{"use strict";process.env.NODE_ENV==="production"?$n.exports=bi():$n.exports=vi()});var ns=le((_b,rs)=>{"use strict";function He(t){this._maxSize=t,this.clear()}He.prototype.clear=function(){this._size=0,this._values=Object.create(null)};He.prototype.get=function(t){return this._values[t]};He.prototype.set=function(t,e){return this._size>=this._maxSize&&this.clear(),t in this._values||this._size++,this._values[t]=e};var Yc=/[^.^\]^[]+|(?=\[\]|\.\.)/g,ts=/^\d+$/,Gc=/^\d/,Kc=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,Hc=/^\s*(['"]?)(.*?)(\1)\s*$/,to=512,Ji=new He(to),Qi=new He(to),es=new He(to);rs.exports={Cache:He,split:eo,normalizePath:Qn,setter:function(t){var e=Qn(t);return Qi.get(t)||Qi.set(t,function(n,o){for(var i=0,s=e.length,l=n;i<s-1;){var a=e[i];if(a==="__proto__"||a==="constructor"||a==="prototype")return n;l=l[e[i++]]}l[e[i]]=o})},getter:function(t,e){var r=Qn(t);return es.get(t)||es.set(t,function(o){for(var i=0,s=r.length;i<s;)if(o!=null||!e)o=o[r[i++]];else return;return o})},join:function(t){return t.reduce(function(e,r){return e+(ro(r)||ts.test(r)?"["+r+"]":(e?".":"")+r)},"")},forEach:function(t,e,r){Zc(Array.isArray(t)?t:eo(t),e,r)}};function Qn(t){return Ji.get(t)||Ji.set(t,eo(t).map(function(e){return e.replace(Hc,"$2")}))}function eo(t){return t.match(Yc)||[""]}function Zc(t,e,r){var n=t.length,o,i,s,l;for(i=0;i<n;i++)o=t[i],o&&(Qc(o)&&(o='"'+o+'"'),l=ro(o),s=!l&&/^\d+$/.test(o),e.call(r,o,l,s,i,t))}function ro(t){return typeof t=="string"&&t&&["'",'"'].indexOf(t.charAt(0))!==-1}function Xc(t){return t.match(Gc)&&!t.match(ts)}function Jc(t){return Kc.test(t)}function Qc(t){return!ro(t)&&(Xc(t)||Jc(t))}});var ss=le((Ob,is)=>{var ef=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,Rr=t=>t.match(ef)||[],$r=t=>t[0].toUpperCase()+t.slice(1),no=(t,e)=>Rr(t).join(e).toLowerCase(),os=t=>Rr(t).reduce((e,r)=>`${e}${e?r[0].toUpperCase()+r.slice(1).toLowerCase():r.toLowerCase()}`,""),tf=t=>$r(os(t)),rf=t=>no(t,"_"),nf=t=>no(t,"-"),of=t=>$r(no(t," ")),sf=t=>Rr(t).map($r).join(" ");is.exports={words:Rr,upperFirst:$r,camelCase:os,pascalCase:tf,snakeCase:rf,kebabCase:nf,sentenceCase:of,titleCase:sf}});var ls=le((Fb,oo)=>{oo.exports=function(t){return as(af(t),t)};oo.exports.array=as;function as(t,e){var r=t.length,n=new Array(r),o={},i=r,s=lf(e),l=uf(t);for(e.forEach(function(u){if(!l.has(u[0])||!l.has(u[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});i--;)o[i]||a(t[i],i,new Set);return n;function a(u,p,c){if(c.has(u)){var m;try{m=", node was:"+JSON.stringify(u)}catch(b){m=""}throw new Error("Cyclic dependency"+m)}if(!l.has(u))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(u));if(!o[p]){o[p]=!0;var f=s.get(u)||new Set;if(f=Array.from(f),p=f.length){c.add(u);do{var g=f[--p];a(g,l.get(g),c)}while(p);c.delete(u)}n[--r]=u}}}function af(t){for(var e=new Set,r=0,n=t.length;r<n;r++){var o=t[r];e.add(o[0]),e.add(o[1])}return Array.from(e)}function lf(t){for(var e=new Map,r=0,n=t.length;r<n;r++){var o=t[r];e.has(o[0])||e.set(o[0],new Set),e.has(o[1])||e.set(o[1],new Set),e.get(o[0]).add(o[1])}return e}function uf(t){for(var e=new Map,r=0,n=t.length;r<n;r++)e.set(t[r],r);return e}});var _material = require('@mui/material');var _jsxruntime = require('react/jsx-runtime');var Hs=t=>{let o=t,{isLoading:e,children:r}=o,n=X(o,["isLoading","children"]);return _jsxruntime.jsx.call(void 0, _material.Button,W(y({},n),{disabled:e?!0:n.disabled,children:e?_jsxruntime.jsx.call(void 0, _material.CircularProgress,{color:"secondary",size:22}):r}))},ne= exports.Button =Hs;function Le(t){return _jsxruntime.jsx.call(void 0, _material.Stack,y({direction:"row",justifyContent:"flex-end",alignItems:"center",spacing:1},t))}function Po(t){let n=t,{label:e}=n,r=X(n,["label"]);return _jsxruntime.jsx.call(void 0, _material.FormControl,{component:"fieldset",children:_jsxruntime.jsx.call(void 0, _material.FormControlLabel,{label:e,control:_jsxruntime.jsx.call(void 0, _material.Checkbox,y({},r))})})}var _polished = require('polished');var _styles = require('@mui/material/styles');var sn="#59C3E0",na={palette:{text:{primary:"#262626",secondary:"#808080"},primary:{light:"#83EDFF",main:sn,dark:"#2C96B3"},background:{default:"#F2F2F2",paper:"#FEFEFE"},error:{main:"#F44336",dark:"#BE0D00",light:"#FF6C5F"},warning:{main:"#FFCD38",dark:"#C29000",light:"#FFED58"},success:{main:"#4CAF50",dark:"#187B1C",light:"#7DE081"},grey:{800:"#202024",700:"#262626",600:"#333333",500:"#808080",400:"#BBBBBA",300:"#E0E0E0",200:"#F2F2F2",100:"#FAFAFA"}},typography:{h1:{fontSize:"2rem",fontFamily:"Poppins"},h2:{fontSize:"1.75rem"},h3:{fontSize:"1.5rem"},h4:{fontSize:"1.25rem"},h5:{fontSize:"1rem"},h6:{fontSize:"0.875rem"},button:{fontSize:"0.875rem",fontWeight:"bold",textTransform:"none"},body1:{fontSize:"1rem",color:"#262626"},body2:{fontSize:"0.875rem",color:"#808080"},fontFamily:["sans-serif","Roboto","Poppins"].join(",")},components:{MuiContainer:{defaultProps:{maxWidth:!1},styleOverrides:{root:{paddingTop:"16px",paddingBottom:"16px"}}},MuiButton:{defaultProps:{size:"small",variant:"outlined"},styleOverrides:{root:{textTransform:"none",fontWeight:"bold"},contained:{color:"rgba(255,255,255,0.85)",boxShadow:"none"},outlined:{background:"white",":disabled":{background:"none",boxShadow:"none",borderColor:"#E0E0E0"}}}},MuiFormControl:{defaultProps:{size:"small"}},MuiCheckbox:{defaultProps:{size:"small"}},MuiTextField:{defaultProps:{size:"small",fullWidth:!0},styleOverrides:{root:{"& label":{color:"#808080"}}}},MuiInputLabel:{styleOverrides:{root:{fontSize:"0.875rem"}}},MuiSvgIcon:{defaultProps:{fontSize:"small",color:"inherit"}},MuiIconButton:{defaultProps:{size:"small"},styleOverrides:{root:{}}},MuiPopover:{styleOverrides:{paper:{borderRadius:"12px"}}},MuiMenuItem:{styleOverrides:{root:{"&.Mui-selected":{"& .MuiIcon-root":{color:sn},"& .MuiTypography-root":{color:sn}},":hover":{borderRadius:"6px",background:"rgba(89, 195, 224, 15%)"}}}},MuiTableCell:{styleOverrides:{root:{padding:0,"&.selected":{backgroundColor:"#199"}},head:{backgroundColor:"#FAFAFA",border:"1px solid #D0D0D0",color:"#808080","& span":{color:"#808080"},"& div":{marginLeft:"4px"}},body:{backgroundColor:"#ffffff00",border:"1px solid #D0D0D0",borderTop:"none",borderBottom:"none","& > div":{fontSize:"9pt",paddingLeft:"6px",paddingRight:"6px",paddingTop:"2px",paddingBottom:"2px"}}}},MuiTableRow:{styleOverrides:{root:{backgroundColor:"#FFFFFF",height:"30px","&.MuiTableRow-hover":{"&:hover":{backgroundColor:"#ffffde"}}},head:{borderRadius:"4px","& div":{fontWeight:"600",fontSize:"13px",padding:"2px"}}}},MUIDataTableHeadCell:{styleOverrides:{toolButton:{height:"48px"}}},MUIDataTableBodyRow:{styleOverrides:{root:{"&:hover":{backgroundColor:"#333"},"&:nth-of-type(even)":{backgroundColor:"#F5F5F5"},"&:last-child":{borderBottom:"1px solid #D0D0D0"}}}},MuiTableHead:{styleOverrides:{root:{height:"48px"}}},MuiDrawer:{styleOverrides:{paper:{}}},MuiDialog:{styleOverrides:{paper:{borderRadius:"6px"}}},MuiDialogContent:{styleOverrides:{root:{}}}}},oa=_styles.createTheme.call(void 0, na),ia=_styles.responsiveFontSizes.call(void 0, oa),L= exports.theme =ia;var aa={"primary-light":L.palette.primary.light,primary:L.palette.primary.main,"primary-dark":L.palette.primary.dark,"text-secondary":L.palette.text.secondary,"text-primary":L.palette.text.primary,"background-paper":L.palette.background.paper,background:L.palette.background.default,"error-light":L.palette.error.light,error:L.palette.error.main,"erro-drark":L.palette.error.dark,"warning-light":L.palette.warning.light,warning:L.palette.warning.main,"warning-dark":L.palette.warning.dark,"success-light":L.palette.success.light,success:L.palette.success.main,"success-dark":L.palette.success.dark,"grey-100":L.palette.grey[100],"grey-200":L.palette.grey[200],"grey-300":L.palette.grey[300],"grey-400":L.palette.grey[400],"grey-500":L.palette.grey[500],"grey-600":L.palette.grey[600],"grey-700":L.palette.grey[700],"grey-800":L.palette.grey[800]};function wo(){return _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment,{children:Object.entries(aa).map(([t,e])=>_jsxruntime.jsx.call(void 0, _material.Box,{sx:{backgroundColor:e,padding:"2rem"},children:_jsxruntime.jsxs.call(void 0, _material.Box,{sx:{display:"flex",justifyContent:"space-between",fontFamily:L.typography.fontFamily,color:_polished.getContrast.call(void 0, e,"#FFF")<3.5?"#000":"#FFF"},children:[_jsxruntime.jsx.call(void 0, "strong",{children:t}),_jsxruntime.jsx.call(void 0, "span",{children:e})]})},t))})}var _hooks = require('@data-c/hooks');var _react = require('react'); var Ai = _interopRequireWildcard(_react); var ft = _interopRequireWildcard(_react);function Oo(t){if(!t)return 0;let e=String(t);return e=e.replace(/\./g,"").replace(/,/g,"."),parseFloat(e)}var an=null;function ln(t){let s=t,{value:e,onChange:r}=s,n=X(s,["value","onChange"]);an=null;let o=_react.useCallback.call(void 0, l=>{let a=l.target.value||"0.00";_hooks.isValidNumber.call(void 0, a)&&(an==="Backspace"?a=(Oo(a)/10).toFixed(2):a=(Oo(a)*10).toFixed(2),r&&(l.target.value=a,r(l,a)))},[]),i=_react.useCallback.call(void 0, l=>{l.target.selectionStart===l.target.selectionEnd&&(l.target.selectionStart=l.target.value.length,l.target.selectionEnd=l.target.value.length)},[]);return _jsxruntime.jsx.call(void 0, _material.TextField,y({onKeyDown:l=>{an=l.key},onSelect:l=>{i(l)},onChange:o,value:_hooks.formatCurrency.call(void 0, String(e),2)||"",inputProps:{style:{textAlign:"right"}}},n))}ln.defaultProps={value:0};var _iconsmaterial = require('@mui/icons-material');var Fo={content:{cancel:"error",confirm:"primary"},info:{cancel:"error",confirm:"info"},success:{cancel:"error",confirm:"success"},warning:{cancel:"primary",confirm:"warning"},error:{cancel:"primary",confirm:"error"}};function je(t){let{cancelLabel:e,confirmLabel:r,type:n,onCancel:o,onConfirm:i,isLoadingConfirmButton:s}=t;return _jsxruntime.jsxs.call(void 0, Le,{children:[o&&_jsxruntime.jsx.call(void 0, ne,{onClick:()=>{o()},color:Fo[n||"content"].cancel,children:e}),_jsxruntime.jsx.call(void 0, ne,{onClick:()=>{i&&i()},color:Fo[n||"content"].confirm,variant:"contained",isLoading:s,children:r})]})}var ma={cancelLabel:"Cancelar",confirmLabel:"Ok",type:"content",isLoadingConfirmButton:!1};je.defaultProps=ma;function we(t){let{title:e,children:r,actions:n,onClose:o,onConfirm:i,type:s}=t,l=_material.useTheme.call(void 0, ),a=n==="none"?null:n||_jsxruntime.jsx.call(void 0, je,{onCancel:()=>{o&&o({},"backdropClick")},onConfirm:()=>{i&&i()},type:s}),u=_react.useMemo.call(void 0, ()=>s==="error"?"error_outlined":s==="warning"?"error_amber":s==="info"||s==="success"?"info":!1,[s]),p=_react.useMemo.call(void 0, ()=>s!=="content"?s:"primary",[s]);return _jsxruntime.jsxs.call(void 0, _material.Dialog,W(y({},t),{children:[_jsxruntime.jsx.call(void 0, _material.DialogTitle,{children:_jsxruntime.jsxs.call(void 0, _material.Stack,{direction:"row",justifyContent:"space-between",alignItems:"center",spacing:2,children:[_jsxruntime.jsx.call(void 0, _material.Typography,{sx:{color:c=>{if(s!=="content")return c.palette[p||"primary"].main}},fontSize:"17pt",variant:"h3",children:_jsxruntime.jsxs.call(void 0, _material.Stack,{direction:"row",justifyContent:"flex-start",alignItems:"center",children:[u&&_jsxruntime.jsx.call(void 0, _material.Icon,{sx:{mr:1},fontSize:"medium",children:u}),e]})}),o&&_jsxruntime.jsx.call(void 0, _material.IconButton,{onClick:()=>o({},"escapeKeyDown"),sx:{mr:-1,color:l.palette.text.primary},children:_jsxruntime.jsx.call(void 0, _iconsmaterial.Close,{color:"inherit"})})]})}),_jsxruntime.jsx.call(void 0, _material.DialogContent,{children:_jsxruntime.jsx.call(void 0, _material.Box,{sx:{mt:1,color:c=>c.palette.grey[500],fontFamily:c=>c.typography.fontFamily},children:r})}),_jsxruntime.jsx.call(void 0, _material.DialogActions,{sx:{padding:2},children:a})]}))}we.defaultProps={fullWidth:!0,type:"content"};var _providers = require('@data-c/providers');function cn(t){let{formValues:e,isSubmitting:r}=_providers.useFormData.call(void 0, ),{closeConfirm:n}=_providers.useFormApi.call(void 0, ),{onDelete:o,hideCancelButton:i,type:s}=t;return _jsxruntime.jsx.call(void 0, je,{type:s,confirmLabel:"Excluir",onConfirm:()=>o(e),onCancel:i?void 0:()=>n(),isLoadingConfirmButton:r})}function fn(t){let{isOpenConfirm:e}=_providers.useFormData.call(void 0, ),{closeConfirm:r}=_providers.useFormApi.call(void 0, ),{type:n,title:o,children:i,actions:s,onDelete:l}=t;return _jsxruntime.jsx.call(void 0, we,{type:n,open:e,title:o,actions:s||_jsxruntime.jsx.call(void 0, cn,{type:n,onDelete:l||(()=>{throw new Error("Nenhuma a\xE7\xE3o foi definida para ser executada em onDelete")})}),onClose:()=>{r()},maxWidth:"xs",children:i})}var Aa={open:!1,title:"Excluir Registro Permanentemente?",children:"Voc\xEA n\xE3o poder\xE1 recuperar este registro ap\xF3s exclu\xED-lo!",type:"error"};fn.defaultProps=Aa;var _muidatatables = require('mui-datatables'); var _muidatatables2 = _interopRequireDefault(_muidatatables);var ja=t=>{let{count:e,rowsPerPage:r,page:n,changePage:o,changeRowsPerPage:i,rowsPerPageOptions:s}=t,l=_react.useMemo.call(void 0, ()=>Math.max(0,Math.ceil(e/r)),[e,r]);return _jsxruntime.jsx.call(void 0, _material.TableFooter,{children:_jsxruntime.jsx.call(void 0, _material.TableRow,{children:_jsxruntime.jsxs.call(void 0, _material.TableCell,{colSpan:1e3,sx:{display:"flex",justifyContent:"flex-end",padding:"12px 12px 12px 12px"},children:[_jsxruntime.jsx.call(void 0, _material.TextField,{sx:{width:"128px",fontSize:"8pt"},label:"Tamanho da p\xE1gina",size:"small",value:r,select:!0,onChange:a=>{i(a.target.value)},children:s.map(a=>_jsxruntime.jsx.call(void 0, _material.MenuItem,{value:a,children:a},a))}),_jsxruntime.jsx.call(void 0, _material.Pagination,{variant:"outlined",shape:"rounded",count:l,showFirstButton:!0,showLastButton:!0,onChange:(a,u)=>{o(u)},page:n,color:"primary"})]})})})},Ro=ja;var Wa={body:{noMatch:"Nenhum registro encontrado",toolTip:"Ordenar"},pagination:{next:"Pr\xF3ximo",previous:"Anterior",rowsPerPage:"Linhas por p\xE1g:",displayRows:"de"},toolbar:{search:"Procurar",downloadCsv:"Download CSV",print:"Imprimir",viewColumns:"Colunas",filterTable:"Procurar na Tabela"},filter:{all:"Todos",title:"Filtros",reset:"Limpar"},viewColumns:{title:"Visualizar Colunas",titleAria:"Mostrar/Ocultar Colunas da Tabela"},selectedRows:{text:"Linhas Selecionadas",delete:"Remover",deleteAria:"Remover Linhas Selecionadas"}},Vt={filterType:"textField",selectableRows:"none",elevation:0,responsive:"standard",print:!1,download:!1,filter:!1,search:!1,sort:!1,viewColumns:!1,textLabels:Wa,serverSide:!0,fixedHeader:!1,rowsPerPageOptions:[15,50,100],rowsPerPage:15},Ya=t=>{let g=t,{error:e,tableTitle:r,isLoading:n,isFetching:o,data:i,columns:s,options:l,pagination:a,changePage:u,changePageSize:p,changeSort:c}=g,m=X(g,["error","tableTitle","isLoading","isFetching","data","columns","options","pagination","changePage","changePageSize","changeSort"]),f=l||{};return f&&(u&&(f.onChangePage=u),p&&(f.onChangeRowsPerPage=p),c&&(f.onColumnSortChange=c),f.customFooter=(b,w,B,U,ee,P)=>!a||n?_jsxruntime.jsx.call(void 0, _jsxruntime.Fragment,{}):_jsxruntime.jsx.call(void 0, Ro,{count:a.totalRecords,page:a.page,rowsPerPage:a.pageSize,rowsPerPageOptions:(f==null?void 0:f.rowsPerPageOptions)||(Vt==null?void 0:Vt.rowsPerPageOptions),changeRowsPerPage:f==null?void 0:f.onChangeRowsPerPage,changePage:f==null?void 0:f.onChangePage,textLabels:P})),_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[o&&_jsxruntime.jsx.call(void 0, _material.LinearProgress,{}),e&&_jsxruntime.jsx.call(void 0, _material.Stack,{sx:{width:"100%"},spacing:2,children:_jsxruntime.jsx.call(void 0, _material.Alert,{severity:"error",children:e})}),_jsxruntime.jsx.call(void 0, _muidatatables2.default,y({title:r,data:i,columns:s,options:y(y({},Vt),f)},m))]})},Ga= exports.DataTable =Ya;var tl=_styles.styled.call(void 0, r=>{var n=r,{className:t}=n,e=X(n,["className"]);return _jsxruntime.jsx.call(void 0, _material.Tooltip,W(y({},e),{classes:{popper:t}}))})(({theme:t})=>({[`& .${_material.tooltipClasses.tooltip}`]:{backgroundColor:"#f5f5f9",color:"rgba(0, 0, 0, 0.87)",maxWidth:320,minWidth:180,fontSize:t.typography.pxToRem(12),border:"1px solid #dadde9"}})),rl={info:"Informa\xE7\xE3o",warning:"Aten\xE7\xE3o"},nl=t=>{let{title:e,type:r}=t;return _jsxruntime.jsxs.call(void 0, _material.Box,{sx:{mt:.5},children:[_jsxruntime.jsxs.call(void 0, _material.Box,{sx:{display:"flex",flexDirection:"row",alignItems:"center",alignContent:"center"},children:[_jsxruntime.jsx.call(void 0, _material.Icon,{color:r,fontSize:"small",children:r})," ",_jsxruntime.jsx.call(void 0, _material.Typography,{variant:"subtitle2",sx:{ml:.5},children:rl[r]})]}),_jsxruntime.jsx.call(void 0, _material.Divider,{sx:{mt:.5}}),_jsxruntime.jsx.call(void 0, _material.Box,{sx:{mt:1},children:e})]})},Io=t=>{let i=t,{type:e,children:r,title:n}=i,o=X(i,["type","children","title"]);return _jsxruntime.jsx.call(void 0, tl,W(y({arrow:!0,title:_jsxruntime.jsx.call(void 0, nl,{title:n||"",type:e}),enterDelay:300},o),{children:r}))};Io.defaultProps={type:"info"};var nt=Io;var Pm=()=>({style:{width:"80px",textAlign:"center"}}),Em= exports.CurrencyCellStyle =()=>({style:{width:"128px",textAlign:"right"}});function dn(t){let{onClick:e,value:r,extraOptions:n,displayUpdateButton:o,displayDeleteButton:i,displayTransporterButton:s,disableTooltip:l,disabled:a,disabledUpdateButton:u,disabledDeleteButton:p,disabledTransporterButton:c}=t;return _jsxruntime.jsxs.call(void 0, _material.Box,{children:[n&&n.map(({id:m,icon:f,iconButtonProps:g,tooltip:b,visible:w,disabled:B})=>w===null||!!w&&_jsxruntime.jsxs.call(void 0, _material.IconButton,W(y({onClick:()=>e(m,r),size:"small",disabled:B},g),{children:[b&&_jsxruntime.jsx.call(void 0, nt,{type:b.type,title:b.content,children:_jsxruntime.jsx.call(void 0, _material.Icon,{fontSize:"small",children:f})}),!b&&_jsxruntime.jsx.call(void 0, _material.Icon,{fontSize:"small",children:f})]}),m)),s&&_jsxruntime.jsxs.call(void 0, _material.IconButton,{size:"small",onClick:()=>e("transport",r),color:"primary",disabled:a||c,children:[l&&_jsxruntime.jsx.call(void 0, _iconsmaterial.GetApp,{fontSize:"small"}),!l&&_jsxruntime.jsx.call(void 0, nt,{type:"warning",title:_jsxruntime.jsx.call(void 0, _material.Box,{children:"Clique para transportar este registro."}),children:_jsxruntime.jsx.call(void 0, _iconsmaterial.GetApp,{fontSize:"small"})})]}),o&&_jsxruntime.jsxs.call(void 0, _material.IconButton,{size:"small",color:"primary",onClick:()=>e("edit",r),disabled:a||u,children:[l&&_jsxruntime.jsx.call(void 0, _iconsmaterial.Edit,{fontSize:"small"}),!l&&_jsxruntime.jsx.call(void 0, nt,{type:"info",title:_jsxruntime.jsx.call(void 0, _material.Box,{children:"Clique para editar este registro."}),children:_jsxruntime.jsx.call(void 0, _iconsmaterial.Edit,{fontSize:"small"})})]}),i&&_jsxruntime.jsxs.call(void 0, _material.IconButton,{size:"small",onClick:()=>e("delete",r),color:"primary",disabled:a||p,children:[l&&_jsxruntime.jsx.call(void 0, _iconsmaterial.Delete,{fontSize:"small"}),!l&&_jsxruntime.jsx.call(void 0, nt,{type:"warning",title:_jsxruntime.jsx.call(void 0, _material.Box,{children:"Clique para excluir este registro."}),children:_jsxruntime.jsx.call(void 0, _iconsmaterial.Delete,{fontSize:"small"})})]})]})}dn.defaultProps={displayUpdateButton:!0,displayDeleteButton:!0,displayTransporterButton:!1,disableTooltip:!0};function Wt(t){let{renderLabel:e,disableds:r}=t,{deleteFilterValue:n,deleteAllFilterValues:o}=_providers.useFilterApi.call(void 0, ),{filterValues:i,appliedValues:s}=_providers.useFilterData.call(void 0, ),l=_react.useMemo.call(void 0, ()=>{if(Object.keys(s||{}).length>0){let p=!1,c=Object.keys(s||{});for(let m=0;m<c.length;m++){let f=s[c[m]];if(Array.isArray(f)&&f.length>0){p=!0;break}else if(!Array.isArray(f)&&f){p=!0;break}}return p}return!1},[s]),a=_react.useCallback.call(void 0, u=>e?e(i[u].label,s[u]):`${i[u].label} - ${s&&s[u]}`,[e,i,s]);return _jsxruntime.jsxs.call(void 0, _material.Box,{sx:{display:"flex",flexDirection:"row",justifyContent:"space-between"},children:[_jsxruntime.jsx.call(void 0, _material.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:l&&Object.keys(s||{}).map(u=>{let p=Array.isArray(r)&&r.includes(u),c;if(p||(c=()=>{n&&n(u)}),Array.isArray(s[u])&&s[u].length>0)return _jsxruntime.jsx.call(void 0, _material.Chip,{size:"small",label:a(u),onDelete:c,variant:"outlined"},u);if(!Array.isArray(s[u])&&s[u])return _jsxruntime.jsx.call(void 0, _material.Chip,{size:"small",label:a(u),onDelete:c,variant:"outlined"},u)})}),l&&_jsxruntime.jsx.call(void 0, _material.Box,{sx:{mr:.5,ml:.5},children:_jsxruntime.jsx.call(void 0, _material.IconButton,{onClick:()=>{o&&o()},children:_jsxruntime.jsx.call(void 0, _iconsmaterial.RestartAlt,{fontSize:"small",color:"error"})})})]})}function Yt(t){let s=t,{drawerTitle:e,actions:r,onClose:n,children:o}=s,i=X(s,["drawerTitle","actions","onClose","children"]);return _jsxruntime.jsx.call(void 0, _material.Drawer,W(y({PaperProps:{style:{borderRadius:"12px 0 0 12px"}},onClose:n},i),{children:_jsxruntime.jsxs.call(void 0, _material.Stack,{sx:{width:"360px",height:"100%",justifyContent:"space-between",backgroundColor:l=>l.palette.background.paper},children:[_jsxruntime.jsxs.call(void 0, _material.Stack,{children:[_jsxruntime.jsxs.call(void 0, _material.Box,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",alignContent:"center",height:"48px",borderBottom:l=>`solid 1px ${l.palette.grey[300]}`},children:[_jsxruntime.jsx.call(void 0, _material.Typography,{component:"h1",variant:"h5",sx:{pl:l=>l.spacing(2)},children:e}),n&&_jsxruntime.jsx.call(void 0, _material.IconButton,{onClick:n,children:_jsxruntime.jsx.call(void 0, _iconsmaterial.Cancel,{color:"error"})})]}),_jsxruntime.jsx.call(void 0, _material.Box,{sx:{padding:l=>l.spacing(2)},children:o})]}),r&&_jsxruntime.jsx.call(void 0, _material.Box,{sx:{pt:l=>l.spacing(1),pb:l=>l.spacing(1),pl:l=>l.spacing(2),pr:l=>l.spacing(2),borderTop:l=>`solid 1px ${l.palette.grey[300]}`},children:r})]})}))}Yt.defaultProps={anchor:"right"};var vl=()=>{let{applyFilterValues:t,closeFilter:e,deleteAllFilterValues:r}=_providers.useFilterApi.call(void 0, );function n(){e()}function o(){t(),e()}function i(){r&&(r(),e())}return _jsxruntime.jsxs.call(void 0, _material.Stack,{sx:{flexDirection:"row",justifyContent:"flex-end","& > button:first-child":{mr:1}},children:[_jsxruntime.jsxs.call(void 0, _material.Button,{fullWidth:!0,onClick:i,color:"error",children:[_jsxruntime.jsx.call(void 0, _iconsmaterial.RestartAlt,{})," Redefinir Padr\xE3o"]}),_jsxruntime.jsxs.call(void 0, _material.Button,{fullWidth:!0,variant:"contained",onClick:o,children:[_jsxruntime.jsx.call(void 0, _iconsmaterial.Search,{})," Aplicar"]})]})},Tl=t=>{let{title:e,children:r,onApplyFilters:n}=t,{isOpen:o,appliedValues:i}=_providers.useFilterData.call(void 0, ),{closeFilter:s}=_providers.useFilterApi.call(void 0, );return _react.useEffect.call(void 0, ()=>{n&&n(i)},[i]),_jsxruntime.jsx.call(void 0, Yt,{drawerTitle:e,open:o,children:r,onClose:()=>s(),actions:_jsxruntime.jsx.call(void 0, vl,{})})};function bn(t){let{triggerButtonLabel:e,triggerButtonProps:r,triggerButton:n,title:o,children:i,onApplyFilters:s,renderLabel:l,disableds:a}=t,{openFilter:u}=_providers.useFilterApi.call(void 0, ),p=n==="none"?null:n||_jsxruntime.jsx.call(void 0, _material.Button,W(y({variant:"contained",onClick:()=>{u()}},r),{children:e||"Adicionar"}));return _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsxs.call(void 0, _material.Box,{sx:{display:"flex",direction:"row",justifyContent:"flex-end",alignItems:"center",alignContent:"center"},children:[_jsxruntime.jsx.call(void 0, Wt,{renderLabel:l,disableds:a}),p]}),_jsxruntime.jsx.call(void 0, Tl,{onApplyFilters:s,title:o||"",children:i})]})}bn.defaultProps={triggerButtonLabel:"Pesquisar",triggerButtonProps:{variant:"contained",startIcon:_jsxruntime.jsx.call(void 0, _iconsmaterial.Search,{})},title:"Pesquisar"};function Wo(t){let{isFlagged:e,type:r}=t;return e?_jsxruntime.jsx.call(void 0, _iconsmaterial.Circle,{color:r,sx:{fontSize:"10pt"}}):null}function vn(t){let{formValues:e,isSubmitting:r}=_providers.useFormData.call(void 0, ),{closeForm:n}=_providers.useFormApi.call(void 0, ),{onSubmitForm:o,hideCancelButton:i,confirmButtonLabel:s}=t;return _jsxruntime.jsx.call(void 0, je,{confirmLabel:s||"Salvar",onConfirm:()=>o(e),onCancel:i?void 0:()=>n(),isLoadingConfirmButton:r})}function Cn(t){let{view:e,children:r,actions:n,onSubmitForm:o,triggerButton:i,dialogProps:s,triggerButtonLabel:l,confirmButtonLabel:a}=t,{isOpen:u}=_providers.useFormData.call(void 0, ),{closeForm:p,openForm:c}=_providers.useFormApi.call(void 0, ),m=n||_jsxruntime.jsx.call(void 0, vn,{hideCancelButton:e==="plain",confirmButtonLabel:a,onSubmitForm:o||(()=>{throw new Error("Nenhuma a\xE7\xE3o foi definida para ser executada em onSubmitForm")})}),f=i==="none"?null:i||_jsxruntime.jsx.call(void 0, ne,{variant:"contained",onClick:()=>{c()},children:l||"Adicionar"});return e==="dialog"?_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[f,_jsxruntime.jsx.call(void 0, we,W(y({},s),{onClose:()=>{p()},open:!!u,children:r,actions:m}))]}):_jsxruntime.jsxs.call(void 0, _material.Stack,{children:[r,m]})}var Al={view:"dialog",dialogProps:{maxWidth:"md",fullWidth:!0}};Cn.defaultProps=Al;var _styled = require('@emotion/styled'); var _styled2 = _interopRequireDefault(_styled);function Gt(t){let e="https://mui.com/production-error/?code="+t;for(let r=1;r<arguments.length;r+=1)e+="&args[]="+encodeURIComponent(arguments[r]);return"Minified MUI error #"+t+"; visit "+e+" for the full message."}var _react2 = require('@emotion/react');function Mn(t,e){let r=_styled2.default.call(void 0, t,e);return process.env.NODE_ENV!=="production"?(...n)=>{let o=typeof t=="string"?`"${t}"`:"component";return n.length===0?console.error([`MUI: Seems like you called \`styled(${o})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join(`
2
+ Valid keys: `+JSON.stringify(Object.keys(d),null," "));var re=ae(k,R,_,A,F+"."+R,st);if(re)return re}return null}return u(h)}function K(d){switch(typeof d){case"number":case"string":case"undefined":return!0;case"boolean":return!d;case"object":if(Array.isArray(d))return d.every(K);if(d===null||t(d))return!0;var h=o(d);if(h){var S=h.call(d),E;if(h!==d.entries){for(;!(E=S.next()).done;)if(!K(E.value))return!1}else for(;!(E=S.next()).done;){var _=E.value;if(_&&!K(_[1]))return!1}}else return!1;return!0;default:return!1}}function Y(d,h){return d==="symbol"?!0:h?h["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&h instanceof Symbol:!1}function q(d){var h=typeof d;return Array.isArray(d)?"array":d instanceof RegExp?"object":Y(h,d)?"symbol":h}function v(d){if(typeof d=="undefined"||d===null)return""+d;var h=q(d);if(h==="object"){if(d instanceof Date)return"date";if(d instanceof RegExp)return"regexp"}return h}function x(d){var h=v(d);switch(h){case"array":case"object":return"an "+h;case"boolean":case"date":case"regexp":return"a "+h;default:return h}}function O(d){return!d.constructor||!d.constructor.name?i:d.constructor.name}return s.checkPropTypes=si,s.resetWarningCache=si.resetWarningCache,s.PropTypes=s,s}});var pi=le((Oh,fi)=>{"use strict";var Wl=or();function ui(){}function ci(){}ci.resetWarningCache=ui;fi.exports=function(){function t(n,o,i,s,l,a){if(a!==Wl){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}t.isRequired=t;function e(){return t}var r={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:ci,resetWarningCache:ui};return r.PropTypes=r,r}});var ar=le((Fh,An)=>{process.env.NODE_ENV!=="production"?(di=_n(),mi=!0,An.exports=li()(di.isElement,mi)):An.exports=pi()();var di,mi});var bi=le(z=>{"use strict";var Dn=Symbol.for("react.element"),Rn=Symbol.for("react.portal"),lr=Symbol.for("react.fragment"),ur=Symbol.for("react.strict_mode"),cr=Symbol.for("react.profiler"),fr=Symbol.for("react.provider"),pr=Symbol.for("react.context"),Gl=Symbol.for("react.server_context"),dr=Symbol.for("react.forward_ref"),mr=Symbol.for("react.suspense"),hr=Symbol.for("react.suspense_list"),gr=Symbol.for("react.memo"),yr=Symbol.for("react.lazy"),Kl=Symbol.for("react.offscreen"),xi;xi=Symbol.for("react.module.reference");function ve(t){if(typeof t=="object"&&t!==null){var e=t.$$typeof;switch(e){case Dn:switch(t=t.type,t){case lr:case cr:case ur:case mr:case hr:return t;default:switch(t=t&&t.$$typeof,t){case Gl:case pr:case dr:case yr:case gr:case fr:return t;default:return e}}case Rn:return e}}}z.ContextConsumer=pr;z.ContextProvider=fr;z.Element=Dn;z.ForwardRef=dr;z.Fragment=lr;z.Lazy=yr;z.Memo=gr;z.Portal=Rn;z.Profiler=cr;z.StrictMode=ur;z.Suspense=mr;z.SuspenseList=hr;z.isAsyncMode=function(){return!1};z.isConcurrentMode=function(){return!1};z.isContextConsumer=function(t){return ve(t)===pr};z.isContextProvider=function(t){return ve(t)===fr};z.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===Dn};z.isForwardRef=function(t){return ve(t)===dr};z.isFragment=function(t){return ve(t)===lr};z.isLazy=function(t){return ve(t)===yr};z.isMemo=function(t){return ve(t)===gr};z.isPortal=function(t){return ve(t)===Rn};z.isProfiler=function(t){return ve(t)===cr};z.isStrictMode=function(t){return ve(t)===ur};z.isSuspense=function(t){return ve(t)===mr};z.isSuspenseList=function(t){return ve(t)===hr};z.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===lr||t===cr||t===ur||t===mr||t===hr||t===Kl||typeof t=="object"&&t!==null&&(t.$$typeof===yr||t.$$typeof===gr||t.$$typeof===fr||t.$$typeof===pr||t.$$typeof===dr||t.$$typeof===xi||t.getModuleId!==void 0)};z.typeOf=ve});var vi=le(V=>{"use strict";process.env.NODE_ENV!=="production"&&function(){"use strict";var t=Symbol.for("react.element"),e=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),s=Symbol.for("react.context"),l=Symbol.for("react.server_context"),a=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),c=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),f=Symbol.for("react.offscreen"),g=!1,b=!1,w=!1,B=!1,U=!1,ee;ee=Symbol.for("react.module.reference");function P(C){return!!(typeof C=="string"||typeof C=="function"||C===r||C===o||U||C===n||C===u||C===p||B||C===f||g||b||w||typeof C=="object"&&C!==null&&(C.$$typeof===m||C.$$typeof===c||C.$$typeof===i||C.$$typeof===s||C.$$typeof===a||C.$$typeof===ee||C.getModuleId!==void 0))}function M(C){if(typeof C=="object"&&C!==null){var tt=C.$$typeof;switch(tt){case t:var jt=C.type;switch(jt){case r:case o:case n:case u:case p:return jt;default:var vo=jt&&jt.$$typeof;switch(vo){case l:case s:case a:case m:case c:case i:return vo;default:return tt}}case e:return tt}}}var te=s,K=i,Y=t,q=a,v=r,x=m,O=c,d=e,h=o,S=n,E=u,_=p,A=!1,F=!1;function k(C){return A||(A=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function D(C){return F||(F=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function I(C){return M(C)===s}function R(C){return M(C)===i}function ae(C){return typeof C=="object"&&C!==null&&C.$$typeof===t}function re(C){return M(C)===a}function Fe(C){return M(C)===r}function Xr(C){return M(C)===m}function Jr(C){return M(C)===c}function Qr(C){return M(C)===e}function en(C){return M(C)===o}function tn(C){return M(C)===n}function T(C){return M(C)===u}function Tt(C){return M(C)===p}V.ContextConsumer=te,V.ContextProvider=K,V.Element=Y,V.ForwardRef=q,V.Fragment=v,V.Lazy=x,V.Memo=O,V.Portal=d,V.Profiler=h,V.StrictMode=S,V.Suspense=E,V.SuspenseList=_,V.isAsyncMode=k,V.isConcurrentMode=D,V.isContextConsumer=I,V.isContextProvider=R,V.isElement=ae,V.isForwardRef=re,V.isFragment=Fe,V.isLazy=Xr,V.isMemo=Jr,V.isPortal=Qr,V.isProfiler=en,V.isStrictMode=tn,V.isSuspense=T,V.isSuspenseList=Tt,V.isValidElementType=P,V.typeOf=M}()});var Ti=le((zh,$n)=>{"use strict";process.env.NODE_ENV==="production"?$n.exports=bi():$n.exports=vi()});var ns=le((_b,rs)=>{"use strict";function He(t){this._maxSize=t,this.clear()}He.prototype.clear=function(){this._size=0,this._values=Object.create(null)};He.prototype.get=function(t){return this._values[t]};He.prototype.set=function(t,e){return this._size>=this._maxSize&&this.clear(),t in this._values||this._size++,this._values[t]=e};var Yc=/[^.^\]^[]+|(?=\[\]|\.\.)/g,ts=/^\d+$/,Gc=/^\d/,Kc=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,Hc=/^\s*(['"]?)(.*?)(\1)\s*$/,to=512,Ji=new He(to),Qi=new He(to),es=new He(to);rs.exports={Cache:He,split:eo,normalizePath:Qn,setter:function(t){var e=Qn(t);return Qi.get(t)||Qi.set(t,function(n,o){for(var i=0,s=e.length,l=n;i<s-1;){var a=e[i];if(a==="__proto__"||a==="constructor"||a==="prototype")return n;l=l[e[i++]]}l[e[i]]=o})},getter:function(t,e){var r=Qn(t);return es.get(t)||es.set(t,function(o){for(var i=0,s=r.length;i<s;)if(o!=null||!e)o=o[r[i++]];else return;return o})},join:function(t){return t.reduce(function(e,r){return e+(ro(r)||ts.test(r)?"["+r+"]":(e?".":"")+r)},"")},forEach:function(t,e,r){Zc(Array.isArray(t)?t:eo(t),e,r)}};function Qn(t){return Ji.get(t)||Ji.set(t,eo(t).map(function(e){return e.replace(Hc,"$2")}))}function eo(t){return t.match(Yc)||[""]}function Zc(t,e,r){var n=t.length,o,i,s,l;for(i=0;i<n;i++)o=t[i],o&&(Qc(o)&&(o='"'+o+'"'),l=ro(o),s=!l&&/^\d+$/.test(o),e.call(r,o,l,s,i,t))}function ro(t){return typeof t=="string"&&t&&["'",'"'].indexOf(t.charAt(0))!==-1}function Xc(t){return t.match(Gc)&&!t.match(ts)}function Jc(t){return Kc.test(t)}function Qc(t){return!ro(t)&&(Xc(t)||Jc(t))}});var ss=le((Ob,is)=>{var ef=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,Rr=t=>t.match(ef)||[],$r=t=>t[0].toUpperCase()+t.slice(1),no=(t,e)=>Rr(t).join(e).toLowerCase(),os=t=>Rr(t).reduce((e,r)=>`${e}${e?r[0].toUpperCase()+r.slice(1).toLowerCase():r.toLowerCase()}`,""),tf=t=>$r(os(t)),rf=t=>no(t,"_"),nf=t=>no(t,"-"),of=t=>$r(no(t," ")),sf=t=>Rr(t).map($r).join(" ");is.exports={words:Rr,upperFirst:$r,camelCase:os,pascalCase:tf,snakeCase:rf,kebabCase:nf,sentenceCase:of,titleCase:sf}});var ls=le((Fb,oo)=>{oo.exports=function(t){return as(af(t),t)};oo.exports.array=as;function as(t,e){var r=t.length,n=new Array(r),o={},i=r,s=lf(e),l=uf(t);for(e.forEach(function(u){if(!l.has(u[0])||!l.has(u[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});i--;)o[i]||a(t[i],i,new Set);return n;function a(u,p,c){if(c.has(u)){var m;try{m=", node was:"+JSON.stringify(u)}catch(b){m=""}throw new Error("Cyclic dependency"+m)}if(!l.has(u))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(u));if(!o[p]){o[p]=!0;var f=s.get(u)||new Set;if(f=Array.from(f),p=f.length){c.add(u);do{var g=f[--p];a(g,l.get(g),c)}while(p);c.delete(u)}n[--r]=u}}}function af(t){for(var e=new Set,r=0,n=t.length;r<n;r++){var o=t[r];e.add(o[0]),e.add(o[1])}return Array.from(e)}function lf(t){for(var e=new Map,r=0,n=t.length;r<n;r++){var o=t[r];e.has(o[0])||e.set(o[0],new Set),e.has(o[1])||e.set(o[1],new Set),e.get(o[0]).add(o[1])}return e}function uf(t){for(var e=new Map,r=0,n=t.length;r<n;r++)e.set(t[r],r);return e}});var _material = require('@mui/material');var _jsxruntime = require('react/jsx-runtime');var Hs=t=>{let o=t,{isLoading:e,children:r}=o,n=X(o,["isLoading","children"]);return _jsxruntime.jsx.call(void 0, _material.Button,W(y({},n),{disabled:e?!0:n.disabled,children:e?_jsxruntime.jsx.call(void 0, _material.CircularProgress,{color:"secondary",size:22}):r}))},ne= exports.Button =Hs;function Le(t){return _jsxruntime.jsx.call(void 0, _material.Stack,y({direction:"row",justifyContent:"flex-end",alignItems:"center",spacing:1},t))}function Po(t){let n=t,{label:e}=n,r=X(n,["label"]);return _jsxruntime.jsx.call(void 0, _material.FormControl,{component:"fieldset",children:_jsxruntime.jsx.call(void 0, _material.FormControlLabel,{label:e,control:_jsxruntime.jsx.call(void 0, _material.Checkbox,y({},r))})})}var _polished = require('polished');var _styles = require('@mui/material/styles');var sn="#59C3E0",na={palette:{text:{primary:"#262626",secondary:"#808080"},primary:{light:"#83EDFF",main:sn,dark:"#2C96B3"},background:{default:"#F2F2F2",paper:"#FEFEFE"},error:{main:"#F44336",dark:"#BE0D00",light:"#FF6C5F"},warning:{main:"#FFCD38",dark:"#C29000",light:"#FFED58"},success:{main:"#4CAF50",dark:"#187B1C",light:"#7DE081"},grey:{800:"#202024",700:"#262626",600:"#333333",500:"#808080",400:"#BBBBBA",300:"#E0E0E0",200:"#F2F2F2",100:"#FAFAFA"}},typography:{h1:{fontSize:"2rem",fontFamily:"Poppins"},h2:{fontSize:"1.75rem"},h3:{fontSize:"1.5rem"},h4:{fontSize:"1.25rem"},h5:{fontSize:"1rem"},h6:{fontSize:"0.875rem"},button:{fontSize:"0.875rem",fontWeight:"bold",textTransform:"none"},body1:{fontSize:"1rem",color:"#262626"},body2:{fontSize:"0.875rem",color:"#808080"},fontFamily:["sans-serif","Roboto","Poppins"].join(",")},components:{MuiContainer:{defaultProps:{maxWidth:!1},styleOverrides:{root:{paddingTop:"16px",paddingBottom:"16px"}}},MuiButton:{defaultProps:{size:"small",variant:"outlined"},styleOverrides:{root:{textTransform:"none",fontWeight:"bold"},contained:{color:"rgba(255,255,255,0.85)",boxShadow:"none"},outlined:{background:"white",":disabled":{background:"none",boxShadow:"none",borderColor:"#E0E0E0"}}}},MuiFormControl:{defaultProps:{size:"small"}},MuiCheckbox:{defaultProps:{size:"small"}},MuiTextField:{defaultProps:{size:"small",fullWidth:!0},styleOverrides:{root:{"& label":{color:"#808080"}}}},MuiInputLabel:{styleOverrides:{root:{fontSize:"0.875rem"}}},MuiSvgIcon:{defaultProps:{fontSize:"small",color:"inherit"}},MuiIconButton:{defaultProps:{size:"small"},styleOverrides:{root:{}}},MuiPopover:{styleOverrides:{paper:{borderRadius:"12px"}}},MuiMenuItem:{styleOverrides:{root:{"&.Mui-selected":{"& .MuiIcon-root":{color:sn},"& .MuiTypography-root":{color:sn}},":hover":{borderRadius:"6px",background:"rgba(89, 195, 224, 15%)"}}}},MuiTableCell:{styleOverrides:{root:{padding:0,"&.selected":{backgroundColor:"#199"}},head:{backgroundColor:"#FAFAFA",border:"1px solid #D0D0D0",color:"#808080","& span":{color:"#808080"},"& div":{marginLeft:"4px"}},body:{backgroundColor:"#ffffff00",border:"1px solid #D0D0D0",borderTop:"none",borderBottom:"none","& > div":{fontSize:"9pt",paddingLeft:"6px",paddingRight:"6px",paddingTop:"2px",paddingBottom:"2px"}}}},MuiTableRow:{styleOverrides:{root:{backgroundColor:"#FFFFFF",height:"30px","&.MuiTableRow-hover":{"&:hover":{backgroundColor:"#ffffde"}}},head:{borderRadius:"4px","& div":{fontWeight:"600",fontSize:"13px",padding:"2px"}}}},MUIDataTableHeadCell:{styleOverrides:{toolButton:{height:"48px"}}},MUIDataTableBodyRow:{styleOverrides:{root:{"&:hover":{backgroundColor:"#333"},"&:nth-of-type(even)":{backgroundColor:"#F5F5F5"},"&:last-child":{borderBottom:"1px solid #D0D0D0"}}}},MuiTableHead:{styleOverrides:{root:{height:"48px"}}},MuiDrawer:{styleOverrides:{paper:{}}},MuiDialog:{styleOverrides:{paper:{borderRadius:"6px"}}},MuiDialogContent:{styleOverrides:{root:{}}}}},oa=_styles.createTheme.call(void 0, na),ia=_styles.responsiveFontSizes.call(void 0, oa),L= exports.theme =ia;var aa={"primary-light":L.palette.primary.light,primary:L.palette.primary.main,"primary-dark":L.palette.primary.dark,"text-secondary":L.palette.text.secondary,"text-primary":L.palette.text.primary,"background-paper":L.palette.background.paper,background:L.palette.background.default,"error-light":L.palette.error.light,error:L.palette.error.main,"erro-drark":L.palette.error.dark,"warning-light":L.palette.warning.light,warning:L.palette.warning.main,"warning-dark":L.palette.warning.dark,"success-light":L.palette.success.light,success:L.palette.success.main,"success-dark":L.palette.success.dark,"grey-100":L.palette.grey[100],"grey-200":L.palette.grey[200],"grey-300":L.palette.grey[300],"grey-400":L.palette.grey[400],"grey-500":L.palette.grey[500],"grey-600":L.palette.grey[600],"grey-700":L.palette.grey[700],"grey-800":L.palette.grey[800]};function wo(){return _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment,{children:Object.entries(aa).map(([t,e])=>_jsxruntime.jsx.call(void 0, _material.Box,{sx:{backgroundColor:e,padding:"2rem"},children:_jsxruntime.jsxs.call(void 0, _material.Box,{sx:{display:"flex",justifyContent:"space-between",fontFamily:L.typography.fontFamily,color:_polished.getContrast.call(void 0, e,"#FFF")<3.5?"#000":"#FFF"},children:[_jsxruntime.jsx.call(void 0, "strong",{children:t}),_jsxruntime.jsx.call(void 0, "span",{children:e})]})},t))})}var _hooks = require('@data-c/hooks');var _react = require('react'); var Ai = _interopRequireWildcard(_react); var ft = _interopRequireWildcard(_react);function Oo(t){if(!t)return 0;let e=String(t);return e=e.replace(/\./g,"").replace(/,/g,"."),parseFloat(e)}var an=null;function ln(t){let s=t,{value:e,onChange:r}=s,n=X(s,["value","onChange"]);an=null;let o=_react.useCallback.call(void 0, l=>{let a=l.target.value||"0.00";_hooks.isValidNumber.call(void 0, a)&&(an==="Backspace"?a=(Oo(a)/10).toFixed(2):a=(Oo(a)*10).toFixed(2),r&&(l.target.value=a,r(l,a)))},[]),i=_react.useCallback.call(void 0, l=>{l.target.selectionStart===l.target.selectionEnd&&(l.target.selectionStart=l.target.value.length,l.target.selectionEnd=l.target.value.length)},[]);return _jsxruntime.jsx.call(void 0, _material.TextField,y({onKeyDown:l=>{an=l.key},onSelect:l=>{i(l)},onChange:o,value:_hooks.formatCurrency.call(void 0, String(e),2)||"",inputProps:{style:{textAlign:"right"}}},n))}ln.defaultProps={value:0};var _iconsmaterial = require('@mui/icons-material');var Fo={content:{cancel:"error",confirm:"primary"},info:{cancel:"error",confirm:"info"},success:{cancel:"error",confirm:"success"},warning:{cancel:"primary",confirm:"warning"},error:{cancel:"primary",confirm:"error"}};function je(t){let{cancelLabel:e,confirmLabel:r,type:n,onCancel:o,onConfirm:i,isLoadingConfirmButton:s}=t;return _jsxruntime.jsxs.call(void 0, Le,{children:[o&&_jsxruntime.jsx.call(void 0, ne,{onClick:()=>{o()},color:Fo[n||"content"].cancel,children:e}),_jsxruntime.jsx.call(void 0, ne,{onClick:()=>{i&&i()},color:Fo[n||"content"].confirm,variant:"contained",isLoading:s,children:r})]})}var ma={cancelLabel:"Cancelar",confirmLabel:"Ok",type:"content",isLoadingConfirmButton:!1};je.defaultProps=ma;function we(t){let{title:e,children:r,actions:n,onClose:o,onConfirm:i,type:s}=t,l=_material.useTheme.call(void 0, ),a=n==="none"?null:n||_jsxruntime.jsx.call(void 0, je,{onCancel:()=>{o&&o({},"backdropClick")},onConfirm:()=>{i&&i()},type:s}),u=_react.useMemo.call(void 0, ()=>s==="error"?"error_outlined":s==="warning"?"error_amber":s==="info"||s==="success"?"info":!1,[s]),p=_react.useMemo.call(void 0, ()=>s!=="content"?s:"primary",[s]);return _jsxruntime.jsxs.call(void 0, _material.Dialog,W(y({},t),{children:[_jsxruntime.jsx.call(void 0, _material.DialogTitle,{children:_jsxruntime.jsxs.call(void 0, _material.Stack,{direction:"row",justifyContent:"space-between",alignItems:"center",spacing:2,children:[_jsxruntime.jsx.call(void 0, _material.Typography,{sx:{color:c=>{if(s!=="content")return c.palette[p||"primary"].main}},fontSize:"17pt",variant:"h3",children:_jsxruntime.jsxs.call(void 0, _material.Stack,{direction:"row",justifyContent:"flex-start",alignItems:"center",children:[u&&_jsxruntime.jsx.call(void 0, _material.Icon,{sx:{mr:1},fontSize:"medium",children:u}),e]})}),o&&_jsxruntime.jsx.call(void 0, _material.IconButton,{onClick:()=>o({},"escapeKeyDown"),sx:{mr:-1,color:l.palette.text.primary},children:_jsxruntime.jsx.call(void 0, _iconsmaterial.Close,{color:"inherit"})})]})}),_jsxruntime.jsx.call(void 0, _material.DialogContent,{children:_jsxruntime.jsx.call(void 0, _material.Box,{sx:{mt:1,color:c=>c.palette.grey[500],fontFamily:c=>c.typography.fontFamily},children:r})}),_jsxruntime.jsx.call(void 0, _material.DialogActions,{sx:{padding:2},children:a})]}))}we.defaultProps={fullWidth:!0,type:"content"};var _providers = require('@data-c/providers');function cn(t){let{formValues:e,isSubmitting:r}=_providers.useFormData.call(void 0, ),{closeConfirm:n}=_providers.useFormApi.call(void 0, ),{onDelete:o,hideCancelButton:i,type:s}=t;return _jsxruntime.jsx.call(void 0, je,{type:s,confirmLabel:"Excluir",onConfirm:()=>o(e),onCancel:i?void 0:()=>n(),isLoadingConfirmButton:r})}function fn(t){let{isOpenConfirm:e}=_providers.useFormData.call(void 0, ),{closeConfirm:r}=_providers.useFormApi.call(void 0, ),{type:n,title:o,children:i,actions:s,onDelete:l}=t;return _jsxruntime.jsx.call(void 0, we,{type:n,open:e,title:o,actions:s||_jsxruntime.jsx.call(void 0, cn,{type:n,onDelete:l||(()=>{throw new Error("Nenhuma a\xE7\xE3o foi definida para ser executada em onDelete")})}),onClose:()=>{r()},maxWidth:"xs",children:i})}var Aa={open:!1,title:"Excluir Registro Permanentemente?",children:"Voc\xEA n\xE3o poder\xE1 recuperar este registro ap\xF3s exclu\xED-lo!",type:"error"};fn.defaultProps=Aa;var _muidatatables = require('mui-datatables'); var _muidatatables2 = _interopRequireDefault(_muidatatables);var ja=t=>{let{count:e,rowsPerPage:r,page:n,changePage:o,changeRowsPerPage:i,rowsPerPageOptions:s}=t,l=_react.useMemo.call(void 0, ()=>Math.max(0,Math.ceil(e/r)),[e,r]);return _jsxruntime.jsx.call(void 0, _material.TableFooter,{children:_jsxruntime.jsx.call(void 0, _material.TableRow,{children:_jsxruntime.jsxs.call(void 0, _material.TableCell,{colSpan:1e3,sx:{display:"flex",justifyContent:"flex-end",padding:"12px 12px 12px 12px"},children:[_jsxruntime.jsx.call(void 0, _material.TextField,{sx:{width:"128px",fontSize:"8pt"},label:"Tamanho da p\xE1gina",size:"small",value:r,select:!0,onChange:a=>{i(a.target.value)},children:s.map(a=>_jsxruntime.jsx.call(void 0, _material.MenuItem,{value:a,children:a},a))}),_jsxruntime.jsx.call(void 0, _material.Pagination,{variant:"outlined",shape:"rounded",count:l,showFirstButton:!0,showLastButton:!0,onChange:(a,u)=>{o(u)},page:n,color:"primary"})]})})})},Ro=ja;var Wa={body:{noMatch:"Nenhum registro encontrado",toolTip:"Ordenar"},pagination:{next:"Pr\xF3ximo",previous:"Anterior",rowsPerPage:"Linhas por p\xE1g:",displayRows:"de"},toolbar:{search:"Procurar",downloadCsv:"Download CSV",print:"Imprimir",viewColumns:"Colunas",filterTable:"Procurar na Tabela"},filter:{all:"Todos",title:"Filtros",reset:"Limpar"},viewColumns:{title:"Visualizar Colunas",titleAria:"Mostrar/Ocultar Colunas da Tabela"},selectedRows:{text:"Linhas Selecionadas",delete:"Remover",deleteAria:"Remover Linhas Selecionadas"}},Vt={filterType:"textField",selectableRows:"none",elevation:0,responsive:"standard",print:!1,download:!1,filter:!1,search:!1,sort:!1,viewColumns:!1,textLabels:Wa,serverSide:!0,fixedHeader:!1,rowsPerPageOptions:[15,50,100],rowsPerPage:15},Ya=t=>{let g=t,{error:e,tableTitle:r,isLoading:n,isFetching:o,data:i,columns:s,options:l,pagination:a,changePage:u,changePageSize:p,changeSort:c}=g,m=X(g,["error","tableTitle","isLoading","isFetching","data","columns","options","pagination","changePage","changePageSize","changeSort"]),f=l||{};return f&&(u&&(f.onChangePage=u),p&&(f.onChangeRowsPerPage=p),c&&(f.onColumnSortChange=c),f.customFooter=(b,w,B,U,ee,P)=>!a||n?_jsxruntime.jsx.call(void 0, _jsxruntime.Fragment,{}):_jsxruntime.jsx.call(void 0, Ro,{count:a.totalRecords,page:a.page,rowsPerPage:a.pageSize,rowsPerPageOptions:(f==null?void 0:f.rowsPerPageOptions)||(Vt==null?void 0:Vt.rowsPerPageOptions),changeRowsPerPage:f==null?void 0:f.onChangeRowsPerPage,changePage:f==null?void 0:f.onChangePage,textLabels:P})),_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[o&&_jsxruntime.jsx.call(void 0, _material.LinearProgress,{}),e&&_jsxruntime.jsx.call(void 0, _material.Stack,{sx:{width:"100%"},spacing:2,children:_jsxruntime.jsx.call(void 0, _material.Alert,{severity:"error",children:e})}),_jsxruntime.jsx.call(void 0, _muidatatables2.default,y({title:r,data:i,columns:s,options:y(y({},Vt),f)},m))]})},Ga= exports.DataTable =Ya;var tl=_styles.styled.call(void 0, r=>{var n=r,{className:t}=n,e=X(n,["className"]);return _jsxruntime.jsx.call(void 0, _material.Tooltip,W(y({},e),{classes:{popper:t}}))})(({theme:t})=>({[`& .${_material.tooltipClasses.tooltip}`]:{backgroundColor:"#f5f5f9",color:"rgba(0, 0, 0, 0.87)",maxWidth:320,minWidth:180,fontSize:t.typography.pxToRem(12),border:"1px solid #dadde9"}})),rl={info:"Informa\xE7\xE3o",warning:"Aten\xE7\xE3o"},nl=t=>{let{title:e,type:r}=t;return _jsxruntime.jsxs.call(void 0, _material.Box,{sx:{mt:.5},children:[_jsxruntime.jsxs.call(void 0, _material.Box,{sx:{display:"flex",flexDirection:"row",alignItems:"center",alignContent:"center"},children:[_jsxruntime.jsx.call(void 0, _material.Icon,{color:r,fontSize:"small",children:r})," ",_jsxruntime.jsx.call(void 0, _material.Typography,{variant:"subtitle2",sx:{ml:.5},children:rl[r]})]}),_jsxruntime.jsx.call(void 0, _material.Divider,{sx:{mt:.5}}),_jsxruntime.jsx.call(void 0, _material.Box,{sx:{mt:1},children:e})]})},Io=t=>{let i=t,{type:e,children:r,title:n}=i,o=X(i,["type","children","title"]);return _jsxruntime.jsx.call(void 0, tl,W(y({arrow:!0,title:_jsxruntime.jsx.call(void 0, nl,{title:n||"",type:e}),enterDelay:300},o),{children:r}))};Io.defaultProps={type:"info"};var nt=Io;var Pm=()=>({style:{width:"80px",textAlign:"center"}}),Em= exports.CurrencyCellStyle =()=>({style:{width:"128px",textAlign:"right"}});function dn(t){let{onClick:e,value:r,extraOptions:n,displayUpdateButton:o,displayDeleteButton:i,displayTransporterButton:s,disableTooltip:l,disabled:a,disabledUpdateButton:u,disabledDeleteButton:p,disabledTransporterButton:c}=t;return _jsxruntime.jsxs.call(void 0, _material.Box,{children:[n&&n.map(({id:m,icon:f,iconButtonProps:g,tooltip:b,visible:w,disabled:B})=>w===null||!!w&&_jsxruntime.jsxs.call(void 0, _material.IconButton,W(y({onClick:()=>e(m,r),size:"small",disabled:B},g),{children:[b&&_jsxruntime.jsx.call(void 0, nt,{type:b.type,title:b.content,children:_jsxruntime.jsx.call(void 0, _material.Icon,{fontSize:"small",children:f})}),!b&&_jsxruntime.jsx.call(void 0, _material.Icon,{fontSize:"small",children:f})]}),m)),s&&_jsxruntime.jsxs.call(void 0, _material.IconButton,{size:"small",onClick:()=>e("transport",r),color:"primary",disabled:a||c,children:[l&&_jsxruntime.jsx.call(void 0, _iconsmaterial.GetApp,{fontSize:"small"}),!l&&_jsxruntime.jsx.call(void 0, nt,{type:"warning",title:_jsxruntime.jsx.call(void 0, _material.Box,{children:"Clique para transportar este registro."}),children:_jsxruntime.jsx.call(void 0, _iconsmaterial.GetApp,{fontSize:"small"})})]}),o&&_jsxruntime.jsxs.call(void 0, _material.IconButton,{size:"small",color:"primary",onClick:()=>e("edit",r),disabled:a||u,children:[l&&_jsxruntime.jsx.call(void 0, _iconsmaterial.Edit,{fontSize:"small"}),!l&&_jsxruntime.jsx.call(void 0, nt,{type:"info",title:_jsxruntime.jsx.call(void 0, _material.Box,{children:"Clique para editar este registro."}),children:_jsxruntime.jsx.call(void 0, _iconsmaterial.Edit,{fontSize:"small"})})]}),i&&_jsxruntime.jsxs.call(void 0, _material.IconButton,{size:"small",onClick:()=>e("delete",r),color:"primary",disabled:a||p,children:[l&&_jsxruntime.jsx.call(void 0, _iconsmaterial.Delete,{fontSize:"small"}),!l&&_jsxruntime.jsx.call(void 0, nt,{type:"warning",title:_jsxruntime.jsx.call(void 0, _material.Box,{children:"Clique para excluir este registro."}),children:_jsxruntime.jsx.call(void 0, _iconsmaterial.Delete,{fontSize:"small"})})]})]})}dn.defaultProps={displayUpdateButton:!0,displayDeleteButton:!0,displayTransporterButton:!1,disableTooltip:!0};function Wt(t){let{renderLabel:e,disableds:r}=t,{deleteFilterValue:n,deleteAllFilterValues:o}=_providers.useFilterApi.call(void 0, ),{filterValues:i,appliedValues:s}=_providers.useFilterData.call(void 0, ),l=_react.useMemo.call(void 0, ()=>{if(Object.keys(s||{}).length>0){let p=!1,c=Object.keys(s||{});for(let m=0;m<c.length;m++){let f=s[c[m]];if(Array.isArray(f)&&f.length>0){p=!0;break}else if(!Array.isArray(f)&&f){p=!0;break}}return p}return!1},[s]),a=_react.useCallback.call(void 0, u=>e?e(i[u].label,s[u]):`${i[u].label} - ${s&&s[u]}`,[e,i,s]);return _jsxruntime.jsxs.call(void 0, _material.Box,{sx:{display:"flex",flexDirection:"row",justifyContent:"space-between"},children:[_jsxruntime.jsx.call(void 0, _material.Box,{sx:{display:"flex",flexWrap:"wrap",alignItems:"center",justifyContent:"flex-end",gap:1},children:l&&Object.keys(s||{}).map(u=>{let p=Array.isArray(r)&&r.includes(u),c;if(p||(c=()=>{n&&n(u)}),Array.isArray(s[u])&&s[u].length>0)return _jsxruntime.jsx.call(void 0, _material.Chip,{size:"small",label:a(u),onDelete:c,variant:"outlined"},u);if(!Array.isArray(s[u])&&s[u])return _jsxruntime.jsx.call(void 0, _material.Chip,{size:"small",label:a(u),onDelete:c,variant:"outlined"},u)})}),l&&_jsxruntime.jsx.call(void 0, _material.Box,{sx:{mr:.5,ml:.5,display:"flex",alignContent:"center",alignItems:"center"},children:_jsxruntime.jsx.call(void 0, _material.IconButton,{onClick:()=>{o&&o()},children:_jsxruntime.jsx.call(void 0, _iconsmaterial.RestartAlt,{fontSize:"small",color:"error"})})})]})}function Yt(t){let s=t,{drawerTitle:e,actions:r,onClose:n,children:o}=s,i=X(s,["drawerTitle","actions","onClose","children"]);return _jsxruntime.jsx.call(void 0, _material.Drawer,W(y({PaperProps:{style:{borderRadius:"12px 0 0 12px"}},onClose:n},i),{children:_jsxruntime.jsxs.call(void 0, _material.Stack,{sx:{width:"360px",height:"100%",justifyContent:"space-between",backgroundColor:l=>l.palette.background.paper},children:[_jsxruntime.jsxs.call(void 0, _material.Stack,{children:[_jsxruntime.jsxs.call(void 0, _material.Box,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",alignContent:"center",height:"48px",borderBottom:l=>`solid 1px ${l.palette.grey[300]}`},children:[_jsxruntime.jsx.call(void 0, _material.Typography,{component:"h1",variant:"h5",sx:{pl:l=>l.spacing(2)},children:e}),n&&_jsxruntime.jsx.call(void 0, _material.IconButton,{onClick:n,children:_jsxruntime.jsx.call(void 0, _iconsmaterial.Cancel,{color:"error"})})]}),_jsxruntime.jsx.call(void 0, _material.Box,{sx:{padding:l=>l.spacing(2)},children:o})]}),r&&_jsxruntime.jsx.call(void 0, _material.Box,{sx:{pt:l=>l.spacing(1),pb:l=>l.spacing(1),pl:l=>l.spacing(2),pr:l=>l.spacing(2),borderTop:l=>`solid 1px ${l.palette.grey[300]}`},children:r})]})}))}Yt.defaultProps={anchor:"right"};var vl=()=>{let{applyFilterValues:t,closeFilter:e,deleteAllFilterValues:r}=_providers.useFilterApi.call(void 0, );function n(){e()}function o(){t(),e()}function i(){r&&(r(),e())}return _jsxruntime.jsxs.call(void 0, _material.Stack,{sx:{flexDirection:"row",justifyContent:"flex-end","& > button:first-child":{mr:1}},children:[_jsxruntime.jsxs.call(void 0, _material.Button,{fullWidth:!0,onClick:i,color:"error",children:[_jsxruntime.jsx.call(void 0, _iconsmaterial.RestartAlt,{})," Redefinir Padr\xE3o"]}),_jsxruntime.jsxs.call(void 0, _material.Button,{fullWidth:!0,variant:"contained",onClick:o,children:[_jsxruntime.jsx.call(void 0, _iconsmaterial.Search,{})," Aplicar"]})]})},Tl=t=>{let{title:e,children:r,onApplyFilters:n}=t,{isOpen:o,appliedValues:i}=_providers.useFilterData.call(void 0, ),{closeFilter:s}=_providers.useFilterApi.call(void 0, );return _react.useEffect.call(void 0, ()=>{n&&n(i)},[i]),_jsxruntime.jsx.call(void 0, Yt,{drawerTitle:e,open:o,children:r,onClose:()=>s(),actions:_jsxruntime.jsx.call(void 0, vl,{})})};function bn(t){let{triggerButtonLabel:e,triggerButtonProps:r,triggerButton:n,title:o,children:i,onApplyFilters:s,renderLabel:l,disableds:a,disableFilterControl:u}=t,{openFilter:p}=_providers.useFilterApi.call(void 0, ),c=n==="none"?null:n||_jsxruntime.jsx.call(void 0, _material.Button,W(y({variant:"contained",onClick:()=>{p()}},r),{children:e||"Adicionar"}));return _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[u&&c,!u&&_jsxruntime.jsxs.call(void 0, _material.Box,{sx:{display:"flex",direction:"row",justifyContent:"flex-end",alignItems:"center",alignContent:"center"},children:[_jsxruntime.jsx.call(void 0, Wt,{renderLabel:l,disableds:a}),c]}),_jsxruntime.jsx.call(void 0, Tl,{onApplyFilters:s,title:o||"",children:i})]})}bn.defaultProps={triggerButtonLabel:"Pesquisar",triggerButtonProps:{variant:"contained",startIcon:_jsxruntime.jsx.call(void 0, _iconsmaterial.Search,{})},title:"Pesquisar"};function Wo(t){let{isFlagged:e,type:r}=t;return e?_jsxruntime.jsx.call(void 0, _iconsmaterial.Circle,{color:r,sx:{fontSize:"10pt"}}):null}function vn(t){let{formValues:e,isSubmitting:r}=_providers.useFormData.call(void 0, ),{closeForm:n}=_providers.useFormApi.call(void 0, ),{onSubmitForm:o,hideCancelButton:i,confirmButtonLabel:s}=t;return _jsxruntime.jsx.call(void 0, je,{confirmLabel:s||"Salvar",onConfirm:()=>o(e),onCancel:i?void 0:()=>n(),isLoadingConfirmButton:r})}function Cn(t){let{view:e,children:r,actions:n,onSubmitForm:o,triggerButton:i,dialogProps:s,triggerButtonLabel:l,confirmButtonLabel:a}=t,{isOpen:u}=_providers.useFormData.call(void 0, ),{closeForm:p,openForm:c}=_providers.useFormApi.call(void 0, ),m=n||_jsxruntime.jsx.call(void 0, vn,{hideCancelButton:e==="plain",confirmButtonLabel:a,onSubmitForm:o||(()=>{throw new Error("Nenhuma a\xE7\xE3o foi definida para ser executada em onSubmitForm")})}),f=i==="none"?null:i||_jsxruntime.jsx.call(void 0, ne,{variant:"contained",onClick:()=>{c()},children:l||"Adicionar"});return e==="dialog"?_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[f,_jsxruntime.jsx.call(void 0, we,W(y({},s),{onClose:()=>{p()},open:!!u,children:r,actions:m}))]}):_jsxruntime.jsxs.call(void 0, _material.Stack,{children:[r,m]})}var Al={view:"dialog",dialogProps:{maxWidth:"md",fullWidth:!0}};Cn.defaultProps=Al;var _styled = require('@emotion/styled'); var _styled2 = _interopRequireDefault(_styled);function Gt(t){let e="https://mui.com/production-error/?code="+t;for(let r=1;r<arguments.length;r+=1)e+="&args[]="+encodeURIComponent(arguments[r]);return"Minified MUI error #"+t+"; visit "+e+" for the full message."}var _react2 = require('@emotion/react');function Mn(t,e){let r=_styled2.default.call(void 0, t,e);return process.env.NODE_ENV!=="production"?(...n)=>{let o=typeof t=="string"?`"${t}"`:"component";return n.length===0?console.error([`MUI: Seems like you called \`styled(${o})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join(`
3
3
  `)):n.some(i=>i===void 0)&&console.error(`MUI: the styled(${o})(...args) API requires all its args to be defined.`),r(...n)}:r}var hi=(t,e)=>{Array.isArray(t.__emotion_styles)&&(t.__emotion_styles=e(t.__emotion_styles))};function $(){return $=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},$.apply(this,arguments)}function ge(t,e){if(t==null)return{};var r={},n=Object.keys(t),o,i;for(i=0;i<n.length;i++)o=n[i],!(e.indexOf(o)>=0)&&(r[o]=t[o]);return r}function be(t){if(typeof t!="object"||t===null)return!1;let e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function yi(t){if(!be(t))return t;let e={};return Object.keys(t).forEach(r=>{e[r]=yi(t[r])}),e}function de(t,e,r={clone:!0}){let n=r.clone?$({},t):t;return be(t)&&be(e)&&Object.keys(e).forEach(o=>{o!=="__proto__"&&(be(e[o])&&o in t&&be(t[o])?n[o]=de(t[o],e[o],r):r.clone?n[o]=be(e[o])?yi(e[o]):e[o]:n[o]=e[o])}),n}var xr=qe(Ti()),Hl=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function Zl(t){let e=`${t}`.match(Hl);return e&&e[1]||""}function Si(t,e=""){return t.displayName||t.name||Zl(t)||e}function Ci(t,e,r){let n=Si(e);return t.displayName||(n!==""?`${r}(${n})`:r)}function br(t){if(t!=null){if(typeof t=="string")return t;if(typeof t=="function")return Si(t,"Component");if(typeof t=="object")switch(t.$$typeof){case xr.ForwardRef:return Ci(t,t.render,"ForwardRef");case xr.Memo:return Ci(t,t.type,"memo");default:return}}}function ye(t){if(typeof t!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":Gt(7));return t.charAt(0).toUpperCase()+t.slice(1)}function Et(t,e){let r=$({},e);return Object.keys(t).forEach(n=>{if(n.toString().match(/^(components|slots)$/))r[n]=$({},t[n],r[n]);else if(n.toString().match(/^(componentsProps|slotProps)$/)){let o=t[n]||{},i=e[n];r[n]={},!i||!Object.keys(i)?r[n]=o:!o||!Object.keys(o)?r[n]=i:(r[n]=$({},i),Object.keys(o).forEach(s=>{r[n][s]=Et(o[s],i[s])}))}else r[n]===void 0&&(r[n]=t[n])}),r}function wt(t,e,r=void 0){let n={};return Object.keys(t).forEach(o=>{n[o]=t[o].reduce((i,s)=>{if(s){let l=e(s);l!==""&&i.push(l),r&&r[s]&&i.push(r[s])}return i},[]).join(" ")}),n}var Pi=t=>t,Xl=()=>{let t=Pi;return{configure(e){t=e},generate(e){return t(e)},reset(){t=Pi}}},Jl=Xl(),Bn=Jl;var Ql={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function _t(t,e,r="Mui"){let n=Ql[e];return n?`${r}-${n}`:`${Bn.generate(t)}-${e}`}var eu=["values","unit","step"];var tu=t=>{let e=Object.keys(t).map(r=>({key:r,val:t[r]}))||[];return e.sort((r,n)=>r.val-n.val),e.reduce((r,n)=>$({},r,{[n.key]:n.val}),{})};function In(t){let{values:e={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:n=5}=t,o=ge(t,eu),i=tu(e),s=Object.keys(i);function l(m){return`@media (min-width:${typeof e[m]=="number"?e[m]:m}${r})`}function a(m){return`@media (max-width:${(typeof e[m]=="number"?e[m]:m)-n/100}${r})`}function u(m,f){let g=s.indexOf(f);return`@media (min-width:${typeof e[m]=="number"?e[m]:m}${r}) and (max-width:${(g!==-1&&typeof e[s[g]]=="number"?e[s[g]]:f)-n/100}${r})`}function p(m){return s.indexOf(m)+1<s.length?u(m,s[s.indexOf(m)+1]):l(m)}function c(m){let f=s.indexOf(m);return f===0?l(s[1]):f===s.length-1?a(s[f]):u(m,s[s.indexOf(m)+1]).replace("@media","@media not all and")}return $({keys:s,values:i,up:l,down:a,between:u,only:p,not:c,unit:r},o)}var ru={borderRadius:4},Ei=ru;var lt=qe(ar()),nu=process.env.NODE_ENV!=="production"?lt.default.oneOfType([lt.default.number,lt.default.string,lt.default.object,lt.default.array]):{},Te=nu;function ou(t,e){return e?de(t,e,{clone:!1}):t}var ze=ou;var vr={xs:0,sm:600,md:900,lg:1200,xl:1536},wi={keys:["xs","sm","md","lg","xl"],up:t=>`@media (min-width:${vr[t]}px)`};function ie(t,e,r){let n=t.theme||{};if(Array.isArray(e)){let i=n.breakpoints||wi;return e.reduce((s,l,a)=>(s[i.up(i.keys[a])]=r(e[a]),s),{})}if(typeof e=="object"){let i=n.breakpoints||wi;return Object.keys(e).reduce((s,l)=>{if(Object.keys(i.values||vr).indexOf(l)!==-1){let a=i.up(l);s[a]=r(e[l],l)}else{let a=l;s[a]=e[a]}return s},{})}return r(e)}function Ln(t={}){var e;return((e=t.keys)==null?void 0:e.reduce((n,o)=>{let i=t.up(o);return n[i]={},n},{}))||{}}function jn(t,e){return t.reduce((r,n)=>{let o=r[n];return(!o||Object.keys(o).length===0)&&delete r[n],r},e)}function _i(t,...e){let r=Ln(t),n=[r,...e].reduce((o,i)=>de(o,i),{});return jn(Object.keys(r),n)}function iu(t,e){if(typeof t!="object")return{};let r={},n=Object.keys(e);return Array.isArray(t)?n.forEach((o,i)=>{i<t.length&&(r[o]=!0)}):n.forEach(o=>{t[o]!=null&&(r[o]=!0)}),r}function Tr({values:t,breakpoints:e,base:r}){let n=r||iu(t,e),o=Object.keys(n);if(o.length===0)return t;let i;return o.reduce((s,l,a)=>(Array.isArray(t)?(s[l]=t[a]!=null?t[a]:t[i],i=a):typeof t=="object"?(s[l]=t[l]!=null?t[l]:t[i],i=l):s[l]=t,s),{})}function ut(t,e,r=!0){if(!e||typeof e!="string")return null;if(t&&t.vars&&r){let n=`vars.${e}`.split(".").reduce((o,i)=>o&&o[i]?o[i]:null,t);if(n!=null)return n}return e.split(".").reduce((n,o)=>n&&n[o]!=null?n[o]:null,t)}function Ot(t,e,r,n=r){let o;return typeof t=="function"?o=t(r):Array.isArray(t)?o=t[r]||n:o=ut(t,r)||n,e&&(o=e(o,n,t)),o}function su(t){let{prop:e,cssProperty:r=t.prop,themeKey:n,transform:o}=t,i=s=>{if(s[e]==null)return null;let l=s[e],a=s.theme,u=ut(a,n)||{};return ie(s,l,c=>{let m=Ot(u,o,c);return c===m&&typeof c=="string"&&(m=Ot(u,o,`${e}${c==="default"?"":ye(c)}`,c)),r===!1?m:{[r]:m}})};return i.propTypes=process.env.NODE_ENV!=="production"?{[e]:Te}:{},i.filterProps=[e],i}var H=su;function Nn(t){let e={};return r=>(e[r]===void 0&&(e[r]=t(r)),e[r])}var au={m:"margin",p:"padding"},lu={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Oi={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},uu=Nn(t=>{if(t.length>2)if(Oi[t])t=Oi[t];else return[t];let[e,r]=t.split(""),n=au[e],o=lu[r]||"";return Array.isArray(o)?o.map(i=>n+i):[n+o]}),Cr=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Sr=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],zn=[...Cr,...Sr];function Ye(t,e,r,n){var o;let i=(o=ut(t,e,!1))!=null?o:r;return typeof i=="number"?s=>typeof s=="string"?s:(process.env.NODE_ENV!=="production"&&typeof s!="number"&&console.error(`MUI: Expected ${n} argument to be a number or a string, got ${s}.`),i*s):Array.isArray(i)?s=>typeof s=="string"?s:(process.env.NODE_ENV!=="production"&&(Number.isInteger(s)?s>i.length-1&&console.error([`MUI: The value provided (${s}) overflows.`,`The supported values are: ${JSON.stringify(i)}.`,`${s} > ${i.length-1}, you need to add the missing values.`].join(`
4
4
  `)):console.error([`MUI: The \`theme.${e}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${e}\` as a number.`].join(`
5
5
  `))),i[s]):typeof i=="function"?i:(process.env.NODE_ENV!=="production"&&console.error([`MUI: The \`theme.${e}\` value (${i}) is invalid.`,"It should be a number, an array or a function."].join(`
6
- `)),()=>{})}function Ft(t){return Ye(t,"spacing",8,"spacing")}function ke(t,e){if(typeof e=="string"||e==null)return e;let r=Math.abs(e),n=t(r);return e>=0?n:typeof n=="number"?-n:`-${n}`}function cu(t,e){return r=>t.reduce((n,o)=>(n[o]=ke(e,r),n),{})}function fu(t,e,r,n){if(e.indexOf(r)===-1)return null;let o=uu(r),i=cu(o,n),s=t[r];return ie(t,s,i)}function Vn(t,e){let r=Ft(t.theme);return Object.keys(t).map(n=>fu(t,e,n,r)).reduce(ze,{})}function J(t){return Vn(t,Cr)}J.propTypes=process.env.NODE_ENV!=="production"?Cr.reduce((t,e)=>(t[e]=Te,t),{}):{};J.filterProps=Cr;function Q(t){return Vn(t,Sr)}Q.propTypes=process.env.NODE_ENV!=="production"?Sr.reduce((t,e)=>(t[e]=Te,t),{}):{};Q.filterProps=Sr;function Fi(t){return Vn(t,zn)}Fi.propTypes=process.env.NODE_ENV!=="production"?zn.reduce((t,e)=>(t[e]=Te,t),{}):{};Fi.filterProps=zn;function Un(t=8){if(t.mui)return t;let e=Ft({spacing:t}),r=(...n)=>(process.env.NODE_ENV!=="production"&&(n.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${n.length}`)),(n.length===0?[1]:n).map(i=>{let s=e(i);return typeof s=="number"?`${s}px`:s}).join(" "));return r.mui=!0,r}function pu(...t){let e=t.reduce((n,o)=>(o.filterProps.forEach(i=>{n[i]=o}),n),{}),r=n=>Object.keys(n).reduce((o,i)=>e[i]?ze(o,e[i](n)):o,{});return r.propTypes=process.env.NODE_ENV!=="production"?t.reduce((n,o)=>Object.assign(n,o.propTypes),{}):{},r.filterProps=t.reduce((n,o)=>n.concat(o.filterProps),[]),r}var Ve=pu;function xe(t){return typeof t!="number"?t:`${t}px solid`}function Ce(t,e){return H({prop:t,themeKey:"borders",transform:e})}var du=Ce("border",xe),mu=Ce("borderTop",xe),hu=Ce("borderRight",xe),gu=Ce("borderBottom",xe),yu=Ce("borderLeft",xe),xu=Ce("borderColor"),bu=Ce("borderTopColor"),vu=Ce("borderRightColor"),Tu=Ce("borderBottomColor"),Cu=Ce("borderLeftColor"),Su=Ce("outline",xe),Pu=Ce("outlineColor"),kt=t=>{if(t.borderRadius!==void 0&&t.borderRadius!==null){let e=Ye(t.theme,"shape.borderRadius",4,"borderRadius"),r=n=>({borderRadius:ke(e,n)});return ie(t,t.borderRadius,r)}return null};kt.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:Te}:{};kt.filterProps=["borderRadius"];var Wg=Ve(du,mu,hu,gu,yu,xu,bu,vu,Tu,Cu,kt,Su,Pu);var At=t=>{if(t.gap!==void 0&&t.gap!==null){let e=Ye(t.theme,"spacing",8,"gap"),r=n=>({gap:ke(e,n)});return ie(t,t.gap,r)}return null};At.propTypes=process.env.NODE_ENV!=="production"?{gap:Te}:{};At.filterProps=["gap"];var Mt=t=>{if(t.columnGap!==void 0&&t.columnGap!==null){let e=Ye(t.theme,"spacing",8,"columnGap"),r=n=>({columnGap:ke(e,n)});return ie(t,t.columnGap,r)}return null};Mt.propTypes=process.env.NODE_ENV!=="production"?{columnGap:Te}:{};Mt.filterProps=["columnGap"];var Dt=t=>{if(t.rowGap!==void 0&&t.rowGap!==null){let e=Ye(t.theme,"spacing",8,"rowGap"),r=n=>({rowGap:ke(e,n)});return ie(t,t.rowGap,r)}return null};Dt.propTypes=process.env.NODE_ENV!=="production"?{rowGap:Te}:{};Dt.filterProps=["rowGap"];var Eu=H({prop:"gridColumn"}),wu=H({prop:"gridRow"}),_u=H({prop:"gridAutoFlow"}),Ou=H({prop:"gridAutoColumns"}),Fu=H({prop:"gridAutoRows"}),ku=H({prop:"gridTemplateColumns"}),Au=H({prop:"gridTemplateRows"}),Mu=H({prop:"gridTemplateAreas"}),Du=H({prop:"gridArea"}),Jg=Ve(At,Mt,Dt,Eu,wu,_u,Ou,Fu,ku,Au,Mu,Du);function Ge(t,e){return e==="grey"?e:t}var Ru=H({prop:"color",themeKey:"palette",transform:Ge}),$u=H({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Ge}),Bu=H({prop:"backgroundColor",themeKey:"palette",transform:Ge}),ry=Ve(Ru,$u,Bu);function me(t){return t<=1&&t!==0?`${t*100}%`:t}var Iu=H({prop:"width",transform:me}),Pr=t=>{if(t.maxWidth!==void 0&&t.maxWidth!==null){let e=r=>{var n,o;let i=((n=t.theme)==null||(n=n.breakpoints)==null||(n=n.values)==null?void 0:n[r])||vr[r];return i?((o=t.theme)==null||(o=o.breakpoints)==null?void 0:o.unit)!=="px"?{maxWidth:`${i}${t.theme.breakpoints.unit}`}:{maxWidth:i}:{maxWidth:me(r)}};return ie(t,t.maxWidth,e)}return null};Pr.filterProps=["maxWidth"];var Lu=H({prop:"minWidth",transform:me}),ju=H({prop:"height",transform:me}),Nu=H({prop:"maxHeight",transform:me}),zu=H({prop:"minHeight",transform:me}),ay=H({prop:"size",cssProperty:"width",transform:me}),ly=H({prop:"size",cssProperty:"height",transform:me}),Vu=H({prop:"boxSizing"}),uy=Ve(Iu,Pr,Lu,ju,Nu,zu,Vu);var Uu={border:{themeKey:"borders",transform:xe},borderTop:{themeKey:"borders",transform:xe},borderRight:{themeKey:"borders",transform:xe},borderBottom:{themeKey:"borders",transform:xe},borderLeft:{themeKey:"borders",transform:xe},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:xe},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:kt},color:{themeKey:"palette",transform:Ge},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Ge},backgroundColor:{themeKey:"palette",transform:Ge},p:{style:Q},pt:{style:Q},pr:{style:Q},pb:{style:Q},pl:{style:Q},px:{style:Q},py:{style:Q},padding:{style:Q},paddingTop:{style:Q},paddingRight:{style:Q},paddingBottom:{style:Q},paddingLeft:{style:Q},paddingX:{style:Q},paddingY:{style:Q},paddingInline:{style:Q},paddingInlineStart:{style:Q},paddingInlineEnd:{style:Q},paddingBlock:{style:Q},paddingBlockStart:{style:Q},paddingBlockEnd:{style:Q},m:{style:J},mt:{style:J},mr:{style:J},mb:{style:J},ml:{style:J},mx:{style:J},my:{style:J},margin:{style:J},marginTop:{style:J},marginRight:{style:J},marginBottom:{style:J},marginLeft:{style:J},marginX:{style:J},marginY:{style:J},marginInline:{style:J},marginInlineStart:{style:J},marginInlineEnd:{style:J},marginBlock:{style:J},marginBlockStart:{style:J},marginBlockEnd:{style:J},displayPrint:{cssProperty:!1,transform:t=>({"@media print":{display:t}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:At},rowGap:{style:Dt},columnGap:{style:Mt},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:me},maxWidth:{style:Pr},minWidth:{transform:me},height:{transform:me},maxHeight:{transform:me},minHeight:{transform:me},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}},ct=Uu;function qu(...t){let e=t.reduce((n,o)=>n.concat(Object.keys(o)),[]),r=new Set(e);return t.every(n=>r.size===Object.keys(n).length)}function Wu(t,e){return typeof t=="function"?t(e):t}function Yu(){function t(r,n,o,i){let s={[r]:n,theme:o},l=i[r];if(!l)return{[r]:n};let{cssProperty:a=r,themeKey:u,transform:p,style:c}=l;if(n==null)return null;if(u==="typography"&&n==="inherit")return{[r]:n};let m=ut(o,u)||{};return c?c(s):ie(s,n,g=>{let b=Ot(m,p,g);return g===b&&typeof g=="string"&&(b=Ot(m,p,`${r}${g==="default"?"":ye(g)}`,g)),a===!1?b:{[a]:b}})}function e(r){var n;let{sx:o,theme:i={}}=r||{};if(!o)return null;let s=(n=i.unstable_sxConfig)!=null?n:ct;function l(a){let u=a;if(typeof a=="function")u=a(i);else if(typeof a!="object")return a;if(!u)return null;let p=Ln(i.breakpoints),c=Object.keys(p),m=p;return Object.keys(u).forEach(f=>{let g=Wu(u[f],i);if(g!=null)if(typeof g=="object")if(s[f])m=ze(m,t(f,g,i,s));else{let b=ie({theme:i},g,w=>({[f]:w}));qu(b,g)?m[f]=e({sx:g,theme:i}):m=ze(m,b)}else m=ze(m,t(f,g,i,s))}),jn(c,m)}return Array.isArray(o)?o.map(l):l(o)}return e}var ki=Yu();ki.filterProps=["sx"];var Rt=ki;var Gu=["breakpoints","palette","spacing","shape"];function Ku(t={},...e){let{breakpoints:r={},palette:n={},spacing:o,shape:i={}}=t,s=ge(t,Gu),l=In(r),a=Un(o),u=de({breakpoints:l,direction:"ltr",components:{},palette:$({mode:"light"},n),spacing:a,shape:$({},Ei,i)},s);return u=e.reduce((p,c)=>de(p,c),u),u.unstable_sxConfig=$({},ct,s==null?void 0:s.unstable_sxConfig),u.unstable_sx=function(c){return Rt({sx:c,theme:this})},u}var Ke=Ku;function Hu(t){return Object.keys(t).length===0}function Zu(t=null){let e=Ai.useContext(_react2.ThemeContext);return!e||Hu(e)?t:e}var Mi=Zu;var Xu=Ke();function Ju(t=Xu){return Mi(t)}var Di=Ju;var Qu=["sx"],ec=t=>{var e,r;let n={systemProps:{},otherProps:{}},o=(e=t==null||(r=t.theme)==null?void 0:r.unstable_sxConfig)!=null?e:ct;return Object.keys(t).forEach(i=>{o[i]?n.systemProps[i]=t[i]:n.otherProps[i]=t[i]}),n};function Er(t){let{sx:e}=t,r=ge(t,Qu),{systemProps:n,otherProps:o}=ec(r),i;return Array.isArray(e)?i=[n,...e]:typeof e=="function"?i=(...s)=>{let l=e(...s);return be(l)?$({},n,l):n}:i=$({},n,e),$({},o,{sx:i})}function Ri(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var o=t.length;for(e=0;e<o;e++)t[e]&&(r=Ri(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function tc(){for(var t,e,r=0,n="",o=arguments.length;r<o;r++)(t=arguments[r])&&(e=Ri(t))&&(n&&(n+=" "),n+=e);return n}var $i=tc;var rc=["variant"];function Bi(t){return t.length===0}function wr(t){let{variant:e}=t,r=ge(t,rc),n=e||"";return Object.keys(r).sort().forEach(o=>{o==="color"?n+=Bi(n)?t[o]:ye(t[o]):n+=`${Bi(n)?o:ye(o)}${ye(t[o].toString())}`}),n}var nc=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function oc(t){return Object.keys(t).length===0}function ic(t){return typeof t=="string"&&t.charCodeAt(0)>96}var sc=(t,e)=>e.components&&e.components[t]&&e.components[t].styleOverrides?e.components[t].styleOverrides:null,Or=t=>{let e=0,r={};return t&&t.forEach(n=>{let o="";typeof n.props=="function"?(o=`callback${e}`,e+=1):o=wr(n.props),r[o]=n.style}),r},ac=(t,e)=>{let r=[];return e&&e.components&&e.components[t]&&e.components[t].variants&&(r=e.components[t].variants),Or(r)},Fr=(t,e,r)=>{let{ownerState:n={}}=t,o=[],i=0;return r&&r.forEach(s=>{let l=!0;if(typeof s.props=="function"){let a=$({},t,n);l=s.props(a)}else Object.keys(s.props).forEach(a=>{n[a]!==s.props[a]&&t[a]!==s.props[a]&&(l=!1)});l&&(typeof s.props=="function"?o.push(e[`callback${i}`]):o.push(e[wr(s.props)])),typeof s.props=="function"&&(i+=1)}),o},lc=(t,e,r,n)=>{var o;let i=r==null||(o=r.components)==null||(o=o[n])==null?void 0:o.variants;return Fr(t,e,i)};function qn(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}var uc=Ke(),Ii=t=>t&&t.charAt(0).toLowerCase()+t.slice(1);function _r({defaultTheme:t,theme:e,themeId:r}){return oc(e)?t:e[r]||e}function cc(t){return t?(e,r)=>r[t]:null}var Li=({styledArg:t,props:e,defaultTheme:r,themeId:n})=>{let o=t($({},e,{theme:_r($({},e,{defaultTheme:r,themeId:n}))})),i;if(o&&o.variants&&(i=o.variants,delete o.variants),i){let s=Fr(e,Or(i),i);return[o,...s]}return o};function Wn(t={}){let{themeId:e,defaultTheme:r=uc,rootShouldForwardProp:n=qn,slotShouldForwardProp:o=qn}=t,i=s=>Rt($({},s,{theme:_r($({},s,{defaultTheme:r,themeId:e}))}));return i.__mui_systemSx=!0,(s,l={})=>{hi(s,P=>P.filter(M=>!(M!=null&&M.__mui_systemSx)));let{name:a,slot:u,skipVariantsResolver:p,skipSx:c,overridesResolver:m=cc(Ii(u))}=l,f=ge(l,nc),g=p!==void 0?p:u&&u!=="Root"&&u!=="root"||!1,b=c||!1,w;process.env.NODE_ENV!=="production"&&a&&(w=`${a}-${Ii(u||"Root")}`);let B=qn;u==="Root"||u==="root"?B=n:u?B=o:ic(s)&&(B=void 0);let U=Mn(s,$({shouldForwardProp:B,label:w},f)),ee=(P,...M)=>{let te=M?M.map(v=>{if(typeof v=="function"&&v.__emotion_real!==v)return x=>Li({styledArg:v,props:x,defaultTheme:r,themeId:e});if(be(v)){let x=v,O;return v&&v.variants&&(O=v.variants,delete x.variants,x=d=>{let h=v;return Fr(d,Or(O),O).forEach(E=>{h=de(h,E)}),h}),x}return v}):[],K=P;if(be(P)){let v;P&&P.variants&&(v=P.variants,delete K.variants,K=x=>{let O=P;return Fr(x,Or(v),v).forEach(h=>{O=de(O,h)}),O})}else typeof P=="function"&&P.__emotion_real!==P&&(K=v=>Li({styledArg:P,props:v,defaultTheme:r,themeId:e}));a&&m&&te.push(v=>{let x=_r($({},v,{defaultTheme:r,themeId:e})),O=sc(a,x);if(O){let d={};return Object.entries(O).forEach(([h,S])=>{d[h]=typeof S=="function"?S($({},v,{theme:x})):S}),m(v,d)}return null}),a&&!g&&te.push(v=>{let x=_r($({},v,{defaultTheme:r,themeId:e}));return lc(v,ac(a,x),x,a)}),b||te.push(i);let Y=te.length-M.length;if(Array.isArray(P)&&Y>0){let v=new Array(Y).fill("");K=[...P,...v],K.raw=[...P.raw,...v]}let q=U(K,...te);if(process.env.NODE_ENV!=="production"){let v;a&&(v=`${a}${ye(u||"")}`),v===void 0&&(v=`Styled(${br(s)})`),q.displayName=v}return s.muiName&&(q.muiName=s.muiName),q};return U.withConfig&&(ee.withConfig=U.withConfig),ee}}var fc=Wn(),ji=fc;function Yn(t){let{theme:e,name:r,props:n}=t;return!e||!e.components||!e.components[r]||!e.components[r].defaultProps?n:Et(e.components[r].defaultProps,n)}function kr({props:t,name:e,defaultTheme:r,themeId:n}){let o=Di(r);return n&&(o=o[n]||o),Yn({theme:o,name:e,props:t})}var G=qe(ar());var Z=qe(ar());var pc=["component","direction","spacing","divider","children","className","useFlexGap"],mc=Ke(),hc=ji("div",{name:"MuiStack",slot:"Root",overridesResolver:(t,e)=>e.root});function gc(t){return kr({props:t,name:"MuiStack",defaultTheme:mc})}function yc(t,e){let r=ft.Children.toArray(t).filter(Boolean);return r.reduce((n,o,i)=>(n.push(o),i<r.length-1&&n.push(ft.cloneElement(e,{key:`separator-${i}`})),n),[])}var xc=t=>({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[t],bc=({ownerState:t,theme:e})=>{let r=$({display:"flex",flexDirection:"column"},ie({theme:e},Tr({values:t.direction,breakpoints:e.breakpoints.values}),n=>({flexDirection:n})));if(t.spacing){let n=Ft(e),o=Object.keys(e.breakpoints.values).reduce((a,u)=>((typeof t.spacing=="object"&&t.spacing[u]!=null||typeof t.direction=="object"&&t.direction[u]!=null)&&(a[u]=!0),a),{}),i=Tr({values:t.direction,base:o}),s=Tr({values:t.spacing,base:o});typeof i=="object"&&Object.keys(i).forEach((a,u,p)=>{if(!i[a]){let m=u>0?i[p[u-1]]:"column";i[a]=m}}),r=de(r,ie({theme:e},s,(a,u)=>t.useFlexGap?{gap:ke(n,a)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${xc(u?i[u]:t.direction)}`]:ke(n,a)}}))}return r=_i(e.breakpoints,r),r};function Gn(t={}){let{createStyledComponent:e=hc,useThemeProps:r=gc,componentName:n="MuiStack"}=t,o=()=>wt({root:["root"]},a=>_t(n,a),{}),i=e(bc),s=ft.forwardRef(function(a,u){let p=r(a),c=Er(p),{component:m="div",direction:f="column",spacing:g=0,divider:b,children:w,className:B,useFlexGap:U=!1}=c,ee=ge(c,pc),P={direction:f,spacing:g,useFlexGap:U},M=o();return _jsxruntime.jsx.call(void 0, i,$({as:m,ownerState:P,ref:u,className:$i(M.root,B)},ee,{children:b?yc(w,b):w}))});return process.env.NODE_ENV!=="production"&&(s.propTypes={children:Z.default.node,direction:Z.default.oneOfType([Z.default.oneOf(["column-reverse","column","row-reverse","row"]),Z.default.arrayOf(Z.default.oneOf(["column-reverse","column","row-reverse","row"])),Z.default.object]),divider:Z.default.node,spacing:Z.default.oneOfType([Z.default.arrayOf(Z.default.oneOfType([Z.default.number,Z.default.string])),Z.default.number,Z.default.object,Z.default.string]),sx:Z.default.oneOfType([Z.default.arrayOf(Z.default.oneOfType([Z.default.func,Z.default.object,Z.default.bool])),Z.default.func,Z.default.object])}),s}var Ni=Gn();process.env.NODE_ENV!=="production"&&(Ni.propTypes={children:G.default.node,component:G.default.elementType,direction:G.default.oneOfType([G.default.oneOf(["column-reverse","column","row-reverse","row"]),G.default.arrayOf(G.default.oneOf(["column-reverse","column","row-reverse","row"])),G.default.object]),divider:G.default.node,spacing:G.default.oneOfType([G.default.arrayOf(G.default.oneOfType([G.default.number,G.default.string])),G.default.number,G.default.object,G.default.string]),sx:G.default.oneOfType([G.default.arrayOf(G.default.oneOfType([G.default.func,G.default.object,G.default.bool])),G.default.func,G.default.object]),useFlexGap:G.default.bool});var Ar=Ni;var Sc=_styled2.default.call(void 0, (0, _material.Typography))(({theme:t})=>({fontWeight:"bold"}));function Ui(t){let{label:e,children:r,labelProps:n,contentProps:o,isNumber:i,showDivider:s}=t;return _jsxruntime.jsxs.call(void 0, _material.Box,{sx:{display:"flex",gap:4},children:[_jsxruntime.jsxs.call(void 0, _material.Box,{children:[_jsxruntime.jsx.call(void 0, Ar,{children:_jsxruntime.jsx.call(void 0, Sc,W(y({},n),{children:e}))}),_jsxruntime.jsx.call(void 0, Ar,{direction:i?"row":"column",justifyContent:i?"flex-end":"center",children:r})]}),s&&_jsxruntime.jsx.call(void 0, _material.Divider,{orientation:"vertical",flexItem:!0})]})}function Gi(t){let{title:e,children:r,onBack:n,onClose:o}=t,i=_material.useMediaQuery.call(void 0, s=>s.breakpoints.down("sm"));return _jsxruntime.jsxs.call(void 0, _material.Box,{sx:{display:"flex",flexDirection:i||o?"column":"row",justifyContent:"space-between",alignContent:"center",alignItems:"center",gap:2,marginBottom:2},children:[_jsxruntime.jsxs.call(void 0, _material.Box,{sx:{display:"flex",flexDirection:"row"},children:[n&&_jsxruntime.jsx.call(void 0, _material.IconButton,{sx:{mr:1},onClick:n,children:_jsxruntime.jsx.call(void 0, _iconsmaterial.ArrowBack,{})}),_jsxruntime.jsx.call(void 0, _material.Typography,{component:"h1",variant:"h4",sx:{fontWeight:"500"},children:e})]}),o&&_jsxruntime.jsx.call(void 0, _material.IconButton,{sx:{marginLeft:"auto"},onClick:o,children:_jsxruntime.jsx.call(void 0, _iconsmaterial.Close,{fontSize:"medium"})}),r]})}var _lodash = require('lodash'); var _lodash2 = _interopRequireDefault(_lodash);function Dr(t){let i=t,{onSearch:e}=i,r=X(i,["onSearch"]),n=_lodash2.default.debounce(s=>e(s),500);function o(s){let l=s.target.value;n(l)}return _jsxruntime.jsx.call(void 0, _material.TextField,y({onChange:o,autoFocus:!0,InputProps:{startAdornment:_jsxruntime.jsx.call(void 0, _material.InputAdornment,{position:"start",children:_jsxruntime.jsx.call(void 0, _iconsmaterial.Search,{})})}},r))}function Xn(t){let x=t,{value:e,label:r,options:n,isLoading:o,form:i,table:s,tableProps:l,onChange:a,onSearch:u,renderValue:p,dialogProps:c,disabled:m,filterOptions:f,optionKeyName:g}=x,b=X(x,["value","label","options","isLoading","form","table","tableProps","onChange","onSearch","renderValue","dialogProps","disabled","filterOptions","optionKeyName"]),{isOpen:w,openDialog:B,closeDialog:U}=_hooks.useDialog.call(void 0, ),[ee,P]=_react.useState.call(void 0, null),M=i||Ai.default.Fragment,te=_lodash2.default.debounce(O=>u(O),500),K=_react.useCallback.call(void 0, (O,d)=>ue(this,null,function*(){te(d)}),[te]),Y=_react.useCallback.call(void 0, (O,d,h)=>{if(g&&(d!=null&&d[g].includes("Adicionar op\xE7\xE3o:"))){let S=d[g].replace("Adicionar op\xE7\xE3o:","").trim().replace(/["']/g,""),E=W(y({},d),{[g]:S});a&&a(E);return}a&&a(d)},[a]);function q(O,d=!1,h=!1){var S;if(O){let E=Ai.default.Children.toArray((S=O.props)==null?void 0:S.children),_=E.length===1?0:1;return E.splice(_,0,_jsxruntime.jsx.call(void 0, _material.IconButton,{sx:{padding:"2px"},size:"small",color:"default",onClick:()=>B(),disabled:h,children:_jsxruntime.jsx.call(void 0, _iconsmaterial.SearchOutlined,{fontSize:"small"})})),d&&E.unshift(_jsxruntime.jsx.call(void 0, _material.IconButton,{disabled:!0,children:_jsxruntime.jsx.call(void 0, _material.CircularProgress,{color:"primary",size:18})})),Ai.default.cloneElement(O,{},E)}return O}function v(O,d){if(!g)return O;let S=_material.createFilterOptions.call(void 0, )(O,d),{inputValue:E}=d,_=O.some(A=>E===A[g]);return E!==""&&!_&&S.push({[g]:`Adicionar op\xE7\xE3o: "${E}"`}),S}return _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, _material.Autocomplete,{disabled:m,loadingText:"Carregando...",loading:o,onChange:Y,value:e,onInputChange:K,options:n,getOptionLabel:p,filterOptions:v,renderInput:O=>_jsxruntime.jsx.call(void 0, _material.TextField,y(W(y({label:r,onDoubleClick:()=>{m||B()}},O),{InputProps:W(y({},O.InputProps),{endAdornment:q(O.InputProps.endAdornment,o,m)}),disabled:m}),b)),clearIcon:_jsxruntime.jsx.call(void 0, _iconsmaterial.BackspaceOutlined,{}),componentsProps:{clearIndicator:{sx:{visibility:"visible"}}},noOptionsText:"Nenhum registro"}),_jsxruntime.jsx.call(void 0, _providers.FormProvider,{children:_jsxruntime.jsx.call(void 0, we,W(y({open:w,onClose:()=>U(),actions:"none"},c),{children:_jsxruntime.jsxs.call(void 0, _material.Stack,{spacing:1,children:[_jsxruntime.jsxs.call(void 0, _material.Stack,{direction:"row",justifyContent:"flex-end",alignItems:"center",spacing:1,children:[_jsxruntime.jsx.call(void 0, Dr,{placeholder:"Pesquisar",onSearch:O=>P(O)}),i&&_jsxruntime.jsx.call(void 0, M,{})]}),_jsxruntime.jsx.call(void 0, s,y({query:ee,enableTransporter:!0,onTransport:O=>{U(),a&&a(O)}},l))]})}))})]})}var Vc={dialogProps:{maxWidth:"md",fullWidth:!0}};Xn.defaultProps=Vc;function Jn(t){let{label:e}=t;return _jsxruntime.jsx.call(void 0, _material.Stack,{component:"header",sx:{alignItems:"center",gap:1},children:_jsxruntime.jsx.call(void 0, _material.Typography,{component:"h1",variant:"h3",sx:{fontWeight:"medium",color:r=>r.palette.grey[600]},children:e})})}var _axios = require('axios');var Pe=qe(ns()),Bt=qe(ss()),ps=qe(ls()),cf=Object.prototype.toString,ff=Error.prototype.toString,pf=RegExp.prototype.toString,df=typeof Symbol!="undefined"?Symbol.prototype.toString:()=>"",mf=/^Symbol\((.*)\)(.*)$/;function hf(t){return t!=+t?"NaN":t===0&&1/t<0?"-0":""+t}function us(t,e=!1){if(t==null||t===!0||t===!1)return""+t;let r=typeof t;if(r==="number")return hf(t);if(r==="string")return e?`"${t}"`:t;if(r==="function")return"[Function "+(t.name||"anonymous")+"]";if(r==="symbol")return df.call(t).replace(mf,"Symbol($1)");let n=cf.call(t).slice(8,-1);return n==="Date"?isNaN(t.getTime())?""+t:t.toISOString(t):n==="Error"||t instanceof Error?"["+ff.call(t)+"]":n==="RegExp"?pf.call(t):null}function Re(t,e){let r=us(t,e);return r!==null?r:JSON.stringify(t,function(n,o){let i=us(this[n],e);return i!==null?i:o},2)}function ds(t){return t==null?[]:[].concat(t)}var ms,gf=/\$\{\s*(\w+)\s*\}/g;ms=Symbol.toStringTag;var ce=class extends Error{static formatError(e,r){let n=r.label||r.path||"this";return n!==r.path&&(r=Object.assign({},r,{path:n})),typeof e=="string"?e.replace(gf,(o,i)=>Re(r[i])):typeof e=="function"?e(r):e}static isError(e){return e&&e.name==="ValidationError"}constructor(e,r,n,o,i){super(),this.value=void 0,this.path=void 0,this.type=void 0,this.errors=void 0,this.params=void 0,this.inner=void 0,this[ms]="Error",this.name="ValidationError",this.value=r,this.path=n,this.type=o,this.errors=[],this.inner=[],ds(e).forEach(s=>{if(ce.isError(s)){this.errors.push(...s.errors);let l=s.inner.length?s.inner:[s];this.inner.push(...l)}else this.errors.push(s)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0],!i&&Error.captureStackTrace&&Error.captureStackTrace(this,ce)}},Ae={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:t,type:e,value:r,originalValue:n})=>{let o=n!=null&&n!==r?` (cast from the value \`${Re(n,!0)}\`).`:".";return e!=="mixed"?`${t} must be a \`${e}\` type, but the final value was: \`${Re(r,!0)}\``+o:`${t} must match the configured type. The validated value was: \`${Re(r,!0)}\``+o}},_e={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},Ue={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},io={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},so={isValue:"${path} field must be ${value}"},ao={noUnknown:"${path} field has unspecified keys: ${unknown}"},Ir={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},hs={notType:t=>{let{path:e,value:r,spec:n}=t,o=n.types.length;if(Array.isArray(r)){if(r.length<o)return`${e} tuple value has too few items, expected a length of ${o} but got ${r.length} for value: \`${Re(r,!0)}\``;if(r.length>o)return`${e} tuple value has too many items, expected a length of ${o} but got ${r.length} for value: \`${Re(r,!0)}\``}return ce.formatError(Ae.notType,t)}},kb=Object.assign(Object.create(null),{mixed:Ae,string:_e,number:Ue,date:io,object:ao,array:Ir,boolean:so,tuple:hs}),Yr=t=>t&&t.__isYupSchema__,mt=class{static fromOptions(e,r){if(!r.then&&!r.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:n,then:o,otherwise:i}=r,s=typeof n=="function"?n:(...l)=>l.every(a=>a===n);return new mt(e,(l,a)=>{var u;let p=s(...l)?o:i;return(u=p==null?void 0:p(a))!=null?u:a})}constructor(e,r){this.fn=void 0,this.refs=e,this.refs=e,this.fn=r}resolve(e,r){let n=this.refs.map(i=>i.getValue(r==null?void 0:r.value,r==null?void 0:r.parent,r==null?void 0:r.context)),o=this.fn(n,e,r);if(o===void 0||o===e)return e;if(!Yr(o))throw new TypeError("conditions must return a schema object");return o.resolve(r)}},Br={context:"$",value:"."};var $e=class{constructor(e,r={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof e!="string")throw new TypeError("ref must be a string, got: "+e);if(this.key=e.trim(),e==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===Br.context,this.isValue=this.key[0]===Br.value,this.isSibling=!this.isContext&&!this.isValue;let n=this.isContext?Br.context:this.isValue?Br.value:"";this.path=this.key.slice(n.length),this.getter=this.path&&(0,Pe.getter)(this.path,!0),this.map=r.map}getValue(e,r,n){let o=this.isContext?n:this.isValue?e:r;return this.getter&&(o=this.getter(o||{})),this.map&&(o=this.map(o)),o}cast(e,r){return this.getValue(e,r==null?void 0:r.parent,r==null?void 0:r.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(e){return e&&e.__isYupRef}};$e.prototype.__isYupRef=!0;var Oe=t=>t==null;function pt(t){function e({value:r,path:n="",options:o,originalValue:i,schema:s},l,a){let{name:u,test:p,params:c,message:m,skipAbsent:f}=t,{parent:g,context:b,abortEarly:w=s.spec.abortEarly,disableStackTrace:B=s.spec.disableStackTrace}=o;function U(x){return $e.isRef(x)?x.getValue(r,g,b):x}function ee(x={}){var O;let d=Object.assign({value:r,originalValue:i,label:s.spec.label,path:x.path||n,spec:s.spec},c,x.params);for(let S of Object.keys(d))d[S]=U(d[S]);let h=new ce(ce.formatError(x.message||m,d),r,d.path,x.type||u,(O=x.disableStackTrace)!=null?O:B);return h.params=d,h}let P=w?l:a,M={path:n,parent:g,type:u,from:o.from,createError:ee,resolve:U,options:o,originalValue:i,schema:s},te=x=>{ce.isError(x)?P(x):x?a(null):P(ee())},K=x=>{ce.isError(x)?P(x):l(x)};if(f&&Oe(r))return te(!0);let q;try{var v;if(q=p.call(M,r,M),typeof((v=q)==null?void 0:v.then)=="function"){if(o.sync)throw new Error(`Validation test of type: "${M.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(q).then(te,K)}}catch(x){K(x);return}te(q)}return e.OPTIONS=t,e}function yf(t,e,r,n=r){let o,i,s;return e?((0,Pe.forEach)(e,(l,a,u)=>{let p=a?l.slice(1,l.length-1):l;t=t.resolve({context:n,parent:o,value:r});let c=t.type==="tuple",m=u?parseInt(p,10):0;if(t.innerType||c){if(c&&!u)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${s}" must contain an index to the tuple element, e.g. "${s}[0]"`);if(r&&m>=r.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${l}, in the path: ${e}. because there is no value at that index. `);o=r,r=r&&r[m],t=c?t.spec.types[m]:t.innerType}if(!u){if(!t.fields||!t.fields[p])throw new Error(`The schema does not contain the path: ${e}. (failed at: ${s} which is a type: "${t.type}")`);o=r,r=r&&r[p],t=t.fields[p]}i=p,s=a?"["+l+"]":"."+l}),{schema:t,parent:o,parentPath:i}):{parent:o,parentPath:e,schema:t}}var ht=class extends Set{describe(){let e=[];for(let r of this.values())e.push($e.isRef(r)?r.describe():r);return e}resolveAll(e){let r=[];for(let n of this.values())r.push(e(n));return r}clone(){return new ht(this.values())}merge(e,r){let n=this.clone();return e.forEach(o=>n.add(o)),r.forEach(o=>n.delete(o)),n}};function dt(t,e=new Map){if(Yr(t)||!t||typeof t!="object")return t;if(e.has(t))return e.get(t);let r;if(t instanceof Date)r=new Date(t.getTime()),e.set(t,r);else if(t instanceof RegExp)r=new RegExp(t),e.set(t,r);else if(Array.isArray(t)){r=new Array(t.length),e.set(t,r);for(let n=0;n<t.length;n++)r[n]=dt(t[n],e)}else if(t instanceof Map){r=new Map,e.set(t,r);for(let[n,o]of t.entries())r.set(n,dt(o,e))}else if(t instanceof Set){r=new Set,e.set(t,r);for(let n of t)r.add(dt(n,e))}else if(t instanceof Object){r={},e.set(t,r);for(let[n,o]of Object.entries(t))r[n]=dt(o,e)}else throw Error(`Unable to clone ${t}`);return r}var se=class{constructor(e){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new ht,this._blacklist=new ht,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(Ae.notType)}),this.type=e.type,this._typeCheck=e.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},e==null?void 0:e.spec),this.withMutation(r=>{r.nonNullable()})}get _type(){return this.type}clone(e){if(this._mutate)return e&&Object.assign(this.spec,e),this;let r=Object.create(Object.getPrototypeOf(this));return r.type=this.type,r._typeCheck=this._typeCheck,r._whitelist=this._whitelist.clone(),r._blacklist=this._blacklist.clone(),r.internalTests=Object.assign({},this.internalTests),r.exclusiveTests=Object.assign({},this.exclusiveTests),r.deps=[...this.deps],r.conditions=[...this.conditions],r.tests=[...this.tests],r.transforms=[...this.transforms],r.spec=dt(Object.assign({},this.spec,e)),r}label(e){let r=this.clone();return r.spec.label=e,r}meta(...e){if(e.length===0)return this.spec.meta;let r=this.clone();return r.spec.meta=Object.assign(r.spec.meta||{},e[0]),r}withMutation(e){let r=this._mutate;this._mutate=!0;let n=e(this);return this._mutate=r,n}concat(e){if(!e||e===this)return this;if(e.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${e.type}`);let r=this,n=e.clone(),o=Object.assign({},r.spec,n.spec);return n.spec=o,n.internalTests=Object.assign({},r.internalTests,n.internalTests),n._whitelist=r._whitelist.merge(e._whitelist,e._blacklist),n._blacklist=r._blacklist.merge(e._blacklist,e._whitelist),n.tests=r.tests,n.exclusiveTests=r.exclusiveTests,n.withMutation(i=>{e.tests.forEach(s=>{i.test(s.OPTIONS)})}),n.transforms=[...r.transforms,...n.transforms],n}isType(e){return e==null?!!(this.spec.nullable&&e===null||this.spec.optional&&e===void 0):this._typeCheck(e)}resolve(e){let r=this;if(r.conditions.length){let n=r.conditions;r=r.clone(),r.conditions=[],r=n.reduce((o,i)=>i.resolve(o,e),r),r=r.resolve(e)}return r}resolveOptions(e){var r,n,o,i;return Object.assign({},e,{from:e.from||[],strict:(r=e.strict)!=null?r:this.spec.strict,abortEarly:(n=e.abortEarly)!=null?n:this.spec.abortEarly,recursive:(o=e.recursive)!=null?o:this.spec.recursive,disableStackTrace:(i=e.disableStackTrace)!=null?i:this.spec.disableStackTrace})}cast(e,r={}){let n=this.resolve(Object.assign({value:e},r)),o=r.assert==="ignore-optionality",i=n._cast(e,r);if(r.assert!==!1&&!n.isType(i)){if(o&&Oe(i))return i;let s=Re(e),l=Re(i);throw new TypeError(`The value of ${r.path||"field"} could not be cast to a value that satisfies the schema type: "${n.type}".
6
+ `)),()=>{})}function Ft(t){return Ye(t,"spacing",8,"spacing")}function ke(t,e){if(typeof e=="string"||e==null)return e;let r=Math.abs(e),n=t(r);return e>=0?n:typeof n=="number"?-n:`-${n}`}function cu(t,e){return r=>t.reduce((n,o)=>(n[o]=ke(e,r),n),{})}function fu(t,e,r,n){if(e.indexOf(r)===-1)return null;let o=uu(r),i=cu(o,n),s=t[r];return ie(t,s,i)}function Vn(t,e){let r=Ft(t.theme);return Object.keys(t).map(n=>fu(t,e,n,r)).reduce(ze,{})}function J(t){return Vn(t,Cr)}J.propTypes=process.env.NODE_ENV!=="production"?Cr.reduce((t,e)=>(t[e]=Te,t),{}):{};J.filterProps=Cr;function Q(t){return Vn(t,Sr)}Q.propTypes=process.env.NODE_ENV!=="production"?Sr.reduce((t,e)=>(t[e]=Te,t),{}):{};Q.filterProps=Sr;function Fi(t){return Vn(t,zn)}Fi.propTypes=process.env.NODE_ENV!=="production"?zn.reduce((t,e)=>(t[e]=Te,t),{}):{};Fi.filterProps=zn;function Un(t=8){if(t.mui)return t;let e=Ft({spacing:t}),r=(...n)=>(process.env.NODE_ENV!=="production"&&(n.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${n.length}`)),(n.length===0?[1]:n).map(i=>{let s=e(i);return typeof s=="number"?`${s}px`:s}).join(" "));return r.mui=!0,r}function pu(...t){let e=t.reduce((n,o)=>(o.filterProps.forEach(i=>{n[i]=o}),n),{}),r=n=>Object.keys(n).reduce((o,i)=>e[i]?ze(o,e[i](n)):o,{});return r.propTypes=process.env.NODE_ENV!=="production"?t.reduce((n,o)=>Object.assign(n,o.propTypes),{}):{},r.filterProps=t.reduce((n,o)=>n.concat(o.filterProps),[]),r}var Ve=pu;function xe(t){return typeof t!="number"?t:`${t}px solid`}function Ce(t,e){return H({prop:t,themeKey:"borders",transform:e})}var du=Ce("border",xe),mu=Ce("borderTop",xe),hu=Ce("borderRight",xe),gu=Ce("borderBottom",xe),yu=Ce("borderLeft",xe),xu=Ce("borderColor"),bu=Ce("borderTopColor"),vu=Ce("borderRightColor"),Tu=Ce("borderBottomColor"),Cu=Ce("borderLeftColor"),Su=Ce("outline",xe),Pu=Ce("outlineColor"),kt=t=>{if(t.borderRadius!==void 0&&t.borderRadius!==null){let e=Ye(t.theme,"shape.borderRadius",4,"borderRadius"),r=n=>({borderRadius:ke(e,n)});return ie(t,t.borderRadius,r)}return null};kt.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:Te}:{};kt.filterProps=["borderRadius"];var Wg=Ve(du,mu,hu,gu,yu,xu,bu,vu,Tu,Cu,kt,Su,Pu);var At=t=>{if(t.gap!==void 0&&t.gap!==null){let e=Ye(t.theme,"spacing",8,"gap"),r=n=>({gap:ke(e,n)});return ie(t,t.gap,r)}return null};At.propTypes=process.env.NODE_ENV!=="production"?{gap:Te}:{};At.filterProps=["gap"];var Mt=t=>{if(t.columnGap!==void 0&&t.columnGap!==null){let e=Ye(t.theme,"spacing",8,"columnGap"),r=n=>({columnGap:ke(e,n)});return ie(t,t.columnGap,r)}return null};Mt.propTypes=process.env.NODE_ENV!=="production"?{columnGap:Te}:{};Mt.filterProps=["columnGap"];var Dt=t=>{if(t.rowGap!==void 0&&t.rowGap!==null){let e=Ye(t.theme,"spacing",8,"rowGap"),r=n=>({rowGap:ke(e,n)});return ie(t,t.rowGap,r)}return null};Dt.propTypes=process.env.NODE_ENV!=="production"?{rowGap:Te}:{};Dt.filterProps=["rowGap"];var Eu=H({prop:"gridColumn"}),wu=H({prop:"gridRow"}),_u=H({prop:"gridAutoFlow"}),Ou=H({prop:"gridAutoColumns"}),Fu=H({prop:"gridAutoRows"}),ku=H({prop:"gridTemplateColumns"}),Au=H({prop:"gridTemplateRows"}),Mu=H({prop:"gridTemplateAreas"}),Du=H({prop:"gridArea"}),Jg=Ve(At,Mt,Dt,Eu,wu,_u,Ou,Fu,ku,Au,Mu,Du);function Ge(t,e){return e==="grey"?e:t}var Ru=H({prop:"color",themeKey:"palette",transform:Ge}),$u=H({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Ge}),Bu=H({prop:"backgroundColor",themeKey:"palette",transform:Ge}),ry=Ve(Ru,$u,Bu);function me(t){return t<=1&&t!==0?`${t*100}%`:t}var Iu=H({prop:"width",transform:me}),Pr=t=>{if(t.maxWidth!==void 0&&t.maxWidth!==null){let e=r=>{var n,o;let i=((n=t.theme)==null||(n=n.breakpoints)==null||(n=n.values)==null?void 0:n[r])||vr[r];return i?((o=t.theme)==null||(o=o.breakpoints)==null?void 0:o.unit)!=="px"?{maxWidth:`${i}${t.theme.breakpoints.unit}`}:{maxWidth:i}:{maxWidth:me(r)}};return ie(t,t.maxWidth,e)}return null};Pr.filterProps=["maxWidth"];var Lu=H({prop:"minWidth",transform:me}),ju=H({prop:"height",transform:me}),Nu=H({prop:"maxHeight",transform:me}),zu=H({prop:"minHeight",transform:me}),ay=H({prop:"size",cssProperty:"width",transform:me}),ly=H({prop:"size",cssProperty:"height",transform:me}),Vu=H({prop:"boxSizing"}),uy=Ve(Iu,Pr,Lu,ju,Nu,zu,Vu);var Uu={border:{themeKey:"borders",transform:xe},borderTop:{themeKey:"borders",transform:xe},borderRight:{themeKey:"borders",transform:xe},borderBottom:{themeKey:"borders",transform:xe},borderLeft:{themeKey:"borders",transform:xe},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:xe},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:kt},color:{themeKey:"palette",transform:Ge},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Ge},backgroundColor:{themeKey:"palette",transform:Ge},p:{style:Q},pt:{style:Q},pr:{style:Q},pb:{style:Q},pl:{style:Q},px:{style:Q},py:{style:Q},padding:{style:Q},paddingTop:{style:Q},paddingRight:{style:Q},paddingBottom:{style:Q},paddingLeft:{style:Q},paddingX:{style:Q},paddingY:{style:Q},paddingInline:{style:Q},paddingInlineStart:{style:Q},paddingInlineEnd:{style:Q},paddingBlock:{style:Q},paddingBlockStart:{style:Q},paddingBlockEnd:{style:Q},m:{style:J},mt:{style:J},mr:{style:J},mb:{style:J},ml:{style:J},mx:{style:J},my:{style:J},margin:{style:J},marginTop:{style:J},marginRight:{style:J},marginBottom:{style:J},marginLeft:{style:J},marginX:{style:J},marginY:{style:J},marginInline:{style:J},marginInlineStart:{style:J},marginInlineEnd:{style:J},marginBlock:{style:J},marginBlockStart:{style:J},marginBlockEnd:{style:J},displayPrint:{cssProperty:!1,transform:t=>({"@media print":{display:t}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:At},rowGap:{style:Dt},columnGap:{style:Mt},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:me},maxWidth:{style:Pr},minWidth:{transform:me},height:{transform:me},maxHeight:{transform:me},minHeight:{transform:me},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}},ct=Uu;function qu(...t){let e=t.reduce((n,o)=>n.concat(Object.keys(o)),[]),r=new Set(e);return t.every(n=>r.size===Object.keys(n).length)}function Wu(t,e){return typeof t=="function"?t(e):t}function Yu(){function t(r,n,o,i){let s={[r]:n,theme:o},l=i[r];if(!l)return{[r]:n};let{cssProperty:a=r,themeKey:u,transform:p,style:c}=l;if(n==null)return null;if(u==="typography"&&n==="inherit")return{[r]:n};let m=ut(o,u)||{};return c?c(s):ie(s,n,g=>{let b=Ot(m,p,g);return g===b&&typeof g=="string"&&(b=Ot(m,p,`${r}${g==="default"?"":ye(g)}`,g)),a===!1?b:{[a]:b}})}function e(r){var n;let{sx:o,theme:i={}}=r||{};if(!o)return null;let s=(n=i.unstable_sxConfig)!=null?n:ct;function l(a){let u=a;if(typeof a=="function")u=a(i);else if(typeof a!="object")return a;if(!u)return null;let p=Ln(i.breakpoints),c=Object.keys(p),m=p;return Object.keys(u).forEach(f=>{let g=Wu(u[f],i);if(g!=null)if(typeof g=="object")if(s[f])m=ze(m,t(f,g,i,s));else{let b=ie({theme:i},g,w=>({[f]:w}));qu(b,g)?m[f]=e({sx:g,theme:i}):m=ze(m,b)}else m=ze(m,t(f,g,i,s))}),jn(c,m)}return Array.isArray(o)?o.map(l):l(o)}return e}var ki=Yu();ki.filterProps=["sx"];var Rt=ki;var Gu=["breakpoints","palette","spacing","shape"];function Ku(t={},...e){let{breakpoints:r={},palette:n={},spacing:o,shape:i={}}=t,s=ge(t,Gu),l=In(r),a=Un(o),u=de({breakpoints:l,direction:"ltr",components:{},palette:$({mode:"light"},n),spacing:a,shape:$({},Ei,i)},s);return u=e.reduce((p,c)=>de(p,c),u),u.unstable_sxConfig=$({},ct,s==null?void 0:s.unstable_sxConfig),u.unstable_sx=function(c){return Rt({sx:c,theme:this})},u}var Ke=Ku;function Hu(t){return Object.keys(t).length===0}function Zu(t=null){let e=Ai.useContext(_react2.ThemeContext);return!e||Hu(e)?t:e}var Mi=Zu;var Xu=Ke();function Ju(t=Xu){return Mi(t)}var Di=Ju;var Qu=["sx"],ec=t=>{var e,r;let n={systemProps:{},otherProps:{}},o=(e=t==null||(r=t.theme)==null?void 0:r.unstable_sxConfig)!=null?e:ct;return Object.keys(t).forEach(i=>{o[i]?n.systemProps[i]=t[i]:n.otherProps[i]=t[i]}),n};function Er(t){let{sx:e}=t,r=ge(t,Qu),{systemProps:n,otherProps:o}=ec(r),i;return Array.isArray(e)?i=[n,...e]:typeof e=="function"?i=(...s)=>{let l=e(...s);return be(l)?$({},n,l):n}:i=$({},n,e),$({},o,{sx:i})}function Ri(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var o=t.length;for(e=0;e<o;e++)t[e]&&(r=Ri(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function tc(){for(var t,e,r=0,n="",o=arguments.length;r<o;r++)(t=arguments[r])&&(e=Ri(t))&&(n&&(n+=" "),n+=e);return n}var $i=tc;var rc=["variant"];function Bi(t){return t.length===0}function wr(t){let{variant:e}=t,r=ge(t,rc),n=e||"";return Object.keys(r).sort().forEach(o=>{o==="color"?n+=Bi(n)?t[o]:ye(t[o]):n+=`${Bi(n)?o:ye(o)}${ye(t[o].toString())}`}),n}var nc=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function oc(t){return Object.keys(t).length===0}function ic(t){return typeof t=="string"&&t.charCodeAt(0)>96}var sc=(t,e)=>e.components&&e.components[t]&&e.components[t].styleOverrides?e.components[t].styleOverrides:null,Or=t=>{let e=0,r={};return t&&t.forEach(n=>{let o="";typeof n.props=="function"?(o=`callback${e}`,e+=1):o=wr(n.props),r[o]=n.style}),r},ac=(t,e)=>{let r=[];return e&&e.components&&e.components[t]&&e.components[t].variants&&(r=e.components[t].variants),Or(r)},Fr=(t,e,r)=>{let{ownerState:n={}}=t,o=[],i=0;return r&&r.forEach(s=>{let l=!0;if(typeof s.props=="function"){let a=$({},t,n);l=s.props(a)}else Object.keys(s.props).forEach(a=>{n[a]!==s.props[a]&&t[a]!==s.props[a]&&(l=!1)});l&&(typeof s.props=="function"?o.push(e[`callback${i}`]):o.push(e[wr(s.props)])),typeof s.props=="function"&&(i+=1)}),o},lc=(t,e,r,n)=>{var o;let i=r==null||(o=r.components)==null||(o=o[n])==null?void 0:o.variants;return Fr(t,e,i)};function qn(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}var uc=Ke(),Ii=t=>t&&t.charAt(0).toLowerCase()+t.slice(1);function _r({defaultTheme:t,theme:e,themeId:r}){return oc(e)?t:e[r]||e}function cc(t){return t?(e,r)=>r[t]:null}var Li=({styledArg:t,props:e,defaultTheme:r,themeId:n})=>{let o=t($({},e,{theme:_r($({},e,{defaultTheme:r,themeId:n}))})),i;if(o&&o.variants&&(i=o.variants,delete o.variants),i){let s=Fr(e,Or(i),i);return[o,...s]}return o};function Wn(t={}){let{themeId:e,defaultTheme:r=uc,rootShouldForwardProp:n=qn,slotShouldForwardProp:o=qn}=t,i=s=>Rt($({},s,{theme:_r($({},s,{defaultTheme:r,themeId:e}))}));return i.__mui_systemSx=!0,(s,l={})=>{hi(s,P=>P.filter(M=>!(M!=null&&M.__mui_systemSx)));let{name:a,slot:u,skipVariantsResolver:p,skipSx:c,overridesResolver:m=cc(Ii(u))}=l,f=ge(l,nc),g=p!==void 0?p:u&&u!=="Root"&&u!=="root"||!1,b=c||!1,w;process.env.NODE_ENV!=="production"&&a&&(w=`${a}-${Ii(u||"Root")}`);let B=qn;u==="Root"||u==="root"?B=n:u?B=o:ic(s)&&(B=void 0);let U=Mn(s,$({shouldForwardProp:B,label:w},f)),ee=(P,...M)=>{let te=M?M.map(v=>{if(typeof v=="function"&&v.__emotion_real!==v)return x=>Li({styledArg:v,props:x,defaultTheme:r,themeId:e});if(be(v)){let x=v,O;return v&&v.variants&&(O=v.variants,delete x.variants,x=d=>{let h=v;return Fr(d,Or(O),O).forEach(E=>{h=de(h,E)}),h}),x}return v}):[],K=P;if(be(P)){let v;P&&P.variants&&(v=P.variants,delete K.variants,K=x=>{let O=P;return Fr(x,Or(v),v).forEach(h=>{O=de(O,h)}),O})}else typeof P=="function"&&P.__emotion_real!==P&&(K=v=>Li({styledArg:P,props:v,defaultTheme:r,themeId:e}));a&&m&&te.push(v=>{let x=_r($({},v,{defaultTheme:r,themeId:e})),O=sc(a,x);if(O){let d={};return Object.entries(O).forEach(([h,S])=>{d[h]=typeof S=="function"?S($({},v,{theme:x})):S}),m(v,d)}return null}),a&&!g&&te.push(v=>{let x=_r($({},v,{defaultTheme:r,themeId:e}));return lc(v,ac(a,x),x,a)}),b||te.push(i);let Y=te.length-M.length;if(Array.isArray(P)&&Y>0){let v=new Array(Y).fill("");K=[...P,...v],K.raw=[...P.raw,...v]}let q=U(K,...te);if(process.env.NODE_ENV!=="production"){let v;a&&(v=`${a}${ye(u||"")}`),v===void 0&&(v=`Styled(${br(s)})`),q.displayName=v}return s.muiName&&(q.muiName=s.muiName),q};return U.withConfig&&(ee.withConfig=U.withConfig),ee}}var fc=Wn(),ji=fc;function Yn(t){let{theme:e,name:r,props:n}=t;return!e||!e.components||!e.components[r]||!e.components[r].defaultProps?n:Et(e.components[r].defaultProps,n)}function kr({props:t,name:e,defaultTheme:r,themeId:n}){let o=Di(r);return n&&(o=o[n]||o),Yn({theme:o,name:e,props:t})}var G=qe(ar());var Z=qe(ar());var pc=["component","direction","spacing","divider","children","className","useFlexGap"],mc=Ke(),hc=ji("div",{name:"MuiStack",slot:"Root",overridesResolver:(t,e)=>e.root});function gc(t){return kr({props:t,name:"MuiStack",defaultTheme:mc})}function yc(t,e){let r=ft.Children.toArray(t).filter(Boolean);return r.reduce((n,o,i)=>(n.push(o),i<r.length-1&&n.push(ft.cloneElement(e,{key:`separator-${i}`})),n),[])}var xc=t=>({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[t],bc=({ownerState:t,theme:e})=>{let r=$({display:"flex",flexDirection:"column"},ie({theme:e},Tr({values:t.direction,breakpoints:e.breakpoints.values}),n=>({flexDirection:n})));if(t.spacing){let n=Ft(e),o=Object.keys(e.breakpoints.values).reduce((a,u)=>((typeof t.spacing=="object"&&t.spacing[u]!=null||typeof t.direction=="object"&&t.direction[u]!=null)&&(a[u]=!0),a),{}),i=Tr({values:t.direction,base:o}),s=Tr({values:t.spacing,base:o});typeof i=="object"&&Object.keys(i).forEach((a,u,p)=>{if(!i[a]){let m=u>0?i[p[u-1]]:"column";i[a]=m}}),r=de(r,ie({theme:e},s,(a,u)=>t.useFlexGap?{gap:ke(n,a)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${xc(u?i[u]:t.direction)}`]:ke(n,a)}}))}return r=_i(e.breakpoints,r),r};function Gn(t={}){let{createStyledComponent:e=hc,useThemeProps:r=gc,componentName:n="MuiStack"}=t,o=()=>wt({root:["root"]},a=>_t(n,a),{}),i=e(bc),s=ft.forwardRef(function(a,u){let p=r(a),c=Er(p),{component:m="div",direction:f="column",spacing:g=0,divider:b,children:w,className:B,useFlexGap:U=!1}=c,ee=ge(c,pc),P={direction:f,spacing:g,useFlexGap:U},M=o();return _jsxruntime.jsx.call(void 0, i,$({as:m,ownerState:P,ref:u,className:$i(M.root,B)},ee,{children:b?yc(w,b):w}))});return process.env.NODE_ENV!=="production"&&(s.propTypes={children:Z.default.node,direction:Z.default.oneOfType([Z.default.oneOf(["column-reverse","column","row-reverse","row"]),Z.default.arrayOf(Z.default.oneOf(["column-reverse","column","row-reverse","row"])),Z.default.object]),divider:Z.default.node,spacing:Z.default.oneOfType([Z.default.arrayOf(Z.default.oneOfType([Z.default.number,Z.default.string])),Z.default.number,Z.default.object,Z.default.string]),sx:Z.default.oneOfType([Z.default.arrayOf(Z.default.oneOfType([Z.default.func,Z.default.object,Z.default.bool])),Z.default.func,Z.default.object])}),s}var Ni=Gn();process.env.NODE_ENV!=="production"&&(Ni.propTypes={children:G.default.node,component:G.default.elementType,direction:G.default.oneOfType([G.default.oneOf(["column-reverse","column","row-reverse","row"]),G.default.arrayOf(G.default.oneOf(["column-reverse","column","row-reverse","row"])),G.default.object]),divider:G.default.node,spacing:G.default.oneOfType([G.default.arrayOf(G.default.oneOfType([G.default.number,G.default.string])),G.default.number,G.default.object,G.default.string]),sx:G.default.oneOfType([G.default.arrayOf(G.default.oneOfType([G.default.func,G.default.object,G.default.bool])),G.default.func,G.default.object]),useFlexGap:G.default.bool});var Ar=Ni;var Sc=_styled2.default.call(void 0, (0, _material.Typography))(({theme:t})=>({fontWeight:"bold"}));function Ui(t){let{label:e,children:r,labelProps:n,contentProps:o,isNumber:i,showDivider:s}=t;return _jsxruntime.jsxs.call(void 0, _material.Box,{sx:{display:"flex",gap:4},children:[_jsxruntime.jsxs.call(void 0, _material.Box,{children:[_jsxruntime.jsx.call(void 0, Ar,{children:_jsxruntime.jsx.call(void 0, Sc,W(y({},n),{children:e}))}),_jsxruntime.jsx.call(void 0, Ar,{direction:i?"row":"column",justifyContent:i?"flex-end":"center",children:r})]}),s&&_jsxruntime.jsx.call(void 0, _material.Divider,{orientation:"vertical",flexItem:!0})]})}function Gi(t){let{title:e,children:r,onBack:n,onClose:o}=t,i=_material.useMediaQuery.call(void 0, s=>s.breakpoints.down("sm"));return _jsxruntime.jsxs.call(void 0, _material.Box,{sx:{display:"flex",flexDirection:i||o?"column":"row",justifyContent:"space-between",alignContent:"center",alignItems:"center",gap:2,marginBottom:2},children:[_jsxruntime.jsxs.call(void 0, _material.Box,{sx:{display:"flex",alignItems:"center",flexDirection:"row"},children:[n&&_jsxruntime.jsx.call(void 0, _material.IconButton,{sx:{mr:1},onClick:n,children:_jsxruntime.jsx.call(void 0, _iconsmaterial.ArrowBack,{})}),_jsxruntime.jsx.call(void 0, _material.Typography,{component:"h1",variant:"h4",sx:{fontWeight:"500"},children:e})]}),o&&_jsxruntime.jsx.call(void 0, _material.IconButton,{sx:{marginLeft:"auto"},onClick:o,children:_jsxruntime.jsx.call(void 0, _iconsmaterial.Close,{fontSize:"medium"})}),r]})}var _lodash = require('lodash'); var _lodash2 = _interopRequireDefault(_lodash);function Dr(t){let i=t,{onSearch:e}=i,r=X(i,["onSearch"]),n=_lodash2.default.debounce(s=>e(s),500);function o(s){let l=s.target.value;n(l)}return _jsxruntime.jsx.call(void 0, _material.TextField,y({onChange:o,autoFocus:!0,InputProps:{startAdornment:_jsxruntime.jsx.call(void 0, _material.InputAdornment,{position:"start",children:_jsxruntime.jsx.call(void 0, _iconsmaterial.Search,{})})}},r))}function Xn(t){let x=t,{value:e,label:r,options:n,isLoading:o,form:i,table:s,tableProps:l,onChange:a,onSearch:u,renderValue:p,dialogProps:c,disabled:m,filterOptions:f,optionKeyName:g}=x,b=X(x,["value","label","options","isLoading","form","table","tableProps","onChange","onSearch","renderValue","dialogProps","disabled","filterOptions","optionKeyName"]),{isOpen:w,openDialog:B,closeDialog:U}=_hooks.useDialog.call(void 0, ),[ee,P]=_react.useState.call(void 0, null),M=i||Ai.default.Fragment,te=_lodash2.default.debounce(O=>u(O),500),K=_react.useCallback.call(void 0, (O,d)=>ue(this,null,function*(){te(d)}),[te]),Y=_react.useCallback.call(void 0, (O,d,h)=>{if(g&&(d!=null&&d[g].includes("Adicionar op\xE7\xE3o:"))){let S=d[g].replace("Adicionar op\xE7\xE3o:","").trim().replace(/["']/g,""),E=W(y({},d),{[g]:S});a&&a(E);return}a&&a(d)},[a]);function q(O,d=!1,h=!1){var S;if(O){let E=Ai.default.Children.toArray((S=O.props)==null?void 0:S.children),_=E.length===1?0:1;return E.splice(_,0,_jsxruntime.jsx.call(void 0, _material.IconButton,{sx:{padding:"2px"},size:"small",color:"default",onClick:()=>B(),disabled:h,children:_jsxruntime.jsx.call(void 0, _iconsmaterial.SearchOutlined,{fontSize:"small"})})),d&&E.unshift(_jsxruntime.jsx.call(void 0, _material.IconButton,{disabled:!0,children:_jsxruntime.jsx.call(void 0, _material.CircularProgress,{color:"primary",size:18})})),Ai.default.cloneElement(O,{},E)}return O}function v(O,d){if(!g)return O;let S=_material.createFilterOptions.call(void 0, )(O,d),{inputValue:E}=d,_=O.some(A=>E===A[g]);return E!==""&&!_&&S.push({[g]:`Adicionar op\xE7\xE3o: "${E}"`}),S}return _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, _material.Autocomplete,{disabled:m,loadingText:"Carregando...",loading:o,onChange:Y,value:e,onInputChange:K,options:n,getOptionLabel:p,filterOptions:v,renderInput:O=>_jsxruntime.jsx.call(void 0, _material.TextField,y(W(y({label:r,onDoubleClick:()=>{m||B()}},O),{InputProps:W(y({},O.InputProps),{endAdornment:q(O.InputProps.endAdornment,o,m)}),disabled:m}),b)),clearIcon:_jsxruntime.jsx.call(void 0, _iconsmaterial.BackspaceOutlined,{}),componentsProps:{clearIndicator:{sx:{visibility:"visible"}}},noOptionsText:"Nenhum registro"}),_jsxruntime.jsx.call(void 0, _providers.FormProvider,{children:_jsxruntime.jsx.call(void 0, we,W(y({open:w,onClose:()=>U(),actions:"none"},c),{children:_jsxruntime.jsxs.call(void 0, _material.Stack,{spacing:1,children:[_jsxruntime.jsxs.call(void 0, _material.Stack,{direction:"row",justifyContent:"flex-end",alignItems:"center",spacing:1,children:[_jsxruntime.jsx.call(void 0, Dr,{placeholder:"Pesquisar",onSearch:O=>P(O)}),i&&_jsxruntime.jsx.call(void 0, M,{})]}),_jsxruntime.jsx.call(void 0, s,y({query:ee,enableTransporter:!0,onTransport:O=>{U(),a&&a(O)}},l))]})}))})]})}var Vc={dialogProps:{maxWidth:"md",fullWidth:!0}};Xn.defaultProps=Vc;function Jn(t){let{label:e}=t;return _jsxruntime.jsx.call(void 0, _material.Stack,{component:"header",sx:{alignItems:"center",gap:1},children:_jsxruntime.jsx.call(void 0, _material.Typography,{component:"h1",variant:"h3",sx:{fontWeight:"medium",color:r=>r.palette.grey[600]},children:e})})}var _axios = require('axios');var Pe=qe(ns()),Bt=qe(ss()),ps=qe(ls()),cf=Object.prototype.toString,ff=Error.prototype.toString,pf=RegExp.prototype.toString,df=typeof Symbol!="undefined"?Symbol.prototype.toString:()=>"",mf=/^Symbol\((.*)\)(.*)$/;function hf(t){return t!=+t?"NaN":t===0&&1/t<0?"-0":""+t}function us(t,e=!1){if(t==null||t===!0||t===!1)return""+t;let r=typeof t;if(r==="number")return hf(t);if(r==="string")return e?`"${t}"`:t;if(r==="function")return"[Function "+(t.name||"anonymous")+"]";if(r==="symbol")return df.call(t).replace(mf,"Symbol($1)");let n=cf.call(t).slice(8,-1);return n==="Date"?isNaN(t.getTime())?""+t:t.toISOString(t):n==="Error"||t instanceof Error?"["+ff.call(t)+"]":n==="RegExp"?pf.call(t):null}function Re(t,e){let r=us(t,e);return r!==null?r:JSON.stringify(t,function(n,o){let i=us(this[n],e);return i!==null?i:o},2)}function ds(t){return t==null?[]:[].concat(t)}var ms,gf=/\$\{\s*(\w+)\s*\}/g;ms=Symbol.toStringTag;var ce=class extends Error{static formatError(e,r){let n=r.label||r.path||"this";return n!==r.path&&(r=Object.assign({},r,{path:n})),typeof e=="string"?e.replace(gf,(o,i)=>Re(r[i])):typeof e=="function"?e(r):e}static isError(e){return e&&e.name==="ValidationError"}constructor(e,r,n,o,i){super(),this.value=void 0,this.path=void 0,this.type=void 0,this.errors=void 0,this.params=void 0,this.inner=void 0,this[ms]="Error",this.name="ValidationError",this.value=r,this.path=n,this.type=o,this.errors=[],this.inner=[],ds(e).forEach(s=>{if(ce.isError(s)){this.errors.push(...s.errors);let l=s.inner.length?s.inner:[s];this.inner.push(...l)}else this.errors.push(s)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0],!i&&Error.captureStackTrace&&Error.captureStackTrace(this,ce)}},Ae={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:t,type:e,value:r,originalValue:n})=>{let o=n!=null&&n!==r?` (cast from the value \`${Re(n,!0)}\`).`:".";return e!=="mixed"?`${t} must be a \`${e}\` type, but the final value was: \`${Re(r,!0)}\``+o:`${t} must match the configured type. The validated value was: \`${Re(r,!0)}\``+o}},_e={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},Ue={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},io={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},so={isValue:"${path} field must be ${value}"},ao={noUnknown:"${path} field has unspecified keys: ${unknown}"},Ir={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},hs={notType:t=>{let{path:e,value:r,spec:n}=t,o=n.types.length;if(Array.isArray(r)){if(r.length<o)return`${e} tuple value has too few items, expected a length of ${o} but got ${r.length} for value: \`${Re(r,!0)}\``;if(r.length>o)return`${e} tuple value has too many items, expected a length of ${o} but got ${r.length} for value: \`${Re(r,!0)}\``}return ce.formatError(Ae.notType,t)}},kb=Object.assign(Object.create(null),{mixed:Ae,string:_e,number:Ue,date:io,object:ao,array:Ir,boolean:so,tuple:hs}),Yr=t=>t&&t.__isYupSchema__,mt=class{static fromOptions(e,r){if(!r.then&&!r.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:n,then:o,otherwise:i}=r,s=typeof n=="function"?n:(...l)=>l.every(a=>a===n);return new mt(e,(l,a)=>{var u;let p=s(...l)?o:i;return(u=p==null?void 0:p(a))!=null?u:a})}constructor(e,r){this.fn=void 0,this.refs=e,this.refs=e,this.fn=r}resolve(e,r){let n=this.refs.map(i=>i.getValue(r==null?void 0:r.value,r==null?void 0:r.parent,r==null?void 0:r.context)),o=this.fn(n,e,r);if(o===void 0||o===e)return e;if(!Yr(o))throw new TypeError("conditions must return a schema object");return o.resolve(r)}},Br={context:"$",value:"."};var $e=class{constructor(e,r={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof e!="string")throw new TypeError("ref must be a string, got: "+e);if(this.key=e.trim(),e==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===Br.context,this.isValue=this.key[0]===Br.value,this.isSibling=!this.isContext&&!this.isValue;let n=this.isContext?Br.context:this.isValue?Br.value:"";this.path=this.key.slice(n.length),this.getter=this.path&&(0,Pe.getter)(this.path,!0),this.map=r.map}getValue(e,r,n){let o=this.isContext?n:this.isValue?e:r;return this.getter&&(o=this.getter(o||{})),this.map&&(o=this.map(o)),o}cast(e,r){return this.getValue(e,r==null?void 0:r.parent,r==null?void 0:r.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(e){return e&&e.__isYupRef}};$e.prototype.__isYupRef=!0;var Oe=t=>t==null;function pt(t){function e({value:r,path:n="",options:o,originalValue:i,schema:s},l,a){let{name:u,test:p,params:c,message:m,skipAbsent:f}=t,{parent:g,context:b,abortEarly:w=s.spec.abortEarly,disableStackTrace:B=s.spec.disableStackTrace}=o;function U(x){return $e.isRef(x)?x.getValue(r,g,b):x}function ee(x={}){var O;let d=Object.assign({value:r,originalValue:i,label:s.spec.label,path:x.path||n,spec:s.spec},c,x.params);for(let S of Object.keys(d))d[S]=U(d[S]);let h=new ce(ce.formatError(x.message||m,d),r,d.path,x.type||u,(O=x.disableStackTrace)!=null?O:B);return h.params=d,h}let P=w?l:a,M={path:n,parent:g,type:u,from:o.from,createError:ee,resolve:U,options:o,originalValue:i,schema:s},te=x=>{ce.isError(x)?P(x):x?a(null):P(ee())},K=x=>{ce.isError(x)?P(x):l(x)};if(f&&Oe(r))return te(!0);let q;try{var v;if(q=p.call(M,r,M),typeof((v=q)==null?void 0:v.then)=="function"){if(o.sync)throw new Error(`Validation test of type: "${M.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(q).then(te,K)}}catch(x){K(x);return}te(q)}return e.OPTIONS=t,e}function yf(t,e,r,n=r){let o,i,s;return e?((0,Pe.forEach)(e,(l,a,u)=>{let p=a?l.slice(1,l.length-1):l;t=t.resolve({context:n,parent:o,value:r});let c=t.type==="tuple",m=u?parseInt(p,10):0;if(t.innerType||c){if(c&&!u)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${s}" must contain an index to the tuple element, e.g. "${s}[0]"`);if(r&&m>=r.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${l}, in the path: ${e}. because there is no value at that index. `);o=r,r=r&&r[m],t=c?t.spec.types[m]:t.innerType}if(!u){if(!t.fields||!t.fields[p])throw new Error(`The schema does not contain the path: ${e}. (failed at: ${s} which is a type: "${t.type}")`);o=r,r=r&&r[p],t=t.fields[p]}i=p,s=a?"["+l+"]":"."+l}),{schema:t,parent:o,parentPath:i}):{parent:o,parentPath:e,schema:t}}var ht=class extends Set{describe(){let e=[];for(let r of this.values())e.push($e.isRef(r)?r.describe():r);return e}resolveAll(e){let r=[];for(let n of this.values())r.push(e(n));return r}clone(){return new ht(this.values())}merge(e,r){let n=this.clone();return e.forEach(o=>n.add(o)),r.forEach(o=>n.delete(o)),n}};function dt(t,e=new Map){if(Yr(t)||!t||typeof t!="object")return t;if(e.has(t))return e.get(t);let r;if(t instanceof Date)r=new Date(t.getTime()),e.set(t,r);else if(t instanceof RegExp)r=new RegExp(t),e.set(t,r);else if(Array.isArray(t)){r=new Array(t.length),e.set(t,r);for(let n=0;n<t.length;n++)r[n]=dt(t[n],e)}else if(t instanceof Map){r=new Map,e.set(t,r);for(let[n,o]of t.entries())r.set(n,dt(o,e))}else if(t instanceof Set){r=new Set,e.set(t,r);for(let n of t)r.add(dt(n,e))}else if(t instanceof Object){r={},e.set(t,r);for(let[n,o]of Object.entries(t))r[n]=dt(o,e)}else throw Error(`Unable to clone ${t}`);return r}var se=class{constructor(e){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new ht,this._blacklist=new ht,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(Ae.notType)}),this.type=e.type,this._typeCheck=e.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},e==null?void 0:e.spec),this.withMutation(r=>{r.nonNullable()})}get _type(){return this.type}clone(e){if(this._mutate)return e&&Object.assign(this.spec,e),this;let r=Object.create(Object.getPrototypeOf(this));return r.type=this.type,r._typeCheck=this._typeCheck,r._whitelist=this._whitelist.clone(),r._blacklist=this._blacklist.clone(),r.internalTests=Object.assign({},this.internalTests),r.exclusiveTests=Object.assign({},this.exclusiveTests),r.deps=[...this.deps],r.conditions=[...this.conditions],r.tests=[...this.tests],r.transforms=[...this.transforms],r.spec=dt(Object.assign({},this.spec,e)),r}label(e){let r=this.clone();return r.spec.label=e,r}meta(...e){if(e.length===0)return this.spec.meta;let r=this.clone();return r.spec.meta=Object.assign(r.spec.meta||{},e[0]),r}withMutation(e){let r=this._mutate;this._mutate=!0;let n=e(this);return this._mutate=r,n}concat(e){if(!e||e===this)return this;if(e.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${e.type}`);let r=this,n=e.clone(),o=Object.assign({},r.spec,n.spec);return n.spec=o,n.internalTests=Object.assign({},r.internalTests,n.internalTests),n._whitelist=r._whitelist.merge(e._whitelist,e._blacklist),n._blacklist=r._blacklist.merge(e._blacklist,e._whitelist),n.tests=r.tests,n.exclusiveTests=r.exclusiveTests,n.withMutation(i=>{e.tests.forEach(s=>{i.test(s.OPTIONS)})}),n.transforms=[...r.transforms,...n.transforms],n}isType(e){return e==null?!!(this.spec.nullable&&e===null||this.spec.optional&&e===void 0):this._typeCheck(e)}resolve(e){let r=this;if(r.conditions.length){let n=r.conditions;r=r.clone(),r.conditions=[],r=n.reduce((o,i)=>i.resolve(o,e),r),r=r.resolve(e)}return r}resolveOptions(e){var r,n,o,i;return Object.assign({},e,{from:e.from||[],strict:(r=e.strict)!=null?r:this.spec.strict,abortEarly:(n=e.abortEarly)!=null?n:this.spec.abortEarly,recursive:(o=e.recursive)!=null?o:this.spec.recursive,disableStackTrace:(i=e.disableStackTrace)!=null?i:this.spec.disableStackTrace})}cast(e,r={}){let n=this.resolve(Object.assign({value:e},r)),o=r.assert==="ignore-optionality",i=n._cast(e,r);if(r.assert!==!1&&!n.isType(i)){if(o&&Oe(i))return i;let s=Re(e),l=Re(i);throw new TypeError(`The value of ${r.path||"field"} could not be cast to a value that satisfies the schema type: "${n.type}".
7
7
 
8
8
  attempted value: ${s}
9
9
  `+(l!==s?`result of cast: ${l}`:""))}return i}_cast(e,r){let n=e===void 0?e:this.transforms.reduce((o,i)=>i.call(this,o,e,this),e);return n===void 0&&(n=this.getDefault(r)),n}_validate(e,r={},n,o){let{path:i,originalValue:s=e,strict:l=this.spec.strict}=r,a=e;l||(a=this._cast(a,Object.assign({assert:!1},r)));let u=[];for(let p of Object.values(this.internalTests))p&&u.push(p);this.runTests({path:i,value:a,originalValue:s,options:r,tests:u},n,p=>{if(p.length)return o(p,a);this.runTests({path:i,value:a,originalValue:s,options:r,tests:this.tests},n,o)})}runTests(e,r,n){let o=!1,{tests:i,value:s,originalValue:l,path:a,options:u}=e,p=b=>{o||(o=!0,r(b,s))},c=b=>{o||(o=!0,n(b,s))},m=i.length,f=[];if(!m)return c([]);let g={value:s,originalValue:l,path:a,options:u,schema:this};for(let b=0;b<i.length;b++){let w=i[b];w(g,p,function(U){U&&(Array.isArray(U)?f.push(...U):f.push(U)),--m<=0&&c(f)})}}asNestedTest({key:e,index:r,parent:n,parentPath:o,originalParent:i,options:s}){let l=e!=null?e:r;if(l==null)throw TypeError("Must include `key` or `index` for nested validations");let a=typeof l=="number",u=n[l],p=Object.assign({},s,{strict:!0,parent:n,value:u,originalValue:i[l],key:void 0,[a?"index":"key"]:l,path:a||l.includes(".")?`${o||""}[${u?l:`"${l}"`}]`:(o?`${o}.`:"")+e});return(c,m,f)=>this.resolve(p)._validate(u,p,m,f)}validate(e,r){var n;let o=this.resolve(Object.assign({},r,{value:e})),i=(n=r==null?void 0:r.disableStackTrace)!=null?n:o.spec.disableStackTrace;return new Promise((s,l)=>o._validate(e,r,(a,u)=>{ce.isError(a)&&(a.value=u),l(a)},(a,u)=>{a.length?l(new ce(a,u,void 0,void 0,i)):s(u)}))}validateSync(e,r){var n;let o=this.resolve(Object.assign({},r,{value:e})),i,s=(n=r==null?void 0:r.disableStackTrace)!=null?n:o.spec.disableStackTrace;return o._validate(e,Object.assign({},r,{sync:!0}),(l,a)=>{throw ce.isError(l)&&(l.value=a),l},(l,a)=>{if(l.length)throw new ce(l,e,void 0,void 0,s);i=a}),i}isValid(e,r){return this.validate(e,r).then(()=>!0,n=>{if(ce.isError(n))return!1;throw n})}isValidSync(e,r){try{return this.validateSync(e,r),!0}catch(n){if(ce.isError(n))return!1;throw n}}_getDefault(e){let r=this.spec.default;return r==null?r:typeof r=="function"?r.call(this,e):dt(r)}getDefault(e){return this.resolve(e||{})._getDefault(e)}default(e){return arguments.length===0?this._getDefault():this.clone({default:e})}strict(e=!0){return this.clone({strict:e})}nullability(e,r){let n=this.clone({nullable:e});return n.internalTests.nullable=pt({message:r,name:"nullable",test(o){return o===null?this.schema.spec.nullable:!0}}),n}optionality(e,r){let n=this.clone({optional:e});return n.internalTests.optionality=pt({message:r,name:"optionality",test(o){return o===void 0?this.schema.spec.optional:!0}}),n}optional(){return this.optionality(!0)}defined(e=Ae.defined){return this.optionality(!1,e)}nullable(){return this.nullability(!0)}nonNullable(e=Ae.notNull){return this.nullability(!1,e)}required(e=Ae.required){return this.clone().withMutation(r=>r.nonNullable(e).defined(e))}notRequired(){return this.clone().withMutation(e=>e.nullable().optional())}transform(e){let r=this.clone();return r.transforms.push(e),r}test(...e){let r;if(e.length===1?typeof e[0]=="function"?r={test:e[0]}:r=e[0]:e.length===2?r={name:e[0],test:e[1]}:r={name:e[0],message:e[1],test:e[2]},r.message===void 0&&(r.message=Ae.default),typeof r.test!="function")throw new TypeError("`test` is a required parameters");let n=this.clone(),o=pt(r),i=r.exclusive||r.name&&n.exclusiveTests[r.name]===!0;if(r.exclusive&&!r.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return r.name&&(n.exclusiveTests[r.name]=!!r.exclusive),n.tests=n.tests.filter(s=>!(s.OPTIONS.name===r.name&&(i||s.OPTIONS.test===o.OPTIONS.test))),n.tests.push(o),n}when(e,r){!Array.isArray(e)&&typeof e!="string"&&(r=e,e=".");let n=this.clone(),o=ds(e).map(i=>new $e(i));return o.forEach(i=>{i.isSibling&&n.deps.push(i.key)}),n.conditions.push(typeof r=="function"?new mt(o,r):mt.fromOptions(o,r)),n}typeError(e){let r=this.clone();return r.internalTests.typeError=pt({message:e,name:"typeError",skipAbsent:!0,test(n){return this.schema._typeCheck(n)?!0:this.createError({params:{type:this.schema.type}})}}),r}oneOf(e,r=Ae.oneOf){let n=this.clone();return e.forEach(o=>{n._whitelist.add(o),n._blacklist.delete(o)}),n.internalTests.whiteList=pt({message:r,name:"oneOf",skipAbsent:!0,test(o){let i=this.schema._whitelist,s=i.resolveAll(this.resolve);return s.includes(o)?!0:this.createError({params:{values:Array.from(i).join(", "),resolved:s}})}}),n}notOneOf(e,r=Ae.notOneOf){let n=this.clone();return e.forEach(o=>{n._blacklist.add(o),n._whitelist.delete(o)}),n.internalTests.blacklist=pt({message:r,name:"notOneOf",test(o){let i=this.schema._blacklist,s=i.resolveAll(this.resolve);return s.includes(o)?this.createError({params:{values:Array.from(i).join(", "),resolved:s}}):!0}}),n}strip(e=!0){let r=this.clone();return r.spec.strip=e,r}describe(e){let r=(e?this.resolve(e):this).clone(),{label:n,meta:o,optional:i,nullable:s}=r.spec;return{meta:o,label:n,optional:i,nullable:s,default:r.getDefault(e),type:r.type,oneOf:r._whitelist.describe(),notOneOf:r._blacklist.describe(),tests:r.tests.map(a=>({name:a.OPTIONS.name,params:a.OPTIONS.params})).filter((a,u,p)=>p.findIndex(c=>c.name===a.name)===u)}}};se.prototype.__isYupSchema__=!0;for(let t of["validate","validateSync"])se.prototype[`${t}At`]=function(e,r,n={}){let{parent:o,parentPath:i,schema:s}=yf(this,e,r,n.context);return s[t](o&&o[i],Object.assign({},n,{parent:o,path:e}))};for(let t of["equals","is"])se.prototype[t]=se.prototype.oneOf;for(let t of["not","nope"])se.prototype[t]=se.prototype.notOneOf;var xf=()=>!0;function bf(t){return new jr(t)}var jr=class extends se{constructor(e){super(typeof e=="function"?{type:"mixed",check:e}:Object.assign({type:"mixed",check:xf},e))}};bf.prototype=jr.prototype;function vf(){return new Nr}var Nr=class extends se{constructor(){super({type:"boolean",check(e){return e instanceof Boolean&&(e=e.valueOf()),typeof e=="boolean"}}),this.withMutation(()=>{this.transform((e,r,n)=>{if(n.spec.coerce&&!n.isType(e)){if(/^(true|1)$/i.test(String(e)))return!0;if(/^(false|0)$/i.test(String(e)))return!1}return e})})}isTrue(e=so.isValue){return this.test({message:e,name:"is-value",exclusive:!0,params:{value:"true"},test(r){return Oe(r)||r===!0}})}isFalse(e=so.isValue){return this.test({message:e,name:"is-value",exclusive:!0,params:{value:"false"},test(r){return Oe(r)||r===!1}})}default(e){return super.default(e)}defined(e){return super.defined(e)}optional(){return super.optional()}required(e){return super.required(e)}notRequired(){return super.notRequired()}nullable(){return super.nullable()}nonNullable(e){return super.nonNullable(e)}strip(e){return super.strip(e)}};vf.prototype=Nr.prototype;var Tf=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Cf=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,Sf=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,Pf=t=>Oe(t)||t===t.trim(),Ef={}.toString();function Be(){return new zr}var zr=class extends se{constructor(){super({type:"string",check(e){return e instanceof String&&(e=e.valueOf()),typeof e=="string"}}),this.withMutation(()=>{this.transform((e,r,n)=>{if(!n.spec.coerce||n.isType(e)||Array.isArray(e))return e;let o=e!=null&&e.toString?e.toString():e;return o===Ef?e:o})})}required(e){return super.required(e).withMutation(r=>r.test({message:e||Ae.required,name:"required",skipAbsent:!0,test:n=>!!n.length}))}notRequired(){return super.notRequired().withMutation(e=>(e.tests=e.tests.filter(r=>r.OPTIONS.name!=="required"),e))}length(e,r=_e.length){return this.test({message:r,name:"length",exclusive:!0,params:{length:e},skipAbsent:!0,test(n){return n.length===this.resolve(e)}})}min(e,r=_e.min){return this.test({message:r,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(n){return n.length>=this.resolve(e)}})}max(e,r=_e.max){return this.test({name:"max",exclusive:!0,message:r,params:{max:e},skipAbsent:!0,test(n){return n.length<=this.resolve(e)}})}matches(e,r){let n=!1,o,i;return r&&(typeof r=="object"?{excludeEmptyString:n=!1,message:o,name:i}=r:o=r),this.test({name:i||"matches",message:o||_e.matches,params:{regex:e},skipAbsent:!0,test:s=>s===""&&n||s.search(e)!==-1})}email(e=_e.email){return this.matches(Tf,{name:"email",message:e,excludeEmptyString:!0})}url(e=_e.url){return this.matches(Cf,{name:"url",message:e,excludeEmptyString:!0})}uuid(e=_e.uuid){return this.matches(Sf,{name:"uuid",message:e,excludeEmptyString:!1})}ensure(){return this.default("").transform(e=>e===null?"":e)}trim(e=_e.trim){return this.transform(r=>r!=null?r.trim():r).test({message:e,name:"trim",test:Pf})}lowercase(e=_e.lowercase){return this.transform(r=>Oe(r)?r:r.toLowerCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>Oe(r)||r===r.toLowerCase()})}uppercase(e=_e.uppercase){return this.transform(r=>Oe(r)?r:r.toUpperCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>Oe(r)||r===r.toUpperCase()})}};Be.prototype=zr.prototype;var wf=t=>t!=+t;function _f(){return new Vr}var Vr=class extends se{constructor(){super({type:"number",check(e){return e instanceof Number&&(e=e.valueOf()),typeof e=="number"&&!wf(e)}}),this.withMutation(()=>{this.transform((e,r,n)=>{if(!n.spec.coerce)return e;let o=e;if(typeof o=="string"){if(o=o.replace(/\s/g,""),o==="")return NaN;o=+o}return n.isType(o)||o===null?o:parseFloat(o)})})}min(e,r=Ue.min){return this.test({message:r,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(n){return n>=this.resolve(e)}})}max(e,r=Ue.max){return this.test({message:r,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(n){return n<=this.resolve(e)}})}lessThan(e,r=Ue.lessThan){return this.test({message:r,name:"max",exclusive:!0,params:{less:e},skipAbsent:!0,test(n){return n<this.resolve(e)}})}moreThan(e,r=Ue.moreThan){return this.test({message:r,name:"min",exclusive:!0,params:{more:e},skipAbsent:!0,test(n){return n>this.resolve(e)}})}positive(e=Ue.positive){return this.moreThan(0,e)}negative(e=Ue.negative){return this.lessThan(0,e)}integer(e=Ue.integer){return this.test({name:"integer",message:e,skipAbsent:!0,test:r=>Number.isInteger(r)})}truncate(){return this.transform(e=>Oe(e)?e:e|0)}round(e){var r;let n=["ceil","floor","round","trunc"];if(e=((r=e)==null?void 0:r.toLowerCase())||"round",e==="trunc")return this.truncate();if(n.indexOf(e.toLowerCase())===-1)throw new TypeError("Only valid options for round() are: "+n.join(", "));return this.transform(o=>Oe(o)?o:Math[e](o))}};_f.prototype=Vr.prototype;var Of=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function De(t,e=0){return Number(t)||e}function Ff(t){let e=Of.exec(t);if(!e)return Date.parse?Date.parse(t):Number.NaN;let r={year:De(e[1]),month:De(e[2],1)-1,day:De(e[3],1),hour:De(e[4]),minute:De(e[5]),second:De(e[6]),millisecond:e[7]?De(e[7].substring(0,3)):0,z:e[8]||void 0,plusMinus:e[9]||void 0,hourOffset:De(e[10]),minuteOffset:De(e[11])};if(r.z===void 0&&r.plusMinus===void 0)return new Date(r.year,r.month,r.day,r.hour,r.minute,r.second,r.millisecond).valueOf();let n=0;return r.z!=="Z"&&r.plusMinus!==void 0&&(n=r.hourOffset*60+r.minuteOffset,r.plusMinus==="+"&&(n=0-n)),Date.UTC(r.year,r.month,r.day,r.hour,r.minute+n,r.second,r.millisecond)}var gs=new Date(""),kf=t=>Object.prototype.toString.call(t)==="[object Date]";function ys(){return new Ze}var Ze=class extends se{constructor(){super({type:"date",check(e){return kf(e)&&!isNaN(e.getTime())}}),this.withMutation(()=>{this.transform((e,r,n)=>!n.spec.coerce||n.isType(e)||e===null?e:(e=Ff(e),isNaN(e)?Ze.INVALID_DATE:new Date(e)))})}prepareParam(e,r){let n;if($e.isRef(e))n=e;else{let o=this.cast(e);if(!this._typeCheck(o))throw new TypeError(`\`${r}\` must be a Date or a value that can be \`cast()\` to a Date`);n=o}return n}min(e,r=io.min){let n=this.prepareParam(e,"min");return this.test({message:r,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(o){return o>=this.resolve(n)}})}max(e,r=io.max){let n=this.prepareParam(e,"max");return this.test({message:r,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(o){return o<=this.resolve(n)}})}};Ze.INVALID_DATE=gs;ys.prototype=Ze.prototype;ys.INVALID_DATE=gs;function Af(t,e=[]){let r=[],n=new Set,o=new Set(e.map(([s,l])=>`${s}-${l}`));function i(s,l){let a=(0,Pe.split)(s)[0];n.add(a),o.has(`${l}-${a}`)||r.push([l,a])}for(let s of Object.keys(t)){let l=t[s];n.add(s),$e.isRef(l)&&l.isSibling?i(l.path,s):Yr(l)&&"deps"in l&&l.deps.forEach(a=>i(a,s))}return ps.default.array(Array.from(n),r).reverse()}function cs(t,e){let r=1/0;return t.some((n,o)=>{var i;if((i=e.path)!=null&&i.includes(n))return r=o,!0}),r}function xs(t){return(e,r)=>cs(t,e)-cs(t,r)}var bs=(t,e,r)=>{if(typeof t!="string")return t;let n=t;try{n=JSON.parse(t)}catch(o){}return r.isType(n)?n:t};function Lr(t){if("fields"in t){let e={};for(let[r,n]of Object.entries(t.fields))e[r]=Lr(n);return t.setFields(e)}if(t.type==="array"){let e=t.optional();return e.innerType&&(e.innerType=Lr(e.innerType)),e}return t.type==="tuple"?t.optional().clone({types:t.spec.types.map(Lr)}):"optional"in t?t.optional():t}var Mf=(t,e)=>{let r=[...(0,Pe.normalizePath)(e)];if(r.length===1)return r[0]in t;let n=r.pop(),o=(0,Pe.getter)((0,Pe.join)(r),!0)(t);return!!(o&&n in o)},fs=t=>Object.prototype.toString.call(t)==="[object Object]";function Df(t,e){let r=Object.keys(t.fields);return Object.keys(e).filter(n=>r.indexOf(n)===-1)}var Rf=xs([]);function Xe(t){return new Ur(t)}var Ur=class extends se{constructor(e){super({type:"object",check(r){return fs(r)||typeof r=="function"}}),this.fields=Object.create(null),this._sortErrors=Rf,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{e&&this.shape(e)})}_cast(e,r={}){var n;let o=super._cast(e,r);if(o===void 0)return this.getDefault(r);if(!this._typeCheck(o))return o;let i=this.fields,s=(n=r.stripUnknown)!=null?n:this.spec.noUnknown,l=[].concat(this._nodes,Object.keys(o).filter(c=>!this._nodes.includes(c))),a={},u=Object.assign({},r,{parent:a,__validating:r.__validating||!1}),p=!1;for(let c of l){let m=i[c],f=c in o;if(m){let g,b=o[c];u.path=(r.path?`${r.path}.`:"")+c,m=m.resolve({value:b,context:r.context,parent:a});let w=m instanceof se?m.spec:void 0,B=w==null?void 0:w.strict;if(w!=null&&w.strip){p=p||c in o;continue}g=!r.__validating||!B?m.cast(o[c],u):o[c],g!==void 0&&(a[c]=g)}else f&&!s&&(a[c]=o[c]);(f!==c in a||a[c]!==o[c])&&(p=!0)}return p?a:o}_validate(e,r={},n,o){let{from:i=[],originalValue:s=e,recursive:l=this.spec.recursive}=r;r.from=[{schema:this,value:s},...i],r.__validating=!0,r.originalValue=s,super._validate(e,r,n,(a,u)=>{if(!l||!fs(u)){o(a,u);return}s=s||u;let p=[];for(let c of this._nodes){let m=this.fields[c];!m||$e.isRef(m)||p.push(m.asNestedTest({options:r,key:c,parent:u,parentPath:r.path,originalParent:s}))}this.runTests({tests:p,value:u,originalValue:s,options:r},n,c=>{o(c.sort(this._sortErrors).concat(a),u)})})}clone(e){let r=super.clone(e);return r.fields=Object.assign({},this.fields),r._nodes=this._nodes,r._excludedEdges=this._excludedEdges,r._sortErrors=this._sortErrors,r}concat(e){let r=super.concat(e),n=r.fields;for(let[o,i]of Object.entries(this.fields)){let s=n[o];n[o]=s===void 0?i:s}return r.withMutation(o=>o.setFields(n,[...this._excludedEdges,...e._excludedEdges]))}_getDefault(e){if("default"in this.spec)return super._getDefault(e);if(!this._nodes.length)return;let r={};return this._nodes.forEach(n=>{var o;let i=this.fields[n],s=e;(o=s)!=null&&o.value&&(s=Object.assign({},s,{parent:s.value,value:s.value[n]})),r[n]=i&&"getDefault"in i?i.getDefault(s):void 0}),r}setFields(e,r){let n=this.clone();return n.fields=e,n._nodes=Af(e,r),n._sortErrors=xs(Object.keys(e)),r&&(n._excludedEdges=r),n}shape(e,r=[]){return this.clone().withMutation(n=>{let o=n._excludedEdges;return r.length&&(Array.isArray(r[0])||(r=[r]),o=[...n._excludedEdges,...r]),n.setFields(Object.assign(n.fields,e),o)})}partial(){let e={};for(let[r,n]of Object.entries(this.fields))e[r]="optional"in n&&n.optional instanceof Function?n.optional():n;return this.setFields(e)}deepPartial(){return Lr(this)}pick(e){let r={};for(let n of e)this.fields[n]&&(r[n]=this.fields[n]);return this.setFields(r,this._excludedEdges.filter(([n,o])=>e.includes(n)&&e.includes(o)))}omit(e){let r=[];for(let n of Object.keys(this.fields))e.includes(n)||r.push(n);return this.pick(r)}from(e,r,n){let o=(0,Pe.getter)(e,!0);return this.transform(i=>{if(!i)return i;let s=i;return Mf(i,e)&&(s=Object.assign({},i),n||delete s[e],s[r]=o(i)),s})}json(){return this.transform(bs)}noUnknown(e=!0,r=ao.noUnknown){typeof e!="boolean"&&(r=e,e=!0);let n=this.test({name:"noUnknown",exclusive:!0,message:r,test(o){if(o==null)return!0;let i=Df(this.schema,o);return!e||i.length===0||this.createError({params:{unknown:i.join(", ")}})}});return n.spec.noUnknown=e,n}unknown(e=!0,r=ao.noUnknown){return this.noUnknown(!e,r)}transformKeys(e){return this.transform(r=>{if(!r)return r;let n={};for(let o of Object.keys(r))n[e(o)]=r[o];return n})}camelCase(){return this.transformKeys(Bt.camelCase)}snakeCase(){return this.transformKeys(Bt.snakeCase)}constantCase(){return this.transformKeys(e=>(0,Bt.snakeCase)(e).toUpperCase())}describe(e){let r=(e?this.resolve(e):this).clone(),n=super.describe(e);n.fields={};for(let[i,s]of Object.entries(r.fields)){var o;let l=e;(o=l)!=null&&o.value&&(l=Object.assign({},l,{parent:l.value,value:l.value[i]})),n.fields[i]=s.describe(l)}return n}};Xe.prototype=Ur.prototype;function $f(t){return new qr(t)}var qr=class extends se{constructor(e){super({type:"array",spec:{types:e},check(r){return Array.isArray(r)}}),this.innerType=void 0,this.innerType=e}_cast(e,r){let n=super._cast(e,r);if(!this._typeCheck(n)||!this.innerType)return n;let o=!1,i=n.map((s,l)=>{let a=this.innerType.cast(s,Object.assign({},r,{path:`${r.path||""}[${l}]`}));return a!==s&&(o=!0),a});return o?i:n}_validate(e,r={},n,o){var i;let s=this.innerType,l=(i=r.recursive)!=null?i:this.spec.recursive;r.originalValue!=null&&r.originalValue,super._validate(e,r,n,(a,u)=>{var p;if(!l||!s||!this._typeCheck(u)){o(a,u);return}let c=new Array(u.length);for(let f=0;f<u.length;f++){var m;c[f]=s.asNestedTest({options:r,index:f,parent:u,parentPath:r.path,originalParent:(m=r.originalValue)!=null?m:e})}this.runTests({value:u,tests:c,originalValue:(p=r.originalValue)!=null?p:e,options:r},n,f=>o(f.concat(a),u))})}clone(e){let r=super.clone(e);return r.innerType=this.innerType,r}json(){return this.transform(bs)}concat(e){let r=super.concat(e);return r.innerType=this.innerType,e.innerType&&(r.innerType=r.innerType?r.innerType.concat(e.innerType):e.innerType),r}of(e){let r=this.clone();if(!Yr(e))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+Re(e));return r.innerType=e,r.spec=Object.assign({},r.spec,{types:e}),r}length(e,r=Ir.length){return this.test({message:r,name:"length",exclusive:!0,params:{length:e},skipAbsent:!0,test(n){return n.length===this.resolve(e)}})}min(e,r){return r=r||Ir.min,this.test({message:r,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(n){return n.length>=this.resolve(e)}})}max(e,r){return r=r||Ir.max,this.test({message:r,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(n){return n.length<=this.resolve(e)}})}ensure(){return this.default(()=>[]).transform((e,r)=>this._typeCheck(e)?e:r==null?[]:[].concat(r))}compact(e){let r=e?(n,o,i)=>!e(n,o,i):n=>!!n;return this.transform(n=>n!=null?n.filter(r):n)}describe(e){let r=(e?this.resolve(e):this).clone(),n=super.describe(e);if(r.innerType){var o;let i=e;(o=i)!=null&&o.value&&(i=Object.assign({},i,{parent:i.value,value:i.value[0]})),n.innerType=r.innerType.describe(i)}return n}};$f.prototype=qr.prototype;function Bf(t){return new Wr(t)}var Wr=class extends se{constructor(e){super({type:"tuple",spec:{types:e},check(r){let n=this.spec.types;return Array.isArray(r)&&r.length===n.length}}),this.withMutation(()=>{this.typeError(hs.notType)})}_cast(e,r){let{types:n}=this.spec,o=super._cast(e,r);if(!this._typeCheck(o))return o;let i=!1,s=n.map((l,a)=>{let u=l.cast(o[a],Object.assign({},r,{path:`${r.path||""}[${a}]`}));return u!==o[a]&&(i=!0),u});return i?s:o}_validate(e,r={},n,o){let i=this.spec.types;super._validate(e,r,n,(s,l)=>{var a;if(!this._typeCheck(l)){o(s,l);return}let u=[];for(let[c,m]of i.entries()){var p;u[c]=m.asNestedTest({options:r,index:c,parent:l,parentPath:r.path,originalParent:(p=r.originalValue)!=null?p:e})}this.runTests({value:l,tests:u,originalValue:(a=r.originalValue)!=null?a:e,options:r},n,c=>o(c.concat(s),l))})}describe(e){let r=(e?this.resolve(e):this).clone(),n=super.describe(e);return n.innerType=r.spec.types.map((o,i)=>{var s;let l=e;return(s=l)!=null&&s.value&&(l=Object.assign({},l,{parent:l.value,value:l.value[i]})),o.describe(l)}),n}};Bf.prototype=Wr.prototype;var _isStrongPassword = require('validator/lib/isStrongPassword'); var _isStrongPassword2 = _interopRequireDefault(_isStrongPassword);function It(t){let u=t,{name:e,label:r,value:n,onChange:o}=u,i=X(u,["name","label","value","onChange"]),[s,l]=_react.useState.call(void 0, !1);function a(){l(!s)}return _jsxruntime.jsx.call(void 0, _material.TextField,y({name:e,label:r,value:n||"",onChange:o,type:s?"text":"password",InputProps:{endAdornment:_jsxruntime.jsx.call(void 0, _material.InputAdornment,{position:"start",children:_jsxruntime.jsx.call(void 0, _material.InputAdornment,{position:"end",children:_jsxruntime.jsx.call(void 0, _material.IconButton,{onClick:a,edge:"end",children:s?_jsxruntime.jsx.call(void 0, _iconsmaterial.VisibilityOff,{}):_jsxruntime.jsx.call(void 0, _iconsmaterial.Visibility,{})})})})}},i))}function Je(t){let{isValid:e,message:r}=t,n=_material.useTheme.call(void 0, );return _jsxruntime.jsxs.call(void 0, _material.Box,{sx:{display:"flex",flexDirection:"row",alignItems:"center"},children:[_jsxruntime.jsx.call(void 0, _iconsmaterial.Circle,{color:e?"success":"inherit",sx:{fontSize:"8pt"}}),_jsxruntime.jsx.call(void 0, _material.Typography,{variant:"body2",sx:{color:e?n.palette.success.main:"inherit",textDecoration:e?"line-through":"none",ml:1,fontSize:"10pt"},children:r})]})}var Es={senhaAtual:"",senhaNova:""},Jf=Xe().shape({senhaAtual:Be().required("Informe a Senha Atual."),senhaNova:Be().required("Informe a Nova Senha.")});function Kr(t){let{isOpen:e,credentialsConfig:r,onClose:n,onSuccess:o,onFailed:i,primeiroAcesso:s,senhaAtual:l,email:a}=t,{alterarSenha:u,isSubmitting:p}=_hooks.useCredentials.call(void 0, r),{setValidationErrors:c,validationProps:m}=_hooks.useValidations.call(void 0, ),{data:f,handleChange:g,setData:b,changeValue:w}=_hooks.useForm.call(void 0, Es),[B,U]=_react.useState.call(void 0, !1),[ee,P]=_react.useState.call(void 0, null);_react.useEffect.call(void 0, ()=>{l&&w("senhaAtual",l)},[l]),_react.useEffect.call(void 0, ()=>{f.senhaNova&&U(_isStrongPassword2.default.call(void 0, f.senhaNova,{minLength:8,minLowercase:1,minUppercase:1,minNumbers:1,minSymbols:1}))},[f.senhaNova]);function M(){return ue(this,null,function*(){c(null),P(null),Jf.validate(f,{abortEarly:!1}).then(()=>ue(this,null,function*(){var d;let{senhaAtual:x,senhaNova:O}=f;try{(yield u(x,O,a))&&(o&&o(),b(Es))}catch(h){if(i&&i(h),_axios.isAxiosError.call(void 0, h)){P((d=h.response)==null?void 0:d.data.message);return}P("Ocorreu um erro ao tentar alterar a senha")}})).catch(x=>{c(x)})})}function te(){return(f==null?void 0:f.senhaNova.length)>=8}function K(){if(f!=null&&f.senhaNova){let x=f==null?void 0:f.senhaNova.match(/[a-z]/g);return Array.isArray(x)&&x.length>0}return!1}function Y(){if(f!=null&&f.senhaNova){let x=f==null?void 0:f.senhaNova.match(/[A-Z]/g);return Array.isArray(x)&&x.length>0}return!1}function q(){if(f!=null&&f.senhaNova){let x=f==null?void 0:f.senhaNova.match(/\d/g);return Array.isArray(x)&&x.length>0}return!1}function v(){if(f!=null&&f.senhaNova){let x=f==null?void 0:f.senhaNova.match(/\W/g);return Array.isArray(x)&&x.length>0}return!1}return _jsxruntime.jsx.call(void 0, we,{title:"Atualizar senha",open:!!e,onClose:()=>n(),actions:_jsxruntime.jsxs.call(void 0, Le,{children:[_jsxruntime.jsx.call(void 0, ne,{title:"Cancelar altera\xE7\xE3o de senha",color:"error",onClick:n,children:"Cancelar"}),_jsxruntime.jsx.call(void 0, ne,{title:"Confirmar altera\xE7\xE3o de senha",variant:"contained",onClick:M,isLoading:p,disabled:!B,children:"Alterar Senha"})]}),children:_jsxruntime.jsxs.call(void 0, _material.Grid,{container:!0,spacing:2,children:[s&&_jsxruntime.jsx.call(void 0, _material.Grid,{item:!0,xl:12,lg:12,md:12,sm:12,xs:12,children:_jsxruntime.jsxs.call(void 0, _material.Alert,{severity:"info",children:["Voc\xEA est\xE1 acessando o sistema com uma senha tempor\xE1ria.",_jsxruntime.jsx.call(void 0, "br",{}),"Cadastre uma senha segura para deixar sua conta mais protegida."]})}),_jsxruntime.jsx.call(void 0, _material.Grid,{item:!0,xl:12,lg:12,md:12,sm:12,xs:12,children:_jsxruntime.jsx.call(void 0, It,y({name:"senhaAtual",label:"Senha Atual",value:(f==null?void 0:f.senhaAtual)||"",onChange:g},m("senhaAtual")))}),_jsxruntime.jsx.call(void 0, _material.Grid,{item:!0,xl:12,lg:12,md:12,sm:12,xs:12,children:_jsxruntime.jsx.call(void 0, It,y({name:"senhaNova",label:"Nova Senha",value:(f==null?void 0:f.senhaNova)||"",onChange:g},m("senhaNova")))}),_jsxruntime.jsxs.call(void 0, _material.Grid,{item:!0,xl:12,lg:12,md:12,sm:12,xs:12,children:[_jsxruntime.jsx.call(void 0, Je,{isValid:te(),message:"O tamanho m\xEDnimo da nova senha \xE9 de 8 caracteres"}),_jsxruntime.jsx.call(void 0, Je,{isValid:K(),message:"A nova senha deve ter ao menos uma letra min\xFAscula"}),_jsxruntime.jsx.call(void 0, Je,{isValid:Y(),message:"A nova senha deve ter ao menos uma letra mai\xFAscula"}),_jsxruntime.jsx.call(void 0, Je,{isValid:q(),message:"A nova senha deve ter ao menos um n\xFAmero"}),_jsxruntime.jsx.call(void 0, Je,{isValid:v(),message:"A nova senha deve ter ao menos um caracter especial"})]}),ee&&_jsxruntime.jsx.call(void 0, _material.Grid,{item:!0,xl:12,lg:12,md:12,sm:12,xs:12,children:_jsxruntime.jsx.call(void 0, _material.Alert,{severity:"error",children:ee})})]})})}var sp=Xe().shape({email:Be().required("Informe o e-mail"),password:Be().required("Informe a senha")});function uo(t){let{onLoginSuccess:e,onLoginFailed:r,onEsqueciSenhaClick:n,credentialsConfig:o}=t,[i,s]=_react.useState.call(void 0, ""),[l,a]=_react.useState.call(void 0, ""),[u,p]=_react.useState.call(void 0, !1),[c,m]=_react.useState.call(void 0, !1),[f,g]=_react.useState.call(void 0, !1),[b,w]=_react.useState.call(void 0, !1),[B,U]=_react.useState.call(void 0, null),{login:ee}=_hooks.useCredentials.call(void 0, o),{validationProps:P,setValidationErrors:M}=_hooks.useValidations.call(void 0, );function te(){p(!u)}function K(){return ue(this,null,function*(){M(null),U(null),sp.validate({email:i,password:l},{abortEarly:!1}).then(()=>ue(this,null,function*(){var Y,q;m(!0);try{let v=yield ee(i,l);v&&e(v)}catch(v){if(_axios.isAxiosError.call(void 0, v)){if(((Y=v.response)==null?void 0:Y.data.code)==="E_FIRST_ACCESS"){g(!0);return}U((q=v.response)==null?void 0:q.data.message)}r(v)}})).catch(Y=>{M(Y)}).finally(()=>{m(!1)})})}return _jsxruntime.jsxs.call(void 0, _material.Box,{component:"form",children:[b&&_jsxruntime.jsxs.call(void 0, _material.Alert,{severity:"success",children:["Senha cadastrada com sucesso",_jsxruntime.jsx.call(void 0, "br",{}),"Tudo pronto para voc\xEA fazer o login"]}),_jsxruntime.jsx.call(void 0, _material.TextField,y({name:"email",label:"E-mail",margin:"normal",autoFocus:!0,value:i||"",onChange:Y=>s(Y.target.value)},P("email"))),_jsxruntime.jsx.call(void 0, _material.TextField,y({name:"password",label:"Senha",margin:"normal",value:l||"",onChange:Y=>a(Y.target.value),type:u?"text":"password",onKeyDown:Y=>Y.key==="Enter"&&K(),InputProps:{endAdornment:_jsxruntime.jsx.call(void 0, _material.InputAdornment,{position:"start",children:_jsxruntime.jsx.call(void 0, _material.InputAdornment,{position:"end",children:_jsxruntime.jsx.call(void 0, _material.IconButton,{onClick:te,edge:"end",children:u?_jsxruntime.jsx.call(void 0, _iconsmaterial.VisibilityOff,{}):_jsxruntime.jsx.call(void 0, _iconsmaterial.Visibility,{})})})})}},P("password"))),_jsxruntime.jsx.call(void 0, ne,{fullWidth:!0,variant:"contained",onClick:K,isLoading:c,sx:{mt:1},children:"Entrar"}),_jsxruntime.jsx.call(void 0, ne,{onClick:n,variant:"text",sx:{marginTop:.5,fontWeight:"400",":hover":{color:Y=>Y.palette.primary.dark}},children:"Esqueci a senha"}),B&&_jsxruntime.jsx.call(void 0, _material.Alert,{severity:"error",children:B}),_jsxruntime.jsx.call(void 0, Kr,{senhaAtual:l,email:i,primeiroAcesso:!0,isOpen:f,onClose:()=>g(!1),onSuccess:()=>{g(!1),w(!0),a("")},credentialsConfig:o})]})}var fp=Xe().shape({email:Be().required("Informe o e-mail")});function co(t){let{onLoginClick:e,credentialsConfig:r}=t,[n,o]=_react.useState.call(void 0, ""),[i,s]=_react.useState.call(void 0, !1),[l,a]=_react.useState.call(void 0, !1),[u,p]=_react.useState.call(void 0, null),{recuperarSenha:c}=_hooks.useCredentials.call(void 0, r),{validationProps:m,setValidationErrors:f}=_hooks.useValidations.call(void 0, );function g(){return ue(this,null,function*(){f(null),fp.validate({email:n},{abortEarly:!1}).then(()=>ue(this,null,function*(){var b;try{s(!0),yield c(n),a(!0)}catch(w){p((b=w.response)==null?void 0:b.data.message)}finally{s(!1)}})).catch(b=>{f(b)})})}return _jsxruntime.jsxs.call(void 0, _material.Box,{component:"form",children:[_jsxruntime.jsx.call(void 0, _material.TextField,y({name:"email",label:"E-mail",margin:"normal",placeholder:"Informe o e-mail utilizado para acessar o sistema",autoFocus:!0,value:n||"",onChange:b=>o(b.target.value)},m("email"))),_jsxruntime.jsxs.call(void 0, Le,{sx:{display:"inline-flex",justifyContent:"space-between",width:"100%",marginTop:1},children:[_jsxruntime.jsx.call(void 0, ne,{onClick:e,variant:"text",sx:{fontWeight:"400",":hover":{color:b=>b.palette.primary.dark}},children:"Voltar"}),_jsxruntime.jsx.call(void 0, ne,{variant:"contained",onClick:g,isLoading:i,children:"Recuperar Senha"})]}),l&&_jsxruntime.jsx.call(void 0, _material.Alert,{severity:"success",action:_jsxruntime.jsx.call(void 0, ne,{onClick:e,variant:"text",sx:{fontWeight:"400",":hover":{color:b=>b.palette.primary.dark}},children:"Ir para o Login"}),children:"Enviamos para o seu e-mail as instru\xE7\xF5es para recuperar a sua senha"}),u&&_jsxruntime.jsx.call(void 0, _material.Alert,{severity:"error",children:u})]})}function po(t){var p;let{loginData:e,credentialsConfig:r,onLoginFailed:n,onLoginSuccess:o}=t,[i,s]=_react.useState.call(void 0, ""),{selecionarLicenca:l,isSubmitting:a}=_hooks.useCredentials.call(void 0, r);_react.useEffect.call(void 0, ()=>{if(Array.isArray(e==null?void 0:e.empresas)){let c=e==null?void 0:e.empresas[0];s(c==null?void 0:c.uuid)}},[e]);function u(){return ue(this,null,function*(){try{let c=yield l(e,i);c?o(c):n("Nenhuma token definida")}catch(c){n(c)}})}return _jsxruntime.jsxs.call(void 0, _material.Box,{component:"form",sx:{minWidth:"290px"},children:[_jsxruntime.jsx.call(void 0, _material.TextField,{label:"Licen\xE7as",margin:"normal",select:!0,autoFocus:!0,value:i,onChange:c=>{s(c.target.value)},children:(p=e==null?void 0:e.empresas)==null?void 0:p.map(c=>_jsxruntime.jsx.call(void 0, _material.MenuItem,{value:c.uuid,children:c.nome},c.uuid))}),_jsxruntime.jsx.call(void 0, ne,{fullWidth:!0,variant:"contained",onClick:u,isLoading:a,sx:{mt:1},children:"Confirmar"})]})}function Rs(t){var b;let{credentialsConfig:e,onLoginSuccess:r,onLoginFailed:n,onAlreadyLogged:o,appName:i}=t,[s,l]=_react.useState.call(void 0, ),{selecionarLicenca:a,isAuthenticated:u}=_hooks.useCredentials.call(void 0, e),[p,c]=_react.useState.call(void 0, !1);_react.useEffect.call(void 0, ()=>{u&&o&&o()},[u]);function m(w){return ue(this,null,function*(){try{if(Array.isArray(w==null?void 0:w.empresas)){if((w==null?void 0:w.empresas.length)===1){let B=yield a(w,w.empresas[0].uuid);B&&r(B);return}l(w);return}r(w)}catch(B){n(B)}})}function f(w){return ue(this,null,function*(){n(w)})}function g(){c(!p)}return _jsxruntime.jsx.call(void 0, _material.Box,{sx:{height:"100vh"},children:_jsxruntime.jsxs.call(void 0, _material.Container,{component:"main",maxWidth:"xs",sx:{height:"80%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:2},children:[_jsxruntime.jsx.call(void 0, "img",{src:"https://datac-site-assets.s3.sa-east-1.amazonaws.com/logo.png"}),_jsxruntime.jsx.call(void 0, _material.Paper,{children:_jsxruntime.jsxs.call(void 0, _material.Stack,{sx:{padding:5},children:[_jsxruntime.jsx.call(void 0, Jn,{label:i}),!p&&_jsxruntime.jsx.call(void 0, _material.Box,{sx:{marginTop:3},children:s!=null&&s.empresas&&((b=s==null?void 0:s.empresas)==null?void 0:b.length)>0?_jsxruntime.jsx.call(void 0, po,{loginData:s,credentialsConfig:e,onLoginSuccess:r,onLoginFailed:n}):_jsxruntime.jsx.call(void 0, uo,{credentialsConfig:e,onLoginSuccess:m,onLoginFailed:f,onEsqueciSenhaClick:g})}),p&&_jsxruntime.jsx.call(void 0, _material.Box,{sx:{marginTop:3},children:_jsxruntime.jsx.call(void 0, co,{onLoginClick:g,credentialsConfig:e})})]})})]})})}var Op=t=>({transition:t.transitions.create(["transform"],{duration:500})}),Fp=_styles.styled.call(void 0, _iconsmaterial.KeyboardArrowRight,{shouldForwardProp:t=>t!=="open"})(({theme:t,open:e})=>y(y(y({color:t.palette.primary.dark},Op(t)),e&&{transform:"rotate(-180deg)"}),!e&&{transform:"rotate(0)"}));function go(t){let{open:e,onToogleDrawerMenu:r}=t;return _jsxruntime.jsx.call(void 0, _material.Stack,{width:"90%",direction:"row",justifyContent:e?"flex-end":"center",margin:"16px auto",children:_jsxruntime.jsx.call(void 0, _material.IconButton,{size:"small","aria-label":"open drawer",onClick:r,children:_jsxruntime.jsx.call(void 0, Fp,{fontSize:"small",open:e})})})}var Mp=_styles.styled.call(void 0, _material.MenuItem,{})(({theme:t})=>({borderRadius:"6px",width:"90%",gap:"16px",margin:"0 auto",padding:"8px 16px",transition:"0.1s ease-in-out","&:hover":{backgroundColor:"rgba(89, 195, 224, 15%);","& .MuiTypography-root":{color:t.palette.primary.main},"& .MuiSvgIcon-root":{color:t.palette.primary.main},"& .MuiIcon-root":{color:t.palette.primary.main}},"& .MuiIcon-root":{color:t.palette.grey[500],fontSize:"20px"},"& .MuiTypography-root":{letterSpacing:"0.5px",color:t.palette.text.secondary,fontSize:t.typography.body1},"& .MuiSvgIcon-root":{fontSize:"24px"}})),Dp=t=>_jsxruntime.jsx.call(void 0, Mp,y({},t)),Zr=Dp;function yo(t){let{menuItem:e,activeMenu:r,onMenuClick:n}=t,[o,i]=_react.useState.call(void 0, !1);if(!e.visible)return null;let s=!!(e!=null&&e.items&&(e==null?void 0:e.items.length)>0);function l(){i(!o)}return _jsxruntime.jsxs.call(void 0, _material.Box,{children:[_jsxruntime.jsxs.call(void 0, Zr,{onClick:()=>{if(e!=null&&e.link){n(e.link);return}l()},selected:r===e.link,children:[!!e.icon&&_jsxruntime.jsx.call(void 0, _material.Icon,{children:e.icon}),_jsxruntime.jsx.call(void 0, _material.ListItemText,{primary:e.label}),s&&!o&&_jsxruntime.jsx.call(void 0, _iconsmaterial.ExpandMore,{}),s&&o&&_jsxruntime.jsx.call(void 0, _iconsmaterial.ExpandLess,{})]}),(e==null?void 0:e.items)&&_jsxruntime.jsx.call(void 0, _material.Collapse,{in:o,timeout:"auto",unmountOnExit:!0,children:_jsxruntime.jsx.call(void 0, et,{activeMenu:r,sx:{pl:a=>a.spacing(1.5)},menus:(e==null?void 0:e.items)||[],onMenuClick:n})})]})}function et(t){let i=t,{menus:e,activeMenu:r,onMenuClick:n}=i,o=X(i,["menus","activeMenu","onMenuClick"]);return _jsxruntime.jsx.call(void 0, _material.List,W(y({component:"nav",disablePadding:!0},o),{children:e.map(s=>_jsxruntime.jsx.call(void 0, yo,{onMenuClick:n,activeMenu:r,menuItem:s},s.id))}))}function xo(t){let{menus:e,activeMenu:r,onMenuClick:n}=t,[o,i]=_react.useState.call(void 0, null),s=(a,u,p)=>{i({element:a.currentTarget,id:u,items:p})},l=()=>{i(null)};return _jsxruntime.jsx.call(void 0, _material.List,{component:"nav",disablePadding:!0,children:e.map(a=>a.visible?(console.log(r,a.link),_jsxruntime.jsxs.call(void 0, Zr,{onMouseEnter:u=>{a!=null&&a.link||s(u,a.id,a.items)},onMouseLeave:()=>{a!=null&&a.link||l()},onClick:()=>{a!=null&&a.link&&n(a.link)},selected:r===a.link,children:[_jsxruntime.jsx.call(void 0, _material.ListItemIcon,{children:_jsxruntime.jsx.call(void 0, _material.Icon,{children:a.icon})}),(o==null?void 0:o.id)===a.id&&_jsxruntime.jsx.call(void 0, _material.Popper,{sx:{zIndex:999999},anchorEl:o==null?void 0:o.element,open:!!(o!=null&&o.element),placement:"right-start",children:_jsxruntime.jsx.call(void 0, et,{activeMenu:r,onMenuClick:n,menus:(a==null?void 0:a.items)||[],sx:{minWidth:"240px",backgroundColor:L.palette.background.paper,borderRadius:"12px",padding:"16px 4px",boxShadow:"0px 5px 5px -3px rgb(0 0 0 / 20%), 0px 8px 10px 1px rgb(0 0 0 / 14%), 0px 3px 14px 2px rgb(0 0 0 / 12%);"}})})]},`minMenu-${a.id}`)):null)})}var Is=(t,e)=>({width:t,transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.enteringScreen}),overflowX:"hidden"}),Ls=t=>({transition:t.transitions.create("width",{easing:t.transitions.easing.sharp,duration:t.transitions.duration.leavingScreen}),overflowX:"hidden",width:`calc(${t.spacing(8)} + 1px)`,[t.breakpoints.up("sm")]:{width:`calc(${t.spacing(8)} + 1px)`}}),td=_styles.styled.call(void 0, _material.Drawer,{shouldForwardProp:t=>t!=="open"&&t!=="width"})(({theme:t,open:e,width:r})=>y(y({width:r,bgcolor:t.palette.background.paper,boxShadow:"2px 3px 20px -16px rgb(32 32 36 / 30%)",borderRightStyle:"none",whiteSpace:"nowrap",boxSizing:"border-box"},e&&W(y({},Is(r,t)),{"& .MuiDrawer-paper":Is(r,t)})),!e&&W(y({},Ls(t)),{"& .MuiDrawer-paper":Ls(t)})));function js(t){let g=t,{open:e,items:r,width:n,logo:o,minLogo:i,label:s,minLabel:l,link:a,version:u,activeMenu:p,onMenuClick:c,toggleMenu:m}=g,f=X(g,["open","items","width","logo","minLogo","label","minLabel","link","version","activeMenu","onMenuClick","toggleMenu"]);return _jsxruntime.jsxs.call(void 0, td,W(y({width:n,open:e,onClose:()=>m(!1)},f),{children:[_jsxruntime.jsx.call(void 0, _material.Box,{sx:{height:L.mixins.toolbar},children:_jsxruntime.jsxs.call(void 0, _material.Stack,{spacing:.5,alignItems:"center",p:1,children:[_jsxruntime.jsx.call(void 0, "img",{src:e?o:i,alt:"logo"}),_jsxruntime.jsxs.call(void 0, _material.Typography,{variant:"body2",fontWeight:e?"700":"400",children:[e?s:l," ",u&&_jsxruntime.jsx.call(void 0, _material.Link,{underline:"none",target:"_blank",rel:"noreferrer",href:a,children:u})]})]})}),_jsxruntime.jsx.call(void 0, go,{open:!!e,onToogleDrawerMenu:m}),e&&_jsxruntime.jsx.call(void 0, et,{onMenuClick:c,activeMenu:p,menus:r}),!e&&_jsxruntime.jsx.call(void 0, xo,{onMenuClick:c,activeMenu:p,menus:r})]}))}exports.AlterarSenha = Kr; exports.Button = ne; exports.ButtonContainer = Le; exports.Checkbox = Po; exports.ColorsGrid = wo; exports.CurrencyCellStyle = Em; exports.CurrencyTextField = ln; exports.DataTable = Ga; exports.DataTableOptions = dn; exports.DeleteContainer = fn; exports.Dialog = we; exports.DrawerMenu = js; exports.FilterContainer = bn; exports.FilterControl = Wt; exports.Flag = Wo; exports.FormContainer = Cn; exports.LabelValue = Ui; exports.MioAuth = Rs; exports.OptionStyles = Pm; exports.PageTitle = Gi; exports.PasswordTextField = It; exports.SearchTextField = Dr; exports.Tooltip = nt; exports.Transporter = Xn; exports.theme = L;