(function(t){function e(e){for(var r,o,s=e[0],c=e[1],l=e[2],u=0,p=[];u3e5}},ot=a("5522"),st=a.n(ot);function ct(t){t.processing+=1}function lt(t){t.processing=Math.max(0,t.processing-1)}function ut(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;t.sidebarOpen=null===e?!t.sidebarOpen:e}function dt(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"guest";t.isLoggedIn?e="user":"user"===e&&(e="guest"),t.sidebarView=e}function pt(t,e){if(t.token=e||null,t.expire_at=null,e){var a=st.a.decode(e.replace(/^Bearer /i,""),"",!0);t.expire_at=new Date(1e3*a.exp)}}function ht(t,e){e?t.sidebarView="user":(t.user=null,pt(t),t.isLoggedIn!==e&&(t.sidebarView="guest")),t.isLoggedIn=e}function ft(t,e){t.user=e}function mt(t,e){e&&e.data&&e.headers?(pt(t,e.headers.authorization),t.user=e.data,ht(t,!0)):ht(t,!1)}a("4de4"),a("c975"),a("13d5"),a("b64b"),a("d3b7"),a("e6cf");var gt=a("8e72"),vt=a.n(gt),yt=a("ff57"),bt=a.n(yt);function wt(t,e){var a=t.commit;t.dispatch;return e.hasOwnProperty("remember")&&!0!==e.remember&&delete e.remember,M["b"].post("/auth/login",e).then((function(t){return a("updateUserState",t),t})).catch((function(t){throw t.response?a("updateLoginStatus",!1):t.request,t}))}function xt(t){var e=t.state,a=t.commit;return M["b"].get("/auth/logout",{headers:{Authorization:e.token}}).then((function(){return a("updateLoginStatus",!1)}))}function St(t,e){var a=t.commit;return M["b"].post("/auth/register",e).then((function(t){return a("updateUserState",t),t})).catch((function(t){throw t.response||t.request,t}))}function Ct(t){t.commit;return!0}function kt(t){var e=t.state,a=t.commit;return M["b"].get("auth/token/refresh",{headers:{Authorization:e.token}}).then((function(t){return a("setToken",t.headers.authorization),Promise.resolve({headers:{Authorization:e.token}})})).catch((function(){return Promise.reject()}))}function Lt(t){var e=t.state,a=t.getters,r=t.dispatch;return e.isLoggedIn?a.isTokenValid()?Promise.resolve({headers:{Authorization:e.token}}):r("account/refreshToken"):Promise.reject()}function _t(t){var e=t.state;return M["b"].get("zoom-api-test/ajax-test.php",{baseURL:"http://localhost/teste/",headers:{Authorization:e.token}}).then((function(t){return Promise.resolve({headers:{Authorization:e.token}})})).catch((function(t){throw t}))}var At={namespaced:!0,state:at,getters:o,mutations:s,actions:c},qt=function(){return{registry:[],activeMenu:{},allGraphs:{},activeGraphs:[],activeGraphsCodes:[],breadcrumbs:[],activeEndPoint:0,viewBreadcrumbs:[],pageCode:[],scrollit:!1,note:""}};function Mt(t){return t.activeEndPoint}function zt(t){return t.scrollit}function Ft(t){return void 0!==t.activeMenu.registry?t.activeMenu.registry:t.activeMenu.nodes}function Rt(t){return t.activeGraphs}function It(t){return t.breadcrumbs}function Ot(t){return t.viewBreadcrumbs}function Pt(t){return t.activeGraphsCodes}function Tt(t){return t.allGraphs}a("fb6a");function Et(t,e){var a=null;if("undefined"!==typeof e.obj.code){if(t.breadcrumbs.push(e.obj),e.obj.code===e.code)return!0;if("undefined"===typeof e.obj.nodes)return!1;a=e.obj.nodes}else a=e.obj;for(var r=0;r1?t.activeMenu=t.breadcrumbs[t.breadcrumbs.length-2].nodes:t.activeMenu=t.registry,t.note="","undefined"!==typeof e.data.note&&(t.note=e.data.note),e.data}function Dt(t,e){return t.activeMenu=e,t.activeMenu}function $t(t,e){t.activeGraphsCodes=e}function Gt(t,e){return t.activeGraphs.push(e.graphs[0]),e.graphs[0]}function Qt(t,e){t.allGraphs=e.graphs,t.activeGraphs=e.activeGraphs;var a=[];return t.activeGraphs.forEach((function(t,e){var r=t.code.split("-");r.pop(),a.push("".concat(r.join("-")))})),t.viewBreadcrumbs=t.breadcrumbs,t.activeGraphsCodes=a,e}function Vt(t,e){t.activeMenu=t.breadcrumbs[e.index],t.breadcrumbs=t.breadcrumbs.slice(0,e.index+1)}function Nt(t){t.breadcrumbs=[]}function Ut(t){t.viewBreadcrumbs=t.breadcrumbs}a("b0c0");function Ht(t,e){var a=t.commit;return M["a"].post("/".concat(e.category,"/registry/"),{sir:e.ids}).then((function(t){t.code=e.code,a("updateRegistry",t)})).catch((function(t){throw t}))}function Kt(t,e){var a=t.commit,r=t.state;return M["a"].post("/".concat(e.category,"/registry/"),{sir:e.ids,tip:e.code}).then((function(t){return r.pageCode=e.code,a("updateAllGraphs",t.data),t.data})).catch((function(t){throw t}))}function Jt(t,e){var a=t.commit;t.state;return M["a"].post("/".concat(e.category,"/search/"),{sir:e.ids.split(","),tip:e.code}).then((function(t){return a("addActiveGraph",t.data),t.data})).catch((function(t){throw t}))}function Yt(t,e){var a=t.commit,r=t.state;return r.breadcrumbs.push(e.item),a("updateActiveMenu",e.item),!0}function Zt(t,e){var a=t.commit,r=t.state,n=t.rootGetters,i=t.rootState;return r.activeEndPoint=e.id,M["a"].post("/".concat(e.id,"/registry/"),{sir:n["search/getActiveLocalities"]}).then((function(t){r.breadcrumbs.push({name:e.name,icon:i.icons[e.id],level:0,nodes:t.data.registry}),t.code=e.id,a("updateRegistry",t)})).catch((function(t){throw t}))}function Wt(t,e){var a=t.commit,r=(t.state,t.rootGetters);return M["a"].post("/".concat(e.category,"/registry/"),{sir:r["search/getActiveLocalities"]}).then((function(t){t.code=e.code,a("updateRegistry",t)})).catch((function(t){throw t}))}var Xt={namespaced:!0,state:qt,getters:l,mutations:u,actions:d};a("5bc0");f["default"].use(q["a"]);var te=function(t){return!![/search\/name\/?$/i].some((function(e){return e.test(t)}))},ee=function(){var t=new q["a"].Store({modules:{search:et,account:At,registry:Xt},state:{processing:0,sidebarOpen:!1,miniState:!1,updates:0,icons:{pol:"ion-ios-ribbon",edu:"ion-ios-school",dem:"ion-ios-people",bus:"ion-ios-business"}},getters:{processing:function(t){return Boolean(t.processing)}},mutations:{setSidebarOpen:function(t,e){t.sidebarOpen=e},setMiniState:function(t,e){t.miniState=e},startApiCall:function(t,e){t.processing+=1,e&&te(e)||w["a"].show({delay:250})},completeApiCall:function(t){t.processing=Math.max(0,t.processing-1),t.processing||w["a"].hide()}}});return M["a"].interceptors.request.use(function(){var e=h()(regeneratorRuntime.mark((function e(a){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t.commit("startApiCall",a.url),a.headers.Authorization=t.state.account.token,e.abrupt("return",a);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),M["a"].interceptors.response.use((function(e){return t.commit("completeApiCall"),e}),(function(e){throw t.commit("completeApiCall"),e})),M["b"].interceptors.request.use((function(e){return t.commit("account/startApiCall"),e})),M["b"].interceptors.response.use((function(e){return t.commit("account/completeApiCall"),e}),(function(e){throw t.commit("account/completeApiCall"),e})),t},ae=a("8c4f"),re=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("q-layout",{attrs:{view:"hHh LpR FFF"}},[a("q-page-container",{staticClass:" flex-center",staticStyle:{"max-width":"625px",margin:"0 auto",height:"calc(100vh - 40px)"}},[a("router-view")],1)],1)},ne=[],ie=a("c544"),oe=ie["a"],se=(a("b656"),a("4d5a")),ce=a("09e3"),le=a("f09f"),ue=a("6ac5"),de=a("cb32"),pe=a("66e5"),he=a("b047"),fe=a("65c6"),me=a("7ff0"),ge=a("8572"),ve=a("eebe"),ye=a.n(ve),be=Object(L["a"])(oe,re,ne,!1,null,null,null),we=be.exports;ye()(be,"components",{QLayout:se["a"],QPageContainer:ce["a"],QCard:le["a"],QToolbarTitle:ue["a"],QAvatar:de["a"],QItem:pe["a"],QIcon:y["a"],QChip:he["a"],QToolbar:fe["a"],QFooter:me["a"],QField:ge["a"]});var xe=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("q-layout",{attrs:{view:"lHH lpR FFF"}},[a("q-page-container",{staticStyle:{height:"calc(100vh - 40px)"}},[a("q-header",{staticClass:"graphs-title"},[a("q-toolbar",[a("q-toolbar-title",[a("a",{attrs:{href:"https://zoom.report",target:"_blank"}},[a("img",{staticStyle:{height:"auto",width:"50px"},attrs:{src:"statics/logo-square.png"}})]),a("span",{staticStyle:{"line-height":"1","font-size":"0.8em",top:"-14px",position:"relative",left:"10px"}},[t._v("Rezultate Alegeri Locale 2020")])]),t.$q.platform.is.mobile?a("q-btn",{attrs:{flat:"",round:"",dense:"",icon:"menu"},on:{click:function(e){t.drawerRight=!t.drawerRight}}}):t._e()],1)],1),a("q-dialog",{staticClass:"bg-white",model:{value:t.opened,callback:function(e){t.opened=e},expression:"opened"}},[a("div",{staticClass:"bg-white",staticStyle:{"font-size":"1.5em",padding:"1em"}},[t._v("\n Aplicația Zoom Report este optimizată pentru utilizarea pe computer\n \n ")])]),a("router-view")],1)],1)},Se=[],Ce=a("b5f2"),ke=Ce["a"],Le=(a("f493"),a("e359")),_e=a("9c40"),Ae=a("24e8"),qe=Object(L["a"])(ke,xe,Se,!1,null,null,null);qe.exports;ye()(qe,"components",{QLayout:se["a"],QPageContainer:ce["a"],QHeader:Le["a"],QToolbar:fe["a"],QToolbarTitle:ue["a"],QBtn:_e["a"],QDialog:Ae["a"],QCard:le["a"],QAvatar:de["a"],QItem:pe["a"],QIcon:y["a"],QChip:he["a"],QFooter:me["a"],QField:ge["a"]});var Me=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("q-layout",{attrs:{view:"lHh Lpr lFf"}},[a("q-layout-header",[a("q-toolbar",{attrs:{color:"primary",glossy:"mat"===t.$q.theme,inverted:"ios"===t.$q.theme}},[a("q-btn",{attrs:{flat:"",dense:"",round:"","aria-label":"Menu"},on:{click:function(e){t.leftDrawerOpen=!t.leftDrawerOpen}}},[a("q-icon",{attrs:{name:"menu"}})],1),a("q-toolbar-title",[t._v("\n Quasar App\n "),a("div",{attrs:{slot:"subtitle"},slot:"subtitle"},[t._v("Running on Quasar v"+t._s(t.$q.version))])])],1)],1),a("drawer-home"),a("q-page-container",[a("div",{attrs:{id:"DashTimeline"}}),a("dash-area-chart",{attrs:{"chart-data":this.timeline}}),a("router-view")],1)],1)},ze=[],Fe=a("b06b"),Re=a("5698"),Ie={name:"MasterLayout",data:function(){return{leftDrawerOpen:this.$q.platform.is.desktop,timeline:[{name:"10/1/2012 3:00:00 AM",value:105},{name:"11/1/2012 2:00:00 AM",value:850080},{name:"12/1/2012 2:00:00 AM",value:2432339},{name:"1/1/2013 2:00:00 AM",value:624044}]}},mounted:function(){},methods:{openURL:Fe["a"],change:function(){Re["t"]("#theGlobe").selectAll("path,circle,ellipse,.arcs,.flyers").remove()},drawTimeline:function(t){var e={top:20,right:10,bottom:20,left:40},a=800,r=a-e.left-e.right,n=500-e.top-e.bottom,i=Re["r"]().range([0,r]),o=Re["p"]().range([n,0]);Re["x"]("%yyyy-%m-%d");t.forEach((function(t,e){t.date=parseInt(t.name,10),t.value+=t.value})),i.domain([2004,2015]),o.domain([0,Re["m"](t,(function(t){return t.value}))]);var s=Re["a"]().x((function(t){return i(t.date)})).y0(n).y1((function(t){return o(t.value)})),c=Re["l"]().x((function(t){return i(t.date)})).y((function(t){return o(t.value)})),l=r+e.right+e.left,u=n+e.top+e.bottom,d=Re["t"]("#DashTimeline").append("svg").attr("width","".concat(l)).attr("height","".concat(u)).append("g").attr("transform","translate(".concat(e.left," , ").concat(e.top,")"));d.append("path").data([t]).attr("class","area").attr("d",s),d.append("path").data([t]).attr("class","line").attr("d",c),d.append("g").attr("transform","translate(0,".concat(n,")")).attr("class","axiscolor").call(Re["b"](i).ticks(4).tickFormat(Re["f"](".0f"))),d.append("g").attr("class","axiscolor").call(Re["c"](o).ticks(4))}}},Oe=Ie,Pe=(a("7685"),Object(L["a"])(Oe,Me,ze,!1,null,null,null));Pe.exports;ye()(Pe,"components",{QLayout:se["a"],QToolbar:fe["a"],QBtn:_e["a"],QIcon:y["a"],QToolbarTitle:ue["a"],QPageContainer:ce["a"]});var Te,Ee,Be,je,De,$e,Ge,Qe,Ve=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("q-page",{staticClass:"maxw q-px-xs q-px-md",staticStyle:{"padding-top":"60px"}},[a("q-toolbar",{attrs:{sticky:""}},[a("q-toolbar-title"),!0===t.overlay?a("q-btn",{attrs:{flat:"",dense:"",icon:"ion-ios-albums",label:"Date Disponibile"},on:{click:function(e){t.desk=!0}}}):t._e()],1),t.getActiveBreadcrumbs.length>0?[a("div",{staticClass:"row"},[a("q-breadcrumbs",{staticClass:"text-orange",attrs:{separator:" >","active-color":"secondary"}},[a("q-breadcrumbs-el",{attrs:{icon:"home"}}),t._l(t.getActiveBreadcrumbs,(function(e,r){return a("q-breadcrumbs-el",{key:"breadcrumb-"+e.code,style:"True"===e.link?"cursor:pointer; text-decoration: underline;":"",attrs:{label:""+e.name,clickable:""},on:{click:function(a){"True"===e.link?t.loadPage(e.code,r):t.linkfalse(e.link)}}})}))],2)],1),a("div",{staticClass:"row"},[a("h2",[t._v(t._s(t.getActiveBreadcrumbs[0].name))])]),a("div",{staticClass:"row"},[a("h1",[t._v(t._s(t.getActiveBreadcrumbs[t.getActiveBreadcrumbs.length-1].name))])])]:t._e(),t._l(t.viewGraphs,(function(e,r){return[a("graphs-component",{key:"graph-"+e+"-"+t.getActiveLocalities.join("-"),attrs:{code:""+e,id:"graphid-"+r,param:t.changedCode,ids:t.ids,cat:t.cat}})]})),a("div",[a("div",{staticClass:"row",class:{"gutter-md":1==t.$q.platform.is.desktop}},t._l(t.results,(function(e){return a("div",{key:e.id,staticClass:"col col-md-4 col-xs-12 box"},[a("div",{ref:"third",refInFor:!0,staticClass:"boxed"},[a("img",{staticStyle:{float:"left",width:"40px"},attrs:{src:"statics/icons/"+e.titlu[1]+".svg"}}),a("h3",{staticClass:"search"},[t._v(" "+t._s(e.titlu[1]))]),a("div",{staticStyle:{clear:"both"}},[a("hr")]),t._l(e.details,(function(e){return a("div",{key:e.id},[a("span",{staticStyle:{"font-size":"0.8em"}},[t._v(t._s(e.titlu)+" ("+t._s(e.year)+"):"),a("br")]),a("h4",[a("strong",{staticClass:"searchval"},[t._v(t._s(e.value)+" ")])]),a("hr")])})),a("hr"),a("q-btn",{staticClass:"full-width",attrs:{color:"primary",label:"Vezi raport "+e.titlu[1],to:"/"+e.titlu[1]+"?ids="+t.viewSearch.join(",")+"&tip="+t.tip}})],2)])})),0)]),a("q-drawer",{key:"r-"+t.getActiveLocalities.join("-"),attrs:{side:"right",overlay:t.overlay,"content-class":"right-menu",width:300,breakpoint:400},model:{value:t.desk,callback:function(e){t.desk=e},expression:"desk"}},[a("q-scroll-area",{staticClass:"right-menu",staticStyle:{height:"calc(100% - 50px)","margin-top":"50px","border-right":"1px solid #ddd"}},[t._l(this.getAllGraphs,(function(e,r){return[a("div",{key:"categ"+r},[a("div",{staticClass:"graphs-category"},[t._v("\n "+t._s(e.name)+"\n ")]),a("q-list",{attrs:{dense:""}},t._l(e.nodes,(function(e,r){return a("q-item",{directives:[{name:"ripple",rawName:"v-ripple"}],key:"bread"+r,staticClass:"graphs-item-list",attrs:{dense:"",tag:"label"},on:{click:function(a){return t.updateGraphs(""+e.code)}}},[a("q-item-section",{attrs:{side:"",top:""}},[a("q-checkbox",{attrs:{val:""+e.code},model:{value:t.activeGraphs,callback:function(e){t.activeGraphs=e},expression:"activeGraphs"}})],1),a("q-item-section",[a("q-item-label",[t._v(t._s(e.name))])],1)],1)})),1)],1)]}))],2),1==t.overlay?a("div",{staticClass:"q-mini-drawer-hide absolute",staticStyle:{top:"15px",left:"-17px","z-index":"50000"}},[1==t.overlay&&1==t.desk?a("q-btn",{attrs:{dense:"",round:"",unelevated:"",color:"info",icon:"chevron_right"},on:{click:function(e){t.desk=!1}}}):t._e()],1):t._e(),a("q-item",{staticClass:"absolute-top right-menu-title",staticStyle:{height:"50px"}},[a("q-item-section",{staticClass:"icon-dense small-padding",attrs:{avatar:""}},[a("q-avatar",{attrs:{size:"48px"}},[a("q-icon",{attrs:{name:"ion-ios-albums"},on:{click:function(e){return t.closeright()}}})],1)],1),a("q-item-section",[a("q-item-label",[t._v("Date disponibile\n ")])],1)],1)],1),a("canvas",{staticStyle:{position:"fixed",left:"-5000px"},attrs:{id:"canvas",width:"1080px",height:"1080px"}}),a("div",{staticStyle:{position:"fixed",left:"-5000px"},attrs:{id:"hidden-svg"}})],2)},Ne=[],Ue=(a("c740"),a("7619")),He=a.n(Ue),Ke=a("0831"),Je=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("div",{staticClass:"row graph-title"},[a("div",{staticClass:"col-8"},[a("h5",{staticStyle:{color:"#6B81D9"}},[t._v(t._s(t.category))]),a("h3",[t._v(t._s(t.theComponent.name))])]),a("div",{staticClass:"col-4 text-right"},[a("q-btn",{attrs:{loading:t.genPoza,download:"grafic.png"},on:{click:function(e){return t.generatepoza(t.tab)}},scopedSlots:t._u([{key:"loading",fn:function(){return[a("q-spinner",{attrs:{color:"primary",size:"0.8em"}}),t._v("\n Se generează\n ")]},proxy:!0}])},[t._v("Descarcă PNG\n ")])],1)]),a("div",{staticClass:"row"}),a("div",{staticClass:"row"},[a("q-tabs",{attrs:{"narrow-indicator":"",dense:""},model:{value:t.tab,callback:function(e){t.tab=e},expression:"tab"}},t._l(t.theComponent.nodes,(function(e){return a("q-tab",{key:e.code+"-"+t.getActiveLocalities.join("-")+"-"+t.$store.state.updates,attrs:{alert:"Blocked"===e.status&&"info",label:e.name,name:""+e.code}})})),1)],1),a("q-tab-panels",{attrs:{animated:""},on:{transition:function(e){return t.changeTab()}},model:{value:t.tab,callback:function(e){t.tab=e},expression:"tab"}},t._l(t.theComponent.nodes,(function(e,r){return a("q-tab-panel",{key:"t"+e.code+"-"+t.getActiveLocalities.join("-"),attrs:{name:""+e.code}},[!0===t.nodata?a("div",[a("q-banner",{staticClass:"text-white bg-secondary",attrs:{"inline-actions":""}},[t._v("\n Date indisponibile pentru selecția aleasă de tine. "),a("br"),t._v("Încearcă o altă selecție.\n ")]),a("div",{staticStyle:{"margin-bottom":"2em"}})],1):"Blocked"!==e.status?a("div",[a("graphs-template",{key:"temp-"+e.code+"-"+t.getActiveLocalities.join("-"),attrs:{index:r,code:""+e.code,years:t.activeYears,graphData:t.graphData,description:t.description,lastUpdated:t.lastUpdated,sources:t.sources}})],1):a("div",[[a("div",{staticClass:"q-pa-md row items-start q-gutter-md"},[a("div",{staticClass:"col-md-4"},[a("q-card-section",{},[a("h1",{staticClass:"text-info"},[t._v("Statistică pentru conturi premium.")]),t._v("\n \n Îți trebuie cont premium pentru a avea acces la peste 5 milioane de data points.\n ")])],1),a("q-card",{staticClass:"my-card"},[a("q-card-section",{staticClass:"bg-primary text-white text-center"},[a("div",{staticClass:"text-h6"},[t._v("PASS 1 ZI")]),a("div",{staticClass:"text-subtitle2"},[t._v("Știi exact ce cauți.")])]),a("q-separator"),a("q-card-section",{staticClass:"text-center"},[a("h1",{staticClass:"text-uppercase price text-info text-bold"},[t._v("€10 ")])]),a("q-card-actions",{attrs:{align:"center"}},[a("a",{staticStyle:{"text-decoration":"none"},attrs:{href:"/pay/1"}},[a("q-btn",{staticClass:"bg-primary text-white",attrs:{flat:""}},[t._v("Alege")])],1)])],1),a("q-card",{staticClass:"my-card"},[a("q-card-section",{staticClass:"bg-info text-white text-center"},[a("div",{staticClass:"text-h6"},[t._v("PASS 1 LUNĂ")]),a("div",{staticClass:"text-subtitle2"},[t._v("Timp să aprofundezi.")])]),a("q-separator"),a("q-card-section",{staticClass:"text-center"},[a("h1",{staticClass:"text-uppercase price text-info text-bold"},[t._v("€45 ")])]),a("q-card-actions",{attrs:{align:"center"}},[a("a",{staticStyle:{"text-decoration":"none"},attrs:{href:"/pay/2"}},[a("q-btn",{staticClass:"bg-info text-white",attrs:{flat:""}},[t._v("Alege")])],1)])],1),a("q-card",{staticClass:"my-card"},[a("q-card-section",{staticClass:"bg-primary text-white text-center"},[a("div",{staticClass:"text-h6"},[t._v("PASS 1 AN")]),a("div",{staticClass:"text-subtitle2"},[t._v("Libertate totală.")])]),a("q-separator"),a("q-card-section",{staticClass:"text-center"},[a("h1",{staticClass:"text-uppercase price text-info text-bold"},[t._v("€299 ")])]),a("q-card-actions",{attrs:{align:"center"}},[a("a",{staticStyle:{"text-decoration":"none"},attrs:{href:"/pay/3"}},[a("q-btn",{staticClass:"bg-primary text-white",attrs:{flat:""}},[t._v("Alege")])],1)])],1)],1)]],2)])})),1)],1)},Ye=[],Ze=(a("a4d3"),a("e01a"),a("7db0"),a("0d73")),We=a("e48b"),Xe=a("00a5");Te="tspans",Ee=function(t){var e,a;return a="function"===typeof t,"object"!==bt()(t)||t.nodeType?!!(t instanceof We["b"]||t.nodeType||a||e):!(!t.height||!t.width)},Be=function(t){var e,a,r,n;for(e=["height","width"],"function"===typeof t?a=t():t.nodeType?a=t.getBoundingClientRect():"object"===bt()(t)&&(a=t),r=Object.create(null),n=0;n0)n=r.pop(),s.text(s.text()+" "+n),i=s.node().getComputedTextLength()||0,i>e.width&&(c=s.text().split(" ").slice(0,-1).join(" "),s.text(c),o=-1*s.node().getComputedTextLength(),s=t.append("tspan"),s.attr("dx",o).attr("dy","1em").text(n));"number"===typeof a&&t.attr("y",t.attr("y")+a).attr("x",t.attr("x")+a)},Qe=function(){var t,e,a;return t=function(t){t.each((function(){Object(Xe["a"])(this).call(Ge[Te],$e(e,a),je(a))}))},t.bounds=function(a){return a?!!Ee(a)&&(e=a,t):e},t.padding=function(e){return e?("number"===typeof e||"function"===typeof e)&&(a=e,t):a},t.method=function(e){return e?(Te=e,t):Te},t};var ta=Qe,ea=(a("e260"),a("ddb0"),{install:function(t,e){},stackMin:function(t){return Re["n"](t,(function(t){return t[0]}))},stackMax:function(t){return Re["m"](t,(function(t){return t[1]}))},negativeStackedBar:function(t){var e=Re["t"](".tooltip"),a=Re["g"]({decimal:",",thousands:".",grouping:[3]}),r=a.format(","),n=t.data,i=t.titlu,o=t.color,s=t.keys,c=(t.clientWidth,{top:5,right:15,bottom:15,left:10}),l=24*n.length+c.top+c.bottom,u=Re["v"]().keys(s).offset(Re["w"])(n),d=Re["t"]("#".concat(i)),p=Math.floor(d.node().parentNode.getBoundingClientRect().width)-c.left-c.right;d.selectAll("*").remove(),d.attr("xmlns","http://www.w3.org/1999/xlink").attr("version","1.1").attr("preserveAspectRatio","xMinYMin meet").attr("viewBox","0 0 ".concat(p+c.right," ").concat(l+c.top+c.bottom)),d.append("defs").append("style").attr("type","text/css").text("@import url('https://fonts.googleapis.com/css?family=Roboto:400,300,600,700,800');"),d.attr("width",p+c.left+c.right).attr("height",l+c.top+c.bottom),d.append("g").attr("id","all-".concat(i)).attr("class","all").attr("transform","translate(".concat(c.left,",").concat(c.top,")"));var h=d.selectAll(".all"),f=Re["o"]().domain(n.map((function(t){return t.key}))).rangeRound([c.top,l-c.bottom]).padding(.1),m=Re["q"](o);h.append("g").attr("id","yaxis").call(Re["c"](f).tickSize(0)).attr("font-size","8px").attr("font-family",'"Roboto", "sans-serif"').selectAll(".domain line,path").style("opacity","0").selectAll(".tick text").on("mouseover",(function(t){var a=n.find((function(e){return e.key===t}));a.key!==a.root&&(e.transition().duration(200).style("opacity",1),e.html(a.root).style("left","".concat(Re["e"].pageX,"px")).style("top","".concat(Re["e"].pageY-28,"px")).style("max-width","200px"))})).on("mouseout",(function(t,a){Re["u"](".bar-".concat(a)).style("opacity","1"),e.transition().duration(200).style("opacity",0)}));c.left=h.select("#yaxis").node().getBBox().width,h.select("#yaxis").attr("transform","translate(".concat(c.left,",0)"));var g=Re["p"]().domain([1.5*Re["n"](u,this.stackMin),Re["m"](u,this.stackMax)]).rangeRound([c.left,p-c.right]);h.append("g").attr("transform","translate(0,".concat(l-c.bottom,")")).attr("stroke-dasharray","2,2").attr("id","xaxis").attr("class","grid-stackedarea").call(Re["b"](g).tickSize(-l).ticks(3).tickFormat(Re["f"](".2s"))).attr("font-size","10px").attr("font-family",'"Roboto", "sans-serif"').selectAll(".domain line,path").style("opacity","0"),h.selectAll("#yaxis .tick line").style("opacity","0"),h.selectAll("#xaxis .tick line").style("opacity","0.15"),h.append("g").selectAll("g").data(u).enter().append("g").attr("fill",(function(t){return m(t.key)})).selectAll("rect").data((function(t){return t})).enter().append("rect").attr("height",10).attr("y",(function(t){return f(t.data.key)+5})).attr("x",(function(t){return t[0]<0?g(t[0])-2:g(t[0])})).attr("width",(function(t){return g(t[1])-g(t[0])})),h.append("g").selectAll("g").data(u).enter().append("g").selectAll("text").data((function(t){return t})).enter().append("text").text((function(t,e){return t[1]-t[0]!==0?"".concat(r(t[1]-t[0])):""})).attr("y",(function(t){return g(t[1])>40+c.left?f(t.data.key)+3:f(t.data.key)+13})).attr("x",(function(t){return g(t[1])>40+c.left?g(t[1]):g(t[1])+5})).attr("text-anchor",(function(t){return g(t[1])>40+c.left?"end":"start"})).attr("font-size","8px").attr("font-family",'"Roboto", "sans-serif"').attr("font-weight","bold")}}),aa=ea,ra=(a("25f0"),{scrolltobottom:function(t){var e=Ke["a"].getScrollTarget,a=Ke["a"].setScrollPosition,r=(Ke["a"].getScrollPosition,document.getElementById("q-app")),n=document.getElementById("".concat(t)),i=(document.getElementsByTagName("main")[0],document.body.getBoundingClientRect()),o=n.getBoundingClientRect(),s=o.top-i.top-230,c=750;a(e(r),s,c)},stackedBar:function(t){var e=Re["t"](".tooltip"),a=Re["g"]({decimal:",",thousands:".",grouping:[3]}),r=(a.format(","),t.data),n=t.titlu,i=(t.legend,t.color),o=t.graphDetails,s=(t.opacity,t.legenda,r.columns.filter((function(t){return"key"!==t}))),c=Re["v"]();c.keys(s);var l=Re["v"]().keys(s).offset(Re["w"])(r),u=Re["t"]("#all-".concat(n));u.append("g");var d=u.selectAll(".layer").data(l).enter().append("g").attr("class","layer").style("fill",(function(t,e){return i[e]})).attr("id",(function(t){return"layer-".concat(t.key)}));function p(t,a){u.node().parentNode.getBoundingClientRect();var r=Re["u"]("#bar-".concat(n,"-").concat(t.data.key,"-").concat(a)).style("opacity","0.8");r.node().getBBox();e.style("left","".concat(Re["e"].pageX,"px")),e.style("top","".concat(Re["e"].pageY-window.scrollY+15,"px"))}function h(t,a){e.style("opacity",1),e.html((t[1]-t[0]).toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1.")).style("max-width","200px")}function f(t,a){Re["u"]("#bar-".concat(n,"-").concat(t.data.key,"-").concat(a)).style("opacity","1"),e.style("opacity",0)}d.selectAll("rect").data((function(t){return t.current=t.key,t})).enter().append("rect").attr("x",(function(t){return o.x(t.data.key)+.25*o.x.bandwidth()})).attr("y",(function(t){return t[1]=t[1]?t[0]:t[1]}))},graphAxis:function(t){var e=t.data,a=t.titlu,r=t.maxvalue,n=(t.color,t.clientWidth,t.clientHeight),i=t.clientRight,o=t.tick,s=t.stack,c=t.format,l={};l.name="#".concat(a);var u=Re["t"]("#".concat(a)),d=1;void 0!==o&&(d=o),u.selectAll("*").remove();Re["x"]("%Y");var p=e.columns.filter((function(t){return"key"!==t}));l.margin={top:20,right:i,bottom:30,left:40},l.height=n-l.margin.top-l.margin.bottom,l.svg=Re["t"](l.name),l.width=Math.floor(u.node().parentNode.getBoundingClientRect().width)-l.margin.left-l.margin.right,l.x=Re["o"]().rangeRound([0,.95*l.width]).paddingInner(-.05),l.y=Re["p"]().range([l.height,0]);var h=[];if(e.forEach((function(t){h.push(t.key)})),l.x.domain(h),l.x.bandwidth()<30&&(d=2),l.xAxis=Re["b"](l.x).scale(l.x).tickFormat((function(t,e){return e%d===0?t:null})),void 0!==s)l.y.domain([0,1.1*r]);else{var f=Re["v"]().keys(p).offset(Re["w"])(e);l.y.domain([1.5*Re["n"](f,this.stackMin),Re["m"](f,this.stackMax)])}var m=Re["f"]("0.2s");void 0!==c&&(m=c),l.svg.attr("xmlns","http://www.w3.org/1999/xlink").attr("version","1.1").attr("preserveAspectRatio","xMinYMin meet").attr("viewBox","0 0 ".concat(l.width+l.margin.right," ").concat(l.height+l.margin.top+l.margin.bottom)),l.svg.append("defs").append("style").attr("type","text/css").text("@import url('https://fonts.googleapis.com/css?family=Roboto:400,300,600,700,800');"),l.yAxis=Re["c"]().scale(l.y).tickSize(-l.width).tickFormat(m).ticks(5),l.svg.attr("width",l.width+l.margin.right).attr("height",l.height+l.margin.top+l.margin.bottom).append("rect").attr("width","100%").attr("height","100%").attr("fill","white"),l.svg.append("g").attr("id","all-".concat(a)).attr("class","all").attr("transform","translate(".concat(l.margin.left,",").concat(l.margin.top,")"));var g=u.selectAll(".all");return g.append("g").attr("transform","translate(".concat(0,",",l.height,")")).attr("id","xaxis").call(l.xAxis).attr("font-size","10px").attr("font-family",'"Roboto", "sans-serif"'),g.append("g").attr("stroke-dasharray","2,2").attr("id","yaxis").call(l.yAxis).attr("font-size","10px").attr("font-family",'"Roboto", "sans-serif"').selectAll(".domain line,path").style("opacity","0"),g.selectAll("#yaxis .tick line").style("opacity","0.15"),g.selectAll("#xaxis .tick line").style("opacity","0"),l}},oa=ia,sa={install:function(t,e){},stackMin:function(t){return Re["n"](t,(function(t){return t[0]}))},stackMax:function(t){return Re["m"](t,(function(t){return t[1]}))},clockwise:function(t){var e=function(t){for(var e=t.length,a=0,r=e-1,n=0;n1&&"MultiPolygon"===s[t].geodata.geometry.type?s[t].geodata.geometry.coordinates.forEach((function(a,r){e.clockwise(s[t].geodata.geometry.coordinates[r][0])})):e.clockwise(s[t].geodata.geometry.coordinates[0]);var a=s[t].data.find((function(t){return t.root===c}));if(void 0===a)g[t].data=0;else if(""===l)g[t].data=a.value;else{var r=a.tree.find((function(t){return t.root===l}));if(void 0===r)g[t].data=0;else if(""===u)g[t].data=r.value;else{var n=r.tree.find((function(t){return t.root===u}));g[t].data=void 0===n?0:n.value}}g[t].name=s[t].code},y=0;y0&&(a.node().getBBox().width>80||a.node().getBBox().height>80)?1:0})).on("mouseover",(function(t,e){return L(t,e)})).on("mouseout",(function(t,e){return _(t,e)}));var q=p.select("defs"),M=q.append("linearGradient").attr("id","linear-gradient");M.append("stop").attr("offset","0%").attr("stop-color","#bdcdff"),M.append("stop").attr("offset","100%").attr("stop-color","#222f63"),m.append("rect").attr("width",h/5).attr("height",10).attr("y",f-30).attr("rx","5px").style("fill","url(#linear-gradient)"),m.append("text").text(i.value).attr("x",0).attr("y",f-35).style("font-size","10"),m.append("text").text(Re["f"](".2s")(Math.min.apply(Math,vt()(b)))).attr("x",0).attr("y",f-10).style("font-size","10"),m.append("text").text(Re["f"](".2s")(Math.max.apply(Math,vt()(b)))).attr("x",h/5).attr("y",f-10).attr("text-anchor","end").style("font-size","10")}},ca=sa,la=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"boxed"},[0===t.geo?a("div",{staticClass:"full-width row wrap justify-start items-start"},[t.years.length>0&&t.builder<4?a("q-select",{attrs:{id:"combo-"+t.code,options:t.years,dense:""},on:{input:function(e){return t.changeDropdown(t.activeYear)}},model:{value:t.activeYear,callback:function(e){t.activeYear=e},expression:"activeYear"}}):t._e()],1):a("div",{staticClass:"full-width row wrap justify-start items-start"},[t.builder>1?a("q-select",{attrs:{id:"combo2-"+t.code,options:t.combos1,dense:""},on:{input:function(e){return t.changeDropdownGeo()}},model:{value:t.c[0],callback:function(e){t.$set(t.c,0,e)},expression:"c[0]"}}):t._e(),t.builder>2?a("q-select",{attrs:{id:"combo3-"+t.code,options:t.combos2,dense:""},on:{input:function(e){return t.changeDropdownGeo()}},model:{value:t.c[1],callback:function(e){t.$set(t.c,1,e)},expression:"c[1]"}}):t._e(),t.builder>3&&t.geo>0?a("q-select",{attrs:{id:"combo4-"+t.code,options:t.combos3,dense:""},on:{input:function(e){return t.changeDropdownGeo()}},model:{value:t.c[2],callback:function(e){t.$set(t.c,2,e)},expression:"c[2]"}}):t._e()],1),a("div",{staticClass:"full-width row wrap justify-start items-start"},[t.builder>3&&t.allObjects.length>0?a("div",{staticClass:"col-6"},[a("q-btn-group",{attrs:{outline:""}},t._l(t.allObjects,(function(e,r){return a("q-btn",{directives:[{name:"ripple",rawName:"v-ripple"}],key:"active"+r,attrs:{outline:"",clickable:""},on:{click:function(e){return t.goBack(r)}}},[a("q-item-section",[a("span",{attrs:{id:"combo"+r+"-"+t.code}},[t._v("\n "+t._s(e.root)+"\n ")])]),a("q-item-section",{attrs:{side:""}},[a("q-icon",{attrs:{name:"ion-arrow-back"}})],1)],1)})),1)],1):t._e(),t.builder>3?a("div",{staticClass:"col-6"},[t.activeStep.length>0?[t.activeStep.length>0?a("q-select",{attrs:{options:t.activeStep,"option-label":"root",dense:""},on:{input:function(e){return t.changeActiveStep(t.selectstep)}},model:{value:t.selectstep,callback:function(e){t.selectstep=e},expression:"selectstep"}}):t._e()]:t._e()],2):t._e()]),a("div",{staticClass:"full-width row wrap justify-start items-start"},[a("div",{class:[t.index?0:"col-grow col-md-8","col-grow"]},[a("svg",{attrs:{id:"graph-"+t.code}})]),0===t.index&&t.builder<4?a("div",{staticClass:"col-grow col-md-4"},[a("div",{domProps:{innerHTML:t._s(t.description)}},[t._v("\n "+t._s(t.description)+"\n ")]),a("br"),t._v("\n Surse:"),a("br"),t._l(t.sources,(function(e){return[a("a",{key:"source"+e,attrs:{href:"http://"+e,target:"_blank"}},[t._v(" "+t._s(e)+" "),a("br")])]})),a("br"),a("span",{staticStyle:{color:"#FF5000","font-size":"0.8em"}},[t._v("Ultima updatare: "+t._s(t.lastUpdated))])],2):t._e()])])},ua=[],da=(a("a9e3"),{name:"graphs-template",props:{ids:{type:String,default:""},index:{type:Number,default:0},years:{type:Array,default:function(){return[]}},cat:{type:String,default:""},code:{type:String,default:""},graphData:{type:Object,default:function(){}},description:{type:String,default:""},sources:{type:Array,default:function(){return[]}},lastUpdated:{type:String,default:""}},data:function(){return{theGraph:{},theComponent:{},tab:"Agregat",change:!1,activeYear:"",activeStep:[],stepnr:0,builder:0,allObjects:[],selectstep:0,geo:0,combos1:[],combos2:[],combos3:[],c:["","",""],first:!0}},watch:{years:{handler:function(t,e){this.activeYear=this.years[0]}},graphData:{handler:function(t,e){this.builder=Number(this.graphData.builder.split("_")[1]),"geo"===this.graphData.builder.split("_")[2]&&(this.geo=1)}}},computed:He()(He()({},Object(q["c"])("registry",["getAllGraphs","getActiveGraphsChecks","getActiveGraphs"])),Object(q["c"])("search",["getActiveLocalities"])),mounted:function(){this.updatecombos()},updated:function(){this.updatecombos()},methods:He()(He()({},Object(q["b"])("registry",["getNewGraph"])),{},{updatecombos:function(){this.first&&(this.builder>3&&0===this.geo&&(0===this.stepnr&&(this.activeStep=this.graphData.data),this.selectstep="Alege ".concat(this.getLegenda().label)),this.geo>0&&(this.combos1=this.graphData.legend.root.items,this.c[0]=this.combos1[0],this.activeYear=this.combos1[0],this.builder>2&&(this.combos2=this.graphData.legend.tree[0].root.items,this.c[1]=this.combos2[0]),this.builder>3&&(this.combos3=this.graphData.legend.tree[0].tree[0].root.items,this.c[2]=this.combos3[0]),this.changeDropdownGeo(),this.first=!1))},updateHorizontalBarChart:function(t){var e={data:[]};t.tree.forEach((function(t,a){t.key=t.root.substr(0,30),e.data.push(t)})),e.keys=["value"],e.color=["#7643BE","#6ed4ff"],e.titlu="graph-".concat(this.code),aa.negativeStackedBar(e)},updateMapChart:function(t,e,a,r){var n={};n.titlu="graph-".concat(t.code),n.features=t.featureCollection,n.legend=t.legend,n.id=e,n.id2=a,n.id3=r,ca.showMap(n)},updateMapChartB3:function(t,e,a,r){var n={};n.titlu="graph-".concat(t.code),n.features=t.featureCollection,n.legend=t.legend,n.id=e,n.id2=a,n.id3=r,ca.showMap(n)},getLegenda:function(){for(var t=this.graphData.legend,e=0;e0&&(this.activeStep=this.allObjects[t-1].tree),this.allObjects=this.allObjects.slice(0,t)},changeDropdownGeo:function(){this.updateMapChartB3(this.graphData,this.c[0],this.c[1],this.c[2])},changeDropdown:function(t){if(this.activeYear=t,"builder_2_geo"===this.graphData.builder){this.years.findIndex((function(e){return e===t}));this.updateMapChart(this.graphData,t,"")}else{var e=this.graphData.data.find((function(e){return e.root===t}));this.updateHorizontalBarChart(e)}}})}),pa=da,ha=a("ddd8"),fa=a("e7a9"),ma=a("4074"),ga=a("1c1c"),va=a("714f"),ya=Object(L["a"])(pa,la,ua,!1,null,"b3961638",null),ba=ya.exports;ye()(ya,"components",{QSelect:ha["a"],QBtnGroup:fa["a"],QBtn:_e["a"],QItemSection:ma["a"],QIcon:y["a"],QList:ga["a"],QItem:pe["a"]}),ye()(ya,"directives",{Ripple:va["a"]});var wa={name:"graphs-component",components:{GraphsTemplate:ba},props:{ids:{type:String,default:""},cat:{type:String,default:""},code:{type:String,default:""},param:{type:String,default:""}},data:function(){return{theGraph:{},theComponent:{},tab:"Agregat",change:!1,activeYears:[],graphData:{},description:"",sources:[],lastUpdated:"",category:"",nodata:!1,genPoza:!1}},watch:{query:{handler:function(t,e){},deep:!0},param:{handler:function(t,e){this.initGraphs(this.code)}},getActiveGraphs:{handler:function(t,e){this.change&&(this.change=!1)}}},computed:He()(He()({},Object(q["c"])("registry",["getAllGraphs","getActiveGraphsChecks","getActiveGraphs","getActiveBreadcrumbs"])),Object(q["c"])("search",["getActiveLocalities","getCounties","getLocalities"])),mounted:function(){this.initGraphs(this.code)},methods:He()(He()({},Object(q["b"])("registry",["getNewGraph"])),{},{popspace:function(t,e){var a=t.legend.root.items.indexOf("");return a>-1&&t.legend.root.items.splice(a,1),e>2&&(a=t.legend.tree[0].root.items.indexOf(""),a>-1&&t.legend.tree[0].root.items.splice(a,1)),t},initGraphs:function(t){var e=this;this.getAllGraphs.forEach((function(a,r){var n=a.nodes.find((function(e){return e.code===t}));void 0!==n&&(e.theComponent=n,e.category=a.name,e.theGraph=n.nodes[0],e.tab=e.theGraph.code,e.description=n.description,e.sources=n.sources,e.lastUpdated=n.lastUpdated)}))},generateGraph:function(t){var e=this.getActiveGraphs.find((function(e){return e.code===t})),a=e.builder.split("_");"geo"===a[2]||0!==e.data.length?("builder_2"===e.builder&&this.generateVerticalBarChart(e),"builder_3"===e.builder&&this.generateHorizontalBarChart(e),"builder_4"!==e.builder&&"builder_5"!==e.builder||this.loadBuilder4(e),"builder_2_geo"===e.builder&&this.generateMap(this.popspace(e,2)),"builder_3_geo"===e.builder&&this.loadBuilder3Map(this.popspace(e,3)),"builder_4_geo"===e.builder&&this.loadBuilder3Map(this.popspace(e,4))):this.nodata=!0},generateMap:function(t){var e={};this.graphData=t,t.legend.root.items.sort((function(t,e){return parseFloat(t)e.length&&r(a(n),110,200),!0===this.overlay&&(this.desk=!1)}},ids:{handler:function(t,e){this.searchIds({ids:this.ids,tip:this.tip})}}},beforeRouteUpdate:function(t,e,a){var r=this;!0===this.$q.platform.is.mobile&&(this.desk=!1,this.overlay=!0),this.$store.state.registry.viewBreadcrumbs=this.getBreadcrumbs,this.getPage({category:t.query.cat,code:t.query.code.split(","),ids:t.query.ids.split(",")}).then((function(t){r.activeGraphs=r.getActiveGraphsChecks,r.changedCode=r.code,a()}))},methods:He()(He()(He()(He()({},Object(q["b"])("search",["searchIds"])),Object(q["b"])("registry",["getRegistry","getPage","getActivePage","getCategoryMenu"])),Object(q["d"])("registry",["updateRegistry","updateActiveMenu","getGraphs","setActiveGraphs","goBreadcrumbs","setActiveBreadcrumbs","resetBreadcrumbs"])),{},{updateGraphs:function(t){},closeright:function(){!0===this.overlay&&(this.desk=!1)},loadPage:function(t,e){this.miniState=!0,this.goBreadcrumbs({index:e}),this.$router.push({name:"graphs",query:{ids:"".concat(this.getActiveLocalities),code:"".concat([t]),cat:"".concat(this.getActiveEndPoint)}})},linkfalse:function(t){return!1}})},Pa=Oa,Ta=(a("199d"),a("9989")),Ea=a("ead5"),Ba=a("079e"),ja=a("9404"),Da=a("4983"),$a=a("8f8e"),Ga=a("0170"),Qa=a("05c0"),Va=Object(L["a"])(Pa,Ve,Ne,!1,null,null,null);Va.exports;ye()(Va,"components",{QPage:Ta["a"],QToolbar:fe["a"],QToolbarTitle:ue["a"],QBtn:_e["a"],QBreadcrumbs:Ea["a"],QBreadcrumbsEl:Ba["a"],QDrawer:ja["a"],QScrollArea:Da["a"],QList:ga["a"],QItem:pe["a"],QItemSection:ma["a"],QCheckbox:$a["a"],QItemLabel:Ga["a"],QAvatar:de["a"],QIcon:y["a"],QTooltip:Qa["a"]}),ye()(Va,"directives",{Ripple:va["a"]});var Na=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("q-page",{staticClass:"flex flex-center"},[a("q-drawer",{key:"r-"+t.getActiveLocalities.join("-"),attrs:{side:"left",overlay:"","content-class":"listright",width:300,breakpoint:400},model:{value:t.desk,callback:function(e){t.desk=e},expression:"desk"}}),a("q-header",{staticClass:"graphs-title"},[a("q-toolbar",[a("q-toolbar-title",[a("img",{staticStyle:{height:"20px",width:"auto"},attrs:{src:"statics/logo-square.png"}}),a("span",{staticStyle:{"line-height":"1","font-size":"0.8em",top:"-4px",position:"relative",left:"10px"}},[t._v("Alegeri Parlamentare 2020")])]),a("q-btn",{attrs:{flat:"",round:"",dense:"",icon:"menu"},on:{click:function(e){t.drawerRight=!t.drawerRight}}})],1)],1),a("div",{ref:"themap",style:{height:"calc(100vh - "+t.filterSectionHeight+"px)"},attrs:{id:"ol-map"}}),a("div",{staticClass:"mapover"},[a("q-dialog",{attrs:{seamless:"",position:"left","content-class":"locselection locations"},model:{value:t.seamless,callback:function(e){t.seamless=e},expression:"seamless"}},[a("q-card",{style:"width: 260px; top: 40px; background: #FFF; color: #222f63;"},[a("q-card-section",{staticClass:"q-pt-xs"},[a("div",{staticClass:"text-bold q-mt-sm q-mb-xs text-info",staticStyle:{"font-size":"1.3em"}},[t._v(t._s(t.alegeriSelect.label))]),a("div",{staticClass:"row"},[a("div",{staticClass:"col-5"},[t._v("\n Filtre active:"),a("br")]),a("div",{staticClass:"col-7"},[t._v("\n Gen: "),a("strong",[t._v(t._s(t.activeGen))]),a("br")])]),a("div",{staticStyle:{height:"20px",width:"230px"}},[a("span",{staticStyle:{float:"left"}},[t._v(t._s(t.min))]),a("span",{staticStyle:{float:"right"}},[t._v(t._s(t.max))])]),a("div",{staticStyle:{"background-image":"linear-gradient(to right, rgba(179,227,238,0.8), rgba(1,94,111,0.8))",height:"20px",width:"230px"}})])],1)],1)],1),a("q-drawer",{ref:"drawer",attrs:{side:"right","content-class":"listright",width:300,breakpoint:400},model:{value:t.drawerRight,callback:function(e){t.drawerRight=e},expression:"drawerRight"}},[[a("q-select",{attrs:{outlined:"",options:t.listaOrase,label:"Nivel detaliu:"},on:{input:function(e){return t.changeOras()}},model:{value:t.orasSelect,callback:function(e){t.orasSelect=e},expression:"orasSelect"}}),a("q-separator"),a("q-separator"),a("br"),a("q-btn-toggle",{attrs:{spread:"","no-caps":"","toggle-color":"primary",options:[{label:"Total",value:"Total"},{label:"Femei",value:"Fem"},{label:"Bărbați",value:"Masc"}]},on:{input:function(e){return t.newGen()}},model:{value:t.activeGen,callback:function(e){t.activeGen=e},expression:"activeGen"}}),a("br"),a("br"),t.inIframe?t._e():[a("div",{staticClass:"row"},[a("div",{staticClass:"col-6"},[a("iframe",{staticStyle:{border:"none",overflow:"hidden"},attrs:{src:"https://www.facebook.com/plugins/like.php?href=https%3A%2F%2Falegeri.zoom.report/parlamentare&width=200&layout=button_count&action=like&size=small&show_faces=true&share=true&height=46&appId=385863942271436",width:"200",height:"46",scrolling:"no",frameborder:"0",allowTransparency:"true",allow:"encrypted-media"}})]),a("div",{staticClass:"col"}),a("div",{staticClass:"col-5 social"},[a("social-sharing",{attrs:{url:t.currentUrl,title:"ZOOM Report",description:"Platformă de vizualizare de date despre România care pot fi explorate în detaliu până la nivel de comună.",networks:t.overriddenNetworks},inlineTemplate:{render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("network",{attrs:{network:"facebook",id:"facebook"}},[a("q-icon",{attrs:{name:"ion-logo-facebook"}})],1),a("network",{attrs:{network:"linkedin",id:"linkedin"}},[a("q-icon",{attrs:{name:"ion-logo-linkedin"}})],1),a("network",{attrs:{network:"whatsapp",id:"whatsapp"}},[a("q-icon",{attrs:{name:"ion-logo-whatsapp"}})],1)],1)},staticRenderFns:[]}})],1)]),a("q-separator"),a("br"),a("h5",[a("strong",[t._v("Adauga ca widget în site-ul tău:")])]),a("q-input",{attrs:{filled:"",type:"textarea",readonly:""},model:{value:t.embedcode,callback:function(e){t.embedcode=e},expression:"embedcode"}}),a("br"),a("q-btn",{attrs:{label:"Copiază codul embed",flat:"",icon:"content_copy"},on:{click:function(e){return t.copyEmbded()}}}),a("br"),a("br")]],a("q-separator"),a("br"),t._v("\n Zoom Report este prima platformă de location intelligence din România."),a("br"),t._v("\n Află mai multe despre noi aici: "),a("a",{attrs:{href:"https://zoom.report",target:"_blank"}},[t._v("zoom.report")]),a("br")],2)],1)},Ua=[],Ha=(a("841c"),a("5cc6"),a("9a8c"),a("a975"),a("735e"),a("c1ac"),a("d139"),a("3a7b"),a("d5d6"),a("82f8"),a("e91f"),a("60bd"),a("5f96"),a("3280"),a("3fcc"),a("ca91"),a("25a1"),a("cd26"),a("3c5d"),a("2954"),a("649e"),a("219c"),a("170b"),a("b39a"),a("72f7"),a("e669")),Ka=a("cdde"),Ja=a("0967"),Ya=a("c807"),Za=a("ac29"),Wa=a("b2fc"),Xa=a("cdf3"),tr=a("5831"),er=a("6c77"),ar=a("83a6"),rr=a("8682"),nr=a("ce2c"),ir=a("3e6b"),or=a("480c"),sr=a("a2e1"),cr=a("a2c7"),lr=a("5eee"),ur=a("d0e9"),dr=a("bc3a"),pr=a.n(dr),hr=(a("3e8f"),{install:function(t,e){},stackMin:function(t){return Re["n"](t,(function(t){return t[0]}))},stackMax:function(t){return Re["m"](t,(function(t){return t[1]}))},stackedBar:function(t){for(var e=Re["t"](".tooltip"),a=Re["g"]({decimal:",",thousands:".",grouping:[3]}),r=(a.format(","),Re["f"](".2s")),n=t.data,i=t.titlu,o=t.color,s=t.keys,c=t.clientWidth,l={top:5,right:0,bottom:15,left:30},u=c-l.left-l.right,d=40*n.length+l.top+l.bottom,p=[],h=0;h0?"":(t=-t,r(t))}))),m.append("g").selectAll("g").data(f).enter().append("g").attr("fill",(function(t){return y(t.key)})).selectAll("rect").data((function(t){return t})).enter().append("rect").attr("height",38).attr("rx",1).attr("ry",1).attr("y",(function(t){return g(t.data.key)+3})).attr("x",(function(t){return t[0]<0?S(t[0])-20:S(t[0])+20})).attr("width",(function(t){return t[0],S(t[1])-S(t[0])})).attr("id",(function(t,e){return"bar-".concat(i,"-").concat(t.data.key,"-").concat(e)})).on("mouseover",(function(t,e){return w(t,e)})).on("mouseout",(function(t,e){return x(t,e)})).on("mousemove",(function(t,e){return b(t,e)}));for(var C=[],k=function(t){C[t]=Re["l"]().y((function(t){return g(t.key)+g.bandwidth()/2})).x((function(e){var a=0;return e.media[t]<0&&(a=-40),S(e.media[t])+a}))},L=0;L<2;L++)k(L);for(var _=0;_<2;_++){var A=m.append("g").attr("id","line-".concat(i,"-").concat(_));A.append("path").datum(n).attr("class","tur2-line").style("stroke",o[_+2]).style("stroke-width",1).attr("id","line-".concat(i,"-").concat(_)).attr("d",C[_])}}}),fr=hr,mr={name:"PageIndex",props:{oras:{type:String,default:""},alegeri:{type:String,default:""},id:{type:String,default:"-1"}},data:function(){return{overriddenNetworks:{test:{sharer:"https://google.com",type:"popup"}},currentUrl:"",embedcode:"",seamless:!0,leftDrawerOpen:!1,drawerRight:!0,model:"",zoom:7,center:[25.84062,45.58831],rotation:0,geolocPosition:void 0,glStyleUrl:"assets/zoomap.json",apiKey:"AlkdgacOfEBJPvA19SZYXGuUVFgBvEk769uQJqkzWa7YzGAY9YcOsfu3JNOI0ogQ",mapKey:"VmtCdnlzZVQ3ZTIkJjJCNGdp",imagerySet:"CanvasLight",drawType:"polygon",drawnFeatures:[],padding:"",interactionComplete:!1,alegeriSelect:{label:""},alegeriOptions:[],olmap:null,vectorsource:new tr["a"],vlayer:null,zoommap:null,draw:null,modify:null,locSource:new tr["a"],judetLayer:new ir["a"],locLayer:new ir["a"],selectedSource:new tr["a"],allSections:null,desk:!1,overlay:!1,polyLayer:[null,null],mapFeatures:[{name:"all",type:"FeatureCollection",features:[]},{name:"all",type:"FeatureCollection",features:[]}],allKeys:[],allData:null,sectoare:["40_Full_WGS84_simpl_50"],sectoareSimplu:["40_Agg_WGS84_simpl_10"],curZoom:12,varste:["Total","18-24","25-29","30-34","35-39","40-44","45-49","50-54","55-59","60-64","65-69","70-74","75-79","80-84","85-119"],activeVarsta:"Total",activeGen:"Total",liste:{label:"Liste Permanente",value:"LP"},updated:"10:00",min:0,max:0,total:0,totalProcent:0,femei:0,barbati:0,thisSelect:null,view:null,orasSelect:{label:"Județe",value:"judete"},listaOrase:[],totalLabel:"Total",inIframe:!0}},computed:He()(He()(He()({},Object(q["c"])("search",["getSelType","getLocalityCount","getLocalities","getActiveLocalities","readJudetLayer","readLocLayer"])),Object(q["e"])("search",["searchResults","polygon"])),{},{tip:function(){return this.searchResults.tip},viewSearch:function(){return this.searchResults.sir},filterSectionHeight:function(){return 60}}),watch:{getSelType:{handler:function(t){"direct"===t&&(this.draw.setActive(!1),this.clearPolygon())}}},mounted:function(){var t=this;if(this.currentUrl=window.location.href,this.inIframe=Ja["b"].within.iframe,this.embedcode='
'),!0===this.$q.platform.is.mobile&&(this.desk=!1,this.drawerRight=!1,this.overlay=!0),Re["k"]("date/config_prez.json").then((function(e){t.config=e.orase,t.orasSelect={label:t.config["".concat(t.oras)].label,value:t.oras},t.configMenu(),t.totalLabel=t.config["".concat(t.oras)].total,""===t.alegeri&&(t.alegeri=t.config["".concat(t.oras)].default),t.titlu=t.alegeriOptions.find((function(e){return e.value===t.alegeri})).label,t.alegeriSelect={label:t.titlu,value:t.alegeri},"undefined"!==typeof t.optionsLabel["".concat(t.alegeri)]&&(t.activeVarsta=t.optionsLabel["".concat(t.alegeri)][parseInt(t.id,10)]),t.onMapCreated(),t.loadMaps(0);var a=null,r=null;if(t.zoommap.on("pointermove",(function(e){if(!e.dragging){var n=document.getElementById("genericTool"),i=document.getElementById("ol-map");if(void 0===a)return a=null,void(n.style.opacity=0);null!==a&&(a.setStyle(r),a=null);var o=t.zoommap.getEventPixel(e.originalEvent);if(a=t.zoommap.forEachFeatureAtPixel(o,(function(t){return t})),a){if(-1===a.get("value"))return a=null,void(n.style.opacity=0);r=a.getStyle(),a.setStyle(new er["c"]({fill:new ar["a"]({color:"rgba(255, 50, 0, 0.2)"}),stroke:new rr["a"]({color:"#FF5000",width:.5}),image:new nr["a"]({radius:4,fill:new ar["a"]({color:"#FF5000"})})})),n.style.opacity=1;var s=i.getBoundingClientRect();n.style.left="".concat(s.left+e.pixel[0]+10,"px"),n.style.top="".concat(s.top+e.pixel[1]+10,"px"),-100===a.get("value")?n.innerHTML='

Secția: '.concat(a.get([t.config[t.orasSelect.value].unitate])," Nu s-a publicat

"):n.innerHTML="

".concat(a.get("titlu"),'

').concat(a.get("value")).concat(a.get("unitati"),"

").concat(a.get("details"))}else n.innerHTML=" "}})),t.resetBreadcrumbs(),t.polygon.length){var n=[];t.polygon.forEach((function(t){var e=[t[0],t[1]];n.push(G["d"](e))}));var i={type:"FeatureCollection",crs:{type:"name",properties:{name:"EPSG:4326"}},features:[{type:"Feature",geometry:{type:"Polygon",coordinates:[n]}}]};t.vectorsource=new tr["a"]({features:(new sr["a"]).readFeatures(i)})}})),this.resetBreadcrumbs(),this.polygon.length){var e=[];this.polygon.forEach((function(t){var a=[t[0],t[1]];e.push(G["d"](a))}));var a={type:"FeatureCollection",crs:{type:"name",properties:{name:"EPSG:4326"}},features:[{type:"Feature",geometry:{type:"Polygon",coordinates:[e]}}]};this.vectorsource=new tr["a"]({features:(new sr["a"]).readFeatures(a)})}this.$forceUpdate()},updated:function(){},methods:He()(He()(He()(He()(He()({},Object(q["d"])(["setSidebarOpen","setMiniState"])),Object(q["d"])("search",["resetPoly","removeLocality"])),Object(q["b"])("search",["searchIds","searchPoly","getVectorLayer"])),Object(q["d"])("registry",["resetBreadcrumbs"])),{},{copyEmbded:function(){var t=this;Object(Ka["a"])(this.embedcode).then((function(){t.$q.notify({color:"positive",position:"right",message:"Codul embed copiat",icon:"copy"})})).catch((function(){}))},loadMaps:function(t){var e=this;w["a"].show({spinner:Ha["a"]}),this.mapFeatures=[{name:"all",type:"FeatureCollection",features:[]},{name:"all",type:"FeatureCollection",features:[]}],this.loadEncMap("statics/maps/".concat(this.config[this.orasSelect.value].map.in)).then((function(t){t=JSON.parse(t),e.mapFeatures[0].features=e.mapFeatures[0].features.concat(t.features),e.zoommap.updateSize(),e.loadData()}))},configMenu:function(){var t=this,e=Object.keys(this.config);this.listaOrase=[],e.forEach((function(e){t.listaOrase.push({label:t.config[e].label,value:t.config[e].value})})),this.optionsLabel=this.config[this.orasSelect.value].colors,this.alegeriOptions=this.config[this.orasSelect.value].options},loadData:function(){var t=this;"undefined"===typeof this.config[this.orasSelect.value].files["".concat(this.alegeri)]&&(this.alegeri=this.config[this.orasSelect.value].default),pr.a.get("date/".concat(this.config[this.orasSelect.value].files["".concat(this.alegeri)]),{headers:{"Content-Type":"text/csv",Accept:"text/csv"}}).then((function(e){var a=Re["d"](e.data),r=new Date(e.headers["last-modified"]);t.updated="".concat(r.getHours()<10?"0":"").concat(r.getHours(),":").concat(r.getMinutes()<10?"0":"").concat(r.getMinutes()),t.allKeys=Object.keys(a[0]),t.allData=a,t.colorMap(t.config[t.orasSelect.value].total,0,"s");var n=t.zoommap.getView().getZoom();t.zoommap.on("moveend",(function(e){var a=t.zoommap.getView().getZoom();n!==a&&(n=a,t.curZoom=n)})),w["a"].hide()}))},updateMap:function(t,e){var a=this;w["a"].show({spinner:Ha["a"]}),setTimeout((function(){a.colorMap(t,0,e),setTimeout((function(){w["a"].hide()}),500)}),500)},colorMap:function(t,e,a){var r=this;this.zoommap.removeLayer(this.polyLayer[e]);var n=[];this.mapFeatures[e].features.forEach((function(e,i){"string"!==typeof e.properties[r.config[r.orasSelect.value].unitateHarta]&&(e.properties[r.config[r.orasSelect.value].unitateHarta]=e.properties[r.config[r.orasSelect.value].unitateHarta].toString());var o=e.properties[r.config[r.orasSelect.value].unitateHarta].split(",");e.properties.value=0;var s=0,c=0;o.forEach((function(a){var n=r.allData.find((function(t){return parseInt(t[r.config[r.orasSelect.value].unitate],10)===parseInt(a,10)}));s+=parseInt(n["".concat(t)],10),c+=parseInt(n[r.config[r.orasSelect.value].total],10),e.properties.nume=n[r.config[r.orasSelect.value].unitate],e.properties.titlu="".concat(r.config[r.orasSelect.value].titluLabel," ").concat(n[r.config[r.orasSelect.value].titlu])})),e.properties.active="".concat(t),"p"===a?(e.properties.unitati="%",e.properties.value=parseInt(100*s/c*100,10)/100):(e.properties.unitati=" votanți",e.properties.value=s),n.push(e.properties.value),e.properties.details=""})),this.min=Math.min.apply(Math,n),this.max=Math.max.apply(Math,n),"p"===a&&(this.min="".concat(Math.min.apply(Math,n)," %"),this.max="".concat(Math.max.apply(Math,n)," %"));var i=Re["p"]().domain([Math.min.apply(Math,n),Math.max.apply(Math,n)]).range(["rgba(179,227,238,0.8)","rgba(1,94,111,0.8)"]);this.polyLayer[e]=new ir["a"]({source:new tr["a"]({features:(new sr["a"]).readFeatures(JSON.stringify(this.mapFeatures[e]))}),style:function(t){return new er["c"]({fill:new ar["a"]({color:i(t.get("value")),opacity:1}),stroke:!1})}}),this.zoommap.addLayer(this.polyLayer[e])},newVarsta:function(){"Total"===this.activeVarsta&&"Total"===this.activeGen?this.updateMap("LP","p"):this.updateMap("".concat(this.activeGen," ").concat(this.activeVarsta),"s"),this.liste={label:"Liste Permanente",value:"LP"}},newGen:function(){"Total"===this.activeGen&&this.activeVarsta,this.updateMap("".concat(this.activeGen),"s"),this.liste={label:"Liste Permanente",value:"LP"}},newListe:function(){this.updateMap("".concat(this.liste.value),"p"),this.activeVarsta="Total",this.activeGen="Total"},changeOras:function(){var t=this;this.zoommap.removeLayer(this.polyLayer[0]),this.zoommap.removeLayer(this.polyLayer[1]),this.drawerRight=!1,this.activeVarsta=null,this.flyTo(G["d"](this.config["".concat(this.orasSelect.value)].center),(function(e){t.allData=[],t.$router.push({name:"prezenta",query:{oras:"".concat(t.orasSelect.value),alegeri:"".concat(t.config["".concat(t.orasSelect.value)].default)}}).then((function(){t.embedcode='
'),t.drawerRight=!0,t.configMenu(),t.activeGen=t.config["".concat(t.orasSelect.value)].total,t.titlu=t.alegeriOptions.find((function(e){return e.value===t.config["".concat(t.orasSelect.value)].default})).label,t.alegeriSelect={label:t.titlu,value:t.config["".concat(t.orasSelect.value)].default},t.loadMaps(0)}))}))},flyTo:function(t,e){var a=2e3,r=this.config["".concat(this.orasSelect.value)].zoom,n=r-3;n<8&&(n=r);var i=2,o=!1;this.view.animate({center:t,duration:a},(function(t){i+=-1,o||0!==i&&t||(o=!0,e(t))})),this.view.animate({zoom:n,duration:a/2},{zoom:r,duration:a/2},(function(t){i+=-1,o||0!==i&&t||(o=!0)}))},totaluri:function(){for(var t=this,e={data:[]},a=[],r=0;r0&&this.draw.setActive(!1),this.draw.on("drawend",(function(e){t.controlDoubleClickZoom(!1),t.draw.setActive(!1),t.updateSearch(e.feature),t.setMiniState(!1)})),this.modify.on("modifyend",(function(e){t.updateSearch(e.features.getArray()[0])}))},controlDoubleClickZoom:function(t){for(var e=this.zoommap.getInteractions(),a=0;a0?setTimeout((function(){e.timerCount--}),1e3):window.location.reload()},immediate:!0}},mounted:function(){var t=this;if(this.currentUrl=window.location.href,this.myFloder=window.location.href.split("#")[0].split("?")[0],this.inIframe=Ja["b"].within.iframe,this.embedcode='
'),!0===this.$q.platform.is.mobile&&(this.desk=!1,this.drawerRight=!1,this.overlay=!0),Re["k"]("date/config_prezenta.json").then((function(e){if(t.inscrisi=e.inscrisi,t.config=e.orase,t.orasSelect={label:t.config["".concat(t.oras)].label,value:t.oras},t.titluPagina=e.titlu,e.judetSelect.forEach((function(e){"SR"!==e.value&&(t.listaJudete.push({label:e.name,value:e.value,center:e.center,zoom:e.zoom}),e.value===t.code&&(t.judetSelect={label:e.name,value:e.value,center:e.center,zoom:e.zoom}))})),t.configMenu(),t.totalLabel=t.config["".concat(t.oras)].total,""===t.alegeri&&(t.alegeri=t.config["".concat(t.oras)].default),t.titlu=t.alegeriOptions.find((function(e){return e.value===t.alegeri})).label,t.alegeriSelect={label:t.titlu,value:t.alegeri},"undefined"!==typeof t.optionsLabel["".concat(t.alegeri)]&&(t.activeVarsta=t.optionsLabel["".concat(t.alegeri)][parseInt(t.id,10)]),t.onMapCreated(),t.loadMaps(0),t.zoommap.on("click",(function(e){e.dragging||t.selectFeature(e,!0)})),t.resetBreadcrumbs(),t.polygon.length){var a=[];t.polygon.forEach((function(t){var e=[t[0],t[1]];a.push(G["d"](e))}));var r={type:"FeatureCollection",crs:{type:"name",properties:{name:"EPSG:4326"}},features:[{type:"Feature",geometry:{type:"Polygon",coordinates:[a]}}]};t.vectorsource=new tr["a"]({features:(new sr["a"]).readFeatures(r)})}})),this.resetBreadcrumbs(),this.polygon.length){var e=[];this.polygon.forEach((function(t){var a=[t[0],t[1]];e.push(G["d"](a))}));var a={type:"FeatureCollection",crs:{type:"name",properties:{name:"EPSG:4326"}},features:[{type:"Feature",geometry:{type:"Polygon",coordinates:[e]}}]};this.vectorsource=new tr["a"]({features:(new sr["a"]).readFeatures(a)})}},updated:function(){},methods:He()(He()(He()(He()(He()({},Object(q["d"])(["setSidebarOpen","setMiniState"])),Object(q["d"])("search",["resetPoly","removeLocality"])),Object(q["b"])("search",["searchIds","searchPoly","getVectorLayer"])),Object(q["d"])("registry",["resetBreadcrumbs"])),{},{hidemenu:function(){var t=this;this.drawerRight=!1,setTimeout((function(){t.updateMyMap()}),300)},fancyTimeFormat:function(t){var e=(t-(t%=60))/60+(t>9?":":":0")+t;return e},loadMaps:function(t){var e=this;w["a"].show({spinner:Ha["a"]}),this.mapFeatures=[{name:"all",type:"FeatureCollection",features:[]},{name:"all",type:"FeatureCollection",features:[]}],this.loadEncMap("statics/maps/".concat(this.config[this.orasSelect.value].map.in)).then((function(t){t=JSON.parse(t),e.mapFeatures[0].features=e.mapFeatures[0].features.concat(t.features),e.zoommap.updateSize(),e.loadData()}))},configMenu:function(){var t=this,e=Object.keys(this.config);this.listaOrase=[],e.forEach((function(e){t.listaOrase.push({label:t.config[e].label,value:t.config[e].value})})),this.optionsLabel=this.config[this.orasSelect.value].colors,this.alegeriOptions=this.config[this.orasSelect.value].options},loadData:function(){var t=this;"undefined"===typeof this.config[this.orasSelect.value].files["".concat(this.alegeri)]&&(this.alegeri=this.config[this.orasSelect.value].default),pr.a.get("date/now-".concat(this.config[this.orasSelect.value].siruta,".csv"),{headers:{"Content-Type":"text/csv",Accept:"text/csv"}}).then((function(e){var a=Re["d"](e.data),r=new Date(e.headers["last-modified"]);if(t.updated="".concat(r.getHours()<10?"0":"").concat(r.getHours(),":").concat(r.getMinutes()<10?"0":"").concat(r.getMinutes()),t.allKeys=Object.keys(a[0]),t.allData=a,"uat"===t.orasSelect.value){var n=t.allData.filter((function(e){return e.Judet===t.judetSelect.value}));t.allData=n}if(t.mapSelect=t.allData.map((function(t){return{value:t["Nr sectie de votare"],label:t.Localitate}})),t.showDiaspora=!1,"0"===t.config[t.orasSelect.value].siruta){var i=t.allData.filter((function(t){return"SR"===t.Judet}));if(i.length>0){var o=Re["g"]({decimal:",",thousands:".",grouping:[3]}),s=o.format(",");t.totalDiaspora=s(i[0].LT),t.showDiaspora=!0}}t.colorMap(t.liste.value,0,"p");var c=t.zoommap.getView().getZoom();t.zoommap.on("moveend",(function(e){var a=t.zoommap.getView().getZoom();c!==a&&(c=a,t.curZoom=c)})),w["a"].hide(),t.totaluri()}))},updateMap:function(t,e){var a=this;w["a"].show({spinner:Ha["a"]}),setTimeout((function(){a.colorMap(t,0,e),setTimeout((function(){w["a"].hide()}),500)}),500)},findFeadure:function(){var t=this,e=this.zoommap.getLayers(),a=null;e.forEach((function(t,e){2===e&&(a=t.getSource())}));var r=a.getFeatures();r.every((function(e,a){return e.get("natCode")!==t.selectedCity.value||(void 0===t.feature&&(t.feature=null),null!==t.feature&&t.feature.setStyle(t.oldStyle),t.feature=e,!1)})),this.selectFeature(null,!1)},selectFeature:function(t,e){var a=this,r=this.oldStyle;document.activeElement.blur();var n=document.getElementById("mapDetails"),i=document.getElementById("ol-map");if(void 0===this.feature&&(this.feature=null,this.showSelectDetail="none"),null!==this.feature&&(this.feature.setStyle(r),e&&(this.feature=null),this.showSelectDetail="none"),e){this.selectedCity={label:"Niciunul"};var o=this.zoommap.getEventPixel(t.originalEvent);if(this.feature=this.zoommap.forEachFeatureAtPixel(o,(function(t){return t})),void 0!==this.feature){var s=this.mapSelect.find((function(t){return t.value===a.feature.get("natCode")}));this.selectedCity=s}}if(this.feature){if(-1===this.feature.get("value"))return this.feature=null,void(n.style.opacity=0);r=this.feature.getStyle(),this.feature.setStyle(new er["c"]({fill:new ar["a"]({color:"#eb1167"}),stroke:new rr["a"]({color:"#eb1167",width:2}),image:new nr["a"]({radius:4,fill:new ar["a"]({color:"#eb1167"})})})),this.showSelectDetail="";i.getBoundingClientRect();-100===this.feature.get("value")||(this.titluSelect=this.feature.get("titlu"),this.totalProcentSelect=parseInt(10*parseFloat(this.feature.get("value")),10)/10,this.totalSelect=this.feature.get("total"),this.inscrisiSelect=this.feature.get("inscrisi"))}else this.showSelectDetail="none"},colorMap:function(t,e,a){var r=this;this.showSelectDetail="none",this.zoommap.removeLayer(this.polyLayer[e]);var n=[],i=[];this.inscrisi=0,this.mapFeatures[e].features.forEach((function(e,o){"string"!==typeof e.properties[r.config[r.orasSelect.value].unitateHarta]&&(e.properties[r.config[r.orasSelect.value].unitateHarta]=e.properties[r.config[r.orasSelect.value].unitateHarta].toString());var s=r.config[r.orasSelect.value].siruta,c=e.properties[r.config[r.orasSelect.value].unitateHarta].split(",");e.properties.value=0;var l=0,u=0,d=!1;c.forEach((function(a){var n=r.allData.find((function(t){return parseInt(t[r.config[r.orasSelect.value].unitate],10)===parseInt(a,10)&&s===t.Siruta}));void 0!==n?(l+=parseInt(n["".concat(t)],10),u+=parseInt(n[r.config[r.orasSelect.value].total],10),r.inscrisi+=parseInt(n["Votanti lista"],10),e.properties.nume=n[r.config[r.orasSelect.value].unitate],e.properties.titlu="".concat(r.config[r.orasSelect.value].titluLabel," ").concat(n[r.config[r.orasSelect.value].titlu])):d=!0})),e.properties.active="".concat(t),"p"===a?(e.properties.unitati="%",e.properties.value=parseInt(100*l/u*100,10)/100):(e.properties.unitati=" votanți",e.properties.value=l),d?i.push(o):(n.push(e.properties.value),e.properties.inscrisi="".concat(u),e.properties.total="".concat(l),"judete"!==r.orasSelect.value&&"uat"!==r.orasSelect.value&&(e.properties.inscrisi="".concat(u),e.properties.total="".concat(l)))})),this.min=Math.min.apply(Math,n),this.max=Math.max.apply(Math,n),"p"===a&&(this.min="".concat(Math.min.apply(Math,n)," %"),this.max="".concat(Math.max.apply(Math,n)," %"));var o=Re["p"]().domain([Math.min.apply(Math,n),Math.max.apply(Math,n)]).range([this.minColor,this.maxColor]),s=this.mapFeatures[e].features.map((function(t,e){return i.includes(e)?void 0:t}));this.mapFeatures[e].features=s.filter((function(t){return void 0!==t})),this.flyTo(G["d"](this.judetSelect.center),(function(t){})),this.polyLayer[e]=new ir["a"]({source:new tr["a"]({features:(new sr["a"]).readFeatures(JSON.stringify(this.mapFeatures[e]))}),style:function(t){return new er["c"]({fill:new ar["a"]({color:o(t.get("value")),opacity:1}),stroke:!1})}}),this.zoommap.addLayer(this.polyLayer[e])},newVarsta:function(){"Total"===this.activeVarsta&&"Total"===this.activeGen?this.updateMap("LP","p"):this.updateMap("".concat(this.activeGen," ").concat(this.activeVarsta),"s"),this.liste={label:"Liste Permanente",value:"LP"}},newGen:function(){"Total"===this.activeGen&&"Total"===this.activeVarsta?this.updateMap("LP","p"):this.updateMap("".concat(this.activeGen," ").concat(this.activeVarsta),"s"),this.liste={label:"Liste Permanente",value:"LP"}},newListe:function(){this.updateMap("".concat(this.liste.value),"p"),this.activeVarsta="Total",this.activeGen="Total"},changeOras:function(){var t=this;this.zoommap.removeLayer(this.polyLayer[0]),this.zoommap.removeLayer(this.polyLayer[1]),this.drawerRight=!1,this.flyTo(G["d"](this.config["".concat(this.orasSelect.value)].center),(function(e){t.allData=[],t.$router.push({name:"prezenta",query:{oras:"".concat(t.orasSelect.value)}}).then((function(){t.embedcode='
'),t.configMenu(),t.titlu=t.alegeriOptions.find((function(e){return e.value===t.config["".concat(t.orasSelect.value)].default})).label,t.loadMaps(0)}))}))},changeJudet:function(){var t=this;this.zoommap.removeLayer(this.polyLayer[0]),this.zoommap.removeLayer(this.polyLayer[1]),this.drawerRight=!1,this.allData=[];var e="";"tot"===this.judetSelect.value?(e="judete",this.orasSelect.value="judete"):(e="uat",this.orasSelect.value="uat"),this.selectedCity={label:"Niciuna"},this.$router.push({name:"prezenta",query:{oras:e,code:"".concat(this.judetSelect.value)}}).then((function(){t.embedcode='
'),t.configMenu(),t.titlu=t.alegeriOptions.find((function(e){return e.value===t.config["".concat(t.orasSelect.value)].default})).label,t.loadMaps(0)}))},flyTo:function(t,e){var a=100,r=8;r="uat"===this.orasSelect.value?this.judetSelect.zoom:this.config["".concat(this.orasSelect.value)].zoom;var n=r-3;n<8&&(n=r);var i=2,o=!1;this.view.animate({center:t,duration:a},(function(t){i+=-1,o||0!==i&&t||(o=!0,e(t))})),this.view.animate({zoom:n,duration:a/2},{zoom:r,duration:a/2},(function(t){i+=-1,o||0!==i&&t||(o=!0)}))},totaluri:function(){for(var t=this,e={data:[]},a=[],r=this.allData.filter((function(e){return e.Siruta===t.config[t.orasSelect.value].siruta})),n=0;n0&&this.draw.setActive(!1),this.draw.on("drawend",(function(e){t.controlDoubleClickZoom(!1),t.draw.setActive(!1),t.updateSearch(e.feature),t.setMiniState(!1)})),this.modify.on("modifyend",(function(e){t.updateSearch(e.features.getArray()[0])}))},controlDoubleClickZoom:function(t){for(var e=this.zoommap.getInteractions(),a=0;a-1?[a("div",{staticStyle:{height:"20px",width:"230px"}},[a("span",{staticStyle:{float:"left"}},[t._v(t._s(t.min))]),a("span",{staticStyle:{float:"right"}},[t._v(t._s(t.max))])]),a("div",{staticStyle:{"background-image":"linear-gradient(to right, rgba(179,227,238,1), rgba(1,94,111,1))",height:"20px",width:"230px"}})]:[a("p",[t._v("Legenda: ")]),a("q-list",{attrs:{bordered:"",dense:""}},t._l(t.legend,(function(e,r){return a("q-item",{directives:[{name:"ripple",rawName:"v-ripple"}],key:"k-"+e+"-"+r},[a("q-item-section",{style:"color: "+e.color,attrs:{avatar:""}},[a("q-icon",{attrs:{color:""+e.color,name:"stop"}})],1),a("q-item-section",[t._v(t._s(e.label))])],1)})),1)],a("div",{staticStyle:{"margin-top":"15px"}},[t._v("Rezultate finale")]),a("span",{staticStyle:{"font-size":"0.9em"}})],2)],1)],1)],1),a("q-drawer",{ref:"drawer",attrs:{side:"right","content-class":"listright",width:300,breakpoint:400},model:{value:t.drawerRight,callback:function(e){t.drawerRight=e},expression:"drawerRight"}},[a("div",{staticClass:"row"},[a("div",{staticClass:"col-6"},[a("iframe",{staticStyle:{border:"none",overflow:"hidden"},attrs:{src:"https://www.facebook.com/plugins/like.php?href=https%3A%2F%2Falegeri.zoom.report&width=200&layout=button_count&action=like&size=small&show_faces=true&share=true&height=46&appId=385863942271436",width:"200",height:"46",scrolling:"no",frameborder:"0",allowTransparency:"true",allow:"encrypted-media"}})]),a("div",{staticClass:"col-6 social"},[a("social-sharing",{attrs:{url:t.currentUrl,title:"ZOOM Report",description:"Platformă de vizualizare de date despre România care pot fi explorate în detaliu până la nivel de comună.",networks:t.overriddenNetworks},inlineTemplate:{render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("network",{attrs:{network:"facebook",id:"facebook"}},[a("q-icon",{attrs:{name:"ion-logo-facebook"}})],1),a("network",{attrs:{network:"linkedin",id:"linkedin"}},[a("q-icon",{attrs:{name:"ion-logo-linkedin"}})],1),a("network",{attrs:{network:"whatsapp",id:"whatsapp"}},[a("q-icon",{attrs:{name:"ion-logo-whatsapp"}})],1)],1)},staticRenderFns:[]}})],1)]),a("q-select",{attrs:{outlined:"",options:t.listaOrase,label:"Oraș:"},on:{input:function(e){return t.changeOras()}},model:{value:t.orasSelect,callback:function(e){t.orasSelect=e},expression:"orasSelect"}}),a("br"),[a("q-separator"),a("q-select",{attrs:{outlined:"",options:t.alegeriOptions,label:"Alegeri:"},on:{input:function(e){return t.goto(t.alegeriSelect)}},model:{value:t.alegeriSelect,callback:function(e){t.alegeriSelect=e},expression:"alegeriSelect"}}),a("br"),a("q-separator"),a("p",[t._v("Filtrează prezența")]),a("q-range",{attrs:{label:"",min:t.rangeMin,max:t.rangeMax,"label-always":""},on:{change:t.filterPrezenta},model:{value:t.prezentaRange,callback:function(e){t.prezentaRange=e},expression:"prezentaRange"}}),a("q-btn-toggle",{attrs:{spread:"","no-caps":"","toggle-color":"primary",options:[{label:"Caștigători pe secții",value:"win"},{label:"Voturi Nule",value:"nul"}]},on:{input:function(e){return t.toggle()}},model:{value:t.activeGen,callback:function(e){t.activeGen=e},expression:"activeGen"}}),a("br"),a("q-select",{attrs:{outlined:"",options:t.optionsLabel[t.alegeri],label:"Rezultate candidați"},on:{input:function(e){return t.newCGMB()}},model:{value:t.activeVarsta,callback:function(e){t.activeVarsta=e},expression:"activeVarsta"}}),a("br"),null!=t.activeVarsta&&"Total"!=t.activeVarsta?[a("p",[t._v("Filtrează procentul "+t._s(t.activeVarsta.label))]),a("q-range",{attrs:{label:"",min:t.rangeMinRez,max:t.rangeMaxRez,"label-always":""},on:{change:t.filterPrezenta},model:{value:t.rezultatRange,callback:function(e){t.rezultatRange=e},expression:"rezultatRange"}})]:t._e(),null!==t.mandate?a("q-btn-toggle",{attrs:{spread:"","no-caps":"","toggle-color":"primary",options:[{label:"Procente",value:1},{label:"Voturi",value:0},{label:"Mandate",value:2}]},on:{input:function(e){return t.changeGraph()}},model:{value:t.rezType,callback:function(e){t.rezType=e},expression:"rezType"}}):a("q-btn-toggle",{attrs:{spread:"","no-caps":"","toggle-color":"primary",options:[{label:"Procente",value:1},{label:"Voturi",value:0}]},on:{input:function(e){return t.changeGraph()}},model:{value:t.rezType,callback:function(e){t.rezType=e},expression:"rezType"}}),a("div",{staticClass:"row"},[a("svg",{attrs:{id:"graph"}})]),a("q-separator")],t._v("\n Sursa datelor: "),a("a",{attrs:{href:"https://prezenta.roaep.ro/",target:"_blank"}},[t._v("prezenta.roaep.ro")]),a("br"),a("br"),t._v("\n Zoom Report este prima platformă de location intelligence din România."),a("br"),t._v("\n Află mai multe despre noi aici: "),a("a",{attrs:{href:"htts://zoom.report",target:"_blank"}},[t._v("zoom.report")]),a("br"),a("br"),a("q-separator"),a("br")],2)],1)},Fr=[],Rr=(a("6062"),a("3ca3"),{name:"PageIndex",props:{oras:{type:String,default:""},alegeri:{type:String,default:""},id:{type:String,default:"-1"}},data:function(){return{prezentaRange:{min:0,max:100},rangeMin:100,rangeMax:0,rezultatRange:{min:0,max:100},rangeMinRez:100,rangeMaxRez:0,fly:!1,orasSelect:{label:"București",value:"bucuresti"},listaOrase:[],alegeriSelect:null,seamless:!0,leftDrawerOpen:!1,drawerRight:!0,detailsDrawer:!1,model:"",zoom:7,rotation:0,geolocPosition:void 0,glStyleUrl:"assets/zoomap.json",apiKey:"AlkdgacOfEBJPvA19SZYXGuUVFgBvEk769uQJqkzWa7YzGAY9YcOsfu3JNOI0ogQ",mapKey:"VmtCdnlzZVQ3ZTIkJjJCNGdp",imagerySet:"CanvasLight",drawType:"polygon",drawnFeatures:[],padding:"",interactionComplete:!1,olmap:null,vectorsource:new tr["a"],vlayer:null,zoommap:null,draw:null,modify:null,locSource:new tr["a"],judetLayer:new ir["a"],locLayer:new ir["a"],selectedSource:new tr["a"],allSections:null,desk:!0,overlay:!0,polyLayer:[null,null],polyFeatures:[null,null],mapFeatures:[{name:"all",type:"FeatureCollection",features:[]},{name:"all",type:"FeatureCollection",features:[]}],allKeys:[],allData:null,sectoare:["40_Full_WGS84_simpl_50"],sectoareSimplu:["40_Agg_WGS84_simpl_10"],curZoom:12,varste:["Total","18-24","25-29","30-34","35-39","40-44","45-49","50-54","55-59","60-64","65-69","70-74","75-79","80-84","85-119"],activeVarsta:null,activeGen:"win",liste:{label:"Liste Permanente",value:"LP"},updated:"10:00",min:0,max:0,total:0,totalProcent:0,femei:0,barbati:0,color3:null,currentUrl:"",overriddenNetworks:{test:{sharer:"https://google.com",type:"popup"}},rezType:null,secType:null,rezutlat:[],rezultatSec:[],legend:[],optionsLabel:{},view:null,mandate:null,maps:{cluj:{out:"54975_Full_WGS84.geojson",in:"54975_Full_WGS84.geojson"}},config:null,alegeriOptions:[],titlu:"",sectieDetalii:{data:[{uat_name:""}]},activeLayer:0}},computed:He()(He()(He()({},Object(q["c"])("search",["getSelType","getLocalityCount","getLocalities","getActiveLocalities","readJudetLayer","readLocLayer"])),Object(q["e"])("search",["searchResults","polygon"])),{},{tip:function(){return this.searchResults.tip},viewSearch:function(){return this.searchResults.sir},filterSectionHeight:function(){return 60}}),watch:{getSelType:{handler:function(t){"direct"===t&&(this.draw.setActive(!1),this.clearPolygon())}}},mounted:function(){var t=this;this.currentUrl=window.location.href,"-1"!==this.id&&(this.activeGen=""),!0===this.$q.platform.is.mobile&&(this.desk=!1,this.drawerRight=!1,this.overlay=!0),Re["k"]("date/config_prez.json").then((function(e){t.config=e.orase,t.orasSelect={label:t.config["".concat(t.oras)].label,value:t.oras},t.configMenu(),t.titlu=t.alegeriOptions.find((function(e){return e.value===t.alegeri})).label,t.alegeriSelect={label:t.titlu,value:t.alegeri},"undefined"!==typeof t.optionsLabel["".concat(t.alegeri)]&&(t.activeVarsta=t.optionsLabel["".concat(t.alegeri)][parseInt(t.id,10)]),t.onMapCreated(),t.loadMaps(0);var a=null,r=null;if(t.zoommap.on("click",(function(e){t.detailsDrawer=!0;var r=t.zoommap.getEventPixel(e.originalEvent);if(a=t.zoommap.forEachFeatureAtPixel(r,(function(t){return t})),a&&-1===a.get("value"))a=null;else{t.sectieDetalii={},t.sectieDetalii.data=a.get("allData"),t.sectieDetalii.Nr_SV=a.get("Nr_SV");var n=t.sectieDetalii.Nr_SV.split(",");t.sectieDetalii.total=0,t.sectieDetalii.prezenti=0,t.sectieDetalii.data.forEach((function(e){t.sectieDetalii.total+=parseInt(e.a,10),t.sectieDetalii.prezenti+=parseInt(e.b,10)})),t.secType=1,t.sectieRezulate(n)}})),t.zoommap.on("pointermove",(function(e){if(!e.dragging){var n=document.getElementById("genericTool"),i=document.getElementById("ol-map");if(void 0===a)return a=null,void(n.style.opacity=0);null!==a&&(a.setStyle(r),a=null);var o=t.zoommap.getEventPixel(e.originalEvent);if(a=t.zoommap.forEachFeatureAtPixel(o,(function(t){return t})),a){if(-1===a.get("value"))return a=null,void(n.style.opacity=0);r=a.getStyle(),a.setStyle(new er["c"]({fill:new ar["a"]({color:"rgba(255, 50, 0, 0.2)"}),stroke:new rr["a"]({color:"#FF5000",width:.5}),image:new nr["a"]({radius:4,fill:new ar["a"]({color:"#FF5000"})})})),n.style.opacity=1;var s=i.getBoundingClientRect();n.style.left="".concat(s.left+e.pixel[0]+10,"px"),n.style.top="".concat(s.top+e.pixel[1]+10,"px"),-100===a.get("value")?n.innerHTML='

Secția: '.concat(a.get("Nr_SV")," Nu s-a publicat

"):n.innerHTML="".concat(a.get("candidat"),':

').concat(a.get("value")).concat(a.get("unitati"),"

").concat(a.get("details"),"

").concat(a.get("nume"),"
Secții: (").concat(a.get("Nr_SV"),")

")}else n.innerHTML=" "}})),t.resetBreadcrumbs(),t.polygon.length){var n=[];t.polygon.forEach((function(t){var e=[t[0],t[1]];n.push(G["d"](e))}));var i={type:"FeatureCollection",crs:{type:"name",properties:{name:"EPSG:4326"}},features:[{type:"Feature",geometry:{type:"Polygon",coordinates:[n]}}]};t.vectorsource=new tr["a"]({features:(new sr["a"]).readFeatures(i)})}})),this.$forceUpdate()},updated:function(){},methods:He()(He()(He()(He()(He()({},Object(q["d"])(["setSidebarOpen","setMiniState"])),Object(q["d"])("search",["resetPoly","removeLocality"])),Object(q["b"])("search",["searchIds","searchPoly","getVectorLayer"])),Object(q["d"])("registry",["resetBreadcrumbs"])),{},{loadMaps:function(t){var e=this;w["a"].show({spinner:Ha["a"]}),this.mapFeatures=[{name:"all",type:"FeatureCollection",features:[]},{name:"all",type:"FeatureCollection",features:[]}],Re["k"]("statics/maps/".concat(this.config[this.orasSelect.value].map.in)).then((function(a){e.mapFeatures[0].features=e.mapFeatures[0].features.concat(a.features),t>16&255,a>>8&255,255&a].join(","),",").concat(e,")");throw new Error("Bad Hex")},colors:function(t){return t<0?"rgba(0,0,0,0)":this.color3(t)},loadCustomCSV:function(){this.optionsLabel[this.alegeri]=[];for(var t=26;t12?(a.activeLayer=0,a.polyLayer[0].setVisible(!0),a.polyLayer[1].setVisible(!1)):(a.activeLayer=1,a.polyLayer[0].setVisible(!1),a.polyLayer[1].setVisible(!0)),setTimeout((function(){w["a"].hide()}),500)}),500)},filterPrezenta:function(){var t=this;new er["c"]({opacity:0,stroke:!1}),new er["c"]({opacity:1,stroke:!1});this.polyLayer[this.activeLayer].getSource().getFeatures().forEach((function(e,a){var r=e.get("color").replace(/^rgba?\(|\s+|\)$/g,"").split(","),n=r[3],i=e.get("allData");i.total=0,i.prezenti=0,i.forEach((function(t){i.total+=parseInt(t.a,10),i.prezenti+=parseInt(t.b,10)}));var o=parseInt(i.prezenti,10)/parseInt(i.total,10)*100,s=e.get("value");(ot.prezentaRange.max)&&(n=0),(st.rezultatRange.max)&&(n=0),e.setStyle(new er["c"]({fill:new ar["a"]({color:"rgba(".concat(r[0],",").concat(r[1],",").concat(r[2],",").concat(n,")")}),stroke:!1}))}))},castigatori:function(t,e,a){var r=this;this.legend=[],this.resetRange(),this.zoommap.removeLayer(this.polyLayer[e]);var n=[],i=0,o=0,s=[];this.mapFeatures[e].features.forEach((function(e,c){1,"string"!==typeof e.properties.Nr_SV&&(e.properties.Nr_SV=e.properties.Nr_SV.toString());var l=e.properties.Nr_SV.split(",");e.properties.value=0;var u=[];r.optionsLabel[r.alegeri].forEach((function(t){u["".concat(t.label)]={val:0}}));var d=0,p=null,h=null,f=0,m=0;e.properties.allData=[];var g=0,v=0;if(l.forEach((function(t){var a=r.allData.find((function(e){return e.precinct_nr===t}));"undefined"!==typeof a&&(r.optionsLabel[r.alegeri].forEach((function(t){u["".concat(t.label)].val+=parseInt(a["".concat(t.value)],10),p=t})),e.properties.allData.push(a),d+=parseInt(a.c,10),g+=parseInt(a.a,10),v+=parseInt(a.b,10))})),r.calcPrezenta(g,v),null===p)return e.properties.value=-1,e.properties.color="rgba(0,0,0,0)",e.properties.unitati="%",e.properties.nume="",e.properties.candidat="",void(e.properties.details="");u.sort((function(t,e){var a=t.val,r=e.val,n=0;return ar&&(n=-1),n})),r.optionsLabel[r.alegeri].forEach((function(t){f".concat(f," voturi din ").concat(d," voturi valabile
"),e.properties.candidat="".concat(p.label,""),e.properties.details="față de ".concat(h.label,"")})),this.names=vt()(new Set(s)),this.names.forEach((function(t){void 0===r.legend.find((function(e){return e.label===t}))&&r.legend.push(r.optionsLabel[r.alegeri].find((function(e){return e.label===t})))})),this.min=Math.min.apply(Math,n),this.max=Math.max.apply(Math,n),"p"===a&&(this.min="".concat(Math.min.apply(Math,n)," %"),this.max="".concat(Math.max.apply(Math,n)," %")),this.color3=Re["q"](Re["s"]),this.polyFeatures[e]=new tr["a"]({features:(new sr["a"]).readFeatures(JSON.stringify(this.mapFeatures[e]))}),this.polyLayer[e]=new ir["a"]({source:this.polyFeatures[e],style:function(t){return new er["c"]({fill:new ar["a"]({color:t.get("color"),opacity:1}),stroke:!1})}}),this.zoommap.addLayer(this.polyLayer[e]);var c=Re["g"]({decimal:",",thousands:".",grouping:[3]}),l=c.format(",");this.total=l(i),this.totalProcent="".concat(parseInt(100*i/o*100,10)/100," %")},calcPrezenta:function(t,e){var a=100*e/t;a>this.rangeMax&&(this.rangeMax=Math.round(a+1)),a100&&(this.rangeMax=100),this.rangeMin<0&&(this.rangeMin=0),this.prezentaRange.min=this.rangeMin,this.prezentaRange.max=this.rangeMax},calcRezultat:function(t){t>this.rangeMaxRez&&(this.rangeMaxRez=Math.round(t+1)),t100&&(this.rangeMaxRez=100),this.rangeMinRez<0&&(this.rangeMinRez=0),this.rezultatRange.min=this.rangeMinRez,this.rezultatRange.max=this.rangeMaxRez},resetRange:function(){this.rangeMin=100,this.rangeMax=0,this.rangeMinRez=100,this.rangeMaxRez=0},colorMap:function(t,e,a){var r=this;this.zoommap.removeLayer(this.polyLayer[e]),this.resetRange();var n=[],i=0,o=0;this.mapFeatures[e].features.forEach((function(e,s){"string"!==typeof e.properties.Nr_SV&&(e.properties.Nr_SV=e.properties.Nr_SV.toString());var c=e.properties.Nr_SV.split(",");e.properties.value=0;var l=0,u=0,d=0,p=0;e.properties.allData=[],c.forEach((function(a){var n=r.allData.find((function(t){return t.precinct_nr===a}));"undefined"===typeof n?(l=-1,e.properties.nume="nu s-a numarat",u=1):(l+=parseInt(n["".concat(t)],10),u+=parseInt(n.c,10),e.properties.nume=n.precinct_nr,d+=parseInt(n.a,10),p+=parseInt(n.b,10)),e.properties.allData.push(n)})),r.calcPrezenta(d,p),e.properties.active="".concat(t),"p"===a?(e.properties.unitati="%",e.properties.value=parseInt(100*l/u*100,10)/100):(e.properties.unitati=" votanți",e.properties.value=l),r.calcRezultat(e.properties.value),i+=l,o+=u,-1!==l&&n.push(e.properties.value),e.properties.candidat=t,e.properties.details="".concat(l," din ").concat(u," pe liste.")})),this.min=Math.min.apply(Math,n),this.max=Math.max.apply(Math,n),"p"===a&&(this.min="".concat(Math.min.apply(Math,n)," %"),this.max="".concat(Math.max.apply(Math,n)," %")),this.color3=Re["p"]().domain([Math.min.apply(Math,n),Math.max.apply(Math,n)]).range(["rgba(179,227,238,0.8)","rgba(1,94,111,0.8)"]),this.mapFeatures[e].features.forEach((function(t,e){t.properties.color=r.color3(t.properties.value)})),this.polyLayer[e]=new ir["a"]({source:new tr["a"]({features:(new sr["a"]).readFeatures(JSON.stringify(this.mapFeatures[e]))}),style:function(t){return new er["c"]({fill:new ar["a"]({color:r.colors(t.get("value")),opacity:1}),stroke:!1})}}),this.zoommap.addLayer(this.polyLayer[e]);var s=Re["g"]({decimal:",",thousands:".",grouping:[3]}),c=s.format(",");this.total=c(i),this.totalProcent="".concat(parseInt(100*i/o*100,10)/100," %")},changeSectieGraph:function(t){this.updateHorizontalBarChart("graph-sectie",{root:"".concat(this.alegeri),tree:this.rezultatSec[this.secType]})},changeGraph:function(t){this.updateHorizontalBarChart("graph",{root:"".concat(this.alegeri),tree:this.rezultat[this.rezType]})},newVarsta:function(){"Total"===this.activeVarsta&&"Total"===this.activeGen?this.updateMap("LP","p"):this.updateMap("".concat(this.activeGen," ").concat(this.activeVarsta),"s"),this.liste={label:"Liste Permanente",value:"LP"}},toggle:function(){"nul"===this.activeGen?this.newNul():this.goto({value:this.alegeri})},changeOras:function(){var t=this;this.zoommap.removeLayer(this.polyLayer[0]),this.zoommap.removeLayer(this.polyLayer[1]),this.drawerRight=!1,this.activeVarsta=null,this.flyTo(G["d"](this.config["".concat(this.orasSelect.value)].center),(function(e){t.allData=[],t.$router.push({name:"rezultate",query:{oras:"".concat(t.orasSelect.value),alegeri:"".concat(t.config["".concat(t.orasSelect.value)].default)}}).then((function(){t.drawerRight=!0,t.configMenu(),t.titlu=t.alegeriOptions.find((function(e){return e.value===t.config["".concat(t.orasSelect.value)].default})).label,t.alegeriSelect={label:t.titlu,value:t.config["".concat(t.orasSelect.value)].default},t.loadMaps(0)}))}))},flyTo:function(t,e){var a=2e3,r=this.view.getZoom(),n=2,i=!1;this.view.animate({center:t,duration:a},(function(t){n+=-1,i||0!==n&&t||(i=!0,e(t))})),this.view.animate({zoom:r-3,duration:a/2},{zoom:r,duration:a/2},(function(t){n+=-1,i||0!==n&&t||(i=!0)}))},goto:function(t){var e=this;this.activeVarsta=null,this.activeGen="win",this.rezType=1,this.$router.push({name:"rezultate",query:{oras:"".concat(this.orasSelect.value),alegeri:"".concat(t.value)}}).then((function(){e.loadData()}))},newNul:function(){this.activeVarsta=null,this.$router.push({name:"rezultate",query:{oras:"".concat(this.orasSelect.value),alegeri:"".concat(this.alegeri),id:"".concat(this.optionsLabel[this.alegeri].length-1)}}),this.updateMap("d","p")},newCGMB:function(){this.activeGen="",this.$router.push({name:"rezultate",query:{oras:"".concat(this.orasSelect.value),alegeri:"".concat(this.alegeri),id:this.optionsLabel[this.alegeri].indexOf(this.activeVarsta)}}),this.updateMap("".concat(this.activeVarsta.value),"p")},newListe:function(){this.updateMap("".concat(this.liste.value),"p"),this.activeVarsta="Total",this.activeGen="Total"},updateHorizontalBarChart:function(t,e){var a={data:[]};e.tree.sort((function(t,e){return parseFloat(t.value)5&&(i+=n,o.push({root:c.label,value:n}))}));var u=parseInt(i/n,10);o.forEach((function(t,a){e.rezultatSec[2].push({root:t.root,value:Math.round(t.value/u)})})),this.updateHorizontalBarChart("graph-sectie",{root:"".concat(this.alegeri),tree:this.rezultatSec[this.secType]})},totaluri:function(){for(var t=this,e=[],a=26;a5&&(o+=i,s.push({root:c.label,value:i}))}));var c=parseInt(o/i,10);s.forEach((function(e,a){t.rezultat[2].push({root:e.root,value:Math.round(e.value/c)})})),this.updateHorizontalBarChart("graph",{root:"".concat(this.alegeri),tree:this.rezultat[1]})},onMapCreated:function(){this.vlayer=new ir["a"]({source:this.vectorsource,style:new er["c"]({fill:new ar["a"]({color:"rgba(128, 153, 255, 0.2)"}),stroke:new rr["a"]({color:"#FF5000",width:2}),image:new nr["a"]({radius:7,fill:new ar["a"]({color:"#8099FF"})})})}),this.view=new cr["a"]({zoom:12,center:G["d"](this.config["".concat(this.orasSelect.value)].center),loadTilesWhileAnimating:!0,loadTilesWhileInteracting:!0}),this.zoommap=new lr["a"]({target:"ol-map",projection:"EPSG:4326",layers:[new or["a"]({source:new ur["a"]}),this.vlayer],view:this.view})},generateLayer:function(t,e,a,r){var n=new tr["a"]({features:(new sr["a"]).readFeatures(t)}),i=new ir["a"]({source:n,style:new er["c"]({fill:new ar["a"]({color:r}),stroke:new rr["a"]({color:e,width:a}),image:new nr["a"]({radius:7,fill:new ar["a"]({color:"#8099FF"})})})});return i},addInteractions:function(){var t=this;this.modify=new Ya["a"]({source:this.vectorsource}),this.zoommap.addInteraction(this.modify),this.draw=new Za["a"]({source:this.vectorsource,type:"Polygon",style:new er["c"]({fill:new ar["a"]({color:"rgba(255, 80, 0, 0.2)"}),stroke:new rr["a"]({color:"#8099FF",width:2}),image:new nr["a"]({radius:7,fill:new ar["a"]({color:"#8099FF"})})})}),this.zoommap.addInteraction(this.draw);var e=new Wa["a"]({source:this.vectorsource});this.zoommap.addInteraction(e),this.vectorsource.getFeatures().length>0&&this.draw.setActive(!1),this.draw.on("drawend",(function(e){t.controlDoubleClickZoom(!1),t.draw.setActive(!1),t.updateSearch(e.feature),t.setMiniState(!1)})),this.modify.on("modifyend",(function(e){t.updateSearch(e.features.getArray()[0])}))},controlDoubleClickZoom:function(t){for(var e=this.zoommap.getInteractions(),a=0;a1&&void 0!==arguments[1]?arguments[1]:"asc";return function(a,r){if(!Object.prototype.hasOwnProperty.call(a,t)||!Object.prototype.hasOwnProperty.call(r,t))return 0;var n="string"===typeof a[t]?a[t].toUpperCase():a[t],i="string"===typeof r[t]?r[t].toUpperCase():r[t],o=0;return n>i?o=1:ne?"".concat(t.substr(0,e).replace(/\s+$/,""),"…"):t}}};n.a.defaults.headers.common={Accept:"application/json","Content-Type":"application/json","X-Requested-With":"XMLHttpRequest","Content-Language":"ro"};var c=n.a.create({baseURL:"https://apitest.zoom.report",headers:{Accept:"application/json","Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"}}),l=n.a.create({baseURL:"/api",headers:{Accept:"application/json","Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"}});e["c"]=function(t){var e=t.Vue;e.prototype.$axios=n.a,e.prototype.$api=c,e.mixin(s)}},7685:function(t,e,a){"use strict";var r=a("a6be"),n=a.n(r);n.a},"7e6d":function(t,e,a){},8116:function(t,e,a){"use strict";var r=a("5d9f"),n=a.n(r);n.a},8158:function(t,e,a){},a6be:function(t,e,a){},b1b3:function(t,e,a){},b5f2:function(t,e,a){"use strict";(function(t){a("b06b"),a("5698"),a("bc3a"),a("df4d");var r=a("b5ae");a("758b"),a("db6e"),a("ce30");e["a"]={name:"algeriLayout",props:{code:{type:String,default:""}},data:function(){return{drawer:!0,miniState:!0,selType:"one",seamless:!0,backButton:!1,env:t.env,menuDock:0,activeEndPoint:"",presets:["Toate județele","Orașele din Alba"],selectedpreset:"",form:{nume:"",email:"",topics:[1,2,3,4,5,6],consent:"0"},scrolltop:30,model:"",opened:!1,activeLocalities:[],breadcrumbs:[],currentUrl:"",searchResult:[],desk:!0,overriddenNetworks:{test:{sharer:"https://google.com",type:"popup"}}}},validations:{form:{email:{required:r["required"],email:r["email"]},consent:{required:r["required"]}}}}}).call(this,a("4362"))},b656:function(t,e,a){"use strict";var r=a("5be9"),n=a.n(r);n.a},bd62:function(t,e,a){},c459:function(t,e,a){"use strict";var r=a("b1b3"),n=a.n(r);n.a},c4fe:function(t,e,a){},c544:function(t,e,a){"use strict";(function(t){a("99af"),a("4160"),a("a15b"),a("d81d"),a("d3b7"),a("e6cf"),a("ac1f"),a("25f0"),a("841c"),a("159b");var r=a("7619"),n=a.n(r),i=a("b06b"),o=(a("5698"),a("bc3a"),a("df4d")),s=a("2f62"),c=a("b5ae"),l=a("758b");a("db6e"),a("ce30"),a("2c72");e["a"]={name:"MyLayout",props:{code:{type:String,default:""}},data:function(){return{selType:"one",seamless:!0,backButton:!1,env:t.env,menuDock:0,activeEndPoint:"",presets:["Toate județele","Orașele din Alba"],selectedpreset:"",form:{nume:"",email:"",topics:[1,2,3,4,5,6],consent:"0"},scrolltop:30,model:"",opened:!1,activeLocalities:[],breadcrumbs:[],currentUrl:"",searchResult:[],desk:!0,overriddenNetworks:{test:{sharer:"https://google.com",type:"popup"}}}},validations:{form:{email:{required:c["required"],email:c["email"]},consent:{required:c["required"]}}},computed:n()(n()(n()(n()(n()(n()({},Object(s["e"])("search",["searchResults"])),Object(s["c"])("search",["getAllCategories","getLocalityCount","getLocalities","getActiveLocalities","getCounties","getCountiesNames"])),Object(s["e"])("account",{userLoggedIn:"isLoggedIn",authProcessing:"processing",accountSidebarView:"sidebarView"})),Object(s["c"])("account",["name","avatar"])),Object(s["c"])("registry",["getActiveLevel","getBreadcrumbs","getActiveEndPoint"])),{},{mobile:{get:function(){return this.$q.platform.is.mobile}},miniState:{get:function(){return this.$store.state.miniState},set:function(t){this.setMiniState(t)}},sidebarOpen:{get:function(){return this.$store.state.sidebarOpen},set:function(t){this.setMiniState(t)}},tip:function(){return this.searchResults.tip},viewSearch:function(){return this.searchResults.sir}}),mounted:function(){this.$q.notify.setDefaults({position:"bottom",timeout:2e3,textColor:"white",actions:[{icon:"close",color:"white"}]}),this.profile(),this.$q.platform.is.mobile?(this.desk=!1,this.setSidebarOpen(!0),this.setMiniState(!1)):(this.setSidebarOpen(!0),this.setMiniState(!0)),this.currentUrl=window.location.href},beforeUpdate:function(){},updated:function(){void 0!==this.$refs.me&&(this.scrolltop=this.$refs.breadh.clientHeight-30)},directives:{clickOutside:o["a"]},methods:n()(n()(n()(n()(n()(n()(n()(n()({},Object(s["d"])(["setSidebarOpen","setMiniState"])),Object(s["b"])("search",["searchIds","initData"])),Object(s["d"])("search",["removeLocality","resetPoly","setSelType"])),Object(s["d"])("account",{toggleAccountSidebar:"toggleSidebar"})),Object(s["b"])("account",["profile"])),Object(s["d"])("registry",["updateRegistry","updateActiveMenu","goBreadcrumbs","getGraphs","resetBreadcrumbs","setActiveGraphs"])),Object(s["b"])("registry",["getRegistry","getPage","changeMenu","getCategoryMenu"])),{},{enablePlugin:function(){},submit:function(t){var e=this;this.$v.form.$touch(),this.$v.form.$error?this.$q.notify("Un email valid este obligatoriu"):l["a"].post("user",{Email:this.form.email,Name:this.form.nume,Topics:this.form.topics.join(","),Consent:this.form.consent}).then((function(a){e.$q.notify({type:"positive",message:"Îți mulțumim! Te vom ține la curent"}),e.opened=!1,t(a)})).catch((function(t){400===t.response.status?e.$q.notify("Adresa introdusă există deja în baza noastră de date."):e.$q.notify("Eroare de conexiune.")}))},openModal:function(){this.opened=!0},openURL:i["a"],search:function(t,e,a){var r=this;t.length<3?(this.searchResult=[],a()):l["a"].post("search/name/",{coord:t}).then((function(t){r.searchResult=[],t.data.forEach((function(t){r.searchResult.push({label:"".concat(t.localitate_niv2," | ").concat(t.judet),judet:"".concat(t.judet),value:t.localitate_niv2,ids:t.sirutA_niv2,tagul:"".concat(t.localitate_niv2),tip:t.tip})})),e((function(){return new Promise((function(t,e){t(!0)}))})),r.$q.platform.is.mobile&&(r.setSidebarOpen(!0),r.setMiniState(!1)),r.$forceUpdate()}))},clearSelection:function(){this.resetPoly()},selected:function(t){var e=this,a=!1;this.$store.state.search.searchResults.localities.map((function(e){return e.siruta===t.ids&&(a=!0),e})),"/"===this.$route.path?(a||(this.$store.state.search.searchResults.localities.push({label:t.label,judet:t.judet,active:!0,siruta:t.ids}),this.$store.state.search.activeLocalities.push(t.ids.toString(10)),this.searchIds({ids:this.$store.state.search.activeLocalities.join(","),tip:""})),this.model={},this.searchResult=[]):this.$router.push({name:"graphs",query:{ids:"".concat(t.ids),code:"".concat([this.$router.currentRoute.query.code]),cat:"".concat(this.$router.currentRoute.query.cat)}}).then((function(t){e.$router.go(0)}))},goBack:function(){this.$router.go(-1)},hideMenu:function(t){this.miniState=!0},openSearchMenu:function(){this.menuDock=0,this.$q.platform.is.mobile||(this.setSidebarOpen(!0),0===this.menuDock?this.miniState=!this.miniState:this.miniState&&(this.miniState=!1),"/"===this.$route.path&&(this.miniState=!1))},openDataMenu:function(){1===this.menuDock?(this.miniState=!this.miniState,this.$q.platform.is.mobile&&(this.setSidebarOpen(!1),this.miniState=!1)):this.miniState&&(this.miniState=!1),"/"===this.$route.path&&(this.miniState=!1),this.menuDock=1},closeBar:function(){this.miniState=!this.miniState,this.$q.platform.is.mobile&&(this.setSidebarOpen(!1),this.miniState=!1)},getMainMenu:function(){this.menuDock=1,this.miniState=!1},getReport:function(t){},searchTemp:function(t){},loadGroupPage:function(t){this.changeMenu({item:t,nodes:this.getActiveLevel}),this.loadPage(t)},loadPage:function(t){this.miniState=!0,this.$router.push({name:"graphs",query:{ids:"".concat(this.activeLocalities),code:"".concat([t.code]),cat:"".concat(this.getActiveEndPoint)}}),this.$q.platform.is.mobile&&this.setSidebarOpen(!1),this.$forceUpdate()},updateLocalities:function(){this.miniState=!0,this.$router.push({name:"graphs",query:{ids:"".concat(this.activeLocalities),code:"".concat([this.$router.currentRoute.query.code]),cat:"".concat(this.$router.currentRoute.query.cat)}}),this.$store.state.updates+=1,this.$forceUpdate()},updateList:function(t){var e=this;1!==this.activeLocalities.length||"/"===this.$route.path?(this.removeLocality(t),this.$forceUpdate(),"/"!==this.$route.path&&this.$router.push({name:"graphs",query:{ids:"".concat(this.activeLocalities),code:"".concat([this.$router.currentRoute.query.code]),cat:"".concat(this.$router.currentRoute.query.cat)}}).then((function(t){e.$router.go(0)}))):this.$q.notify({position:"top-left",color:"info",message:"Trebuie să fie cel puțin o localitate selectată."})},toggleSelect:function(){var t=this;this.activeLocalities.length===this.getLocalities.length?this.activeLocalities=[]:(this.activeLocalities=[],this.getLocalities.forEach((function(e,a){t.activeLocalities.push("".concat(e.sirutA_niv2))})))}})}}).call(this,a("4362"))},ce30:function(t,e,a){"use strict";var r=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("q-header",{staticClass:"graphs-title"},[a("q-toolbar",[a("img",{staticStyle:{height:"35px",width:"auto"},attrs:{src:"statics/logo-square.png"}}),a("p",{staticClass:"text-white",staticStyle:{"padding-top":"20px","padding-left":"20px"}},[t._v(" "+t._s(t.oras)+" Alegeri Locale 2020")])])],1)},n=[],i=a("7619"),o=a.n(i),s=a("2f62"),c=(a("758b"),{name:"graphs-header",props:{oras:{type:String,default:""}},data:function(){return{desk:!0,local:"",expanded:!1}},computed:o()(o()({},Object(s["e"])("account",["user","expire_at"])),Object(s["c"])("account",["name","avatar"])),mounted:function(){!0===this.$q.platform.is.mobile&&(this.desk=!1)},methods:o()(o()({},Object(s["b"])("account",["logout"])),Object(s["d"])(["setSidebarOpen","setMiniState"]))}),l=c,u=(a("fb68"),a("2877")),d=a("e359"),p=a("65c6"),h=a("eebe"),f=a.n(h),m=Object(u["a"])(l,r,n,!1,null,"1ca68ef6",null);m.exports;f()(m,"components",{QHeader:d["a"],QToolbar:p["a"]})},db6e:function(t,e,a){"use strict";var r=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("q-drawer",{attrs:{side:"right","content-class":"bg-grey-2"},model:{value:t.sidebarOpen,callback:function(e){t.sidebarOpen=e},expression:"sidebarOpen"}},["guest"===t.sidebarView?a("account-login"):t._e(),"recover"===t.sidebarView?a("account-recover"):t._e(),"register"===t.sidebarView?a("account-register"):t._e(),"user"===t.sidebarView?a("account-profile"):t._e(),a("q-inner-loading",{attrs:{color:"primary",visible:!!t.processing}})],1)},n=[],i=a("7619"),o=a.n(i),s=a("2f62"),c=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("q-page",{staticClass:"flex justify-center text-center col-12 animate-fade"},[a("div",{staticClass:"column page-content full-width q-pa-md"},[a("div",{staticClass:"q-title text-primary q-mt-md"},[t._v("\n Intră în cont\n ")]),a("div",{staticClass:"row justify-center"},[a("div",{staticClass:"col-12 form-fields"},[a("q-slide-transition",[t.showErrorMessage?a("q-alert",{staticClass:"q-mt-md",attrs:{type:"negative",appear:"",actions:[{icon:"close",handler:function(){t.showErrorMessage=!1}}],message:t.failedAuthMessage}}):t._e()],1),a("q-field",{staticClass:"q-my-md",attrs:{icon:"email","error-label":t.errors.email,error:t.$v.form.email.$error}},[a("q-input",{attrs:{type:"email","float-label":"Email"},on:{blur:t.$v.form.email.$touch,input:function(e){return t.showValidationErrors()},keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.doLogin()}},model:{value:t.form.email,callback:function(e){t.$set(t.form,"email",e)},expression:"form.email"}})],1),a("q-field",{staticClass:"q-my-md",attrs:{icon:"lock","error-label":t.errors.password,error:t.$v.form.password.$error}},[a("q-input",{attrs:{type:"password","float-label":"Parola"},on:{blur:t.$v.form.password.$touch,input:function(e){return t.showValidationErrors()},keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.doLogin()}},model:{value:t.form.password,callback:function(e){t.$set(t.form,"password",e)},expression:"form.password"}})],1),a("q-field",{staticClass:"q-ma-md"},[a("q-checkbox",{staticClass:"text-primary",model:{value:t.form.remember,callback:function(e){t.$set(t.form,"remember",e)},expression:"form.remember"}},[t._v("\n  Ține-mă minte\n ")])],1),a("div",{staticClass:"row q-my-lg justify-center"},[a("q-btn",{staticClass:"col-8 no-shadow",attrs:{color:"primary",label:"Login",disable:t.disableLogin},on:{click:function(e){return t.doLogin()}}})],1),a("div",{staticClass:"row justify-center q-my-sm"},[a("q-btn",{staticClass:"q-px-sm",attrs:{flat:"",color:"secondary",label:"Nu am cont"},on:{click:function(e){return t.setSidebarView("register")}}}),a("q-btn",{staticClass:"q-px-sm",attrs:{flat:"",color:"secondary",label:"Am uitat parola",disable:""},on:{click:function(e){return t.setSidebarView("recover")}}})],1)],1),a("div",{staticClass:"col-8"})])])])},l=[],u=(a("07ac"),a("ac1f"),a("466d"),a("68bf")),d=a.n(u),p=a("b5ae"),h={name:"AccountLogin",data:function(){return{form:{email:"",password:"",remember:!1},errors:{email:"",password:""},submitted:!1,isAuthFailed:!1,showErrorMessage:!1,disableLogin:!1,failedAuthMessage:"Login failed",validationMessages:{email:{required:"We need a valid email",email:"We need a valid email",unique:"The email has already been taken"},password:{required:"Password is required",minLength:"Password is too short",isValid:""}}}},computed:o()(o()({},Object(s["e"])(["isLoggedIn","loginResponse"])),Object(s["c"])(["processing"])),validations:function(){return{form:{email:{required:p["required"],email:p["email"]},password:{required:p["required"],minLength:Object(p["minLength"])(4),isValid:function(t){return""===t||!this.isAuthFailed}}}}},methods:o()(o()(o()({},Object(s["b"])("account",["login"])),Object(s["d"])("account",["setSidebarView"])),{},{doLogin:function(){this.submitted=!0,this.$v.form.$touch(),this.$v.form.$error?this.showValidationErrors():(this.isAuthFailed=!1,this.showErrorMessage=!1,this.$v.form.$reset(),this.login(o()({},this.form)).catch(this.handleFailedLogin))},handleFailedLogin:function(t){var e=this;if(t.response&&403===t.response.status)this.failedAuthMessage=t.response.data.message;else if(t.response&&422===t.response.status){var a=Object.values(t.response.data.errors),r=d()(a,1),n=d()(r[0],1);this.failedAuthMessage=n[0]}else if(t.response&&429===t.response.status){var i=Object.values(t.response.data.errors),o=d()(i,1),s=d()(o[0],1);this.failedAuthMessage=s[0];var c=this.failedAuthMessage.match(/(\d+)\s?sec/i);2===c.length&&parseInt(c[1],10)&&(this.disableLogin=!0,setTimeout((function(){e.disableLogin=!1}),1e3*parseInt(c[1],10)))}this.isAuthFailed=!0,this.showErrorMessage=!0,this.showValidationErrors()},showValidationErrors:function(){if(this.submitted)for(var t in this.$v.form.$touch(),this.form)if(this.$v.form[t].$error){for(var e in this.$v.form[t].$params)if(!this.$v.form[t][e]){this.errors[t]=this.validationMessages[t][e];break}}else this.errors[t]=""}})},f=h,m=a("2877"),g=a("9989"),v=a("e9c1"),y=a("8572"),b=a("27f9"),w=a("8f8e"),x=a("9c40"),S=a("74f7"),C=a("eebe"),k=a.n(C),L=Object(m["a"])(f,c,l,!1,null,null,null),_=L.exports;k()(L,"components",{QPage:g["a"],QSlideTransition:v["a"],QField:y["a"],QInput:b["a"],QCheckbox:w["a"],QBtn:x["a"],QInnerLoading:S["a"]});var A=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("q-page",{staticClass:"flex justify-center text-center col-12 animate-fade"},[a("div",{staticClass:"column page-content full-width q-pa-md"},[t._v("\n recover page\n "),a("q-btn",{staticClass:"full-width",attrs:{flat:"",color:"secondary",label:"Înapoi la Login"},nativeOn:{click:function(e){return t.setSidebarView("guest")}}})],1)])},q=[],M={name:"AccountRegister",methods:o()({},Object(s["d"])("account",["setSidebarView"]))},z=M,F=Object(m["a"])(z,A,q,!1,null,"2d89f438",null),R=F.exports;k()(F,"components",{QPage:g["a"],QBtn:x["a"]});var I=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("q-page",{staticClass:"flex justify-center text-center col-12 animate-fade"},[a("div",{staticClass:"column page-content full-width q-pa-md"},[a("div",{staticClass:"q-title text-primary q-mt-md"},[t._v("\n Înregistrare cont nou\n ")]),a("div",{staticClass:"row justify-center q-my-sm"},[a("div",{staticClass:"col-12 form-fields"},[a("q-field",{staticClass:"q-my-sm",attrs:{icon:"person","error-label":t.errors.first_name,error:t.$v.form.first_name.$error}},[a("q-input",{attrs:{type:"text","float-label":"Prenume"},on:{blur:t.$v.form.first_name.$touch,input:function(e){return t.showValidationErrors()},keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.doCreateAccount()}},model:{value:t.form.first_name,callback:function(e){t.$set(t.form,"first_name",e)},expression:"form.first_name"}})],1),a("q-field",{staticClass:"q-my-sm",attrs:{inset:"icon","error-label":t.errors.last_name,error:t.$v.form.last_name.$error}},[a("q-input",{attrs:{type:"text","float-label":"Nume"},on:{blur:t.$v.form.last_name.$touch,input:function(e){return t.showValidationErrors()},keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.doCreateAccount()}},model:{value:t.form.last_name,callback:function(e){t.$set(t.form,"last_name",e)},expression:"form.last_name"}})],1),a("q-field",{staticClass:"q-mt-md q-mb-sm",attrs:{icon:"email","error-label":t.errors.email,error:t.$v.form.email.$error}},[a("q-input",{attrs:{type:"email","float-label":"Email"},on:{blur:t.$v.form.email.$touch,input:function(e){return t.showValidationErrors()},keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.doCreateAccount()}},model:{value:t.form.email,callback:function(e){t.$set(t.form,"email",e)},expression:"form.email"}})],1),a("q-field",{staticClass:"q-my-sm",attrs:{icon:"lock","error-label":t.errors.password,error:t.$v.form.password.$error}},[a("q-input",{attrs:{type:"password","float-label":"Parola"},on:{blur:t.$v.form.password.$touch,input:function(e){return t.showValidationErrors()},keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.doCreateAccount()}},model:{value:t.form.password,callback:function(e){t.$set(t.form,"password",e)},expression:"form.password"}})],1),a("q-field",{staticClass:"q-mb-md",attrs:{inset:"icon","error-label":t.errors.password_confirmation,error:t.$v.form.password_confirmation.$error}},[a("q-input",{attrs:{type:"password","float-label":"Confirmă Parola"},on:{blur:t.$v.form.password_confirmation.$touch,input:function(e){return t.showValidationErrors()},keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.doCreateAccount()}},model:{value:t.form.password_confirmation,callback:function(e){t.$set(t.form,"password_confirmation",e)},expression:"form.password_confirmation"}})],1),a("q-field",{staticClass:"q-ml-sm q-my-md text-primary",attrs:{"error-label":t.errors.tos,error:t.$v.form.tos.$error}},[a("q-checkbox",{model:{value:t.form.tos,callback:function(e){t.$set(t.form,"tos",e)},expression:"form.tos"}},[a("small",{staticClass:"on-right text-left"},[t._v("\n Sunt de acord cu\n"),a("a",{staticClass:"text-info text-italic"},[t._v("Termenii și condițiile")]),t._v("\n și cu\n "),a("em",{staticClass:"text-info"},[t._v("Politica de confidențialitate")])])])],1)],1),a("div",{staticClass:"col-8"},[a("q-btn",{staticClass:"full-width q-my-md no-shadow",attrs:{color:"primary",label:"Register"},nativeOn:{click:function(e){return t.doCreateAccount()}}}),a("q-btn",{staticClass:"full-width",attrs:{flat:"",color:"secondary",label:"Înapoi la Login"},nativeOn:{click:function(e){return t.setSidebarView("guest")}}})],1)])])])},O=[],P={name:"AccountRegister",data:function(){return{form:{email:"",password:"",password_confirmation:"",first_name:"",last_name:"",tos:!1},errors:{email:"",password:"",password_confirmation:"",first_name:"",last_name:"",tos:""},submitted:!1,showErrorMessage:!1,validationMessages:{email:{required:"We need a valid email",email:"We need a valid email",unique:"The email has already been taken"},password:{required:"Password is required",minLength:"Password is too short"},password_confirmation:{sameAsPassword:"Passwords must be identical"},first_name:{required:"Given Name is required",minLength:"Given Name is too short"},last_name:{required:"Name is required",minLength:"Name is too short"},tos:{checked:"To continue, you must agree with our Privacy Policy"}}}},validations:function(){return{form:{email:{required:p["required"],email:p["email"]},password:{required:p["required"],minLength:Object(p["minLength"])(8)},password_confirmation:{sameAsPassword:Object(p["sameAs"])("password")},first_name:{required:p["required"],minLength:Object(p["minLength"])(2)},last_name:{required:p["required"],minLength:Object(p["minLength"])(2)},tos:{checked:Object(p["sameAs"])((function(){return!0}))}}}},methods:o()(o()(o()({},Object(s["b"])("account",["register"])),Object(s["d"])("account",["setSidebarView"])),{},{showValidationErrors:function(){if(this.submitted)for(var t in this.$v.form.$touch(),this.form)if(this.$v.form[t].$error){for(var e in this.$v.form[t].$params)if(!this.$v.form[t][e]){this.errors[t]=this.validationMessages[t][e];break}}else this.errors[t]=""},doCreateAccount:function(){this.submitted=!0,this.$v.form.$touch(),this.$v.form.$error?this.showValidationErrors():(this.showErrorMessage=!1,this.$v.form.$reset(),this.register(o()({},this.form)).catch(this.handleFailedLogin))}})},T=P,E=Object(m["a"])(T,I,O,!1,null,"529c78a7",null),B=E.exports;k()(E,"components",{QPage:g["a"],QField:y["a"],QInput:b["a"],QCheckbox:w["a"],QBtn:x["a"]});var j=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("q-page",{staticClass:"flex justify-center text-center col-12 animate-fade"},[a("div",{staticClass:"column page-content full-width q-pa-md"},[a("q-btn",{staticClass:"q-px-sm",attrs:{flat:"",color:"secondary",label:"Logout"},on:{click:function(e){return t.logout()}}})],1)])},D=[],$=(a("758b"),{name:"Profile",data:function(){return{}},computed:o()(o()({},Object(s["e"])("account",["user","expire_at"])),Object(s["c"])("account",["name","avatar"])),methods:o()({},Object(s["b"])("account",["logout"]))}),G=$,Q=Object(m["a"])(G,j,D,!1,null,"7eeadcc5",null),V=Q.exports;k()(Q,"components",{QPage:g["a"],QBtn:x["a"]});var N={name:"accountSidebar",components:{AccountProfile:V,AccountRecover:R,AccountRegister:B,AccountLogin:_},data:function(){return{}},computed:o()(o()({},Object(s["e"])("account",["processing","sidebarView"])),{},{sidebarOpen:{get:function(){return this.$store.state.account.sidebarOpen},set:function(t){this.toggleSidebar(t)}}}),methods:o()({},Object(s["d"])("account",["toggleSidebar"]))},U=N,H=a("9404"),K=Object(m["a"])(U,r,n,!1,null,"332ae518",null);K.exports;k()(K,"components",{QDrawer:H["a"],QInnerLoading:S["a"]})},f3a5:function(t,e,a){},f493:function(t,e,a){"use strict";var r=a("c4fe"),n=a.n(r);n.a},fb68:function(t,e,a){"use strict";var r=a("bd62"),n=a.n(r);n.a},fbb6:function(t,e,a){"use strict";var r=a("4399"),n=a.n(r);n.a}});