PageSourceSearch

https://taust.ee/app/assets/TaxPaymentGraph-Dq9w3MeA.js

js taust.ee collected 2026-10-02 21:13:01 UTC 2,479 bytes, 1 lines download raw bytes

1import{C as E,a as S,L,P as R,b as T,p as N,c as P,d as q}from"./charts-YSn5Nw6l.js";import{g as F,b as V,a4 as w,ae as Q}from"./index-CsoSSYpI.js";import{d as z,r as s,W as G,I as y,o as W,w as H,c as I,j as O,k as b,z as D,P as d,m as $}from"./vendor-BdLpyfCE.js";import{h as j}from"./utils-BKbActuc.js";import"./graphs-s2ssg7ge.js";const M={key:0,class:""},Z={class:"p-2 h-[300px]"},ae=z({__name:"TaxPaymentGraph",props:{locked:{type:Boolean,required:!1}},setup(J){const c=s(!1),p=G(),x=F(),{t:n}=V(),B=w(),{companyData:i}=y(B),{demoPaymentGraph:f}=y(x);let u=s([]);s([]),s([]),s({});let l=s({}),r=s([{label:n("National taxes"),color:"#3D8DDA"},{label:n("Employment taxes"),color:"#01AB8F"}]);W(()=>{m()}),H(()=>i.value.paid_taxes,(a,e)=>{a!=e&&m()},{deep:!0});function m(){C(),l.value={labels:u,datasets:[{label:n("National taxes"),fill:!1,backgroundColor:"#3D8DDA",borderColor:"#3D8DDA",data:p.name=="demo"?f.value.national_taxes:g(),pointStyle:"circle",pointRadius:6,pointHoverRadius:10,pointBackgroundColor:"#fff",pointBorderColor:"#3D8DDA",pointBorderWidth:2},{label:n("Employment taxes"),backgroundColor:"#01AB8F",borderColor:"#01AB8F",data:p.name=="demo"?f.value.employee_taxes:g("labor_taxes"),pointStyle:"circle",pointRadius:6,pointHoverRadius:10,pointBackgroun
1dColor:"#fff",pointBorderColor:"#01AB8F",pointBorderWidth:2}]},c.value=!0}function C(){let e=[];for(let o=1;o<=12;o++){let t=j().subtract(o,"quarters");e.push([t.year(),`Q${t.quarter()}`])}u=e.reverse()}function g(a="state_taxes"){var t;let e=[];const o=((t=i==null?void 0:i.value)==null?void 0:t.paid_taxes)||[];return u.forEach(v=>{const h=o.find(_=>_.year==v[0]&&_.quarter==Number(v[1].replace("Q","")));h?e.push(h[a]):e.push(null)}),e}const k={responsive:!0,maintainAspectRatio:!1,spanGaps:!0,locale:"et-EE",scales:{x:{grid:{display:!1},border:{display:!1},ticks:{color:"#8797A6",font:{size:11,weight:500}}},y:{beginAtZero:!0,border:{display:!1},ticks:{color:"#8797A6",font:{size:11,weight:500},maxTicksLimit:7}}},plugins:{legend:{display:!1}}};function A(a){r.value[a]&&(r.value[a]={...r.value[a],hidden:!r.value[a].hidden},l.value={...l.value,datasets:l.value.datasets.map((e,o)=>{var t;return{...e,hidden:!!((t=r.value[o])!=null&&t.hidden)}})})}return E.register(S,L,R,T,N,P),(a,e)=>c.value?(I(),O("div",M,[b("div",Z,[D(d(q),{data:d(l),options:k},null,8,["data"])]),b("div",null,[D(Q,{"legend-values":d(r),interactive:"",onToggle:A},null,8,["legend-values"])])])):$("",!0)}});export{ae 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.