(function () {
  //Inject code v3.0.1

  var highcharts = document.createElement('script');

  var cdn = 'https://code.highcharts.com/';
  var loaded = 0;  
  var encodedUrl = encodeURI('https://https://app.everviz.com//show/Z0q7GYdY-');
  var chartCreated = false;
  var scripts = [
    "highcharts.js",
    "modules/stock.js",
    "highcharts-more.js",
    "highcharts-3d.js",
    "modules/data.js",
    "modules/exporting.js",
    "modules/funnel.js",
    "modules/solid-gauge.js",
    "modules/export-data.js",
    "modules/accessibility.js"
    /* "modules/series-label.js" */
  ];

  var externalCSS = [
     
    "https://app.everviz.com/fonts/4p5RZJGrg/font.css"
 ,
    "https://app.everviz.com/fonts/Fa1k_zRqT/font.css"
 ,
    "https://app.everviz.com/fonts/R3oTVDf9l/font.css"
 ,
    "https://app.everviz.com/fonts/h97SBtExb/font.css"
  ];

  var extraScripts = [
  "https://code.highcharts.com/modules/annotations.js"
  ,"https://code.highcharts.com/modules/annotations-advanced.js"
  ];

  var options = {"title":{"text":"Panel A: Unemployment Rate (%)","align":"left","x":10,"style":{"fontFamily":"GothamNarrow-Bold","color":"#4C4C4E","fontSize":"20px","fontWeight":"normal","fontStyle":"normal"}},"subtitle":{"text":"Monthly time series with employment data from the Bureau of Labor Statistics (BLS) and Nielsen survey","align":"left","x":10,"style":{"fontFamily":"GothamNarrow-Book","color":"#767676","fontSize":"16px","fontWeight":"normal","fontStyle":"normal"}},"colors":[" #155F83","#993536"],"legend":{"align":"left","verticalAlign":"top","itemMarginBottom":10,"x":0,"symbolRadius":2,"layout":"horizontal","labelFormat":"{name}","floating":false,"borderRadius":0,"borderWidth":0,"bubbleLegend":{"enabled":false},"shadow":false,"squareSymbol":true,"symbolHeight":10,"symbolWidth":14,"enabled":false},"plotOptions":{"series":{"marker":{"enabled":false},"lineWidth":3,"allowPointSelect":true,"states":{"select":{"color":"#EFFFEF","borderColor":"black","dashStyle":"dot"}},"dataLabels":{"enabled":true,"format":"{point.label}"},"label":{"style":{"font-weight":"bold","fontFamily":"\"Lucida Grande\", \"Lucida Sans Unicode\", Verdana, Arial, Helvetica, sans-serif","fontSize":"12px"}}},"line":{"dataLabels":{"style":{"fontWeight":"normal","textOutline":""},"x":16,"allowOverlap":true,"y":6,"align":"right"}}},"chart":{"borderWidth":0,"plotBorderWidth":0},"credits":{"text":"Becker Friedman Institute at UChicago","href":"https://bfi.uchicago.edu"},"series":[{"data":[],"turboThreshold":0,"type":"line","negativeColor":"auto","marker":{"symbol":"circle","enabled":false},"name":"Bureau of Labor Statistics (BLS)"},{"data":[],"turboThreshold":0,"type":"line","marker":{"enabled":true},"depth":25,"name":"Nielsen Survey"}],"xAxis":{"type":"category","opposite":false,"reversed":false,"labels":{"format":"{value}","step":24},"visible":true},"tooltip":{"shared":true,"valueSuffix":"%","headerFormat":"<span style=\"font-size: 11px\">{point.key}</span><br/>","pointFormat":"<span style=\"color:{point.color}\">●</span> {series.name}: {point.y}<br/>","style":{"color":"#333333","cursor":"default","fontSize":"11px","pointerEvents":"none","whiteSpace":"nowrap","fontFamily":"\"Lucida Grande\", \"Lucida Sans Unicode\", Verdana, Arial, Helvetica, sans-serif"}},"yAxis":{"title":{"text":""},"type":"linear","labels":{"format":"{value}"},"reversed":false,"opposite":false,"stackLabels":{"format":"{total}","allowOverlap":false},"uniqueNames":true},"lang":{"decimalPoint":"."},"stockTools":{"gui":{"enabled":false}},"navigation":{"bindingsClassName":"tools-container","events":{}},"labels":{"items":[]},"pane":{"background":[]},"responsive":{"rules":[]},"annotations":[{"visible":true,"draggable":null,"labelOptions":{"align":"center","allowOverlap":false,"backgroundColor":"rgba(0, 0, 0, 0.75)","borderColor":"black","borderRadius":3,"borderWidth":1,"className":"","crop":false,"overflow":"justify","padding":5,"shadow":false,"shape":"callout","style":{"fontSize":"11px","fontWeight":"normal","color":"contrast"},"useHTML":false,"verticalAlign":"bottom","x":0,"y":-16,"format":"{y:.2f}"},"shapeOptions":{"stroke":"rgba(0, 0, 0, 0.75)","strokeWidth":1,"fill":"rgba(0, 0, 0, 0.75)","r":0,"snap":2},"controlPointOptions":{"symbol":"circle","width":10,"height":10,"style":{"stroke":"black","stroke-width":2,"fill":"white"},"visible":false},"events":{},"zIndex":6,"langKey":"label","labels":[{"point":{"x":168.83495618305744,"y":4.185344827586206,"xAxis":0,"yAxis":0},"controlPoints":[{"symbol":"triangle-down","width":10,"height":10,"style":{"stroke":"black","stroke-width":2,"fill":"white"},"visible":false,"events":{},"index":0},{"symbol":"circle","width":10,"height":10,"style":{"stroke":"black","stroke-width":2,"fill":"white"},"visible":false,"events":{},"index":1}],"overflow":"none","crop":true,"x":-46,"y":13,"format":"<strong>2020 M2</strong> <br/>Nielsen Pre-Crisis Survey","style":{"color":"contrast","fontSize":"10","fontWeight":"normal"},"backgroundColor":"#993536","borderColor":"#993536","shape":"callout","allowOverlap":false,"shadow":false,"align":"center","borderRadius":3,"borderWidth":1,"className":"","padding":5,"useHTML":false,"verticalAlign":"bottom","controlPointOptions":{"symbol":"circle","width":10,"height":10,"style":{"stroke":"black","stroke-width":2,"fill":"white"},"visible":false}}]}],"caption":{"text":"Note: Each panel plots monthly time series of an employment statistic. The blue line shows data from the Bureau of Labor Statistics (BLS). The red line with circles shows the corresponding values from the Nielsen survey. 2020M2 are the values from the Nielsen pre-crisis survey. 2020M3 are the values from the Nielsen crisis wave.","style":{"fontFamily":"GothamNarrow-Book","color":"#333333","fontSize":"12px","fontWeight":"normal","fontStyle":"normal"}},"data":{"csv":"year;Bureau of Labor Statistics (BLS);Nielsen Survey;Label\n2006;4.7;;\n2006;4.8;;\n2006;4.7;;\n2006;4.7;;\n2006;4.6;;\n2006;4.6;;\n2006;4.7;;\n2006;4.7;;\n2006;4.5;;\n2006;4.4;;\n2006;4.5;;\n2006;4.4;;\n2007;4.6;;\n2007;4.5;;\n2007;4.4;;\n2007;4.5;;\n2007;4.4;;\n2007;4.6;;\n2007;4.7;;\n2007;4.6;;\n2007;4.7;;\n2007;4.7;;\n2007;4.7;;\n2007;5;;\n2008;5;;\n2008;4.9;;\n2008;5.1;;\n2008;5;;\n2008;5.4;;\n2008;5.6;;\n2008;5.8;;\n2008;6.1;;\n2008;6.1;;\n2008;6.5;;\n2008;6.8;;\n2008;7.3;;\n2009;7.8;;\n2009;8.3;;\n2009;8.7;;\n2009;9;;\n2009;9.4;;\n2009;9.5;;\n2009;9.5;;\n2009;9.6;;\n2009;9.8;;\n2009;10;;\n2009;9.9;;\n2009;9.9;;\n2010;9.8;;\n2010;9.8;;\n2010;9.9;;\n2010;9.9;;\n2010;9.6;;\n2010;9.4;;\n2010;9.4;;\n2010;9.5;;\n2010;9.5;;\n2010;9.4;;\n2010;9.8;;\n2010;9.3;;\n2011;9.1;;\n2011;9;;\n2011;9;;\n2011;9.1;;\n2011;9;;\n2011;9.1;;\n2011;9;;\n2011;9;;\n2011;9;;\n2011;8.8;;\n2011;8.6;;\n2011;8.5;;\n2012;8.3;;\n2012;8.3;;\n2012;8.2;;\n2012;8.2;;\n2012;8.2;;\n2012;8.2;;\n2012;8.2;;\n2012;8.1;;\n2012;7.8;;\n2012;7.8;;\n2012;7.7;;\n2012;7.9;;\n2013;8;;\n2013;7.7;;\n2013;7.5;;\n2013;7.6;;\n2013;7.5;;\n2013;7.5;;\n2013;7.3;;\n2013;7.2;;\n2013;7.2;;\n2013;7.2;;\n2013;6.9;;\n2013;6.7;;\n2014;6.6;;\n2014;6.7;;\n2014;6.7;;\n2014;6.2;;\n2014;6.3;;\n2014;6.1;;\n2014;6.2;;\n2014;6.1;;\n2014;5.9;;\n2014;5.7;;\n2014;5.8;;\n2014;5.6;;\n2015;5.7;;\n2015;5.5;;\n2015;5.4;;\n2015;5.4;;\n2015;5.6;;\n2015;5.3;;\n2015;5.2;;\n2015;5.1;;\n2015;5;;\n2015;5;;\n2015;5.1;;\n2015;5;;\n2016;4.9;;\n2016;4.9;;\n2016;5;;\n2016;5;;\n2016;4.8;;\n2016;4.9;;\n2016;4.8;;\n2016;4.9;;\n2016;5;;\n2016;4.9;;\n2016;4.7;;\n2016;4.7;;\n2017;4.7;;\n2017;4.6;;\n2017;4.4;;\n2017;4.4;;\n2017;4.4;;\n2017;4.3;;\n2017;4.3;;\n2017;4.4;;\n2017;4.2;;\n2017;4.1;;\n2017;4.2;;\n2017;4.1;;\n2018;4.1;;\n2018;4.1;;\n2018;4;;\n2018;4;;\n2018;3.8;;\n2018;4;;\n2018;3.8;;\n2018;3.8;;\n2018;3.7;;\n2018;3.8;;\n2018;3.7;;\n2018;3.9;;\n2019;4;;\n2019;3.8;;\n2019;3.8;;\n2019;3.6;;\n2019;3.6;;\n2019;3.7;;\n2019;3.7;;\n2019;3.7;;\n2019;3.5;;\n2019;3.6;;\n2019;3.5;;\n2019;3.5;;\n2020;3.6;;\n2020 M2;3.5;4.21;Nielsen Pre-Crisis Survey\n2020 M3;4.4;6.32;Nielsen Crisis Wave","seriesMapping":[{"x":0,"y":1},{"x":0,"y":2,"label":3}]}};
  
  var templateDataSettings = {};

  var pluginCode = {};;

  options.data.complete = function(options) {
    const keys = Object.keys(templateDataSettings || {});
    keys.forEach(function(key) {
      const serie = options.series[key];
      (serie.data || []).forEach(function(d, i) {
        if (templateDataSettings[key].data && templateDataSettings[key].data[i]) {
          merge(d, templateDataSettings[key].data[i]);
        }
      })
    })  
    return options;
  }

  merge(options, pluginCode);

  function isNull(what){return(typeof what==='undefined'||what===null)}
  function isStr(what){return(typeof what==='string'||what instanceof String)}
  function isNum(what){return!isNaN(parseFloat(what))&&isFinite(what)}
  function isFn(what){return(what&&(typeof what==='function')||(what instanceof Function))}
  function isArr(what){return(!isNull(what)&&what.constructor.toString().indexOf('Array')>-1)}
  function isBool(what){return(what===!0||what===!1)}
  function isBasic(what){return!isArr(what)&&(isStr(what)||isNum(what)||isBool(what)||isFn(what))}
  function isObj(what){return what&&what.constructor.toString().indexOf('Object')>-1}
  function isEmptyObjectArray(arr){return isObj(arr[0])&&arr.some(function(b){return Object.keys(b).length===0})}
  function merge(a,b){if(!a||!b)return a||b;Object.keys(b).forEach(function(bk){if(isNull(b[bk])||isBasic(b[bk])){a[bk]=b[bk]}else if(isArr(b[bk])){if(isEmptyObjectArray(b[bk]))return;a[bk]=[];b[bk].forEach(function(i){if(isNull(i)||isBasic(i)){a[bk].push(i)}else{a[bk].push(merge(isArr(i)?[]:{},i))}})}else{a[bk]=a[bk]||{};merge(a[bk],b[bk])}});return a}

  function isScriptAlreadyIncluded(src){
    var scripts = document.getElementsByTagName("script");
    for (var i = 0; i < scripts.length; i++) {
      if (scripts[i].hasAttribute('src')) {
        const scriptTag = scripts[i].getAttribute('src') || '';
        if ((scriptTag.indexOf(src) >= 0) || 
            (scriptTag.indexOf('highcharts.src.js') > -1 && src === 'highcharts.js') ||
            ((scriptTag.indexOf('stock/highstock.js') > -1) && src === 'modules/highstock.js')) {
          return true;
        }
      }
    }
    return false;
  }

  function loadCSS() {
    var cssLength = externalCSS.length;
    for(var i=0; i < cssLength; i++) {
      var css = document.createElement('link');
      css.rel  = 'stylesheet';
      css.type = "text/css";
      css.href = externalCSS[i];
      document.body.appendChild(css);
    }
  }

  function createChart() {
    if(chartCreated) return;

    if (typeof window['Highcharts'] !== 'undefined') {
      

      if (options && (options.lang || options.global)) {
        Highcharts.setOptions({
          global: options.global || {},
          lang: options.lang || {}
        });
      }

      if (Highcharts.Annotation) {
        Highcharts.Annotation.ControlPoint.prototype.redraw = function (animation) {
          this.graphic[animation ? 'animate' : 'attr'](
              this.options.positioner ? this.options.positioner.call(this, this.target) : null
          );
        };
      }
      
      chartCreated = true;
      window.HighchartsCloud.hasLoaded = true;
      new Highcharts.Chart('highcharts-Z0q7GYdY-', options);
    }
  }

  function check(scripts, cb) {
    if (loaded === scripts.length) {
      if (cb) {
        cb();
      } else {
        for (var i = 0; i < window.HighchartsCloud.ondone.length; i++) {
          try {
            window.HighchartsCloud.ondone[i]();
          } catch(e) {
            console.error(e);
          }
        }
      }
    }
  }

  function loadScript(s, scripts, cb) {
    if (!s) next();
    
    function next() {
      ++loaded;
      if (loaded < scripts.length) {
        loadScript(scripts[loaded], scripts, cb);
      }
      check(scripts, cb);
    }

    if (isScriptAlreadyIncluded(s)) {
      return next();
    }

    var n = document.createElement('script');

    n.onload = function () {
      next();
    };

    if (s.indexOf('https') >= 0) {
      n.src = s;
    } else {
      n.src = cdn + s;
    }
    document.body.appendChild(n);
  }

  function loadExtraScripts(){
    if (extraScripts.length > 0) {
      loaded = 0;
      loadScript(extraScripts[0], extraScripts);
    } else {
      check(scripts);
    }
  }

  function loadExtraScriptsAndMakeChart(){
    loaded = 0;
    if (extraScripts.length > 0) {
      loadScript(extraScripts[0], extraScripts, createChart);
    } else {
      check(extraScripts);
    }
  }

  if (typeof window['HighchartsCloud'] === 'undefined') {
    window.HighchartsCloud = {
      ondone: [createChart],
      hasWrapped: false,
      hasLoaded: false
    };

    loadScript(scripts[0], scripts, loadExtraScripts);
    loadCSS();

  } else {
    if (!window.HighchartsCloud.hasLoaded) window.HighchartsCloud.ondone.push(loadExtraScriptsAndMakeChart);
    else loadExtraScriptsAndMakeChart();
  }

}());
