text: !function(t){t.juggle||(t.juggle={});t.juggle.tools=new function(){this.indexOf=function(t,e){var i=-1;if(null===t||null===e)return i;for(var s=0;s<t.length;s++)if(t[s]===e){i=s;break}return i},this.isNull=function(t){return null===t||void 0===t}}}(window),function(t){t.juggle||(t.juggle={});var e=t.juggle.tools;t.juggle.Event=function(t,i,s){this.mTarget=null,this.mCurrentTarget=null,this.mType=null,this.mBubbles=null,this.mStopsPropagation=null,this.mStopsImmediatePropagation=null,this.mData=null,this.stopPropagation=function(){this.mStopsPropagation=!0},this.stopImmediatePropagation=function(){this.mStopsPropagation=this.mStopsImmediatePropagation=!0},this.reset=function(t,i,s){return e.isNull(i)&&(i=!1),e.isNull(s)&&(s=null),this.mType=t,this.mBubbles=i,this.mData=s,this.mTarget=this.mCurrentTarget=null,this.mStopsPropagation=this.mStopsImmediatePropagation=!1,this},this.reset(t,i,s)}}(window),function(t){t.juggle||(t.juggle={});var e=t.juggle.Event;t.juggle.eventPool=new function(){this.sEventPool=[],this.fromPool=function(t,i,s){return this.sEventPool.length?this.sEventPool.pop().reset(t,i,s):new e(t,i,s)},this.toPool=function(t){t.mData=t.mTarget=t.mCurrentTarget=null,this.sEventPool[this.sEventPool.length]=t}}}(window),function(t){t.juggle||(t.juggle={});var e=t.juggle.eventPool,i=t.juggle.tools,s=[];t.juggle.EventDispatcher=function(){this.mEventListeners=null,this.isEventDispatcher=!0,this.functionMapping=[],this.addEventListener=function(t,e,s){i.isNull(this.mEventListeners)&&(this.mEventListeners=[]);var n=this.mEventListeners[t];i.isNull(n)?(this.mEventListeners[t]=[e],this.functionMapping[e]=s):-1===i.indexOf(n,e)&&(n.push(e),this.functionMapping[e]=s)},this.removeEventListener=function(t,e){if(this.mEventListeners){var i=this.mEventListeners[t],s=i?i.length:0;if(s>0){for(var n=0,l=[],o=0;o<s;++o){var a=i[o];a!==e&&(l[n++]=a)}this.mEventListeners[t]=l}}},this.removeEventListeners=function(t){t&&this.mEventListeners?delete this.mEventListeners[t]:this.mEventListeners=null},this.dispatchEvent=function(t){var e=t.mBubbles;if(e||!i.isNull(this.mEventListeners)&&t.mType in this.mEventListeners){var s=t.mTarget;t.mTarget=this,e&&this.isDisplayObject?this.bubbleEvent(t):this.invokeEvent(t),s&&(t.mTarget=s)}},this.invokeEvent=function(t){var e=this.mEventListeners?this.mEventListeners[t.mType]:null,s=i.isNull(e)?0:e.length;if(s){t.mCurrentTarget=this;for(var n=0;n<s;++n){var l=e[n],o=l.length;if(0===o?l.call(this.functionMapping[l]):1===o?l.call(this.functionMapping[l],t):l.call(this.functionMapping[l],t,t.mData),t.mStopsImmediatePropagation)return!0}return t.mStopsPropagation}return!1},this.bubbleEvent=function(t){var e,n=this,l=1;for(s.length>0?(e=s.pop())[0]=n:e=[n];!i.isNull(n=n.parent);)e[l++]=n;for(var o=0;o<l&&!e[o].invokeEvent(t);++o);e.length=0,s.push(e)},this.dispatchEventWith=function(t,s,n){if(i.isNull(s)&&(s=!1),i.isNull(n)&&(n=null),s||this.hasEventListener(t)){var l=e.fromPool(t,s,n);this.dispatchEvent(l),e.toPool(l)}},this.hasEventListener=function(t){var e=this.mEventListeners?this.mEventListeners[t]:null;return!!e&&0!==e.length}}}(window),function(t){t.juggle||(t.juggle={});t.juggle.jugglerEventType=new function(){this.REMOVE_FROM_JUGGLER="removeFromJuggler"}}(window),function(t){t.juggle||(t.juggle={});var e=t.juggle.tools,i=t.juggle.jugglerEventType;t.juggle.Juggler=function(){this.mObjects=[],this.mElapsedTime=0,this.add=function(t){t&&-1===e.indexOf(this.mObjects,t)&&(this.mObjects[this.mObjects.length]=t,t.isEventDispatcher&&t.addEventListener(i.REMOVE_FROM_JUGGLER,this.onRemove,this))},this.contains=function(t){return-1!==e.indexOf(this.mObjects,t)},this.remove=function(t){if(!e.isNull(t)){t.isEventDispatcher&&t.removeEventListener(i.REMOVE_FROM_JUGGLER,this.onRemove);var s=e.indexOf(this.mObjects,t);-1!==s&&(this.mObjects[s]=null)}},this.advanceTime=function(t){var e,i=this.mObjects.length,s=0;if(this.mElapsedTime+=t,0!==i){for(e=0;e<i;++e){var n=this.mObjects[e];n&&(s!==e&&(this.mObjects[s]=n,this.mObjects[e]=null),n.advanceTime(t),++s)}if(s!==e){for(i=this.mObjects.length;e<i;)this.mObjects[s++]=this.mObjects[e++];this.mObjects.length=s}}},this.onRemove=function(t){this.remove(t.mTarget)}}}(window),function(t){t.juggle||(t.juggle={});var e=t.juggle.Juggler;t.juggle.jugglerManager=new function(){this.onEnterFrame=function(){var t=(new Date).getTime(),e=(t-juggle.jugglerManager.processTime)/1e3;juggle.jugglerManager.processTime=t,0===e||this.isStop||juggle.jugglerManager.juggler.advanceTime(e)},this.processTime=(new Date).getTime(),this.juggler=new e,this.intervalId=setInterval(this.onEnterFrame,25),this.isStop=!1}}(window),function(t){t.juggle||(t.juggle={});t.juggle.transitions=new function(){this.LINEAR="linear",this.EASE_IN="easeIn",this.EASE_OUT="easeOut",this.EASE_IN_OUT="easeInOut",this.EASE_OUT_IN="easeOutIn",this.EASE_IN_BACK="easeInBack",this.EASE_OUT_BACK="easeOutBack",this.EASE_IN_OUT_BACK="easeInOutBack",this.EASE_OUT_IN_BACK="easeOutInBack",this.EASE_IN_ELASTIC="easeInElastic",this.EASE_OUT_ELASTIC="easeOutElastic",this.EASE_IN_OUT_ELASTIC="easeInOutElastic",this.EASE_OUT_IN_ELASTIC="easeOutInElastic",this.EASE_IN_BOUNCE="easeInBounce",this.EASE_OUT_BOUNCE="easeOutBounce",this.EASE_IN_OUT_BOUNCE="easeInOutBounce",this.EASE_OUT_IN_BOUNCE="easeOutInBounce",this.sTransitions=null,this.getTransition=function(t){return null===this.sTransitions&&this.registerDefaults(),this.sTransitions[t]},this.register=function(t,e){null===this.sTransitions&&this.registerDefaults(),this.sTransitions[t]=e},this.registerDefaults=function(){this.sTransitions=[],this.register(this.LINEAR,this.linear),this.register(this.EASE_IN,this.easeIn),this.register(this.EASE_OUT,this.easeOut),this.register(this.EASE_IN_OUT,this.easeInOut),this.register(this.EASE_OUT_IN,this.easeOutIn),this.register(this.EASE_IN_BACK,this.easeInBack),this.register(this.EASE_OUT_BACK,this.easeOutBack),this.register(this.EASE_IN_OUT_BACK,this.easeInOutBack),this.register(this.EASE_OUT_IN_BACK,this.easeOutInBack),this.register(this.EASE_IN_ELASTIC,this.easeInElastic),this.register(this.EASE_OUT_ELASTIC,this.easeOutElastic),this.register(this.EASE_IN_OUT_ELASTIC,this.easeInOutElastic),this.register(this.EASE_OUT_IN_ELASTIC,this.easeOutInElastic),this.register(this.EASE_IN_BOUNCE,this.easeInBounce),this.register(this.EASE_OUT_BOUNCE,this.easeOutBounce),this.register(this.EASE_IN_OUT_BOUNCE,this.easeInOutBounce),this.register(this.EASE_OUT_IN_BOUNCE,this.easeOutInBounce)},this.linear=function(t){return t},this.easeIn=function(t){return t*t*t},this.easeOut=function(t){var e=t-1;return e*e*e+1},this.easeInOut=function(t){return this.easeCombined(this.easeIn,this.easeOut,t)},this.easeOutIn=function(t){return this.easeCombined(this.easeOut,this.easeIn,t)},this.easeInBack=function(t){var e=1.70158;return Math.pow(t,2)*((e+1)*t-e)},this.easeOutBack=function(t){var e=t-1,i=1.70158;return Math.pow(e,2)*((i+1)*e+i)+1},this.easeInOutBack=function(t){return this.easeCombined(this.easeInBack,this.easeOutBack,t)},this.easeOutInBack=function(t){return this.easeCombined(this.easeOutBack,this.easeInBack,t)},this.easeInElastic=function(t){if(0===t||1===t)return t;var e=t-1;return-1*Math.pow(2,10*e)*Math.sin((e-.075)*(2*Math.PI)/.3)},this.easeOutElastic=function(t){return 0===t||1===t?t:Math.pow(2,-10*t)*Math.sin((t-.075)*(2*Math.PI)/.3)+1},this.easeInOutElastic=function(t){return this.easeCombined(this.easeInElastic,this.easeOutElastic,t)},this.easeOutInElastic=function(t){return this.easeCombined(this.easeOutElastic,this.easeInElastic,t)},this.easeInBounce=function(t){return 1-this.easeOutBounce(1-t)},this.easeOutBounce=function(t){var e,i=7.5625,s=2.75;return t<1/s?e=i*Math.pow(t,2):t<2/s?(t-=1.5/s,e=i*Math.pow(t,2)+.75):t<2.5/s?(t-=2.25/s,e=i*Math.pow(t,2)+.9375):(t-=2.625/s,e=i*Math.pow(t,2)+.984375),e},this.easeInOutBounce=function(t){return this.easeCombined(this.easeInBounce,this.easeOutBounce,t)},this.easeOutInBounce=function(t){return this.easeCombined(this.easeOutBounce,this.easeInBounce,t)},this.easeCombined=function(t,e,i){return i<.5?.5*t.call(juggle.transitions,2*i):.5*e.call(juggle.transitions,2*(i-.5))+.5}}}(window),function(t){t.juggle||(t.juggle={});var e=t.juggle.tools,i=t.juggle.EventDispatcher,s=t.juggle.transitions,n=t.juggle.jugglerEventType;t.juggle.Tween=function(t,l,o){this.mTarget=null,this.mTransitionFunc=null,this.mProperties=null,this.mStartValues=null,this.mEndValues=null,this.mOnStart=null,this.mOnUpdate=null,this.mOnRepeat=null,this.mOnComplete=null,this.mOnStartArgs=null,this.mOnUpdateArgs=null,this.mOnRepeatArgs=null,this.mOnCompleteArgs=null,this.mTotalTime=null,this.mCurrentTime=null,this.mDelay=null,this.mRoundToInt=!1,this.mRepeatCount=null,this.mRepeatDelay=null,this.mReverse=null,this.mCurrentCycle=null,this.reset=function(t,i,s){return e.isNull(s)&&(s="linear"),this.mTarget=t,this.mCurrentTime=0,this.mTotalTime=Math.max(1e-4,i),this.mDelay=this.mRepeatDelay=0,this.mOnStart=this.mOnUpdate=this.mOnRepeat=this.mOnComplete=null,this.mOnStartArgs=this.mOnUpdateArgs=this.mOnRepeatArgs=this.mOnCompleteArgs=null,this.mRoundToInt=this.mReverse=!1,this.mRepeatCount=1,this.mCurrentCycle=-1,this.setTransition(s),this.mProperties?this.mProperties.length=0:this.mProperties=[],this.mStartValues?this.mStartValues.length=0:this.mStartValues=[],this.mEndValues?this.mEndValues.length=0:this.mEndValues=[],this},this.animate=function(t,i,s){e.isNull(this.mTarget)||(this.mProperties[this.mProperties.length]=i,this.mStartValues[this.mStartValues.length]=t.call(this.mTarget),this.mEndValues[this.mEndValues.length]=s)},this.advanceTime=function(t){if(0!==t&&(1!==this.mRepeatCount||this.mCurrentTime!==this.mTotalTime)){var i,l=this.mTotalTime-this.mCurrentTime,o=t>l?t-l:0;if(this.mCurrentTime+=t,!(this.mCurrentTime<=0)){this.mCurrentTime>this.mTotalTime&&(this.mCurrentTime=this.mTotalTime),this.mCurrentCycle<0&&(this.mCurrentCycle++,e.isNull(this.mOnStart)||this.mOnStart.call(this,this.mOnStartArgs));var a=this.mCurrentTime/this.mTotalTime,r=this.mReverse&&this.mCurrentCycle%2==1,h=this.mStartValues.length,u=r?this.mTransitionFunc.call(s,1-a):this.mTransitionFunc.call(s,a);for(i=0;i<h;++i){var g=this.mStartValues[i],m=g+u*(this.mEndValues[i]-g);this.mRoundToInt&&(m=Math.round(m)),this.mProperties[i].call(this.mTarget,m)}if(e.isNull(this.mOnUpdate)||this.mOnUpdate.call(this,this.mOnUpdateArgs),this.mCurrentTime===this.mTotalTime)if(0===this.mRepeatCount||this.mRepeatCount>1)this.mCurrentTime=-this.mRepeatDelay,this.mCurrentCycle++,this.mRepeatCount>1&&this.mRepeatCount--,e.isNull(this.mOnRepeat)||this.mOnRepeat.call(this,this.mOnRepeatArgs);else{var c=this.mOnComplete,E=this.mOnCompleteArgs;this.dispatchEventWith(n.REMOVE_FROM_JUGGLER),e.isNull(c)||c.call(this,E)}o&&this.advanceTime(o)}}},this.isComplete=function(){return this.mCurrentTime===this.mTotalTime&&1===this.mRepeatCount},this.setTransition=function(t){this.mTransitionFunc=s.getTransition(t)},this.setDelay=function(t){this.mCurrentTime=this.mCurrentTime+this.mDelay-t,this.mDelay=t},this.reset(t,l,o),i.apply(this)}}(window),function(t){t.juggle||(t.juggle={});var e=t.juggle.tools,i=t.juggle.Tween;t.juggle.tweenPool=new function(){this.sTweenPool=[],this.fromPool=function(t,s,n){return e.isNull(n)&&(n="linear"),this.sTweenPool.length?this.sTweenPool.pop().reset(t,s,n):new i(t,s,n)},this.toPool=function(t){t.mOnStart=t.mOnUpdate=t.mOnRepeat=t.mOnComplete=null,t.mOnStartArgs=t.mOnUpdateArgs=t.mOnRepeatArgs=t.mOnCompleteArgs=null,t.mTarget=null,t.mTransitionFunc=null,t.mProperties.length=0,t.mStartValues.length=0,t.mEndValues.length=0,this.sTweenPool[this.sTweenPool.length]=t}}}(window),function(t){t.juggle||(t.juggle={});var e=t.juggle.tools,i=t.juggle.jugglerEventType,s=t.juggle.EventDispatcher;t.juggle.DelayedCall=function(t,n,l){this.mCurrentTime=null,this.mTotalTime=null,this.mCall=null,this.mArgs=null,this.mRepeatCount=null,this.reset=function(t,i,s){return e.isNull(s)&&(s=null),this.mCurrentTime=0,this.mTotalTime=Math.max(i,1e-4),this.mCall=t,this.mArgs=s,this.mRepeatCount=1,this},this.advanceTime=function(t){var e=this.mCurrentTime;if(this.mCurrentTime=Math.min(this.mTotalTime,this.mCurrentTime+t),this.mCurrentTime===this.mTotalTime)if(0===this.mRepeatCount||this.mRepeatCount>1)this.mRepeatCount>0&&(this.mRepeatCount-=1),this.mCurrentTime=0,null===this.mArgs?this.mCall.call(this):this.mCall.call(this,this.mArgs),this.advanceTime(e+t-this.mTotalTime);else{var s=this.mCall,n=this.mArgs;this.dispatchEventWith(i.REMOVE_FROM_JUGGLER),s.call(this,n)}},this.isComplete=function(){return 1===this.mRepeatCount&&this.mCurrentTime===this.mTotalTime},this.reset(t,n,l),s.apply(this)}}(window),function(t){t.juggle||(t.juggle={});var e=t.juggle.tools,i=t.juggle.DelayedCall;t.juggle.delayedCallPool=new function(){this.sDelayedCallPool=[],this.fromPool=function(t,s,n){return e.isNull(n)&&(n=null),this.sDelayedCallPool.length?this.sDelayedCallPool.pop().reset(t,s,n):new i(t,s,n)},this.toPool=function(t){t.mCall=null,t.mArgs=null,this.sDelayedCallPool[this.sDelayedCallPool.length]=t}}}(window),function(t){t.juggle||(t.juggle={});t.juggle.webSocketEventType=new function(){this.CONNECTED="connected",this.CLOSE="close",this.WSMESSAGE="wsmessage",this.getMessage=function(t){return this.WSMESSAGE+"_"+t}}}(window),function(t){t.juggle||(t.juggle={});t.juggle.webSocketConfig=new function(){this.WSOPCODE="wsOpCode"}}(window),function(window){window.juggle||(window.juggle={});var EventDispatcher=window.juggle.EventDispatcher,webSocketEventType=window.juggle.webSocketEventType,webSocketConfig=window.juggle.webSocketConfig,WebSocketClient=function(url){this.webSocket=null,this.isConnected=!1,this.url=url,this.connect=function(){this.webSocket=new WebSocket(this.url),this.onOpenListener(this,this.onOpen),this.onCloseListener(this,this.onClose),this.onErrorListener(this,this.onError),this.onMessageListener(this,this.onMessage)},this.onOpenListener=function(t,e){t.webSocket.onopen=function(i){e.call(t,i)}},this.onCloseListener=function(t,e){t.webSocket.onclose=function(i){e.call(t,i)}},this.onErrorListener=function(t,e){t.webSocket.onerror=function(i){e.call(t,i)}},this.onMessageListener=function(t,e){t.webSocket.onmessage=function(i){e.call(t,i)}},this.onOpen=function(t){this.isConnected=!0,this.dispatchEventWith(webSocketEventType.CONNECTED)},this.send=function(t){if(this.isConnected){var e=new Blob([JSON.stringify(t)]);this.webSocket.send(e)}else alert("未链接至websocket服务器")},this.onMessage=function(event){var data=eval("("+event.data+")");null!==data[webSocketConfig.WSOPCODE]&&void 0!==data[webSocketConfig.WSOPCODE]&&this.dispatchEventWith(webSocketEventType.getMessage(data[webSocketConfig.WSOPCODE]),!1,data)},this.onClose=function(t){this.isConnected=!1,this.dispatchEventWith(webSocketEventType.CLOSE)},this.onError=function(t){},this.close=function(){this.webSocket.close()},EventDispatcher.apply(this),this.connect()};window.juggle.WebSocketClient=WebSocketClient}(window),function(t){t.juggle||(t.juggle={});t.juggle.httpEventType=new function(){this.ERROR="error",this.SUCCESS="success"}}(window),function(t){t.juggle||(t.juggle={});var e=t.juggle.EventDispatcher,i=t.juggle.httpEventType;t.juggle.HttpClient=function(){e.apply(this),this.send=function(t,e,i,s,n){this.data=t,this.url=e,this.header=i;var l=new XMLHttpRequest;if(null===l||void 0===l)return!1;null!==n&&void 0!==n||(n=!0),null!==s&&void 0!==s||(s=null===t||void 0===t?"get":"post"),this.type=s,this.isAsync=n,l.open(s,e,n);for(var o in i)l.setRequestHeader(o,i[o]);this.addHttpListener(this,l,this.sendReturn,t),"post"===s?(l.setRequestHeader("Content-Type","application/json"),l.send(JSON.stringify(t))):l.send()},this.addHttpListener=function(t,e,i,s){e.onreadystatechange=function(n){i.call(t,e,n,s)}},this.sendReturn=function(t,e,s){4===t.readyState&&(200===t.status?this.dispatchEventWith(i.SUCCESS,!1,t.responseText):this.dispatchEventWith(i.ERROR))},this.sendFile=function(t,e,i,s,n,l){this.data=e,this.url=i,this.header=s;var o=new XMLHttpRequest;if(null===o||void 0===o)return!1;null!==l&&void 0!==l||(l=!0),null!==n&&void 0!==n||(n="post"),this.type=n,this.isAsync=l,o.open(n,i,l);for(var a in s)o.setRequestHeader(a,s[a]);this.addHttpListener(this,o,this.sendReturn,e);for(var r=new FormData,h=0;h<t.length;h++){var u=t[h];r.append("file"+h,u)}if(null!==e&&void 0!==e)for(var g in e)r.append(g,e[g]);o.send(r)}}}(window),function(t){t.juggle||(t.juggle={}),t.juggle.resourceEventType=new function(){this.LOAD_COMPLETE="loadComplete",this.LOAD_FAIL="loadFail"}}(window),function(t){t.juggle||(t.juggle={});var e=t.juggle.EventDispatcher,i=t.juggle.HttpClient,s=t.juggle.httpEventType,n=t.juggle.resourceEventType;t.juggle.Loader=function(t,l){this.loadSuccess=function(t){this.resultArray[t.mTarget.url]=t.mData,++this.successNum+this.failNum===this.loadList.length&&(this.failNum>0?this.dispatchEventWith(n.LOAD_FAIL):this.dispatchEventWith(n.LOAD_COMPLETE))},this.loadError=function(t){this.failNum++,this.successNum+this.failNum===this.loadList.length&&this.dispatchEventWith(n.LOAD_FAIL)},this.loadList=t,this.resultArray=[],this.successNum=0,this.failNum=0,this.data=l,e.apply(this);for(var o=0;o<this.loadList.length;o++){var a=new i;a.send(null,this.loadList[o]),a.addEventListener(s.SUCCESS,this.loadSuccess,this),a.addEventListener(s.ERROR,this.loadError,this)}}}(window),function(t){t.juggle||(t.juggle={});var e=t.juggle.Loader,i=t.juggle.resourceEventType;t.juggle.resourceManager=new function(){this.resource=[],this.loadResource=function(t,s,n,l){var o=new e(t,[s,n,l]);o.addEventListener(i.LOAD_COMPLETE,this.loadComplete,this),o.addEventListener(i.LOAD_FAIL,this.loadFail,this)},this.loadComplete=function(t){t.mTarget.removeEventListener(i.LOAD_COMPLETE,this.loadComplete),t.mTarget.removeEventListener(i.LOAD_FAIL,this.loadComplete);for(var e=0;e<t.mTarget.loadList.length;e++){var s=t.mTarget.loadList[e];this.resource[s]=t.mTarget.resultArray[s]}t.mTarget.data[0].call(t.mTarget.data[2],t.mTarget.loadList)},this.loadFail=function(t){t.mTarget.removeEventListener(i.LOAD_COMPLETE,this.loadComplete),t.mTarget.removeEventListener(i.LOAD_FAIL,this.loadComplete),t.mTarget.data[1].call(t.mTarget.data[1],t.mTarget.loadList)},this.getResource=function(t){return this.resource[t]}}}(window),function(t){t.juggle||(t.juggle={});var e=new function(){this.observerMap=[],this.registerObserver=function(t,e){if(null!==t&&void 0!==t&&null!==e&&void 0!==e){var i=this.observerMap[t];if(i){for(var s=!1,n=0;n<i.length;n++)if(i[n]===e){s=!0;break}s||i.push(e)}else this.observerMap[t]=[e]}},this.registerObserverArray=function(t,e){if(null!==t&&void 0!==t&&null!==e&&void 0!==e)for(var i=0;i<t.length;i++)this.registerObserver(t[i],e)},this.getNotification=function(t,e){var i={};return i.name=t,i.body=e,i},this.notifyObservers=function(t){var i=e.observerMap[t.name];if(i)for(var s=i.concat(),n=0;n<s.length;n++){var l=s[n];l.handleNotification.call(l,t)}},this.removeObserverArray=function(t,e){if(null!==t&&void 0!==t&&null!==e&&void 0!==e)for(var i=0;i<t.length;i++)this.removeObserver(t[i],e)},this.removeObserver=function(t,e){if(null!==t&&void 0!==t&&null!==e&&void 0!==e){var i=this.observerMap[t];if(void 0!==i&&null!==i){for(var s=0;s<i.length;s++)if(i[s]===e){i.splice(s,1);break}0===i.length&&delete this.observerMap[t]}}},this.reset=function(){this.observerMap=[]}};t.juggle.Mediator=function(){this.init=function(){e.registerObserverArray(this.listNotificationInterests,this)},this.dispose=function(){e.removeObserverArray(this.listNotificationInterests,this)},this.notifyObservers=e.notifyObservers,this.getNotification=e.getNotification,this.init()},t.juggle.Proxy=function(){this.notifyObservers=e.notifyObservers,this.getNotification=e.getNotification}}(window),function(t){t.juggle||(t.juggle={});var e=t.juggle.resourceManager;t.juggle.moduleManager=new function(){this.moduleUrlToData=[],this.moduleTypeToData=[],this.loadModule=function(t,i,s,n,l){var o={url:t,container:i,type:s,mediator:n,data:l};this.moduleUrlToData[t]=o,e.loadResource([t],this.loadComplete,this.loadFail,this)},this.loadFail=function(t){},this.loadComplete=function(t){var i=this.moduleUrlToData[t[0]];if(null!==i&&void 0!==i){var s=e.getResource(t[0]);if(null!==i.type&&void 0!==i.type){var n=this.moduleTypeToData[i.type];null!==n&&void 0!==n&&n.mediator.dispose(),this.moduleTypeToData[i.type]=i}i.container.innerHTML=s,i.mediator.initView(i.container,i.data)}},this.unLoadModule=function(t){var e=this.moduleUrlToData[t];null!==e&&void 0!==e&&(e.mediator.dispose(),delete this.moduleUrlToData[t],delete this.moduleTypeToData[e.type])}}}(window);