Вход Регистрация
Файл: touchSpace/js/loader.js
Строк: 268
<?php
function init_sound_manager(e){require("lib_soundmanager",function(){soundManager.onready(e)})}var Loader=function(){function e(e,s,t){var r,n;"string"==typeof s&&(r={},r[s]=t,s=r),n=y[e],n.internal=extend(n.internal||{init:null,onRequest:null},s),_[e]&&n.internal.onRequest&&n.internal.onRequest(),n.state==v&&n.internal.init&&n.internal.init()}function s(e,r,o){var i,a,l,c,d;for(instanceof Array||(e=[e]),i=0,a=0;a<e.length;++a)l=e[a],c=y[l],c?(c.name=l,c.state=c.state||0,d=f[l],d?r&&d.cb[o?"unshift":"push"](r):d={mod:c,cb:r?[r]:[]},c.state==v?t(d):(f[l]=d,c.deps&&c.deps.length&&s(c.deps),c.preload&&c.preload.length&&s(c.preload),++i)):console.error("Module "+l+" not found!");i&&n()}function t(e){var s,t,r=!0;if(e.mod.state!=v&&(e.mod.state=b,e.mod.deps))for(s=0;s<e.mod.deps.length;++s)if(y[e.mod.deps[s]].state!=v){r=!1;break}if(t=!1,r){for(delete f[e.mod.name],e.mod.state!=v&&(e.mod.state=v,e.mod.init&&e.mod.init(),e.mod.internal&&e.mod.internal.init&&e.mod.internal.init(),t=!0),_[e.mod.name]||(_[e.mod.name]=1,e.mod.onRequest&&e.mod.onRequest(),e.mod.internal&&e.mod.internal.onRequest&&e.mod.internal.onRequest()),s=0;s<e.cb.length;++s)e.cb[s]&&e.cb[s]();e.cb=[]}return t}function r(e){if(this.parentNode){if(this._done||this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState)return;this._done=!0,this.onload=this.onreadystatechange=null,h[this.script_name]=2}0==--e.mod._scripts&&(t(e),n())}function n(){var e,s,o,i;if(g)for(;;){e=!0;for(s in f)if(o=f[s],o.mod.state)o.mod.state!=j&&t(o)&&(e=!1);else if(o.mod.state=j,o.mod.preSetup&&o.mod.preSetup.apply(o.mod,[o.mod]),o.mod.scripts&&o.mod.scripts.length){if(o.mod._scripts=o.mod.scripts.length,o.mod.styles)for(i=0;i<o.mod.styles.length;i++)document.body.insertBefore(ce("link",{type:"text/css",rel:"stylesheet",href:l(o.mod.styles[i],CSS_URL,REVISION)}),document.body.firstChild);for(i=0;i<o.mod.scripts.length;++i)u(l(o.mod.scripts[i],BASE_URL,REVISION),mk_callback(null,r,[o]))}else t(o),n();if(e)break}}function o(){var e,s,t=document.getElementsByTagName("script"),r=document.location.protocol+"//"+document.location.hostname;for(e=0;e<t.length;++e)s=t[e],s.parentNode&&s.src&&0==s.src.indexOf(r)&&(h[p(s.src)]=1)}function i(){o(),g||(g=document.getElementsByTagName("head")[0],n()),document.body.className+=" js-on"}function a(){o()}function l(e,s,t){return s=d(s),0==e.indexOf(s+"/")?c(e,t):0==e.indexOf("http:")||0==e.indexOf("https:")?e:"/"==e.charAt(0)?c(s+e,t):c(s+"/"+e,t)}function c(e,s){var t=e.indexOf("?");return t>0&&(e=e.substr(0,t)),s?e+"?r="+s:e}function d(e){return"/"==e.charAt(0)?location.protocol+"://"+location.host+e:e}function p(e){return l(e,BASE_URL,null)}function u(e,s){var t=p(e);return h[t]?void s():void g.appendChild(ce("script",{script_name:t,src:e,type:"text/javascript",async:"async",_done:!1,onreadystatechange:s,onload:s}))}function m(e,s){var t,r;for(e.length||s&&setTimeout(s,0);e.length>0;){if(t=e.shift(),t.src){r=document.createElement("script"),r.src=t.src,r.type="text/javascript",r.async="async",r.onload=function(){Loader.loadScripts(e,s)},t.parentElement?t.parentElement.replaceChild(r,t):g.appendChild(r),t=null;break}setTimeout(t.textContent,0),0==e.length&&s&&setTimeout(s,0)}}var f={},_={},h={},y={},g=null,j=1,b=2,v=3;return{require:s,loadScripts:m,onDomReady:a,init:i,define:e,config:function(e){y=e},onNewRequestHandler:function(){_={}}}}();window.require=Loader.require,window.module_init=function(e,s){return Loader.require(e,s,!0)},window.define=Loader.define,Loader.config({lib_soundmanager:{scripts:["libs/soundmanager2-nodebug-jsmin.js"],init:function(){soundManager.setup({url:BASE_URL+"/libs/",flashVersion:9,preferFlash:!1,flashLoadTimeout:0}),"complete"===document.readyState&&soundManager.beginDelayedInit()}},lib_filesuploader:{scripts:["libs/FilesUploader.js"]},read_full:{scripts:["tools.js"]},form:{scripts:["form_controls.js"]},gallery:{scripts:["gallery.js"],styles:["Files/Gallery.css"]},dd_menu:{scripts:["dd_menu.js"]},player:{deps:["lib_soundmanager"],scripts:["player_main.js"]},files_uploader:{deps:["lib_filesuploader"],scripts:["files_uploader.js"]},mail:{deps:["form_toolbar","gallery","player","video_player"],scripts:["Mail_ajax.js","mail.js"]},private_chat:{deps:["gallery","player","video_player"],scripts:["PrivateChat_PC.js"]},sharing_buttons:{scripts:["socialButtons.js"]},video_player:{scripts:["cookie.js","libs/jwplayer.js","video_player.js"]},search_suggests:{scripts:["search_suggests.js"]},toggle_list:{scripts:["toggle_list.js"]},subscribe:{scripts:["subscribe.js"]},gifts:{scripts:["gifts.js"]},date_selector:{deps:["dd_menu"],styles:["Anketa/date_selector.css"],scripts:["date_selector.js"]},form_toolbar:{styles:["CommentWidget/toolbar.css"],scripts:["form_toolbar.js"],preSetup:function(){window.jQuery&&(this.scripts=this.scripts.concat("form_toolbar.extended.js","form_toolbar.smiles_data.js"))}},city_selector:{scripts:["city_selector.js"]},users_selector:{scripts:["users_selector.js"]},search_city:{deps:["dd_menu"],styles:["Search/search_city.css"],scripts:["search_city.js"]},likes:{scripts:["Likes_ajax.js"]},slider:{styles:["Anketa/AvatarSelector.css"],scripts:["slider.js"]},avatar_change:{styles:["Anketa/AvatarSelector.css"],deps:["dd_menu"],preload:["avatar_change_modules"],scripts:["avatar_change.js"]},avatar_change_modules:{deps:["files_uploader","files_selector","slider"]},files_selector:{styles:["Files/Gallery.css"],scripts:["files_selector.js"]},wemcamjs:{scripts:["libs/webcam.min.js"]},search_universal:{deps:["dd_menu"],styles:["Search/search_city.css"],scripts:["search_universal.js"]},class_letter:{deps:["form","dd_menu"],styles:["Anketa/class_selector.css"],scripts:["class_selector.js"]},select_text:{scripts:["select_text.js"]},invite:{deps:["placeholder"],scripts:["invite.js"]},placeholder:{scripts:["placeholder.js"]},devmenu:{scripts:["devmenu.js"]},footer:{scripts:["footer.js"]},ga:{scripts:["ga.js"],preSetup:function(){var e=document.location.href,s=document.title;require("ga",function(){__ga("send","pageview",{page:e,title:s})})}}});
?>
Онлайн: 0
Реклама