!function(d){d.waitFor=function(c,f,r){return function(t,n){function i(){e!==undefined&&(clearInterval(e),e=undefined),u!==undefined&&(clearTimeout(u),u=undefined)}function o(){a||"undefined"==typeof d[c]||("function"!=typeof f||f.call(d[c]))&&(i(),a=!0,"function"==typeof t&&t.call(d[c],d[c]))}var e,u,a=!1;u=setTimeout(function(){if(!a){var t="not loaded component ["+c+"] in "+waitFor.timeout;i(),"function"==typeof n?n.call(this,t):console.warn(t)}},waitFor.timeout),e=setInterval(o,r||waitFor.tick),o()}},d.waitFor.timeout=waitFor.timeout||3e4,d.waitFor.tick=waitFor.tick||100}(window);