@data-c/ui 0.1.33 → 0.1.34
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.js +11 -11
- package/dist/index.js.map +1 -1
- package/package.json +3 -5
package/dist/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
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 Ol=Object.create;var No=Object.defineProperty,Dl=Object.defineProperties,_l=Object.getOwnPropertyDescriptor,Ml=Object.getOwnPropertyDescriptors,Rl=Object.getOwnPropertyNames,hr=Object.getOwnPropertySymbols,Bl=Object.getPrototypeOf,zo=Object.prototype.hasOwnProperty,Ni=Object.prototype.propertyIsEnumerable;var Li=(t,e,r)=>e in t?No(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,d=(t,e)=>{for(var r in e||(e={}))zo.call(e,r)&&Li(t,r,e[r]);if(hr)for(var r of hr(e))Ni.call(e,r)&&Li(t,r,e[r]);return t},C=(t,e)=>Dl(t,Ml(e));var D=(t,e)=>{var r={};for(var o in t)zo.call(t,o)&&e.indexOf(o)<0&&(r[o]=t[o]);if(t!=null&&hr)for(var o of hr(t))e.indexOf(o)<0&&Ni.call(t,o)&&(r[o]=t[o]);return r};var ce=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Il=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Rl(e))!zo.call(t,n)&&n!==r&&No(t,n,{get:()=>e[n],enumerable:!(o=_l(e,n))||o.enumerable});return t};var tt=(t,e,r)=>(r=t!=null?Ol(Bl(t)):{},Il(e||!t||!t.__esModule?No(r,"default",{value:t,enumerable:!0}):r,t));var N=(t,e,r)=>new Promise((o,n)=>{var i=s=>{try{l(r.next(s))}catch(u){n(u)}},a=s=>{try{l(r.throw(s))}catch(u){n(u)}},l=s=>s.done?o(s.value):Promise.resolve(s.value).then(i,a);l((r=r.apply(t,e)).next())});var Ca=ce(H=>{"use strict";var ae=typeof Symbol=="function"&&Symbol.for,nn=ae?Symbol.for("react.element"):60103,an=ae?Symbol.for("react.portal"):60106,Sr=ae?Symbol.for("react.fragment"):60107,Tr=ae?Symbol.for("react.strict_mode"):60108,Pr=ae?Symbol.for("react.profiler"):60114,wr=ae?Symbol.for("react.provider"):60109,Er=ae?Symbol.for("react.context"):60110,sn=ae?Symbol.for("react.async_mode"):60111,Ar=ae?Symbol.for("react.concurrent_mode"):60111,kr=ae?Symbol.for("react.forward_ref"):60112,Fr=ae?Symbol.for("react.suspense"):60113,Nc=ae?Symbol.for("react.suspense_list"):60120,Or=ae?Symbol.for("react.memo"):60115,Dr=ae?Symbol.for("react.lazy"):60116,zc=ae?Symbol.for("react.block"):60121,Vc=ae?Symbol.for("react.fundamental"):60117,jc=ae?Symbol.for("react.responder"):60118,Wc=ae?Symbol.for("react.scope"):60119;function xe(t){if(typeof t=="object"&&t!==null){var e=t.$$typeof;switch(e){case nn:switch(t=t.type,t){case sn:case Ar:case Sr:case Pr:case Tr:case Fr:return t;default:switch(t=t&&t.$$typeof,t){case Er:case kr:case Dr:case Or:case wr:return t;default:return e}}case an:return e}}}function va(t){return xe(t)===Ar}H.AsyncMode=sn;H.ConcurrentMode=Ar;H.ContextConsumer=Er;H.ContextProvider=wr;H.Element=nn;H.ForwardRef=kr;H.Fragment=Sr;H.Lazy=Dr;H.Memo=Or;H.Portal=an;H.Profiler=Pr;H.StrictMode=Tr;H.Suspense=Fr;H.isAsyncMode=function(t){return va(t)||xe(t)===sn};H.isConcurrentMode=va;H.isContextConsumer=function(t){return xe(t)===Er};H.isContextProvider=function(t){return xe(t)===wr};H.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===nn};H.isForwardRef=function(t){return xe(t)===kr};H.isFragment=function(t){return xe(t)===Sr};H.isLazy=function(t){return xe(t)===Dr};H.isMemo=function(t){return xe(t)===Or};H.isPortal=function(t){return xe(t)===an};H.isProfiler=function(t){return xe(t)===Pr};H.isStrictMode=function(t){return xe(t)===Tr};H.isSuspense=function(t){return xe(t)===Fr};H.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===Sr||t===Ar||t===Pr||t===Tr||t===Fr||t===Nc||typeof t=="object"&&t!==null&&(t.$$typeof===Dr||t.$$typeof===Or||t.$$typeof===wr||t.$$typeof===Er||t.$$typeof===kr||t.$$typeof===Vc||t.$$typeof===jc||t.$$typeof===Wc||t.$$typeof===zc)};H.typeOf=xe});var Sa=ce(Y=>{"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,o=t?Symbol.for("react.fragment"):60107,n=t?Symbol.for("react.strict_mode"):60108,i=t?Symbol.for("react.profiler"):60114,a=t?Symbol.for("react.provider"):60109,l=t?Symbol.for("react.context"):60110,s=t?Symbol.for("react.async_mode"):60111,u=t?Symbol.for("react.concurrent_mode"):60111,c=t?Symbol.for("react.forward_ref"):60112,f=t?Symbol.for("react.suspense"):60113,m=t?Symbol.for("react.suspense_list"):60120,p=t?Symbol.for("react.memo"):60115,g=t?Symbol.for("react.lazy"):60116,x=t?Symbol.for("react.block"):60121,P=t?Symbol.for("react.fundamental"):60117,v=t?Symbol.for("react.responder"):60118,S=t?Symbol.for("react.scope"):60119;function b(A){return typeof A=="string"||typeof A=="function"||A===o||A===u||A===i||A===n||A===f||A===m||typeof A=="object"&&A!==null&&(A.$$typeof===g||A.$$typeof===p||A.$$typeof===a||A.$$typeof===l||A.$$typeof===c||A.$$typeof===P||A.$$typeof===v||A.$$typeof===S||A.$$typeof===x)}function T(A){if(typeof A=="object"&&A!==null){var Nt=A.$$typeof;switch(Nt){case e:var k=A.type;switch(k){case s:case u:case o:case i:case n:case f:return k;default:var mt=k&&k.$$typeof;switch(mt){case l:case c:case g:case p:case a:return mt;default:return Nt}}case r:return Nt}}}var F=s,$=u,R=l,re=a,q=e,oe=c,_=o,B=g,h=p,y=r,w=i,E=n,O=f,I=!1;function M(A){return I||(I=!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.")),L(A)||T(A)===s}function L(A){return T(A)===u}function V(A){return T(A)===l}function W(A){return T(A)===a}function j(A){return typeof A=="object"&&A!==null&&A.$$typeof===e}function ue(A){return T(A)===c}function ie(A){return T(A)===o}function Me(A){return T(A)===g}function Ro(A){return T(A)===p}function Bo(A){return T(A)===r}function Io(A){return T(A)===i}function $o(A){return T(A)===n}function Lo(A){return T(A)===f}Y.AsyncMode=F,Y.ConcurrentMode=$,Y.ContextConsumer=R,Y.ContextProvider=re,Y.Element=q,Y.ForwardRef=oe,Y.Fragment=_,Y.Lazy=B,Y.Memo=h,Y.Portal=y,Y.Profiler=w,Y.StrictMode=E,Y.Suspense=O,Y.isAsyncMode=M,Y.isConcurrentMode=L,Y.isContextConsumer=V,Y.isContextProvider=W,Y.isElement=j,Y.isForwardRef=ue,Y.isFragment=ie,Y.isLazy=Me,Y.isMemo=Ro,Y.isPortal=Bo,Y.isProfiler=Io,Y.isStrictMode=$o,Y.isSuspense=Lo,Y.isValidElementType=b,Y.typeOf=T}()});var un=ce((Db,ln)=>{"use strict";process.env.NODE_ENV==="production"?ln.exports=Ca():ln.exports=Sa()});var wa=ce((_b,Pa)=>{"use strict";var Ta=Object.getOwnPropertySymbols,Uc=Object.prototype.hasOwnProperty,qc=Object.prototype.propertyIsEnumerable;function Gc(t){if(t==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}function Hc(){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 o=Object.getOwnPropertyNames(e).map(function(i){return e[i]});if(o.join("")!=="0123456789")return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(i){n[i]=i}),Object.keys(Object.assign({},n)).join("")==="abcdefghijklmnopqrst"}catch(i){return!1}}Pa.exports=Hc()?Object.assign:function(t,e){for(var r,o=Gc(t),n,i=1;i<arguments.length;i++){r=Object(arguments[i]);for(var a in r)Uc.call(r,a)&&(o[a]=r[a]);if(Ta){n=Ta(r);for(var l=0;l<n.length;l++)qc.call(r,n[l])&&(o[n[l]]=r[n[l]])}}return o}});var _r=ce((Mb,Ea)=>{"use strict";var Yc="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";Ea.exports=Yc});var cn=ce((Rb,Aa)=>{Aa.exports=Function.call.bind(Object.prototype.hasOwnProperty)});var _a=ce((Bb,Da)=>{"use strict";var fn=function(){};process.env.NODE_ENV!=="production"&&(ka=_r(),Mr={},Fa=cn(),fn=function(t){var e="Warning: "+t;typeof console!="undefined"&&console.error(e);try{throw new Error(e)}catch(r){}});var ka,Mr,Fa;function Oa(t,e,r,o,n){if(process.env.NODE_ENV!=="production"){for(var i in t)if(Fa(t,i)){var a;try{if(typeof t[i]!="function"){var l=Error((o||"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}a=t[i](e,i,o,r,null,ka)}catch(u){a=u}if(a&&!(a instanceof Error)&&fn((o||"React class")+": type specification of "+r+" `"+i+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof a+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),a instanceof Error&&!(a.message in Mr)){Mr[a.message]=!0;var s=n?n():"";fn("Failed "+r+" type: "+a.message+(s!=null?s:""))}}}}Oa.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(Mr={})};Da.exports=Oa});var Ba=ce((Ib,Ra)=>{"use strict";var Kc=un(),Zc=wa(),bt=_r(),pn=cn(),Ma=_a(),vt=function(){};process.env.NODE_ENV!=="production"&&(vt=function(t){var e="Warning: "+t;typeof console!="undefined"&&console.error(e);try{throw new Error(e)}catch(r){}});function Rr(){return null}Ra.exports=function(t,e){var r=typeof Symbol=="function"&&Symbol.iterator,o="@@iterator";function n(h){var y=h&&(r&&h[r]||h[o]);if(typeof y=="function")return y}var i="<<anonymous>>",a={array:c("array"),bigint:c("bigint"),bool:c("boolean"),func:c("function"),number:c("number"),object:c("object"),string:c("string"),symbol:c("symbol"),any:f(),arrayOf:m,element:p(),elementType:g(),instanceOf:x,node:b(),objectOf:v,oneOf:P,oneOfType:S,shape:F,exact:$};function l(h,y){return h===y?h!==0||1/h===1/y:h!==h&&y!==y}function s(h,y){this.message=h,this.data=y&&typeof y=="object"?y:{},this.stack=""}s.prototype=Error.prototype;function u(h){if(process.env.NODE_ENV!=="production")var y={},w=0;function E(I,M,L,V,W,j,ue){if(V=V||i,j=j||L,ue!==bt){if(e){var ie=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 ie.name="Invariant Violation",ie}else if(process.env.NODE_ENV!=="production"&&typeof console!="undefined"){var Me=V+":"+L;!y[Me]&&w<3&&(vt("You are manually calling a React.PropTypes validation function for the `"+j+"` prop on `"+V+"`. 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."),y[Me]=!0,w++)}}return M[L]==null?I?M[L]===null?new s("The "+W+" `"+j+"` is marked as required "+("in `"+V+"`, but its value is `null`.")):new s("The "+W+" `"+j+"` is marked as required in "+("`"+V+"`, but its value is `undefined`.")):null:h(M,L,V,W,j)}var O=E.bind(null,!1);return O.isRequired=E.bind(null,!0),O}function c(h){function y(w,E,O,I,M,L){var V=w[E],W=q(V);if(W!==h){var j=oe(V);return new s("Invalid "+I+" `"+M+"` of type "+("`"+j+"` supplied to `"+O+"`, expected ")+("`"+h+"`."),{expectedType:h})}return null}return u(y)}function f(){return u(Rr)}function m(h){function y(w,E,O,I,M){if(typeof h!="function")return new s("Property `"+M+"` of component `"+O+"` has invalid PropType notation inside arrayOf.");var L=w[E];if(!Array.isArray(L)){var V=q(L);return new s("Invalid "+I+" `"+M+"` of type "+("`"+V+"` supplied to `"+O+"`, expected an array."))}for(var W=0;W<L.length;W++){var j=h(L,W,O,I,M+"["+W+"]",bt);if(j instanceof Error)return j}return null}return u(y)}function p(){function h(y,w,E,O,I){var M=y[w];if(!t(M)){var L=q(M);return new s("Invalid "+O+" `"+I+"` of type "+("`"+L+"` supplied to `"+E+"`, expected a single ReactElement."))}return null}return u(h)}function g(){function h(y,w,E,O,I){var M=y[w];if(!Kc.isValidElementType(M)){var L=q(M);return new s("Invalid "+O+" `"+I+"` of type "+("`"+L+"` supplied to `"+E+"`, expected a single ReactElement type."))}return null}return u(h)}function x(h){function y(w,E,O,I,M){if(!(w[E]instanceof h)){var L=h.name||i,V=B(w[E]);return new s("Invalid "+I+" `"+M+"` of type "+("`"+V+"` supplied to `"+O+"`, expected ")+("instance of `"+L+"`."))}return null}return u(y)}function P(h){if(!Array.isArray(h))return process.env.NODE_ENV!=="production"&&(arguments.length>1?vt("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])."):vt("Invalid argument supplied to oneOf, expected an array.")),Rr;function y(w,E,O,I,M){for(var L=w[E],V=0;V<h.length;V++)if(l(L,h[V]))return null;var W=JSON.stringify(h,function(ue,ie){var Me=oe(ie);return Me==="symbol"?String(ie):ie});return new s("Invalid "+I+" `"+M+"` of value `"+String(L)+"` "+("supplied to `"+O+"`, expected one of "+W+"."))}return u(y)}function v(h){function y(w,E,O,I,M){if(typeof h!="function")return new s("Property `"+M+"` of component `"+O+"` has invalid PropType notation inside objectOf.");var L=w[E],V=q(L);if(V!=="object")return new s("Invalid "+I+" `"+M+"` of type "+("`"+V+"` supplied to `"+O+"`, expected an object."));for(var W in L)if(pn(L,W)){var j=h(L,W,O,I,M+"."+W,bt);if(j instanceof Error)return j}return null}return u(y)}function S(h){if(!Array.isArray(h))return process.env.NODE_ENV!=="production"&&vt("Invalid argument supplied to oneOfType, expected an instance of array."),Rr;for(var y=0;y<h.length;y++){var w=h[y];if(typeof w!="function")return vt("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+_(w)+" at index "+y+"."),Rr}function E(O,I,M,L,V){for(var W=[],j=0;j<h.length;j++){var ue=h[j],ie=ue(O,I,M,L,V,bt);if(ie==null)return null;ie.data&&pn(ie.data,"expectedType")&&W.push(ie.data.expectedType)}var Me=W.length>0?", expected one of type ["+W.join(", ")+"]":"";return new s("Invalid "+L+" `"+V+"` supplied to "+("`"+M+"`"+Me+"."))}return u(E)}function b(){function h(y,w,E,O,I){return R(y[w])?null:new s("Invalid "+O+" `"+I+"` supplied to "+("`"+E+"`, expected a ReactNode."))}return u(h)}function T(h,y,w,E,O){return new s((h||"React class")+": "+y+" type `"+w+"."+E+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+O+"`.")}function F(h){function y(w,E,O,I,M){var L=w[E],V=q(L);if(V!=="object")return new s("Invalid "+I+" `"+M+"` of type `"+V+"` "+("supplied to `"+O+"`, expected `object`."));for(var W in h){var j=h[W];if(typeof j!="function")return T(O,I,M,W,oe(j));var ue=j(L,W,O,I,M+"."+W,bt);if(ue)return ue}return null}return u(y)}function $(h){function y(w,E,O,I,M){var L=w[E],V=q(L);if(V!=="object")return new s("Invalid "+I+" `"+M+"` of type `"+V+"` "+("supplied to `"+O+"`, expected `object`."));var W=Zc({},w[E],h);for(var j in W){var ue=h[j];if(pn(h,j)&&typeof ue!="function")return T(O,I,M,j,oe(ue));if(!ue)return new s("Invalid "+I+" `"+M+"` key `"+j+"` supplied to `"+O+"`.\nBad object: "+JSON.stringify(w[E],null," ")+`
|
|
2
|
-
Valid keys: `+JSON.stringify(Object.keys(h),null," "));var ie=ue(L,j,O,I,M+"."+j,bt);if(ie)return ie}return null}return u(y)}function R(h){switch(typeof h){case"number":case"string":case"undefined":return!0;case"boolean":return!h;case"object":if(Array.isArray(h))return h.every(R);if(h===null||t(h))return!0;var y=n(h);if(y){var w=y.call(h),E;if(y!==h.entries){for(;!(E=w.next()).done;)if(!R(E.value))return!1}else for(;!(E=w.next()).done;){var O=E.value;if(O&&!R(O[1]))return!1}}else return!1;return!0;default:return!1}}function re(h,y){return h==="symbol"?!0:y?y["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&y instanceof Symbol:!1}function q(h){var y=typeof h;return Array.isArray(h)?"array":h instanceof RegExp?"object":re(y,h)?"symbol":y}function oe(h){if(typeof h=="undefined"||h===null)return""+h;var y=q(h);if(y==="object"){if(h instanceof Date)return"date";if(h instanceof RegExp)return"regexp"}return y}function _(h){var y=oe(h);switch(y){case"array":case"object":return"an "+y;case"boolean":case"date":case"regexp":return"a "+y;default:return y}}function B(h){return!h.constructor||!h.constructor.name?i:h.constructor.name}return a.checkPropTypes=Ma,a.resetWarningCache=Ma.resetWarningCache,a.PropTypes=a,a}});var Na=ce(($b,La)=>{"use strict";var Qc=_r();function Ia(){}function $a(){}$a.resetWarningCache=Ia;La.exports=function(){function t(o,n,i,a,l,s){if(s!==Qc){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:$a,resetWarningCache:Ia};return r.PropTypes=r,r}});var Br=ce((Lb,dn)=>{process.env.NODE_ENV!=="production"?(za=un(),Va=!0,dn.exports=Ba()(za.isElement,Va)):dn.exports=Na()();var za,Va});var os=ce(K=>{"use strict";var Fn=Symbol.for("react.element"),On=Symbol.for("react.portal"),Ur=Symbol.for("react.fragment"),qr=Symbol.for("react.strict_mode"),Gr=Symbol.for("react.profiler"),Hr=Symbol.for("react.provider"),Yr=Symbol.for("react.context"),op=Symbol.for("react.server_context"),Kr=Symbol.for("react.forward_ref"),Zr=Symbol.for("react.suspense"),Qr=Symbol.for("react.suspense_list"),Xr=Symbol.for("react.memo"),Jr=Symbol.for("react.lazy"),np=Symbol.for("react.offscreen"),rs;rs=Symbol.for("react.module.reference");function we(t){if(typeof t=="object"&&t!==null){var e=t.$$typeof;switch(e){case Fn:switch(t=t.type,t){case Ur:case Gr:case qr:case Zr:case Qr:return t;default:switch(t=t&&t.$$typeof,t){case op:case Yr:case Kr:case Jr:case Xr:case Hr:return t;default:return e}}case On:return e}}}K.ContextConsumer=Yr;K.ContextProvider=Hr;K.Element=Fn;K.ForwardRef=Kr;K.Fragment=Ur;K.Lazy=Jr;K.Memo=Xr;K.Portal=On;K.Profiler=Gr;K.StrictMode=qr;K.Suspense=Zr;K.SuspenseList=Qr;K.isAsyncMode=function(){return!1};K.isConcurrentMode=function(){return!1};K.isContextConsumer=function(t){return we(t)===Yr};K.isContextProvider=function(t){return we(t)===Hr};K.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===Fn};K.isForwardRef=function(t){return we(t)===Kr};K.isFragment=function(t){return we(t)===Ur};K.isLazy=function(t){return we(t)===Jr};K.isMemo=function(t){return we(t)===Xr};K.isPortal=function(t){return we(t)===On};K.isProfiler=function(t){return we(t)===Gr};K.isStrictMode=function(t){return we(t)===qr};K.isSuspense=function(t){return we(t)===Zr};K.isSuspenseList=function(t){return we(t)===Qr};K.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===Ur||t===Gr||t===qr||t===Zr||t===Qr||t===np||typeof t=="object"&&t!==null&&(t.$$typeof===Jr||t.$$typeof===Xr||t.$$typeof===Hr||t.$$typeof===Yr||t.$$typeof===Kr||t.$$typeof===rs||t.getModuleId!==void 0)};K.typeOf=we});var ns=ce(Z=>{"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"),o=Symbol.for("react.strict_mode"),n=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),a=Symbol.for("react.context"),l=Symbol.for("react.server_context"),s=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),g=!1,x=!1,P=!1,v=!1,S=!1,b;b=Symbol.for("react.module.reference");function T(k){return!!(typeof k=="string"||typeof k=="function"||k===r||k===n||S||k===o||k===u||k===c||v||k===p||g||x||P||typeof k=="object"&&k!==null&&(k.$$typeof===m||k.$$typeof===f||k.$$typeof===i||k.$$typeof===a||k.$$typeof===s||k.$$typeof===b||k.getModuleId!==void 0))}function F(k){if(typeof k=="object"&&k!==null){var mt=k.$$typeof;switch(mt){case t:var mr=k.type;switch(mr){case r:case n:case o:case u:case c:return mr;default:var $i=mr&&mr.$$typeof;switch($i){case l:case a:case s:case m:case f:case i:return $i;default:return mt}}case e:return mt}}}var $=a,R=i,re=t,q=s,oe=r,_=m,B=f,h=e,y=n,w=o,E=u,O=c,I=!1,M=!1;function L(k){return I||(I=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function V(k){return M||(M=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function W(k){return F(k)===a}function j(k){return F(k)===i}function ue(k){return typeof k=="object"&&k!==null&&k.$$typeof===t}function ie(k){return F(k)===s}function Me(k){return F(k)===r}function Ro(k){return F(k)===m}function Bo(k){return F(k)===f}function Io(k){return F(k)===e}function $o(k){return F(k)===n}function Lo(k){return F(k)===o}function A(k){return F(k)===u}function Nt(k){return F(k)===c}Z.ContextConsumer=$,Z.ContextProvider=R,Z.Element=re,Z.ForwardRef=q,Z.Fragment=oe,Z.Lazy=_,Z.Memo=B,Z.Portal=h,Z.Profiler=y,Z.StrictMode=w,Z.Suspense=E,Z.SuspenseList=O,Z.isAsyncMode=L,Z.isConcurrentMode=V,Z.isContextConsumer=W,Z.isContextProvider=j,Z.isElement=ue,Z.isForwardRef=ie,Z.isFragment=Me,Z.isLazy=Ro,Z.isMemo=Bo,Z.isPortal=Io,Z.isProfiler=$o,Z.isStrictMode=Lo,Z.isSuspense=A,Z.isSuspenseList=Nt,Z.isValidElementType=T,Z.typeOf=F}()});var is=ce((dC,Dn)=>{"use strict";process.env.NODE_ENV==="production"?Dn.exports=os():Dn.exports=ns()});var Os=ce((BT,Fs)=>{"use strict";function st(t){this._maxSize=t,this.clear()}st.prototype.clear=function(){this._size=0,this._values=Object.create(null)};st.prototype.get=function(t){return this._values[t]};st.prototype.set=function(t,e){return this._size>=this._maxSize&&this.clear(),t in this._values||this._size++,this._values[t]=e};var ud=/[^.^\]^[]+|(?=\[\]|\.\.)/g,ks=/^\d+$/,cd=/^\d/,fd=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,pd=/^\s*(['"]?)(.*?)(\1)\s*$/,Kn=512,ws=new st(Kn),Es=new st(Kn),As=new st(Kn);Fs.exports={Cache:st,split:Yn,normalizePath:Hn,setter:function(t){var e=Hn(t);return Es.get(t)||Es.set(t,function(o,n){for(var i=0,a=e.length,l=o;i<a-1;){var s=e[i];if(s==="__proto__"||s==="constructor"||s==="prototype")return o;l=l[e[i++]]}l[e[i]]=n})},getter:function(t,e){var r=Hn(t);return As.get(t)||As.set(t,function(n){for(var i=0,a=r.length;i<a;)if(n!=null||!e)n=n[r[i++]];else return;return n})},join:function(t){return t.reduce(function(e,r){return e+(Zn(r)||ks.test(r)?"["+r+"]":(e?".":"")+r)},"")},forEach:function(t,e,r){dd(Array.isArray(t)?t:Yn(t),e,r)}};function Hn(t){return ws.get(t)||ws.set(t,Yn(t).map(function(e){return e.replace(pd,"$2")}))}function Yn(t){return t.match(ud)||[""]}function dd(t,e,r){var o=t.length,n,i,a,l;for(i=0;i<o;i++)n=t[i],n&&(gd(n)&&(n='"'+n+'"'),l=Zn(n),a=!l&&/^\d+$/.test(n),e.call(r,n,l,a,i,t))}function Zn(t){return typeof t=="string"&&t&&["'",'"'].indexOf(t.charAt(0))!==-1}function md(t){return t.match(cd)&&!t.match(ks)}function hd(t){return fd.test(t)}function gd(t){return!Zn(t)&&(md(t)||hd(t))}});var Ms=ce((IT,_s)=>{var yd=/[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,uo=t=>t.match(yd)||[],co=t=>t[0].toUpperCase()+t.slice(1),Qn=(t,e)=>uo(t).join(e).toLowerCase(),Ds=t=>uo(t).reduce((e,r)=>`${e}${e?r[0].toUpperCase()+r.slice(1).toLowerCase():r.toLowerCase()}`,""),xd=t=>co(Ds(t)),bd=t=>Qn(t,"_"),vd=t=>Qn(t,"-"),Cd=t=>co(Qn(t," ")),Sd=t=>uo(t).map(co).join(" ");_s.exports={words:uo,upperFirst:co,camelCase:Ds,pascalCase:xd,snakeCase:bd,kebabCase:vd,sentenceCase:Cd,titleCase:Sd}});var Bs=ce(($T,Xn)=>{Xn.exports=function(t){return Rs(Td(t),t)};Xn.exports.array=Rs;function Rs(t,e){var r=t.length,o=new Array(r),n={},i=r,a=Pd(e),l=wd(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--;)n[i]||s(t[i],i,new Set);return o;function s(u,c,f){if(f.has(u)){var m;try{m=", node was:"+JSON.stringify(u)}catch(x){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(!n[c]){n[c]=!0;var p=a.get(u)||new Set;if(p=Array.from(p),c=p.length){f.add(u);do{var g=p[--c];s(g,l.get(g),f)}while(c);f.delete(u)}o[--r]=u}}}function Td(t){for(var e=new Set,r=0,o=t.length;r<o;r++){var n=t[r];e.add(n[0]),e.add(n[1])}return Array.from(e)}function Pd(t){for(var e=new Map,r=0,o=t.length;r<o;r++){var n=t[r];e.has(n[0])||e.set(n[0],new Set),e.has(n[1])||e.set(n[1],new Set),e.get(n[0]).add(n[1])}return e}function wd(t){for(var e=new Map,r=0,o=t.length;r<o;r++)e.set(t[r],r);return e}});var _material = require('@mui/material');var _jsxruntime = require('react/jsx-runtime');var Nl=t=>{let n=t,{isLoading:e,children:r}=n,o=D(n,["isLoading","children"]);return _jsxruntime.jsx.call(void 0, _material.Button,C(d({},o),{disabled:e?!0:o.disabled,children:e?_jsxruntime.jsx.call(void 0, _material.CircularProgress,{color:"secondary",size:22}):r}))},z= exports.Button =Nl;function Se(t){return _jsxruntime.jsx.call(void 0, _material.Stack,d({direction:"row",justifyContent:"flex-end",alignItems:"center",spacing:1},t))}function Vi(t){let o=t,{label:e}=o,r=D(o,["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,d({},r))})})}var _polished = require('polished');var _styles = require('@mui/material/styles');var ht="#4BA9C1",Hl="#2C96B3",Yl=32,Kl={cssVariables:!0,mixins:{toolbar:{height:48},menu:{width:260}},palette:{situacao:{aberto:"#FFFF00",fechado:"#FFA500",orcamento:"#800080",analise:"#0000FF",cancelado:"#FF0000",liberado:"#008000"},border:"rgba(0, 0, 0, 0.23)",text:{primary:"#262626",secondary:"#808080"},primary:{light:"#66D1E6",main:ht,dark:Hl},secondary:{light:"#eceff1",main:"#13143F",dark:"#263238"},background:{default:"#FFF",paper:"#F4F4F4"},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:{fontFamily:["Roboto","Lato","sans-serif","Poppins","Montserrat"].join(","),h1:{fontSize:"2rem"},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:"0.775rem",color:"#262626"},body2:{fontSize:"0.7685rem",color:"#808080"},subtitle1:{fontSize:"0.885rem"},subtitle2:{fontSize:"0.785rem",color:"#808080"}},components:{MuiTab:{styleOverrides:{root:{minHeight:"30px",height:"30px"}}},MuiList:{styleOverrides:{root:{paddingTop:0}}},MuiListItemButton:{styleOverrides:{root:{"&.Mui-selected":{"& .MuiIcon-root":{color:ht,borderRadius:"0px"},"& .MuiSvgIcon-root":{color:ht},"& .MuiTypography-root":{color:ht}},":hover":{background:"rgba(89, 195, 224, 15%)"}}}},MuiToolbar:{defaultProps:{sx:{minHeight:"46px"}},styleOverrides:{root:{background:"#FFFFFF"}}},MuiChip:{defaultProps:{size:"small"}},MuiContainer:{defaultProps:{maxWidth:!1,disableGutters:!0},styleOverrides:{root:{display:"flex",flexDirection:"column",flexGrow:1}}},MuiButton:{defaultProps:{size:"small",variant:"outlined"},styleOverrides:{root:{fontSize:"0.755rem",textTransform:"none",fontWeight:"bold",minWidth:"78px"},contained:{color:"rgba(255,255,255,0.85)",boxShadow:"none"},outlined:{background:"white",":disabled":{background:"none",boxShadow:"none",borderColor:"#E0E0E0"}}}},MuiCheckbox:{defaultProps:{size:"small"}},MuiFormControl:{defaultProps:{size:"small"},styleOverrides:{root:{}}},MuiInputBase:{styleOverrides:{root:{height:`${Yl}px`,fontSize:"0.9rem"}}},MuiTextField:{defaultProps:{size:"small",fullWidth:!0,InputLabelProps:{shrink:!0}},styleOverrides:{root:{"& label":{color:"#808080",fontSize:"0.8rem"}}}},MuiAutocomplete:{defaultProps:{size:"small"},styleOverrides:{inputRoot:{height:"auto"},root:{"& .MuiOutlinedInput-root.MuiInputBase-sizeSmall .MuiAutocomplete-input":{padding:0}}}},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:ht},"& .MuiTypography-root":{color:ht}},":hover":{borderRadius:"6px",background:"rgba(89, 195, 224, 15%)"}}}},MuiBadge:{styleOverrides:{root:{"& .MuiBadge-anchorOriginBottomLeft":{height:"16px",top:8}},badge:{fontSize:"8pt"}}},MuiTableCell:{styleOverrides:{root:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",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"}}},MuiPaper:{styleOverrides:{root:{background:"#FFFFFF"}}},MuiDrawer:{styleOverrides:{paper:{}}},MuiDialog:{styleOverrides:{paper:{borderRadius:"6px"}}},MuiDialogContent:{styleOverrides:{root:{}}}}},Zl=_styles.createTheme.call(void 0, Kl),Ql=_styles.responsiveFontSizes.call(void 0, Zl),G= exports.theme =Ql;var Jl={"primary-light":G.palette.primary.light,primary:G.palette.primary.main,"primary-dark":G.palette.primary.dark,"text-secondary":G.palette.text.secondary,"text-primary":G.palette.text.primary,"background-paper":G.palette.background.paper,background:G.palette.background.default,"error-light":G.palette.error.light,error:G.palette.error.main,"erro-drark":G.palette.error.dark,"warning-light":G.palette.warning.light,warning:G.palette.warning.main,"warning-dark":G.palette.warning.dark,"success-light":G.palette.success.light,success:G.palette.success.main,"success-dark":G.palette.success.dark,"grey-100":G.palette.grey[100],"grey-200":G.palette.grey[200],"grey-300":G.palette.grey[300],"grey-400":G.palette.grey[400],"grey-500":G.palette.grey[500],"grey-600":G.palette.grey[600],"grey-700":G.palette.grey[700],"grey-800":G.palette.grey[800]};function Wi(){return _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment,{children:Object.entries(Jl).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:G.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 Xa = _interopRequireWildcard(_react); var wt = _interopRequireWildcard(_react);function qi(t){if(!t)return 0;let e=String(t);return e=e.replace(/\./g,"").replace(/,/g,"."),parseFloat(e)}var jo=null,Gi=_react.forwardRef.call(void 0, (t,e)=>{let l=t,{value:r,onChange:o}=l,n=D(l,["value","onChange"]);jo=null;let i=_react.useCallback.call(void 0, s=>{let u=s.target.value||"0.00";_hooks.isValidNumber.call(void 0, u)&&(jo==="Backspace"?u=(qi(u)/10).toFixed(2):u=(qi(u)*10).toFixed(2),o&&(s.target.value=u,o(s,u)))},[o]),a=_react.useCallback.call(void 0, s=>{s.target.selectionStart===s.target.selectionEnd&&(s.target.selectionStart=s.target.value.length,s.target.selectionEnd=s.target.value.length)},[]);return _jsxruntime.jsx.call(void 0, _material.TextField,d({onKeyDown:s=>{jo=s.key},onSelect:s=>{a(s)},onChange:i,value:_hooks.formatCurrency.call(void 0, String(r),2)||"",inputRef:e,sx:{"& .MuiInputBase-input":{textAlign:"right"}}},n))});Gi.defaultProps={value:0};var au=Gi;var _iconsmaterial = require('@mui/icons-material');var Hi={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 Ye(t){let{cancelLabel:e,confirmLabel:r,type:o,onCancel:n,onConfirm:i,isLoadingConfirmButton:a}=t;return _jsxruntime.jsxs.call(void 0, Se,{children:[n&&_jsxruntime.jsx.call(void 0, z,{onClick:()=>{n()},color:Hi[o||"content"].cancel,children:e}),_jsxruntime.jsx.call(void 0, z,{onClick:()=>{i&&i()},color:Hi[o||"content"].confirm,variant:"contained",isLoading:a,children:r})]})}var lu={cancelLabel:"Cancelar",confirmLabel:"Ok",type:"content",isLoadingConfirmButton:!1};Ye.defaultProps=lu;function Ne(t){let{title:e,children:r,actions:o,onClose:n,onConfirm:i,type:a,dialogActionsProps:l}=t,s=_material.useTheme.call(void 0, ),u=o==="none"?null:o||_jsxruntime.jsx.call(void 0, Ye,d({onCancel:()=>{n&&n({},"backdropClick")},onConfirm:()=>{i&&i()},type:a},l)),c=_react.useMemo.call(void 0, ()=>a==="error"?"error_outlined":a==="warning"?"error_amber":a==="info"||a==="success"?"info":!1,[a]),f=_react.useMemo.call(void 0, ()=>a!=="content"?a:"primary",[a]);return _jsxruntime.jsxs.call(void 0, _material.Dialog,C(d({},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:m=>{if(a!=="content")return m.palette[f||"primary"].main}},fontSize:"17pt",variant:"h3",children:_jsxruntime.jsxs.call(void 0, _material.Stack,{direction:"row",justifyContent:"flex-start",alignItems:"center",children:[c&&_jsxruntime.jsx.call(void 0, _material.Icon,{sx:{mr:1},fontSize:"medium",children:c}),e]})}),n&&_jsxruntime.jsx.call(void 0, _material.IconButton,{onClick:()=>n({},"escapeKeyDown"),sx:{mr:-1,color:s.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:m=>m.palette.grey[500],fontFamily:m=>m.typography.fontFamily},children:r})}),_jsxruntime.jsx.call(void 0, _material.DialogActions,{sx:{padding:2},children:u})]}))}Ne.defaultProps={fullWidth:!0,type:"content"};var _providers = require('@data-c/providers');function Uo(t){let{formValues:e,isSubmitting:r}=_providers.useFormData.call(void 0, ),{closeConfirm:o}=_providers.useFormApi.call(void 0, ),{onDelete:n,hideCancelButton:i,type:a}=t;return _jsxruntime.jsx.call(void 0, Ye,{type:a,confirmLabel:"Excluir",onConfirm:()=>n(e),onCancel:i?void 0:()=>o(),isLoadingConfirmButton:r})}function qo(t){let{isOpenConfirm:e}=_providers.useFormData.call(void 0, ),{closeConfirm:r}=_providers.useFormApi.call(void 0, ),{type:o,title:n,children:i,actions:a,onDelete:l}=t;return _jsxruntime.jsx.call(void 0, Ne,{type:o,open:e,title:n,actions:a||_jsxruntime.jsx.call(void 0, Uo,{type:o,onDelete:l||(()=>{throw new Error("Nenhuma a\xE7\xE3o foi definida para ser executada em onDelete")})}),onClose:()=>{r()},maxWidth:"xs",children:i})}var wu={open:!1,title:"Excluir Registro Permanentemente?",children:"Voc\xEA n\xE3o poder\xE1 recuperar este registro ap\xF3s exclu\xED-lo!",type:"error"};qo.defaultProps=wu;var _muidatatables = require('mui-datatables'); var _muidatatables2 = _interopRequireDefault(_muidatatables);var Mu=t=>{let{count:e,rowsPerPage:r,page:o,changePage:n,changeRowsPerPage:i,rowsPerPageOptions:a}=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:s=>{i(s.target.value)},children:a.map(s=>_jsxruntime.jsx.call(void 0, _material.MenuItem,{value:s,children:s},s))}),_jsxruntime.jsx.call(void 0, _material.Pagination,{variant:"outlined",shape:"rounded",count:l,showFirstButton:!0,showLastButton:!0,onChange:(s,u)=>{n(u)},page:o,color:"primary"})]})})})},Xi=Mu;function yr(t){return _jsxruntime.jsx.call(void 0, _material.Paper,d({sx:{p:2},elevation:0},t))}var Ji=_muidatatables2.default,Wu={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"}},Uu=t=>({filterType:"textField",selectableRows:"none",elevation:0,responsive:"standard",print:!1,download:!1,filter:!1,search:!1,sort:!1,viewColumns:!1,textLabels:Wu,serverSide:!0,rowsPerPageOptions:[15,50,100],rowsPerPage:15,fixedHeader:!0,fixedSelectColumn:!1,tableBodyMaxHeight:t}),qu=t=>{let T=t,{surface:e,error:r,tableTitle:o,isLoading:n,isFetching:i,data:a,columns:l,options:s,pagination:u,changePage:c,changePageSize:f,changeSort:m}=T,p=D(T,["surface","error","tableTitle","isLoading","isFetching","data","columns","options","pagination","changePage","changePageSize","changeSort"]),g=_material.useTheme.call(void 0, ),P=_material.useMediaQuery.call(void 0, g.breakpoints.up("xl"))?75:70,v=u?`${P}vh`:`calc(${P}vh + 65px)`,S=Uu(v),b=s||{};return b&&(c&&(b.onChangePage=c),f&&(b.onChangeRowsPerPage=f),m&&(b.onColumnSortChange=m),b.customFooter=(F,$,R,re,q,oe)=>!u||n?_jsxruntime.jsx.call(void 0, _jsxruntime.Fragment,{}):_jsxruntime.jsx.call(void 0, Xi,{count:u.totalRecords,page:u.page,rowsPerPage:u.pageSize,rowsPerPageOptions:(b==null?void 0:b.rowsPerPageOptions)||(S==null?void 0:S.rowsPerPageOptions),changeRowsPerPage:b==null?void 0:b.onChangeRowsPerPage,changePage:b==null?void 0:b.onChangePage,textLabels:oe})),_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[i&&_jsxruntime.jsx.call(void 0, _material.LinearProgress,{}),r&&_jsxruntime.jsx.call(void 0, _material.Stack,{sx:{width:"100%"},spacing:2,children:_jsxruntime.jsx.call(void 0, _material.Alert,{severity:"error",children:r})}),e&&_jsxruntime.jsx.call(void 0, yr,{children:_jsxruntime.jsx.call(void 0, Ji,d({title:o,data:a,columns:l,options:d(d({},S),b)},p))}),!e&&_jsxruntime.jsx.call(void 0, Ji,d({title:o,data:a,columns:l,options:d(d({},S),b)},p))]})},Gu= exports.DataTable =qu;var ec=_styles.styled.call(void 0, r=>{var o=r,{className:t}=o,e=D(o,["className"]);return _jsxruntime.jsx.call(void 0, _material.Tooltip,C(d({},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"}})),tc={info:"Informa\xE7\xE3o",warning:"Aten\xE7\xE3o"},rc=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:tc[r]})]}),_jsxruntime.jsx.call(void 0, _material.Divider,{sx:{mt:.5}}),_jsxruntime.jsx.call(void 0, _material.Box,{sx:{mt:1},children:e})]})},ra=t=>{let i=t,{type:e,children:r,title:o}=i,n=D(i,["type","children","title"]);return _jsxruntime.jsx.call(void 0, ec,C(d({arrow:!0,title:_jsxruntime.jsx.call(void 0, rc,{title:o||"",type:e}),enterDelay:300},n),{children:r}))};ra.defaultProps={type:"info"};var gt=ra;var Px=()=>({style:{width:"80px",textAlign:"center"}}),wx= exports.CurrencyCellStyle =()=>({style:{width:"128px",textAlign:"right"}});function Ho(t){let{onClick:e,value:r,extraOptions:o,displayUpdateButton:n,displayDeleteButton:i,displayTransporterButton:a,disableTooltip:l,disabled:s,disabledUpdateButton:u,disabledDeleteButton:c,disabledTransporterButton:f}=t;return _jsxruntime.jsxs.call(void 0, _material.Box,{children:[o&&o.map(({id:m,icon:p,iconButtonProps:g,tooltip:x,visible:P,disabled:v,badge:S})=>P===null||!!P&&_jsxruntime.jsx.call(void 0, _material.Badge,{color:"primary",badgeContent:S,children:_jsxruntime.jsxs.call(void 0, _material.IconButton,C(d({onClick:b=>e(m,r,b),size:"small",disabled:v},g),{children:[x&&_jsxruntime.jsx.call(void 0, gt,{type:x.type,title:x.content,children:_jsxruntime.jsx.call(void 0, _material.Icon,{fontSize:"small",children:p})}),!x&&_jsxruntime.jsx.call(void 0, _material.Icon,{fontSize:"small",children:p})]}),m)})),a&&_jsxruntime.jsxs.call(void 0, _material.IconButton,{size:"small",onClick:m=>e("transport",r,m),color:"primary",disabled:s||f,children:[l&&_jsxruntime.jsx.call(void 0, _iconsmaterial.GetApp,{fontSize:"small"}),!l&&_jsxruntime.jsx.call(void 0, gt,{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"})})]}),n&&_jsxruntime.jsxs.call(void 0, _material.IconButton,{size:"small",color:"primary",onClick:m=>e("edit",r,m),disabled:s||u,children:[l&&_jsxruntime.jsx.call(void 0, _iconsmaterial.Edit,{fontSize:"small"}),!l&&_jsxruntime.jsx.call(void 0, gt,{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:m=>e("delete",r,m),color:"primary",disabled:s||c,children:[l&&_jsxruntime.jsx.call(void 0, _iconsmaterial.Delete,{fontSize:"small"}),!l&&_jsxruntime.jsx.call(void 0, gt,{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"})})]})]})}Ho.defaultProps={displayUpdateButton:!0,displayDeleteButton:!0,displayTransporterButton:!1,disableTooltip:!0};function vr(t){let{renderLabel:e,disableds:r}=t,{deleteFilterValue:o,deleteAllFilterValues:n}=_providers.useFilterApi.call(void 0, ),{filterValues:i,appliedValues:a}=_providers.useFilterData.call(void 0, ),l=_react.useMemo.call(void 0, ()=>{if(Object.keys(a||{}).length>0){let c=!1,f=Object.keys(a||{});for(let m=0;m<f.length;m++){let p=a[f[m]];if(Array.isArray(p)&&p.length>0){c=!0;break}else if(!Array.isArray(p)&&p){c=!0;break}}return c}return!1},[a]),s=_react.useCallback.call(void 0, u=>e?e(i[u].label,a[u]):`${i[u].label} - ${a&&a[u]}`,[e,i,a]);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(a||{}).map(u=>{let c=Array.isArray(r)&&r.includes(u),f;if(c||(f=()=>{o&&o(u)}),Array.isArray(a[u])&&a[u].length>0)return _jsxruntime.jsx.call(void 0, _material.Chip,{size:"small",label:s(u),onDelete:f,variant:"outlined"},u);if(!Array.isArray(a[u])&&a[u])return _jsxruntime.jsx.call(void 0, _material.Chip,{size:"small",label:s(u),onDelete:f,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:()=>{n&&n()},children:_jsxruntime.jsx.call(void 0, _iconsmaterial.RestartAlt,{fontSize:"small",color:"error"})})})]})}function Cr(t){let a=t,{drawerTitle:e,actions:r,onClose:o,children:n}=a,i=D(a,["drawerTitle","actions","onClose","children"]);return _jsxruntime.jsx.call(void 0, _material.Drawer,C(d({PaperProps:{style:{borderRadius:"12px 0 0 12px"}},onClose:o},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.jsx.call(void 0, _material.Toolbar,{}),_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}),o&&_jsxruntime.jsx.call(void 0, _material.IconButton,{onClick:o,children:_jsxruntime.jsx.call(void 0, _iconsmaterial.Cancel,{color:"error"})})]}),_jsxruntime.jsx.call(void 0, _material.Box,{sx:{padding:l=>l.spacing(2)},children:n})]}),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})]})}))}Cr.defaultProps={anchor:"right"};var Cc=()=>{let{applyFilterValues:t,closeFilter:e,deleteAllFilterValues:r}=_providers.useFilterApi.call(void 0, );function o(){e()}function n(){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:n,children:[_jsxruntime.jsx.call(void 0, _iconsmaterial.Search,{})," Aplicar"]})]})},Sc=t=>{let{title:e,children:r,onApplyFilters:o,drawerProps:n}=t,{isOpen:i,appliedValues:a}=_providers.useFilterData.call(void 0, ),{closeFilter:l}=_providers.useFilterApi.call(void 0, );return _react.useEffect.call(void 0, ()=>{o&&o(a)},[a]),_jsxruntime.jsx.call(void 0, Cr,C(d({},n),{drawerTitle:e,open:i,children:r,onClose:()=>l(),actions:_jsxruntime.jsx.call(void 0, Cc,{})}))};function Jo(t){let{triggerButtonLabel:e,triggerButtonProps:r,triggerButton:o,title:n,children:i,onApplyFilters:a,renderLabel:l,disableds:s,disableFilterControl:u,drawerProps:c}=t,{openFilter:f}=_providers.useFilterApi.call(void 0, ),m=o==="none"?null:o||_jsxruntime.jsx.call(void 0, _material.Button,C(d({variant:"contained",onClick:()=>{f()}},r),{children:e||"Adicionar"}));return _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[u&&m,!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, vr,{renderLabel:l,disableds:s}),m]}),_jsxruntime.jsx.call(void 0, Sc,C(d({},c),{onApplyFilters:a,title:n||"",children:i}))]})}Jo.defaultProps={triggerButtonLabel:"Pesquisar",triggerButtonProps:{variant:"contained",startIcon:_jsxruntime.jsx.call(void 0, _iconsmaterial.Search,{})},title:"Pesquisar"};function ca(t){let{isFlagged:e,type:r}=t;return e?_jsxruntime.jsx.call(void 0, _iconsmaterial.Circle,{color:r,sx:{fontSize:"10pt"}}):null}function en(t){let{formValues:e,isSubmitting:r}=_providers.useFormData.call(void 0, ),{closeForm:o}=_providers.useFormApi.call(void 0, ),{onSubmitForm:n,hideCancelButton:i,confirmButtonLabel:a}=t;return _jsxruntime.jsx.call(void 0, Ye,{confirmLabel:a||"Salvar",onConfirm:()=>n(e),onCancel:i?void 0:()=>o(),isLoadingConfirmButton:r})}function rn(t){let{view:e,children:r,actions:o,onSubmitForm:n,triggerButton:i,dialogProps:a,triggerButtonLabel:l,triggerButtonProps:s,confirmButtonLabel:u}=t,{isOpen:c}=_providers.useFormData.call(void 0, ),{closeForm:f,openForm:m}=_providers.useFormApi.call(void 0, ),p=o||_jsxruntime.jsx.call(void 0, en,{hideCancelButton:e==="plain",confirmButtonLabel:u,onSubmitForm:n||(()=>{throw new Error("Nenhuma a\xE7\xE3o foi definida para ser executada em onSubmitForm")})}),g=i==="none"?null:i||_jsxruntime.jsx.call(void 0, z,C(d({variant:"contained",onClick:()=>{m()}},s),{children:l||"Adicionar"}));return e==="dialog"?_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[g,_jsxruntime.jsx.call(void 0, Ne,C(d({},a),{onClose:()=>{f()},open:!!c,children:r,actions:p}))]}):_jsxruntime.jsxs.call(void 0, _material.Stack,{children:[r,p]})}var _c={view:"dialog",dialogProps:{maxWidth:"md",fullWidth:!0}};rn.defaultProps=_c;var _styled = require('@emotion/styled'); var _styled2 = _interopRequireDefault(_styled);function xt(t,...e){let r=new URL(`https://mui.com/production-error/?code=${t}`);return e.forEach(o=>r.searchParams.append("args[]",o)),`Minified MUI error #${t}; visit ${r} for the full message.`}function pa(t){for(var e=0,r,o=0,n=t.length;n>=4;++o,n-=4)r=t.charCodeAt(o)&255|(t.charCodeAt(++o)&255)<<8|(t.charCodeAt(++o)&255)<<16|(t.charCodeAt(++o)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,e=(r&65535)*1540483477+((r>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(n){case 3:e^=(t.charCodeAt(o+2)&255)<<16;case 2:e^=(t.charCodeAt(o+1)&255)<<8;case 1:e^=t.charCodeAt(o)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var da={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function ma(t){var e=Object.create(null);return function(r){return e[r]===void 0&&(e[r]=t(r)),e[r]}}var Rc=!1,Bc=/[A-Z]|^ms/g,Ic=/_EMO_([^_]+?)_([^]*?)_EMO_/g,xa=function(e){return e.charCodeAt(1)===45},ha=function(e){return e!=null&&typeof e!="boolean"},on=ma(function(t){return xa(t)?t:t.replace(Bc,"-$&").toLowerCase()}),ga=function(e,r){switch(e){case"animation":case"animationName":if(typeof r=="string")return r.replace(Ic,function(o,n,i){return Re={name:n,styles:i,next:Re},n})}return da[e]!==1&&!xa(e)&&typeof r=="number"&&r!==0?r+"px":r},$c="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function Wt(t,e,r){if(r==null)return"";var o=r;if(o.__emotion_styles!==void 0)return o;switch(typeof r){case"boolean":return"";case"object":{var n=r;if(n.anim===1)return Re={name:n.name,styles:n.styles,next:Re},n.name;var i=r;if(i.styles!==void 0){var a=i.next;if(a!==void 0)for(;a!==void 0;)Re={name:a.name,styles:a.styles,next:Re},a=a.next;var l=i.styles+";";return l}return Lc(t,e,r)}case"function":{if(t!==void 0){var s=Re,u=r(t);return Re=s,Wt(t,e,u)}break}}var c=r;if(e==null)return c;var f=e[c];return f!==void 0?f:c}function Lc(t,e,r){var o="";if(Array.isArray(r))for(var n=0;n<r.length;n++)o+=Wt(t,e,r[n])+";";else for(var i in r){var a=r[i];if(typeof a!="object"){var l=a;e!=null&&e[l]!==void 0?o+=i+"{"+e[l]+"}":ha(l)&&(o+=on(i)+":"+ga(i,l)+";")}else{if(i==="NO_COMPONENT_SELECTOR"&&Rc)throw new Error($c);if(Array.isArray(a)&&typeof a[0]=="string"&&(e==null||e[a[0]]===void 0))for(var s=0;s<a.length;s++)ha(a[s])&&(o+=on(i)+":"+ga(i,a[s])+";");else{var u=Wt(t,e,a);switch(i){case"animation":case"animationName":{o+=on(i)+":"+u+";";break}default:o+=i+"{"+u+"}"}}}}return o}var ya=/label:\s*([^\s;{]+)\s*(;|$)/g,Re;function ba(t,e,r){if(t.length===1&&typeof t[0]=="object"&&t[0]!==null&&t[0].styles!==void 0)return t[0];var o=!0,n="";Re=void 0;var i=t[0];if(i==null||i.raw===void 0)o=!1,n+=Wt(r,e,i);else{var a=i;n+=a[0]}for(var l=1;l<t.length;l++)if(n+=Wt(r,e,t[l]),o){var s=i;n+=s[l]}ya.lastIndex=0;for(var u="",c;(c=ya.exec(n))!==null;)u+="-"+c[1];var f=pa(n)+u;return{name:f,styles:n,next:Re}}var _react2 = require('@emotion/react');function mn(t,e){let r=_styled2.default.call(void 0, t,e);return process.env.NODE_ENV!=="production"?(...o)=>{let n=typeof t=="string"?`"${t}"`:"component";return o.length===0?console.error([`MUI: Seems like you called \`styled(${n})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join(`
|
|
3
|
-
`)):o.some(i=>i===void 0)&&console.error(`MUI: the styled(${n})(...args) API requires all its args to be defined.`),r(...o)}:r}function
|
|
4
|
-
For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:
|
|
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 Ol=Object.create;var Mo=Object.defineProperty,Dl=Object.defineProperties,_l=Object.getOwnPropertyDescriptor,Ml=Object.getOwnPropertyDescriptors,Rl=Object.getOwnPropertyNames,pr=Object.getOwnPropertySymbols,Bl=Object.getPrototypeOf,Ro=Object.prototype.hasOwnProperty,Bi=Object.prototype.propertyIsEnumerable;var Ri=(t,e,r)=>e in t?Mo(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,d=(t,e)=>{for(var r in e||(e={}))Ro.call(e,r)&&Ri(t,r,e[r]);if(pr)for(var r of pr(e))Bi.call(e,r)&&Ri(t,r,e[r]);return t},C=(t,e)=>Dl(t,Ml(e));var F=(t,e)=>{var r={};for(var o in t)Ro.call(t,o)&&e.indexOf(o)<0&&(r[o]=t[o]);if(t!=null&&pr)for(var o of pr(t))e.indexOf(o)<0&&Bi.call(t,o)&&(r[o]=t[o]);return r};var le=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Il=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Rl(e))!Ro.call(t,n)&&n!==r&&Mo(t,n,{get:()=>e[n],enumerable:!(o=_l(e,n))||o.enumerable});return t};var Ye=(t,e,r)=>(r=t!=null?Ol(Bl(t)):{},Il(e||!t||!t.__esModule?Mo(r,"default",{value:t,enumerable:!0}):r,t));var L=(t,e,r)=>new Promise((o,n)=>{var i=s=>{try{l(r.next(s))}catch(u){n(u)}},a=s=>{try{l(r.throw(s))}catch(u){n(u)}},l=s=>s.done?o(s.value):Promise.resolve(s.value).then(i,a);l((r=r.apply(t,e)).next())});var ya=le(q=>{"use strict";var ne=typeof Symbol=="function"&&Symbol.for,Xo=ne?Symbol.for("react.element"):60103,Jo=ne?Symbol.for("react.portal"):60106,br=ne?Symbol.for("react.fragment"):60107,vr=ne?Symbol.for("react.strict_mode"):60108,Cr=ne?Symbol.for("react.profiler"):60114,Tr=ne?Symbol.for("react.provider"):60109,Sr=ne?Symbol.for("react.context"):60110,en=ne?Symbol.for("react.async_mode"):60111,Pr=ne?Symbol.for("react.concurrent_mode"):60111,wr=ne?Symbol.for("react.forward_ref"):60112,Er=ne?Symbol.for("react.suspense"):60113,Nc=ne?Symbol.for("react.suspense_list"):60120,Ar=ne?Symbol.for("react.memo"):60115,kr=ne?Symbol.for("react.lazy"):60116,zc=ne?Symbol.for("react.block"):60121,Vc=ne?Symbol.for("react.fundamental"):60117,jc=ne?Symbol.for("react.responder"):60118,Wc=ne?Symbol.for("react.scope"):60119;function ye(t){if(typeof t=="object"&&t!==null){var e=t.$$typeof;switch(e){case Xo:switch(t=t.type,t){case en:case Pr:case br:case Cr:case vr:case Er:return t;default:switch(t=t&&t.$$typeof,t){case Sr:case wr:case kr:case Ar:case Tr:return t;default:return e}}case Jo:return e}}}function ga(t){return ye(t)===Pr}q.AsyncMode=en;q.ConcurrentMode=Pr;q.ContextConsumer=Sr;q.ContextProvider=Tr;q.Element=Xo;q.ForwardRef=wr;q.Fragment=br;q.Lazy=kr;q.Memo=Ar;q.Portal=Jo;q.Profiler=Cr;q.StrictMode=vr;q.Suspense=Er;q.isAsyncMode=function(t){return ga(t)||ye(t)===en};q.isConcurrentMode=ga;q.isContextConsumer=function(t){return ye(t)===Sr};q.isContextProvider=function(t){return ye(t)===Tr};q.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===Xo};q.isForwardRef=function(t){return ye(t)===wr};q.isFragment=function(t){return ye(t)===br};q.isLazy=function(t){return ye(t)===kr};q.isMemo=function(t){return ye(t)===Ar};q.isPortal=function(t){return ye(t)===Jo};q.isProfiler=function(t){return ye(t)===Cr};q.isStrictMode=function(t){return ye(t)===vr};q.isSuspense=function(t){return ye(t)===Er};q.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===br||t===Pr||t===Cr||t===vr||t===Er||t===Nc||typeof t=="object"&&t!==null&&(t.$$typeof===kr||t.$$typeof===Ar||t.$$typeof===Tr||t.$$typeof===Sr||t.$$typeof===wr||t.$$typeof===Vc||t.$$typeof===jc||t.$$typeof===Wc||t.$$typeof===zc)};q.typeOf=ye});var xa=le(G=>{"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,o=t?Symbol.for("react.fragment"):60107,n=t?Symbol.for("react.strict_mode"):60108,i=t?Symbol.for("react.profiler"):60114,a=t?Symbol.for("react.provider"):60109,l=t?Symbol.for("react.context"):60110,s=t?Symbol.for("react.async_mode"):60111,u=t?Symbol.for("react.concurrent_mode"):60111,c=t?Symbol.for("react.forward_ref"):60112,f=t?Symbol.for("react.suspense"):60113,m=t?Symbol.for("react.suspense_list"):60120,p=t?Symbol.for("react.memo"):60115,y=t?Symbol.for("react.lazy"):60116,h=t?Symbol.for("react.block"):60121,T=t?Symbol.for("react.fundamental"):60117,v=t?Symbol.for("react.responder"):60118,S=t?Symbol.for("react.scope"):60119;function b(A){return typeof A=="string"||typeof A=="function"||A===o||A===u||A===i||A===n||A===f||A===m||typeof A=="object"&&A!==null&&(A.$$typeof===y||A.$$typeof===p||A.$$typeof===a||A.$$typeof===l||A.$$typeof===c||A.$$typeof===T||A.$$typeof===v||A.$$typeof===S||A.$$typeof===h)}function P(A){if(typeof A=="object"&&A!==null){var _o=A.$$typeof;switch(_o){case e:var fr=A.type;switch(fr){case s:case u:case o:case i:case n:case f:return fr;default:var Mi=fr&&fr.$$typeof;switch(Mi){case l:case c:case y:case p:case a:return Mi;default:return _o}}case r:return _o}}}var D=s,I=u,M=l,te=a,Y=e,oe=c,O=o,R=y,g=p,x=r,w=i,E=n,k=f,B=!1;function _(A){return B||(B=!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.")),$(A)||P(A)===s}function $(A){return P(A)===u}function z(A){return P(A)===l}function W(A){return P(A)===a}function V(A){return typeof A=="object"&&A!==null&&A.$$typeof===e}function de(A){return P(A)===c}function se(A){return P(A)===o}function Ge(A){return P(A)===y}function wl(A){return P(A)===p}function El(A){return P(A)===r}function Al(A){return P(A)===i}function kl(A){return P(A)===n}function Fl(A){return P(A)===f}G.AsyncMode=D,G.ConcurrentMode=I,G.ContextConsumer=M,G.ContextProvider=te,G.Element=Y,G.ForwardRef=oe,G.Fragment=O,G.Lazy=R,G.Memo=g,G.Portal=x,G.Profiler=w,G.StrictMode=E,G.Suspense=k,G.isAsyncMode=_,G.isConcurrentMode=$,G.isContextConsumer=z,G.isContextProvider=W,G.isElement=V,G.isForwardRef=de,G.isFragment=se,G.isLazy=Ge,G.isMemo=wl,G.isPortal=El,G.isProfiler=Al,G.isStrictMode=kl,G.isSuspense=Fl,G.isValidElementType=b,G.typeOf=P}()});var rn=le((Ob,tn)=>{"use strict";process.env.NODE_ENV==="production"?tn.exports=ya():tn.exports=xa()});var Ca=le((Db,va)=>{"use strict";var ba=Object.getOwnPropertySymbols,Uc=Object.prototype.hasOwnProperty,qc=Object.prototype.propertyIsEnumerable;function Gc(t){if(t==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}function Yc(){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 o=Object.getOwnPropertyNames(e).map(function(i){return e[i]});if(o.join("")!=="0123456789")return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(i){n[i]=i}),Object.keys(Object.assign({},n)).join("")==="abcdefghijklmnopqrst"}catch(i){return!1}}va.exports=Yc()?Object.assign:function(t,e){for(var r,o=Gc(t),n,i=1;i<arguments.length;i++){r=Object(arguments[i]);for(var a in r)Uc.call(r,a)&&(o[a]=r[a]);if(ba){n=ba(r);for(var l=0;l<n.length;l++)qc.call(r,n[l])&&(o[n[l]]=r[n[l]])}}return o}});var Fr=le((_b,Ta)=>{"use strict";var Hc="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";Ta.exports=Hc});var on=le((Mb,Sa)=>{Sa.exports=Function.call.bind(Object.prototype.hasOwnProperty)});var ka=le((Rb,Aa)=>{"use strict";var nn=function(){};process.env.NODE_ENV!=="production"&&(Pa=Fr(),Or={},wa=on(),nn=function(t){var e="Warning: "+t;typeof console!="undefined"&&console.error(e);try{throw new Error(e)}catch(r){}});var Pa,Or,wa;function Ea(t,e,r,o,n){if(process.env.NODE_ENV!=="production"){for(var i in t)if(wa(t,i)){var a;try{if(typeof t[i]!="function"){var l=Error((o||"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}a=t[i](e,i,o,r,null,Pa)}catch(u){a=u}if(a&&!(a instanceof Error)&&nn((o||"React class")+": type specification of "+r+" `"+i+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof a+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),a instanceof Error&&!(a.message in Or)){Or[a.message]=!0;var s=n?n():"";nn("Failed "+r+" type: "+a.message+(s!=null?s:""))}}}}Ea.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(Or={})};Aa.exports=Ea});var Da=le((Bb,Oa)=>{"use strict";var Kc=rn(),Zc=Ca(),yt=Fr(),an=on(),Fa=ka(),xt=function(){};process.env.NODE_ENV!=="production"&&(xt=function(t){var e="Warning: "+t;typeof console!="undefined"&&console.error(e);try{throw new Error(e)}catch(r){}});function Dr(){return null}Oa.exports=function(t,e){var r=typeof Symbol=="function"&&Symbol.iterator,o="@@iterator";function n(g){var x=g&&(r&&g[r]||g[o]);if(typeof x=="function")return x}var i="<<anonymous>>",a={array:c("array"),bigint:c("bigint"),bool:c("boolean"),func:c("function"),number:c("number"),object:c("object"),string:c("string"),symbol:c("symbol"),any:f(),arrayOf:m,element:p(),elementType:y(),instanceOf:h,node:b(),objectOf:v,oneOf:T,oneOfType:S,shape:D,exact:I};function l(g,x){return g===x?g!==0||1/g===1/x:g!==g&&x!==x}function s(g,x){this.message=g,this.data=x&&typeof x=="object"?x:{},this.stack=""}s.prototype=Error.prototype;function u(g){if(process.env.NODE_ENV!=="production")var x={},w=0;function E(B,_,$,z,W,V,de){if(z=z||i,V=V||$,de!==yt){if(e){var se=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 se.name="Invariant Violation",se}else if(process.env.NODE_ENV!=="production"&&typeof console!="undefined"){var Ge=z+":"+$;!x[Ge]&&w<3&&(xt("You are manually calling a React.PropTypes validation function for the `"+V+"` prop on `"+z+"`. 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."),x[Ge]=!0,w++)}}return _[$]==null?B?_[$]===null?new s("The "+W+" `"+V+"` is marked as required "+("in `"+z+"`, but its value is `null`.")):new s("The "+W+" `"+V+"` is marked as required in "+("`"+z+"`, but its value is `undefined`.")):null:g(_,$,z,W,V)}var k=E.bind(null,!1);return k.isRequired=E.bind(null,!0),k}function c(g){function x(w,E,k,B,_,$){var z=w[E],W=Y(z);if(W!==g){var V=oe(z);return new s("Invalid "+B+" `"+_+"` of type "+("`"+V+"` supplied to `"+k+"`, expected ")+("`"+g+"`."),{expectedType:g})}return null}return u(x)}function f(){return u(Dr)}function m(g){function x(w,E,k,B,_){if(typeof g!="function")return new s("Property `"+_+"` of component `"+k+"` has invalid PropType notation inside arrayOf.");var $=w[E];if(!Array.isArray($)){var z=Y($);return new s("Invalid "+B+" `"+_+"` of type "+("`"+z+"` supplied to `"+k+"`, expected an array."))}for(var W=0;W<$.length;W++){var V=g($,W,k,B,_+"["+W+"]",yt);if(V instanceof Error)return V}return null}return u(x)}function p(){function g(x,w,E,k,B){var _=x[w];if(!t(_)){var $=Y(_);return new s("Invalid "+k+" `"+B+"` of type "+("`"+$+"` supplied to `"+E+"`, expected a single ReactElement."))}return null}return u(g)}function y(){function g(x,w,E,k,B){var _=x[w];if(!Kc.isValidElementType(_)){var $=Y(_);return new s("Invalid "+k+" `"+B+"` of type "+("`"+$+"` supplied to `"+E+"`, expected a single ReactElement type."))}return null}return u(g)}function h(g){function x(w,E,k,B,_){if(!(w[E]instanceof g)){var $=g.name||i,z=R(w[E]);return new s("Invalid "+B+" `"+_+"` of type "+("`"+z+"` supplied to `"+k+"`, expected ")+("instance of `"+$+"`."))}return null}return u(x)}function T(g){if(!Array.isArray(g))return process.env.NODE_ENV!=="production"&&(arguments.length>1?xt("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])."):xt("Invalid argument supplied to oneOf, expected an array.")),Dr;function x(w,E,k,B,_){for(var $=w[E],z=0;z<g.length;z++)if(l($,g[z]))return null;var W=JSON.stringify(g,function(de,se){var Ge=oe(se);return Ge==="symbol"?String(se):se});return new s("Invalid "+B+" `"+_+"` of value `"+String($)+"` "+("supplied to `"+k+"`, expected one of "+W+"."))}return u(x)}function v(g){function x(w,E,k,B,_){if(typeof g!="function")return new s("Property `"+_+"` of component `"+k+"` has invalid PropType notation inside objectOf.");var $=w[E],z=Y($);if(z!=="object")return new s("Invalid "+B+" `"+_+"` of type "+("`"+z+"` supplied to `"+k+"`, expected an object."));for(var W in $)if(an($,W)){var V=g($,W,k,B,_+"."+W,yt);if(V instanceof Error)return V}return null}return u(x)}function S(g){if(!Array.isArray(g))return process.env.NODE_ENV!=="production"&&xt("Invalid argument supplied to oneOfType, expected an instance of array."),Dr;for(var x=0;x<g.length;x++){var w=g[x];if(typeof w!="function")return xt("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+O(w)+" at index "+x+"."),Dr}function E(k,B,_,$,z){for(var W=[],V=0;V<g.length;V++){var de=g[V],se=de(k,B,_,$,z,yt);if(se==null)return null;se.data&&an(se.data,"expectedType")&&W.push(se.data.expectedType)}var Ge=W.length>0?", expected one of type ["+W.join(", ")+"]":"";return new s("Invalid "+$+" `"+z+"` supplied to "+("`"+_+"`"+Ge+"."))}return u(E)}function b(){function g(x,w,E,k,B){return M(x[w])?null:new s("Invalid "+k+" `"+B+"` supplied to "+("`"+E+"`, expected a ReactNode."))}return u(g)}function P(g,x,w,E,k){return new s((g||"React class")+": "+x+" type `"+w+"."+E+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+k+"`.")}function D(g){function x(w,E,k,B,_){var $=w[E],z=Y($);if(z!=="object")return new s("Invalid "+B+" `"+_+"` of type `"+z+"` "+("supplied to `"+k+"`, expected `object`."));for(var W in g){var V=g[W];if(typeof V!="function")return P(k,B,_,W,oe(V));var de=V($,W,k,B,_+"."+W,yt);if(de)return de}return null}return u(x)}function I(g){function x(w,E,k,B,_){var $=w[E],z=Y($);if(z!=="object")return new s("Invalid "+B+" `"+_+"` of type `"+z+"` "+("supplied to `"+k+"`, expected `object`."));var W=Zc({},w[E],g);for(var V in W){var de=g[V];if(an(g,V)&&typeof de!="function")return P(k,B,_,V,oe(de));if(!de)return new s("Invalid "+B+" `"+_+"` key `"+V+"` supplied to `"+k+"`.\nBad object: "+JSON.stringify(w[E],null," ")+`
|
|
2
|
+
Valid keys: `+JSON.stringify(Object.keys(g),null," "));var se=de($,V,k,B,_+"."+V,yt);if(se)return se}return null}return u(x)}function M(g){switch(typeof g){case"number":case"string":case"undefined":return!0;case"boolean":return!g;case"object":if(Array.isArray(g))return g.every(M);if(g===null||t(g))return!0;var x=n(g);if(x){var w=x.call(g),E;if(x!==g.entries){for(;!(E=w.next()).done;)if(!M(E.value))return!1}else for(;!(E=w.next()).done;){var k=E.value;if(k&&!M(k[1]))return!1}}else return!1;return!0;default:return!1}}function te(g,x){return g==="symbol"?!0:x?x["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&x instanceof Symbol:!1}function Y(g){var x=typeof g;return Array.isArray(g)?"array":g instanceof RegExp?"object":te(x,g)?"symbol":x}function oe(g){if(typeof g=="undefined"||g===null)return""+g;var x=Y(g);if(x==="object"){if(g instanceof Date)return"date";if(g instanceof RegExp)return"regexp"}return x}function O(g){var x=oe(g);switch(x){case"array":case"object":return"an "+x;case"boolean":case"date":case"regexp":return"a "+x;default:return x}}function R(g){return!g.constructor||!g.constructor.name?i:g.constructor.name}return a.checkPropTypes=Fa,a.resetWarningCache=Fa.resetWarningCache,a.PropTypes=a,a}});var Ba=le((Ib,Ra)=>{"use strict";var Qc=Fr();function _a(){}function Ma(){}Ma.resetWarningCache=_a;Ra.exports=function(){function t(o,n,i,a,l,s){if(s!==Qc){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:Ma,resetWarningCache:_a};return r.PropTypes=r,r}});var _r=le(($b,sn)=>{process.env.NODE_ENV!=="production"?(Ia=rn(),$a=!0,sn.exports=Da()(Ia.isElement,$a)):sn.exports=Ba()();var Ia,$a});var Va=le(H=>{"use strict";var cn=Symbol.for("react.transitional.element"),fn=Symbol.for("react.portal"),Mr=Symbol.for("react.fragment"),Rr=Symbol.for("react.strict_mode"),Br=Symbol.for("react.profiler");Symbol.for("react.provider");var Ir=Symbol.for("react.consumer"),$r=Symbol.for("react.context"),Lr=Symbol.for("react.forward_ref"),Nr=Symbol.for("react.suspense"),zr=Symbol.for("react.suspense_list"),Vr=Symbol.for("react.memo"),jr=Symbol.for("react.lazy"),Jc=Symbol.for("react.view_transition"),ef=Symbol.for("react.client.reference");function Te(t){if(typeof t=="object"&&t!==null){var e=t.$$typeof;switch(e){case cn:switch(t=t.type,t){case Mr:case Br:case Rr:case Nr:case zr:case Jc:return t;default:switch(t=t&&t.$$typeof,t){case $r:case Lr:case jr:case Vr:return t;case Ir:return t;default:return e}}case fn:return e}}}H.ContextConsumer=Ir;H.ContextProvider=$r;H.Element=cn;H.ForwardRef=Lr;H.Fragment=Mr;H.Lazy=jr;H.Memo=Vr;H.Portal=fn;H.Profiler=Br;H.StrictMode=Rr;H.Suspense=Nr;H.SuspenseList=zr;H.isContextConsumer=function(t){return Te(t)===Ir};H.isContextProvider=function(t){return Te(t)===$r};H.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===cn};H.isForwardRef=function(t){return Te(t)===Lr};H.isFragment=function(t){return Te(t)===Mr};H.isLazy=function(t){return Te(t)===jr};H.isMemo=function(t){return Te(t)===Vr};H.isPortal=function(t){return Te(t)===fn};H.isProfiler=function(t){return Te(t)===Br};H.isStrictMode=function(t){return Te(t)===Rr};H.isSuspense=function(t){return Te(t)===Nr};H.isSuspenseList=function(t){return Te(t)===zr};H.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===Mr||t===Br||t===Rr||t===Nr||t===zr||typeof t=="object"&&t!==null&&(t.$$typeof===jr||t.$$typeof===Vr||t.$$typeof===$r||t.$$typeof===Ir||t.$$typeof===Lr||t.$$typeof===ef||t.getModuleId!==void 0)};H.typeOf=Te});var ja=le(K=>{"use strict";process.env.NODE_ENV!=="production"&&function(){function t(h){if(typeof h=="object"&&h!==null){var T=h.$$typeof;switch(T){case e:switch(h=h.type,h){case o:case i:case n:case u:case c:case p:return h;default:switch(h=h&&h.$$typeof,h){case l:case s:case m:case f:return h;case a:return h;default:return T}}case r:return T}}}var e=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler");Symbol.for("react.provider");var a=Symbol.for("react.consumer"),l=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),p=Symbol.for("react.view_transition"),y=Symbol.for("react.client.reference");K.ContextConsumer=a,K.ContextProvider=l,K.Element=e,K.ForwardRef=s,K.Fragment=o,K.Lazy=m,K.Memo=f,K.Portal=r,K.Profiler=i,K.StrictMode=n,K.Suspense=u,K.SuspenseList=c,K.isContextConsumer=function(h){return t(h)===a},K.isContextProvider=function(h){return t(h)===l},K.isElement=function(h){return typeof h=="object"&&h!==null&&h.$$typeof===e},K.isForwardRef=function(h){return t(h)===s},K.isFragment=function(h){return t(h)===o},K.isLazy=function(h){return t(h)===m},K.isMemo=function(h){return t(h)===f},K.isPortal=function(h){return t(h)===r},K.isProfiler=function(h){return t(h)===i},K.isStrictMode=function(h){return t(h)===n},K.isSuspense=function(h){return t(h)===u},K.isSuspenseList=function(h){return t(h)===c},K.isValidElementType=function(h){return typeof h=="string"||typeof h=="function"||h===o||h===i||h===n||h===u||h===c||typeof h=="object"&&h!==null&&(h.$$typeof===m||h.$$typeof===f||h.$$typeof===l||h.$$typeof===a||h.$$typeof===s||h.$$typeof===y||h.getModuleId!==void 0)},K.typeOf=t}()});var dn=le((Gb,pn)=>{"use strict";process.env.NODE_ENV==="production"?pn.exports=Va():pn.exports=ja()});var Ps=le((RS,Ss)=>{"use strict";function at(t){this._maxSize=t,this.clear()}at.prototype.clear=function(){this._size=0,this._values=Object.create(null)};at.prototype.get=function(t){return this._values[t]};at.prototype.set=function(t,e){return this._size>=this._maxSize&&this.clear(),t in this._values||this._size++,this._values[t]=e};var ud=/[^.^\]^[]+|(?=\[\]|\.\.)/g,Ts=/^\d+$/,cd=/^\d/,fd=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,pd=/^\s*(['"]?)(.*?)(\1)\s*$/,Gn=512,bs=new at(Gn),vs=new at(Gn),Cs=new at(Gn);Ss.exports={Cache:at,split:qn,normalizePath:Un,setter:function(t){var e=Un(t);return vs.get(t)||vs.set(t,function(o,n){for(var i=0,a=e.length,l=o;i<a-1;){var s=e[i];if(s==="__proto__"||s==="constructor"||s==="prototype")return o;l=l[e[i++]]}l[e[i]]=n})},getter:function(t,e){var r=Un(t);return Cs.get(t)||Cs.set(t,function(n){for(var i=0,a=r.length;i<a;)if(n!=null||!e)n=n[r[i++]];else return;return n})},join:function(t){return t.reduce(function(e,r){return e+(Yn(r)||Ts.test(r)?"["+r+"]":(e?".":"")+r)},"")},forEach:function(t,e,r){dd(Array.isArray(t)?t:qn(t),e,r)}};function Un(t){return bs.get(t)||bs.set(t,qn(t).map(function(e){return e.replace(pd,"$2")}))}function qn(t){return t.match(ud)||[""]}function dd(t,e,r){var o=t.length,n,i,a,l;for(i=0;i<o;i++)n=t[i],n&&(gd(n)&&(n='"'+n+'"'),l=Yn(n),a=!l&&/^\d+$/.test(n),e.call(r,n,l,a,i,t))}function Yn(t){return typeof t=="string"&&t&&["'",'"'].indexOf(t.charAt(0))!==-1}function md(t){return t.match(cd)&&!t.match(Ts)}function hd(t){return fd.test(t)}function gd(t){return!Yn(t)&&(md(t)||hd(t))}});var As=le((BS,Es)=>{var yd=/[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,ao=t=>t.match(yd)||[],so=t=>t[0].toUpperCase()+t.slice(1),Hn=(t,e)=>ao(t).join(e).toLowerCase(),ws=t=>ao(t).reduce((e,r)=>`${e}${e?r[0].toUpperCase()+r.slice(1).toLowerCase():r.toLowerCase()}`,""),xd=t=>so(ws(t)),bd=t=>Hn(t,"_"),vd=t=>Hn(t,"-"),Cd=t=>so(Hn(t," ")),Td=t=>ao(t).map(so).join(" ");Es.exports={words:ao,upperFirst:so,camelCase:ws,pascalCase:xd,snakeCase:bd,kebabCase:vd,sentenceCase:Cd,titleCase:Td}});var Fs=le((IS,Kn)=>{Kn.exports=function(t){return ks(Sd(t),t)};Kn.exports.array=ks;function ks(t,e){var r=t.length,o=new Array(r),n={},i=r,a=Pd(e),l=wd(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--;)n[i]||s(t[i],i,new Set);return o;function s(u,c,f){if(f.has(u)){var m;try{m=", node was:"+JSON.stringify(u)}catch(h){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(!n[c]){n[c]=!0;var p=a.get(u)||new Set;if(p=Array.from(p),c=p.length){f.add(u);do{var y=p[--c];s(y,l.get(y),f)}while(c);f.delete(u)}o[--r]=u}}}function Sd(t){for(var e=new Set,r=0,o=t.length;r<o;r++){var n=t[r];e.add(n[0]),e.add(n[1])}return Array.from(e)}function Pd(t){for(var e=new Map,r=0,o=t.length;r<o;r++){var n=t[r];e.has(n[0])||e.set(n[0],new Set),e.has(n[1])||e.set(n[1],new Set),e.get(n[0]).add(n[1])}return e}function wd(t){for(var e=new Map,r=0,o=t.length;r<o;r++)e.set(t[r],r);return e}});var _material = require('@mui/material');var _jsxruntime = require('react/jsx-runtime');var Nl=t=>{let n=t,{isLoading:e,children:r}=n,o=F(n,["isLoading","children"]);return _jsxruntime.jsx.call(void 0, _material.Button,C(d({},o),{disabled:e?!0:o.disabled,children:e?_jsxruntime.jsx.call(void 0, _material.CircularProgress,{color:"secondary",size:22}):r}))},N= exports.Button =Nl;function Ce(t){return _jsxruntime.jsx.call(void 0, _material.Stack,d({direction:"row",justifyContent:"flex-end",alignItems:"center",spacing:1},t))}function $i(t){let o=t,{label:e}=o,r=F(o,["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,d({},r))})})}var _polished = require('polished');var _styles = require('@mui/material/styles');var dt="#4BA9C1",Yl="#2C96B3",Hl=32,Kl={cssVariables:!0,mixins:{toolbar:{height:48},menu:{width:260}},palette:{situacao:{aberto:"#FFFF00",fechado:"#FFA500",orcamento:"#800080",analise:"#0000FF",cancelado:"#FF0000",liberado:"#008000"},border:"rgba(0, 0, 0, 0.23)",text:{primary:"#262626",secondary:"#808080"},primary:{light:"#66D1E6",main:dt,dark:Yl},secondary:{light:"#eceff1",main:"#13143F",dark:"#263238"},background:{default:"#FFF",paper:"#F4F4F4"},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:{fontFamily:["Roboto","Lato","sans-serif","Poppins","Montserrat"].join(","),h1:{fontSize:"2rem"},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:"0.775rem",color:"#262626"},body2:{fontSize:"0.7685rem",color:"#808080"},subtitle1:{fontSize:"0.885rem"},subtitle2:{fontSize:"0.785rem",color:"#808080"}},components:{MuiTab:{styleOverrides:{root:{minHeight:"30px",height:"30px"}}},MuiList:{styleOverrides:{root:{paddingTop:0}}},MuiListItemButton:{styleOverrides:{root:{"&.Mui-selected":{"& .MuiIcon-root":{color:dt,borderRadius:"0px"},"& .MuiSvgIcon-root":{color:dt},"& .MuiTypography-root":{color:dt}},":hover":{background:"rgba(89, 195, 224, 15%)"}}}},MuiToolbar:{defaultProps:{sx:{minHeight:"46px"}},styleOverrides:{root:{background:"#FFFFFF"}}},MuiChip:{defaultProps:{size:"small"}},MuiContainer:{defaultProps:{maxWidth:!1,disableGutters:!0},styleOverrides:{root:{display:"flex",flexDirection:"column",flexGrow:1}}},MuiButton:{defaultProps:{size:"small",variant:"outlined"},styleOverrides:{root:{fontSize:"0.755rem",textTransform:"none",fontWeight:"bold",minWidth:"78px"},contained:{color:"rgba(255,255,255,0.85)",boxShadow:"none"},outlined:{background:"white",":disabled":{background:"none",boxShadow:"none",borderColor:"#E0E0E0"}}}},MuiCheckbox:{defaultProps:{size:"small"}},MuiFormControl:{defaultProps:{size:"small"},styleOverrides:{root:{}}},MuiInputBase:{styleOverrides:{root:{height:`${Hl}px`,fontSize:"0.9rem"}}},MuiTextField:{defaultProps:{size:"small",fullWidth:!0,InputLabelProps:{shrink:!0}},styleOverrides:{root:{"& label":{color:"#808080",fontSize:"0.8rem"}}}},MuiAutocomplete:{defaultProps:{size:"small"},styleOverrides:{inputRoot:{height:"auto"},root:{"& .MuiOutlinedInput-root.MuiInputBase-sizeSmall .MuiAutocomplete-input":{padding:0}}}},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:dt},"& .MuiTypography-root":{color:dt}},":hover":{borderRadius:"6px",background:"rgba(89, 195, 224, 15%)"}}}},MuiBadge:{styleOverrides:{root:{"& .MuiBadge-anchorOriginBottomLeft":{height:"16px",top:8}},badge:{fontSize:"8pt"}}},MuiTableCell:{styleOverrides:{root:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",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"}}},MuiPaper:{styleOverrides:{root:{background:"#FFFFFF"}}},MuiDrawer:{styleOverrides:{paper:{}}},MuiDialog:{styleOverrides:{paper:{borderRadius:"6px"}}},MuiDialogContent:{styleOverrides:{root:{}}}}},Zl=_styles.createTheme.call(void 0, Kl),Ql=_styles.responsiveFontSizes.call(void 0, Zl),U= exports.theme =Ql;var Jl={"primary-light":U.palette.primary.light,primary:U.palette.primary.main,"primary-dark":U.palette.primary.dark,"text-secondary":U.palette.text.secondary,"text-primary":U.palette.text.primary,"background-paper":U.palette.background.paper,background:U.palette.background.default,"error-light":U.palette.error.light,error:U.palette.error.main,"erro-drark":U.palette.error.dark,"warning-light":U.palette.warning.light,warning:U.palette.warning.main,"warning-dark":U.palette.warning.dark,"success-light":U.palette.success.light,success:U.palette.success.main,"success-dark":U.palette.success.dark,"grey-100":U.palette.grey[100],"grey-200":U.palette.grey[200],"grey-300":U.palette.grey[300],"grey-400":U.palette.grey[400],"grey-500":U.palette.grey[500],"grey-600":U.palette.grey[600],"grey-700":U.palette.grey[700],"grey-800":U.palette.grey[800]};function Ni(){return _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment,{children:Object.entries(Jl).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:U.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 mn = _interopRequireWildcard(_react); var Za = _interopRequireWildcard(_react); var St = _interopRequireWildcard(_react);function Vi(t){if(!t)return 0;let e=String(t);return e=e.replace(/\./g,"").replace(/,/g,"."),parseFloat(e)}var Io=null,ji=_react.forwardRef.call(void 0, (t,e)=>{let l=t,{value:r,onChange:o}=l,n=F(l,["value","onChange"]);Io=null;let i=_react.useCallback.call(void 0, s=>{let u=s.target.value||"0.00";_hooks.isValidNumber.call(void 0, u)&&(Io==="Backspace"?u=(Vi(u)/10).toFixed(2):u=(Vi(u)*10).toFixed(2),o&&(s.target.value=u,o(s,u)))},[o]),a=_react.useCallback.call(void 0, s=>{s.target.selectionStart===s.target.selectionEnd&&(s.target.selectionStart=s.target.value.length,s.target.selectionEnd=s.target.value.length)},[]);return _jsxruntime.jsx.call(void 0, _material.TextField,d({onKeyDown:s=>{Io=s.key},onSelect:s=>{a(s)},onChange:i,value:_hooks.formatCurrency.call(void 0, String(r),2)||"",inputRef:e,sx:{"& .MuiInputBase-input":{textAlign:"right"}}},n))});ji.defaultProps={value:0};var au=ji;var _iconsmaterial = require('@mui/icons-material');var Wi={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 He(t){let{cancelLabel:e,confirmLabel:r,type:o,onCancel:n,onConfirm:i,isLoadingConfirmButton:a}=t;return _jsxruntime.jsxs.call(void 0, Ce,{children:[n&&_jsxruntime.jsx.call(void 0, N,{onClick:()=>{n()},color:Wi[o||"content"].cancel,children:e}),_jsxruntime.jsx.call(void 0, N,{onClick:()=>{i&&i()},color:Wi[o||"content"].confirm,variant:"contained",isLoading:a,children:r})]})}var lu={cancelLabel:"Cancelar",confirmLabel:"Ok",type:"content",isLoadingConfirmButton:!1};He.defaultProps=lu;function $e(t){let{title:e,children:r,actions:o,onClose:n,onConfirm:i,type:a,dialogActionsProps:l}=t,s=_material.useTheme.call(void 0, ),u=o==="none"?null:o||_jsxruntime.jsx.call(void 0, He,d({onCancel:()=>{n&&n({},"backdropClick")},onConfirm:()=>{i&&i()},type:a},l)),c=_react.useMemo.call(void 0, ()=>a==="error"?"error_outlined":a==="warning"?"error_amber":a==="info"||a==="success"?"info":!1,[a]),f=_react.useMemo.call(void 0, ()=>a!=="content"?a:"primary",[a]);return _jsxruntime.jsxs.call(void 0, _material.Dialog,C(d({},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:m=>{if(a!=="content")return m.palette[f||"primary"].main}},fontSize:"17pt",variant:"h3",children:_jsxruntime.jsxs.call(void 0, _material.Stack,{direction:"row",justifyContent:"flex-start",alignItems:"center",children:[c&&_jsxruntime.jsx.call(void 0, _material.Icon,{sx:{mr:1},fontSize:"medium",children:c}),e]})}),n&&_jsxruntime.jsx.call(void 0, _material.IconButton,{onClick:()=>n({},"escapeKeyDown"),sx:{mr:-1,color:s.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:m=>m.palette.grey[500],fontFamily:m=>m.typography.fontFamily},children:r})}),_jsxruntime.jsx.call(void 0, _material.DialogActions,{sx:{padding:2},children:u})]}))}$e.defaultProps={fullWidth:!0,type:"content"};var _providers = require('@data-c/providers');function Lo(t){let{formValues:e,isSubmitting:r}=_providers.useFormData.call(void 0, ),{closeConfirm:o}=_providers.useFormApi.call(void 0, ),{onDelete:n,hideCancelButton:i,type:a}=t;return _jsxruntime.jsx.call(void 0, He,{type:a,confirmLabel:"Excluir",onConfirm:()=>n(e),onCancel:i?void 0:()=>o(),isLoadingConfirmButton:r})}function No(t){let{isOpenConfirm:e}=_providers.useFormData.call(void 0, ),{closeConfirm:r}=_providers.useFormApi.call(void 0, ),{type:o,title:n,children:i,actions:a,onDelete:l}=t;return _jsxruntime.jsx.call(void 0, $e,{type:o,open:e,title:n,actions:a||_jsxruntime.jsx.call(void 0, Lo,{type:o,onDelete:l||(()=>{throw new Error("Nenhuma a\xE7\xE3o foi definida para ser executada em onDelete")})}),onClose:()=>{r()},maxWidth:"xs",children:i})}var wu={open:!1,title:"Excluir Registro Permanentemente?",children:"Voc\xEA n\xE3o poder\xE1 recuperar este registro ap\xF3s exclu\xED-lo!",type:"error"};No.defaultProps=wu;var _muidatatables = require('mui-datatables'); var _muidatatables2 = _interopRequireDefault(_muidatatables);var Mu=t=>{let{count:e,rowsPerPage:r,page:o,changePage:n,changeRowsPerPage:i,rowsPerPageOptions:a}=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:s=>{i(s.target.value)},children:a.map(s=>_jsxruntime.jsx.call(void 0, _material.MenuItem,{value:s,children:s},s))}),_jsxruntime.jsx.call(void 0, _material.Pagination,{variant:"outlined",shape:"rounded",count:l,showFirstButton:!0,showLastButton:!0,onChange:(s,u)=>{n(u)},page:o,color:"primary"})]})})})},Hi=Mu;function mr(t){return _jsxruntime.jsx.call(void 0, _material.Paper,d({sx:{p:2},elevation:0},t))}var Ki=_muidatatables2.default,Wu={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"}},Uu=t=>({filterType:"textField",selectableRows:"none",elevation:0,responsive:"standard",print:!1,download:!1,filter:!1,search:!1,sort:!1,viewColumns:!1,textLabels:Wu,serverSide:!0,rowsPerPageOptions:[15,50,100],rowsPerPage:15,fixedHeader:!0,fixedSelectColumn:!1,tableBodyMaxHeight:t}),qu=t=>{let P=t,{surface:e,error:r,tableTitle:o,isLoading:n,isFetching:i,data:a,columns:l,options:s,pagination:u,changePage:c,changePageSize:f,changeSort:m}=P,p=F(P,["surface","error","tableTitle","isLoading","isFetching","data","columns","options","pagination","changePage","changePageSize","changeSort"]),y=_material.useTheme.call(void 0, ),T=_material.useMediaQuery.call(void 0, y.breakpoints.up("xl"))?75:70,v=u?`${T}vh`:`calc(${T}vh + 65px)`,S=Uu(v),b=s||{};return b&&(c&&(b.onChangePage=c),f&&(b.onChangeRowsPerPage=f),m&&(b.onColumnSortChange=m),b.customFooter=(D,I,M,te,Y,oe)=>!u||n?_jsxruntime.jsx.call(void 0, _jsxruntime.Fragment,{}):_jsxruntime.jsx.call(void 0, Hi,{count:u.totalRecords,page:u.page,rowsPerPage:u.pageSize,rowsPerPageOptions:(b==null?void 0:b.rowsPerPageOptions)||(S==null?void 0:S.rowsPerPageOptions),changeRowsPerPage:b==null?void 0:b.onChangeRowsPerPage,changePage:b==null?void 0:b.onChangePage,textLabels:oe})),_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[i&&_jsxruntime.jsx.call(void 0, _material.LinearProgress,{}),r&&_jsxruntime.jsx.call(void 0, _material.Stack,{sx:{width:"100%"},spacing:2,children:_jsxruntime.jsx.call(void 0, _material.Alert,{severity:"error",children:r})}),e&&_jsxruntime.jsx.call(void 0, mr,{children:_jsxruntime.jsx.call(void 0, Ki,d({title:o,data:a,columns:l,options:d(d({},S),b)},p))}),!e&&_jsxruntime.jsx.call(void 0, Ki,d({title:o,data:a,columns:l,options:d(d({},S),b)},p))]})},Gu= exports.DataTable =qu;var ec=_styles.styled.call(void 0, r=>{var o=r,{className:t}=o,e=F(o,["className"]);return _jsxruntime.jsx.call(void 0, _material.Tooltip,C(d({},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"}})),tc={info:"Informa\xE7\xE3o",warning:"Aten\xE7\xE3o"},rc=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:tc[r]})]}),_jsxruntime.jsx.call(void 0, _material.Divider,{sx:{mt:.5}}),_jsxruntime.jsx.call(void 0, _material.Box,{sx:{mt:1},children:e})]})},Xi=t=>{let i=t,{type:e,children:r,title:o}=i,n=F(i,["type","children","title"]);return _jsxruntime.jsx.call(void 0, ec,C(d({arrow:!0,title:_jsxruntime.jsx.call(void 0, rc,{title:o||"",type:e}),enterDelay:300},n),{children:r}))};Xi.defaultProps={type:"info"};var mt=Xi;var Sx=()=>({style:{width:"80px",textAlign:"center"}}),Px= exports.CurrencyCellStyle =()=>({style:{width:"128px",textAlign:"right"}});function Vo(t){let{onClick:e,value:r,extraOptions:o,displayUpdateButton:n,displayDeleteButton:i,displayTransporterButton:a,disableTooltip:l,disabled:s,disabledUpdateButton:u,disabledDeleteButton:c,disabledTransporterButton:f}=t;return _jsxruntime.jsxs.call(void 0, _material.Box,{children:[o&&o.map(({id:m,icon:p,iconButtonProps:y,tooltip:h,visible:T,disabled:v,badge:S})=>T===null||!!T&&_jsxruntime.jsx.call(void 0, _material.Badge,{color:"primary",badgeContent:S,children:_jsxruntime.jsxs.call(void 0, _material.IconButton,C(d({onClick:b=>e(m,r,b),size:"small",disabled:v},y),{children:[h&&_jsxruntime.jsx.call(void 0, mt,{type:h.type,title:h.content,children:_jsxruntime.jsx.call(void 0, _material.Icon,{fontSize:"small",children:p})}),!h&&_jsxruntime.jsx.call(void 0, _material.Icon,{fontSize:"small",children:p})]}),m)})),a&&_jsxruntime.jsxs.call(void 0, _material.IconButton,{size:"small",onClick:m=>e("transport",r,m),color:"primary",disabled:s||f,children:[l&&_jsxruntime.jsx.call(void 0, _iconsmaterial.GetApp,{fontSize:"small"}),!l&&_jsxruntime.jsx.call(void 0, mt,{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"})})]}),n&&_jsxruntime.jsxs.call(void 0, _material.IconButton,{size:"small",color:"primary",onClick:m=>e("edit",r,m),disabled:s||u,children:[l&&_jsxruntime.jsx.call(void 0, _iconsmaterial.Edit,{fontSize:"small"}),!l&&_jsxruntime.jsx.call(void 0, mt,{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:m=>e("delete",r,m),color:"primary",disabled:s||c,children:[l&&_jsxruntime.jsx.call(void 0, _iconsmaterial.Delete,{fontSize:"small"}),!l&&_jsxruntime.jsx.call(void 0, mt,{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"})})]})]})}Vo.defaultProps={displayUpdateButton:!0,displayDeleteButton:!0,displayTransporterButton:!1,disableTooltip:!0};function yr(t){let{renderLabel:e,disableds:r}=t,{deleteFilterValue:o,deleteAllFilterValues:n}=_providers.useFilterApi.call(void 0, ),{filterValues:i,appliedValues:a}=_providers.useFilterData.call(void 0, ),l=_react.useMemo.call(void 0, ()=>{if(Object.keys(a||{}).length>0){let c=!1,f=Object.keys(a||{});for(let m=0;m<f.length;m++){let p=a[f[m]];if(Array.isArray(p)&&p.length>0){c=!0;break}else if(!Array.isArray(p)&&p){c=!0;break}}return c}return!1},[a]),s=_react.useCallback.call(void 0, u=>e?e(i[u].label,a[u]):`${i[u].label} - ${a&&a[u]}`,[e,i,a]);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(a||{}).map(u=>{let c=Array.isArray(r)&&r.includes(u),f;if(c||(f=()=>{o&&o(u)}),Array.isArray(a[u])&&a[u].length>0)return _jsxruntime.jsx.call(void 0, _material.Chip,{size:"small",label:s(u),onDelete:f,variant:"outlined"},u);if(!Array.isArray(a[u])&&a[u])return _jsxruntime.jsx.call(void 0, _material.Chip,{size:"small",label:s(u),onDelete:f,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:()=>{n&&n()},children:_jsxruntime.jsx.call(void 0, _iconsmaterial.RestartAlt,{fontSize:"small",color:"error"})})})]})}function xr(t){let a=t,{drawerTitle:e,actions:r,onClose:o,children:n}=a,i=F(a,["drawerTitle","actions","onClose","children"]);return _jsxruntime.jsx.call(void 0, _material.Drawer,C(d({PaperProps:{style:{borderRadius:"12px 0 0 12px"}},onClose:o},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.jsx.call(void 0, _material.Toolbar,{}),_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}),o&&_jsxruntime.jsx.call(void 0, _material.IconButton,{onClick:o,children:_jsxruntime.jsx.call(void 0, _iconsmaterial.Cancel,{color:"error"})})]}),_jsxruntime.jsx.call(void 0, _material.Box,{sx:{padding:l=>l.spacing(2)},children:n})]}),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})]})}))}xr.defaultProps={anchor:"right"};var Cc=()=>{let{applyFilterValues:t,closeFilter:e,deleteAllFilterValues:r}=_providers.useFilterApi.call(void 0, );function o(){e()}function n(){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:n,children:[_jsxruntime.jsx.call(void 0, _iconsmaterial.Search,{})," Aplicar"]})]})},Tc=t=>{let{title:e,children:r,onApplyFilters:o,drawerProps:n}=t,{isOpen:i,appliedValues:a}=_providers.useFilterData.call(void 0, ),{closeFilter:l}=_providers.useFilterApi.call(void 0, );return _react.useEffect.call(void 0, ()=>{o&&o(a)},[a]),_jsxruntime.jsx.call(void 0, xr,C(d({},n),{drawerTitle:e,open:i,children:r,onClose:()=>l(),actions:_jsxruntime.jsx.call(void 0, Cc,{})}))};function Yo(t){let{triggerButtonLabel:e,triggerButtonProps:r,triggerButton:o,title:n,children:i,onApplyFilters:a,renderLabel:l,disableds:s,disableFilterControl:u,drawerProps:c}=t,{openFilter:f}=_providers.useFilterApi.call(void 0, ),m=o==="none"?null:o||_jsxruntime.jsx.call(void 0, _material.Button,C(d({variant:"contained",onClick:()=>{f()}},r),{children:e||"Adicionar"}));return _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[u&&m,!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, yr,{renderLabel:l,disableds:s}),m]}),_jsxruntime.jsx.call(void 0, Tc,C(d({},c),{onApplyFilters:a,title:n||"",children:i}))]})}Yo.defaultProps={triggerButtonLabel:"Pesquisar",triggerButtonProps:{variant:"contained",startIcon:_jsxruntime.jsx.call(void 0, _iconsmaterial.Search,{})},title:"Pesquisar"};function aa(t){let{isFlagged:e,type:r}=t;return e?_jsxruntime.jsx.call(void 0, _iconsmaterial.Circle,{color:r,sx:{fontSize:"10pt"}}):null}function Ho(t){let{formValues:e,isSubmitting:r}=_providers.useFormData.call(void 0, ),{closeForm:o}=_providers.useFormApi.call(void 0, ),{onSubmitForm:n,hideCancelButton:i,confirmButtonLabel:a}=t;return _jsxruntime.jsx.call(void 0, He,{confirmLabel:a||"Salvar",onConfirm:()=>n(e),onCancel:i?void 0:()=>o(),isLoadingConfirmButton:r})}function Zo(t){let{view:e,children:r,actions:o,onSubmitForm:n,triggerButton:i,dialogProps:a,triggerButtonLabel:l,triggerButtonProps:s,confirmButtonLabel:u}=t,{isOpen:c}=_providers.useFormData.call(void 0, ),{closeForm:f,openForm:m}=_providers.useFormApi.call(void 0, ),p=o||_jsxruntime.jsx.call(void 0, Ho,{hideCancelButton:e==="plain",confirmButtonLabel:u,onSubmitForm:n||(()=>{throw new Error("Nenhuma a\xE7\xE3o foi definida para ser executada em onSubmitForm")})}),y=i==="none"?null:i||_jsxruntime.jsx.call(void 0, N,C(d({variant:"contained",onClick:()=>{m()}},s),{children:l||"Adicionar"}));return e==="dialog"?_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[y,_jsxruntime.jsx.call(void 0, $e,C(d({},a),{onClose:()=>{f()},open:!!c,children:r,actions:p}))]}):_jsxruntime.jsxs.call(void 0, _material.Stack,{children:[r,p]})}var _c={view:"dialog",dialogProps:{maxWidth:"md",fullWidth:!0}};Zo.defaultProps=_c;var _styled = require('@emotion/styled'); var _styled2 = _interopRequireDefault(_styled);function gt(t,...e){let r=new URL(`https://mui.com/production-error/?code=${t}`);return e.forEach(o=>r.searchParams.append("args[]",o)),`Minified MUI error #${t}; visit ${r} for the full message.`}function la(t){for(var e=0,r,o=0,n=t.length;n>=4;++o,n-=4)r=t.charCodeAt(o)&255|(t.charCodeAt(++o)&255)<<8|(t.charCodeAt(++o)&255)<<16|(t.charCodeAt(++o)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,e=(r&65535)*1540483477+((r>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(n){case 3:e^=(t.charCodeAt(o+2)&255)<<16;case 2:e^=(t.charCodeAt(o+1)&255)<<8;case 1:e^=t.charCodeAt(o)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var ua={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function ca(t){var e=Object.create(null);return function(r){return e[r]===void 0&&(e[r]=t(r)),e[r]}}var Rc=!1,Bc=/[A-Z]|^ms/g,Ic=/_EMO_([^_]+?)_([^]*?)_EMO_/g,ma=function(e){return e.charCodeAt(1)===45},fa=function(e){return e!=null&&typeof e!="boolean"},Qo=ca(function(t){return ma(t)?t:t.replace(Bc,"-$&").toLowerCase()}),pa=function(e,r){switch(e){case"animation":case"animationName":if(typeof r=="string")return r.replace(Ic,function(o,n,i){return _e={name:n,styles:i,next:_e},n})}return ua[e]!==1&&!ma(e)&&typeof r=="number"&&r!==0?r+"px":r},$c="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function zt(t,e,r){if(r==null)return"";var o=r;if(o.__emotion_styles!==void 0)return o;switch(typeof r){case"boolean":return"";case"object":{var n=r;if(n.anim===1)return _e={name:n.name,styles:n.styles,next:_e},n.name;var i=r;if(i.styles!==void 0){var a=i.next;if(a!==void 0)for(;a!==void 0;)_e={name:a.name,styles:a.styles,next:_e},a=a.next;var l=i.styles+";";return l}return Lc(t,e,r)}case"function":{if(t!==void 0){var s=_e,u=r(t);return _e=s,zt(t,e,u)}break}}var c=r;if(e==null)return c;var f=e[c];return f!==void 0?f:c}function Lc(t,e,r){var o="";if(Array.isArray(r))for(var n=0;n<r.length;n++)o+=zt(t,e,r[n])+";";else for(var i in r){var a=r[i];if(typeof a!="object"){var l=a;e!=null&&e[l]!==void 0?o+=i+"{"+e[l]+"}":fa(l)&&(o+=Qo(i)+":"+pa(i,l)+";")}else{if(i==="NO_COMPONENT_SELECTOR"&&Rc)throw new Error($c);if(Array.isArray(a)&&typeof a[0]=="string"&&(e==null||e[a[0]]===void 0))for(var s=0;s<a.length;s++)fa(a[s])&&(o+=Qo(i)+":"+pa(i,a[s])+";");else{var u=zt(t,e,a);switch(i){case"animation":case"animationName":{o+=Qo(i)+":"+u+";";break}default:o+=i+"{"+u+"}"}}}}return o}var da=/label:\s*([^\s;{]+)\s*(;|$)/g,_e;function ha(t,e,r){if(t.length===1&&typeof t[0]=="object"&&t[0]!==null&&t[0].styles!==void 0)return t[0];var o=!0,n="";_e=void 0;var i=t[0];if(i==null||i.raw===void 0)o=!1,n+=zt(r,e,i);else{var a=i;n+=a[0]}for(var l=1;l<t.length;l++)if(n+=zt(r,e,t[l]),o){var s=i;n+=s[l]}da.lastIndex=0;for(var u="",c;(c=da.exec(n))!==null;)u+="-"+c[1];var f=la(n)+u;return{name:f,styles:n,next:_e}}var _react2 = require('@emotion/react');function ln(t,e){let r=_styled2.default.call(void 0, t,e);return process.env.NODE_ENV!=="production"?(...o)=>{let n=typeof t=="string"?`"${t}"`:"component";return o.length===0?console.error([`MUI: Seems like you called \`styled(${n})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join(`
|
|
3
|
+
`)):o.some(i=>i===void 0)&&console.error(`MUI: the styled(${n})(...args) API requires all its args to be defined.`),r(...o)}:r}function Na(t,e){Array.isArray(t.__emotion_styles)&&(t.__emotion_styles=e(t.__emotion_styles))}var La=[];function un(t){return La[0]=t,ha(La)}var hn=Ye(dn());function Me(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 Wa(t){if(mn.isValidElement(t)||(0,hn.isValidElementType)(t)||!Me(t))return t;let e={};return Object.keys(t).forEach(r=>{e[r]=Wa(t[r])}),e}function Se(t,e,r={clone:!0}){let o=r.clone?d({},t):t;return Me(t)&&Me(e)&&Object.keys(e).forEach(n=>{mn.isValidElement(e[n])||(0,hn.isValidElementType)(e[n])?o[n]=e[n]:Me(e[n])&&Object.prototype.hasOwnProperty.call(t,n)&&Me(t[n])?o[n]=Se(t[n],e[n],r):r.clone?o[n]=Me(e[n])?Wa(e[n]):e[n]:o[n]=e[n]}),o}var tf=t=>{let e=Object.keys(t).map(r=>({key:r,val:t[r]}))||[];return e.sort((r,o)=>r.val-o.val),e.reduce((r,o)=>C(d({},r),{[o.key]:o.val}),{})};function gn(t){let m=t,{values:e={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:o=5}=m,n=F(m,["values","unit","step"]),i=tf(e),a=Object.keys(i);function l(p){return`@media (min-width:${typeof e[p]=="number"?e[p]:p}${r})`}function s(p){return`@media (max-width:${(typeof e[p]=="number"?e[p]:p)-o/100}${r})`}function u(p,y){let h=a.indexOf(y);return`@media (min-width:${typeof e[p]=="number"?e[p]:p}${r}) and (max-width:${(h!==-1&&typeof e[a[h]]=="number"?e[a[h]]:y)-o/100}${r})`}function c(p){return a.indexOf(p)+1<a.length?u(p,a[a.indexOf(p)+1]):l(p)}function f(p){let y=a.indexOf(p);return y===0?l(a[1]):y===a.length-1?s(a[y]):u(p,a[a.indexOf(p)+1]).replace("@media","@media not all and")}return d({keys:a,values:i,up:l,down:s,between:u,only:c,not:f,unit:r},n)}function yn(t,e){if(!t.containerQueries)return e;let r=Object.keys(e).filter(o=>o.startsWith("@container")).sort((o,n)=>{var a,l;let i=/min-width:\s*([0-9.]+)/;return+(((a=o.match(i))==null?void 0:a[1])||0)-+(((l=n.match(i))==null?void 0:l[1])||0)});return r.length?r.reduce((o,n)=>{let i=e[n];return delete o[n],o[n]=i,o},d({},e)):e}function xn(t,e){return e==="@"||e.startsWith("@")&&(t.some(r=>e.startsWith(`@${r}`))||!!e.match(/^@\d/))}function bn(t,e){let r=e.match(/^@([^/]+)?\/?(.+)?$/);if(!r){if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The provided shorthand ${`(${e})`} is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.
|
|
4
|
+
For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:gt(18,`(${e})`));return null}let[,o,n]=r,i=Number.isNaN(+o)?o||0:+o;return t.containerQueries(n).up(i)}function Wr(t){let e=(i,a)=>i.replace("@media",a?`@container ${a}`:"@container");function r(i,a){i.up=(...l)=>e(t.breakpoints.up(...l),a),i.down=(...l)=>e(t.breakpoints.down(...l),a),i.between=(...l)=>e(t.breakpoints.between(...l),a),i.only=(...l)=>e(t.breakpoints.only(...l),a),i.not=(...l)=>{let s=e(t.breakpoints.not(...l),a);return s.includes("not all and")?s.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):s}}let o={},n=i=>(r(o,i),o);return r(n),C(d({},t),{containerQueries:n})}var rf={borderRadius:4},Ua=rf;var bt=Ye(_r()),of=process.env.NODE_ENV!=="production"?bt.default.oneOfType([bt.default.number,bt.default.string,bt.default.object,bt.default.array]):{},xe=of;function nf(t,e){return e?Se(t,e,{clone:!1}):t}var Le=nf;var Vt={xs:0,sm:600,md:900,lg:1200,xl:1536},qa={keys:["xs","sm","md","lg","xl"],up:t=>`@media (min-width:${Vt[t]}px)`},af={containerQueries:t=>({up:e=>{let r=typeof e=="number"?e:Vt[e]||e;return typeof r=="number"&&(r=`${r}px`),t?`@container ${t} (min-width:${r})`:`@container (min-width:${r})`}})};function ie(t,e,r){let o=t.theme||{};if(Array.isArray(e)){let i=o.breakpoints||qa;return e.reduce((a,l,s)=>(a[i.up(i.keys[s])]=r(e[s]),a),{})}if(typeof e=="object"){let i=o.breakpoints||qa;return Object.keys(e).reduce((a,l)=>{if(xn(i.keys,l)){let s=bn(o.containerQueries?o:af,l);s&&(a[s]=r(e[l],l))}else if(Object.keys(i.values||Vt).includes(l)){let s=i.up(l);a[s]=r(e[l],l)}else{let s=l;a[s]=e[s]}return a},{})}return r(e)}function vn(t={}){var r;return((r=t.keys)==null?void 0:r.reduce((o,n)=>{let i=t.up(n);return o[i]={},o},{}))||{}}function Cn(t,e){return t.reduce((r,o)=>{let n=r[o];return(!n||Object.keys(n).length===0)&&delete r[o],r},e)}function Ga(t,...e){let r=vn(t),o=[r,...e].reduce((n,i)=>Se(n,i),{});return Cn(Object.keys(r),o)}function sf(t,e){if(typeof t!="object")return{};let r={},o=Object.keys(e);return Array.isArray(t)?o.forEach((n,i)=>{i<t.length&&(r[n]=!0)}):o.forEach(n=>{t[n]!=null&&(r[n]=!0)}),r}function Ur({values:t,breakpoints:e,base:r}){let o=r||sf(t,e),n=Object.keys(o);if(n.length===0)return t;let i;return n.reduce((a,l,s)=>(Array.isArray(t)?(a[l]=t[s]!=null?t[s]:t[i],i=s):typeof t=="object"?(a[l]=t[l]!=null?t[l]:t[i],i=l):a[l]=t,a),{})}function Qe(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 vt(t,e,r=!0){if(!e||typeof e!="string")return null;if(t&&t.vars&&r){let o=`vars.${e}`.split(".").reduce((n,i)=>n&&n[i]?n[i]:null,t);if(o!=null)return o}return e.split(".").reduce((o,n)=>o&&o[n]!=null?o[n]:null,t)}function jt(t,e,r,o=r){let n;return typeof t=="function"?n=t(r):Array.isArray(t)?n=t[r]||o:n=vt(t,r)||o,e&&(n=e(n,o,t)),n}function lf(t){let{prop:e,cssProperty:r=t.prop,themeKey:o,transform:n}=t,i=a=>{if(a[e]==null)return null;let l=a[e],s=a.theme,u=vt(s,o)||{};return ie(a,l,f=>{let m=jt(u,n,f);return f===m&&typeof f=="string"&&(m=jt(u,n,`${e}${f==="default"?"":Qe(f)}`,f)),r===!1?m:{[r]:m}})};return i.propTypes=process.env.NODE_ENV!=="production"?{[e]:xe}:{},i.filterProps=[e],i}var Z=lf;function qr(t){let e={};return r=>(e[r]===void 0&&(e[r]=t(r)),e[r])}var uf={m:"margin",p:"padding"},cf={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Ya={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},ff=qr(t=>{if(t.length>2)if(Ya[t])t=Ya[t];else return[t];let[e,r]=t.split(""),o=uf[e],n=cf[r]||"";return Array.isArray(n)?n.map(i=>o+i):[o+n]}),Gr=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Yr=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],Tn=[...Gr,...Yr];function ot(t,e,r,o){var i;let n=(i=vt(t,e,!0))!=null?i:r;return typeof n=="number"||typeof n=="string"?a=>typeof a=="string"?a:(process.env.NODE_ENV!=="production"&&typeof a!="number"&&console.error(`MUI: Expected ${o} argument to be a number or a string, got ${a}.`),typeof n=="string"?`calc(${a} * ${n})`:n*a):Array.isArray(n)?a=>{if(typeof a=="string")return a;let l=Math.abs(a);process.env.NODE_ENV!=="production"&&(Number.isInteger(l)?l>n.length-1&&console.error([`MUI: The value provided (${l}) overflows.`,`The supported values are: ${JSON.stringify(n)}.`,`${l} > ${n.length-1}, you need to add the missing values.`].join(`
|
|
5
5
|
`)):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(`
|
|
6
6
|
`)));let s=n[l];return a>=0?s:typeof s=="number"?-s:`-${s}`}:typeof n=="function"?n:(process.env.NODE_ENV!=="production"&&console.error([`MUI: The \`theme.${e}\` value (${n}) is invalid.`,"It should be a number, an array or a function."].join(`
|
|
7
|
-
`)),()=>{})}function Gt(t){return nt(t,"spacing",8,"spacing")}function Ie(t,e){return typeof e=="string"||e==null?e:t(e)}function cf(t,e){return r=>t.reduce((o,n)=>(o[n]=Ie(e,r),o),{})}function ff(t,e,r,o){if(!e.includes(r))return null;let n=uf(r),i=cf(n,o),a=t[r];return se(t,a,i)}function Tn(t,e){let r=Gt(t.theme);return Object.keys(t).map(o=>ff(t,e,o,r)).reduce(ze,{})}function ee(t){return Tn(t,Nr)}ee.propTypes=process.env.NODE_ENV!=="production"?Nr.reduce((t,e)=>(t[e]=be,t),{}):{};ee.filterProps=Nr;function te(t){return Tn(t,zr)}te.propTypes=process.env.NODE_ENV!=="production"?zr.reduce((t,e)=>(t[e]=be,t),{}):{};te.filterProps=zr;function Za(t){return Tn(t,Sn)}Za.propTypes=process.env.NODE_ENV!=="production"?Sn.reduce((t,e)=>(t[e]=be,t),{}):{};Za.filterProps=Sn;function Pn(t=8,e=Gt({spacing:t})){if(t.mui)return t;let r=(...o)=>(process.env.NODE_ENV!=="production"&&(o.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${o.length}`)),(o.length===0?[1]:o).map(i=>{let a=e(i);return typeof a=="number"?`${a}px`:a}).join(" "));return r.mui=!0,r}function pf(...t){let e=t.reduce((o,n)=>(n.filterProps.forEach(i=>{o[i]=n}),o),{}),r=o=>Object.keys(o).reduce((n,i)=>e[i]?ze(n,e[i](o)):n,{});return r.propTypes=process.env.NODE_ENV!=="production"?t.reduce((o,n)=>Object.assign(o,n.propTypes),{}):{},r.filterProps=t.reduce((o,n)=>o.concat(n.filterProps),[]),r}var Ve=pf;function ve(t){return typeof t!="number"?t:`${t}px solid`}function Pe(t,e){return Q({prop:t,themeKey:"borders",transform:e})}var df=Pe("border",ve),mf=Pe("borderTop",ve),hf=Pe("borderRight",ve),gf=Pe("borderBottom",ve),yf=Pe("borderLeft",ve),xf=Pe("borderColor"),bf=Pe("borderTopColor"),vf=Pe("borderRightColor"),Cf=Pe("borderBottomColor"),Sf=Pe("borderLeftColor"),Tf=Pe("outline",ve),Pf=Pe("outlineColor"),Ht=t=>{if(t.borderRadius!==void 0&&t.borderRadius!==null){let e=nt(t.theme,"shape.borderRadius",4,"borderRadius"),r=o=>({borderRadius:Ie(e,o)});return se(t,t.borderRadius,r)}return null};Ht.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:be}:{};Ht.filterProps=["borderRadius"];var Hv=Ve(df,mf,hf,gf,yf,xf,bf,vf,Cf,Sf,Ht,Tf,Pf);var Yt=t=>{if(t.gap!==void 0&&t.gap!==null){let e=nt(t.theme,"spacing",8,"gap"),r=o=>({gap:Ie(e,o)});return se(t,t.gap,r)}return null};Yt.propTypes=process.env.NODE_ENV!=="production"?{gap:be}:{};Yt.filterProps=["gap"];var Kt=t=>{if(t.columnGap!==void 0&&t.columnGap!==null){let e=nt(t.theme,"spacing",8,"columnGap"),r=o=>({columnGap:Ie(e,o)});return se(t,t.columnGap,r)}return null};Kt.propTypes=process.env.NODE_ENV!=="production"?{columnGap:be}:{};Kt.filterProps=["columnGap"];var Zt=t=>{if(t.rowGap!==void 0&&t.rowGap!==null){let e=nt(t.theme,"spacing",8,"rowGap"),r=o=>({rowGap:Ie(e,o)});return se(t,t.rowGap,r)}return null};Zt.propTypes=process.env.NODE_ENV!=="production"?{rowGap:be}:{};Zt.filterProps=["rowGap"];var wf=Q({prop:"gridColumn"}),Ef=Q({prop:"gridRow"}),Af=Q({prop:"gridAutoFlow"}),kf=Q({prop:"gridAutoColumns"}),Ff=Q({prop:"gridAutoRows"}),Of=Q({prop:"gridTemplateColumns"}),Df=Q({prop:"gridTemplateRows"}),_f=Q({prop:"gridTemplateAreas"}),Mf=Q({prop:"gridArea"}),e0=Ve(Yt,Kt,Zt,wf,Ef,Af,kf,Ff,Of,Df,_f,Mf);function it(t,e){return e==="grey"?e:t}var Rf=Q({prop:"color",themeKey:"palette",transform:it}),Bf=Q({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:it}),If=Q({prop:"backgroundColor",themeKey:"palette",transform:it}),n0=Ve(Rf,Bf,If);function he(t){return t<=1&&t!==0?`${t*100}%`:t}var $f=Q({prop:"width",transform:he}),Vr=t=>{if(t.maxWidth!==void 0&&t.maxWidth!==null){let e=r=>{var n,i,a,l,s;let o=((a=(i=(n=t.theme)==null?void 0:n.breakpoints)==null?void 0:i.values)==null?void 0:a[r])||Ut[r];return o?((s=(l=t.theme)==null?void 0:l.breakpoints)==null?void 0:s.unit)!=="px"?{maxWidth:`${o}${t.theme.breakpoints.unit}`}:{maxWidth:o}:{maxWidth:he(r)}};return se(t,t.maxWidth,e)}return null};Vr.filterProps=["maxWidth"];var Lf=Q({prop:"minWidth",transform:he}),Nf=Q({prop:"height",transform:he}),zf=Q({prop:"maxHeight",transform:he}),Vf=Q({prop:"minHeight",transform:he}),u0=Q({prop:"size",cssProperty:"width",transform:he}),c0=Q({prop:"size",cssProperty:"height",transform:he}),jf=Q({prop:"boxSizing"}),f0=Ve($f,Vr,Lf,Nf,zf,Vf,jf);var Wf={border:{themeKey:"borders",transform:ve},borderTop:{themeKey:"borders",transform:ve},borderRight:{themeKey:"borders",transform:ve},borderBottom:{themeKey:"borders",transform:ve},borderLeft:{themeKey:"borders",transform:ve},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:ve},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Ht},color:{themeKey:"palette",transform:it},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:it},backgroundColor:{themeKey:"palette",transform:it},p:{style:te},pt:{style:te},pr:{style:te},pb:{style:te},pl:{style:te},px:{style:te},py:{style:te},padding:{style:te},paddingTop:{style:te},paddingRight:{style:te},paddingBottom:{style:te},paddingLeft:{style:te},paddingX:{style:te},paddingY:{style:te},paddingInline:{style:te},paddingInlineStart:{style:te},paddingInlineEnd:{style:te},paddingBlock:{style:te},paddingBlockStart:{style:te},paddingBlockEnd:{style:te},m:{style:ee},mt:{style:ee},mr:{style:ee},mb:{style:ee},ml:{style:ee},mx:{style:ee},my:{style:ee},margin:{style:ee},marginTop:{style:ee},marginRight:{style:ee},marginBottom:{style:ee},marginLeft:{style:ee},marginX:{style:ee},marginY:{style:ee},marginInline:{style:ee},marginInlineStart:{style:ee},marginInlineEnd:{style:ee},marginBlock:{style:ee},marginBlockStart:{style:ee},marginBlockEnd:{style:ee},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:Yt},rowGap:{style:Zt},columnGap:{style:Kt},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:he},maxWidth:{style:Vr},minWidth:{transform:he},height:{transform:he},maxHeight:{transform:he},minHeight:{transform:he},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}},Tt=Wf;function Uf(...t){let e=t.reduce((o,n)=>o.concat(Object.keys(n)),[]),r=new Set(e);return t.every(o=>r.size===Object.keys(o).length)}function qf(t,e){return typeof t=="function"?t(e):t}function Gf(){function t(r,o,n,i){let a={[r]:o,theme:n},l=i[r];if(!l)return{[r]:o};let{cssProperty:s=r,themeKey:u,transform:c,style:f}=l;if(o==null)return null;if(u==="typography"&&o==="inherit")return{[r]:o};let m=St(n,u)||{};return f?f(a):se(a,o,g=>{let x=qt(m,c,g);return g===x&&typeof g=="string"&&(x=qt(m,c,`${r}${g==="default"?"":Qe(g)}`,g)),s===!1?x:{[s]:x}})}function e(r){var l;let{sx:o,theme:n={}}=r||{};if(!o)return null;let i=(l=n.unstable_sxConfig)!=null?l:Tt;function a(s){let u=s;if(typeof s=="function")u=s(n);else if(typeof s!="object")return s;if(!u)return null;let c=vn(n.breakpoints),f=Object.keys(c),m=c;return Object.keys(u).forEach(p=>{let g=qf(u[p],n);if(g!=null)if(typeof g=="object")if(i[p])m=ze(m,t(p,g,n,i));else{let x=se({theme:n},g,P=>({[p]:P}));Uf(x,g)?m[p]=e({sx:g,theme:n}):m=ze(m,x)}else m=ze(m,t(p,g,n,i))}),yn(n,Cn(f,m))}return Array.isArray(o)?o.map(a):a(o)}return e}var Qa=Gf();Qa.filterProps=["sx"];var Pt=Qa;function wn(t,e){var o;let r=this;if(r.vars){if(!((o=r.colorSchemes)!=null&&o[t])||typeof r.getColorSchemeSelector!="function")return{};let n=r.getColorSchemeSelector(t);return n==="&"?e:((n.includes("data-")||n.includes("."))&&(n=`*:where(${n.replace(/\s*&$/,"")}) &`),{[n]:e})}return r.palette.mode===t?e:{}}function Hf(t={},...e){let c=t,{breakpoints:r={},palette:o={},spacing:n,shape:i={}}=c,a=D(c,["breakpoints","palette","spacing","shape"]),l=gn(r),s=Pn(n),u=Te({breakpoints:l,direction:"ltr",components:{},palette:d({mode:"light"},o),spacing:s,shape:d(d({},Ga),i)},a);return u=Ir(u),u.applyStyles=wn,u=e.reduce((f,m)=>Te(f,m),u),u.unstable_sxConfig=d(d({},Tt),a==null?void 0:a.unstable_sxConfig),u.unstable_sx=function(m){return Pt({sx:m,theme:this})},u}var at=Hf;function Yf(t){return Object.keys(t).length===0}function Kf(t=null){let e=Xa.useContext(_react2.ThemeContext);return!e||Yf(e)?t:e}var En=Kf;var Zf=at();function Qf(t=Zf){return En(t)}var An=Qf;var Xf=t=>{var o,n;let e={systemProps:{},otherProps:{}},r=(n=(o=t==null?void 0:t.theme)==null?void 0:o.unstable_sxConfig)!=null?n:Tt;return Object.keys(t).forEach(i=>{r[i]?e.systemProps[i]=t[i]:e.otherProps[i]=t[i]}),e};function jr(t){let a=t,{sx:e}=a,r=D(a,["sx"]),{systemProps:o,otherProps:n}=Xf(r),i;return Array.isArray(e)?i=[o,...e]:typeof e=="function"?i=(...l)=>{let s=e(...l);return Be(s)?d(d({},o),s):o}:i=d(d({},o),e),C(d({},n),{sx:i})}var Ja=t=>t,Jf=()=>{let t=Ja;return{configure(e){t=e},generate(e){return t(e)},reset(){t=Ja}}},ep=Jf(),kn=ep;function es(t){var e,r,o="";if(typeof t=="string"||typeof t=="number")o+=t;else if(typeof t=="object")if(Array.isArray(t)){var n=t.length;for(e=0;e<n;e++)t[e]&&(r=es(t[e]))&&(o&&(o+=" "),o+=r)}else for(r in t)t[r]&&(o&&(o+=" "),o+=r);return o}function tp(){for(var t,e,r=0,o="",n=arguments.length;r<n;r++)(t=arguments[r])&&(e=es(t))&&(o&&(o+=" "),o+=e);return o}var ts=tp;var rp={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 Wr(t,e,r="Mui"){let o=rp[e];return o?`${r}-${o}`:`${kn.generate(t)}-${e}`}var eo=tt(is());function ss(t,e=""){return t.displayName||t.name||e}function as(t,e,r){let o=ss(e);return t.displayName||(o!==""?`${r}(${o})`:r)}function to(t){if(t!=null){if(typeof t=="string")return t;if(typeof t=="function")return ss(t,"Component");if(typeof t=="object")switch(t.$$typeof){case eo.ForwardRef:return as(t,t.render,"ForwardRef");case eo.Memo:return as(t,t.type,"memo");default:return}}}function _n(t){let n=t,{variants:e}=n,r=D(n,["variants"]),o={variants:e,style:hn(r),isProcessed:!0};return o.style===r||e&&e.forEach(i=>{typeof i.style!="function"&&(i.style=hn(i.style))}),o}var ip=at();function Mn(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}function ap(t){return t?(e,r)=>r[t]:null}function sp(t,e,r){t.theme=cp(t.theme)?r:t.theme[e]||t.theme}function ro(t,e){let r=typeof e=="function"?e(t):e;if(Array.isArray(r))return r.flatMap(n=>ro(t,n));if(Array.isArray(r==null?void 0:r.variants)){let n;if(r.isProcessed)n=r.style;else{let o=r,{variants:i}=o;n=D(o,["variants"])}return ls(t,r.variants,[n])}return r!=null&&r.isProcessed?r.style:r}function ls(t,e,r=[]){var n;let o;e:for(let i=0;i<e.length;i+=1){let a=e[i];if(typeof a.props=="function"){if(o!=null||(o=C(d(d({},t),t.ownerState),{ownerState:t.ownerState})),!a.props(o))continue}else for(let l in a.props)if(t[l]!==a.props[l]&&((n=t.ownerState)==null?void 0:n[l])!==a.props[l])continue e;typeof a.style=="function"?(o!=null||(o=C(d(d({},t),t.ownerState),{ownerState:t.ownerState})),r.push(a.style(o))):r.push(a.style)}return r}function oo(t={}){let{themeId:e,defaultTheme:r=ip,rootShouldForwardProp:o=Mn,slotShouldForwardProp:n=Mn}=t;function i(l){sp(l,e,r)}return(l,s={})=>{Wa(l,$=>$.filter(R=>R!==Pt));let F=s,{name:u,slot:c,skipVariantsResolver:f,skipSx:m,overridesResolver:p=ap(us(c))}=F,g=D(F,["name","slot","skipVariantsResolver","skipSx","overridesResolver"]),x=f!==void 0?f:c&&c!=="Root"&&c!=="root"||!1,P=m||!1,v=Mn;c==="Root"||c==="root"?v=o:c?v=n:fp(l)&&(v=void 0);let S=mn(l,d({shouldForwardProp:v,label:up(u,c)},g)),b=$=>{if(typeof $=="function"&&$.__emotion_real!==$)return function(re){return ro(re,$)};if(Be($)){let R=_n($);return R.variants?function(q){return ro(q,R)}:R.style}return $},T=(...$)=>{let R=[],re=$.map(b),q=[];if(R.push(i),u&&p&&q.push(function(h){var O,I;let w=(I=(O=h.theme.components)==null?void 0:O[u])==null?void 0:I.styleOverrides;if(!w)return null;let E={};for(let M in w)E[M]=ro(h,w[M]);return p(h,E)}),u&&!x&&q.push(function(h){var E,O;let y=h.theme,w=(O=(E=y==null?void 0:y.components)==null?void 0:E[u])==null?void 0:O.variants;return w?ls(h,w):null}),P||q.push(Pt),Array.isArray(re[0])){let B=re.shift(),h=new Array(R.length).fill(""),y=new Array(q.length).fill(""),w;w=[...h,...B,...y],w.raw=[...h,...B.raw,...y],R.unshift(w)}let oe=[...R,...re,...q],_=S(...oe);return l.muiName&&(_.muiName=l.muiName),process.env.NODE_ENV!=="production"&&(_.displayName=lp(u,c,l)),_};return S.withConfig&&(T.withConfig=S.withConfig),T}}function lp(t,e,r){return t?`${t}${Qe(e||"")}`:`Styled(${to(r)})`}function up(t,e){let r;return process.env.NODE_ENV!=="production"&&t&&(r=`${t}-${us(e||"Root")}`),r}function cp(t){for(let e in t)return!1;return!0}function fp(t){return typeof t=="string"&&t.charCodeAt(0)>96}function us(t){return t&&t.charAt(0).toLowerCase()+t.slice(1)}var pp=oo(),Rn=pp;function Qt(t,e){let r=d({},e);for(let o in t)if(Object.prototype.hasOwnProperty.call(t,o)){let n=o;if(n==="components"||n==="slots")r[n]=d(d({},t[n]),r[n]);else if(n==="componentsProps"||n==="slotProps"){let i=t[n],a=e[n];if(!a)r[n]=i||{};else if(!i)r[n]=a;else{r[n]=d({},a);for(let l in i)if(Object.prototype.hasOwnProperty.call(i,l)){let s=l;r[n][s]=Qt(i[s],a[s])}}}else r[n]===void 0&&(r[n]=t[n])}return r}function Bn(t){let{theme:e,name:r,props:o}=t;return!e||!e.components||!e.components[r]||!e.components[r].defaultProps?o:Qt(e.components[r].defaultProps,o)}function no({props:t,name:e,defaultTheme:r,themeId:o}){let n=An(r);return o&&(n=n[o]||n),Bn({theme:n,name:e,props:t})}function io(t,e,r=void 0){let o={};for(let n in t){let i=t[n],a="",l=!0;for(let s=0;s<i.length;s+=1){let u=i[s];u&&(a+=(l===!0?"":" ")+e(u),l=!1,r&&r[u]&&(a+=" "+r[u]))}o[n]=a}return o}var X=tt(Br());var J=tt(Br());var mp=at(),hp=Rn("div",{name:"MuiStack",slot:"Root",overridesResolver:(t,e)=>e.root});function gp(t){return no({props:t,name:"MuiStack",defaultTheme:mp})}function yp(t,e){let r=wt.Children.toArray(t).filter(Boolean);return r.reduce((o,n,i)=>(o.push(n),i<r.length-1&&o.push(wt.cloneElement(e,{key:`separator-${i}`})),o),[])}var xp=t=>({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[t],bp=({ownerState:t,theme:e})=>{let r=d({display:"flex",flexDirection:"column"},se({theme:e},$r({values:t.direction,breakpoints:e.breakpoints.values}),o=>({flexDirection:o})));if(t.spacing){let o=Gt(e),n=Object.keys(e.breakpoints.values).reduce((s,u)=>((typeof t.spacing=="object"&&t.spacing[u]!=null||typeof t.direction=="object"&&t.direction[u]!=null)&&(s[u]=!0),s),{}),i=$r({values:t.direction,base:n}),a=$r({values:t.spacing,base:n});typeof i=="object"&&Object.keys(i).forEach((s,u,c)=>{if(!i[s]){let m=u>0?i[c[u-1]]:"column";i[s]=m}}),r=Te(r,se({theme:e},a,(s,u)=>t.useFlexGap?{gap:Ie(o,s)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${xp(u?i[u]:t.direction)}`]:Ie(o,s)}}))}return r=Ya(e.breakpoints,r),r};function In(t={}){let{createStyledComponent:e=hp,useThemeProps:r=gp,componentName:o="MuiStack"}=t,n=()=>io({root:["root"]},s=>Wr(o,s),{}),i=e(bp),a=wt.forwardRef(function(s,u){let c=r(s),$=jr(c),{component:m="div",direction:p="column",spacing:g=0,divider:x,children:P,className:v,useFlexGap:S=!1}=$,b=D($,["component","direction","spacing","divider","children","className","useFlexGap"]),T={direction:p,spacing:g,useFlexGap:S},F=n();return _jsxruntime.jsx.call(void 0, i,C(d({as:m,ownerState:T,ref:u,className:ts(F.root,v)},b),{children:x?yp(P,x):P}))});return process.env.NODE_ENV!=="production"&&(a.propTypes={children:J.default.node,direction:J.default.oneOfType([J.default.oneOf(["column-reverse","column","row-reverse","row"]),J.default.arrayOf(J.default.oneOf(["column-reverse","column","row-reverse","row"])),J.default.object]),divider:J.default.node,spacing:J.default.oneOfType([J.default.arrayOf(J.default.oneOfType([J.default.number,J.default.string])),J.default.number,J.default.object,J.default.string]),sx:J.default.oneOfType([J.default.arrayOf(J.default.oneOfType([J.default.func,J.default.object,J.default.bool])),J.default.func,J.default.object])}),a}var cs=In();process.env.NODE_ENV!=="production"&&(cs.propTypes={children:X.default.node,component:X.default.elementType,direction:X.default.oneOfType([X.default.oneOf(["column-reverse","column","row-reverse","row"]),X.default.arrayOf(X.default.oneOf(["column-reverse","column","row-reverse","row"])),X.default.object]),divider:X.default.node,spacing:X.default.oneOfType([X.default.arrayOf(X.default.oneOfType([X.default.number,X.default.string])),X.default.number,X.default.object,X.default.string]),sx:X.default.oneOfType([X.default.arrayOf(X.default.oneOfType([X.default.func,X.default.object,X.default.bool])),X.default.func,X.default.object]),useFlexGap:X.default.bool});var ao=cs;var Tp=_styled2.default.call(void 0, (0, _material.Typography))(({theme:t})=>({fontWeight:"bold"}));function ds(t){let{label:e,children:r,labelProps:o,contentProps:n,isNumber:i,showDivider:a}=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, ao,{children:_jsxruntime.jsx.call(void 0, Tp,C(d({},o),{children:e}))}),_jsxruntime.jsx.call(void 0, ao,{direction:i?"row":"column",justifyContent:i?"flex-end":"center",children:r})]}),a&&_jsxruntime.jsx.call(void 0, _material.Divider,{orientation:"vertical",flexItem:!0})]})}function lo(t){let{typographyProps:e,onChange:r,onEscape:o,value:n,displayEditButton:i,displaySaveButton:a,textFieldProps:l,isEditing:s,isLoading:u,error:c}=t,$=l||{},{InputProps:f,value:m,onKeyDown:p,onChange:g}=$,x=D($,["InputProps","value","onKeyDown","onChange"]),[P,v]=_react.useState.call(void 0, !1),[S,b]=_react.useState.call(void 0, !1),[T,F]=_react.useState.call(void 0, );return _react.useEffect.call(void 0, ()=>{F(n)},[n]),_react.useEffect.call(void 0, ()=>{v(!!s)},[s]),_react.useEffect.call(void 0, ()=>{c&&b(!0)},[c]),_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[!P&&!u&&!S&&_jsxruntime.jsxs.call(void 0, _material.Stack,{sx:{cursor:"pointer"},direction:"row",alignItems:"center",spacing:1,children:[_jsxruntime.jsx.call(void 0, _material.Typography,C(d({onClick:()=>{v(!0)}},e),{children:T})),i&&_jsxruntime.jsx.call(void 0, _material.IconButton,{onClick:()=>{v(!0)},children:_jsxruntime.jsx.call(void 0, _iconsmaterial.Edit,{})})]}),(P||u||S)&&_jsxruntime.jsx.call(void 0, _material.ClickAwayListener,{onClickAway:()=>v(!1),children:_jsxruntime.jsx.call(void 0, _material.TextField,d({disabled:u,autoFocus:!0,value:T,error:S,onKeyDown:R=>{R.key==="Enter"&&(r(T),v(!1)),R.key==="Escape"&&(F(n),v(!1),b(!1),o&&o(n,T))},onChange:R=>{let re=R.target.value;F(re)},InputProps:{endAdornment:_jsxruntime.jsxs.call(void 0, _material.InputAdornment,{position:"end",children:[u&&_jsxruntime.jsx.call(void 0, _material.CircularProgress,{size:18}),a&&_jsxruntime.jsx.call(void 0, _material.IconButton,{onClick:()=>{n!=T&&r(T),v(!1)},edge:"end",children:n!=T?_jsxruntime.jsx.call(void 0, _iconsmaterial.Save,{}):_jsxruntime.jsx.call(void 0, _iconsmaterial.Cancel,{})})]})}},x))})]})}var _lodash = require('lodash'); var _lodash2 = _interopRequireDefault(_lodash);function Et(t){let i=t,{onSearch:e}=i,r=D(i,["onSearch"]),o=_lodash2.default.debounce(a=>e(a),500);function n(a){let l=a.target.value;o(l)}return _jsxruntime.jsx.call(void 0, _material.TextField,d({onChange:n,autoFocus:!0,InputProps:{startAdornment:_jsxruntime.jsx.call(void 0, _material.InputAdornment,{position:"start",children:_jsxruntime.jsx.call(void 0, _iconsmaterial.Search,{})})}},r))}function bs(t){let{title:e,children:r,onBack:o,onClose:n,onUpdate:i,onSearch:a,storagePath:l,toolbarProps:s}=t,[u,c]=_react.useState.call(void 0, !1),[f,m]=_react.useState.call(void 0, "");_react.useEffect.call(void 0, ()=>{m(e)},[e]);let p=_react.useRef.call(void 0, null);_react.useEffect.call(void 0, ()=>{if(a&&l){let v=localStorage.getItem(l);p.current&&(p.current.value=v),a(v||"")}},[l]);let g=_material.useMediaQuery.call(void 0, v=>v.breakpoints.down("sm"));function x(v){l&&localStorage.setItem(l,v),a&&a(v)}let P={component:"h1",variant:"h4",sx:{fontWeight:"500"}};return _jsxruntime.jsx.call(void 0, _material.Toolbar,C(d({},s),{children:_jsxruntime.jsxs.call(void 0, _material.Box,{sx:{display:"flex",flexDirection:g||n?"column":"row",justifyContent:"space-between",alignContent:"center",alignItems:"center",flexGrow:1},children:[_jsxruntime.jsxs.call(void 0, _material.Box,{sx:{display:"flex",alignItems:"center",flexDirection:"row"},children:[o&&_jsxruntime.jsx.call(void 0, _material.IconButton,{sx:{mr:1},onClick:o,children:_jsxruntime.jsx.call(void 0, _iconsmaterial.ArrowBack,{})}),i&&_jsxruntime.jsx.call(void 0, lo,{typographyProps:P,value:f,onChange:v=>{i&&i(v)}}),!i&&_jsxruntime.jsx.call(void 0, _material.Typography,C(d({},P),{children:e}))]}),n&&_jsxruntime.jsx.call(void 0, _material.IconButton,{sx:{marginLeft:"auto"},onClick:n,children:_jsxruntime.jsx.call(void 0, _iconsmaterial.Close,{fontSize:"medium"})}),_jsxruntime.jsxs.call(void 0, _material.Stack,{spacing:1,direction:"row",children:[a&&_jsxruntime.jsx.call(void 0, Et,{inputRef:p,autoFocus:!0,onSearch:x}),r]})]})}))}function Un(t){let _=t,{value:e,label:r,options:o,isLoading:n,form:i,table:a,tableProps:l,onChange:s,onSearch:u,renderValue:c,dialogProps:f,disabled:m,filterOptions:p,optionKeyName:g}=_,x=D(_,["value","label","options","isLoading","form","table","tableProps","onChange","onSearch","renderValue","dialogProps","disabled","filterOptions","optionKeyName"]),{isOpen:P,openDialog:v,closeDialog:S}=_hooks.useDialog.call(void 0, ),[b,T]=_react.useState.call(void 0, null),F=i||Xa.default.Fragment,$=_lodash2.default.debounce(B=>u(B),500),R=_react.useCallback.call(void 0, (B,h)=>N(this,null,function*(){$(h)}),[$]),re=_react.useCallback.call(void 0, (B,h,y)=>{if(g&&(h!=null&&h[g].includes("Adicionar op\xE7\xE3o:"))){let w=h[g].replace("Adicionar op\xE7\xE3o:","").trim().replace(/["']/g,""),E=C(d({},h),{[g]:w});s&&s(E);return}s&&s(h)},[s]);function q(B,h=!1,y=!1){var w;if(B){let E=Xa.default.Children.toArray((w=B.props)==null?void 0:w.children),O=E.length===1?0:1;return E.splice(O,0,_jsxruntime.jsx.call(void 0, _material.IconButton,{sx:{padding:"2px"},size:"small",color:"default",onClick:()=>v(),disabled:y,children:_jsxruntime.jsx.call(void 0, _iconsmaterial.SearchOutlined,{fontSize:"small"})})),h&&E.unshift(_jsxruntime.jsx.call(void 0, _material.IconButton,{disabled:!0,children:_jsxruntime.jsx.call(void 0, _material.CircularProgress,{color:"primary",size:18})})),Xa.default.cloneElement(B,{},E)}return B}function oe(B,h){if(!g)return B;let w=_material.createFilterOptions.call(void 0, )(B,h),{inputValue:E}=h,O=B.some(I=>E===I[g]);return E!==""&&!O&&w.push({[g]:`Adicionar op\xE7\xE3o: "${E}"`}),w}return _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, _material.Autocomplete,{disabled:m,loadingText:"Carregando...",loading:n,onChange:re,value:e,onInputChange:R,options:o,getOptionLabel:c,filterOptions:oe,renderInput:B=>_jsxruntime.jsx.call(void 0, _material.TextField,d(C(d({label:r,onDoubleClick:()=>{m||v()}},B),{InputProps:C(d({},B.InputProps),{endAdornment:q(B.InputProps.endAdornment,n,m)}),disabled:m}),x)),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, Ne,C(d({open:P,onClose:()=>S(),actions:"none"},f),{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, Et,{placeholder:"Pesquisar",onSearch:B=>T(B)}),i&&_jsxruntime.jsx.call(void 0, F,{})]}),_jsxruntime.jsx.call(void 0, a,d({query:b,enableTransporter:!0,onTransport:B=>{S(),s&&s(B)}},l))]})}))})]})}var td={dialogProps:{maxWidth:"md",fullWidth:!0}};Un.defaultProps=td;function qn(t){let{children:e}=t,r=_material.useTheme.call(void 0, ),o=_material.useMediaQuery.call(void 0, r.breakpoints.up("md"));return _jsxruntime.jsx.call(void 0, _material.Stack,{component:"section",display:o?"flex":"none",width:"100%",direction:"row",justifyContent:"center",alignItems:"center",sx:{},children:e})}function Gn(t){let{label:e,subTitle:r="Acesse sua conta"}=t;return _jsxruntime.jsxs.call(void 0, _material.Stack,{component:"header",textAlign:"center",marginBottom:"3rem",children:[_jsxruntime.jsx.call(void 0, _material.Typography,{component:"h2",fontSize:"2rem",fontWeight:"bold",variant:"body1",fontFamily:"Montserrat",sx:{color:o=>o.palette.primary.dark},children:e}),_jsxruntime.jsx.call(void 0, _material.Typography,{component:"h3",fontSize:"1.25rem",fontFamily:"Montserrat",color:"primary",variant:"body1",children:r})]})}var _axios = require('axios');var Ae=tt(Os()),Xt=tt(Ms()),Ns=tt(Bs()),Ed=Object.prototype.toString,Ad=Error.prototype.toString,kd=RegExp.prototype.toString,Fd=typeof Symbol!="undefined"?Symbol.prototype.toString:()=>"",Od=/^Symbol\((.*)\)(.*)$/;function Dd(t){return t!=+t?"NaN":t===0&&1/t<0?"-0":""+t}function Is(t,e=!1){if(t==null||t===!0||t===!1)return""+t;let r=typeof t;if(r==="number")return Dd(t);if(r==="string")return e?`"${t}"`:t;if(r==="function")return"[Function "+(t.name||"anonymous")+"]";if(r==="symbol")return Fd.call(t).replace(Od,"Symbol($1)");let o=Ed.call(t).slice(8,-1);return o==="Date"?isNaN(t.getTime())?""+t:t.toISOString(t):o==="Error"||t instanceof Error?"["+Ad.call(t)+"]":o==="RegExp"?kd.call(t):null}function Ue(t,e){let r=Is(t,e);return r!==null?r:JSON.stringify(t,function(o,n){let i=Is(this[o],e);return i!==null?i:n},2)}function zs(t){return t==null?[]:[].concat(t)}var Vs,js,Ws,_d=/\$\{\s*(\w+)\s*\}/g;Vs=Symbol.toStringTag;var ho=class{constructor(e,r,o,n){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[Vs]="Error",this.name="ValidationError",this.value=r,this.path=o,this.type=n,this.errors=[],this.inner=[],zs(e).forEach(i=>{if(pe.isError(i)){this.errors.push(...i.errors);let a=i.inner.length?i.inner:[i];this.inner.push(...a)}else this.errors.push(i)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}};js=Symbol.hasInstance;Ws=Symbol.toStringTag;var pe=class extends Error{static formatError(e,r){let o=r.label||r.path||"this";return o!==r.path&&(r=Object.assign({},r,{path:o})),typeof e=="string"?e.replace(_d,(n,i)=>Ue(r[i])):typeof e=="function"?e(r):e}static isError(e){return e&&e.name==="ValidationError"}constructor(e,r,o,n,i){let a=new ho(e,r,o,n);if(i)return a;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[Ws]="Error",this.name=a.name,this.message=a.message,this.type=a.type,this.value=a.value,this.path=a.path,this.errors=a.errors,this.inner=a.inner,Error.captureStackTrace&&Error.captureStackTrace(this,pe)}static[js](e){return ho[Symbol.hasInstance](e)||super[Symbol.hasInstance](e)}},$e={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:o})=>{let n=o!=null&&o!==r?` (cast from the value \`${Ue(o,!0)}\`).`:".";return e!=="mixed"?`${t} must be a \`${e}\` type, but the final value was: \`${Ue(r,!0)}\``+n:`${t} must match the configured type. The validated value was: \`${Ue(r,!0)}\``+n}},ge={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",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},Je={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"},Jn={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},ei={isValue:"${path} field must be ${value}"},ti={noUnknown:"${path} field has unspecified keys: ${unknown}"},po={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"},Us={notType:t=>{let{path:e,value:r,spec:o}=t,n=o.types.length;if(Array.isArray(r)){if(r.length<n)return`${e} tuple value has too few items, expected a length of ${n} but got ${r.length} for value: \`${Ue(r,!0)}\``;if(r.length>n)return`${e} tuple value has too many items, expected a length of ${n} but got ${r.length} for value: \`${Ue(r,!0)}\``}return pe.formatError($e.notType,t)}},LT=Object.assign(Object.create(null),{mixed:$e,string:ge,number:Je,date:Jn,object:ti,array:po,boolean:ei,tuple:Us}),To=t=>t&&t.__isYupSchema__,Ft=class{static fromOptions(e,r){if(!r.then&&!r.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:o,then:n,otherwise:i}=r,a=typeof o=="function"?o:(...l)=>l.every(s=>s===o);return new Ft(e,(l,s)=>{var u;let c=a(...l)?n:i;return(u=c==null?void 0:c(s))!=null?u:s})}constructor(e,r){this.fn=void 0,this.refs=e,this.refs=e,this.fn=r}resolve(e,r){let o=this.refs.map(i=>i.getValue(r==null?void 0:r.value,r==null?void 0:r.parent,r==null?void 0:r.context)),n=this.fn(o,e,r);if(n===void 0||n===e)return e;if(!To(n))throw new TypeError("conditions must return a schema object");return n.resolve(r)}},fo={context:"$",value:"."};var qe=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]===fo.context,this.isValue=this.key[0]===fo.value,this.isSibling=!this.isContext&&!this.isValue;let o=this.isContext?fo.context:this.isValue?fo.value:"";this.path=this.key.slice(o.length),this.getter=this.path&&(0,Ae.getter)(this.path,!0),this.map=r.map}getValue(e,r,o){let n=this.isContext?o:this.isValue?e:r;return this.getter&&(n=this.getter(n||{})),this.map&&(n=this.map(n)),n}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}};qe.prototype.__isYupRef=!0;var Fe=t=>t==null;function At(t){function e({value:r,path:o="",options:n,originalValue:i,schema:a},l,s){let{name:u,test:c,params:f,message:m,skipAbsent:p}=t,{parent:g,context:x,abortEarly:P=a.spec.abortEarly,disableStackTrace:v=a.spec.disableStackTrace}=n;function S(_){return qe.isRef(_)?_.getValue(r,g,x):_}function b(_={}){let B=Object.assign({value:r,originalValue:i,label:a.spec.label,path:_.path||o,spec:a.spec,disableStackTrace:_.disableStackTrace||v},f,_.params);for(let y of Object.keys(B))B[y]=S(B[y]);let h=new pe(pe.formatError(_.message||m,B),r,B.path,_.type||u,B.disableStackTrace);return h.params=B,h}let T=P?l:s,F={path:o,parent:g,type:u,from:n.from,createError:b,resolve:S,options:n,originalValue:i,schema:a},$=_=>{pe.isError(_)?T(_):_?s(null):T(b())},R=_=>{pe.isError(_)?T(_):l(_)};if(p&&Fe(r))return $(!0);let q;try{var oe;if(q=c.call(F,r,F),typeof((oe=q)==null?void 0:oe.then)=="function"){if(n.sync)throw new Error(`Validation test of type: "${F.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(q).then($,R)}}catch(_){R(_);return}$(q)}return e.OPTIONS=t,e}function Md(t,e,r,o=r){let n,i,a;return e?((0,Ae.forEach)(e,(l,s,u)=>{let c=s?l.slice(1,l.length-1):l;t=t.resolve({context:o,parent:n,value:r});let f=t.type==="tuple",m=u?parseInt(c,10):0;if(t.innerType||f){if(f&&!u)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${a}" must contain an index to the tuple element, e.g. "${a}[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. `);n=r,r=r&&r[m],t=f?t.spec.types[m]:t.innerType}if(!u){if(!t.fields||!t.fields[c])throw new Error(`The schema does not contain the path: ${e}. (failed at: ${a} which is a type: "${t.type}")`);n=r,r=r&&r[c],t=t.fields[c]}i=c,a=s?"["+l+"]":"."+l}),{schema:t,parent:n,parentPath:i}):{parent:n,parentPath:e,schema:t}}var Ot=class extends Set{describe(){let e=[];for(let r of this.values())e.push(qe.isRef(r)?r.describe():r);return e}resolveAll(e){let r=[];for(let o of this.values())r.push(e(o));return r}clone(){return new Ot(this.values())}merge(e,r){let o=this.clone();return e.forEach(n=>o.add(n)),r.forEach(n=>o.delete(n)),o}};function kt(t,e=new Map){if(To(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 o=0;o<t.length;o++)r[o]=kt(t[o],e)}else if(t instanceof Map){r=new Map,e.set(t,r);for(let[o,n]of t.entries())r.set(o,kt(n,e))}else if(t instanceof Set){r=new Set,e.set(t,r);for(let o of t)r.add(kt(o,e))}else if(t instanceof Object){r={},e.set(t,r);for(let[o,n]of Object.entries(t))r[o]=kt(n,e)}else throw Error(`Unable to clone ${t}`);return r}var le=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 Ot,this._blacklist=new Ot,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError($e.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=kt(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 o=e(this);return this._mutate=r,o}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,o=e.clone(),n=Object.assign({},r.spec,o.spec);return o.spec=n,o.internalTests=Object.assign({},r.internalTests,o.internalTests),o._whitelist=r._whitelist.merge(e._whitelist,e._blacklist),o._blacklist=r._blacklist.merge(e._blacklist,e._whitelist),o.tests=r.tests,o.exclusiveTests=r.exclusiveTests,o.withMutation(i=>{e.tests.forEach(a=>{i.test(a.OPTIONS)})}),o.transforms=[...r.transforms,...o.transforms],o}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 o=r.conditions;r=r.clone(),r.conditions=[],r=o.reduce((n,i)=>i.resolve(n,e),r),r=r.resolve(e)}return r}resolveOptions(e){var r,o,n,i;return Object.assign({},e,{from:e.from||[],strict:(r=e.strict)!=null?r:this.spec.strict,abortEarly:(o=e.abortEarly)!=null?o:this.spec.abortEarly,recursive:(n=e.recursive)!=null?n:this.spec.recursive,disableStackTrace:(i=e.disableStackTrace)!=null?i:this.spec.disableStackTrace})}cast(e,r={}){let o=this.resolve(Object.assign({value:e},r)),n=r.assert==="ignore-optionality",i=o._cast(e,r);if(r.assert!==!1&&!o.isType(i)){if(n&&Fe(i))return i;let a=Ue(e),l=Ue(i);throw new TypeError(`The value of ${r.path||"field"} could not be cast to a value that satisfies the schema type: "${o.type}".
|
|
7
|
+
`)),()=>{})}function Wt(t){return ot(t,"spacing",8,"spacing")}function Re(t,e){return typeof e=="string"||e==null?e:t(e)}function pf(t,e){return r=>t.reduce((o,n)=>(o[n]=Re(e,r),o),{})}function df(t,e,r,o){if(!e.includes(r))return null;let n=ff(r),i=pf(n,o),a=t[r];return ie(t,a,i)}function Sn(t,e){let r=Wt(t.theme);return Object.keys(t).map(o=>df(t,e,o,r)).reduce(Le,{})}function J(t){return Sn(t,Gr)}J.propTypes=process.env.NODE_ENV!=="production"?Gr.reduce((t,e)=>(t[e]=xe,t),{}):{};J.filterProps=Gr;function ee(t){return Sn(t,Yr)}ee.propTypes=process.env.NODE_ENV!=="production"?Yr.reduce((t,e)=>(t[e]=xe,t),{}):{};ee.filterProps=Yr;function Ha(t){return Sn(t,Tn)}Ha.propTypes=process.env.NODE_ENV!=="production"?Tn.reduce((t,e)=>(t[e]=xe,t),{}):{};Ha.filterProps=Tn;function Pn(t=8,e=Wt({spacing:t})){if(t.mui)return t;let r=(...o)=>(process.env.NODE_ENV!=="production"&&(o.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${o.length}`)),(o.length===0?[1]:o).map(i=>{let a=e(i);return typeof a=="number"?`${a}px`:a}).join(" "));return r.mui=!0,r}function mf(...t){let e=t.reduce((o,n)=>(n.filterProps.forEach(i=>{o[i]=n}),o),{}),r=o=>Object.keys(o).reduce((n,i)=>e[i]?Le(n,e[i](o)):n,{});return r.propTypes=process.env.NODE_ENV!=="production"?t.reduce((o,n)=>Object.assign(o,n.propTypes),{}):{},r.filterProps=t.reduce((o,n)=>o.concat(n.filterProps),[]),r}var Ne=mf;function be(t){return typeof t!="number"?t:`${t}px solid`}function Pe(t,e){return Z({prop:t,themeKey:"borders",transform:e})}var hf=Pe("border",be),gf=Pe("borderTop",be),yf=Pe("borderRight",be),xf=Pe("borderBottom",be),bf=Pe("borderLeft",be),vf=Pe("borderColor"),Cf=Pe("borderTopColor"),Tf=Pe("borderRightColor"),Sf=Pe("borderBottomColor"),Pf=Pe("borderLeftColor"),wf=Pe("outline",be),Ef=Pe("outlineColor"),Ut=t=>{if(t.borderRadius!==void 0&&t.borderRadius!==null){let e=ot(t.theme,"shape.borderRadius",4,"borderRadius"),r=o=>({borderRadius:Re(e,o)});return ie(t,t.borderRadius,r)}return null};Ut.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:xe}:{};Ut.filterProps=["borderRadius"];var K0=Ne(hf,gf,yf,xf,bf,vf,Cf,Tf,Sf,Pf,Ut,wf,Ef);var qt=t=>{if(t.gap!==void 0&&t.gap!==null){let e=ot(t.theme,"spacing",8,"gap"),r=o=>({gap:Re(e,o)});return ie(t,t.gap,r)}return null};qt.propTypes=process.env.NODE_ENV!=="production"?{gap:xe}:{};qt.filterProps=["gap"];var Gt=t=>{if(t.columnGap!==void 0&&t.columnGap!==null){let e=ot(t.theme,"spacing",8,"columnGap"),r=o=>({columnGap:Re(e,o)});return ie(t,t.columnGap,r)}return null};Gt.propTypes=process.env.NODE_ENV!=="production"?{columnGap:xe}:{};Gt.filterProps=["columnGap"];var Yt=t=>{if(t.rowGap!==void 0&&t.rowGap!==null){let e=ot(t.theme,"spacing",8,"rowGap"),r=o=>({rowGap:Re(e,o)});return ie(t,t.rowGap,r)}return null};Yt.propTypes=process.env.NODE_ENV!=="production"?{rowGap:xe}:{};Yt.filterProps=["rowGap"];var Af=Z({prop:"gridColumn"}),kf=Z({prop:"gridRow"}),Ff=Z({prop:"gridAutoFlow"}),Of=Z({prop:"gridAutoColumns"}),Df=Z({prop:"gridAutoRows"}),_f=Z({prop:"gridTemplateColumns"}),Mf=Z({prop:"gridTemplateRows"}),Rf=Z({prop:"gridTemplateAreas"}),Bf=Z({prop:"gridArea"}),rv=Ne(qt,Gt,Yt,Af,kf,Ff,Of,Df,_f,Mf,Rf,Bf);function nt(t,e){return e==="grey"?e:t}var If=Z({prop:"color",themeKey:"palette",transform:nt}),$f=Z({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:nt}),Lf=Z({prop:"backgroundColor",themeKey:"palette",transform:nt}),av=Ne(If,$f,Lf);function me(t){return t<=1&&t!==0?`${t*100}%`:t}var Nf=Z({prop:"width",transform:me}),Hr=t=>{if(t.maxWidth!==void 0&&t.maxWidth!==null){let e=r=>{var n,i,a,l,s;let o=((a=(i=(n=t.theme)==null?void 0:n.breakpoints)==null?void 0:i.values)==null?void 0:a[r])||Vt[r];return o?((s=(l=t.theme)==null?void 0:l.breakpoints)==null?void 0:s.unit)!=="px"?{maxWidth:`${o}${t.theme.breakpoints.unit}`}:{maxWidth:o}:{maxWidth:me(r)}};return ie(t,t.maxWidth,e)}return null};Hr.filterProps=["maxWidth"];var zf=Z({prop:"minWidth",transform:me}),Vf=Z({prop:"height",transform:me}),jf=Z({prop:"maxHeight",transform:me}),Wf=Z({prop:"minHeight",transform:me}),fv=Z({prop:"size",cssProperty:"width",transform:me}),pv=Z({prop:"size",cssProperty:"height",transform:me}),Uf=Z({prop:"boxSizing"}),dv=Ne(Nf,Hr,zf,Vf,jf,Wf,Uf);var qf={border:{themeKey:"borders",transform:be},borderTop:{themeKey:"borders",transform:be},borderRight:{themeKey:"borders",transform:be},borderBottom:{themeKey:"borders",transform:be},borderLeft:{themeKey:"borders",transform:be},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:be},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Ut},color:{themeKey:"palette",transform:nt},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:nt},backgroundColor:{themeKey:"palette",transform:nt},p:{style:ee},pt:{style:ee},pr:{style:ee},pb:{style:ee},pl:{style:ee},px:{style:ee},py:{style:ee},padding:{style:ee},paddingTop:{style:ee},paddingRight:{style:ee},paddingBottom:{style:ee},paddingLeft:{style:ee},paddingX:{style:ee},paddingY:{style:ee},paddingInline:{style:ee},paddingInlineStart:{style:ee},paddingInlineEnd:{style:ee},paddingBlock:{style:ee},paddingBlockStart:{style:ee},paddingBlockEnd:{style:ee},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:qt},rowGap:{style:Yt},columnGap:{style:Gt},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:Hr},minWidth:{transform:me},height:{transform:me},maxHeight:{transform:me},minHeight:{transform:me},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}},Ct=qf;function Gf(...t){let e=t.reduce((o,n)=>o.concat(Object.keys(n)),[]),r=new Set(e);return t.every(o=>r.size===Object.keys(o).length)}function Yf(t,e){return typeof t=="function"?t(e):t}function Hf(){function t(r,o,n,i){let a={[r]:o,theme:n},l=i[r];if(!l)return{[r]:o};let{cssProperty:s=r,themeKey:u,transform:c,style:f}=l;if(o==null)return null;if(u==="typography"&&o==="inherit")return{[r]:o};let m=vt(n,u)||{};return f?f(a):ie(a,o,y=>{let h=jt(m,c,y);return y===h&&typeof y=="string"&&(h=jt(m,c,`${r}${y==="default"?"":Qe(y)}`,y)),s===!1?h:{[s]:h}})}function e(r){var l;let{sx:o,theme:n={}}=r||{};if(!o)return null;let i=(l=n.unstable_sxConfig)!=null?l:Ct;function a(s){let u=s;if(typeof s=="function")u=s(n);else if(typeof s!="object")return s;if(!u)return null;let c=vn(n.breakpoints),f=Object.keys(c),m=c;return Object.keys(u).forEach(p=>{let y=Yf(u[p],n);if(y!=null)if(typeof y=="object")if(i[p])m=Le(m,t(p,y,n,i));else{let h=ie({theme:n},y,T=>({[p]:T}));Gf(h,y)?m[p]=e({sx:y,theme:n}):m=Le(m,h)}else m=Le(m,t(p,y,n,i))}),yn(n,Cn(f,m))}return Array.isArray(o)?o.map(a):a(o)}return e}var Ka=Hf();Ka.filterProps=["sx"];var Tt=Ka;function wn(t,e){var o;let r=this;if(r.vars){if(!((o=r.colorSchemes)!=null&&o[t])||typeof r.getColorSchemeSelector!="function")return{};let n=r.getColorSchemeSelector(t);return n==="&"?e:((n.includes("data-")||n.includes("."))&&(n=`*:where(${n.replace(/\s*&$/,"")}) &`),{[n]:e})}return r.palette.mode===t?e:{}}function Kf(t={},...e){let c=t,{breakpoints:r={},palette:o={},spacing:n,shape:i={}}=c,a=F(c,["breakpoints","palette","spacing","shape"]),l=gn(r),s=Pn(n),u=Se({breakpoints:l,direction:"ltr",components:{},palette:d({mode:"light"},o),spacing:s,shape:d(d({},Ua),i)},a);return u=Wr(u),u.applyStyles=wn,u=e.reduce((f,m)=>Se(f,m),u),u.unstable_sxConfig=d(d({},Ct),a==null?void 0:a.unstable_sxConfig),u.unstable_sx=function(m){return Tt({sx:m,theme:this})},u}var it=Kf;function Zf(t){return Object.keys(t).length===0}function Qf(t=null){let e=Za.useContext(_react2.ThemeContext);return!e||Zf(e)?t:e}var En=Qf;var Xf=it();function Jf(t=Xf){return En(t)}var An=Jf;var ep=t=>{var o,n;let e={systemProps:{},otherProps:{}},r=(n=(o=t==null?void 0:t.theme)==null?void 0:o.unstable_sxConfig)!=null?n:Ct;return Object.keys(t).forEach(i=>{r[i]?e.systemProps[i]=t[i]:e.otherProps[i]=t[i]}),e};function Kr(t){let a=t,{sx:e}=a,r=F(a,["sx"]),{systemProps:o,otherProps:n}=ep(r),i;return Array.isArray(e)?i=[o,...e]:typeof e=="function"?i=(...l)=>{let s=e(...l);return Me(s)?d(d({},o),s):o}:i=d(d({},o),e),C(d({},n),{sx:i})}var Qa=t=>t,tp=()=>{let t=Qa;return{configure(e){t=e},generate(e){return t(e)},reset(){t=Qa}}},rp=tp(),kn=rp;function Xa(t){var e,r,o="";if(typeof t=="string"||typeof t=="number")o+=t;else if(typeof t=="object")if(Array.isArray(t)){var n=t.length;for(e=0;e<n;e++)t[e]&&(r=Xa(t[e]))&&(o&&(o+=" "),o+=r)}else for(r in t)t[r]&&(o&&(o+=" "),o+=r);return o}function op(){for(var t,e,r=0,o="",n=arguments.length;r<n;r++)(t=arguments[r])&&(e=Xa(t))&&(o&&(o+=" "),o+=e);return o}var Ja=op;var np={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 Zr(t,e,r="Mui"){let o=np[e];return o?`${r}-${o}`:`${kn.generate(t)}-${e}`}var Qr=Ye(dn());function ts(t,e=""){return t.displayName||t.name||e}function es(t,e,r){let o=ts(e);return t.displayName||(o!==""?`${r}(${o})`:r)}function Xr(t){if(t!=null){if(typeof t=="string")return t;if(typeof t=="function")return ts(t,"Component");if(typeof t=="object")switch(t.$$typeof){case Qr.ForwardRef:return es(t,t.render,"ForwardRef");case Qr.Memo:return es(t,t.type,"memo");default:return}}}function Fn(t){let n=t,{variants:e}=n,r=F(n,["variants"]),o={variants:e,style:un(r),isProcessed:!0};return o.style===r||e&&e.forEach(i=>{typeof i.style!="function"&&(i.style=un(i.style))}),o}var ip=it();function On(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}function ap(t){return t?(e,r)=>r[t]:null}function sp(t,e,r){t.theme=cp(t.theme)?r:t.theme[e]||t.theme}function Jr(t,e){let r=typeof e=="function"?e(t):e;if(Array.isArray(r))return r.flatMap(n=>Jr(t,n));if(Array.isArray(r==null?void 0:r.variants)){let n;if(r.isProcessed)n=r.style;else{let o=r,{variants:i}=o;n=F(o,["variants"])}return rs(t,r.variants,[n])}return r!=null&&r.isProcessed?r.style:r}function rs(t,e,r=[]){var n;let o;e:for(let i=0;i<e.length;i+=1){let a=e[i];if(typeof a.props=="function"){if(o!=null||(o=C(d(d({},t),t.ownerState),{ownerState:t.ownerState})),!a.props(o))continue}else for(let l in a.props)if(t[l]!==a.props[l]&&((n=t.ownerState)==null?void 0:n[l])!==a.props[l])continue e;typeof a.style=="function"?(o!=null||(o=C(d(d({},t),t.ownerState),{ownerState:t.ownerState})),r.push(a.style(o))):r.push(a.style)}return r}function eo(t={}){let{themeId:e,defaultTheme:r=ip,rootShouldForwardProp:o=On,slotShouldForwardProp:n=On}=t;function i(l){sp(l,e,r)}return(l,s={})=>{Na(l,I=>I.filter(M=>M!==Tt));let D=s,{name:u,slot:c,skipVariantsResolver:f,skipSx:m,overridesResolver:p=ap(os(c))}=D,y=F(D,["name","slot","skipVariantsResolver","skipSx","overridesResolver"]),h=f!==void 0?f:c&&c!=="Root"&&c!=="root"||!1,T=m||!1,v=On;c==="Root"||c==="root"?v=o:c?v=n:fp(l)&&(v=void 0);let S=ln(l,d({shouldForwardProp:v,label:up(u,c)},y)),b=I=>{if(typeof I=="function"&&I.__emotion_real!==I)return function(te){return Jr(te,I)};if(Me(I)){let M=Fn(I);return M.variants?function(Y){return Jr(Y,M)}:M.style}return I},P=(...I)=>{let M=[],te=I.map(b),Y=[];if(M.push(i),u&&p&&Y.push(function(g){var k,B;let w=(B=(k=g.theme.components)==null?void 0:k[u])==null?void 0:B.styleOverrides;if(!w)return null;let E={};for(let _ in w)E[_]=Jr(g,w[_]);return p(g,E)}),u&&!h&&Y.push(function(g){var E,k;let x=g.theme,w=(k=(E=x==null?void 0:x.components)==null?void 0:E[u])==null?void 0:k.variants;return w?rs(g,w):null}),T||Y.push(Tt),Array.isArray(te[0])){let R=te.shift(),g=new Array(M.length).fill(""),x=new Array(Y.length).fill(""),w;w=[...g,...R,...x],w.raw=[...g,...R.raw,...x],M.unshift(w)}let oe=[...M,...te,...Y],O=S(...oe);return l.muiName&&(O.muiName=l.muiName),process.env.NODE_ENV!=="production"&&(O.displayName=lp(u,c,l)),O};return S.withConfig&&(P.withConfig=S.withConfig),P}}function lp(t,e,r){return t?`${t}${Qe(e||"")}`:`Styled(${Xr(r)})`}function up(t,e){let r;return process.env.NODE_ENV!=="production"&&t&&(r=`${t}-${os(e||"Root")}`),r}function cp(t){for(let e in t)return!1;return!0}function fp(t){return typeof t=="string"&&t.charCodeAt(0)>96}function os(t){return t&&t.charAt(0).toLowerCase()+t.slice(1)}var pp=eo(),Dn=pp;function Ht(t,e){let r=d({},e);for(let o in t)if(Object.prototype.hasOwnProperty.call(t,o)){let n=o;if(n==="components"||n==="slots")r[n]=d(d({},t[n]),r[n]);else if(n==="componentsProps"||n==="slotProps"){let i=t[n],a=e[n];if(!a)r[n]=i||{};else if(!i)r[n]=a;else{r[n]=d({},a);for(let l in i)if(Object.prototype.hasOwnProperty.call(i,l)){let s=l;r[n][s]=Ht(i[s],a[s])}}}else r[n]===void 0&&(r[n]=t[n])}return r}function _n(t){let{theme:e,name:r,props:o}=t;return!e||!e.components||!e.components[r]||!e.components[r].defaultProps?o:Ht(e.components[r].defaultProps,o)}function to({props:t,name:e,defaultTheme:r,themeId:o}){let n=An(r);return o&&(n=n[o]||n),_n({theme:n,name:e,props:t})}function ro(t,e,r=void 0){let o={};for(let n in t){let i=t[n],a="",l=!0;for(let s=0;s<i.length;s+=1){let u=i[s];u&&(a+=(l===!0?"":" ")+e(u),l=!1,r&&r[u]&&(a+=" "+r[u]))}o[n]=a}return o}var Q=Ye(_r());var X=Ye(_r());var mp=it(),hp=Dn("div",{name:"MuiStack",slot:"Root",overridesResolver:(t,e)=>e.root});function gp(t){return to({props:t,name:"MuiStack",defaultTheme:mp})}function yp(t,e){let r=St.Children.toArray(t).filter(Boolean);return r.reduce((o,n,i)=>(o.push(n),i<r.length-1&&o.push(St.cloneElement(e,{key:`separator-${i}`})),o),[])}var xp=t=>({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[t],bp=({ownerState:t,theme:e})=>{let r=d({display:"flex",flexDirection:"column"},ie({theme:e},Ur({values:t.direction,breakpoints:e.breakpoints.values}),o=>({flexDirection:o})));if(t.spacing){let o=Wt(e),n=Object.keys(e.breakpoints.values).reduce((s,u)=>((typeof t.spacing=="object"&&t.spacing[u]!=null||typeof t.direction=="object"&&t.direction[u]!=null)&&(s[u]=!0),s),{}),i=Ur({values:t.direction,base:n}),a=Ur({values:t.spacing,base:n});typeof i=="object"&&Object.keys(i).forEach((s,u,c)=>{if(!i[s]){let m=u>0?i[c[u-1]]:"column";i[s]=m}}),r=Se(r,ie({theme:e},a,(s,u)=>t.useFlexGap?{gap:Re(o,s)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${xp(u?i[u]:t.direction)}`]:Re(o,s)}}))}return r=Ga(e.breakpoints,r),r};function Mn(t={}){let{createStyledComponent:e=hp,useThemeProps:r=gp,componentName:o="MuiStack"}=t,n=()=>ro({root:["root"]},s=>Zr(o,s),{}),i=e(bp),a=St.forwardRef(function(s,u){let c=r(s),I=Kr(c),{component:m="div",direction:p="column",spacing:y=0,divider:h,children:T,className:v,useFlexGap:S=!1}=I,b=F(I,["component","direction","spacing","divider","children","className","useFlexGap"]),P={direction:p,spacing:y,useFlexGap:S},D=n();return _jsxruntime.jsx.call(void 0, i,C(d({as:m,ownerState:P,ref:u,className:Ja(D.root,v)},b),{children:h?yp(T,h):T}))});return process.env.NODE_ENV!=="production"&&(a.propTypes={children:X.default.node,direction:X.default.oneOfType([X.default.oneOf(["column-reverse","column","row-reverse","row"]),X.default.arrayOf(X.default.oneOf(["column-reverse","column","row-reverse","row"])),X.default.object]),divider:X.default.node,spacing:X.default.oneOfType([X.default.arrayOf(X.default.oneOfType([X.default.number,X.default.string])),X.default.number,X.default.object,X.default.string]),sx:X.default.oneOfType([X.default.arrayOf(X.default.oneOfType([X.default.func,X.default.object,X.default.bool])),X.default.func,X.default.object])}),a}var ns=Mn();process.env.NODE_ENV!=="production"&&(ns.propTypes={children:Q.default.node,component:Q.default.elementType,direction:Q.default.oneOfType([Q.default.oneOf(["column-reverse","column","row-reverse","row"]),Q.default.arrayOf(Q.default.oneOf(["column-reverse","column","row-reverse","row"])),Q.default.object]),divider:Q.default.node,spacing:Q.default.oneOfType([Q.default.arrayOf(Q.default.oneOfType([Q.default.number,Q.default.string])),Q.default.number,Q.default.object,Q.default.string]),sx:Q.default.oneOfType([Q.default.arrayOf(Q.default.oneOfType([Q.default.func,Q.default.object,Q.default.bool])),Q.default.func,Q.default.object]),useFlexGap:Q.default.bool});var oo=ns;var Sp=_styled2.default.call(void 0, (0, _material.Typography))(({theme:t})=>({fontWeight:"bold"}));function ss(t){let{label:e,children:r,labelProps:o,contentProps:n,isNumber:i,showDivider:a}=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, oo,{children:_jsxruntime.jsx.call(void 0, Sp,C(d({},o),{children:e}))}),_jsxruntime.jsx.call(void 0, oo,{direction:i?"row":"column",justifyContent:i?"flex-end":"center",children:r})]}),a&&_jsxruntime.jsx.call(void 0, _material.Divider,{orientation:"vertical",flexItem:!0})]})}function io(t){let{typographyProps:e,onChange:r,onEscape:o,value:n,displayEditButton:i,displaySaveButton:a,textFieldProps:l,isEditing:s,isLoading:u,error:c}=t,I=l||{},{InputProps:f,value:m,onKeyDown:p,onChange:y}=I,h=F(I,["InputProps","value","onKeyDown","onChange"]),[T,v]=_react.useState.call(void 0, !1),[S,b]=_react.useState.call(void 0, !1),[P,D]=_react.useState.call(void 0, );return _react.useEffect.call(void 0, ()=>{D(n)},[n]),_react.useEffect.call(void 0, ()=>{v(!!s)},[s]),_react.useEffect.call(void 0, ()=>{c&&b(!0)},[c]),_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[!T&&!u&&!S&&_jsxruntime.jsxs.call(void 0, _material.Stack,{sx:{cursor:"pointer"},direction:"row",alignItems:"center",spacing:1,children:[_jsxruntime.jsx.call(void 0, _material.Typography,C(d({onClick:()=>{v(!0)}},e),{children:P})),i&&_jsxruntime.jsx.call(void 0, _material.IconButton,{onClick:()=>{v(!0)},children:_jsxruntime.jsx.call(void 0, _iconsmaterial.Edit,{})})]}),(T||u||S)&&_jsxruntime.jsx.call(void 0, _material.ClickAwayListener,{onClickAway:()=>v(!1),children:_jsxruntime.jsx.call(void 0, _material.TextField,d({disabled:u,autoFocus:!0,value:P,error:S,onKeyDown:M=>{M.key==="Enter"&&(r(P),v(!1)),M.key==="Escape"&&(D(n),v(!1),b(!1),o&&o(n,P))},onChange:M=>{let te=M.target.value;D(te)},InputProps:{endAdornment:_jsxruntime.jsxs.call(void 0, _material.InputAdornment,{position:"end",children:[u&&_jsxruntime.jsx.call(void 0, _material.CircularProgress,{size:18}),a&&_jsxruntime.jsx.call(void 0, _material.IconButton,{onClick:()=>{n!=P&&r(P),v(!1)},edge:"end",children:n!=P?_jsxruntime.jsx.call(void 0, _iconsmaterial.Save,{}):_jsxruntime.jsx.call(void 0, _iconsmaterial.Cancel,{})})]})}},h))})]})}var _lodash = require('lodash'); var _lodash2 = _interopRequireDefault(_lodash);function Pt(t){let i=t,{onSearch:e}=i,r=F(i,["onSearch"]),o=_lodash2.default.debounce(a=>e(a),500);function n(a){let l=a.target.value;o(l)}return _jsxruntime.jsx.call(void 0, _material.TextField,d({onChange:n,autoFocus:!0,InputProps:{startAdornment:_jsxruntime.jsx.call(void 0, _material.InputAdornment,{position:"start",children:_jsxruntime.jsx.call(void 0, _iconsmaterial.Search,{})})}},r))}function ds(t){let{title:e,children:r,onBack:o,onClose:n,onUpdate:i,onSearch:a,storagePath:l,toolbarProps:s}=t,[u,c]=_react.useState.call(void 0, !1),[f,m]=_react.useState.call(void 0, "");_react.useEffect.call(void 0, ()=>{m(e)},[e]);let p=_react.useRef.call(void 0, null);_react.useEffect.call(void 0, ()=>{if(a&&l){let v=localStorage.getItem(l);p.current&&(p.current.value=v),a(v||"")}},[l]);let y=_material.useMediaQuery.call(void 0, v=>v.breakpoints.down("sm"));function h(v){l&&localStorage.setItem(l,v),a&&a(v)}let T={component:"h1",variant:"h4",sx:{fontWeight:"500"}};return _jsxruntime.jsx.call(void 0, _material.Toolbar,C(d({},s),{children:_jsxruntime.jsxs.call(void 0, _material.Box,{sx:{display:"flex",flexDirection:y||n?"column":"row",justifyContent:"space-between",alignContent:"center",alignItems:"center",flexGrow:1},children:[_jsxruntime.jsxs.call(void 0, _material.Box,{sx:{display:"flex",alignItems:"center",flexDirection:"row"},children:[o&&_jsxruntime.jsx.call(void 0, _material.IconButton,{sx:{mr:1},onClick:o,children:_jsxruntime.jsx.call(void 0, _iconsmaterial.ArrowBack,{})}),i&&_jsxruntime.jsx.call(void 0, io,{typographyProps:T,value:f,onChange:v=>{i&&i(v)}}),!i&&_jsxruntime.jsx.call(void 0, _material.Typography,C(d({},T),{children:e}))]}),n&&_jsxruntime.jsx.call(void 0, _material.IconButton,{sx:{marginLeft:"auto"},onClick:n,children:_jsxruntime.jsx.call(void 0, _iconsmaterial.Close,{fontSize:"medium"})}),_jsxruntime.jsxs.call(void 0, _material.Stack,{spacing:1,direction:"row",children:[a&&_jsxruntime.jsx.call(void 0, Pt,{inputRef:p,autoFocus:!0,onSearch:h}),r]})]})}))}function Vn(t){let O=t,{value:e,label:r,options:o,isLoading:n,form:i,table:a,tableProps:l,onChange:s,onSearch:u,renderValue:c,dialogProps:f,disabled:m,filterOptions:p,optionKeyName:y}=O,h=F(O,["value","label","options","isLoading","form","table","tableProps","onChange","onSearch","renderValue","dialogProps","disabled","filterOptions","optionKeyName"]),{isOpen:T,openDialog:v,closeDialog:S}=_hooks.useDialog.call(void 0, ),[b,P]=_react.useState.call(void 0, null),D=i||mn.default.Fragment,I=_lodash2.default.debounce(R=>u(R),500),M=_react.useCallback.call(void 0, (R,g)=>L(this,null,function*(){I(g)}),[I]),te=_react.useCallback.call(void 0, (R,g,x)=>{if(y&&(g!=null&&g[y].includes("Adicionar op\xE7\xE3o:"))){let w=g[y].replace("Adicionar op\xE7\xE3o:","").trim().replace(/["']/g,""),E=C(d({},g),{[y]:w});s&&s(E);return}s&&s(g)},[s]);function Y(R,g=!1,x=!1){var w;if(R){let E=mn.default.Children.toArray((w=R.props)==null?void 0:w.children),k=E.length===1?0:1;return E.splice(k,0,_jsxruntime.jsx.call(void 0, _material.IconButton,{sx:{padding:"2px"},size:"small",color:"default",onClick:()=>v(),disabled:x,children:_jsxruntime.jsx.call(void 0, _iconsmaterial.SearchOutlined,{fontSize:"small"})})),g&&E.unshift(_jsxruntime.jsx.call(void 0, _material.IconButton,{disabled:!0,children:_jsxruntime.jsx.call(void 0, _material.CircularProgress,{color:"primary",size:18})})),mn.default.cloneElement(R,{},E)}return R}function oe(R,g){if(!y)return R;let w=_material.createFilterOptions.call(void 0, )(R,g),{inputValue:E}=g,k=R.some(B=>E===B[y]);return E!==""&&!k&&w.push({[y]:`Adicionar op\xE7\xE3o: "${E}"`}),w}return _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, _material.Autocomplete,{disabled:m,loadingText:"Carregando...",loading:n,onChange:te,value:e,onInputChange:M,options:o,getOptionLabel:c,filterOptions:oe,renderInput:R=>_jsxruntime.jsx.call(void 0, _material.TextField,d(C(d({label:r,onDoubleClick:()=>{m||v()}},R),{InputProps:C(d({},R.InputProps),{endAdornment:Y(R.InputProps.endAdornment,n,m)}),disabled:m}),h)),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, $e,C(d({open:T,onClose:()=>S(),actions:"none"},f),{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, Pt,{placeholder:"Pesquisar",onSearch:R=>P(R)}),i&&_jsxruntime.jsx.call(void 0, D,{})]}),_jsxruntime.jsx.call(void 0, a,d({query:b,enableTransporter:!0,onTransport:R=>{S(),s&&s(R)}},l))]})}))})]})}var td={dialogProps:{maxWidth:"md",fullWidth:!0}};Vn.defaultProps=td;function jn(t){let{children:e}=t,r=_material.useTheme.call(void 0, ),o=_material.useMediaQuery.call(void 0, r.breakpoints.up("md"));return _jsxruntime.jsx.call(void 0, _material.Stack,{component:"section",display:o?"flex":"none",width:"100%",direction:"row",justifyContent:"center",alignItems:"center",sx:{},children:e})}function Wn(t){let{label:e,subTitle:r="Acesse sua conta"}=t;return _jsxruntime.jsxs.call(void 0, _material.Stack,{component:"header",textAlign:"center",marginBottom:"3rem",children:[_jsxruntime.jsx.call(void 0, _material.Typography,{component:"h2",fontSize:"2rem",fontWeight:"bold",variant:"body1",fontFamily:"Montserrat",sx:{color:o=>o.palette.primary.dark},children:e}),_jsxruntime.jsx.call(void 0, _material.Typography,{component:"h3",fontSize:"1.25rem",fontFamily:"Montserrat",color:"primary",variant:"body1",children:r})]})}var _axios = require('axios');var Ee=Ye(Ps()),Kt=Ye(As()),Rs=Ye(Fs()),Ed=Object.prototype.toString,Ad=Error.prototype.toString,kd=RegExp.prototype.toString,Fd=typeof Symbol!="undefined"?Symbol.prototype.toString:()=>"",Od=/^Symbol\((.*)\)(.*)$/;function Dd(t){return t!=+t?"NaN":t===0&&1/t<0?"-0":""+t}function Os(t,e=!1){if(t==null||t===!0||t===!1)return""+t;let r=typeof t;if(r==="number")return Dd(t);if(r==="string")return e?`"${t}"`:t;if(r==="function")return"[Function "+(t.name||"anonymous")+"]";if(r==="symbol")return Fd.call(t).replace(Od,"Symbol($1)");let o=Ed.call(t).slice(8,-1);return o==="Date"?isNaN(t.getTime())?""+t:t.toISOString(t):o==="Error"||t instanceof Error?"["+Ad.call(t)+"]":o==="RegExp"?kd.call(t):null}function je(t,e){let r=Os(t,e);return r!==null?r:JSON.stringify(t,function(o,n){let i=Os(this[o],e);return i!==null?i:n},2)}function Bs(t){return t==null?[]:[].concat(t)}var Is,$s,Ls,_d=/\$\{\s*(\w+)\s*\}/g;Is=Symbol.toStringTag;var po=class{constructor(e,r,o,n){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[Is]="Error",this.name="ValidationError",this.value=r,this.path=o,this.type=n,this.errors=[],this.inner=[],Bs(e).forEach(i=>{if(ce.isError(i)){this.errors.push(...i.errors);let a=i.inner.length?i.inner:[i];this.inner.push(...a)}else this.errors.push(i)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}};$s=Symbol.hasInstance;Ls=Symbol.toStringTag;var ce=class extends Error{static formatError(e,r){let o=r.label||r.path||"this";return r=Object.assign({},r,{path:o,originalPath:r.path}),typeof e=="string"?e.replace(_d,(n,i)=>je(r[i])):typeof e=="function"?e(r):e}static isError(e){return e&&e.name==="ValidationError"}constructor(e,r,o,n,i){let a=new po(e,r,o,n);if(i)return a;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[Ls]="Error",this.name=a.name,this.message=a.message,this.type=a.type,this.value=a.value,this.path=a.path,this.errors=a.errors,this.inner=a.inner,Error.captureStackTrace&&Error.captureStackTrace(this,ce)}static[$s](e){return po[Symbol.hasInstance](e)||super[Symbol.hasInstance](e)}},Be={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:o})=>{let n=o!=null&&o!==r?` (cast from the value \`${je(o,!0)}\`).`:".";return e!=="mixed"?`${t} must be a \`${e}\` type, but the final value was: \`${je(r,!0)}\``+n:`${t} must match the configured type. The validated value was: \`${je(r,!0)}\``+n}},he={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",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},Je={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"},Zn={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},Qn={isValue:"${path} field must be ${value}"},uo={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},co={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"},Ns={notType:t=>{let{path:e,value:r,spec:o}=t,n=o.types.length;if(Array.isArray(r)){if(r.length<n)return`${e} tuple value has too few items, expected a length of ${n} but got ${r.length} for value: \`${je(r,!0)}\``;if(r.length>n)return`${e} tuple value has too many items, expected a length of ${n} but got ${r.length} for value: \`${je(r,!0)}\``}return ce.formatError(Be.notType,t)}},$S=Object.assign(Object.create(null),{mixed:Be,string:he,number:Je,date:Zn,object:uo,array:co,boolean:Qn,tuple:Ns}),Co=t=>t&&t.__isYupSchema__,At=class{static fromOptions(e,r){if(!r.then&&!r.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:o,then:n,otherwise:i}=r,a=typeof o=="function"?o:(...l)=>l.every(s=>s===o);return new At(e,(l,s)=>{var u;let c=a(...l)?n:i;return(u=c==null?void 0:c(s))!=null?u:s})}constructor(e,r){this.fn=void 0,this.refs=e,this.refs=e,this.fn=r}resolve(e,r){let o=this.refs.map(i=>i.getValue(r==null?void 0:r.value,r==null?void 0:r.parent,r==null?void 0:r.context)),n=this.fn(o,e,r);if(n===void 0||n===e)return e;if(!Co(n))throw new TypeError("conditions must return a schema object");return n.resolve(r)}},lo={context:"$",value:"."};var We=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]===lo.context,this.isValue=this.key[0]===lo.value,this.isSibling=!this.isContext&&!this.isValue;let o=this.isContext?lo.context:this.isValue?lo.value:"";this.path=this.key.slice(o.length),this.getter=this.path&&(0,Ee.getter)(this.path,!0),this.map=r.map}getValue(e,r,o){let n=this.isContext?o:this.isValue?e:r;return this.getter&&(n=this.getter(n||{})),this.map&&(n=this.map(n)),n}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}};We.prototype.__isYupRef=!0;var ke=t=>t==null;function wt(t){function e({value:r,path:o="",options:n,originalValue:i,schema:a},l,s){let{name:u,test:c,params:f,message:m,skipAbsent:p}=t,{parent:y,context:h,abortEarly:T=a.spec.abortEarly,disableStackTrace:v=a.spec.disableStackTrace}=n;function S(O){return We.isRef(O)?O.getValue(r,y,h):O}function b(O={}){let R=Object.assign({value:r,originalValue:i,label:a.spec.label,path:O.path||o,spec:a.spec,disableStackTrace:O.disableStackTrace||v},f,O.params);for(let x of Object.keys(R))R[x]=S(R[x]);let g=new ce(ce.formatError(O.message||m,R),r,R.path,O.type||u,R.disableStackTrace);return g.params=R,g}let P=T?l:s,D={path:o,parent:y,type:u,from:n.from,createError:b,resolve:S,options:n,originalValue:i,schema:a},I=O=>{ce.isError(O)?P(O):O?s(null):P(b())},M=O=>{ce.isError(O)?P(O):l(O)};if(p&&ke(r))return I(!0);let Y;try{var oe;if(Y=c.call(D,r,D),typeof((oe=Y)==null?void 0:oe.then)=="function"){if(n.sync)throw new Error(`Validation test of type: "${D.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(Y).then(I,M)}}catch(O){M(O);return}I(Y)}return e.OPTIONS=t,e}function Md(t,e,r,o=r){let n,i,a;return e?((0,Ee.forEach)(e,(l,s,u)=>{let c=s?l.slice(1,l.length-1):l;t=t.resolve({context:o,parent:n,value:r});let f=t.type==="tuple",m=u?parseInt(c,10):0;if(t.innerType||f){if(f&&!u)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${a}" must contain an index to the tuple element, e.g. "${a}[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. `);n=r,r=r&&r[m],t=f?t.spec.types[m]:t.innerType}if(!u){if(!t.fields||!t.fields[c])throw new Error(`The schema does not contain the path: ${e}. (failed at: ${a} which is a type: "${t.type}")`);n=r,r=r&&r[c],t=t.fields[c]}i=c,a=s?"["+l+"]":"."+l}),{schema:t,parent:n,parentPath:i}):{parent:n,parentPath:e,schema:t}}var kt=class extends Set{describe(){let e=[];for(let r of this.values())e.push(We.isRef(r)?r.describe():r);return e}resolveAll(e){let r=[];for(let o of this.values())r.push(e(o));return r}clone(){return new kt(this.values())}merge(e,r){let o=this.clone();return e.forEach(n=>o.add(n)),r.forEach(n=>o.delete(n)),o}};function Et(t,e=new Map){if(Co(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 o=0;o<t.length;o++)r[o]=Et(t[o],e)}else if(t instanceof Map){r=new Map,e.set(t,r);for(let[o,n]of t.entries())r.set(o,Et(n,e))}else if(t instanceof Set){r=new Set,e.set(t,r);for(let o of t)r.add(Et(o,e))}else if(t instanceof Object){r={},e.set(t,r);for(let[o,n]of Object.entries(t))r[o]=Et(n,e)}else throw Error(`Unable to clone ${t}`);return r}var ae=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 kt,this._blacklist=new kt,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(Be.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=Et(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 o=e(this);return this._mutate=r,o}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,o=e.clone(),n=Object.assign({},r.spec,o.spec);return o.spec=n,o.internalTests=Object.assign({},r.internalTests,o.internalTests),o._whitelist=r._whitelist.merge(e._whitelist,e._blacklist),o._blacklist=r._blacklist.merge(e._blacklist,e._whitelist),o.tests=r.tests,o.exclusiveTests=r.exclusiveTests,o.withMutation(i=>{e.tests.forEach(a=>{i.test(a.OPTIONS)})}),o.transforms=[...r.transforms,...o.transforms],o}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 o=r.conditions;r=r.clone(),r.conditions=[],r=o.reduce((n,i)=>i.resolve(n,e),r),r=r.resolve(e)}return r}resolveOptions(e){var r,o,n,i;return Object.assign({},e,{from:e.from||[],strict:(r=e.strict)!=null?r:this.spec.strict,abortEarly:(o=e.abortEarly)!=null?o:this.spec.abortEarly,recursive:(n=e.recursive)!=null?n:this.spec.recursive,disableStackTrace:(i=e.disableStackTrace)!=null?i:this.spec.disableStackTrace})}cast(e,r={}){let o=this.resolve(Object.assign({value:e},r)),n=r.assert==="ignore-optionality",i=o._cast(e,r);if(r.assert!==!1&&!o.isType(i)){if(n&&ke(i))return i;let a=je(e),l=je(i);throw new TypeError(`The value of ${r.path||"field"} could not be cast to a value that satisfies the schema type: "${o.type}".
|
|
8
8
|
|
|
9
9
|
attempted value: ${a}
|
|
10
|
-
`+(l!==a?`result of cast: ${l}`:""))}return i}_cast(e,r){let o=e===void 0?e:this.transforms.reduce((n,i)=>i.call(this,n,e,this),e);return o===void 0&&(o=this.getDefault(r)),o}_validate(e,r={},o,n){let{path:i,originalValue:a=e,strict:l=this.spec.strict}=r,s=e;l||(s=this._cast(s,Object.assign({assert:!1},r)));let u=[];for(let c of Object.values(this.internalTests))c&&u.push(c);this.runTests({path:i,value:s,originalValue:a,options:r,tests:u},o,c=>{if(c.length)return n(c,s);this.runTests({path:i,value:s,originalValue:a,options:r,tests:this.tests},o,n)})}runTests(e,r,o){let n=!1,{tests:i,value:a,originalValue:l,path:s,options:u}=e,c=x=>{n||(n=!0,r(x,a))},f=x=>{n||(n=!0,o(x,a))},m=i.length,p=[];if(!m)return f([]);let g={value:a,originalValue:l,path:s,options:u,schema:this};for(let x=0;x<i.length;x++){let P=i[x];P(g,c,function(S){S&&(Array.isArray(S)?p.push(...S):p.push(S)),--m<=0&&f(p)})}}asNestedTest({key:e,index:r,parent:o,parentPath:n,originalParent:i,options:a}){let l=e!=null?e:r;if(l==null)throw TypeError("Must include `key` or `index` for nested validations");let s=typeof l=="number",u=o[l],c=Object.assign({},a,{strict:!0,parent:o,value:u,originalValue:i[l],key:void 0,[s?"index":"key"]:l,path:s||l.includes(".")?`${n||""}[${s?l:`"${l}"`}]`:(n?`${n}.`:"")+e});return(f,m,p)=>this.resolve(c)._validate(u,c,m,p)}validate(e,r){var o;let n=this.resolve(Object.assign({},r,{value:e})),i=(o=r==null?void 0:r.disableStackTrace)!=null?o:n.spec.disableStackTrace;return new Promise((a,l)=>n._validate(e,r,(s,u)=>{pe.isError(s)&&(s.value=u),l(s)},(s,u)=>{s.length?l(new pe(s,u,void 0,void 0,i)):a(u)}))}validateSync(e,r){var o;let n=this.resolve(Object.assign({},r,{value:e})),i,a=(o=r==null?void 0:r.disableStackTrace)!=null?o:n.spec.disableStackTrace;return n._validate(e,Object.assign({},r,{sync:!0}),(l,s)=>{throw pe.isError(l)&&(l.value=s),l},(l,s)=>{if(l.length)throw new pe(l,e,void 0,void 0,a);i=s}),i}isValid(e,r){return this.validate(e,r).then(()=>!0,o=>{if(pe.isError(o))return!1;throw o})}isValidSync(e,r){try{return this.validateSync(e,r),!0}catch(o){if(pe.isError(o))return!1;throw o}}_getDefault(e){let r=this.spec.default;return r==null?r:typeof r=="function"?r.call(this,e):kt(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 o=this.clone({nullable:e});return o.internalTests.nullable=At({message:r,name:"nullable",test(n){return n===null?this.schema.spec.nullable:!0}}),o}optionality(e,r){let o=this.clone({optional:e});return o.internalTests.optionality=At({message:r,name:"optionality",test(n){return n===void 0?this.schema.spec.optional:!0}}),o}optional(){return this.optionality(!0)}defined(e=$e.defined){return this.optionality(!1,e)}nullable(){return this.nullability(!0)}nonNullable(e=$e.notNull){return this.nullability(!1,e)}required(e=$e.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=$e.default),typeof r.test!="function")throw new TypeError("`test` is a required parameters");let o=this.clone(),n=At(r),i=r.exclusive||r.name&&o.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&&(o.exclusiveTests[r.name]=!!r.exclusive),o.tests=o.tests.filter(a=>!(a.OPTIONS.name===r.name&&(i||a.OPTIONS.test===n.OPTIONS.test))),o.tests.push(n),o}when(e,r){!Array.isArray(e)&&typeof e!="string"&&(r=e,e=".");let o=this.clone(),n=zs(e).map(i=>new qe(i));return n.forEach(i=>{i.isSibling&&o.deps.push(i.key)}),o.conditions.push(typeof r=="function"?new Ft(n,r):Ft.fromOptions(n,r)),o}typeError(e){let r=this.clone();return r.internalTests.typeError=At({message:e,name:"typeError",skipAbsent:!0,test(o){return this.schema._typeCheck(o)?!0:this.createError({params:{type:this.schema.type}})}}),r}oneOf(e,r=$e.oneOf){let o=this.clone();return e.forEach(n=>{o._whitelist.add(n),o._blacklist.delete(n)}),o.internalTests.whiteList=At({message:r,name:"oneOf",skipAbsent:!0,test(n){let i=this.schema._whitelist,a=i.resolveAll(this.resolve);return a.includes(n)?!0:this.createError({params:{values:Array.from(i).join(", "),resolved:a}})}}),o}notOneOf(e,r=$e.notOneOf){let o=this.clone();return e.forEach(n=>{o._blacklist.add(n),o._whitelist.delete(n)}),o.internalTests.blacklist=At({message:r,name:"notOneOf",test(n){let i=this.schema._blacklist,a=i.resolveAll(this.resolve);return a.includes(n)?this.createError({params:{values:Array.from(i).join(", "),resolved:a}}):!0}}),o}strip(e=!0){let r=this.clone();return r.spec.strip=e,r}describe(e){let r=(e?this.resolve(e):this).clone(),{label:o,meta:n,optional:i,nullable:a}=r.spec;return{meta:n,label:o,optional:i,nullable:a,default:r.getDefault(e),type:r.type,oneOf:r._whitelist.describe(),notOneOf:r._blacklist.describe(),tests:r.tests.map(s=>({name:s.OPTIONS.name,params:s.OPTIONS.params})).filter((s,u,c)=>c.findIndex(f=>f.name===s.name)===u)}}};le.prototype.__isYupSchema__=!0;for(let t of["validate","validateSync"])le.prototype[`${t}At`]=function(e,r,o={}){let{parent:n,parentPath:i,schema:a}=Md(this,e,r,o.context);return a[t](n&&n[i],Object.assign({},o,{parent:n,path:e}))};for(let t of["equals","is"])le.prototype[t]=le.prototype.oneOf;for(let t of["not","nope"])le.prototype[t]=le.prototype.notOneOf;var Rd=()=>!0;function Bd(t){return new go(t)}var go=class extends le{constructor(e){super(typeof e=="function"?{type:"mixed",check:e}:Object.assign({type:"mixed",check:Rd},e))}};Bd.prototype=go.prototype;function Id(){return new yo}var yo=class extends le{constructor(){super({type:"boolean",check(e){return e instanceof Boolean&&(e=e.valueOf()),typeof e=="boolean"}}),this.withMutation(()=>{this.transform((e,r,o)=>{if(o.spec.coerce&&!o.isType(e)){if(/^(true|1)$/i.test(String(e)))return!0;if(/^(false|0)$/i.test(String(e)))return!1}return e})})}isTrue(e=ei.isValue){return this.test({message:e,name:"is-value",exclusive:!0,params:{value:"true"},test(r){return Fe(r)||r===!0}})}isFalse(e=ei.isValue){return this.test({message:e,name:"is-value",exclusive:!0,params:{value:"false"},test(r){return Fe(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)}};Id.prototype=yo.prototype;var $d=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function Ld(t){let e=ri(t);if(!e)return Date.parse?Date.parse(t):Number.NaN;if(e.z===void 0&&e.plusMinus===void 0)return new Date(e.year,e.month,e.day,e.hour,e.minute,e.second,e.millisecond).valueOf();let r=0;return e.z!=="Z"&&e.plusMinus!==void 0&&(r=e.hourOffset*60+e.minuteOffset,e.plusMinus==="+"&&(r=0-r)),Date.UTC(e.year,e.month,e.day,e.hour,e.minute+r,e.second,e.millisecond)}function ri(t){var e,r;let o=$d.exec(t);return o?{year:We(o[1]),month:We(o[2],1)-1,day:We(o[3],1),hour:We(o[4]),minute:We(o[5]),second:We(o[6]),millisecond:o[7]?We(o[7].substring(0,3)):0,precision:(e=(r=o[7])==null?void 0:r.length)!=null?e:void 0,z:o[8]||void 0,plusMinus:o[9]||void 0,hourOffset:We(o[10]),minuteOffset:We(o[11])}:null}function We(t,e=0){return Number(t)||e}var Nd=/^[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])?)*$/,zd=/^((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,Vd=/^(?:[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,jd="^\\d{4}-\\d{2}-\\d{2}",Wd="\\d{2}:\\d{2}:\\d{2}",Ud="(([+-]\\d{2}(:?\\d{2})?)|Z)",qd=new RegExp(`${jd}T${Wd}(\\.\\d+)?${Ud}$`),Gd=t=>Fe(t)||t===t.trim(),Hd={}.toString();function de(){return new xo}var xo=class extends le{constructor(){super({type:"string",check(e){return e instanceof String&&(e=e.valueOf()),typeof e=="string"}}),this.withMutation(()=>{this.transform((e,r,o)=>{if(!o.spec.coerce||o.isType(e)||Array.isArray(e))return e;let n=e!=null&&e.toString?e.toString():e;return n===Hd?e:n})})}required(e){return super.required(e).withMutation(r=>r.test({message:e||$e.required,name:"required",skipAbsent:!0,test:o=>!!o.length}))}notRequired(){return super.notRequired().withMutation(e=>(e.tests=e.tests.filter(r=>r.OPTIONS.name!=="required"),e))}length(e,r=ge.length){return this.test({message:r,name:"length",exclusive:!0,params:{length:e},skipAbsent:!0,test(o){return o.length===this.resolve(e)}})}min(e,r=ge.min){return this.test({message:r,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(o){return o.length>=this.resolve(e)}})}max(e,r=ge.max){return this.test({name:"max",exclusive:!0,message:r,params:{max:e},skipAbsent:!0,test(o){return o.length<=this.resolve(e)}})}matches(e,r){let o=!1,n,i;return r&&(typeof r=="object"?{excludeEmptyString:o=!1,message:n,name:i}=r:n=r),this.test({name:i||"matches",message:n||ge.matches,params:{regex:e},skipAbsent:!0,test:a=>a===""&&o||a.search(e)!==-1})}email(e=ge.email){return this.matches(Nd,{name:"email",message:e,excludeEmptyString:!0})}url(e=ge.url){return this.matches(zd,{name:"url",message:e,excludeEmptyString:!0})}uuid(e=ge.uuid){return this.matches(Vd,{name:"uuid",message:e,excludeEmptyString:!1})}datetime(e){let r="",o,n;return e&&(typeof e=="object"?{message:r="",allowOffset:o=!1,precision:n=void 0}=e:r=e),this.matches(qd,{name:"datetime",message:r||ge.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:r||ge.datetime_offset,params:{allowOffset:o},skipAbsent:!0,test:i=>{if(!i||o)return!0;let a=ri(i);return a?!!a.z:!1}}).test({name:"datetime_precision",message:r||ge.datetime_precision,params:{precision:n},skipAbsent:!0,test:i=>{if(!i||n==null)return!0;let a=ri(i);return a?a.precision===n:!1}})}ensure(){return this.default("").transform(e=>e===null?"":e)}trim(e=ge.trim){return this.transform(r=>r!=null?r.trim():r).test({message:e,name:"trim",test:Gd})}lowercase(e=ge.lowercase){return this.transform(r=>Fe(r)?r:r.toLowerCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>Fe(r)||r===r.toLowerCase()})}uppercase(e=ge.uppercase){return this.transform(r=>Fe(r)?r:r.toUpperCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>Fe(r)||r===r.toUpperCase()})}};de.prototype=xo.prototype;var Yd=t=>t!=+t;function Kd(){return new bo}var bo=class extends le{constructor(){super({type:"number",check(e){return e instanceof Number&&(e=e.valueOf()),typeof e=="number"&&!Yd(e)}}),this.withMutation(()=>{this.transform((e,r,o)=>{if(!o.spec.coerce)return e;let n=e;if(typeof n=="string"){if(n=n.replace(/\s/g,""),n==="")return NaN;n=+n}return o.isType(n)||n===null?n:parseFloat(n)})})}min(e,r=Je.min){return this.test({message:r,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(o){return o>=this.resolve(e)}})}max(e,r=Je.max){return this.test({message:r,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(o){return o<=this.resolve(e)}})}lessThan(e,r=Je.lessThan){return this.test({message:r,name:"max",exclusive:!0,params:{less:e},skipAbsent:!0,test(o){return o<this.resolve(e)}})}moreThan(e,r=Je.moreThan){return this.test({message:r,name:"min",exclusive:!0,params:{more:e},skipAbsent:!0,test(o){return o>this.resolve(e)}})}positive(e=Je.positive){return this.moreThan(0,e)}negative(e=Je.negative){return this.lessThan(0,e)}integer(e=Je.integer){return this.test({name:"integer",message:e,skipAbsent:!0,test:r=>Number.isInteger(r)})}truncate(){return this.transform(e=>Fe(e)?e:e|0)}round(e){var r;let o=["ceil","floor","round","trunc"];if(e=((r=e)==null?void 0:r.toLowerCase())||"round",e==="trunc")return this.truncate();if(o.indexOf(e.toLowerCase())===-1)throw new TypeError("Only valid options for round() are: "+o.join(", "));return this.transform(n=>Fe(n)?n:Math[e](n))}};Kd.prototype=bo.prototype;var qs=new Date(""),Zd=t=>Object.prototype.toString.call(t)==="[object Date]";function Gs(){return new lt}var lt=class extends le{constructor(){super({type:"date",check(e){return Zd(e)&&!isNaN(e.getTime())}}),this.withMutation(()=>{this.transform((e,r,o)=>!o.spec.coerce||o.isType(e)||e===null?e:(e=Ld(e),isNaN(e)?lt.INVALID_DATE:new Date(e)))})}prepareParam(e,r){let o;if(qe.isRef(e))o=e;else{let n=this.cast(e);if(!this._typeCheck(n))throw new TypeError(`\`${r}\` must be a Date or a value that can be \`cast()\` to a Date`);o=n}return o}min(e,r=Jn.min){let o=this.prepareParam(e,"min");return this.test({message:r,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(n){return n>=this.resolve(o)}})}max(e,r=Jn.max){let o=this.prepareParam(e,"max");return this.test({message:r,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(n){return n<=this.resolve(o)}})}};lt.INVALID_DATE=qs;Gs.prototype=lt.prototype;Gs.INVALID_DATE=qs;function Qd(t,e=[]){let r=[],o=new Set,n=new Set(e.map(([a,l])=>`${a}-${l}`));function i(a,l){let s=(0,Ae.split)(a)[0];o.add(s),n.has(`${l}-${s}`)||r.push([l,s])}for(let a of Object.keys(t)){let l=t[a];o.add(a),qe.isRef(l)&&l.isSibling?i(l.path,a):To(l)&&"deps"in l&&l.deps.forEach(s=>i(s,a))}return Ns.default.array(Array.from(o),r).reverse()}function $s(t,e){let r=1/0;return t.some((o,n)=>{var i;if((i=e.path)!=null&&i.includes(o))return r=n,!0}),r}function Hs(t){return(e,r)=>$s(t,e)-$s(t,r)}var Ys=(t,e,r)=>{if(typeof t!="string")return t;let o=t;try{o=JSON.parse(t)}catch(n){}return r.isType(o)?o:t};function mo(t){if("fields"in t){let e={};for(let[r,o]of Object.entries(t.fields))e[r]=mo(o);return t.setFields(e)}if(t.type==="array"){let e=t.optional();return e.innerType&&(e.innerType=mo(e.innerType)),e}return t.type==="tuple"?t.optional().clone({types:t.spec.types.map(mo)}):"optional"in t?t.optional():t}var Xd=(t,e)=>{let r=[...(0,Ae.normalizePath)(e)];if(r.length===1)return r[0]in t;let o=r.pop(),n=(0,Ae.getter)((0,Ae.join)(r),!0)(t);return!!(n&&o in n)},Ls=t=>Object.prototype.toString.call(t)==="[object Object]";function Jd(t,e){let r=Object.keys(t.fields);return Object.keys(e).filter(o=>r.indexOf(o)===-1)}var em=Hs([]);function Ce(t){return new vo(t)}var vo=class extends le{constructor(e){super({type:"object",check(r){return Ls(r)||typeof r=="function"}}),this.fields=Object.create(null),this._sortErrors=em,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{e&&this.shape(e)})}_cast(e,r={}){var o;let n=super._cast(e,r);if(n===void 0)return this.getDefault(r);if(!this._typeCheck(n))return n;let i=this.fields,a=(o=r.stripUnknown)!=null?o:this.spec.noUnknown,l=[].concat(this._nodes,Object.keys(n).filter(f=>!this._nodes.includes(f))),s={},u=Object.assign({},r,{parent:s,__validating:r.__validating||!1}),c=!1;for(let f of l){let m=i[f],p=f in n;if(m){let g,x=n[f];u.path=(r.path?`${r.path}.`:"")+f,m=m.resolve({value:x,context:r.context,parent:s});let P=m instanceof le?m.spec:void 0,v=P==null?void 0:P.strict;if(P!=null&&P.strip){c=c||f in n;continue}g=!r.__validating||!v?m.cast(n[f],u):n[f],g!==void 0&&(s[f]=g)}else p&&!a&&(s[f]=n[f]);(p!==f in s||s[f]!==n[f])&&(c=!0)}return c?s:n}_validate(e,r={},o,n){let{from:i=[],originalValue:a=e,recursive:l=this.spec.recursive}=r;r.from=[{schema:this,value:a},...i],r.__validating=!0,r.originalValue=a,super._validate(e,r,o,(s,u)=>{if(!l||!Ls(u)){n(s,u);return}a=a||u;let c=[];for(let f of this._nodes){let m=this.fields[f];!m||qe.isRef(m)||c.push(m.asNestedTest({options:r,key:f,parent:u,parentPath:r.path,originalParent:a}))}this.runTests({tests:c,value:u,originalValue:a,options:r},o,f=>{n(f.sort(this._sortErrors).concat(s),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),o=r.fields;for(let[n,i]of Object.entries(this.fields)){let a=o[n];o[n]=a===void 0?i:a}return r.withMutation(n=>n.setFields(o,[...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(o=>{var n;let i=this.fields[o],a=e;(n=a)!=null&&n.value&&(a=Object.assign({},a,{parent:a.value,value:a.value[o]})),r[o]=i&&"getDefault"in i?i.getDefault(a):void 0}),r}setFields(e,r){let o=this.clone();return o.fields=e,o._nodes=Qd(e,r),o._sortErrors=Hs(Object.keys(e)),r&&(o._excludedEdges=r),o}shape(e,r=[]){return this.clone().withMutation(o=>{let n=o._excludedEdges;return r.length&&(Array.isArray(r[0])||(r=[r]),n=[...o._excludedEdges,...r]),o.setFields(Object.assign(o.fields,e),n)})}partial(){let e={};for(let[r,o]of Object.entries(this.fields))e[r]="optional"in o&&o.optional instanceof Function?o.optional():o;return this.setFields(e)}deepPartial(){return mo(this)}pick(e){let r={};for(let o of e)this.fields[o]&&(r[o]=this.fields[o]);return this.setFields(r,this._excludedEdges.filter(([o,n])=>e.includes(o)&&e.includes(n)))}omit(e){let r=[];for(let o of Object.keys(this.fields))e.includes(o)||r.push(o);return this.pick(r)}from(e,r,o){let n=(0,Ae.getter)(e,!0);return this.transform(i=>{if(!i)return i;let a=i;return Xd(i,e)&&(a=Object.assign({},i),o||delete a[e],a[r]=n(i)),a})}json(){return this.transform(Ys)}noUnknown(e=!0,r=ti.noUnknown){typeof e!="boolean"&&(r=e,e=!0);let o=this.test({name:"noUnknown",exclusive:!0,message:r,test(n){if(n==null)return!0;let i=Jd(this.schema,n);return!e||i.length===0||this.createError({params:{unknown:i.join(", ")}})}});return o.spec.noUnknown=e,o}unknown(e=!0,r=ti.noUnknown){return this.noUnknown(!e,r)}transformKeys(e){return this.transform(r=>{if(!r)return r;let o={};for(let n of Object.keys(r))o[e(n)]=r[n];return o})}camelCase(){return this.transformKeys(Xt.camelCase)}snakeCase(){return this.transformKeys(Xt.snakeCase)}constantCase(){return this.transformKeys(e=>(0,Xt.snakeCase)(e).toUpperCase())}describe(e){let r=(e?this.resolve(e):this).clone(),o=super.describe(e);o.fields={};for(let[i,a]of Object.entries(r.fields)){var n;let l=e;(n=l)!=null&&n.value&&(l=Object.assign({},l,{parent:l.value,value:l.value[i]})),o.fields[i]=a.describe(l)}return o}};Ce.prototype=vo.prototype;function tm(t){return new Co(t)}var Co=class extends le{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 o=super._cast(e,r);if(!this._typeCheck(o)||!this.innerType)return o;let n=!1,i=o.map((a,l)=>{let s=this.innerType.cast(a,Object.assign({},r,{path:`${r.path||""}[${l}]`}));return s!==a&&(n=!0),s});return n?i:o}_validate(e,r={},o,n){var i;let a=this.innerType,l=(i=r.recursive)!=null?i:this.spec.recursive;r.originalValue!=null&&r.originalValue,super._validate(e,r,o,(s,u)=>{var c;if(!l||!a||!this._typeCheck(u)){n(s,u);return}let f=new Array(u.length);for(let p=0;p<u.length;p++){var m;f[p]=a.asNestedTest({options:r,index:p,parent:u,parentPath:r.path,originalParent:(m=r.originalValue)!=null?m:e})}this.runTests({value:u,tests:f,originalValue:(c=r.originalValue)!=null?c:e,options:r},o,p=>n(p.concat(s),u))})}clone(e){let r=super.clone(e);return r.innerType=this.innerType,r}json(){return this.transform(Ys)}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(!To(e))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+Ue(e));return r.innerType=e,r.spec=Object.assign({},r.spec,{types:e}),r}length(e,r=po.length){return this.test({message:r,name:"length",exclusive:!0,params:{length:e},skipAbsent:!0,test(o){return o.length===this.resolve(e)}})}min(e,r){return r=r||po.min,this.test({message:r,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(o){return o.length>=this.resolve(e)}})}max(e,r){return r=r||po.max,this.test({message:r,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(o){return o.length<=this.resolve(e)}})}ensure(){return this.default(()=>[]).transform((e,r)=>this._typeCheck(e)?e:r==null?[]:[].concat(r))}compact(e){let r=e?(o,n,i)=>!e(o,n,i):o=>!!o;return this.transform(o=>o!=null?o.filter(r):o)}describe(e){let r=(e?this.resolve(e):this).clone(),o=super.describe(e);if(r.innerType){var n;let i=e;(n=i)!=null&&n.value&&(i=Object.assign({},i,{parent:i.value,value:i.value[0]})),o.innerType=r.innerType.describe(i)}return o}};tm.prototype=Co.prototype;function rm(t){return new So(t)}var So=class extends le{constructor(e){super({type:"tuple",spec:{types:e},check(r){let o=this.spec.types;return Array.isArray(r)&&r.length===o.length}}),this.withMutation(()=>{this.typeError(Us.notType)})}_cast(e,r){let{types:o}=this.spec,n=super._cast(e,r);if(!this._typeCheck(n))return n;let i=!1,a=o.map((l,s)=>{let u=l.cast(n[s],Object.assign({},r,{path:`${r.path||""}[${s}]`}));return u!==n[s]&&(i=!0),u});return i?a:n}_validate(e,r={},o,n){let i=this.spec.types;super._validate(e,r,o,(a,l)=>{var s;if(!this._typeCheck(l)){n(a,l);return}let u=[];for(let[f,m]of i.entries()){var c;u[f]=m.asNestedTest({options:r,index:f,parent:l,parentPath:r.path,originalParent:(c=r.originalValue)!=null?c:e})}this.runTests({value:l,tests:u,originalValue:(s=r.originalValue)!=null?s:e,options:r},o,f=>n(f.concat(a),l))})}describe(e){let r=(e?this.resolve(e):this).clone(),o=super.describe(e);return o.innerType=r.spec.types.map((n,i)=>{var a;let l=e;return(a=l)!=null&&a.value&&(l=Object.assign({},l,{parent:l.value,value:l.value[i]})),n.describe(l)}),o}};rm.prototype=So.prototype;var _isStrongPassword = require('validator/lib/isStrongPassword'); var _isStrongPassword2 = _interopRequireDefault(_isStrongPassword);function ut(t){let{name:e,label:r,value:o,onChange:n,onKeyDown:i}=t,[a,l]=_react.useState.call(void 0, !1);function s(){l(!a)}return _jsxruntime.jsx.call(void 0, _material.TextField,{name:e,label:r,value:o||"",onChange:n,onKeyDown:i,type:a?"text":"password",InputProps:{endAdornment:_jsxruntime.jsx.call(void 0, _material.InputAdornment,{position:"end",children:_jsxruntime.jsx.call(void 0, _material.IconButton,{tabIndex:-1,onClick:s,edge:"end",children:a?_jsxruntime.jsx.call(void 0, _iconsmaterial.VisibilityOff,{}):_jsxruntime.jsx.call(void 0, _iconsmaterial.Visibility,{})})})}})}var dm=_react.forwardRef.call(void 0, function(e,r){return _jsxruntime.jsx.call(void 0, _material.Slide,d({direction:"up",ref:r},e))});function er(n){var i=n,{children:t,height:e,fullWidth:r=!0}=i,o=D(i,["children","height","fullWidth"]);return _jsxruntime.jsx.call(void 0, _material.Dialog,C(d({disableRestoreFocus:!0,fullWidth:r,TransitionComponent:dm,sx:d({"& .MuiBackdrop-root":{backgroundColor:"#6464648F"}},o==null?void 0:o.sx),PaperProps:{style:{height:e,overflow:"hidden",position:"absolute",top:"51px",margin:0}}},o),{children:_jsxruntime.jsx.call(void 0, _material.Stack,{height:"100%",position:"relative",overflow:"auto",children:t})}))}var _useDialogs = require('@toolpad/core/useDialogs');function ni({children:t}){return _jsxruntime.jsx.call(void 0, _useDialogs.DialogsProvider,{children:t})}function ii(t){let a=t,{dialogComponent:e,payload:r,label:o}=a,n=D(a,["dialogComponent","payload","label"]),i=_useDialogs.useDialogs.call(void 0, );return _jsxruntime.jsx.call(void 0, _material.Button,C(d({variant:"contained",onClick:()=>{i.open(e,r)}},n),{children:o||" Adicionar"}))}function tr(t){let e=_material.useTheme.call(void 0, );return _jsxruntime.jsx.call(void 0, _material.Stack,d({component:"header",height:"44px",position:"absolute",direction:"row",top:0,left:0,right:0,display:"flex",alignItems:"center",padding:"16px",borderBottom:`solid 1px ${e.palette.grey[300]}`},t))}function rr(t){let e=_material.useTheme.call(void 0, );return _jsxruntime.jsx.call(void 0, _material.Typography,d({component:"h2",variant:"button",sx:{fontSize:"14px",color:e.palette.grey[500],whiteSpace:"nowrap"}},t))}function or({onClose:t}){return _jsxruntime.jsx.call(void 0, _material.IconButton,{onClick:()=>t(),sx:{position:"absolute",right:"11px"},children:_jsxruntime.jsx.call(void 0, _iconsmaterial.Close,{})})}function nr(r){var o=r,{children:t}=o,e=D(o,["children"]);return _jsxruntime.jsx.call(void 0, _material.Stack,{component:"main",margin:"44px 0 55.75px",overflow:"auto",children:_jsxruntime.jsx.call(void 0, _material.Stack,C(d({padding:"16px"},e),{children:t}))})}function ir(t){let e=_material.useTheme.call(void 0, );return _jsxruntime.jsx.call(void 0, _material.Stack,d({component:"footer",position:"absolute",direction:"row",alignItems:"center",bottom:0,left:0,right:0,padding:"8px 16px",borderTop:`solid 1px ${e.palette.grey[300]}`,height:"48px",sx:{backgroundColor:e.palette.background.paper}},t))}function ar(t){return _jsxruntime.jsx.call(void 0, _material.Stack,d({direction:"row",alignItems:"center",gap:1,marginLeft:"auto"},t))}function ai(r){var o=r,{children:t}=o,e=D(o,["children"]);return _jsxruntime.jsx.call(void 0, z,C(d({variant:"outlined",color:"error"},e),{children:"Cancelar"}))}function si(o){var n=o,{children:t,label:e}=n,r=D(n,["children","label"]);return _jsxruntime.jsx.call(void 0, z,C(d({variant:"contained"},r),{children:e||"Salvar"}))}function ui({open:t,onClose:e,payload:r}){let{useRemover:o,identificador:n}=r,{mutateAsync:i,isLoading:a}=o();function l(){return N(this,null,function*(){try{yield i(n),e()}catch(s){}})}return _jsxruntime.jsxs.call(void 0, er,{open:t,onClose:e,children:[_jsxruntime.jsxs.call(void 0, tr,{children:[_jsxruntime.jsx.call(void 0, rr,{children:"Tem certeza de que deseja excluir este registro?"}),_jsxruntime.jsx.call(void 0, or,{onClose:e})]}),_jsxruntime.jsx.call(void 0, nr,{children:_jsxruntime.jsx.call(void 0, _material.Alert,{severity:"error",children:"O registro ser\xE1 removido permanentemente. Deseja continuar?"})}),_jsxruntime.jsx.call(void 0, ir,{children:_jsxruntime.jsxs.call(void 0, ar,{children:[_jsxruntime.jsx.call(void 0, z,{onClick:()=>e(),sx:{minWidth:"100px"},children:"Manter registro"}),_jsxruntime.jsx.call(void 0, z,{color:"error",variant:"contained",isLoading:a,onClick:l,sx:{minWidth:"100px"},children:"Remover"})]})})]})}var Bm={Root:er,Provider:ni,AdicionarButton:ii,Header:tr,Title:rr,ActionClose:or,Content:nr,Footer:ir,Actions:ar,ActionCancelar:ai,ActionSalvar:si,ConfirmDelete:ui},U= exports.DialogV2 =Bm;function ft(t){let{isValid:e,message:r}=t,o=_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?o.palette.success.main:"inherit",textDecoration:e?"line-through":"none",ml:1,fontSize:"10pt"},children:r})]})}var rl={senhaAtual:"",senhaNova:""},Gm=Ce().shape({senhaAtual:de().required("Informe a Senha Atual."),senhaNova:de().required("Informe a Nova Senha.")});function Rt(t){let{isOpen:e,credentialsConfig:r,onClose:o,onSuccess:n,onFailed:i,primeiroAcesso:a,senhaAtual:l,email:s}=t,{alterarSenha:u,isSubmitting:c}=_hooks.useCredentials.call(void 0, r),{setValidationErrors:f,validationProps:m}=_hooks.useValidations.call(void 0, ),{data:p,handleChange:g,setData:x,changeValue:P}=_hooks.useForm.call(void 0, rl),[v,S]=_react.useState.call(void 0, !1),[b,T]=_react.useState.call(void 0, null);_react.useEffect.call(void 0, ()=>{l&&P("senhaAtual",l)},[l]),_react.useEffect.call(void 0, ()=>{p.senhaNova&&S(_isStrongPassword2.default.call(void 0, p.senhaNova,{minLength:8,minLowercase:1,minUppercase:1,minNumbers:1,minSymbols:1}))},[p.senhaNova]);function F(){return N(this,null,function*(){f(null),T(null),Gm.validate(p,{abortEarly:!1}).then(()=>N(this,null,function*(){var h;let{senhaAtual:_,senhaNova:B}=p;try{(yield u(_,B,s))&&(n&&n(),x(rl))}catch(y){if(i&&i(y),_axios.isAxiosError.call(void 0, y)){T((h=y.response)==null?void 0:h.data.message);return}T("Ocorreu um erro ao tentar alterar a senha")}})).catch(_=>{f(_)})})}function $(){return(p==null?void 0:p.senhaNova.length)>=8}function R(){if(p!=null&&p.senhaNova){let _=p==null?void 0:p.senhaNova.match(/[a-z]/g);return Array.isArray(_)&&_.length>0}return!1}function re(){if(p!=null&&p.senhaNova){let _=p==null?void 0:p.senhaNova.match(/[A-Z]/g);return Array.isArray(_)&&_.length>0}return!1}function q(){if(p!=null&&p.senhaNova){let _=p==null?void 0:p.senhaNova.match(/\d/g);return Array.isArray(_)&&_.length>0}return!1}function oe(){if(p!=null&&p.senhaNova){let _=p==null?void 0:p.senhaNova.match(/\W/g);return Array.isArray(_)&&_.length>0}return!1}return _jsxruntime.jsxs.call(void 0, U.Root,{open:e,onClose:_=>o(),maxWidth:"md",children:[_jsxruntime.jsxs.call(void 0, U.Header,{children:[_jsxruntime.jsx.call(void 0, U.Title,{children:"Alterar Senha"}),_jsxruntime.jsx.call(void 0, U.ActionClose,{onClose:o})]}),_jsxruntime.jsx.call(void 0, U.Content,{children:_jsxruntime.jsxs.call(void 0, _material.Grid2,{container:!0,spacing:2,children:[a&&_jsxruntime.jsx.call(void 0, _material.Grid2,{size: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.Grid2,{size:12,children:_jsxruntime.jsx.call(void 0, ut,d({name:"senhaAtual",label:"Senha Atual",value:(p==null?void 0:p.senhaAtual)||"",onChange:g},m("senhaAtual")))}),_jsxruntime.jsx.call(void 0, _material.Grid2,{size:12,children:_jsxruntime.jsx.call(void 0, ut,d({name:"senhaNova",label:"Nova Senha",value:(p==null?void 0:p.senhaNova)||"",onChange:g},m("senhaNova")))}),_jsxruntime.jsxs.call(void 0, _material.Grid2,{size:12,children:[_jsxruntime.jsx.call(void 0, ft,{isValid:$(),message:"O tamanho m\xEDnimo da nova senha \xE9 de 8 caracteres"}),_jsxruntime.jsx.call(void 0, ft,{isValid:R(),message:"A nova senha deve ter ao menos uma letra min\xFAscula"}),_jsxruntime.jsx.call(void 0, ft,{isValid:re(),message:"A nova senha deve ter ao menos uma letra mai\xFAscula"}),_jsxruntime.jsx.call(void 0, ft,{isValid:q(),message:"A nova senha deve ter ao menos um n\xFAmero"}),_jsxruntime.jsx.call(void 0, ft,{isValid:oe(),message:"A nova senha deve ter ao menos um caracter especial"})]}),b&&_jsxruntime.jsx.call(void 0, _material.Grid2,{size:12,children:_jsxruntime.jsx.call(void 0, _material.Alert,{severity:"error",children:b})})]})}),_jsxruntime.jsx.call(void 0, U.Footer,{children:_jsxruntime.jsxs.call(void 0, U.Actions,{children:[_jsxruntime.jsx.call(void 0, U.ActionCancelar,{onClick:()=>o()}),_jsxruntime.jsx.call(void 0, U.ActionSalvar,{label:"Alterar Senha",onClick:F,isLoading:c,disabled:!v})]})})]})}var eh=Ce().shape({email:de().required("Informe o e-mail"),password:de().required("Informe a senha")});function ci(t){let{onLoginSuccess:e,onLoginFailed:r,onOptionsClick:o,credentialsConfig:n}=t,[i,a]=_react.useState.call(void 0, ""),[l,s]=_react.useState.call(void 0, ""),[u,c]=_react.useState.call(void 0, !1),[f,m]=_react.useState.call(void 0, !1),[p,g]=_react.useState.call(void 0, !1),[x,P]=_react.useState.call(void 0, null),{login:v}=_hooks.useCredentials.call(void 0, n),{validationProps:S,setValidationErrors:b}=_hooks.useValidations.call(void 0, );function T(){return N(this,null,function*(){b(null),P(null),eh.validate({email:i,password:l},{abortEarly:!1}).then(()=>N(this,null,function*(){var F,$;c(!0);try{let R=yield v(i,l);R&&e(R)}catch(R){if(_axios.isAxiosError.call(void 0, R)){if(((F=R.response)==null?void 0:F.data.code)==="E_FIRST_ACCESS"){m(!0);return}P(($=R.response)==null?void 0:$.data.message)}r(R)}})).catch(F=>{b(F)}).finally(()=>{c(!1)})})}return _jsxruntime.jsxs.call(void 0, _material.Stack,{component:"form",onSubmit:T,children:[_jsxruntime.jsxs.call(void 0, _material.Stack,{spacing:2,children:[_jsxruntime.jsx.call(void 0, _material.TextField,d({name:"email",label:"E-mail",margin:"normal",autoFocus:!0,value:i||"",onChange:F=>a(F.target.value)},S("email"))),_jsxruntime.jsx.call(void 0, ut,d({name:"password",label:"Senha",size:"medium",placeholder:"Sua senha",value:l||"",onChange:F=>s(F.target.value),onKeyDown:F=>F.key==="Enter"&&T()},S("password"))),_jsxruntime.jsx.call(void 0, z,{fullWidth:!0,variant:"contained",onClick:T,isLoading:u,sx:{mt:1},children:"Entrar"})]}),_jsxruntime.jsx.call(void 0, z,{onClick:()=>o("esqueci-senha"),variant:"text",disableRipple:!0,disableTouchRipple:!0,sx:{justifyContent:"flex-start",alignContent:"center",alignItems:"center",textAlign:"left",width:"120px",marginTop:.5,fontWeight:"400",":hover":{}},children:"Esqueci a senha"}),x&&_jsxruntime.jsx.call(void 0, _material.Alert,{severity:"error",children:x}),p&&_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.jsxs.call(void 0, _material.Stack,{direction:"row",justifyContent:"center",alignItems:"center",mt:2,mb:2,children:[_jsxruntime.jsx.call(void 0, _material.Divider,{sx:{flexGrow:1,mr:1}}),_jsxruntime.jsx.call(void 0, _material.Typography,{children:"Ou fa\xE7a login com"}),_jsxruntime.jsx.call(void 0, _material.Divider,{sx:{flexGrow:1,ml:1}})]}),_jsxruntime.jsxs.call(void 0, _material.Stack,{spacing:1,children:[_jsxruntime.jsx.call(void 0, z,{onClick:()=>o("otp-email"),startIcon:_jsxruntime.jsx.call(void 0, _iconsmaterial.Mail,{}),children:"Entrar com senha tempor\xE1ria"}),_jsxruntime.jsx.call(void 0, z,{onClick:()=>o("otp-whatsapp"),startIcon:_jsxruntime.jsx.call(void 0, _iconsmaterial.WhatsApp,{}),children:"Entrar com senha tempor\xE1ria"})]}),_jsxruntime.jsx.call(void 0, Rt,{senhaAtual:l,email:i,primeiroAcesso:!0,isOpen:f,onClose:()=>N(this,null,function*(){return m(!1)}),onSuccess:()=>{m(!1),g(!0),s("")},credentialsConfig:n})]})}var ih=Ce().shape({email:de().required("Informe o e-mail")});function fi(t){let{onLoginClick:e,credentialsConfig:r}=t,[o,n]=_react.useState.call(void 0, ""),[i,a]=_react.useState.call(void 0, !1),[l,s]=_react.useState.call(void 0, !1),[u,c]=_react.useState.call(void 0, null),{recuperarSenha:f}=_hooks.useCredentials.call(void 0, r),{validationProps:m,setValidationErrors:p}=_hooks.useValidations.call(void 0, );function g(){return N(this,null,function*(){p(null),ih.validate({email:o},{abortEarly:!1}).then(()=>N(this,null,function*(){var x;try{a(!0),yield f(o),s(!0)}catch(P){c((x=P.response)==null?void 0:x.data.message)}finally{a(!1)}})).catch(x=>{p(x)})})}return _jsxruntime.jsxs.call(void 0, _material.Box,{component:"form",children:[_jsxruntime.jsx.call(void 0, _material.TextField,d({name:"email",label:"E-mail",margin:"normal",placeholder:"Informe o e-mail utilizado para acessar o sistema",autoFocus:!0,value:o||"",onChange:x=>n(x.target.value)},m("email"))),_jsxruntime.jsx.call(void 0, z,{fullWidth:!0,variant:"contained",onClick:g,isLoading:i,children:"Recuperar minha senha"}),_jsxruntime.jsx.call(void 0, Se,{sx:{display:"inline-flex",justifyContent:"space-between",width:"100%",marginTop:1},children:_jsxruntime.jsx.call(void 0, z,{onClick:e,variant:"text",sx:{fontWeight:"400",":hover":{color:x=>x.palette.primary.dark}},children:"Voltar para o Login"})}),l&&_jsxruntime.jsx.call(void 0, _material.Alert,{severity:"success",action:_jsxruntime.jsx.call(void 0, z,{onClick:e,variant:"text",sx:{fontWeight:"400",":hover":{color:x=>x.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 di(t){var c;let{loginData:e,credentialsConfig:r,onLoginFailed:o,onLoginSuccess:n}=t,[i,a]=_react.useState.call(void 0, ""),{selecionarLicenca:l,isSubmitting:s}=_hooks.useCredentials.call(void 0, r);_react.useEffect.call(void 0, ()=>{if(Array.isArray(e==null?void 0:e.empresas)){let f=e==null?void 0:e.empresas[0];a(f==null?void 0:f.uuid)}},[e]);function u(){return N(this,null,function*(){try{let f=yield l(e==null?void 0:e.token,i);f?n(f):o("Nenhuma token definida")}catch(f){o(f)}})}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:f=>{a(f.target.value)},children:(c=e==null?void 0:e.empresas)==null?void 0:c.map(f=>_jsxruntime.jsx.call(void 0, _material.MenuItem,{value:f.uuid,children:f.nome},f.uuid))}),_jsxruntime.jsx.call(void 0, z,{fullWidth:!0,variant:"contained",onClick:u,isLoading:s,sx:{mt:1},children:"Confirmar"})]})}var _TextField = require('@mui/material/TextField'); var _TextField2 = _interopRequireDefault(_TextField);var al=t=>{let e=t.replace(/\D/g,"");return e.length<=2?`(${e}`:e.length<=7?`(${e.slice(0,2)}) ${e.slice(2)}`:e.length<=11?`(${e.slice(0,2)}) ${e.slice(2,7)}-${e.slice(7)}`:`(${e.slice(0,2)}) ${e.slice(2,7)}-${e.slice(7,11)}`};function lr(t){let u=t,{value:e,onChange:r}=u,o=D(u,["value","onChange"]),[n,i]=_react.useState.call(void 0, ""),a=e!==void 0,l=_react.useMemo.call(void 0, ()=>a?al(e||""):n,[e,n,a]);return _jsxruntime.jsx.call(void 0, _TextField2.default,d({value:l,onChange:c=>{let f=al(c.target.value);if(a||i(f),r){let m=C(d({},c),{target:C(d({},c.target),{value:f})});r(m)}},inputProps:{maxLength:15}},o))}function ur({length:t=6,value:e,onChange:r}){let o=_react.useRef.call(void 0, []),n=(a,l)=>{var m;let s="ABCDEF0123456789",u=l.toUpperCase().split("").find(p=>s.includes(p))||"",c=e.split("");c[a]=u;let f=c.join("");r(f),u&&a<t-1&&((m=o.current[a+1])==null||m.focus())},i=(a,l)=>{var s;l.key==="Backspace"&&!e[a]&&a>0&&((s=o.current[a-1])==null||s.focus())};return _jsxruntime.jsx.call(void 0, _material.Box,{display:"flex",gap:1,children:Array.from({length:t}).map((a,l)=>_jsxruntime.jsx.call(void 0, _material.TextField,{autoFocus:l===0,inputRef:s=>o.current[l]=s,slotProps:{htmlInput:{maxLength:1,style:{textAlign:"center",fontSize:"24px",width:"24px",height:"36px"}}},value:e[l]||"",onChange:s=>n(l,s.target.value),onKeyDown:s=>i(l,s)},l))})}function hi(t){let{open:e,onClose:r,payload:o,onLoginSuccess:n,credentialsConfig:i}=t,[a,l]=_react.useState.call(void 0, ""),[s,u]=_react.useState.call(void 0, !1),[c,f]=_react.useState.call(void 0, !1),{validarOtpVerificationCode:m}=_hooks.useCredentials.call(void 0, i);_react.useEffect.call(void 0, ()=>{s&&setTimeout(()=>{u(!1)},3e3)},[s]);function p(){return N(this,null,function*(){try{f(!0);let g=yield m({channel:o.channel,target:o.target,code:a});g&&n(g),r()}catch(g){u(g.response.data.message)}finally{f(!1)}})}return _jsxruntime.jsxs.call(void 0, U.Root,{open:e,onClose:g=>r(),maxWidth:"xs",children:[_jsxruntime.jsxs.call(void 0, U.Header,{children:[_jsxruntime.jsx.call(void 0, U.Title,{children:"Entrar com senha tempor\xE1ria"}),_jsxruntime.jsx.call(void 0, U.ActionClose,{onClose:r})]}),_jsxruntime.jsx.call(void 0, U.Content,{children:_jsxruntime.jsxs.call(void 0, _material.Stack,{spacing:2,justifyContent:"center",alignContent:"center",alignItems:"center",children:[_jsxruntime.jsx.call(void 0, _material.Typography,{variant:"subtitle1",sx:{fontWeight:"bolder",fontSize:"11pt"},children:"\u{1F510} Digite a senha tempor\xE1ria para acessar sua conta"}),_jsxruntime.jsxs.call(void 0, _material.Typography,{variant:"body1",sx:{fontSize:"10pt"},children:["Enviamos uma senha tempor\xE1ria para ",_jsxruntime.jsx.call(void 0, "b",{children:o.target}),". ",_jsxruntime.jsx.call(void 0, "br",{}),"Digite o c\xF3digo abaixo para acessar sua conta."]}),_jsxruntime.jsx.call(void 0, ur,{value:a,onChange:g=>{l(g)}}),s&&_jsxruntime.jsx.call(void 0, _material.Alert,{sx:{flexGrow:1},severity:"error",children:s})]})}),_jsxruntime.jsx.call(void 0, U.Footer,{children:_jsxruntime.jsxs.call(void 0, U.Actions,{children:[_jsxruntime.jsx.call(void 0, U.ActionCancelar,{onClick:()=>r()}),_jsxruntime.jsx.call(void 0, U.ActionSalvar,{label:"Entrar",onClick:p,isLoading:c,disabled:a.length!=6})]})})]})}var _h=Ce().shape({contato:de().when("$tipo",([t],e)=>t==="otp-email"?e.email("E-mail inv\xE1lido").required("Informe o e-mail"):e.matches(/^\+?[1-9]\d{7,14}$/,"N\xFAmero de WhatsApp inv\xE1lido").required("Informe o WhatsApp"))});function Ao(t){let{tipo:e,credentialsConfig:r,onLoginSuccess:o,onLoginClick:n}=t,[i,a]=_react.useState.call(void 0, !1),[l,s]=_react.useState.call(void 0, !1),{gerarOtpVerificationCode:u}=_hooks.useCredentials.call(void 0, r),{handleChange:c,changeValue:f,data:m,validate:p,validationErrors:g}=_hooks.useForm.call(void 0, {contato:""},_h),[x,P]=_react.useState.call(void 0, !1);return _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, "form",{onSubmit:S=>N(this,null,function*(){S.preventDefault(),p(b=>N(this,null,function*(){try{s(!1),a(!0);let T=yield u({channel:e==="otp-email"?"email":"whatsapp",target:b.contato});P(!0)}catch(T){s(T.response.data.message)}finally{a(!1)}}),{context:{tipo:e}})}),children:_jsxruntime.jsxs.call(void 0, _material.Stack,{spacing:2,children:[_jsxruntime.jsx.call(void 0, _material.Typography,{variant:"subtitle2",children:e==="otp-email"?" Informe seu e-mail para receber um c\xF3digo de acesso":"Informe seu n\xFAmero de WhatsApp para receber um c\xF3digo de acesso"}),e==="otp-email"&&_jsxruntime.jsx.call(void 0, _material.TextField,d({autoFocus:!0,name:"contato",label:"E-mail",value:m.contato||"",onChange:c,fullWidth:!0},g("contato"))),e==="otp-whatsapp"&&_jsxruntime.jsx.call(void 0, lr,d({autoFocus:!0,name:"contato",label:"Whatsapp",value:m.contato||"",onChange:S=>{f("contato",S.target.value.replace(/[^\d+]/g,""))},fullWidth:!0},g("contato"))),_jsxruntime.jsxs.call(void 0, _material.Stack,{children:[_jsxruntime.jsx.call(void 0, z,{isLoading:i,type:"submit",variant:"contained",color:"primary",children:"Enviar c\xF3digo"}),_jsxruntime.jsxs.call(void 0, Se,{sx:{display:"inline-flex",justifyContent:"space-between",width:"100%",marginTop:1},children:[_jsxruntime.jsx.call(void 0, z,{onClick:n,variant:"text",sx:{fontWeight:"400",":hover":{color:S=>S.palette.primary.dark}},children:"Voltar para o Login"}),_jsxruntime.jsx.call(void 0, "a",{href:"https://datacsistemashelp.zendesk.com/hc/pt-br/articles/36489079108756-Login-OTP-via-WhatsApp",target:"_blank",rel:"noopener noreferrer",children:_jsxruntime.jsx.call(void 0, _material.IconButton,{children:_jsxruntime.jsx.call(void 0, _iconsmaterial.HelpOutline,{color:"primary"})})})]})]}),l&&_jsxruntime.jsx.call(void 0, _material.Alert,{severity:"error",children:l})]})}),_jsxruntime.jsx.call(void 0, hi,{onLoginSuccess:o,open:x,onClose:S=>N(this,null,function*(){P(!1)}),payload:{target:m.contato,channel:e==="otp-email"?"email":"whatsapp"},credentialsConfig:r})]})}var zh={login:"Acesse sua conta",licensa:"Selecione a licen\xE7a","esqueci-senha":"Recupere a sua senha","otp-email":"Entrar com senha tempor\xE1ria (E-mail)","otp-whatsapp":"Entrar com senha tempor\xE1ria (WhatsApp)"};function yi(t){let{credentialsConfig:e,onLoginSuccess:r,onLoginFailed:o,onAlreadyLogged:n,appName:i}=t,[a,l]=_react.useState.call(void 0, ),{selecionarLicenca:s,isAuthenticated:u}=_hooks.useCredentials.call(void 0, e),[c,f]=_react.useState.call(void 0, "login"),m=_material.useTheme.call(void 0, ),p=_material.useMediaQuery.call(void 0, m.breakpoints.up("md"));_react.useEffect.call(void 0, ()=>{u&&n&&n()},[u]);function g(b){return N(this,null,function*(){console.log("LOGIN DATA",b);try{if(Array.isArray(b==null?void 0:b.empresas)){if((b==null?void 0:b.empresas.length)===1){let T=yield s(b==null?void 0:b.token,b.empresas[0].uuid);T&&r(T);return}f("licensa"),l(b);return}r(b)}catch(T){o(T)}})}function x(b){return N(this,null,function*(){o(b)})}function P(b){f(b)}function v(){f("login")}let S=zh[c];return _jsxruntime.jsxs.call(void 0, _material.Stack,{component:"section",width:p?"46%":"100%",minWidth:"420px",maxWidth:p?"614px":"initial",justifyContent:"center",alignItems:"center",padding:"2rem",children:[_jsxruntime.jsx.call(void 0, _material.Stack,{width:"100%",maxWidth:"28rem",margin:"auto 0",children:_jsxruntime.jsxs.call(void 0, _material.Stack,{children:[_jsxruntime.jsx.call(void 0, Gn,{label:i,subTitle:S}),_jsxruntime.jsxs.call(void 0, _material.Box,{sx:{marginTop:2},children:[c==="login"&&_jsxruntime.jsx.call(void 0, ci,{credentialsConfig:e,onLoginSuccess:g,onLoginFailed:x,onOptionsClick:P}),c==="licensa"&&_jsxruntime.jsx.call(void 0, di,{loginData:a,credentialsConfig:e,onLoginSuccess:r,onLoginFailed:o}),c==="esqueci-senha"&&_jsxruntime.jsx.call(void 0, fi,{onLoginClick:v,credentialsConfig:e}),c==="otp-email"&&_jsxruntime.jsx.call(void 0, Ao,{onLoginClick:v,onLoginSuccess:g,tipo:"otp-email",credentialsConfig:e}),c==="otp-whatsapp"&&_jsxruntime.jsx.call(void 0, Ao,{onLoginClick:v,onLoginSuccess:g,tipo:"otp-whatsapp",credentialsConfig:e})]})]})}),_jsxruntime.jsxs.call(void 0, _material.Stack,{direction:"row",alignItems:"center",marginBottom:-3,children:[_jsxruntime.jsx.call(void 0, "img",{width:"60",src:"https://datac-site-assets.s3.sa-east-1.amazonaws.com/logomarca.png"}),_jsxruntime.jsx.call(void 0, _material.Typography,{variant:"body1",component:"span",fontSize:"0.7rem",sx:{color:b=>b.palette.grey[500]},children:"Data C Sistemas"})]})]})}function bi(){let t=_material.useTheme.call(void 0, ),e=_material.useMediaQuery.call(void 0, t.breakpoints.up("md"));return _jsxruntime.jsx.call(void 0, _material.Stack,{component:"section",display:e?"flex":"none",width:"100%",direction:"row",justifyContent:"center",alignItems:"center",sx:{backgroundImage:"url(https://datac-site-assets.s3.sa-east-1.amazonaws.com/background_login.png)",backgroundSize:"cover",backgroundPosition:"right",backgroundRepeat:"no-repeat"},children:_jsxruntime.jsxs.call(void 0, _material.Stack,{padding:"2rem",children:[_jsxruntime.jsx.call(void 0, _material.Typography,{component:"h1",fontSize:"3.5rem",lineHeight:"4rem",fontWeight:"bold",color:"white",fontFamily:"Montserrat",letterSpacing:0,children:"Inova\xE7\xE3o e tecnologia"}),_jsxruntime.jsx.call(void 0, _material.Typography,{component:"h2",color:"white",fontSize:"2.5rem",lineHeight:"3rem",letterSpacing:0,fontWeight:"bold",fontFamily:"Montserrat",children:"para empresas de resultado"}),_jsxruntime.jsx.call(void 0, _material.Typography,{component:"span",fontSize:"1.25rem",lineHeight:"1.25rem",fontWeight:"300",letterSpacing:0,marginTop:"1.5rem",marginBottom:"3rem",fontFamily:"Montserrat",sx:{color:"rgb(68, 167, 255)"},children:"Mais de 25 anos de exist\xEAncia e muitas hist\xF3rias de sucesso."}),_jsxruntime.jsx.call(void 0, _material.Link,{href:"https://site.datac.com.br/services/",target:"_blank",children:_jsxruntime.jsxs.call(void 0, z,{component:"a",variant:"text",sx:{width:"fit-content",color:"rgb(255, 255, 255)",fontWeight:"400",fontSize:"0.875rem",lineHeight:"1.125rem",fontFamily:"Montserrat",backgroundColor:"rgb(22, 23, 101)",borderRadius:"30px",padding:"17px 48px",":hover":{backgroundColor:"rgb(255, 255, 255)",color:"rgb(22, 23, 101)"},alignItems:"center"},children:["Conhe\xE7a nossos produtos",_jsxruntime.jsx.call(void 0, _iconsmaterial.ArrowRight,{fontSize:"medium",sx:{color:r=>r.palette.success.light}})]})})]})})}function dl(t){let{banner:e}=t;return _jsxruntime.jsxs.call(void 0, _material.Stack,{component:"main",direction:"row",height:"100vh",children:[e?_jsxruntime.jsx.call(void 0, qn,{children:e}):_jsxruntime.jsx.call(void 0, bi,{}),_jsxruntime.jsx.call(void 0, yi,d({},t))]})}var Kh=_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"}})),Zh=t=>_jsxruntime.jsx.call(void 0, Kh,d({},t)),Oo=Zh;function Ci(t){let{menuItem:e,activeMenu:r,onMenuClick:o}=t,[n,i]=_react.useState.call(void 0, !1);if(!e.visible)return null;let a=!!(e!=null&&e.items&&(e==null?void 0:e.items.length)>0);function l(){i(!n)}return _jsxruntime.jsxs.call(void 0, _material.Box,{children:[_jsxruntime.jsxs.call(void 0, Oo,{onClick:()=>{if(e!=null&&e.link){o(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}),a&&!n&&_jsxruntime.jsx.call(void 0, _iconsmaterial.ExpandMore,{}),a&&n&&_jsxruntime.jsx.call(void 0, _iconsmaterial.ExpandLess,{})]}),(e==null?void 0:e.items)&&_jsxruntime.jsx.call(void 0, _material.Collapse,{in:n,timeout:"auto",unmountOnExit:!0,children:_jsxruntime.jsx.call(void 0, dt,{activeMenu:r,sx:{pl:s=>s.spacing(1.5)},menus:(e==null?void 0:e.items)||[],onMenuClick:o})})]})}function dt(t){let i=t,{menus:e,activeMenu:r,onMenuClick:o}=i,n=D(i,["menus","activeMenu","onMenuClick"]);return _jsxruntime.jsx.call(void 0, _material.List,C(d({component:"nav",disablePadding:!0},n),{children:e.map(a=>_jsxruntime.jsx.call(void 0, Ci,{onMenuClick:o,activeMenu:r,menuItem:a},a.id))}))}function Si(t){let{menus:e,activeMenu:r,onMenuClick:o}=t,[n,i]=_react.useState.call(void 0, null),a=(s,u,c)=>{i({element:s.currentTarget,id:u,items:c})},l=()=>{i(null)};return _jsxruntime.jsx.call(void 0, _material.List,{component:"nav",disablePadding:!0,children:e.map(s=>s.visible?_jsxruntime.jsxs.call(void 0, Oo,{onMouseEnter:u=>{s!=null&&s.link||a(u,s.id,s.items)},onMouseLeave:()=>{s!=null&&s.link||l()},onClick:()=>{s!=null&&s.link&&o(s.link)},selected:r===s.link,children:[_jsxruntime.jsx.call(void 0, _material.ListItemIcon,{children:_jsxruntime.jsx.call(void 0, _material.Icon,{children:s.icon})}),(n==null?void 0:n.id)===s.id&&_jsxruntime.jsx.call(void 0, _material.Popper,{sx:{zIndex:999999},anchorEl:n==null?void 0:n.element,open:!!(n!=null&&n.element),placement:"right-start",children:_jsxruntime.jsx.call(void 0, dt,{activeMenu:r,onMenuClick:o,menus:(s==null?void 0:s.items)||[],sx:{minWidth:"240px",backgroundColor:G.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-${s.id}`):null)})}var gl=(t,e)=>({width:t,transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.enteringScreen}),overflowX:"hidden"}),yl=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)`}}),hg=_styles.styled.call(void 0, _material.Drawer,{shouldForwardProp:t=>t!=="open"&&t!=="width"})(({theme:t,open:e,width:r})=>d(d({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&&C(d({},gl(r,t)),{"& .MuiDrawer-paper":gl(r,t)})),!e&&C(d({},yl(t)),{"& .MuiDrawer-paper":yl(t)})));function xl(t){let s=t,{open:e,items:r,width:o,activeMenu:n,onMenuClick:i,toggleMenu:a}=s,l=D(s,["open","items","width","activeMenu","onMenuClick","toggleMenu"]);return _jsxruntime.jsxs.call(void 0, hg,C(d({width:o,open:e,onClose:()=>a(!1)},l),{children:[_jsxruntime.jsx.call(void 0, _material.Toolbar,{}),e&&_jsxruntime.jsx.call(void 0, dt,{onMenuClick:i,activeMenu:n,menus:r}),!e&&_jsxruntime.jsx.call(void 0, Si,{onMenuClick:i,activeMenu:n,menus:r})]}))}function bl(t){return _jsxruntime.jsx.call(void 0, _material.Box,d({m:2,sx:{display:"flex",flexDirection:"column",flexGrow:1}},t))}var _Avatar = require('@mui/material/Avatar'); var _Avatar2 = _interopRequireDefault(_Avatar);function vl(t){let{user:e}=_providers.useUserContext.call(void 0, );return _jsxruntime.jsx.call(void 0, _Avatar2.default,d({src:e==null?void 0:e.avatarUrl,sx:{width:64,height:64,margin:"auto",mb:2}},t))}function Do(t){let i=t,{children:e,value:r,index:o}=i,n=D(i,["children","value","index"]);return r!==o?null:_jsxruntime.jsx.call(void 0, _material.Box,C(d({role:"tabpanel",hidden:r!==o,id:`scrollable-auto-tabpanel-${o}`,"aria-labelledby":`scrollable-auto-tab-${o}`,sx:{display:"flex",flexDirection:"column",flexGrow:1}},n),{children:r===o&&e}))}var _reacteasycrop = require('react-easy-crop'); var _reacteasycrop2 = _interopRequireDefault(_reacteasycrop);var _Slider = require('@mui/material/Slider'); var _Slider2 = _interopRequireDefault(_Slider);var _Button = require('@mui/material/Button'); var _Button2 = _interopRequireDefault(_Button);var _Dialog = require('@mui/material/Dialog'); var _Dialog2 = _interopRequireDefault(_Dialog);function Pi(t,e){return new Promise(r=>{let o=new Image;o.src=t,o.onload=()=>{let n=document.createElement("canvas");n.width=e.width,n.height=e.height;let i=n.getContext("2d");i&&(i.drawImage(o,e.x,e.y,e.width,e.height,0,0,e.width,e.height),r(n.toDataURL("image/jpeg")))}})}var Fg=({onSave:t,src:e})=>{let[r,o]=_react.useState.call(void 0, null),[n,i]=_react.useState.call(void 0, null),[a,l]=_react.useState.call(void 0, {x:0,y:0}),[s,u]=_react.useState.call(void 0, 1),[c,f]=_react.useState.call(void 0, null),[m,p]=_react.useState.call(void 0, !1),g=_react.useCallback.call(void 0, (v,S)=>{f(S)},[]);return _jsxruntime.jsxs.call(void 0, _material.Stack,{direction:"row",spacing:2,alignItems:"center",children:[n?_jsxruntime.jsx.call(void 0, _Avatar2.default,{src:n,alt:"Preview",sx:{width:64,height:64,margin:"auto",mb:2}}):_jsxruntime.jsx.call(void 0, _Avatar2.default,{src:e,sx:{width:64,height:64,margin:"auto",mb:2}}),_jsxruntime.jsxs.call(void 0, "label",{children:[_jsxruntime.jsx.call(void 0, "input",{type:"file",accept:"image/*",onChange:v=>{var T;let S=(T=v.target.files)==null?void 0:T[0];if(!S)return;let b=new FileReader;b.onload=()=>{o(b.result),p(!0)},b.readAsDataURL(S)},style:{display:"none"}}),_jsxruntime.jsx.call(void 0, _Button2.default,{variant:"contained",component:"span",children:"Alterar foto"})]}),_jsxruntime.jsxs.call(void 0, _Dialog2.default,{open:m,onClose:()=>p(!1),maxWidth:"sm",fullWidth:!0,children:[_jsxruntime.jsx.call(void 0, "div",{style:{position:"relative",height:400,background:"#333"},children:r&&_jsxruntime.jsx.call(void 0, _reacteasycrop2.default,{image:r,crop:a,zoom:s,aspect:1,cropShape:"round",showGrid:!1,onCropChange:l,onZoomChange:u,onCropComplete:g})}),_jsxruntime.jsxs.call(void 0, "div",{style:{padding:20},children:[_jsxruntime.jsx.call(void 0, _Slider2.default,{value:s,min:1,max:3,step:.1,onChange:(v,S)=>u(S)}),_jsxruntime.jsx.call(void 0, Se,{children:_jsxruntime.jsx.call(void 0, _Button2.default,{variant:"contained",onClick:()=>N(void 0,null,function*(){if(!r||!c)return;let v=yield Pi(r,c);i(v),p(!1),t&&t(v)}),children:"Salvar"})})]})]})]})},Tl=Fg;var Rg=Ce().shape({name:de().required("Informe o nome")});function ki(t){let{usuario:e,credentialsConfig:r,onUploadComplete:o}=t,{data:n,setData:i,handleChange:a,validate:l,validationErrors:s}=_hooks.useForm.call(void 0, e,Rg),[u,c]=_react.useState.call(void 0, !1),[f,m]=_react.useState.call(void 0, !1),[p,g]=_react.useState.call(void 0, !1),{uploadAvatar:x,atualizarUsuario:P}=_hooks.useCredentials.call(void 0, r);_react.useEffect.call(void 0, ()=>{i(e)},[e]),_react.useEffect.call(void 0, ()=>{p&&setTimeout(()=>{g(!1)},3e3)},[p]),_react.useEffect.call(void 0, ()=>{u&&setTimeout(()=>{c(!1)},3e3)},[u]);function v(){l(S=>N(this,null,function*(){try{m(!0),yield P(S),g(!0)}catch(b){c("Ocorreu um erro ao alterar os dados da conta")}finally{m(!1)}}))}return _jsxruntime.jsxs.call(void 0, _material.Stack,{spacing:2,children:[_jsxruntime.jsx.call(void 0, _material.Typography,{variant:"h6",children:"Avatar"}),_jsxruntime.jsx.call(void 0, Tl,{src:n==null?void 0:n.avatarUrl,onSave:S=>{try{x(S),o&&(g(!0),o(!0))}catch(b){c("Ocorreu um erro ao atualizar a foto de perfil"),o&&o(!1,b)}}}),_jsxruntime.jsx.call(void 0, _material.Divider,{}),_jsxruntime.jsx.call(void 0, _material.Typography,{variant:"h6",children:"Informa\xE7\xF5es da Conta"}),_jsxruntime.jsxs.call(void 0, _material.Grid2,{container:!0,spacing:1.5,children:[_jsxruntime.jsx.call(void 0, _material.Grid2,{size:{xl:4,lg:4,md:4,sm:12,xs:12},children:_jsxruntime.jsx.call(void 0, _material.TextField,{disabled:!0,fullWidth:!0,label:"E-mail",value:(n==null?void 0:n.email)||""})}),_jsxruntime.jsx.call(void 0, _material.Grid2,{size:{xl:4,lg:4,md:4,sm:12,xs:12},children:_jsxruntime.jsx.call(void 0, _material.TextField,d({name:"name",fullWidth:!0,label:"Nome",value:(n==null?void 0:n.name)||"",onChange:a},s("name")))}),_jsxruntime.jsx.call(void 0, _material.Grid2,{size:{xl:4,lg:4,md:4,sm:12,xs:12},children:_jsxruntime.jsx.call(void 0, _material.TextField,{name:"surname",fullWidth:!0,label:"Sobrenome",value:(n==null?void 0:n.surname)||"",onChange:a})})]}),_jsxruntime.jsx.call(void 0, _material.Grid2,{size:{xl:4,lg:4,md:4,sm:12,xs:12},children:_jsxruntime.jsx.call(void 0, Se,{children:_jsxruntime.jsx.call(void 0, z,{isLoading:f,onClick:()=>v(),variant:"contained",children:"Salvar"})})}),p&&_jsxruntime.jsx.call(void 0, _material.Alert,{children:"Dados da conta alterados com sucesso!"}),u&&_jsxruntime.jsx.call(void 0, _material.Alert,{severity:"error",children:u})]})}function Oi(t){var g,x,P;let{open:e,onClose:r,payload:o,onCodigoVerificado:n,credentialsConfig:i}=t,[a,l]=_react.useState.call(void 0, ""),[s,u]=_react.useState.call(void 0, !1),[c,f]=_react.useState.call(void 0, !1),{validarCodigoWhatsapp:m}=_hooks.useCredentials.call(void 0, i);_react.useEffect.call(void 0, ()=>{s&&setTimeout(()=>{u(!1)},3e3)},[s]);function p(){return N(this,null,function*(){try{f(!0);let v=yield m(a);n(v.data)}catch(v){u(v.response.data.message)}finally{f(!1)}})}return _jsxruntime.jsxs.call(void 0, U.Root,{open:e,onClose:v=>r(),maxWidth:"xs",children:[_jsxruntime.jsxs.call(void 0, U.Header,{children:[_jsxruntime.jsx.call(void 0, U.Title,{children:"Verifica\xE7\xE3o do seu n\xFAmero de WhatsApp"}),_jsxruntime.jsx.call(void 0, U.ActionClose,{onClose:r})]}),_jsxruntime.jsx.call(void 0, U.Content,{children:_jsxruntime.jsxs.call(void 0, _material.Stack,{spacing:2,justifyContent:"center",alignContent:"center",alignItems:"center",children:[_jsxruntime.jsx.call(void 0, _material.Typography,{variant:"subtitle1",sx:{fontWeight:"bolder",fontSize:"11pt"},children:"\u{1F510} Verifique seu n\xFAmero"}),_jsxruntime.jsxs.call(void 0, _material.Typography,{variant:"body1",sx:{fontSize:"10pt"},children:["Enviamos um c\xF3digo via WhatsApp para +55"," ",_jsxruntime.jsx.call(void 0, "b",{children:`(${(g=o==null?void 0:o.whatsappNumber)==null?void 0:g.slice(0,2)}) ${(x=o==null?void 0:o.whatsappNumber)==null?void 0:x.slice(2,7)}-${(P=o==null?void 0:o.whatsappNumber)==null?void 0:P.slice(7)}`}),". ",_jsxruntime.jsx.call(void 0, "br",{}),"Digite o c\xF3digo abaixo para confirmar que este n\xFAmero \xE9 seu."]}),_jsxruntime.jsx.call(void 0, ur,{value:a,onChange:v=>{l(v)}}),s&&_jsxruntime.jsx.call(void 0, _material.Alert,{sx:{flexGrow:1},severity:"error",children:s})]})}),_jsxruntime.jsx.call(void 0, U.Footer,{children:_jsxruntime.jsxs.call(void 0, U.Actions,{children:[_jsxruntime.jsx.call(void 0, U.ActionCancelar,{onClick:()=>r()}),_jsxruntime.jsx.call(void 0, U.ActionSalvar,{label:"Verificar",onClick:p,isLoading:c,disabled:a.length!=6})]})})]})}var lF=Ce().shape({whatsappNumber:de().required("Informe o n\xFAmero do whastapp").length(15)});function Ri(t){let{usuario:e,credentialsConfig:r,onWhastappSaved:o}=t,[n,i]=_react.useState.call(void 0, !1),[a,l]=_react.useState.call(void 0, !1),{data:s,setData:u,changeValue:c,validate:f,validationErrors:m}=_hooks.useForm.call(void 0, e),[p,g]=_react.useState.call(void 0, !1),[x,P]=_react.useState.call(void 0, !1),{atualizarUsuario:v,gerarWhatsappVerificationCode:S}=_hooks.useCredentials.call(void 0, r);_react.useEffect.call(void 0, ()=>{u(e)},[e]);function b(){f(F=>N(this,null,function*(){try{l(!0);let $=yield v(F);o&&o($.data)}catch($){}finally{l(!1)}}))}function T(){return N(this,null,function*(){try{g(!0);let F=yield S();P(!0)}catch(F){}finally{g(!1)}})}return _jsxruntime.jsxs.call(void 0, _material.Stack,{spacing:2,children:[_jsxruntime.jsx.call(void 0, _material.Typography,{variant:"h6",children:"Senha"}),_jsxruntime.jsx.call(void 0, z,{onClick:()=>{i(!0)},sx:{width:"200px"},fullWidth:!1,variant:"contained",children:"Alterar Senha"}),_jsxruntime.jsx.call(void 0, Rt,{isOpen:n,onClose:()=>N(this,null,function*(){return i(!1)}),credentialsConfig:r}),_jsxruntime.jsx.call(void 0, _material.Divider,{}),_jsxruntime.jsx.call(void 0, _material.Typography,{variant:"h6",children:"Login com Whastapp"}),_jsxruntime.jsxs.call(void 0, _material.Stack,{direction:"row",spacing:2,children:[_jsxruntime.jsx.call(void 0, lr,{disabled:!!(s!=null&&s.whatsappVerifiedAt),fullWidth:!1,name:"whatsappNumber",label:"Whastapp",value:s.whatsappNumber||"",onChange:F=>{c("whatsappNumber",F.target.value)}}),s.whatsappVerifiedAt&&_jsxruntime.jsxs.call(void 0, _material.Stack,{direction:"row",spacing:1,justifyContent:"center",alignItems:"center",children:[_jsxruntime.jsx.call(void 0, _iconsmaterial.Verified,{color:"success"}),_jsxruntime.jsx.call(void 0, _material.Typography,{variant:"body2",children:"N\xFAmero Verificado"})]}),s.whatsappNumber&&s.whatsappNumber.replace(/\D/g,"").length===11&&!s.whatsappVerifiedAt&&_jsxruntime.jsx.call(void 0, z,{isLoading:a,onClick:b,children:"Salvar Whatsapp"})]}),e.whatsappNumber&&e.whatsappNumber.replace(/\D/g,"").length===11&&!s.whatsappVerifiedAt&&_jsxruntime.jsx.call(void 0, _material.Alert,{severity:"warning",action:_jsxruntime.jsx.call(void 0, z,{isLoading:p,onClick:T,children:"Enviar n\xFAmero de verifica\xE7\xE3o"}),children:"O seu n\xFAmero de whatsapp ainda n\xE3o est\xE1 validado"}),_jsxruntime.jsx.call(void 0, Oi,{open:x,onClose:F=>N(this,null,function*(){P(!1)}),payload:e,credentialsConfig:r,onCodigoVerificado:F=>{u(F),P(!1)}})]})}function Fl(t){let[e,r]=_react.useState.call(void 0, 0),{user:o,setUser:n,credentialsConfig:i}=_providers.useUserContext.call(void 0, );return _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment,{children:_jsxruntime.jsxs.call(void 0, _material.Stack,{spacing:2,direction:"row",children:[_jsxruntime.jsx.call(void 0, _material.Stack,{sx:{width:"200px"},children:_jsxruntime.jsxs.call(void 0, _material.Tabs,{orientation:"vertical",value:e,onChange:(a,l)=>{r(l)},sx:{"& .MuiButtonBase-root":{alignItems:"flex-start"}},children:[_jsxruntime.jsx.call(void 0, _material.Tab,{label:"Minha Conta",value:0}),_jsxruntime.jsx.call(void 0, _material.Tab,{label:"Login e Seguran\xE7a",value:1})]})}),_jsxruntime.jsxs.call(void 0, _material.Stack,{sx:{flexGrow:1},children:[_jsxruntime.jsx.call(void 0, Do,{value:e,index:0,children:_jsxruntime.jsx.call(void 0, ki,{credentialsConfig:i,usuario:o||{}})}),_jsxruntime.jsx.call(void 0, Do,{value:e,index:1,children:_jsxruntime.jsx.call(void 0, Ri,{onWhastappSaved:a=>{n(a)},credentialsConfig:i,usuario:o||{}})})]})]})})}exports.AlterarSenha = Rt; exports.Avatar = vl; exports.Button = z; exports.ButtonContainer = Se; exports.Checkbox = Vi; exports.ColorsGrid = Wi; exports.Content = bl; exports.CurrencyCellStyle = wx; exports.CurrencyTextField = au; exports.DataTable = Gu; exports.DataTableOptions = Ho; exports.DeleteContainer = qo; exports.Dialog = Ne; exports.DialogV2 = U; exports.DrawerMenu = xl; exports.Editable = lo; exports.FilterContainer = Jo; exports.FilterControl = vr; exports.Flag = ca; exports.FormContainer = rn; exports.LabelValue = ds; exports.MioAuth = dl; exports.OptionStyles = Px; exports.PageTitle = bs; exports.PasswordTextField = ut; exports.Profile = Fl; exports.SearchTextField = Et; exports.Surface = yr; exports.Tooltip = gt; exports.Transporter = Un; exports.theme = G;
|
|
10
|
+
`+(l!==a?`result of cast: ${l}`:""))}return i}_cast(e,r){let o=e===void 0?e:this.transforms.reduce((n,i)=>i.call(this,n,e,this),e);return o===void 0&&(o=this.getDefault(r)),o}_validate(e,r={},o,n){let{path:i,originalValue:a=e,strict:l=this.spec.strict}=r,s=e;l||(s=this._cast(s,Object.assign({assert:!1},r)));let u=[];for(let c of Object.values(this.internalTests))c&&u.push(c);this.runTests({path:i,value:s,originalValue:a,options:r,tests:u},o,c=>{if(c.length)return n(c,s);this.runTests({path:i,value:s,originalValue:a,options:r,tests:this.tests},o,n)})}runTests(e,r,o){let n=!1,{tests:i,value:a,originalValue:l,path:s,options:u}=e,c=h=>{n||(n=!0,r(h,a))},f=h=>{n||(n=!0,o(h,a))},m=i.length,p=[];if(!m)return f([]);let y={value:a,originalValue:l,path:s,options:u,schema:this};for(let h=0;h<i.length;h++){let T=i[h];T(y,c,function(S){S&&(Array.isArray(S)?p.push(...S):p.push(S)),--m<=0&&f(p)})}}asNestedTest({key:e,index:r,parent:o,parentPath:n,originalParent:i,options:a}){let l=e!=null?e:r;if(l==null)throw TypeError("Must include `key` or `index` for nested validations");let s=typeof l=="number",u=o[l],c=Object.assign({},a,{strict:!0,parent:o,value:u,originalValue:i[l],key:void 0,[s?"index":"key"]:l,path:s||l.includes(".")?`${n||""}[${s?l:`"${l}"`}]`:(n?`${n}.`:"")+e});return(f,m,p)=>this.resolve(c)._validate(u,c,m,p)}validate(e,r){var o;let n=this.resolve(Object.assign({},r,{value:e})),i=(o=r==null?void 0:r.disableStackTrace)!=null?o:n.spec.disableStackTrace;return new Promise((a,l)=>n._validate(e,r,(s,u)=>{ce.isError(s)&&(s.value=u),l(s)},(s,u)=>{s.length?l(new ce(s,u,void 0,void 0,i)):a(u)}))}validateSync(e,r){var o;let n=this.resolve(Object.assign({},r,{value:e})),i,a=(o=r==null?void 0:r.disableStackTrace)!=null?o:n.spec.disableStackTrace;return n._validate(e,Object.assign({},r,{sync:!0}),(l,s)=>{throw ce.isError(l)&&(l.value=s),l},(l,s)=>{if(l.length)throw new ce(l,e,void 0,void 0,a);i=s}),i}isValid(e,r){return this.validate(e,r).then(()=>!0,o=>{if(ce.isError(o))return!1;throw o})}isValidSync(e,r){try{return this.validateSync(e,r),!0}catch(o){if(ce.isError(o))return!1;throw o}}_getDefault(e){let r=this.spec.default;return r==null?r:typeof r=="function"?r.call(this,e):Et(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 o=this.clone({nullable:e});return o.internalTests.nullable=wt({message:r,name:"nullable",test(n){return n===null?this.schema.spec.nullable:!0}}),o}optionality(e,r){let o=this.clone({optional:e});return o.internalTests.optionality=wt({message:r,name:"optionality",test(n){return n===void 0?this.schema.spec.optional:!0}}),o}optional(){return this.optionality(!0)}defined(e=Be.defined){return this.optionality(!1,e)}nullable(){return this.nullability(!0)}nonNullable(e=Be.notNull){return this.nullability(!1,e)}required(e=Be.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=Be.default),typeof r.test!="function")throw new TypeError("`test` is a required parameters");let o=this.clone(),n=wt(r),i=r.exclusive||r.name&&o.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&&(o.exclusiveTests[r.name]=!!r.exclusive),o.tests=o.tests.filter(a=>!(a.OPTIONS.name===r.name&&(i||a.OPTIONS.test===n.OPTIONS.test))),o.tests.push(n),o}when(e,r){!Array.isArray(e)&&typeof e!="string"&&(r=e,e=".");let o=this.clone(),n=Bs(e).map(i=>new We(i));return n.forEach(i=>{i.isSibling&&o.deps.push(i.key)}),o.conditions.push(typeof r=="function"?new At(n,r):At.fromOptions(n,r)),o}typeError(e){let r=this.clone();return r.internalTests.typeError=wt({message:e,name:"typeError",skipAbsent:!0,test(o){return this.schema._typeCheck(o)?!0:this.createError({params:{type:this.schema.type}})}}),r}oneOf(e,r=Be.oneOf){let o=this.clone();return e.forEach(n=>{o._whitelist.add(n),o._blacklist.delete(n)}),o.internalTests.whiteList=wt({message:r,name:"oneOf",skipAbsent:!0,test(n){let i=this.schema._whitelist,a=i.resolveAll(this.resolve);return a.includes(n)?!0:this.createError({params:{values:Array.from(i).join(", "),resolved:a}})}}),o}notOneOf(e,r=Be.notOneOf){let o=this.clone();return e.forEach(n=>{o._blacklist.add(n),o._whitelist.delete(n)}),o.internalTests.blacklist=wt({message:r,name:"notOneOf",test(n){let i=this.schema._blacklist,a=i.resolveAll(this.resolve);return a.includes(n)?this.createError({params:{values:Array.from(i).join(", "),resolved:a}}):!0}}),o}strip(e=!0){let r=this.clone();return r.spec.strip=e,r}describe(e){let r=(e?this.resolve(e):this).clone(),{label:o,meta:n,optional:i,nullable:a}=r.spec;return{meta:n,label:o,optional:i,nullable:a,default:r.getDefault(e),type:r.type,oneOf:r._whitelist.describe(),notOneOf:r._blacklist.describe(),tests:r.tests.map(s=>({name:s.OPTIONS.name,params:s.OPTIONS.params})).filter((s,u,c)=>c.findIndex(f=>f.name===s.name)===u)}}};ae.prototype.__isYupSchema__=!0;for(let t of["validate","validateSync"])ae.prototype[`${t}At`]=function(e,r,o={}){let{parent:n,parentPath:i,schema:a}=Md(this,e,r,o.context);return a[t](n&&n[i],Object.assign({},o,{parent:n,path:e}))};for(let t of["equals","is"])ae.prototype[t]=ae.prototype.oneOf;for(let t of["not","nope"])ae.prototype[t]=ae.prototype.notOneOf;var Rd=()=>!0;function Bd(t){return new mo(t)}var mo=class extends ae{constructor(e){super(typeof e=="function"?{type:"mixed",check:e}:Object.assign({type:"mixed",check:Rd},e))}};Bd.prototype=mo.prototype;function Id(){return new ho}var ho=class extends ae{constructor(){super({type:"boolean",check(e){return e instanceof Boolean&&(e=e.valueOf()),typeof e=="boolean"}}),this.withMutation(()=>{this.transform((e,r,o)=>{if(o.spec.coerce&&!o.isType(e)){if(/^(true|1)$/i.test(String(e)))return!0;if(/^(false|0)$/i.test(String(e)))return!1}return e})})}isTrue(e=Qn.isValue){return this.test({message:e,name:"is-value",exclusive:!0,params:{value:"true"},test(r){return ke(r)||r===!0}})}isFalse(e=Qn.isValue){return this.test({message:e,name:"is-value",exclusive:!0,params:{value:"false"},test(r){return ke(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)}};Id.prototype=ho.prototype;var $d=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function Ld(t){let e=Xn(t);if(!e)return Date.parse?Date.parse(t):Number.NaN;if(e.z===void 0&&e.plusMinus===void 0)return new Date(e.year,e.month,e.day,e.hour,e.minute,e.second,e.millisecond).valueOf();let r=0;return e.z!=="Z"&&e.plusMinus!==void 0&&(r=e.hourOffset*60+e.minuteOffset,e.plusMinus==="+"&&(r=0-r)),Date.UTC(e.year,e.month,e.day,e.hour,e.minute+r,e.second,e.millisecond)}function Xn(t){var e,r;let o=$d.exec(t);return o?{year:Ve(o[1]),month:Ve(o[2],1)-1,day:Ve(o[3],1),hour:Ve(o[4]),minute:Ve(o[5]),second:Ve(o[6]),millisecond:o[7]?Ve(o[7].substring(0,3)):0,precision:(e=(r=o[7])==null?void 0:r.length)!=null?e:void 0,z:o[8]||void 0,plusMinus:o[9]||void 0,hourOffset:Ve(o[10]),minuteOffset:Ve(o[11])}:null}function Ve(t,e=0){return Number(t)||e}var Nd=/^[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])?)*$/,zd=/^((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,Vd=/^(?:[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,jd="^\\d{4}-\\d{2}-\\d{2}",Wd="\\d{2}:\\d{2}:\\d{2}",Ud="(([+-]\\d{2}(:?\\d{2})?)|Z)",qd=new RegExp(`${jd}T${Wd}(\\.\\d+)?${Ud}$`),Gd=t=>ke(t)||t===t.trim(),Yd={}.toString();function fe(){return new go}var go=class extends ae{constructor(){super({type:"string",check(e){return e instanceof String&&(e=e.valueOf()),typeof e=="string"}}),this.withMutation(()=>{this.transform((e,r,o)=>{if(!o.spec.coerce||o.isType(e)||Array.isArray(e))return e;let n=e!=null&&e.toString?e.toString():e;return n===Yd?e:n})})}required(e){return super.required(e).withMutation(r=>r.test({message:e||Be.required,name:"required",skipAbsent:!0,test:o=>!!o.length}))}notRequired(){return super.notRequired().withMutation(e=>(e.tests=e.tests.filter(r=>r.OPTIONS.name!=="required"),e))}length(e,r=he.length){return this.test({message:r,name:"length",exclusive:!0,params:{length:e},skipAbsent:!0,test(o){return o.length===this.resolve(e)}})}min(e,r=he.min){return this.test({message:r,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(o){return o.length>=this.resolve(e)}})}max(e,r=he.max){return this.test({name:"max",exclusive:!0,message:r,params:{max:e},skipAbsent:!0,test(o){return o.length<=this.resolve(e)}})}matches(e,r){let o=!1,n,i;return r&&(typeof r=="object"?{excludeEmptyString:o=!1,message:n,name:i}=r:n=r),this.test({name:i||"matches",message:n||he.matches,params:{regex:e},skipAbsent:!0,test:a=>a===""&&o||a.search(e)!==-1})}email(e=he.email){return this.matches(Nd,{name:"email",message:e,excludeEmptyString:!0})}url(e=he.url){return this.matches(zd,{name:"url",message:e,excludeEmptyString:!0})}uuid(e=he.uuid){return this.matches(Vd,{name:"uuid",message:e,excludeEmptyString:!1})}datetime(e){let r="",o,n;return e&&(typeof e=="object"?{message:r="",allowOffset:o=!1,precision:n=void 0}=e:r=e),this.matches(qd,{name:"datetime",message:r||he.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:r||he.datetime_offset,params:{allowOffset:o},skipAbsent:!0,test:i=>{if(!i||o)return!0;let a=Xn(i);return a?!!a.z:!1}}).test({name:"datetime_precision",message:r||he.datetime_precision,params:{precision:n},skipAbsent:!0,test:i=>{if(!i||n==null)return!0;let a=Xn(i);return a?a.precision===n:!1}})}ensure(){return this.default("").transform(e=>e===null?"":e)}trim(e=he.trim){return this.transform(r=>r!=null?r.trim():r).test({message:e,name:"trim",test:Gd})}lowercase(e=he.lowercase){return this.transform(r=>ke(r)?r:r.toLowerCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>ke(r)||r===r.toLowerCase()})}uppercase(e=he.uppercase){return this.transform(r=>ke(r)?r:r.toUpperCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>ke(r)||r===r.toUpperCase()})}};fe.prototype=go.prototype;var Hd=t=>t!=+t;function Kd(){return new yo}var yo=class extends ae{constructor(){super({type:"number",check(e){return e instanceof Number&&(e=e.valueOf()),typeof e=="number"&&!Hd(e)}}),this.withMutation(()=>{this.transform((e,r,o)=>{if(!o.spec.coerce)return e;let n=e;if(typeof n=="string"){if(n=n.replace(/\s/g,""),n==="")return NaN;n=+n}return o.isType(n)||n===null?n:parseFloat(n)})})}min(e,r=Je.min){return this.test({message:r,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(o){return o>=this.resolve(e)}})}max(e,r=Je.max){return this.test({message:r,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(o){return o<=this.resolve(e)}})}lessThan(e,r=Je.lessThan){return this.test({message:r,name:"max",exclusive:!0,params:{less:e},skipAbsent:!0,test(o){return o<this.resolve(e)}})}moreThan(e,r=Je.moreThan){return this.test({message:r,name:"min",exclusive:!0,params:{more:e},skipAbsent:!0,test(o){return o>this.resolve(e)}})}positive(e=Je.positive){return this.moreThan(0,e)}negative(e=Je.negative){return this.lessThan(0,e)}integer(e=Je.integer){return this.test({name:"integer",message:e,skipAbsent:!0,test:r=>Number.isInteger(r)})}truncate(){return this.transform(e=>ke(e)?e:e|0)}round(e){var r;let o=["ceil","floor","round","trunc"];if(e=((r=e)==null?void 0:r.toLowerCase())||"round",e==="trunc")return this.truncate();if(o.indexOf(e.toLowerCase())===-1)throw new TypeError("Only valid options for round() are: "+o.join(", "));return this.transform(n=>ke(n)?n:Math[e](n))}};Kd.prototype=yo.prototype;var zs=new Date(""),Zd=t=>Object.prototype.toString.call(t)==="[object Date]";function Vs(){return new st}var st=class extends ae{constructor(){super({type:"date",check(e){return Zd(e)&&!isNaN(e.getTime())}}),this.withMutation(()=>{this.transform((e,r,o)=>!o.spec.coerce||o.isType(e)||e===null?e:(e=Ld(e),isNaN(e)?st.INVALID_DATE:new Date(e)))})}prepareParam(e,r){let o;if(We.isRef(e))o=e;else{let n=this.cast(e);if(!this._typeCheck(n))throw new TypeError(`\`${r}\` must be a Date or a value that can be \`cast()\` to a Date`);o=n}return o}min(e,r=Zn.min){let o=this.prepareParam(e,"min");return this.test({message:r,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(n){return n>=this.resolve(o)}})}max(e,r=Zn.max){let o=this.prepareParam(e,"max");return this.test({message:r,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(n){return n<=this.resolve(o)}})}};st.INVALID_DATE=zs;Vs.prototype=st.prototype;Vs.INVALID_DATE=zs;function Qd(t,e=[]){let r=[],o=new Set,n=new Set(e.map(([a,l])=>`${a}-${l}`));function i(a,l){let s=(0,Ee.split)(a)[0];o.add(s),n.has(`${l}-${s}`)||r.push([l,s])}for(let a of Object.keys(t)){let l=t[a];o.add(a),We.isRef(l)&&l.isSibling?i(l.path,a):Co(l)&&"deps"in l&&l.deps.forEach(s=>i(s,a))}return Rs.default.array(Array.from(o),r).reverse()}function Ds(t,e){let r=1/0;return t.some((o,n)=>{var i;if((i=e.path)!=null&&i.includes(o))return r=n,!0}),r}function js(t){return(e,r)=>Ds(t,e)-Ds(t,r)}var Ws=(t,e,r)=>{if(typeof t!="string")return t;let o=t;try{o=JSON.parse(t)}catch(n){}return r.isType(o)?o:t};function fo(t){if("fields"in t){let e={};for(let[r,o]of Object.entries(t.fields))e[r]=fo(o);return t.setFields(e)}if(t.type==="array"){let e=t.optional();return e.innerType&&(e.innerType=fo(e.innerType)),e}return t.type==="tuple"?t.optional().clone({types:t.spec.types.map(fo)}):"optional"in t?t.optional():t}var Xd=(t,e)=>{let r=[...(0,Ee.normalizePath)(e)];if(r.length===1)return r[0]in t;let o=r.pop(),n=(0,Ee.getter)((0,Ee.join)(r),!0)(t);return!!(n&&o in n)},_s=t=>Object.prototype.toString.call(t)==="[object Object]";function Ms(t,e){let r=Object.keys(t.fields);return Object.keys(e).filter(o=>r.indexOf(o)===-1)}var Jd=js([]);function ve(t){return new xo(t)}var xo=class extends ae{constructor(e){super({type:"object",check(r){return _s(r)||typeof r=="function"}}),this.fields=Object.create(null),this._sortErrors=Jd,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{e&&this.shape(e)})}_cast(e,r={}){var o;let n=super._cast(e,r);if(n===void 0)return this.getDefault(r);if(!this._typeCheck(n))return n;let i=this.fields,a=(o=r.stripUnknown)!=null?o:this.spec.noUnknown,l=[].concat(this._nodes,Object.keys(n).filter(f=>!this._nodes.includes(f))),s={},u=Object.assign({},r,{parent:s,__validating:r.__validating||!1}),c=!1;for(let f of l){let m=i[f],p=f in n;if(m){let y,h=n[f];u.path=(r.path?`${r.path}.`:"")+f,m=m.resolve({value:h,context:r.context,parent:s});let T=m instanceof ae?m.spec:void 0,v=T==null?void 0:T.strict;if(T!=null&&T.strip){c=c||f in n;continue}y=!r.__validating||!v?m.cast(n[f],u):n[f],y!==void 0&&(s[f]=y)}else p&&!a&&(s[f]=n[f]);(p!==f in s||s[f]!==n[f])&&(c=!0)}return c?s:n}_validate(e,r={},o,n){let{from:i=[],originalValue:a=e,recursive:l=this.spec.recursive}=r;r.from=[{schema:this,value:a},...i],r.__validating=!0,r.originalValue=a,super._validate(e,r,o,(s,u)=>{if(!l||!_s(u)){n(s,u);return}a=a||u;let c=[];for(let f of this._nodes){let m=this.fields[f];!m||We.isRef(m)||c.push(m.asNestedTest({options:r,key:f,parent:u,parentPath:r.path,originalParent:a}))}this.runTests({tests:c,value:u,originalValue:a,options:r},o,f=>{n(f.sort(this._sortErrors).concat(s),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),o=r.fields;for(let[n,i]of Object.entries(this.fields)){let a=o[n];o[n]=a===void 0?i:a}return r.withMutation(n=>n.setFields(o,[...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(o=>{var n;let i=this.fields[o],a=e;(n=a)!=null&&n.value&&(a=Object.assign({},a,{parent:a.value,value:a.value[o]})),r[o]=i&&"getDefault"in i?i.getDefault(a):void 0}),r}setFields(e,r){let o=this.clone();return o.fields=e,o._nodes=Qd(e,r),o._sortErrors=js(Object.keys(e)),r&&(o._excludedEdges=r),o}shape(e,r=[]){return this.clone().withMutation(o=>{let n=o._excludedEdges;return r.length&&(Array.isArray(r[0])||(r=[r]),n=[...o._excludedEdges,...r]),o.setFields(Object.assign(o.fields,e),n)})}partial(){let e={};for(let[r,o]of Object.entries(this.fields))e[r]="optional"in o&&o.optional instanceof Function?o.optional():o;return this.setFields(e)}deepPartial(){return fo(this)}pick(e){let r={};for(let o of e)this.fields[o]&&(r[o]=this.fields[o]);return this.setFields(r,this._excludedEdges.filter(([o,n])=>e.includes(o)&&e.includes(n)))}omit(e){let r=[];for(let o of Object.keys(this.fields))e.includes(o)||r.push(o);return this.pick(r)}from(e,r,o){let n=(0,Ee.getter)(e,!0);return this.transform(i=>{if(!i)return i;let a=i;return Xd(i,e)&&(a=Object.assign({},i),o||delete a[e],a[r]=n(i)),a})}json(){return this.transform(Ws)}exact(e){return this.test({name:"exact",exclusive:!0,message:e||uo.exact,test(r){if(r==null)return!0;let o=Ms(this.schema,r);return o.length===0||this.createError({params:{properties:o.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(e=!0,r=uo.noUnknown){typeof e!="boolean"&&(r=e,e=!0);let o=this.test({name:"noUnknown",exclusive:!0,message:r,test(n){if(n==null)return!0;let i=Ms(this.schema,n);return!e||i.length===0||this.createError({params:{unknown:i.join(", ")}})}});return o.spec.noUnknown=e,o}unknown(e=!0,r=uo.noUnknown){return this.noUnknown(!e,r)}transformKeys(e){return this.transform(r=>{if(!r)return r;let o={};for(let n of Object.keys(r))o[e(n)]=r[n];return o})}camelCase(){return this.transformKeys(Kt.camelCase)}snakeCase(){return this.transformKeys(Kt.snakeCase)}constantCase(){return this.transformKeys(e=>(0,Kt.snakeCase)(e).toUpperCase())}describe(e){let r=(e?this.resolve(e):this).clone(),o=super.describe(e);o.fields={};for(let[i,a]of Object.entries(r.fields)){var n;let l=e;(n=l)!=null&&n.value&&(l=Object.assign({},l,{parent:l.value,value:l.value[i]})),o.fields[i]=a.describe(l)}return o}};ve.prototype=xo.prototype;function em(t){return new bo(t)}var bo=class extends ae{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 o=super._cast(e,r);if(!this._typeCheck(o)||!this.innerType)return o;let n=!1,i=o.map((a,l)=>{let s=this.innerType.cast(a,Object.assign({},r,{path:`${r.path||""}[${l}]`}));return s!==a&&(n=!0),s});return n?i:o}_validate(e,r={},o,n){var i;let a=this.innerType,l=(i=r.recursive)!=null?i:this.spec.recursive;r.originalValue!=null&&r.originalValue,super._validate(e,r,o,(s,u)=>{var c;if(!l||!a||!this._typeCheck(u)){n(s,u);return}let f=new Array(u.length);for(let p=0;p<u.length;p++){var m;f[p]=a.asNestedTest({options:r,index:p,parent:u,parentPath:r.path,originalParent:(m=r.originalValue)!=null?m:e})}this.runTests({value:u,tests:f,originalValue:(c=r.originalValue)!=null?c:e,options:r},o,p=>n(p.concat(s),u))})}clone(e){let r=super.clone(e);return r.innerType=this.innerType,r}json(){return this.transform(Ws)}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(!Co(e))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+je(e));return r.innerType=e,r.spec=Object.assign({},r.spec,{types:e}),r}length(e,r=co.length){return this.test({message:r,name:"length",exclusive:!0,params:{length:e},skipAbsent:!0,test(o){return o.length===this.resolve(e)}})}min(e,r){return r=r||co.min,this.test({message:r,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(o){return o.length>=this.resolve(e)}})}max(e,r){return r=r||co.max,this.test({message:r,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(o){return o.length<=this.resolve(e)}})}ensure(){return this.default(()=>[]).transform((e,r)=>this._typeCheck(e)?e:r==null?[]:[].concat(r))}compact(e){let r=e?(o,n,i)=>!e(o,n,i):o=>!!o;return this.transform(o=>o!=null?o.filter(r):o)}describe(e){let r=(e?this.resolve(e):this).clone(),o=super.describe(e);if(r.innerType){var n;let i=e;(n=i)!=null&&n.value&&(i=Object.assign({},i,{parent:i.value,value:i.value[0]})),o.innerType=r.innerType.describe(i)}return o}};em.prototype=bo.prototype;function tm(t){return new vo(t)}var vo=class extends ae{constructor(e){super({type:"tuple",spec:{types:e},check(r){let o=this.spec.types;return Array.isArray(r)&&r.length===o.length}}),this.withMutation(()=>{this.typeError(Ns.notType)})}_cast(e,r){let{types:o}=this.spec,n=super._cast(e,r);if(!this._typeCheck(n))return n;let i=!1,a=o.map((l,s)=>{let u=l.cast(n[s],Object.assign({},r,{path:`${r.path||""}[${s}]`}));return u!==n[s]&&(i=!0),u});return i?a:n}_validate(e,r={},o,n){let i=this.spec.types;super._validate(e,r,o,(a,l)=>{var s;if(!this._typeCheck(l)){n(a,l);return}let u=[];for(let[f,m]of i.entries()){var c;u[f]=m.asNestedTest({options:r,index:f,parent:l,parentPath:r.path,originalParent:(c=r.originalValue)!=null?c:e})}this.runTests({value:l,tests:u,originalValue:(s=r.originalValue)!=null?s:e,options:r},o,f=>n(f.concat(a),l))})}describe(e){let r=(e?this.resolve(e):this).clone(),o=super.describe(e);return o.innerType=r.spec.types.map((n,i)=>{var a;let l=e;return(a=l)!=null&&a.value&&(l=Object.assign({},l,{parent:l.value,value:l.value[i]})),n.describe(l)}),o}};tm.prototype=vo.prototype;var _isStrongPassword = require('validator/lib/isStrongPassword'); var _isStrongPassword2 = _interopRequireDefault(_isStrongPassword);function lt(t){let{name:e,label:r,value:o,onChange:n,onKeyDown:i}=t,[a,l]=_react.useState.call(void 0, !1);function s(){l(!a)}return _jsxruntime.jsx.call(void 0, _material.TextField,{name:e,label:r,value:o||"",onChange:n,onKeyDown:i,type:a?"text":"password",InputProps:{endAdornment:_jsxruntime.jsx.call(void 0, _material.InputAdornment,{position:"end",children:_jsxruntime.jsx.call(void 0, _material.IconButton,{tabIndex:-1,onClick:s,edge:"end",children:a?_jsxruntime.jsx.call(void 0, _iconsmaterial.VisibilityOff,{}):_jsxruntime.jsx.call(void 0, _iconsmaterial.Visibility,{})})})}})}var pm=_react.forwardRef.call(void 0, function(e,r){return _jsxruntime.jsx.call(void 0, _material.Slide,d({direction:"up",ref:r},e))});function Qt(n){var i=n,{children:t,height:e,fullWidth:r=!0}=i,o=F(i,["children","height","fullWidth"]);return _jsxruntime.jsx.call(void 0, _material.Dialog,C(d({disableRestoreFocus:!0,fullWidth:r,TransitionComponent:pm,sx:d({"& .MuiBackdrop-root":{backgroundColor:"#6464648F"}},o==null?void 0:o.sx),PaperProps:{style:{height:e,overflow:"hidden",position:"absolute",top:"51px",margin:0}}},o),{children:_jsxruntime.jsx.call(void 0, _material.Stack,{height:"100%",position:"relative",overflow:"auto",children:t})}))}var _useDialogs = require('@toolpad/core/useDialogs');function ei({children:t}){return _jsxruntime.jsx.call(void 0, _useDialogs.DialogsProvider,{children:t})}function ti(t){let a=t,{dialogComponent:e,payload:r,label:o}=a,n=F(a,["dialogComponent","payload","label"]),i=_useDialogs.useDialogs.call(void 0, );return _jsxruntime.jsx.call(void 0, _material.Button,C(d({variant:"contained",onClick:()=>{i.open(e,r)}},n),{children:o||" Adicionar"}))}function Xt(t){let e=_material.useTheme.call(void 0, );return _jsxruntime.jsx.call(void 0, _material.Stack,d({component:"header",height:"44px",position:"absolute",direction:"row",top:0,left:0,right:0,display:"flex",alignItems:"center",padding:"16px",borderBottom:`solid 1px ${e.palette.grey[300]}`},t))}function Jt(t){let e=_material.useTheme.call(void 0, );return _jsxruntime.jsx.call(void 0, _material.Typography,d({component:"h2",variant:"button",sx:{fontSize:"14px",color:e.palette.grey[500],whiteSpace:"nowrap"}},t))}function er({onClose:t}){return _jsxruntime.jsx.call(void 0, _material.IconButton,{onClick:()=>t(),sx:{position:"absolute",right:"11px"},children:_jsxruntime.jsx.call(void 0, _iconsmaterial.Close,{})})}function tr(r){var o=r,{children:t}=o,e=F(o,["children"]);return _jsxruntime.jsx.call(void 0, _material.Stack,{component:"main",margin:"44px 0 55.75px",overflow:"auto",children:_jsxruntime.jsx.call(void 0, _material.Stack,C(d({padding:"16px"},e),{children:t}))})}function rr(t){let e=_material.useTheme.call(void 0, );return _jsxruntime.jsx.call(void 0, _material.Stack,d({component:"footer",position:"absolute",direction:"row",alignItems:"center",bottom:0,left:0,right:0,padding:"8px 16px",borderTop:`solid 1px ${e.palette.grey[300]}`,height:"48px",sx:{backgroundColor:e.palette.background.paper}},t))}function or(t){return _jsxruntime.jsx.call(void 0, _material.Stack,d({direction:"row",alignItems:"center",gap:1,marginLeft:"auto"},t))}function ri(r){var o=r,{children:t}=o,e=F(o,["children"]);return _jsxruntime.jsx.call(void 0, N,C(d({variant:"outlined",color:"error"},e),{children:"Cancelar"}))}function oi(o){var n=o,{children:t,label:e}=n,r=F(n,["children","label"]);return _jsxruntime.jsx.call(void 0, N,C(d({variant:"contained"},r),{children:e||"Salvar"}))}function ii({open:t,onClose:e,payload:r}){let{useRemover:o,identificador:n}=r,{mutateAsync:i,isLoading:a}=o();function l(){return L(this,null,function*(){try{yield i(n),e()}catch(s){}})}return _jsxruntime.jsxs.call(void 0, Qt,{open:t,onClose:e,children:[_jsxruntime.jsxs.call(void 0, Xt,{children:[_jsxruntime.jsx.call(void 0, Jt,{children:"Tem certeza de que deseja excluir este registro?"}),_jsxruntime.jsx.call(void 0, er,{onClose:e})]}),_jsxruntime.jsx.call(void 0, tr,{children:_jsxruntime.jsx.call(void 0, _material.Alert,{severity:"error",children:"O registro ser\xE1 removido permanentemente. Deseja continuar?"})}),_jsxruntime.jsx.call(void 0, rr,{children:_jsxruntime.jsxs.call(void 0, or,{children:[_jsxruntime.jsx.call(void 0, N,{onClick:()=>e(),sx:{minWidth:"100px"},children:"Manter registro"}),_jsxruntime.jsx.call(void 0, N,{color:"error",variant:"contained",isLoading:a,onClick:l,sx:{minWidth:"100px"},children:"Remover"})]})})]})}var Rm={Root:Qt,Provider:ei,AdicionarButton:ti,Header:Xt,Title:Jt,ActionClose:er,Content:tr,Footer:rr,Actions:or,ActionCancelar:ri,ActionSalvar:oi,ConfirmDelete:ii},j= exports.DialogV2 =Rm;function ct(t){let{isValid:e,message:r}=t,o=_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?o.palette.success.main:"inherit",textDecoration:e?"line-through":"none",ml:1,fontSize:"10pt"},children:r})]})}var Qs={senhaAtual:"",senhaNova:""},qm=ve().shape({senhaAtual:fe().required("Informe a Senha Atual."),senhaNova:fe().required("Informe a Nova Senha.")});function _t(t){let{isOpen:e,credentialsConfig:r,onClose:o,onSuccess:n,onFailed:i,primeiroAcesso:a,senhaAtual:l,email:s}=t,{alterarSenha:u,isSubmitting:c}=_hooks.useCredentials.call(void 0, r),{setValidationErrors:f,validationProps:m}=_hooks.useValidations.call(void 0, ),{data:p,handleChange:y,setData:h,changeValue:T}=_hooks.useForm.call(void 0, Qs),[v,S]=_react.useState.call(void 0, !1),[b,P]=_react.useState.call(void 0, null);_react.useEffect.call(void 0, ()=>{l&&T("senhaAtual",l)},[l]),_react.useEffect.call(void 0, ()=>{p.senhaNova&&S(_isStrongPassword2.default.call(void 0, p.senhaNova,{minLength:8,minLowercase:1,minUppercase:1,minNumbers:1,minSymbols:1}))},[p.senhaNova]);function D(){return L(this,null,function*(){f(null),P(null),qm.validate(p,{abortEarly:!1}).then(()=>L(this,null,function*(){var g;let{senhaAtual:O,senhaNova:R}=p;try{(yield u(O,R,s))&&(n&&n(),h(Qs))}catch(x){if(i&&i(x),_axios.isAxiosError.call(void 0, x)){P((g=x.response)==null?void 0:g.data.message);return}P("Ocorreu um erro ao tentar alterar a senha")}})).catch(O=>{f(O)})})}function I(){return(p==null?void 0:p.senhaNova.length)>=8}function M(){if(p!=null&&p.senhaNova){let O=p==null?void 0:p.senhaNova.match(/[a-z]/g);return Array.isArray(O)&&O.length>0}return!1}function te(){if(p!=null&&p.senhaNova){let O=p==null?void 0:p.senhaNova.match(/[A-Z]/g);return Array.isArray(O)&&O.length>0}return!1}function Y(){if(p!=null&&p.senhaNova){let O=p==null?void 0:p.senhaNova.match(/\d/g);return Array.isArray(O)&&O.length>0}return!1}function oe(){if(p!=null&&p.senhaNova){let O=p==null?void 0:p.senhaNova.match(/\W/g);return Array.isArray(O)&&O.length>0}return!1}return _jsxruntime.jsxs.call(void 0, j.Root,{open:e,onClose:O=>o(),maxWidth:"md",children:[_jsxruntime.jsxs.call(void 0, j.Header,{children:[_jsxruntime.jsx.call(void 0, j.Title,{children:"Alterar Senha"}),_jsxruntime.jsx.call(void 0, j.ActionClose,{onClose:o})]}),_jsxruntime.jsx.call(void 0, j.Content,{children:_jsxruntime.jsxs.call(void 0, _material.Grid2,{container:!0,spacing:2,children:[a&&_jsxruntime.jsx.call(void 0, _material.Grid2,{size: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.Grid2,{size:12,children:_jsxruntime.jsx.call(void 0, lt,d({name:"senhaAtual",label:"Senha Atual",value:(p==null?void 0:p.senhaAtual)||"",onChange:y},m("senhaAtual")))}),_jsxruntime.jsx.call(void 0, _material.Grid2,{size:12,children:_jsxruntime.jsx.call(void 0, lt,d({name:"senhaNova",label:"Nova Senha",value:(p==null?void 0:p.senhaNova)||"",onChange:y},m("senhaNova")))}),_jsxruntime.jsxs.call(void 0, _material.Grid2,{size:12,children:[_jsxruntime.jsx.call(void 0, ct,{isValid:I(),message:"O tamanho m\xEDnimo da nova senha \xE9 de 8 caracteres"}),_jsxruntime.jsx.call(void 0, ct,{isValid:M(),message:"A nova senha deve ter ao menos uma letra min\xFAscula"}),_jsxruntime.jsx.call(void 0, ct,{isValid:te(),message:"A nova senha deve ter ao menos uma letra mai\xFAscula"}),_jsxruntime.jsx.call(void 0, ct,{isValid:Y(),message:"A nova senha deve ter ao menos um n\xFAmero"}),_jsxruntime.jsx.call(void 0, ct,{isValid:oe(),message:"A nova senha deve ter ao menos um caracter especial"})]}),b&&_jsxruntime.jsx.call(void 0, _material.Grid2,{size:12,children:_jsxruntime.jsx.call(void 0, _material.Alert,{severity:"error",children:b})})]})}),_jsxruntime.jsx.call(void 0, j.Footer,{children:_jsxruntime.jsxs.call(void 0, j.Actions,{children:[_jsxruntime.jsx.call(void 0, j.ActionCancelar,{onClick:()=>o()}),_jsxruntime.jsx.call(void 0, j.ActionSalvar,{label:"Alterar Senha",onClick:D,isLoading:c,disabled:!v})]})})]})}var Jm=ve().shape({email:fe().required("Informe o e-mail"),password:fe().required("Informe a senha")});function ai(t){let{onLoginSuccess:e,onLoginFailed:r,onOptionsClick:o,credentialsConfig:n}=t,[i,a]=_react.useState.call(void 0, ""),[l,s]=_react.useState.call(void 0, ""),[u,c]=_react.useState.call(void 0, !1),[f,m]=_react.useState.call(void 0, !1),[p,y]=_react.useState.call(void 0, !1),[h,T]=_react.useState.call(void 0, null),{login:v}=_hooks.useCredentials.call(void 0, n),{validationProps:S,setValidationErrors:b}=_hooks.useValidations.call(void 0, );function P(){return L(this,null,function*(){b(null),T(null),Jm.validate({email:i,password:l},{abortEarly:!1}).then(()=>L(this,null,function*(){var D,I;c(!0);try{let M=yield v(i,l);M&&e(M)}catch(M){if(_axios.isAxiosError.call(void 0, M)){if(((D=M.response)==null?void 0:D.data.code)==="E_FIRST_ACCESS"){m(!0);return}T((I=M.response)==null?void 0:I.data.message)}r(M)}})).catch(D=>{b(D)}).finally(()=>{c(!1)})})}return _jsxruntime.jsxs.call(void 0, _material.Stack,{component:"form",onSubmit:P,children:[_jsxruntime.jsxs.call(void 0, _material.Stack,{spacing:2,children:[_jsxruntime.jsx.call(void 0, _material.TextField,d({name:"email",label:"E-mail",margin:"normal",autoFocus:!0,value:i||"",onChange:D=>a(D.target.value)},S("email"))),_jsxruntime.jsx.call(void 0, lt,d({name:"password",label:"Senha",size:"medium",placeholder:"Sua senha",value:l||"",onChange:D=>s(D.target.value),onKeyDown:D=>D.key==="Enter"&&P()},S("password"))),_jsxruntime.jsx.call(void 0, N,{fullWidth:!0,variant:"contained",onClick:P,isLoading:u,sx:{mt:1},children:"Entrar"})]}),_jsxruntime.jsx.call(void 0, N,{onClick:()=>o("esqueci-senha"),variant:"text",disableRipple:!0,disableTouchRipple:!0,sx:{justifyContent:"flex-start",alignContent:"center",alignItems:"center",textAlign:"left",width:"120px",marginTop:.5,fontWeight:"400",":hover":{}},children:"Esqueci a senha"}),h&&_jsxruntime.jsx.call(void 0, _material.Alert,{severity:"error",children:h}),p&&_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.jsxs.call(void 0, _material.Stack,{direction:"row",justifyContent:"center",alignItems:"center",mt:2,mb:2,children:[_jsxruntime.jsx.call(void 0, _material.Divider,{sx:{flexGrow:1,mr:1}}),_jsxruntime.jsx.call(void 0, _material.Typography,{children:"Ou fa\xE7a login com"}),_jsxruntime.jsx.call(void 0, _material.Divider,{sx:{flexGrow:1,ml:1}})]}),_jsxruntime.jsxs.call(void 0, _material.Stack,{spacing:1,children:[_jsxruntime.jsx.call(void 0, N,{onClick:()=>o("otp-email"),startIcon:_jsxruntime.jsx.call(void 0, _iconsmaterial.Mail,{}),children:"Entrar com senha tempor\xE1ria"}),_jsxruntime.jsx.call(void 0, N,{onClick:()=>o("otp-whatsapp"),startIcon:_jsxruntime.jsx.call(void 0, _iconsmaterial.WhatsApp,{}),children:"Entrar com senha tempor\xE1ria"})]}),_jsxruntime.jsx.call(void 0, _t,{senhaAtual:l,email:i,primeiroAcesso:!0,isOpen:f,onClose:()=>L(this,null,function*(){return m(!1)}),onSuccess:()=>{m(!1),y(!0),s("")},credentialsConfig:n})]})}var nh=ve().shape({email:fe().required("Informe o e-mail")});function si(t){let{onLoginClick:e,credentialsConfig:r}=t,[o,n]=_react.useState.call(void 0, ""),[i,a]=_react.useState.call(void 0, !1),[l,s]=_react.useState.call(void 0, !1),[u,c]=_react.useState.call(void 0, null),{recuperarSenha:f}=_hooks.useCredentials.call(void 0, r),{validationProps:m,setValidationErrors:p}=_hooks.useValidations.call(void 0, );function y(){return L(this,null,function*(){p(null),nh.validate({email:o},{abortEarly:!1}).then(()=>L(this,null,function*(){var h;try{a(!0),yield f(o),s(!0)}catch(T){c((h=T.response)==null?void 0:h.data.message)}finally{a(!1)}})).catch(h=>{p(h)})})}return _jsxruntime.jsxs.call(void 0, _material.Box,{component:"form",children:[_jsxruntime.jsx.call(void 0, _material.TextField,d({name:"email",label:"E-mail",margin:"normal",placeholder:"Informe o e-mail utilizado para acessar o sistema",autoFocus:!0,value:o||"",onChange:h=>n(h.target.value)},m("email"))),_jsxruntime.jsx.call(void 0, N,{fullWidth:!0,variant:"contained",onClick:y,isLoading:i,children:"Recuperar minha senha"}),_jsxruntime.jsx.call(void 0, Ce,{sx:{display:"inline-flex",justifyContent:"space-between",width:"100%",marginTop:1},children:_jsxruntime.jsx.call(void 0, N,{onClick:e,variant:"text",sx:{fontWeight:"400",":hover":{color:h=>h.palette.primary.dark}},children:"Voltar para o Login"})}),l&&_jsxruntime.jsx.call(void 0, _material.Alert,{severity:"success",action:_jsxruntime.jsx.call(void 0, N,{onClick:e,variant:"text",sx:{fontWeight:"400",":hover":{color:h=>h.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 ui(t){var c;let{loginData:e,credentialsConfig:r,onLoginFailed:o,onLoginSuccess:n}=t,[i,a]=_react.useState.call(void 0, ""),{selecionarLicenca:l,isSubmitting:s}=_hooks.useCredentials.call(void 0, r);_react.useEffect.call(void 0, ()=>{if(Array.isArray(e==null?void 0:e.empresas)){let f=e==null?void 0:e.empresas[0];a(f==null?void 0:f.uuid)}},[e]);function u(){return L(this,null,function*(){try{let f=yield l(e==null?void 0:e.token,i);f?n(f):o("Nenhuma token definida")}catch(f){o(f)}})}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:f=>{a(f.target.value)},children:(c=e==null?void 0:e.empresas)==null?void 0:c.map(f=>_jsxruntime.jsx.call(void 0, _material.MenuItem,{value:f.uuid,children:f.nome},f.uuid))}),_jsxruntime.jsx.call(void 0, N,{fullWidth:!0,variant:"contained",onClick:u,isLoading:s,sx:{mt:1},children:"Confirmar"})]})}var _TextField = require('@mui/material/TextField'); var _TextField2 = _interopRequireDefault(_TextField);var tl=t=>{let e=t.replace(/\D/g,"");return e.length<=2?`(${e}`:e.length<=7?`(${e.slice(0,2)}) ${e.slice(2)}`:e.length<=11?`(${e.slice(0,2)}) ${e.slice(2,7)}-${e.slice(7)}`:`(${e.slice(0,2)}) ${e.slice(2,7)}-${e.slice(7,11)}`};function ir(t){let u=t,{value:e,onChange:r}=u,o=F(u,["value","onChange"]),[n,i]=_react.useState.call(void 0, ""),a=e!==void 0,l=_react.useMemo.call(void 0, ()=>a?tl(e||""):n,[e,n,a]);return _jsxruntime.jsx.call(void 0, _TextField2.default,d({value:l,onChange:c=>{let f=tl(c.target.value);if(a||i(f),r){let m=C(d({},c),{target:C(d({},c.target),{value:f})});r(m)}},inputProps:{maxLength:15}},o))}function ar({length:t=6,value:e,onChange:r}){let o=_react.useRef.call(void 0, []),n=(a,l)=>{var m;let s="ABCDEF0123456789",u=l.toUpperCase().split("").find(p=>s.includes(p))||"",c=e.split("");c[a]=u;let f=c.join("");r(f),u&&a<t-1&&((m=o.current[a+1])==null||m.focus())},i=(a,l)=>{var s;l.key==="Backspace"&&!e[a]&&a>0&&((s=o.current[a-1])==null||s.focus())};return _jsxruntime.jsx.call(void 0, _material.Box,{display:"flex",gap:1,children:Array.from({length:t}).map((a,l)=>_jsxruntime.jsx.call(void 0, _material.TextField,{autoFocus:l===0,inputRef:s=>o.current[l]=s,slotProps:{htmlInput:{maxLength:1,style:{textAlign:"center",fontSize:"24px",width:"24px",height:"36px"}}},value:e[l]||"",onChange:s=>n(l,s.target.value),onKeyDown:s=>i(l,s)},l))})}function fi(t){let{open:e,onClose:r,payload:o,onLoginSuccess:n,credentialsConfig:i}=t,[a,l]=_react.useState.call(void 0, ""),[s,u]=_react.useState.call(void 0, !1),[c,f]=_react.useState.call(void 0, !1),{validarOtpVerificationCode:m}=_hooks.useCredentials.call(void 0, i);_react.useEffect.call(void 0, ()=>{s&&setTimeout(()=>{u(!1)},3e3)},[s]);function p(){return L(this,null,function*(){try{f(!0);let y=yield m({channel:o.channel,target:o.target,code:a});y&&n(y),r()}catch(y){u(y.response.data.message)}finally{f(!1)}})}return _jsxruntime.jsxs.call(void 0, j.Root,{open:e,onClose:y=>r(),maxWidth:"xs",children:[_jsxruntime.jsxs.call(void 0, j.Header,{children:[_jsxruntime.jsx.call(void 0, j.Title,{children:"Entrar com senha tempor\xE1ria"}),_jsxruntime.jsx.call(void 0, j.ActionClose,{onClose:r})]}),_jsxruntime.jsx.call(void 0, j.Content,{children:_jsxruntime.jsxs.call(void 0, _material.Stack,{spacing:2,justifyContent:"center",alignContent:"center",alignItems:"center",children:[_jsxruntime.jsx.call(void 0, _material.Typography,{variant:"subtitle1",sx:{fontWeight:"bolder",fontSize:"11pt"},children:"\u{1F510} Digite a senha tempor\xE1ria para acessar sua conta"}),_jsxruntime.jsxs.call(void 0, _material.Typography,{variant:"body1",sx:{fontSize:"10pt"},children:["Enviamos uma senha tempor\xE1ria para ",_jsxruntime.jsx.call(void 0, "b",{children:o.target}),". ",_jsxruntime.jsx.call(void 0, "br",{}),"Digite o c\xF3digo abaixo para acessar sua conta."]}),_jsxruntime.jsx.call(void 0, ar,{value:a,onChange:y=>{l(y)}}),s&&_jsxruntime.jsx.call(void 0, _material.Alert,{sx:{flexGrow:1},severity:"error",children:s})]})}),_jsxruntime.jsx.call(void 0, j.Footer,{children:_jsxruntime.jsxs.call(void 0, j.Actions,{children:[_jsxruntime.jsx.call(void 0, j.ActionCancelar,{onClick:()=>r()}),_jsxruntime.jsx.call(void 0, j.ActionSalvar,{label:"Entrar",onClick:p,isLoading:c,disabled:a.length!=6})]})})]})}var Dh=ve().shape({contato:fe().when("$tipo",([t],e)=>t==="otp-email"?e.email("E-mail inv\xE1lido").required("Informe o e-mail"):e.matches(/^\+?[1-9]\d{7,14}$/,"N\xFAmero de WhatsApp inv\xE1lido").required("Informe o WhatsApp"))});function wo(t){let{tipo:e,credentialsConfig:r,onLoginSuccess:o,onLoginClick:n}=t,[i,a]=_react.useState.call(void 0, !1),[l,s]=_react.useState.call(void 0, !1),{gerarOtpVerificationCode:u}=_hooks.useCredentials.call(void 0, r),{handleChange:c,changeValue:f,data:m,validate:p,validationErrors:y}=_hooks.useForm.call(void 0, {contato:""},Dh),[h,T]=_react.useState.call(void 0, !1);return _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, "form",{onSubmit:S=>L(this,null,function*(){S.preventDefault(),p(b=>L(this,null,function*(){try{s(!1),a(!0);let P=yield u({channel:e==="otp-email"?"email":"whatsapp",target:b.contato});T(!0)}catch(P){s(P.response.data.message)}finally{a(!1)}}),{context:{tipo:e}})}),children:_jsxruntime.jsxs.call(void 0, _material.Stack,{spacing:2,children:[_jsxruntime.jsx.call(void 0, _material.Typography,{variant:"subtitle2",children:e==="otp-email"?" Informe seu e-mail para receber um c\xF3digo de acesso":"Informe seu n\xFAmero de WhatsApp para receber um c\xF3digo de acesso"}),e==="otp-email"&&_jsxruntime.jsx.call(void 0, _material.TextField,d({autoFocus:!0,name:"contato",label:"E-mail",value:m.contato||"",onChange:c,fullWidth:!0},y("contato"))),e==="otp-whatsapp"&&_jsxruntime.jsx.call(void 0, ir,d({autoFocus:!0,name:"contato",label:"Whatsapp",value:m.contato||"",onChange:S=>{f("contato",S.target.value.replace(/[^\d+]/g,""))},fullWidth:!0},y("contato"))),_jsxruntime.jsxs.call(void 0, _material.Stack,{children:[_jsxruntime.jsx.call(void 0, N,{isLoading:i,type:"submit",variant:"contained",color:"primary",children:"Enviar c\xF3digo"}),_jsxruntime.jsxs.call(void 0, Ce,{sx:{display:"inline-flex",justifyContent:"space-between",width:"100%",marginTop:1},children:[_jsxruntime.jsx.call(void 0, N,{onClick:n,variant:"text",sx:{fontWeight:"400",":hover":{color:S=>S.palette.primary.dark}},children:"Voltar para o Login"}),_jsxruntime.jsx.call(void 0, "a",{href:"https://datacsistemashelp.zendesk.com/hc/pt-br/articles/36489079108756-Login-OTP-via-WhatsApp",target:"_blank",rel:"noopener noreferrer",children:_jsxruntime.jsx.call(void 0, _material.IconButton,{children:_jsxruntime.jsx.call(void 0, _iconsmaterial.HelpOutline,{color:"primary"})})})]})]}),l&&_jsxruntime.jsx.call(void 0, _material.Alert,{severity:"error",children:l})]})}),_jsxruntime.jsx.call(void 0, fi,{onLoginSuccess:o,open:h,onClose:S=>L(this,null,function*(){T(!1)}),payload:{target:m.contato,channel:e==="otp-email"?"email":"whatsapp"},credentialsConfig:r})]})}var Nh={login:"Acesse sua conta",licensa:"Selecione a licen\xE7a","esqueci-senha":"Recupere a sua senha","otp-email":"Entrar com senha tempor\xE1ria (E-mail)","otp-whatsapp":"Entrar com senha tempor\xE1ria (WhatsApp)"};function di(t){let{credentialsConfig:e,onLoginSuccess:r,onLoginFailed:o,onAlreadyLogged:n,appName:i}=t,[a,l]=_react.useState.call(void 0, ),{selecionarLicenca:s,isAuthenticated:u}=_hooks.useCredentials.call(void 0, e),[c,f]=_react.useState.call(void 0, "login"),m=_material.useTheme.call(void 0, ),p=_material.useMediaQuery.call(void 0, m.breakpoints.up("md"));_react.useEffect.call(void 0, ()=>{u&&n&&n()},[u]);function y(b){return L(this,null,function*(){console.log("LOGIN DATA",b);try{if(Array.isArray(b==null?void 0:b.empresas)){if((b==null?void 0:b.empresas.length)===1){let P=yield s(b==null?void 0:b.token,b.empresas[0].uuid);P&&r(P);return}f("licensa"),l(b);return}r(b)}catch(P){o(P)}})}function h(b){return L(this,null,function*(){o(b)})}function T(b){f(b)}function v(){f("login")}let S=Nh[c];return _jsxruntime.jsxs.call(void 0, _material.Stack,{component:"section",width:p?"46%":"100%",minWidth:"420px",maxWidth:p?"614px":"initial",justifyContent:"center",alignItems:"center",padding:"2rem",children:[_jsxruntime.jsx.call(void 0, _material.Stack,{width:"100%",maxWidth:"28rem",margin:"auto 0",children:_jsxruntime.jsxs.call(void 0, _material.Stack,{children:[_jsxruntime.jsx.call(void 0, Wn,{label:i,subTitle:S}),_jsxruntime.jsxs.call(void 0, _material.Box,{sx:{marginTop:2},children:[c==="login"&&_jsxruntime.jsx.call(void 0, ai,{credentialsConfig:e,onLoginSuccess:y,onLoginFailed:h,onOptionsClick:T}),c==="licensa"&&_jsxruntime.jsx.call(void 0, ui,{loginData:a,credentialsConfig:e,onLoginSuccess:r,onLoginFailed:o}),c==="esqueci-senha"&&_jsxruntime.jsx.call(void 0, si,{onLoginClick:v,credentialsConfig:e}),c==="otp-email"&&_jsxruntime.jsx.call(void 0, wo,{onLoginClick:v,onLoginSuccess:y,tipo:"otp-email",credentialsConfig:e}),c==="otp-whatsapp"&&_jsxruntime.jsx.call(void 0, wo,{onLoginClick:v,onLoginSuccess:y,tipo:"otp-whatsapp",credentialsConfig:e})]})]})}),_jsxruntime.jsxs.call(void 0, _material.Stack,{direction:"row",alignItems:"center",marginBottom:-3,children:[_jsxruntime.jsx.call(void 0, "img",{width:"60",src:"https://datac-site-assets.s3.sa-east-1.amazonaws.com/logomarca.png"}),_jsxruntime.jsx.call(void 0, _material.Typography,{variant:"body1",component:"span",fontSize:"0.7rem",sx:{color:b=>b.palette.grey[500]},children:"Data C Sistemas"})]})]})}function hi(){let t=_material.useTheme.call(void 0, ),e=_material.useMediaQuery.call(void 0, t.breakpoints.up("md"));return _jsxruntime.jsx.call(void 0, _material.Stack,{component:"section",display:e?"flex":"none",width:"100%",direction:"row",justifyContent:"center",alignItems:"center",sx:{backgroundImage:"url(https://datac-site-assets.s3.sa-east-1.amazonaws.com/background_login.png)",backgroundSize:"cover",backgroundPosition:"right",backgroundRepeat:"no-repeat"},children:_jsxruntime.jsxs.call(void 0, _material.Stack,{padding:"2rem",children:[_jsxruntime.jsx.call(void 0, _material.Typography,{component:"h1",fontSize:"3.5rem",lineHeight:"4rem",fontWeight:"bold",color:"white",fontFamily:"Montserrat",letterSpacing:0,children:"Inova\xE7\xE3o e tecnologia"}),_jsxruntime.jsx.call(void 0, _material.Typography,{component:"h2",color:"white",fontSize:"2.5rem",lineHeight:"3rem",letterSpacing:0,fontWeight:"bold",fontFamily:"Montserrat",children:"para empresas de resultado"}),_jsxruntime.jsx.call(void 0, _material.Typography,{component:"span",fontSize:"1.25rem",lineHeight:"1.25rem",fontWeight:"300",letterSpacing:0,marginTop:"1.5rem",marginBottom:"3rem",fontFamily:"Montserrat",sx:{color:"rgb(68, 167, 255)"},children:"Mais de 25 anos de exist\xEAncia e muitas hist\xF3rias de sucesso."}),_jsxruntime.jsx.call(void 0, _material.Link,{href:"https://site.datac.com.br/services/",target:"_blank",children:_jsxruntime.jsxs.call(void 0, N,{component:"a",variant:"text",sx:{width:"fit-content",color:"rgb(255, 255, 255)",fontWeight:"400",fontSize:"0.875rem",lineHeight:"1.125rem",fontFamily:"Montserrat",backgroundColor:"rgb(22, 23, 101)",borderRadius:"30px",padding:"17px 48px",":hover":{backgroundColor:"rgb(255, 255, 255)",color:"rgb(22, 23, 101)"},alignItems:"center"},children:["Conhe\xE7a nossos produtos",_jsxruntime.jsx.call(void 0, _iconsmaterial.ArrowRight,{fontSize:"medium",sx:{color:r=>r.palette.success.light}})]})})]})})}function ll(t){let{banner:e}=t;return _jsxruntime.jsxs.call(void 0, _material.Stack,{component:"main",direction:"row",height:"100vh",children:[e?_jsxruntime.jsx.call(void 0, jn,{children:e}):_jsxruntime.jsx.call(void 0, hi,{}),_jsxruntime.jsx.call(void 0, di,d({},t))]})}var Hh=_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"}})),Kh=t=>_jsxruntime.jsx.call(void 0, Hh,d({},t)),ko=Kh;function yi(t){let{menuItem:e,activeMenu:r,onMenuClick:o}=t,[n,i]=_react.useState.call(void 0, !1);if(!e.visible)return null;let a=!!(e!=null&&e.items&&(e==null?void 0:e.items.length)>0);function l(){i(!n)}return _jsxruntime.jsxs.call(void 0, _material.Box,{children:[_jsxruntime.jsxs.call(void 0, ko,{onClick:()=>{if(e!=null&&e.link){o(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}),a&&!n&&_jsxruntime.jsx.call(void 0, _iconsmaterial.ExpandMore,{}),a&&n&&_jsxruntime.jsx.call(void 0, _iconsmaterial.ExpandLess,{})]}),(e==null?void 0:e.items)&&_jsxruntime.jsx.call(void 0, _material.Collapse,{in:n,timeout:"auto",unmountOnExit:!0,children:_jsxruntime.jsx.call(void 0, pt,{activeMenu:r,sx:{pl:s=>s.spacing(1.5)},menus:(e==null?void 0:e.items)||[],onMenuClick:o})})]})}function pt(t){let i=t,{menus:e,activeMenu:r,onMenuClick:o}=i,n=F(i,["menus","activeMenu","onMenuClick"]);return _jsxruntime.jsx.call(void 0, _material.List,C(d({component:"nav",disablePadding:!0},n),{children:e.map(a=>_jsxruntime.jsx.call(void 0, yi,{onMenuClick:o,activeMenu:r,menuItem:a},a.id))}))}function xi(t){let{menus:e,activeMenu:r,onMenuClick:o}=t,[n,i]=_react.useState.call(void 0, null),a=(s,u,c)=>{i({element:s.currentTarget,id:u,items:c})},l=()=>{i(null)};return _jsxruntime.jsx.call(void 0, _material.List,{component:"nav",disablePadding:!0,children:e.map(s=>s.visible?_jsxruntime.jsxs.call(void 0, ko,{onMouseEnter:u=>{s!=null&&s.link||a(u,s.id,s.items)},onMouseLeave:()=>{s!=null&&s.link||l()},onClick:()=>{s!=null&&s.link&&o(s.link)},selected:r===s.link,children:[_jsxruntime.jsx.call(void 0, _material.ListItemIcon,{children:_jsxruntime.jsx.call(void 0, _material.Icon,{children:s.icon})}),(n==null?void 0:n.id)===s.id&&_jsxruntime.jsx.call(void 0, _material.Popper,{sx:{zIndex:999999},anchorEl:n==null?void 0:n.element,open:!!(n!=null&&n.element),placement:"right-start",children:_jsxruntime.jsx.call(void 0, pt,{activeMenu:r,onMenuClick:o,menus:(s==null?void 0:s.items)||[],sx:{minWidth:"240px",backgroundColor:U.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-${s.id}`):null)})}var fl=(t,e)=>({width:t,transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.enteringScreen}),overflowX:"hidden"}),pl=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)`}}),mg=_styles.styled.call(void 0, _material.Drawer,{shouldForwardProp:t=>t!=="open"&&t!=="width"})(({theme:t,open:e,width:r})=>d(d({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&&C(d({},fl(r,t)),{"& .MuiDrawer-paper":fl(r,t)})),!e&&C(d({},pl(t)),{"& .MuiDrawer-paper":pl(t)})));function dl(t){let s=t,{open:e,items:r,width:o,activeMenu:n,onMenuClick:i,toggleMenu:a}=s,l=F(s,["open","items","width","activeMenu","onMenuClick","toggleMenu"]);return _jsxruntime.jsxs.call(void 0, mg,C(d({width:o,open:e,onClose:()=>a(!1)},l),{children:[_jsxruntime.jsx.call(void 0, _material.Toolbar,{}),e&&_jsxruntime.jsx.call(void 0, pt,{onMenuClick:i,activeMenu:n,menus:r}),!e&&_jsxruntime.jsx.call(void 0, xi,{onMenuClick:i,activeMenu:n,menus:r})]}))}function ml(t){return _jsxruntime.jsx.call(void 0, _material.Box,d({m:2,sx:{display:"flex",flexDirection:"column",flexGrow:1}},t))}var _Avatar = require('@mui/material/Avatar'); var _Avatar2 = _interopRequireDefault(_Avatar);function hl(t){let{user:e}=_providers.useUserContext.call(void 0, );return _jsxruntime.jsx.call(void 0, _Avatar2.default,d({src:e==null?void 0:e.avatarUrl,sx:{width:64,height:64,margin:"auto",mb:2}},t))}function Fo(t){let i=t,{children:e,value:r,index:o}=i,n=F(i,["children","value","index"]);return r!==o?null:_jsxruntime.jsx.call(void 0, _material.Box,C(d({role:"tabpanel",hidden:r!==o,id:`scrollable-auto-tabpanel-${o}`,"aria-labelledby":`scrollable-auto-tab-${o}`,sx:{display:"flex",flexDirection:"column",flexGrow:1}},n),{children:r===o&&e}))}var _reacteasycrop = require('react-easy-crop'); var _reacteasycrop2 = _interopRequireDefault(_reacteasycrop);var _Slider = require('@mui/material/Slider'); var _Slider2 = _interopRequireDefault(_Slider);var _Button = require('@mui/material/Button'); var _Button2 = _interopRequireDefault(_Button);var _Dialog = require('@mui/material/Dialog'); var _Dialog2 = _interopRequireDefault(_Dialog);function vi(t,e){return new Promise(r=>{let o=new Image;o.src=t,o.onload=()=>{let n=document.createElement("canvas");n.width=e.width,n.height=e.height;let i=n.getContext("2d");i&&(i.drawImage(o,e.x,e.y,e.width,e.height,0,0,e.width,e.height),r(n.toDataURL("image/jpeg")))}})}var kg=({onSave:t,src:e})=>{let[r,o]=_react.useState.call(void 0, null),[n,i]=_react.useState.call(void 0, null),[a,l]=_react.useState.call(void 0, {x:0,y:0}),[s,u]=_react.useState.call(void 0, 1),[c,f]=_react.useState.call(void 0, null),[m,p]=_react.useState.call(void 0, !1),y=_react.useCallback.call(void 0, (v,S)=>{f(S)},[]);return _jsxruntime.jsxs.call(void 0, _material.Stack,{direction:"row",spacing:2,alignItems:"center",children:[n?_jsxruntime.jsx.call(void 0, _Avatar2.default,{src:n,alt:"Preview",sx:{width:64,height:64,margin:"auto",mb:2}}):_jsxruntime.jsx.call(void 0, _Avatar2.default,{src:e,sx:{width:64,height:64,margin:"auto",mb:2}}),_jsxruntime.jsxs.call(void 0, "label",{children:[_jsxruntime.jsx.call(void 0, "input",{type:"file",accept:"image/*",onChange:v=>{var P;let S=(P=v.target.files)==null?void 0:P[0];if(!S)return;let b=new FileReader;b.onload=()=>{o(b.result),p(!0)},b.readAsDataURL(S)},style:{display:"none"}}),_jsxruntime.jsx.call(void 0, _Button2.default,{variant:"contained",component:"span",children:"Alterar foto"})]}),_jsxruntime.jsxs.call(void 0, _Dialog2.default,{open:m,onClose:()=>p(!1),maxWidth:"sm",fullWidth:!0,children:[_jsxruntime.jsx.call(void 0, "div",{style:{position:"relative",height:400,background:"#333"},children:r&&_jsxruntime.jsx.call(void 0, _reacteasycrop2.default,{image:r,crop:a,zoom:s,aspect:1,cropShape:"round",showGrid:!1,onCropChange:l,onZoomChange:u,onCropComplete:y})}),_jsxruntime.jsxs.call(void 0, "div",{style:{padding:20},children:[_jsxruntime.jsx.call(void 0, _Slider2.default,{value:s,min:1,max:3,step:.1,onChange:(v,S)=>u(S)}),_jsxruntime.jsx.call(void 0, Ce,{children:_jsxruntime.jsx.call(void 0, _Button2.default,{variant:"contained",onClick:()=>L(void 0,null,function*(){if(!r||!c)return;let v=yield vi(r,c);i(v),p(!1),t&&t(v)}),children:"Salvar"})})]})]})]})},xl=kg;var Mg=ve().shape({name:fe().required("Informe o nome")});function Pi(t){let{usuario:e,credentialsConfig:r,onUploadComplete:o}=t,{data:n,setData:i,handleChange:a,validate:l,validationErrors:s}=_hooks.useForm.call(void 0, e,Mg),[u,c]=_react.useState.call(void 0, !1),[f,m]=_react.useState.call(void 0, !1),[p,y]=_react.useState.call(void 0, !1),{uploadAvatar:h,atualizarUsuario:T}=_hooks.useCredentials.call(void 0, r);_react.useEffect.call(void 0, ()=>{i(e)},[e]),_react.useEffect.call(void 0, ()=>{p&&setTimeout(()=>{y(!1)},3e3)},[p]),_react.useEffect.call(void 0, ()=>{u&&setTimeout(()=>{c(!1)},3e3)},[u]);function v(){l(S=>L(this,null,function*(){try{m(!0),yield T(S),y(!0)}catch(b){c("Ocorreu um erro ao alterar os dados da conta")}finally{m(!1)}}))}return _jsxruntime.jsxs.call(void 0, _material.Stack,{spacing:2,children:[_jsxruntime.jsx.call(void 0, _material.Typography,{variant:"h6",children:"Avatar"}),_jsxruntime.jsx.call(void 0, xl,{src:n==null?void 0:n.avatarUrl,onSave:S=>{try{h(S),o&&(y(!0),o(!0))}catch(b){c("Ocorreu um erro ao atualizar a foto de perfil"),o&&o(!1,b)}}}),_jsxruntime.jsx.call(void 0, _material.Divider,{}),_jsxruntime.jsx.call(void 0, _material.Typography,{variant:"h6",children:"Informa\xE7\xF5es da Conta"}),_jsxruntime.jsxs.call(void 0, _material.Grid2,{container:!0,spacing:1.5,children:[_jsxruntime.jsx.call(void 0, _material.Grid2,{size:{xl:4,lg:4,md:4,sm:12,xs:12},children:_jsxruntime.jsx.call(void 0, _material.TextField,{disabled:!0,fullWidth:!0,label:"E-mail",value:(n==null?void 0:n.email)||""})}),_jsxruntime.jsx.call(void 0, _material.Grid2,{size:{xl:4,lg:4,md:4,sm:12,xs:12},children:_jsxruntime.jsx.call(void 0, _material.TextField,d({name:"name",fullWidth:!0,label:"Nome",value:(n==null?void 0:n.name)||"",onChange:a},s("name")))}),_jsxruntime.jsx.call(void 0, _material.Grid2,{size:{xl:4,lg:4,md:4,sm:12,xs:12},children:_jsxruntime.jsx.call(void 0, _material.TextField,{name:"surname",fullWidth:!0,label:"Sobrenome",value:(n==null?void 0:n.surname)||"",onChange:a})})]}),_jsxruntime.jsx.call(void 0, _material.Grid2,{size:{xl:4,lg:4,md:4,sm:12,xs:12},children:_jsxruntime.jsx.call(void 0, Ce,{children:_jsxruntime.jsx.call(void 0, N,{isLoading:f,onClick:()=>v(),variant:"contained",children:"Salvar"})})}),p&&_jsxruntime.jsx.call(void 0, _material.Alert,{children:"Dados da conta alterados com sucesso!"}),u&&_jsxruntime.jsx.call(void 0, _material.Alert,{severity:"error",children:u})]})}function Ei(t){var y,h,T;let{open:e,onClose:r,payload:o,onCodigoVerificado:n,credentialsConfig:i}=t,[a,l]=_react.useState.call(void 0, ""),[s,u]=_react.useState.call(void 0, !1),[c,f]=_react.useState.call(void 0, !1),{validarCodigoWhatsapp:m}=_hooks.useCredentials.call(void 0, i);_react.useEffect.call(void 0, ()=>{s&&setTimeout(()=>{u(!1)},3e3)},[s]);function p(){return L(this,null,function*(){try{f(!0);let v=yield m(a);n(v.data)}catch(v){u(v.response.data.message)}finally{f(!1)}})}return _jsxruntime.jsxs.call(void 0, j.Root,{open:e,onClose:v=>r(),maxWidth:"xs",children:[_jsxruntime.jsxs.call(void 0, j.Header,{children:[_jsxruntime.jsx.call(void 0, j.Title,{children:"Verifica\xE7\xE3o do seu n\xFAmero de WhatsApp"}),_jsxruntime.jsx.call(void 0, j.ActionClose,{onClose:r})]}),_jsxruntime.jsx.call(void 0, j.Content,{children:_jsxruntime.jsxs.call(void 0, _material.Stack,{spacing:2,justifyContent:"center",alignContent:"center",alignItems:"center",children:[_jsxruntime.jsx.call(void 0, _material.Typography,{variant:"subtitle1",sx:{fontWeight:"bolder",fontSize:"11pt"},children:"\u{1F510} Verifique seu n\xFAmero"}),_jsxruntime.jsxs.call(void 0, _material.Typography,{variant:"body1",sx:{fontSize:"10pt"},children:["Enviamos um c\xF3digo via WhatsApp para +55"," ",_jsxruntime.jsx.call(void 0, "b",{children:`(${(y=o==null?void 0:o.whatsappNumber)==null?void 0:y.slice(0,2)}) ${(h=o==null?void 0:o.whatsappNumber)==null?void 0:h.slice(2,7)}-${(T=o==null?void 0:o.whatsappNumber)==null?void 0:T.slice(7)}`}),". ",_jsxruntime.jsx.call(void 0, "br",{}),"Digite o c\xF3digo abaixo para confirmar que este n\xFAmero \xE9 seu."]}),_jsxruntime.jsx.call(void 0, ar,{value:a,onChange:v=>{l(v)}}),s&&_jsxruntime.jsx.call(void 0, _material.Alert,{sx:{flexGrow:1},severity:"error",children:s})]})}),_jsxruntime.jsx.call(void 0, j.Footer,{children:_jsxruntime.jsxs.call(void 0, j.Actions,{children:[_jsxruntime.jsx.call(void 0, j.ActionCancelar,{onClick:()=>r()}),_jsxruntime.jsx.call(void 0, j.ActionSalvar,{label:"Verificar",onClick:p,isLoading:c,disabled:a.length!=6})]})})]})}var sF=ve().shape({whatsappNumber:fe().required("Informe o n\xFAmero do whastapp").length(15)});function Oi(t){let{usuario:e,credentialsConfig:r,onWhastappSaved:o}=t,[n,i]=_react.useState.call(void 0, !1),[a,l]=_react.useState.call(void 0, !1),{data:s,setData:u,changeValue:c,validate:f,validationErrors:m}=_hooks.useForm.call(void 0, e),[p,y]=_react.useState.call(void 0, !1),[h,T]=_react.useState.call(void 0, !1),{atualizarUsuario:v,gerarWhatsappVerificationCode:S}=_hooks.useCredentials.call(void 0, r);_react.useEffect.call(void 0, ()=>{u(e)},[e]);function b(){f(D=>L(this,null,function*(){try{l(!0);let I=yield v(D);o&&o(I.data)}catch(I){}finally{l(!1)}}))}function P(){return L(this,null,function*(){try{y(!0);let D=yield S();T(!0)}catch(D){}finally{y(!1)}})}return _jsxruntime.jsxs.call(void 0, _material.Stack,{spacing:2,children:[_jsxruntime.jsx.call(void 0, _material.Typography,{variant:"h6",children:"Senha"}),_jsxruntime.jsx.call(void 0, N,{onClick:()=>{i(!0)},sx:{width:"200px"},fullWidth:!1,variant:"contained",children:"Alterar Senha"}),_jsxruntime.jsx.call(void 0, _t,{isOpen:n,onClose:()=>L(this,null,function*(){return i(!1)}),credentialsConfig:r}),_jsxruntime.jsx.call(void 0, _material.Divider,{}),_jsxruntime.jsx.call(void 0, _material.Typography,{variant:"h6",children:"Login com Whastapp"}),_jsxruntime.jsxs.call(void 0, _material.Stack,{direction:"row",spacing:2,children:[_jsxruntime.jsx.call(void 0, ir,{disabled:!!(s!=null&&s.whatsappVerifiedAt),fullWidth:!1,name:"whatsappNumber",label:"Whastapp",value:s.whatsappNumber||"",onChange:D=>{c("whatsappNumber",D.target.value)}}),s.whatsappVerifiedAt&&_jsxruntime.jsxs.call(void 0, _material.Stack,{direction:"row",spacing:1,justifyContent:"center",alignItems:"center",children:[_jsxruntime.jsx.call(void 0, _iconsmaterial.Verified,{color:"success"}),_jsxruntime.jsx.call(void 0, _material.Typography,{variant:"body2",children:"N\xFAmero Verificado"})]}),s.whatsappNumber&&s.whatsappNumber.replace(/\D/g,"").length===11&&!s.whatsappVerifiedAt&&_jsxruntime.jsx.call(void 0, N,{isLoading:a,onClick:b,children:"Salvar Whatsapp"})]}),e.whatsappNumber&&e.whatsappNumber.replace(/\D/g,"").length===11&&!s.whatsappVerifiedAt&&_jsxruntime.jsx.call(void 0, _material.Alert,{severity:"warning",action:_jsxruntime.jsx.call(void 0, N,{isLoading:p,onClick:P,children:"Enviar n\xFAmero de verifica\xE7\xE3o"}),children:"O seu n\xFAmero de whatsapp ainda n\xE3o est\xE1 validado"}),_jsxruntime.jsx.call(void 0, Ei,{open:h,onClose:D=>L(this,null,function*(){T(!1)}),payload:e,credentialsConfig:r,onCodigoVerificado:D=>{u(D),T(!1)}})]})}function Pl(t){let[e,r]=_react.useState.call(void 0, 0),{user:o,setUser:n,credentialsConfig:i}=_providers.useUserContext.call(void 0, );return _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment,{children:_jsxruntime.jsxs.call(void 0, _material.Stack,{spacing:2,direction:"row",children:[_jsxruntime.jsx.call(void 0, _material.Stack,{sx:{width:"200px"},children:_jsxruntime.jsxs.call(void 0, _material.Tabs,{orientation:"vertical",value:e,onChange:(a,l)=>{r(l)},sx:{"& .MuiButtonBase-root":{alignItems:"flex-start"}},children:[_jsxruntime.jsx.call(void 0, _material.Tab,{label:"Minha Conta",value:0}),_jsxruntime.jsx.call(void 0, _material.Tab,{label:"Login e Seguran\xE7a",value:1})]})}),_jsxruntime.jsxs.call(void 0, _material.Stack,{sx:{flexGrow:1},children:[_jsxruntime.jsx.call(void 0, Fo,{value:e,index:0,children:_jsxruntime.jsx.call(void 0, Pi,{credentialsConfig:i,usuario:o||{}})}),_jsxruntime.jsx.call(void 0, Fo,{value:e,index:1,children:_jsxruntime.jsx.call(void 0, Oi,{onWhastappSaved:a=>{n(a)},credentialsConfig:i,usuario:o||{}})})]})]})})}exports.AlterarSenha = _t; exports.Avatar = hl; exports.Button = N; exports.ButtonContainer = Ce; exports.Checkbox = $i; exports.ColorsGrid = Ni; exports.Content = ml; exports.CurrencyCellStyle = Px; exports.CurrencyTextField = au; exports.DataTable = Gu; exports.DataTableOptions = Vo; exports.DeleteContainer = No; exports.Dialog = $e; exports.DialogV2 = j; exports.DrawerMenu = dl; exports.Editable = io; exports.FilterContainer = Yo; exports.FilterControl = yr; exports.Flag = aa; exports.FormContainer = Zo; exports.LabelValue = ss; exports.MioAuth = ll; exports.OptionStyles = Sx; exports.PageTitle = ds; exports.PasswordTextField = lt; exports.Profile = Pl; exports.SearchTextField = Pt; exports.Surface = mr; exports.Tooltip = mt; exports.Transporter = Vn; exports.theme = U;
|
|
11
11
|
/*! Bundled license information:
|
|
12
12
|
|
|
13
13
|
react-is/cjs/react-is.production.min.js:
|
|
@@ -37,12 +37,12 @@ object-assign/index.js:
|
|
|
37
37
|
@license MIT
|
|
38
38
|
*)
|
|
39
39
|
|
|
40
|
-
react-is/cjs/react-is.production.
|
|
40
|
+
react-is/cjs/react-is.production.js:
|
|
41
41
|
(**
|
|
42
42
|
* @license React
|
|
43
|
-
* react-is.production.
|
|
43
|
+
* react-is.production.js
|
|
44
44
|
*
|
|
45
|
-
* Copyright (c)
|
|
45
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
46
46
|
*
|
|
47
47
|
* This source code is licensed under the MIT license found in the
|
|
48
48
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -53,7 +53,7 @@ react-is/cjs/react-is.development.js:
|
|
|
53
53
|
* @license React
|
|
54
54
|
* react-is.development.js
|
|
55
55
|
*
|
|
56
|
-
* Copyright (c)
|
|
56
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
57
57
|
*
|
|
58
58
|
* This source code is licensed under the MIT license found in the
|
|
59
59
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -61,7 +61,7 @@ react-is/cjs/react-is.development.js:
|
|
|
61
61
|
|
|
62
62
|
@mui/styled-engine/index.js:
|
|
63
63
|
(**
|
|
64
|
-
* @mui/styled-engine v6.
|
|
64
|
+
* @mui/styled-engine v6.4.11
|
|
65
65
|
*
|
|
66
66
|
* @license MIT
|
|
67
67
|
* This source code is licensed under the MIT license found in the
|