text: import{u as e,d as t,g as r}from"./vendor.f2031981.js";!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))t(e);new MutationObserver((e=>{for(const r of e)if("childList"===r.type)for(const e of r.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&t(e)})).observe(document,{childList:!0,subtree:!0})}function t(e){if(e.ep)return;e.ep=!0;const t=function(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerpolicy&&(t.referrerPolicy=e.referrerpolicy),"use-credentials"===e.crossorigin?t.credentials="include":"anonymous"===e.crossorigin?t.credentials="omit":t.credentials="same-origin",t}(e);fetch(e.href,t)}}();const o=e("%d/%m/%Y"),n=o("16/5/2020");Promise.all([fetch("./static/ne_110m_admin_0_countries.geojson").then((e=>e.json())),fetch("./static/COVID19_geo_dist.csv").then((e=>e.text())).then((e=>t(";").parse(e,(({dateRep:e,deaths:t,cases:r,countryterritoryCode:n,popData2018:a})=>({deaths:Number(t),cases:Number(r),popData2018:Number(a),countryterritoryCode:n.toString(),dateRep:o(e)}))))),fetch("./static/arcs_by_10_clean.json").then((e=>e.json())),fetch("./static/geocoded_institutions_clean.csv").then((e=>e.text())).then((e=>t(",").parse(e)))]).then((([e,t,o,a])=>{const i=r({animateIn:!0,rendererConfig:{antialias:!0,alpha:!0}})(document.getElementById("world-3d")).globeImageUrl("./static/earth-dark.jpg").bumpImageUrl("./static/earth-topology.png").pointOfView({lat:34.3416,lng:108.9398,altitude:2.4},0).width(1.2*window.innerWidth).height(1.05*window.innerHeight).polygonsData(e.features).polygonGeoJsonGeometry((e=>e.geometry)).polygonCapColor((()=>"rgba(0, 0, 0, 0.001)")).polygonStrokeColor((()=>"rgba(234, 26, 41, 1)")).polygonSideColor((()=>"rgba(193, 34, 84, .25)")).polygonLabel((e=>e.properties.SUBUNIT)).polygonAltitude((e=>{let r=t.filter((e=>e.dateRep-n<=0)).filter((t=>t.countryterritoryCode===e.properties.ISO_A3)).map((e=>e.cases/e.popData2018)).reduce(((e,t)=>e+t),0);return 5*Math.pow(r,.5)})).onPolygonClick((e=>{var t;t=`<h5>Institutions in ${e.properties.SUBUNIT}</h5>\n                        <p>${a.filter((e=>"NA"!==e.country.toString())).filter((t=>t.country===e.properties.SUBUNIT)).map((e=>e.name)).map((e=>e)).join("\n")}\n                        </p>\n                        `,document.getElementById("log").innerHTML=t,i.arcColor((t=>t.countries.includes(e.properties.SUBUNIT)?`rgba(0, 120, 240, ${.4+.2})`:`rgba(0, 120, 240, ${.4/6})`)).arcStroke((t=>t.countries.includes(e.properties.SUBUNIT)?.5:.001)).arcDashGap(.05)})).arcsData(o).arcAltitudeAutoScale(.5).arcStartLat((e=>Number(e.arc[0][0]))).arcStartLng((e=>Number(e.arc[0][1]))).arcEndLat((e=>Number(e.arc[1][0]))).arcEndLng((e=>Number(e.arc[1][1]))).arcColor((()=>"rgba(0, 120, 240, 0.4)")).arcStroke(.2).arcDashLength(.4).arcDashGap(.2).arcDashAnimateTime(2e3).arcLabel((e=>`\n                    <h2 class="paper-title">${e.title}</h2>\n                    <p class="country-label">${2===e.countries.length?`${e.countries[0]} x ${e.countries[1]}`:e.countries[0]}</p>\n                `)).pointsData(a).pointLat((e=>+e.lat)).pointLng((e=>+e.lon)).pointRadius(.3).pointAltitude(0).pointResolution(12).pointColor((()=>"rgba(0, 120, 240, .8)"));i.controls().autoRotate=!0,i.controls().autoRotateSpeed=.35}));
  