PageSourceSearch

https://www.companyhero.com/_next/static/chunks/pages/app/processos/novo-processo-f6c28237866cf333.js

js companyhero.com collected 2026-10-01 10:41:04 UTC 27,154 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[23946,67514,21736],{59018:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if("string"!=typeof e)return e;let t=e.charAt(0).toUpperCase()+e.slice(1);return t}},89552:function(e,t,o){"use strict";var n=o(64836).default,r=o(75263).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(o(67294)),a=n(o(94184)),s=n(o(18475)),l=o(42189),c=o(47419);o(13594);var u=o(31929),d=n(o(9405)),__rest=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(o[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,n=Object.getOwnPropertySymbols(e);r<n.length;r++)0>t.indexOf(n[r])&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(o[n[r]]=e[n[r]]);return o};let p=null,Spin=e=>{let{spinPrefixCls:t,spinning:o=!0,delay:n=0,className:r,rootClassName:d,size:m="default",tip:f,wrapperClassName:g,style:h,children:y,hashId:v}=e,x=__rest(e,["spinPrefixCls","spinning","delay","className","rootClassName","size","tip","wrapperClassName","style","children","hashId"]),[C,b]=i.useState(()=>o&&(!o||!n||!!isNaN(Number(n))));i.useEffect(()=>{if(o){let e=(0,l.debounce)(n,()=>{b(!0)});return e(),()=>{var t;null===(t=null==e?void 0:e.cancel)||void 0===t||t.call(e)}}b(!1)},[n,o]);let S=i.useMemo(()=>void 0!==y,[y]),{direction:_,spin:j}=i.useContext(u.ConfigContext),k=(0,a.default)(t,null==j?void 0:j.className,{[`${t}-sm`]:"small"===m,[`${t}-lg`]:"large"===m,[`${t}-spinning`]:C,[`${t}-show-text`]:!!f,[`${t}-rtl`]:"rtl"===_},r,d,v),w=(0,a.default)(`${t}-container`,{[`${t}-blur`]:C}),T=(0,s.default)(x,["indicator","prefixCls"]),$=Object.assign(Object.assign({},null==j?void 0:j.style),h),P=i.createElement("div",Object.assign({},T,{style:$,className:k,"aria-live":"polite","aria-busy":C}),function(e,t){let{indicator:o}=t,n=`${e}-dot`;return null===o?null:(0,c.isValidElement)(o)?(0,c.cloneElement)(o,{className:(0,a.default)(o.props.className,n)}):(0,c.isValidElement)(p)?(0,c.cloneElement)(p,{className:(0,a.default)(p.props.className,n)}):i.createElement("span",{className:(0,a.default)(n,`${e}-dot-spin`)},i.createElement("i",{className:`${e}-dot-item`,key:1}),i.createElement("i",{className:`${e}-dot-item`,key:2}),i.createElement("i",{className:`${e}-dot-item`,key:3}),i.createElement("i",{className:`${e}-dot-item`,key:4}))}(t,e),f&&S?i.createElement("div",{className:`${t}-text`},f):null);return S?i.createElement("div",Object.assign({},T,{className:(0,a.default)(`${t}-nested-loading`,g,v)}),C&&i.createElement("div",{key:"loading"},P),i.createElement("div",{className:w,key:"container"},y)):P},SpinFC=e=>{let{prefixCls:t}=e,{getPrefixCls:o}=i.useContext(u.ConfigContext),n=o("spin",t),[r,a]=(0,d.default)(n),s=Object.assign(Object.assign({},e),{spinPrefixCls:n,hashId:a});return r(i.createElement(Spin,Object.assign({},s)))};SpinFC.setDefaultIndicator=e=>{p=e},t.default=SpinFC},9405:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(55943),r=o(98078),i=o(3184);let a=new n.Keyframes("antSpinMove",{to:{opacity:1}}),s=new n.Keyframes("antRotate",{to:{transform:"rotate(405deg)"}}),genSpinStyle=e=>({[`${e.componentCls}`]:Object.assign(Object.assign({},(0,r.resetComponent)(e)),{position:"absolute",display:"none",color:e.colorPrimary,fontSize:0,textAlign:"center",verticalAlign:"middle",opacity:0,transition:`transform ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`,"&-spinning":{position:"static",display:"inline-block",opacity:1},"&-nested-loading":{position:"relative",[`> div > ${e.componentCls}`]:{position:"absolute",top:0,insetInlineStart:0,zIndex:4,display:"block",width:"100%",height:"100%",maxHeight:e.contentHeight,[`${e.componentCls}-dot`]:{position:"absolute",top:"50%",insetInlineStart:"50%",margin:-e.dotSize/2},[`${e.componentCls}-text`]:{position:"absolute",top:"50%",width:"100%",paddingTop:(e.dotSize-e.fontSize)/2+2,textShadow:`0 1px 2px ${e.colorBgContainer}`,fontSize:e.fontSize},[`&${e.componentCls}-show-text ${e.componentCls}-dot`]:{marginTop:-(e.dotSize/2)-10},"&-sm":{[`${e.componentCls}-dot`]:{margin:-e.dotSizeSM/2},[`${e.componentCls}-text`]:{paddingTop:(e.dotSizeSM-e.fontSize)/2+2},[`&${e.componentCls}-show-text ${e.componentCls}-dot`]:{marginTop:-(e.dotSizeSM/2)-10}
1},"&-lg":{[`${e.componentCls}-dot`]:{margin:-(e.dotSizeLG/2)},[`${e.componentCls}-text`]:{paddingTop:(e.dotSizeLG-e.fontSize)/2+2},[`&${e.componentCls}-show-text ${e.componentCls}-dot`]:{marginTop:-(e.dotSizeLG/2)-10}}},[`${e.componentCls}-container`]:{position:"relative",transition:`opacity ${e.motionDurationSlow}`,"&::after":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:10,width:"100%",height:"100%",background:e.colorBgContainer,opacity:0,transition:`all ${e.motionDurationSlow}`,content:'""',pointerEvents:"none"}},[`${e.componentCls}-blur`]:{clear:"both",opacity:.5,userSelect:"none",pointerEvents:"none","&::after":{opacity:.4,pointerEvents:"auto"}}},"&-tip":{color:e.spinDotDefault},[`${e.componentCls}-dot`]:{position:"relative",display:"inline-block",fontSize:e.dotSize,width:"1em",height:"1em","&-item":{position:"absolute",display:"block",width:(e.dotSize-e.marginXXS/2)/2,height:(e.dotSize-e.marginXXS/2)/2,backgroundColor:e.colorPrimary,borderRadius:"100%",transform:"scale(0.75)",transformOrigin:"50% 50%",opacity:.3,animationName:a,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear",animationDirection:"alternate","&:nth-child(1)":{top:0,insetInlineStart:0},"&:nth-child(2)":{top:0,insetInlineEnd:0,animationDelay:"0.4s"},"&:nth-child(3)":{insetInlineEnd:0,bottom:0,animationDelay:"0.8s"},"&:nth-child(4)":{bottom:0,insetInlineStart:0,animationDelay:"1.2s"}},"&-spin":{transform:"rotate(45deg)",animationName:s,animationDuration:"1.2s",animationIterationCount:"infinite",animationTimingFunction:"linear"}},[`&-sm ${e.componentCls}-dot`]:{fontSize:e.dotSizeSM,i:{width:(e.dotSizeSM-e.marginXXS/2)/2,height:(e.dotSizeSM-e.marginXXS/2)/2}},[`&-lg ${e.componentCls}-dot`]:{fontSize:e.dotSizeLG,i:{width:(e.dotSizeLG-e.marginXXS)/2,height:(e.dotSizeLG-e.marginXXS)/2}},[`&${e.componentCls}-show-text ${e.componentCls}-text`]:{display:"block"}})});t.default=(0,i.genComponentStyleHook)("Spin",e=>{let t=(0,i.mergeToken)(e,{spinDotDefault:e.colorTextDescription});return[genSpinStyle(t)]},e=>({contentHeight:400,dotSize:e.controlHeightLG/2,dotSizeSM:.35*e.controlHeightLG,dotSizeLG:e.controlHeight}))},83514:function(e,t,o){"use strict";var n=o(64836).default,r=o(75263).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(o(67294)),a=n(o(94184)),s=o(31929),l=n(o(77785)),__rest=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(o[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,n=Object.getOwnPropertySymbols(e);r<n.length;r++)0>t.indexOf(n[r])&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(o[n[r]]=e[n[r]]);return o};let c=i.forwardRef((e,t)=>{let{prefixCls:o,style:n,className:r,checked:c,onChange:u,onClick:d}=e,p=__rest(e,["prefixCls","style","className","checked","onChange","onClick"]),{getPrefixCls:m,tag:f}=i.useContext(s.ConfigContext),g=m("tag",o),[h,y]=(0,l.default)(g),v=(0,a.default)(g,`${g}-checkable`,{[`${g}-checkable-checked`]:c},null==f?void 0:f.className,r,y);return h(i.createElement("span",Object.assign({},p,{ref:t,style:Object.assign(Object.assign({},n),null==f?void 0:f.style),className:v,onClick:e=>{null==u||u(!c),null==d||d(e)}})))});t.default=c},59361:function(e,t,o){"use strict";var n=o(64836).default,r=o(75263).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(o(67294)),a=n(o(40753)),s=n(o(94184)),l=o(45471),c=n(o(82456));o(13594);var u=n(o(32258)),d=o(31929),p=n(o(83514)),m=n(o(77785)),f=n(o(85566)),g=n(o(31141)),__rest=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(o[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,n=Object.getOwnPropertySymbols(e);r<n.length;r++)0>t.indexOf(n[r])&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(o[n[r]]=e[n[r]]);return o};let h=i.forwardRef((e,t)=>{let{prefixCls:o,className:n,rootClassName:r,style:p,children:h,icon:y,color:v,onClose:x,closeIcon:C,closable:b,bordered:S=!0}=e,_=__rest(e,["prefixCls","className","rootClassName","style","children","icon","color","onClose","closeIcon","closable","bordered"]),{getPrefixCls:j,direction:k,tag:w}=i.useContext(d.ConfigContext),[T,$]=i.useState(!0);i.useEffect(()=>{"visible"in _&&$(_.visible)},[_.visible]);let P=(0,l.isPresetColor)(v),E=(0,l.isPresetStatusColor)(v),N=P||E,O=Object.assign(Object.assign({backgroundColor:v&&!N?v:void 0},null==w?void 0:w.style),p),I=j("tag",o),[z,R]=(0,m.default)(I),D=(0,s.default)(I,null==w?void 0:w.className,{[`${I}-${v}`]:N,[`${I}-has-color`]:v&&!N,[`${I}-hidden`]:!T,[`${I}-rtl`]:"rtl"===k,[`${I}-borderless`]:!S},n,r,R),handleCloseClick=e=>{e.stopPropagation(),null==x||x(e),e.defaultPrevented||$(!1)},[,A]=(0,c.default)(b,C,e=>null===e?i.createElement(a.default,{className:`${I}-close-icon`,onClick:handleCloseClick}):i.createElement("span",{className:`${I}-close-icon`,onClick:handleCloseClick},e),null,!1),M="function"==typeof _.onClick||h&&"a"===h.type,L=y||null,H=L?i.createElement(i.Fragment,null,L,h&&i.createElement("span",null,h)):h,B=i.createElement("span",Object.assign({},_,{ref:t,className:D,style:O}),H,A,P&&i.createElement(f.default,{key:"preset",prefixCls:I}),E&&i.createElement(g.default,{key:"status",prefixCls:I}));
1return z(M?i.createElement(u.default,{component:"Tag"},B):B)});h.CheckableTag=p.default,t.default=h},77785:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.prepareToken=t.prepareCommonToken=t.default=void 0;var n=o(98078),r=o(3184);let genBaseStyle=e=>{let{paddingXXS:t,lineWidth:o,tagPaddingHorizontal:r,componentCls:i}=e,a=r-o;return{[i]:Object.assign(Object.assign({},(0,n.resetComponent)(e)),{display:"inline-block",height:"auto",marginInlineEnd:e.marginXS,paddingInline:a,fontSize:e.tagFontSize,lineHeight:e.tagLineHeight,whiteSpace:"nowrap",background:e.defaultBg,border:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,opacity:1,transition:`all ${e.motionDurationMid}`,textAlign:"start",position:"relative",[`&${i}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:e.defaultColor},[`${i}-close-icon`]:{marginInlineStart:t-o,color:e.colorTextDescription,fontSize:e.tagIconSize,cursor:"pointer",transition:`all ${e.motionDurationMid}`,"&:hover":{color:e.colorTextHeading}},[`&${i}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${e.iconCls}-close, ${e.iconCls}-close:hover`]:{color:e.colorTextLightSolid}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${i}-checkable-checked):hover`]:{color:e.colorPrimary,backgroundColor:e.colorFillSecondary},"&:active, &-checked":{color:e.colorTextLightSolid},"&-checked":{backgroundColor:e.colorPrimary,"&:hover":{backgroundColor:e.colorPrimaryHover}},"&:active":{backgroundColor:e.colorPrimaryActive}},"&-hidden":{display:"none"},[`> ${e.iconCls} + span, > span + ${e.iconCls}`]:{marginInlineStart:a}}),[`${i}-borderless`]:{borderColor:"transparent",background:e.tagBorderlessBg}}},prepareToken=e=>{let{lineWidth:t,fontSizeIcon:o}=e,n=e.fontSizeSM,i=`${e.lineHeightSM*n}px`,a=(0,r.mergeToken)(e,{tagFontSize:n,tagLineHeight:i,tagIconSize:o-2*t,tagPaddingHorizontal:8,tagBorderlessBg:e.colorFillTertiary});return a};t.prepareToken=prepareToken;let prepareCommonToken=e=>({defaultBg:e.colorFillQuaternary,defaultColor:e.colorText});t.prepareCommonToken=prepareCommonToken,t.default=(0,r.genComponentStyleHook)("Tag",e=>{let t=prepareToken(e);return genBaseStyle(t)},prepareCommonToken)},85566:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(77785),r=o(3184);let genPresetStyle=e=>(0,r.genPresetColor)(e,(t,o)=>{let{textColor:n,lightBorderColor:r,lightColor:i,darkColor:a}=o;return{[`${e.componentCls}-${t}`]:{color:n,background:i,borderColor:r,"&-inverse":{color:e.colorTextLightSolid,background:a,borderColor:a},[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}}});t.default=(0,r.genSubStyleComponent)(["Tag","preset"],e=>{let t=(0,n.prepareToken)(e);return genPresetStyle(t)},n.prepareCommonToken)},31141:function(e,t,o){"use strict";var n=o(64836).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(77785),i=n(o(59018)),a=o(3184);let genTagStatusStyle=(e,t,o)=>{let n=(0,i.default)(o);return{[`${e.componentCls}-${t}`]:{color:e[`color${o}`],background:e[`color${n}Bg`],borderColor:e[`color${n}Border`],[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}}};t.default=(0,a.genSubStyleComponent)(["Tag","status"],e=>{let t=(0,r.prepareToken)(e);return[genTagStatusStyle(t,"success","Success"),genTagStatusStyle(t,"processing","Info"),genTagStatusStyle(t,"error","Error"),genTagStatusStyle(t,"warning","Warning")]},r.prepareCommonToken)},71854:function(e,t,o){(window.__NEXT_P=window.__NEXT_P||[]).push(["/app/processos/novo-processo",function(){return o(86274)}])},95791:function(e,t,o){"use strict";var n=o(85893),r=o(67294),i=o(64713),a=o(59361),s=o(45114),l=o.n(s);t.Z=(0,r.memo)(function(e){let{value:t,children:o,checked:r,className:s,tag:c}=e;return(0,n.jsx)("div",{className:"".concat(s||""),children:(0,n.jsx)(i.default,{className:" ".concat(l().option," ").concat(r?l().selected:""),checked:r,defaultChecked:r,value:t,children:(0,n.jsxs)(n.Fragment,{children:[!!c&&(0,n.jsx)(a.default,{className:l().tag,color:"cyan",children:c}),o]})})})})},86274:function(e,t,o){"use strict";o.r(t),o.d(t,{default:function(){return w}});var n=o(85893),r=o(41664),i=o.n(r),a=o(64713),s=o(10149),l=o(53740),c=o(64749),u=o(94055),d=o(51024),p=o(97538),m=o(7136),f=o(85317),g=o(54434),h=o(95791),y=o(67294),v=o(90008),x=o(39691),C=o(16318),b=o(27856),S=o(11163),_=o(4670),j=o(55885),k=o.n(j),w=(0,_.FR)(function(){var e;let{loading:t,userLoading:o,customersList:r,user:_,processList:j,handleChangeSelect:w,handleInputCustomerChange:T,handleEmailInputCustomerChange:$,customer:P,customerIdentifier:E,customerEmail:N,processType:O,handleSelectProcessType:I,handleSubmit:z,loadingButton:R,customerObj:D}=function(){let e=(0,S.useRouter)(),{user:t,defaultCompanyId:o,userLoading:n,userIsCad:r,userIsAffiliate:i}=(0,y.useContext)(x.S),[a,s]=(0,y.useState)([]),[l,c]=(0,y.useState)(!0),[u,d]=(0,y.useState)([]),[p,m]=(0,y.useState)(null),[f,g]=(0,y.useState)(""),[h,_]=(0,y.useState)(""),[j,k]=(0,y.useState)(null),[w,T]=(0,y.useState)(null),[$,P]=(0,y.useState)(!1),E=(0,y.useCallback)(async()=>{v.ApiPrivate.getIncorporateModels("id,icon,price,credits,description,title,slug,int_price_sufix,total_process,visible_to&active=true").then(e=>{let o={...e.data};return t&&t.is_staff?s(o.items):s(o&&o.items.filter(e=>{let t=e.visible_to&&e.visible_to.includes("affiliate"),o=e.visible_to&&e.visible_to.includes("enterprise");return i&&!r?t:r&&!i?o:i||r?!!r&&!!i&&(o||t):t})),c(!1),()=>{s([])}})},[t,o,i,r]),N=(0,y.useCallback)(async()=>{v.ApiPrivate.getCustomerListByCompanyId({companyId:o,filters:{active:!0}}).then(e=>{d({...e.data})}).catch(()=>{d([])})},[o]);(0,y.useEffect)(()=>{E(),N()},[E,N,o]);let O=(0,b.D)(500,e=>{g(e.target.value)}),I=(0,b.D)(500,e=>{_(e.target.value)}),z=(0,y.useCallback)(function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;v.ApiPrivate.createEnterpriseProcess({b2b2b:!0,company_id:o,customer_id:t&&t.id||w.id,identificator:f,model_id:j.id}).then(t=>{let{data:o}=t;C.default.success({placement:"bottomRight",message:"Processo criado",description:"Processo criado com sucesso! Voc\xea ser\xe1 redirecionado em alguns instantes para a p\xe1gina do seu processo."}),setTimeout(()=>{e.push("/app/processos/".concat(o.process))},3e3)}).catch(()=>{C.default.error({placement:"bottomRight",message:"Houve algum erro",de
1scription:"Houve um erro ao criar o processo. Tente novamente mais tarde."}),P(!1)})},[f,null==w?void 0:w.id,o,null==j?void 0:j.id,e]),R=(0,y.useCallback)(async()=>{if(P(!0),"new"===p)try{let e=await v.ApiPrivate.createCustomer({customer_identifier:f,email:h,owner_company:o,company_id:o});if(e.status>=200&&e.status<=299){let{data:t}=e;z(t)}}catch(n){let{response:{data:e}}=n,{error:t}=e,o="Houve um erro ao cadastrar o cliente. Tente novamente mais tarde.";(null==t?void 0:t.type)==="customer_already_exists"&&(o="Cliente j\xe1 cadastrado."),C.default.error({placement:"bottomRight",message:"Houve algum erro",description:o}),P(!1)}else z()},[z,p,f,o,h]);return{user:t,userLoading:n,processList:a,loading:l,customersList:u,handleChangeSelect:e=>{var t;let o=null===(t=u.items)||void 0===t?void 0:t.find(t=>t.id===e);return m(e),"new"===e&&(T(o),g(null)),o&&o.id&&(T(o),g(null==o?void 0:o.customer_identifier)),!0},handleInputCustomerChange:O,handleEmailInputCustomerChange:I,customer:p,customerIdentifier:f,customerEmail:h,processType:j,customerObj:w,handleSelectProcessType:function(e){k(e.target.value)},handleSubmit:R,loadingButton:$}}(),{Title:A,Text:M}=l.default,{Option:L,OptGroup:H}=c.default,[B]=p.default.useForm();return(0,n.jsxs)("section",{className:"container padding smallPadding",children:[(0,n.jsxs)(A,{level:3,style:{fontSize:"1.5rem"},children:[(0,n.jsx)(i(),{href:"/app/processos",children:(0,n.jsx)(f.default,{size:24,style:{marginRight:"1.5rem"}})}),"Adicionar novo processo"]}),(0,n.jsxs)("div",{className:k().cardsContainer,children:[(0,n.jsx)(m.Card,{"data-testid":"client-process-card",children:(0,n.jsxs)(s.default,{active:!0,loading:t,paragraph:{rows:3},children:[!t&&r&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(M,{className:k().label,children:"Selecione o cliente"}),(0,n.jsxs)(c.default,{style:{marginTop:"1rem"},onChange:w,className:"fullWidth",placeholder:"Selecionar o cliente",size:"large",loading:o,value:P,children:[(0,n.jsx)(H,{label:"Novo cliente",children:(0,n.jsx)(L,{value:"new",children:"+ Adicionar um cliente"},"new")}),(0,n.jsx)(H,{children:_&&(null==r?void 0:null===(e=r.items)||void 0===e?void 0:e.map(e=>(0,n.jsx)(L,{value:e.id,children:e.customer_identifier},e.id)))})]}),"new"===P&&(0,n.jsxs)(p.default,{form:B,children:[(0,n.jsxs)(M,{className:k().label,style:{marginTop:"32px"},children:["Identifica\xe7\xe3o do cliente",(0,n.jsx)(u.default,{title:"Escolha um identificador para o seu cliente. Pode ser por exemplo: Raz\xe3o Social, nome do representante e etc.",children:(0,n.jsx)(g.default,{style:{color:"#ff0066",marginLeft:"0.5rem",fontSize:"1rem"}})})]}),(0,n.jsx)(p.default.Item,{name:"identifier",rules:[{required:!0,message:"Este campo \xe9 obrigat\xf3rio"}],children:(0,n.jsx)(d.default,{className:k().input,size:"large",placeholder:"Nome da identifica\xe7\xe3o","data-hj-allow":!0,autoFocus:!0,onChange:T})}),(0,n.jsx)(M,{className:k().label,style:{marginTop:"32px"},children:"E-mail do cliente"}),(0,n.jsx)(p.default.Item,{name:"email",rules:[{type:"email",message:"Este e-mail n\xe3o \xe9 v\xe1lido!"},{required:!0,message:"Este campo \xe9 obrigat\xf3rio"}],children:(0,n.jsx)(d.default,{className:k().input,size:"large",placeholder:"E-mail",onChange:$})})]})]}),(0,n.jsx)(M,{className:k().label,style:{marginTop:"32px"},children:"Selecione o tipo de processo"}),(0,n.jsx)(a.default.Group,{className:k().radioGroup,onChange:I,children:null==j?void 0:j.map(e=>(0,n.jsx)(h.Z,{value:e,checked:(null==O?void 0:O.id)===e.id,className:k().radioOption,children:e.title},e.id))})]})}),(0,n.jsxs)(m.Card,{"data-testid":"client-summary-card",children:[(0,n.jsx)("p",{className:k().label,children:"Resumo"}),(0,n.jsxs)("div",{className:k().summary,children:[(0,n.jsxs)("div",{className:k().summaryItem,role:"listitem","aria-label":"Cliente",children:[(0,n.jsx)(A,{level:5,children:"Cliente"}),!!E&&(0,n.jsx)("p",{className:k().summaryItemDescription,children:E})]}),(0,n.jsxs)("div",{className:"".concat(k().summaryItem," ").concat(k().row),role:"listitem","aria-label":"Tipo de processo",children:[(0,n.jsxs)("div",{className:k().summaryInfo,children:[(0,n.jsx)(A,{level:5,children:"Tipo de processo"}),!!O&&(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)("div",{className:k().summaryItemDescription,children:[(0,n.jsx)("p",{className:k().summaryItemSubtitle,children:O.title}),(0,n.jsx)("small",{children:O.description})]})})]}),!!O&&(0,n.jsx)("div",{className:k().summaryPointsCost,children:(0,n.jsxs)("span",{children:["A partir de ",O.credits," ",1!==O.credits?"pontos":"ponto"]})})]})]}),(0,n.jsx)(m.zx,{disabled:!D&&"new"!==P||(!E||!N)&&"new"===P||!O||R,loading:R,type:"primary",style:{width:"100%"},onClick:()=>B.validateFields().then(()=>{z()}),children:"Criar processo"})]})]})]})})},4670:function(e,t,o){"use strict";o.d(t,{FR:function(){return ProtectRoute}
1,Ko:function(){return ProtectRouteAndCheckIfHasRoleAccess},Qx:function(){return ProtectRouteAndCheckIfIsEnterprise},Xy:function(){return AdminRoute},cS:function(){return ProtectRouteAndVerifyAnsweredICP},jr:function(){return ProtectRouteAndCheckIfHasIndicationAccess}});var n=o(85893),r=o(67294),i=o(39691),a=o(11163),s=o(89552),l=o(47041);let SpinLoader=()=>(0,n.jsx)(s.default,{size:"large",style:{margin:"60px auto 0px",padding:"70px",height:"100px",display:"table",textAlign:"center"}}),ComponentView=e=>{let{Component:t,user:o,className:r,componentProps:i}=e;return(0,n.jsx)("div",{className:"loggedIn_layout ".concat(r),children:(0,n.jsx)(t,{...arguments,user:o,...i})})};function ProtectRoute(e){return t=>{let{user:o,userLoading:s,logout:l,answeredICPform:c,isRegisterICPFeatureOn:u}=(0,r.useContext)(i.S),d=(0,a.useRouter)();return((0,r.useEffect)(()=>{if(o||s||(l(),d.push("/login?logout=true&back=".concat(d.asPath,"&as=").concat(d.route))),o&&!s&&o.is_blocked){let redirectToBlocked=async()=>{await d.push("/blocked?from=".concat(d.asPath)),l()};redirectToBlocked()}},[s,o]),!o||s)?(0,n.jsx)(SpinLoader,{}):(0,n.jsx)(ComponentView,{Component:e,user:o,componentProps:t})}}function AdminRoute(e){return()=>{let{user:t,userLoading:o,logout:s}=(0,r.useContext)(i.S),l=(0,a.useRouter)();return((0,r.useEffect)(()=>{t||o||(s(),l.push("/login?logout=true&back=".concat(l.asPath,"&as=").concat(l.route))),t&&!t.is_staff&&l.replace("/app/home")},[o,t]),!t||o||t&&!t.is_staff)?(0,n.jsx)(SpinLoader,{}):(0,n.jsx)(ComponentView,{Component:e,user:t})}}function ProtectRouteAndCheckIfIsEnterprise(e){return()=>{let{user:t,userLoading:o,defaultCompanyObject:s}=(0,r.useContext)(i.S),l=(0,a.useRouter)(),[c,u]=(0,r.useState)(!0);return((0,r.useEffect)(()=>{t||o||l.push("/login?logout=true&back=".concat(l.asPath,"&as=").concat(l.route)),t&&s&&s.is_enterprise_customer&&l.push("/app/home"),s&&(s.access_roles.includes("legalizacao-b2b2b")||s.access_roles.includes("influencer")?u(!1):l.push("/app/home"))},[o,t,s]),c)?(0,n.jsx)(SpinLoader,{}):(0,n.jsx)(ComponentView,{Component:e,user:t})}}function ProtectRouteAndCheckIfHasIndicationAccess(e){return()=>{let{user:t,userLoading:o,defaultCompanyObject:s}=(0,r.useContext)(i.S),l=(0,a.useRouter)(),[c,u]=(0,r.useState)(!0);return((0,r.useEffect)(()=>{t||o||l.push("/login?logout=true&back=".concat(l.asPath,"&as=").concat(l.route)),t&&s&&s.is_enterprise_customer&&l.push("/app/home"),s&&(s.access_roles.includes("dashboard-cad")||s.access_roles.includes("influencer")?u(!1):l.push("/app/home"))},[o,t,s,l]),c)?(0,n.jsx)(SpinLoader,{}):(0,n.jsx)(ComponentView,{Component:e,user:t})}}function ProtectRouteAndCheckIfHasRoleAccess(e){let{Component:t,roleList:o=[],logicalOperator:s="AND"}=e;return()=>{let{user:e,userLoading:l,defaultCompanyObject:c}=(0,r.useContext)(i.S),u=(0,a.useRouter)(),[d,p]=(0,r.useState)(!0);return((0,r.useEffect)(()=>{if(e||l||u.push("/login?logout=true&back=".concat(u.asPath,"&as=").concat(u.route)),e&&c&&c.is_enterprise_customer&&u.push("/app/home"),c){let e=o.map(e=>c.access_roles.includes(e)),t="AND"===s?e.every(e=>!!e):e.some(e=>!!e);t?p(!1):u.push("/app/home")}},[l,e,c,u]),d)?(0,n.jsx)(SpinLoader,{}):(0,n.jsx)(ComponentView,{Component:t,user:e})}}function ProtectRouteAndVerifyAnsweredICP(e){return t=>{let{user:o,userLoading:s,logout:c,answeredICPform:u}=(0,r.useContext)(i.S);(0,l.getCookie)("_aicpf");let d=(0,a.useRouter)();return((0,r.useEffect)(()=>{if(o||s||(c(),d.push("/login?logout=true&back=".concat(d.asPath,"&as=").concat(d.route))),o&&!s&&o.is_blocked){let redirectToBlocked=async()=>{await d.push("/blocked?from=".concat(d.asPath)),c()};redirectToBlocked()}},[s,o]),!o||s)?(0,n.jsx)(SpinLoader,{}):(0,n.jsx)(ComponentView,{Component:e,user:o,componentProps:t})}}},45114:function(e){e.exports={option:"styles_option__K_Ylv",selected:"styles_selected__4OV75",tag:"styles_tag__K_NRP"}},55885:function(e){e.exports={cardsContainer:"styles_cardsContainer__z_aNV",label:"styles_label__KXwDg",input:"styles_input__SRcks",summary:"styles_summary__Mdjbp",summaryItem:"styles_summaryItem__Keyxk",summaryItemTitle:"styles_summaryItemTitle__kVXsD",summaryItemDescription:"styles_summaryItemDescription__nDEak",summaryItemSubtitle:"styles_summaryItemSubtitle__TlXI2",row:"styles_row__0BpsI",summaryInfo:"styles_summaryInfo__Yt40_",summaryPointsCost:"styles_summaryPointsCost__JFZUZ",radioGroup:"styles_radioGroup__nkXiQ",radioOption:"styles_radioOption__8mjOv"}},42189:function(e,t){"use strict";function throttle(e,t,o){var n,r=o||{},i=r.noTrailing,a=void 0!==i&&i,s=r.noLeading,l=void 0!==s&&s,c=r.debounceMode,u=void 0===c?void 0:c,d=!1,p=0;function clearExistingTimeout(){n&&clearTimeout(n)}function wrapper(){for(var o=arguments.length,r=Array(o),i=0;i<o;i++)r[i]=arguments[i];var s=this,c=Date.now()-p;function exec(){p=Date.now(),t.apply(s,r)}function clear(){n=void 0}!d&&(l||!u||n||exec(),clearExistingTimeout(),void 0===u&&c>e?l?(p=Date.now(),a||(n=setTimeout(u?clear:exec,e))):exec():!0!==a&&(n=setTimeout(u?clear:exec,void 0===u?e-c:e)))}return wrapper.cancel=function(e){var t=(e||{}).upcomingOnly;clearExistingTimeout(),d=!(void 0!==t&&t)},wrapper}
1Object.defineProperty(t,"__esModule",{value:!0}),t.debounce=function(e,t,o){var n=(o||{}).atBegin;return throttle(e,t,{debounceMode:!1!==(void 0!==n&&n)})},t.throttle=throttle},27856:function(e,t,o){"use strict";function debounce(e,t,o){var n=(o||{}).atBegin;return function(e,t,o){var n,r=o||{},i=r.noTrailing,a=void 0!==i&&i,s=r.noLeading,l=void 0!==s&&s,c=r.debounceMode,u=void 0===c?void 0:c,d=!1,p=0;function clearExistingTimeout(){n&&clearTimeout(n)}function wrapper(){for(var o=arguments.length,r=Array(o),i=0;i<o;i++)r[i]=arguments[i];var s=this,c=Date.now()-p;function exec(){p=Date.now(),t.apply(s,r)}function clear(){n=void 0}!d&&(l||!u||n||exec(),clearExistingTimeout(),void 0===u&&c>e?l?(p=Date.now(),a||(n=setTimeout(u?clear:exec,e))):exec():!0!==a&&(n=setTimeout(u?clear:exec,void 0===u?e-c:e)))}return wrapper.cancel=function(e){var t=(e||{}).upcomingOnly;clearExistingTimeout(),d=!(void 0!==t&&t)},wrapper}(e,t,{debounceMode:!1!==(void 0!==n&&n)})}o.d(t,{D:function(){return debounce}})}},function(e){e.O(0,[97538,64713,49774,92888,40179],function(){return e(e.s=71854)}),_N_E=e.O()}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.