@data-c/ui 0.1.40 → 0.1.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +63 -63
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -7,7 +7,7 @@ For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:vt(18,`(${e})`));return
|
|
|
7
7
|
`)),()=>{})}function Zt(t){return it(t,"spacing",8,"spacing")}function Re(t,e){return typeof e=="string"||e==null?e:t(e)}function Hf(t,e){return r=>t.reduce((o,n)=>(o[n]=Re(e,r),o),{})}function Gf(t,e,r,o){if(!e.includes(r))return null;let n=Uf(r),i=Hf(n,o),a=t[r];return ie(t,a,i)}function Gn(t,e){let r=Zt(t.theme);return Object.keys(t).map(o=>Gf(t,e,o,r)).reduce($e,{})}function J(t){return Gn(t,no)}J.propTypes=process.env.NODE_ENV!=="production"?no.reduce((t,e)=>(t[e]=xe,t),{}):{};J.filterProps=no;function ee(t){return Gn(t,io)}ee.propTypes=process.env.NODE_ENV!=="production"?io.reduce((t,e)=>(t[e]=xe,t),{}):{};ee.filterProps=io;function gl(t){return Gn(t,Hn)}gl.propTypes=process.env.NODE_ENV!=="production"?Hn.reduce((t,e)=>(t[e]=xe,t),{}):{};gl.filterProps=Hn;function qn(t=8,e=Zt({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 qf(...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]?$e(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=qf;function be(t){return typeof t!="number"?t:`${t}px solid`}function Pe(t,e){return Z({prop:t,themeKey:"borders",transform:e})}var Yf=Pe("border",be),Kf=Pe("borderTop",be),Zf=Pe("borderRight",be),Qf=Pe("borderBottom",be),Xf=Pe("borderLeft",be),Jf=Pe("borderColor"),ed=Pe("borderTopColor"),td=Pe("borderRightColor"),rd=Pe("borderBottomColor"),od=Pe("borderLeftColor"),nd=Pe("outline",be),id=Pe("outlineColor"),Qt=t=>{if(t.borderRadius!==void 0&&t.borderRadius!==null){let e=it(t.theme,"shape.borderRadius",4,"borderRadius"),r=o=>({borderRadius:Re(e,o)});return ie(t,t.borderRadius,r)}return null};Qt.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:xe}:{};Qt.filterProps=["borderRadius"];var IS=Ne(Yf,Kf,Zf,Qf,Xf,Jf,ed,td,rd,od,Qt,nd,id);var Xt=t=>{if(t.gap!==void 0&&t.gap!==null){let e=it(t.theme,"spacing",8,"gap"),r=o=>({gap:Re(e,o)});return ie(t,t.gap,r)}return null};Xt.propTypes=process.env.NODE_ENV!=="production"?{gap:xe}:{};Xt.filterProps=["gap"];var Jt=t=>{if(t.columnGap!==void 0&&t.columnGap!==null){let e=it(t.theme,"spacing",8,"columnGap"),r=o=>({columnGap:Re(e,o)});return ie(t,t.columnGap,r)}return null};Jt.propTypes=process.env.NODE_ENV!=="production"?{columnGap:xe}:{};Jt.filterProps=["columnGap"];var er=t=>{if(t.rowGap!==void 0&&t.rowGap!==null){let e=it(t.theme,"spacing",8,"rowGap"),r=o=>({rowGap:Re(e,o)});return ie(t,t.rowGap,r)}return null};er.propTypes=process.env.NODE_ENV!=="production"?{rowGap:xe}:{};er.filterProps=["rowGap"];var ad=Z({prop:"gridColumn"}),sd=Z({prop:"gridRow"}),ld=Z({prop:"gridAutoFlow"}),ud=Z({prop:"gridAutoColumns"}),cd=Z({prop:"gridAutoRows"}),pd=Z({prop:"gridTemplateColumns"}),fd=Z({prop:"gridTemplateRows"}),dd=Z({prop:"gridTemplateAreas"}),md=Z({prop:"gridArea"}),BS=Ne(Xt,Jt,er,ad,sd,ld,ud,cd,pd,fd,dd,md);function at(t,e){return e==="grey"?e:t}var hd=Z({prop:"color",themeKey:"palette",transform:at}),gd=Z({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:at}),yd=Z({prop:"backgroundColor",themeKey:"palette",transform:at}),NS=Ne(hd,gd,yd);function me(t){return t<=1&&t!==0?`${t*100}%`:t}var xd=Z({prop:"width",transform:me}),ao=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])||Yt[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};ao.filterProps=["maxWidth"];var bd=Z({prop:"minWidth",transform:me}),vd=Z({prop:"height",transform:me}),Cd=Z({prop:"maxHeight",transform:me}),wd=Z({prop:"minHeight",transform:me}),US=Z({prop:"size",cssProperty:"width",transform:me}),HS=Z({prop:"size",cssProperty:"height",transform:me}),Sd=Z({prop:"boxSizing"}),GS=Ne(xd,ao,bd,vd,Cd,wd,Sd);var Pd={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:Qt},color:{themeKey:"palette",transform:at},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:at},backgroundColor:{themeKey:"palette",transform:at},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:Xt},rowGap:{style:er},columnGap:{style:Jt},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:ao},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"}},Tt=Pd;function Td(...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 kd(t,e){return typeof t=="function"?t(e):t}function Ed(){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:p,style:f}=l;if(o==null)return null;if(u==="typography"&&o==="inherit")return{[r]:o};let m=Pt(n,u)||{};return f?f(a):ie(a,o,x=>{let h=Kt(m,p,x);return x===h&&typeof x=="string"&&(h=Kt(m,p,`${r}${x==="default"?"":Qe(x)}`,x)),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: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 p=Wn(n.breakpoints),f=Object.keys(p),m=p;return Object.keys(u).forEach(d=>{let x=kd(u[d],n);if(x!=null)if(typeof x=="object")if(i[d])m=$e(m,t(d,x,n,i));else{let h=ie({theme:n},x,w=>({[d]:w}));Td(h,x)?m[d]=e({sx:x,theme:n}):m=$e(m,h)}else m=$e(m,t(d,x,n,i))}),zn(n,Un(f,m))}return Array.isArray(o)?o.map(a):a(o)}return e}var yl=Ed();yl.filterProps=["sx"];var kt=yl;function Yn(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 Id(t={},...e){let p=t,{breakpoints:r={},palette:o={},spacing:n,shape:i={}}=p,a=k(p,["breakpoints","palette","spacing","shape"]),l=Nn(r),s=qn(n),u=Se({breakpoints:l,direction:"ltr",components:{},palette:c({mode:"light"},o),spacing:s,shape:c(c({},fl),i)},a);return u=to(u),u.applyStyles=Yn,u=e.reduce((f,m)=>Se(f,m),u),u.unstable_sxConfig=c(c({},Tt),a==null?void 0:a.unstable_sxConfig),u.unstable_sx=function(m){return kt({sx:m,theme:this})},u}var st=Id;function Ad(t){return Object.keys(t).length===0}function Md(t=null){let e=xl.useContext(_react2.ThemeContext);return!e||Ad(e)?t:e}var Kn=Md;var Fd=st();function Od(t=Fd){return Kn(t)}var Zn=Od;var Dd=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 so(t){let a=t,{sx:e}=a,r=k(a,["sx"]),{systemProps:o,otherProps:n}=Dd(r),i;return Array.isArray(e)?i=[o,...e]:typeof e=="function"?i=(...l)=>{let s=e(...l);return De(s)?c(c({},o),s):o}:i=c(c({},o),e),g(c({},n),{sx:i})}var bl=t=>t,Rd=()=>{let t=bl;return{configure(e){t=e},generate(e){return t(e)},reset(){t=bl}}},Bd=Rd(),Qn=Bd;function vl(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=vl(t[e]))&&(o&&(o+=" "),o+=r)}else for(r in t)t[r]&&(o&&(o+=" "),o+=r);return o}function _d(){for(var t,e,r=0,o="",n=arguments.length;r<n;r++)(t=arguments[r])&&(e=vl(t))&&(o&&(o+=" "),o+=e);return o}var Cl=_d;var Ld={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 lo(t,e,r="Mui"){let o=Ld[e];return o?`${r}-${o}`:`${Qn.generate(t)}-${e}`}var uo=qe(_n());function Sl(t,e=""){return t.displayName||t.name||e}function wl(t,e,r){let o=Sl(e);return t.displayName||(o!==""?`${r}(${o})`:r)}function co(t){if(t!=null){if(typeof t=="string")return t;if(typeof t=="function")return Sl(t,"Component");if(typeof t=="object")switch(t.$$typeof){case uo.ForwardRef:return wl(t,t.render,"ForwardRef");case uo.Memo:return wl(t,t.type,"memo");default:return}}}function Xn(t){let n=t,{variants:e}=n,r=k(n,["variants"]),o={variants:e,style:On(r),isProcessed:!0};return o.style===r||e&&e.forEach(i=>{typeof i.style!="function"&&(i.style=On(i.style))}),o}var $d=st();function Jn(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}function Nd(t){return t?(e,r)=>r[t]:null}function zd(t,e,r){t.theme=Wd(t.theme)?r:t.theme[e]||t.theme}function po(t,e){let r=typeof e=="function"?e(t):e;if(Array.isArray(r))return r.flatMap(n=>po(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=k(o,["variants"])}return Pl(t,r.variants,[n])}return r!=null&&r.isProcessed?r.style:r}function Pl(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=g(c(c({},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=g(c(c({},t),t.ownerState),{ownerState:t.ownerState})),r.push(a.style(o))):r.push(a.style)}return r}function fo(t={}){let{themeId:e,defaultTheme:r=$d,rootShouldForwardProp:o=Jn,slotShouldForwardProp:n=Jn}=t;function i(l){zd(l,e,r)}return(l,s={})=>{sl(l,_=>_.filter(D=>D!==kt));let F=s,{name:u,slot:p,skipVariantsResolver:f,skipSx:m,overridesResolver:d=Nd(Tl(p))}=F,x=k(F,["name","slot","skipVariantsResolver","skipSx","overridesResolver"]),h=f!==void 0?f:p&&p!=="Root"&&p!=="root"||!1,w=m||!1,C=Jn;p==="Root"||p==="root"?C=o:p?C=n:Ud(l)&&(C=void 0);let S=Fn(l,c({shouldForwardProp:C,label:jd(u,p)},x)),v=_=>{if(typeof _=="function"&&_.__emotion_real!==_)return function(te){return po(te,_)};if(De(_)){let D=Xn(_);return D.variants?function(q){return po(q,D)}:D.style}return _},P=(..._)=>{let D=[],te=_.map(v),q=[];if(D.push(i),u&&d&&q.push(function(y){var A,B;let T=(B=(A=y.theme.components)==null?void 0:A[u])==null?void 0:B.styleOverrides;if(!T)return null;let E={};for(let O in T)E[O]=po(y,T[O]);return d(y,E)}),u&&!h&&q.push(function(y){var E,A;let b=y.theme,T=(A=(E=b==null?void 0:b.components)==null?void 0:E[u])==null?void 0:A.variants;return T?Pl(y,T):null}),w||q.push(kt),Array.isArray(te[0])){let R=te.shift(),y=new Array(D.length).fill(""),b=new Array(q.length).fill(""),T;T=[...y,...R,...b],T.raw=[...y,...R.raw,...b],D.unshift(T)}let oe=[...D,...te,...q],M=S(...oe);return l.muiName&&(M.muiName=l.muiName),process.env.NODE_ENV!=="production"&&(M.displayName=Vd(u,p,l)),M};return S.withConfig&&(P.withConfig=S.withConfig),P}}function Vd(t,e,r){return t?`${t}${Qe(e||"")}`:`Styled(${co(r)})`}function jd(t,e){let r;return process.env.NODE_ENV!=="production"&&t&&(r=`${t}-${Tl(e||"Root")}`),r}function Wd(t){for(let e in t)return!1;return!0}function Ud(t){return typeof t=="string"&&t.charCodeAt(0)>96}function Tl(t){return t&&t.charAt(0).toLowerCase()+t.slice(1)}var Hd=fo(),ei=Hd;function tr(t,e){let r=c({},e);for(let o in t)if(Object.prototype.hasOwnProperty.call(t,o)){let n=o;if(n==="components"||n==="slots")r[n]=c(c({},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]=c({},a);for(let l in i)if(Object.prototype.hasOwnProperty.call(i,l)){let s=l;r[n][s]=tr(i[s],a[s])}}}else r[n]===void 0&&(r[n]=t[n])}return r}function ti(t){let{theme:e,name:r,props:o}=t;return!e||!e.components||!e.components[r]||!e.components[r].defaultProps?o:tr(e.components[r].defaultProps,o)}function mo({props:t,name:e,defaultTheme:r,themeId:o}){let n=Zn(r);return o&&(n=n[o]||n),ti({theme:n,name:e,props:t})}function ho(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=qe(Ur());var X=qe(Ur());var qd=st(),Yd=ei("div",{name:"MuiStack",slot:"Root",overridesResolver:(t,e)=>e.root});function Kd(t){return mo({props:t,name:"MuiStack",defaultTheme:qd})}function Zd(t,e){let r=Et.Children.toArray(t).filter(Boolean);return r.reduce((o,n,i)=>(o.push(n),i<r.length-1&&o.push(Et.cloneElement(e,{key:`separator-${i}`})),o),[])}var Qd=t=>({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[t],Xd=({ownerState:t,theme:e})=>{let r=c({display:"flex",flexDirection:"column"},ie({theme:e},ro({values:t.direction,breakpoints:e.breakpoints.values}),o=>({flexDirection:o})));if(t.spacing){let o=Zt(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=ro({values:t.direction,base:n}),a=ro({values:t.spacing,base:n});typeof i=="object"&&Object.keys(i).forEach((s,u,p)=>{if(!i[s]){let m=u>0?i[p[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${Qd(u?i[u]:t.direction)}`]:Re(o,s)}}))}return r=ml(e.breakpoints,r),r};function ri(t={}){let{createStyledComponent:e=Yd,useThemeProps:r=Kd,componentName:o="MuiStack"}=t,n=()=>ho({root:["root"]},s=>lo(o,s),{}),i=e(Xd),a=Et.forwardRef(function(s,u){let p=r(s),_=so(p),{component:m="div",direction:d="column",spacing:x=0,divider:h,children:w,className:C,useFlexGap:S=!1}=_,v=k(_,["component","direction","spacing","divider","children","className","useFlexGap"]),P={direction:d,spacing:x,useFlexGap:S},F=n();return _jsxruntime.jsx.call(void 0, i,g(c({as:m,ownerState:P,ref:u,className:Cl(F.root,C)},v),{children:h?Zd(w,h):w}))});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 kl=ri();process.env.NODE_ENV!=="production"&&(kl.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 go=kl;var rm=_styled2.default.call(void 0, (0, _material.Typography))(({theme:t})=>({fontWeight:"bold"}));function Al(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, go,{children:_jsxruntime.jsx.call(void 0, rm,g(c({},o),{children:e}))}),_jsxruntime.jsx.call(void 0, go,{direction:i?"row":"column",justifyContent:i?"flex-end":"center",children:r})]}),a&&_jsxruntime.jsx.call(void 0, _material.Divider,{orientation:"vertical",flexItem:!0})]})}function xo(t){let{typographyProps:e,onChange:r,onEscape:o,value:n,displayEditButton:i,displaySaveButton:a,textFieldProps:l,isEditing:s,isLoading:u,error:p}=t,_=l||{},{InputProps:f,value:m,onKeyDown:d,onChange:x}=_,h=k(_,["InputProps","value","onKeyDown","onChange"]),[w,C]=_react.useState.call(void 0, !1),[S,v]=_react.useState.call(void 0, !1),[P,F]=_react.useState.call(void 0, );return _react.useEffect.call(void 0, ()=>{F(n)},[n]),_react.useEffect.call(void 0, ()=>{C(!!s)},[s]),_react.useEffect.call(void 0, ()=>{p&&v(!0)},[p]),_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[!w&&!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,g(c({onClick:()=>{C(!0)}},e),{children:P})),i&&_jsxruntime.jsx.call(void 0, _material.IconButton,{onClick:()=>{C(!0)},children:_jsxruntime.jsx.call(void 0, _iconsmaterial.Edit,{})})]}),(w||u||S)&&_jsxruntime.jsx.call(void 0, _material.ClickAwayListener,{onClickAway:()=>C(!1),children:_jsxruntime.jsx.call(void 0, _material.TextField,c({disabled:u,autoFocus:!0,value:P,error:S,onKeyDown:D=>{D.key==="Enter"&&(r(P),C(!1)),D.key==="Escape"&&(F(n),C(!1),v(!1),o&&o(n,P))},onChange:D=>{let te=D.target.value;F(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),C(!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 It(t){let i=t,{onSearch:e}=i,r=k(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,c({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 Bl(t){let{title:e,children:r,onBack:o,onClose:n,onUpdate:i,onSearch:a,storagePath:l,toolbarProps:s}=t,[u,p]=_react.useState.call(void 0, !1),[f,m]=_react.useState.call(void 0, "");_react.useEffect.call(void 0, ()=>{m(e)},[e]);let d=_react.useRef.call(void 0, null);_react.useEffect.call(void 0, ()=>{if(a&&l){let C=localStorage.getItem(l);d.current&&(d.current.value=C),a(C||"")}},[l]);let x=_material.useMediaQuery.call(void 0, C=>C.breakpoints.down("sm"));function h(C){l&&localStorage.setItem(l,C),a&&a(C)}let w={component:"h1",variant:"h4",sx:{fontWeight:"500"}};return _jsxruntime.jsx.call(void 0, _material.Toolbar,g(c({},s),{children:_jsxruntime.jsxs.call(void 0, _material.Box,{sx:{display:"flex",flexDirection:x||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, xo,{typographyProps:w,value:f,onChange:C=>{i&&i(C)}}),!i&&_jsxruntime.jsx.call(void 0, _material.Typography,g(c({},w),{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, It,{inputRef:d,autoFocus:!0,onSearch:h}),r]})]})}))}function ci(t){let M=t,{value:e,label:r,options:o,isLoading:n,form:i,table:a,tableProps:l,onChange:s,onSearch:u,renderValue:p,dialogProps:f,disabled:m,filterOptions:d,optionKeyName:x}=M,h=k(M,["value","label","options","isLoading","form","table","tableProps","onChange","onSearch","renderValue","dialogProps","disabled","filterOptions","optionKeyName"]),{isOpen:w,openDialog:C,closeDialog:S}=_hooks.useDialog.call(void 0, ),[v,P]=_react.useState.call(void 0, null),F=i||Ln.default.Fragment,_=_lodash2.default.debounce(R=>u(R),500),D=_react.useCallback.call(void 0, (R,y)=>$(this,null,function*(){_(y)}),[_]),te=_react.useCallback.call(void 0, (R,y,b)=>{if(x&&(y!=null&&y[x].includes("Adicionar op\xE7\xE3o:"))){let T=y[x].replace("Adicionar op\xE7\xE3o:","").trim().replace(/["']/g,""),E=g(c({},y),{[x]:T});s&&s(E);return}s&&s(y)},[s]);function q(R,y=!1,b=!1){var T;if(R){let E=Ln.default.Children.toArray((T=R.props)==null?void 0:T.children),A=E.length===1?0:1;return E.splice(A,0,_jsxruntime.jsx.call(void 0, _material.IconButton,{sx:{padding:"2px"},size:"small",color:"default",onClick:()=>C(),disabled:b,children:_jsxruntime.jsx.call(void 0, _iconsmaterial.SearchOutlined,{fontSize:"small"})})),y&&E.unshift(_jsxruntime.jsx.call(void 0, _material.IconButton,{disabled:!0,children:_jsxruntime.jsx.call(void 0, _material.CircularProgress,{color:"primary",size:18})})),Ln.default.cloneElement(R,{},E)}return R}function oe(R,y){if(!x)return R;let T=_material.createFilterOptions.call(void 0, )(R,y),{inputValue:E}=y,A=R.some(B=>E===B[x]);return E!==""&&!A&&T.push({[x]:`Adicionar op\xE7\xE3o: "${E}"`}),T}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:D,options:o,getOptionLabel:p,filterOptions:oe,renderInput:R=>_jsxruntime.jsx.call(void 0, _material.TextField,c(g(c({label:r,onDoubleClick:()=>{m||C()}},R),{InputProps:g(c({},R.InputProps),{endAdornment:q(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, Le,g(c({open:w,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, It,{placeholder:"Pesquisar",onSearch:R=>P(R)}),i&&_jsxruntime.jsx.call(void 0, F,{})]}),_jsxruntime.jsx.call(void 0, a,c({query:v,enableTransporter:!0,onTransport:R=>{S(),s&&s(R)}},l))]})}))})]})}var Rm={dialogProps:{maxWidth:"md",fullWidth:!0}};ci.defaultProps=Rm;function pi(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 fi(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 ke=qe(Gl()),rr=qe(Kl()),ru=qe(Ql()),ih=Object.prototype.toString,ah=Error.prototype.toString,sh=RegExp.prototype.toString,lh=typeof Symbol!="undefined"?Symbol.prototype.toString:()=>"",uh=/^Symbol\((.*)\)(.*)$/;function ch(t){return t!=+t?"NaN":t===0&&1/t<0?"-0":""+t}function Xl(t,e=!1){if(t==null||t===!0||t===!1)return""+t;let r=typeof t;if(r==="number")return ch(t);if(r==="string")return e?`"${t}"`:t;if(r==="function")return"[Function "+(t.name||"anonymous")+"]";if(r==="symbol")return lh.call(t).replace(uh,"Symbol($1)");let o=ih.call(t).slice(8,-1);return o==="Date"?isNaN(t.getTime())?""+t:t.toISOString(t):o==="Error"||t instanceof Error?"["+ah.call(t)+"]":o==="RegExp"?sh.call(t):null}function je(t,e){let r=Xl(t,e);return r!==null?r:JSON.stringify(t,function(o,n){let i=Xl(this[o],e);return i!==null?i:n},2)}function ou(t){return t==null?[]:[].concat(t)}var nu,iu,au,ph=/\$\{\s*(\w+)\s*\}/g;nu=Symbol.toStringTag;var To=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[nu]="Error",this.name="ValidationError",this.value=r,this.path=o,this.type=n,this.errors=[],this.inner=[],ou(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]}};iu=Symbol.hasInstance;au=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(ph,(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 To(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[au]="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[iu](e){return To[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"},bi={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},vi={isValue:"${path} field must be ${value}"},wo={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},So={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"},su={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)}},g2=Object.assign(Object.create(null),{mixed:Be,string:he,number:Je,date:bi,object:wo,array:So,boolean:vi,tuple:su}),Do=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 p=a(...l)?n:i;return(u=p==null?void 0:p(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(!Do(n))throw new TypeError("conditions must return a schema object");return n.resolve(r)}},Co={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]===Co.context,this.isValue=this.key[0]===Co.value,this.isSibling=!this.isContext&&!this.isValue;let o=this.isContext?Co.context:this.isValue?Co.value:"";this.path=this.key.slice(o.length),this.getter=this.path&&(0,ke.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 Ie=t=>t==null;function At(t){function e({value:r,path:o="",options:n,originalValue:i,schema:a},l,s){let{name:u,test:p,params:f,message:m,skipAbsent:d}=t,{parent:x,context:h,abortEarly:w=a.spec.abortEarly,disableStackTrace:C=a.spec.disableStackTrace}=n;function S(M){return We.isRef(M)?M.getValue(r,x,h):M}function v(M={}){let R=Object.assign({value:r,originalValue:i,label:a.spec.label,path:M.path||o,spec:a.spec,disableStackTrace:M.disableStackTrace||C},f,M.params);for(let b of Object.keys(R))R[b]=S(R[b]);let y=new ce(ce.formatError(M.message||m,R),r,R.path,M.type||u,R.disableStackTrace);return y.params=R,y}let P=w?l:s,F={path:o,parent:x,type:u,from:n.from,createError:v,resolve:S,options:n,originalValue:i,schema:a},_=M=>{ce.isError(M)?P(M):M?s(null):P(v())},D=M=>{ce.isError(M)?P(M):l(M)};if(d&&Ie(r))return _(!0);let q;try{var oe;if(q=p.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(_,D)}}catch(M){D(M);return}_(q)}return e.OPTIONS=t,e}function fh(t,e,r,o=r){let n,i,a;return e?((0,ke.forEach)(e,(l,s,u)=>{let p=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(p,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[p])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[p],t=t.fields[p]}i=p,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(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 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 Mt(t,e=new Map){if(Do(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]=Mt(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,Mt(n,e))}else if(t instanceof Set){r=new Set,e.set(t,r);for(let o of t)r.add(Mt(o,e))}else if(t instanceof Object){r={},e.set(t,r);for(let[o,n]of Object.entries(t))r[o]=Mt(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 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(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=Mt(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&&Ie(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 p of Object.values(this.internalTests))p&&u.push(p);this.runTests({path:i,value:s,originalValue:a,options:r,tests:u},o,p=>{if(p.length)return n(p,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,p=h=>{n||(n=!0,r(h,a))},f=h=>{n||(n=!0,o(h,a))},m=i.length,d=[];if(!m)return f([]);let x={value:a,originalValue:l,path:s,options:u,schema:this};for(let h=0;h<i.length;h++){let w=i[h];w(x,p,function(S){S&&(Array.isArray(S)?d.push(...S):d.push(S)),--m<=0&&f(d)})}}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],p=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,d)=>this.resolve(p)._validate(u,p,m,d)}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):Mt(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=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=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=ou(e).map(i=>new We(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=Be.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=Be.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,p)=>p.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}=fh(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 dh=()=>!0;function mh(t){return new ko(t)}var ko=class extends ae{constructor(e){super(typeof e=="function"?{type:"mixed",check:e}:Object.assign({type:"mixed",check:dh},e))}};mh.prototype=ko.prototype;function hh(){return new Eo}var Eo=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=vi.isValue){return this.test({message:e,name:"is-value",exclusive:!0,params:{value:"true"},test(r){return Ie(r)||r===!0}})}isFalse(e=vi.isValue){return this.test({message:e,name:"is-value",exclusive:!0,params:{value:"false"},test(r){return Ie(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)}};hh.prototype=Eo.prototype;var gh=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function yh(t){let e=Ci(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 Ci(t){var e,r;let o=gh.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 xh=/^[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])?)*$/,bh=/^((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,vh=/^(?:[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,Ch="^\\d{4}-\\d{2}-\\d{2}",wh="\\d{2}:\\d{2}:\\d{2}",Sh="(([+-]\\d{2}(:?\\d{2})?)|Z)",Ph=new RegExp(`${Ch}T${wh}(\\.\\d+)?${Sh}$`),Th=t=>Ie(t)||t===t.trim(),kh={}.toString();function pe(){return new Io}var Io=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===kh?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(xh,{name:"email",message:e,excludeEmptyString:!0})}url(e=he.url){return this.matches(bh,{name:"url",message:e,excludeEmptyString:!0})}uuid(e=he.uuid){return this.matches(vh,{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(Ph,{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=Ci(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=Ci(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:Th})}lowercase(e=he.lowercase){return this.transform(r=>Ie(r)?r:r.toLowerCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>Ie(r)||r===r.toLowerCase()})}uppercase(e=he.uppercase){return this.transform(r=>Ie(r)?r:r.toUpperCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>Ie(r)||r===r.toUpperCase()})}};pe.prototype=Io.prototype;var Eh=t=>t!=+t;function Ih(){return new Ao}var Ao=class extends ae{constructor(){super({type:"number",check(e){return e instanceof Number&&(e=e.valueOf()),typeof e=="number"&&!Eh(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=>Ie(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=>Ie(n)?n:Math[e](n))}};Ih.prototype=Ao.prototype;var lu=new Date(""),Ah=t=>Object.prototype.toString.call(t)==="[object Date]";function uu(){return new ut}var ut=class extends ae{constructor(){super({type:"date",check(e){return Ah(e)&&!isNaN(e.getTime())}}),this.withMutation(()=>{this.transform((e,r,o)=>!o.spec.coerce||o.isType(e)||e===null?e:(e=yh(e),isNaN(e)?ut.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=bi.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=bi.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)}})}};ut.INVALID_DATE=lu;uu.prototype=ut.prototype;uu.INVALID_DATE=lu;function Mh(t,e=[]){let r=[],o=new Set,n=new Set(e.map(([a,l])=>`${a}-${l}`));function i(a,l){let s=(0,ke.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):Do(l)&&"deps"in l&&l.deps.forEach(s=>i(s,a))}return ru.default.array(Array.from(o),r).reverse()}function Jl(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 cu(t){return(e,r)=>Jl(t,e)-Jl(t,r)}var pu=(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 Po(t){if("fields"in t){let e={};for(let[r,o]of Object.entries(t.fields))e[r]=Po(o);return t.setFields(e)}if(t.type==="array"){let e=t.optional();return e.innerType&&(e.innerType=Po(e.innerType)),e}return t.type==="tuple"?t.optional().clone({types:t.spec.types.map(Po)}):"optional"in t?t.optional():t}var Fh=(t,e)=>{let r=[...(0,ke.normalizePath)(e)];if(r.length===1)return r[0]in t;let o=r.pop(),n=(0,ke.getter)((0,ke.join)(r),!0)(t);return!!(n&&o in n)},eu=t=>Object.prototype.toString.call(t)==="[object Object]";function tu(t,e){let r=Object.keys(t.fields);return Object.keys(e).filter(o=>r.indexOf(o)===-1)}var Oh=cu([]);function ve(t){return new Mo(t)}var Mo=class extends ae{constructor(e){super({type:"object",check(r){return eu(r)||typeof r=="function"}}),this.fields=Object.create(null),this._sortErrors=Oh,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}),p=!1;for(let f of l){let m=i[f],d=f in n;if(m){let x,h=n[f];u.path=(r.path?`${r.path}.`:"")+f,m=m.resolve({value:h,context:r.context,parent:s});let w=m instanceof ae?m.spec:void 0,C=w==null?void 0:w.strict;if(w!=null&&w.strip){p=p||f in n;continue}x=!r.__validating||!C?m.cast(n[f],u):n[f],x!==void 0&&(s[f]=x)}else d&&!a&&(s[f]=n[f]);(d!==f in s||s[f]!==n[f])&&(p=!0)}return p?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||!eu(u)){n(s,u);return}a=a||u;let p=[];for(let f of this._nodes){let m=this.fields[f];!m||We.isRef(m)||p.push(m.asNestedTest({options:r,key:f,parent:u,parentPath:r.path,originalParent:a}))}this.runTests({tests:p,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=Mh(e,r),o._sortErrors=cu(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 Po(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,ke.getter)(e,!0);return this.transform(i=>{if(!i)return i;let a=i;return Fh(i,e)&&(a=Object.assign({},i),o||delete a[e],a[r]=n(i)),a})}json(){return this.transform(pu)}exact(e){return this.test({name:"exact",exclusive:!0,message:e||wo.exact,test(r){if(r==null)return!0;let o=tu(this.schema,r);return o.length===0||this.createError({params:{properties:o.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(e=!0,r=wo.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=tu(this.schema,n);return!e||i.length===0||this.createError({params:{unknown:i.join(", ")}})}});return o.spec.noUnknown=e,o}unknown(e=!0,r=wo.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(rr.camelCase)}snakeCase(){return this.transformKeys(rr.snakeCase)}constantCase(){return this.transformKeys(e=>(0,rr.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=Mo.prototype;function Dh(t){return new Fo(t)}var Fo=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 p;if(!l||!a||!this._typeCheck(u)){n(s,u);return}let f=new Array(u.length);for(let d=0;d<u.length;d++){var m;f[d]=a.asNestedTest({options:r,index:d,parent:u,parentPath:r.path,originalParent:(m=r.originalValue)!=null?m:e})}this.runTests({value:u,tests:f,originalValue:(p=r.originalValue)!=null?p:e,options:r},o,d=>n(d.concat(s),u))})}clone(e){let r=super.clone(e);return r.innerType=this.innerType,r}json(){return this.transform(pu)}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(!Do(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=So.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||So.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||So.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}};Dh.prototype=Fo.prototype;function Rh(t){return new Oo(t)}var Oo=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(su.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 p;u[f]=m.asNestedTest({options:r,index:f,parent:l,parentPath:r.path,originalParent:(p=r.originalValue)!=null?p: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}};Rh.prototype=Oo.prototype;var _isStrongPassword = require('validator/lib/isStrongPassword'); var _isStrongPassword2 = _interopRequireDefault(_isStrongPassword);function ct(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 Hh=_react.forwardRef.call(void 0, function(e,r){return _jsxruntime.jsx.call(void 0, _material.Slide,c({direction:"up",ref:r},e))});function nr(n){var i=n,{children:t,height:e,fullWidth:r=!0}=i,o=k(i,["children","height","fullWidth"]);return _jsxruntime.jsx.call(void 0, _material.Dialog,g(c({disableRestoreFocus:!0,fullWidth:r,TransitionComponent:Hh,sx:c({"& .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 Si({children:t}){return _jsxruntime.jsx.call(void 0, _useDialogs.DialogsProvider,{children:t})}function Pi(t){let a=t,{dialogComponent:e,payload:r,label:o}=a,n=k(a,["dialogComponent","payload","label"]),i=_useDialogs.useDialogs.call(void 0, );return _jsxruntime.jsx.call(void 0, _material.Button,g(c({variant:"contained",onClick:()=>{i.open(e,r)}},n),{children:o||" Adicionar"}))}function ir(t){let e=_material.useTheme.call(void 0, );return _jsxruntime.jsx.call(void 0, _material.Stack,c({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 ar(t){let e=_material.useTheme.call(void 0, );return _jsxruntime.jsx.call(void 0, _material.Typography,c({component:"h2",variant:"button",sx:{fontSize:"14px",color:e.palette.grey[500],whiteSpace:"nowrap"}},t))}function sr({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 lr(r){var o=r,{children:t}=o,e=k(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,g(c({padding:"16px"},e),{children:t}))})}function ur(t){let e=_material.useTheme.call(void 0, );return _jsxruntime.jsx.call(void 0, _material.Stack,c({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 cr(t){return _jsxruntime.jsx.call(void 0, _material.Stack,c({direction:"row",alignItems:"center",gap:1,marginLeft:"auto"},t))}function Ti(r){var o=r,{children:t}=o,e=k(o,["children"]);return _jsxruntime.jsx.call(void 0, N,g(c({variant:"outlined",color:"error"},e),{children:"Cancelar"}))}function ki(o){var n=o,{children:t,label:e}=n,r=k(n,["children","label"]);return _jsxruntime.jsx.call(void 0, N,g(c({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 $(this,null,function*(){try{yield i(n),e()}catch(s){}})}return _jsxruntime.jsxs.call(void 0, nr,{open:t,onClose:e,children:[_jsxruntime.jsxs.call(void 0, ir,{children:[_jsxruntime.jsx.call(void 0, ar,{children:"Tem certeza de que deseja excluir este registro?"}),_jsxruntime.jsx.call(void 0, sr,{onClose:e})]}),_jsxruntime.jsx.call(void 0, lr,{children:_jsxruntime.jsx.call(void 0, _material.Alert,{severity:"error",children:"O registro ser\xE1 removido permanentemente. Deseja continuar?"})}),_jsxruntime.jsx.call(void 0, ur,{children:_jsxruntime.jsxs.call(void 0, cr,{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 dg={Root:nr,Provider:Si,AdicionarButton:Pi,Header:ir,Title:ar,ActionClose:sr,Content:lr,Footer:ur,Actions:cr,ActionCancelar:Ti,ActionSalvar:ki,ConfirmDelete:Ii},j= exports.DialogV2 =dg;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 bu={senhaAtual:"",senhaNova:""},Pg=ve().shape({senhaAtual:pe().required("Informe a Senha Atual."),senhaNova:pe().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:p}=_hooks.useCredentials.call(void 0, r),{setValidationErrors:f,validationProps:m}=_hooks.useValidations.call(void 0, ),{data:d,handleChange:x,setData:h,changeValue:w}=_hooks.useForm.call(void 0, bu),[C,S]=_react.useState.call(void 0, !1),[v,P]=_react.useState.call(void 0, null);_react.useEffect.call(void 0, ()=>{l&&w("senhaAtual",l)},[l]),_react.useEffect.call(void 0, ()=>{d.senhaNova&&S(_isStrongPassword2.default.call(void 0, d.senhaNova,{minLength:8,minLowercase:1,minUppercase:1,minNumbers:1,minSymbols:1}))},[d.senhaNova]);function F(){return $(this,null,function*(){f(null),P(null),Pg.validate(d,{abortEarly:!1}).then(()=>$(this,null,function*(){var y;let{senhaAtual:M,senhaNova:R}=d;try{(yield u(M,R,s))&&(n&&n(),h(bu))}catch(b){if(i&&i(b),_axios.isAxiosError.call(void 0, b)){P((y=b.response)==null?void 0:y.data.message);return}P("Ocorreu um erro ao tentar alterar a senha")}})).catch(M=>{f(M)})})}function _(){return(d==null?void 0:d.senhaNova.length)>=8}function D(){if(d!=null&&d.senhaNova){let M=d==null?void 0:d.senhaNova.match(/[a-z]/g);return Array.isArray(M)&&M.length>0}return!1}function te(){if(d!=null&&d.senhaNova){let M=d==null?void 0:d.senhaNova.match(/[A-Z]/g);return Array.isArray(M)&&M.length>0}return!1}function q(){if(d!=null&&d.senhaNova){let M=d==null?void 0:d.senhaNova.match(/\d/g);return Array.isArray(M)&&M.length>0}return!1}function oe(){if(d!=null&&d.senhaNova){let M=d==null?void 0:d.senhaNova.match(/\W/g);return Array.isArray(M)&&M.length>0}return!1}return _jsxruntime.jsxs.call(void 0, j.Root,{open:e,onClose:M=>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, ct,c({name:"senhaAtual",label:"Senha Atual",value:(d==null?void 0:d.senhaAtual)||"",onChange:x},m("senhaAtual")))}),_jsxruntime.jsx.call(void 0, _material.Grid2,{size:12,children:_jsxruntime.jsx.call(void 0, ct,c({name:"senhaNova",label:"Nova Senha",value:(d==null?void 0:d.senhaNova)||"",onChange:x},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:D(),message:"A nova senha deve ter ao menos uma letra min\xFAscula"}),_jsxruntime.jsx.call(void 0, ft,{isValid:te(),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"})]}),v&&_jsxruntime.jsx.call(void 0, _material.Grid2,{size:12,children:_jsxruntime.jsx.call(void 0, _material.Alert,{severity:"error",children:v})})]})}),_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:F,isLoading:p,disabled:!C})]})})]})}var Og=ve().shape({email:pe().required("Informe o e-mail"),password:pe().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,p]=_react.useState.call(void 0, !1),[f,m]=_react.useState.call(void 0, !1),[d,x]=_react.useState.call(void 0, !1),[h,w]=_react.useState.call(void 0, null),{login:C}=_hooks.useCredentials.call(void 0, n),{validationProps:S,setValidationErrors:v}=_hooks.useValidations.call(void 0, );function P(){return $(this,null,function*(){v(null),w(null),Og.validate({email:i,password:l},{abortEarly:!1}).then(()=>$(this,null,function*(){var F,_;p(!0);try{let D=yield C(i,l);D&&e(D)}catch(D){if(_axios.isAxiosError.call(void 0, D)){if(((F=D.response)==null?void 0:F.data.code)==="E_FIRST_ACCESS"){m(!0);return}w((_=D.response)==null?void 0:_.data.message)}r(D)}})).catch(F=>{v(F)}).finally(()=>{p(!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,c({name:"email",label:"E-mail",margin:"normal",autoFocus:!0,value:i||"",onChange:F=>a(F.target.value)},S("email"))),_jsxruntime.jsx.call(void 0, ct,c({name:"password",label:"Senha",size:"medium",placeholder:"Sua senha",value:l||"",onChange:F=>s(F.target.value),onKeyDown:F=>F.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}),d&&_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:()=>$(this,null,function*(){return m(!1)}),onSuccess:()=>{m(!1),x(!0),s("")},credentialsConfig:n})]})}var Lg=ve().shape({email:pe().required("Informe o e-mail")});function Mi(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,p]=_react.useState.call(void 0, null),{recuperarSenha:f}=_hooks.useCredentials.call(void 0, r),{validationProps:m,setValidationErrors:d}=_hooks.useValidations.call(void 0, );function x(){return $(this,null,function*(){d(null),Lg.validate({email:o},{abortEarly:!1}).then(()=>$(this,null,function*(){var h;try{a(!0),yield f(o),s(!0)}catch(w){p((h=w.response)==null?void 0:h.data.message)}finally{a(!1)}})).catch(h=>{d(h)})})}return _jsxruntime.jsxs.call(void 0, _material.Box,{component:"form",children:[_jsxruntime.jsx.call(void 0, _material.TextField,c({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:x,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 Oi(t){var p;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 $(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:(p=e==null?void 0:e.empresas)==null?void 0:p.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 Su=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 fr(t){let u=t,{value:e,onChange:r}=u,o=k(u,["value","onChange"]),[n,i]=_react.useState.call(void 0, ""),a=e!==void 0,l=_react.useMemo.call(void 0, ()=>a?Su(e||""):n,[e,n,a]);return _jsxruntime.jsx.call(void 0, _TextField2.default,c({value:l,onChange:p=>{let f=Su(p.target.value);if(a||i(f),r){let m=g(c({},p),{target:g(c({},p.target),{value:f})});r(m)}},inputProps:{maxLength:15}},o))}function dr({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(d=>s.includes(d))||"",p=e.split("");p[a]=u;let f=p.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 Ri(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),[p,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 d(){return $(this,null,function*(){try{f(!0);let x=yield m({channel:o.channel,target:o.target,code:a});x&&n(x),r()}catch(x){u(x.response.data.message)}finally{f(!1)}})}return _jsxruntime.jsxs.call(void 0, j.Root,{open:e,onClose:x=>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, dr,{value:a,onChange:x=>{l(x)}}),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:d,isLoading:p,disabled:a.length!=6})]})})]})}var cy=ve().shape({contato:pe().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 Lo(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:p,changeValue:f,data:m,validate:d,validationErrors:x}=_hooks.useForm.call(void 0, {contato:""},cy),[h,w]=_react.useState.call(void 0, !1);return _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, "form",{onSubmit:S=>$(this,null,function*(){S.preventDefault(),d(v=>$(this,null,function*(){try{s(!1),a(!0);let P=yield u({channel:e==="otp-email"?"email":"whatsapp",target:v.contato});w(!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,c({autoFocus:!0,name:"contato",label:"E-mail",value:m.contato||"",onChange:p,fullWidth:!0},x("contato"))),e==="otp-whatsapp"&&_jsxruntime.jsx.call(void 0, fr,c({autoFocus:!0,name:"contato",label:"Whatsapp",value:m.contato||"",onChange:S=>{f("contato",S.target.value.replace(/[^\d+]/g,""))},fullWidth:!0},x("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, Ri,{onLoginSuccess:o,open:h,onClose:S=>$(this,null,function*(){w(!1)}),payload:{target:m.contato,channel:e==="otp-email"?"email":"whatsapp"},credentialsConfig:r})]})}var xy={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 _i(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),[p,f]=_react.useState.call(void 0, "login"),m=_material.useTheme.call(void 0, ),d=_material.useMediaQuery.call(void 0, m.breakpoints.up("md"));_react.useEffect.call(void 0, ()=>{u&&n&&n()},[u]);function x(v){return $(this,null,function*(){try{if(Array.isArray(v==null?void 0:v.empresas)){if((v==null?void 0:v.empresas.length)===1){let P=yield s(v==null?void 0:v.token,v.empresas[0].uuid);P&&r(P);return}f("licensa"),l(v);return}r(v)}catch(P){o(P)}})}function h(v){return $(this,null,function*(){o(v)})}function w(v){f(v)}function C(){f("login")}let S=xy[p];return _jsxruntime.jsxs.call(void 0, _material.Stack,{component:"section",width:d?"46%":"100%",minWidth:"420px",maxWidth:d?"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, fi,{label:i,subTitle:S}),_jsxruntime.jsxs.call(void 0, _material.Box,{sx:{marginTop:2},children:[p==="login"&&_jsxruntime.jsx.call(void 0, Ai,{credentialsConfig:e,onLoginSuccess:x,onLoginFailed:h,onOptionsClick:w}),p==="licensa"&&_jsxruntime.jsx.call(void 0, Oi,{loginData:a,credentialsConfig:e,onLoginSuccess:r,onLoginFailed:o}),p==="esqueci-senha"&&_jsxruntime.jsx.call(void 0, Mi,{onLoginClick:C,credentialsConfig:e}),p==="otp-email"&&_jsxruntime.jsx.call(void 0, Lo,{onLoginClick:C,onLoginSuccess:x,tipo:"otp-email",credentialsConfig:e}),p==="otp-whatsapp"&&_jsxruntime.jsx.call(void 0, Lo,{onLoginClick:C,onLoginSuccess:x,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:v=>v.palette.grey[500]},children:"Data C Sistemas"})]})]})}function $i(){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 Mu(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, pi,{children:e}):_jsxruntime.jsx.call(void 0, $i,{}),_jsxruntime.jsx.call(void 0, _i,c({},t))]})}var Ey=_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"}})),Iy=t=>_jsxruntime.jsx.call(void 0, Ey,c({},t)),zo=Iy;function zi(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, zo,{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, mt,{activeMenu:r,sx:{pl:s=>s.spacing(1.5)},menus:(e==null?void 0:e.items)||[],onMenuClick:o})})]})}function mt(t){let i=t,{menus:e,activeMenu:r,onMenuClick:o}=i,n=k(i,["menus","activeMenu","onMenuClick"]);return _jsxruntime.jsx.call(void 0, _material.List,g(c({component:"nav",disablePadding:!0},n),{children:e.map(a=>_jsxruntime.jsx.call(void 0, zi,{onMenuClick:o,activeMenu:r,menuItem:a},a.id))}))}function Vi(t){let{menus:e,activeMenu:r,onMenuClick:o}=t,[n,i]=_react.useState.call(void 0, null),a=(s,u,p)=>{i({element:s.currentTarget,id:u,items:p})},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, zo,{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, mt,{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 Du=(t,e)=>({width:t,transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.enteringScreen}),overflowX:"hidden"}),Ru=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)`}}),qy=_styles.styled.call(void 0, _material.Drawer,{shouldForwardProp:t=>t!=="open"&&t!=="width"})(({theme:t,open:e,width:r})=>c(c({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&&g(c({},Du(r,t)),{"& .MuiDrawer-paper":Du(r,t)})),!e&&g(c({},Ru(t)),{"& .MuiDrawer-paper":Ru(t)})));function Bu(t){let s=t,{open:e,items:r,width:o,activeMenu:n,onMenuClick:i,toggleMenu:a}=s,l=k(s,["open","items","width","activeMenu","onMenuClick","toggleMenu"]);return _jsxruntime.jsxs.call(void 0, qy,g(c({width:o,open:e,onClose:()=>a(!1)},l),{children:[_jsxruntime.jsx.call(void 0, _material.Toolbar,{}),e&&_jsxruntime.jsx.call(void 0, mt,{onMenuClick:i,activeMenu:n,menus:r}),!e&&_jsxruntime.jsx.call(void 0, Vi,{onMenuClick:i,activeMenu:n,menus:r})]}))}function _u(t){return _jsxruntime.jsx.call(void 0, _material.Box,c({m:2,sx:{display:"flex",flexDirection:"column",flexGrow:1}},t))}var _Avatar = require('@mui/material/Avatar'); var _Avatar2 = _interopRequireDefault(_Avatar);function Lu(t){let{user:e}=_providers.useUserContext.call(void 0, );return _jsxruntime.jsx.call(void 0, _Avatar2.default,c({src:e==null?void 0:e.avatarUrl,sx:{width:64,height:64,margin:"auto",mb:2}},t))}function Vo(t){let i=t,{children:e,value:r,index:o}=i,n=k(i,["children","value","index"]);return r!==o?null:_jsxruntime.jsx.call(void 0, _material.Box,g(c({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 Wi(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 sx=({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),[p,f]=_react.useState.call(void 0, null),[m,d]=_react.useState.call(void 0, !1),x=_react.useCallback.call(void 0, (C,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:C=>{var P;let S=(P=C.target.files)==null?void 0:P[0];if(!S)return;let v=new FileReader;v.onload=()=>{o(v.result),d(!0)},v.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:()=>d(!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:x})}),_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:(C,S)=>u(S)}),_jsxruntime.jsx.call(void 0, Ce,{children:_jsxruntime.jsx.call(void 0, _Button2.default,{variant:"contained",onClick:()=>$(void 0,null,function*(){if(!r||!p)return;let C=yield Wi(r,p);i(C),d(!1),t&&t(C)}),children:"Salvar"})})]})]})]})},zu=sx;var fx=ve().shape({name:pe().required("Informe o nome")});function qi(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,fx),[u,p]=_react.useState.call(void 0, !1),[f,m]=_react.useState.call(void 0, !1),[d,x]=_react.useState.call(void 0, !1),{uploadAvatar:h,atualizarUsuario:w}=_hooks.useCredentials.call(void 0, r);_react.useEffect.call(void 0, ()=>{i(e)},[e]),_react.useEffect.call(void 0, ()=>{d&&setTimeout(()=>{x(!1)},3e3)},[d]),_react.useEffect.call(void 0, ()=>{u&&setTimeout(()=>{p(!1)},3e3)},[u]);function C(){l(S=>$(this,null,function*(){try{m(!0),yield w(S),x(!0)}catch(v){p("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, zu,{src:n==null?void 0:n.avatarUrl,onSave:S=>{try{h(S),o&&(x(!0),o(!0))}catch(v){p("Ocorreu um erro ao atualizar a foto de perfil"),o&&o(!1,v)}}}),_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,c({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:()=>C(),variant:"contained",children:"Salvar"})})}),d&&_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 Ki(t){var x,h,w;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),[p,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 d(){return $(this,null,function*(){try{f(!0);let C=yield m(a);n(C.data)}catch(C){u(C.response.data.message)}finally{f(!1)}})}return _jsxruntime.jsxs.call(void 0, j.Root,{open:e,onClose:C=>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:`(${(x=o==null?void 0:o.whatsappNumber)==null?void 0:x.slice(0,2)}) ${(h=o==null?void 0:o.whatsappNumber)==null?void 0:h.slice(2,7)}-${(w=o==null?void 0:o.whatsappNumber)==null?void 0:w.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, dr,{value:a,onChange:C=>{l(C)}}),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:d,isLoading:p,disabled:a.length!=6})]})})]})}var zM=ve().shape({whatsappNumber:pe().required("Informe o n\xFAmero do whastapp").length(15)});function Ji(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:p,validate:f,validationErrors:m}=_hooks.useForm.call(void 0, e),[d,x]=_react.useState.call(void 0, !1),[h,w]=_react.useState.call(void 0, !1),{atualizarUsuario:C,gerarWhatsappVerificationCode:S}=_hooks.useCredentials.call(void 0, r);_react.useEffect.call(void 0, ()=>{u(e)},[e]);function v(){f(F=>$(this,null,function*(){try{l(!0);let _=yield C(F);o&&o(_.data)}catch(_){}finally{l(!1)}}))}function P(){return $(this,null,function*(){try{x(!0);let F=yield S();w(!0)}catch(F){}finally{x(!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:()=>$(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, fr,{disabled:!!(s!=null&&s.whatsappVerifiedAt),fullWidth:!1,name:"whatsappNumber",label:"Whastapp",value:s.whatsappNumber||"",onChange:F=>{p("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, N,{isLoading:a,onClick:v,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:d,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, Ki,{open:h,onClose:F=>$(this,null,function*(){w(!1)}),payload:e,credentialsConfig:r,onCodigoVerificado:F=>{u(F),w(!1)}})]})}function Gu(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, Vo,{value:e,index:0,children:_jsxruntime.jsx.call(void 0, qi,{credentialsConfig:i,usuario:o||{}})}),_jsxruntime.jsx.call(void 0, Vo,{value:e,index:1,children:_jsxruntime.jsx.call(void 0, Ji,{onWhastappSaved:a=>{n(a)},credentialsConfig:i,usuario:o||{}})})]})]})})}function ra(t){return _jsxruntime.jsx.call(void 0, _material.Stack,c({direction:"row",alignItems:"center",alignContent:"center",spacing:1,flex:1,flexGrow:1},t))}function oa({children:t}){return _jsxruntime.jsx.call(void 0, Ln.default.Fragment,{children:_jsxruntime.jsx.call(void 0, _material.AppBar,{position:"fixed",elevation:0,sx:{width:"100%",zIndex:e=>e.zIndex.drawer+1,borderBottom:e=>`1px solid ${e.palette.grey[300]}`},children:_jsxruntime.jsx.call(void 0, _material.Toolbar,{children:_jsxruntime.jsx.call(void 0, _material.Stack,{sx:{width:"100%"},direction:"row",alignContent:"center",alignItems:"center",justifyContent:"space-between",children:t})})})})}function na(t){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,g(c({},t),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "rect",{width:"20",height:"5",x:"2",y:"3",rx:"1"}),_jsxruntime.jsx.call(void 0, "path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8"}),_jsxruntime.jsx.call(void 0, "path",{d:"M10 12h4"})]})}))}function aa(t){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,g(c({},t),{children:_jsxruntime.jsx.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:_jsxruntime.jsx.call(void 0, "path",{d:"m6 9 6 6 6-6"})})}))}function la(t){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,g(c({},t),{children:_jsxruntime.jsx.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:_jsxruntime.jsx.call(void 0, "path",{d:"M12 3c7.2 0 9 1.8 9 9s-1.8 9-9 9-9-1.8-9-9 1.8-9 9-9"})})}))}function ua(t){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,g(c({},t),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"}),_jsxruntime.jsx.call(void 0, "circle",{cx:"9",cy:"7",r:"4"}),_jsxruntime.jsx.call(void 0, "path",{d:"M22 21v-2a4 4 0 0 0-3-3.87"}),_jsxruntime.jsx.call(void 0, "path",{d:"M16 3.13a4 4 0 0 1 0 7.75"})]})}))}function ca(t){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,g(c({},t),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "rect",{width:"7",height:"9",x:"3",y:"3",rx:"1"}),_jsxruntime.jsx.call(void 0, "rect",{width:"7",height:"5",x:"14",y:"3",rx:"1"}),_jsxruntime.jsx.call(void 0, "rect",{width:"7",height:"9",x:"14",y:"12",rx:"1"}),_jsxruntime.jsx.call(void 0, "rect",{width:"7",height:"5",x:"3",y:"16",rx:"1"})]})}))}function vr(t){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,g(c({},t),{children:_jsxruntime.jsx.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:_jsxruntime.jsx.call(void 0, "path",{d:"m6 9 6 6 6-6"})})}))}function fa(t){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,g(c({},t),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"m7 21-4.3-4.3c-1-1-1-2.5 0-3.4l9.6-9.6c1-1 2.5-1 3.4 0l5.6 5.6c1 1 1 2.5 0 3.4L13 21"}),_jsxruntime.jsx.call(void 0, "path",{d:"M22 21H7"}),_jsxruntime.jsx.call(void 0, "path",{d:"m5 11 9 9"})]})}))}var Hx=t=>({transition:t.transitions.create(["transform"],{duration:500})}),Gx=_styles.styled.call(void 0, vr,{shouldForwardProp:t=>t!=="open"})(({theme:t,open:e})=>c(c(c({},Hx(t)),e&&{transform:"rotate(-180deg)"}),!e&&{transform:"rotate(0)"}));function da(t){let{open:e}=t;return _jsxruntime.jsx.call(void 0, Gx,{fontSize:"small",open:e})}function ma(t){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,g(c({},t),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"M3 6h18"}),_jsxruntime.jsx.call(void 0, "path",{d:"M7 12h10"}),_jsxruntime.jsx.call(void 0, "path",{d:"M10 18h4"})]})}))}function ha(t){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,g(c({},t),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}),_jsxruntime.jsx.call(void 0, "path",{d:"M8 7v7"}),_jsxruntime.jsx.call(void 0, "path",{d:"M12 7v4"}),_jsxruntime.jsx.call(void 0, "path",{d:"M16 7v9"})]})}))}function ga(t){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,g(c({},t),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"m11 17 2 2a1 1 0 1 0 3-3"}),_jsxruntime.jsx.call(void 0, "path",{d:"m14 14 2.5 2.5a1 1 0 1 0 3-3l-3.88-3.88a3 3 0 0 0-4.24 0l-.88.88a1 1 0 1 1-3-3l2.81-2.81a5.79 5.79 0 0 1 7.06-.87l.47.28a2 2 0 0 0 1.42.25L21 4"}),_jsxruntime.jsx.call(void 0, "path",{d:"m21 3 1 11h-2"}),_jsxruntime.jsx.call(void 0, "path",{d:"M3 3 2 14l6.5 6.5a1 1 0 1 0 3-3"}),_jsxruntime.jsx.call(void 0, "path",{d:"M3 4h8"})]})}))}function xa(t){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,g(c({},t),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "circle",{cx:"11",cy:"11",r:"8"}),_jsxruntime.jsx.call(void 0, "path",{d:"m21 21-4.3-4.3"})]})}))}function ba(t){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,g(c({},t),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"M3 5v14"}),_jsxruntime.jsx.call(void 0, "path",{d:"M8 5v14"}),_jsxruntime.jsx.call(void 0, "path",{d:"M12 5v14"}),_jsxruntime.jsx.call(void 0, "path",{d:"M17 5v14"}),_jsxruntime.jsx.call(void 0, "path",{d:"M21 5v14"})]})}))}function va(t){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,g(c({},t),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"M17 22h-1a4 4 0 0 1-4-4V6a4 4 0 0 1 4-4h1"}),_jsxruntime.jsx.call(void 0, "path",{d:"M7 22h1a4 4 0 0 0 4-4v-1"}),_jsxruntime.jsx.call(void 0, "path",{d:"M7 2h1a4 4 0 0 1 4 4v1"})]})}))}function wa(t){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,g(c({},t),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"m6 17 5-5-5-5"}),_jsxruntime.jsx.call(void 0, "path",{d:"m13 17 5-5-5-5"})]})}))}function Pa(t){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,g(c({},t),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"m11 17-5-5 5-5"}),_jsxruntime.jsx.call(void 0, "path",{d:"m18 17-5-5 5-5"})]})}))}function Ta(t){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,g(c({},t),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "line",{x1:"4",x2:"20",y1:"12",y2:"12"}),_jsxruntime.jsx.call(void 0, "line",{x1:"4",x2:"20",y1:"6",y2:"6"}),_jsxruntime.jsx.call(void 0, "line",{x1:"4",x2:"20",y1:"18",y2:"18"})]})}))}function Ea(t){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,g(c({},t),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"}),_jsxruntime.jsx.call(void 0, "circle",{cx:"12",cy:"12",r:"3"})]})}))}function Ia(t){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,g(c({},t),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"}),_jsxruntime.jsx.call(void 0, "circle",{cx:"9",cy:"7",r:"4"}),_jsxruntime.jsx.call(void 0, "path",{d:"M22 21v-2a4 4 0 0 0-3-3.87"}),_jsxruntime.jsx.call(void 0, "path",{d:"M16 3.13a4 4 0 0 1 0 7.75"})]})}))}function Ma(t){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,g(c({},t),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z"}),_jsxruntime.jsx.call(void 0, "circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor"})]})}))}function Fa(t){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,g(c({},t),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"}),_jsxruntime.jsx.call(void 0, "polyline",{points:"16 17 21 12 16 7"}),_jsxruntime.jsx.call(void 0, "line",{x1:"21",x2:"9",y1:"12",y2:"12"})]})}))}function Oa(t){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,g(c({},t),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"}),_jsxruntime.jsx.call(void 0, "path",{d:"M3 3v5h5"}),_jsxruntime.jsx.call(void 0, "path",{d:"M12 7v5l4 2"})]})}))}function Da(t){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,g(c({},t),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z"}),_jsxruntime.jsx.call(void 0, "path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"}),_jsxruntime.jsx.call(void 0, "path",{d:"M12 17h.01"})]})}))}function Ra(t){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,g(c({},t),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"}),_jsxruntime.jsx.call(void 0, "path",{d:"M14 2v4a2 2 0 0 0 2 2h4"}),_jsxruntime.jsx.call(void 0, "path",{d:"M10 9H8"}),_jsxruntime.jsx.call(void 0, "path",{d:"M16 13H8"}),_jsxruntime.jsx.call(void 0, "path",{d:"M16 17H8"})]})}))}function _a(t){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,g(c({},t),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"M2.5 17a24.12 24.12 0 0 1 0-10 2 2 0 0 1 1.4-1.4 49.56 49.56 0 0 1 16.2 0A2 2 0 0 1 21.5 7a24.12 24.12 0 0 1 0 10 2 2 0 0 1-1.4 1.4 49.55 49.55 0 0 1-16.2 0A2 2 0 0 1 2.5 17"}),_jsxruntime.jsx.call(void 0, "path",{d:"m10 15 5-3-5-3z"})]})}))}function $a(t){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,g(c({},t),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "circle",{cx:"12",cy:"12",r:"10"}),_jsxruntime.jsx.call(void 0, "path",{d:"m4.9 4.9 14.2 14.2"})]})}))}function Na(t){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,g(c({},t),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z"}),_jsxruntime.jsx.call(void 0, "path",{d:"M15 5.764v15"}),_jsxruntime.jsx.call(void 0, "path",{d:"M9 3.236v15"})]})}))}function Va(t){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,g(c({},t),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"white",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0"}),_jsxruntime.jsx.call(void 0, "circle",{cx:"12",cy:"10",r:"3"})]})}))}function ja(t){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,g(c({},t),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"M22 8.35V20a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V8.35A2 2 0 0 1 3.26 6.5l8-3.2a2 2 0 0 1 1.48 0l8 3.2A2 2 0 0 1 22 8.35Z"}),_jsxruntime.jsx.call(void 0, "path",{d:"M6 18h12"}),_jsxruntime.jsx.call(void 0, "path",{d:"M6 14h12"}),_jsxruntime.jsx.call(void 0, "rect",{width:"12",height:"12",x:"6",y:"10"})]})}))}function Ua(t){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,g(c({},t),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "circle",{cx:"12",cy:"12",r:"10"}),_jsxruntime.jsx.call(void 0, "path",{d:"M22 2 2 22"})]})}))}function Ha(t){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,g(c({},t),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"M18 20a6 6 0 0 0-12 0"}),_jsxruntime.jsx.call(void 0, "circle",{cx:"12",cy:"10",r:"4"}),_jsxruntime.jsx.call(void 0, "circle",{cx:"12",cy:"12",r:"10"})]})}))}var z0={Circle:la,Dashboard:ca,Expandable:da,Down:vr,Negociacao:ga,Cadastro:na,Clientes:ua,Filter:ma,Search:xa,ChevronDown:aa,Kanban:ha,Erease:fa,BarCode:ba,TextCursor:va,OpenPanel:wa,ClosePanel:Pa,Menu:Ta,Configs:Ea,Users:Ia,Password:Ma,Logout:Fa,History:Oa,Help:Da,Video:_a,Docs:Ra,Block:$a,Maps:Na,MapPin:Va,Estoque:ja,Blocked:Ua,Profile:Ha},tt= exports.Icon =z0;function Ga(t){let e=k(t,[]);return _jsxruntime.jsx.call(void 0, _material.IconButton,g(c({},e),{children:_jsxruntime.jsx.call(void 0, tt.Menu,{})}))}var j0={Root:oa,Content:ra,ToggleMenu:Ga},W0= exports.Header =j0;var J0=_material.styled.call(void 0, _material.ListItemButton,{})(({theme:t})=>({height:"32px",cursor:"pointer",gap:t.spacing(2),transition:"0.2s ease-in-out",padding:`${t.spacing(.25)} ${t.spacing(2)} ${t.spacing(.25)} ${t.spacing(2)}`,"&:hover":{backgroundColor:"rgba(89, 195, 224, 15%);","& .MuiTypography-root":{color:t.palette.primary.main,transition:"0.2s ease-in-out"},"& .MuiSvgIcon-root":{color:t.palette.primary.main,transition:"0.2s ease-in-out"},"& .MuiIcon-root":{color:t.palette.primary.main,transition:"0.2s ease-in-out"}},"& .MuiIcon-root":{color:t.palette.grey[500],fontSize:"20px"},"& .MuiTypography-root":{fontSize:"0.805rem",color:t.palette.text.primary},"& .MuiSvgIcon-root":{fontSize:"0.955rem"},"& .MuiListItemIcon-root":{minWidth:"0px"}}));function qa({label:t,icon:e,visible:r=!0,children:o,selected:n=!1,onClick:i,link:a}){if(!r)return null;let[l,s]=_react.useState.call(void 0, !1),u=!!o;function p(){if(u){s(m=>!m);return}i&&a&&i(a)}function f(m){return typeof e=="string"?_jsxruntime.jsx.call(void 0, _material.Icon,{children:e}):m||_jsxruntime.jsx.call(void 0, tt.Circle,{})}return _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, _material.ListItem,{disableGutters:!0,disablePadding:!0,children:_jsxruntime.jsxs.call(void 0, J0,{selected:n,disableGutters:!0,onClick:m=>{m.stopPropagation(),p()},children:[_jsxruntime.jsx.call(void 0, _material.ListItemIcon,{children:f(e)}),_jsxruntime.jsx.call(void 0, _material.ListItemText,{primary:t}),u&&_jsxruntime.jsx.call(void 0, tt.Expandable,{open:l})]})}),u&&_jsxruntime.jsx.call(void 0, _material.Collapse,{in:l,timeout:"auto",unmountOnExit:!0,children:_jsxruntime.jsx.call(void 0, _material.List,{sx:{"& .MuiListItemButton-root":{paddingLeft:4},"& .MuiList-root > .MuiListItem-root > .MuiListItemButton-root":{paddingLeft:6},"& .MuiList-root > .MuiList-root > .MuiListItemButton-root":{paddingLeft:12}},disablePadding:!0,children:o})})]})}var cb=_material.styled.call(void 0, _material.ListItemButton,{})(({theme:t})=>({cursor:"pointer",padding:`${t.spacing(1)} ${t.spacing(0)} ${t.spacing(.25)} ${t.spacing(0)}`,minHeight:"32px",flexDirection:"column",justifyContent:"center",alignItem:"center",alignContent:"center","&:hover":{backgroundColor:"rgba(89, 195, 224, 15%);","& .MuiTypography-root":{color:t.palette.primary.main,transition:"0.2s ease-in-out"},"& .MuiSvgIcon-root":{color:t.palette.primary.main,transition:"0.2s ease-in-out"},"& .MuiIcon-root":{color:t.palette.primary.main,transition:"0.2s ease-in-out"}},"& .MuiIcon-root":{color:t.palette.grey[500],fontSize:"20px"},"& .MuiSvgIcon-root":{fontSize:"0.955rem"},"& .MuiTypography-root":{fontSize:"0.805rem",color:t.palette.text.primary},"& .MuiListItemIcon-root":{minWidth:"0px"}}));function Ku(t,e){return Ln.default.Children.map(t,r=>{var n;if(!Ln.default.isValidElement(r))return r;let o=(n=r.props)!=null&&n.children?Ku(r.props.children,e):null;return Ln.default.cloneElement(r,{open:e,children:o})})}function Ka(t){let{icon:e,label:r,link:o,id:n,selected:i=!1,children:a,onClick:l}=t,[s,u]=_react.useState.call(void 0, null);function p(){l&&o&&l(o)}function f(h,w){u({element:h.currentTarget,id:w})}function m(){u(null)}let d=Ku(a,!0);function x(h){return typeof e=="string"?_jsxruntime.jsx.call(void 0, _material.Icon,{children:e}):h||_jsxruntime.jsx.call(void 0, tt.Circle,{})}return _jsxruntime.jsx.call(void 0, _material.ListItem,{disableGutters:!0,disablePadding:!0,children:_jsxruntime.jsxs.call(void 0, cb,{selected:i,onMouseEnter:h=>{o||f(h,n)},onMouseLeave:()=>{o||m()},disableGutters:!0,onClick:h=>{h.stopPropagation(),p()},children:[_jsxruntime.jsx.call(void 0, _material.ListItemIcon,{children:x(e)}),_jsxruntime.jsx.call(void 0, _material.ListItemText,{primary:_lodash2.default.truncate(r,{length:12})}),(s==null?void 0:s.id)===n&&_jsxruntime.jsx.call(void 0, _material.Popper,{sx:{zIndex:999999},anchorEl:s==null?void 0:s.element,open:!!(s!=null&&s.element),placement:"right-start",children:_jsxruntime.jsx.call(void 0, yt,{elevation:1,sx:{position:"relative","&::before":{content:'""',position:"absolute",left:-8,width:"1.2rem",height:"1.2rem",backgroundImage:'url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9IiM4MDgwODAiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBjbGFzcz0ibHVjaWRlIGx1Y2lkZS1waW4tc2FmZXR5LW9wZW4iPjxwYXRoIGQ9Ik0yMC44IDMuMmMtMS42LTEuNi00LjEtMS42LTUuNyAwTDEyLjMgNlMxNSA5IDE4IDZjLTMgMyAwIDUuNyAwIDUuN2wyLjgtMi44YzEuNi0xLjYgMS42LTQuMiAwLTUuNyIvPjxwYXRoIGQ9Im03LjEgMjEuMSAxMC4zLTEwLjIiLz48Y2lyY2xlIGN4PSI1IiBjeT0iMTkiIHI9IjMiLz48cGF0aCBkPSJNOSAycy00LjEgOS41LTYuNzU1IDE1LjgiLz48L3N2Zz4=")',backgroundSize:"contain",backgroundRepeat:"no-repeat",transition:"transform 0.2s ease-in-out"},p:1,width:h=>{var w;return(w=h.mixins.menu)==null?void 0:w.width}},children:d})})]})})}function Za(t){let n=t,{open:e,isFirstLevel:r=!1}=n,o=k(n,["open","isFirstLevel"]);return e?_jsxruntime.jsx.call(void 0, qa,c({},o)):_jsxruntime.jsx.call(void 0, Ka,c({},o))}var Qu=t=>{var e,r;return{width:((r=(e=t==null?void 0:t.mixins)==null?void 0:e.menu)==null?void 0:r.width)||64,background:"#FFFFFF",transition:t.transitions.create("width",{easing:t.transitions.easing.sharp,duration:t.transitions.duration.enteringScreen}),overflowX:"hidden"}},Xu=t=>({background:"#FFFFFF",transition:t.transitions.create("width",{easing:t.transitions.easing.sharp,duration:t.transitions.duration.leavingScreen}),overflowX:"hidden",width:0,[t.breakpoints.up("sm")]:{width:`calc(${t.spacing(12)} + 1px)`}}),mb=_styles.styled.call(void 0, _material.Drawer,{shouldForwardProp:t=>t!=="open"})(({theme:t,open:e})=>{var r,o;return c(c({width:((o=(r=t==null?void 0:t.mixins)==null?void 0:r.menu)==null?void 0:o.width)||64,borderRightStyle:"none",whiteSpace:"nowrap",boxSizing:"border-box"},e&&g(c({},Qu(t)),{"& .MuiDrawer-paper":Qu(t)})),!e&&g(c({},Xu(t)),{"& .MuiDrawer-paper":Xu(t)}))}),hb=_styles.styled.call(void 0, "div")(({theme:t})=>t.mixins.toolbar);function tc(t,e,r,o){return Ln.default.Children.map(t,n=>{var f,m;if(!Ln.default.isValidElement(n))return n;let i=((f=n.props.link)==null?void 0:f.split("/").filter(Boolean))||[],a=n.props.link||"",u="/"+((e==null?void 0:e.split("/").filter(Boolean))||[]).slice(0,i.length).join("/"),p=(m=n.props)!=null&&m.children?tc(n.props.children,e,r,o):null;return Ln.default.cloneElement(n,{open:r,selected:u===a,onClick:d=>{o&&o(d)},children:p})})}function Xa(t){let{open:e,toggleMenu:r,children:o,onClickItem:n}=t,a=new URL(window.location.href).pathname,l=tc(o,a,e,n);return _jsxruntime.jsxs.call(void 0, mb,{variant:"permanent",open:e,onClose:r,children:[_jsxruntime.jsx.call(void 0, hb,{}),_jsxruntime.jsx.call(void 0, _material.List,{children:l})]})}function yb(t){return t.map(e=>e.visible?_jsxruntime.jsx.call(void 0, rc.Item,{link:e.link,id:e.id,label:e.label,icon:e.icon,children:e.items&&yb(e.items)},e.id):null)}var rc={Root:Xa,Item:Za},xb= exports.Menu =rc;function oc(t){let{links:e}=t;function r(o,n){location.pathname}return _jsxruntime.jsx.call(void 0, _material.Breadcrumbs,{sx:{height:"30px",display:"flex",textWrap:"nowrap"},children:e.map((o,n)=>e.length===1||e.length===n+1?_jsxruntime.jsx.call(void 0, _material.Typography,{sx:{fontSize:"10pt",fontWeight:"bolder"},variant:"subtitle1",color:"black",children:o.label},o.link):_jsxruntime.jsx.call(void 0, _material.Button,{variant:"text",children:o.label},o.link))})}function es(t){let{children:e}=t;return _jsxruntime.jsx.call(void 0, _material.Stack,{pl:1,pr:1,pt:.5,pb:.5,direction:"row",alignContent:"center",alignItems:"center",justifyContent:"space-between",spacing:1,children:e})}var Tb={Root:es},kb= exports.ContentTitle =Tb;exports.AlterarSenha = _t; exports.Avatar = Lu; exports.Breadcrumbs = oc; exports.Button = N; exports.ButtonContainer = Ce; exports.Checkbox = is; exports.ColorsGrid = ss; exports.Content = _u; exports.ContentTitle = kb; exports.CurrencyCellStyle = oC; exports.CurrencyTextField = Nc; exports.DataTable = Tp; exports.DataTableOptions = pn; exports.DeleteContainer = un; exports.Dialog = Le; exports.DialogV2 = j; exports.DrawerMenu = Bu; exports.Editable = xo; exports.FilterContainer = yn; exports.FilterControl = Ar; exports.Flag = Is; exports.FormContainer = vn; exports.Header = W0; exports.Icon = tt; exports.LabelValue = Al; exports.Menu = xb; exports.MioAuth = Mu; exports.OptionStyles = rC; exports.PageTitle = Bl; exports.PasswordTextField = ct; exports.Profile = Gu; exports.SearchTextField = It; exports.Surface = yt; exports.Tooltip = xt; exports.Transporter = ci; exports.renderMenuItems = yb; exports.theme = U;
|
|
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 p of Object.values(this.internalTests))p&&u.push(p);this.runTests({path:i,value:s,originalValue:a,options:r,tests:u},o,p=>{if(p.length)return n(p,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,p=h=>{n||(n=!0,r(h,a))},f=h=>{n||(n=!0,o(h,a))},m=i.length,d=[];if(!m)return f([]);let x={value:a,originalValue:l,path:s,options:u,schema:this};for(let h=0;h<i.length;h++){let w=i[h];w(x,p,function(S){S&&(Array.isArray(S)?d.push(...S):d.push(S)),--m<=0&&f(d)})}}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],p=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,d)=>this.resolve(p)._validate(u,p,m,d)}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):Mt(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=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=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=ou(e).map(i=>new We(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=Be.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=Be.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,p)=>p.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}=fh(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 dh=()=>!0;function mh(t){return new ko(t)}var ko=class extends ae{constructor(e){super(typeof e=="function"?{type:"mixed",check:e}:Object.assign({type:"mixed",check:dh},e))}};mh.prototype=ko.prototype;function hh(){return new Eo}var Eo=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=vi.isValue){return this.test({message:e,name:"is-value",exclusive:!0,params:{value:"true"},test(r){return Ie(r)||r===!0}})}isFalse(e=vi.isValue){return this.test({message:e,name:"is-value",exclusive:!0,params:{value:"false"},test(r){return Ie(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)}};hh.prototype=Eo.prototype;var gh=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function yh(t){let e=Ci(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 Ci(t){var e,r;let o=gh.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 xh=/^[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])?)*$/,bh=/^((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,vh=/^(?:[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,Ch="^\\d{4}-\\d{2}-\\d{2}",wh="\\d{2}:\\d{2}:\\d{2}",Sh="(([+-]\\d{2}(:?\\d{2})?)|Z)",Ph=new RegExp(`${Ch}T${wh}(\\.\\d+)?${Sh}$`),Th=t=>Ie(t)||t===t.trim(),kh={}.toString();function pe(){return new Io}var Io=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===kh?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(xh,{name:"email",message:e,excludeEmptyString:!0})}url(e=he.url){return this.matches(bh,{name:"url",message:e,excludeEmptyString:!0})}uuid(e=he.uuid){return this.matches(vh,{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(Ph,{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=Ci(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=Ci(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:Th})}lowercase(e=he.lowercase){return this.transform(r=>Ie(r)?r:r.toLowerCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>Ie(r)||r===r.toLowerCase()})}uppercase(e=he.uppercase){return this.transform(r=>Ie(r)?r:r.toUpperCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>Ie(r)||r===r.toUpperCase()})}};pe.prototype=Io.prototype;var Eh=t=>t!=+t;function Ih(){return new Ao}var Ao=class extends ae{constructor(){super({type:"number",check(e){return e instanceof Number&&(e=e.valueOf()),typeof e=="number"&&!Eh(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=>Ie(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=>Ie(n)?n:Math[e](n))}};Ih.prototype=Ao.prototype;var lu=new Date(""),Ah=t=>Object.prototype.toString.call(t)==="[object Date]";function uu(){return new ut}var ut=class extends ae{constructor(){super({type:"date",check(e){return Ah(e)&&!isNaN(e.getTime())}}),this.withMutation(()=>{this.transform((e,r,o)=>!o.spec.coerce||o.isType(e)||e===null?e:(e=yh(e),isNaN(e)?ut.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=bi.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=bi.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)}})}};ut.INVALID_DATE=lu;uu.prototype=ut.prototype;uu.INVALID_DATE=lu;function Mh(t,e=[]){let r=[],o=new Set,n=new Set(e.map(([a,l])=>`${a}-${l}`));function i(a,l){let s=(0,ke.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):Do(l)&&"deps"in l&&l.deps.forEach(s=>i(s,a))}return ru.default.array(Array.from(o),r).reverse()}function Jl(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 cu(t){return(e,r)=>Jl(t,e)-Jl(t,r)}var pu=(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 Po(t){if("fields"in t){let e={};for(let[r,o]of Object.entries(t.fields))e[r]=Po(o);return t.setFields(e)}if(t.type==="array"){let e=t.optional();return e.innerType&&(e.innerType=Po(e.innerType)),e}return t.type==="tuple"?t.optional().clone({types:t.spec.types.map(Po)}):"optional"in t?t.optional():t}var Fh=(t,e)=>{let r=[...(0,ke.normalizePath)(e)];if(r.length===1)return r[0]in t;let o=r.pop(),n=(0,ke.getter)((0,ke.join)(r),!0)(t);return!!(n&&o in n)},eu=t=>Object.prototype.toString.call(t)==="[object Object]";function tu(t,e){let r=Object.keys(t.fields);return Object.keys(e).filter(o=>r.indexOf(o)===-1)}var Oh=cu([]);function ve(t){return new Mo(t)}var Mo=class extends ae{constructor(e){super({type:"object",check(r){return eu(r)||typeof r=="function"}}),this.fields=Object.create(null),this._sortErrors=Oh,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}),p=!1;for(let f of l){let m=i[f],d=f in n;if(m){let x,h=n[f];u.path=(r.path?`${r.path}.`:"")+f,m=m.resolve({value:h,context:r.context,parent:s});let w=m instanceof ae?m.spec:void 0,C=w==null?void 0:w.strict;if(w!=null&&w.strip){p=p||f in n;continue}x=!r.__validating||!C?m.cast(n[f],u):n[f],x!==void 0&&(s[f]=x)}else d&&!a&&(s[f]=n[f]);(d!==f in s||s[f]!==n[f])&&(p=!0)}return p?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||!eu(u)){n(s,u);return}a=a||u;let p=[];for(let f of this._nodes){let m=this.fields[f];!m||We.isRef(m)||p.push(m.asNestedTest({options:r,key:f,parent:u,parentPath:r.path,originalParent:a}))}this.runTests({tests:p,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=Mh(e,r),o._sortErrors=cu(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 Po(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,ke.getter)(e,!0);return this.transform(i=>{if(!i)return i;let a=i;return Fh(i,e)&&(a=Object.assign({},i),o||delete a[e],a[r]=n(i)),a})}json(){return this.transform(pu)}exact(e){return this.test({name:"exact",exclusive:!0,message:e||wo.exact,test(r){if(r==null)return!0;let o=tu(this.schema,r);return o.length===0||this.createError({params:{properties:o.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(e=!0,r=wo.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=tu(this.schema,n);return!e||i.length===0||this.createError({params:{unknown:i.join(", ")}})}});return o.spec.noUnknown=e,o}unknown(e=!0,r=wo.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(rr.camelCase)}snakeCase(){return this.transformKeys(rr.snakeCase)}constantCase(){return this.transformKeys(e=>(0,rr.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=Mo.prototype;function Dh(t){return new Fo(t)}var Fo=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 p;if(!l||!a||!this._typeCheck(u)){n(s,u);return}let f=new Array(u.length);for(let d=0;d<u.length;d++){var m;f[d]=a.asNestedTest({options:r,index:d,parent:u,parentPath:r.path,originalParent:(m=r.originalValue)!=null?m:e})}this.runTests({value:u,tests:f,originalValue:(p=r.originalValue)!=null?p:e,options:r},o,d=>n(d.concat(s),u))})}clone(e){let r=super.clone(e);return r.innerType=this.innerType,r}json(){return this.transform(pu)}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(!Do(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=So.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||So.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||So.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}};Dh.prototype=Fo.prototype;function Rh(t){return new Oo(t)}var Oo=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(su.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 p;u[f]=m.asNestedTest({options:r,index:f,parent:l,parentPath:r.path,originalParent:(p=r.originalValue)!=null?p: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}};Rh.prototype=Oo.prototype;var _isStrongPassword = require('validator/lib/isStrongPassword'); var _isStrongPassword2 = _interopRequireDefault(_isStrongPassword);function ct(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 Hh=_react.forwardRef.call(void 0, function(e,r){return _jsxruntime.jsx.call(void 0, _material.Slide,c({direction:"up",ref:r},e))});function nr(n){var i=n,{children:t,height:e,fullWidth:r=!0}=i,o=k(i,["children","height","fullWidth"]);return _jsxruntime.jsx.call(void 0, _material.Dialog,g(c({disableRestoreFocus:!0,fullWidth:r,TransitionComponent:Hh,sx:c({"& .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 Si({children:t}){return _jsxruntime.jsx.call(void 0, _useDialogs.DialogsProvider,{children:t})}function Pi(t){let a=t,{dialogComponent:e,payload:r,label:o}=a,n=k(a,["dialogComponent","payload","label"]),i=_useDialogs.useDialogs.call(void 0, );return _jsxruntime.jsx.call(void 0, _material.Button,g(c({variant:"contained",onClick:()=>{i.open(e,r)}},n),{children:o||" Adicionar"}))}function ir(t){let e=_material.useTheme.call(void 0, );return _jsxruntime.jsx.call(void 0, _material.Stack,c({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 ar(t){let e=_material.useTheme.call(void 0, );return _jsxruntime.jsx.call(void 0, _material.Typography,c({component:"h2",variant:"button",sx:{fontSize:"14px",color:e.palette.grey[500],whiteSpace:"nowrap"}},t))}function sr({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 lr(r){var o=r,{children:t}=o,e=k(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,g(c({padding:"16px"},e),{children:t}))})}function ur(t){let e=_material.useTheme.call(void 0, );return _jsxruntime.jsx.call(void 0, _material.Stack,c({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 cr(t){return _jsxruntime.jsx.call(void 0, _material.Stack,c({direction:"row",alignItems:"center",gap:1,marginLeft:"auto"},t))}function Ti(r){var o=r,{children:t}=o,e=k(o,["children"]);return _jsxruntime.jsx.call(void 0, N,g(c({variant:"outlined",color:"error"},e),{children:"Cancelar"}))}function ki(o){var n=o,{children:t,label:e}=n,r=k(n,["children","label"]);return _jsxruntime.jsx.call(void 0, N,g(c({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 $(this,null,function*(){try{yield i(n),e()}catch(s){}})}return _jsxruntime.jsxs.call(void 0, nr,{open:t,onClose:e,children:[_jsxruntime.jsxs.call(void 0, ir,{children:[_jsxruntime.jsx.call(void 0, ar,{children:"Tem certeza de que deseja excluir este registro?"}),_jsxruntime.jsx.call(void 0, sr,{onClose:e})]}),_jsxruntime.jsx.call(void 0, lr,{children:_jsxruntime.jsx.call(void 0, _material.Alert,{severity:"error",children:"O registro ser\xE1 removido permanentemente. Deseja continuar?"})}),_jsxruntime.jsx.call(void 0, ur,{children:_jsxruntime.jsxs.call(void 0, cr,{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 dg={Root:nr,Provider:Si,AdicionarButton:Pi,Header:ir,Title:ar,ActionClose:sr,Content:lr,Footer:ur,Actions:cr,ActionCancelar:Ti,ActionSalvar:ki,ConfirmDelete:Ii},j= exports.DialogV2 =dg;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 bu={senhaAtual:"",senhaNova:""},Pg=ve().shape({senhaAtual:pe().required("Informe a Senha Atual."),senhaNova:pe().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:p}=_hooks.useCredentials.call(void 0, r),{setValidationErrors:f,validationProps:m}=_hooks.useValidations.call(void 0, ),{data:d,handleChange:x,setData:h,changeValue:w}=_hooks.useForm.call(void 0, bu),[C,S]=_react.useState.call(void 0, !1),[v,P]=_react.useState.call(void 0, null);_react.useEffect.call(void 0, ()=>{l&&w("senhaAtual",l)},[l]),_react.useEffect.call(void 0, ()=>{d.senhaNova&&S(_isStrongPassword2.default.call(void 0, d.senhaNova,{minLength:8,minLowercase:1,minUppercase:1,minNumbers:1,minSymbols:1}))},[d.senhaNova]);function F(){return $(this,null,function*(){f(null),P(null),Pg.validate(d,{abortEarly:!1}).then(()=>$(this,null,function*(){var y;let{senhaAtual:M,senhaNova:R}=d;try{(yield u(M,R,s))&&(n&&n(),h(bu))}catch(b){if(i&&i(b),_axios.isAxiosError.call(void 0, b)){P((y=b.response)==null?void 0:y.data.message);return}P("Ocorreu um erro ao tentar alterar a senha")}})).catch(M=>{f(M)})})}function _(){return(d==null?void 0:d.senhaNova.length)>=8}function D(){if(d!=null&&d.senhaNova){let M=d==null?void 0:d.senhaNova.match(/[a-z]/g);return Array.isArray(M)&&M.length>0}return!1}function te(){if(d!=null&&d.senhaNova){let M=d==null?void 0:d.senhaNova.match(/[A-Z]/g);return Array.isArray(M)&&M.length>0}return!1}function q(){if(d!=null&&d.senhaNova){let M=d==null?void 0:d.senhaNova.match(/\d/g);return Array.isArray(M)&&M.length>0}return!1}function oe(){if(d!=null&&d.senhaNova){let M=d==null?void 0:d.senhaNova.match(/\W/g);return Array.isArray(M)&&M.length>0}return!1}return _jsxruntime.jsxs.call(void 0, j.Root,{open:e,onClose:M=>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, ct,c({name:"senhaAtual",label:"Senha Atual",value:(d==null?void 0:d.senhaAtual)||"",onChange:x},m("senhaAtual")))}),_jsxruntime.jsx.call(void 0, _material.Grid2,{size:12,children:_jsxruntime.jsx.call(void 0, ct,c({name:"senhaNova",label:"Nova Senha",value:(d==null?void 0:d.senhaNova)||"",onChange:x},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:D(),message:"A nova senha deve ter ao menos uma letra min\xFAscula"}),_jsxruntime.jsx.call(void 0, ft,{isValid:te(),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"})]}),v&&_jsxruntime.jsx.call(void 0, _material.Grid2,{size:12,children:_jsxruntime.jsx.call(void 0, _material.Alert,{severity:"error",children:v})})]})}),_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:F,isLoading:p,disabled:!C})]})})]})}var Og=ve().shape({email:pe().required("Informe o e-mail"),password:pe().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,p]=_react.useState.call(void 0, !1),[f,m]=_react.useState.call(void 0, !1),[d,x]=_react.useState.call(void 0, !1),[h,w]=_react.useState.call(void 0, null),{login:C}=_hooks.useCredentials.call(void 0, n),{validationProps:S,setValidationErrors:v}=_hooks.useValidations.call(void 0, );function P(){return $(this,null,function*(){v(null),w(null),Og.validate({email:i,password:l},{abortEarly:!1}).then(()=>$(this,null,function*(){var F,_;p(!0);try{let D=yield C(i,l);D&&e(D)}catch(D){if(_axios.isAxiosError.call(void 0, D)){if(((F=D.response)==null?void 0:F.data.code)==="E_FIRST_ACCESS"){m(!0);return}w((_=D.response)==null?void 0:_.data.message)}r(D)}})).catch(F=>{v(F)}).finally(()=>{p(!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,c({name:"email",label:"E-mail",margin:"normal",autoFocus:!0,value:i||"",onChange:F=>a(F.target.value)},S("email"))),_jsxruntime.jsx.call(void 0, ct,c({name:"password",label:"Senha",size:"medium",placeholder:"Sua senha",value:l||"",onChange:F=>s(F.target.value),onKeyDown:F=>F.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}),d&&_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:()=>$(this,null,function*(){return m(!1)}),onSuccess:()=>{m(!1),x(!0),s("")},credentialsConfig:n})]})}var Lg=ve().shape({email:pe().required("Informe o e-mail")});function Mi(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,p]=_react.useState.call(void 0, null),{recuperarSenha:f}=_hooks.useCredentials.call(void 0, r),{validationProps:m,setValidationErrors:d}=_hooks.useValidations.call(void 0, );function x(){return $(this,null,function*(){d(null),Lg.validate({email:o},{abortEarly:!1}).then(()=>$(this,null,function*(){var h;try{a(!0),yield f(o),s(!0)}catch(w){p((h=w.response)==null?void 0:h.data.message)}finally{a(!1)}})).catch(h=>{d(h)})})}return _jsxruntime.jsxs.call(void 0, _material.Box,{component:"form",children:[_jsxruntime.jsx.call(void 0, _material.TextField,c({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:x,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 Oi(t){var p;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 $(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:(p=e==null?void 0:e.empresas)==null?void 0:p.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 Su=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 fr(t){let u=t,{value:e,onChange:r}=u,o=k(u,["value","onChange"]),[n,i]=_react.useState.call(void 0, ""),a=e!==void 0,l=_react.useMemo.call(void 0, ()=>a?Su(e||""):n,[e,n,a]);return _jsxruntime.jsx.call(void 0, _TextField2.default,c({value:l,onChange:p=>{let f=Su(p.target.value);if(a||i(f),r){let m=g(c({},p),{target:g(c({},p.target),{value:f})});r(m)}},inputProps:{maxLength:15}},o))}function dr({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(d=>s.includes(d))||"",p=e.split("");p[a]=u;let f=p.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 Ri(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),[p,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 d(){return $(this,null,function*(){try{f(!0);let x=yield m({channel:o.channel,target:o.target,code:a});x&&n(x),r()}catch(x){u(x.response.data.message)}finally{f(!1)}})}return _jsxruntime.jsxs.call(void 0, j.Root,{open:e,onClose:x=>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, dr,{value:a,onChange:x=>{l(x)}}),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:d,isLoading:p,disabled:a.length!=6})]})})]})}var cy=ve().shape({contato:pe().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 Lo(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:p,changeValue:f,data:m,validate:d,validationErrors:x}=_hooks.useForm.call(void 0, {contato:""},cy),[h,w]=_react.useState.call(void 0, !1);return _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, "form",{onSubmit:S=>$(this,null,function*(){S.preventDefault(),d(v=>$(this,null,function*(){try{s(!1),a(!0);let P=yield u({channel:e==="otp-email"?"email":"whatsapp",target:v.contato});w(!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,c({autoFocus:!0,name:"contato",label:"E-mail",value:m.contato||"",onChange:p,fullWidth:!0},x("contato"))),e==="otp-whatsapp"&&_jsxruntime.jsx.call(void 0, fr,c({autoFocus:!0,name:"contato",label:"Whatsapp",value:m.contato||"",onChange:S=>{f("contato",S.target.value.replace(/[^\d+]/g,""))},fullWidth:!0},x("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, Ri,{onLoginSuccess:o,open:h,onClose:S=>$(this,null,function*(){w(!1)}),payload:{target:m.contato,channel:e==="otp-email"?"email":"whatsapp"},credentialsConfig:r})]})}var xy={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 _i(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),[p,f]=_react.useState.call(void 0, "login"),m=_material.useTheme.call(void 0, ),d=_material.useMediaQuery.call(void 0, m.breakpoints.up("md"));_react.useEffect.call(void 0, ()=>{u&&n&&n()},[u]);function x(v){return $(this,null,function*(){try{if(Array.isArray(v==null?void 0:v.empresas)){if((v==null?void 0:v.empresas.length)===1){let P=yield s(v==null?void 0:v.token,v.empresas[0].uuid);P&&r(P);return}f("licensa"),l(v);return}r(v)}catch(P){o(P)}})}function h(v){return $(this,null,function*(){o(v)})}function w(v){f(v)}function C(){f("login")}let S=xy[p];return _jsxruntime.jsxs.call(void 0, _material.Stack,{component:"section",width:d?"46%":"100%",minWidth:"420px",maxWidth:d?"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, fi,{label:i,subTitle:S}),_jsxruntime.jsxs.call(void 0, _material.Box,{sx:{marginTop:2},children:[p==="login"&&_jsxruntime.jsx.call(void 0, Ai,{credentialsConfig:e,onLoginSuccess:x,onLoginFailed:h,onOptionsClick:w}),p==="licensa"&&_jsxruntime.jsx.call(void 0, Oi,{loginData:a,credentialsConfig:e,onLoginSuccess:r,onLoginFailed:o}),p==="esqueci-senha"&&_jsxruntime.jsx.call(void 0, Mi,{onLoginClick:C,credentialsConfig:e}),p==="otp-email"&&_jsxruntime.jsx.call(void 0, Lo,{onLoginClick:C,onLoginSuccess:x,tipo:"otp-email",credentialsConfig:e}),p==="otp-whatsapp"&&_jsxruntime.jsx.call(void 0, Lo,{onLoginClick:C,onLoginSuccess:x,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:v=>v.palette.grey[500]},children:"Data C Sistemas"})]})]})}function $i(){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 Mu(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, pi,{children:e}):_jsxruntime.jsx.call(void 0, $i,{}),_jsxruntime.jsx.call(void 0, _i,c({},t))]})}var Ey=_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"}})),Iy=t=>_jsxruntime.jsx.call(void 0, Ey,c({},t)),zo=Iy;function zi(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, zo,{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, mt,{activeMenu:r,sx:{pl:s=>s.spacing(1.5)},menus:(e==null?void 0:e.items)||[],onMenuClick:o})})]})}function mt(t){let i=t,{menus:e,activeMenu:r,onMenuClick:o}=i,n=k(i,["menus","activeMenu","onMenuClick"]);return _jsxruntime.jsx.call(void 0, _material.List,g(c({component:"nav",disablePadding:!0},n),{children:e.map(a=>_jsxruntime.jsx.call(void 0, zi,{onMenuClick:o,activeMenu:r,menuItem:a},a.id))}))}function Vi(t){let{menus:e,activeMenu:r,onMenuClick:o}=t,[n,i]=_react.useState.call(void 0, null),a=(s,u,p)=>{i({element:s.currentTarget,id:u,items:p})},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, zo,{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, mt,{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 Du=(t,e)=>({width:t,transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.enteringScreen}),overflowX:"hidden"}),Ru=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)`}}),qy=_styles.styled.call(void 0, _material.Drawer,{shouldForwardProp:t=>t!=="open"&&t!=="width"})(({theme:t,open:e,width:r})=>c(c({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&&g(c({},Du(r,t)),{"& .MuiDrawer-paper":Du(r,t)})),!e&&g(c({},Ru(t)),{"& .MuiDrawer-paper":Ru(t)})));function Bu(t){let s=t,{open:e,items:r,width:o,activeMenu:n,onMenuClick:i,toggleMenu:a}=s,l=k(s,["open","items","width","activeMenu","onMenuClick","toggleMenu"]);return _jsxruntime.jsxs.call(void 0, qy,g(c({width:o,open:e,onClose:()=>a(!1)},l),{children:[_jsxruntime.jsx.call(void 0, _material.Toolbar,{}),e&&_jsxruntime.jsx.call(void 0, mt,{onMenuClick:i,activeMenu:n,menus:r}),!e&&_jsxruntime.jsx.call(void 0, Vi,{onMenuClick:i,activeMenu:n,menus:r})]}))}function _u(t){return _jsxruntime.jsx.call(void 0, _material.Box,c({m:2,sx:{display:"flex",flexDirection:"column",flexGrow:1}},t))}var _Avatar = require('@mui/material/Avatar'); var _Avatar2 = _interopRequireDefault(_Avatar);function Lu(t){let{user:e}=_providers.useUserContext.call(void 0, );return _jsxruntime.jsx.call(void 0, _Avatar2.default,c({src:e==null?void 0:e.avatarUrl,sx:{width:64,height:64,margin:"auto",mb:2}},t))}function Vo(t){let i=t,{children:e,value:r,index:o}=i,n=k(i,["children","value","index"]);return r!==o?null:_jsxruntime.jsx.call(void 0, _material.Box,g(c({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 Wi(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 sx=({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),[p,f]=_react.useState.call(void 0, null),[m,d]=_react.useState.call(void 0, !1),x=_react.useCallback.call(void 0, (C,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:C=>{var P;let S=(P=C.target.files)==null?void 0:P[0];if(!S)return;let v=new FileReader;v.onload=()=>{o(v.result),d(!0)},v.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:()=>d(!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:x})}),_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:(C,S)=>u(S)}),_jsxruntime.jsx.call(void 0, Ce,{children:_jsxruntime.jsx.call(void 0, _Button2.default,{variant:"contained",onClick:()=>$(void 0,null,function*(){if(!r||!p)return;let C=yield Wi(r,p);i(C),d(!1),t&&t(C)}),children:"Salvar"})})]})]})]})},zu=sx;var fx=ve().shape({name:pe().required("Informe o nome")});function qi(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,fx),[u,p]=_react.useState.call(void 0, !1),[f,m]=_react.useState.call(void 0, !1),[d,x]=_react.useState.call(void 0, !1),{uploadAvatar:h,atualizarUsuario:w}=_hooks.useCredentials.call(void 0, r);_react.useEffect.call(void 0, ()=>{i(e)},[e]),_react.useEffect.call(void 0, ()=>{d&&setTimeout(()=>{x(!1)},3e3)},[d]),_react.useEffect.call(void 0, ()=>{u&&setTimeout(()=>{p(!1)},3e3)},[u]);function C(){l(S=>$(this,null,function*(){try{m(!0),yield w(S),x(!0)}catch(v){p("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, zu,{src:n==null?void 0:n.avatarUrl,onSave:S=>{try{h(S),o&&(x(!0),o(!0))}catch(v){p("Ocorreu um erro ao atualizar a foto de perfil"),o&&o(!1,v)}}}),_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,c({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:()=>C(),variant:"contained",children:"Salvar"})})}),d&&_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 Ki(t){var x,h,w;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),[p,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 d(){return $(this,null,function*(){try{f(!0);let C=yield m(a);n(C.data)}catch(C){u(C.response.data.message)}finally{f(!1)}})}return _jsxruntime.jsxs.call(void 0, j.Root,{open:e,onClose:C=>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:`(${(x=o==null?void 0:o.whatsappNumber)==null?void 0:x.slice(0,2)}) ${(h=o==null?void 0:o.whatsappNumber)==null?void 0:h.slice(2,7)}-${(w=o==null?void 0:o.whatsappNumber)==null?void 0:w.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, dr,{value:a,onChange:C=>{l(C)}}),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:d,isLoading:p,disabled:a.length!=6})]})})]})}var NM=ve().shape({whatsappNumber:pe().required("Informe o n\xFAmero do whastapp").length(15)});function Ji(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:p,validate:f,validationErrors:m}=_hooks.useForm.call(void 0, e),[d,x]=_react.useState.call(void 0, !1),[h,w]=_react.useState.call(void 0, !1),{atualizarUsuario:C,gerarWhatsappVerificationCode:S}=_hooks.useCredentials.call(void 0, r);_react.useEffect.call(void 0, ()=>{u(e)},[e]);function v(){f(F=>$(this,null,function*(){try{l(!0);let _=yield C(F);o&&o(_.data)}catch(_){}finally{l(!1)}}))}function P(){return $(this,null,function*(){try{x(!0);let F=yield S();w(!0)}catch(F){}finally{x(!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:()=>$(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, fr,{disabled:!!(s!=null&&s.whatsappVerifiedAt),fullWidth:!1,name:"whatsappNumber",label:"Whastapp",value:s.whatsappNumber||"",onChange:F=>{p("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, N,{isLoading:a,onClick:v,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:d,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, Ki,{open:h,onClose:F=>$(this,null,function*(){w(!1)}),payload:e,credentialsConfig:r,onCodigoVerificado:F=>{u(F),w(!1)}})]})}function Gu(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, Vo,{value:e,index:0,children:_jsxruntime.jsx.call(void 0, qi,{credentialsConfig:i,usuario:o||{}})}),_jsxruntime.jsx.call(void 0, Vo,{value:e,index:1,children:_jsxruntime.jsx.call(void 0, Ji,{onWhastappSaved:a=>{n(a)},credentialsConfig:i,usuario:o||{}})})]})]})})}function ra(t){return _jsxruntime.jsx.call(void 0, _material.Stack,c({direction:"row",alignItems:"center",alignContent:"center",spacing:1,flex:1,flexGrow:1},t))}function oa({children:t}){return _jsxruntime.jsx.call(void 0, Ln.default.Fragment,{children:_jsxruntime.jsx.call(void 0, _material.AppBar,{position:"fixed",elevation:0,sx:{width:"100%",zIndex:e=>e.zIndex.drawer+1,borderBottom:e=>`1px solid ${e.palette.grey[300]}`},children:_jsxruntime.jsx.call(void 0, _material.Toolbar,{children:_jsxruntime.jsx.call(void 0, _material.Stack,{sx:{width:"100%"},direction:"row",alignContent:"center",alignItems:"center",justifyContent:"space-between",children:t})})})})}function na(t){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,g(c({},t),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "rect",{width:"20",height:"5",x:"2",y:"3",rx:"1"}),_jsxruntime.jsx.call(void 0, "path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8"}),_jsxruntime.jsx.call(void 0, "path",{d:"M10 12h4"})]})}))}function aa(t){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,g(c({},t),{children:_jsxruntime.jsx.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:_jsxruntime.jsx.call(void 0, "path",{d:"m6 9 6 6 6-6"})})}))}function la(t){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,g(c({},t),{children:_jsxruntime.jsx.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:_jsxruntime.jsx.call(void 0, "path",{d:"M12 3c7.2 0 9 1.8 9 9s-1.8 9-9 9-9-1.8-9-9 1.8-9 9-9"})})}))}function ua(t){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,g(c({},t),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"}),_jsxruntime.jsx.call(void 0, "circle",{cx:"9",cy:"7",r:"4"}),_jsxruntime.jsx.call(void 0, "path",{d:"M22 21v-2a4 4 0 0 0-3-3.87"}),_jsxruntime.jsx.call(void 0, "path",{d:"M16 3.13a4 4 0 0 1 0 7.75"})]})}))}function ca(t){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,g(c({},t),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "rect",{width:"7",height:"9",x:"3",y:"3",rx:"1"}),_jsxruntime.jsx.call(void 0, "rect",{width:"7",height:"5",x:"14",y:"3",rx:"1"}),_jsxruntime.jsx.call(void 0, "rect",{width:"7",height:"9",x:"14",y:"12",rx:"1"}),_jsxruntime.jsx.call(void 0, "rect",{width:"7",height:"5",x:"3",y:"16",rx:"1"})]})}))}function vr(t){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,g(c({},t),{children:_jsxruntime.jsx.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:_jsxruntime.jsx.call(void 0, "path",{d:"m6 9 6 6 6-6"})})}))}function fa(t){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,g(c({},t),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"m7 21-4.3-4.3c-1-1-1-2.5 0-3.4l9.6-9.6c1-1 2.5-1 3.4 0l5.6 5.6c1 1 1 2.5 0 3.4L13 21"}),_jsxruntime.jsx.call(void 0, "path",{d:"M22 21H7"}),_jsxruntime.jsx.call(void 0, "path",{d:"m5 11 9 9"})]})}))}var Hx=t=>({transition:t.transitions.create(["transform"],{duration:500})}),Gx=_styles.styled.call(void 0, vr,{shouldForwardProp:t=>t!=="open"})(({theme:t,open:e})=>c(c(c({},Hx(t)),e&&{transform:"rotate(-180deg)"}),!e&&{transform:"rotate(0)"}));function da(t){let{open:e}=t;return _jsxruntime.jsx.call(void 0, Gx,{fontSize:"small",open:e})}function ma(t){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,g(c({},t),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"M3 6h18"}),_jsxruntime.jsx.call(void 0, "path",{d:"M7 12h10"}),_jsxruntime.jsx.call(void 0, "path",{d:"M10 18h4"})]})}))}function ha(t){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,g(c({},t),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}),_jsxruntime.jsx.call(void 0, "path",{d:"M8 7v7"}),_jsxruntime.jsx.call(void 0, "path",{d:"M12 7v4"}),_jsxruntime.jsx.call(void 0, "path",{d:"M16 7v9"})]})}))}function ga(t){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,g(c({},t),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"m11 17 2 2a1 1 0 1 0 3-3"}),_jsxruntime.jsx.call(void 0, "path",{d:"m14 14 2.5 2.5a1 1 0 1 0 3-3l-3.88-3.88a3 3 0 0 0-4.24 0l-.88.88a1 1 0 1 1-3-3l2.81-2.81a5.79 5.79 0 0 1 7.06-.87l.47.28a2 2 0 0 0 1.42.25L21 4"}),_jsxruntime.jsx.call(void 0, "path",{d:"m21 3 1 11h-2"}),_jsxruntime.jsx.call(void 0, "path",{d:"M3 3 2 14l6.5 6.5a1 1 0 1 0 3-3"}),_jsxruntime.jsx.call(void 0, "path",{d:"M3 4h8"})]})}))}function xa(t){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,g(c({},t),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "circle",{cx:"11",cy:"11",r:"8"}),_jsxruntime.jsx.call(void 0, "path",{d:"m21 21-4.3-4.3"})]})}))}function ba(t){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,g(c({},t),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"M3 5v14"}),_jsxruntime.jsx.call(void 0, "path",{d:"M8 5v14"}),_jsxruntime.jsx.call(void 0, "path",{d:"M12 5v14"}),_jsxruntime.jsx.call(void 0, "path",{d:"M17 5v14"}),_jsxruntime.jsx.call(void 0, "path",{d:"M21 5v14"})]})}))}function va(t){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,g(c({},t),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"M17 22h-1a4 4 0 0 1-4-4V6a4 4 0 0 1 4-4h1"}),_jsxruntime.jsx.call(void 0, "path",{d:"M7 22h1a4 4 0 0 0 4-4v-1"}),_jsxruntime.jsx.call(void 0, "path",{d:"M7 2h1a4 4 0 0 1 4 4v1"})]})}))}function wa(t){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,g(c({},t),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"m6 17 5-5-5-5"}),_jsxruntime.jsx.call(void 0, "path",{d:"m13 17 5-5-5-5"})]})}))}function Pa(t){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,g(c({},t),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"m11 17-5-5 5-5"}),_jsxruntime.jsx.call(void 0, "path",{d:"m18 17-5-5 5-5"})]})}))}function Ta(t){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,g(c({},t),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "line",{x1:"4",x2:"20",y1:"12",y2:"12"}),_jsxruntime.jsx.call(void 0, "line",{x1:"4",x2:"20",y1:"6",y2:"6"}),_jsxruntime.jsx.call(void 0, "line",{x1:"4",x2:"20",y1:"18",y2:"18"})]})}))}function Ea(t){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,g(c({},t),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"}),_jsxruntime.jsx.call(void 0, "circle",{cx:"12",cy:"12",r:"3"})]})}))}function Ia(t){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,g(c({},t),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"}),_jsxruntime.jsx.call(void 0, "circle",{cx:"9",cy:"7",r:"4"}),_jsxruntime.jsx.call(void 0, "path",{d:"M22 21v-2a4 4 0 0 0-3-3.87"}),_jsxruntime.jsx.call(void 0, "path",{d:"M16 3.13a4 4 0 0 1 0 7.75"})]})}))}function Ma(t){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,g(c({},t),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z"}),_jsxruntime.jsx.call(void 0, "circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor"})]})}))}function Fa(t){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,g(c({},t),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"}),_jsxruntime.jsx.call(void 0, "polyline",{points:"16 17 21 12 16 7"}),_jsxruntime.jsx.call(void 0, "line",{x1:"21",x2:"9",y1:"12",y2:"12"})]})}))}function Oa(t){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,g(c({},t),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"}),_jsxruntime.jsx.call(void 0, "path",{d:"M3 3v5h5"}),_jsxruntime.jsx.call(void 0, "path",{d:"M12 7v5l4 2"})]})}))}function Da(t){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,g(c({},t),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z"}),_jsxruntime.jsx.call(void 0, "path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"}),_jsxruntime.jsx.call(void 0, "path",{d:"M12 17h.01"})]})}))}function Ra(t){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,g(c({},t),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"}),_jsxruntime.jsx.call(void 0, "path",{d:"M14 2v4a2 2 0 0 0 2 2h4"}),_jsxruntime.jsx.call(void 0, "path",{d:"M10 9H8"}),_jsxruntime.jsx.call(void 0, "path",{d:"M16 13H8"}),_jsxruntime.jsx.call(void 0, "path",{d:"M16 17H8"})]})}))}function _a(t){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,g(c({},t),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"M2.5 17a24.12 24.12 0 0 1 0-10 2 2 0 0 1 1.4-1.4 49.56 49.56 0 0 1 16.2 0A2 2 0 0 1 21.5 7a24.12 24.12 0 0 1 0 10 2 2 0 0 1-1.4 1.4 49.55 49.55 0 0 1-16.2 0A2 2 0 0 1 2.5 17"}),_jsxruntime.jsx.call(void 0, "path",{d:"m10 15 5-3-5-3z"})]})}))}function $a(t){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,g(c({},t),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "circle",{cx:"12",cy:"12",r:"10"}),_jsxruntime.jsx.call(void 0, "path",{d:"m4.9 4.9 14.2 14.2"})]})}))}function Na(t){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,g(c({},t),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z"}),_jsxruntime.jsx.call(void 0, "path",{d:"M15 5.764v15"}),_jsxruntime.jsx.call(void 0, "path",{d:"M9 3.236v15"})]})}))}function Va(t){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,g(c({},t),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"white",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0"}),_jsxruntime.jsx.call(void 0, "circle",{cx:"12",cy:"10",r:"3"})]})}))}function ja(t){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,g(c({},t),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"M22 8.35V20a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V8.35A2 2 0 0 1 3.26 6.5l8-3.2a2 2 0 0 1 1.48 0l8 3.2A2 2 0 0 1 22 8.35Z"}),_jsxruntime.jsx.call(void 0, "path",{d:"M6 18h12"}),_jsxruntime.jsx.call(void 0, "path",{d:"M6 14h12"}),_jsxruntime.jsx.call(void 0, "rect",{width:"12",height:"12",x:"6",y:"10"})]})}))}function Ua(t){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,g(c({},t),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "circle",{cx:"12",cy:"12",r:"10"}),_jsxruntime.jsx.call(void 0, "path",{d:"M22 2 2 22"})]})}))}function Ha(t){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,g(c({},t),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"M18 20a6 6 0 0 0-12 0"}),_jsxruntime.jsx.call(void 0, "circle",{cx:"12",cy:"10",r:"4"}),_jsxruntime.jsx.call(void 0, "circle",{cx:"12",cy:"12",r:"10"})]})}))}var z0={Circle:la,Dashboard:ca,Expandable:da,Down:vr,Negociacao:ga,Cadastro:na,Clientes:ua,Filter:ma,Search:xa,ChevronDown:aa,Kanban:ha,Erease:fa,BarCode:ba,TextCursor:va,OpenPanel:wa,ClosePanel:Pa,Menu:Ta,Configs:Ea,Users:Ia,Password:Ma,Logout:Fa,History:Oa,Help:Da,Video:_a,Docs:Ra,Block:$a,Maps:Na,MapPin:Va,Estoque:ja,Blocked:Ua,Profile:Ha},tt= exports.Icon =z0;function Ga(t){let e=k(t,[]);return _jsxruntime.jsx.call(void 0, _material.IconButton,g(c({},e),{children:_jsxruntime.jsx.call(void 0, tt.Menu,{})}))}var j0={Root:oa,Content:ra,ToggleMenu:Ga},W0= exports.Header =j0;var J0=_material.styled.call(void 0, _material.ListItemButton,{})(({theme:t})=>({height:"32px",cursor:"pointer",gap:t.spacing(2),transition:"0.2s ease-in-out",padding:`${t.spacing(.25)} ${t.spacing(2)} ${t.spacing(.25)} ${t.spacing(2)}`,"&:hover":{backgroundColor:"rgba(89, 195, 224, 15%);","& .MuiTypography-root":{color:t.palette.primary.main,transition:"0.2s ease-in-out"},"& .MuiSvgIcon-root":{color:t.palette.primary.main,transition:"0.2s ease-in-out"},"& .MuiIcon-root":{color:t.palette.primary.main,transition:"0.2s ease-in-out"}},"& .MuiIcon-root":{color:t.palette.grey[500],fontSize:"20px"},"& .MuiTypography-root":{fontSize:"0.805rem",color:t.palette.text.primary},"& .MuiSvgIcon-root":{fontSize:"0.955rem"},"& .MuiListItemIcon-root":{minWidth:"0px"}}));function qa({label:t,icon:e,visible:r=!0,children:o,selected:n=!1,onClick:i,link:a}){if(!r)return null;let[l,s]=_react.useState.call(void 0, !1),u=!!o;function p(){if(u){s(m=>!m);return}i&&a&&i(a)}function f(m){return typeof e=="string"?_jsxruntime.jsx.call(void 0, _material.Icon,{children:e}):m||_jsxruntime.jsx.call(void 0, tt.Circle,{})}return _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, _material.ListItem,{disableGutters:!0,disablePadding:!0,children:_jsxruntime.jsxs.call(void 0, J0,{selected:n,disableGutters:!0,onClick:m=>{m.stopPropagation(),p()},children:[_jsxruntime.jsx.call(void 0, _material.ListItemIcon,{children:f(e)}),_jsxruntime.jsx.call(void 0, _material.ListItemText,{primary:t}),u&&_jsxruntime.jsx.call(void 0, tt.Expandable,{open:l})]})}),u&&_jsxruntime.jsx.call(void 0, _material.Collapse,{in:l,timeout:"auto",unmountOnExit:!0,children:_jsxruntime.jsx.call(void 0, _material.List,{sx:{"& .MuiListItemButton-root":{paddingLeft:4},"& .MuiList-root > .MuiListItem-root > .MuiListItemButton-root":{paddingLeft:6},"& .MuiList-root > .MuiList-root > .MuiListItemButton-root":{paddingLeft:12}},disablePadding:!0,children:o})})]})}var cb=_material.styled.call(void 0, _material.ListItemButton,{})(({theme:t})=>({cursor:"pointer",padding:`${t.spacing(1)} ${t.spacing(0)} ${t.spacing(.25)} ${t.spacing(0)}`,minHeight:"32px",flexDirection:"column",justifyContent:"center",alignItem:"center",alignContent:"center","&:hover":{backgroundColor:"rgba(89, 195, 224, 15%);","& .MuiTypography-root":{color:t.palette.primary.main,transition:"0.2s ease-in-out"},"& .MuiSvgIcon-root":{color:t.palette.primary.main,transition:"0.2s ease-in-out"},"& .MuiIcon-root":{color:t.palette.primary.main,transition:"0.2s ease-in-out"}},"& .MuiIcon-root":{color:t.palette.grey[500],fontSize:"20px"},"& .MuiSvgIcon-root":{fontSize:"0.955rem"},"& .MuiTypography-root":{fontSize:"0.805rem",color:t.palette.text.primary},"& .MuiListItemIcon-root":{minWidth:"0px"}}));function Ku(t,e){return Ln.default.Children.map(t,r=>{var n;if(!Ln.default.isValidElement(r))return r;let o=(n=r.props)!=null&&n.children?Ku(r.props.children,e):null;return Ln.default.cloneElement(r,{open:e,children:o})})}function Ka(t){let{icon:e,label:r,link:o,id:n,selected:i=!1,children:a,onClick:l}=t,[s,u]=_react.useState.call(void 0, null);function p(){l&&o&&l(o)}function f(h,w){u({element:h.currentTarget,id:w})}function m(){u(null)}let d=Ku(a,!0);function x(h){return typeof e=="string"?_jsxruntime.jsx.call(void 0, _material.Icon,{children:e}):h||_jsxruntime.jsx.call(void 0, tt.Circle,{})}return _jsxruntime.jsx.call(void 0, _material.ListItem,{disableGutters:!0,disablePadding:!0,children:_jsxruntime.jsxs.call(void 0, cb,{selected:i,onMouseEnter:h=>{o||f(h,n)},onMouseLeave:()=>{o||m()},disableGutters:!0,onClick:h=>{h.stopPropagation(),p()},children:[_jsxruntime.jsx.call(void 0, _material.ListItemIcon,{children:x(e)}),_jsxruntime.jsx.call(void 0, _material.ListItemText,{primary:_lodash2.default.truncate(r,{length:12})}),(s==null?void 0:s.id)===n&&_jsxruntime.jsx.call(void 0, _material.Popper,{sx:{zIndex:999999},anchorEl:s==null?void 0:s.element,open:!!(s!=null&&s.element),placement:"right-start",children:_jsxruntime.jsx.call(void 0, yt,{elevation:1,sx:{position:"relative","&::before":{content:'""',position:"absolute",left:-8,width:"1.2rem",height:"1.2rem",backgroundImage:'url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9IiM4MDgwODAiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBjbGFzcz0ibHVjaWRlIGx1Y2lkZS1waW4tc2FmZXR5LW9wZW4iPjxwYXRoIGQ9Ik0yMC44IDMuMmMtMS42LTEuNi00LjEtMS42LTUuNyAwTDEyLjMgNlMxNSA5IDE4IDZjLTMgMyAwIDUuNyAwIDUuN2wyLjgtMi44YzEuNi0xLjYgMS42LTQuMiAwLTUuNyIvPjxwYXRoIGQ9Im03LjEgMjEuMSAxMC4zLTEwLjIiLz48Y2lyY2xlIGN4PSI1IiBjeT0iMTkiIHI9IjMiLz48cGF0aCBkPSJNOSAycy00LjEgOS41LTYuNzU1IDE1LjgiLz48L3N2Zz4=")',backgroundSize:"contain",backgroundRepeat:"no-repeat",transition:"transform 0.2s ease-in-out"},p:1,width:h=>{var w;return(w=h.mixins.menu)==null?void 0:w.width}},children:d})})]})})}function Za(t){let n=t,{open:e,isFirstLevel:r=!1}=n,o=k(n,["open","isFirstLevel"]);return e?_jsxruntime.jsx.call(void 0, qa,c({},o)):_jsxruntime.jsx.call(void 0, Ka,c({},o))}var Qu=t=>{var e,r;return{width:((r=(e=t==null?void 0:t.mixins)==null?void 0:e.menu)==null?void 0:r.width)||64,background:"#FFFFFF",transition:t.transitions.create("width",{easing:t.transitions.easing.sharp,duration:t.transitions.duration.enteringScreen}),overflowX:"hidden"}},Xu=t=>({background:"#FFFFFF",transition:t.transitions.create("width",{easing:t.transitions.easing.sharp,duration:t.transitions.duration.leavingScreen}),overflowX:"hidden",width:0,[t.breakpoints.up("sm")]:{width:`calc(${t.spacing(12)} + 1px)`}}),mb=_styles.styled.call(void 0, _material.Drawer,{shouldForwardProp:t=>t!=="open"})(({theme:t,open:e})=>{var r,o;return c(c({width:((o=(r=t==null?void 0:t.mixins)==null?void 0:r.menu)==null?void 0:o.width)||64,borderRightStyle:"none",whiteSpace:"nowrap",boxSizing:"border-box"},e&&g(c({},Qu(t)),{"& .MuiDrawer-paper":Qu(t)})),!e&&g(c({},Xu(t)),{"& .MuiDrawer-paper":Xu(t)}))}),hb=_styles.styled.call(void 0, "div")(({theme:t})=>t.mixins.toolbar);function tc(t,e,r,o){return Ln.default.Children.map(t,n=>{var f,m;if(!Ln.default.isValidElement(n))return n;let i=((f=n.props.link)==null?void 0:f.split("/").filter(Boolean))||[],a=n.props.link||"",u="/"+((e==null?void 0:e.split("/").filter(Boolean))||[]).slice(0,i.length).join("/"),p=(m=n.props)!=null&&m.children?tc(n.props.children,e,r,o):null;return Ln.default.cloneElement(n,{open:r,selected:u===a,onClick:d=>{o&&o(d)},children:p})})}function Xa(t){let{open:e,toggleMenu:r,children:o,onClickItem:n}=t,a=new URL(window.location.href).pathname,l=tc(o,a,e,n);return _jsxruntime.jsxs.call(void 0, mb,{variant:"permanent",open:e,onClose:r,children:[_jsxruntime.jsx.call(void 0, hb,{}),_jsxruntime.jsx.call(void 0, _material.List,{children:l})]})}function yb(t){return t.map(e=>e.visible?_jsxruntime.jsx.call(void 0, rc.Item,{link:e.link,id:e.id,label:e.label,icon:e.icon,children:e.items&&yb(e.items)},e.id):null)}var rc={Root:Xa,Item:Za},xb= exports.Menu =rc;function oc(t){let{links:e}=t;function r(o,n){location.pathname}return _jsxruntime.jsx.call(void 0, _material.Breadcrumbs,{sx:{height:"30px",display:"flex",textWrap:"nowrap"},children:e.map((o,n)=>e.length===1||e.length===n+1?_jsxruntime.jsx.call(void 0, _material.Typography,{sx:{fontSize:"10pt",fontWeight:"bolder"},variant:"subtitle1",color:"black",children:o.label},o.link):_jsxruntime.jsx.call(void 0, _material.Button,{variant:"text",children:o.label},o.link))})}function es(t){let{children:e}=t;return _jsxruntime.jsx.call(void 0, _material.Stack,{pl:1,pr:1,pt:.5,pb:.5,direction:"row",alignContent:"center",alignItems:"center",justifyContent:"space-between",spacing:1,children:e})}var Tb={Root:es},kb= exports.ContentTitle =Tb;exports.AlterarSenha = _t; exports.Avatar = Lu; exports.Breadcrumbs = oc; exports.Button = N; exports.ButtonContainer = Ce; exports.Checkbox = is; exports.ColorsGrid = ss; exports.Content = _u; exports.ContentTitle = kb; exports.CurrencyCellStyle = oC; exports.CurrencyTextField = Nc; exports.DataTable = Tp; exports.DataTableOptions = pn; exports.DeleteContainer = un; exports.Dialog = Le; exports.DialogV2 = j; exports.DrawerMenu = Bu; exports.Editable = xo; exports.FilterContainer = yn; exports.FilterControl = Ar; exports.Flag = Is; exports.FormContainer = vn; exports.Header = W0; exports.Icon = tt; exports.LabelValue = Al; exports.Menu = xb; exports.MioAuth = Mu; exports.OptionStyles = rC; exports.PageTitle = Bl; exports.PasswordTextField = ct; exports.Profile = Gu; exports.SearchTextField = It; exports.Surface = yt; exports.Tooltip = xt; exports.Transporter = ci; exports.renderMenuItems = yb; exports.theme = U;
|
|
11
11
|
/*! Bundled license information:
|
|
12
12
|
|
|
13
13
|
react-is/cjs/react-is.production.min.js:
|