1import{_ as e,a as t,b as n}from"./_virtual_mf___mfe_internal__mf_portal_core__mf_owner__1__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-njG-1Zcq.js";import{k as r,d as i,e as o,l as a,r as s,t as l,b as c}from"./_virtual_mf___mfe_internal__mf_portal_core__mf_owner__1__loadShare__react__loadShare__.js-BGiqLLzc.js";import{a as d,b as u}from"./_virtual_mf___mfe_internal__mf_portal_core__mf_owner__1__loadShare__react_mf_2_router_mf_2_dom__loadShare__.js-CKfXkK_w.js";import{_ as f,c as p}from"./_virtual_mf___mfe_internal__mf_portal_core__mf_owner__1__loadShare__styled_mf_2_components__loadShare__.js-CDflXl9_.js";import{L as g}from"./index-CCtmSIA4.js";import{E as h}from"./index-C6xko6iv.js";import{a as m,b,c as v,d as x,g as y,e as _,f as w,u as S,h as D,s as k,i as I}from"./index-CUVKm-lS.js";import{u as E}from"./useToast-DtYRZQ0-.js";import{P as C,a as N,s as A,c as O,b as T}from"./index-DFKjZLLK.js";import{C as j,s as R}from"./index-CYBe7dGK.js";import{f as P}from"./currency-CUo9zxC0.js";import{I as B}from"./index-CXgmWgQr.js";import{b as $}from"./_virtual_mf___mfe_internal__mf_portal_core__mf_owner__1__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-zkjg3mo1.js";import"./_virtual_mf___mfe_internal__mf_portal_core__mf_owner__1__loadShare__react_mf_2_dom__loadShare__.js-KK5fK6PN.js";import"./vite-preload-helper-TRBigwtI.js";import"./_virtual_mf___mfe_internal__mf_portal_core__mf_owner__1__loadShare__react_mf_2_i18next__loadShare__.js-CFMAWbo4.js";import"./_virtual_mf___mfe_internal__mf_portal_core__mf_owner__1__loadShare__axios__loadShare__.js-DTS7L9TC.js";function M(){try{const e=sessionStorage.getItem(m);if(!e)return null;const[t,n]=e.split("|"),r=Number(t),i=Number(n);return Number.isFinite(r)&&Number.isFinite(i)?{id:r,startedAt:i}:null}catch{return null}}function L(e,t){return!!Array.isArray(e)&&e.some(e=>(e.ArrangementID??e.ArrangementId)===t)}function z(e){const t=new URLSearchParams(e).get("tab");return"agreements"===t||"debts"===t?t:null}function q(e){return"agreements"===e?"1":"0"}const F=f.div` 2 height: 50px; 3 overflow: hidden; 4 width: 100%; 5`,V=f.div` 6 display: flex; 7 align-items: center; 8 height: 50px; 9 column-gap: 30px; 10 transition: transform 0.4s ease; 11 will-change: transform; 12 13 /* Angular breakpoint 640: spaceBetween 50 */ 14 @media (min-width: 640px) { 15 column-gap: 50px; 16 } 17`,U=f.div` 18 flex: 0 0 auto; 19 display: flex; 20 align-items: center; 21 justify-content: center; 22`,H=f.img` 23 min-width: 50px; 24 min-height: 50px; 25 width: 50px; 26 height: 50px; 27 background: #fff; 28 border-radius: 30px; 29 object-fit: contain; 30`,K="/assets/images/error.jpg",G=({imgsList:t=[],className:n,style:s})=>{const l=r(()=>{if(0===t.length)return!1;const e=t[0].PortfolioAlias;return t.every(t=>t.PortfolioAlias===e)},[t]),c=r(()=>l?t.slice(0,1):t,[l,t]),d=i(null),u=i(null),[f,p]=o(0),[g,h]=o(80),[m,b]=o(0);return a(()=>{p(0)},[c.length]),a(()=>{const e=d.current,t=u.current;if(!e||!t)return;const n=()=>{const n=t.children;if(0===n.length)return void b(0);const r=n[0].getBoundingClientRect().width,i=parseFloat(getComputedStyle(t).columnGap||"0")||0,o=r+i;h(o);const a=e.getBoundingClientRect().width,s=Math.max(1,Math.floor((a+i)/o));b(Math.max(0,c.length-s))};return n(),window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[c.length]),a(()=>{if(m<=0)return;const e=setInterval(()=>{p(e=>e>=m?0:e+1)},5e3);return()=>clearInterval(e)},[m]),0===c.length?null:e(F,{ref:d,className:n,style:s,children:e(V,{ref:u,style:{transform:`translateX(-${f*g}px)`},children:c.map((t,n)=>e(U,{children:e(H,{src:t.ImageUri?t.ImageUri:K,alt:"img",onError:e=>{-1===e.currentTarget.src.indexOf(K)&&(e.currentTarget.src=K)}})},`${t.DebtID??t.PortfolioAlias}-${n}`))})})};!function(){var e=["navigation","request","process","log","user","state","error","manual"],t=function(e,t,n){for(var r=n,i=0,o=e.length;i<o;i++)r=t(r,e[i],i,e);return r},n=function(e,n){return t(e,function(e,t,r,i){return n(t,r,i)?e.concat(t):e},[])},r=function(e,n){return t(e,function(e,t,r,i){return!0===e||t===n},!1)},i=function(e){return"[object Array]"===Object.prototype.toString.call(e)},o=!{toString:null}
30.propertyIsEnumerable("toString"),a=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],s=function(e){var t,n=[];for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.push(t);if(!o)return n;for(var r=0,i=a.length;r<i;r++)Object.prototype.hasOwnProperty.call(e,a[r])&&n.push(a[r]);return n},l=function(e,t){return void 0===e&&(e=1),function(n){return"number"==typeof n&&parseInt(""+n,10)===n&&n>=e&&n<=t}},c=function(e){return"function"==typeof e||i(e)&&n(e,function(e){return"function"==typeof e}).length===e.length},d=function(e){return"string"==typeof e&&!!e.length},u={},f=function(){return{unhandledExceptions:!0,unhandledRejections:!0}};u.schema={apiKey:{defaultValue:function(){return null},message:"is required",validate:d},appVersion:{defaultValue:function(){},message:"should be a string",validate:function(e){return void 0===e||d(e)}},appType:{defaultValue:function(){},message:"should be a string",validate:function(e){return void 0===e||d(e)}},autoDetectErrors:{defaultValue:function(){return!0},message:"should be true|false",validate:function(e){return!0===e||!1===e}},enabledErrorTypes:{defaultValue:function(){return f()},message:"should be an object containing the flags { unhandledExceptions:true|false, unhandledRejections:true|false }",allowPartialObject:!0,validate:function(e){if("object"!=typeof e||!e)return!1;var t=s(e),i=s(f());return!(n(t,function(e){return r(i,e)}).length<t.length||n(s(e),function(t){return"boolean"!=typeof e[t]}).length>0)}},onError:{defaultValue:function(){return[]},message:"should be a function or array of functions",validate:c},onSession:{defaultValue:function(){return[]},message:"should be a function or array of functions",validate:c},onBreadcrumb:{defaultValue:function(){return[]},message:"should be a function or array of functions",validate:c},endpoints:{defaultValue:function(e){return void 0===e?{notify:"https://notify.bugsnag.com",sessions:"https://sessions.bugsnag.com"}:{notify:null,sessions:null}},message:"should be an object containing endpoint URLs { notify, sessions }",validate:function(e){return e&&"object"==typeof e&&d(e.notify)&&d(e.sessions)&&0===n(s(e),function(e){return!r(["notify","sessions"],e)}).length}},autoTrackSessions:{defaultValue:function(e){return!0},message:"should be true|false",validate:function(e){return!0===e||!1===e}},enabledReleaseStages:{defaultValue:function(){return null},message:"should be an array of strings",validate:function(e){return null===e||i(e)&&n(e,function(e){return"string"==typeof e}).length===e.length}},releaseStage:{defaultValue:function(){return"production"},message:"should be a string",validate:function(e){return"string"==typeof e&&e.length}},maxBreadcrumbs:{defaultValue:function(){return 25},message:"should be a number â¤100",validate:function(e){return l(0,100)(e)}},enabledBreadcrumbTypes:{defaultValue:function(){return e},message:"should be null or a list of available breadcrumb types ("+e.join(",")+")",validate:function(n){return null===n||i(n)&&t(n,function(t,n){return!1===t?t:r(e,n)},!0)}},context:{defaultValue:function(){},message:"should be a string",validate:function(e){return void 0===e||"string"==typeof e}},user:{defaultValue:function(){return{}},message:"should be an object with { id, email, name } properties",validate:function(e){return null===e||e&&t(s(e),function(e,t){return e&&r(["id","email","name"],t)},!0)}},metadata:{defaultValue:function(){return{}},message:"should be an object",validate:function(e){return"object"==typeof e&&null!==e}},logger:{defaultValue:function(){},message:"should be null or an object with methods { debug, info, warn, error }",validate:function(e){return!e||e&&t(["debug","info","warn","error"],function(t,n){return t&&"function"==typeof e[n]},!0)}},redactedKeys:{defaultValue:function(){return["password"]},message:"should be an array of strings|regexes",validate:function(e){return i(e)&&e.length===n(e,function(e){return"string"==typeof e||e&&"function"==typeof e.test}).length}},plugins:{defaultValue:function(){return[]},message:"should be an array of plugin objects",validate:function(e){return i(e)&&e.length===n(e,function(e){return e&&"object"==typeof e&&"function"==typeof e.load}).length}},featureFlags:{defaultValue:function(){return[]},message:'should be an array of objects that have a "name" property',validate:function(e){return i(e)&&e.length===n(e,function(e){return e&&"object"==typeof e&&"string"==typeof e.name}).length}},reportUnhandledPromiseRejectionsAsHandled:{defaultValue:function(){return!1},message:"should be true|false",validate:function(e){return!0===e||!1===e}},sendPayloadChecksums:{defaultValue:function(){return!1},message:"should be true|false",validate:function(e){return!0===e||!1===e}}};var p=function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},g=function(e,n){return t(e,function(e,t,r,i){return e.concat(n(t,r,i))},[])};function h(){return h=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},h.apply(null,arguments)}var m,b,v=u.schema,x={releaseStage:p({},v.releaseStage,{defaultValue:function(){return/^localhost(:\d+)?$/.test(window.location.host)?"development":"production"}}),appType:h({},v.appType,{defaultValue:function(){return"browser"}}),logger:p({},v.logger,{defaultValue:function(){return"undefined"!=typeof console&&"function"==typeof console.debug?y():void 0}})},y=function(){var e={},t=console.log;return g(["debug","info","warn","error"],function(n){var r=console[n];e[n]="function"==typeof r?r.bind(console,"[bugsnag]"):t.bind(console,"[bugsnag]")}),e},_=function(){function e(e,t,n,r){void 0===r&&(r=new Date),this.type=n,this.message=e,this.metadata=t,this.timestamp=r}
30return e.prototype.toJSON=function(){return{type:this.type,name:this.message,timestamp:this.timestamp,metaData:this.metadata}},e}(),w={};m=this,b=function(){function e(e){return!isNaN(parseFloat(e))&&isFinite(e)}function t(e){return e.charAt(0).toUpperCase()+e.substring(1)}function n(e){return function(){return this[e]}}var r=["isConstructor","isEval","isNative","isToplevel"],i=["columnNumber","lineNumber"],o=["fileName","functionName","source"],a=["args"],s=["evalOrigin"],l=r.concat(i,o,a,s);function c(e){if(e)for(var n=0;n<l.length;n++)void 0!==e[l[n]]&&this["set"+t(l[n])](e[l[n]])}c.prototype={getArgs:function(){return this.args},setArgs:function(e){if("[object Array]"!==Object.prototype.toString.call(e))throw new TypeError("Args must be an Array");this.args=e},getEvalOrigin:function(){return this.evalOrigin},setEvalOrigin:function(e){if(e instanceof c)this.evalOrigin=e;else{if(!(e instanceof Object))throw new TypeError("Eval Origin must be an Object or StackFrame");this.evalOrigin=new c(e)}},toString:function(){var e=this.getFileName()||"",t=this.getLineNumber()||"",n=this.getColumnNumber()||"",r=this.getFunctionName()||"";return this.getIsEval()?e?"[eval] ("+e+":"+t+":"+n+")":"[eval]:"+t+":"+n:r?r+" ("+e+":"+t+":"+n+")":e+":"+t+":"+n}},c.fromString=function(e){var t=e.indexOf("("),n=e.lastIndexOf(")"),r=e.substring(0,t),i=e.substring(t+1,n).split(","),o=e.substring(n+1);if(0===o.indexOf("@"))var a=/@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(o,""),s=a[1],l=a[2],d=a[3];return new c({functionName:r,args:i||void 0,fileName:s,lineNumber:l||void 0,columnNumber:d||void 0})};for(var d=0;d<r.length;d++)c.prototype["get"+t(r[d])]=n(r[d]),c.prototype["set"+t(r[d])]=function(e){return function(t){this[e]=Boolean(t)}}(r[d]);for(var u=0;u<i.length;u++)c.prototype["get"+t(i[u])]=n(i[u]),c.prototype["set"+t(i[u])]=function(t){return function(n){if(!e(n))throw new TypeError(t+" must be a Number");this[t]=Number(n)}}(i[u]);for(var f=0;f<o.length;f++)c.prototype["get"+t(o[f])]=n(o[f]),c.prototype["set"+t(o[f])]=function(e){return function(t){this[e]=String(t)}}(o[f]);return c},"object"==typeof w?w=b():m.StackFrame=b();var S={};!function(e,t){"object"==typeof S?S=t(w):e.StackGenerator=t(e.StackFrame)}(this,function(e){return{backtrace:function(t){var n=[],r=10;"object"==typeof t&&"number"==typeof t.maxStackSize&&(r=t.maxStackSize);for(var i=arguments.callee;i&&n.length<r&&i.arguments;){for(var o=new Array(i.arguments.length),a=0;a<o.length;++a)o[a]=i.arguments[a];/function(?:\s+([\w$]+))+\s*\(/.test(i.toString())?n.push(new e({functionName:RegExp.$1||void 0,args:o})):n.push(new e({args:o}));try{i=i.caller}catch(s){break}}return n}}});var D={};!function(e,t){"object"==typeof D?D=t(w):e.ErrorStackParser=t(e.StackFrame)}(this,function(e){var t=/(^|@)\S+:\d+/,n=/^\s*at .*(\S+:\d+|\(native\))/m,r=/^(eval@)?(\[native code])?$/;return{parse:function(e){if(void 0!==e.stacktrace||void 0!==e["opera#sourceloc"])return this.parseOpera(e);if(e.stack&&e.stack.match(n))return this.parseV8OrIE(e);if(e.stack)return this.parseFFOrSafari(e);throw new Error("Cannot parse given Error object")},extractLocation:function(e){if(-1===e.indexOf(":"))return[e];var t=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g,""));return[t[1],t[2]||void 0,t[3]||void 0]},parseV8OrIE:function(t){return t.stack.split("\n").filter(function(e){return!!e.match(n)},this).map(function(t){t.indexOf("(eval ")>-1&&(t=t.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var n=t.replace(/^\s+/,"").replace(/\(eval code/g,"("),r=n.match(/ (\((.+):(\d+):(\d+)\)$)/),i=(n=r?n.replace(r[0],""):n).split(/\s+/).slice(1),o=this.extractLocation(r?r[1]:i.pop()),a=i.join(" ")||void 0,s=["eval","<anonymous>"].indexOf(o[0])>-1?void 0:o[0];return new e({functionName:a,fileName:s,lineNumber:o[1],columnNumber:o[2],source:t})},this)},parseFFOrSafari:function(t){return t.stack.split("\n").filter(function(e){return!e.match(r)},this).map(function(t){if(t.indexOf(" > eval")>-1&&(t=t.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===t.indexOf("@")&&-1===t.indexOf(":"))return new e({functionName:t});var n=/((.*".+"[^@]*)?[^@]*)(?:@)/,r=t.match(n),i=r&&r[1]?r[1]:void 0,o=this.extractLocation(t.replace(n,""));return new e({functionName:i,fileName:o[0],lineNumber:o[1],columnNumber:o[2],source:t})},this)},parseOpera:function(e){return!e.stacktrace||e.message.indexOf("\n")>-1&&e.message.split("\n").length>e.stacktrace.split("\n").length?this.parseOpera9(e):e.stack?this.parseOpera11(e):this.parseOpera10(e)},parseOpera9:function(t){for(var n=/Line (\d+).*script (?:in )?(\S+)/i,r=t.message.split("\n"),i=[],o=2,a=r.length;o<a;o+=2){var s=n.exec(r[o]);s&&i.push(new e({fileName:s[2],lineNumber:s[1],source:r[o]}))}return i},parseOpera10:function(t){for(var n=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,r=t.stacktrace.split("\n"),i=[],o=0,a=r.length;o<a;o+=2){var s=n.exec(r[o]);s&&i.push(new e({functionName:s[3]||void 0,fileName:s[2],lineNumber:s[1],source:r[o]}))}return i},parseOpera11:function(n){return n.stack.split("\n").filter(function(e){return!!e.match(t)&&!e.match(/^Error created at/)},this).map(function(t){var n,r=t.split("@"),i=this.extractLocation(r.pop()),o=r.shift()||"",a=o.replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0;o.match(/\(([^)]*)\)/)&&(n=o.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var s=void 0===n||"[arguments not available]"===n?void 0:n.split(",");return new e({functionName:a,args:s,fileName:i[0],lineNumber:i[1],columnNumber:i[2],source:t})},this)}}});var k=D,I=function(e,t,n,r){var i=r&&r.redactedKeys?r.redactedKeys:[],o=r&&r.redactedPaths?r.redactedPaths:[];return JSON.stringify(M(e,i,o),t,n)},E=20,C=25e3,N=8,A="...";function O(e){return e instanceof Error||/^\[object (Error|(Dom)?Exception)\]$/.test(Object.prototype.toString.call(e))}function T(e){return"[Throws: "+(e?e.message:"?")+"]"}function j(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return!0;return!1}function R(e,t){for(var n=0,r=e.length;n<r;n++)if(0===t.indexOf(e[n]))return!0;return!1}function P(e,t){for(var n=0,r=e.length;n<r;n++){if("string"==typeof e[n]&&e[n].toLowerCase()===t.toLowerCase())return!0;
30if(e[n]&&"function"==typeof e[n].test&&e[n].test(t))return!0}return!1}function B(e){return"[object Array]"===Object.prototype.toString.call(e)}function $(e,t){try{return e[t]}catch(n){return T(n)}}function M(e,t,n){var r=[],i=0;function o(e,a){function s(){return a.length>N&&i>C}if(i++,a.length>E)return A;if(s())return A;if(null===e||"object"!=typeof e)return e;if(j(r,e))return"[Circular]";if(r.push(e),"function"==typeof e.toJSON)try{i--;var l=o(e.toJSON(),a);return r.pop(),l}catch(h){return T(h)}if(O(e)){i--;var c=o({name:e.name,message:e.message},a);return r.pop(),c}if(B(e)){for(var d=[],u=0,f=e.length;u<f;u++){if(s()){d.push(A);break}d.push(o(e[u],a.concat("[]")))}return r.pop(),d}var p={};try{for(var g in e)if(Object.prototype.hasOwnProperty.call(e,g))if(R(n,a.join("."))&&P(t,g))p[g]="[REDACTED]";else{if(s()){p[g]=A;break}p[g]=o($(e,g),a.concat(g))}}catch(m){}return r.pop(),p}return o(e,[])}function L(e,t,n,r){if("string"==typeof n){void 0===r?r=null:null!==r&&"string"!=typeof r&&(r=I(r));var i=t[n];"number"!=typeof i?(e.push({name:n,variant:r}),t[n]=e.length-1):e[i]={name:n,variant:r}}}function z(e,t,n){if(i(t)){for(var r=0;r<t.length;++r){var o=t[r];null!==o&&"object"==typeof o&&L(e,n,o.name,o.variant)}return e}}function q(e){return g(n(e,Boolean),function(e){var t=e.name,n=e.variant,r={featureFlag:t};return"string"==typeof n&&(r.variant=n),r})}function F(e,t,n){var r=t[n];"number"==typeof r&&(e[r]=null,delete t[n])}var V={add:L,clear:F,merge:z,toEventApi:q},U=function(e){return!(!e||!e.stack&&!e.stacktrace&&!e["opera#sourceloc"]||"string"!=typeof(e.stack||e.stacktrace||e["opera#sourceloc"])||e.stack===e.name+": "+e.message)};function H(e){switch(Object.prototype.toString.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return e instanceof Error}}var K=H,G=function(e,t,n,r){var i;if(t){var o;if(null===n)return X(e,t);"object"==typeof n&&(o=n),"string"==typeof n&&((i={})[n]=r,o=i),o&&"__proto__"!==t&&"constructor"!==t&&"prototype"!==t&&(e[t]||(e[t]={}),e[t]=p({},e[t],o))}},X=function(e,t,n){"string"==typeof t&&(n?"__proto__"!==t&&"constructor"!==t&&"prototype"!==t&&e[t]&&delete e[t][n]:delete e[t])},Y={add:G,get:function(e,t,n){if("string"==typeof t)return n?e[t]?e[t][n]:void 0:e[t]},clear:X};function W(){return W=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},W.apply(null,arguments)}var J=function(){function e(t,n,r,i,o){void 0===r&&(r=[]),void 0===i&&(i=ee()),this.apiKey=void 0,this.context=void 0,this.groupingHash=void 0,this.originalError=o,this._handledState=i,this.severity=this._handledState.severity,this.unhandled=this._handledState.unhandled,this.app={},this.device={},this.request={},this.response={},this.breadcrumbs=[],this.threads=[],this._metadata={},this._features=[],this._featuresIndex={},this._user={},this._session=void 0,this._correlation=void 0,this._groupingDiscriminator=void 0,this.errors=[ne(t,n,e.__type,r)]}var t=e.prototype;return t.addMetadata=function(e,t,n){return Y.add(this._metadata,e,t,n)},t.setTraceCorrelation=function(e,t){"string"==typeof e&&(this._correlation=W({traceId:e},"string"==typeof t?{spanId:t}:{}))},t.getGroupingDiscriminator=function(){return this._groupingDiscriminator},t.setGroupingDiscriminator=function(e){var t=this._groupingDiscriminator;return"string"!=typeof e&&null!=e||(this._groupingDiscriminator=e),t},t.getMetadata=function(e,t){return Y.get(this._metadata,e,t)},t.clearMetadata=function(e,t){return Y.clear(this._metadata,e,t)},t.addFeatureFlag=function(e,t){void 0===t&&(t=null),V.add(this._features,this._featuresIndex,e,t)},t.addFeatureFlags=function(e){V.merge(this._features,e,this._featuresIndex)},t.getFeatureFlags=function(){return V.toEventApi(this._features)},t.clearFeatureFlag=function(e){V.clear(this._features,this._featuresIndex,e)},t.clearFeatureFlags=function(){this._features=[],this._featuresIndex={}},t.getUser=function(){return this._user},t.setUser=function(e,t,n){this._user={id:e,email:t,name:n}},t.toJSON=function(){return{payloadVersion:"4",exceptions:g(this.errors,function(e){return p({},e,{message:e.errorMessage})}),severity:this.severity,unhandled:this._handledState.unhandled,severityReason:this._handledState.severityReason,app:this.app,device:this.device,request:this.request,response:this.response,breadcrumbs:this.breadcrumbs,context:this.context,groupingHash:this.groupingHash,groupingDiscriminator:this._groupingDiscriminator,metaData:this._metadata,user:this._user,session:this._session,featureFlags:this.getFeatureFlags(),correlation:this._correlation}},e}(),Q=function(e){var t={file:e.fileName,method:Z(e.functionName),lineNumber:e.lineNumber,columnNumber:e.columnNumber,code:void 0,inProject:void 0};return t.lineNumber>-1&&!t.file&&!t.method&&(t.file="global code"),t},Z=function(e){return/^global code$/i.test(e)?"global code":e},ee=function(){return{unhandled:!1,severity:"warning",severityReason:{type:"handledException"}}},te=function(e){return"string"==typeof e?e:""};function ne(e,n,r,i){return{errorClass:te(e),errorMessage:te(n),type:r,stacktrace:t(i,function(e,t){var n=Q(t);try{return"{}"===JSON.stringify(n)?e:e.concat(n)}catch(r){return e}},[])}}function re(e){return e.cause?[e].concat(re(e.cause)):[e]}J.getStacktrace=function(e,t,r){if(U(e))return k.parse(e).slice(t);try{return n(S.backtrace(),function(e){return-1===(e.functionName||"").indexOf("StackGenerator$$")}).slice(1+r)}catch(i){return[]}},J.create=function(e,t,n,r,i,o){void 0===i&&(i=0);var a,s=oe(e,t,r,o),l=s[0],c=s[1];try{var d=J.getStacktrace(l,c>0?1+c+i:0,1+i);a=new J(l.name,l.message,d,n,e)}catch(h){a=new J(l.name,l.message,[],n,e)}if("InvalidError"===l.name&&a.addMetadata(""+r,"non-error parameter",ie(e)),l.cause){var u,f=re(l).slice(1),p=g(f,function(e){var t=K(e)&&U(e)?k.parse(e):[],n=oe(e,!0,"error cause")[0];return"InvalidError"===n.name&&a.addMetadata("error cause",ie(e)),ne(n.name,n.message,J.__type,t)});(u=a.errors).push.apply(u,p)}return a};var ie=function(e){return null===e?"null":void 0===e?"undefined":e},oe=function(e,t,n,r){var i,o=0,a=function(e){var t="error cause"===n?"was":"received";r&&r.warn(n+" "+t+' a non-error: "'+e+'"');var i=new Error(n+" "+t+' a non-error. See "'+n+'" tab for more detail.');return i.name="InvalidError",i};if(t)switch(typeof e){case"string":case"number":case"boolean":i=new Error(String(e)),o+=1;break;case"function":i=a("function"),o+=2;break;case"object":null!==e&&K(e)?i=e:null!==e&&ae(e)?((i=new Error(e.message||e.errorMessage)).name=e.name||e.errorClass,o+=1):(i=a(null===e?"null":"unsupported object"),o+=2);break;default:i=a("nothing"),o+=2}else K(e)?i=e:(i=a(typeof e),o+=2);if(!U(i))try{throw i}catch(s){U(s)&&(i=s,o=1)}return[i,o]};J.__type="browserjs";var ae=function(e){return!("string"!=typeof e.name&&"string"!=typeof e.errorClass||"string"!=typeof e.message&&"string"!=typeof e.errorMessage)},se=J,le=function(e,t,n){var r=0,i=function(){if(r>=e.length)return n(null,!0);t(e[r],function(e,t){return e?n(e):!1===t?n(null,!1):(r++,void i())})};i()},ce=function(e,t,n,r){var i=function(e,r){if("function"!=typeof e)return r(null);try{if(2!==e.length){var i=e(t);return i&&"function"==typeof i.then?i.then(function(e){return setTimeout(function(){return r(null,e)})},function(e){setTimeout(function(){return n(e),r(null,!0)})}):r(null,i)}e(t,function(e,t){if(e)return n(e),r(null);r(null,t)})}catch(o){n(o),r(null)}};le(e,i,r)},de=function(e,t,n,r){for(var i=!1,o=e.slice();!i&&o.length;)try{i=!1===o.pop()(t)}catch(a){r.error("Error occurred in "+n+" callback, continuing anywayâ¦"),r.error(a)}return i};function ue(e){return"string"==typeof e&&/^c[a-z0-9]{20,32}$/.test(e)}var fe=ue;function pe(e,t){var n="000000000"+e;return n.substr(n.length-t)}var ge=pe;function he(e){var t=4,n=36,r=Math.pow(n,t),i=0;function o(){return ge((Math.random()*r|0).toString(n),t)}function a(){return i=i<r?i:0,++i-1}function s(){return"c"+(new Date).getTime().toString(n)+ge(a().toString(n),t)+e()+(o()+o())}return s.fingerprint=e,s.isCuid=fe,s}var me=he,be="object"==typeof window?window:self,ve=0;for(var xe in be)Object.hasOwnProperty.call(be,xe)&&ve++;var ye=navigator.mimeTypes?navigator.mimeTypes.length:0,_e=ge((ye+navigator.userAgent.length).toString(36)+ve.toString(36),4);function we(){return _e}var Se=me(we),De=function(){function e(){this.id=Se(),this.startedAt=new Date,this._handled=0,this._unhandled=0,this._user={},this.app={},this.device={}}var t=e.prototype;return t.getUser=function(){return this._user},t.setUser=function(e,t,n){this._user={id:e,email:t,name:n}},t.toJSON=function(){return{id:this.id,startedAt:this.startedAt,events:{handled:this._handled,unhandled:this._unhandled}}},t._track=function(e){this[e._handledState.unhandled?"_unhandled":"_handled"]+=1},e}(),ke=V.add,Ie=V.clear,Ee=V.merge,Ce="00000",Ne="https://notify.bugsnag.smartbear.com",Ae="https://sessions.bugsnag.smartbear.com",Oe=function(){},Te=function(){function i(e,t,n,r){var o=this;void 0===t&&(t=u.schema),void 0===n&&(n=[]),this._notifier=r,this._config={},this._schema=t,this._delivery={sendSession:Oe,sendEvent:Oe},this._logger={debug:Oe,info:Oe,warn:Oe,error:Oe},this._plugins={},this._breadcrumbs=[],this._session=null,this._metadata={},this._featuresIndex={},this._features=[],this._context=void 0,this._user={},this._groupingDiscriminator=void 0,this._cbs={e:[],s:[],sp:[],b:[]},this.Client=i,this.Event=se,this.Breadcrumb=_,this.Session=De,this._config=this._configure(e,n),g(n.concat(this._config.plugins),function(e){e&&o._loadPlugin(e)}),this._depth=1;var a=this,s=this.notify;this.notify=function(){return s.apply(a,arguments)}}var o=i.prototype;return o.addMetadata=function(e,t,n){return Y.add(this._metadata,e,t,n)},o.getMetadata=function(e,t){return Y.get(this._metadata,e,t)},o.clearMetadata=function(e,t){return Y.clear(this._metadata,e,t)},o.addFeatureFlag=function(e,t){void 0===t&&(t=null),ke(this._features,this._featuresIndex,e,t)},o.addFeatureFlags=function(e){Ee(this._features,e,this._featuresIndex)},o.clearFeatureFlag=function(e){Ie(this._features,this._featuresIndex,e)},o.clearFeatureFlags=function(){this._features=[],this._featuresIndex={}},o.getContext=function(){return this._context},o.setContext=function(e){this._context=e},o.getGroupingDiscriminator=function(){return this._groupingDiscriminator},o.setGroupingDiscriminator=function(e){var t=this._groupingDiscriminator;return"string"!=typeof e&&null!=e||(this._groupingDiscriminator=e),t},o._configure=function(e,n){var r=t(n,function(e,t){return t&&t.configSchema?p({},e,t.configSchema):e},this._schema);e.endpoints||(e.sendPayloadChecksums=!("sendPayloadChecksums"in e)||e.sendPayloadChecksums);
30var i=t(s(r),function(t,n){var i=r[n].defaultValue(e[n]);return void 0!==e[n]?r[n].validate(e[n])?r[n].allowPartialObject?t.config[n]=p(i,e[n]):t.config[n]=e[n]:(t.errors[n]=r[n].message,t.config[n]=i):t.config[n]=i,t},{errors:{},config:{}}),o=i.errors,a=i.config;if(r.apiKey){if(!a.apiKey)throw new Error("No Bugsnag API Key set");/^[0-9a-f]{32}$/i.test(a.apiKey)||(o.apiKey="should be a string of 32 hexadecimal characters"),void 0===e.endpoints&&0===a.apiKey.indexOf(Ce)&&(a.endpoints={notify:Ne,sessions:Ae})}return this._metadata=p({},a.metadata),Ee(this._features,a.featureFlags,this._featuresIndex),this._user=p({},a.user),this._context=a.context,a.logger&&(this._logger=a.logger),a.onError&&(this._cbs.e=this._cbs.e.concat(a.onError)),a.onBreadcrumb&&(this._cbs.b=this._cbs.b.concat(a.onBreadcrumb)),a.onSession&&(this._cbs.s=this._cbs.s.concat(a.onSession)),s(o).length&&this._logger.warn(je(o,e)),a},o.getUser=function(){return this._user},o.setUser=function(e,t,n){this._user={id:e,email:t,name:n}},o._loadPlugin=function(e){var t=e.load(this);e.name&&(this._plugins["~"+e.name+"~"]=t)},o.getPlugin=function(e){return this._plugins["~"+e+"~"]},o._setDelivery=function(e){this._delivery=e(this)},o.startSession=function(){var e=new De;return e.app.releaseStage=this._config.releaseStage,e.app.version=this._config.appVersion,e.app.type=this._config.appType,e._user=p({},this._user),de(this._cbs.s,e,"onSession",this._logger)?(this._logger.debug("Session not started due to onSession callback"),this):this._sessionDelegate.startSession(this,e)},o.addOnError=function(e,t){void 0===t&&(t=!1),this._cbs.e[t?"unshift":"push"](e)},o.removeOnError=function(e){this._cbs.e=n(this._cbs.e,function(t){return t!==e})},o._addOnSessionPayload=function(e){this._cbs.sp.push(e)},o.addOnSession=function(e){this._cbs.s.push(e)},o.removeOnSession=function(e){this._cbs.s=n(this._cbs.s,function(t){return t!==e})},o.addOnBreadcrumb=function(e,t){void 0===t&&(t=!1),this._cbs.b[t?"unshift":"push"](e)},o.removeOnBreadcrumb=function(e){this._cbs.b=n(this._cbs.b,function(t){return t!==e})},o.pauseSession=function(){return this._sessionDelegate.pauseSession(this)},o.resumeSession=function(){return this._sessionDelegate.resumeSession(this)},o.leaveBreadcrumb=function(t,n,i){if(t="string"==typeof t?t:"",i="string"==typeof i&&r(e,i)?i:"manual",n="object"==typeof n&&null!==n?n:{},t){var o=new _(t,n,i);de(this._cbs.b,o,"onBreadcrumb",this._logger)?this._logger.debug("Breadcrumb not attached due to onBreadcrumb callback"):(this._breadcrumbs.push(o),this._breadcrumbs.length>this._config.maxBreadcrumbs&&(this._breadcrumbs=this._breadcrumbs.slice(this._breadcrumbs.length-this._config.maxBreadcrumbs)))}},o._isBreadcrumbTypeEnabled=function(e){var t=this._config.enabledBreadcrumbTypes;return null===t||r(t,e)},o.notify=function(e,t,n){void 0===n&&(n=Oe);var r=se.create(e,!0,void 0,"notify()",this._depth+1,this._logger);this._notify(r,t,n)},o._notify=function(e,t,n){var o=this;if(void 0===n&&(n=Oe),e.app=p({},e.app,{releaseStage:this._config.releaseStage,version:this._config.appVersion,type:this._config.appType}),e.context=e.context||this._context,e._metadata=p({},e._metadata,this._metadata),e._user=p({},e._user,this._user),e.breadcrumbs=this._breadcrumbs.slice(),e.setGroupingDiscriminator(this._groupingDiscriminator),Ee(e._features,this._features,e._featuresIndex),null!==this._config.enabledReleaseStages&&!r(this._config.enabledReleaseStages,this._config.releaseStage))return this._logger.warn("Event not sent due to releaseStage/enabledReleaseStages configuration"),n(null,e);var a=e.severity,s=function(e){o._logger.error("Error occurred in onError callback, continuing anywayâ¦"),o._logger.error(e)},l=[].concat(this._cbs.e).concat(t);ce(l,e,s,function(t,r){if(t&&s(t),!r)return o._logger.debug("Event not sent due to onError callback"),n(null,e);o._isBreadcrumbTypeEnabled("error")&&i.prototype.leaveBreadcrumb.call(o,e.errors[0].errorClass,{errorClass:e.errors[0].errorClass,errorMessage:e.errors[0].errorMessage,severity:e.severity},"error"),a!==e.severity&&(e._handledState.severityReason={type:"userCallbackSetSeverity"}),e.unhandled!==e._handledState.unhandled&&(e._handledState.severityReason.unhandledOverrid
30den=!0,e._handledState.unhandled=e.unhandled),o._session&&(o._session._track(e),e._session=o._session),o._delivery.sendEvent({apiKey:e.apiKey||o._config.apiKey,notifier:o._notifier,events:[e]},function(t){return n(t,e)})})},i}(),je=function(e,t){return new Error("Invalid configuration\n"+g(s(e),function(n){return" - "+n+" "+e[n]+", got "+Re(t[n])}).join("\n\n"))},Re=function(e){switch(typeof e){case"string":case"number":case"object":return JSON.stringify(e);default:return String(e)}},Pe=Te,Be={},$e=["events.[].metaData","events.[].breadcrumbs.[].metaData","events.[].request","events.[].response"];Be.event=function(e,t){var n=I(e,null,null,{redactedPaths:$e,redactedKeys:t});return n.length>1e6&&(e.events[0]._metadata={notifier:"WARNING!\nSerialized payload was "+n.length/1e6+"MB (limit = 1MB)\nmetadata was removed"},n=I(e,null,null,{redactedPaths:$e,redactedKeys:t})),n},Be.session=function(e,t){return I(e,null,null)};var Me={};Me=function(e,t){return void 0===t&&(t=window),{sendEvent:function(n,r){if(void 0===r&&(r=function(){}),null===e._config.endpoints.notify){var i=new Error("Event not sent due to incomplete endpoint configuration");return r(i)}var o=Le(e._config,"notify","4",t),a=Be.event(n,e._config.redactedKeys),s=new t.XDomainRequest;s.onload=function(){r(null)},s.onerror=function(){var t=new Error("Event failed to send");e._logger.error("Event failed to sendâ¦",t),a.length>1e6&&e._logger.warn("Event oversized ("+(a.length/1e6).toFixed(2)+" MB)"),r(t)},s.open("POST",o),setTimeout(function(){try{s.send(a)}catch(t){e._logger.error(t),r(t)}},0)},sendSession:function(n,r){if(void 0===r&&(r=function(){}),null===e._config.endpoints.sessions){var i=new Error("Session not sent due to incomplete endpoint configuration");return r(i)}var o=Le(e._config,"sessions","1",t),a=new t.XDomainRequest;a.onload=function(){r(null)},a.open("POST",o),setTimeout(function(){try{a.send(Be.session(n,e._config.redactedKeys))}catch(t){e._logger.error(t),r(t)}},0)}}};var Le=function(e,t,n,r){var i=JSON.parse(JSON.stringify(new Date));return ze(e.endpoints[t],r.location.protocol)+"?apiKey="+encodeURIComponent(e.apiKey)+"&payloadVersion="+n+"&sentAt="+encodeURIComponent(i)},ze=Me._matchPageProtocol=function(e,t){return"http:"===t?e.replace(/^https:/,"http:"):e};function qe(e,t){if(e.isSecureContext&&e.crypto&&e.crypto.subtle&&e.crypto.subtle.digest&&"function"==typeof TextEncoder){var n=(new TextEncoder).encode(t);return e.crypto.subtle.digest("SHA-1",n).then(function(e){return"sha1 "+Array.from(new Uint8Array(e)).map(function(e){return e.toString(16).padStart(2,"0")}).join("")})}return Promise.resolve()}var Fe=function(e,t){return void 0===t&&(t=window),{sendEvent:function(n,r){void 0===r&&(r=function(){});try{var i=e._config.endpoints.notify;if(null===i){var o=new Error("Event not sent due to incomplete endpoint configuration");return r(o)}var a=new t.XMLHttpRequest,s=Be.event(n,e._config.redactedKeys);a.onreadystatechange=function(){if(a.readyState===t.XMLHttpRequest.DONE){var n=a.status;if(0===n||n>=400){var i=new Error("Request failed with status "+n);e._logger.error("Event failed to sendâ¦",i),s.length>1e6&&e._logger.warn("Event oversized ("+(s.length/1e6).toFixed(2)+" MB)"),r(i)}else r(null)}},a.open("POST",i),a.setRequestHeader("Content-Type","application/json"),a.setRequestHeader("Bugsnag-Api-Key",n.apiKey||e._config.apiKey),a.setRequestHeader("Bugsnag-Payload-Version","4"),a.setRequestHeader("Bugsnag-Sent-At",(new Date).toISOString()),e._config.sendPayloadChecksums&&"undefined"!=typeof Promise&&-1!==Promise.toString().indexOf("[native code]")?qe(t,s).then(function(e){e&&a.setRequestHeader("Bugsnag-Integrity",e),a.send(s)}).catch(function(t){e._logger.error(t),a.send(s)}):a.send(s)}catch(l){e._logger.error(l)}},sendSession:function(n,r){void 0===r&&(r=function(){});try{var i=e._config.endpoints.sessions;if(null===i){var o=new Error("Session not sent due to incomplete endpoint configuration");return r(o)}var a=new t.XMLHttpRequest,s=Be.session(n,e._config.redactedKeys);a.onreadystatechange=function(){if(a.readyState===t.XMLHttpRequest.DONE){var n=a.status;if(0===n||n>=400){var i=new Error("Request failed with status "+n);e._logger.error("Session failed to sendâ¦",i),r(i)}else r(null)}},a.open("POST",i),a.setRequestHeader("Content-Type","application/json"),a.setRequestHeader("Bugsnag-Api-Key",e._config.apiKey),a.setRequestHeader("Bugsnag-Payload-Version","1"),a.setRequestHeader("Bugsnag-Sent-At",(ne
30w Date).toISOString()),e._config.sendPayloadChecksums&&"undefined"!=typeof Promise&&-1!==Promise.toString().indexOf("[native code]")?qe(t,s).then(function(e){e&&a.setRequestHeader("Bugsnag-Integrity",e),a.send(s)}).catch(function(t){e._logger.error(t),a.send(s)}):a.send(s)}catch(l){e._logger.error(l)}}}},Ve=new Date,Ue=function(){Ve=new Date},He={name:"appDuration",load:function(e){return e.addOnError(function(e){var t=new Date;e.app.duration=t-Ve},!0),{reset:Ue}}},Ke=function(e){return void 0===e&&(e=window),{load:function(t){t.addOnError(function(t){void 0===t.context&&(t.context=e.location.pathname)},!0)}}};function Ge(e){return"string"==typeof e&&/^c[a-z0-9]{20,32}$/.test(e)}var Xe=Ge;function Ye(e,t){var n="000000000"+e;return n.substr(n.length-t)}var We=Ye;function Je(e){var t=4,n=36,r=Math.pow(n,t),i=0;function o(){return We((Math.random()*r|0).toString(n),t)}function a(){return i=i<r?i:0,++i-1}function s(){return"c"+(new Date).getTime().toString(n)+We(a().toString(n),t)+e()+(o()+o())}return s.fingerprint=e,s.isCuid=Xe,s}var Qe=Je,Ze="object"==typeof window?window:self,et=0;for(var tt in Ze)Object.hasOwnProperty.call(Ze,tt)&&et++;var nt=navigator.mimeTypes?navigator.mimeTypes.length:0,rt=We((nt+navigator.userAgent.length).toString(36)+et.toString(36),4);function it(){return rt}var ot=Qe(it),at="bugsnag-anonymous-id",st=function(e){try{var t=e.localStorage,n=t.getItem(at);return n&&ot.isCuid(n)||(n=ot(),t.setItem(at,n)),n}catch(r){}},lt=function(e,t){return void 0===e&&(e=navigator),void 0===t&&(t=window),{load:function(n){var r={locale:e.browserLanguage||e.systemLanguage||e.userLanguage||e.language,userAgent:e.userAgent};t&&t.screen&&t.screen.orientation&&t.screen.orientation.type?r.orientation=t.screen.orientation.type:t&&t.document&&(r.orientation=t.document.documentElement.clientWidth>t.document.documentElement.clientHeight?"landscape":"portrait"),n._config.generateAnonymousId&&(r.id=st(t)),n.addOnSession(function(e){e.device=p({},e.device,r),n._config.collectUserIp||ct(e)}),n.addOnError(function(e){e.device=p({},e.device,r,{time:new Date}),n._config.collectUserIp||ct(e)},!0)},configSchema:{generateAnonymousId:{validate:function(e){return!0===e||!1===e},defaultValue:function(){return!0},message:"should be true|false"}}}},ct=function(e){var t=e.getUser();t&&t.id||e.setUser(e.device.id)},dt=function(e){return void 0===e&&(e=window),{load:function(t){t.addOnError(function(t){t.request&&t.request.url||(t.request=p({},t.request,{url:e.location.href}))},!0)}}},ut={load:function(e){e._sessionDelegate=ft}},ft={startSession:function(e,t){var n=e;return n._session=t,n._pausedSession=null,null===n._config.enabledReleaseStages||r(n._config.enabledReleaseStages,n._config.releaseStage)?(n._delivery.sendSession({notifier:n._notifier,device:t.device,app:t.app,sessions:[{id:t.id,startedAt:t.startedAt,user:t._user}]}),n):(n._logger.warn("Session not sent due to releaseStage/enabledReleaseStages configuration"),n)},resumeSession:function(e){return e._session?e:e._pausedSession?(e._session=e._pausedSession,e._pausedSession=null,e):e.startSession()},pauseSession:function(e){e._pausedSession=e._session,e._session=null}},pt={load:function(e){e._config.collectUserIp||e.addOnError(function(e){e._user&&void 0===e._user.id&&delete e._user.id,e._user=p({id:"[REDACTED]"},e._user),e.request=p({clientIp:"[REDACTED]"},e.request)})},configSchema:{collectUserIp:{defaultValue:function(){return!0},message:"should be true|false",validate:function(e){return!0===e||!1===e}}}},gt={load:function(e){!/^(local-)?dev(elopment)?$/.test(e._config.releaseStage)&&e._isBreadcrumbTypeEnabled("log")&&g(ht,function(n){var r=console[n];console[n]=function(){for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];e.leaveBreadcrumb("Console output",t(o,function(e,t,n){var r="[Unknown value]";try{r=String(t)}catch(i){}if("[object Object]"===r)try{r=JSON.stringify(t)}catch(i){}return e["["+n+"]"]=r,e},{severity:0===n.indexOf("group")?"log":n}),"log"),r.apply(console,o)},console[n]._restore=function(){console[n]=r}})}},ht=n(["log","debug","info","warn","error"],function(e){return"undefined"!=typeof console&&"function"==typeof console[e]}),mt=200,bt=5e5,vt=function(e,r){return void 0===e&&(e=document),void 0===r&&(r=window),{load:function(i){if(i._c
30onfig.trackInlineScripts){var o=r.location.href,a="",s=e.attachEvent?"complete"===e.readyState:"loading"!==e.readyState,l=function(){return e.documentElement.outerHTML};a=l();var c=e.onreadystatechange;e.onreadystatechange=function(){"interactive"===e.readyState&&(a=l(),s=!0);try{c.apply(this,arguments)}catch(t){}};var d=null,u=function(e){d=e},f=function(){var t=e.currentScript||d;if(!t&&!s){var n=e.scripts||e.getElementsByTagName("script");t=n[n.length-1]}return t},p=function(e){s&&a||(a=l());var n=["\x3c!-- DOC START --\x3e"].concat(a.split("\n")),r=e-1,i=Math.max(r-3,0),o=Math.min(r+3,n.length);return t(n.slice(i,o),function(e,t,n){return e[i+1+n]=t.length<=mt?t:t.substr(0,mt),e},{})};i.addOnError(function(e){e.errors[0].stacktrace=n(e.errors[0].stacktrace,function(e){return!/__trace__$/.test(e.method)});var t=e.errors[0].stacktrace[0],r=function(e){return e.replace(/#.*$/,"").replace(/\?.*$/,"")};if(!t||!t.file||r(t.file)===r(o)){var i=f();if(i){var a=i.innerHTML;e.addMetadata("script","content",a.length<=bt?a:a.substr(0,bt)),t&&t.lineNumber&&(t.code=p(t.lineNumber))}}},!0);var h=g(["setTimeout","setInterval","setImmediate","requestAnimationFrame"],function(e){return xt(r,e,function(e){return m(e,function(e){return{get:function(){return e[0]},replace:function(t){e[0]=t}}})})})[0];g(["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload","MediaSource","MediaRecorder","MediaStream","ServiceWorker","ServiceWorkerContainer","ServiceWorkerRegistration","BroadcastChannel","RTCPeerConnection","RTCDataChannel","AbortSignal","MediaQueryList","ShadowRoot","FontFaceSet","Animation","PermissionStatus","PaymentRequest","VideoTrackList"],function(e){r[e]&&r[e].prototype&&Object.prototype.hasOwnProperty.call(r[e].prototype,"addEventListener")&&(xt(r[e].prototype,"addEventListener",function(e){return m(e,yt)}),xt(r[e].prototype,"removeEventListener",function(e){return m(e,yt,!0)}))})}function m(e,t,n){return void 0===n&&(n=!1),function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];try{var a=t(i),s=a.get();if(n&&e.apply(this,i),"function"!=typeof s)return e.apply(this,i);if(s.__trace__)a.replace(s.__trace__);else{var l=f();s.__trace__=function(){u(l),h(function(){u(null)},0);for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=s.apply(this,t);return u(null),r},s.__trace__.__trace__=s.__trace__,a.replace(s.__trace__)}}catch(c){}if(e.apply)return e.apply(this,i);switch(i.length){case 1:return e(i[0]);case 2:return e(i[0],i[1]);default:return e()}}}},configSchema:{trackInlineScripts:{validate:function(e){return!0===e||!1===e},defaultValue:function(){return!0},message:"should be true|false"}}}};function xt(e,t,n){var r=e[t];if(!r)return r;var i=n(r);return e[t]=i,r}function yt(e){var t=!!e[1]&&"function"==typeof e[1].handleEvent;return{get:function(){return t?e[1].handleEvent:e[1]},replace:function(n){t?e[1].handleEvent=n:e[1]=n}}}var _t=function(e){return void 0===e&&(e=window),{load:function(t){"addEventListener"in e&&t._isBreadcrumbTypeEnabled("user")&&e.addEventListener("click",function(n){var r,i;try{r=St(n.target),i=Dt(n.target,e)}catch(o){r="[hidden]",i="[hidden]",t._logger.error("Cross domain error when tracking click event. See docs: https://tinyurl.com/yy3rn63z")}t.leaveBreadcrumb("UI click",{targetText:r,targetSelector:i},"user")},!0)}}},wt=/^\s*([^\s][\s\S]{0,139}[^\s])?\s*/;function St(e){var t=e.textContent||e.innerText||"";return t||"submit"!==e.type&&"button"!==e.type||(t=e.value),(t=t.replace(wt,"$1")).length>140?t.slice(0,135)+"(...)":t}function Dt(e,t){var n=[e.tagName];if(e.id&&n.push("#"+e.id),e.className&&e.className.length&&n.push("."+e.className.split(" ").join(".")),!t.document.querySelectorAll||!Array.prototype.indexOf)return n.join("");try{if(1===t.document.querySelectorAll(n.join("")).length)return n.join("")}catch(i){return n.join("")}if(e.parentNode.childNodes.length>1){var r=Array.prototype.indexOf.call(e.parentNode.childNodes,e)+1;n.push(":nth-child("+r+")")}return 1===t.document.querySelectorAll(n.join("")).length?n.join(""):e.parentNode?Dt(e.parentNode,t)+" > "+n.join(""):n.join("")}var kt={};kt=function(e){void 0===e&&(e=window);var t={load:function(t){if("addEventListener"in e&&t._isBreadcrumbTypeEnabled("navigation")){var n=function(e){return function(){return t.leaveBreadcrumb(e,{},"navigation")}};e.addEventListener("pagehide",n("Page hidden"),!0),e.addEventListener("pageshow",n("Page shown"),!0),e.addEventListener("load",n("Page loaded"),!0),e.document.addEventListener("DOMContentLoaded",n("DOMContentLoaded"),!0),e.addEventListener("load",function(){return e.addEventListener("popstate",n("Navigated back"),!0)}),e.addEventListener("hashchange",function(n){var r=n.oldURL?{from:It(n.oldURL,e),to:It(n.newURL,e),state:Nt(e)}:{to:It(e.location.href,e)};t.leaveBreadcrumb("Hash changed",r,"navigation")},!0),e.history.pushState&&Ct(t,e.history,"pushState",e,!0),e.history.replaceState&&Ct(t,e.history,"replaceState",e)}}};return t};var It=function(e,t){var n=t.document.createElement("A");return n.href=e,""+n.pathname+n.search+n.hash},Et=function(e,t,n,r){var i=It(e.location.href,e);return{title:n,state:t,prevState:Nt(e),to:r||i,from:i}},Ct=function(e,t,n,r,i){void 0===i&&(i=!1);var o=t[n];t[n]=function(a,s,l){e.leaveBreadcrumb("History "+n,Et(r,a,s,l),"navigation"),i&&"function"==typeof e.resetEventCount&&e.resetEventCount(),o.apply(t,[a,s].concat(void 0!==l?l:[]))}},Nt=function(e){try{return e.history.state}catch(t){}},At=function(e){if(!e)return{};var t={};if("function"==typeof e.entries)for(var n=e.entries(),r=n.next();!r.done;){var i=r.value,o=i[0],a=i[1];t[o]=a,r=n.next()}else e.forEach&&e.forEach(function(e,n){t[n]=e});return t},Ot=function(){function e(){this.callbacks=[]}var t=e.prototype;return t.onStart=function(e){if("function"!=typeof e)throw new Error("RequestTracker onStart callback must be a function");this.callbacks.push(e)},t.start=function(e){var t=this.callbacks.map(function(t){try{return t(e)}catch(n){return console.error("RequestTracker callback error:",n),null}}).filter(function(e){return e&&"object"==typeof e});return{onRequestEnd:function(e){t.forEach(function(t){if("function"==typeof t.onRequestEnd)try{t.onRequestEnd(e)}catch(n){console.error("RequestTracker onRequestEnd callback error:",n)}})},extraRequestHeaders:t.map(function(e){return e.extraRequestHeaders}).filter(function(e){return e&&"object"==typeof e}).reduce(function(e,t){return Object.assign(e,t)},{})}},t._reset=function(){this.callbacks=[]},e}();function Tt(e,t){if("fetch"in e&&!e.fetch.polyfill){if(!e.__bugsnag_fetch_tracker__){var n=new Ot,r=e.fetch;e.fetch=function(e,t){void 0===t&&(t={});var i=null,o="GET";e&&"object"==typeof e?(i=e.url,t&&"method"in t?o=t.method:e&&"method"in e&&(o=e.method)):(i=e,t&&"method"in t&&(o=t.method)),void 0===o&&(o="GET");var a={};t&&t.headers&&(t.headers instanceof Headers?a=At(t.headers):"object"==typeof t.headers&&(a=t.headers));var s=Date.now(),l={url:String(i),method:String(o),startTime:s,type:"fetch",input:e,headers:a,body:t?t.body:void 0},c=n.start(l).onRequestEnd;return r.call.apply(r,[this].concat(Array.prototype.slice.call(arguments))).then(function(e){return c({endTime:Date.now(),status:e.status,state:"success",headers:At(e.headers)}),e},function(e){throw c({endTime:Date.now(),state:"error",error:e}),e})},e.__bugsnag_fetch_tracker__=n}return e.__bugsnag_fetch_tracker__}}var jt=Tt;function Rt(e,t){if(void 0===t&&(t=[]),!e||"string"!=typeof e)return!0;var n=e.replace(/\?.*$/,"");return r(t,n)}function Pt(e,t){void 0===t&&(t=[]);var n=[e._config.endpoints.notify,e._config.endpoints.sessions].concat(t).filter(
30Boolean);return function(e){return Rt(e,n)}}function Bt(e){return e&&Date.now()-e}var $t={createUrlFilter:Pt,getDuration:Bt},Mt=function(e){if(!e)return{};var t=e.trim().split(/[\r\n]+/),n={};return t.forEach(function(e){var t=e.split(": "),r=t.shift(),i=t.join(": ");n[r]=i}),n},Lt=function(e){var t=e.response,n=e.responseType;if(null!=t)switch(n){case"arraybuffer":case"blob":return"[Binary Data]";case"document":return"[Document]";case"json":try{return JSON.stringify(t)}catch(r){return"[Unserializable JSON]"}default:return String(t)}};function zt(e,t){if("addEventListener"in e.XMLHttpRequest.prototype&&"WeakMap"in e){if(!e.__bugsnag_xhr_tracker__){var n=new Ot,r=new WeakMap,i=new WeakMap,o=e.XMLHttpRequest.prototype.open,a=e.XMLHttpRequest.prototype.send,s=e.XMLHttpRequest.prototype.setRequestHeader;e.XMLHttpRequest.prototype.open=function(e,t){this&&r.set(this,{method:String(e),url:String(t)}),o.apply(this,arguments)},e.XMLHttpRequest.prototype.setRequestHeader=function(e,t){if(this){var n=r.get(this);n&&(n.headers=n.headers||{},n.headers[String(e)]=(n.headers[String(e)]||"")+String(t))}s.apply(this,arguments)},e.XMLHttpRequest.prototype.send=function(e){var t=this,o=r.get(this);if(o){var s=i.get(this);s&&(this.removeEventListener("load",s.load),this.removeEventListener("error",s.error));var l=Date.now(),c={url:o.url,method:o.method,startTime:l,type:"xmlhttprequest",body:e,headers:o.headers},d=n.start(c).onRequestEnd,u=function(){return Mt(t.getAllResponseHeaders())},f=function(){d({endTime:Date.now(),status:t.status,state:"success",headers:u(),body:Lt(t)})},p=function(){d({endTime:Date.now(),state:"error",headers:u(),body:Lt(t)})};this.addEventListener("load",f),this.addEventListener("error",p),this&&i.set(this,{load:f,error:p})}a.apply(this,arguments)},e.__bugsnag_xhr_tracker__=n}return e.__bugsnag_xhr_tracker__}}var qt=zt,Ft=$t.createUrlFilter,Vt=$t.getDuration;function Ut(e,t){return void 0===e&&(e=[]),void 0===t&&(t=window),{name:"requestTracker",load:function(n){try{return{fetchTracker:jt(t),xhrTracker:qt(t),urlFilter:Ft(n,e),getDuration:Vt}}catch(r){throw n._logger.error("Failed to load request tracker:",r),new Error("Request tracking is not available: "+r.message)}}}}var Ht={createRequestTrackerPlugin:Ut},Kt="request",Gt=function(e,t){void 0===e&&(e=[]),void 0===t&&(t=window);var n={load:function(n){if(n._isBreadcrumbTypeEnabled("request")){var r=n.getPlugin("requestTracker");if(!r)try{var i=(0,Ht.createRequestTrackerPlugin)(e,t);n._loadPlugin(i),r=n.getPlugin("requestTracker")}catch(a){n._logger.warn("Failed to auto-load request tracker, falling back to direct monkey-patching:",a.message)}if(r)return o(r)}function o(e){var t=e.fetchTracker,r=e.xhrTracker,i=e.urlFilter,o=e.getDuration,a=function(e){if(!i(e.url))return{onRequestEnd:function(t){var r=o(e.startTime),i={method:e.method,status:t.status,url:e.url,duration:r},a="fetch"===e.type?"fetch()":"XMLHttpRequest";"error"===t.state?n.leaveBreadcrumb(a+" error",{method:e.method,url:e.url,duration:r},Kt):t.status>=400?n.leaveBreadcrumb(a+" failed",i,Kt):n.leaveBreadcrumb(a+" succeeded",i,Kt)}}};t&&t.onStart(a),r&&r.onStart(a)}}};return n},Xt={load:function(e){var t=0;e.addOnError(function(n){if(t>=e._config.maxEvents)return e._logger.warn("Cancelling event send due to maxEvents per session limit of "+e._config.maxEvents+" being reached"),!1;t++}),e.resetEventCount=function(){t=0}},configSchema:{maxEvents:{defaultValue:function(){return 10},message:"should be a positive integer â¤100",validate:function(e){return l(1,100)(e)}}}},Yt={},Wt=(Yt={load:function(e){e.addOnError(function(e){var n=t(e.errors,function(e,t){return e.concat(t.stacktrace)},[]);g(n,function(e){e.file=Wt(e.file)})})}})._strip=function(e){return"string"==typeof e?e.replace(/\?.*$/,"").replace(/#.*$/,""):e},Jt=function(e,t){return void 0===e&&(e=window),void 0===t&&(t="window onerror"),{load:function(n){if(n._config.autoDetectErrors&&n._config.enabledErrorTypes.unhandledExceptions){var r=e.onerror;e.onerror=i}
30function i(e,i,o,a,s){if(0===o&&/Script error\.?/.test(e))n._logger.warn("Ignoring cross-domain or eval script error. See docs: https://tinyurl.com/yy3rn63z");else{var l,c={severity:"error",unhandled:!0,severityReason:{type:"unhandledException"}};if(s)l=n.Event.create(s,!0,c,t,1),Qt(l.errors[0].stacktrace,i,o,a);else if("object"!=typeof e||null===e||i&&"string"==typeof i||o||a||s)l=n.Event.create(e,!0,c,t,1),Qt(l.errors[0].stacktrace,i,o,a);else{var d=e.type?"Event: "+e.type:"Error",u=e.message||e.detail||"";(l=n.Event.create({name:d,message:u},!0,c,t,1)).originalError=e,l.addMetadata(t,{event:e,extraParameters:i})}n._notify(l)}try{r.apply(this,arguments)}catch(f){}}}}},Qt=function(e,t,n,r){e[0]||e.push({});var i=e[0];i.file||"string"!=typeof t||(i.file=t),!i.lineNumber&&Zt(n)&&(i.lineNumber=n),i.columnNumber||(Zt(r)?i.columnNumber=r:window.event&&Zt(window.event.errorCharacter)&&(i.columnNumber=window.event.errorCharacter))},Zt=function(e){return"number"==typeof e&&"NaN"!==String.call(e)},en=function(e){return void 0===e&&(e=window),{load:function(t){if(t._config.autoDetectErrors&&t._config.enabledErrorTypes.unhandledRejections){var n=function(e){var n=e.reason,r=!1;try{e.detail&&e.detail.reason&&(n=e.detail.reason,r=!0)}catch(a){}var i=!t._config.reportUnhandledPromiseRejectionsAsHandled,o=t.Event.create(n,!1,{severity:"error",unhandled:i,severityReason:{type:"unhandledPromiseRejection"}},"unhandledrejection handler",1,t._logger);r&&g(o.errors[0].stacktrace,tn(n)),t._notify(o,function(e){var t;K(e.originalError)&&!e.originalError.stack&&e.addMetadata("unhandledRejection handler",((t={})[Object.prototype.toString.call(e.originalError)]={name:e.originalError.name,message:e.originalError.message,code:e.originalError.code},t))})};"addEventListener"in e?e.addEventListener("unhandledrejection",n):e.onunhandledrejection=function(e,t){n({detail:{reason:e,promise:t}})}}}}},tn=function(e){return function(t){t.file!==e.toString()&&t.method&&(t.method=t.method.replace(/^\s+/,""))}},nn={},rn="Bugsnag JavaScript",on="8.10.0",an="https://github.com/bugsnag/bugsnag-js",sn=p({},u.schema,x),ln={_client:null,createClient:function(e){"string"==typeof e&&(e={apiKey:e}),e||(e={});var t=[He,lt(),Ke(),dt(),Xt,ut,pt,Yt,Jt(),en(),kt(),_t(),Gt(),gt,vt()],n=new Pe(e,sn,t,{name:rn,version:on,url:an});return n._setDelivery(window.XDomainRequest?Me:Fe),n._logger.debug("Loaded!"),n.leaveBreadcrumb("Bugsnag loaded",{},"state"),n._config.autoTrackSessions?n.startSession():n},start:function(e){return ln._client?(ln._client._logger.warn("Bugsnag.start() was called more than once. Ignoring."),ln._client):(ln._client=ln.createClient(e),ln._client)},isStarted:function(){return null!=ln._client}};g(["resetEventCount"].concat(s(Pe.prototype)),function(e){/^_/.test(e)||(ln[e]=function(){if(!ln._client)return console.log("Bugsnag."+e+"() was called before Bugsnag.start()");ln._client._depth+=1;var t=ln._client[e].apply(ln._client,arguments);return ln._client._depth-=1,t})}),(nn=ln).Client=Pe,nn.Event=se,nn.Session=De,nn.Breadcrumb=_,nn.default=ln}();!function(){var e={};function t(){return t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},t.apply(null,arguments)}function n(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,r(e,t)}function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}e=function(){function e(){var e="undefined"!=typeof window&&window.React;if(this.name="react",this.lazy=0===arguments.length&&!e,!this.lazy&&(this.React=(arguments.length<=0?void 0:arguments[0])||e,!this.React))throw new Error("@bugsnag/plugin-react reference to `React` was undefined")}return e.prototype.load=function(e){if(!this.lazy){var t=o(this.React,e);return t.createErrorBoundary=function(){return t},t}var n=function(){throw new Error("@bugsnag/plugin-react was used incorrectly. Valid usage is as follows:\nPass React to the plugin constructor\n\n `Bugsnag.start({ plugins: [new BugsnagPluginReact(React)] })`\nand then call `const ErrorBoundary = Bugsnag.getPlugin('react').createErrorBoundary()`\n\nOr if React is not available until after Bugsnag has started,\nconstruct the plugin with no arguments\n `Bugsnag.start({ plugins: [new BugsnagPluginReact()] })`,\nthen pass in React when available to construct your error boundary\n `const ErrorBoundary = Bugsnag.getPlugin('react').createErrorBoundary(React)`")};return n.createErrorBoundary=function(t){if(!t)throw new Error("@bugsnag/plugin-react reference to `React` was undefined");return o(t,e)},n},e}();var i=function(e){for(var t=e.split(/\n/g),n="",r=0,i=t.length;r<i;r++)t[r].length&&(n+=(n.length?"\n":"")+t[r].trim());return n},o=function(e,r){return function(o){function a(e){var t;return(t=o.call(this,e)||this).state={error:null,info:null},t.handleClearError=t.handleClearError.bind(t),t}n(a,o);var s=a.prototype;return s.handleClearError=function(){this.setState({error:null,info:null})},s.componentDidCatch=function(e,t){var n=this.props.onError,o={severity:"error",unhandled:!0,severityReason:{type:"unhandledException"}},a=r.Event.create(e,!0,o,1);t&&t.componentStack&&(t.componentStack=i(t.componentStack)),a.addMetadata("react",t),r._notify(a,n),this.setState({error:e,info:t})},s.render=function(){if(this.state.error){var n=this.props.FallbackComponent;return n?e.createElement(n,t({},this.state,{clearError:this.handleClearError})):null}return this.props.children},a}(e.Component)};e.formatComponentStack=i,e.default=e}();function X(e){const t=/^(\d{4})-(\d{2})-(\d{2})(?:T.*)?$/.exec(e);if(!t)return null;const n=Number(t[1]),r=Number(t[2]),i=Number(t[3]),o=new Date(n,r-1,i);return o.getFullYear()!==n||o.getMonth()!==r-1||o.getDate()!==i?null:o}function Y(e){const t=X(e);return t?t.toLocaleDateString("pt-BR"):""}function W(e){return`${e.getFullYear()}
30-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}function J(e){const t=function(e){const t=X(e);if(!t)return 0;const n=new Date,r=Date.UTC(n.getFullYear(),n.getMonth(),n.getDate()),i=Date.UTC(t.getFullYear(),t.getMonth(),t.getDate()),o=Math.floor((r-i)/864e5);return Number.isFinite(o)?Math.max(0,o):0}(e);return`${t.toLocaleString("pt-BR")} ${1===t?"Dia":"Dias"}`}function Q(e){if(null==e)return"";const t=String(e).trim();if(!t)return"";const n=Number(t.replace("%","").replace(",",".").trim());if(Number.isNaN(n))return t;return`${n-Math.floor(n)>=.5?Math.ceil(n):Math.floor(n)}% off`}function Z(e){const t=e.getDay();return 0!==t&&6!==t&&!function(e){const t=[new Date(e,0,1),new Date(e,3,21),new Date(e,4,1),new Date(e,8,7),new Date(e,9,12),new Date(e,10,2),new Date(e,10,15),new Date(e,10,20),new Date(e,11,25)],n=e%19,r=Math.floor(e/100),i=e%100,o=Math.floor(r/4),a=r%4,s=Math.floor((r+8)/25),l=(19*n+r-o-Math.floor((r-s+1)/3)+15)%30,c=(32+2*a+2*Math.floor(i/4)-l-i%4)%7,d=Math.floor((n+11*l+22*c)/451),u=
30Math.floor((l+c-7*d+114)/31),f=new Date(e,u-1,(l+c-7*d+114)%31+1),p=(e,t)=>{const n=new Date(e);return n.setDate(n.getDate()+t),n};return[...t,p(f,-48),p(f,-47),p(f,-2),f,p(f,60)]}(e.getFullYear()).some(t=>t.getDate()===e.getDate()&&t.getMonth()===e.getMonth()&&t.getFullYear()===e.getFullYear())}function ee(){const e=function(){const e=new Date;for(e.setHours(0,0,0,0);!Z(e);)e.setDate(e.getDate()+1);return e}(),t=new Date(e),n=function(){const e=Number("5");return Number.isInteger(e)&&e>0?e:5}();let r=0;for(;r<n;)t.setDate(t.getDate()+1),Z(t)&&r++;return{minDate:e,maxDate:t}}function te(e,t,n){return!Number.isNaN(e.getTime())&&Z(e)&&e>=t&&e<=n}function ne(){try{return"true"===localStorage.getItem("canNegotiate")}catch{return!1}}function re(e,t){return!e.HasLegalClaim||(e.CanNegotiate??t)}const ie=f.div` 31 display: flex; 32 justify-content: flex-start; 33 overflow: hidden; 34 padding-bottom: 8px; 35 margin-bottom: 28px; 36 37 @media (max-width: 820px) { 38 width: 100%; 39 overflow-x: auto; 40 } 41`,oe=f.button` 42 background-color: ${e=>e.$active?"#377DFF":"#F8F8F8"}; 43 color: ${e=>
43e.$active?"#ffffff":"#343d48"}; 44 border: none; 45 border-radius: 15px; 46 padding: 10px 15px; 47 font-size: 16px; 48 font-weight: 400; 49 white-space: nowrap; 50 margin-right: 2rem; 51 cursor: pointer; 52 transition: all 0.1s ease-in-out; 53`,ae=f.h3` 54 font-size: 24px; 55 font-weight: 600; 56 padding-bottom: 15px; 57 margin: 0; 58 color: #343d48; 59`,se=f.p` 60 font-size: 14px; 61 color: #84898f; 62 margin: 0 0 20px 0; 63`,le=f.div` 64 margin-bottom: 40px; 65 border: 1px solid #ebebeb; 66 border-radius: 15px; 67 padding: 10px 15px; 68 display: flex; 69 justify-content: space-between; 70 align-items: center; 71 72 @media (max-width: 820px) { 73 flex-direction: column; 74 } 75`,ce=f.div` 76 width: 17vw; 77 min-width: 0; 78 79 &:last-child { 80 text-align: end; 81 } 82 83 @media (max-width: 820px) { 84 width: 100%; 85 display: flex; 86 justify-content: space-between; 87 align-items: center; 88 89 &:last-child { 90 text-align: center; 91 justify-content: center; 92 } 93 } 94`,de=f.div` 95 width: 17vw; 96 min-width: 0; 97 display: block; 98 99 @media (max-width: 820px) { 100 display: none; 101 } 102`,ue=f.div` 103 width: 6%; 104 flex-shrink: 0; 105 display: block; 106 107 @media (max-width: 820px) { 108 display: none; 109 } 110`,fe=f.div` 111 display: none; 112 width: 100%; 113 align-items: center; 114 115 @media (max-width: 820px) { 116 display: flex; 117 } 118`,pe=f(fe)` 119 border-bottom: 1px solid #ebebeb; 120 padding-bottom: 10px; 121 margin-bottom: 10px; 122 justify-content: flex-start; 123`,ge=f(fe)` 124 border-bottom: 1px solid #ebebeb; 125 padding-bottom: 10px; 126 margin-bottom: 10px; 127 border-top: 1px solid #ebebeb; 128 padding-top: 8px; 129 margin-top: 8px; 130 justify-content: space-between; 131`,he=f(fe)` 132 border-bottom: 1px solid #ebebeb; 133 padding-bottom: 10px; 134 margin-bottom: 10px; 135 border-top: 1px solid #ebebeb; 136 padding-top: 10px; 137 justify-content: center; 138`,me=f(fe)` 139 border-bottom: 1px solid #ebebeb; 140 padding-bottom: 10px; 141 margin-bottom: 10px; 142 border-top: 1px solid #ebebeb; 143 padding-top: 10px; 144 justify-content: center; 145`,be=f.div` 146 width: 17vw; 147 display: flex; 148 justify-content: center; 149 align-items: center; 150 151 @media (max-width: 820px) { 152 width: 100%; 153 padding-bottom: 12px; 154 justify-content: center; 155 text-align: center; 156 } 157`,ve=f.p` 158 font-size: 14px; 159 margin: 0; 160 color: #343d48; 161`,xe=f.p` 162 font-size: 14px; 163 font-weight: 700; 164 padding-top: 2px; 165 margin: 0; 166 color: #343d48; 167`,ye=f.p` 168 font-size: 12px; 169 font-weight: 500; 170 color: #686c71; 171 margin: 0; 172 padding-top: 2px; 173 max-width: 135px; 174 white-space: normal; 175 word-break: break-word; 176 text-transform: capitalize; 177`,_e=f(ve)` 178 font-weight: 600; 179`,we=f(_e)` 180 font-size: 20px; 181`,Se=f.img` 182 width: 18px; 183 margin-right: 5px; 184 flex-shrink: 0; 185`,De=f.button.attrs({type:"button"})` 186 color: #000000; 187 text-decoration: underline; 188 cursor: pointer; 189 font-size: 14px; 190 background: none; 191 border: none; 192 padding: 0; 193 font: inherit; 194 195 &:hover { 196 color: #377dff; 197 } 198 199 &:disabled { 200 color: #84898f; 201 cursor: not-allowed; 202 } 203`,ke=f.button.attrs({type:"button"})` 204 color: #377dff; 205 text-decoration: underline; 206 margin-left: 5rem; 207 white-space: nowrap; 208 background: none; 209 border: none; 210 font-size: 14px; 211 cursor: pointer; 212 padding: 0; 213 214 &:hover { 215 color: #0056b3; 216 } 217 218 &:disabled { 219 color: #84898f; 220 cursor: not-allowed; 221 } 222 223 @media (max-width: 820px) { 224 width: 100%; 225 margin-left: 0; 226 text-align: center; 227 } 228`,Ie=f.span` 229 font-size: 13px; 230 color: red; 231 display: inline-flex; 232 align-items: center; 233 gap: 4px; 234`,Ee=f.div` 235 display: flex; 236 flex-direction: column; 237 justify-content: center; 238 align-items: center; 239 padding: 30px 0 70px; 240 text-align: center; 241`,Ce=f.div` 242 display: flex; 243 align-items: center; 244 justify-content: center; 245`,Ne=new Set([6e4,60101,60001,50]),Ae=new Set([60002,60102]),Oe=new Set([60003,60103,60006]),Te=new Set([60100]);function je(e){const t=e.ArrangementID??e.ArrangementId;return t&&t>0?t:null}function Re(e){if(!e||0===e.length)return"";const t=new Set,n=[];for(const r of e){const e=(r.PortfolioName||r.PortfolioAlias).trim();t.has(e)||(t.add(e),n.push(e.toLowerCase()))}return n.join(", ")}const Pe={active:"Em Andamento",paid:"Quitadas",cancelled:"Cancelados",analysis:"Em Análise"}
245,Be=({arrangements:i,initialSubTab:s,customerInfo:l})=>{const c=d(),[u,f]=o(()=>s??"active"),[p,g]=o(null),[h,m]=o(null);a(()=>{s&&f(s)},[s]);const w=r(()=>{if(!i)return[];switch(u){case"active":return i.filter(e=>Ne.has(e.ArrangementStatus));case"paid":return i.filter(e=>Ae.has(e.ArrangementStatus));case"cancelled":return i.filter(e=>Oe.has(e.ArrangementStatus));case"analysis":return i.filter(e=>Te.has(e.ArrangementStatus));default:return[]}},[i,u]),S=e=>{const t=je(e);if(!t)return;localStorage.setItem("payment-description",e.ArrangementDescription||""),3===e.PaymentMethod&&localStorage.setItem("billetLine",e.BilletLine||""),11===e.PaymentMethod&&localStorage.setItem("qrCode",e.QrCode||e.QRCode||"");const n=y();c(n?`/home/acordo/${t}`:`/painel/acordo/${t}`)},D=e=>{je(e)&&g(e)},k=async e=>{if(e){if(A("payment","btn_copy_barcode"),"undefined"!=typeof navigator&&navigator.clipboard?.writeText)try{return void(await navigator.clipboard.writeText(e))}catch{return void O(e)}O(e)}},I=async e=>{const t=e.Debts?.[0]?.DebtID||e.DebtId||e.DebtID||0;if(t)try{const e=await _.post(`/debts/${t}/discharge/unified`,t,{responseType:"blob"}),n=new Blob([e.data],{type:"application/pdf"}),r=URL.createObjectURL(n),i=document.createElement("a");i.href=r,i.download=`carta-quitacao-${t}.pdf`,i.target="_blank",i.click(),URL.revokeObjectURL(r)}catch(n){console.error("Erro ao baixar carta de quitação:",n),((e,t)=>{window.__BUGSNAG__&&window.__BUGSNAG__.notify(e,e=>{t&&e.addMetadata("custom",t)})})(n instanceof Error?n:new Error("Erro ao baixar carta de quitação"),{debtId:String(t)})}},E=h?je(h):null;
245return t(n,{children:[t(ie,{children:[e(oe,{$active:"active"===u,onClick:()=>f("active"),...b({category:x.ACTION,type:v.PRIMARY,elementId:"Em andamento"}),children:"Em andamento"}),e(oe,{$active:"paid"===u,onClick:()=>f("paid"),...b({category:x.ACTION,type:v.PRIMARY,elementId:"Quitados"}),children:"Quitados"}),e(oe,{$active:"cancelled"===u,onClick:()=>f("cancelled"),...b({category:x.ACTION,type:v.PRIMARY,elementId:"Cancelados"}),children:"Cancelados"}),e(oe,{$active:"analysis"===u,onClick:()=>f("analysis"),...b({category:x.ACTION,type:v.PRIMARY,elementId:"Em análise"}),children:"Em análise"})]}),e(ae,{children:Pe[u]}),"cancelled"===u&&e(se,{children:"Acordos podem ser cancelados por solicitação da empresa ou por falta de pagamento."}),"analysis"===u&&e(se,{children:"Acordos em processo de análise ou revisão de exceção."}),0===w.length?t(Ee,{children:[e(Ce,{style:{marginBottom:"16px"},children:e("img",{src:"/assets/images/warning-2.png",alt:"",style:{width:"80px"},onError:e=>{e.currentTarget.style.display="none"}})}),e(Ce,{children:t("div",{children:[e("h3",{style:{fontSize:"18px",fontWeight:600,color:"#343d48",margin:"0 0 8px"},children:"Não há acordos"}),e("p",{style:{fontSize:"14px",color:"#84898f",margin:0},children:"No momento não identificamos nenhum acordo com os filtros aplicados."})]})})]}):w.map((r,i)=>{const o=je(r),a=r.Debts?.map(e=>e.DebtID).join("-")||r.DebtID||r.DebtId||r.BindingId||"sem-divida",s=[o??"sem-id",String(a),r.ArrangementDate||r.CreationDate||"sem-data",r.ArrangementAmount,i].join("|"),c=(r.Debts?.length??0)>1,d=r.Debts?.[0]?.ImageUri||r.ImageUri,f=r.BilletLine||"",p=r.Debts&&r.Debts.length>0?r.Debts:d?[{PortfolioAlias:r.PortfolioAlias||r.PortfolioName||"",ProductName:r.ProductName,ImageUri:d}]:[],g=function(e){const t=e?X(e):null;return Boolean(t&&t.getFullYear()>1)}(r.NextInstallmentDate)?r.NextInstallmentDate:void 0,h="paid"===u?r.CreationDate:"cancelled"===u?g:g||r.ArrangementDate||r.CreationDate,m="active"===u?"Pagamento":"Forma de pagamento";return t(le,{children:[e(ue,{children:e(G,{imgsList:p})}),e(de,{children:t(n,c?{children:[e(_e,{children:"Múltiplas DÃvidas"}),e(ye,{children:Re(r.Debts)})]}:{children:[e(_e,{children:r.Debts?.[0]?.PortfolioName||r.PortfolioName||r.Debts?.[0]?.PortfolioAlias||r.PortfolioAlias}),e(ye,{children:r.Debts?.[0]?.ProductName||r.ProductName})]})}),t(pe,{children:[e(G,{imgsList:p,style:{width:"20%"}}),e("div",{style:{marginLeft:"12px"},children:t(n,c?{children:[e(we,{children:"Múltiplas DÃvidas"}),e(ye,{children:Re(r.Debts)})]}:{children:[e(_e,{children:r.Debts?.[0]?.PortfolioName||r.PortfolioName||r.Debts?.[0]?.PortfolioAlias||r.PortfolioAlias}),e(ye,{children:r.Debts?.[0]?.ProductName||r.ProductName})]})})]}),t(ce,{children:[e(ve,{children:"Valor do acordo"}),e(xe,{children:P(r.ArrangementAmount)})]}),t(ce,{children:[e(ve,{children:"Data de Vencimento"}),e(xe,{children:h?Y(h):"-"})]}),t(ce,{children:[e(ve,{children:m}),e(xe,{children:r.ArrangementDescription||"-"})]}),t(de,{children:["active"===u&&3===r.PaymentMethod&&t("div",{style:{display:"flex",alignItems:"center",cursor:"pointer"},children:[e(Se,{src:"/assets/images/receive-square.svg",alt:""}),e(De,{disabled:!o,onClick:()=>S(r),...b({category:x.ACTION,type:v.PRIMARY,elementId:"Gerar segunda via boleto",contextId:l,contextData:o?String(o):""}),children:"Imprimir 2ª Via"})]}),"active"===u&&11===r.PaymentMethod&&t("div",{style:{display:"flex",alignItems:"center",cursor:"pointer"},children:[e(Se,{src:"/assets/images/pix-icon.svg",alt:""}),e(De,{disabled:!o,onClick:()=>D(r),...b({category:x.ACTION,type:v.PRIMARY,elementId:"Gerar código pix",contextId:l,contextData:o?String(o):""}),children:"Gerar código PIX"})]}),"paid"===u&&t("div",{style:{display:"flex",alignItems:"center",cursor:"pointer"},children:[e(Se,{src:"/assets/images/receive-square.svg",alt:""}),e(De,{onClick:()=>I(r),...b({category:x.SERVICE,type:v.PRIMARY,elementId:"carta_quitação",contextId:l,contextData:o?String(o):""}),children:"Carta de quitação"})]})]}),e(de,{children:"active"===u&&3===r.PaymentMethod&&t("div",{style:{display:"flex",alignItems:"center",gap:"4px"},children:[e("img",{src:"/assets/images/receive-square.svg",alt:"",style:{width:"18px",marginRight:"5px"}}),e(De,{onClick:()=>{k(f)},...b({category:x.ACTION,type:v.CLICK,elementId:"Copiar código boleto",contextId:l,contextData:o?String(o):""}),children:"Copiar código"})]})}),"active"===u&&t(ge,{children:[3===r.PaymentMethod&&t(n,{children:[t("div",{style:{display:"flex",alignItems:"center"},children:[e(Se,{src:"/assets/images/receive-square.svg",alt:""}),e(De,{disabled:!o,onClick:()=>S(r),...b({category:x.ACTION,type:v.PRIMARY,elementId:"Gerar segunda via boleto",contextId:l,contextData:o?String(o):""}),children:"Imprimir 2ª Via"})]}),t("div",{style:{display:"flex",alignItems:"center"},children:[e(Se,{src:"/assets/images/receive-square.svg",alt:""}),e(De,{onClick:()=>{k(f)},...b({category:x.ACTION,type:v.CLICK,elementId:"Copiar código boleto",contextId:l,contextData:o?String(o):""}),children:"Copiar código"})]})]}),11===r.PaymentMethod&&t("div",{style:{display:"flex",alignItems:"center"},children:[e(Se,{src:"/assets/images/pix-icon.svg",alt:""}),e(De,{disabled:!o,onClick:()=>D(r),...b({category:x.ACTION,type:v.PRIMARY,elementId:"Gerar código pix",contextId:l,contextData:o?String(o):""}),children:"Gerar código PIX"})]})]}),"paid"===u&&e(he,{children:t("div",{style:{display:"flex",alignItems:"center"},children:[e(Se,{src:"/assets/images/receive-square.svg",alt:""}),e(De,{onClick:()=>I(r),...b({category:x.SERVICE,type:v.PRIMARY,elementId:"carta_quitação",contextId:l,contextData:o?String(o):""}),children:"Carta de quitação"})]})}),"cancelled"===u&&e(me,{children:t(Ie,{children:[e("img",{src:"/assets/images/field-error.svg",alt:"",style:{width:"14px",height:"14px"}}),"Acordo vencido"]})}),e(be,{children:e(ke,{disabled:!o,onClick:()=>S(r),...b({category:x.ACTION,type:v.PRIMARY,elementId:"Ver Detalhes Acordo",contextId:l,contextData:o?String(o):""}),children:"Ver detalhes"})})]},s)}),e(C,{isOpen:null!==p,onConfirm:()=>{p&&je(p)&&(m(p),g(null))},onClose:()=>g(null),customerInfo:l,contextData:String(p?je(p)??"":"")}),h&&E&&e(N,{isOpen:null!==h,onClose:()=>m(null),arrangementId:E,installmentId:h.NextInstallmentID||0,installmentAmount:h.InstallmentAmount||0,initialQrCode:h.QrCode||h.QRCode||""})]})},$e=f.div` 246 position: relative; 247 display: inline-flex; 248 align-items: center; 249 cursor: pointer; 250 margin-left: 4px; 251 font-size: 14px; 252 &:hover > div { 253 display: block; 254 } 255`,Me=f.div` 256 display: none; 257 position: absolute; 258 left: calc(100% + 10px); 259 top: 50%; 260 transform: translateY(-50%); 261 background: #4d4d4d; 262 color: #fff; 263 border-radius: 8px; 264 padding: 10px; 265 font-size: 12px; 266 white-space: normal; 267 width: 250px; 268 z-index: 999; 269 box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1); 270 line-height: 1.5; 271 272 &::after { 273 content: ''; 274 position: absolute; 275 right: 100%; 276 top: 50%; 277 transform: translateY(-50%); 278 border-width: 8px; 279 border-style: solid; 280 border-color: transparent #4d4d4d transparent transparent; 281 } 282`,Le=f.section` 283 display: flex; 284 align-items: baseline; 285 margin-bottom: 10px; 286`,ze=f.span` 287 font-size: 14px; 288 color: #000000; 289 display: flex; 290 align-items: center; 291`,qe=f.span` 292 flex: 1; 293 border-bottom: 2px dashed #ebebeb; 294 margin: 0 6px; 295`,Fe=f.span` 296 font-size: 14px; 297 color: #000000; 298 white-space: nowrap; 299`,Ve=f.span` 300 font-size: 14px; 301 color: #00ba88; 302 white-space: nowrap; 303`,Ue=f.p` 304 font-weight: 700; 305 font-size: 22px; 306 line-height: 34px; 307 margin: 0; 308 white-space: nowrap; 309 color: #343d48; 310`,He=({totalWithoutDiscount:r,discountPercentage:i,totalValue:o})=>t(n,{children:[t(Le,{children:[e(ze,{children:"Valor sem desconto"}),e(qe,{}),e(Fe,{children:P(r)})]}),t(Le,{children:[t(ze,{children:["Desconto",t($e,{children:[e("img",{src:"/assets/images/info-circle.png",alt:"Informação sobre desconto",style:{width:"14px",height:"14px",marginLeft:"4px",verticalAlign:"middle"}}),e(Me,{children:"Conforme as normas de arredondamento, o valor do desconto aplicad
310o à dÃvida foi arredondado para o número inteiro mais próximo, resultando em um valor final aproximado."})]})]}),e(qe,{}),e(Ve,{children:i})]}),t(Le,{children:[e(ze,{children:"Valor total"}),e(qe,{}),e(Ue,{children:P(o)})]})]}),Ke=f.div` 311 margin-bottom: 20px; 312`,Ge=f.div` 313 display: flex; 314 align-items: center; 315 justify-content: space-between; 316 background-color: #f8f8f8; 317 border-radius: 10px; 318 padding: 12px 16px; 319 font-size: 14px; 320 cursor: pointer; 321 text-decoration: none; 322`,Xe=f.span` 323 flex: 5; 324 min-width: 0; 325 font-size: 14px; 326 color: #000000; 327 white-space: nowrap; 328 overflow: hidden; 329`,Ye=f.span` 330 flex: 3; 331 font-size: 14px; 332 color: #000000; 333 text-align: right; 334 white-space: nowrap; 335`,We=f.span` 336 flex: 3; 337 font-size: 14px; 338 color: #00ba88; 339 text-align: right; 340 white-space: nowrap; 341`,Je=f.span` 342 flex: 1; 343 display: flex; 344 align-items: center; 345 justify-content: flex-end; 346`,Qe=f.div` 347 padding: 14px 16px 4px; 348`,Ze=f.div` 349 display: flex; 350 351 > div { 352 flex: 1 1 0; 353 min-width: 0; 354 font-size: 14px; 355 color: #343d48; 356 padding-right: 8px; 357 word-break: break-word; 358 } 359`,et=f(Ze)` 360 margin-top: 2px; 361 362 > div { 363 font-weight: 700; 364 } 365`,tt=f.div` 366 height: 28px; 367`,nt=({debt:n,isExpanded:r,onToggleExpand:i,customerInfo:o})=>t(Ke,{children:[t(Ge,{onClick:i,...b({category:x.ACTION,type:v.CLICK,elementId:"Abrir dÃvida",contextId:o,contextData:`debt_id=${n.DebtId}|binding_id=${n.BindingId}`,channel:w.NEGOTIATION}),children:[e(Xe,{children:n.PortfolioGroupName}),e(Ye,{children:P(n.OfferCurrentBalance)}),e(We,{children:Q(n.OfferDiscount)}),e(Je,{children:e("img",{src:"/assets/images/arrow.png",alt:r?"Fechar":"Abrir",style:{height:"6px"}})})]}),r&&t(Qe,{children:[t(Ze,{children:[e("div",{children:"Nº do contrato"}),e("div",{children:"Origem"}),e("div",{children:"Data de atraso"})]}),t(et,{children:[e("div",{children:n.DebtNumber}),e("div",{children:n.PicPortfolioName}),e("div",{children:Y(n.FirstDefaultDate)})]}),e(tt,{}),t(Ze,{children:[e("div",{children:"Tempo de atraso"}),e("div",{children:"Valor original"}),e("div",{children:"Valor atual"})]}),t(et,{children:[e("div",{children:J(n.FirstDefaultDate)}),e("div",{children:P(n.InitialBalance)}),e("div",{children:P(n.DebtTotalBalance)})]})]})]}),rt=f.div` 368 position: fixed; 369 top: 0; 370 left: 0; 371 width: 100%; 372 height: 100%; 373 background: rgba(0, 0, 0, 0.5); 374 display: flex; 375 align-items: center; 376 justify-content: center; 377 z-index: 9999; 378`,it=f.div` 379 background: #ffffff; 380 border-radius: 15px; 381 width: 90%; 382 max-width: 500px; 383 padding: 40px; 384 position: relative; 385 font-family: 'IBM Plex Sans', sans-serif; 386 max-height: 90vh; 387 overflow-y: auto; 388`,ot=f.div` 389 display: flex; 390 justify-content: space-between; 391 align-items: center; 392 margin-bottom: 16px; 393`,at=f.h3` 394 font-size: 20px; 395 font-weight: 700; 396 color: #343d48; 397 margin: 0; 398`,st=f.button` 399 background: none; 400 border: none; 401 font-size: 20px; 402 color: #84898f; 403 cursor: pointer; 404 padding: 4px 8px; 405 line-height: 1; 406 407 &:hover { 408 color: #343d48; 409 } 410`,lt=f.hr` 411 border: none; 412 border-top: 1px solid #ebebeb; 413 margin: 0 0 24px 0; 414`,ct=f.div` 415 display: flex; 416 justify-content: space-between; 417 align-items: center; 418 background: #f8f8f8; 419 border-radius: 13px; 420 padding: 12px 16px; 421 margin-bottom: 12px; 422`,dt=f.p` 423 font-size: 14px; 424 color: #343d48; 425 margin: 0; 426`,ut=f.p` 427 font-size: 14px; 428 font-weight: 700; 429 color: #343d48; 430 margin: 0; 431 text-align: right; 432`,ft=f.button` 433 display: block; 434 width: 80%; 435 margin: 40px auto 0; 436 background-color: #377dff; 437 border: none; 438 border-radius: 12px; 439 padding: 12px 24px; 440 color: #ffffff; 441 font-size: 14px; 442 font-weight: 600; 443 cursor: pointer; 444 transition: background-color 0.2s; 445 446 &:hover { 447 background-color: #2a6ae0; 448 } 449`,pt=({isOpen:n,debt:r,onClose:i})=>{const o=s();if(a(()=>{if(!n)return;const e=e=>{"Escape"===e.key&&i()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[n,i]),!n||!r)return null;const l=Y(r.FirstDefaultDate);return e(rt,{onClick:e=>{e.target===e.currentTarget&&i()},children:t(it,{role:"dialog","aria-modal":"true","aria-labelledby":o,children:[t(ot,{children:[e(at,{id:o,children:"Detalhes"}),e(st,{onClick:i,"aria-label":"Fechar",children:"â"})]}),e(lt,{}),t(ct,{children:[e(dt,{children:"Origem:"}),e(ut,{children:r.PortfolioName})]}),t(ct,{children:[e(dt,{children:"Produto:"}),e(ut,{children:r.ProductName})]}),t(ct,{children:[e(dt,{children:"Nº do contrato:"}),e(ut,{children:r.DebtNumber})]}),t(ct,{children:[e(dt,{children:"Tempo de atraso:"}),e(ut,{children:J(r.FirstDefaultDate)})]}),t(ct,{children:[e(dt,{children:"Data do atraso:"}),e(ut,{children:l||"-"})]}),e(ft,{onClick:i,children:"Fechar"})]})})},gt=f.div` 450 display: flex; 451 align-items: center; 452 margin-bottom: 10px; 453 454 @media (max-width: 820px) { 455 flex-direction: column; 456 align-items: flex-start; 457 } 458`,ht=f.div` 459 display: flex; 460 align-items: center; 461 flex-shrink: 0; 462`,mt=f.label` 463 display: none; 464 padding-left: 10px; 465 font-size: 14px; 466 color: #343d48; 467 margin-bottom: 0; 468 469 @media (max-width: 820px) { 470 display: block; 471 } 472`,bt=f.input` 473 width: 17px; 474 height: 42px; 475 accent-color: #377dff; 476 cursor: pointer; 477 flex-shrink: 0; 478 border: 0; 479 box-sizing: border-box; 480`,vt=f.div` 481 border: 1px solid #ebebeb; 482 border-radius: 15px; 483 width: 95%; 484 margin-left: 20px; 485 padding: 10px 15px; 486 min-width: 0; 487 488 @media (max-width: 820px) { 489 margin: 0; 490 width: 100%; 491 height: 230px; 492 } 493`,xt=f.div` 494 display: flex; 495 align-items: center; 496 justify-content: space-between; 497 width: 100%; 498 499 @media (max-width: 820px) { 500 display: none; 501 } 502`,yt=f.div` 503 display: none; 504 505 @media (max-width: 820px) { 506 display: block; 507 } 508`,_t=f.div` 509 width: 50px; 510 height: 50px; 511 border-radius: 10px; 512 background: #fff; 513 display: flex; 514 align-items: center; 515 justify-content: center; 516 overflow: hidden; 517 margin-right: 12px; 518 flex-shrink: 0; 519 520 img { 521 width: 50px; 522 height: 50px; 523 object-fit: contain; 524 border-radius: 10px; 525 } 526 527 span { 528 font-size: 20px; 529 color: #999; 530 font-weight: 600; 531 } 532`,wt=f.div` 533 flex: 1.5; 534 min-width: 0; 535 padding-right: 8px; 536`,St=f.div` 537 flex: 1; 538 min-width: 0; 539 padding-left: 0; 540`,Dt=f.div` 541 flex: 1; 542 display: flex; 543 justify-content: flex-end; 544 align-items: center; 545`,kt=f.p` 546 font-size: 14px; 547 color: #343d48; 548 margin: 0; 549`,It=f.p` 550 font-size: 14px; 551 font-weight: 700; 552 color: #343d48; 553 margin: 0; 554 padding-top: 2px; 555 white-space: nowrap; 556 overflow: hidden; 557`,Et=f.p` 558 font-size: 12px; 559 font-weight: 500; 560 color: #b2bac4; 561 margin: 0; 562 text-transform: capitalize; 563`,Ct=f.p` 564 font-size: 14px; 565 font-weight: 700; 566 color: #00ba88; 567 margin: 0; 568 padding-top: 2px; 569`,Nt=f.button.attrs({type:"button"})` 570 font-size: 13px; 571 color: #377dff; 572 cursor: pointer; 573 text-decoration: underline; 574 white-space: nowrap; 575 background: none; 576 border: none; 577 padding: 0; 578 font: inherit; 579 580 &:hover { 581 opacity: 0.8; 582 } 583`,At=f.div` 584 display: flex; 585 align-items: center; 586 justify-content: space-between; 587 margin-bottom: 6px; 588`,Ot=f.p` 589 font-size: 14px; 590 color: #343d48; 591 margin: 0; 592 flex: 1; 593`,Tt=f.p` 594 font-size: 14px; 595 font-weight: 700; 596 color: #343d48; 597 margin: 0; 598 text-align: right; 599 flex: 1; 600`,jt=f.p` 601 font-size: 14px; 602 font-weight: 700; 603 color: #00ba88; 604 margin: 0; 605 text-align: right; 606 flex: 1; 607`,Rt=f.div` 608 display: flex; 609 align-items: center; 610 margin-bottom: 14px; 611`,Pt=f.div` 612 flex: 0 0 25%; 613 614 img { 615 width: 50px; 616 height: 50px; 617 object-fit: contain; 618 border-radius: 10px; 619 background: #fff; 620 } 621`,Bt=f.div` 622 flex: 1; 623 min-width: 0; 624`,$t=f.hr` 625 border: none; 626 border-top: 1px solid #ebebeb; 627 margin: 10px 0; 628`,Mt=f.div` 629 display: flex; 630 justify-content: center; 631 margin-top: 20px; 632`,Lt=f.div` 633 position: relative; 634 display: inline-flex; 635 align-items: center; 636 cursor: help; 637 font-size: 14px; 638 &:hover > div { 639 display: block; 640 } 641`,zt=f.div` 642 display: none; 643 position: absolute; 644 bottom: 100%; 645 left: 50%; 646 transform: translateX(-50%); 647 background: #ffffff; 648 border: 1px solid #ebebeb; 649 border-radius: 8px; 650 padding: 10px 14px; 651 font-size: 12px; 652 color: #343d48; 653 white-space: nowrap; 654 box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); 655 z-index: 100; 656 margin-bottom: 6px;
657`,qt=f.span` 658 display: flex; 659 align-items: center; 660 justify-content: center; 661 width: 18px; 662 height: 18px; 663 flex-shrink: 0; 664 font-size: 14px; 665 cursor: help; 666`,Ft=f.div` 667 width: 100%; 668 background-color: #fff3cd; 669 border: 1px solid #ffc107; 670 border-radius: 8px; 671 padding: 10px 14px; 672 margin-top: 8px; 673 font-size: 13px; 674 color: #343d48; 675 line-height: 1.4; 676 677 strong { 678 color: #d63384; 679 } 680`,Vt=l(function({debt:n,isSelected:r,isSelectable:i,nonNegotiable:o,opacity:a,customerInfo:s,onToggle:l,onViewDetails:c}){return t(gt,{children:[t(ht,{children:[e(bt,{type:"checkbox",id:`checkbox-item-${n.DebtId}`,checked:r,disabled:!i,onChange:()=>l(n),style:{opacity:i?1:.4},...b({category:x.ACTION,type:v.CLICK,elementId:"DÃvida selecionada",contextId:s,contextData:`debt_id=${n.DebtId}|binding_id=${n.BindingId}`,channel:w.NEGOTIATION})}),!i&&t(Lt,{children:[e("img",{src:"/assets/images/info-circle-red.svg",alt:"",style:{width:"16px",marginLeft:"2px"}}),e(zt,{children:o?"Esta dÃvida não está disponÃvel para negociação.":"Não é possÃvel selecionar dÃvidas de credores diferentes ao mesmo tempo."})]}),e(mt,{htmlFor:`checkbox-item-${n.DebtId}`,children:"Selecionar"})]}),t(vt,{style:{opacity:a},children:[t(xt,{children:[e(_t,{children:e("img",{src:n.ImageUri?n.ImageUri:"/assets/images/error.jpg",alt:n.PortfolioName,onError:e=>{-1===e.currentTarget.src.indexOf("/assets/images/error.jpg")&&(e.currentTarget.src="/assets/images/error.jpg")}})}),t(wt,{children:[t(It,{className:"bold portlfolio-name",children:[n.PortfolioGroupName,n.HasLegalClaim?t(Lt,{style:{marginLeft:"6px"},children:[e(qt,{title:"Esta dÃvida possui processo ativo",children:e("img",{src:"/assets/images/info-circle-red.svg",alt:"",style:{width:"16px"}})}),e(zt,{children:"Esta dÃvida possui processo ativo"})]}):null]}),e(Et,{children:n.ProductName?.toLowerCase()})]}),t(St,{children:[e(kt,{children:"Valor atual"}),e(It,{children:P(n.DebtTotalBalance)})]}),t(St,{children:[e(kt,{children:"Valor da oferta"}),e(It,{children:P(n.OfferCurrentBalance)})]}),t(St,{children:[t(kt,{style:{display:"flex",alignItems:"center"},children:["Desconto",t($e,{children:[e("img",{src:"/assets/images/info-circle.png",alt:"",style:{width:"14px",height:"14px",marginLeft:"4px",marginBottom:"2px"}}),e(Me,{children:"Conforme as normas de arredondamento, o valor do desconto aplicado à dÃvida foi arredondado para o número inteiro mais próximo, resultando em um valor final aproximado."})]})]}),e(Ct,{children:Q(n.OfferDiscount)})]}),e(Dt,{children:e(Nt,{onClick:()=>c(n),...b({category:x.ACTION,type:v.CLICK,elementId:"Ver detalhe",contextId:s,contextData:`debt_id=${n.DebtId}|binding_id=${n.BindingId}`,channel:w.NEGOTIATION}),children:"Ver detalhes"})})]}),o&&t(Ft,{children:[e("strong",{children:"ATENÃÃO!"})," Esta dÃvida possui processo jurÃdico e não poderá ser negociada no momento. Para mais informações, entre em contato pelo telefone/whatsapp 0800 025 0000."]}),t(yt,{children:[t(Rt,{children:[e(Pt,{children:e("img",{src:n.ImageUri?n.ImageUri:"/assets/images/error.jpg",alt:n.PortfolioName,onError:e=>{-1===e.currentTarget.src.indexOf("/assets/images/error.jpg")&&(e.currentTarget.src="/assets/images/error.jpg")}})}),t(Bt,{children:[t(It,{children:[n.PortfolioGroupName,n.HasLegalClaim?e("span",{style:{color:"#f5a623",marginLeft:"5px"},children:"â"}):null]}),e(Et,{children:n.ProductName})]})]}),e($t,{}),o&&t(Ft,{children:[e("strong",{children:"ATENÃÃO!"})," Esta dÃvida possui processo jurÃdico e não poderá ser negociada no momento. Para mais informações, entre em contato pelo telefone/whatsapp 0800 025 0000."]}),t(At,{children:[e(Ot,{children:"Valor atual"}),e(Tt,{children:P(n.DebtTotalBalance)})]}),t(At,{children:[e(Ot,{children:"Valor da oferta"}),e(Tt,{children:P(n.OfferCurrentBalance)})]}),t(At,{children:[e(Ot,{children:"Desconto"}),e(jt,{children:Q(n.OfferDiscount)})]}),e($t,{}),e(Mt,{children:e(Nt,{onClick:()=>c(n),...b({category:x.ACTION,type:v.CLICK,elementId:"Ver detalhe",contextId:s,contextData:`debt_id=${n.DebtId}|binding_id=${n.BindingId}`,channel:w.NEGOTIATION}),children:"Ver detalhes"})})]})]})]})}),Ut=f.div` 681 display: flex; 682 justify-content: space-between; 683 align-items: center; 684 padding: 20px 15px 20px 0; 685`,Ht=f.h3` 686 font-family: 'IBM Plex Sans', sans-serif; 687 font-size: 32px; 688 color: #343d48; 689 margin: 0; 690 font-weight: 900; 691`,Kt=f.div` 692 display: flex; 693`,Gt=f.button` 694 background-color: ${e=>e.$active?"#377DFF":"#FFF"}; 695 color: ${e=>
695e.$active?"#ffffff":"#377DFF"}; 696 font-size: 14px; 697 font-weight: ${e=>e.$active?"600":"400"}; 698 padding: 12px 20px; 699 border: 1px solid #377dff; 700 cursor: pointer; 701 line-height: 1; 702 border-radius: ${e=>"left"===e.$position?"11px 0 0 11px":"0 11px 11px 0"}; 703 transition: all 0.15s ease; 704 705 &:hover { 706 opacity: 0.9; 707 } 708`,Xt=({title:n,activeTab:r,onTabChange:i,debtsApolloAttrs:o,agreementsApolloAttrs:a})=>t(Ut,{children:[e(Ht,{children:n}),t(Kt,{children:[e(Gt,{$active:"debts"===r,$position:"left",onClick:()=>i("debts"),...o,children:"DÃvidas"}),e(Gt,{$active:"agreements"===r,$position:"right",onClick:()=>i("agreements"),...a,children:"Acordos"})]})]}),Yt=f.div` 709 flex: 0 0 ${e=>e.$full?"100%":"66.666%"}; 710 max-width: ${e=>e.$full?"100%":"66.666%"}; 711 padding: 0 0 16px 48px; 712 overflow-y: auto; 713 max-height: calc(100vh - 90px); 714 715 &::-webkit-scrollbar { 716 width: 7px; 717 } 718 &::-webkit-scrollbar-track { 719 background: #f1f1f1; 720 } 721 &::-webkit-scrollbar-thumb { 722 background: #ced0d1; 723 border-radius: 3px; 724 } 725 &::-webkit-scrollbar-thumb:hover { 726 background: #888; 727 } 728 729 @media (max-width: 820px) { 730 flex: 0 0 100%; 731 max-width: 100%; 732 padding: 15px; 733 padding-bottom: 294px; 734 max-height: 100%; 735 overflow-y: visible; 736 } 737`,Wt=f.div` 738 display: flex; 739 align-items: center; 740 position: sticky; 741 top: 0; 742 background: white; 743 z-index: 999; 744 padding: 8px 0; 745 margin-bottom: 8px; 746`,Jt=f.input` 747 width: 17px; 748 height: 42px; 749 accent-color: #377dff; 750 cursor: pointer; 751 flex-shrink: 0; 752 border: 0; 753 box-sizing: border-box; 754`,Qt=f.label` 755 margin-left: 25px; 756 position: relative; 757 bottom: 15px; 758 margin-top: 20px; 759 font-size: 14px; 760 color: #343d48; 761 cursor: pointer; 762 margin-bottom: 0; 763 764 @media (max-width: 820px) { 765 margin-left: 10px; 766 } 767`,Zt=f.div` 768 position: relative; 769 display: inline-flex; 770 align-items: center; 771 cursor: help; 772 font-size: 14px; 773 &:hover > div { 774 display: block; 775 } 776`,en=f.div` 777 display: none; 778 position: absolute; 779 bottom: 100%; 780 left: 50%; 781 transform: translateX(-50%); 782 background: #ffffff; 783 border: 1px solid #ebebeb; 784 border-radius: 8px; 785 padding: 10px 14px; 786 font-size: 12px; 787 color: #343d48; 788 white-space: nowrap; 789 box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); 790 z-index: 100; 791 margin-bottom: 6px; 792`,tn=f.button` 793 display: block; 794 width: 100%; 795 padding: 12px; 796 margin-top: 16px; 797 background: none; 798 border: 1px solid #377dff; 799 border-radius: 10px; 800 color: #377dff; 801 font-size: 14px; 802 font-weight: 600; 803 cursor: pointer; 804 &:hover { 805 background-color: #f0f5ff; 806 } 807`,nn=f.div` 808 display: flex; 809 flex-direction: column; 810 justify-content: center; 811 align-items: center; 812 padding: 50px 0 40px 0; 813 text-align: center; 814`,rn=f.div` 815 display: flex; 816 align-items: center; 817 justify-content: center; 818`,on=f.h3` 819 font-size: 1.75rem; 820 font-weight: 500; 821 line-height: 1.2; 822 margin: 0 0 0.5rem 0; 823 color: #343d48; 824`,an=f.p` 825 font-size: 1rem; 826 margin: 0; 827 color: #343d48; 828`,sn=l(function({activeTab:r,onTabChange:i,debtsApolloAttrs:o,agreementsApolloAttrs:a,debts:s,slicedList:l,visibleCount:c,selectedDebts:d,selectedBusinessUnitID:u,allChecked:f,availableForSelection:p,isAllSameBusinessUnit:g,customerInfo:h,canSelectDebt:m,isDebtEligible:b,onSelectAll:v,onDebtToggle:x,onShowMore:y,onViewDetails:_}){return t(Yt,{$full:0===s.length,children:[e(Xt,{title:"DÃvidas",activeTab:r,onTabChange:i,debtsApolloAttrs:o,agreementsApolloAttrs:a}),0===s.length?t(nn,{children:[e(rn,{children:e("img",{src:"/assets/images/warning-2.png",alt:""})}),e(rn,{children:t("div",{style:{padding:"0 0 20%"}
828,children:[e(on,{children:"Não há dÃvidas pendentes"}),e(an,{children:"Não identificamos dÃvidas pendentes para o seu usuário."})]})})]}):t(n,{children:[t(Wt,{children:[e(Jt,{type:"checkbox",id:"selectAll",checked:f,disabled:!g||0===p.length,onChange:e=>v(e.target.checked),style:{opacity:g?1:.4}}),t(Qt,{htmlFor:"selectAll",style:{opacity:g?1:.2},children:["Selecionar ",d.length," de"," ",p.length," dÃvidas"]}),!g&&t(Zt,{children:[e(B,{name:"warning",size:16,color:"#f5a623"}),e(en,{children:"Não é possÃvel selecionar dÃvidas de credores diferentes ao mesmo tempo."})]})]}),l.map(t=>{const n=b(t),r=m(t),i=d.some(e=>e.DebtId===t.DebtId),o=!n,a=null!==u&&t.BusinessUnitID!==u;return e(Vt,{debt:t,isSelected:i,isSelectable:r,nonNegotiable:o,opacity:o?.5:a?.4:1,customerInfo:h,onToggle:x,onViewDetails:_},t.DebtId)}),c<s.length&&t(tn,{onClick:y,children:["Ver mais (",s.length-c," restantes)"]})]})]})}),ln=p` 829 0% { background-position: 200% 0; } 830 100% { background-position: -200% 0; } 831`,cn=f.div` 832 background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%); 833 background-size: 200% 100%; 834 animation: ${ln} 1.5s infinite; 835 border-radius: 6px; 836 width: ${({$width:e})=>e||"100%"}; 837 height: ${({$height:e})=>e||"16px"}; 838`,dn=f.div` 839 background: #ffffff; 840 border: 1px solid #ebebeb; 841 border-radius: 10px; 842 padding: 16px; 843 margin-bottom: 12px; 844 display: flex; 845 justify-content: space-between; 846 align-items: center; 847`,un=()=>t(n,{children:[t(dn,{children:[e(cn,{$width:"120px",$height:"14px"}),t("div",{style:{display:"flex",gap:"8px"},children:[e(cn,{$width:"80px",$height:"14px"}),e(cn,{$width:"50px",$height:"14px"})]})]}),t(dn,{children:[e(cn,{$width:"100px",$height:"14px"}),t("div",{style:{display:"flex",gap:"8px"},children:[e(cn,{$width:"80px",$height:"14px"}),e(cn,{$width:"50px",$height:"14px"})]})]}),t(dn,{children:[e(cn,{$width:"140px",$height:"14px"}),t("div",{style:{display:"flex",gap:"8px"},children:[e(cn,{$width:"80px",$height:"14px"}),e(cn,{$width:"50px",$height:"14px"})]})]}),t("div",{style:{borderTop:"1px solid #ebebeb",paddingTop:"16px",marginTop:"16px"},children:[t("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:"10px"},children:[e(cn,{$width:"120px",$height:"14px"}),e(cn,{$width:"90px",$height:"14px"})]}),t("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:"10px"},children:[e(cn,{$width:"80px",$height:"14px"}),e(cn,{$width:"60px",$height:"14px"})]}),t("div",{style:{display:"flex",justifyContent:"space-between"},children:[e(cn,{$width:"90px",$height:"18px"}),e(cn,{$width:"110px",$height:"18px"})]})]}),e(cn,{$width:"100%",$height:"48px",style:{marginTop:"16px",borderRadius:"10px"}})]}),fn=f.div` 848 display: flex; 849 align-items: center; 850 justify-content: space-between; 851 background: #f8f8f8; 852 padding: 19px 20px; 853 border-radius: 10px; 854 margin-top: 20px; 855 cursor: pointer; 856`,pn=f.span` 857 font-size: 14px; 858 font-weight: 600; 859 color: #343d48; 860 cursor: pointer; 861`,gn=f.div` 862 position: absolute; 863 left: -37%; 864 top: 20px; 865 z-index: 1000; 866 background: #ffffff; 867 border: 1px solid #ffffff; 868 border-radius: 12px; 869 box-shadow: 0px 4px 40px 0px rgba(0, 0, 0, 0.2); 870 padding: 0; 871 width: fit-content; 872 overflow: visible; 873 874 @media (max-width: 820px) { 875 left: 50%; 876 transform: translateX(-50%); 877 top: 100%; 878 } 879 880 @media (max-width: 480px) { 881 position: fixed; 882 left: 50%; 883 top: 50%; 884 transform: translate(-50%, -50%); 885 max-width: calc(100vw - 16px); 886 box-shadow: 0px 8px 40px 0px rgba(0, 0, 0, 0.35); 887 border-radius: 16px; 888 z-index: 9999; 889 } 890`,hn=f.div` 891 position: relative; 892 margin-bottom: 12px; 893 padding: 0 16px; 894`,mn=f.span` 895 font-size: 14px; 896 color: #343d48; 897 display: flex; 898 align-items: center; 899 gap: 8px; 900`,bn=f.div` 901 display: flex; 902 align-items: center; 903 font-size: 13px; 904 color: red; 905 width: 100%; 906 margin-bottom: 20px; 907`,vn=f.div` 908 display: none; 909 position: fixed; 910 inset: 0; 911 z-index: 9998; 912 background: rgba(0, 0, 0, 0.3); 913 914 @media (max-width: 480px) { 915 display: block; 916 } 917`,xn=({selectedDate:r,minDate:i,maxDate:o,isDateDisabled:a,isCalendarOpen:s,mobile:l=!1,dateLabel:c,warningMessage:d,onToggleCalendar:u,onCloseCalendar:f,onDateSelect:p})=>{return t(n,{children:[t(hn,{"data-calendar-container":!0,style:l?{padding:0,marginBottom:0}:void 0,children:[t(fn,{onClick:u,style:l?{marginTop:0}:void 0,children:[t(mn,{children:[e("img",{src:"/assets/images/icon-calendar.png",alt:"",style:{width:"auto",height:"16px",marginBottom:"5px",marginRight:"8px"}}),c]}),e(pn,{children:(g=r,`${String(g.getDate()).padStart(2,"0")}/${String(g.getMonth()+1).padStart(2,"0")}`)})]}),s&&t(n,{children:[e(vn,{onClick:f}),e(gn,{children:e(j,{selectedDate:r,minDate:i,maxDate:o,isDateDisabled:a,onDateSelect:p})})]})]}),t(bn,{children:[e("img",{src:"/assets/images/field-error.svg",alt:"",style:{width:"auto",height:"14px",marginBottom:"4px",marginRight:"4px",flexShrink:0}}),d]})]});var g};function yn(e,t="Formato de lista inválido na resposta"){if(Array.isArray(e))return e;if(null!==e&&"object"==typeof e&&Array.isArray(e.Items))return e.Items;throw new Error(t)}function _n(){const e=$({queryKey:["arrangements-unified"],queryFn:async()=>yn((await _.get("/arrangements/unified")).data,"Formato inválido na resposta de acordos"),refetchInterval:e=>{const t=M();return!!t&&(!L(e.state.data,t.id)&&(!(Date.now()-t.startedAt>=15e3)&&2e3))}});return a(()=>{const t=M();if(!t)return;const n=L(e.data,t.id),r=Date.now()-t.startedAt>=15e3;
917(n||r)&&function(){try{sessionStorage.removeItem(m)}catch{}}()},[e.data]),e}function wn(e,t){const n=W(t).replace(/-/g,"/");return $({queryKey:["offers",e,n],queryFn:async()=>{if(0===e.length)return null;const t=new URLSearchParams;t.append("date",n),e.forEach(e=>t.append("debtIds",String(e)));return(await _.get(`/debts/listoffers?${t.toString()}`)).data},enabled:e.length>0})}const Sn=f.div` 918 display: flex; 919 background-color: #ffffff; 920 font-family: 'IBM Plex Sans', sans-serif; 921 width: 100%; 922 923 @media (max-width: 820px) { 924 flex-direction: column; 925 } 926`,Dn=f.div` 927 width: 100%; 928 padding: 18px; 929 font-family: 'IBM Plex Sans', sans-serif; 930 background-color: #ffffff; 931 min-height: calc(100vh - 266px); 932`,kn=f.div` 933 flex: 0 0 33.333%; 934 max-width: 33.333%; 935 border-left: 1px solid #ebebeb; 936 background: white; 937 padding: 20px 10px; 938 position: sticky; 939 top: 0; 940 941 &::-webkit-scrollbar { 942 width: 7px; 943 } 944 &::-webkit-scrollbar-track { 945 background: #f1f1f1; 946 } 947 &::-webkit-scrollbar-thumb { 948 background: #ced0d1; 949 border-radius: 3px; 950 } 951 952 @media (max-width: 820px) { 953 flex: 0 0 100%; 954 max-width: 100%; 955 border-left: none; 956 border-top: 1px solid #ebebeb; 957 position: static; 958 height: auto; 959 display: none; 960 } 961`,In=f.h3` 962 font-family: 'IBM Plex Sans Bold', sans-serif; 963 font-size: 32px; 964 color: #343d48; 965 margin: 0 0 8px 0; 966 font-weight: 900; 967 padding: 0 16px; 968 969 @media (max-width: 820px) { 970 font-size: 24px; 971 } 972`,En=f.p` 973 font-size: 14px; 974 color: #84898f; 975 margin: 0 0 20px 0; 976 padding: 0 16px; 977`,Cn=f.div` 978 padding: 0 16px; 979`,Nn=f.h4` 980 font-size: 24px; 981 font-weight: 600; 982 color: #343d48; 983 margin: 0 0 8px 0; 984 font-family: 'IBM Plex Sans', sans-serif; 985`,An=f.p` 986 font-size: 14px; 987 color: #343d48; 988 margin: 0; 989`,On=f.div` 990 width: 100%; 991 padding: 0 16px; 992`,Tn=f.hr` 993 border: none; 994 border-top: 1px solid #ebebeb; 995 margin: 16px; 996`,jn=f.div` 997 overflow-y: auto; 998 max-height: calc(100vh - 480px); 999 padding: 0 16px; 1000 1001 &::-webkit-scrollbar {
1002 width: 7px; 1003 } 1004 &::-webkit-scrollbar-track { 1005 background: #f1f1f1; 1006 } 1007 &::-webkit-scrollbar-thumb { 1008 background: #ced0d1; 1009 border-radius: 3px; 1010 } 1011 &::-webkit-scrollbar-thumb:hover { 1012 background: #888; 1013 } 1014 1015 @media (max-width: 820px) { 1016 max-height: 30vh; 1017 } 1018`,Rn=f.button` 1019 width: 100%; 1020 padding: 10px 15px; 1021 background-color: #377dff; 1022 color: #ffffff; 1023 border: none; 1024 border-radius: 12px; 1025 font-size: 18px; 1026 font-weight: 500; 1027 cursor: pointer; 1028 display: flex; 1029 align-items: center; 1030 justify-content: space-between; 1031 transition: background-color 0.2s ease; 1032 &:hover { 1033 background-color: #2a5dbb; 1034 } 1035 &:disabled { 1036 background-color: #b2bac4; 1037 border-color: #b2bac4; 1038 cursor: not-allowed; 1039 } 1040`,Pn=()=>t("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",focusable:"false",style:{flexShrink:0},children:[e("path",{d:"M4 12h14"}),e("path",{d:"M12.5 5.5 19 12l-6.5 6.5"})]}),Bn=f.div` 1041 display: none; 1042 1043 @media (max-width: 820px) { 1044 display: block; 1045 } 1046`,$n=f.div` 1047 width: 100vw; 1048 height: 100vh; 1049 background-color: #ffffff; 1050 position: fixed; 1051 left: 0; 1052 overflow: visible; 1053 top: ${e=>e.$full?"12%":"90%"}; 1054 z-index: 999; 1055 border-top-right-radius: 20px; 1056 border-top-left-radius: 20px; 1057 box-shadow: 0px 4px 40px 0px rgba(0, 0, 0, 0.2); 1058 transition: top 500ms; 1059 1060 &::after { 1061 content: ''; 1062 width: 100px; 1063 height: 4px; 1064 border-radius: 10px; 1065 background-color: #ebebeb; 1066 position: absolute; 1067 top: 15px; 1068 left: calc((100% - 100px) / 2); 1069 } 1070`,Mn=f.div` 1071 padding-top: 30px; 1072 height: 95%; 1073 box-sizing: border-box; 1074 overflow-y: auto; 1075 -webkit-overflow-scrolling: touch; 1076`,Ln=f.div` 1077 padding: 0 16px 32px; 1078`,zn=f.button` 1079 width: 100%; 1080 margin-bottom: 1rem; 1081 padding: 10px 15px; 1082 border-radius: 12px; 1083 border: none; 1084 font-size: 14px; 1085 font-weight: 500; 1086 text-align: center; 1087 display: flex; 1088 align-items: center; 1089 justify-content: center; 1090 color: #ffffff; 1091 cursor: ${e=>e.$disabled?"not-allowed":"pointer"}; 1092 background-color: ${e=>e.$disabled?"#b2bac4":"#377dff"}; 1093 1094 &:hover { 1095 background-color: ${e=>e.$disabled?"#b2bac4":"#2a5dbb"}; 1096 } 1097`,qn=f.div` 1098 position: relative; 1099 background-color: #4d4d4d; 1100 color: #ffffff; 1101 text-align: left; 1102 border-radius: 8px; 1103 padding: 10px; 1104 margin-bottom: 8px; 1105 font-size: 13px; 1106 box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1); 1107 1108 &::after { 1109 content: ''; 1110 position: absolute; 1111 top: 100%; 1112 left: 50%; 1113 transform: translateX(-50%); 1114 border-width: 10px; 1115 border-style: solid; 1116 border-color: #4d4d4d transparent transparent transparent; 1117 } 1118`,Fn=f.div` 1119 display: flex; 1120 justify-content: center; 1121 align-items: center; 1122 position: relative; 1123`,Vn=f.button` 1124 position: absolute; 1125 top: 0; 1126 left: 0; 1127 z-index: 999999; 1128 background-color: #ebebeb; 1129 border: none; 1130 border-radius: 10px; 1131 padding: 6px 10px; 1132 cursor: pointer; 1133 display: flex; 1134 align-items: center; 1135`,Un=f.h2` 1136 width: 100%; 1137 text-align: center; 1138 font-size: 18px; 1139 font-weight: 600; 1140 color: #343d48; 1141 margin: 0; 1142 font-family: 'IBM Plex Sans', sans-serif; 1143`,Hn=f.div` 1144 padding: 16px; 1145 border: 1px solid #ebebeb; 1146 border-radius: 10px; 1147 margin-top: 2rem; 1148`,Kn=f.span` 1149 display: block; 1150 font-size: 14px; 1151 color: #343d48; 1152 margin-bottom: 4px; 1153`,Gn=f.div` 1154 overflow-y: auto; 1155 max-height: 30vh; 1156 1157 &::-webkit-scrollbar {
1158 width: 7px; 1159 } 1160 &::-webkit-scrollbar-track { 1161 background: #f1f1f1; 1162 } 1163 &::-webkit-scrollbar-thumb { 1164 background: #ced0d1; 1165 border-radius: 3px; 1166 } 1167`,Xn=f.hr` 1168 border: none; 1169 border-top: 1px solid #ebebeb; 1170 margin: 16px 0; 1171`,Yn=()=>{const s=d(),l=u(),{session:f}=S();E(D.MEU_ESPACO,w.GLOBAL);const p=f?.CustomerId,[m,y]=o(()=>{const e=z(l.search);if(null!==e)return e;const t=sessionStorage.getItem("Tab");return null!==t?"1"===t?"agreements":"debts":"debts"}),[C,N]=o(()=>!(null!==z(l.search)||null!==sessionStorage.getItem("Tab")));a(()=>{const e=z(l.search);null!==e&&(N(!1),y(e),sessionStorage.setItem("Tab",q(e)))},[l.search]);const[A,O]=o([]),j=r(()=>A.map(e=>e.DebtId),[A]),P=r(()=>j.join(","),[j]),B=c(e=>b({category:x.ACTION,type:v.PRIMARY,elementId:e,contextId:p,contextData:P,channel:w.NEGOTIATION}),[p,P]),M=r(()=>B("DÃvidas"),[B]),L=r(()=>B("Acordos"),[B]),[F,V]=o(null),[U,H]=o(null),[K,G]=o(10),{minDate:Y,maxDate:J}=r(ee,[]),ie=r(ne,[]),oe=i(null),[ae,se]=o(()=>{const e=localStorage.getItem("selectedDate"),t=e?X(e):null;return t&&te(t,Y,J)?t:(localStorage.removeItem("selectedDate"),Y)}),[le,ce]=o(!1),[de,ue]=o(null),[fe,pe]=o(!1),[ge,he]=o(!1),[me,be]=o(!1);a(()=>{if(!fe)return;const e=e=>{e.target.closest("[data-calendar-container]")||pe(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[fe]),a(()=>{if(!ge)return;const e=document.documentElement.style.overflow;return document.documentElement.style.overflow="hidden",()=>{document.documentElement.style.overflow=e}},[ge]),a(()=>()=>{null!==oe.current&&clearTimeout(oe.current)},[]),a(()=>{"debts"!==m&&he(!1)},[m]);const{data:ve=[],isError:xe,isLoading:ye,refetch:_e}=_n(),{data:we=[],isError:Se,isLoading:De,refetch:ke}=$({queryKey:["debts"],queryFn:async()=>yn((await _.get("/debts")).data,"Formato inválido na resposta de dÃvidas")});a(()=>{if(!C)return;if(De||ye||Se||xe)return;const e=0===we.length&&ve.length>0?"agreements":"debts";y(e),N(!1),sessionStorage.setItem("Tab",q(e))},[xe,ye,C,Se,De,we.length,ve.length]),a(()=>{if(we.length>0){const e=we[0]?.CurrentBalance||0;e>0&&T(e)}},[we]);const Ie=r(()=>[...we].sort((e,t)=>(e.HasLegalClaim?1:0)-(t.HasLegalClaim?1:0)),[we]),Ee=r(()=>Ie.slice(0,K),[Ie,K]),Ce=r(()=>{if(0===Ee.length)return!0;const e=Ee[0]?.BusinessUnitID;return Ee.every(t=>t.BusinessUnitID===e)},[Ee]),Ne=r(()=>Ee.filter(e=>!!re(e,ie)&&(null===U||e.BusinessUnitID===U)),[ie,U,Ee]),{data:Ae,isError:Oe,isLoading:Te,refetch:je}=wn(j,ae),Re=r(()=>{const e=Ae&&!Array.isArray(Ae)?Ae:null,t=e?.PaymentDetails??null,n=Array.isArray(e?.NegotiationOffers)?e.NegotiationOffers:Array.isArray(Ae)?Ae:[];return{paymentDetails:t,negotiationOffers:n,totalWithoutDiscount:t?.TotalBalance||0,totalValue:n.length>0?n[0].ArrangementAmount:t?.ArrangementAmount||0,discountPercentage:t?.OfferDiscount?Q(t.OfferDiscount):"0% off"}},[Ae]),{negotiationOffers:Pe,totalWithoutDiscount:$e,totalValue:Me,discountPercentage:Le}=Re;a(()=>{if(0===Ie.length)return void(De||(O([]),H(null)));if(!Ce)return O([]),void H(null);const e=Ie.slice(0,K).filter(e=>re(e,ie));O(e),H(e.length>0?e[0].BusinessUnitID:null)},[ie,Ie,De,Ce]);const ze=c(e=>{N(!1),y(e),sessionStorage.setItem("Tab",q(e)),ue(null),ce(!1)},[]),qe=c(e=>{if(!re(e,ie))return;if(A.some(t=>t.DebtId===e.DebtId)){const t=A.filter(t=>t.DebtId!==e.DebtId);O(t),0===t.length&&H(null)}else 0===A.length&&H(e.BusinessUnitID),null!==U&&e.BusinessUnitID!==U||(O([...A,e]),null===U&&H(e.BusinessUnitID),R(e.OfferCurrentBalance||e.DebtTotalBalance||0),k("portal:meu-espaco","clicou","botao:negociar"))},[ie,U,A]),Fe=c(e=>{if(!e)return O([]),void H(null);const t=Ee.find(e=>re(e,ie));if(!t)return;const n=Ee.filter(e=>e.BusinessUnitID===t.BusinessUnitID&&re(e,ie));H(t.BusinessUnitID),O(n)},[ie,Ee]),Ve=c(e=>{ue(e),ce(!0)},[]),Ue=c(()=>{G(e=>Math.min(e+10,Ie.length))},[Ie.length]),Ke=!Te&&!Oe&&Pe.some(e=>Number.isFinite(e.ArrangementAmount)&&e.ArrangementAmount>0),Ge=()=>{if(!Ke||0===A.length)return;const e=W(ae);I({debtIds:j,date:e}),localStorage.setItem("selectedDate",e),localStorage.setItem("debts",JSON.stringify(A)),s("/pagamento")},Xe=e=>{te(e,Y,J)&&(se(e),localStorage.setItem("selectedDate",W(e)),pe(!1))},Ye=c(e=>!!re(e,ie)&&(null===U||e.BusinessUnitID===U),[ie,U]),We=c(e=>re(e,ie),[ie]),Je=Ne.length>0&&A.length===Ne.length,Qe=A.length>0&&Ke,Ze=(r=!1)=>
1171{if(Te)return e(un,{});if(Oe)return e(h,{message:"Não foi possÃvel carregar as ofertas.",onRetry:()=>{je()}});if(!Ke)return t(Cn,{children:[e(Nn,{children:"Nenhuma oferta disponÃvel"}),e(An,{children:"Não encontramos uma oferta válida para as dÃvidas selecionadas."})]});const i=r?Xn:Tn,o=r?Gn:jn;return t(n,{children:[e(i,{}),e(o,{children:A.map(t=>e(nt,{debt:t,isExpanded:F===t.DebtId,onToggleExpand:()=>V(F===t.DebtId?null:t.DebtId),customerInfo:p},t.DebtId))}),e(i,{}),e(On,{style:r?{padding:0}:void 0,children:e(He,{totalWithoutDiscount:$e,discountPercentage:Le,totalValue:Me})})]})};return C&&(De||ye)?e(g,{}):C&&(Se||xe)?e(h,{message:"Não foi possÃvel carregar suas dÃvidas e acordos.",onRetry:()=>{Promise.all([ke(),_e()])}}):"debts"===m&&De||"agreements"===m&&ye?e(g,{}):"debts"===m&&Se?e(h,{message:"Não foi possÃvel carregar suas dÃvidas.",onRetry:()=>{ke()}}):"agreements"===m&&xe?e(h,{message:"Não foi possÃvel carregar seus acordos.",onRetry:()=>{_e()}}):t(n,{children:[e(pt,{isOpen:le,debt:de,onClose:()=>ce(!1)}),"debts"===m?t(Sn,{children:[e(sn,{activeTab:m,onTabChange:ze,debtsApolloAttrs:M,agreementsApolloAttrs:L,debts:Ie,slicedList:Ee,visibleCount:K,selectedDebts:A,selectedBusinessUnitID:U,allChecked:Je,availableForSelection:Ne,isAllSameBusinessUnit:Ce,customerInfo:p,canSelectDebt:Ye,isDebtEligible:We,onSelectAll:Fe,onDebtToggle:qe,onShowMore:Ue,onViewDetails:Ve}),Ie.length>0&&e(kn,{children:0===A.length?t(Cn,{children:[e(Nn,{children:"Não há dÃvidas selecionadas"}),e(An,{children:"Selecione uma ou mais dÃvidas para iniciar a negociação"})]}):t(n,{children:[e(In,{children:"Detalhes do acordo"}),e(En,{children:"Selecione a data de vencimento para negociar"}),e(xn,{selectedDate:ae,minDate:Y,maxDate:J,isDateDisabled:e=>!Z(e),isCalendarOpen:fe,dateLabel:"Data de vencimento",warningMessage:"Os valores podem sofrer alterações conforme a data de vencimento.",onToggleCalendar:()=>pe(!fe),onCloseCalendar:()=>pe(!1),onDateSelect:Xe}),Ze(),Ke&&e(n,{children:t(Rn,{onClick:Ge,disabled:!Ke,...b({category:x.ACTION,type:v.PRIMARY,elementId:"Seguir para negociação",contextId:p,contextData:P,channel:w.NEGOTIATION}),children:[e("span",{children:"Seguir para negociação"}),e(Pn,{})]})})]})}),Ie.length>0&&e(Bn,{children:e($n,{$full:ge,children:e(Mn,{children:t(Ln,{children:[me&&e(qn,{children:"Selecione uma ou mais dÃvidas para iniciar a negociação."}),!ge&&e(zn,{$disabled:!Qe,onClick:()=>{if(null!==oe.current&&(clearTimeout(oe.current),oe.current=null),!Qe)return be(!0),void(oe.current=setTimeout(()=>{be(!1),oe.current=null},3e3));be(!1),he(!0)},children:"Ir para negociação"}),0===A.length?t(Cn,{style:{padding:0},children:[e(Nn,{children:"Não há dÃvidas selecionadas"}),e(An,{children:"Selecione uma ou mais dÃvidas para iniciar a negociação"})]}):t(n,{children:[t(Fn,{children:[ge&&e(Vn,{onClick:()=>he(!1),"aria-label":"Voltar",children:e("img",{src:"/assets/images/seta-voltar-grossa.svg",alt:"",style:{height:"16px"}})}),e(Un,{children:"Informações da negociação"})]}),t(Hn,{children:[e(Kn,{children:"Selecione a data de vencimento para negociar"}),e(xn,{selectedDate:ae,minDate:Y,maxDate:J,isDateDisabled:e=>!Z(e),isCalendarOpen:fe,mobile:!0,dateLabel:"Data de vencimento",warningMessage:"Os valores podem sofrer alterações conforme a data de vencimento.",onToggleCalendar:()=>pe(!fe),onCloseCalendar:()=>pe(!1),onDateSelect:Xe}),Ze(!0)]}),e("div",{style:{marginTop:"15px"},children:t(Rn,{onClick:Ge,disabled:!Ke,style:{fontSize:"14px",fontWeight:500},...b({category:x.ACTION,type:v.PRIMARY,elementId:"Seguir para negociação",contextId:p,contextData:P,channel:w.NEGOTIATION}),children:[e("span",{children:"Seguir para negociação"}),e(Pn,{})]})})]})]})})})})]}):t(Dn,{children:[e(Xt,{title:"Acordos",activeTab:m,onTabChange:ze,debtsApolloAttrs:B("DÃvidas"),agreementsApolloAttrs:B("Acordos")}),e(Be,{arrangements:ve,initialSubTab:(()=>{const e=new URLSearchParams(l.search).get("subtab");return"paid"===e?"paid":"cancelled"===e?"cancelled":"analysis"===e?"analysis":"active"})(),customerInfo:p})]})]})};export{Yn as default};
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.