(function(){var g={};
(function(window){%output%}.bind(g,this))();
if (typeof(module)!="undefined"&&module.exports)module.exports=g.shaka;
else if (typeof(define)!="undefined")define(function(){return g.shaka});
else this.shaka=g.shaka;
})();

(function(){var g={};
(function(window){%output%}.bind(g,this))();
if (typeof(module)!="undefined"&&module.exports)module.exports=g.shaka;
else if (typeof(define)!="undefined" && define.amd)define(function(){return g.shaka});
else this.shaka=g.shaka;
})();

Check for define.amd along with typeof(define)