(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/WLZ5JwXa1');
  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 = [
      ];

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

  var options = {"title":{"text":"Clash of games","align":"left","x":10},"subtitle":{"text":"Some mobile apps' daily sessions have risen, while others' remain flat","align":"left","x":10},"colors":["#235A61","#DD495E","#2A2383","#F2C60E","#24CBE5","#64E572","#FF9655","#FFF263","#6AF9C4"],"legend":{"align":"left","verticalAlign":"top","itemMarginBottom":10,"x":0,"symbolRadius":2},"plotOptions":{"series":{"marker":{"enabled":false},"lineWidth":3,"animation":false}},"chart":{},"credits":{"text":"Powered by Everviz","href":"https://app.everviz.com","enabled":true,"style":{"font-size":"16px"}},"series":[{"data":[],"turboThreshold":0,"_colorIndex":0,"_symbolIndex":0,"type":"line"},{"data":[],"turboThreshold":0,"_colorIndex":1,"_symbolIndex":0,"type":"line"},{"data":[],"turboThreshold":0,"_colorIndex":2,"_symbolIndex":0,"type":"line"},{"data":[],"turboThreshold":0,"_colorIndex":3,"_symbolIndex":0,"type":"line"},{"data":[],"turboThreshold":0,"_colorIndex":4,"_symbolIndex":0,"type":"line"},{"data":[],"turboThreshold":0,"_colorIndex":5,"_symbolIndex":0,"type":"line"}],"yAxis":{"title":{"text":""},"labels":{"format":"{value}m"}},"tooltip":{"valueSuffix":"m sessions"},"caption":{"text":"SOURCE: Apptopia"},"annotations":[],"data":{"csv":"Date;Fortnite;Disney+;Call of Duty;Twitch;Amazon Prime Video;PUBG Mobile\n01/01/20;8.46;24.82;47.16;12.69;36.01;34.8\n01/02/20;8.48;24.79;46.67;12.82;36.17;34.92\n01/03/20;8.45;24.71;46.31;12.95;36.09;34.89\n01/04/20;8.45;24.66;46.07;12.97;36.14;34.84\n01/05/20;8.42;24.61;45.75;13;36.1;34.57\n01/06/20;8.35;24.67;45.56;13.12;36.21;34.54\n01/07/20;8.32;24.6;45.26;13.2;36.25;34.46\n01/08/20;8.29;24.4;45.09;13.3;36.24;34.42\n01/09/20;8.27;24.19;44.85;13.32;36.13;34.29\n01/10/20;8.2;24.22;44.75;13.39;36.1;34.24\n01/11/20;8.15;23.98;44.38;13.39;35.99;34.27\n01/12/20;8.16;23.89;44.06;13.45;36.11;34.21\n01/13/20;8.07;23.56;43.69;13.39;35.89;33.93\n01/14/20;8.05;23.41;43.54;13.57;35.97;34.23\n01/15/20;7.97;23.16;43.34;13.53;35.94;34.24\n01/16/20;7.92;23.03;43.04;13.59;35.95;34.08\n01/17/20;7.94;22.72;42.92;13.7;35.89;34.03\n01/18/20;8.04;22.53;42.55;13.8;35.74;33.82\n01/19/20;8.06;22.43;42.36;13.93;35.81;33.67\n01/20/20;8.04;22.06;42.03;14;35.74;33.53\n01/21/20;7.99;21.74;41.84;14.13;35.77;33.5\n01/22/20;7.93;21.62;41.55;14.09;35.82;33.44\n01/23/20;7.93;21.34;41.21;14.13;35.68;33.26\n01/24/20;7.93;21.14;40.83;14.21;35.64;32.67\n01/25/20;7.95;20.79;40.71;14.15;35.7;32.66\n01/26/20;7.97;20.6;40.25;14.11;35.7;32.37\n01/27/20;7.92;20.35;39.92;14.15;35.69;32.29\n01/28/20;7.85;20.12;39.51;14.23;35.77;32.24\n01/29/20;7.82;19.93;39.1;14.32;35.74;32.18\n01/30/20;7.79;19.64;38.88;14.39;35.66;32.16\n01/31/20;7.72;19.39;38.8;14.56;35.68;32.21\n02/01/20;7.74;18.79;38.6;13.64;35.38;32.11\n02/02/20;7.76;19.03;35.64;13.49;35.94;31.5\n02/03/20;7.68;18.88;38.48;14.61;35.95;32.47\n02/04/20;7.56;18.64;37.84;14.65;35.91;32.38\n02/05/20;7.46;18.39;37.52;14.71;35.87;32.36\n02/06/20;7.41;18.21;37.25;14.73;35.85;32.25\n02/07/20;7.39;18.02;37.07;14.74;35.78;32.28\n02/08/20;7.47;17.79;36.76;14.98;35.63;31.85\n02/09/20;7.46;17.7;36.44;14.74;35.63;31.96\n02/10/20;7.41;17.51;36.13;14.84;35.5;32.07\n02/11/20;7.37;17.23;35.84;14.77;35.54;31.77\n02/12/20;7.35;17.06;35.73;14.82;35.5;31.68\n02/13/20;7.27;16.88;35.46;14.82;35.43;31.71\n02/14/20;7.2;16.71;35.19;14.75;35.31;32.07\n02/15/20;7.25;16.46;34.92;14.72;35.3;31.99\n02/16/20;7.23;16.23;34.64;14.72;35.27;31.79\n02/17/20;7.19;16.08;34.35;14.81;35.2;31.68\n02/18/20;7.09;15.93;34.15;14.87;35.28;31.57\n02/19/20;7.05;15.72;33.87;14.95;35.28;31.5\n02/20/20;7.09;15.57;33.53;15.02;35.18;31.43\n02/21/20;7.25;15.37;33.4;15.01;35.17;31.39\n02/22/20;7.37;15.19;33.05;15.05;35.11;31.43\n02/23/20;7.51;15.07;32.82;15.09;35.09;31.28\n02/24/20;7.61;14.94;32.65;15.1;35.22;31.27\n02/25/20;7.64;14.87;32.46;15.15;35.22;31.29\n02/26/20;7.68;14.65;32.33;15.14;35.23;31.33\n02/27/20;7.76;14.52;32.13;15.23;35.3;31.3\n02/28/20;7.79;14.31;31.94;15.24;35.3;31.17\n02/29/20;7.73;14.23;31.66;15.26;35.3;30.96\n03/01/20;7.73;14.05;31.52;15.28;35.41;30.92\n03/02/20;7.63;13.9;31.35;15.36;35.5;30.77\n03/03/20;7.59;13.75;31.17;15.33;35.58;30.7\n03/04/20;7.53;13.56;31.07;15.34;35.58;30.78\n03/05/20;7.48;13.46;30.96;15.34;35.52;30.94\n03/06/20;7.49;13.36;30.92;15.31;35.62;31.25\n03/07/20;7.55;13.24;30.83;15.33;35.61;31.42\n03/08/20;7.58;13.03;30.69;15.35;35.65;31.58\n03/09/20;7.56;12.96;30.54;15.4;35.68;31.59\n03/10/20;7.54;12.85;30.4;15.43;35.72;31.83\n03/11/20;7.51;12.68;30.22;15.46;35.77;31.91\n03/12/20;7.46;12.57;30.11;15.44;35.73;31.97\n03/13/20;7.42;12.4;29.87;15.48;35.53;31.9\n03/14/20;7.46;12.33;29.63;15.43;35.44;31.91\n03/15/20;7.46;12.25;29.58;15.58;35.47;31.9\n03/16/20;7.43;12.16;29.6;15.68;35.6;32.09\n03/17/20;7.39;12.2;29.61;15.68;35.57;32.11\n03/18/20;7.39;12.26;29.32;15.75;35.53;32.2\n03/19/20;7.37;12.23;29.59;15.88;35.54;32.42\n03/20/20;7.33;12.28;29.54;15.94;35.52;32.48\n03/21/20;7.33;12.27;29.57;16.16;35.61;32.55\n03/22/20;7.3;12.32;29.37;16.32;35.82;32.55\n03/23/20;7.27;12.35;29.58;16.61;36.1;32.59\n03/24/20;7.24;12.73;29.67;16.7;36.22;32.8\n03/25/20;7.21;13.35;29.79;16.74;36.43;32.3\n03/26/20;7.2;13.76;29.85;16.9;36.69;32.34\n03/27/20;7.23;14.19;30.04;17.03;36.85;32.93\n03/28/20;7.22;14.72;30.07;17.32;37.25;33.07\n03/29/20;7.2;15.01;30.04;17.52;37.57;33.16\n03/30/20;7.25;15.35;30.04;17.73;37.96;33.33\n03/31/20;7.26;15.64;30.1;17.85;38.17;33.43\n04/01/20;7.28;15.81;29.96;17.98;38.45;33.45\n04/02/20;7.29;16.06;29.86;18.12;38.49;33.66\n04/03/20;7.3;16.25;30.02;18.34;38.62;33.62\n04/04/20;7.33;16.43;30.03;18.52;38.77;33.68\n04/05/20;7.37;16.6;30.09;18.88;39;33.76\n04/06/20;7.39;16.84;30.1;19.18;39.15;33.99\n04/07/20;7.42;17.15;30.18;19.36;39.36;34.08\n04/08/20;7.46;17.51;30.03;19.46;39.35;33.85","seriesMapping":[{"x":0,"y":1},{"x":0,"y":2},{"x":0,"y":3},{"x":0,"y":4},{"x":0,"y":5},{"x":0,"y":6}]},"stockTools":{"gui":{"enabled":false}}};
  
  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-WLZ5JwXa1', 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();
  }

}());
