-
Notifications
You must be signed in to change notification settings - Fork 0
/
6-es2015.a52101246a5c0f70976d.js
1 lines (1 loc) · 60.3 KB
/
6-es2015.a52101246a5c0f70976d.js
1
(window.webpackJsonp=window.webpackJsonp||[]).push([[6],{"2l0t":function(e,t,a){"use strict";a.r(t);var i=a("ofXK"),r=a("tyNb"),n=a("fXoL"),o=a("XiUz"),c=a("wZkO");function l(e,t){if(1&e&&(n.Sb(0,"a",6,7),n.Bc(2),n.Rb()),2&e){const e=t.$implicit,a=n.oc(1);n.jc("routerLink",e.link)("active",a.isActive),n.Bb(2),n.Dc(" ",e.label," ")}}let s=(()=>{class e{constructor(){this.navLinks=[{label:"Graphique",link:"graphique",index:0},{label:"Carte",link:"carte",index:1}]}ngOnInit(){}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=n.Hb({type:e,selectors:[["app-france"]],decls:7,vars:1,consts:[["fxFill","",1,"noScroll"],["fxFlex","","fxLayout","column"],["fxFlex","50px"],["mat-tab-nav-bar",""],["mat-tab-link","","routerLinkActive","",3,"routerLink","active",4,"ngFor","ngForOf"],["fxFlex","",1,"noScroll"],["mat-tab-link","","routerLinkActive","",3,"routerLink","active"],["rla","routerLinkActive"]],template:function(e,t){1&e&&(n.Sb(0,"div",0),n.Sb(1,"div",1),n.Sb(2,"div",2),n.Sb(3,"nav",3),n.Ac(4,l,3,3,"a",4),n.Rb(),n.Rb(),n.Sb(5,"div",5),n.Ob(6,"router-outlet"),n.Rb(),n.Rb(),n.Rb()),2&e&&(n.Bb(4),n.jc("ngForOf",t.navLinks))},directives:[o.f,o.b,o.d,c.b,i.j,r.f,r.d,c.a,r.c],styles:[".mat-tab-label[_ngcontent-%COMP%], .mat-tab-link[_ngcontent-%COMP%], .mat-tab-links[_ngcontent-%COMP%]{height:50px}.mat-tab-label-active[_ngcontent-%COMP%]{font-weight:700}.scrollable[_ngcontent-%COMP%]{overflow:auto}.noScroll[_ngcontent-%COMP%]{overflow:hidden;flex-wrap:nowrap}"]}),e})();var d=a("4R65"),p=function(e){return e.REGION="REGION",e.DEPARTEMENT="DEPARTEMENT",e.PAYS="PAYS",e.MONDE="MONDE",e.DOMTOM="DOMTOM",e}({}),b=a("9KmE"),u=a("PPqH"),h=a("WYmB"),g=a("tk/3"),y=a("/qmH"),f=a("bTqV"),C=a("OwhE"),T=a("f0Cb"),m=a("QibW"),D=a("3Pt+"),R=a("kmnG"),S=a("d3UM"),E=a("qFsG"),v=a("iadO"),L=a("FKr1"),x=a("NFeN"),M=a("znSr");function B(e,t){if(1&e&&(n.Sb(0,"mat-radio-button",44),n.Bc(1),n.Rb()),2&e){const e=t.$implicit;n.jc("value",e),n.Bb(1),n.Dc(" ",e," ")}}function A(e,t){if(1&e&&(n.Sb(0,"mat-option",44),n.Bc(1),n.Rb()),2&e){const e=t.$implicit;n.jc("value",e),n.Bb(1),n.Dc(" ",e," ")}}function I(e,t){if(1&e){const e=n.Tb();n.Sb(0,"div",33),n.Sb(1,"div",34),n.Sb(2,"h1"),n.Bc(3," Param\xe8tres "),n.Rb(),n.Rb(),n.Sb(4,"div",27),n.Sb(5,"div",34),n.Sb(6,"h3"),n.Bc(7," Granularit\xe9 Carte "),n.Rb(),n.Rb(),n.Sb(8,"div",35),n.Sb(9,"mat-radio-group",36),n.ac("ngModelChange",(function(t){return n.rc(e),n.ec().selectedGranularityMap=t}))("change",(function(){return n.rc(e),n.ec().changeGranularity()})),n.Sb(10,"div",37),n.Ac(11,B,2,2,"mat-radio-button",38),n.Rb(),n.Rb(),n.Rb(),n.Rb(),n.Ob(12,"mat-divider"),n.Sb(13,"div",27),n.Sb(14,"div",34),n.Sb(15,"h3"),n.Bc(16," Type de donn\xe9es "),n.Rb(),n.Rb(),n.Sb(17,"div",35),n.Sb(18,"mat-form-field"),n.Sb(19,"mat-select",39),n.ac("selectionChange",(function(){return n.rc(e),n.ec().updateStyleMap()}))("valueChange",(function(t){return n.rc(e),n.ec().selectedTypeGraph=t})),n.Ac(20,A,2,2,"mat-option",38),n.Rb(),n.Rb(),n.Rb(),n.Rb(),n.Sb(21,"div",27),n.Sb(22,"div",34),n.Sb(23,"h3"),n.Bc(24," Choix Date "),n.Rb(),n.Rb(),n.Sb(25,"div",35),n.Sb(26,"mat-form-field",40),n.Sb(27,"input",41),n.ac("dateChange",(function(t){return n.rc(e),n.ec().dateChanged(t.value)})),n.Rb(),n.Ob(28,"mat-datepicker-toggle",42),n.Ob(29,"mat-datepicker",null,43),n.Rb(),n.Rb(),n.Rb(),n.Rb()}if(2&e){const e=n.oc(30),t=n.ec();n.Bb(9),n.jc("ngModel",t.selectedGranularityMap),n.Bb(2),n.jc("ngForOf",t.listAllGranularityMap),n.Bb(8),n.jc("value",t.selectedTypeGraph),n.Bb(1),n.jc("ngForOf",t.listTypeGraph),n.Bb(7),n.jc("value",t.selectedDate)("min",t.minDate)("max",t.maxDate)("matDatepicker",e),n.Bb(1),n.jc("for",e)}}function P(e,t){1&e&&(n.Sb(0,"mat-icon"),n.Bc(1," keyboard_arrow_left "),n.Rb())}function G(e,t){1&e&&(n.Sb(0,"mat-icon"),n.Bc(1," keyboard_arrow_right "),n.Rb())}function O(e,t){if(1&e&&n.Ob(0,"div",45),2&e){const e=n.ec();n.jc("leafletLayer",e.franceLayer)}}function w(e,t){if(1&e&&n.Ob(0,"div",45),2&e){const e=n.ec();n.jc("leafletLayer",e.regionLayer)}}function j(e,t){if(1&e&&n.Ob(0,"div",45),2&e){const e=n.ec();n.jc("leafletLayer",e.departementLayer)}}function k(e,t){if(1&e&&(n.Sb(0,"h1",46),n.Bc(1),n.Rb()),2&e){const e=n.ec();n.Bb(1),n.Dc(" ",e.onHoverLegendInfos," ")}}function F(e,t){if(1&e&&(n.Sb(0,"h2",21),n.Bc(1),n.Rb()),2&e){const e=n.ec(2);n.Bb(1),n.Dc(" ",e.onHoverLegendInfosValue," Cas ")}}function H(e,t){if(1&e&&(n.Sb(0,"div",49),n.Sb(1,"h2",50),n.Bc(2),n.Rb(),n.Rb()),2&e){const e=n.ec(2);n.Bb(2),n.Dc(" Taux ",e.onHoverLegendInfosValue," ")}}function V(e,t){1&e&&(n.Sb(0,"span"),n.Bc(1,"+"),n.Rb())}const q=function(e,t){return{red:e,green:t}};function N(e,t){if(1&e&&(n.Sb(0,"span",51),n.Bc(1," ( "),n.Ac(2,V,2,0,"span",7),n.Bc(3),n.Rb()),2&e){const e=n.ec(2);n.jc("ngClass",n.mc(3,q,e.onHoverLegendInfosValueDayBefore>0,e.onHoverLegendInfosValueDayBefore<0)),n.Bb(2),n.jc("ngIf",e.onHoverLegendInfosValueDayBefore>0),n.Bb(1),n.Dc(" ",e.onHoverLegendInfosValueDayBefore,") ")}}function _(e,t){1&e&&(n.Sb(0,"span"),n.Bc(1,"+"),n.Rb())}function z(e,t){if(1&e&&(n.Sb(0,"span",51),n.Bc(1," ( "),n.Ac(2,_,2,0,"span",7),n.Bc(3),n.Rb()),2&e){const e=n.ec(2);n.jc("ngClass",n.mc(3,q,e.onHoverLegendInfosValueDayBefore<0,e.onHoverLegendInfosValueDayBefore>0)),n.Bb(2),n.jc("ngIf",e.onHoverLegendInfosValueDayBefore>0),n.Bb(1),n.Dc(" ",e.onHoverLegendInfosValueDayBefore,") ")}}function Y(e,t){if(1&e&&(n.Sb(0,"div",28),n.Ac(1,F,2,1,"h2",47),n.Ac(2,H,3,1,"div",48),n.Bc(3," \xa0 "),n.Sb(4,"h2",28),n.Ac(5,N,4,6,"span",25),n.Ac(6,z,4,6,"span",25),n.Rb(),n.Rb()),2&e){const e=n.ec();n.Bb(1),n.jc("ngIf",!e.miseEnFormeLegendBottomTitle()),n.Bb(1),n.jc("ngIf",e.miseEnFormeLegendBottomTitle()),n.Bb(3),n.jc("ngIf",e.isColorInversed),n.Bb(1),n.jc("ngIf",!e.isColorInversed)}}function U(e,t){1&e&&(n.Sb(0,"div",28),n.Sb(1,"h2"),n.Bc(2," Donn\xe9es non disponible "),n.Rb(),n.Rb())}function $(e,t){1&e&&(n.Sb(0,"div",28),n.Sb(1,"h2"),n.Bc(2," Selectionnez un pays... "),n.Rb(),n.Rb())}function Z(e,t){1&e&&(n.Sb(0,"span"),n.Bc(1,"+"),n.Rb())}function X(e,t){if(1&e&&(n.Sb(0,"span",51),n.Bc(1," ( "),n.Ac(2,Z,2,0,"span",7),n.Bc(3),n.Rb()),2&e){const e=n.ec();n.jc("ngClass",n.mc(3,q,e.onHoverLegendInfosValueMinDayBefore>0,e.onHoverLegendInfosValueMinDayBefore<0)),n.Bb(2),n.jc("ngIf",e.onHoverLegendInfosValueMinDayBefore>0),n.Bb(1),n.Dc(" ",e.onHoverLegendInfosValueMinDayBefore,") ")}}function J(e,t){1&e&&(n.Sb(0,"span"),n.Bc(1,"+"),n.Rb())}function K(e,t){if(1&e&&(n.Sb(0,"span",51),n.Bc(1," ( "),n.Ac(2,J,2,0,"span",7),n.Bc(3),n.Rb()),2&e){const e=n.ec();n.jc("ngClass",n.mc(3,q,e.onHoverLegendInfosValueMinDayBefore<0,e.onHoverLegendInfosValueMinDayBefore>0)),n.Bb(2),n.jc("ngIf",e.onHoverLegendInfosValueMinDayBefore>0),n.Bb(1),n.Dc(" ",e.onHoverLegendInfosValueMinDayBefore,") ")}}function Q(e,t){1&e&&(n.Sb(0,"span"),n.Bc(1,"+"),n.Rb())}function W(e,t){if(1&e&&(n.Sb(0,"span",51),n.Bc(1," ( "),n.Ac(2,Q,2,0,"span",7),n.Bc(3),n.Rb()),2&e){const e=n.ec();n.jc("ngClass",n.mc(3,q,e.onHoverLegendInfosValuemaxDayBefore>0,e.onHoverLegendInfosValuemaxDayBefore<0)),n.Bb(2),n.jc("ngIf",e.onHoverLegendInfosValuemaxDayBefore>0),n.Bb(1),n.Dc(" ",e.onHoverLegendInfosValuemaxDayBefore,") ")}}function ee(e,t){1&e&&(n.Sb(0,"span"),n.Bc(1,"+"),n.Rb())}function te(e,t){if(1&e&&(n.Sb(0,"span",51),n.Bc(1," ( "),n.Ac(2,ee,2,0,"span",7),n.Bc(3),n.Rb()),2&e){const e=n.ec();n.jc("ngClass",n.mc(3,q,e.onHoverLegendInfosValuemaxDayBefore<0,e.onHoverLegendInfosValuemaxDayBefore>0)),n.Bb(2),n.jc("ngIf",e.onHoverLegendInfosValuemaxDayBefore>0),n.Bb(1),n.Dc(" ",e.onHoverLegendInfosValuemaxDayBefore,") ")}}function ae(e,t){1&e&&(n.Sb(0,"span"),n.Bc(1,"+"),n.Rb())}function ie(e,t){if(1&e&&(n.Sb(0,"span",51),n.Bc(1," ( "),n.Ac(2,ae,2,0,"span",7),n.Bc(3),n.Rb()),2&e){const e=n.ec();n.jc("ngClass",n.mc(3,q,e.onHoverLegendInfosValueMeanDayBefore>0,e.onHoverLegendInfosValueMeanDayBefore<0)),n.Bb(2),n.jc("ngIf",e.onHoverLegendInfosValueMeanDayBefore>0),n.Bb(1),n.Dc(" ",e.onHoverLegendInfosValueMeanDayBefore,") ")}}function re(e,t){1&e&&(n.Sb(0,"span"),n.Bc(1,"+"),n.Rb())}function ne(e,t){if(1&e&&(n.Sb(0,"span",51),n.Bc(1," ( "),n.Ac(2,re,2,0,"span",7),n.Bc(3),n.Rb()),2&e){const e=n.ec();n.jc("ngClass",n.mc(3,q,e.onHoverLegendInfosValueMeanDayBefore<0,e.onHoverLegendInfosValueMeanDayBefore>0)),n.Bb(2),n.jc("ngIf",e.onHoverLegendInfosValueMeanDayBefore>0),n.Bb(1),n.Dc(" ",e.onHoverLegendInfosValueMeanDayBefore,") ")}}function oe(e,t){if(1&e&&(n.Sb(0,"span"),n.Bc(1),n.Rb()),2&e){const e=n.ec();n.Bb(1),n.Dc("Cas ",e.selectedTypeGraph,"")}}function ce(e,t){if(1&e&&(n.Sb(0,"span"),n.Bc(1),n.Rb()),2&e){const e=n.ec();n.Bb(1),n.Cc(e.selectedTypeGraph)}}function le(e,t){1&e&&(n.Sb(0,"span"),n.Bc(1,"pour 100 personnes"),n.Rb())}function se(e,t){1&e&&n.Ob(0,"div",52),2&e&&n.yc("background: ",t.$implicit,"")}function de(e,t){if(1&e&&(n.Sb(0,"div"),n.Bc(1),n.Rb()),2&e){const e=t.$implicit;n.Bb(1),n.Cc(e)}}const pe=function(e){return{bottom:!1,right:e,top:!1,left:!1}};let be=300,ue=(()=>{class e{constructor(e,t){this.http=e,this.ref=t,this.aliasGranularityMap=p,this.leafletOptions={layers:[Object(d.tileLayer)("http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{maxZoom:18,attribution:"Bastien MAURICE"})],zoom:6,center:Object(d.latLng)(46.303558,6.0164252)},this.widthSidebar=be,this.isOpenSidebar=!0,this.selectedGranularityMap=p.PAYS,this.listAllGranularityMap=[p.PAYS,p.REGION,p.DEPARTEMENT],this.selectedTypeGraph=u.a.CONFIRMED,this.selectedLegendColorGradient=h.c,this.listTypeGraph=[u.a.CONFIRMED,u.a.DEATH,u.a.ACTIVE,u.a.HOSPITALIZED,u.a.REANIMATED,u.a.RECOVERED,u.a.RECOVERY_RATE,u.a.MORTALITY_RATE],this.selectedLegendInfos=[],this.onHoverLegendInfos="",this.isHoveringItem=!1,this.isColorInversed=!0}toggleSidebar(){this.isOpenSidebar=!this.isOpenSidebar,this.widthSidebar=this.isOpenSidebar?be:30}onResizeEnd(e){be=e.rectangle.width,this.widthSidebar=e.rectangle.width}validate(e){return!(e.rectangle.width&&e.rectangle.width<300)}ngOnInit(){this.http.get(b.e).subscribe(e=>{this.franceLayer=d.geoJSON(e,{style:{color:"#4974ff",fillOpacity:.7,weight:2},onEachFeature:(e,t)=>{t.on("mouseover",e=>this.highlightFeature(e)),t.on("mouseout",e=>this.resetHighlight(e))}}),this.updateDateMinMaxSelected(),this.updateStyleMap()}),this.http.get(b.d).subscribe(e=>{this.departementLayer=d.geoJSON(e,{style:{color:"#4974ff",fillOpacity:.7,weight:2},onEachFeature:(e,t)=>{t.on("mouseover",e=>this.highlightFeature(e)),t.on("mouseout",e=>this.resetHighlight(e))}})}),this.http.get(b.g).subscribe(e=>{this.regionLayer=d.geoJSON(e,{style:{color:"#4974ff",fillOpacity:.7,weight:2},onEachFeature:(e,t)=>{t.on("mouseover",e=>this.highlightFeature(e)),t.on("mouseout",e=>this.resetHighlight(e))}})})}zoomToFeature(e){}updateStyleMap(){let e;switch(this.updateMinMaxMeanTopLegendInfosFIRST(),this.updateLengendColor(),this.updateLegendValues(),this.selectedTypeGraph){case u.a.CONFIRMED:e="confirmed",this.isColorInversed=!0;break;case u.a.DEATH:e="death",this.isColorInversed=!0;break;case u.a.ACTIVE:e="active",this.isColorInversed=!0;break;case u.a.HOSPITALIZED:e="hospitalized",this.isColorInversed=!0;break;case u.a.REANIMATED:e="reanimated",this.isColorInversed=!1;break;case u.a.RECOVERED:e="recovered",this.isColorInversed=!1;break;case u.a.RECOVERY_RATE:e="recoveredRate",this.isColorInversed=!1;break;case u.a.MORTALITY_RATE:e="mortalityRate",this.isColorInversed=!0}switch(this.selectedGranularityMap){case p.PAYS:this.franceLayer.eachLayer(t=>{t.feature.properties.value.forEach(a=>{Object(b.j)(new Date(a.date),this.selectedDate)&&t.setStyle({fillColor:this.getColor(a[e]),fillOpacity:.7,weight:2})})});break;case p.REGION:this.regionLayer.eachLayer(t=>{t.feature.properties.value.forEach(a=>{Object(b.j)(new Date(a.date),this.selectedDate)&&t.setStyle({fillColor:this.getColor(a[e]),fillOpacity:.7,weight:2})})});break;case p.DEPARTEMENT:this.departementLayer.eachLayer(t=>{t.feature.properties.value.forEach(a=>{Object(b.j)(new Date(a.date),this.selectedDate)&&t.setStyle({fillColor:this.getColor(a[e]),fillOpacity:.7,weight:2})})})}}updateLengendColor(){switch(this.selectedTypeGraph){case u.a.CONFIRMED:case u.a.DEATH:this.selectedLegendColorGradient=h.c;break;case u.a.ACTIVE:case u.a.HOSPITALIZED:case u.a.REANIMATED:this.selectedLegendColorGradient=h.b;break;case u.a.RECOVERED:case u.a.RECOVERY_RATE:this.selectedLegendColorGradient=h.a;break;case u.a.MORTALITY_RATE:this.selectedLegendColorGradient=h.c}}resetHighlight(e){switch(this.isHoveringItem=!1,this.selectedGranularityMap){case p.PAYS:this.franceLayer.eachLayer(e=>{e.setStyle({weight:2,color:"#4974ff"})});break;case p.REGION:this.regionLayer.eachLayer(e=>{e.setStyle({weight:2,color:"#4974ff"})});break;case p.DEPARTEMENT:this.departementLayer.eachLayer(e=>{e.setStyle({weight:2,color:"#4974ff"})})}this.onHoverLegendInfos=null,this.onHoverLegendInfosValue=null,this.ref.detectChanges()}getArgsId(){let e;switch(this.selectedTypeGraph){case u.a.CONFIRMED:e="confirmed";break;case u.a.DEATH:e="death";break;case u.a.ACTIVE:e="active";break;case u.a.HOSPITALIZED:e="hospitalized";break;case u.a.REANIMATED:e="reanimated";break;case u.a.RECOVERED:e="recovered";break;case u.a.RECOVERY_RATE:e="recoveredRate";break;case u.a.MORTALITY_RATE:e="mortalityRate"}return e}highlightFeature(e){this.isHoveringItem=!0;const t=e.target;let a,i;t.setStyle({weight:5,color:"white"});const r=this.getArgsId(),n=new Date(this.selectedDate);n.setDate(n.getDate()-1),t.feature.properties.value.forEach(e=>{Object(b.j)(new Date(e.date),this.selectedDate)&&(a=e[r]),Object(b.j)(new Date(e.date),n)&&(i=e[r])}),a?(this.onHoverLegendInfos=t.feature.properties.nom,this.onHoverLegendInfosValue=Number(a.toFixed(2)),this.onHoverLegendInfosValueDayBefore=Number((a-i).toFixed(2))):(this.onHoverLegendInfos=t.feature.properties.nom,this.onHoverLegendInfosValue=null,this.onHoverLegendInfosValueDayBefore=null),this.ref.detectChanges()}updateMinMaxMeanTopLegendInfosFIRST(){switch(this.selectedGranularityMap){case p.PAYS:this.updateMinMaxMeanTopLegendInfos(this.franceLayer);break;case p.REGION:this.updateMinMaxMeanTopLegendInfos(this.regionLayer);break;case p.DEPARTEMENT:this.updateMinMaxMeanTopLegendInfos(this.departementLayer)}}updateMinMaxMeanTopLegendInfos(e){const t=this.getArgsId();let a,i,r,n,o=0,c=0,l=0,s=0;e.eachLayer(e=>{e.feature.properties.value.forEach(e=>{Object(b.j)(new Date(e.date),this.selectedDate)&&(o+=e[t],c++,void 0===a?a=e[t]:e[t]<a&&(a=e[t]),void 0===i?i=e[t]:e[t]>i&&(i=e[t]));const d=new Date(this.selectedDate);d.setDate(d.getDate()-1),Object(b.j)(d,new Date(e.date))&&(l+=e[t],s++,void 0===r?r=e[t]:e[t]<r&&(r=e[t]),void 0===n?n=e[t]:e[t]>n&&(n=e[t]))})}),this.onHoverLegendInfosValueMean=Number(Math.round(o/c).toFixed(2)),this.onHoverLegendInfosValueMin=Number(a.toFixed(2)),this.onHoverLegendInfosValuemax=Number(i.toFixed(2)),this.onHoverLegendInfosValueMeanDayBefore=Number((Math.round(l/s)-this.onHoverLegendInfosValueMean).toFixed(2)),this.onHoverLegendInfosValueMinDayBefore=Number((a-r).toFixed(2)),this.onHoverLegendInfosValuemaxDayBefore=Number((n-i).toFixed(2))}changeGranularity(){this.updateDateMinMaxSelected(),this.updateStyleMap()}updateLegendValues(){switch(this.selectedGranularityMap){case p.PAYS:this.legendValuesMax(this.franceLayer);break;case p.REGION:this.legendValuesMax(this.regionLayer);break;case p.DEPARTEMENT:this.legendValuesMax(this.departementLayer)}}legendValuesMax(e){let t=0;e.eachLayer(e=>{e.feature.properties.value.forEach(e=>{if(Object(b.j)(new Date(e.date),this.selectedDate))switch(this.selectedTypeGraph){case u.a.CONFIRMED:e.confirmed>t&&(t=e.confirmed);break;case u.a.DEATH:e.death>t&&(t=e.death);break;case u.a.ACTIVE:e.active>t&&(t=e.active);break;case u.a.HOSPITALIZED:e.hospitalized>t&&(t=e.hospitalized);break;case u.a.REANIMATED:e.reanimated>t&&(t=e.reanimated);break;case u.a.RECOVERED:e.recovered>t&&(t=e.recovered);break;case u.a.RECOVERY_RATE:e.recoveredRate>t&&(t=e.recoveredRate);break;case u.a.MORTALITY_RATE:e.mortalityRate>t&&(t=e.mortalityRate)}})});let a=Math.round(t/7);this.selectedLegendInfos=[6*a,5*a,4*a,3*a,2*a,a]}dateChanged(e){this.selectedDate=e,this.updateStyleMap()}updateDateMinMaxSelected(){switch(this.selectedGranularityMap){case p.PAYS:this.iteratorDates(this.franceLayer);break;case p.REGION:this.iteratorDates(this.regionLayer);break;case p.DEPARTEMENT:this.iteratorDates(this.departementLayer)}}iteratorDates(e){e.eachLayer(e=>{e.feature.properties.value.forEach(e=>{void 0===this.minDate&&(this.minDate=new Date(e.date)),void 0===this.maxDate&&(this.maxDate=new Date(e.date)),void 0===this.selectedDate&&(this.selectedDate=new Date(e.date)),new Date(e.date)>this.maxDate&&(this.maxDate=new Date(e.date),this.selectedDate=new Date(e.date)),new Date(e.date)<this.minDate&&(this.minDate=new Date(e.date))})})}onMapReady(e){this.leafletMap=e}miseEnFormeLegendBottomTitle(){return this.selectedTypeGraph===u.a.MORTALITY_RATE||this.selectedTypeGraph===u.a.RECOVERY_RATE}getColor(e){return e>this.selectedLegendInfos[0]?this.selectedLegendColorGradient[0]:e>this.selectedLegendInfos[1]?this.selectedLegendColorGradient[1]:e>this.selectedLegendInfos[2]?this.selectedLegendColorGradient[2]:e>this.selectedLegendInfos[3]?this.selectedLegendColorGradient[3]:e>this.selectedLegendInfos[4]?this.selectedLegendColorGradient[4]:this.selectedLegendColorGradient[5]}}return e.\u0275fac=function(t){return new(t||e)(n.Nb(g.a),n.Nb(n.h))},e.\u0275cmp=n.Hb({type:e,selectors:[["app-map"]],decls:65,vars:33,consts:[["fxFlexFill","","fxLayout","row","fxLayoutAlign","center",1,"mainContener"],["mwlResizable","","resizeCursorPrecision","5",3,"enableGhostResize","resizeEdges","validateResize","resizeEnd"],["fxFlex","","fxLayout","row","fxLayoutAlign","space-between"],["fxFlex","","fxLayout","column","fxLayoutGap","20px","class","scrollable",4,"ngIf"],["fxLayout","row","fxFlex","30px"],["fxFlex","","fxLayoutAlign","center"],["fxFlex","","mat-button","",1,"buttonSidebarClose","icon",3,"click"],[4,"ngIf"],["fxFlex","2px",1,"dividerSidebar"],["fxFlex",""],["leaflet","",1,"lastPlan",2,"height","100%",3,"leafletOptions","leafletMapReady"],[3,"leafletLayer",4,"ngIf"],[1,"legendTop"],["fxFlex","","fxLayout","row","fxLayoutAlign","center"],["fxFlex","","fxLayout","column","fxLayoutAlign","center"],["fxLayoutAlign","center","style","margin: 0px;font-weight: bold;",4,"ngIf"],["fxLayoutAlign","center",4,"ngIf"],["fxLayout","row","fxLayoutAlign","center",2,"margin","10px"],["fxFlex","60%"],["fxFill",""],["fxLayout","column","fxLayoutAlign","center center","fxLa","",2,"margin","0px","margin-bottom","10px"],[2,"margin","0px"],["fxLayout","row","fxLayoutAlign","space-around center"],[2,"margin-left","20px"],["fxFlex","","fxLayout","row","fxLayoutAlign","end",2,"margin","0px","margin-right","20px"],[3,"ngClass",4,"ngIf"],[1,"firstPlan","legend"],["fxLayout","column"],["fxLayoutAlign","center"],["fxFlex","","fxLayout","row","fxLayoutGap","10px","fxLayoutAlign","space-evenly"],["fxLayoutGap","5px","fxLayout","column","fxLayoutAlign","center"],["class","squareLegend",3,"style",4,"ngFor","ngForOf"],[4,"ngFor","ngForOf"],["fxFlex","","fxLayout","column","fxLayoutGap","20px",1,"scrollable"],["fxLayout","row","fxLayoutAlign","center"],[1,"contentTemplate"],[3,"ngModel","ngModelChange","change"],["fxLayout","column","fxLayoutGap","5px"],[3,"value",4,"ngFor","ngForOf"],[3,"value","selectionChange","valueChange"],[1,"dateInput"],["matInput","",3,"value","min","max","matDatepicker","dateChange"],["matSuffix","",3,"for"],["picker",""],[3,"value"],[3,"leafletLayer"],["fxLayoutAlign","center",2,"margin","0px","font-weight","bold"],["style","margin: 0px;",4,"ngIf"],["style","margin: 0px;","fxLayout","column",4,"ngIf"],["fxLayout","column",2,"margin","0px"],["fxLayoutAlign","center",2,"margin","0px"],[3,"ngClass"],[1,"squareLegend"]],template:function(e,t){1&e&&(n.Sb(0,"div",0),n.Sb(1,"div",1),n.ac("resizeEnd",(function(e){return t.onResizeEnd(e)})),n.Sb(2,"div",2),n.Ac(3,I,31,9,"div",3),n.Sb(4,"div",4),n.Sb(5,"div",5),n.Sb(6,"button",6),n.ac("click",(function(){return t.toggleSidebar()})),n.Ac(7,P,2,0,"mat-icon",7),n.Ac(8,G,2,0,"mat-icon",7),n.Rb(),n.Rb(),n.Ob(9,"div",8),n.Rb(),n.Rb(),n.Rb(),n.Sb(10,"div",9),n.Sb(11,"div",10),n.ac("leafletMapReady",(function(e){return t.onMapReady(e)})),n.Ac(12,O,1,1,"div",11),n.Ac(13,w,1,1,"div",11),n.Ac(14,j,1,1,"div",11),n.Rb(),n.Rb(),n.Rb(),n.Sb(15,"div",12),n.Sb(16,"div",13),n.Sb(17,"div",14),n.Ac(18,k,2,1,"h1",15),n.Ac(19,Y,7,4,"div",16),n.Ac(20,U,3,0,"div",16),n.Ac(21,$,3,0,"div",16),n.Sb(22,"div",17),n.Sb(23,"div",18),n.Ob(24,"mat-divider",19),n.Rb(),n.Rb(),n.Sb(25,"div",20),n.Sb(26,"h2",21),n.Bc(27),n.Rb(),n.Sb(28,"h3",21),n.Bc(29," Tout confondu "),n.Rb(),n.Rb(),n.Sb(30,"div",22),n.Sb(31,"div",23),n.Bc(32," Min "),n.Rb(),n.Sb(33,"h3",24),n.Sb(34,"div"),n.Bc(35),n.Ac(36,X,4,6,"span",25),n.Ac(37,K,4,6,"span",25),n.Rb(),n.Rb(),n.Rb(),n.Sb(38,"div",22),n.Sb(39,"div",23),n.Bc(40," Max "),n.Rb(),n.Sb(41,"h3",24),n.Bc(42),n.Ac(43,W,4,6,"span",25),n.Ac(44,te,4,6,"span",25),n.Rb(),n.Rb(),n.Sb(45,"div",22),n.Sb(46,"div",23),n.Bc(47," Moyenne "),n.Rb(),n.Sb(48,"h3",24),n.Bc(49),n.Ac(50,ie,4,6,"span",25),n.Ac(51,ne,4,6,"span",25),n.Rb(),n.Rb(),n.Rb(),n.Rb(),n.Rb(),n.Sb(52,"div",26),n.Sb(53,"div",27),n.Sb(54,"div",28),n.Sb(55,"div"),n.Sb(56,"h3",21),n.Ac(57,oe,2,1,"span",7),n.Ac(58,ce,2,1,"span",7),n.Rb(),n.Ac(59,le,2,0,"span",7),n.Rb(),n.Rb(),n.Sb(60,"div",29),n.Sb(61,"div",30),n.Ac(62,se,1,3,"div",31),n.Rb(),n.Sb(63,"div",30),n.Ac(64,de,2,1,"div",32),n.Rb(),n.Rb(),n.Rb(),n.Rb()),2&e&&(n.Bb(1),n.zc("width",t.widthSidebar+"px"),n.jc("enableGhostResize",!0)("resizeEdges",n.lc(31,pe,t.isOpenSidebar))("validateResize",t.validate),n.Bb(2),n.jc("ngIf",t.isOpenSidebar),n.Bb(4),n.jc("ngIf",t.isOpenSidebar),n.Bb(1),n.jc("ngIf",!t.isOpenSidebar),n.Bb(3),n.jc("leafletOptions",t.leafletOptions),n.Bb(1),n.jc("ngIf",t.selectedGranularityMap===t.aliasGranularityMap.PAYS),n.Bb(1),n.jc("ngIf",t.selectedGranularityMap===t.aliasGranularityMap.REGION),n.Bb(1),n.jc("ngIf",t.selectedGranularityMap===t.aliasGranularityMap.DEPARTEMENT),n.Bb(4),n.jc("ngIf",t.isHoveringItem),n.Bb(1),n.jc("ngIf",t.isHoveringItem),n.Bb(1),n.jc("ngIf",t.isHoveringItem&&null===t.onHoverLegendInfosValue),n.Bb(1),n.jc("ngIf",!t.isHoveringItem),n.Bb(6),n.Dc(" ",t.selectedGranularityMap," "),n.Bb(8),n.Dc(" ",t.onHoverLegendInfosValueMin," \xa0 "),n.Bb(1),n.jc("ngIf",t.isColorInversed),n.Bb(1),n.jc("ngIf",!t.isColorInversed),n.Bb(5),n.Dc(" ",t.onHoverLegendInfosValuemax," \xa0 "),n.Bb(1),n.jc("ngIf",t.isColorInversed),n.Bb(1),n.jc("ngIf",!t.isColorInversed),n.Bb(5),n.Dc(" ",t.onHoverLegendInfosValueMean," \xa0 "),n.Bb(1),n.jc("ngIf",t.isColorInversed),n.Bb(1),n.jc("ngIf",!t.isColorInversed),n.Bb(6),n.jc("ngIf",!t.miseEnFormeLegendBottomTitle()),n.Bb(1),n.jc("ngIf",t.miseEnFormeLegendBottomTitle()),n.Bb(1),n.jc("ngIf",t.miseEnFormeLegendBottomTitle()),n.Bb(3),n.jc("ngForOf",t.selectedLegendColorGradient),n.Bb(2),n.jc("ngForOf",t.selectedLegendInfos))},directives:[o.f,o.d,o.c,y.a,o.b,i.k,f.a,C.a,T.a,o.e,i.j,m.b,D.g,D.i,R.b,S.a,E.b,v.b,v.d,R.f,v.a,m.a,L.k,x.a,C.b,i.i,M.a],styles:[".dividerSidebar[_ngcontent-%COMP%]{background-color:#323233}.icon[_ngcontent-%COMP%]:hover{color:#ec407a}.icon[_ngcontent-%COMP%]{color:#f48fb1}mwlResizable[_ngcontent-%COMP%]{box-sizing:border-box}.floatingButtonContener[_ngcontent-%COMP%]{position:fixed;bottom:40px;right:20px}.buttonSidebarClose[_ngcontent-%COMP%]{padding:0;width:20px;min-width:0}.contentTemplate[_ngcontent-%COMP%]{padding-left:10px}.titleTemplate[_ngcontent-%COMP%]{padding-left:5px}.dateInput[_ngcontent-%COMP%]{width:150px}.loader[_ngcontent-%COMP%]{background-color:transparent;width:100%;height:100%;position:absolute;top:0;left:0;background-color:red;opacity:.5}.legend[_ngcontent-%COMP%]{width:150px;height:200px;bottom:60px}.legend[_ngcontent-%COMP%], .legendTop[_ngcontent-%COMP%]{position:fixed;right:40px;background-color:#fff}.legendTop[_ngcontent-%COMP%]{width:250px;height:280px;top:120px;z-index:3}.lastPlan[_ngcontent-%COMP%]{z-index:1}.firstPlan[_ngcontent-%COMP%]{z-index:2}.squareLegend[_ngcontent-%COMP%]{width:20px;height:20px}.green[_ngcontent-%COMP%]{color:green}.red[_ngcontent-%COMP%]{color:red}.scrollable[_ngcontent-%COMP%]{overflow:auto}"]}),e})();class he{constructor(e,t,a,i,r,n,o,c,l,s,d,p){this.date=e,this.typeCarte=t,this.codeTypeCarte=a,this.libeleTypeCarte=i,this.casConfirme=r,this.deces=n,this.reanimation=o,this.hospitalise=c,this.gueris=l,this.actif=s,this.tauxGuerison=p,this.tauxMortalite=d}getMortalityRate(){return this.tauxMortalite}getRecoveryRate(){return this.tauxGuerison}getDate(){return this.date}getActif(){return this.actif}getTypeCarte(){return this.typeCarte}getCodeTypeCarte(){return this.codeTypeCarte}getLibeleTypeCarte(){return this.libeleTypeCarte}getCasConfirme(){return this.casConfirme}getDeces(){return this.deces}getReanimation(){return this.reanimation}getHospitalise(){return this.hospitalise}getGueris(){return this.gueris}setMortalityRate(e){this.tauxMortalite=e}setRecoveryRate(e){this.tauxGuerison=e}setDate(e){this.date=e}setTypeCarte(e){this.typeCarte=e}setCodeTypeCarte(e){this.codeTypeCarte=e}setLibeleTypeCarte(e){this.libeleTypeCarte=e}setCasConfirme(e){this.casConfirme=e}setDeces(e){this.deces=e}setReanimation(e){this.reanimation=e}setHospitalise(e){this.hospitalise=e}setGueris(e){this.gueris=e}setActif(e){this.actif=e}}var ge=a("zT9C"),ye=a("kRbQ"),fe=a("GvUb"),Ce=a("v5SH"),Te=a("kDNy");const me=[{codeTypeCarte:"FRA",libeleTypeCarte:"France"}],De=[{codeTypeCarte:"REG-75",libeleTypeCarte:"Nouvelle-Aquitaine"},{codeTypeCarte:"REG-11",libeleTypeCarte:"\xcele-de-France"},{codeTypeCarte:"REG-84",libeleTypeCarte:"Auvergne-Rh\xf4ne-Alpes"},{codeTypeCarte:"REG-27",libeleTypeCarte:"Bourgogne-Franche-Comt\xe9"},{codeTypeCarte:"REG-32",libeleTypeCarte:"Hauts-de-France"},{codeTypeCarte:"REG-44",libeleTypeCarte:"Grand Est"},{codeTypeCarte:"REG-01",libeleTypeCarte:"Guadeloupe"},{codeTypeCarte:"REG-02",libeleTypeCarte:"Martinique"},{codeTypeCarte:"REG-03",libeleTypeCarte:"Guyane"},{codeTypeCarte:"REG-04",libeleTypeCarte:"La R\xe9union"},{codeTypeCarte:"REG-06",libeleTypeCarte:"Mayotte"},{codeTypeCarte:"REG-24",libeleTypeCarte:"Centre-Val de Loire"},{codeTypeCarte:"REG-28",libeleTypeCarte:"Normandie"},{codeTypeCarte:"REG-52",libeleTypeCarte:"Pays de la Loire"},{codeTypeCarte:"REG-53",libeleTypeCarte:"Bretagne"},{codeTypeCarte:"REG-76",libeleTypeCarte:"Occitanie"},{codeTypeCarte:"REG-93",libeleTypeCarte:"Provence-Alpes-C\xf4te d'Azur"},{codeTypeCarte:"REG-94",libeleTypeCarte:"Corse"}],Re=[{libeleTypeCarte:"Charente",codeTypeCarte:"DEP-16"},{libeleTypeCarte:"Charente-Maritime",codeTypeCarte:"DEP-17"},{libeleTypeCarte:"Corr\xe8ze",codeTypeCarte:"DEP-19"},{libeleTypeCarte:"Creuse",codeTypeCarte:"DEP-23"},{libeleTypeCarte:"Dordogne",codeTypeCarte:"DEP-24"},{libeleTypeCarte:"Gironde",codeTypeCarte:"DEP-33"},{libeleTypeCarte:"Landes",codeTypeCarte:"DEP-40"},{libeleTypeCarte:"Lot-et-Garonne",codeTypeCarte:"DEP-47"},{libeleTypeCarte:"Pyr\xe9n\xe9es-Atlantiques",codeTypeCarte:"DEP-64"},{libeleTypeCarte:"Deux-S\xe8vres",codeTypeCarte:"DEP-79"},{libeleTypeCarte:"Vienne",codeTypeCarte:"DEP-86"},{libeleTypeCarte:"Haute-Vienne",codeTypeCarte:"DEP-87"},{libeleTypeCarte:"H\xe9rault",codeTypeCarte:"DEP-34"},{libeleTypeCarte:"Haute-Savoie",codeTypeCarte:"DEP-74"},{libeleTypeCarte:"Aisne",codeTypeCarte:"DEP-02"},{libeleTypeCarte:"Doubs",codeTypeCarte:"DEP-25"},{libeleTypeCarte:"Nord",codeTypeCarte:"DEP-59"},{libeleTypeCarte:"Oise",codeTypeCarte:"DEP-60"},{libeleTypeCarte:"Pas-de-Calais",codeTypeCarte:"DEP-62"},{libeleTypeCarte:"Somme",codeTypeCarte:"DEP-80"},{libeleTypeCarte:"Territoire de Belfort",codeTypeCarte:"DEP-90"},{libeleTypeCarte:"C\xf4te-d'Or",codeTypeCarte:"DEP-21"},{libeleTypeCarte:"Finist\xe8re",codeTypeCarte:"DEP-29"},{libeleTypeCarte:"Loire-Atlantique",codeTypeCarte:"DEP-44"},{libeleTypeCarte:"Bas-Rhin",codeTypeCarte:"DEP-67"},{libeleTypeCarte:"Alpes-Maritimes",codeTypeCarte:"DEP-06"},{libeleTypeCarte:"Maine-et-Loire",codeTypeCarte:"DEP-49"},{libeleTypeCarte:"Mayenne",codeTypeCarte:"DEP-53"},{libeleTypeCarte:"Seine-Maritime",codeTypeCarte:"DEP-76"},{libeleTypeCarte:"Ille-et-Vilaine",codeTypeCarte:"DEP-35"},{libeleTypeCarte:"Morbihan",codeTypeCarte:"DEP-56"},{libeleTypeCarte:"Sarthe",codeTypeCarte:"DEP-72"},{libeleTypeCarte:"Ain",codeTypeCarte:"DEP-01"},{libeleTypeCarte:"Ardennes",codeTypeCarte:"DEP-08"},{libeleTypeCarte:"Aube",codeTypeCarte:"DEP-10"},{libeleTypeCarte:"Eure",codeTypeCarte:"DEP-27"},{libeleTypeCarte:"Marne",codeTypeCarte:"DEP-51"},{libeleTypeCarte:"Haute-Marne",codeTypeCarte:"DEP-52"},{libeleTypeCarte:"Meurthe-et-Moselle",codeTypeCarte:"DEP-54"},{libeleTypeCarte:"Meuse",codeTypeCarte:"DEP-55"},{libeleTypeCarte:"Moselle",codeTypeCarte:"DEP-57"},{libeleTypeCarte:"Haut-Rhin",codeTypeCarte:"DEP-68"},{libeleTypeCarte:"Rh\xf4ne",codeTypeCarte:"DEP-69"},{libeleTypeCarte:"Vosges",codeTypeCarte:"DEP-88"},{libeleTypeCarte:"Allier",codeTypeCarte:"DEP-03"},{libeleTypeCarte:"Ard\xe8che",codeTypeCarte:"DEP-07"},{libeleTypeCarte:"Cantal",codeTypeCarte:"DEP-15"},{libeleTypeCarte:"Dr\xf4me",codeTypeCarte:"DEP-26"},{libeleTypeCarte:"Gard",codeTypeCarte:"DEP-30"},{libeleTypeCarte:"Is\xe8re",codeTypeCarte:"DEP-38"},{libeleTypeCarte:"Loire",codeTypeCarte:"DEP-42"},{libeleTypeCarte:"Haute-Loire",codeTypeCarte:"DEP-43"},{libeleTypeCarte:"Puy-de-D\xf4me",codeTypeCarte:"DEP-63"},{libeleTypeCarte:"Sa\xf4ne-et-Loire",codeTypeCarte:"DEP-71"},{libeleTypeCarte:"Savoie",codeTypeCarte:"DEP-73"},{libeleTypeCarte:"Aveyron",codeTypeCarte:"DEP-12"},{libeleTypeCarte:"Bouches-du-Rh\xf4ne",codeTypeCarte:"DEP-13"},{libeleTypeCarte:"C\xf4tes-d'Armor",codeTypeCarte:"DEP-22"},{libeleTypeCarte:"Eure-et-Loir",codeTypeCarte:"DEP-28"},{libeleTypeCarte:"Indre-et-Loire",codeTypeCarte:"DEP-37"},{libeleTypeCarte:"Haute-Sa\xf4ne",codeTypeCarte:"DEP-70"},{libeleTypeCarte:"Vaucluse",codeTypeCarte:"DEP-84"},{libeleTypeCarte:"Guyane",codeTypeCarte:"DEP-973"},{libeleTypeCarte:"Hautes-Alpes",codeTypeCarte:"DEP-05"},{libeleTypeCarte:"Calvados",codeTypeCarte:"DEP-14"},{libeleTypeCarte:"Cher",codeTypeCarte:"DEP-18"},{libeleTypeCarte:"Corse-du-Sud",codeTypeCarte:"DEP-2A"},{libeleTypeCarte:"Haute-Corse",codeTypeCarte:"DEP-2B"},{libeleTypeCarte:"Haute-Garonne",codeTypeCarte:"DEP-31"},{libeleTypeCarte:"Indre",codeTypeCarte:"DEP-36"},{libeleTypeCarte:"Loir-et-Cher",codeTypeCarte:"DEP-41"},{libeleTypeCarte:"Loiret",codeTypeCarte:"DEP-45"},{libeleTypeCarte:"Manche",codeTypeCarte:"DEP-50"},{libeleTypeCarte:"Paris",codeTypeCarte:"DEP-75"},{libeleTypeCarte:"Seine-et-Marne",codeTypeCarte:"DEP-77"},{libeleTypeCarte:"Yvelines",codeTypeCarte:"DEP-78"},{libeleTypeCarte:"Var",codeTypeCarte:"DEP-83"},{libeleTypeCarte:"Essonne",codeTypeCarte:"DEP-91"},{libeleTypeCarte:"Hauts-de-Seine",codeTypeCarte:"DEP-82"},{libeleTypeCarte:"Seine-Saint-Denis",codeTypeCarte:"DEP-93"},{libeleTypeCarte:"Val-de-Marne",codeTypeCarte:"DEP-94"},{libeleTypeCarte:"Val-d'Oise",codeTypeCarte:"DEP-95"},{libeleTypeCarte:"Martinique",codeTypeCarte:"DEP-972"},{libeleTypeCarte:"Jura",codeTypeCarte:"DEP-39"},{libeleTypeCarte:"Lot",codeTypeCarte:"DEP-46"},{libeleTypeCarte:"Tarn",codeTypeCarte:"DEP-81"},{libeleTypeCarte:"Tarn-et-Garonne",codeTypeCarte:"DEP-82"},{libeleTypeCarte:"Vend\xe9e",codeTypeCarte:"DEP-85"},{libeleTypeCarte:"Yonne",codeTypeCarte:"DEP-89"},{libeleTypeCarte:"Aude",codeTypeCarte:"DEP-11"},{libeleTypeCarte:"Ni\xe8vre",codeTypeCarte:"DEP-58"},{libeleTypeCarte:"Orne",codeTypeCarte:"DEP-61"},{libeleTypeCarte:"Alpes-de-Haute-Provence",codeTypeCarte:"DEP-04"},{libeleTypeCarte:"Gers",codeTypeCarte:"DEP-32"},{libeleTypeCarte:"Hautes-Pyr\xe9n\xe9es",codeTypeCarte:"DEP-64"},{libeleTypeCarte:"Guadeloupe",codeTypeCarte:"DEP-971"},{libeleTypeCarte:"La R\xe9union",codeTypeCarte:"DEP-974"},{libeleTypeCarte:"Pyr\xe9n\xe9es-Orientales",codeTypeCarte:"DEP-66"},{libeleTypeCarte:"Loz\xe8re",codeTypeCarte:"DEP-48"},{libeleTypeCarte:"Mayotte",codeTypeCarte:"DEP-976"},{libeleTypeCarte:"Ari\xe8ge",codeTypeCarte:"DEP-09"}];var Se=a("nXzS"),Ee=a("JJv3"),ve=a("Qu3c"),Le=a("8pX3"),xe=a("1jcm"),Me=a("5RNC"),Be=a("u3+B");function Ae(e,t){if(1&e&&(n.Sb(0,"mat-radio-button",30),n.Bc(1),n.Rb()),2&e){const e=t.$implicit;n.jc("value",e),n.Bb(1),n.Dc(" ",e," ")}}function Ie(e,t){if(1&e&&(n.Sb(0,"mat-option",30),n.Bc(1),n.Rb()),2&e){const e=t.$implicit;n.jc("value",e),n.Bb(1),n.Dc(" ",e.libeleTypeCarte," ")}}function Pe(e,t){if(1&e){const e=n.Tb();n.Sb(0,"div"),n.Sb(1,"div"),n.Sb(2,"mat-form-field"),n.Sb(3,"mat-select",31),n.ac("valueChange",(function(t){return n.rc(e),n.ec(2).selectedUniqueCountry=t})),n.Ac(4,Ie,2,2,"mat-option",23),n.Rb(),n.Rb(),n.Rb(),n.Rb()}if(2&e){const e=n.ec(2);n.Bb(3),n.jc("value",e.selectedUniqueCountry),n.Bb(1),n.jc("ngForOf",e.allCountry)}}function Ge(e,t){if(1&e&&(n.Sb(0,"mat-option",30),n.Bc(1),n.Rb()),2&e){const e=t.$implicit;n.jc("value",e),n.Bb(1),n.Ec(" ",e.codeTypeCarte," ",e.libeleTypeCarte," ")}}function Oe(e,t){if(1&e){const e=n.Tb();n.Sb(0,"div"),n.Sb(1,"mat-form-field"),n.Sb(2,"mat-select",32),n.ac("selectionChange",(function(){return n.rc(e),n.ec(3).updateFiltredData()}))("valueChange",(function(t){return n.rc(e),n.ec(3).selectedMultipleRegion=t})),n.Ac(3,Ge,2,3,"mat-option",23),n.Rb(),n.Rb(),n.Rb()}if(2&e){const e=n.ec(3);n.Bb(2),n.jc("value",e.selectedMultipleRegion),n.Bb(1),n.jc("ngForOf",e.allRegion)}}function we(e,t){if(1&e&&(n.Sb(0,"mat-option",30),n.Bc(1),n.Rb()),2&e){const e=t.$implicit;n.jc("value",e),n.Bb(1),n.Ec(" ",e.codeTypeCarte," ",e.libeleTypeCarte," ")}}function je(e,t){if(1&e){const e=n.Tb();n.Sb(0,"div"),n.Sb(1,"mat-form-field"),n.Sb(2,"mat-select",33),n.ac("selectionChange",(function(){return n.rc(e),n.ec(3).updateFiltredData()}))("valueChange",(function(t){return n.rc(e),n.ec(3).selectedUniqueRegion=t})),n.Ac(3,we,2,3,"mat-option",23),n.Rb(),n.Rb(),n.Rb()}if(2&e){const e=n.ec(3);n.Bb(2),n.jc("value",e.selectedUniqueRegion),n.Bb(1),n.jc("ngForOf",e.allRegion)}}function ke(e,t){if(1&e&&(n.Sb(0,"div"),n.Ac(1,Oe,4,2,"div",7),n.Ac(2,je,4,2,"div",7),n.Rb()),2&e){const e=n.ec(2);n.Bb(1),n.jc("ngIf",!e.uniqueGraphique),n.Bb(1),n.jc("ngIf",e.uniqueGraphique)}}function Fe(e,t){if(1&e&&(n.Sb(0,"mat-option",30),n.Bc(1),n.Rb()),2&e){const e=t.$implicit;n.jc("value",e),n.Bb(1),n.Ec(" ",e.codeTypeCarte," ",e.libeleTypeCarte," ")}}function He(e,t){if(1&e){const e=n.Tb();n.Sb(0,"div"),n.Sb(1,"mat-form-field"),n.Sb(2,"mat-select",32),n.ac("selectionChange",(function(){return n.rc(e),n.ec(3).updateFiltredData()}))("valueChange",(function(t){return n.rc(e),n.ec(3).selectedMultipleDepartemental=t})),n.Ac(3,Fe,2,3,"mat-option",23),n.Rb(),n.Rb(),n.Rb()}if(2&e){const e=n.ec(3);n.Bb(2),n.jc("value",e.selectedMultipleDepartemental),n.Bb(1),n.jc("ngForOf",e.allDepartemental)}}function Ve(e,t){if(1&e&&(n.Sb(0,"mat-option",30),n.Bc(1),n.Rb()),2&e){const e=t.$implicit;n.jc("value",e),n.Bb(1),n.Ec(" ",e.codeTypeCarte," ",e.libeleTypeCarte," ")}}function qe(e,t){if(1&e){const e=n.Tb();n.Sb(0,"div"),n.Sb(1,"mat-form-field"),n.Sb(2,"mat-select",33),n.ac("selectionChange",(function(){return n.rc(e),n.ec(3).updateFiltredData()}))("valueChange",(function(t){return n.rc(e),n.ec(3).selectedUniqueDepartemental=t})),n.Ac(3,Ve,2,3,"mat-option",23),n.Rb(),n.Rb(),n.Rb()}if(2&e){const e=n.ec(3);n.Bb(2),n.jc("value",e.selectedUniqueDepartemental),n.Bb(1),n.jc("ngForOf",e.allDepartemental)}}function Ne(e,t){if(1&e&&(n.Sb(0,"div"),n.Ac(1,He,4,2,"div",7),n.Ac(2,qe,4,2,"div",7),n.Rb()),2&e){const e=n.ec(2);n.Bb(1),n.jc("ngIf",!e.uniqueGraphique),n.Bb(1),n.jc("ngIf",e.uniqueGraphique)}}function _e(e,t){if(1&e){const e=n.Tb();n.Sb(0,"div",20),n.Sb(1,"mat-form-field",27),n.Sb(2,"input",34),n.ac("dateChange",(function(t){return n.rc(e),n.ec(2).updateDate(t.value)})),n.Rb(),n.Ob(3,"mat-datepicker-toggle",35),n.Ob(4,"mat-datepicker",null,36),n.Rb(),n.Rb()}if(2&e){const e=n.oc(5),t=n.ec(2);n.Bb(2),n.jc("value",t.currentDate)("min",t.minDate)("max",t.maxDate)("matDatepicker",e),n.Bb(1),n.jc("for",e)}}function ze(e,t){if(1&e){const e=n.Tb();n.Sb(0,"div",20),n.Sb(1,"div"),n.Bc(2,"Date Minimal"),n.Rb(),n.Sb(3,"mat-form-field",27),n.Sb(4,"input",34),n.ac("dateChange",(function(t){return n.rc(e),n.ec(2).updateDateCurrentMin(t.value)})),n.Rb(),n.Ob(5,"mat-datepicker-toggle",35),n.Ob(6,"mat-datepicker",null,37),n.Rb(),n.Sb(8,"div"),n.Bc(9,"Date Maximal"),n.Rb(),n.Sb(10,"mat-form-field",27),n.Sb(11,"input",34),n.ac("dateChange",(function(t){return n.rc(e),n.ec(2).updateDateCurrentMax(t.value)})),n.Rb(),n.Ob(12,"mat-datepicker-toggle",35),n.Ob(13,"mat-datepicker",null,38),n.Rb(),n.Rb()}if(2&e){const e=n.oc(7),t=n.oc(14),a=n.ec(2);n.Bb(4),n.jc("value",a.selectedDateMin)("min",a.minDate)("max",a.maxDate)("matDatepicker",e),n.Bb(1),n.jc("for",e),n.Bb(6),n.jc("value",a.selectedDateMax)("min",a.minDate)("max",a.maxDate)("matDatepicker",t),n.Bb(1),n.jc("for",t)}}function Ye(e,t){if(1&e&&(n.Sb(0,"mat-option",30),n.Bc(1),n.Rb()),2&e){const e=t.$implicit;n.jc("value",e),n.Bb(1),n.Cc(e)}}function Ue(e,t){if(1&e&&(n.Sb(0,"mat-radio-button",30),n.Bc(1),n.Rb()),2&e){const e=t.$implicit;n.jc("value",e),n.Bb(1),n.Dc(" ",e," ")}}function $e(e,t){if(1&e&&(n.Sb(0,"mat-option",30),n.Bc(1),n.Rb()),2&e){const e=t.$implicit;n.jc("value",e),n.Bb(1),n.Cc(e)}}function Ze(e,t){if(1&e){const e=n.Tb();n.Sb(0,"div",20),n.Sb(1,"mat-form-field"),n.Sb(2,"mat-label"),n.Bc(3,"Liste submode"),n.Rb(),n.Sb(4,"mat-select",39),n.ac("selectionChange",(function(t){return n.rc(e),n.ec(2).updateScatterSubmod(t.value)})),n.Ac(5,$e,2,2,"mat-option",23),n.Rb(),n.Rb(),n.Rb()}if(2&e){const e=n.ec(2);n.Bb(4),n.jc("ngModel",e.allScatterSubmod),n.Bb(1),n.jc("ngForOf",e.allScatterSubmod)}}function Xe(e,t){if(1&e&&(n.Sb(0,"mat-radio-button",30),n.Bc(1),n.Rb()),2&e){const e=t.$implicit;n.jc("value",e),n.Bb(1),n.Dc(" ",e," ")}}function Je(e,t){if(1&e){const e=n.Tb();n.Sb(0,"div",40),n.Sb(1,"div"),n.Sb(2,"mat-radio-group",21),n.ac("change",(function(t){return n.rc(e),n.ec(2).updateBarSubmod(t.value)}))("ngModelChange",(function(t){return n.rc(e),n.ec(2).selectedBarSubmod=t})),n.Sb(3,"div",22),n.Ac(4,Xe,2,2,"mat-radio-button",23),n.Rb(),n.Rb(),n.Rb(),n.Sb(5,"div",19),n.Sb(6,"div",41),n.Sb(7,"span"),n.Bc(8,"Gap bar"),n.Rb(),n.Sb(9,"mat-slider",42),n.ac("change",(function(t){return n.rc(e),n.ec(2).updateBarGap(t.value,"gap")}))("ngModelChange",(function(t){return n.rc(e),n.ec(2).selectedGap=t})),n.Rb(),n.Rb(),n.Sb(10,"div",41),n.Sb(11,"span"),n.Bc(12,"Gap bar groupe"),n.Rb(),n.Sb(13,"mat-slider",42),n.ac("change",(function(t){return n.rc(e),n.ec(2).updateBarGap(t.value,"gapGroup")}))("ngModelChange",(function(t){return n.rc(e),n.ec(2).selectedGapGroup=t})),n.Rb(),n.Rb(),n.Rb(),n.Rb()}if(2&e){const e=n.ec(2);n.Bb(2),n.jc("ngModel",e.selectedBarSubmod),n.Bb(2),n.jc("ngForOf",e.allBarSubmob),n.Bb(5),n.jc("ngModel",e.selectedGap),n.Bb(4),n.jc("ngModel",e.selectedGapGroup)}}function Ke(e,t){if(1&e){const e=n.Tb();n.Sb(0,"div",17),n.Sb(1,"div",18),n.Sb(2,"h1"),n.Bc(3," Param\xe8tres "),n.Rb(),n.Rb(),n.Sb(4,"div",19),n.Sb(5,"div",18),n.Sb(6,"h3"),n.Bc(7," Granularit\xe9 Carte "),n.Rb(),n.Rb(),n.Sb(8,"div",20),n.Sb(9,"mat-radio-group",21),n.ac("change",(function(){return n.rc(e),n.ec().updateFiltredData()}))("ngModelChange",(function(t){return n.rc(e),n.ec().currentGranulariteCarte=t})),n.Sb(10,"div",22),n.Ac(11,Ae,2,2,"mat-radio-button",23),n.Rb(),n.Rb(),n.Ac(12,Pe,5,2,"div",7),n.Ac(13,ke,3,2,"div",7),n.Ac(14,Ne,3,2,"div",7),n.Rb(),n.Rb(),n.Ob(15,"mat-divider"),n.Sb(16,"div",19),n.Sb(17,"div",18),n.Sb(18,"h3"),n.Bc(19," Choix Date "),n.Rb(),n.Rb(),n.Sb(20,"div",20),n.Sb(21,"mat-slide-toggle",24),n.ac("change",(function(t){return n.rc(e),n.ec().updateDateContener(t.checked)})),n.Bc(22," Date Unique "),n.Rb(),n.Rb(),n.Ac(23,_e,6,5,"div",25),n.Ac(24,ze,15,10,"div",25),n.Rb(),n.Ob(25,"mat-divider"),n.Sb(26,"div",19),n.Sb(27,"div",18),n.Sb(28,"h3"),n.Bc(29," Granularit\xe9 Graphique "),n.Rb(),n.Rb(),n.Sb(30,"div",26),n.Sb(31,"mat-slide-toggle",24),n.ac("change",(function(t){return n.rc(e),n.ec().updateGraphiqueContener(t.checked)})),n.Bc(32," Graphique global "),n.Rb(),n.Sb(33,"mat-form-field",27),n.Sb(34,"mat-label"),n.Bc(35,"Liste graphique"),n.Rb(),n.Sb(36,"mat-select",28),n.ac("selectionChange",(function(t){return n.rc(e),n.ec().updateNumberOfGraphique(t.value)})),n.Ac(37,Ye,2,2,"mat-option",23),n.Rb(),n.Rb(),n.Rb(),n.Rb(),n.Ob(38,"mat-divider"),n.Sb(39,"div",19),n.Sb(40,"div",18),n.Sb(41,"h3"),n.Bc(42," Graphique Type "),n.Rb(),n.Rb(),n.Sb(43,"div",20),n.Sb(44,"mat-radio-group",21),n.ac("change",(function(t){return n.rc(e),n.ec().updateGraphicType(t.value)}))("ngModelChange",(function(t){return n.rc(e),n.ec().selectedPlotType=t})),n.Sb(45,"div",22),n.Ac(46,Ue,2,2,"mat-radio-button",23),n.Rb(),n.Rb(),n.Rb(),n.Rb(),n.Ob(47,"mat-divider"),n.Sb(48,"div",19),n.Sb(49,"div",18),n.Sb(50,"h3"),n.Bc(51," Customization "),n.Rb(),n.Rb(),n.Ac(52,Ze,6,2,"div",25),n.Ac(53,Je,14,4,"div",29),n.Rb(),n.Rb()}if(2&e){const e=n.ec();n.Bb(9),n.jc("ngModel",e.currentGranulariteCarte),n.Bb(2),n.jc("ngForOf",e.allMapviewType),n.Bb(1),n.jc("ngIf",e.currentGranulariteCarte===e.aliasGranuCarte.PAYS),n.Bb(1),n.jc("ngIf",e.currentGranulariteCarte===e.aliasGranuCarte.REGION),n.Bb(1),n.jc("ngIf",e.currentGranulariteCarte===e.aliasGranuCarte.DEPARTEMENT),n.Bb(7),n.jc("checked",e.uniqueDate),n.Bb(2),n.jc("ngIf",e.uniqueDate),n.Bb(1),n.jc("ngIf",!e.uniqueDate),n.Bb(7),n.jc("checked",e.uniqueGraphique),n.Bb(5),n.jc("disabled",e.uniqueGraphique),n.Bb(1),n.jc("ngForOf",e.listTypeGraph),n.Bb(7),n.jc("ngModel",e.selectedPlotType),n.Bb(2),n.jc("ngForOf",e.listPlotType),n.Bb(6),n.jc("ngIf",e.selectedPlotType===e.aliasPlotType.SCATTER),n.Bb(1),n.jc("ngIf",e.selectedPlotType===e.aliasPlotType.BAR)}}function Qe(e,t){1&e&&(n.Sb(0,"mat-icon"),n.Bc(1," keyboard_arrow_left "),n.Rb())}function We(e,t){1&e&&(n.Sb(0,"mat-icon"),n.Bc(1," keyboard_arrow_right "),n.Rb())}const et=function(){return{width:"100%",height:"100%"}};function tt(e,t){if(1&e&&(n.Sb(0,"div",43),n.Ob(1,"plotly-plot",44),n.Rb()),2&e){const e=t.$implicit;n.Bb(1),n.xc(n.kc(6,et)),n.jc("useResizeHandler",!0)("data",e.data)("config",e.config)("layout",e.layout)}}const at=function(e){return{bottom:!1,right:e,top:!1,left:!1}};let it=300;const rt=[{path:"",component:s,children:[{path:"",redirectTo:"graphique",pathMatch:"full"},{path:"carte",component:ue},{path:"graphique",component:(()=>{class e{constructor(e){this.http=e,this.aliasGranuCarte=p,this.aliasPlotType=ye.a,this.allCountry=me,this.allRegion=De,this.allDepartemental=Re,this.currentGranulariteCarte=p.PAYS,this.allMapviewType=[p.PAYS,p.REGION,p.DEPARTEMENT],this.isOpenSidebar=!0,this.widthSidebar=it,this.uniqueDate=!0,this.listTypeGraph=[u.a.ACTIVE,u.a.CONFIRMED,u.a.DEATH,u.a.HOSPITALIZED,u.a.REANIMATED,u.a.RECOVERED,u.a.RECOVERY_RATE,u.a.MORTALITY_RATE],this.selectedPlotType=ye.a.BAR,this.listPlotType=[ye.a.BAR,ye.a.SCATTER],this.allGraphics=[],this.nbEntree=0,this.allData=[],this.uniqueGraphique=!0,this.selectedSpecificGraphicsList=[],this.allBarSubmob=[fe.a.GROUP,fe.a.STACK],this.selectedBarSubmod=fe.a.GROUP,this.allScatterSubmod=[Ce.a.LINES,Ce.a.MARKERS],this.selectedScatterSubmod="",this.selectedGap=.1,this.selectedGapGroup=.1,this.selectedUniqueCountry=me[0],this.selectedUniqueRegion=De[0],this.selectedUniqueDepartemental=Re[0],this.selectedMultipleRegion=[De[0]],this.selectedMultipleDepartemental=[Re[0]],this.allDepartemental.sort((e,t)=>e.codeTypeCarte.localeCompare(t.codeTypeCarte)),this.allRegion.sort((e,t)=>e.codeTypeCarte.localeCompare(t.codeTypeCarte)),this.initializeGlobalGraphics(),this.loadData()}updateBarGap(e,t){switch(t){case"gap":this.selectedGap=e,this.allGraphics.forEach(e=>{e.layout.bargap=this.selectedGap});break;case"gapGroup":this.selectedGapGroup=e,this.allGraphics.forEach(e=>{e.layout.bargroupgap=this.selectedGapGroup})}}updateGraphAfterGranularityChange(){this.updateFiltredData()}updateGraphicType(e){this.selectedPlotType=e,this.allGraphics.forEach(e=>{e.data.forEach(e=>{e.type=this.selectedPlotType.toLowerCase()})})}updateBarSubmod(e){this.selectedBarSubmod=e,this.allGraphics.forEach(e=>{e.layout.barmode=this.selectedBarSubmod.toLowerCase()})}updateScatterSubmod(e){this.selectedScatterSubmod="";let t=1;e.forEach(a=>{this.selectedScatterSubmod+=a.toLowerCase(),t<e.length&&(this.selectedScatterSubmod+="+"),t++}),this.allGraphics.forEach(e=>{e.data.forEach(e=>{e.mode=this.selectedScatterSubmod})})}updateNumberOfGraphique(e){this.selectedSpecificGraphicsList=e,this.redrawSpecificGraphicsList()}redrawSpecificGraphicsList(){this.deleteAllGraphics(),this.selectedSpecificGraphicsList.forEach(e=>{this.addGraphics("Graphique "+e,[],[],e)}),Object(b.h)(),this.updateFiltredData()}initializeGlobalGraphics(){this.deleteAllGraphics(),this.addGraphics("Graphique Global",[],[],u.a.GLOBAL),Object(b.h)()}addGraphics(e,t,a,i){const r=[];r.push({x:t,y:a,type:this.selectedPlotType,mode:this.selectedScatterSubmod});const n={data:r,config:{responsive:!0},layout:{title:e,autosize:!0,bargap:this.selectedGap,bargroupgap:this.selectedGapGroup,barmode:this.selectedBarSubmod.toLowerCase()},typeGraphic:i};this.allGraphics.push(n)}onResizeEnd(e){it=e.rectangle.width,this.widthSidebar=e.rectangle.width,Object(b.h)()}validate(e){return!(e.rectangle.width&&e.rectangle.width<300)}updateDateContener(e){this.uniqueDate=e,this.updateFiltredData()}updateGraphiqueContener(e){this.uniqueGraphique=e,this.uniqueGraphique?(this.initializeGlobalGraphics(),this.updateFiltredData()):this.selectedSpecificGraphicsList.length?this.redrawSpecificGraphicsList():this.deleteAllGraphics(),this.updateFiltredData()}updateDateCurrentMin(e){this.selectedDateMin=e,this.updateFiltredData()}updateDateCurrentMax(e){this.selectedDateMax=e,this.updateFiltredData()}updateDate(e){this.currentDate=e,this.updateFiltredData()}updateFiltredData(){switch(this.cleanAllDataGraph(),this.currentGranulariteCarte){case p.PAYS:this.filtredData.forEach(this.uniqueDate?e=>{e.getCodeTypeCarte()===this.selectedUniqueCountry.codeTypeCarte&&Object(b.j)(e.getDate(),this.currentDate)&&this.addRow(e)}:e=>{e.getCodeTypeCarte()===this.selectedUniqueCountry.codeTypeCarte&&Object(b.i)(e.getDate(),this.selectedDateMin,this.selectedDateMax)&&this.addRow(e)});break;case p.REGION:this.filtredData.forEach(this.uniqueDate?this.uniqueGraphique?e=>{this.selectedUniqueRegion.codeTypeCarte===e.getCodeTypeCarte()&&Object(b.j)(e.getDate(),this.currentDate)&&(this.uniqueGraphique?this.addRow(e):this.addRowMultipleDate(e))}:e=>{this.selectedMultipleRegion.forEach(t=>{t.codeTypeCarte===e.getCodeTypeCarte()&&Object(b.j)(e.getDate(),this.currentDate)&&(this.uniqueGraphique?this.addRow(e):this.addRowMultipleDate(e))})}:this.uniqueGraphique?e=>{this.selectedUniqueRegion.codeTypeCarte===e.getCodeTypeCarte()&&Object(b.i)(e.getDate(),this.selectedDateMin,this.selectedDateMax)&&(this.uniqueGraphique?this.addRow(e):this.addRowMultipleDate(e))}:e=>{this.selectedMultipleRegion.forEach(t=>{t.codeTypeCarte===e.getCodeTypeCarte()&&Object(b.i)(e.getDate(),this.selectedDateMin,this.selectedDateMax)&&(this.uniqueGraphique?this.addRow(e):this.addRowMultipleDate(e))})});break;case p.DEPARTEMENT:this.filtredData.forEach(this.uniqueDate?this.uniqueGraphique?e=>{this.selectedUniqueDepartemental.codeTypeCarte===e.getCodeTypeCarte()&&Object(b.j)(e.getDate(),this.currentDate)&&(this.uniqueGraphique?this.addRow(e):this.addRowMultipleDate(e))}:e=>{this.selectedMultipleDepartemental.forEach(t=>{t.codeTypeCarte===e.getCodeTypeCarte()&&Object(b.j)(e.getDate(),this.currentDate)&&(this.uniqueGraphique?this.addRow(e):this.addRowMultipleDate(e))})}:this.uniqueGraphique?e=>{this.selectedUniqueDepartemental.codeTypeCarte===e.getCodeTypeCarte()&&Object(b.i)(e.getDate(),this.selectedDateMin,this.selectedDateMax)&&(this.uniqueGraphique?this.addRow(e):this.addRowMultipleDate(e))}:e=>{this.selectedMultipleDepartemental.forEach(t=>{t.codeTypeCarte===e.getCodeTypeCarte()&&Object(b.i)(e.getDate(),this.selectedDateMin,this.selectedDateMax)&&(this.uniqueGraphique?this.addRow(e):this.addRowMultipleDate(e))})})}}addRowMultipleDate(e){const t=e.getDate().getDate()+"-"+e.getDate().getMonth()+"-"+e.getDate().getFullYear();this.allGraphics.forEach(a=>{let i;switch(i=!(a.data.length>0),a.typeGraphic){case u.a.ACTIVE:if(0===a.data.length)a.data.push({x:[t],y:[e.getActif()],name:e.getLibeleTypeCarte(),type:this.selectedPlotType.toLowerCase(),legendgroup:e.getLibeleTypeCarte(),showlegend:!0,mode:this.selectedScatterSubmod});else{let i=!1;a.data.forEach(a=>{a.name!==e.getLibeleTypeCarte()||i||(i=!0,a.x.push(t),a.y.push(e.getActif()))}),i||a.data.push({x:[t],y:[e.getActif()],name:e.getLibeleTypeCarte(),type:this.selectedPlotType.toLowerCase(),legendgroup:e.getLibeleTypeCarte(),showlegend:!0,mode:this.selectedScatterSubmod})}break;case u.a.CONFIRMED:if(0===a.data.length)a.data.push({x:[t],y:[e.getCasConfirme()],name:e.getLibeleTypeCarte(),type:this.selectedPlotType.toLowerCase(),legendgroup:e.getLibeleTypeCarte(),showlegend:!0,mode:this.selectedScatterSubmod});else{let i=!1;a.data.forEach(a=>{a.name!==e.getLibeleTypeCarte()||i||(i=!0,a.x.push(t),a.y.push(e.getCasConfirme()))}),i||a.data.push({x:[t],y:[e.getCasConfirme()],name:e.getLibeleTypeCarte(),type:this.selectedPlotType.toLowerCase(),legendgroup:e.getLibeleTypeCarte(),showlegend:!0,mode:this.selectedScatterSubmod})}break;case u.a.DEATH:if(0===a.data.length)a.data.push({x:[t],y:[e.getDeces()],name:e.getLibeleTypeCarte(),type:this.selectedPlotType.toLowerCase(),legendgroup:e.getLibeleTypeCarte(),showlegend:!0,mode:this.selectedScatterSubmod});else{let i=!1;a.data.forEach(a=>{a.name!==e.getLibeleTypeCarte()||i||(i=!0,a.x.push(t),a.y.push(e.getDeces()))}),i||a.data.push({x:[t],y:[e.getDeces()],name:e.getLibeleTypeCarte(),type:this.selectedPlotType.toLowerCase(),legendgroup:e.getLibeleTypeCarte(),showlegend:!0,mode:this.selectedScatterSubmod})}break;case u.a.HOSPITALIZED:if(0===a.data.length)a.data.push({x:[t],y:[e.getHospitalise()],name:e.getLibeleTypeCarte(),type:this.selectedPlotType.toLowerCase(),legendgroup:e.getLibeleTypeCarte(),showlegend:!0,mode:this.selectedScatterSubmod});else{let i=!1;a.data.forEach(a=>{a.name!==e.getLibeleTypeCarte()||i||(i=!0,a.x.push(t),a.y.push(e.getHospitalise()))}),i||a.data.push({x:[t],y:[e.getHospitalise()],name:e.getLibeleTypeCarte(),type:this.selectedPlotType.toLowerCase(),legendgroup:e.getLibeleTypeCarte(),showlegend:!0,mode:this.selectedScatterSubmod})}break;case u.a.REANIMATED:if(0===a.data.length)a.data.push({x:[t],y:[e.getReanimation()],name:e.getLibeleTypeCarte(),type:this.selectedPlotType.toLowerCase(),legendgroup:e.getLibeleTypeCarte(),showlegend:!0,mode:this.selectedScatterSubmod});else{let i=!1;a.data.forEach(a=>{a.name!==e.getLibeleTypeCarte()||i||(i=!0,a.x.push(t),a.y.push(e.getReanimation()))}),i||a.data.push({x:[t],y:[e.getReanimation()],name:e.getLibeleTypeCarte(),type:this.selectedPlotType.toLowerCase(),legendgroup:e.getLibeleTypeCarte(),showlegend:!0,mode:this.selectedScatterSubmod})}break;case u.a.RECOVERED:if(0===a.data.length)a.data.push({x:[t],y:[e.getGueris()],name:e.getLibeleTypeCarte(),type:this.selectedPlotType.toLowerCase(),legendgroup:e.getLibeleTypeCarte(),showlegend:!0,mode:this.selectedScatterSubmod});else{let i=!1;a.data.forEach(a=>{a.name!==e.getLibeleTypeCarte()||i||(i=!0,a.x.push(t),a.y.push(e.getGueris()))}),i||a.data.push({x:[t],y:[e.getGueris()],name:e.getLibeleTypeCarte(),type:this.selectedPlotType.toLowerCase(),legendgroup:e.getLibeleTypeCarte(),showlegend:!0,mode:this.selectedScatterSubmod})}break;case u.a.MORTALITY_RATE:if(0===a.data.length)a.data.push({x:[t],y:[e.getMortalityRate()],name:e.getLibeleTypeCarte(),type:this.selectedPlotType.toLowerCase(),legendgroup:e.getLibeleTypeCarte(),showlegend:!0,mode:this.selectedScatterSubmod});else{let i=!1;a.data.forEach(a=>{a.name!==e.getLibeleTypeCarte()||i||(i=!0,a.x.push(t),a.y.push(e.getMortalityRate()))}),i||a.data.push({x:[t],y:[e.getMortalityRate()],name:e.getLibeleTypeCarte(),type:this.selectedPlotType.toLowerCase(),legendgroup:e.getLibeleTypeCarte(),showlegend:!0,mode:this.selectedScatterSubmod})}break;case u.a.RECOVERY_RATE:if(0===a.data.length)a.data.push({x:[t],y:[e.getRecoveryRate()],name:e.getLibeleTypeCarte(),type:this.selectedPlotType.toLowerCase(),legendgroup:e.getLibeleTypeCarte(),showlegend:!0,mode:this.selectedScatterSubmod});else{let i=!1;a.data.forEach(a=>{a.name!==e.getLibeleTypeCarte()||i||(i=!0,a.x.push(t),a.y.push(e.getRecoveryRate()))}),i||a.data.push({x:[t],y:[e.getRecoveryRate()],name:e.getLibeleTypeCarte(),type:this.selectedPlotType.toLowerCase(),legendgroup:e.getLibeleTypeCarte(),showlegend:!0,mode:this.selectedScatterSubmod})}}})}loadData(){this.http.get(b.a,{responseType:"text"}).subscribe(e=>{this.parseXmlFile(e)})}parseXmlFile(e){e.split("\n").forEach(e=>{if(e.length&&""!==e){const t=e.split(",");0===this.nbEntree||(this.allData.push(new he(new Date(t[0]),p[t[1].toUpperCase()],t[2],t[3],Number(t[4]),Number(t[5]),Number(t[6]),Number(t[7]),Number(t[8]),Number(t[9]),Number(t[10]),Number(t[11]))),void 0===this.maxDate&&(this.maxDate=new Date(t[0])),void 0===this.minDate&&(this.minDate=new Date(t[0])),new Date(t[0]).getTime()>this.maxDate.getTime()&&(this.maxDate=new Date(t[0])),new Date(t[0]).getTime()<this.minDate.getTime()&&(this.minDate=new Date(t[0]))),this.nbEntree++}}),this.selectedDateMax=new Date(this.maxDate);const t=new Date(this.selectedDateMax);t.setDate(t.getDate()-1),this.selectedDateMin=t,this.currentDate=new Date(this.maxDate),this.filtredData=ge(this.allData),this.updateFiltredData()}addRow(e){const t=e.getDate().getDate()+"-"+e.getDate().getMonth()+"-"+e.getDate().getFullYear();this.allGraphics.forEach(a=>{let i;switch(i=!(a.data.length>0),a.typeGraphic){case u.a.GLOBAL:0===a.data.length?(a.data.push({x:[t],y:[e.getDeces()],type:this.selectedPlotType.toLowerCase(),name:Te.a.DEATH,marker:{color:"red"},legendgroup:"D\xe9c\xe9s",showlegend:i,mode:this.selectedScatterSubmod}),a.data.push({x:[t],y:[e.getCasConfirme()],type:this.selectedPlotType.toLowerCase(),name:Te.a.CONFIRMED,marker:{color:"grey"},legendgroup:"Confirm\xe9s",showlegend:i,mode:this.selectedScatterSubmod}),a.data.push({x:[t],y:[e.getReanimation()],type:this.selectedPlotType.toLowerCase(),name:Te.a.REANIMATED,marker:{color:"orange"},legendgroup:"R\xe9anim\xe9s",showlegend:i,mode:this.selectedScatterSubmod}),a.data.push({x:[t],y:[e.getHospitalise()],type:this.selectedPlotType.toLowerCase(),name:Te.a.HOSPITALIZED,marker:{color:"yellow"},legendgroup:"Hospitalis\xe9s",showlegend:i,mode:this.selectedScatterSubmod}),a.data.push({x:[t],y:[e.getGueris()],type:this.selectedPlotType.toLowerCase(),name:Te.a.RECOVERED,marker:{color:"green"},legendgroup:"Gu\xe9rris",showlegend:i,mode:this.selectedScatterSubmod}),a.data.push({x:[t],y:[e.getActif()],type:this.selectedPlotType.toLowerCase(),name:Te.a.ACTIVE,marker:{color:"blue"},legendgroup:"Actifs",showlegend:i,mode:this.selectedScatterSubmod})):a.data.forEach(a=>{switch(a.name){case Te.a.ACTIVE:a.x.push(t),a.y.push(e.getActif());break;case Te.a.DEATH:a.x.push(t),a.y.push(e.getDeces());break;case Te.a.REANIMATED:a.x.push(t),a.y.push(e.getReanimation());break;case Te.a.RECOVERED:a.x.push(t),a.y.push(e.getGueris());break;case Te.a.HOSPITALIZED:a.x.push(t),a.y.push(e.getHospitalise());break;case Te.a.CONFIRMED:a.x.push(t),a.y.push(e.getCasConfirme())}});break;case u.a.ACTIVE:a.data.push({x:[t],y:[e.getActif()],name:Te.a.ACTIVE,type:this.selectedPlotType.toLowerCase(),marker:{color:"blue"},legendgroup:"Actifs",showlegend:i,mode:this.selectedScatterSubmod});break;case u.a.CONFIRMED:a.data.push({x:[t],y:[e.getCasConfirme()],name:Te.a.CONFIRMED,type:this.selectedPlotType.toLowerCase(),marker:{color:"grey"},legendgroup:"Confirm\xe9s",showlegend:i,mode:this.selectedScatterSubmod});break;case u.a.DEATH:a.data.push({x:[t],y:[e.getDeces()],type:this.selectedPlotType.toLowerCase(),name:Te.a.DEATH,marker:{color:"red"},legendgroup:"D\xe9c\xe9s",showlegend:i,mode:this.selectedScatterSubmod});break;case u.a.HOSPITALIZED:a.data.push({x:[t],y:[e.getHospitalise()],name:Te.a.HOSPITALIZED,type:this.selectedPlotType.toLowerCase(),marker:{color:"yellow"},legendgroup:"Hospitalis\xe9s",showlegend:i,mode:this.selectedScatterSubmod});break;case u.a.REANIMATED:a.data.push({x:[t],y:[e.getReanimation()],name:Te.a.REANIMATED,type:this.selectedPlotType.toLowerCase(),marker:{color:"orange"},legendgroup:"R\xe9anim\xe9s",showlegend:i,mode:this.selectedScatterSubmod});break;case u.a.RECOVERED:a.data.push({x:[t],y:[e.getGueris()],name:Te.a.RECOVERED,type:this.selectedPlotType.toLowerCase(),marker:{color:"green"},legendgroup:"Gu\xe9rris",showlegend:i,mode:this.selectedScatterSubmod});break;case u.a.MORTALITY_RATE:a.data.push({x:[t],y:[e.getMortalityRate()],name:Te.a.RECOVERED,type:this.selectedPlotType.toLowerCase(),marker:{color:"purple"},legendgroup:"Taux de mortalit\xe9",showlegend:i,mode:this.selectedScatterSubmod});break;case u.a.RECOVERY_RATE:a.data.push({x:[t],y:[e.getRecoveryRate()],name:Te.a.RECOVERED,type:this.selectedPlotType.toLowerCase(),marker:{color:"pink"},legendgroup:"Taux de soign\xe9s",showlegend:i,mode:this.selectedScatterSubmod})}})}toggleSidebar(){this.isOpenSidebar=!this.isOpenSidebar,this.widthSidebar=this.isOpenSidebar?it:30,Object(b.h)()}cleanAllDataGraph(){this.allGraphics.forEach(e=>{e.data=[]})}deleteAllGraphics(){this.allGraphics=[]}ngOnInit(){}}return e.\u0275fac=function(t){return new(t||e)(n.Nb(g.a))},e.\u0275cmp=n.Hb({type:e,selectors:[["app-graphique"]],decls:22,vars:11,consts:[["fxFlexFill","","fxLayout","row","fxLayoutAlign","center",1,"mainContener"],["mwlResizable","","resizeCursorPrecision","5",3,"enableGhostResize","resizeEdges","validateResize","resizeEnd"],["fxFlex","","fxLayout","row","fxLayoutAlign","space-between"],["fxFlex","","fxLayout","column","fxLayoutGap","20px","class","scrollable",4,"ngIf"],["fxLayout","row","fxFlex","30px"],["fxFlex","","fxLayoutAlign","center"],["fxFlex","","mat-button","",1,"buttonSidebarClose","icon",3,"click"],[4,"ngIf"],["fxFlex","2px",1,"dividerSidebar"],["fxFlex",""],["fxLayout","column","fxFlex","",4,"ngFor","ngForOf"],[1,"floatingButtonContener"],["direction","up","animationMode","fling"],["spin","true"],["matTooltipPosition","left","mat-fab","","matTooltip","Param\xe8tres"],[1,"spin360"],["matTooltipPosition","left","matTooltip","Ouvrir menu param\xe8tres","mat-mini-fab","",3,"click"],["fxFlex","","fxLayout","column","fxLayoutGap","20px",1,"scrollable"],["fxLayout","row","fxLayoutAlign","center"],["fxLayout","column"],[1,"contentTemplate"],[3,"ngModel","change","ngModelChange"],["fxLayout","column","fxLayoutGap","5px"],[3,"value",4,"ngFor","ngForOf"],[3,"checked","change"],["class","contentTemplate",4,"ngIf"],["fxLayout","column","fxLayoutGap","5px",1,"contentTemplate"],[1,"dateInput"],["multiple","",3,"disabled","selectionChange"],["class","contentTemplate","fxLayout","column","fxLayoutGap","10px",4,"ngIf"],[3,"value"],[3,"value","valueChange"],["multiple","",3,"value","selectionChange","valueChange"],[3,"value","selectionChange","valueChange"],["matInput","",3,"value","min","max","matDatepicker","dateChange"],["matSuffix","",3,"for"],["picker",""],["pickerCurrentMin",""],["pickerCurrentMax",""],["multiple","",3,"ngModel","selectionChange"],["fxLayout","column","fxLayoutGap","10px",1,"contentTemplate"],["fxLayout","row","fxLayoutAlign","space-between center"],["max","1","min","0","step","0.1","thumbLabel","true",3,"ngModel","change","ngModelChange"],["fxLayout","column","fxFlex",""],["fxFlex","",3,"useResizeHandler","data","config","layout"]],template:function(e,t){1&e&&(n.Sb(0,"div",0),n.Sb(1,"div",1),n.ac("resizeEnd",(function(e){return t.onResizeEnd(e)})),n.Sb(2,"div",2),n.Ac(3,Ke,54,15,"div",3),n.Sb(4,"div",4),n.Sb(5,"div",5),n.Sb(6,"button",6),n.ac("click",(function(){return t.toggleSidebar()})),n.Ac(7,Qe,2,0,"mat-icon",7),n.Ac(8,We,2,0,"mat-icon",7),n.Rb(),n.Rb(),n.Ob(9,"div",8),n.Rb(),n.Rb(),n.Rb(),n.Sb(10,"div",9),n.Ac(11,tt,2,7,"div",10),n.Rb(),n.Rb(),n.Sb(12,"div",11),n.Sb(13,"floating-button",12),n.Sb(14,"floating-button-trigger",13),n.Sb(15,"button",14),n.Sb(16,"mat-icon",15),n.Bc(17,"menu"),n.Rb(),n.Rb(),n.Rb(),n.Sb(18,"floating-button-action"),n.Sb(19,"button",16),n.ac("click",(function(){return t.toggleSidebar()})),n.Sb(20,"mat-icon"),n.Bc(21,"build"),n.Rb(),n.Rb(),n.Rb(),n.Rb(),n.Rb()),2&e&&(n.Bb(1),n.zc("width",t.widthSidebar+"px"),n.jc("enableGhostResize",!0)("resizeEdges",n.lc(9,at,t.isOpenSidebar))("validateResize",t.validate),n.Bb(2),n.jc("ngIf",t.isOpenSidebar),n.Bb(4),n.jc("ngIf",t.isOpenSidebar),n.Bb(1),n.jc("ngIf",!t.isOpenSidebar),n.Bb(3),n.jc("ngForOf",t.allGraphics))},directives:[o.f,o.d,o.c,y.a,o.b,i.k,f.a,i.j,Se.a,Ee.a,ve.a,x.a,Le.a,o.e,m.b,D.g,D.i,T.a,xe.a,R.b,R.e,S.a,m.a,L.k,E.b,v.b,v.d,R.f,v.a,Me.a,Be.a],styles:[".dividerSidebar[_ngcontent-%COMP%]{background-color:#323233}.icon[_ngcontent-%COMP%]:hover{color:#ec407a}.icon[_ngcontent-%COMP%]{color:#f48fb1}mwlResizable[_ngcontent-%COMP%]{box-sizing:border-box}.floatingButtonContener[_ngcontent-%COMP%]{position:fixed;bottom:40px;right:20px}.buttonSidebarClose[_ngcontent-%COMP%]{padding:0;width:20px;min-width:0}.contentTemplate[_ngcontent-%COMP%]{padding-left:10px}.titleTemplate[_ngcontent-%COMP%]{padding-left:5px}.dateInput[_ngcontent-%COMP%]{width:150px}.scrollable[_ngcontent-%COMP%]{overflow:auto}"]}),e})()}]}];let nt=(()=>{class e{}return e.\u0275mod=n.Lb({type:e}),e.\u0275inj=n.Kb({factory:function(t){return new(t||e)},imports:[[r.e.forChild(rt)],r.e]}),e})();var ot=a("95T3"),ct=a("YUcS"),lt=a("j+7c"),st=a("XhcP"),dt=a("bSwM"),pt=a("Xa2L");a.d(t,"FranceModule",(function(){return bt})),Be.b.plotlyjs=ot;let bt=(()=>{class e{}return e.\u0275mod=n.Lb({type:e}),e.\u0275inj=n.Kb({factory:function(t){return new(t||e)},providers:[v.c],imports:[[i.c,nt,Be.b,c.c,f.b,x.b,ct.a,lt.a,m.c,D.c,T.b,st.a,y.b,ve.b,dt.a,v.c,E.c,R.d,L.i,xe.b,S.b,D.j,Me.b,pt.a,C.c]]}),e})()}}]);