(function(){"use strict";function u(n){var i,u;n!==undefined&&n!==null&&(i=r(n),i.key||i.source)&&(i.dependsOn===undefined||i.dependsOn===""?(u=t(i),document.body.appendChild(u)):window.addEventListener(i.dependsOn,i.loadScriptCallback))}function n(){for(var t,n=document.getElementsByClassName("async-script"),i=0;i<n.length;i++)u(n[i]);for(t=0;t<n.length;t++)n[t].parentNode.removeChild(n[t])}var i=function(n){var t=document.createEvent("Event");t.initEvent(n,!1,!1);window.dispatchEvent(t)},t=function(n){var t=document.createElement("script");return t.src=n.source,t.readyState?t.onreadystatechange=function(){(t.readyState==="loaded"||t.readyState==="complete")&&(t.onreadystatechange=null,n.dispatchReady())}:t.onload=function(){n.dispatchReady()},t},r=function(n){var r={key:n.getAttribute("data-key"),source:n.getAttribute("data-source"),dependsOn:n.getAttribute("data-depends-on")};return r.dispatchReady=function(){i(r.key)},r.loadScriptCallback=function(){var n=t(r);document.body.appendChild(n)},r};window.addEventListener?window.addEventListener("load",n,!1):window.attachEvent?window.attachEvent("onload",n):window.onload=n})()