(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-36a83e78"],{"1d7a":function(t,e,a){},"2f54":function(t,e,a){"use strict";a.r(e),a.d(e,"findLineByLeastSquares",(function(){return n})),a.d(e,"getSlope",(function(){return r})),a.d(e,"niceNumber",(function(){return c})),a.d(e,"getCorrelation",(function(){return o})),a.d(e,"getSignificance",(function(){return l}));a("4160"),a("13d5"),a("a9e3"),a("b64b"),a("d3b7"),a("ac1f"),a("25f0"),a("5319"),a("159b");var s=a("2909");function n(t,e){var a=0,s=0,n=0,r=0,c=0,o=0,i=0,l=t.length;if(l!=e.length)throw new Error("The parameters xVals and yVals need to have same size!");if(0===l)return[[],[]];for(var d=0;d<l;d++)o=t[d],i=e[d],a+=o-0,s+=i-0,r+=o*o,n+=o*i,c++;var u=(c*n-a*s)/(c*r-a*a),f=s/c-u*a/c,h=[],p=[];for(d=0;d<l;d++)o=t[d],i=o*u+f,h.push(o),p.push(i);return[h,p]}function r(t,e){var a=new Number(0),s=new Number(0),n=0,r=0,c=0,o=0,i=0,l=0,d=t.length;if(d!=e.length)throw new Error("The parameters xVals and yVals need to have same size!");if(0===d)return[[],[]];for(var u=0;u<d;u++)i=t[u],l=e[u],a+=i-0,s+=l-0;c=a/d,o=s/d;for(u=0;u<d;u++)i=t[u],l=e[u],r+=(i-c)*(i-c),n+=(i-c)*(l-o);var f=n/r;return f}function c(t){return null==t?null:t.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}function o(t,e){var a,n=Math,r=new Array,c=new Array;c=e,t?r=t:Object.keys(c).forEach((function(t,e){r[e]=e+1}));for(var o=0;o<c.length;o++)c[o]=c[o]-0;a=c.length;var l,d,u,f,h,p,v=r[1],g=r[1],y=(c[1],c[1],0),_=0,m=0,b=0,C=0;v=n.min.apply(n,Object(s["a"])(r)),g=n.max.apply(n,Object(s["a"])(r)),n.min.apply(n,Object(s["a"])(c)),n.max.apply(n,Object(s["a"])(c));for(var j=0;j<a;j++)y+=r[j],_+=c[j],m+=r[j]*r[j],b+=c[j]*c[j],C+=r[j]*c[j];d=(_*m-C*y)/(a*m-y*y),l=(a*C-y*_)/(a*m-y*y),u=(a*C-y*_)/n.sqrt((a*m-y*y)*(a*b-_*_)),u*=u,f=n.round(1e4*d)/1e4,h=n.round(1e4*l)/1e4,p=n.round(1e4*u)/1e4;for(var T={},S=[],w=0;w<a;w++){var D=t[w],N=h*D+d;S.push(N)}return T.correlation=p,T.intercept=f,T.slope=h,T.xMax=g,T.xMin=v,T.yMax=Math.max.apply(Math,S),T.yMin=Math.min.apply(Math,S),T.yAvg=i(S),T.ctY=a,T.yValsCalc=S,T}Math.slope=function(t,e){if(!t){var a=1;t=[],Object.keys(e).forEach((function(e){return t.push((e-0+1)*a)}))}return r(t,e)};var i=function(t){return t.reduce((function(t,e){return t+e}),0)/t.length};function l(t,e){var a=Math,s=a.sqrt(t),n=e,r=s*a.sqrt((n-2)/(1-s*s)),c=t95[n-2],o=r;return{significance:o,critT:c}}},4678:function(t,e,a){var s={"./af":"2bfb","./af.js":"2bfb","./ar":"8e73","./ar-dz":"a356","./ar-dz.js":"a356","./ar-kw":"423e","./ar-kw.js":"423e","./ar-ly":"1cfd","./ar-ly.js":"1cfd","./ar-ma":"0a84","./ar-ma.js":"0a84","./ar-sa":"8230","./ar-sa.js":"8230","./ar-tn":"6d83","./ar-tn.js":"6d83","./ar.js":"8e73","./az":"485c","./az.js":"485c","./be":"1fc1","./be.js":"1fc1","./bg":"84aa","./bg.js":"84aa","./bm":"a7fa","./bm.js":"a7fa","./bn":"9043","./bn.js":"9043","./bo":"d26a","./bo.js":"d26a","./br":"6887","./br.js":"6887","./bs":"2554","./bs.js":"2554","./ca":"d716","./ca.js":"d716","./cs":"3c0d","./cs.js":"3c0d","./cv":"03ec","./cv.js":"03ec","./cy":"9797","./cy.js":"9797","./da":"0f14","./da.js":"0f14","./de":"b469","./de-at":"b3eb","./de-at.js":"b3eb","./de-ch":"bb71","./de-ch.js":"bb71","./de.js":"b469","./dv":"598a","./dv.js":"598a","./el":"8d47","./el.js":"8d47","./en-SG":"cdab","./en-SG.js":"cdab","./en-au":"0e6b","./en-au.js":"0e6b","./en-ca":"3886","./en-ca.js":"3886","./en-gb":"39a6","./en-gb.js":"39a6","./en-ie":"e1d3","./en-ie.js":"e1d3","./en-il":"7333","./en-il.js":"7333","./en-nz":"6f50","./en-nz.js":"6f50","./eo":"65db","./eo.js":"65db","./es":"898b","./es-do":"0a3c","./es-do.js":"0a3c","./es-us":"55c9","./es-us.js":"55c9","./es.js":"898b","./et":"ec18","./et.js":"ec18","./eu":"0ff2","./eu.js":"0ff2","./fa":"8df48","./fa.js":"8df48","./fi":"81e9","./fi.js":"81e9","./fo":"0721","./fo.js":"0721","./fr":"9f26","./fr-ca":"d9f8","./fr-ca.js":"d9f8","./fr-ch":"0e49","./fr-ch.js":"0e49","./fr.js":"9f26","./fy":"7118","./fy.js":"7118","./ga":"5120","./ga.js":"5120","./gd":"f6b46","./gd.js":"f6b46","./gl":"8840","./gl.js":"8840","./gom-latn":"0caa","./gom-latn.js":"0caa","./gu":"e0c5","./gu.js":"e0c5","./he":"c7aa","./he.js":"c7aa","./hi":"dc4d","./hi.js":"dc4d","./hr":"4ba9","./hr.js":"4ba9","./hu":"5b14","./hu.js":"5b14","./hy-am":"d6b6","./hy-am.js":"d6b6","./id":"5038","./id.js":"5038","./is":"0558","./is.js":"0558","./it":"6e98","./it-ch":"6f12","./it-ch.js":"6f12","./it.js":"6e98","./ja":"079e","./ja.js":"079e","./jv":"b540","./jv.js":"b540","./ka":"201b","./ka.js":"201b","./kk":"6d79","./kk.js":"6d79","./km":"e81d","./km.js":"e81d","./kn":"3e92","./kn.js":"3e92","./ko":"22f8","./ko.js":"22f8","./ku":"2421","./ku.js":"2421","./ky":"9609","./ky.js":"9609","./lb":"440c","./lb.js":"440c","./lo":"b29d","./lo.js":"b29d","./lt":"26f9","./lt.js":"26f9","./lv":"b97c","./lv.js":"b97c","./me":"293c","./me.js":"293c","./mi":"688b","./mi.js":"688b","./mk":"6909","./mk.js":"6909","./ml":"02fb","./ml.js":"02fb","./mn":"958b","./mn.js":"958b","./mr":"39bd","./mr.js":"39bd","./ms":"ebe4","./ms-my":"6403","./ms-my.js":"6403","./ms.js":"ebe4","./mt":"1b45","./mt.js":"1b45","./my":"8689","./my.js":"8689","./nb":"6ce3","./nb.js":"6ce3","./ne":"3a39","./ne.js":"3a39","./nl":"facd","./nl-be":"db29","./nl-be.js":"db29","./nl.js":"facd","./nn":"b84c","./nn.js":"b84c","./pa-in":"f3ff","./pa-in.js":"f3ff","./pl":"8d57","./pl.js":"8d57","./pt":"f260","./pt-br":"d2d4","./pt-br.js":"d2d4","./pt.js":"f260","./ro":"972c","./ro.js":"972c","./ru":"957c","./ru.js":"957c","./sd":"6784","./sd.js":"6784","./se":"ffff","./se.js":"ffff","./si":"eda5","./si.js":"eda5","./sk":"7be6","./sk.js":"7be6","./sl":"8155","./sl.js":"8155","./sq":"c8f3","./sq.js":"c8f3","./sr":"cf1e","./sr-cyrl":"13e9","./sr-cyrl.js":"13e9","./sr.js":"cf1e","./ss":"52bd","./ss.js":"52bd","./sv":"5fbd","./sv.js":"5fbd","./sw":"74dc","./sw.js":"74dc","./ta":"3de5","./ta.js":"3de5","./te":"5cbb","./te.js":"5cbb","./tet":"576c","./tet.js":"576c","./tg":"3b1b","./tg.js":"3b1b","./th":"10e8","./th.js":"10e8","./tl-ph":"0f38","./tl-ph.js":"0f38","./tlh":"cf75","./tlh.js":"cf75","./tr":"0e81","./tr.js":"0e81","./tzl":"cf51","./tzl.js":"cf51","./tzm":"c109","./tzm-latn":"b53d","./tzm-latn.js":"b53d","./tzm.js":"c109","./ug-cn":"6117","./ug-cn.js":"6117","./uk":"ada2","./uk.js":"ada2","./ur":"5294","./ur.js":"5294","./uz":"2e8c","./uz-latn":"010e","./uz-latn.js":"010e","./uz.js":"2e8c","./vi":"2921","./vi.js":"2921","./x-pseudo":"fd7e","./x-pseudo.js":"fd7e","./yo":"7f33","./yo.js":"7f33","./zh-cn":"5c3a","./zh-cn.js":"5c3a","./zh-hk":"49ab","./zh-hk.js":"49ab","./zh-tw":"90ea","./zh-tw.js":"90ea"};function n(t){var e=r(t);return a(e)}function r(t){if(!a.o(s,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return s[t]}n.keys=function(){return Object.keys(s)},n.resolve=r,t.exports=n,n.id="4678"},"6a5c":function(t,e,a){"use strict";var s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("transition",{attrs:{name:"fade"}},[t.flgDlg?a("div",{staticClass:"modal-mask"},[a("div",{staticClass:"modal-wrapper"},[a("div",{staticClass:"modal-container"},[a("div",{staticClass:"modal-header-jm"},[a("h3",[t._t("header")],2)]),a("div",{staticClass:"modal-body-jm"},[t._t("default",[a("div",{domProps:{innerHTML:t._s(t.dlgMsg)}})])],2),a("div",{staticClass:"modal-footer"},[t._t("footer",[a("div",[t.flgCheck(t.flgOK)?a("button",{staticClass:"btn btn-sm btn-primary",on:{click:function(e){return e.stopPropagation(),e.preventDefault(),t.handleOKClick(e)}}},[t._v("OK")]):t._e(),t.flgCheck(t.flgCancel)?a("button",{staticClass:"btn btn-sm btn-danger",on:{click:function(e){return e.stopPropagation(),e.preventDefault(),t.handleCancelClick(e)}}},[t._v("Cancel")]):t._e()])])],2)])])]):t._e()])},n=[],r={name:"jo-modal",data:function(){return{id:this.dlgID||null,flgDlg:this.flgShow,flgDebug:!0}},props:["dlgName","flgOK","flgCancel","pClickOK","pClickCancel","dlgMsg","dlgHeader","dlgID","flgShow"],watch:{flgShow:function(t){this.flgDlg=t}},beforeCreate:function(){},created:function(){},mounted:function(){},computed:{dlgCode:function(){var t=this.dlgName;return t}},methods:{flgCheck:function(t){return!("false"===t)},getDialogFlag:function(){},handleCancelClick:function(){this.pClickCancel&&this.pClickCancel(),this.$emit("cancel"),this._hideModal()},handleOKClick:function(){this.pClickOK&&this.pClickOK(),this.$emit("close"),this.$emit("ok"),this._hideModal()},_hideModal:function(){this.flgDlg=!1},_showModal:function(){this.flgDlg=!0}}},c=r,o=(a("f9c9"),a("2877")),i=Object(o["a"])(c,s,n,!1,null,null,null);e["a"]=i.exports},"78be":function(t,e,a){"use strict";var s=a("f5fd"),n=a.n(s);n.a},8326:function(t,e,a){},b7c8:function(t,e,a){"use strict";var s=a("d38a"),n=a.n(s);n.a},d026:function(t,e,a){"use strict";a.r(e),a.d(e,"yesNoArray",(function(){return s}));var s=[{label:"Yes",value:"yes"},{label:"No",value:"no"}]},d38a:function(t,e,a){},e83e:function(t,e,a){},f083:function(t,e,a){"use strict";a.d(e,"a",(function(){return s}));a("d81d"),a("b0c0"),a("ac1f"),a("1276"),a("498a");function s(t,e){e=void 0!=e?e:0;var a=t.split("\n"),s=[],n=a[0].split(",");return n.map((function(t,e){n[e]=t.trim()})),a.map((function(t,a){if(!(a<e)){var r={},c=t.split(",");n.map((function(t,e){r[t]=c[e]})),s.push(r)}})),s.pop(),s}},f1ed:function(t,e,a){"use strict";a.d(e,"a",(function(){return s}));a("4d63"),a("ac1f"),a("25f0"),a("5319"),a("841c"),a("f083");function s(t,e){return e.$http.get(t).then((function(t){var e=t.data;return e}))}},f222:function(t,e,a){"use strict";a.r(e);var s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{attrs:{id:"app"}},[a("div",[a("h3",[t._v("Open Yet?")]),a("p",[t._v(" Are we ready to open yet? The U.S. Federal government has come out with "),a("a",{attrs:{href:"https://www.whitehouse.gov/openingamerica/#criteria"}},[t._v("guidelines")]),t._v(" for determining when a region is ready to re-open. This site uses the key gating criteria from those guidelines to answer the question for given regions. See our "),a("router-link",{attrs:{to:{name:"docs-methodology"}}},[t._v("methodology and rationale here.")])],1)]),a("div",{attrs:{id:"div-controls"}},[a("div",{staticClass:"control",staticStyle:{width:"20rem"},attrs:{id:"cc"}},[a("label",{staticClass:"control-label"},[t._v("Country:")]),a("vue-select",{staticClass:"vs__search",staticStyle:{width:"100%"},attrs:{options:t.countries,placeholder:"-- Country --",label:"name"},model:{value:t.country,callback:function(e){t.country=e},expression:"country"}})],1),t.flgStates?a("div",{staticClass:"control",class:{disabled:!t.flgStates},staticStyle:{width:"20rem"},attrs:{id:"sc"}},[a("label",{staticClass:"control-label"},[t._v("State:")]),a("vue-select",{staticClass:"vs__search",class:{disabled:!t.flgStates},staticStyle:{width:"100%"},attrs:{name:"State-Selector",disabled:!t.flgStates,options:t.states,placeholder:"-- State --",label:"name"},model:{value:t.state,callback:function(e){t.state=e},expression:"state"}})],1):t._e(),t.state&&t.state.statecode?a("div",{staticClass:"control",class:{disabled:!t.flgCounties},staticStyle:{width:"20rem"},attrs:{id:"sc"}},[a("label",{staticClass:"control-label"},[t._v("County:")]),a("vue-select",{staticClass:"vs__search",class:{disabled:!t.flgCounties},staticStyle:{width:"100%"},attrs:{name:"County-Selector",disabled:!t.flgCounties,options:t.counties,placeholder:"-- County --",label:"county"},model:{value:t.county,callback:function(e){t.county=e},expression:"county"}})],1):t._e()]),t.oyStatus.overallStatus?a("div",{attrs:{id:"open-yet-main"}},[a("div",{staticClass:"flex-main",attrs:{id:"open-yet-breakdown"}},[a("h4",[t._v(" 2 Week Trend "),a("div",{staticClass:"status status-h4",class:t.oyStatus.overallStatus.code},[t._v(t._s(t.oyStatus.overallStatus.name))])]),a("b-tabs",{attrs:{"content-class":"mt-3"}},[a("b-tab",{attrs:{title:"summary",active:""}},[a("open-yet-summary",{attrs:{oyRec:t.oyRec,oyStatus:t.oyStatus}})],1),a("b-tab",{attrs:{title:"detail"}},[a("open-yet-detail2",{attrs:{oyRec:t.oyRec}})],1),a("b-tab",{attrs:{title:"graph"}},[a("open-yet-graph2",{attrs:{oyRec:t.oyRec}})],1)],1),a("div",{staticClass:"explanatory"},[t._v("Data last updated: "+t._s(t.oyRec.date))])],1),a("div",{staticClass:"flex-main",attrs:{id:"main-status"}},[a("div",{staticClass:"explanatory bold"},[t._v("Based on these metrics, the status for this country/region is:")]),a("div",{staticClass:"status",class:t.oyStatus.overallStatus.code,attrs:{id:"status-report"}},[t._v(t._s(t.oyStatus.overallStatus.name))]),a("MainStats",{attrs:{oyRec:t.oyRec}})],1)]):t._e(),a("jo-modal",{attrs:{id:t.dlgs.dlgAlert.id,flgShow:t.dlgs.dlgAlert.flg,flgCancel:"false"},on:{ok:function(e){return t.toggleDialog(t.dlgs.dlgAlert)},cancel:function(e){return t.toggleDialog(t.dlgs.dlgAlert)}}},[a("div",{domProps:{innerHTML:t._s(t.alertMsg)}})])],1)},n=[],r=(a("7db0"),a("4160"),a("fb6a"),a("a9e3"),a("b680"),a("b64b"),a("ac1f"),a("5319"),a("159b"),a("6a5c")),c=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("table",{staticClass:"data-detail"},[a("tr",[a("th"),a("th",{attrs:{colspan:"12"}},[t._v(" Trend (value/day) During This Period / Change from baseline value "),a("div",{staticClass:"explainer"},[t._v(" ( "),a("a",{class:{active:t.flgDeltaRate,inactive:t.flgDeltaPercent},attrs:{title:"Change in growth rate vs prior day"},on:{click:function(e){return t.toggleRateAndPercent(t.flgDeltaRate)}}},[a("i",{staticClass:"fas fa-caret-up large",class:{inactive:t.flgDeltaPercent}}),t._v(" growth rate ")]),t._v(" / "),a("a",{class:{active:t.flgDeltaPercent,inactive:t.flgDeltaRate},attrs:{title:"Percent change in value of this metric"},on:{click:function(e){return t.toggleRateAndPercent(t.flgDeltaPercent)}}},[a("i",{staticClass:"fas fa-percent small",class:{inactive:t.flgDeltaRate}}),t._v(" change in value ")]),t._v(") ")]),t._m(0)]),a("th",{attrs:{colspan:"3"}},[t._v("Overall Trend (change/day)")])]),a("tr",[a("th",[t._v("Measure")]),a("th",{attrs:{colspan:"4"}},[t._v("Baseline "),a("div",{staticClass:"explainer"},[t._v("("+t._s(t.blStart)+" - "+t._s(t.blEnd)+")")])]),a("th",{attrs:{colspan:"4"}},[t._v("Week 1 "),a("div",{staticClass:"explainer"},[t._v("("+t._s(t.w1Start)+" - "+t._s(t.w1End)+")")])]),a("th",{attrs:{colspan:"4"}},[t._v("Week 2 "),a("div",{staticClass:"explainer"},[t._v("("+t._s(t.w2Start)+" - "+t._s(t.w2End)+")")])]),a("th")]),a("tr",[a("th",[t._v(" confirmed "),a("i",{staticClass:"fas fa-info-circle",attrs:{title:t.help.confirmed}})]),a("td",{staticClass:"status change-status",attrs:{colspan:"4"}},[t._v(t._s(t.oy.confT_bl.trend))]),a("td",{staticClass:"status change-status",attrs:{colspan:"4"}},[t._v(" "+t._s(t.oy.confT_w1.trend)+" / "),a("div",{staticClass:"delta",class:t.calcChangeStatus(t.oy.confT_w1.trend,t.oy.confT_bl.trend)},[t.flgDeltaRate?a("span",[t._v(t._s(t.oy.confT_w1.trendDelta))]):t._e(),t.flgDeltaPercent?a("span",[t._v(t._s(t.oy.confT_w1.trendPerc)+"%")]):t._e()])]),a("td",{staticClass:"status change-status",attrs:{colspan:"4"}},[t._v(" "+t._s(t.oy.confT_w2.trend)+" / "),a("div",{staticClass:"delta",class:t.calcChangeStatus(t.oy.confT_w2.trend,t.oy.confT_bl.trend)},[t.flgDeltaRate?a("span",[t._v(t._s(t.oy.confT_w2.trendDelta))]):t._e(),t.flgDeltaPercent?a("span",[t._v(t._s(t.oy.confT_w2.trendPerc)+" %")]):t._e()])]),t.flgDeltaRate?a("td",{staticClass:"status",class:t.calcStatus(t.oy.confTrend)},[a("span",[t._v(t._s(t.formatTrend(t.oy.confTrend)))])]):t._e(),t.flgDeltaPercent?a("td",{staticClass:"status",class:t.calcStatus(t.oy.confTrend)},[a("span",[t._v(t._s(t.formatTrend(t.oy.confTrendPerc,!0,!0)))])]):t._e()]),t.hasTesting?t._e():a("tr",[a("th",[t._v(" % positive "),t.flgDebug?a("i",{staticClass:"fas fa-info-circle",attrs:{title:t.help.ppositive}}):t._e()]),a("td",{attrs:{colspan:"4"}},[t._v("n/a")]),a("td",{attrs:{colspan:"4"}},[t._v("n/a")]),a("td",{attrs:{colspan:"4"}},[t._v("n/a")]),a("td",[t._v("n/a")])]),t.hasTesting?a("tr",[a("th",[t._v(" % positive "),t.flgDebug?a("i",{staticClass:"fas fa-info-circle",attrs:{title:t.help.ppositive}}):t._e()]),a("td",{staticClass:"status change-status",attrs:{colspan:"4"}},[t._v(t._s(t.oy.pposT_bl.yAvg))]),a("td",{staticClass:"status change-status",attrs:{colspan:"4"}},[t._v(" "+t._s(t.oy.pposT_w1.yAvg)+" / "),a("div",{staticClass:"delta",class:t.calcChangeStatus(t.oy.pposT_w1.yAvgDelta)},[t.flgDeltaRate?a("span",[t._v(t._s(t.oy.pposT_w1.yAvgDelta)+"%")]):t._e(),t.flgDeltaPercent?a("span",[t._v(t._s(t.oy.pposT_w1.yAvgDPerc)+"%")]):t._e()])]),a("td",{staticClass:"status change-status",attrs:{colspan:"4"}},[t._v(" "+t._s(t.oy.pposT_w2.yAvg)+" / "),a("div",{staticClass:"delta",class:t.calcChangeStatus(t.oy.pposT_w2.yAvgDelta)},[t.flgDeltaRate?a("span",[t._v(t._s(t.oy.pposT_w2.yAvgDelta)+"%")]):t._e(),t.flgDeltaPercent?a("span",[t._v(t._s(t.oy.pposT_w2.yAvgDPerc)+"%")]):t._e()])]),t.flgDeltaRate?a("td",{staticClass:"status",class:t.calcStatus(t.oy.pposTrend)},[a("span",[t._v(t._s(t.oy.pposTrend)+"%")])]):t._e(),t.flgDeltaPercent?a("td",{staticClass:"status",class:t.calcStatus(t.oy.pposTrend)},[a("span",[t._v(t._s(t.formatTrend(t.oy.pposTrendPerc,!0,!0)))])]):t._e()]):t._e(),a("tr",[a("th",[t._v(" deaths "),a("i",{staticClass:"fas fa-info-circle",attrs:{title:t.help.deaths}})]),a("td",{staticClass:"status change-status",attrs:{colspan:"4"}},[t._v(t._s(t.oy.deathsT_bl.trend))]),a("td",{staticClass:"status change-status",attrs:{colspan:"4"}},[t._v(" "+t._s(t.oy.deathsT_w1.trend)+" / "),a("div",{staticClass:"delta",class:t.calcChangeStatus(t.oy.deathsT_w1.trend,t.oy.deathsT_bl.trend)},[t.flgDeltaRate?a("span",[t._v(t._s(t.oy.deathsT_w1.trendDelta))]):t._e(),t.flgDeltaPercent?a("span",[t._v(t._s(t.oy.deathsT_w1.trendPerc)+"%")]):t._e()])]),a("td",{staticClass:"status change-status",attrs:{colspan:"4"}},[t._v(" "+t._s(t.oy.deathsT_w2.trend)+" / "),a("div",{staticClass:"delta",class:t.calcChangeStatus(t.oy.deathsT_w2.trend,t.oy.deathsT_bl.trend)},[t.flgDeltaRate?a("span",[t._v(t._s(t.oy.deathsT_w2.trendDelta))]):t._e(),t.flgDeltaPercent?a("span",[t._v(t._s(t.oy.deathsT_w2.trendPerc)+"%")]):t._e()])]),t.flgDeltaRate?a("td",{staticClass:"status",class:t.calcStatus(t.oy.deathsTrend)},[a("span",[t._v(t._s(t.formatTrend(t.oy.deathsTrend)))])]):t._e(),t.flgDeltaPercent?a("td",{staticClass:"status",class:t.calcStatus(t.oy.deathsTrendPerc)},[a("span",[t._v(t._s(t.oy.deathsTrendPerc)+"%")])]):t._e()])])])},o=[function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"legend"},[a("label",[t._v("legend:")]),a("div",{staticClass:"delta OPEN"}),t._v("declining value vs baseline "),a("div",{staticClass:"delta CLOSED"}),t._v("increasing value vs baseline ")])}],i=a("c1df"),l=a.n(i),d={props:["oyRec"],data:function(){return{flgDebug:!0,flgDeltaRate:!0,flgDeltaPercent:!1,help:{ppositive:"Average % of tests for Covid19 that returned a positive result during this period (i.e., test shows that person being tested DOES HAVE the Covid19 disease)",confirmed:"Number of cases of Covid19 confirmed per day during this period",deaths:"Number of deaths per day attributed to Covid19 during this period"}}},computed:{oy:function(){return this.oyRec},hasTesting:function(){if(!this.oy.recs)return!1;var t=this.oy.recs[0];return"USA"==t.countrycode&&null==t.county},blStart:function(){return this.startDate(this.oy.confT_bl)},blEnd:function(){return this.endDate(this.oy.confT_bl)},w1Start:function(){return this.startDate(this.oy.confT_w1)},w1End:function(){return this.endDate(this.oy.confT_w1)},w2Start:function(){return this.startDate(this.oy.confT_w2)},w2End:function(){return this.endDate(this.oy.confT_w2)}},created:function(){},watch:{oy:function(t){}},methods:{calcPercChangeStatus:function(t){return 0==t?"STATIC":t<0?"OPEN":"CLOSED"},calcChangeStatus:function(t,e){if(t==e)return"STATIC";var a=t;return null!=e&&(a=t-e),a<0?"OPEN":"CLOSED"},calcStatus:function(t){return 0==t?"STATIC":t>0?"CLOSED":"OPEN"},getDeltaRate:function(t,e,a){if(null==e)return null;if(0==e)return"0%";var s=(e-a)/e;s=Math.round(100*s,0);var n=s>0?"+":"";return n+s+"%"},getDeltaPerc:function(t,e,a){if(null==t)return null;if(null==e)return null;if(0==e)return"0%";var s=e/(t-e);s=Math.round(100*s,0);this.calcChangeStatus(e,a);var n=s>0?"+":"";return n+s+"%"},formatChangeDate:function(t){return l()(t,"MMM DD, YYYY").format("MM/DD")},formatTrend:function(t,e,a){if("n/a"===t)return t;var s="";return t>0&&(s+="+"),s+=t,e&&(s+="%"),s},getJSON:function(t){return JSON.stringify(t)},endDate:function(t){this.oy;if(!t.recs)return"n/a";var e=t.recs.length-1;return t.recs[e].date},startDate:function(t){this.oy;return t.recs?t.recs[0].date:"n/a"},toggleRateAndPercent:function(t){t||(this.flgDeltaRate=!this.flgDeltaRate,this.flgDeltaPercent=!this.flgDeltaPercent)}}},u=d,f=(a("b7c8"),a("2877")),h=Object(f["a"])(u,c,o,!1,null,"30d77829",null),p=h.exports,v=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"graph-container"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.trends,expression:"trends"}],attrs:{type:"checkbox",value:"confirmed"},domProps:{checked:Array.isArray(t.trends)?t._i(t.trends,"confirmed")>-1:t.trends},on:{change:function(e){var a=t.trends,s=e.target,n=!!s.checked;if(Array.isArray(a)){var r="confirmed",c=t._i(a,r);s.checked?c<0&&(t.trends=a.concat([r])):c>-1&&(t.trends=a.slice(0,c).concat(a.slice(c+1)))}else t.trends=n}}}),t._v(" confirmed "),a("input",{directives:[{name:"model",rawName:"v-model",value:t.trends,expression:"trends"}],attrs:{type:"checkbox",value:"ppositive"},domProps:{checked:Array.isArray(t.trends)?t._i(t.trends,"ppositive")>-1:t.trends},on:{change:function(e){var a=t.trends,s=e.target,n=!!s.checked;if(Array.isArray(a)){var r="ppositive",c=t._i(a,r);s.checked?c<0&&(t.trends=a.concat([r])):c>-1&&(t.trends=a.slice(0,c).concat(a.slice(c+1)))}else t.trends=n}}}),t._v(" % positive "),a("input",{directives:[{name:"model",rawName:"v-model",value:t.trends,expression:"trends"}],attrs:{type:"checkbox",value:"death"},domProps:{checked:Array.isArray(t.trends)?t._i(t.trends,"death")>-1:t.trends},on:{change:function(e){var a=t.trends,s=e.target,n=!!s.checked;if(Array.isArray(a)){var r="death",c=t._i(a,r);s.checked?c<0&&(t.trends=a.concat([r])):c>-1&&(t.trends=a.slice(0,c).concat(a.slice(c+1)))}else t.trends=n}}}),t._v(" deaths "),a("line-chart",{attrs:{"chart-data":t.cData,options:t.options}})],1)},g=[],y=(a("caad"),a("2532"),a("1fca")),_=y["b"].reactiveProp,m={extends:y["a"],mixins:[_],props:{options:{type:Object,default:null}},mounted:function(){this.renderChart(this.chartData,this.options)}},b={name:"openYetGraph2",components:{LineChart:m},props:["oyRec"],data:function(){return{oy:this.oyRec,options2:{responsive:!0,maintainAspectRatio:!1},options:{},trends:["confirmed"]}},watch:{oyRec:function(t){this.oy=t}},computed:{cData:function(){var t=this.oy;if(!t)return{};t.recs.slice(0,14),t.recs.slice(14,21),t.recs.slice(21);var e=t.recs,a={labels:[],datasets:[]};for(var s in e){var n=e[s];a.labels.push(n.date)}var r={data:[],label:"confirmed",borderColor:"black"},c={data:[],label:"deaths",borderColor:"red"},o={data:[],label:"% positive",borderColor:"purple"};return this.getDataValArray("confirmed",e,r.data),this.getDataValArray("death",e,c.data),this.getDataValArray("ppositive",e,o.data),this.trends.includes("confirmed")&&a.datasets.push(r),this.trends.includes("death")&&a.datasets.push(c),this.trends.includes("ppositive")&&a.datasets.push(o),a}},methods:{getDataValArray:function(t,e,a){for(var s in e){var n=e[s];a.push(n[t])}}}},C=b,j=(a("fb61"),Object(f["a"])(C,v,g,!1,null,"64de503e",null)),T=j.exports,S=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("table",{staticClass:"status-detail"},[a("tr",[a("th",{staticClass:"status-detail"},[t._v(" Confirmed Trend "),a("i",{staticClass:"fas fa-info-circle",attrs:{title:t.help.confirmed}})]),a("td",{staticClass:"status-detail",class:t.calcStatus(t.oy.confTrend)},[t._v(t._s(t.formatTrend(t.oy.confTrend)))])]),a("tr",[a("th",{staticClass:"status-detail"},[t._v(" % Positive Trend "),a("i",{staticClass:"fas fa-info-circle",attrs:{title:t.help.ppositive}})]),a("td",{staticClass:"status-detail",class:t.calcStatus(t.oyRec.pposTrend)},[isNaN(t.oy.pposTrend-0)?t._e():a("span",[t._v(t._s(t.formatTrend(t.oy.pposTrend))+"%")]),isNaN(t.oy.pposTrend)?a("span",[t._v("n/a")]):t._e()])]),a("tr",[a("th",{staticClass:"status-detail"},[t._v(" Deaths Trend "),a("i",{staticClass:"fas fa-info-circle",attrs:{title:t.help.deaths}})]),a("td",{staticClass:"status-detail",class:t.calcStatus(t.oy.deathsTrend)},[t._v(t._s(t.formatTrend(t.oy.deathsTrend)))])])])])},w=[],D={props:["oyStatus","oyRec"],data:function(){return{oy:this.oyRec,help:{ppositive:"Change in % of tests for Covid19 that returned a positive result (i.e., tests showing that person being tested DOES HAVE the Covid19 disease)",confirmed:"Change in growth rate of number of cases per day of Covid19 confirmed during this period",deaths:"Change in growth rate of number of deaths per day attributed to Covid19 during this period"}}},watch:{oyRec:function(t){this.oy=t}},methods:{calcStatus:function(t){return 0==t?"STATIC":t>=0?"CLOSED":t<0?"OPEN":void 0},formatTrend:function(t){if("n/a"===t)return t;var e="";return t>0&&(e+="+"),e+=t,e}}},N=D,k=Object(f["a"])(N,S,w,!1,null,null,null),R=k.exports,O=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"main-status-stats"},[a("div",[a("label",[t._v("Population:")]),t._v(" "+t._s(t.niceNumber(t.oyRec.population))+" ")]),a("div",[a("label",[t._v("Confirmed Cases:")]),t._v(" "+t._s(t.niceNumber(t.oyRec.confirmed))+" ")]),a("div",[a("label",[t._v("Confirmed/1M:")]),t._v(" "+t._s(t.niceNumber(t.oyRec.confirmed_1m))+" ")]),a("div",[a("label",[t._v("Deaths")]),t._v(" "+t._s(t.niceNumber(t.oyRec.death))+" ")]),a("div",[a("label",[t._v("Deaths/1M")]),t._v(" "+t._s(t.niceNumber(t.oyRec.deaths_1m))+" ")]),a("div",[a("label",[t._v("Total Tests:")]),t._v(" "+t._s(t.niceNumber(t.oyRec.totaltestresults))+" ")]),a("div",[a("label",[t._v("Tests/1M:")]),t._v(" "+t._s(t.niceNumber(t.oyRec.tests_1m))+" ")])])},A=[],P=a("2f54"),M={props:["oyRec"],methods:{niceNumber:function(t){return null==t?"n/a":P["niceNumber"](t)}}},x=M,E=Object(f["a"])(x,O,A,!1,null,null,null),L=E.exports,U=a("d4ec"),z=a("bee2"),Y=P,V=function(){function t(e,a,s){Object(U["a"])(this,t),this.xVals=e,this.yVals=a;var n=K(e,a);Y.getSlope(e,a);this.slope=I(n.slope),this.intercept=I(n.intercept),this.yMin=I(n.yMin),this.yMax=I(n.yMax),this.yAvg=I(n.yAvg);var r=n.yValsCalc;r.length;if(this.yValsCalc=r,this.correlation=n.correlation,this.growthRate=$(r[1],r[0],1),this.growthPerc=F(r[1],r[0]),this.trend=this.growthRate,s){var c=s;this.slopeDelta=I(this.slope-c.slope),this.yMaxDelta=I(this.yMax-c.yMax),this.yAvgDelta=I(this.yAvg-c.yAvg),this.yAvgDPerc=F(this.yAvg,c.yAvg),this.growthRateDelta=this.growthRate-c.growthRate,this.trendDelta=this.growthRateDelta,this.slopePerc=F(this.slope,c.slope),this.yMaxPerc=F(this.yMaxDelta,c.yMaxDelta),this.growthRatePerc=F(this.growthRate,c.growthRate),this.trendPerc=F(this.trend,c.trend)}}return Object(z["a"])(t,[{key:"getCorrelation",value:function(t,e){return P["getCorrelation"](t,e)}}]),t}();function I(t){return t=Math.round(10*t)/10,t}function K(t,e){return P["getCorrelation"](t,e)}function $(t,e,a){a||(a=1);var s=(t-e)/a;return Math.round(s)}function F(t,e){var a;return 0==e?NaN:(a=(t-e)/e*100,a=Math.round(100*a)/100,a)}function q(t,e,a){var s=[],n=[],r=0;if(e.forEach((function(e,a){var c=e[t];s.push(c),r+=c-0,n.push(a)})),0==r)return 0;var c=new V(n,s,a);return c.recs=e,c}var J=a("4a7a"),W=a.n(J),H=(a("d026"),a("f1ed")),B=(a("e83e"),a("becf"),{OPEN:{code:"OPEN",name:"Open"},CLOSED:{code:"CLOSED",name:"Closed"},TOPEN:{code:"TOPEN",name:"Trending Open"},STATIC:{code:"STATIC",name:"Static"},NA:{code:"NA",name:"Not Applicable"},UNKNOWN:{code:"UNKNOWN",name:"Unknown"}}),G={countrycode:"USA",name:"United States"},Q={name:"OpenYet",components:{joModal:r["a"],openYetDetail2:p,openYetGraph2:T,openYetSummary:R,MainStats:L,vueSelect:W.a},props:[],data:function(){return{appName:"OpenYet",country:G,state:{name:"-- select a state --"},county:{county:"-- select a county --"},searchQuery:"",colDefs:[],countries:[],states:[],counties:[],flgReadOnly:!0,gridDefaults:[],gridOptions:[],flgDebug:!1,flgDirty:!1,dlgs:{dlgAlert:{id:"dlgAlert",flg:!1}},oyRec:{},urlCountries:"cvd/getData/countries",urlStates:"cvd/getData/states",urlCounties:"cvd/getData/counties",urlOpenYetData:"cvd/getData/getOpenYet?limit=1000",urlSummaryNational:"/cvd/getData/nationalSummary",urlSummaryState:"/cvd/getData/stateSummary",urlSummaryCounty:"/cvd/getData/countySummary",reloadIdx:1,alertMsg:"",infoMsg:"msg"}},mounted:function(){},created:function(){this.getCountries(),this.getStates(),this.getOpenYet()},computed:{dataURL:function(){var t=this.urlOpenYetData;return this.country&&this.country.countrycode&&(t+="&countrycode="+this.country.countrycode),this.state&&this.state.statecode&&(t+="&statecode="+this.state.statecode),this.county&&this.county.statecode&&(t+="&county="+this.county.county),t},filter:function(){var t=this;return{country:t.country,state:t.state,county:t.county}},statesURL:function(){return this.country.countrycode?this.urlStates+"?countrycode="+this.country.countrycode:null},countiesURL:function(){return this.state&&this.state.statecode?this.urlCounties+"?statecode="+this.state.statecode:null},flgCounty:function(){return this.county&&null!=this.county.statecode},flgCounties:function(){this.colDefs.find((function(t){return"county"==t.colName}));return this.counties&&this.counties.length>0},flgState:function(){return this.state&&null!=this.state.statecode},flgStates:function(){this.colDefs.find((function(t){return"statecode"==t.colName}));return this.states.length>0},gridCode:function(){var t;return t=this.flgCounty?"SUMMARY_COUNTY":this.flgState?"SUMMARY_STATE":"SUMMARY_NATIONAL",t},oyStatus:function(){var t=this.oyRec;if(!t||0==Object.keys(t).length)return{};var e,a={},s=t.confTrendPerc-0+(t.deathsTrendPerc-0);return isNaN(t.pposTrendPerc-0)||(s+=+(t.pposTrendPerc-0)),e=isNaN(s)?B.UNKNOWN:s<-3?B.OPEN:s>=-3&&s<-1?B.TOPEN:s>=-1&&s<1?B.STATIC:B.CLOSED,a.overallStatus=e,a},urlSummaryData:function(){var t;return t=this.flgCounty?this.urlSummaryCounty+"?countrycode="+this.country.countrycode+"&statecode="+this.state.statecode:this.flgState?this.urlSummaryState+"?countrycode="+this.country.countrycode:this.urlSummaryNational+"?countrycode="+this.country.countrycode,t}},watch:{country:function(t){this.state={name:null},this.county={county:null}},countries:function(t){this.getStates()},state:function(t){this.county={county:null}},statesURL:function(t){t?this.getStates():this.state={name:null}},countiesURL:function(t){t?this.getCounties():this.county={county:null}},dataURL:function(t){t&&this.getOpenYet(t)},oyRec:function(t){var e=this,a=this.oyRec,s=t,n=a.recs.slice(0,14),r=a.recs.slice(14,21),c=a.recs.slice(21);a.confT_bl=q("confirmed",n),a.confT_w1=q("confirmed",r,a.confT_bl),a.confT_w2=q("confirmed",c,a.confT_bl),a.pposT_bl=q("ppositive",n),a.pposT_w1=q("ppositive",r,a.pposT_bl),a.pposT_w2=q("ppositive",c,a.pposT_bl),a.deathsT_bl=q("death",n),a.deathsT_w1=q("death",r,a.deathsT_bl),a.deathsT_w2=q("death",c,a.deathsT_bl);var o=new Number;o=(a.confT_w1.trendDelta+a.confT_w2.trendDelta)/2,a.confTrend=o.toFixed(0),o=(a.confT_w1.trendPerc+a.confT_w2.trendPerc)/2,a.confTrendPerc=o.toFixed(2),o=(a.pposT_w1.yAvgDelta+a.pposT_w2.yAvgDelta)/2,a.pposTrend=o.toFixed(2),o=(a.pposT_w1.yAvgDPerc+a.pposT_w2.yAvgDPerc)/2,a.pposTrendPerc=o.toFixed(2),o=(a.deathsT_w1.trendDelta+a.deathsT_w2.trendDelta)/2,a.deathsTrend=o.toFixed(0),o=(a.deathsT_w1.trendPerc+a.deathsT_w2.trendPerc)/2,a.deathsTrendPerc=o.toFixed(2),e.flgDebug&&console.log(s);var i=s.recs[s.recs.length-1];Object.keys(i).forEach((function(t){s[t]=i[t]}))}},methods:{initOpts:function(){},calcSum:function(t,e){var a=0;return e.forEach((function(e,s){a+=e[t]-0})),a=Math.round(a,0),a},convertToNumbers:function(){var t=this.oyRec;t&&Object.keys(t).forEach((function(e){var a=t[e]-0;NaN!=a&&(t[e]=a)}))},getCountries:function(){var t=this,e=this,a=this.getLocalStorage("countries.json",this.appName);a&&a.length?e.countries=a:H["a"](e.urlCountries,e).then((function(a){var s=a.items;t.writeLocalStorage("countries.json",s,e.appName),e.countries=s})).catch((function(t){return alert(t)}))},getCounties:function(){var t=this,e=this;if(!this.statesURL)return null;var a=this.getLocalStorage(this.country.countrycode+"-"+this.state.statecode+"-counties.json",this.appName);a?e.counties=a:H["a"](this.countiesURL,e).then((function(a){var s=a.items;e.writeLocalStorage(t.country.countrycode+"-"+e.state.statecode+"-counties.json",s,e.appName),e.counties=s})).catch((function(t){return alert(t)}))},getStates:function(){var t=this;if(!this.statesURL)return null;if(!this.country.countrycode)return null;var e=this.getLocalStorage(this.country.countrycode+"-states.json",this.appName);e&&e.length?t.states=e:H["a"](this.statesURL,t).then((function(e){var a=e.items;t.writeLocalStorage(t.country.countrycode+"-states.json",a,t.appName),t.states=a})).catch((function(t){return alert(t)}))},getOpenYet:function(){var t=this,e=this;H["a"](this.dataURL,e).then((function(a){if(a.items){var s=a.items.length;if(28!=s){console.log("Error condition for data returned by url: "+t.dataURL),a.recs=[];for(var n=0;n<28;n++)a.recs.push({confirmed:"n/a",death:"n/a"})}else a.recs=a.items;e.oyRec=a,e.oyRec.json=JSON.stringify(a)}else e.flgDebug&&console.log("Error while retrieving OpenYet data: no items returned: "+e.dataURL)}))},niceNumber:function(t){return P["niceNumber"](t)},showAlert:function(t){this.flgDebug&&console.log(t),t=t.replace(/\n/g,"<br />"),t=t.replace(/\\r\\n/g,"<br />"),t=t.replace(/\\n/g,"<br />"),this.alertMsg=t,this.dlgs.dlgAlert.flg=!0},toggleDialog:function(t){t.flg=!t.flg},clearLocalStorage:function(t){window.localStorage.setItem(t,"{}")},writeLocalStorage:function(t,e,a){var s=this.getLocalStorage(null,a);s[t]=e,window.localStorage.setItem(a,JSON.stringify(s))},getLocalStorage:function(t,e){var a=window.localStorage.getItem(this.appName);if(null==a)return{};var s=JSON.parse(a);return t?s[t]:s}}},X=Q,Z=(a("78be"),Object(f["a"])(X,s,n,!1,null,null,null));e["default"]=Z.exports},f5fd:function(t,e,a){},f9c9:function(t,e,a){"use strict";var s=a("1d7a"),n=a.n(s);n.a},fb61:function(t,e,a){"use strict";var s=a("8326"),n=a.n(s);n.a}}]);
//# sourceMappingURL=chunk-36a83e78.js.map