1/*! For license information please see 1588-9ce4f3f8d09027b63bde.chunk.js.LICENSE.txt */ 2"use strict";(self.webpackChunknetconv=self.webpackChunknetconv||[]).push([[1588,19592,21100,22011,40159,40620,77556,79744,98798],{59683:function(e,t,n){n.d(t,{a:function(){return r}});var r=(0,n(96540).createContext)()},45403:function(e,t,n){n.d(t,{A:function(){return l}});var r=n(96540),o=n(33546),a=["className","children"];var i=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter(Boolean).join(" ")};function l(e){var t=e.className,n=e.children,l=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,a);return r.createElement(o.A,Object.assign({className:i("panel-legacy-page",t)},l),n)}},33546:function(e,t,n){n.d(t,{A:function(){return i}});var r=n(96540),o=["as","className","children"];var a=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter(Boolean).join(" ")};function i(e){var t=e.as,n=void 0===t?"section":t,i=e.className,l=e.children,c=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,o);return r.createElement(n,Object.assign({className:a("panel-page",i)},c),l)}},45882:function(e,t,n){function r(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,{h:function(){return s}});var a=Object.freeze(["ai_chat_seen_favorite_ids","netconv:panel:franchise-switch","ril_action_modes","ril_sidebar_collapsed","ril_theme"]),i=Object.freeze(["netconv:panel-theme:v1:","ril_search_history:v2:"]),l=Object.freeze(["netconv:panel:support-view","ril_uix_session_id","sensitive_token_expires_at_v1","sensitive_token_v1"]),c=Object.freeze(["netconv:panel-workspace:v1:"]);function u(e,t,n){if(!e||"function"!==typeof e.removeItem)return[];var o=r(new Set([].concat(r(t),r(function(e,t){if(!e||"function"!==typeof e.key)return[];for(var n=[],r=Number(e.length||0),o=function(){var r=e.key(a);r&&t.some(function(e){return r.startsWith(e)})&&n.push(r)},a=0;a<r;a+=1)o();return n}(e,n)))));return o.forEach(function(t){return e.removeItem(t)}),o}function s(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).storage,t=void 0===e?"undefined"===typeof window?null:window:e;if(!t)return{local:[],session:[]};try{return{local:u(t.localStorage,a,i),session:u(t.sessionStorage,l,c)}}catch(n){return{local:[],session:[]}}}},20592:function(e,t,n){n.d(t,{_:function(){return o}});var r=n(84166);function o(e){var t,n={};e&&(n["Idempotency-Key"]=e);var o=null===(t=r.A.defaults)||void 0===t||null===(t=t.headers)||void 0===t?void 0:t.common,a="function"===typeof(null===o||void 0===o?void 0:o.get)?o.get("Authorization"):(null===o||void 0===o?void 0:o.Authorization)||(null===o||void 0===o?void 0:o.authorization);if(!/^Bearer\s+/i.test(String(a||""))&&"undefined"!==typeof document){var i,l=null===(i=document.querySelector('meta[name="csrf-token"]'))||void 0===i?void 0:i.content;l&&(n["X-CSRF-Token"]=l)}return n}},74462:function(e,t,n){n.d(t,{v:function(){return o},x:function(){return r}});var r="MESSAGE_ALERT",o="MESSAGE_NOTICE"},88114:function(e,t,n){n.d(t,{$t:function(){return r},YR:function(){return o},uj:function(){return a}});var r="FETCH_SEARCH_PRODUCTS",o="FETCH_SEARCH_ORDERS",a="FETCH_SEARCH_DATES"},94314:function(e,t,n){n.d(t,{JX:function(){return f},MP:function(){return m},YA:function(){return p}});var r=n(84166),o=n(45882),a=n(74462),i=n(88114);function l(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function a(n,r,o,a){var l=r&&r.prototype instanceof u?r:u,s=Object.create(l.prototype);return c(s,"_invoke",function(n,r,o){var a,l,c,u=0,s=o||[],d=!1,f={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return a=t,l=0,c=e,f.n=n,i}};function p(n,r){for(l=n,c=r,t=0;!d&&u&&!o&&t<s.length;t++){var o,a=s[t],p=f.p,m=a[2];n>3?(o=m===r)&&(c=a[(l=a[4])?5:(l=3,3)],a[4]=a[5]=e):a[0]<=p&&((o=n<2&&p<a[1])?(l=0,f.v=r,f.n=a[1]):p<m&&(
2o=n<3||a[0]>r||r>m)&&(a[4]=n,a[5]=r,f.n=m,l=0))}if(o||n>1)return i;throw d=!0,r}return function(o,s,m){if(u>1)throw TypeError("Generator is already running");for(d&&1===s&&p(s,m),l=s,c=m;(t=l<2?e:c)||!d;){a||(l?l<3?(l>1&&(f.n=-1),p(l,c)):f.n=c:f.v=c);try{if(u=2,a){if(l||(o="next"),t=a[o]){if(!(t=t.call(a,c)))throw TypeError("iterator result is not an object");if(!t.done)return t;c=t.value,l<2&&(l=0)}else 1===l&&(t=a.return)&&t.call(a),l<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),l=1);a=e}else if((t=(d=f.n<0)?c:n.call(r,f))!==i)break}catch(t){a=e,l=1,c=t}finally{u=1}}return{value:t,done:d}}}(n,o,a),!0),s}var i={};function u(){}function s(){}function d(){}t=Object.getPrototypeOf;var f=[][r]?t(t([][r]())):(c(t={},r,function(){return this}),t),p=d.prototype=u.prototype=Object.create(f);function m(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,d):(e.__proto__=d,c(e,o,"GeneratorFunction")),e.prototype=Object.create(p),e}return s.prototype=d,c(p,"constructor",d),c(d,"constructor",s),s.displayName="GeneratorFunction",c(d,o,"GeneratorFunction"),c(p),c(p,o,"Generator"),c(p,r,function(){return this}),c(p,"toString",function(){return"[object Generator]"}),(l=function(){return{w:a,m:m}})()}function c(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}c=function(e,t,n,r){function a(t,n){c(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(a("next",0),a("throw",1),a("return",2))},c(e,t,n,r)}function u(e,t,n,r,o,a,i){try{var l=e[a](i),c=l.value}catch(e){return void n(e)}l.done?t(c):Promise.resolve(c).then(r,o)}function s(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var a=e.apply(t,n);function i(e){u(a,r,o,i,l,"next",e)}function l(e){u(a,r,o,i,l,"throw",e)}i(void 0)})}}var d=function(e,t){var n,i,l=null===t||void 0===t||null===(n=t.response)||void 0===n?void 0:n.status;if(401!==l){var c=(null===t||void 0===t||null===(i=t.response)||void 0===i?void 0:i.data)||{message:(null===t||void 0===t?void 0:t.message)||"Unexpected request error"};e(500===l?{type:a.x,payload:c}:{type:a.v,payload:c})}else{(0,o.h)();try{delete r.A.defaults.headers.common.Authorization}catch(u){}window.location.assign("/admin")}},f=function(){var e=s(l().m(function e(t,n){var o,a,c;return l().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,o=new URLSearchParams(n).toString(),e.n=1,r.A.get("".concat("","/panel/v1/searchs/by_products?").concat(o));case 1:return a=e.v,t({type:i.$t,payload:a.data}),e.a(2,a.data);case 2:e.p=2,c=e.v,console.error("fetchSearchProducts error >>",c),d(t,c);case 3:return e.a(2)}},e,null,[[0,2]])}));return function(t,n){return e.apply(this,arguments)}}(),p=function(){var e=s(l().m(function e(t,n){var o,a,c;return l().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,o=new URLSearchParams(n).toString(),e.n=1,r.A.get("".concat("","/panel/v1/searchs/by_orders?").concat(o));case 1:return a=e.v,t({type:i.YR,payload:a.data}),e.a(2,a.data);case 2:e.p=2,c=e.v,console.error("fetchSearchOrders error >>",c),d(t,c);case 3:return e.a(2)}},e,null,[[0,2]])}));return function(t,n){return e.apply(this,arguments)}}(),m=function(){var e=s(l().m(function e(t,n){var o,a,c;return l().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,o=new URLSearchParams(n).toString(),e.n=1,r.A.get("".concat("","/panel/v1/searchs/by_dates?").concat(o));case 1:return a=e.v,t({type:i.uj,payload:a.data}),e.a(2,a.data);case 2:e.p=2,c=e.v,console.error("fetchSearchDates error >>",c),d(t,c);case 3:return e.a(2)}},e,null,[[0,2]])}));return function(t,n){return e.apply(this,arguments)}}()},82270:function(e,t,n){n.r(t),n.d(t,{default:function(){return R}});var r=n(96540),o=n(45403),a=n(59683),i=n(85122),l=n(22474);function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
2t%2?c(Object(n),!0).forEach(function(t){s(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function s(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,l=[],c=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return f(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var p={supply_brain_analysis:"Supply Brain",market_briefing:"Briefing de Mercado",autonomous_supply:"Supply Aut\xf4nomo",smart_replenishment:"Reposi\xe7\xe3o Inteligente"},m="var(--panel-surface, #ffffff)",v="var(--panel-surface-2, #f0f2f5)",g="var(--panel-text, #0b0d10)",y="var(--panel-text-muted, #5b6472)",h="var(--panel-line, rgba(11, 13, 16, 0.10))",b="var(--status-approved, #22c55e)",E="var(--panel-warning, #f59e0b)",S="var(--panel-danger, #ef4444)",x="var(--panel-accent, #6366f1)",_={background:m,borderRadius:12,padding:24,boxShadow:"0 1px 4px var(--panel-line, rgba(0,0,0,0.08))",marginBottom:24};function w(e){var t=e.balance,n=e.limit,o=e.resetAt,a=n>0?Math.min(100,Math.round(t/n*100)):0,i=a>50?b:a>20?E:S;return r.createElement("div",{style:_},r.createElement("p",{style:{fontSize:13,color:y,marginBottom:4}},"Saldo de cr\xe9ditos IA"),r.createElement("p",{style:{fontSize:44,fontWeight:800,color:g,lineHeight:1,marginBottom:8}},null===t||void 0===t?void 0:t.toLocaleString("pt-BR"),r.createElement("span",{style:{fontSize:18,fontWeight:400,color:y,marginLeft:6}},"/ ",null===n||void 0===n?void 0:n.toLocaleString("pt-BR"))),r.createElement("div",{style:{background:v,borderRadius:999,height:8,marginBottom:8}},r.createElement("div",{style:{width:"".concat(a,"%"),height:"100%",borderRadius:999,background:i,transition:"width 0.4s"}})),r.createElement("div",{style:{display:"flex",justifyContent:"space-between",fontSize:12,color:y}},r.createElement("span",null,a,"% dispon\xedvel"),o&&r.createElement("span",null,"Renova em: ",new Date(o).toLocaleDateString("pt-BR"))))}function O(e){var t=e.usageByAction,n=Object.entries(t||{});return 0===n.length?null:r.createElement("div",{style:_},r.createElement("h6",{style:{fontWeight:700,marginBottom:12,color:g}},"Consumo por Funcionalidade"),r.createElement("table",{style:{width:"100%",borderCollapse:"collapse"}},r.createElement("thead",null,r.createElement("tr",{style:{borderBottom:"1px solid ".concat(h)}},r.createElement("th",{style:{textAlign:"left",padding:"6px 0",fontSize:12,color:y,fontWeight:600}},"Funcionalidade"),r.createElement("th",{style:{textAlign:"right",padding:"6px 0",fontSize:12,color:y,fontWeight:600}},"Cr\xe9ditos"))),r.createElement("tbody",null,n.map(function(e){var t=d(e,2),n=t[0],o=t[1];return r.createElement("tr",{key:n,style:{borderBottom:"1px solid ".concat(h)}},r.createElement("td",{style:{padding:"8px 0",fontSize:13,color:g}},p[n]||n),r.createElement("td",{style:{padding:"8px 0",fontSize:13,fontWeight:600,textAlign:"right",color:g}}
2,null===o||void 0===o?void 0:o.toLocaleString("pt-BR")))}))))}function A(e){var t=e.recentUsage;return t&&0!==t.length?r.createElement("div",{style:_},r.createElement("h6",{style:{fontWeight:700,marginBottom:12,color:g}},"Hist\xf3rico Recente"),r.createElement("div",{style:{overflowX:"auto"}},r.createElement("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:13}},r.createElement("thead",null,r.createElement("tr",{style:{borderBottom:"1px solid ".concat(h)}},r.createElement("th",{style:{textAlign:"left",padding:"6px 8px",color:y,fontWeight:600}},"A\xe7\xe3o"),r.createElement("th",{style:{textAlign:"right",padding:"6px 8px",color:y,fontWeight:600}},"Consumido"),r.createElement("th",{style:{textAlign:"right",padding:"6px 8px",color:y,fontWeight:600}},"Saldo antes"),r.createElement("th",{style:{textAlign:"right",padding:"6px 8px",color:y,fontWeight:600}},"Saldo depois"),r.createElement("th",{style:{textAlign:"right",padding:"6px 8px",color:y,fontWeight:600}},"Data"))),r.createElement("tbody",null,t.map(function(e,t){return r.createElement("tr",{key:t,style:{borderBottom:"1px solid ".concat(h)}},r.createElement("td",{style:{padding:"8px 8px",color:g}},p[e.action_key]||e.action_key),r.createElement("td",{style:{padding:"8px 8px",textAlign:"right",color:S,fontWeight:600}},"-",e.credits_consumed),r.createElement("td",{style:{padding:"8px 8px",textAlign:"right",color:y}},e.balance_before),r.createElement("td",{style:{padding:"8px 8px",textAlign:"right",color:y}},e.balance_after),r.createElement("td",{style:{padding:"8px 8px",textAlign:"right",color:y,fontSize:11}},new Date(e.consumed_at).toLocaleDateString("pt-BR")))}))))):null}function j(){return r.createElement("div",{style:{background:"linear-gradient(135deg, ".concat(x,", var(--panel-blue, #3b82f6))"),borderRadius:12,padding:24,color:m,marginBottom:24}},r.createElement("h6",{style:{fontWeight:700,marginBottom:4}},"Limite do plano"),r.createElement("p",{style:{fontSize:13,opacity:.85,marginBottom:16}},"A contrata\xe7\xe3o adicional ainda n\xe3o est\xe1 dispon\xedvel neste painel. O saldo abaixo \xe9 somente informativo e segue o plano atual da loja."))}function B(e){var t,n,o,a,i=e.projection,l=e.subscription;if(!i)return null;var c=i.overage_credits>0,s=i.projected_overage_credits>0,d=i.usd_per_overage_credit||0,f=(i.projected_overage_credits*d).toFixed(2),p=null===l||void 0===l?void 0:l.overage_enabled,m=c?S:s?E:b;return r.createElement("div",{"data-testid":"usage-projection-card",style:u(u({},_),{},{borderLeft:"4px solid ".concat(m)})},r.createElement("h6",{style:{fontWeight:700,marginBottom:12,color:g}},"Proje\xe7\xe3o do per\xedodo"),r.createElement("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(160px, 1fr))",gap:12}},r.createElement(P,{label:"Limite do plano",value:null===(t=i.credits_limit)||void 0===t?void 0:t.toLocaleString("pt-BR")}),r.createElement(P,{label:"Consumido no per\xedodo",value:null===(n=i.credits_consumed_period)||void 0===n?void 0:n.toLocaleString("pt-BR")}),r.createElement(P,{label:"Overage atual",value:null===(o=i.overage_credits)||void 0===o?void 0:o.toLocaleString("pt-BR"),highlight:c?S:g}),r.createElement(P,{label:"Proje\xe7\xe3o fim do m\xeas",value:null===(a=i.projected_overage_credits)||void 0===a?void 0:a.toLocaleString("pt-BR"),highlight:s?E:g})),r.createElement("div",{style:{marginTop:16,padding:12,background:v,borderRadius:8,fontSize:13,color:g}},p?r.createElement(r.Fragment,null,r.createElement("strong",null,"Overage ativo:")," US$ ",d.toFixed(4)," por cr\xe9dito acima do limite.",s&&r.createElement(r.Fragment,null," Proje\xe7\xe3o para o fim do per\xedodo: ",r.createElement("strong",null,"US$ ",f),".")):r.createElement(r.Fragment,null,r.createElement("strong",null,"Overage n\xe3o habilitado:")," ao atingir o limite, novas opera\xe7\xf5es de IA ser\xe3o bloqueadas.")))}function P(e){var t=e.label,n=e.value,o=e.highlight;return r.createElement("div",null,r.createElement("p",{style:{fontSize:11,color:y,marginBottom:2,textTransform:"uppercase"}},t),r.createElement("p",{style:{fontSize:22,fontWeight:700,color:o||g,margin:0}},n))}function R(){var e=(0,r.useContext)(a.a).dispatch,t=d((0,r.useState)(!0),2),n=t[0],c=t[1],u=d((0,r.useState)(null),2),s=u[0],f=u[1];return(0,r.useEffect)(function(){(0,i.oQ)(e).then(function(e){f(e),c(!1)}).catch(function(){return c(!1)})},[]),r.createElement(r.Fragment,null,r.createElement(o.A,{className:"relative bg-gray-100",style:{minHeight:"100vh"}},r.createElement("div",{className:"px-4 md:px-10 mx-auto w-full",style:{paddingBottom:40,maxWidth:900}},r.createElement("div",{style:{marginBottom:24}},r.createElement("h4",{style:{fontWeight:800,fontSize:22,color:g,marginBottom:4}},(0,l.Tl)("sidebar.btn_ia_credits",{defaultValue:"Credits"})),r.createElement("p",{style:{color:y,fontSize:14}},"Gerencie seu saldo de cr\xe9ditos para funcionalidades de intelig\xeancia artificial.")),n?r.createElement("div",{style:{textAlign:"center",padding:60,color:y}},"Carregando..."):s?r.createElement(r.Fragment,null,r.createElement(w,{balance:s.balance,limit:s.limit,resetAt:s.reset_at}),r.createElement(B,{projection:s.usage_projection,subscription:s.subscription}),r.createElement(O,{usageByAction:s.usage_by_action}),r.createElement(j,null),r.createElement(A,{recentUsage:s.recent_usage})):r.createElement("div",{style:{background:m,borderRadius:12,padding:40,textAlign:"center",color:y}},"Nenhum dado de cr\xe9dito dispon\xedvel."))))}}}]); 3//# sourceMappingURL=1588-9ce4f3f8d09027b63bde.chunk.js.map
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.