@vlci/cdmciutat 30.0.0 → 31.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.seuElectronica=e():t.seuElectronica=e()}(self,(()=>(()=>{var t={2725:t=>{var e;self,e=()=>(()=>{"use strict";var t={d:(e,n)=>{for(var o in n)t.o(n,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:n[o]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{THRESHOLDS:()=>it,addPointInteger:()=>d,buildCamarasTrafico:()=>ht,buildTableCalidadAire:()=>lt,calculateMaxYAxis:()=>b,calculatePentahoPath:()=>st,calculateXAxisStart:()=>E,checkAllGroupsCollapsed:()=>ot,configureDataBar:()=>_,configureDataGaugeCommon:()=>v,configureDataGaugeMonthCommon:()=>x,configureDataLine:()=>N,configureDataValidate:()=>_t,configureLinesChartValidates:()=>Lt,convertToLanguageSelectorDateRange:()=>X,convertToTableTreeView:()=>nt,downloadCSVTable:()=>rt,downloadPDFTable:()=>at,formatCellMultiplesLines:()=>Q,formatDayMonthYear:()=>i,formatMilMillionEuros:()=>I,formatMonthAnyo:()=>a,formatName:()=>m,formatNameHeaderColumn:()=>K,formatRoundTooltip:()=>C,formatShortMonthShortYear:()=>s,formatShortMonthYear:()=>l,formatToMillions:()=>h,formatToTons:()=>f,formatTooltip:()=>y,formatTooltipPie:()=>A,formatTrimestre:()=>c,getEnvironment:()=>ct,getMaxFieldNumberFromData:()=>$,getMonth:()=>o,getMonthList:()=>u,getSelectCommonOptions:()=>W,getSelectTwoColumnsOptions:()=>q,initBarChart:()=>yt,initBarChartComparationMonth:()=>Mt,initChart:()=>S,initStackedBarChart:()=>St,initStackedBarChartMonthSeries:()=>pt,initTable:()=>Z,initValueDefaultDate:()=>J,initialCalls:()=>dt,loadIframeOnClickEvent:()=>vt,printDataChart:()=>p,printDataInHTMLElements:()=>w,printNoDataChart:()=>g,resetFilter:()=>U,resetFilterDate:()=>G,resetFilterDates:()=>V,resultsetWithFields:()=>L,selectConfigDatasource:()=>Y,selectFilterAll:()=>P,selectValueDefaultInFilter:()=>H,splitDataset:()=>F,traverseRows:()=>et,updateObject:()=>D,updateStackedBarOptions:()=>gt});const n={"01":"Enero","02":"Febrero","03":"Marzo","04":"Abril","05":"Mayo","06":"Junio","07":"Julio","08":"Agosto","09":"Septiembre",10:"Octubre",11:"Noviembre",12:"Diciembre"};function o(t){return{1:"Gen",2:"Feb",3:"Mar",4:"Abr",5:"Mai",6:"Jun",7:"Jul",8:"Ago",9:"Sep",10:"Oct",11:"Nov",12:"Des"}[parseInt(t.toString(),10)]}function r(t){return[t.substring(0,4),n[t.substring(4,6)]]}function a(t){const[e,n]=r(t);return`${n} ${e}`}function i(t){const[e,o,r]=function(t){return[t.substring(0,4),n[t.substring(4,6)],t.substring(6,8)]}(t);return`${r} ${o} ${e}`}function l(t){const[e,n]=r(t);return`${n.substring(0,3)} ${e}`}function s(t){const[e,n]=r(t);return`${n.substring(0,3)} '${e.substring(2,4)}`}function c(t){const[e,n]=t.split("-");return`${parseFloat(n)/3}T ${e}`}function u(t,e){const n=t[e];return Array.from(n.values()).map((t=>t.slice(0,3)))}function d(t,e=2){let n=navigator.language||navigator.userLanguage;n=n.length<=2?`${n}-${n.toUpperCase()}`:n;const o={minimumFractionDigits:0,maximumFractionDigits:e};return"es-ES"===n?t.toLocaleString("de-DE",o):t.toLocaleString(n,o)}function h(t){const e=1e6;return t>=e?t/e+"M":t.toString()}function f(t){return t>=1e3?t/1e3+" Tn":t.toString()}function m(t,e=29){if(t.length>=e){const n=t.split(" ");let o="",r="";return n.forEach((t=>{`${o} ${t}`.length<=e?o+=(o?" ":"")+t:(r+=`${o}\n`,o=t)})),r+=o,r}return t}function S(t,e){const n=document.getElementById(t);if(!n)return console.error(`No se pudo encontrar el elemento con ID ${t}.`),null;const o=echarts.init(n);o.setOption(e,!0),window.addEventListener("resize",(()=>{null!=o&&void 0!==o&&o.resize()}));const r=document.getElementById("main-content");return r&&(r.addEventListener("shown.bs.collapse",(()=>{o.resize()})),r.addEventListener("hidden.bs.collapse",(()=>{o.resize()}))),o}function g(t,e){const n=t?document.querySelector(t):null,o=e?document.querySelector(e):null;n&&(n.hidden=!0),o&&(o.style.background="url('./build/images/nodata1.png') no-repeat top center",o.hidden=!1)}function p(t,e){const n=t?document.querySelector(t):null,o=e?document.querySelector(e):null;n&&(n.hidden=!0),o&&(o.style.background="#ffffff",o.hidden=!1)}function y(t,e=!1,n=!0,o=""){let r=`<p style="font-weight: 500;color: #565656;">${t[0].name}</p>`;return t.forEach((t=>{const a=e?Math.round(t.data):t.data,i=n?`<div style="font-weight: 400;color: #666;">${l=t.color,`<span style="display:inline-block;margin-right:5px;border-radius:10px;width:9px;height:9px;font-weight: 500;background-color:${l}"></span>`} ${t.seriesName}: \n <span style="float: right; margin-left:20px;font-weight: 600;color: #565656;">\n ${t.data?`${d(a)} ${o}`:"-"}\n </span>\n </div>`:`<div>\n <span style="font-weight: 600;color: #565656;">${t.data?`${d(a)} ${o}`:"-"}\n </span>\n </div>`;var l;r+=i})),r}function E(t){return 100*(t-120)/t}function b(t,e){const n=Math.max(...t);return n+(e-n%e)}function A(t,e=!1){const n=`<span style="display:inline-block;margin-right:5px;border-radius:10px;width:9px;height:9px;background-color:${t.color}"></span>`,o=e?`${t.percent}%`:d(t.value);return`<div> ${n} ${t.name} <span style="float: right; margin-left:20px;font-weight: 600;color: #333;"> ${o} </span></div>`}function C(t,e){let n=`${t.name} : `;return n+=`<span style="font-weight:500">${d(Math.round(t.value))}</span>`,e&&(n+=`<span> (${t.percent}%)</span>`),t.marker+n}function I(t){const e=1e6,n=Number(t);return n>=0&&n<e?`${d(n)} €`:n>=e?`${d(n/e)} M €`:"-"}function M(t,e,n=1){const o=Math.max(...t.map((t=>t[e])))*n;return 5e3*Math.ceil(o/5e3)}function v(t,e,n,o=30,r=15,a=30,i=-70,l=70,s=3){const c=M(t,e.data,1.1),u=l,h=n.slice(),f=[];let S=r,g=a,p=i;for(let n=0;n<t.length;n+=1)f.push({value:t[n][e.data],name:m(String(t[n][e.type]).replace(/\[.*?\]/g,"")),color:h.shift(),title:{offsetCenter:[`${String(p)}%`,`${String(S)}%`],fontFamily:"Montserrat",fontSize:o},detail:{offsetCenter:[`${String(p)}%`,`${String(g)}%`],fontFamily:"Montserrat",width:"33%",formatter:t=>d(Math.round(t))}}),p+=u,(n+1)%s==0&&(g+=a,S+=2*r,p=i);return[c,f]}function x(t,e,n,r=0){return[M(e,n.data,1),t=>function(t,e,n){const r=d(Math.round(e)),a=o(t[n][0]),i=t[n][1],l=`\n${a} ${i} : ${r}`,s=`${r}\n${a} ${i}`;return window.innerWidth<=1710?l:s}(e,t,r),[{value:e[r][n.data]}]]}function T(t,e){const{resultset:n}={resultset:t},o=new Set,r=new Set,a=n.map((([t,n,a])=>{const i=e?Math.round(a):a;return o.add(t),r.add(n),{day:n,type:t,value:i}})),i=Array.from(r.values()),l=Array.from(o.values());return l.sort(((t,e)=>t.toLowerCase().localeCompare(e.toLowerCase(),"es",{ignorePunctuation:!0}))),[l.map((t=>{const e=a.filter((e=>e.type===t)).map((({day:e,value:n})=>[e,t,n])),n=i.map((t=>{const n=e.find((([e])=>e===t));return n?n[2]:null}));return{name:t,data:n}})),l,r]}function N(t,e=[],n=!1){const[o,r,a]=T(t,n);return o.forEach((t=>{t.type="line",t.symbol="circle",t.symbolSize=6,t.smooth=.1,e.length>0&&(t.color=e.shift())})),[o,a,r]}function _(t,e,n=!1){const[o,r,a]=T(t,n);return o.forEach((t=>{t.type="bar",t.color=e.shift(),t.smooth=!1})),[o,a,r]}function L(t){const{resultset:e,metadata:n}=t,o=[];return e.forEach((t=>{const e={};t.forEach(((t,o)=>{e[n[o].colName]=t})),o.push(e)})),o}function D(t,e){const n=t;return Object.keys(e).forEach((o=>{Object.prototype.hasOwnProperty.call(e,o)&&("series"===o?n[o]=e[o].map(((e,n)=>({...t[o][n],...e}))):"object"!=typeof e[o]||Array.isArray(e[o])?n[o]=e[o]:n[o]=D(t[o]||{},e[o]))})),t}function w(t,e){t.forEach((t=>{t.id in e&&Object.entries(e[t.id]).forEach((n=>{const o=n[0],r=n[1];"object"==typeof r?r.className?document.querySelector(r.className).className=t[o]:r.element&&r.format&&(document.querySelector(r.element).textContent=e[t.id][o].format(t[o])):document.querySelector(r).textContent=t[o]}))}))}function $(t,e){const n=L(t),o=[];let r=null;return n.forEach((t=>{const n=t[e];"number"!=typeof n||Number.isNaN(n)||o.push(n)})),o.length>0&&(r=Math.max(...o)),r}function F(t,e=!0){const n={Cont:[],Mob:[]};return t.forEach((t=>{"is-res-001-kgs-contenidors"===t[0]&&"total"===t[1]&&(e?n.Cont.push([t[3],t[4],t[2]]):n.Cont.push([t[3],t[2]])),"Mobles"===t[1]&&(e?n.Mob.push([t[3],t[4],t[2]]):n.Mob.push([t[3],t[2]]))})),n}const O=["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],R=["Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic"],B=["Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado"],k=["Dom","Lun","Mar","Mié","Juv","Vie","Sáb"],z=["Do","Lu","Ma","Mi","Ju","Vi","Sá"];function P(t){const e=t.resultset.map((t=>t[0]));return this.dashboard.fireChange(this.parameter,e),t}function j(t){for(const e of t)if(Array.isArray(e)){if(!j(e))return!1}else if("All"!==e)return!1;return!0}function Y(t,e,n,o){return j(e)?(t.queryDefinition.dataAccessId=n,t.dashboard.setParameter(t.parameter,["All"])):t.queryDefinition.dataAccessId=o,!0}function U(t){t.forEach((t=>{Dashboards.fireChange(t,["All"])}))}function W(){return{input:{root:{id:"All"},indexes:{id:0,label:0}},component:{Root:{strings:{isDisabled:"No disponible",allItems:"Todos",noItems:"Ninguno",btnApply:"Aceptar",btnCancel:"Cancelar"}},Group:{Strings:{allItems:"Todos",noItems:"Ninguno",btnApply:"Aceptar",btnCancel:"Cancelar"}}}}}function q(){const t={input:{root:{id:"All"},indexes:{id:0,label:0}},component:{Root:{strings:{isDisabled:"No disponible",allItems:"Todos",noItems:"Ninguno",btnApply:"Aceptar",btnCancel:"Cancelar"}},Group:{Strings:{allItems:"Todos",noItems:"Ninguno",btnApply:"Aceptar",btnCancel:"Cancelar"}}}};return t.input.indexes.id=1,t.input.indexes.label=0,t}function V(t,e,n,o){const r=Dashboards.getParameterValue(n),a=Dashboards.getParameterValue(o);return Dashboards.fireChange(t,[r]),Dashboards.fireChange(e,[a]),!0}function G(t,e){const n=Dashboards.getParameterValue(e);return Dashboards.fireChange(t,[n]),!0}function J(t,e){Dashboards.fireChange(e,t.resultset[0][0])}function H(t,e){const n=Dashboards.getParameterValue(e),o=t.parameter;t.dashboard.setParameter(o,[n])}function X(t){t.regional.es={monthNames:O,abbreviatedMonthNames:R,dayNames:B,abbreviatedDayNames:k,dayNamesMin:z,weekHeader:"Sm",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},t.setDefaults(t.regional.es)}function Z(t,e){const n=document.getElementById(t);return n?new Tabulator(n,e):(console.error(`No se pudo encontrar el elemento con ID ${t}.`),null)}function K(t,e){let n=t.getValue();return n.length>e&&(n=`${n.substr(0,e)}<br>${n.substr(e)}`),n}function Q(t,e){const n=t.getValue().split(" ");let o="",r="";return n.forEach((t=>{(r+t).length<=e?r+=`${t} `:(o+=`${r}<br>`,r=`${t} `)})),o+=`${r}<br>`,o}function tt(t,e){"expand"===e?t.treeExpand():t.treeCollapse();const n=t.getTreeChildren();n.length>0&&n.forEach((t=>{t.getTreeChildren().length>0&&tt(t,e)}))}function et(t,e){t.getRows().forEach((t=>{t.getTreeChildren().length>0&&tt(t,e)}))}function nt(t,e,n,o){const r=[];for(const a in t)if(t.hasOwnProperty(a)){const i=t[a],l={[e]:i[0],_children:[]};i.shift(),i.forEach(((t,r)=>{const a={[e]:n[r],[o]:t};l._children.push(a)})),r.push(l)}return r}function ot(t){let e=!0;return t.getGroups().forEach((t=>{t._group.visible&&(e=!1)})),e}function rt(t,e,n){const o=document.getElementById(n),r=o.cloneNode(!0);o.parentNode.replaceChild(r,o),r.addEventListener("click",(()=>{t.download("csv",`${e}.csv`,{delimiter:";"})}))}function at(t,e,n){const o=document.getElementById(n),r=o.cloneNode(!0);o.parentNode.replaceChild(r,o),r.addEventListener("click",(()=>{t.download("pdf",`${e}.pdf`,{title:e,rowCalcStyles:{fontSize:8,fontStyle:"bold"},autoTable:{styles:{fontSize:8}}})}))}const it={SO2:[100,200,350,500,750,751],NO2:[40,90,120,230,340,341],O3:[50,100,130,240,380,381],PM10:[20,40,50,100,150,151],PM25:[10,20,25,50,75,76]};function lt(t){const e=[],n={0:"b",1:"a",2:"d",3:"m",4:"mm",5:"em",6:"",7:"nd"};function o(t,e,o){const r=document.createElement("td");if(r.setAttribute("id",t),null!=e){r.innerHTML=e;const t=function(t,e){let o;return void 0===e?o=6:"ND"===e?o=7:(o=5,t.forEach(((t,n)=>{e<=t&&5===o&&(o=n)}))),n[o]}(o,e);r.classList.add(t)}return r}return t.forEach((t=>{const n=t;"noData"===n.operationalstatus&&(n.so2value="ND",n.no2value="ND",n.o3value="ND",n.pm10value="ND",n.pm25value="ND"),"A09_CABANYAL_60m"===n.entityid&&(n.pm10value=void 0,n.pm25value=void 0);const r=document.createElement("tr"),a=document.createElement("td");a.innerHTML=n.address,r.appendChild(a),r.appendChild(o(`${n.entityid}_so2`,n.so2value,it.SO2)),r.appendChild(o(`${n.entityid}_no2`,n.no2value,it.NO2)),r.appendChild(o(`${n.entityid}_o3`,n.o3value,it.O3)),r.appendChild(o(`${n.entityid}_pm10`,n.pm10value,it.PM10)),r.appendChild(o(`${n.entityid}_pm25`,n.pm25value,it.PM25)),e.push(r)})),e}function st(t){document.location=`${document.documentURI.split("%3A")[0]}%3A${document.documentURI.split("%3A")[1]}%3A${document.documentURI.split("%3A")[2]}%3A${document.documentURI.split("%3A")[3]}%3A${t}`}function ct(){const t=window.location.href;let e="";return e=t.includes("localhost")?"local":t.includes("sc_valencia_pre")?"PRE":"PRO",e}function ut(t,e){document.querySelectorAll(`[${t}]`).forEach((n=>{!function(t,e,n){const o=e;if(t){const e=new XMLHttpRequest;e.onreadystatechange=function(){4===this.readyState&&(200===this.status&&(o.innerHTML=this.responseText,n&&n()),404===this.status&&(o.innerHTML="No se ha podido cargar correctamente."))},e.open("GET",t,!0),e.send()}}(n.getAttribute(t),n,e)}))}function dt(t){ut("include-html-cabecera",(function(){!function(){const t=ct();"PRO"!==t&&(document.title+=` (${t})`)}(),function(){const t=ct();"PRO"!==t&&(document.querySelector("nav").querySelectorAll("span")[1].textContent+=` (${t})`)}()})),ut("include-html-menu"),ut("include-html-main-container",(function(){(function(){const t=document.querySelector("body");t.classList.remove("inicio"),t.classList.add(document.documentURI.split("%3A")[4].match(/(.*?).wcdf/)[1])})(),t&&t()})),ut("include-html-copyright")}function ht(t,e,n,o,r,a){let i=!1,l=!1;const s=document.querySelector(t),c=document.querySelector(e),u=()=>{"undefined"!=typeof Liferay&&"ca-ES"===Liferay.ThemeDisplay.getBCP47LanguageId()?(s&&s.setAttribute("src","https://camaras.valencia.es/camaras/ocimovil.html?camara=1&lang=cas"),c&&c.setAttribute("src","https://camaras.valencia.es/camaras/ocimovil.html?lang=cas")):(s&&s.setAttribute("src","https://camaras.valencia.es/camaras/ocimovil.html?camara=1&lang=val"),c&&c.setAttribute("src","https://camaras.valencia.es/camaras/ocimovil.html?lang=val"))};function d(t=!0){const e=document.querySelector(n);t?(s&&(s.src="about:blank"),c&&(c.src="about:blank"),e.classList.add("blur"),l=!0):(e.classList.remove("blur"),u(),l=!1)}const h=t=>{new IntersectionObserver((t=>{t.forEach((t=>{t.isIntersecting&&(l||u(),i||(i=!0,window.setTimeout(d,a)))}))})).observe(t)};!function(){const{userAgent:t}=navigator;return/iPad|iPhone|iPod|Macintosh/.test(t)&&!window.MSStream}()?(s&&(s.setAttribute("sandbox","allow-scripts"),h(s)),c&&(c.setAttribute("sandbox","allow-scripts"),h(c)),document.querySelector(r).addEventListener("click",(()=>{d(!1),window.setTimeout(d,a)}))):document.querySelectorAll(o)[0].style.display="none"}const ft={grid:{containLabel:!0},title:{left:"center",top:"0",textStyle:{fontSize:15,fontFamily:"Montserrat",fontWeight:500,color:"#666"}},legend:{orient:"horizontal",bottom:"0",left:"center",width:"100%",textStyle:{fontSize:11,fontFamily:"Montserrat",fontWeight:400,color:"#666"}},toolbox:{show:!0,right:"0",top:"0",feature:{restore:{textStyle:{fontSize:6,fontFamily:"Montserrat",fontWeight:300}},saveAsImage:{textStyle:{fontSize:6,fontFamily:"Montserrat",fontWeight:300}}},emphasis:{iconStyle:{borderColor:"#ffcd00",textFill:"#666"}}},tooltip:{textStyle:{fontFamily:"Montserrat",fontSize:12}},xAxis:[{type:"category",axisLabel:{show:!0,interval:0,textStyle:{fontFamily:"Montserrat",fontSize:11}},data:[]}],yAxis:[{type:"value",alignTicks:!0,position:"right",axisLabel:{textStyle:{fontSize:10,fontFamily:"Montserrat",fontWeight:400},formatter:t=>`${t}%`}},{type:"value",position:"left",axisLabel:{textStyle:{fontSize:10,fontFamily:"Montserrat",fontWeight:400},formatter:t=>`${h(t)}€`}}]},mt=(t,e)=>{e.sort(((t,e)=>parseInt(t.anyo)-parseInt(e.anyo)));const n={};e.forEach((e=>{const o=e[1],r=e[0];r!==t.seriesName||n[o]||(n[o]=0),r===t.seriesName&&(n[o]+=e[2])}));let o=`<p>${t.seriesName}</p>`;for(const[e,r]of Object.entries(n))o+=`<div>${t.marker} ${e}: <span style="float: right; margin-left:20px;font-weight: 600;">${d(r)}</span></div>`;return o};function St(t,e,n=void 0,o=void 0){const r=null===o?void 0:o,a=new Set(e.map((t=>t[1])));let i;const l={title:{text:"SIN TITULO",left:"center",top:"top",textStyle:{fontSize:20,fontFamily:"Montserrat",fontWeight:600,color:"#666"}},tooltip:{axisPointer:{type:"shadow"},trigger:"item",formatter:t=>mt(t,e),textStyle:{fontFamily:"Montserrat"},position(t,e,n,o,r){const a={},i=r.contentSize[1]/2,l=r.viewSize[1],s=t[1];return s<i?a.top=10:s+i>l?a.bottom=10:a.top=s-i,t[0]<r.viewSize[0]/2?a.left=t[0]+20:a.right=r.viewSize[0]-t[0]+20,a}},legend:{padding:40,textStyle:{fontFamily:"Montserrat"}},grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0},xAxis:{type:"value",splitNumber:10,name:"SIN NOMBRE",nameLocation:"start",nameTextStyle:{fontWeight:"bold",fontFamily:"Montserrat",color:"#666",padding:-40},axisLabel:{margin:5,textStyle:{fontFamily:"Montserrat"},formatter:t=>d(t)},splitLine:{lineStyle:{color:"#DDD"}}},yAxis:{type:"category",data:Array.from(a),axisLabel:{textStyle:{fontFamily:"Montserrat"}}},series:(()=>{const t={name:"SIN NOMBRE",type:"bar",stack:"total",label:{show:!0,fontFamily:"Montserrat",fontSize:10,formatter:t=>d(Math.round(t.value))},itemStyle:void 0,emphasis:{focus:"series"},data:void 0};r&&r.itemStyle&&Array.isArray(r.itemStyle.borderColor)&&(i=[...r.itemStyle.borderColor],delete r.itemStyle.borderColor);const n=function(t){return t.reduce(((t,e)=>{const n=e[0];return t[n]||(t[n]=[]),t[n].push(e),t}),{})}(e),o=Object.keys(n);a.forEach((t=>{o.forEach((e=>{void 0===n[e].find((e=>e[1]===t))&&(n[e].push([n[e][0][0],t,void 0]),n[e].sort())}))}));const l=[];return Object.keys(n).forEach((e=>{i&&(t.itemStyle={borderColor:i.shift()}),t.name=e,t.data=n[e].map((t=>t[2]));let o={};o=void 0!==r?D(t,r):t,l.push({...o})})),l})(),toolbox:{show:!0,feature:{restore:{title:"Restablir"},saveAsImage:{title:"Desar"}},right:50}};let s={};s=void 0!==n?D(l,n):l,S(t,s)}function gt(t){let e={};return e=D(t,ft),e}function pt(t,e,n={},r={}){let a={};a=D(n,{color:["#81B1CC","#ABD9EA","#C2EEF9","#F9E2AF","#F9C780","#FDAE61","#F46D43","#FDAE61","#F9E2AF","#C2EEF9","#ABD9EA","#81B1CC"],yAxis:{data:function(){const t=new Set;return e.forEach((e=>{t.add(e[1])})),Array.from(t).sort(((t,e)=>t-e))}()}});const i={itemStyle:{borderWidth:2,borderColor:["#448DAD","#89CADB","#A0DEE8","#F4D28C","#F4B569","#F79646","#F25930","#F79646","#F4D28C","#A0DEE8","#89CADB","#448DAD"]}},l=null===r?i:D(r,i),s=e;s.forEach(((t,e)=>{s[e][0]=o(t[0])})),St(t,s,a,l)}function yt(t,e=void 0){const n={title:{text:"SIN TITULO",left:"center",top:"top",padding:50,textStyle:{fontSize:14,fontFamily:"Montserrat",fontWeight:400,color:"#333"}},legend:{show:!1},grid:{top:"30%",bottom:"5%",left:"8%",right:"8%"},xAxis:{type:"value",show:!1},yAxis:{show:!1,type:"category"},tooltip:{show:!0,textStyle:{fontFamily:"Montserrat",fontWeight:"600"},appendToBody:!0,formatter:t=>C(t,!1)},series:[{type:"bar",showBackground:!0}]};let o={};o=void 0!==e?D(n,e):n,S(t,o)}const Et="es_ES",bt={es_ES:new Map([["1","Enero"],["2","Febrero"],["3","Marzo"],["4","Abril"],["5","Mayo"],["6","Junio"],["7","Julio"],["8","Agosto"],["9","Septiembre"],["10","Octubre"],["11","Noviembre"],["12","Diciembre"]]),ca_ES:new Map([["1","Gener"],["2","Febrer"],["3","Març"],["4","Abril"],["5","Maig"],["6","Juny"],["7","Juliol"],["8","Agost"],["9","Setembre"],["10","Octubre"],["11","Novembre"],["12","Desembre"]])};function At(t){return Math.max(...t.map((t=>Number(t[0]))))}function Ct(t){const e=t.filter((e=>Number(e[0])===At(t))),n=Array.from({length:12},(()=>0));return e.forEach((([t,e,o])=>{const r=parseInt(e,10)-1;n[r]=o})),n}function It(t){const e=t.filter((e=>Number(e[0])===At(t)-1)),n=Array.from({length:12},(()=>0));return e.forEach((([t,e,o])=>{const r=parseInt(e,10)-1;n[r]=o})),n}function Mt(t,e,n=void 0){const o=At(e).toString(),r=(At(e)-1).toString();yt(t,D({title:{left:"center",top:"-12%",textStyle:{fontSize:15,fontFamily:"Montserrat"}},legend:{top:"10%",show:!0,data:[r,o],textStyle:{fontFamily:"Montserrat"}},grid:{bottom:"8%",top:"20%",right:"2%"},xAxis:[{type:"category",data:u(bt,Et),interval:0,margin:10,axisLabel:{textStyle:{fontSize:10,fontFamily:"Montserrat",fontWeight:400}}}],yAxis:[{type:"value",axisLabel:{formatter:t=>t.toLocaleString("es-ES"),textStyle:{fontSize:10,fontFamily:"Montserrat",fontWeight:400}}}],series:[{name:r,type:"bar",data:It(e)},{name:o,type:"bar",barGap:0,data:Ct(e)}]},n))}function vt(t,e,n){const o=document.querySelector(e),r=document.querySelector(t);let a=!1;r.addEventListener("click",(()=>{!1===a&&(a=!0,o.setAttribute("src","about:blank"),o.setAttribute("src",n),o.onload=()=>{a=!1})})),r.disabled=!1}const xt="id",Tt="fecha",Nt="value";function _t(t,e,n,o){const[r,a]=function(t,e,n){const o=[],r=[];return t.forEach((t=>{e.includes(`${t[xt]}`)?o.push(`${t[Tt]}`):n.includes(`${t[xt]}`)&&r.push(`${t[Tt]}`)})),[o.map((t=>[t,0])),r.map((t=>[t,0]))]}(t,n,o);let i="Datos sin validar";0===a.length&&(i="");const l={name:"Datos validados",type:"line",data:[...r,a[0]],lineStyle:{color:"#00A9A0",width:4},showSymbol:!1,tooltip:{show:!1}};let s="",c="";if(0===a.length){const e=t[t.length-1].fecha;s=e,c=e}else s=a[0][0],c=a[a.length-1][0];return[...e,l,{name:"Datos NO validados",type:"line",data:a,lineStyle:{color:"#80D4CF",width:4},showSymbol:!1,tooltip:{show:!1},markArea:{silent:!0,itemStyle:{opacity:.6,color:"#eee"},tooltip:{show:!1},label:{color:"#333",fontStyle:"normal",fontWeight:"400",fontFamily:"Montserrat",fontSize:11},data:[[{name:i,xAxis:s,yAxis:0},{name:"end",xAxis:c,yAxis:Math.max(...t.filter((t=>null!==t[Nt])).map((t=>parseInt(`${t[Nt]}`,10))))}]]}}]}function Lt(t,e,n=void 0){S(t,D({grid:{left:"2.5%",right:"5%",bottom:"70",top:"150",containLabel:!0},title:{left:"center",top:"top",textStyle:{fontSize:20,fontFamily:"Montserrat",fontWeight:600,color:"#666"}},legend:{type:"plain",top:"50",width:"98%",textStyle:{fontFamily:"Montserrat"}},tooltip:{trigger:"axis",show:!0,formatter:t=>y(t),textStyle:{fontFamily:"Montserrat"}},xAxis:{type:"category",boundaryGap:!1,splitLine:{show:!1},axisLabel:{textStyle:{fontSize:10,fontFamily:"Montserrat",color:"#666"}}},yAxis:{type:"value",nameLocation:"end",nameGap:"0",nameTextStyle:{fontFamily:"Montserrat",fontWeight:"500",padding:[-25,0,0,-48],margin:0,align:"left",verticalAlign:"top",width:"auto"},scale:!0,splitNumber:"6",axisLabel:{margin:10,textStyle:{fontSize:10,fontFamily:"Montserrat",color:"#666"}}},dataZoom:{end:100,borderColor:"#eee",fillerColor:"rgba(0,0,0,.05)",textStyle:{fontSize:10,fontFamily:"Montserrat",color:"#333",textBorderColor:"#fff",textBorderWidth:3,fontWeight:"600"},selectedDataBackground:{lineStyle:{color:"#333"},areaStyle:{color:"#ffcd00"}},dataBackground:{backgroundColor:"rgba(0,0,0,1)",lineStyle:{color:"#333"},areaStyle:{color:"rgba(0,0,0,0.5)"}},handleStyle:{color:"rgba(0,0,0,0.2)"},moveHandleStyle:{color:"rgba(0,0,0,0.3)"},emphasis:{handleStyle:{color:"rgba(255,205,0,1)"},moveHandleStyle:{color:"rgba(255,205,0,1)"}}},toolbox:{feature:{restore:{title:"Restablir"},saveAsImage:{title:"Desar"}},right:"1%",top:"0%"},series:e},n))}return e})(),t.exports=e()}},e={};function n(o){var r=e[o];if(void 0!==r)return r.exports;var a=e[o]={exports:{}};return t[o](a,a.exports,n),a.exports}n.d=(t,e)=>{for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var o={};return(()=>{"use strict";n.r(o),n.d(o,{echartInstancesSeuElectronicaBarMonth:()=>O,echartInstancesSeuElectronicaRelojSemicircle:()=>z,echartInstancesSeuElectronicaStackedBarYears:()=>W,echartInstanciesSeuElectronica:()=>F,echartSeuElectronica:()=>w,echartSeuElectronicaBarMonth:()=>R,echartSeuElectronicaRelojSemicircle:()=>P,echartSeuElectronicaStackedBarYears:()=>q,echartYearInstancesSeuElectronicaGaugeSemicircle:()=>B,echartYearSeuElectronicaGaugeSemicircle:()=>k,initStackedBarChartSedeElec:()=>U});const t={es_ES:new Map([["TittleAccChart","EVOLUCIÓN DIARIA ACCESOS A LA SEDE ELECTRÓNICA"],["Acces","Accesos"],["TittleInstancesChart","INSTANCIAS SEDE ELECTRÓNICA: EVOLUCIÓN DIARIA"],["InstancesChartText","Instancias electrónicas"],["Instances","Instancias"],["TittleInstancesYearlyChart","INSTANCIAS SEDE ELECTRÓNICA: DESGLOSE DE LOS ULTIMOS AÑOS"],["TittleAccessYearlyChart","ACCESOS A LA SEDE ELECTRÓNICA: DESGLOSE DE LOS ULTIMOS AÑOS"],["TittleInstancesMonthlyChart","INSTANCIAS SEDE ELECTRÓNICA: EVOLUCIÓN MENSUAL"],["TittleAccessMonthlyChart","ACCESOS A SEDE ELECTRÓNICA: EVOLUCIÓN MENSUAL"],["TittleInstancesPrevYearsChart","INSTANCIAS SEDE ELECTRÓNICA: ULTIMOS AÑOS"],["TittleAccessPrevYearsChart","ACCESOS SEDE ELECTRÓNICA: ULTIMOS AÑOS"],["TittleInstancesCurrMonth","INSTANCIAS SEDE ELECTRÓNICA: MES ACTUAL"],["TittleInstancesPrevMonth","INSTANCIAS SEDE ELECTRÓNICA: MES ANTERIOR"],["TittleAccessCurrMonth","ACCESOS SEDE ELECTRÓNICA: MES ACTUAL"],["TittleAccessPrevMonth","ACCESOS SEDE ELECTRÓNICA: MES ANTERIOR"]]),ca_ES:new Map([["TittleAccChart","ACCESSOS A SEU ELECTRÒNICA: EVOLUCIÓ DIÀRIA"],["Acces","Accessos"],["TittleInstancesChart","INSTÀNCIES SEU ELECTRÒNICA: EVOLUCIÓ DIÀRIA"],["InstancesChartText","Instancias electrónicas"],["Instances","Instàncies"],["TittleInstancesYearlyChart","INSTÀNCIES SEU ELECTRÒNICA: DESGLOSSAMENT DELS ÚLTIMS ANYS"],["TittleAccessYearlyChart","ACCESSOS A SEU ELECTRÒNICA: DESGLOSSAMENT DELS ÚLTIMS ANYS"],["TittleInstancesMonthlyChart","INSTÀNCIES SEU ELECTRÒNICA: EVOLUCIÓ MENSUAL"],["TittleAccessMonthlyChart","ACCESSOS A SEU ELECTRÒNICA: EVOLUCIÓ MENSUAL"],["TittleInstancesPrevYearsChart","INSTÀNCIES SEU ELECTRÒNICA: ÚLTIMS ANYS"],["TittleAccessPrevYearsChart","ACCESSOS A SEU ELECTRÒNICA: ÚLTIMS ANYS"],["TittleInstancesCurrMonth","INSTÀNCIES SEU ELECTRÒNICA: MES ACTUAL"],["TittleInstancesPrevMonth","INSTÀNCIES SEU ELECTRÒNICA: MES ANTERIOR"],["TittleAccessCurrMonth","ACCESSOS SEU ELECTRÒNICA: MES ACTUAL"],["TittleAccessPrevMonth","ACCESSOS A SEU ELECTRÒNICA: MES ANTERIOR"]])},e="ca_ES",r="8%",a="2.5%",i="5%",l="18%",s="20%",c="10%",u="90%",d="1%",h="0%",f=0,m=["#9c89b8","#4ea8de","#05668d","#ffbf69","#e56b6f","#83c5be","#02c39a","#ee9b00","#cdb4db","#ffadad","#ce4257","#b7b7a4"],S=33,g=27,p=30;function y(t){let e=navigator.language||navigator.userLanguage;e=e.length<=2?`${e}-${e.toUpperCase()}`:e;const n={minimumFractionDigits:0,maximumFractionDigits:2};return"es-ES"===e?t.toLocaleString("de-DE",n):t.toLocaleString(e,n)}function E(t){return y(t)}function b(t,e){const n=t?document.querySelector(t):null,o=e?document.querySelector(e):null;n&&(n.hidden=!0),o&&(o.style.background="url('./build/images/nodata1.png') no-repeat top center",o.hidden=!1)}function A(t,e){const n=t?document.querySelector(t):null,o=e?document.querySelector(e):null;n&&(n.hidden=!0),o&&(o.style.background="#ffffff",o.hidden=!1)}function C(t,e,n=1){const o=Math.max(...t.map((t=>t[e])))*n;return 5e3*Math.ceil(o/5e3)}function I(t){return Math.round(document.getElementById(t).offsetWidth/S)}function M(t,e,n,o,f,m,S,g=5,p="",b=f,A=100,C,I=void 0,M=void 0){return{title:{text:p,left:"center",top:"top",textStyle:{fontSize:20,fontFamily:"Montserrat",fontWeight:600,color:"#666"}},tooltip:{trigger:"axis",show:!0,formatter:t=>function(t,e=!1){let n=`<p>${t[0].name}</p>`;return t.forEach((t=>{const o=e?Math.round(t.data):t.data,r=`<div>${a=t.color,`<span style="display:inline-block;margin-right:5px;border-radius:10px;width:9px;height:9px;background-color:${a}"></span>`} ${t.seriesName}: <strong style="float: right; margin-left:20px">${t.data?y(o):"-"}</strong></div>`;var a;n+=r})),n}(t),textStyle:{fontFamily:"Montserrat"}},legend:e?{type:"plain",data:e,textStyle:{fontFamily:"Montserrat"},top:I||r,selected:C}:null,grid:{left:a,right:i,bottom:l,top:e?I?"30%":s:c,heigh:u,containLabel:!0},xAxis:{type:"category",data:n,boundaryGap:!1,splitLine:{show:!1},axisLabel:{textStyle:{fontSize:10,fontFamily:"Montserrat",color:"#666"}}},yAxis:{name:o,nameLocation:"end",nameTextStyle:{fontFamily:"Montserrat",fontWeight:"bold",padding:[0,0,0,S]},type:"value",scale:!0,min:M,axisLabel:{margin:g,formatter:E,textStyle:{fontSize:10,fontFamily:"Montserrat",color:"#666"}}},series:t,dataZoom:[{show:m,data:n,start:b,end:A,borderColor:"#eee",fillerColor:"rgba(0,0,0,.05)",textStyle:{fontSize:10,fontFamily:"Montserrat",color:"#333",textBorderColor:"#fff",textBorderWidth:3,fontWeight:"600"},selectedDataBackground:{lineStyle:{color:"#333"},areaStyle:{color:"#ffcd00"}},dataBackground:{backgroundColor:"rgba(0,0,0,1)",lineStyle:{color:"#333"},areaStyle:{color:"rgba(0,0,0,0.5)"}},handleStyle:{color:"rgba(0,0,0,0.2)"},moveHandleStyle:{color:"rgba(0,0,0,0.3)"},emphasis:{handleStyle:{color:"rgba(255,205,0,1)"},moveHandleStyle:{color:"rgba(255,205,0,1)"}}}],toolbox:{show:m,feature:{restore:{title:"Restablir"},saveAsImage:{title:"Desar"}},right:d,top:h}}}function v(t,e,n=-45,o="",r=e){const a=new Set,i=[];t.forEach((t=>{const e=t[0].toString().padStart(2,"0");a.add(`${e}/${t[1]}`),i.push(Math.round(t[2]))}));const l=i.length<100?40:80;return M({name:r,type:"bar",smooth:!1,barMaxWidth:40,itemStyle:{color:"#5470c6"},textStyle:{fontFamily:"Montserrat"},data:i},null,Array.from(a.values()),e,l,!0,n,25,o)}function x(t,e,n,o){return{color:m,title:{text:t,left:"center",top:"top",padding:10,textStyle:{fontSize:o,fontFamily:"Montserrat",fontWeight:600,color:"#666"}},tooltip:{show:!0,textStyle:{fontFamily:"Montserrat"},formatter:t=>function(t,e){const n=`<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:${t.color};"></span>`;let o=`${t.name} : `;return o+=`<span style="font-weight:bold">${y(t.value)}</span>`,e&&(o+=`<span> (${t.percent}%)</span>`),n+o}(t,!1)},splitNumber:3,series:{type:"gauge",max:e,startAngle:-180,endAngle:0,splitNumber:2,pointer:{show:!1,icon:"roundRect"},progress:{show:!0,overlap:!1,roundCap:!0,clip:!0,itemStyle:{borderWidth:1,borderColor:"#464646"}},axisLine:{lineStyle:{width:60}},splitLine:{show:!0,distance:10,length:10},axisTick:{show:!0,splitNumber:5},axisLabel:{show:!0,distance:70,formatter:t=>y(Math.round(t)),fontFamily:"Montserrat",color:"#666"},data:n,detail:{fontSize:o/1.2,color:"inherit",formatter:t=>y(Math.round(t))}},toolbox:{show:!0,feature:{saveAsImage:{title:"Desar"}},right:g,top:p}}}function T(t,e="",n){const o=[],r=C(t,1,1.1),a=r.toString().length>=9?100:95,i=115===a?-45:-35;let l=t.length<5?t.length*i:-190;for(let e=0;e<t.length;e+=1)o.push({value:t[e][1],name:String(t[e][0]),title:{offsetCenter:[String(l),"20%"],fontFamily:"Montserrat"},detail:{offsetCenter:[String(l),"35%"],fontFamily:"Montserrat"}}),l+=a;return x(e,r,o,n)}function N(t,e,n="",o){return{title:{text:n,left:"center",top:"top",padding:10,textStyle:{fontSize:o,fontFamily:"Montserrat",fontWeight:600,color:"#666"}},series:{type:"gauge",startAngle:-180,endAngle:0,splitNumber:2,max:C(t,2),itemStyle:{color:"#FFAB91"},progress:{show:!0,width:30},pointer:{show:!1},axisLine:{lineStyle:{width:30}},axisTick:{distance:10,splitNumber:5,lineStyle:{width:2,color:"#999"}},splitLine:{distance:10,length:14,lineStyle:{width:3,color:"#999"}},axisLabel:{fontFamily:"Montserrat",color:"#666",fontSize:14,show:!0,distance:40,formatter:t=>y(Math.round(t))},anchor:{show:!1},title:{show:!1},detail:{valueAnimation:!0,width:"60%",lineHeight:40,borderRadius:8,offsetCenter:[-5,"-10%"],fontSize:o+5,fontWeight:"bolder",formatter:n=>function(t,e,n){const o=y(Math.round(e)),r=(a=t[n][0],{1:"Gen",2:"Feb",3:"Mar",4:"Abr",5:"Mai",6:"Jun",7:"Jul",8:"Ago",9:"Sep",10:"Oct",11:"Nov",12:"Des"}[parseInt(a.toString(),10)]);var a;const i=t[n][1],l=`\n\n\n${r} ${i} : ${o}`,s=`${o}\n${r} ${i}`;return window.innerWidth<=1710?l:s}(t,n,e),fontFamily:"Montserrat",color:"inherit"},data:[{value:t[e][2]}]},toolbox:{show:!0,feature:{saveAsImage:{title:"Desar"}},right:g,top:p}}}function _(t,e){const n=document.getElementById(t);if(!n)return console.error(`No se pudo encontrar el elemento con ID ${t}.`),null;const o=echarts.init(n);return o.setOption(e,!0),$(window).on("resize",(()=>{null!=o&&void 0!==o&&o.resize()})),o}function L(t){return t.replace(/^(\d{4})[-|\/](\d{2})[-|\/](\d{2})$/g,"$3/$2/$1")}function D(t){return 100*(t-120)/t}function w(n,o){if(0===o.resultset.length)b("#chartSeuElectronica","#no_dataSeuElectronica");else{A("#no_dataSeuElectronica","#chartSeuElectronica");const n=o.resultset,r=o.resultset.length,a=new Set,i=[];for(let t=0;t<r;t+=1)a.add(n[t][0]),i.push(n[t][1]);const l=D(a.size);_("chartSeuElectronica",M([{name:t[e].get("Acces"),type:"line",smooth:!1,symbol:"circle",symbolSize:6,itemStyle:{color:"#3f02f7"},data:i}],null,Array.from(a.values()),t[e].get("Acces"),l,!0,f,void 0,t[e].get("TittleAccChart")))}}function F(n,o){if(0===o.resultset.length)b("#chartInstanciesSeuElectronica","#no_dataInstanciesSeuElectronica");else{A("#no_dataInstanciesSeuElectronica","#chartInstanciesSeuElectronica");const n=o.resultset,r=o.resultset.length,a=new Set,i=[],l=[];for(let t=0;t<r;t+=1)a.add(L(n[t][0])),i.push(L(n[t][0])),l.push(n[t][1]);const s=D(a.size);_("chartInstanciesSeuElectronica",M([{name:t[e].get("InstancesChartText"),type:"line",symbol:"circle",symbolSize:6,smooth:!1,itemStyle:{color:"#3f02f7"},data:l}],null,Array.from(a.values()),t[e].get("Instances"),s,!0,20,void 0,t[e].get("TittleInstancesChart")))}}function O(n,o){0===o.resultset.length?b("#chartInstancesSeuElectronica_BarMonth","#no_dataInstancesSeuElectronica_BarMonth"):(A("#no_dataInstancesSeuElectronica_BarMonth","#chartInstancesSeuElectronica_BarMonth"),_("chartInstancesSeuElectronica_BarMonth",v(o.resultset,t[e].get("Instances"),void 0,t[e].get("TittleInstancesMonthlyChart"),t[e].get("InstancesChartText"))))}function R(n,o){0===o.resultset.length?b("#chartSeuElectronica_BarMonth","#no_dataSeuElectronica_BarMonth"):(A("#no_dataSeuElectronica_BarMonth","#chartSeuElectronica_BarMonth"),_("chartSeuElectronica_BarMonth",v(o.resultset,t[e].get("Acces"),void 0,t[e].get("TittleAccessMonthlyChart"))))}function B(n,o){if(0===o.resultset.length)b("#chartYearInstancesSeuElectronica_gauge_semicircle","#no_dataYearInstancesSeuElectronica_gauge_semicircle");else{A("#no_dataYearInstancesSeuElectronica_gauge_semicircle","#chartYearInstancesSeuElectronica_gauge_semicircle");const n=I("chartYearSeuElectronica_gauge_semicircle");_("chartYearInstancesSeuElectronica_gauge_semicircle",T(o.resultset,t[e].get("TittleInstancesPrevYearsChart"),n))}}function k(n,o){if(0===o.resultset.length)b("#chartYearSeuElectronica_gauge_semicircle","#no_dataYearSeuElectronica_gauge_semicircle");else{A("#no_dataYearSeuElectronica_gauge_semicircle","#chartYearSeuElectronica_gauge_semicircle");const n=I("chartYearSeuElectronica_gauge_semicircle");_("chartYearSeuElectronica_gauge_semicircle",T(o.resultset,t[e].get("TittleAccessPrevYearsChart"),n))}}function z(n,o){if(0===o.resultset.length)b("#chartInstancesSeuElectronica_reloj_semicircle","#no_dataInstancesSeuElectronica_reloj_semicircle"),b("#chartInstancesSeuElectronica_reloj_semicircle_lastmonth","#no_dataInstancesSeuElectronica_reloj_semicircle_lastmonth");else{A("#no_dataInstancesSeuElectronica_reloj_semicircle","#chartInstancesSeuElectronica_reloj_semicircle"),A("#no_dataInstancesSeuElectronica_reloj_semicircle_lastmonth","#chartInstancesSeuElectronica_reloj_semicircle_lastmonth");const n=0,r=1,a=o.resultset,i=I("chartSeuElectronica_reloj_semicircle");_("chartInstancesSeuElectronica_reloj_semicircle",N(a,n,t[e].get("TittleInstancesCurrMonth"),i)),_("chartInstancesSeuElectronica_reloj_semicircle_lastmonth",N(a,r,t[e].get("TittleInstancesPrevMonth"),i))}}function P(n,o){if(0===o.resultset.length)b("#chartSeuElectronica_reloj_semicircle","#no_dataSeuElectronica_reloj_semicircle"),b("#chartSeuElectronica_reloj_semicircle_lastmonth","#no_dataSeuElectronica_reloj_semicircle_lastmonth");else{A("#no_dataSeuElectronica_reloj_semicircle","#chartSeuElectronica_reloj_semicircle"),A("#no_dataSeuElectronica_reloj_semicircle_lastmonth","#chartSeuElectronica_reloj_semicircle_lastmonth");const n=0,r=1,a=o.resultset,i=I("chartSeuElectronica_reloj_semicircle");_("chartSeuElectronica_reloj_semicircle",N(a,n,t[e].get("TittleAccessCurrMonth"),i)),_("chartSeuElectronica_reloj_semicircle_lastmonth",N(a,r,t[e].get("TittleAccessPrevMonth"),i))}}var j=n(2725);const Y="ca_ES";function U(t,e){if(0===e.resultset.length)(0,j.printNoDataChart)(`#${t.idChart}`,`#${t.idNoData}`);else{const n={title:{text:t.chartName},xAxis:{name:`\n\n\n\n${t.yAxisName}`}};(0,j.initStackedBarChartMonthSeries)(t.idChart,e.resultset,n)}}function W(e,n){U({idChart:"chartInstancesSeuElectronica_stackedBarYears",idNoData:"no_dataInstancesSeuElectronica_stackedBarYears",chartName:t[Y].get("TittleInstancesYearlyChart"),yAxisName:t[Y].get("Instances")},n)}function q(e,n){U({idChart:"chartSeuElectronica_stackedBarYears",idNoData:"no_dataSeuElectronica_stackedBarYears",chartName:t[Y].get("TittleAccessYearlyChart"),yAxisName:t[Y].get("Acces")},n)}})(),o})()));
1
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.seuElectronica=e():t.seuElectronica=e()}(self,(()=>(()=>{var t={2725:t=>{var e;self,e=()=>(()=>{"use strict";var t={d:(e,n)=>{for(var o in n)t.o(n,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:n[o]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{THRESHOLDS:()=>it,addPointInteger:()=>d,buildCamarasTrafico:()=>ht,buildTableCalidadAire:()=>lt,calculateMaxYAxis:()=>b,calculatePentahoPath:()=>st,calculateXAxisStart:()=>E,checkAllGroupsCollapsed:()=>ot,configureDataBar:()=>_,configureDataGaugeCommon:()=>v,configureDataGaugeMonthCommon:()=>x,configureDataLine:()=>N,configureDataValidate:()=>_t,configureLinesChartValidates:()=>Lt,convertToLanguageSelectorDateRange:()=>X,convertToTableTreeView:()=>nt,downloadCSVTable:()=>rt,downloadPDFTable:()=>at,formatCellMultiplesLines:()=>Q,formatDayMonthYear:()=>i,formatMilMillionEuros:()=>I,formatMonthAnyo:()=>a,formatName:()=>m,formatNameHeaderColumn:()=>K,formatRoundTooltip:()=>C,formatShortMonthShortYear:()=>s,formatShortMonthYear:()=>l,formatToMillions:()=>h,formatToTons:()=>f,formatTooltip:()=>y,formatTooltipPie:()=>A,formatTrimestre:()=>c,getEnvironment:()=>ct,getMaxFieldNumberFromData:()=>$,getMonth:()=>o,getMonthList:()=>u,getSelectCommonOptions:()=>W,getSelectTwoColumnsOptions:()=>q,initBarChart:()=>yt,initBarChartComparationMonth:()=>Mt,initChart:()=>S,initStackedBarChart:()=>St,initStackedBarChartMonthSeries:()=>pt,initTable:()=>Z,initValueDefaultDate:()=>J,initialCalls:()=>dt,loadIframeOnClickEvent:()=>vt,printDataChart:()=>p,printDataInHTMLElements:()=>w,printNoDataChart:()=>g,resetFilter:()=>U,resetFilterDate:()=>G,resetFilterDates:()=>V,resultsetWithFields:()=>L,selectConfigDatasource:()=>Y,selectFilterAll:()=>P,selectValueDefaultInFilter:()=>H,splitDataset:()=>F,traverseRows:()=>et,updateObject:()=>D,updateStackedBarOptions:()=>gt});const n={"01":"Enero","02":"Febrero","03":"Marzo","04":"Abril","05":"Mayo","06":"Junio","07":"Julio","08":"Agosto","09":"Septiembre",10:"Octubre",11:"Noviembre",12:"Diciembre"};function o(t){return{1:"Gen",2:"Feb",3:"Mar",4:"Abr",5:"Mai",6:"Jun",7:"Jul",8:"Ago",9:"Sep",10:"Oct",11:"Nov",12:"Des"}[parseInt(t.toString(),10)]}function r(t){return[t.substring(0,4),n[t.substring(4,6)]]}function a(t){const[e,n]=r(t);return`${n} ${e}`}function i(t){const[e,o,r]=function(t){return[t.substring(0,4),n[t.substring(4,6)],t.substring(6,8)]}(t);return`${r} ${o} ${e}`}function l(t){const[e,n]=r(t);return`${n.substring(0,3)} ${e}`}function s(t){const[e,n]=r(t);return`${n.substring(0,3)} '${e.substring(2,4)}`}function c(t){const[e,n]=t.split("-");return`${parseFloat(n)/3}T ${e}`}function u(t,e){const n=t[e];return Array.from(n.values()).map((t=>t.slice(0,3)))}function d(t,e=2){let n=navigator.language||navigator.userLanguage;n=n.length<=2?`${n}-${n.toUpperCase()}`:n;const o={minimumFractionDigits:0,maximumFractionDigits:e};return"es-ES"===n?t.toLocaleString("de-DE",o):t.toLocaleString(n,o)}function h(t){const e=1e6;return t>=e?t/e+"M":t.toString()}function f(t){return t>=1e3?t/1e3+" Tn":t.toString()}function m(t,e=29){if(t.length>=e){const n=t.split(" ");let o="",r="";return n.forEach((t=>{`${o} ${t}`.length<=e?o+=(o?" ":"")+t:(r+=`${o}\n`,o=t)})),r+=o,r}return t}function S(t,e){const n=document.getElementById(t);if(!n)return console.error(`No se pudo encontrar el elemento con ID ${t}.`),null;const o=echarts.init(n);o.setOption(e,!0),window.addEventListener("resize",(()=>{null!=o&&void 0!==o&&o.resize()}));const r=document.getElementById("main-content");return r&&(r.addEventListener("shown.bs.collapse",(()=>{o.resize()})),r.addEventListener("hidden.bs.collapse",(()=>{o.resize()}))),o}function g(t,e){const n=t?document.querySelector(t):null,o=e?document.querySelector(e):null;n&&(n.hidden=!0),o&&(o.style.background="url('./build/images/nodata1.png') no-repeat top center",o.hidden=!1)}function p(t,e){const n=t?document.querySelector(t):null,o=e?document.querySelector(e):null;n&&(n.hidden=!0),o&&(o.style.background="#ffffff",o.hidden=!1)}function y(t,e=!1,n=!0,o=""){let r=`<p style="font-weight: 500;color: #565656;">${t[0].name}</p>`;return t.forEach((t=>{const a=e?Math.round(t.data):t.data,i=n?`<div style="font-weight: 400;color: #666;">${l=t.color,`<span style="display:inline-block;margin-right:5px;border-radius:10px;width:9px;height:9px;font-weight: 500;background-color:${l}"></span>`} ${t.seriesName}: \n <span style="float: right; margin-left:20px;font-weight: 600;color: #565656;">\n ${t.data?`${d(a)} ${o}`:"-"}\n </span>\n </div>`:`<div>\n <span style="font-weight: 600;color: #565656;">${t.data?`${d(a)} ${o}`:"-"}\n </span>\n </div>`;var l;r+=i})),r}function E(t){return 100*(t-120)/t}function b(t,e){const n=Math.max(...t);return n+(e-n%e)}function A(t,e=!1){const n=`<span style="display:inline-block;margin-right:5px;border-radius:10px;width:9px;height:9px;background-color:${t.color}"></span>`,o=e?`${t.percent}%`:d(t.value);return`<div> ${n} ${t.name} <span style="float: right; margin-left:20px;font-weight: 600;color: #333;"> ${o} </span></div>`}function C(t,e){let n=`${t.name} : `;return n+=`<span style="font-weight:500">${d(Math.round(t.value))}</span>`,e&&(n+=`<span> (${t.percent}%)</span>`),t.marker+n}function I(t){const e=1e6,n=Number(t);return n>=0&&n<e?`${d(n)} €`:n>=e?`${d(n/e)} M €`:"-"}function M(t,e,n=1){const o=Math.max(...t.map((t=>t[e])))*n;return 5e3*Math.ceil(o/5e3)}function v(t,e,n,o=30,r=15,a=30,i=-70,l=70,s=3){const c=M(t,e.data,1.1),u=l,h=n.slice(),f=[];let S=r,g=a,p=i;for(let n=0;n<t.length;n+=1)f.push({value:t[n][e.data],name:m(String(t[n][e.type]).replace(/\[.*?\]/g,"")),color:h.shift(),title:{offsetCenter:[`${String(p)}%`,`${String(S)}%`],fontFamily:"Montserrat",fontSize:o},detail:{offsetCenter:[`${String(p)}%`,`${String(g)}%`],fontFamily:"Montserrat",width:"33%",formatter:t=>d(Math.round(t))}}),p+=u,(n+1)%s==0&&(g+=a,S+=2*r,p=i);return[c,f]}function x(t,e,n,r=0){return[M(e,n.data,1),t=>function(t,e,n){const r=d(Math.round(e)),a=o(t[n][0]),i=t[n][1],l=`\n${a} ${i} : ${r}`,s=`${r}\n${a} ${i}`;return window.innerWidth<=1710?l:s}(e,t,r),[{value:e[r][n.data]}]]}function T(t,e){const{resultset:n}={resultset:t},o=new Set,r=new Set,a=n.map((([t,n,a])=>{const i=e?Math.round(a):a;return o.add(t),r.add(n),{day:n,type:t,value:i}})),i=Array.from(r.values()),l=Array.from(o.values());return l.sort(((t,e)=>t.toLowerCase().localeCompare(e.toLowerCase(),"es",{ignorePunctuation:!0}))),[l.map((t=>{const e=a.filter((e=>e.type===t)).map((({day:e,value:n})=>[e,t,n])),n=i.map((t=>{const n=e.find((([e])=>e===t));return n?n[2]:null}));return{name:t,data:n}})),l,r]}function N(t,e=[],n=!1){const[o,r,a]=T(t,n);return o.forEach((t=>{t.type="line",t.symbol="circle",t.symbolSize=6,t.smooth=.1,e.length>0&&(t.color=e.shift())})),[o,a,r]}function _(t,e,n=!1){const[o,r,a]=T(t,n);return o.forEach((t=>{t.type="bar",t.color=e.shift(),t.smooth=!1})),[o,a,r]}function L(t){const{resultset:e,metadata:n}=t,o=[];return e.forEach((t=>{const e={};t.forEach(((t,o)=>{e[n[o].colName]=t})),o.push(e)})),o}function D(t,e){const n={...t};return Object.keys(e).forEach((o=>{Object.prototype.hasOwnProperty.call(e,o)&&("series"===o&&Array.isArray(e[o])?n[o]=e[o].map(((e,n)=>({...Array.isArray(t[o])&&t[o][n]||{},...e}))):"object"!=typeof e[o]||null===e[o]||Array.isArray(e[o])?t[o]!==e[o]&&(n[o]=e[o]):n[o]=D(t[o]||{},e[o]))})),n}function w(t,e){t.forEach((t=>{t.id in e&&Object.entries(e[t.id]).forEach((n=>{const o=n[0],r=n[1];"object"==typeof r?r.className?document.querySelector(r.className).className=t[o]:r.element&&r.format&&(document.querySelector(r.element).textContent=e[t.id][o].format(t[o])):document.querySelector(r).textContent=t[o]}))}))}function $(t,e){const n=L(t),o=[];let r=null;return n.forEach((t=>{const n=t[e];"number"!=typeof n||Number.isNaN(n)||o.push(n)})),o.length>0&&(r=Math.max(...o)),r}function F(t,e=!0){const n={Cont:[],Mob:[]};return t.forEach((t=>{"is-res-001-kgs-contenidors"===t[0]&&"total"===t[1]&&(e?n.Cont.push([t[3],t[4],t[2]]):n.Cont.push([t[3],t[2]])),"Mobles"===t[1]&&(e?n.Mob.push([t[3],t[4],t[2]]):n.Mob.push([t[3],t[2]]))})),n}const O=["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],R=["Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic"],B=["Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado"],k=["Dom","Lun","Mar","Mié","Juv","Vie","Sáb"],z=["Do","Lu","Ma","Mi","Ju","Vi","Sá"];function P(t){const e=t.resultset.map((t=>t[0]));return this.dashboard.fireChange(this.parameter,e),t}function j(t){for(const e of t)if(Array.isArray(e)){if(!j(e))return!1}else if("All"!==e)return!1;return!0}function Y(t,e,n,o){return j(e)?(t.queryDefinition.dataAccessId=n,t.dashboard.setParameter(t.parameter,["All"])):t.queryDefinition.dataAccessId=o,!0}function U(t){t.forEach((t=>{Dashboards.fireChange(t,["All"])}))}function W(){return{input:{root:{id:"All"},indexes:{id:0,label:0}},component:{Root:{strings:{isDisabled:"No disponible",allItems:"Todos",noItems:"Ninguno",btnApply:"Aceptar",btnCancel:"Cancelar"}},Group:{Strings:{allItems:"Todos",noItems:"Ninguno",btnApply:"Aceptar",btnCancel:"Cancelar"}}}}}function q(){const t={input:{root:{id:"All"},indexes:{id:0,label:0}},component:{Root:{strings:{isDisabled:"No disponible",allItems:"Todos",noItems:"Ninguno",btnApply:"Aceptar",btnCancel:"Cancelar"}},Group:{Strings:{allItems:"Todos",noItems:"Ninguno",btnApply:"Aceptar",btnCancel:"Cancelar"}}}};return t.input.indexes.id=1,t.input.indexes.label=0,t}function V(t,e,n,o){const r=Dashboards.getParameterValue(n),a=Dashboards.getParameterValue(o);return Dashboards.fireChange(t,[r]),Dashboards.fireChange(e,[a]),!0}function G(t,e){const n=Dashboards.getParameterValue(e);return Dashboards.fireChange(t,[n]),!0}function J(t,e){Dashboards.fireChange(e,t.resultset[0][0])}function H(t,e){const n=Dashboards.getParameterValue(e),o=t.parameter;t.dashboard.setParameter(o,[n])}function X(t){t.regional.es={monthNames:O,abbreviatedMonthNames:R,dayNames:B,abbreviatedDayNames:k,dayNamesMin:z,weekHeader:"Sm",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},t.setDefaults(t.regional.es)}function Z(t,e){const n=document.getElementById(t);return n?new Tabulator(n,e):(console.error(`No se pudo encontrar el elemento con ID ${t}.`),null)}function K(t,e){let n=t.getValue();return n.length>e&&(n=`${n.substr(0,e)}<br>${n.substr(e)}`),n}function Q(t,e){const n=t.getValue().split(" ");let o="",r="";return n.forEach((t=>{(r+t).length<=e?r+=`${t} `:(o+=`${r}<br>`,r=`${t} `)})),o+=`${r}<br>`,o}function tt(t,e){"expand"===e?t.treeExpand():t.treeCollapse();const n=t.getTreeChildren();n.length>0&&n.forEach((t=>{t.getTreeChildren().length>0&&tt(t,e)}))}function et(t,e){t.getRows().forEach((t=>{t.getTreeChildren().length>0&&tt(t,e)}))}function nt(t,e,n,o){const r=[];for(const a in t)if(t.hasOwnProperty(a)){const i=t[a],l={[e]:i[0],_children:[]};i.shift(),i.forEach(((t,r)=>{const a={[e]:n[r],[o]:t};l._children.push(a)})),r.push(l)}return r}function ot(t){let e=!0;return t.getGroups().forEach((t=>{t._group.visible&&(e=!1)})),e}function rt(t,e,n){const o=document.getElementById(n),r=o.cloneNode(!0);o.parentNode.replaceChild(r,o),r.addEventListener("click",(()=>{t.download("csv",`${e}.csv`,{delimiter:";"})}))}function at(t,e,n){const o=document.getElementById(n),r=o.cloneNode(!0);o.parentNode.replaceChild(r,o),r.addEventListener("click",(()=>{t.download("pdf",`${e}.pdf`,{title:e,rowCalcStyles:{fontSize:8,fontStyle:"bold"},autoTable:{styles:{fontSize:8}}})}))}const it={SO2:[100,200,350,500,750,751],NO2:[40,90,120,230,340,341],O3:[50,100,130,240,380,381],PM10:[20,40,50,100,150,151],PM25:[10,20,25,50,75,76]};function lt(t){const e=[],n={0:"b",1:"a",2:"d",3:"m",4:"mm",5:"em",6:"",7:"nd"};function o(t,e,o){const r=document.createElement("td");if(r.setAttribute("id",t),null!=e){r.innerHTML=e;const t=function(t,e){let o;return void 0===e?o=6:"ND"===e?o=7:(o=5,t.forEach(((t,n)=>{e<=t&&5===o&&(o=n)}))),n[o]}(o,e);r.classList.add(t)}return r}return t.forEach((t=>{const n=t;"noData"===n.operationalstatus&&(n.so2value="ND",n.no2value="ND",n.o3value="ND",n.pm10value="ND",n.pm25value="ND"),"A09_CABANYAL_60m"===n.entityid&&(n.pm10value=void 0,n.pm25value=void 0);const r=document.createElement("tr"),a=document.createElement("td");a.innerHTML=n.address,r.appendChild(a),r.appendChild(o(`${n.entityid}_so2`,n.so2value,it.SO2)),r.appendChild(o(`${n.entityid}_no2`,n.no2value,it.NO2)),r.appendChild(o(`${n.entityid}_o3`,n.o3value,it.O3)),r.appendChild(o(`${n.entityid}_pm10`,n.pm10value,it.PM10)),r.appendChild(o(`${n.entityid}_pm25`,n.pm25value,it.PM25)),e.push(r)})),e}function st(t){document.location=`${document.documentURI.split("%3A")[0]}%3A${document.documentURI.split("%3A")[1]}%3A${document.documentURI.split("%3A")[2]}%3A${document.documentURI.split("%3A")[3]}%3A${t}`}function ct(){const t=window.location.href;let e="";return e=t.includes("localhost")?"local":t.includes("sc_valencia_pre")?"PRE":"PRO",e}function ut(t,e){document.querySelectorAll(`[${t}]`).forEach((n=>{!function(t,e,n){const o=e;if(t){const e=new XMLHttpRequest;e.onreadystatechange=function(){4===this.readyState&&(200===this.status&&(o.innerHTML=this.responseText,n&&n()),404===this.status&&(o.innerHTML="No se ha podido cargar correctamente."))},e.open("GET",t,!0),e.send()}}(n.getAttribute(t),n,e)}))}function dt(t){ut("include-html-cabecera",(function(){!function(){const t=ct();"PRO"!==t&&(document.title+=` (${t})`)}(),function(){const t=ct();"PRO"!==t&&(document.querySelector("nav").querySelectorAll("span")[1].textContent+=` (${t})`)}()})),ut("include-html-menu"),ut("include-html-main-container",(function(){(function(){const t=document.querySelector("body");t.classList.remove("inicio"),t.classList.add(document.documentURI.split("%3A")[4].match(/(.*?).wcdf/)[1])})(),t&&t()})),ut("include-html-copyright")}function ht(t,e,n,o,r,a){let i=!1,l=!1;const s=document.querySelector(t),c=document.querySelector(e),u=()=>{"undefined"!=typeof Liferay&&"ca-ES"===Liferay.ThemeDisplay.getBCP47LanguageId()?(s&&s.setAttribute("src","https://camaras.valencia.es/camaras/ocimovil.html?camara=1&lang=cas"),c&&c.setAttribute("src","https://camaras.valencia.es/camaras/ocimovil.html?lang=cas")):(s&&s.setAttribute("src","https://camaras.valencia.es/camaras/ocimovil.html?camara=1&lang=val"),c&&c.setAttribute("src","https://camaras.valencia.es/camaras/ocimovil.html?lang=val"))};function d(t=!0){const e=document.querySelector(n);t?(s&&(s.src="about:blank"),c&&(c.src="about:blank"),e.classList.add("blur"),l=!0):(e.classList.remove("blur"),u(),l=!1)}const h=t=>{new IntersectionObserver((t=>{t.forEach((t=>{t.isIntersecting&&(l||u(),i||(i=!0,window.setTimeout(d,a)))}))})).observe(t)};!function(){const{userAgent:t}=navigator;return/iPad|iPhone|iPod|Macintosh/.test(t)&&!window.MSStream}()?(s&&(s.setAttribute("sandbox","allow-scripts"),h(s)),c&&(c.setAttribute("sandbox","allow-scripts"),h(c)),document.querySelector(r).addEventListener("click",(()=>{d(!1),window.setTimeout(d,a)}))):document.querySelectorAll(o)[0].style.display="none"}const ft={grid:{containLabel:!0},title:{left:"center",top:"0",textStyle:{fontSize:15,fontFamily:"Montserrat",fontWeight:500,color:"#666"}},legend:{orient:"horizontal",bottom:"0",left:"center",width:"100%",textStyle:{fontSize:11,fontFamily:"Montserrat",fontWeight:400,color:"#666"}},toolbox:{show:!0,right:"0",top:"0",feature:{restore:{textStyle:{fontSize:6,fontFamily:"Montserrat",fontWeight:300}},saveAsImage:{textStyle:{fontSize:6,fontFamily:"Montserrat",fontWeight:300}}},emphasis:{iconStyle:{borderColor:"#ffcd00",textFill:"#666"}}},tooltip:{textStyle:{fontFamily:"Montserrat",fontSize:12}},xAxis:[{type:"category",axisLabel:{show:!0,interval:0,textStyle:{fontFamily:"Montserrat",fontSize:11}},data:[]}],yAxis:[{type:"value",alignTicks:!0,position:"right",axisLabel:{textStyle:{fontSize:10,fontFamily:"Montserrat",fontWeight:400},formatter:t=>`${t}%`}},{type:"value",position:"left",axisLabel:{textStyle:{fontSize:10,fontFamily:"Montserrat",fontWeight:400},formatter:t=>`${h(t)}€`}}]},mt=(t,e)=>{e.sort(((t,e)=>parseInt(t.anyo)-parseInt(e.anyo)));const n={};e.forEach((e=>{const o=e[1],r=e[0];r!==t.seriesName||n[o]||(n[o]=0),r===t.seriesName&&(n[o]+=e[2])}));let o=`<p>${t.seriesName}</p>`;for(const[e,r]of Object.entries(n))o+=`<div>${t.marker} ${e}: <span style="float: right; margin-left:20px;font-weight: 600;">${d(r)}</span></div>`;return o};function St(t,e,n=void 0,o=void 0){const r=null===o?void 0:o,a=new Set(e.map((t=>t[1])));let i;const l={title:{text:"SIN TITULO",left:"center",top:"top",textStyle:{fontSize:20,fontFamily:"Montserrat",fontWeight:600,color:"#666"}},tooltip:{axisPointer:{type:"shadow"},trigger:"item",formatter:t=>mt(t,e),textStyle:{fontFamily:"Montserrat"},position(t,e,n,o,r){const a={},i=r.contentSize[1]/2,l=r.viewSize[1],s=t[1];return s<i?a.top=10:s+i>l?a.bottom=10:a.top=s-i,t[0]<r.viewSize[0]/2?a.left=t[0]+20:a.right=r.viewSize[0]-t[0]+20,a}},legend:{padding:40,textStyle:{fontFamily:"Montserrat"}},grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0},xAxis:{type:"value",splitNumber:10,name:"SIN NOMBRE",nameLocation:"start",nameTextStyle:{fontWeight:"bold",fontFamily:"Montserrat",color:"#666",padding:-40},axisLabel:{margin:5,textStyle:{fontFamily:"Montserrat"},formatter:t=>d(t)},splitLine:{lineStyle:{color:"#DDD"}}},yAxis:{type:"category",data:Array.from(a),axisLabel:{textStyle:{fontFamily:"Montserrat"}}},series:(()=>{const t={name:"SIN NOMBRE",type:"bar",stack:"total",label:{show:!0,fontFamily:"Montserrat",fontSize:10,formatter:t=>d(Math.round(t.value))},itemStyle:void 0,emphasis:{focus:"series"},data:void 0};r&&r.itemStyle&&Array.isArray(r.itemStyle.borderColor)&&(i=[...r.itemStyle.borderColor],delete r.itemStyle.borderColor);const n=function(t){return t.reduce(((t,e)=>{const n=e[0];return t[n]||(t[n]=[]),t[n].push(e),t}),{})}(e),o=Object.keys(n);a.forEach((t=>{o.forEach((e=>{void 0===n[e].find((e=>e[1]===t))&&(n[e].push([n[e][0][0],t,void 0]),n[e].sort())}))}));const l=[];return Object.keys(n).forEach((e=>{i&&(t.itemStyle={borderColor:i.shift()}),t.name=e,t.data=n[e].map((t=>t[2]));let o={};o=void 0!==r?D(t,r):t,l.push({...o})})),l})(),toolbox:{show:!0,feature:{restore:{title:"Restablir"},saveAsImage:{title:"Desar"}},right:50}};let s={};s=void 0!==n?D(l,n):l,S(t,s)}function gt(t){let e={};return e=D(ft,t),e}function pt(t,e,n={},r={}){let a={};a=D(n,{color:["#81B1CC","#ABD9EA","#C2EEF9","#F9E2AF","#F9C780","#FDAE61","#F46D43","#FDAE61","#F9E2AF","#C2EEF9","#ABD9EA","#81B1CC"],yAxis:{data:function(){const t=new Set;return e.forEach((e=>{t.add(e[1])})),Array.from(t).sort(((t,e)=>t-e))}()}});const i={itemStyle:{borderWidth:2,borderColor:["#448DAD","#89CADB","#A0DEE8","#F4D28C","#F4B569","#F79646","#F25930","#F79646","#F4D28C","#A0DEE8","#89CADB","#448DAD"]}},l=null===r?i:D(r,i),s=e;s.forEach(((t,e)=>{s[e][0]=o(t[0])})),St(t,s,a,l)}function yt(t,e=void 0){const n={title:{text:"SIN TITULO",left:"center",top:"top",padding:50,textStyle:{fontSize:14,fontFamily:"Montserrat",fontWeight:400,color:"#333"}},legend:{show:!1},grid:{top:"30%",bottom:"5%",left:"8%",right:"8%"},xAxis:{type:"value",show:!1},yAxis:{show:!1,type:"category"},tooltip:{show:!0,textStyle:{fontFamily:"Montserrat",fontWeight:"600"},appendToBody:!0,formatter:t=>C(t,!1)},series:[{type:"bar",showBackground:!0}]};let o={};o=void 0!==e?D(n,e):n,S(t,o)}const Et="es_ES",bt={es_ES:new Map([["1","Enero"],["2","Febrero"],["3","Marzo"],["4","Abril"],["5","Mayo"],["6","Junio"],["7","Julio"],["8","Agosto"],["9","Septiembre"],["10","Octubre"],["11","Noviembre"],["12","Diciembre"]]),ca_ES:new Map([["1","Gener"],["2","Febrer"],["3","Març"],["4","Abril"],["5","Maig"],["6","Juny"],["7","Juliol"],["8","Agost"],["9","Setembre"],["10","Octubre"],["11","Novembre"],["12","Desembre"]])};function At(t){return Math.max(...t.map((t=>Number(t[0]))))}function Ct(t){const e=t.filter((e=>Number(e[0])===At(t))),n=Array.from({length:12},(()=>0));return e.forEach((([t,e,o])=>{const r=parseInt(e,10)-1;n[r]=o})),n}function It(t){const e=t.filter((e=>Number(e[0])===At(t)-1)),n=Array.from({length:12},(()=>0));return e.forEach((([t,e,o])=>{const r=parseInt(e,10)-1;n[r]=o})),n}function Mt(t,e,n=void 0){const o=At(e).toString(),r=(At(e)-1).toString();yt(t,D({title:{left:"center",top:"-12%",textStyle:{fontSize:15,fontFamily:"Montserrat"}},legend:{top:"10%",show:!0,data:[r,o],textStyle:{fontFamily:"Montserrat"}},grid:{bottom:"8%",top:"20%",right:"2%"},xAxis:[{type:"category",data:u(bt,Et),interval:0,margin:10,axisLabel:{textStyle:{fontSize:10,fontFamily:"Montserrat",fontWeight:400}}}],yAxis:[{type:"value",axisLabel:{formatter:t=>t.toLocaleString("es-ES"),textStyle:{fontSize:10,fontFamily:"Montserrat",fontWeight:400}}}],series:[{name:r,type:"bar",data:It(e)},{name:o,type:"bar",barGap:0,data:Ct(e)}]},n))}function vt(t,e,n){const o=document.querySelector(e),r=document.querySelector(t);let a=!1;r.addEventListener("click",(()=>{!1===a&&(a=!0,o.setAttribute("src","about:blank"),o.setAttribute("src",n),o.onload=()=>{a=!1})})),r.disabled=!1}const xt="id",Tt="fecha",Nt="value";function _t(t,e,n,o){const[r,a]=function(t,e,n){const o=[],r=[];return t.forEach((t=>{e.includes(`${t[xt]}`)?o.push(`${t[Tt]}`):n.includes(`${t[xt]}`)&&r.push(`${t[Tt]}`)})),[o.map((t=>[t,0])),r.map((t=>[t,0]))]}(t,n,o);let i="Datos sin validar";0===a.length&&(i="");const l={name:"Datos validados",type:"line",data:[...r,a[0]],lineStyle:{color:"#00A9A0",width:4},showSymbol:!1,tooltip:{show:!1}};let s="",c="";if(0===a.length){const e=t[t.length-1].fecha;s=e,c=e}else s=a[0][0],c=a[a.length-1][0];return[...e,l,{name:"Datos NO validados",type:"line",data:a,lineStyle:{color:"#80D4CF",width:4},showSymbol:!1,tooltip:{show:!1},markArea:{silent:!0,itemStyle:{opacity:.6,color:"#eee"},tooltip:{show:!1},label:{color:"#333",fontStyle:"normal",fontWeight:"400",fontFamily:"Montserrat",fontSize:11},data:[[{name:i,xAxis:s,yAxis:0},{name:"end",xAxis:c,yAxis:Math.max(...t.filter((t=>null!==t[Nt])).map((t=>parseInt(`${t[Nt]}`,10))))}]]}}]}function Lt(t,e,n=void 0){S(t,D({grid:{left:"2.5%",right:"5%",bottom:"70",top:"150",containLabel:!0},title:{left:"center",top:"top",textStyle:{fontSize:20,fontFamily:"Montserrat",fontWeight:600,color:"#666"}},legend:{type:"plain",top:"50",width:"98%",textStyle:{fontFamily:"Montserrat"}},tooltip:{trigger:"axis",show:!0,formatter:t=>y(t),textStyle:{fontFamily:"Montserrat"}},xAxis:{type:"category",boundaryGap:!1,splitLine:{show:!1},axisLabel:{textStyle:{fontSize:10,fontFamily:"Montserrat",color:"#666"}}},yAxis:{type:"value",nameLocation:"end",nameGap:"0",nameTextStyle:{fontFamily:"Montserrat",fontWeight:"500",padding:[-25,0,0,-48],margin:0,align:"left",verticalAlign:"top",width:"auto"},scale:!0,splitNumber:"6",axisLabel:{margin:10,textStyle:{fontSize:10,fontFamily:"Montserrat",color:"#666"}}},dataZoom:{end:100,borderColor:"#eee",fillerColor:"rgba(0,0,0,.05)",textStyle:{fontSize:10,fontFamily:"Montserrat",color:"#333",textBorderColor:"#fff",textBorderWidth:3,fontWeight:"600"},selectedDataBackground:{lineStyle:{color:"#333"},areaStyle:{color:"#ffcd00"}},dataBackground:{backgroundColor:"rgba(0,0,0,1)",lineStyle:{color:"#333"},areaStyle:{color:"rgba(0,0,0,0.5)"}},handleStyle:{color:"rgba(0,0,0,0.2)"},moveHandleStyle:{color:"rgba(0,0,0,0.3)"},emphasis:{handleStyle:{color:"rgba(255,205,0,1)"},moveHandleStyle:{color:"rgba(255,205,0,1)"}}},toolbox:{feature:{restore:{title:"Restablir"},saveAsImage:{title:"Desar"}},right:"1%",top:"0%"},series:e},n))}return e})(),t.exports=e()}},e={};function n(o){var r=e[o];if(void 0!==r)return r.exports;var a=e[o]={exports:{}};return t[o](a,a.exports,n),a.exports}n.d=(t,e)=>{for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var o={};return(()=>{"use strict";n.r(o),n.d(o,{echartInstancesSeuElectronicaBarMonth:()=>O,echartInstancesSeuElectronicaRelojSemicircle:()=>z,echartInstancesSeuElectronicaStackedBarYears:()=>W,echartInstanciesSeuElectronica:()=>F,echartSeuElectronica:()=>w,echartSeuElectronicaBarMonth:()=>R,echartSeuElectronicaRelojSemicircle:()=>P,echartSeuElectronicaStackedBarYears:()=>q,echartYearInstancesSeuElectronicaGaugeSemicircle:()=>B,echartYearSeuElectronicaGaugeSemicircle:()=>k,initStackedBarChartSedeElec:()=>U});const t={es_ES:new Map([["TittleAccChart","EVOLUCIÓN DIARIA ACCESOS A LA SEDE ELECTRÓNICA"],["Acces","Accesos"],["TittleInstancesChart","INSTANCIAS SEDE ELECTRÓNICA: EVOLUCIÓN DIARIA"],["InstancesChartText","Instancias electrónicas"],["Instances","Instancias"],["TittleInstancesYearlyChart","INSTANCIAS SEDE ELECTRÓNICA: DESGLOSE DE LOS ULTIMOS AÑOS"],["TittleAccessYearlyChart","ACCESOS A LA SEDE ELECTRÓNICA: DESGLOSE DE LOS ULTIMOS AÑOS"],["TittleInstancesMonthlyChart","INSTANCIAS SEDE ELECTRÓNICA: EVOLUCIÓN MENSUAL"],["TittleAccessMonthlyChart","ACCESOS A SEDE ELECTRÓNICA: EVOLUCIÓN MENSUAL"],["TittleInstancesPrevYearsChart","INSTANCIAS SEDE ELECTRÓNICA: ULTIMOS AÑOS"],["TittleAccessPrevYearsChart","ACCESOS SEDE ELECTRÓNICA: ULTIMOS AÑOS"],["TittleInstancesCurrMonth","INSTANCIAS SEDE ELECTRÓNICA: MES ACTUAL"],["TittleInstancesPrevMonth","INSTANCIAS SEDE ELECTRÓNICA: MES ANTERIOR"],["TittleAccessCurrMonth","ACCESOS SEDE ELECTRÓNICA: MES ACTUAL"],["TittleAccessPrevMonth","ACCESOS SEDE ELECTRÓNICA: MES ANTERIOR"]]),ca_ES:new Map([["TittleAccChart","ACCESSOS A SEU ELECTRÒNICA: EVOLUCIÓ DIÀRIA"],["Acces","Accessos"],["TittleInstancesChart","INSTÀNCIES SEU ELECTRÒNICA: EVOLUCIÓ DIÀRIA"],["InstancesChartText","Instancias electrónicas"],["Instances","Instàncies"],["TittleInstancesYearlyChart","INSTÀNCIES SEU ELECTRÒNICA: DESGLOSSAMENT DELS ÚLTIMS ANYS"],["TittleAccessYearlyChart","ACCESSOS A SEU ELECTRÒNICA: DESGLOSSAMENT DELS ÚLTIMS ANYS"],["TittleInstancesMonthlyChart","INSTÀNCIES SEU ELECTRÒNICA: EVOLUCIÓ MENSUAL"],["TittleAccessMonthlyChart","ACCESSOS A SEU ELECTRÒNICA: EVOLUCIÓ MENSUAL"],["TittleInstancesPrevYearsChart","INSTÀNCIES SEU ELECTRÒNICA: ÚLTIMS ANYS"],["TittleAccessPrevYearsChart","ACCESSOS A SEU ELECTRÒNICA: ÚLTIMS ANYS"],["TittleInstancesCurrMonth","INSTÀNCIES SEU ELECTRÒNICA: MES ACTUAL"],["TittleInstancesPrevMonth","INSTÀNCIES SEU ELECTRÒNICA: MES ANTERIOR"],["TittleAccessCurrMonth","ACCESSOS SEU ELECTRÒNICA: MES ACTUAL"],["TittleAccessPrevMonth","ACCESSOS A SEU ELECTRÒNICA: MES ANTERIOR"]])},e="ca_ES",r="8%",a="2.5%",i="5%",l="18%",s="20%",c="10%",u="90%",d="1%",h="0%",f=0,m=["#9c89b8","#4ea8de","#05668d","#ffbf69","#e56b6f","#83c5be","#02c39a","#ee9b00","#cdb4db","#ffadad","#ce4257","#b7b7a4"],S=33,g=27,p=30;function y(t){let e=navigator.language||navigator.userLanguage;e=e.length<=2?`${e}-${e.toUpperCase()}`:e;const n={minimumFractionDigits:0,maximumFractionDigits:2};return"es-ES"===e?t.toLocaleString("de-DE",n):t.toLocaleString(e,n)}function E(t){return y(t)}function b(t,e){const n=t?document.querySelector(t):null,o=e?document.querySelector(e):null;n&&(n.hidden=!0),o&&(o.style.background="url('./build/images/nodata1.png') no-repeat top center",o.hidden=!1)}function A(t,e){const n=t?document.querySelector(t):null,o=e?document.querySelector(e):null;n&&(n.hidden=!0),o&&(o.style.background="#ffffff",o.hidden=!1)}function C(t,e,n=1){const o=Math.max(...t.map((t=>t[e])))*n;return 5e3*Math.ceil(o/5e3)}function I(t){return Math.round(document.getElementById(t).offsetWidth/S)}function M(t,e,n,o,f,m,S,g=5,p="",b=f,A=100,C,I=void 0,M=void 0){return{title:{text:p,left:"center",top:"top",textStyle:{fontSize:20,fontFamily:"Montserrat",fontWeight:600,color:"#666"}},tooltip:{trigger:"axis",show:!0,formatter:t=>function(t,e=!1){let n=`<p>${t[0].name}</p>`;return t.forEach((t=>{const o=e?Math.round(t.data):t.data,r=`<div>${a=t.color,`<span style="display:inline-block;margin-right:5px;border-radius:10px;width:9px;height:9px;background-color:${a}"></span>`} ${t.seriesName}: <strong style="float: right; margin-left:20px">${t.data?y(o):"-"}</strong></div>`;var a;n+=r})),n}(t),textStyle:{fontFamily:"Montserrat"}},legend:e?{type:"plain",data:e,textStyle:{fontFamily:"Montserrat"},top:I||r,selected:C}:null,grid:{left:a,right:i,bottom:l,top:e?I?"30%":s:c,heigh:u,containLabel:!0},xAxis:{type:"category",data:n,boundaryGap:!1,splitLine:{show:!1},axisLabel:{textStyle:{fontSize:10,fontFamily:"Montserrat",color:"#666"}}},yAxis:{name:o,nameLocation:"end",nameTextStyle:{fontFamily:"Montserrat",fontWeight:"bold",padding:[0,0,0,S]},type:"value",scale:!0,min:M,axisLabel:{margin:g,formatter:E,textStyle:{fontSize:10,fontFamily:"Montserrat",color:"#666"}}},series:t,dataZoom:[{show:m,data:n,start:b,end:A,borderColor:"#eee",fillerColor:"rgba(0,0,0,.05)",textStyle:{fontSize:10,fontFamily:"Montserrat",color:"#333",textBorderColor:"#fff",textBorderWidth:3,fontWeight:"600"},selectedDataBackground:{lineStyle:{color:"#333"},areaStyle:{color:"#ffcd00"}},dataBackground:{backgroundColor:"rgba(0,0,0,1)",lineStyle:{color:"#333"},areaStyle:{color:"rgba(0,0,0,0.5)"}},handleStyle:{color:"rgba(0,0,0,0.2)"},moveHandleStyle:{color:"rgba(0,0,0,0.3)"},emphasis:{handleStyle:{color:"rgba(255,205,0,1)"},moveHandleStyle:{color:"rgba(255,205,0,1)"}}}],toolbox:{show:m,feature:{restore:{title:"Restablir"},saveAsImage:{title:"Desar"}},right:d,top:h}}}function v(t,e,n=-45,o="",r=e){const a=new Set,i=[];t.forEach((t=>{const e=t[0].toString().padStart(2,"0");a.add(`${e}/${t[1]}`),i.push(Math.round(t[2]))}));const l=i.length<100?40:80;return M({name:r,type:"bar",smooth:!1,barMaxWidth:40,itemStyle:{color:"#5470c6"},textStyle:{fontFamily:"Montserrat"},data:i},null,Array.from(a.values()),e,l,!0,n,25,o)}function x(t,e,n,o){return{color:m,title:{text:t,left:"center",top:"top",padding:10,textStyle:{fontSize:o,fontFamily:"Montserrat",fontWeight:600,color:"#666"}},tooltip:{show:!0,textStyle:{fontFamily:"Montserrat"},formatter:t=>function(t,e){const n=`<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:${t.color};"></span>`;let o=`${t.name} : `;return o+=`<span style="font-weight:bold">${y(t.value)}</span>`,e&&(o+=`<span> (${t.percent}%)</span>`),n+o}(t,!1)},splitNumber:3,series:{type:"gauge",max:e,startAngle:-180,endAngle:0,splitNumber:2,pointer:{show:!1,icon:"roundRect"},progress:{show:!0,overlap:!1,roundCap:!0,clip:!0,itemStyle:{borderWidth:1,borderColor:"#464646"}},axisLine:{lineStyle:{width:60}},splitLine:{show:!0,distance:10,length:10},axisTick:{show:!0,splitNumber:5},axisLabel:{show:!0,distance:70,formatter:t=>y(Math.round(t)),fontFamily:"Montserrat",color:"#666"},data:n,detail:{fontSize:o/1.2,color:"inherit",formatter:t=>y(Math.round(t))}},toolbox:{show:!0,feature:{saveAsImage:{title:"Desar"}},right:g,top:p}}}function T(t,e="",n){const o=[],r=C(t,1,1.1),a=r.toString().length>=9?100:95,i=115===a?-45:-35;let l=t.length<5?t.length*i:-190;for(let e=0;e<t.length;e+=1)o.push({value:t[e][1],name:String(t[e][0]),title:{offsetCenter:[String(l),"20%"],fontFamily:"Montserrat"},detail:{offsetCenter:[String(l),"35%"],fontFamily:"Montserrat"}}),l+=a;return x(e,r,o,n)}function N(t,e,n="",o){return{title:{text:n,left:"center",top:"top",padding:10,textStyle:{fontSize:o,fontFamily:"Montserrat",fontWeight:600,color:"#666"}},series:{type:"gauge",startAngle:-180,endAngle:0,splitNumber:2,max:C(t,2),itemStyle:{color:"#FFAB91"},progress:{show:!0,width:30},pointer:{show:!1},axisLine:{lineStyle:{width:30}},axisTick:{distance:10,splitNumber:5,lineStyle:{width:2,color:"#999"}},splitLine:{distance:10,length:14,lineStyle:{width:3,color:"#999"}},axisLabel:{fontFamily:"Montserrat",color:"#666",fontSize:14,show:!0,distance:40,formatter:t=>y(Math.round(t))},anchor:{show:!1},title:{show:!1},detail:{valueAnimation:!0,width:"60%",lineHeight:40,borderRadius:8,offsetCenter:[-5,"-10%"],fontSize:o+5,fontWeight:"bolder",formatter:n=>function(t,e,n){const o=y(Math.round(e)),r=(a=t[n][0],{1:"Gen",2:"Feb",3:"Mar",4:"Abr",5:"Mai",6:"Jun",7:"Jul",8:"Ago",9:"Sep",10:"Oct",11:"Nov",12:"Des"}[parseInt(a.toString(),10)]);var a;const i=t[n][1],l=`\n\n\n${r} ${i} : ${o}`,s=`${o}\n${r} ${i}`;return window.innerWidth<=1710?l:s}(t,n,e),fontFamily:"Montserrat",color:"inherit"},data:[{value:t[e][2]}]},toolbox:{show:!0,feature:{saveAsImage:{title:"Desar"}},right:g,top:p}}}function _(t,e){const n=document.getElementById(t);if(!n)return console.error(`No se pudo encontrar el elemento con ID ${t}.`),null;const o=echarts.init(n);return o.setOption(e,!0),$(window).on("resize",(()=>{null!=o&&void 0!==o&&o.resize()})),o}function L(t){return t.replace(/^(\d{4})[-|\/](\d{2})[-|\/](\d{2})$/g,"$3/$2/$1")}function D(t){return 100*(t-120)/t}function w(n,o){if(0===o.resultset.length)b("#chartSeuElectronica","#no_dataSeuElectronica");else{A("#no_dataSeuElectronica","#chartSeuElectronica");const n=o.resultset,r=o.resultset.length,a=new Set,i=[];for(let t=0;t<r;t+=1)a.add(n[t][0]),i.push(n[t][1]);const l=D(a.size);_("chartSeuElectronica",M([{name:t[e].get("Acces"),type:"line",smooth:!1,symbol:"circle",symbolSize:6,itemStyle:{color:"#3f02f7"},data:i}],null,Array.from(a.values()),t[e].get("Acces"),l,!0,f,void 0,t[e].get("TittleAccChart")))}}function F(n,o){if(0===o.resultset.length)b("#chartInstanciesSeuElectronica","#no_dataInstanciesSeuElectronica");else{A("#no_dataInstanciesSeuElectronica","#chartInstanciesSeuElectronica");const n=o.resultset,r=o.resultset.length,a=new Set,i=[],l=[];for(let t=0;t<r;t+=1)a.add(L(n[t][0])),i.push(L(n[t][0])),l.push(n[t][1]);const s=D(a.size);_("chartInstanciesSeuElectronica",M([{name:t[e].get("InstancesChartText"),type:"line",symbol:"circle",symbolSize:6,smooth:!1,itemStyle:{color:"#3f02f7"},data:l}],null,Array.from(a.values()),t[e].get("Instances"),s,!0,20,void 0,t[e].get("TittleInstancesChart")))}}function O(n,o){0===o.resultset.length?b("#chartInstancesSeuElectronica_BarMonth","#no_dataInstancesSeuElectronica_BarMonth"):(A("#no_dataInstancesSeuElectronica_BarMonth","#chartInstancesSeuElectronica_BarMonth"),_("chartInstancesSeuElectronica_BarMonth",v(o.resultset,t[e].get("Instances"),void 0,t[e].get("TittleInstancesMonthlyChart"),t[e].get("InstancesChartText"))))}function R(n,o){0===o.resultset.length?b("#chartSeuElectronica_BarMonth","#no_dataSeuElectronica_BarMonth"):(A("#no_dataSeuElectronica_BarMonth","#chartSeuElectronica_BarMonth"),_("chartSeuElectronica_BarMonth",v(o.resultset,t[e].get("Acces"),void 0,t[e].get("TittleAccessMonthlyChart"))))}function B(n,o){if(0===o.resultset.length)b("#chartYearInstancesSeuElectronica_gauge_semicircle","#no_dataYearInstancesSeuElectronica_gauge_semicircle");else{A("#no_dataYearInstancesSeuElectronica_gauge_semicircle","#chartYearInstancesSeuElectronica_gauge_semicircle");const n=I("chartYearSeuElectronica_gauge_semicircle");_("chartYearInstancesSeuElectronica_gauge_semicircle",T(o.resultset,t[e].get("TittleInstancesPrevYearsChart"),n))}}function k(n,o){if(0===o.resultset.length)b("#chartYearSeuElectronica_gauge_semicircle","#no_dataYearSeuElectronica_gauge_semicircle");else{A("#no_dataYearSeuElectronica_gauge_semicircle","#chartYearSeuElectronica_gauge_semicircle");const n=I("chartYearSeuElectronica_gauge_semicircle");_("chartYearSeuElectronica_gauge_semicircle",T(o.resultset,t[e].get("TittleAccessPrevYearsChart"),n))}}function z(n,o){if(0===o.resultset.length)b("#chartInstancesSeuElectronica_reloj_semicircle","#no_dataInstancesSeuElectronica_reloj_semicircle"),b("#chartInstancesSeuElectronica_reloj_semicircle_lastmonth","#no_dataInstancesSeuElectronica_reloj_semicircle_lastmonth");else{A("#no_dataInstancesSeuElectronica_reloj_semicircle","#chartInstancesSeuElectronica_reloj_semicircle"),A("#no_dataInstancesSeuElectronica_reloj_semicircle_lastmonth","#chartInstancesSeuElectronica_reloj_semicircle_lastmonth");const n=0,r=1,a=o.resultset,i=I("chartSeuElectronica_reloj_semicircle");_("chartInstancesSeuElectronica_reloj_semicircle",N(a,n,t[e].get("TittleInstancesCurrMonth"),i)),_("chartInstancesSeuElectronica_reloj_semicircle_lastmonth",N(a,r,t[e].get("TittleInstancesPrevMonth"),i))}}function P(n,o){if(0===o.resultset.length)b("#chartSeuElectronica_reloj_semicircle","#no_dataSeuElectronica_reloj_semicircle"),b("#chartSeuElectronica_reloj_semicircle_lastmonth","#no_dataSeuElectronica_reloj_semicircle_lastmonth");else{A("#no_dataSeuElectronica_reloj_semicircle","#chartSeuElectronica_reloj_semicircle"),A("#no_dataSeuElectronica_reloj_semicircle_lastmonth","#chartSeuElectronica_reloj_semicircle_lastmonth");const n=0,r=1,a=o.resultset,i=I("chartSeuElectronica_reloj_semicircle");_("chartSeuElectronica_reloj_semicircle",N(a,n,t[e].get("TittleAccessCurrMonth"),i)),_("chartSeuElectronica_reloj_semicircle_lastmonth",N(a,r,t[e].get("TittleAccessPrevMonth"),i))}}var j=n(2725);const Y="ca_ES";function U(t,e){if(0===e.resultset.length)(0,j.printNoDataChart)(`#${t.idChart}`,`#${t.idNoData}`);else{const n={title:{text:t.chartName},xAxis:{name:`\n\n\n\n${t.yAxisName}`}};(0,j.initStackedBarChartMonthSeries)(t.idChart,e.resultset,n)}}function W(e,n){U({idChart:"chartInstancesSeuElectronica_stackedBarYears",idNoData:"no_dataInstancesSeuElectronica_stackedBarYears",chartName:t[Y].get("TittleInstancesYearlyChart"),yAxisName:t[Y].get("Instances")},n)}function q(e,n){U({idChart:"chartSeuElectronica_stackedBarYears",idNoData:"no_dataSeuElectronica_stackedBarYears",chartName:t[Y].get("TittleAccessYearlyChart"),yAxisName:t[Y].get("Acces")},n)}})(),o})()));
package/dist/js/soroll.js CHANGED
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.soroll=t():e.soroll=t()}(self,(()=>(()=>{"use strict";var e={d:(t,o)=>{for(var r in o)e.o(o,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:o[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{createChart:()=>A,echartSonometroManana:()=>M,echartSonometroNoche:()=>k,echartSonometroTarde:()=>w,loadMap:()=>O});const o="8%",r="2.5%",a="5%",n="18%",i="20%",l="10%",c="90%",s="1%",d="0%",m=65,p=55;function u(e){let t=navigator.language||navigator.userLanguage;t=t.length<=2?`${t}-${t.toUpperCase()}`:t;const o={minimumFractionDigits:0,maximumFractionDigits:2};return"es-ES"===t?e.toLocaleString("de-DE",o):e.toLocaleString(t,o)}function y(e){return u(e)}function f(e,t,m,p,f,g,h,b=5,S="",A=f,x=100,v,$=void 0,L=void 0){return{title:{text:S,left:"center",top:"top",textStyle:{fontSize:20,fontFamily:"Montserrat",fontWeight:600,color:"#666"}},tooltip:{trigger:"axis",show:!0,formatter:e=>function(e,t=!1){let o=`<p>${e[0].name}</p>`;return e.forEach((e=>{const r=t?Math.round(e.data):e.data,a=`<div>${n=e.color,`<span style="display:inline-block;margin-right:5px;border-radius:10px;width:9px;height:9px;background-color:${n}"></span>`} ${e.seriesName}: <strong style="float: right; margin-left:20px">${e.data?u(r):"-"}</strong></div>`;var n;o+=a})),o}(e),textStyle:{fontFamily:"Montserrat"}},legend:t?{type:"plain",data:t,textStyle:{fontFamily:"Montserrat"},top:$||o,selected:v}:null,grid:{left:r,right:a,bottom:n,top:t?$?"30%":i:l,heigh:c,containLabel:!0},xAxis:{type:"category",data:m,boundaryGap:!1,splitLine:{show:!1},axisLabel:{textStyle:{fontSize:10,fontFamily:"Montserrat",color:"#666"}}},yAxis:{name:p,nameLocation:"end",nameTextStyle:{fontFamily:"Montserrat",fontWeight:"bold",padding:[0,0,0,h]},type:"value",scale:!0,min:L,axisLabel:{margin:b,formatter:y,textStyle:{fontSize:10,fontFamily:"Montserrat",color:"#666"}}},series:e,dataZoom:[{show:g,data:m,start:A,end:x,borderColor:"#eee",fillerColor:"rgba(0,0,0,.05)",textStyle:{fontSize:10,fontFamily:"Montserrat",color:"#333",textBorderColor:"#fff",textBorderWidth:3,fontWeight:"600"},selectedDataBackground:{lineStyle:{color:"#333"},areaStyle:{color:"#ffcd00"}},dataBackground:{backgroundColor:"rgba(0,0,0,1)",lineStyle:{color:"#333"},areaStyle:{color:"rgba(0,0,0,0.5)"}},handleStyle:{color:"rgba(0,0,0,0.2)"},moveHandleStyle:{color:"rgba(0,0,0,0.3)"},emphasis:{handleStyle:{color:"rgba(255,205,0,1)"},moveHandleStyle:{color:"rgba(255,205,0,1)"}}}],toolbox:{show:g,feature:{restore:{title:"Restablir"},saveAsImage:{title:"Desar"}},right:s,top:d}}}function g(e,t){const o=document.getElementById(e);if(!o)return console.error(`No se pudo encontrar el elemento con ID ${e}.`),null;const r=echarts.init(o);return r.setOption(t,!0),$(window).on("resize",(()=>{null!=r&&void 0!==r&&r.resize()})),r}function h(e){return`${document.documentURI.split("%3A")[0]}%3A${document.documentURI.split("%3A")[1]}%3A${document.documentURI.split("%3A")[2]}%3A${document.documentURI.split("%3A")[3]}%3A${e}`}function b(e){return e.replace(/^(\d{4})[-|\/](\d{2})[-|\/](\d{2})$/g,"$3/$2/$1")}function S(e){return 100*(e-120)/e}function A(e,t){let o="MITJANA DIÀRIA DE SOROLL : ";const r=t.filter((t=>t[5]===e)),a=new Set(["Matí","Vesprada","Nit"]),n=new Set,i={name:"Matí",type:"line",smooth:!1,symbol:"circle",symbolSize:6,data:[],markLine:{data:[{yAxis:m}],lineStyle:{color:"#5470c6"}}},l={name:"Vesprada",type:"line",smooth:!1,symbol:"circle",symbolSize:6,data:[],markLine:{data:[{yAxis:m}],lineStyle:{color:"#5470c6"}}},c={name:"Nit",type:"line",smooth:!1,symbol:"circle",symbolSize:6,data:[],markLine:{data:[{yAxis:p}],lineStyle:{color:"#fac858"}}};o+=r[0][5],r.forEach((e=>{i.data.push(e[6]),l.data.push(e[7]),c.data.push(e[8]),n.add(b(e[1]))}));const s=S(n.size);g("chartSonometroMapa",f([i,l,c],Array.from(a.values()),Array.from(n.values()),"dB",s,!0,-10,void 0,o))}const x="MITJANA DE SOROLL: ";function v(e,t,o,r,a,n){const i=t.resultset,l=`resultadoDirecciones${n}`,c=Dashboards.getParameterValue(l).map((e=>e[0])),s=[],d={},m=i.map((e=>{const t=e[0].split("-");return`${t[2]}/${t[1]}/${t[0]}`}));Array.from(new Set(m)).forEach((e=>{d[e]=Array(c.length).fill(null)})),i.forEach((e=>{const t=b(e[0]);c.every(((o,r)=>e[1].toString()!==o||(d[t][r]=e[2],!1)))})),c.forEach(((e,t)=>{const o={name:"",type:"line",smooth:!1,data:[],symbol:"circle",symbolSize:6,markLine:{data:[{yAxis:r}],lineStyle:{color:"#ff9933"}}},a=Object.values(d).map((e=>e[t]));o.name=e,o.data=a,s.push(o)}));const p=S(Array.from(Object.keys(d)).length),u=c.map((e=>({[e]:!1}))),y={};u.forEach(((e,t)=>{const o=Object.keys(e)[0];y[o]=t<4||e[o]})),g(o,f(s,c,Array.from(Object.keys(d)),"dB",p,!0,-10,void 0,a,void 0,void 0,y))}function M(e,t,o,r){const a=`${r.toUpperCase()} MATÍ`;v(0,t,o+r,m,x+a,r)}function w(e,t,o,r){const a=`${r.toUpperCase()} VESPRADA`;v(0,t,o+r,m,x+a,r)}function k(e,t,o,r){const a=`${r.toUpperCase()} NIT`;v(0,t,o+r,p,x+a,r)}function O(){var e;let t;const o=L.icon({iconUrl:h("build/images/mapas/marker-icon-sonometros.svg/content"),iconSize:[34,34],shadowSize:[50,64],iconAnchor:[17,17],shadowAnchor:[4,62],popupAnchor:[0,-26]}),r=L.icon({iconUrl:h("build/images/mapas/marker-icon-selected-sonometros.svg/content"),iconSize:[34,34],shadowSize:[50,64],iconAnchor:[17,17],shadowAnchor:[4,62],popupAnchor:[0,-26]});e=L.map("myMap").setView([39.47225,-.37739],14);let a=L.tileLayer("https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}{r}.png",{attribution:'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors &copy; <a href="https://carto.com/attributions">CARTO</a>',subdomains:"abcd",maxZoom:20});e.setMinZoom(5),e.setMaxZoom(20),a.addTo(e),L.geoJSON(legacy.obtenerGeoJson(resultadoSonometros,0,5,9),{onEachFeature:function(e,a){!function(e,t){if(e.properties&&e.properties.objectoId){let o=e.properties.address;t.bindPopup(o),t.on("click",(()=>legacy.createChart(o,resultadoSonometros)))}}(e,a),function(e){e.on("click",(e=>{var a;a=e.target,t&&t.setIcon(o),t=a,t.setIcon(r)}))}(a)},pointToLayer:function(e,t){return L.marker(t,{icon:o})}}).addTo(e)}return t})()));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.soroll=t():e.soroll=t()}(self,(()=>(()=>{"use strict";var e={d:(t,o)=>{for(var r in o)e.o(o,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:o[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{createChart:()=>A,echartSonometroManana:()=>M,echartSonometroNoche:()=>k,echartSonometroTarde:()=>w,loadMap:()=>O});const o="8%",r="2.5%",a="5%",n="18%",i="20%",l="10%",s="90%",c="1%",d="0%",m=65,p=55;function u(e){let t=navigator.language||navigator.userLanguage;t=t.length<=2?`${t}-${t.toUpperCase()}`:t;const o={minimumFractionDigits:0,maximumFractionDigits:2};return"es-ES"===t?e.toLocaleString("de-DE",o):e.toLocaleString(t,o)}function y(e){return u(e)}function f(e,t,m,p,f,h,g,b=5,S="",A=f,x=100,v,$=void 0,L=void 0){return{title:{text:S,left:"center",top:"top",textStyle:{fontSize:20,fontFamily:"Montserrat",fontWeight:600,color:"#666"}},tooltip:{trigger:"axis",show:!0,formatter:e=>function(e,t=!1){let o=`<p>${e[0].name}</p>`;return e.forEach((e=>{const r=t?Math.round(e.data):e.data,a=`<div>${n=e.color,`<span style="display:inline-block;margin-right:5px;border-radius:10px;width:9px;height:9px;background-color:${n}"></span>`} ${e.seriesName}: <strong style="float: right; margin-left:20px">${e.data?u(r):"-"}</strong></div>`;var n;o+=a})),o}(e),textStyle:{fontFamily:"Montserrat"}},legend:t?{type:"plain",data:t,textStyle:{fontFamily:"Montserrat"},top:$||o,selected:v}:null,grid:{left:r,right:a,bottom:n,top:t?$?"30%":i:l,heigh:s,containLabel:!0},xAxis:{type:"category",data:m,boundaryGap:!1,splitLine:{show:!1},axisLabel:{textStyle:{fontSize:10,fontFamily:"Montserrat",color:"#666"}}},yAxis:{name:p,nameLocation:"end",nameTextStyle:{fontFamily:"Montserrat",fontWeight:"bold",padding:[0,0,0,g]},type:"value",scale:!0,min:L,axisLabel:{margin:b,formatter:y,textStyle:{fontSize:10,fontFamily:"Montserrat",color:"#666"}}},series:e,dataZoom:[{show:h,data:m,start:A,end:x,borderColor:"#eee",fillerColor:"rgba(0,0,0,.05)",textStyle:{fontSize:10,fontFamily:"Montserrat",color:"#333",textBorderColor:"#fff",textBorderWidth:3,fontWeight:"600"},selectedDataBackground:{lineStyle:{color:"#333"},areaStyle:{color:"#ffcd00"}},dataBackground:{backgroundColor:"rgba(0,0,0,1)",lineStyle:{color:"#333"},areaStyle:{color:"rgba(0,0,0,0.5)"}},handleStyle:{color:"rgba(0,0,0,0.2)"},moveHandleStyle:{color:"rgba(0,0,0,0.3)"},emphasis:{handleStyle:{color:"rgba(255,205,0,1)"},moveHandleStyle:{color:"rgba(255,205,0,1)"}}}],toolbox:{show:h,feature:{restore:{title:"Restablir"},saveAsImage:{title:"Desar"}},right:c,top:d}}}function h(e,t){const o=document.getElementById(e);if(!o)return console.error(`No se pudo encontrar el elemento con ID ${e}.`),null;const r=echarts.init(o);return r.setOption(t,!0),$(window).on("resize",(()=>{null!=r&&void 0!==r&&r.resize()})),r}function g(e){return`${document.documentURI.split("%3A")[0]}%3A${document.documentURI.split("%3A")[1]}%3A${document.documentURI.split("%3A")[2]}%3A${document.documentURI.split("%3A")[3]}%3A${e}`}function b(e){return e.replace(/^(\d{4})[-|\/](\d{2})[-|\/](\d{2})$/g,"$3/$2/$1")}function S(e){return 100*(e-120)/e}function A(e,t){let o="MITJANA DIÀRIA DE SOROLL : ";const r=t.filter((t=>t[5]===e)),a=new Set(["Matí","Vesprada","Nit"]),n=new Set,i={name:"Matí",type:"line",smooth:!1,symbol:"circle",symbolSize:6,data:[],markLine:{data:[{yAxis:m}],lineStyle:{color:"#5470c6"}}},l={name:"Vesprada",type:"line",smooth:!1,symbol:"circle",symbolSize:6,data:[],markLine:{data:[{yAxis:m}],lineStyle:{color:"#5470c6"}}},s={name:"Nit",type:"line",smooth:!1,symbol:"circle",symbolSize:6,data:[],markLine:{data:[{yAxis:p}],lineStyle:{color:"#fac858"}}};o+=r[0][5],r.forEach((e=>{i.data.push(e[6]),l.data.push(e[7]),s.data.push(e[8]),n.add(b(e[1]))}));const c=S(n.size);h("chartSonometroMapa",f([i,l,s],Array.from(a.values()),Array.from(n.values()),"dB",c,!0,-10,void 0,o))}const x="MITJANA DE SOROLL: ";function v(e,t,o,r,a,n){const i=t.resultset,l=`resultadoDirecciones${n}`,s=Dashboards.getParameterValue(l).map((e=>e[0])),c=[],d={},m=i.map((e=>{const t=e[0].split("-");return`${t[2]}/${t[1]}/${t[0]}`}));Array.from(new Set(m)).forEach((e=>{d[e]=Array(s.length).fill(null)})),i.forEach((e=>{const t=b(e[0]);s.every(((o,r)=>e[1].toString()!==o||(d[t][r]=e[2],!1)))})),s.forEach(((e,t)=>{const o={name:"",type:"line",smooth:!1,data:[],symbol:"circle",symbolSize:6,markLine:{data:[{yAxis:r}],lineStyle:{color:"#ff9933"}}},a=Object.values(d).map((e=>e[t]));o.name=e,o.data=a,c.push(o)}));const p=S(Array.from(Object.keys(d)).length),u=s.map((e=>({[e]:!1}))),y={};u.forEach(((e,t)=>{const o=Object.keys(e)[0];y[o]=t<4||e[o]})),h(o,f(c,s,Array.from(Object.keys(d)),"dB",p,!0,-10,void 0,a,void 0,void 0,y))}function M(e,t,o,r){const a=`${r.toUpperCase()} MATÍ`;v(0,t,o+r,m,x+a,r)}function w(e,t,o,r){const a=`${r.toUpperCase()} VESPRADA`;v(0,t,o+r,m,x+a,r)}function k(e,t,o,r){const a=`${r.toUpperCase()} NIT`;v(0,t,o+r,p,x+a,r)}function O(){let e,t;const o=L.icon({iconUrl:g("build/images/mapas/marker-icon-sonometros.svg/content"),iconSize:[34,34],shadowSize:[50,64],iconAnchor:[17,17],shadowAnchor:[4,62],popupAnchor:[0,-26]}),r=L.icon({iconUrl:g("build/images/mapas/marker-icon-selected-sonometros.svg/content"),iconSize:[34,34],shadowSize:[50,64],iconAnchor:[17,17],shadowAnchor:[4,62],popupAnchor:[0,-26]});e=L.map("myMap").setView([39.47225,-.37739],14);const a=L.tileLayer("https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}{r}.png",{attribution:'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors &copy; <a href="https://carto.com/attributions">CARTO</a>',subdomains:"abcd",maxZoom:20});e.setMinZoom(5),e.setMaxZoom(20),a.addTo(e),L.geoJSON(legacy.obtenerGeoJson(resultadoSonometros,0,5,9),{onEachFeature(e,a){!function(e,t){if(e.properties&&e.properties.objectoId){const o=e.properties.address;t.bindPopup(o),t.on("click",(()=>soroll.createChart(o,resultadoSonometros)))}}(e,a),function(e){e.on("click",(e=>{var a;a=e.target,t&&t.setIcon(o),t=a,t.setIcon(r)}))}(a)},pointToLayer:(e,t)=>L.marker(t,{icon:o})}).addTo(e)}return t})()));