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