PageSourceSearch

https://www.companyhero.com/_next/static/chunks/pages/app/formulario-de-cancelamento-4e55808a80c1d73c.js

js companyhero.com collected 2026-09-24 09:06:24 UTC 38,069 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[68429,45697,67814,63328,96077,54746,93198,91624,3624],{67814:function(e,t,n){"use strict";n.r(t),n.d(t,{FontAwesomeIcon:function(){return c}});var o=n(23636),a=n(45697),r=n.n(a),i=n(67294);function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function _objectSpread2(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(n),!0).forEach(function(t){_defineProperty(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _toConsumableArray(e){return function(e){if(Array.isArray(e))return _arrayLikeToArray(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(e,t)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function camelize(e){var t;return(t=e-0)==t?e:(e=e.replace(/[\-_\s]+(.)?/g,function(e,t){return t?t.toUpperCase():""})).substr(0,1).toLowerCase()+e.substr(1)}var l=["style"],s=!1;try{s=!0}catch(e){}function normalizeIconArgs(e){return e&&"object"===_typeof(e)&&e.prefix&&e.iconName&&e.icon?e:o.Qc.icon?o.Qc.icon(e):null===e?null:e&&"object"===_typeof(e)&&e.prefix&&e.iconName?e:Array.isArray(e)&&2===e.length?{prefix:e[0],iconName:e[1]}:"string"==typeof e?{prefix:"fas",iconName:e}:void 0}function objectWithKey(e,t){return Array.isArray(t)&&t.length>0||!Array.isArray(t)&&t?_defineProperty({},e,t):{}}var c=i.forwardRef(function(e,t){var n,a,r,i,l,d,p,m,f,h,g,y,v,x,b,_,C,S,j,I=e.icon,w=e.mask,P=e.symbol,N=e.className,O=e.title,k=e.titleId,T=e.maskId,F=normalizeIconArgs(I),A=objectWithKey("classes",[].concat(_toConsumableArray((a=e.beat,r=e.fade,i=e.beatFade,l=e.bounce,d=e.shake,p=e.flash,m=e.spin,f=e.spinPulse,h=e.spinReverse,g=e.pulse,y=e.fixedWidth,v=e.inverse,x=e.border,b=e.listItem,_=e.flip,C=e.size,S=e.rotation,j=e.pull,Object.keys((_defineProperty(n={"fa-beat":a,"fa-fade":r,"fa-beat-fade":i,"fa-bounce":l,"fa-shake":d,"fa-flash":p,"fa-spin":m,"fa-spin-reverse":h,"fa-spin-pulse":f,"fa-pulse":g,"fa-fw":y,"fa-inverse":v,"fa-border":x,"fa-li":b,"fa-flip":!0===_,"fa-flip-horizontal":"horizontal"===_||"both"===_,"fa-flip-vertical":"vertical"===_||"both"===_},"fa-".concat(C),null!=C),_defineProperty(n,"fa-rotate-".concat(S),null!=S&&0!==S),_defineProperty(n,"fa-pull-".concat(j),null!=j),_defineProperty(n,"fa-swap-opacity",e.swapOpacity),n)).map(function(e){return n[e]?e:null}).filter(function(e){return e}))),_toConsumableArray(N.split(" ")))),E=objectWithKey("transform","string"==typeof e.transform?o.Qc.transform(e.transform):e.transform),z=objectWithKey("mask",normalizeIconArgs(w)),D=(0,o.qv)(F,_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({},A),E),z),{},{symbol:P,title:O,titleId:k,maskId:T}));if(!D)return!function(){if(!s&&console&&"function"==typeof console.error){var e;(e=console).error.apply(e,arguments)}}("Could not find icon",F),null;var R=D.abstract,$={ref:t};return Object.keys(e).forEach(function(t){c.defaultProps.hasOwnProperty(t)||($[t]=e[t])}),u(R[0],$)});c.displayName="FontAwesomeIcon",c.propTypes={beat:r().bool,border:r().bool,beatFade:r().bool,bounce:r(
1).bool,className:r().string,fade:r().bool,flash:r().bool,mask:r().oneOfType([r().object,r().array,r().string]),maskId:r().string,fixedWidth:r().bool,inverse:r().bool,flip:r().oneOf([!0,!1,"horizontal","vertical","both"]),icon:r().oneOfType([r().object,r().array,r().string]),listItem:r().bool,pull:r().oneOf(["right","left"]),pulse:r().bool,rotation:r().oneOf([0,90,180,270]),shake:r().bool,size:r().oneOf(["2xs","xs","sm","lg","xl","2xl","1x","2x","3x","4x","5x","6x","7x","8x","9x","10x"]),spin:r().bool,spinPulse:r().bool,spinReverse:r().bool,symbol:r().oneOfType([r().bool,r().string]),title:r().string,titleId:r().string,transform:r().oneOfType([r().string,r().object]),swapOpacity:r().bool},c.defaultProps={border:!1,className:"",mask:null,maskId:null,fixedWidth:!1,inverse:!1,flip:!1,icon:null,listItem:!1,pull:null,pulse:!1,rotation:null,size:null,spin:!1,spinPulse:!1,spinReverse:!1,beat:!1,fade:!1,beatFade:!1,bounce:!1,shake:!1,symbol:!1,title:"",titleId:null,transform:null,swapOpacity:!1};var u=(function convert(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if("string"==typeof t)return t;var o=(t.children||[]).map(function(t){return convert(e,t)}),a=Object.keys(t.attributes||{}).reduce(function(e,n){var o=t.attributes[n];switch(n){case"class":e.attrs.className=o,delete t.attributes.class;break;case"style":e.attrs.style=o.split(";").map(function(e){return e.trim()}).filter(function(e){return e}).reduce(function(e,t){var n=t.indexOf(":"),o=camelize(t.slice(0,n)),a=t.slice(n+1).trim();return o.startsWith("webkit")?e[o.charAt(0).toUpperCase()+o.slice(1)]=a:e[o]=a,e},{});break;default:0===n.indexOf("aria-")||0===n.indexOf("data-")?e.attrs[n.toLowerCase()]=o:e.attrs[camelize(n)]=o}return e},{attrs:{}}),r=n.style,i=void 0===r?{}:r,s=function(e,t){if(null==e)return{};var n,o,a=function(e,t){if(null==e)return{};var n,o,a={},r=Object.keys(e);for(o=0;o<r.length;o++)n=r[o],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(o=0;o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(n,l);return a.attrs.style=_objectSpread2(_objectSpread2({},a.attrs.style),i),e.apply(void 0,[t.tag,_objectSpread2(_objectSpread2({},a.attrs),s)].concat(_toConsumableArray(o)))}).bind(null,i.createElement)},89552:function(e,t,n){"use strict";var o=n(64836).default,a=n(75263).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(67294)),i=o(n(94184)),l=o(n(18475)),s=n(42189),c=n(47419);n(13594);var u=n(31929),d=o(n(9405)),__rest=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,o=Object.getOwnPropertySymbols(e);a<o.length;a++)0>t.indexOf(o[a])&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(n[o[a]]=e[o[a]]);return n};let p=null,Spin=e=>{let{spinPrefixCls:t,spinning:n=!0,delay:o=0,className:a,rootClassName:d,size:m="default",tip:f,wrapperClassName:h,style:g,children:y,hashId:v}=e,x=__rest(e,["spinPrefixCls","spinning","delay","className","rootClassName","size","tip","wrapperClassName","style","children","hashId"]),[b,_]=r.useState(()=>n&&(!n||!o||!!isNaN(Number(o))));r.useEffect(()=>{if(n){let e=(0,s.debounce)(o,()=>{_(!0)});return e(),()=>{var t;null===(t=null==e?void 0:e.cancel)||void 0===t||t.call(e)}}_(!1)},[o,n]);let C=r.useMemo(()=>void 0!==y,[y]),{direction:S,spin:j}=r.useContext(u.ConfigContext),I=(0,i.default)(t,null==j?void 0:j.className,{[`${t}-sm`]:"small"===m,[`${t}-lg`]:"large"===m,[`${t}-spinning`]:b,[`${t}-show-text`]:!!f,[`${t}-rtl`]:"rtl"===S},a,d,v),w=(0,i.default)(`${t}-container`,{[`${t}-blur`]:b}),P=(0,l.default)(x,["indicator","prefixCls"]),N=Object.assign(Object.assign({},null==j?void 0:j.style),g),O=r.createElement("div",Object.assign({},P,{style:N,className:I,"aria-live":"polite","aria-busy":b}),function(e,t){let{indicator:n}=t,o=`${e}-dot`;return null===n?null:(0,c.isValidElement)(n)?(0,c.cloneElement)(n,{className:(0,i.default)(n.props.className,o)}):(0,c.isValidElement)(p)?(0,c.cloneElement)(p,{className:(0,i.default)(p.props.className,o)}):r.createElement("span",{className:(0,i.default)(o,`${e}-dot-spin`)},r.createElement("i",{className:`${e}-dot-item`,key:1}),r.createElement("i",{className:`${e}-dot-item`,key:2}),r.createElement("i",{className:`${e}-dot-item`,key:3}),r.createElement("i",{className:`${e}-dot-item`,key:4}))}(t,e),f&&C?r.createElement("div",{className:`${t}-text`},f):null);return C?r.createElement("div",Object.assign({},P,{className:(0,i.default)(`${t}
1-nested-loading`,h,v)}),b&&r.createElement("div",{key:"loading"},O),r.createElement("div",{className:w,key:"container"},y)):O},SpinFC=e=>{let{prefixCls:t}=e,{getPrefixCls:n}=r.useContext(u.ConfigContext),o=n("spin",t),[a,i]=(0,d.default)(o),l=Object.assign(Object.assign({},e),{spinPrefixCls:o,hashId:i});return a(r.createElement(Spin,Object.assign({},l)))};SpinFC.setDefaultIndicator=e=>{p=e},t.default=SpinFC},9405:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(55943),a=n(98078),r=n(3184);let i=new o.Keyframes("antSpinMove",{to:{opacity:1}}),l=new o.Keyframes("antRotate",{to:{transform:"rotate(405deg)"}}),genSpinStyle=e=>({[`${e.componentCls}`]:Object.assign(Object.assign({},(0,a.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}},"&-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:i,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:l,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,r.genComponentStyleHook)("Spin",e=>{let t=(0,r.mergeToken)(e,{spinDotDefault:e.colorTextDescription});return[genSpinStyle(t)]},e=>({contentHeight:400,dotSize:e.controlHeightLG/2,dotSizeSM:.35*e.controlHeightLG,dotSizeLG:e.controlHeight}))},36052:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/app/formulario-de-cancelamento",function(){return n(96334)}])},96334:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return k}});var o=n(85893),a=n(67294),r=n(7136),i=n(4670),l=n(97538),s=n(51024),c=n(64713),u=n(64749),d=n(10149),p=n(28465),m=n(11187),f=n(46564),h=n(67814),g=n(39691),y=n(90008),v=n(47041);async function postHubspot(e,t,n){let o=(0,v.getCookie)("token"),a=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",...o?{Authorization:"Bearer ".concat(o)}:{}},body:JSON.stringify(t)}),r=await a.json().catch(()=>null);if(!a.ok||!(null==r?void 0:r.success)){let e=Error((null==r?void 0:r.message)||n);throw e.status=a.status,e.data=r,e}return r}var x={createCancellationTicket:e=>postHubspot("/api/hubspot/cancellation",e,"Erro ao criar ticket de cancelamento")},b={async upload(e,t){var n;let o=(0,v.getCookie)("token");if(!o)throw Error("Token do usu\xe1rio \xe9 obrigat\xf3rio para enviar o arquivo");let a=new FormData;a.append("file",e),a.append("filepath",t);let r=await fetch("/api/files/upload",{method:"POST",headers:{Accept:"application/json",Authorization:"Bearer ".concat(o)},body:a}),i=await r.json().catch(()=>null);if(!r.ok||!(null==i?void 0:i.success)||!(null===(n=i.data)||void 0===n?void 0:n.url)){let e=Error((null==i?void 0:i.message)||"Erro ao enviar arquivo");throw e.status=r.status,e.data=i,e}return i.data.url}},_=n(38916),C=n(58754);let S=[{value:"Baixa de CNPJ",label:"Baixa de CNPJ"},{value:"Altera\xe7\xe3o de Endere\xe7o",label:"Altera\xe7\xe3o de Endere\xe7o"},{value:"N\xe3o quero mais o servi\xe7o",label:"N\xe3o quero mais o servi\xe7o"},{value:"Outro",label:"Outro"}],j=["Brasil","Chile","Peru"],I=["Baixa de CNPJ","Altera\xe7\xe3o de Endere\xe7o"];async function countOpenInvoicesForSubscription(e,t,n){let[o,a]=await Promise.all([y.ApiPrivate.getInvoicesByStatus(e,"overdue",""),y.ApiPrivate.getInvoicesFinance(e)]),r=[].
1concat((null==o?void 0:o.data)||[]),i=[].concat((null==a?void 0:a.data)||[]),l=[...r,...i].filter(e=>(function(e){var t,n;let o=String(null!==(t=e.status)&&void 0!==t?t:"").toLowerCase();if("overdue"!==o)return!1;let a=null!==(n=e.due_date)&&void 0!==n?n:e.dueDate,r=new Date(String(null!=a?a:""));if(Number.isNaN(r.getTime()))return!1;let i=new Date;return i.setHours(0,0,0,0),i.setDate(i.getDate()-30),r.getTime()<i.getTime()})(e)&&function(e,t,n){var o,a,r,i,l;if(t){let n=String(null!==(a=null!==(o=e.subscription_id)&&void 0!==o?o:e.subscriptionId)&&void 0!==a?a:"");if(n&&n===t)return!0}let s=String(null!==(l=null!==(i=null!==(r=e.contracted_service_id)&&void 0!==r?r:e.contract_id)&&void 0!==i?i:e.contractId)&&void 0!==l?l:"");return!!(s&&s===n)}(e,t,n));return l.length}var w=n(56697),P=n(31175),N=n.n(P);function WarningIcon(){return(0,o.jsxs)("svg",{className:N().openInvoicesIcon,width:"120",height:"108",viewBox:"0 0 120 108",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0,children:[(0,o.jsxs)("defs",{children:[(0,o.jsxs)("linearGradient",{id:"cancellationWarningGradient",x1:"60",y1:"8",x2:"60",y2:"100",gradientUnits:"userSpaceOnUse",children:[(0,o.jsx)("stop",{stopColor:"#9B6BFF"}),(0,o.jsx)("stop",{offset:"1",stopColor:"#FF0066"})]}),(0,o.jsx)("filter",{id:"cancellationWarningShadow",x:"10",y:"70",width:"100",height:"40",filterUnits:"userSpaceOnUse",children:(0,o.jsx)("feGaussianBlur",{stdDeviation:"8"})})]}),(0,o.jsx)("ellipse",{cx:"60",cy:"96",rx:"36",ry:"8",fill:"#FF0066",fillOpacity:"0.18",filter:"url(#cancellationWarningShadow)"}),(0,o.jsx)("path",{d:"M60 10C63.2 10 66.1 11.7 67.7 14.5L112.3 92.2C113.9 95 113.9 98.5 112.3 101.3C110.7 104.1 107.8 105.8 104.6 105.8H15.4C12.2 105.8 9.3 104.1 7.7 101.3C6.1 98.5 6.1 95 7.7 92.2L52.3 14.5C53.9 11.7 56.8 10 60 10Z",fill:"url(#cancellationWarningGradient)"}),(0,o.jsx)("path",{d:"M60 38C62.2 38 64 39.8 64 42V66C64 68.2 62.2 70 60 70C57.8 70 56 68.2 56 66V42C56 39.8 57.8 38 60 38Z",fill:"white"}),(0,o.jsx)("circle",{cx:"60",cy:"84",r:"6",fill:"white"})]})}function CancellationOpenInvoicesModal(e){let{open:t,onClose:n}=e;return(0,o.jsx)(w.default,{open:t,onCancel:n,footer:null,centered:!0,destroyOnClose:!0,width:480,className:N().openInvoicesModal,children:(0,o.jsxs)("div",{className:N().openInvoicesContent,children:[(0,o.jsx)(WarningIcon,{}),(0,o.jsx)("h2",{className:N().openInvoicesTitle,children:"Para continuar com o cancelamento fale com um especialista"}),(0,o.jsx)("p",{className:N().openInvoicesDescription,children:"Identificamos que existe fatura vencida h\xe1 mais de 30 dias. Por isso, o cancelamento da assinatura precisa ser feito com o apoio do nosso time."}),(0,o.jsx)(r.zx,{type:"primary",size:"large",className:N().openInvoicesButton,href:"https://companyhero.trb.ai/wa/enYQGuX",target:"_blank",rel:"noopener noreferrer",icon:(0,o.jsx)(h.FontAwesomeIcon,{icon:["fab","whatsapp"]}),children:"Falar com especialista"})]})})}let{Dragger:O}=p.default;function CancellationForm(e){let{onSuccess:t}=e,{user:n,defaultCompanyId:i,userLoading:v}=(0,a.useContext)(g.S),[w]=l.default.useForm(),[P,k]=(0,a.useState)([]),[T,F]=(0,a.useState)(!1),[A,E]=(0,a.useState)(!1),[z,D]=(0,a.useState)(!1),[R,$]=(0,a.useState)([]),[L,M]=(0,a.useState)(!1),V=(0,a.useRef)(0),H=l.default.useWatch("cancellationReason",w),B=l.default.useWatch("companyId",w),U=!!(H&&I.includes(H)),W=(0,a.useMemo)(()=>Array.isArray(null==n?void 0:n.companies)?n.companies:[],[n]),G=W.length>1,q=P.length>1,J=(0,a.useMemo)(()=>n?(0,_.Xc)(n):null,[n]),X=(0,a.useCallback)(()=>{$([]),w.setFieldsValue({proofDocumentUrl:void 0})},[w]),K=(0,a.useCallback)(async e=>{if(!e){V.current+=1,k([]),F(!1);return}let t=++V.current;F(!0);try{let{data:n}=await y.ApiPrivate.getContractedServicesByCompanyId(e);if(t!==V.current||w.getFieldValue("companyId")!==e)return;let o=((null==n?void 0:n.items)||[]).filter(e=>"cancelado"!==e.status_financeiro);k(o),1===o.length?w.setFieldsValue({contractId:o[0].id}):w.setFieldsValue({contractId:""})}catch(n){if(t!==V.current||w.getFieldValue("companyId")!==e)return;k([]),w.setFieldsValue({contractId:""}),m.default.error("N\xe3o foi poss\xedvel carregar os contratos desta empresa.")}finally{t===V.current&&F(!1)}},[w]);(0,a.useEffect)(()=>{var e;if(!n||v)return;let t=i||(null===(e=W[0])||void 0===e?void 0:e.id)||"";w.setFieldsValue({fullName:(null==J?void 0:J.fullName)||"",email:(null==J?void 0:J.email)||"",phone:(null==J?void 0:J.ph
1one)||"",country:"Brasil",companyId:t})},[n,v,i,W,J,w]),(0,a.useEffect)(()=>{if(!B){k([]);return}K(B)},[B,K]),(0,a.useEffect)(()=>{U||X()},[U,X]);let handleProofUpload=async e=>{let{file:t,onSuccess:n,onError:o}=e;M(!0);try{let e=function(e){let t=e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^a-zA-Z0-9._-]/g,"_").replace(/_+/g,"_")||"documento.pdf";return"cancellation/proofs/".concat(Date.now(),"-").concat(t)}(t.name),o=await b.upload(t,e);w.setFieldsValue({proofDocumentUrl:o}),await w.validateFields(["proofDocumentUrl"]).catch(()=>void 0),null==n||n({url:o},t),m.default.success("Documento enviado com sucesso.")}catch(e){X(),console.error("[CancellationForm] erro ao enviar comprovante",e),null==o||o(Error("N\xe3o foi poss\xedvel enviar o documento. Tente novamente.")),m.default.error("N\xe3o foi poss\xedvel enviar o documento. Tente novamente.")}finally{M(!1)}},onFinish=async e=>{var n,o;let a=W.find(t=>t.id===e.companyId),r=P.find(t=>t.id===e.contractId);if(!a||!r){m.default.error("Selecione uma empresa e um contrato v\xe1lidos.");return}let i=r.iugu_subscription_id||(null===(n=r.order)||void 0===n?void 0:n.external_id)||null,l=function(e){let t=!!(e.iugu_customer_id||e.iugu_subscription_id);return t?"Iugu":"HeroOS"}(r);E(!0);let s=0;try{s=await countOpenInvoicesForSubscription(a.id,i,r.id)}catch(e){console.error("[CancellationForm] erro ao verificar faturas",e),m.default.error("N\xe3o foi poss\xedvel verificar faturas em aberto."),E(!1);return}if(s>0){D(!0),E(!1);return}let c=function(e){var t;let n={subject:"Pedido de cancelamento - ".concat(e.fullName),firstname:e.fullName,email:e.email,intra_ou_iugu:"Iugu"===e.billingGateway?"Intra":"Hero OS",unidade_de_negocio:e.country,phone:e.phone,id_da_assinatura_form_de_cancelamento:e.subscriptionId||"",data_da_contratacao:function(e){let t=String(e).match(/^(\d{4}-\d{2}-\d{2})/);if(null==t?void 0:t[1])return t[1];let n=new Date(e);if(Number.isNaN(n.getTime()))return e;let o=n.getUTCFullYear(),a=String(n.getUTCMonth()+1).padStart(2,"0"),r=String(n.getUTCDate()).padStart(2,"0");return"".concat(o,"-").concat(a,"-").concat(r)}(e.contractedAt),quantidade_de_faturas_em_aberto:e.openInvoices,motivo_do_cancelamento__cancelamentos_:e.cancellationReason,nome_do_hero_solicitante:"Web"};return e.proofDocumentUrl&&(n.link_do_formulario_de_cancelamento_do_cliente=e.proofDocumentUrl),"Outro"===e.cancellationReason&&(null===(t=e.cancellationReasonOther)||void 0===t?void 0:t.trim())&&(n.descricao_do_motivo_de_cancelamento__cancelamentos_=e.cancellationReasonOther.trim()),n}({fullName:e.fullName,email:e.email,phone:e.phone,country:e.country,cancellationReason:e.cancellationReason,cancellationReasonOther:"Outro"===e.cancellationReason?e.cancellationReasonOther:void 0,proofDocumentUrl:e.proofDocumentUrl,billingGateway:l,subscriptionId:i,contractedAt:r.created_at,openInvoices:s});try{let e=await x.createCancellationTicket(c);null===(o=e.data)||void 0===o||o.id,null==t||t()}catch(t){console.error("[CancellationForm] erro ao criar ticket HubSpot",t);let e=null==t?void 0:t.status;m.default.error(function(e){switch(e){case 401:return"Sua sess\xe3o expirou. Fa\xe7a login novamente e tente de novo.";case 400:return"Dados inv\xe1lidos. Verifique o formul\xe1rio e tente novamente.";case 404:return"Contato n\xe3o encontrado no HubSpot. Contate o suporte.";case 502:return"Falha ao registrar no HubSpot. Tente novamente em instantes.";default:return"N\xe3o foi poss\xedvel registrar a solicita\xe7\xe3o. Tente novamente."}}(e))}finally{E(!1)}};return v?(0,o.jsx)(d.default,{active:!0,paragraph:{rows:8}}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(CancellationOpenInvoicesModal,{open:z,onClose:()=>D(!1)}),(0,o.jsxs)(l.default,{form:w,layout:"vertical",onFinish:onFinish,requiredMark:!1,initialValues:{country:"Brasil"},children:[(0,o.jsx)(l.default.Item,{name:"fullName",label:"Nome completo",rules:[{required:!0,message:"Informe o nome completo"}],children:(0,o.jsx)(s.default,{size:"large",placeholder:"Nome completo",autoComplete:"name"})}),(0,o.jsx)(l.default.Item,{name:"email",label:"E-mail",rules:[{required:!0,message:"Informe o e-mail"},{type:"email",message:"E-mail inv\xe1lido"}],children:(0,o.jsx)(s.default,{size:"large",placeholder:"[email protected]",autoComplete:"email"})}),(0,o.jsx)(l.default.Item,{name:"phone",label:"Telefone",rules:[{required:!0,message:"Informe o telefone"}],children:(0,o.jsx)(s.default,{size:"large",placeholder:"(00) 00000-0000",autoComplete:"tel",inputMode:"tel",onCh
1ange:e=>{let t=e.target.value;if(t.trim().startsWith("+")){w.setFieldsValue({phone:t});return}w.setFieldsValue({phone:(0,C.CN)(e)})}})}),(0,o.jsx)(l.default.Item,{name:"country",label:"Pa\xeds",rules:[{required:!0,message:"Selecione o pa\xeds"}],children:(0,o.jsx)(u.default,{size:"large",placeholder:"Selecione o pa\xeds",options:j.map(e=>({value:e,label:e}))})}),G&&(0,o.jsx)(l.default.Item,{name:"companyId",label:"Empresa",rules:[{required:!0,message:"Selecione a empresa"}],children:(0,o.jsx)(u.default,{size:"large",placeholder:"Selecione a empresa",options:W.map(e=>({value:e.id,label:e.fantasy_name||e.title||e.id}))})}),!G&&(0,o.jsx)(l.default.Item,{name:"companyId",hidden:!0,children:(0,o.jsx)(s.default,{})}),q&&(0,o.jsx)(l.default.Item,{name:"contractId",label:"Contrato",rules:[{required:!0,message:"Selecione o contrato"}],children:(0,o.jsx)(u.default,{size:"large",placeholder:"Selecione o contrato",loading:T,options:P.map(e=>({value:e.id,label:e.plan_name_str||e.smart_name_str||e.plan_name||e.id}))})}),!q&&(0,o.jsx)(l.default.Item,{name:"contractId",hidden:!0,children:(0,o.jsx)(s.default,{})}),(0,o.jsx)(l.default.Item,{name:"cancellationReason",label:"Motivo de cancelamento",rules:[{required:!0,message:"Selecione o motivo"}],children:(0,o.jsx)(c.default.Group,{style:{display:"flex",flexDirection:"column",gap:8},children:S.map(e=>(0,o.jsx)(c.default,{value:e.value,children:e.label},e.value))})}),"Outro"===H&&(0,o.jsx)(l.default.Item,{name:"cancellationReasonOther",label:"Descreva o motivo",rules:[{required:!0,message:"Descreva o motivo do cancelamento"}],children:(0,o.jsx)(s.default.TextArea,{rows:4,placeholder:"Conte-nos o motivo do cancelamento"})}),U&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(l.default.Item,{name:"proofDocumentUrl",hidden:!0,children:(0,o.jsx)(s.default,{})}),(0,o.jsxs)(l.default.Item,{className:N().proofField,required:!1,children:[(0,o.jsx)("div",{className:N().proofLabel,children:"Comprovante de baixa ou altera\xe7\xe3o (Cart\xe3o CNPJ) — opcional"}),(0,o.jsxs)(O,{className:N().dragger,accept:".pdf,.jpg,.jpeg,.png,image/jpeg,image/png,application/pdf",maxCount:1,multiple:!1,showUploadList:{showRemoveIcon:!0},fileList:R,customRequest:handleProofUpload,disabled:L||A,beforeUpload:e=>{let t="application/pdf"===e.type,n="image/png"===e.type,o="image/jpeg"===e.type||"image/jpg"===e.type;return!!t||!!n||!!o||(m.default.error("Envie apenas PDF, JPG ou PNG."),p.default.LIST_IGNORE)},onChange:e=>{let{fileList:t}=e;$(t.slice(-1)),0===t.length&&w.setFieldsValue({proofDocumentUrl:void 0})},onRemove:()=>(X(),!0),children:[(0,o.jsx)("p",{className:"ant-upload-drag-icon",children:(0,o.jsx)(h.FontAwesomeIcon,{icon:"paperclip",className:N().paperclipIcon})}),(0,o.jsx)("p",{className:N().draggerTitle,children:"Toque para anexar comprovante"}),(0,o.jsx)("p",{className:N().draggerHint,children:"PDF, JPG ou PNG"})]}),L&&(0,o.jsx)("p",{className:N().uploadingHint,children:"Enviando documento..."}),(0,o.jsxs)("div",{className:N().infoToast,role:"status",children:[(0,o.jsx)(f.default,{className:N().infoToastIcon}),(0,o.jsxs)("p",{className:N().infoToastText,children:[(0,o.jsx)("strong",{children:"Anexe o Cart\xe3o CNPJ."})," Voc\xea pode emitir direto no site da Receita, clicando"," ",(0,o.jsx)("a",{href:"https://solucoes.receita.fazenda.gov.br/Servicos/cnpjreva",target:"_blank",rel:"noopener noreferrer",className:N().infoToastLink,children:"nesse link"}),"."]})]})]})]}),(0,o.jsxs)(l.default.Item,{children:[(0,o.jsx)("br",{}),(0,o.jsx)(r.zx,{type:"primary",htmlType:"submit",size:"large",loading:T||A||L,children:"Enviar solicita\xe7\xe3o de cancelamento"})]})]})]})}function CancellationSuccess(){return(0,o.jsx)("section",{className:N().successScreen,"aria-label":"Solicita\xe7\xe3o enviada",children:(0,o.jsxs)("div",{className:N().successContent,children:[(0,o.jsx)("img",{className:N().successIllustration,src:"/images/cancellation/success-check.png",alt:"",width:200,height:200}),(0,o.jsx)("h2",{className:N().successTitle,children:"Solicita\xe7\xe3o enviada"}),(0,o.jsxs)("p",{className:N().successDescription,children:[(0,o.jsx)("strong",{children:"Aten\xe7\xe3o ao email ou whatsapp"}),", daremos retorno atrav\xe9s dos contatos cadastrados em ",(0,o.jsx)("strong",{children:"at\xe9 2 dias \xfateis"}),"."]})]})})}var k=(0,i.FR)(()=>{let[e,t]=(0,a.useState)(!1);return(0,o.jsx)("section",{className:"padding paddingTop50 container notMobilePadding",children:e?(0,o.jsx)(r.Card,{className:"padding4",children:(0,o.jsx)(CancellationSuccess,{})}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(r.mr,{title:"Formul\xe1rio de Cancelamento"}),(0,o.jsx)(r.Card,{className:"padding4",children:(0,o.jsx)(CancellationForm,{onSuccess:()=>t(!0)})})]})})})},58754:function(e,t,n){"use strict";n.d(t,{CN:function(){return formatPhone},Cz:function(){return formatCPF},R4:function(){return formatCNPJ},UV:function(){return formatCPFCNPJ},VD:function(){return validateCNPJ},a$:function(){return validatePhone},aA:function(){return validateNineDigitPhone},gj:function(){return formatMonetary},kh:function(){return formatInteger},pM:function(){return validateCPF},rl:function(){return formatPercentage},sc:function(){return validateCPFCNPJ}});var o=n(91530);let formatPhone=e=>{let{value:t}=e.target,n=(0,o.gw)(t);return e.target.value=n,n},validatePhone=(e,t)=>
1new Promise((e,n)=>{t?(0,o.Mn)(t)?e():n("Telefone inv\xe1lido"):e()}),validateNineDigitPhone=(e,t)=>new Promise((e,n)=>{t&&(t.replace(/[^0-9]/g,"").length<11||!(0,o.Mn)(t))?n("Telefone inv\xe1lido"):e()}),cleanRegistryCode=e=>String(null!=e?e:"").replace(/[^0-9A-Za-z]/g,""),isCnpjInput=e=>{let t=cleanRegistryCode(e);return/[A-Za-z]/.test(t)||t.length>11},formatCPFCNPJ=e=>{let{value:t}=e.target,n=isCnpjInput(t)?(0,o.fC)(t):(0,o.zt)(t);return e.target.value=n,n},validateCPFCNPJ=(e,t,n)=>{if(t){if(isCnpjInput(t)){if(!(0,o.Co)(t))return n("CNPJ inv\xe1lido")}else if(!(0,o.h0)(t))return n("CPF inv\xe1lido")}n()},validateCPF=(e,t,n)=>{t&&!(0,o.h0)(t)&&n("CPF inv\xe1lido"),n()},formatCPF=e=>{let{value:t}=e.target,n=(0,o.zt)(t);return e.target.value=n,n},validateCNPJ=(e,t,n)=>{t&&!(0,o.Co)(t)&&n("CNPJ inv\xe1lido"),n()},formatCNPJ=e=>{let{value:t}=e.target,n=(0,o.fC)(t);return e.target.value=n,n},formatInteger=e=>e.target.value.toString().replace(/[^0-9]+/g,""),formatMonetary=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{value:n}=e.target,{empty:o=!1,locales:a="pt-BR",options:r={minimumFractionDigits:2}}=t,i=n&&"number"==typeof n?n.toFixed(2):n,l=function(e){let t=String(e),n=t.replace(/\D/g,""),o=n.replace(/^0+(?=\d)/,""),a=t.startsWith("-");return(a?"-":"")+o}(i),s=l.padStart(3,"0"),c=s.slice(-2),u=s.slice(0,s.length-2);if(o&&"0"===u&&"00"===c)return"";let d=new Intl.NumberFormat(a,r).format("".concat(u,".").concat(c));return d},formatPercentage=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{value:n}=e.target,{empty:o=!1,locales:a="pt-BR",options:r={minimumFractionDigits:1,minimumFractionDigits:2}}=t;"number"==typeof n&&(n=n.toFixed(2));let i=String(n).replace(/\D/g,"").replace(/^0+/g,""),l=i.padStart(2,"0"),s=l.slice(-2),c=l.slice(0,l.length-2);if(o&&"0"===c&&"00"===s)return"";let u=new Intl.NumberFormat(a,r).format("".concat(c,".").concat(s));return u}},4670:function(e,t,n){"use strict";n.d(t,{FR:function(){return ProtectRoute},Ko:function(){return ProtectRouteAndCheckIfHasRoleAccess},Qx:function(){return ProtectRouteAndCheckIfIsEnterprise},Xy:function(){return AdminRoute},cS:function(){return ProtectRouteAndVerifyAnsweredICP},jr:function(){return ProtectRouteAndCheckIfHasIndicationAccess}});var o=n(85893),a=n(67294),r=n(39691),i=n(11163),l=n(89552),s=n(47041);let SpinLoader=()=>(0,o.jsx)(l.default,{size:"large",style:{margin:"60px auto 0px",padding:"70px",height:"100px",display:"table",textAlign:"center"}}),ComponentView=e=>{let{Component:t,user:n,className:a,componentProps:r}=e;return(0,o.jsx)("div",{className:"loggedIn_layout ".concat(a),children:(0,o.jsx)(t,{...arguments,user:n,...r})})};function ProtectRoute(e){return t=>{let{user:n,userLoading:l,logout:s,answeredICPform:c,isRegisterICPFeatureOn:u}=(0,a.useContext)(r.S),d=(0,i.useRouter)();return((0,a.useEffect)(()=>{if(n||l||(s(),d.push("/login?logout=true&back=".concat(d.asPath,"&as=").concat(d.route))),n&&!l&&n.is_blocked){let redirectToBlocked=async()=>{await d.push("/blocked?from=".concat(d.asPath)),s()};redirectToBlocked()}},[l,n]),!n||l)?(0,o.jsx)(SpinLoader,{}):(0,o.jsx)(ComponentView,{Component:e,user:n,componentProps:t})}}function AdminRoute(e){return()=>{let{user:t,userLoading:n,logout:l}=(0,a.useContext)(r.S),s=(0,i.useRouter)();return((0,a.useEffect)(()=>{t||n||(l(),s.push("/login?logout=true&back=".concat(s.asPath,"&as=").concat(s.route))),t&&!t.is_staff&&s.replace("/app/home")},[n,t]),!t||n||t&&!t.is_staff)?(0,o.jsx)(SpinLoader,{}):(0,o.jsx)(ComponentView,{Component:e,user:t})}}function ProtectRouteAndCheckIfIsEnterprise(e){return()=>{let{user:t,userLoading:n,defaultCompanyObject:l}=(0,a.useContext)(r.S),s=(0,i.useRouter)(),[c,u]=(0,a.useState)(!0);return((0,a.useEffect)(()=>{t||n||s.push("/login?logout=true&back=".concat(s.asPath,"&as=").concat(s.route)),t&&l&&l.is_enterprise_customer&&s.push("/app/home"),l&&(l.access_roles.includes("legalizacao-b2b2b")||l.access_roles.includes("influencer")?u(!1):s.push("/app/home"))},[n,t,l]),c)?(0,o.jsx)(SpinLoader,{}):(0,o.jsx)(ComponentView,{Component:e,user:t})}}function ProtectRouteAndCheckIfHasIndicationAccess(e){return()=>{let{user:t,userLoading:n,defaultCompanyObject:l}=(0,a.useContext)(r.S),s=(0,i.useRouter)(),[c,u]=(0,a.useState)(!0);return((0,a.useEffect)(()=>{t||n||s.push("/login?logout=true&back=".concat(s.asPath,"&as=").concat(s.route)),t&&l&&l.is_enterprise_customer&&s.push("/app/home"),l&&(l.access_roles.includes("dashboard-cad")||l.access_roles.includes("influencer")?u(!1):s.push("/app/home"))},[n,t,l,s]),c)?(0,o.jsx)(SpinLoader,{}):(0,o.jsx)(ComponentView,{Component:e,user:t})}}
1function ProtectRouteAndCheckIfHasRoleAccess(e){let{Component:t,roleList:n=[],logicalOperator:l="AND"}=e;return()=>{let{user:e,userLoading:s,defaultCompanyObject:c}=(0,a.useContext)(r.S),u=(0,i.useRouter)(),[d,p]=(0,a.useState)(!0);return((0,a.useEffect)(()=>{if(e||s||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=n.map(e=>c.access_roles.includes(e)),t="AND"===l?e.every(e=>!!e):e.some(e=>!!e);t?p(!1):u.push("/app/home")}},[s,e,c,u]),d)?(0,o.jsx)(SpinLoader,{}):(0,o.jsx)(ComponentView,{Component:t,user:e})}}function ProtectRouteAndVerifyAnsweredICP(e){return t=>{let{user:n,userLoading:l,logout:c,answeredICPform:u}=(0,a.useContext)(r.S);(0,s.getCookie)("_aicpf");let d=(0,i.useRouter)();return((0,a.useEffect)(()=>{if(n||l||(c(),d.push("/login?logout=true&back=".concat(d.asPath,"&as=").concat(d.route))),n&&!l&&n.is_blocked){let redirectToBlocked=async()=>{await d.push("/blocked?from=".concat(d.asPath)),c()};redirectToBlocked()}},[l,n]),!n||l)?(0,o.jsx)(SpinLoader,{}):(0,o.jsx)(ComponentView,{Component:e,user:n,componentProps:t})}}},31175:function(e){e.exports={proofField:"styles_proofField__0by1y",proofLabel:"styles_proofLabel__PJ7Hq",dragger:"styles_dragger__MnVgW",paperclipIcon:"styles_paperclipIcon__xbgmk",draggerTitle:"styles_draggerTitle__t4tCB",draggerHint:"styles_draggerHint__VmzeK",infoToast:"styles_infoToast__IjdJF",infoToastIcon:"styles_infoToastIcon__m0ED6",infoToastText:"styles_infoToastText__ZQ_Cb",infoToastLink:"styles_infoToastLink__19wlI",uploadingHint:"styles_uploadingHint__lY1ow",successScreen:"styles_successScreen__OHbG7",successContent:"styles_successContent__H7PGg",successIllustration:"styles_successIllustration__6vHtZ",successTitle:"styles_successTitle__jVNEb",successDescription:"styles_successDescription__BSmS9",openInvoicesModal:"styles_openInvoicesModal__gwb__",openInvoicesContent:"styles_openInvoicesContent__dULx5",openInvoicesIcon:"styles_openInvoicesIcon__eZryp",openInvoicesTitle:"styles_openInvoicesTitle__6KanW",openInvoicesDescription:"styles_openInvoicesDescription___Ey6p",openInvoicesButton:"styles_openInvoicesButton__9wXy6"}},92703:function(e,t,n){"use strict";var o=n(50414);function emptyFunction(){}function emptyFunctionWithReset(){}emptyFunctionWithReset.resetWarningCache=emptyFunction,e.exports=function(){function shim(e,t,n,a,r,i){if(i!==o){var l=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function getShim(){return shim}shim.isRequired=shim;var e={array:shim,bigint:shim,bool:shim,func:shim,number:shim,object:shim,string:shim,symbol:shim,any:shim,arrayOf:getShim,element:shim,elementType:shim,instanceOf:getShim,node:shim,objectOf:getShim,oneOf:getShim,oneOfType:getShim,shape:getShim,exact:getShim,checkPropTypes:emptyFunctionWithReset,resetWarningCache:emptyFunction};return e.PropTypes=e,e}},45697:function(e,t,n){e.exports=n(92703)()},50414:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},42189:function(e,t){"use strict";function throttle(e,t,n){var o,a=n||{},r=a.noTrailing,i=void 0!==r&&r,l=a.noLeading,s=void 0!==l&&l,c=a.debounceMode,u=void 0===c?void 0:c,d=!1,p=0;function clearExistingTimeout(){o&&clearTimeout(o)}function wrapper(){for(var n=arguments.length,a=Array(n),r=0;r<n;r++)a[r]=arguments[r];var l=this,c=Date.now()-p;function exec(){p=Date.now(),t.apply(l,a)}function clear(){o=void 0}!d&&(s||!u||o||exec(),clearExistingTimeout(),void 0===u&&c>e?s?(p=Date.now(),i||(o=setTimeout(u?clear:exec,e))):exec():!0!==i&&(o=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}Object.defineProperty(t,"__esModule",{value:!0}),t.debounce=function(e,t,n){var o=(n||{}).atBegin;return throttle(e,t,{debounceMode:!1!==(void 0!==o&&o)})},t.throttle=throttle}},function(e){e.O(0,[23636,97538,64713,74806,28465,49774,92888,40179],function(){return e(e.s=36052)}),_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.