aboutsummaryrefslogtreecommitdiff
path: root/webAO
diff options
context:
space:
mode:
Diffstat (limited to 'webAO')
-rw-r--r--webAO/client.b.js2
-rw-r--r--webAO/client.b.js.map1
-rw-r--r--webAO/client.css6
-rw-r--r--webAO/client.html2
-rw-r--r--webAO/client.js26
-rw-r--r--webAO/golden/LICENSE.txt21
-rw-r--r--webAO/golden/css/goldenlayout.css525
-rw-r--r--webAO/golden/css/goldenlayout.css.map1
-rw-r--r--webAO/golden/js/goldenlayout.js2
-rw-r--r--webAO/golden/js/goldenlayout.js.map1
-rw-r--r--webAO/images/logo-neo.pngbin0 -> 35871 bytes
-rw-r--r--webAO/images/logo-new.pngbin0 -> 29302 bytes
-rw-r--r--webAO/ui.b.js2
-rw-r--r--webAO/ui.b.js.map1
14 files changed, 584 insertions, 6 deletions
diff --git a/webAO/client.b.js b/webAO/client.b.js
index e89bbbf..301300e 100644
--- a/webAO/client.b.js
+++ b/webAO/client.b.js
@@ -1,2 +1,2 @@
-!function(e){var t={};function n(i){if(t[i])return t[i].exports;var c=t[i]={i:i,l:!1,exports:{}};return e[i].call(c.exports,c,c.exports,n),c.l=!0,c.exports}n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.onOOCEnter=g,t.onEnter=f,t.musiclist_click=y,t.changeMusicVolume=v,t.changeSFXVolume=E,t.changeBlipVolume=I,t.changeCharacter=b,t.imgError=_,t.demoError=k,t.ReconnectButton=w,t.RetryButton=x,t.pickchar=M,t.pickemotion=T,t.toggleshout=S;var o={};location.search.substr(1).split("&").forEach(function(e){o[e.split("=")[0]]=e.split("=")[1]});var s=o.ip,a=o.mode,l=o.asset||"http://assets.aceattorneyonline.com/base/",r=l+"sounds/music/",u=!1;/Android|webOS|iPhone|iPad|iPod|BlackBerry|BB|PlayBook|IEMobile|Windows Phone|Kindle|Silk|Opera Mini/i.test(navigator.userAgent)&&(u=!0);var d=0,m=function(){function e(t){var n=this;c(this,e),this.serv=new WebSocket("ws://"+t),this.serv.onopen=function(e){return n.onOpen(e)},this.serv.onclose=function(e){return n.onClose(e)},this.serv.onmessage=function(e){return n.onMessage(e)},this.serv.onerror=function(e){return n.onError(e)},this.playerID=1,this.charID=-1,this.chars=[],this.emotes=[],this.selectedEmote=-1,this.checkUpdater=null,this.musicList=Object(),this.handlers={MS:function(e){return n.handleMS(e)},CT:function(e){return n.handleCT(e)},MC:function(e){return n.handleMC(e)},RMC:function(e){return n.handleRMC(e)},CI:function(e){return n.handleCI(e)},SC:function(e){return n.handleSC(e)},EI:function(e){return n.handleEI(e)},EM:function(e){return n.handleEM(e)},SM:function(e){return n.handleSM(e)},music:function(e){return n.handlemusic(e)},DONE:function(e){return n.handleDONE(e)},BN:function(e){return n.handleBN(e)},NBG:function(e){return n.handleNBG(e)},HP:function(e){return n.handleHP(e)},ID:function(e){return n.handleID(e)},PN:function(e){return n.handlePN(e)},SI:function(e){return n.handleSI(e)},CharsCheck:function(e){return n.handleCharsCheck(e)},PV:function(e){return n.handlePV(e)}}}return i(e,[{key:"me",value:function(){return this.chars[this.charID]}},{key:"myEmote",value:function(){return this.emotes[this.selectedEmote]}},{key:"sendOOC",value:function(e){this.serv.send("CT#web"+this.playerID+"#"+O(e)+"#%")}},{key:"sendIC",value:function(e,t,n,i,c,o,s,a,l){this.serv.send("MS#chat#"+e+"#"+t+"#"+n+"#"+O(i)+"#"+c+"#"+o+"#"+s+"#"+this.charID+"#"+a+"#"+d+"#0#0#0#0#%")}},{key:"sendMusicChange",value:function(e){this.serv.send("MC#"+e+"#"+this.charID+"#%")}},{key:"sendLeaveRoom",value:function(){this.serv.send("FC#%")}},{key:"joinServer",value:function(){var e=this;this.serv.send("HI#"+navigator.userAgent+"#%"),this.serv.send("ID#webAO#2.4.5#%"),this.CHECKupdater=setInterval(function(){return e.sendCheck},5e3)}},{key:"sendCharacter",value:function(e){this.serv.send("CC#"+this.playerID+"#"+e+"#web#%")}},{key:"sendMusic",value:function(e){this.serv.send("MC#"+e)}},{key:"sendCheck",value:function(){this.serv.send("CH#"+this.charID+"#%")}},{key:"onOpen",value:function(e){"join"==a?L.joinServer():document.getElementById("client_loading").style.display="none"}},{key:"onClose",value:function(e){document.getElementById("client_error").style.display="block",this.cleanup()}},{key:"onMessage",value:function(e){var t=e.data;console.debug(t);var n=t.split("%")[0].split("#"),i=n[0],c=this.handlers[i];void 0!==c?c(n):console.warn("Invalid packet header "+i)}},{key:"onError",value:function(e){document.getElementById("client_error").style.display="block",this.cleanup()}},{key:"cleanup",value:function(){clearInterval(this.checkUpdater)}},{key:"handleMS",value:function(e){if(e[4]!=H.chatmsg.content){document.getElementById("client_inner_chat").innerHTML="";for(var t={pre:escape(e[2]),character:-1,preanim:escape(e[2]),nameplate:e[3],name:e[3],speaking:"(b)"+escape(e[4]),silent:"(a)"+escape(e[4]),content:e[5],side:e[6],sound:escape(e[7]),type:e[8],snddelay:e[10],objection:e[11],evidence:e[12],flash:e[14],color:e[15],isnew:!0},n=0;n<this.chars.length;n++)if(this.chars[n].name==e[3]){t.character=n;break}H.say(t)}}},{key:"handleCT",value:function(e){document.getElementById("client_ooclog").innerHTML=document.getElementById("client_ooclog").innerHTML+e[1]+": "+e[2]+"\r\n"}},{key:"handleMC",value:function(e){(N.pause(),N.src=r+e[1],N.play(),e[2]>=0)?C(this.chars[e[2]].name+" changed music to "+e[1]):C("The music was changed to "+e[1])}},{key:"handleRMC",value:function(e){N.pause(),(N=new Audio(this.musicList[e[1]])).totime=e[1],N.offset=(new Date).getTime()/1e3,N.addEventListener("loadedmetadata",function(){N.currentTime+=parseFloat(N.totime+((new Date).getTime()/1e3-N.offset)).toFixed(3),N.play()},!1)}},{key:"handleCI",value:function(e){document.getElementById("client_loadingtext").innerHTML="Loading Character "+e[1],this.serv.send("AN#"+(e[1]/10+1)+"#%");for(var t=2;t<e.length-1;t++)if(t%2==0){var n=e[t].split("&");this.chars[e[t-1]]={name:n[0],desc:n[1],evidence:n[3],icon:l+"characters/"+escape(n[0])+"/char_icon.png"}}}},{key:"handleSC",value:function(e){document.getElementById("client_loadingtext").innerHTML="Loading Characters";for(var t=1;t<e.length-1;t++){var n=e[t].split("&");this.chars[t-1]={name:n[0],desc:n[1],evidence:n[3],icon:l+"characters/"+escape(n[0])+"/char_icon.png"}}this.serv.send("RM#%")}},{key:"handleEI",value:function(e){document.getElementById("client_loadingtext").innerHTML="Loading Evidence "+e[1],this.serv.send("RM#%")}},{key:"handleEM",value:function(e){document.getElementById("client_loadingtext").innerHTML="Loading Music "+e[1],this.serv.send("AM#"+(e[1]/10+1)+"#%");for(var t=document.getElementById("client_musiclist"),n=2;n<e.length-1;n++)if(n%2==0){var i=document.createElement("OPTION");i.text=e[n],t.options.add(i)}}},{key:"handleSM",value:function(e){document.getElementById("client_loadingtext").innerHTML="Loading Music ";for(var t=document.getElementById("client_musiclist"),n=1;n<e.length-1;n++){var i=document.createElement("OPTION");i.text=e[n],t.options.add(i)}this.serv.send("RD#%")}},{key:"handlemusic",value:function(e){for(var t=0;t<e.length/2;t++)this.musicList[e[2*t]]=e[2*t+1]}},{key:"handleDONE",value:function(e){document.getElementById("client_loading").style.display="none",document.getElementById("client_charselect").style.display="block"}},{key:"handleBN",value:function(e){H.bgname=escape(e[1])}},{key:"handleNBG",value:function(e){}},{key:"handleHP",value:function(e){1==e[1]?document.getElementById("client_defense_hp").style.clip="rect(0px,"+90*e[2]/10+"px,20px,0px)":document.getElementById("client_prosecutor_hp").style.clip="rect(0px,"+90*e[2]/10+"px,20px,0px)"}},{key:"handleID",value:function(e){this.playerID=e[1]}},{key:"handlePN",value:function(e){this.serv.send("askchaa#%")}},{key:"handleSI",value:function(e){u?this.serv.send("askchar2#%"):this.serv.send("RC#%")}},{key:"handleCharsCheck",value:function(e){document.getElementById("client_chartable").innerHTML="";for(var t=0;t<this.chars.length;t++){if(t%8==0)var n=document.createElement("TR");var i=document.createElement("TD"),c=void 0,o=this.chars[t].icon;c="-1"==e[t+1]?" dark":"",i.innerHTML="<img class='demothing"+c+"' id='demo_"+t+"' src='"+o+"' alt='"+this.chars[t].desc+"' onclick='pickchar("+t+")' onerror='demoError(this);'>",n.appendChild(i),t%8==0&&document.getElementById("client_chartable").appendChild(n)}B("def")}},{key:"handlePV",value:function(e){this.charID=e[3],document.getElementById("client_charselect").style.display="none";var t=this.me(),n=this.emotes,i=new XMLHttpRequest;i.open("GET",l+"characters/"+escape(this.me().name)+"/char.ini",!0),i.responseType="text",i.onload=function(e){if(200==this.status){var i=this.responseText,c=p.parse(i);t.side=c.Options.side;for(var o=1;o<c.Emotions.number;o++){var s=c.Emotions[o].split("#"),a="0",r="0";void 0!==c.SoundN&&(a=c.SoundN[o]),void 0!==c.SoundT&&(r=c.SoundT[o]),n[o]={desc:s[0],speaking:s[1],silent:s[2],zoom:s[3],sfx:a,sfxdelay:r,button_off:l+"characters/"+escape(t.name)+"/emotions/button"+o+"_off.png",button_on:l+"characters/"+escape(t.name)+"/emotions/button"+o+"_on.png"},document.getElementById("client_emo").innerHTML+="<img src='"+n[o].button_off+"' id='emo_"+o+"' alt='"+n[o].desc+"' class='client_button' onclick='pickemotion("+o+")'>"}T(1)}},i.send()}}]),e}(),h=function(){function e(){c(this,e),this.textnow="",this.chatmsg={isnew:!1,content:"",objection:"0",sound:"",startspeaking:!1,side:null,color:"0",snddelay:0},this.blip=new Audio(l+"sounds/general/sfx-blipmale.wav"),this.blip.volume=.5,this.womboblip=new Audio(l+"sounds/general/sfx-blipmale.wav"),this.womboblip.volume=.5,this.comboblip=new Audio(l+"sounds/general/sfx-blipmale.wav"),this.comboblip.volume=.5,this.combo=!1,this.sfxaudio=new Audio(l+"sounds/general/sfx-blipmale.wav"),this.sfxplayed=0,this.updater=null,this.bgname="gs4",this.shoutTimer=0,this.textTimer=0}return i(e,[{key:"bgFolder",value:function(){return l+"background/"+this.bgname+"/"}},{key:"say",value:function(e){var t=this;this.chatmsg=e,C(e.nameplate+": "+e.content),B(e.side),this.textnow="",this.sfxplayed=0,this.textTimer=0,this.updater=setInterval(function(){return t.updateText()},80)}},{key:"updateText",value:function(){if(""==this.chatmsg.content.trim()?(document.getElementById("client_name").style.display="none",document.getElementById("client_chat").style.display="none"):(document.getElementById("client_name").style.display="block",document.getElementById("client_chat").style.display="block"),this.chatmsg.isnew){var e={1:"holdit",2:"takethat",3:"objection"}[this.chatmsg.objection];void 0!==e?(document.getElementById("client_char").src=l+"misc/"+e+".gif",this.chatmsg.sound="sfx-"+e,this.shoutTimer=800):this.shoutTimer=0,this.chatmsg.isnew=!1,this.chatmsg.startspeaking=!0}if(this.textTimer>=this.shoutTimer)if(this.chatmsg.startspeaking){B(this.chatmsg.side),document.getElementById("client_char").src=l+"characters/"+escape(this.chatmsg.name)+"/"+this.chatmsg.speaking+".gif",document.getElementById("client_name").style.fontSize=.7*document.getElementById("client_name").offsetHeight+"px",document.getElementById("client_chat").style.fontSize=.25*document.getElementById("client_chat").offsetHeight+"px",document.getElementById("client_name").innerHTML="<p>"+this.chatmsg.nameplate.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")+"</p>";var t="color: "+({0:"#ffffff",1:"#00ff00",2:"#ff0000",3:"#ffaa00",4:"#0000ff",5:"#ffff00",6:"#aa00aa"}[this.chatmsg.color]||"#ffffff");document.getElementById("client_inner_chat").style=t,this.chatmsg.startspeaking=!1}else if(this.textnow!=this.chatmsg.content){if(" "!=this.chatmsg.content.charAt(this.textnow.length))switch(this.combo=(this.combo+1)%2,this.combo){case 0:this.blip.play()}this.textnow=this.chatmsg.content.substring(0,this.textnow.length+1),document.getElementById("client_inner_chat").innerHTML=this.textnow,this.textnow==this.chatmsg.content&&(this.textTimer=0,clearInterval(this.updater),document.getElementById("client_char").src=l+"characters/"+escape(this.chatmsg.name)+"/"+this.chatmsg.silent+".gif")}!this.sfxplayed&&this.chatmsg.snddelay+this.shoutTimer>=this.textTimer&&(this.sfxaudio.pause(),this.sfxplayed=1,"0"!=this.chatmsg.sound&&"1"!=this.chatmsg.sound&&(this.sfxaudio.src=l+"sounds/general/"+escape(this.chatmsg.sound)+".wav",this.sfxaudio.play())),this.textTimer=this.textTimer+80}}]),e}(),p=function(){function e(){c(this,e)}return i(e,null,[{key:"parse",value:function(e){var t={section:/^\s*\[\s*([^\]]*)\s*\]\s*$/,param:/^\s*([\w\.\-\_]+)\s*=\s*(.*?)\s*$/,comment:/^\s*;.*$/},n={},i=null;return e.split(/\r\n|\r|\n/).forEach(function(e){if(!t.comment.test(e)&&0!=e.length)if(t.param.test(e)){var c=e.match(t.param);i?n[i][c[1]]=c[2]:n[c[1]]=c[2]}else if(t.section.test(e)){var o=e.match(t.section);n[o[1]]={},i=o[1]}}),n}}]),e}();function g(e){13==e.keyCode&&(L.sendOOC(document.getElementById("client_oocinputbox").value),document.getElementById("client_oocinputbox").value="")}function f(e){if(13==e.keyCode){var t=L.me(),n=L.myEmote(),i="0",c="0";document.getElementById("sendsfx").checked&&(i=n.sfx,c=n.sfxdelay),L.sendIC(n.speaking,t.name,n.silent,document.getElementById("client_inputbox").value,t.side,i,n.zoom,c,d),document.getElementById("client_inputbox").value="",d&&(document.getElementById("button_"+d).className="client_button",d=0)}}function y(e){var t=document.getElementById("client_musiclist").value;L.sendMusicChange(t)}function v(){H.music.volume=document.getElementById("client_mvolume").value/100}function E(){H.sfxaudio.volume=document.getElementById("client_svolume").value/100}function I(){H.blip.volume=document.getElementById("client_bvolume").value/100,H.womboblip.volume=document.getElementById("client_bvolume").value/100,H.comboblip.volume=document.getElementById("client_bvolume").value/100}function b(e){L.sendLeaveRoom(),document.getElementById("client_charselect").style.display="block",document.getElementById("client_emo").innerHTML=""}function _(e){return e.onerror="",e.src="/misc/placeholder.gif",!0}function k(e){return e.onerror="",e.src="/misc/placeholder.png",!0}function B(e){var t,n=H.bgFolder();switch(document.getElementById("client_fg").style.display="none",document.getElementById("client_bench").style.display="none",e){case"def":document.getElementById("client_court").src=n+"defenseempty.png",document.getElementById("client_bench").style.display="block",document.getElementById("client_bench").src=n+"defensedesk.png",t="defense";break;case"pro":document.getElementById("client_court").src=n+"prosecutorempty.png",document.getElementById("client_bench").style.display="block",document.getElementById("client_bench").src=n+"prosecutiondesk.png",t="prosecution";break;case"hld":document.getElementById("client_court").src=n+"helperstand.png",t="defense";break;case"hlp":document.getElementById("client_court").src=n+"prohelperstand.png",t="prosecution";break;case"wit":document.getElementById("client_court").src=n+"witnessempty.png",document.getElementById("client_bench").style.display="block",document.getElementById("client_bench").src=n+"estrado.png",t="prosecution";break;case"jud":document.getElementById("client_court").src=n+"judgestand.png",t="prosecution"}5==H.chatmsg.type&&(document.getElementById("client_bench").style.display="none",document.getElementById("client_court").src=l+"themes/default/"+t+"_speedlines.gif")}function w(){(L=new m(s))&&(a="join",document.getElementById("client_error").style.display="none")}function x(){L.joinServer()}function C(e){document.getElementById("client_log").appendChild(document.createTextNode(e))}function M(e){e<1e3?L.sendCharacter(e):(document.getElementById("client_charselect").style.display="none",document.getElementById("client_inputbox").style.display="none",document.getElementById("client_emo").style.display="none")}function T(e){-1!=L.selectedEmote&&(document.getElementById("emo_"+L.selectedEmote).src=L.myEmote().button_off),L.selectedEmote=e,document.getElementById("emo_"+e).src=L.myEmote().button_on}function S(e){e==d?(document.getElementById("button_"+e).className="client_button",d=0):(document.getElementById("button_"+e).className="client_button dark",d&&(document.getElementById("button_"+d).className="client_button"),d=e)}function O(e){return e.replace(/#/g,"<pound>").replace(/&/g,"<and>").replace(/%/g,"<percent>").replace(/\$/g,"<dollar>")}window.onOOCEnter=g,window.onEnter=f,window.musiclist_click=y,window.changeMusicVolume=v,window.changeSFXVolume=E,window.changeBlipVolume=I,window.changeCharacter=b,window.imgError=_,window.demoError=k,window.ReconnectButton=w,window.RetryButton=x,window.pickchar=M,window.pickemotion=T,window.toggleshout=S,void 0===String.prototype.trim&&(String.prototype.trim=function(){return String(this).replace(/^\s+|\s+$/g,"")});var L=new m(s),H=new h,N=new Audio;N.play()}]);
+!function(e){var t={};function n(i){if(t[i])return t[i].exports;var c=t[i]={i:i,l:!1,exports:{}};return e[i].call(c.exports,c,c.exports,n),c.l=!0,c.exports}n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.onOOCEnter=f,t.onEnter=y,t.musiclist_click=v,t.changeMusicVolume=E,t.changeSFXVolume=_,t.changeBlipVolume=I,t.changeCharacter=k,t.imgError=B,t.demoError=b,t.ReconnectButton=C,t.RetryButton=x,t.pickchar=M,t.pickemotion=S,t.toggleshout=O;var s={};location.search.substr(1).split("&").forEach(function(e){s[e.split("=")[0]]=e.split("=")[1]});var o=s.ip,a=s.mode,l=s.asset||"http://assets.aceattorneyonline.com/base/",r=l+"sounds/music/",u=!1;/Android|webOS|iPhone|iPad|iPod|BlackBerry|BB|PlayBook|IEMobile|Windows Phone|Kindle|Silk|Opera Mini/i.test(navigator.userAgent)&&(u=!0);var d=0,h=new Date(0),m=function(){function e(t){var n=this;c(this,e),this.serv=new WebSocket("ws://"+t),this.serv.onopen=function(e){return n.onOpen(e)},this.serv.onclose=function(e){return n.onClose(e)},this.serv.onmessage=function(e){return n.onMessage(e)},this.serv.onerror=function(e){return n.onError(e)},this.playerID=1,this.charID=-1,this.chars=[],this.emotes=[],this.selectedEmote=-1,this.checkUpdater=null,this.musicList=Object(),this.handlers={MS:function(e){return n.handleMS(e)},CT:function(e){return n.handleCT(e)},MC:function(e){return n.handleMC(e)},RMC:function(e){return n.handleRMC(e)},CI:function(e){return n.handleCI(e)},SC:function(e){return n.handleSC(e)},EI:function(e){return n.handleEI(e)},EM:function(e){return n.handleEM(e)},SM:function(e){return n.handleSM(e)},music:function(e){return n.handlemusic(e)},DONE:function(e){return n.handleDONE(e)},BN:function(e){return n.handleBN(e)},NBG:function(e){return n.handleNBG(e)},HP:function(e){return n.handleHP(e)},ID:function(e){return n.handleID(e)},PN:function(e){return n.handlePN(e)},SI:function(e){return n.handleSI(e)},CharsCheck:function(e){return n.handleCharsCheck(e)},PV:function(e){return n.handlePV(e)}},this._lastTimeICReceived=new Date(0)}return i(e,[{key:"me",value:function(){return this.chars[this.charID]}},{key:"myEmote",value:function(){return this.emotes[this.selectedEmote]}},{key:"sendOOC",value:function(e){this.serv.send("CT#web"+this.playerID+"#"+D(e)+"#%")}},{key:"sendIC",value:function(e,t,n,i,c,s,o,a,l){this.serv.send("MS#chat#"+e+"#"+t+"#"+n+"#"+D(i)+"#"+c+"#"+s+"#"+o+"#"+this.charID+"#"+a+"#"+d+"#0#0#0#0#%")}},{key:"sendMusicChange",value:function(e){this.serv.send("MC#"+e+"#"+this.charID+"#%")}},{key:"sendLeaveRoom",value:function(){this.serv.send("FC#%")}},{key:"joinServer",value:function(){var e=this;this.serv.send("HI#"+navigator.userAgent.hashCode()+"#%"),this.serv.send("ID#webAO#2.4.5#%"),this.CHECKupdater=setInterval(function(){return e.sendCheck},5e3)}},{key:"sendCharacter",value:function(e){this.serv.send("CC#"+this.playerID+"#"+e+"#web#%")}},{key:"sendMusic",value:function(e){this.serv.send("MC#"+e)}},{key:"sendCheck",value:function(){this.serv.send("CH#"+this.charID+"#%")}},{key:"onOpen",value:function(e){"join"==a?H.joinServer():document.getElementById("client_loading").style.display="none"}},{key:"onClose",value:function(e){console.error("The connection was closed: "+e.reason+" ("+e.code+")"),1001!==e.code&&(document.getElementById("client_error").style.display="block",document.getElementById("error_id").textContent=e.code,this.cleanup())}},{key:"onMessage",value:function(e){var t=e.data;console.debug(t);var n=t.split("%")[0].split("#"),i=n[0],c=this.handlers[i];void 0!==c?c(n):console.warn("Invalid packet header "+i)}},{key:"onError",value:function(e){console.error("A network error occurred: "+e.reason+" ("+e.code+")"),document.getElementById("client_error").style.display="block",document.getElementById("error_id").textContent=e.code,this.cleanup()}},{key:"cleanup",value:function(){try{this.serv.close(1001)}catch(e){}clearInterval(this.checkUpdater)}},{key:"handleMS",value:function(e){if(e[4]!=L.chatmsg.content){document.getElementById("client_inner_chat").innerHTML="";for(var t={pre:escape(e[2]),character:-1,preanim:escape(e[2]),nameplate:e[3],name:e[3],speaking:"(b)"+escape(e[4]),silent:"(a)"+escape(e[4]),content:e[5],side:e[6],sound:escape(e[7]),type:e[8],snddelay:e[10],objection:e[11],evidence:e[12],flash:e[14],color:e[15],isnew:!0},n=0;n<this.chars.length;n++)if(this.chars[n].name==e[3]){t.character=n;break}t.character==this.charID&&(document.getElementById("client_inputbox").value="",d&&(document.getElementById("button_"+d).className="client_button",d=0)),L.say(t)}}},{key:"handleCT",value:function(e){var t=document.getElementById("client_ooclog");t.innerHTML+=e[1]+": "+e[2]+"\r\n",t.scrollTop>t.scrollHeight-60&&(t.scrollTop=t.scrollHeight)}},{key:"handleMC",value:function(e){var t=L.music;(t.pause(),t.src=r+e[1],t.play(),e[2]>=0)?T(this.chars[e[2]].name+" changed music to "+e[1]):T("The music was changed to "+e[1])}},{key:"handleRMC",value:function(e){L.music.pause(),L.music=new Audio(this.musicList[e[1]]);var t=L.music;t.totime=e[1],t.offset=(new Date).getTime()/1e3,t.addEventListener("loadedmetadata",function(){t.currentTime+=parseFloat(t.totime+((new Date).getTime()/1e3-t.offset)).toFixed(3),t.play()},!1)}},{key:"handleCI",value:function(e){document.getElementById("client_loadingtext").innerHTML="Loading Character "+e[1],this.serv.send("AN#"+(e[1]/10+1)+"#%");for(var t=2;t<e.length-1;t++)if(t%2==0){var n=e[t].split("&");this.chars[e[t-1]]={name:n[0],desc:n[1],evidence:n[3],icon:l+"characters/"+escape(n[0])+"/char_icon.png"}}}},{key:"handleSC",value:function(e){document.getElementById("client_loadingtext").innerHTML="Loading Characters";for(var t=1;t<e.length-1;t++){var n=e[t].split("&");this.chars[t-1]={name:n[0],desc:n[1],evidence:n[3],icon:l+"characters/"+escape(n[0])+"/char_icon.png"}}this.serv.send("RM#%")}},{key:"handleEI",value:function(e){document.getElementById("client_loadingtext").innerHTML="Loading Evidence "+e[1],this.serv.send("RM#%")}},{key:"handleEM",value:function(e){document.getElementById("client_loadingtext").innerHTML="Loading Music "+e[1],this.serv.send("AM#"+(e[1]/10+1)+"#%");for(var t=document.getElementById("client_musiclist"),n=2;n<e.length-1;n++)if(n%2==0){var i=document.createElement("OPTION");i.text=e[n],t.options.add(i)}}},{key:"handleSM",value:function(e){document.getElementById("client_loadingtext").innerHTML="Loading Music ";for(var t=document.getElementById("client_musiclist"),n=1;n<e.length-1;n++){var i=document.createElement("OPTION");i.text=e[n],t.options.add(i)}this.serv.send("RD#%")}},{key:"handlemusic",value:function(e){for(var t=0;t<e.length/2;t++)this.musicList[e[2*t]]=e[2*t+1]}},{key:"handleDONE",value:function(e){document.getElementById("client_loading").style.display="none",document.getElementById("client_charselect").style.display="block"}},{key:"handleBN",value:function(e){L.bgname=escape(e[1])}},{key:"handleNBG",value:function(e){}},{key:"handleHP",value:function(e){1==e[1]?document.getElementById("client_defense_hp").style.clip="rect(0px,"+90*e[2]/10+"px,20px,0px)":document.getElementById("client_prosecutor_hp").style.clip="rect(0px,"+90*e[2]/10+"px,20px,0px)"}},{key:"handleID",value:function(e){this.playerID=e[1]}},{key:"handlePN",value:function(e){this.serv.send("askchaa#%")}},{key:"handleSI",value:function(e){u?this.serv.send("askchar2#%"):this.serv.send("RC#%")}},{key:"handleCharsCheck",value:function(e){document.getElementById("client_chartable").innerHTML="";for(var t=0;t<this.chars.length;t++){if(t%8==0)var n=document.createElement("TR");var i=document.createElement("TD"),c=void 0,s=this.chars[t].icon;c="-1"==e[t+1]?" dark":"",i.innerHTML="<img class='demothing"+c+"' id='demo_"+t+"' src='"+s+"' alt='"+this.chars[t].desc+"' onclick='pickchar("+t+")' onerror='demoError(this);'>",n.appendChild(i),t%8==0&&document.getElementById("client_chartable").appendChild(n)}w("def")}},{key:"handlePV",value:function(e){this.charID=e[3],document.getElementById("client_charselect").style.display="none";var t=this.me(),n=this.emotes,i=new XMLHttpRequest;i.open("GET",l+"characters/"+escape(this.me().name)+"/char.ini",!0),i.responseType="text",i.onload=function(e){if(200==this.status){var i=this.responseText,c=g.parse(i);t.side=c.Options.side;for(var s=1;s<c.Emotions.number;s++){var o=c.Emotions[s].split("#"),a="0",r="0";void 0!==c.SoundN&&(a=c.SoundN[s]),void 0!==c.SoundT&&(r=c.SoundT[s]),n[s]={desc:o[0],speaking:o[1],silent:o[2],zoom:o[3],sfx:a,sfxdelay:r,button_off:l+"characters/"+escape(t.name)+"/emotions/button"+s+"_off.png",button_on:l+"characters/"+escape(t.name)+"/emotions/button"+s+"_on.png"},document.getElementById("client_emo").innerHTML+="<img src='"+n[s].button_off+"' id='emo_"+s+"' alt='"+n[s].desc+"' class='client_button' onclick='pickemotion("+s+")'>"}S(1)}},i.send()}}]),e}(),p=function(){function e(){c(this,e),this.textnow="",this.chatmsg={isnew:!1,content:"",objection:"0",sound:"",startspeaking:!1,side:null,color:"0",snddelay:0},this.blip=new Audio(l+"sounds/general/sfx-blipmale.wav"),this.blip.volume=.5,this.blipChannels=new Array(6);for(var t=0;t<this.blipChannels.length;t++)this.blipChannels[t]=new Audio(l+"sounds/general/sfx-blipmale.wav"),this.blipChannels[t].volume=.5;this.currentBlipChannel=0,this.sfxaudio=new Audio(l+"sounds/general/sfx-blipmale.wav"),this.sfxplayed=0,this.music=new Audio,this.music.play(),this.updater=null,this.bgname="gs4",this.shoutTimer=0,this.textTimer=0,this._animating=!1}return i(e,[{key:"isAnimating",value:function(){return this._animating}},{key:"setBlipVolume",value:function(e){for(var t=0;t<this.blipChannels.length;t++)this.blipChannels[t].volume=e}},{key:"bgFolder",value:function(){return l+"background/"+this.bgname+"/"}},{key:"say",value:function(e){var t=this;this.chatmsg=e,T(e.content,e.nameplate),w(e.side),this.textnow="",this.sfxplayed=0,this.textTimer=0,this._animating=!0,this.updater=setInterval(function(){return t.updateText()},65)}},{key:"updateText",value:function(){if(""==this.chatmsg.content.trim()?(document.getElementById("client_name").style.display="none",document.getElementById("client_chat").style.display="none"):(document.getElementById("client_name").style.display="block",document.getElementById("client_chat").style.display="block"),this.chatmsg.isnew){var e={1:"holdit",2:"takethat",3:"objection"}[this.chatmsg.objection];void 0!==e?(document.getElementById("client_char").src=l+"misc/"+e+".gif",new Audio(l+"/characters/"+this.chatmsg.name+"/"+e+".wav").play(),this.shoutTimer=800):this.shoutTimer=0,this.chatmsg.isnew=!1,this.chatmsg.startspeaking=!0}if(this.textTimer>=this.shoutTimer)if(this.chatmsg.startspeaking){w(this.chatmsg.side),document.getElementById("client_char").src=l+"characters/"+escape(this.chatmsg.name)+"/"+this.chatmsg.speaking+".gif",document.getElementById("client_name").style.fontSize=.7*document.getElementById("client_name").offsetHeight+"px",document.getElementById("client_chat").style.fontSize=.25*document.getElementById("client_chat").offsetHeight+"px",document.getElementById("client_name").innerHTML="<p>"+this.chatmsg.nameplate.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")+"</p>";var t="color: "+({0:"#ffffff",1:"#00ff00",2:"#ff0000",3:"#ffaa00",4:"#0000ff",5:"#ffff00",6:"#aa00aa"}[this.chatmsg.color]||"#ffffff");document.getElementById("client_inner_chat").style=t,this.chatmsg.startspeaking=!1}else this.textnow!=this.chatmsg.content&&(" "!=this.chatmsg.content.charAt(this.textnow.length)&&(this.blipChannels[this.currentBlipChannel].play(),this.currentBlipChannel++,this.currentBlipChannel%=this.blipChannels.length),this.textnow=this.chatmsg.content.substring(0,this.textnow.length+1),document.getElementById("client_inner_chat").innerHTML=this.textnow,this.textnow==this.chatmsg.content&&(this.textTimer=0,this._animating=!1,clearInterval(this.updater),document.getElementById("client_char").src=l+"characters/"+escape(this.chatmsg.name)+"/"+this.chatmsg.silent+".gif"));!this.sfxplayed&&this.chatmsg.snddelay+this.shoutTimer>=this.textTimer&&(this.sfxaudio.pause(),this.sfxplayed=1,"0"!=this.chatmsg.sound&&"1"!=this.chatmsg.sound&&(this.sfxaudio.src=l+"sounds/general/"+escape(this.chatmsg.sound)+".wav",this.sfxaudio.play())),this.textTimer=this.textTimer+65}}]),e}(),g=function(){function e(){c(this,e)}return i(e,null,[{key:"parse",value:function(e){var t={section:/^\s*\[\s*([^\]]*)\s*\]\s*$/,param:/^\s*([\w\.\-\_]+)\s*=\s*(.*?)\s*$/,comment:/^\s*;.*$/},n={},i=null;return e.split(/\r\n|\r|\n/).forEach(function(e){if(!t.comment.test(e)&&0!=e.length)if(t.param.test(e)){var c=e.match(t.param);i?n[i][c[1]]=c[2]:n[c[1]]=c[2]}else if(t.section.test(e)){var s=e.match(t.section);n[s[1]]={},i=s[1]}}),n}}]),e}();function f(e){13==e.keyCode&&(H.sendOOC(document.getElementById("client_oocinputbox").value),document.getElementById("client_oocinputbox").value="")}function y(e){if(13==e.keyCode){var t=H.me(),n=H.myEmote(),i="0",c="0";document.getElementById("sendsfx").checked&&(i=n.sfx,c=n.sfxdelay),H.sendIC(n.speaking,t.name,n.silent,document.getElementById("client_inputbox").value,t.side,i,n.zoom,c,d)}}function v(e){var t=document.getElementById("client_musiclist").value;H.sendMusicChange(t)}function E(){L.music.volume=document.getElementById("client_mvolume").value/100}function _(){L.sfxaudio.volume=document.getElementById("client_svolume").value/100}function I(){L.setBlipVolume(document.getElementById("client_bvolume").value/100)}function k(e){H.sendLeaveRoom(),document.getElementById("client_charselect").style.display="block",document.getElementById("client_emo").innerHTML=""}function B(e){return e.onerror="",e.src="/misc/placeholder.gif",!0}function b(e){return e.onerror="",e.src="/misc/placeholder.png",!0}function w(e){var t,n=L.bgFolder();switch(document.getElementById("client_fg").style.display="none",document.getElementById("client_bench").style.display="none",e){case"def":document.getElementById("client_court").src=n+"defenseempty.png",document.getElementById("client_bench").style.display="block",document.getElementById("client_bench").src=n+"defensedesk.png",t="defense";break;case"pro":document.getElementById("client_court").src=n+"prosecutorempty.png",document.getElementById("client_bench").style.display="block",document.getElementById("client_bench").src=n+"prosecutiondesk.png",t="prosecution";break;case"hld":document.getElementById("client_court").src=n+"helperstand.png",t="defense";break;case"hlp":document.getElementById("client_court").src=n+"prohelperstand.png",t="prosecution";break;case"wit":document.getElementById("client_court").src=n+"witnessempty.png",document.getElementById("client_bench").style.display="block",document.getElementById("client_bench").src=n+"estrado.png",t="prosecution";break;case"jud":document.getElementById("client_court").src=n+"judgestand.png",t="prosecution"}5==L.chatmsg.type&&(document.getElementById("client_bench").style.display="none",document.getElementById("client_court").src=l+"themes/default/"+t+"_speedlines.gif")}function C(){H.cleanup(),(H=new m(o))&&(a="join",document.getElementById("client_error").style.display="none")}function x(){H.joinServer()}function T(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Date,i=document.createElement("p"),c=document.createElement("span");if(c.id="iclog_name",c.appendChild(document.createTextNode(t)),i.appendChild(c),i.appendChild(document.createTextNode(e)),h.getMinutes()!==n.getMinutes()){var s=document.createElement("span");s.id="iclog_time",s.innerText=n.toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit"}),i.appendChild(s)}var o=document.getElementById("client_log");o.appendChild(i),o.scrollTop>o.scrollHeight-600&&(o.scrollTop=o.scrollHeight),h=new Date}function M(e){e<1e3?H.sendCharacter(e):(document.getElementById("client_charselect").style.display="none",document.getElementById("client_inputbox").style.display="none",document.getElementById("client_emo").style.display="none")}function S(e){-1!=H.selectedEmote&&(document.getElementById("emo_"+H.selectedEmote).src=H.myEmote().button_off),H.selectedEmote=e,document.getElementById("emo_"+e).src=H.myEmote().button_on}function O(e){e==d?(document.getElementById("button_"+e).className="client_button",d=0):(document.getElementById("button_"+e).className="client_button dark",d&&(document.getElementById("button_"+d).className="client_button"),d=e)}function D(e){return e.replace(/#/g,"<pound>").replace(/&/g,"<and>").replace(/%/g,"<percent>").replace(/\$/g,"<dollar>")}window.onOOCEnter=f,window.onEnter=y,window.musiclist_click=v,window.changeMusicVolume=E,window.changeSFXVolume=_,window.changeBlipVolume=I,window.changeCharacter=k,window.imgError=B,window.demoError=b,window.ReconnectButton=C,window.RetryButton=x,window.pickchar=M,window.pickemotion=S,window.toggleshout=O,void 0===String.prototype.trim&&(String.prototype.trim=function(){return String(this).replace(/^\s+|\s+$/g,"")}),String.prototype.hashCode=function(){var e,t=0;if(0===this.length)return t;for(e=0;e<this.length;e++)t=(t<<5)-t+this.charCodeAt(e),t|=0;return t};var H=new m(o),L=new p}]);
//# sourceMappingURL=client.b.js.map \ No newline at end of file
diff --git a/webAO/client.b.js.map b/webAO/client.b.js.map
new file mode 100644
index 0000000..4aa51b5
--- /dev/null
+++ b/webAO/client.b.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./webAO/client.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","r","value","n","__esModule","object","property","prototype","hasOwnProperty","p","s","onOOCEnter","onEnter","musiclist_click","changeMusicVolume","changeSFXVolume","changeBlipVolume","changeCharacter","imgError","demoError","ReconnectButton","RetryButton","pickchar","pickemotion","toggleshout","queryDict","location","search","substr","split","forEach","item","serverIP","ip","mode","AO_HOST","asset","MUSIC_HOST","oldLoading","test","navigator","userAgent","selectedShout","lastICMessageTime","Date","Client","address","_this","this","_classCallCheck","serv","WebSocket","onopen","evt","onOpen","onclose","onClose","onmessage","onMessage","onerror","onError","playerID","charID","chars","emotes","selectedEmote","checkUpdater","musicList","handlers","MS","args","handleMS","CT","handleCT","MC","handleMC","RMC","handleRMC","CI","handleCI","SC","handleSC","EI","handleEI","EM","handleEM","SM","handleSM","music","handlemusic","DONE","handleDONE","BN","handleBN","NBG","handleNBG","HP","handleHP","ID","handleID","PN","handlePN","SI","handleSI","CharsCheck","handleCharsCheck","PV","handlePV","_lastTimeICReceived","message","send","escapeChat","speaking","silent","side","ssfxname","zoom","ssfxdelay","objection","track","_this2","hashCode","CHECKupdater","setInterval","sendCheck","character","song","e","client","joinServer","document","getElementById","style","display","console","error","reason","code","textContent","cleanup","msg","data","debug","header","handler","warn","close","clearInterval","viewport","chatmsg","content","innerHTML","pre","escape","preanim","nameplate","sound","type","snddelay","evidence","flash","color","isnew","length","className","say","oocLog","scrollTop","scrollHeight","pause","src","play","appendICLog","Audio","totime","offset","getTime","addEventListener","currentTime","parseFloat","toFixed","chargs","desc","icon","hmusiclist","newentry","createElement","text","options","add","bgname","clip","tr","td","icon_chosen","thispick","appendChild","changeBackground","me","xhr","XMLHttpRequest","open","responseType","onload","status","linifile","responseText","pinifile","INI","parse","Options","Emotions","number","emoteinfo","esfx","esfxd","SoundN","SoundT","sfx","sfxdelay","button_off","button_on","Viewport","textnow","startspeaking","blip","volume","blipChannels","Array","currentBlipChannel","sfxaudio","sfxplayed","updater","shoutTimer","textTimer","_animating","_this3","updateText","trim","shout","1","2","3","fontSize","offsetHeight","replace","stylecolor","0","4","5","6","charAt","substring","regex","section","param","comment","line","match","event","keyCode","sendOOC","mychar","myemo","myEmote","checked","sendIC","playtrack","sendMusicChange","setBlipVolume","sendLeaveRoom","image","position","standname","bgfolder","bgFolder","toadd","arguments","undefined","time","entry","nameField","id","createTextNode","getMinutes","timeStamp","innerText","toLocaleTimeString","hour","minute","clientLog","ccharacter","sendCharacter","emo","estring","window","String","hash","charCodeAt"],"mappings":"aACA,IAAAA,KAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAC,QAGA,IAAAC,EAAAJ,EAAAE,IACAG,EAAAH,EACAI,GAAA,EACAH,YAUA,OANAI,EAAAL,GAAAM,KAAAJ,EAAAD,QAAAC,IAAAD,QAAAF,GAGAG,EAAAE,GAAA,EAGAF,EAAAD,QAKAF,EAAAQ,EAAAF,EAGAN,EAAAS,EAAAV,EAGAC,EAAAU,EAAA,SAAAR,EAAAS,EAAAC,GACAZ,EAAAa,EAAAX,EAAAS,IACAG,OAAAC,eAAAb,EAAAS,GACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAZ,EAAAmB,EAAA,SAAAjB,GACAY,OAAAC,eAAAb,EAAA,cAAiDkB,OAAA,KAIjDpB,EAAAqB,EAAA,SAAAlB,GACA,IAAAS,EAAAT,KAAAmB,WACA,WAA2B,OAAAnB,EAAA,SAC3B,WAAiC,OAAAA,GAEjC,OADAH,EAAAU,EAAAE,EAAA,IAAAA,GACAA,GAIAZ,EAAAa,EAAA,SAAAU,EAAAC,GAAsD,OAAAV,OAAAW,UAAAC,eAAAnB,KAAAgB,EAAAC,IAGtDxB,EAAA2B,EAAA,GAIA3B,IAAA4B,EAAA,4aCwrBgBC,eAYAC,YAgCAC,oBASAC,sBAQAC,oBAQAC,qBASAC,oBAWAC,aAWAC,cAqEAC,oBAaAC,gBA2CAC,aAgBAC,gBAcAC,cAp/BhB,IAAIC,KACJC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P,WAAWxT,GAExBuT,GAAQ,EAEV,OAAOA,GAQR,IAAIzK,EAAS,IAAInF,EAAOb,GACpBoH,EAAW,IAAI0E","file":"client.b.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n","/*\r\n * Glorious webAO\r\n * made by sD, refactored by oldmud0\r\n * credits to aleks for original idea and source\r\n*/\r\n\r\nlet queryDict = {};\r\nlocation.search.substr(1).split(\"&\").forEach(function(item) {\r\n\tqueryDict[item.split(\"=\")[0]] = item.split(\"=\")[1]\r\n});\r\n\r\n/* Server magic */\r\n\r\nconst serverIP = queryDict.ip;\r\nlet mode = queryDict.mode;\r\n\r\nconst AO_HOST = queryDict.asset || \"http://assets.aceattorneyonline.com/base/\";\r\nconst MUSIC_HOST = AO_HOST + \"sounds/music/\";\r\nconst BAR_WIDTH = 90;\r\nconst BAR_HEIGHT = 20;\r\nconst CHAR_SELECT_WIDTH = 8;\r\nconst UPDATE_INTERVAL = 65;\r\n\r\nlet oldLoading = false;\r\nif (/Android|webOS|iPhone|iPad|iPod|BlackBerry|BB|PlayBook|IEMobile|Windows Phone|Kindle|Silk|Opera Mini/i.test(navigator.userAgent)) {\r\n\toldLoading = true;\r\n}\r\n\r\nlet selectedShout = 0;\r\nlet lastICMessageTime = new Date(0);\r\n\r\nclass Client {\r\n\tconstructor(address) {\r\n\t\tthis.serv = new WebSocket(\"ws://\" + address);\r\n\r\n\t\tthis.serv.onopen = (evt) => this.onOpen(evt);\r\n\t\tthis.serv.onclose = (evt) => this.onClose(evt);\r\n\t\tthis.serv.onmessage = (evt) => this.onMessage(evt);\r\n\t\tthis.serv.onerror = (evt) => this.onError(evt);\r\n\r\n\t\tthis.playerID = 1;\r\n\t\tthis.charID = -1;\r\n\r\n\t\tthis.chars = [];\r\n\t\tthis.emotes = [];\r\n\r\n\t\tthis.selectedEmote = -1;\r\n\r\n\t\tthis.checkUpdater = null;\r\n\r\n\t\t// Only used for RMC/`music` packets, not EM/SM/MC packets.\r\n\t\tthis.musicList = Object();\r\n\r\n\t\tthis.handlers = {\r\n\t\t\t\"MS\": (args) => this.handleMS(args),\r\n\t\t\t\"CT\": (args) => this.handleCT(args),\r\n\t\t\t\"MC\": (args) => this.handleMC(args),\r\n\t\t\t\"RMC\": (args) => this.handleRMC(args),\r\n\t\t\t\"CI\": (args) => this.handleCI(args),\r\n\t\t\t\"SC\": (args) => this.handleSC(args),\r\n\t\t\t\"EI\": (args) => this.handleEI(args),\r\n\t\t\t\"EM\": (args) => this.handleEM(args),\r\n\t\t\t\"SM\": (args) => this.handleSM(args),\r\n\t\t\t\"music\": (args) => this.handlemusic(args),\r\n\t\t\t\"DONE\": (args) => this.handleDONE(args),\r\n\t\t\t\"BN\": (args) => this.handleBN(args),\r\n\t\t\t\"NBG\": (args) => this.handleNBG(args),\r\n\t\t\t\"HP\": (args) => this.handleHP(args),\r\n\t\t\t\"ID\": (args) => this.handleID(args),\r\n\t\t\t\"PN\": (args) => this.handlePN(args),\r\n\t\t\t\"SI\": (args) => this.handleSI(args),\r\n\t\t\t\"CharsCheck\": (args) => this.handleCharsCheck(args),\r\n\t\t\t\"PV\": (args) => this.handlePV(args)\r\n\t\t}\r\n\r\n\t\tthis._lastTimeICReceived = new Date(0);\r\n\t}\r\n\r\n\t/**\r\n\t * Gets the current player's character.\r\n\t */\r\n\tme() {\r\n\t\treturn this.chars[this.charID];\r\n\t}\r\n\r\n\t/**\r\n\t * Gets the player's currently selected emote.\r\n\t */\r\n\tmyEmote() {\r\n\t\treturn this.emotes[this.selectedEmote];\r\n\t}\r\n\r\n\t/**\r\n\t * Sends an out-of-character chat message.\r\n\t * @param {string} message the message to send\r\n\t */\r\n\tsendOOC(message) {\r\n\t\tthis.serv.send(`CT#web${this.playerID}#${escapeChat(message)}#%`);\r\n\t}\r\n\r\n\t/**\r\n\t * Sends an in-character chat message.\r\n\t * @param {string} speaking who is speaking\r\n\t * @param {string} name the name of the current character\r\n\t * @param {string} silent whether or not it's silent\r\n\t * @param {string} message the message to be sent\r\n\t * @param {string} side the name of the side in the background\r\n\t * @param {string} ssfxname the name of the sound effect\r\n\t * @param {string} zoom whether or not to zoom\r\n\t * @param {string} ssfxdelay the delay (in milliseconds) to play the sound effect\r\n\t * @param {string} objection the number of the shout to play\r\n\t */\r\n\tsendIC(speaking, name, silent, message, side, ssfxname, zoom, ssfxdelay, objection) {\r\n\t\tthis.serv.send(\r\n\t\t\t`MS#chat#${speaking}#${name}#${silent}` +\r\n\t\t\t`#${escapeChat(message)}#${side}#${ssfxname}#${zoom}` +\r\n\t\t\t`#${this.charID}#${ssfxdelay}#${selectedShout}#0#0#0#0#%`\r\n\t\t);\r\n\t}\r\n\r\n\t/**\r\n\t * Requests to change the music to the specified track.\r\n\t * @param {string} track the track ID\r\n\t */\r\n\tsendMusicChange(track) {\r\n\t\tthis.serv.send(`MC#${track}#${this.charID}#%`);\r\n\t}\r\n\r\n\t/**\r\n\t * Requests to leave the room and free the character slot.\r\n\t * \r\n\t * Note: This packet is undocumented. It is not implemented by\r\n\t * either the AO2 client or tsuserver.\r\n\t */\r\n\tsendLeaveRoom() {\r\n\t\tthis.serv.send(\"FC#%\");\r\n\t}\r\n\r\n\t/**\r\n\t * Begins the handshake process by sending an identifier\r\n\t * to the server.\r\n\t */\r\n\tjoinServer() {\r\n\t\tthis.serv.send(`HI#${navigator.userAgent.hashCode()}#%`);\r\n\t\tthis.serv.send(\"ID#webAO#2.4.5#%\");\r\n\t\tthis.CHECKupdater = setInterval(() => this.sendCheck, 5000);\r\n\t}\r\n\r\n\t/**\r\n\t * Requests to play as a specified character.\r\n\t * @param {number} character the character ID\r\n\t */\r\n\tsendCharacter(character) {\r\n\t\tthis.serv.send(`CC#${this.playerID}#${character}#web#%`);\r\n\t}\r\n\r\n\t/**\r\n\t * Requests to select a music track.\r\n\t * @param {number?} song the song to be played\r\n\t */\r\n\tsendMusic(song) {\r\n\t\tthis.serv.send(`MC#${song}`);\r\n\t}\r\n\r\n\t/**\r\n\t * Sends a keepalive packet.\r\n\t */\r\n\tsendCheck() {\r\n\t\tthis.serv.send(`CH#${this.charID}#%`);\r\n\t}\r\n\r\n\t/**\r\n\t * Triggered when a connection is established to the server.\r\n\t */\r\n\tonOpen(e) {\r\n\t\t// XXX: Why does watching mean just SITTING there and doing nothing?\r\n\t\tif (mode == \"join\") {\r\n\t\t\tclient.joinServer();\r\n\t\t} else {\r\n\t\t\tdocument.getElementById(\"client_loading\").style.display = \"none\";\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Triggered when the connection to the server closes.\r\n\t * @param {CloseEvent} e\r\n\t */\r\n\tonClose(e) {\r\n\t\tconsole.error(`The connection was closed: ${e.reason} (${e.code})`);\r\n\t\tif (e.code !== 1001) {\r\n\t\t\tdocument.getElementById(\"client_error\").style.display = \"block\";\r\n\t\t\tdocument.getElementById(\"error_id\").textContent = e.code;\r\n\t\t\tthis.cleanup();\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Triggered when a packet is received from the server.\r\n\t * @param {MessageEvent} e\r\n\t */\r\n\tonMessage(e) {\r\n\t\tlet msg = e.data;\r\n\t\tconsole.debug(msg);\r\n\t\tlet lines = msg.split('%');\r\n\t\tlet args = lines[0].split('#');\r\n\t\tlet header = args[0];\r\n\t\tlet handler = this.handlers[header];\r\n\t\tif (typeof handler !== \"undefined\") {\r\n\t\t\thandler(args);\r\n\t\t} else {\r\n\t\t\tconsole.warn(`Invalid packet header ${header}`);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Triggered when an network error occurs.\r\n\t * @param {ErrorEvent} e \r\n\t */\r\n\tonError(e) {\r\n\t\tconsole.error(`A network error occurred: ${e.reason} (${e.code})`);\r\n\t\tdocument.getElementById(\"client_error\").style.display = \"block\";\r\n\t\tdocument.getElementById(\"error_id\").textContent = e.code;\r\n\t\tthis.cleanup();\r\n\t}\r\n\r\n\tcleanup() {\r\n\t\ttry {\r\n\t\t\tthis.serv.close(1001);\r\n\t\t} catch (e) {\r\n\t\t\t// I don't care if this errors\r\n\t\t}\r\n\t\tclearInterval(this.checkUpdater);\r\n\t}\r\n\r\n\t/**\r\n\t * Handles an in-character chat message.\r\n\t * @param {*} args packet arguments\r\n\t */\r\n\thandleMS(args) {\r\n\t\t// TODO: this if-statement might be a bug.\r\n\t\tif (args[4] != viewport.chatmsg.content) {\r\n\t\t\tdocument.getElementById(\"client_inner_chat\").innerHTML = \"\";\r\n\t\t\tlet chatmsg = {\r\n\t\t\t\tpre: escape(args[2]),\r\n\t\t\t\tcharacter: -1, // Will do a linear search\r\n\t\t\t\tpreanim: escape(args[2]), // XXX: why again?\r\n\t\t\t\tnameplate: args[3], // TODO: parse INI to get this info\r\n\t\t\t\tname: args[3],\r\n\t\t\t\tspeaking: \"(b)\" + escape(args[4]),\r\n\t\t\t\tsilent: \"(a)\" + escape(args[4]),\r\n\t\t\t\tcontent: args[5],\r\n\t\t\t\tside: args[6],\r\n\t\t\t\tsound: escape(args[7]),\r\n\t\t\t\ttype: args[8],\r\n\t\t\t\t// charid: args[9],\r\n\t\t\t\tsnddelay: args[10],\r\n\t\t\t\tobjection: args[11],\r\n\t\t\t\tevidence: args[12],\r\n\t\t\t\t// flip: args[13],\r\n\t\t\t\tflash: args[14],\r\n\t\t\t\tcolor: args[15],\r\n\t\t\t\tisnew: true,\r\n\t\t\t};\r\n\r\n\t\t\t// The dreaded linear search...\r\n\t\t\tfor (let i = 0; i < this.chars.length; i++) {\r\n\t\t\t\tif (this.chars[i].name == args[3]) {\r\n\t\t\t\t\tchatmsg.character = i;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (chatmsg.character == this.charID) {\r\n\t\t\t\tresetICParams();\r\n\t\t\t}\r\n\r\n\t\t\tviewport.say(chatmsg);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Handles an out-of-character chat message.\r\n\t * @param {Array} args packet arguments\r\n\t */\r\n\thandleCT(args) {\r\n\t\tconst oocLog = document.getElementById(\"client_ooclog\");\r\n\t\toocLog.innerHTML += `${args[1]}: ${args[2]}\\r\\n`;\r\n\t\tif (oocLog.scrollTop > oocLog.scrollHeight - 60) {\r\n\t\t\toocLog.scrollTop = oocLog.scrollHeight;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Handles a music change to an arbitrary resource.\r\n\t * @param {Array} args packet arguments\r\n\t */\r\n\thandleMC(args) {\r\n\t\tconst music = viewport.music;\r\n\t\tmusic.pause();\r\n\t\tmusic.src = MUSIC_HOST + args[1];\r\n\t\tmusic.play();\r\n\t\tif (args[2] >= 0) {\r\n\t\t\tlet musicname = this.chars[args[2]].name;\r\n\t\t\tappendICLog(`${musicname} changed music to ${args[1]}`);\r\n\t\t} else {\r\n\t\t\tappendICLog(`The music was changed to ${args[1]}`);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Handles a music change to an arbitrary resource, with an offset in seconds.\r\n\t * @param {Array} args packet arguments\r\n\t */\r\n\thandleRMC(args) {\r\n\t\tviewport.music.pause();\r\n\t\tviewport.music = new Audio(this.musicList[args[1]]);\r\n\t\tconst music = viewport.music;\r\n\t\t// Music offset + drift from song loading\r\n\t\tmusic.totime = args[1];\r\n\t\tmusic.offset = new Date().getTime() / 1000;\r\n\t\tmusic.addEventListener('loadedmetadata', function() {\r\n\t\t\tmusic.currentTime += parseFloat(music.totime + (new Date().getTime() / 1000 - music.offset)).toFixed(3);\r\n\t\t\tmusic.play();\r\n\t\t}, false);\r\n\t}\r\n\r\n\t/**\r\n\t * Handles incoming character information, bundling multiple characters\r\n\t * per packet.\r\n\t * @param {Array} args packet arguments\r\n\t */\r\n\thandleCI(args) {\r\n\t\tdocument.getElementById(\"client_loadingtext\").innerHTML = \"Loading Character \" + args[1];\r\n\t\tthis.serv.send(\"AN#\" + ((args[1] / 10) + 1) + \"#%\");\r\n\t\tfor (let i = 2; i < args.length - 1; i++) {\r\n\t\t\tif (i % 2 == 0) {\r\n\t\t\t\tlet chargs = args[i].split(\"&\");\r\n\t\t\t\tthis.chars[args[i - 1]] = {\r\n\t\t\t\t\t\"name\": chargs[0],\r\n\t\t\t\t\t\"desc\": chargs[1],\r\n\t\t\t\t\t\"evidence\": chargs[3],\r\n\t\t\t\t\t\"icon\": AO_HOST + \"characters/\" + escape(chargs[0]) + \"/char_icon.png\"\r\n\t\t\t\t};\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Handles incoming character information, containing only one character\r\n\t * per packet.\r\n\t * @param {Array} args packet arguments\r\n\t */\r\n\thandleSC(args) {\r\n\t\tdocument.getElementById(\"client_loadingtext\").innerHTML = \"Loading Characters\";\r\n\t\tfor (let i = 1; i < args.length - 1; i++) {\r\n\t\t\tlet chargs = args[i].split(\"&\");\r\n\t\t\tthis.chars[i - 1] = {\r\n\t\t\t\t\"name\": chargs[0],\r\n\t\t\t\t\"desc\": chargs[1],\r\n\t\t\t\t\"evidence\": chargs[3],\r\n\t\t\t\t\"icon\": AO_HOST + \"characters/\" + escape(chargs[0]) + \"/char_icon.png\"\r\n\t\t\t}\r\n\t\t}\r\n\t\tthis.serv.send(\"RM#%\");\r\n\t}\r\n\r\n\t/**\r\n\t * Handles incoming evidence information, containing only one evidence\r\n\t * item per packet.\r\n\t * \r\n\t * Mostly unimplemented in webAO.\r\n\t * @param {Array} args packet arguments\r\n\t */\r\n\thandleEI(args) {\r\n\t\tdocument.getElementById(\"client_loadingtext\").innerHTML = \"Loading Evidence \" + args[1];\r\n\t\t//serv.send(\"AE#\" + (args[1] + 1) + \"#%\");\r\n\t\tthis.serv.send(\"RM#%\");\r\n\t}\r\n\r\n\t/**\r\n\t * Handles incoming music information, containing multiple entries\r\n\t * per packet.\r\n\t * @param {Array} args packet arguments\r\n\t */\r\n\thandleEM(args) {\r\n\t\tdocument.getElementById(\"client_loadingtext\").innerHTML = \"Loading Music \" + args[1];\r\n\t\tthis.serv.send(\"AM#\" + ((args[1] / 10) + 1) + \"#%\");\r\n\t\tlet hmusiclist = document.getElementById(\"client_musiclist\");\r\n\t\tfor (let i = 2; i < args.length - 1; i++) {\r\n\t\t\tif (i % 2 == 0) {\r\n\t\t\t\tlet newentry = document.createElement(\"OPTION\");\r\n\t\t\t\tnewentry.text = args[i];\r\n\t\t\t\thmusiclist.options.add(newentry);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Handles incoming music information, containing only one entry\r\n\t * per packet.\r\n\t * @param {Array} args packet arguments\r\n\t */\r\n\thandleSM(args) {\r\n\t\tdocument.getElementById(\"client_loadingtext\").innerHTML = \"Loading Music \";\r\n\t\tlet hmusiclist = document.getElementById(\"client_musiclist\");\r\n\t\tfor (let i = 1; i < args.length - 1; i++) {\r\n\t\t\tlet newentry = document.createElement(\"OPTION\");\r\n\t\t\tnewentry.text = args[i];\r\n\t\t\thmusiclist.options.add(newentry);\r\n\t\t}\r\n\t\tthis.serv.send(\"RD#%\");\r\n\t}\r\n\r\n\t/**\r\n\t * Handles incoming music information, containing all entries\r\n\t * in the same packet.\r\n\t * @param {Array} args packet arguments\r\n\t */\r\n\thandlemusic(args) {\r\n\t\tfor (let i = 0; i < args.length / 2; i++) {\r\n\t\t\tthis.musicList[args[2 * i]] = args[2 * i + 1];\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Handles the handshake completion packet, meaning the player\r\n\t * is ready to select a character.\r\n\t * \r\n\t * @param {Array} args packet arguments\r\n\t */\r\n\thandleDONE(args) {\r\n\t\tdocument.getElementById(\"client_loading\").style.display = \"none\";\r\n\t\tdocument.getElementById(\"client_charselect\").style.display = \"block\";\r\n\t}\r\n\r\n\t/**\r\n\t * Handles a background change.\r\n\t * @param {Array} args packet arguments\r\n\t */\r\n\thandleBN(args) {\r\n\t\tviewport.bgname = escape(args[1]);\r\n\t}\r\n\r\n\thandleNBG(args) {\r\n\t\t// TODO (set by sD)\r\n\t}\r\n\r\n\t/**\r\n\t * Handles a change in the health bars' states.\r\n\t * @param {Array} args packet arguments\r\n\t */\r\n\thandleHP(args) {\r\n\t\t// TODO (set by sD)\r\n\t\t// Also, this is broken.\r\n\t\tif (args[1] == 1) {\r\n\t\t\tdocument.getElementById(\"client_defense_hp\").style.clip = \"rect(0px,\" + BAR_WIDTH * args[2] / 10 + \"px,\" + BAR_HEIGHT + \"px,0px)\";\r\n\t\t} else {\r\n\t\t\tdocument.getElementById(\"client_prosecutor_hp\").style.clip = \"rect(0px,\" + BAR_WIDTH * args[2] / 10 + \"px,\" + BAR_HEIGHT + \"px,0px)\";\r\n\t\t}\r\n\t}\r\n\t\r\n\t/**\r\n\t * Handles the issuance of a player ID by the server.\r\n\t * @param {Array} args packet arguments\r\n\t */\r\n\thandleID(args) {\r\n\t\tthis.playerID = args[1];\r\n\t}\r\n\r\n\thandlePN(args) {\r\n\t\tthis.serv.send(\"askchaa#%\");\r\n\t}\r\n\r\n\t/**\r\n\t * Received when the server announces its server info,\r\n\t * but we use it as a cue to begin retrieving characters.\r\n\t * @param {Array} args packet arguments\r\n\t */\r\n\thandleSI(args) {\r\n\t\tif (oldLoading) {\r\n\t\t\tthis.serv.send(\"askchar2#%\");\r\n\t\t} else {\r\n\t\t\tthis.serv.send(\"RC#%\");\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Handles the list of all used and vacant characters.\r\n\t * @param {Array} args packet arguments\r\n\t */\r\n\thandleCharsCheck(args) {\r\n\t\tdocument.getElementById(\"client_chartable\").innerHTML = \"\";\r\n\t\tfor (let i = 0; i < this.chars.length; i++) {\r\n\t\t\tif (i % CHAR_SELECT_WIDTH == 0) {\r\n\t\t\t\tvar tr = document.createElement('TR');\r\n\t\t\t}\r\n\t\t\tlet td = document.createElement('TD');\r\n\t\t\tlet icon_chosen;\r\n\t\t\tlet thispick = this.chars[i].icon;\r\n\t\t\tif (args[i + 1] == \"-1\") {\r\n\t\t\t\ticon_chosen = \" dark\";\r\n\t\t\t} else {\r\n\t\t\t\ticon_chosen = \"\";\r\n\t\t\t}\r\n\t\t\ttd.innerHTML = `<img class='demothing${icon_chosen}' id='demo_${i}' ` +\r\n\t\t\t\t`src='${thispick}' alt='${this.chars[i].desc}' onclick='pickchar(${i})' ` +\r\n\t\t\t\t`onerror='demoError(this);'>`;\r\n\t\t\ttr.appendChild(td);\r\n\t\t\tif (i % CHAR_SELECT_WIDTH == 0) {\r\n\t\t\t\tdocument.getElementById(\"client_chartable\").appendChild(tr);\r\n\t\t\t}\r\n\t\t}\r\n\t\tchangeBackground(\"def\");\r\n\t}\r\n\r\n\t/**\r\n\t * Handles the server's assignment of a character for the player to use.\r\n\t * @param {Array} args packet arguments\r\n\t */\r\n\thandlePV(args) {\r\n\t\tthis.charID = args[3];\r\n\t\tdocument.getElementById(\"client_charselect\").style.display = \"none\";\r\n\t\tlet me = this.me();\r\n\t\tlet emotes = this.emotes;\r\n\t\tlet xhr = new XMLHttpRequest();\r\n\t\txhr.open('GET', AO_HOST + 'characters/' + escape(this.me().name) + '/char.ini', true);\r\n\t\txhr.responseType = 'text';\r\n\t\txhr.onload = function (e) {\r\n\t\t\tif (this.status == 200) {\r\n\t\t\t\tlet linifile = this.responseText;\r\n\t\t\t\tlet pinifile = INI.parse(linifile);\r\n\t\t\t\tme.side = pinifile.Options.side;\r\n\t\t\t\tfor (let i = 1; i < pinifile.Emotions.number; i++) {\r\n\t\t\t\t\tlet emoteinfo = pinifile.Emotions[i].split('#');\r\n\t\t\t\t\tlet esfx = \"0\";\r\n\t\t\t\t\tlet esfxd = \"0\";\r\n\t\t\t\t\tif (typeof pinifile.SoundN !== 'undefined') {\r\n\t\t\t\t\t\tesfx = pinifile.SoundN[i];\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (typeof pinifile.SoundT !== 'undefined') {\r\n\t\t\t\t\t\tesfxd = pinifile.SoundT[i];\r\n\t\t\t\t\t}\r\n\t\t\t\t\temotes[i] = {\r\n\t\t\t\t\t\tdesc: emoteinfo[0],\r\n\t\t\t\t\t\tspeaking: emoteinfo[1],\r\n\t\t\t\t\t\tsilent: emoteinfo[2],\r\n\t\t\t\t\t\tzoom: emoteinfo[3],\r\n\t\t\t\t\t\tsfx: esfx,\r\n\t\t\t\t\t\tsfxdelay: esfxd,\r\n\t\t\t\t\t\tbutton_off: AO_HOST + 'characters/' + escape(me.name) + '/emotions/button' + i + '_off.png',\r\n\t\t\t\t\t\tbutton_on: AO_HOST + 'characters/' + escape(me.name) + '/emotions/button' + i + '_on.png'\r\n\t\t\t\t\t};\r\n\t\t\t\t\tdocument.getElementById(\"client_emo\").innerHTML += \"<img src='\" + emotes[i].button_off + \"' id='emo_\" + i + \"' alt='\" + emotes[i].desc + \"' class='client_button' onclick='pickemotion(\" + i + \")'>\";\r\n\t\t\t\t}\r\n\t\t\t\tpickemotion(1);\r\n\t\t\t}\r\n\t\t};\r\n\t\txhr.send();\r\n\t}\r\n}\r\n\r\nclass Viewport {\r\n\tconstructor() {\r\n\t\tthis.textnow = \"\";\r\n\t\tthis.chatmsg = {\r\n\t\t\t\"isnew\": false,\r\n\t\t\t\"content\": \"\",\r\n\t\t\t\"objection\": \"0\",\r\n\t\t\t\"sound\": \"\",\r\n\t\t\t\"startspeaking\": false,\r\n\t\t\t\"side\": null,\r\n\t\t\t\"color\": \"0\",\r\n\t\t\t\"snddelay\": 0\r\n\t\t};\r\n\t\tthis.blip = new Audio(AO_HOST + 'sounds/general/sfx-blipmale.wav');\r\n\t\tthis.blip.volume = 0.5;\r\n\r\n\t\t// Allocate multiple blip audio channels to make blips less jittery\r\n\r\n\t\t// TODO: read blip type (\"gender\") from ini\r\n\t\tthis.blipChannels = new Array(6);\r\n\t\tfor (let i = 0; i < this.blipChannels.length; i++) {\r\n\t\t\tthis.blipChannels[i] = new Audio(AO_HOST + 'sounds/general/sfx-blipmale.wav');\r\n\t\t\tthis.blipChannels[i].volume = 0.5;\r\n\t\t}\r\n\t\tthis.currentBlipChannel = 0;\r\n\r\n\t\tthis.sfxaudio = new Audio(AO_HOST + 'sounds/general/sfx-blipmale.wav');\r\n\t\tthis.sfxplayed = 0;\r\n\r\n\t\tthis.music = new Audio();\r\n\t\tthis.music.play();\r\n\r\n\t\tthis.updater = null;\r\n\r\n\t\tthis.bgname = \"gs4\";\r\n\r\n\t\tthis.shoutTimer = 0;\r\n\t\tthis.textTimer = 0;\r\n\r\n\t\tthis._animating = false;\r\n\t}\r\n\r\n\t/**\r\n\t * Returns whether or not the viewport is busy\r\n\t * performing a task (animating).\r\n\t */\r\n\tisAnimating() {\r\n\t\treturn this._animating;\r\n\t}\r\n\r\n\t/**\r\n\t * Sets the volume of the blip sound.\r\n\t * @param {number} volume\r\n\t */\r\n\tsetBlipVolume(volume) {\r\n\t\tfor (let i = 0; i < this.blipChannels.length; i++) {\r\n\t\t\tthis.blipChannels[i].volume = volume;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Returns the path which the background is located in.\r\n\t */\r\n\tbgFolder() {\r\n\t\treturn `${AO_HOST}background/${this.bgname}/`;\r\n\t}\r\n\r\n\t/**\r\n\t * Sets a new emote.\r\n\t * @param {object} chatmsg the new chat message\r\n\t */\r\n\tsay(chatmsg) {\r\n\t\tthis.chatmsg = chatmsg;\r\n\t\tappendICLog(chatmsg.content, chatmsg.nameplate);\r\n\t\tchangeBackground(chatmsg.side);\r\n\t\tthis.textnow = '';\r\n\t\tthis.sfxplayed = 0;\r\n\t\tthis.textTimer = 0;\r\n\t\tthis._animating = true;\r\n\t\tthis.updater = setInterval(() => this.updateText(), UPDATE_INTERVAL);\r\n\t}\r\n\r\n\t/**\r\n\t * Updates the chatbox based on the given text.\r\n\t * \r\n\t * XXX: This relies on a global variable `this.chatmsg`!\r\n\t */\r\n\tupdateText() {\r\n\t\tif (this.chatmsg.content.trim() == \"\") {\r\n\t\t\tdocument.getElementById(\"client_name\").style.display = \"none\";\r\n\t\t\tdocument.getElementById(\"client_chat\").style.display = \"none\";\r\n\t\t} else {\r\n\t\t\tdocument.getElementById(\"client_name\").style.display = \"block\";\r\n\t\t\tdocument.getElementById(\"client_chat\").style.display = \"block\";\r\n\t\t}\r\n\r\n\t\tif (this.chatmsg.isnew) {\r\n\t\t\tconst shouts = {\r\n\t\t\t\t\"1\": \"holdit\",\r\n\t\t\t\t\"2\": \"takethat\",\r\n\t\t\t\t\"3\": \"objection\"\r\n\t\t\t};\r\n\r\n\t\t\tlet shout = shouts[this.chatmsg.objection];\r\n\t\t\tif (typeof shout !== \"undefined\") {\r\n\t\t\t\tdocument.getElementById(\"client_char\").src = AO_HOST + \"misc/\" + shout + \".gif\";\r\n\t\t\t\t(new Audio(`${AO_HOST}/characters/${this.chatmsg.name}/${shout}.wav`)).play();\r\n\t\t\t\tthis.shoutTimer = 800;\r\n\t\t\t} else {\r\n\t\t\t\tthis.shoutTimer = 0;\r\n\t\t\t}\r\n\r\n\t\t\tthis.chatmsg.isnew = false;\r\n\t\t\tthis.chatmsg.startspeaking = true;\r\n\t\t}\r\n\r\n\t\tif (this.textTimer >= this.shoutTimer) {\r\n\t\t\tif (this.chatmsg.startspeaking) {\r\n\t\t\t\tchangeBackground(this.chatmsg.side);\r\n\t\t\t\tdocument.getElementById(\"client_char\").src = AO_HOST + \"characters/\" + escape(this.chatmsg.name) + \"/\" + this.chatmsg.speaking + \".gif\";\r\n\t\t\t\tdocument.getElementById(\"client_name\").style.fontSize = (document.getElementById(\"client_name\").offsetHeight * 0.7) + \"px\";\r\n\t\t\t\tdocument.getElementById(\"client_chat\").style.fontSize = (document.getElementById(\"client_chat\").offsetHeight * 0.25) + \"px\";\r\n\t\t\t\tdocument.getElementById(\"client_name\").innerHTML = \"<p>\" + escapeHtml(this.chatmsg.nameplate) + \"</p>\";\r\n\r\n\t\t\t\tconst colors = {\r\n\t\t\t\t\t\"0\": \"#ffffff\",\r\n\t\t\t\t\t\"1\": \"#00ff00\",\r\n\t\t\t\t\t\"2\": \"#ff0000\",\r\n\t\t\t\t\t\"3\": \"#ffaa00\",\r\n\t\t\t\t\t\"4\": \"#0000ff\",\r\n\t\t\t\t\t\"5\": \"#ffff00\",\r\n\t\t\t\t\t\"6\": \"#aa00aa\"\r\n\t\t\t\t}\r\n\t\t\t\tlet stylecolor = \"color: \" + (colors[this.chatmsg.color] || \"#ffffff\");\r\n\t\t\t\tdocument.getElementById(\"client_inner_chat\").style = stylecolor;\r\n\t\t\t\tthis.chatmsg.startspeaking = false;\r\n\t\t\t} else {\r\n\t\t\t\tif (this.textnow != this.chatmsg.content) {\r\n\t\t\t\t\tif (this.chatmsg.content.charAt(this.textnow.length) != \" \") {\r\n\t\t\t\t\t\tthis.blipChannels[this.currentBlipChannel].play();\r\n\t\t\t\t\t\tthis.currentBlipChannel++;\r\n\t\t\t\t\t\tthis.currentBlipChannel %= this.blipChannels.length;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tthis.textnow = this.chatmsg.content.substring(0, this.textnow.length + 1);\r\n\t\t\t\t\tdocument.getElementById(\"client_inner_chat\").innerHTML = this.textnow;\r\n\t\t\t\t\tif (this.textnow == this.chatmsg.content) {\r\n\t\t\t\t\t\tthis.textTimer = 0;\r\n\t\t\t\t\t\tthis._animating = false;\r\n\t\t\t\t\t\tclearInterval(this.updater);\r\n\t\t\t\t\t\tdocument.getElementById(\"client_char\").src = AO_HOST + \"characters/\" + escape(this.chatmsg.name) + \"/\" + this.chatmsg.silent + \".gif\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (!this.sfxplayed && this.chatmsg.snddelay + this.shoutTimer >= this.textTimer) {\r\n\t\t\tthis.sfxaudio.pause();\r\n\t\t\tthis.sfxplayed = 1;\r\n\t\t\tif (this.chatmsg.sound != \"0\" && this.chatmsg.sound != \"1\") {\r\n\t\t\t\tthis.sfxaudio.src = AO_HOST + \"sounds/general/\" + escape(this.chatmsg.sound) + \".wav\";\r\n\t\t\t\tthis.sfxaudio.play();\r\n\t\t\t}\r\n\t\t}\r\n\t\tthis.textTimer = this.textTimer + UPDATE_INTERVAL;\r\n\t}\r\n}\r\n\r\nclass INI {\r\n\tstatic parse(data) {\r\n\t\tlet regex = {\r\n\t\t\tsection: /^\\s*\\[\\s*([^\\]]*)\\s*\\]\\s*$/,\r\n\t\t\tparam: /^\\s*([\\w\\.\\-\\_]+)\\s*=\\s*(.*?)\\s*$/,\r\n\t\t\tcomment: /^\\s*;.*$/\r\n\t\t};\r\n\t\tlet value = {};\r\n\t\tlet lines = data.split(/\\r\\n|\\r|\\n/);\r\n\t\tlet section = null;\r\n\t\tlines.forEach(function(line) {\r\n\t\t\tif (regex.comment.test(line)) {\r\n\t\t\t\treturn;\r\n\t\t\t} else if (line.length == 0) {\r\n\t\t\t\treturn;\r\n\t\t\t} else if (regex.param.test(line)) {\r\n\t\t\t\tlet match = line.match(regex.param);\r\n\t\t\t\tif (section) {\r\n\t\t\t\t\tvalue[section][match[1]] = match[2];\r\n\t\t\t\t} else {\r\n\t\t\t\t\tvalue[match[1]] = match[2];\r\n\t\t\t\t}\r\n\t\t\t} else if (regex.section.test(line)) {\r\n\t\t\t\tlet match = line.match(regex.section);\r\n\t\t\t\tvalue[match[1]] = {};\r\n\t\t\t\tsection = match[1];\r\n\t\t\t};\r\n\t\t});\r\n\t\treturn value;\r\n\t}\r\n}\r\n\r\n/**\r\n * Triggered when the Return key is pressed on the out-of-character chat input box.\r\n * @param {KeyboardEvent} event\r\n */\r\nexport function onOOCEnter(event) {\r\n\tif (event.keyCode == 13) {\r\n\t\tclient.sendOOC(document.getElementById(\"client_oocinputbox\").value);\r\n\t\tdocument.getElementById(\"client_oocinputbox\").value = \"\";\r\n\t}\r\n}\r\nwindow.onOOCEnter = onOOCEnter;\r\n\r\n/**\r\n * Triggered when the Return key is pressed on the in-character chat input box.\r\n * @param {KeyboardEvent} event\r\n */\r\nexport function onEnter(event) {\r\n\tif (event.keyCode == 13) {\r\n\t\tlet mychar = client.me();\r\n\t\tlet myemo = client.myEmote();\r\n\t\tlet ssfxname = \"0\";\r\n\t\tlet ssfxdelay = \"0\";\r\n\t\tif (document.getElementById(\"sendsfx\").checked) {\r\n\t\t\tssfxname = myemo.sfx;\r\n\t\t\tssfxdelay = myemo.sfxdelay;\r\n\t\t}\r\n\t\tclient.sendIC(myemo.speaking, mychar.name, myemo.silent, document.getElementById(\"client_inputbox\").value, mychar.side, ssfxname, myemo.zoom, ssfxdelay, selectedShout);\r\n\t}\r\n}\r\nwindow.onEnter = onEnter;\r\n\r\n/**\r\n * Resets the IC parameters for the player to enter a new chat message.\r\n * This should only be called when the player's previous chat message\r\n * was successfully sent/presented.\r\n */\r\nfunction resetICParams() {\r\n\tdocument.getElementById(\"client_inputbox\").value = \"\";\r\n\tif (selectedShout) {\r\n\t\tdocument.getElementById(\"button_\" + selectedShout).className = \"client_button\";\r\n\t\tselectedShout = 0;\r\n\t}\r\n}\r\n\r\n/**\r\n * Triggered when an item on the music list is clicked.\r\n * @param {MouseEvent} event\r\n */\r\nexport function musiclist_click(event) {\r\n\tlet playtrack = document.getElementById(\"client_musiclist\").value;\r\n\tclient.sendMusicChange(playtrack);\r\n}\r\nwindow.musiclist_click = musiclist_click;\r\n\r\n/**\r\n * Triggered by the music volume slider.\r\n */\r\nexport function changeMusicVolume() {\r\n\tviewport.music.volume = document.getElementById(\"client_mvolume\").value / 100;\r\n}\r\nwindow.changeMusicVolume = changeMusicVolume;\r\n\r\n/**\r\n * Triggered by the sound effect volume slider.\r\n */\r\nexport function changeSFXVolume() {\r\n\tviewport.sfxaudio.volume = document.getElementById(\"client_svolume\").value / 100;\r\n}\r\nwindow.changeSFXVolume = changeSFXVolume;\r\n\r\n/**\r\n * Triggered by the blip volume slider.\r\n */\r\nexport function changeBlipVolume() {\r\n\tviewport.setBlipVolume(document.getElementById(\"client_bvolume\").value / 100);\r\n}\r\nwindow.changeBlipVolume = changeBlipVolume;\r\n\r\n/**\r\n * Triggered when a character icon is clicked in the character selection menu.\r\n * @param {MouseEvent} event\r\n */\r\nexport function changeCharacter(event) {\r\n\tclient.sendLeaveRoom();\r\n\tdocument.getElementById(\"client_charselect\").style.display = \"block\";\r\n\tdocument.getElementById(\"client_emo\").innerHTML = \"\";\r\n}\r\nwindow.changeCharacter = changeCharacter;\r\n\r\n/**\r\n * Triggered when there was an error loading a character sprite.\r\n * @param {HTMLImageElement} image the element containing the missing image\r\n */\r\nexport function imgError(image) {\r\n\timage.onerror = \"\";\r\n\timage.src = \"/misc/placeholder.gif\";\r\n\treturn true;\r\n}\r\nwindow.imgError = imgError;\r\n\r\n/**\r\n * Triggered when there was an error loading a character icon.\r\n * @param {HTMLImageElement} image the element containing the missing image\r\n */\r\nexport function demoError(image) {\r\n\timage.onerror = \"\";\r\n\timage.src = \"/misc/placeholder.png\";\r\n\treturn true;\r\n}\r\nwindow.demoError = demoError;\r\n\r\n/**\r\n * Checks if an image exists at the specified URI.\r\n * @param {string} url the URI to be checked\r\n */\r\nfunction ImageExist(url) {\r\n\tvar img = new Image();\r\n\timg.src = url;\r\n\treturn img.height != 0;\r\n}\r\n\r\n/**\r\n * Changes the viewport background based on a given position.\r\n * \r\n * Valid positions: `def, pro, hld, hlp, wit, jud`\r\n * @param {string} position the position to change into\r\n */\r\nfunction changeBackground(position) {\r\n\tvar standname;\r\n\tlet bgfolder = viewport.bgFolder();\r\n\tdocument.getElementById(\"client_fg\").style.display = \"none\";\r\n\tdocument.getElementById(\"client_bench\").style.display = \"none\";\r\n\tswitch (position) {\r\n\t\tcase \"def\":\r\n\t\t\tdocument.getElementById(\"client_court\").src = bgfolder + \"defenseempty.png\"\r\n\t\t\tdocument.getElementById(\"client_bench\").style.display = \"block\";\r\n\t\t\tdocument.getElementById(\"client_bench\").src = bgfolder + \"defensedesk.png\"\r\n\t\t\tstandname = \"defense\";\r\n\t\t\tbreak;\r\n\t\tcase \"pro\":\r\n\t\t\tdocument.getElementById(\"client_court\").src = bgfolder + \"prosecutorempty.png\"\r\n\t\t\tdocument.getElementById(\"client_bench\").style.display = \"block\"\r\n\t\t\tdocument.getElementById(\"client_bench\").src = bgfolder + \"prosecutiondesk.png\"\r\n\t\t\tstandname = \"prosecution\";\r\n\t\t\tbreak;\r\n\t\tcase \"hld\":\r\n\t\t\tdocument.getElementById(\"client_court\").src = bgfolder + \"helperstand.png\"\r\n\t\t\tstandname = \"defense\";\r\n\t\t\tbreak;\r\n\t\tcase \"hlp\":\r\n\t\t\tdocument.getElementById(\"client_court\").src = bgfolder + \"prohelperstand.png\"\r\n\t\t\tstandname = \"prosecution\";\r\n\t\t\tbreak;\r\n\t\tcase \"wit\":\r\n\t\t\tdocument.getElementById(\"client_court\").src = bgfolder + \"witnessempty.png\"\r\n\t\t\tdocument.getElementById(\"client_bench\").style.display = \"block\"\r\n\t\t\tdocument.getElementById(\"client_bench\").src = bgfolder + \"estrado.png\"\r\n\t\t\tstandname = \"prosecution\";\r\n\t\t\tbreak;\r\n\t\tcase \"jud\":\r\n\t\t\tdocument.getElementById(\"client_court\").src = bgfolder + \"judgestand.png\"\r\n\t\t\tstandname = \"prosecution\";\r\n\t\t\tbreak;\r\n\t}\r\n\tif (viewport.chatmsg.type == 5) {\r\n\t\tdocument.getElementById(\"client_bench\").style.display = \"none\";\r\n\t\tdocument.getElementById(\"client_court\").src = AO_HOST + \"themes/default/\" + standname + \"_speedlines.gif\";\r\n\t}\r\n}\r\n\r\n/**\r\n * Triggered when the reconnect button is pushed.\r\n */\r\nexport function ReconnectButton() {\r\n\tclient.cleanup();\r\n\tclient = new Client(serverIP);\r\n\tif (client) {\r\n\t\tmode = \"join\"; // HACK: see client.onOpen\r\n\t\tdocument.getElementById(\"client_error\").style.display = \"none\";\r\n\t}\r\n}\r\nwindow.ReconnectButton = ReconnectButton;\r\n\r\n/**\r\n * Triggered when the retry button is pushed (during the loading process).\r\n */\r\nexport function RetryButton() {\r\n\tclient.joinServer();\r\n}\r\nwindow.RetryButton = RetryButton;\r\n\r\n/**\r\n * Appends a message to the in-character chat log.\r\n * @param {string} toadd the string to be added\r\n * @param {string} name the name of the sender\r\n */\r\nfunction appendICLog(toadd, name = \"\", time = new Date()) {\r\n\tconst entry = document.createElement(\"p\");\r\n\tconst nameField = document.createElement(\"span\");\r\n\tnameField.id = \"iclog_name\";\r\n\tnameField.appendChild(document.createTextNode(name));\r\n\tentry.appendChild(nameField);\r\n\tentry.appendChild(document.createTextNode(toadd));\r\n\r\n\t// Only put a timestamp if the minute has changed.\r\n\tif (lastICMessageTime.getMinutes() !== time.getMinutes()) {\r\n\t\tconst timeStamp = document.createElement(\"span\");\r\n\t\ttimeStamp.id = \"iclog_time\";\r\n\t\ttimeStamp.innerText = time.toLocaleTimeString(undefined, {\r\n\t\t\thour: \"numeric\",\r\n\t\t\tminute: \"2-digit\"\r\n\t\t});\r\n\t\tentry.appendChild(timeStamp);\r\n\t}\r\n\r\n\tconst clientLog = document.getElementById(\"client_log\");\r\n\tclientLog.appendChild(entry);\r\n\r\n\tif (clientLog.scrollTop > clientLog.scrollHeight - 600) {\r\n\t\tclientLog.scrollTop = clientLog.scrollHeight;\r\n\t}\r\n\r\n\tlastICMessageTime = new Date();\r\n}\r\n\r\n/**\r\n * Requests to play as a character.\r\n * @param {number} ccharacter the character ID; if this is a large number, then spectator is chosen instead.\r\n */\r\nexport function pickchar(ccharacter) {\r\n\tif (ccharacter < 1000) {\r\n\t\tclient.sendCharacter(ccharacter);\r\n\t} else {\r\n\t\t// Spectator\r\n\t\tdocument.getElementById(\"client_charselect\").style.display = \"none\";\r\n\t\tdocument.getElementById(\"client_inputbox\").style.display = \"none\";\r\n\t\tdocument.getElementById(\"client_emo\").style.display = \"none\";\r\n\t}\r\n}\r\nwindow.pickchar = pickchar;\r\n\r\n/**\r\n * Highlights and selects an emotion for in-character chat.\r\n * @param {string} emo the new emotion to be selected\r\n */\r\nexport function pickemotion(emo) {\r\n\tif (client.selectedEmote != -1) {\r\n\t\tdocument.getElementById(\"emo_\" + client.selectedEmote).src = client.myEmote().button_off;\r\n\t}\r\n\tclient.selectedEmote = emo\r\n\tdocument.getElementById(\"emo_\" + emo).src = client.myEmote().button_on;\r\n}\r\nwindow.pickemotion = pickemotion;\r\n\r\n/**\r\n * Highlights and selects a shout for in-character chat.\r\n * If the same shout button is selected, then the shout is canceled.\r\n * @param {string} shout the new shout to be selected\r\n */\r\nexport function toggleshout(shout) {\r\n\tif (shout == selectedShout) {\r\n\t\tdocument.getElementById(\"button_\" + shout).className = \"client_button\";\r\n\t\tselectedShout = 0;\r\n\t} else {\r\n\t\tdocument.getElementById(\"button_\" + shout).className = \"client_button dark\";\r\n\t\tif (selectedShout) {\r\n\t\t\tdocument.getElementById(\"button_\" + selectedShout).className = \"client_button\";\r\n\t\t}\r\n\t\tselectedShout = shout;\r\n\t}\r\n}\r\nwindow.toggleshout = toggleshout;\r\n\r\n/**\r\n * Escapes a string to be HTML-safe.\r\n * \r\n * XXX: This is unnecessary if we use `createTextNode` instead!\r\n * @param {string} unsafe an unsanitized string\r\n */\r\nfunction escapeHtml(unsafe) {\r\n\treturn unsafe\r\n\t\t.replace(/&/g, \"&amp;\")\r\n\t\t.replace(/</g, \"&lt;\")\r\n\t\t.replace(/>/g, \"&gt;\")\r\n\t\t.replace(/\"/g, \"&quot;\")\r\n\t\t.replace(/'/g, \"&#039;\");\r\n}\r\n\r\n/**\r\n * Escapes a string to AO1 escape codes.\r\n * @param {string} estring the string to be escaped\r\n */\r\nfunction escapeChat(estring) {\r\n\treturn estring\r\n\t\t.replace(/#/g, \"<pound>\")\r\n\t\t.replace(/&/g, \"<and>\")\r\n\t\t.replace(/%/g, \"<percent>\")\r\n\t\t.replace(/\\$/g, \"<dollar>\");\r\n}\r\n\r\n// TODO: Possibly safe to remove, since we are using a transpiler.\r\nif (typeof(String.prototype.trim) === \"undefined\")\r\n{\r\n String.prototype.trim = function() \r\n {\r\n return String(this).replace(/^\\s+|\\s+$/g, '');\r\n };\r\n}\r\n\r\n// Used for HDID calculation.\r\nString.prototype.hashCode = function() {\r\n\tvar hash = 0, i, chr;\r\n\tif (this.length === 0) return hash;\r\n\tfor (i = 0; i < this.length; i++) {\r\n\t chr = this.charCodeAt(i);\r\n\t hash = ((hash << 5) - hash) + chr;\r\n\t hash |= 0; // Convert to 32bit integer\r\n\t}\r\n\treturn hash;\r\n};\r\n\r\n\r\n//\r\n// Client code\r\n//\r\n\r\nlet client = new Client(serverIP);\r\nlet viewport = new Viewport();\r\n"],"sourceRoot":""} \ No newline at end of file
diff --git a/webAO/client.css b/webAO/client.css
index 3b770e9..96a7f71 100644
--- a/webAO/client.css
+++ b/webAO/client.css
@@ -10,6 +10,12 @@ img {
-ms-interpolation-mode: nearest-neighbor;
}
+#about-logo {
+ padding-top: 5px;
+ height: 30%;
+ image-rendering: auto;
+}
+
@keyframes error_blink {
0% { color: white; }
50% { color: red; }
diff --git a/webAO/client.html b/webAO/client.html
index 54d0fd4..57872d3 100644
--- a/webAO/client.html
+++ b/webAO/client.html
@@ -83,7 +83,7 @@
<template id="about">
<meta name="frame-title" lang="en" content="About">
- <img src="images/logo-new.png" alt="Attorney Online logo" style="padding-top: 5px;">
+ <img id="about-logo" src="images/logo-new.png" alt="Attorney Online logo">
<h1 style="line-height: .3em;">webAO</h1>
<h3>version 2.1</h3>
<p>Client created by <a href="https://github.com/stonedDiscord">@stonedDiscord</a> and fixed up by <a href="https://github.com/oldmud0">@oldmud0</a>.</p>
diff --git a/webAO/client.js b/webAO/client.js
index 89baeff..6d301e5 100644
--- a/webAO/client.js
+++ b/webAO/client.js
@@ -19,7 +19,7 @@ const MUSIC_HOST = AO_HOST + "sounds/music/";
const BAR_WIDTH = 90;
const BAR_HEIGHT = 20;
const CHAR_SELECT_WIDTH = 8;
-const UPDATE_INTERVAL = 100;
+const UPDATE_INTERVAL = 65;
let oldLoading = false;
if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|BB|PlayBook|IEMobile|Windows Phone|Kindle|Silk|Opera Mini/i.test(navigator.userAgent)) {
@@ -224,7 +224,11 @@ class Client {
}
cleanup() {
- this.serv.close(1001);
+ try {
+ this.serv.close(1001);
+ } catch (e) {
+ // I don't care if this errors
+ }
clearInterval(this.checkUpdater);
}
@@ -279,7 +283,11 @@ class Client {
* @param {Array} args packet arguments
*/
handleCT(args) {
- document.getElementById("client_ooclog").innerHTML = document.getElementById("client_ooclog").innerHTML + args[1] + ": " + args[2] + "\r\n";
+ const oocLog = document.getElementById("client_ooclog");
+ oocLog.innerHTML += `${args[1]}: ${args[2]}\r\n`;
+ if (oocLog.scrollTop > oocLog.scrollHeight - 60) {
+ oocLog.scrollTop = oocLog.scrollHeight;
+ }
}
/**
@@ -589,6 +597,16 @@ class Viewport {
this.shoutTimer = 0;
this.textTimer = 0;
+
+ this._animating = false;
+ }
+
+ /**
+ * Returns whether or not the viewport is busy
+ * performing a task (animating).
+ */
+ isAnimating() {
+ return this._animating;
}
/**
@@ -619,6 +637,7 @@ class Viewport {
this.textnow = '';
this.sfxplayed = 0;
this.textTimer = 0;
+ this._animating = true;
this.updater = setInterval(() => this.updateText(), UPDATE_INTERVAL);
}
@@ -687,6 +706,7 @@ class Viewport {
document.getElementById("client_inner_chat").innerHTML = this.textnow;
if (this.textnow == this.chatmsg.content) {
this.textTimer = 0;
+ this._animating = false;
clearInterval(this.updater);
document.getElementById("client_char").src = AO_HOST + "characters/" + escape(this.chatmsg.name) + "/" + this.chatmsg.silent + ".gif";
}
diff --git a/webAO/golden/LICENSE.txt b/webAO/golden/LICENSE.txt
new file mode 100644
index 0000000..5ef7a1f
--- /dev/null
+++ b/webAO/golden/LICENSE.txt
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2016 deepstream.io
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE. \ No newline at end of file
diff --git a/webAO/golden/css/goldenlayout.css b/webAO/golden/css/goldenlayout.css
new file mode 100644
index 0000000..ecb0d6b
--- /dev/null
+++ b/webAO/golden/css/goldenlayout.css
@@ -0,0 +1,525 @@
+h2 {
+ font: 14px Arial, sans-serif;
+ color: #fff;
+ padding: 10px;
+}
+.lm_content {
+ text-align: center;
+ color: white;
+}
+body {
+ height: 100%;
+ width: 100%;
+ position: absolute;
+ transition: all 0.5s ease;
+}
+#menuContainer {
+ list-style: none;
+ margin: 10px;
+ padding: 0;
+}
+#menuContainer:after {
+ content: "";
+ display: table;
+ clear: both;
+}
+#menuContainer li {
+ float: left;
+ margin-right: 10px;
+}
+#menuContainer li a {
+ background-color: black;
+ color: white;
+ padding: 5px;
+ text-decoration: none;
+ font-family: Arial, sans-serif;
+ font-size: 12px;
+}
+.lm_root {
+ position: relative;
+}
+.lm_row > .lm_item {
+ float: left;
+}
+.lm_content {
+ overflow: hidden;
+ position: relative;
+}
+.lm_dragging,
+.lm_dragging * {
+ cursor: move !important;
+ user-select: none;
+}
+.lm_maximised {
+ position: absolute;
+ top: 0;
+ left: 0;
+ z-index: 40;
+}
+.lm_maximise_placeholder {
+ display: none;
+}
+.lm_splitter {
+ position: relative;
+ z-index: 2;
+}
+.lm_splitter:hover,
+.lm_splitter.lm_dragging {
+ background: orange;
+}
+.lm_splitter.lm_vertical .lm_drag_handle {
+ width: 100%;
+ position: absolute;
+ cursor: ns-resize;
+}
+.lm_splitter.lm_horizontal {
+ float: left;
+ height: 100%;
+}
+.lm_splitter.lm_horizontal .lm_drag_handle {
+ height: 100%;
+ position: absolute;
+ cursor: ew-resize;
+}
+.lm_header {
+ overflow: visible;
+ position: relative;
+ z-index: 1;
+ user-select: none;
+}
+.lm_header.lm_selectable {
+ cursor: pointer;
+}
+.lm_header [class^=lm_] {
+ box-sizing: content-box !important;
+}
+.lm_header .lm_controls {
+ position: absolute;
+ right: 3px;
+}
+.lm_header .lm_controls > li {
+ cursor: pointer;
+ float: left;
+ width: 18px;
+ height: 18px;
+ text-align: center;
+}
+.lm_header ul {
+ margin: 0;
+ padding: 0;
+ list-style-type: none;
+}
+.lm_header .lm_tabs {
+ position: absolute;
+}
+.lm_header .lm_tab {
+ cursor: pointer;
+ float: left;
+ height: 14px;
+ margin-top: 1px;
+ padding: 0px 10px 5px;
+ padding-right: 25px;
+ position: relative;
+}
+.lm_header .lm_tab i {
+ width: 2px;
+ height: 19px;
+ position: absolute;
+}
+.lm_header .lm_tab i.lm_left {
+ top: 0;
+ left: -2px;
+}
+.lm_header .lm_tab i.lm_right {
+ top: 0;
+ right: -2px;
+}
+.lm_header .lm_tab .lm_title {
+ display: inline-block;
+ overflow: hidden;
+ text-overflow: ellipsis;
+}
+.lm_header .lm_tab .lm_close_tab {
+ width: 14px;
+ height: 14px;
+ position: absolute;
+ top: 0;
+ right: 0;
+ text-align: center;
+}
+.lm_stack {
+ position: relative;
+}
+.lm_stack > .lm_items {
+ overflow: hidden;
+}
+.lm_stack.lm_left > .lm_items {
+ position: absolute;
+ left: 20px;
+ top: 0;
+}
+.lm_stack.lm_right > .lm_items {
+ position: absolute;
+ right: 20px;
+ top: 0;
+}
+.lm_stack.lm_right > .lm_header {
+ position: absolute;
+ right: 0;
+ top: 0;
+}
+.lm_stack.lm_bottom > .lm_items {
+ position: absolute;
+ bottom: 20px;
+}
+.lm_stack.lm_bottom > .lm_header {
+ position: absolute;
+ bottom: 0;
+}
+.lm_stack.lm_docked {
+ overflow: visible;
+ z-index: 3;
+}
+.lm_stack.lm_docked > .lm_header {
+ z-index: 5;
+}
+.lm_stack.lm_docked > .lm_items {
+ *z-index: 3;
+ transition: height 0.4s ease-in;
+ border: solid 2px;
+ border-image-slice: 1 !important;
+ margin: -2px 0;
+}
+.lm_stack.lm_docked.lm_left > .lm_items,
+.lm_stack.lm_docked.lm_right > .lm_items {
+ transition: width 0.4s ease-in, height 0.001s linear;
+}
+.lm_left.lm_stack .lm_header,
+.lm_right.lm_stack .lm_header {
+ height: 100%;
+}
+.lm_left.lm_dragProxy .lm_header,
+.lm_right.lm_dragProxy .lm_header,
+.lm_left.lm_dragProxy .lm_items,
+.lm_right.lm_dragProxy .lm_items {
+ float: left;
+}
+.lm_left.lm_dragProxy .lm_header,
+.lm_right.lm_dragProxy .lm_header,
+.lm_left.lm_stack .lm_header,
+.lm_right.lm_stack .lm_header {
+ width: 20px;
+ vertical-align: top;
+}
+.lm_left.lm_dragProxy .lm_header .lm_tabs,
+.lm_right.lm_dragProxy .lm_header .lm_tabs,
+.lm_left.lm_stack .lm_header .lm_tabs,
+.lm_right.lm_stack .lm_header .lm_tabs {
+ transform-origin: left top;
+ top: 0;
+ width: 1000px;
+ /*hack*/
+}
+.lm_left.lm_dragProxy .lm_header .lm_controls,
+.lm_right.lm_dragProxy .lm_header .lm_controls,
+.lm_left.lm_stack .lm_header .lm_controls,
+.lm_right.lm_stack .lm_header .lm_controls {
+ bottom: 0;
+}
+.lm_dragProxy.lm_left .lm_header .lm_tabs,
+.lm_stack.lm_left .lm_header .lm_tabs {
+ transform: rotate(-90deg) scaleX(-1);
+ left: 0;
+}
+.lm_dragProxy.lm_left .lm_header .lm_tabs .lm_tab,
+.lm_stack.lm_left .lm_header .lm_tabs .lm_tab {
+ transform: scaleX(-1);
+ margin-top: 1px;
+}
+.lm_dragProxy.lm_left .lm_header .lm_tabdropdown_list,
+.lm_stack.lm_left .lm_header .lm_tabdropdown_list {
+ top: initial;
+ right: initial;
+ left: 20px;
+}
+.lm_dragProxy.lm_right .lm_content {
+ float: left;
+}
+.lm_dragProxy.lm_right .lm_header .lm_tabs,
+.lm_stack.lm_right .lm_header .lm_tabs {
+ transform: rotate(90deg) scaleX(1);
+ left: 100%;
+ margin-left: 0;
+}
+.lm_dragProxy.lm_right .lm_header .lm_controls,
+.lm_stack.lm_right .lm_header .lm_controls {
+ left: 3px;
+}
+.lm_dragProxy.lm_right .lm_header .lm_tabdropdown_list,
+.lm_stack.lm_right .lm_header .lm_tabdropdown_list {
+ top: initial;
+ right: 20px;
+}
+.lm_dragProxy.lm_bottom .lm_header,
+.lm_stack.lm_bottom .lm_header {
+ width: 100%;
+}
+.lm_dragProxy.lm_bottom .lm_header .lm_tab,
+.lm_stack.lm_bottom .lm_header .lm_tab {
+ margin-top: 0;
+ border-top: none;
+}
+.lm_dragProxy.lm_bottom .lm_header .lm_controls,
+.lm_stack.lm_bottom .lm_header .lm_controls {
+ top: 3px;
+}
+.lm_dragProxy.lm_bottom .lm_header .lm_tabdropdown_list,
+.lm_stack.lm_bottom .lm_header .lm_tabdropdown_list {
+ top: initial;
+ bottom: 20px;
+}
+.lm_drop_tab_placeholder {
+ float: left;
+ width: 100px;
+ height: 10px;
+ visibility: hidden;
+}
+.lm_header .lm_controls .lm_tabdropdown:before {
+ content: '';
+ width: 0;
+ height: 0;
+ vertical-align: middle;
+ display: inline-block;
+ border-top: 5px dashed;
+ border-right: 5px solid transparent;
+ border-left: 5px solid transparent;
+ color: white;
+}
+.lm_header .lm_tabdropdown_list {
+ position: absolute;
+ top: 20px;
+ right: 0;
+ z-index: 5;
+ overflow: hidden;
+}
+.lm_header .lm_tabdropdown_list .lm_tab {
+ clear: both;
+ padding-right: 10px;
+ margin: 0;
+}
+.lm_header .lm_tabdropdown_list .lm_tab .lm_title {
+ width: 100px;
+}
+.lm_header .lm_tabdropdown_list .lm_close_tab {
+ display: none !important;
+}
+/***********************************
+* Drag Proxy
+***********************************/
+.lm_dragProxy {
+ position: absolute;
+ top: 0;
+ left: 0;
+ z-index: 30;
+}
+.lm_dragProxy .lm_header {
+ background: transparent;
+}
+.lm_dragProxy .lm_content {
+ border-top: none;
+ overflow: hidden;
+}
+.lm_dropTargetIndicator {
+ display: none;
+ position: absolute;
+ z-index: 20;
+ transition: all 200ms ease;
+}
+.lm_dropTargetIndicator .lm_inner {
+ width: 100%;
+ height: 100%;
+ position: relative;
+ top: 0;
+ left: 0;
+}
+.lm_transition_indicator {
+ display: none;
+ width: 20px;
+ height: 20px;
+ position: absolute;
+ top: 0;
+ left: 0;
+ z-index: 20;
+}
+.lm_popin {
+ width: 20px;
+ height: 20px;
+ position: absolute;
+ bottom: 0;
+ right: 0;
+ z-index: 9999;
+}
+.lm_popin > * {
+ width: 100%;
+ height: 100%;
+ position: absolute;
+ top: 0;
+ left: 0;
+}
+.lm_popin > .lm_bg {
+ z-index: 10;
+}
+.lm_popin > .lm_icon {
+ z-index: 20;
+}
+.lm_goldenlayout {
+ background: #000000;
+}
+.lm_content {
+ background: #222222;
+ border: 1px solid transparent;
+}
+.lm_dragProxy .lm_content {
+ box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9);
+}
+.lm_dropTargetIndicator {
+ box-shadow: inset 0 0 30px #000000;
+ outline: 1px dashed #cccccc;
+}
+.lm_dropTargetIndicator .lm_inner {
+ background: #000000;
+ opacity: 0.2;
+}
+.lm_splitter {
+ background: #000000;
+ opacity: 0.001;
+ transition: opacity 200ms ease;
+}
+.lm_splitter:hover,
+.lm_splitter.lm_dragging {
+ background: #444444;
+ opacity: 1;
+}
+.lm_header {
+ height: 20px;
+}
+.lm_header .lm_tab {
+ font-family: Arial, sans-serif;
+ font-size: 12px;
+ color: #999999;
+ background: #111111;
+ box-shadow: 2px -2px 2px rgba(0, 0, 0, 0.3);
+ margin-right: 2px;
+ padding-bottom: 2px;
+ padding-top: 2px;
+ /*.lm_title // Present in LIGHT Theme
+ {
+ padding-top:1px;
+ }*/
+}
+.lm_header .lm_tab .lm_close_tab {
+ width: 11px;
+ height: 11px;
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAYAAADgkQYQAAAAQUlEQVR4nHXOQQ4AMAgCQeT/f6aXpsGK3jSTuCVJAAr7iBdoAwCKd0nwfaAdHbYERw5b44+E8JoBjEYGMBq5gAYP3usUDu2IvoUAAAAASUVORK5CYII=");
+ background-position: center center;
+ background-repeat: no-repeat;
+ top: 4px;
+ right: 6px;
+ opacity: 0.4;
+}
+.lm_header .lm_tab .lm_close_tab:hover {
+ opacity: 1;
+}
+.lm_header .lm_tab.lm_active {
+ border-bottom: none;
+ box-shadow: 0 -2px 2px #000000;
+ padding-bottom: 3px;
+}
+.lm_header .lm_tab.lm_active .lm_close_tab {
+ opacity: 1;
+}
+.lm_dragProxy.lm_right .lm_header .lm_tab.lm_active,
+.lm_stack.lm_right .lm_header .lm_tab.lm_active {
+ box-shadow: 2px -2px 2px #000000;
+}
+.lm_dragProxy.lm_bottom .lm_header .lm_tab,
+.lm_stack.lm_bottom .lm_header .lm_tab {
+ box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.3);
+}
+.lm_dragProxy.lm_bottom .lm_header .lm_tab.lm_active,
+.lm_stack.lm_bottom .lm_header .lm_tab.lm_active {
+ box-shadow: 0 2px 2px #000000;
+}
+.lm_selected .lm_header {
+ background-color: #452500;
+}
+.lm_tab:hover,
+.lm_tab.lm_active {
+ background: #222222;
+ color: #dddddd;
+}
+.lm_header .lm_controls .lm_tabdropdown:before {
+ color: #ffffff;
+}
+.lm_controls > li {
+ position: relative;
+ background-position: center center;
+ background-repeat: no-repeat;
+ opacity: 0.4;
+ transition: opacity 300ms ease;
+}
+.lm_controls > li:hover {
+ opacity: 1;
+}
+.lm_controls .lm_popout {
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAYAAADgkQYQAAAAPklEQVR4nI2Q0QoAIAwCNfr/X7aXCpGN8snBdgejJOzckpkxs9jR6K6T5JpU0nWl5pSXTk7qwh8SnNT+CAAWCgkKFpuSWsUAAAAASUVORK5CYII=");
+}
+.lm_controls .lm_maximise {
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAYAAADgkQYQAAAAKElEQVR4nGP8////fwYCgImQAgYGBgYWKM2IR81/okwajIpgvsMbVgAwgQYRVakEKQAAAABJRU5ErkJggg==");
+}
+.lm_controls .lm_close {
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAYAAADgkQYQAAAAQUlEQVR4nHXOQQ4AMAgCQeT/f6aXpsGK3jSTuCVJAAr7iBdoAwCKd0nwfaAdHbYERw5b44+E8JoBjEYGMBq5gAYP3usUDu2IvoUAAAAASUVORK5CYII=");
+}
+.lm_controls .lm_dock {
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4QQLExoPDb+5JQAAAKZJREFUOMvV0tENgjAUhWFGYBQ20FG6iYzgBo4gG8gIbAAbyAafD5akwWIATYz3sWn+e/qfFsUvBsevQDzn8gmkRI8a3W4YGjQJdD0MFQ44YUQ5S/geFgF99NFhyEmOz5QtIG4a0aYJMneuSwvmiUaEhebu0Vm51s8LLKaotzY1OQjJWbvpUyJESD0li26g2goJs2feMOyCZJxVuyFp7WvTnJcg/zkPjGQks0ox9/8AAAAASUVORK5CYII=");
+ transform: rotate(-45deg);
+ transition: transform 300ms;
+}
+.lm_stack.lm_docked .lm_controls .lm_dock {
+ transform: rotate(0deg);
+}
+.lm_stack.lm_docked > .lm_items {
+ border-color: #555555;
+ border-image: linear-gradient(to right, #444444 1%, #999999 100%);
+ box-shadow: 0 2px 2px #000000;
+}
+.lm_maximised .lm_header {
+ background-color: #000000;
+}
+.lm_maximised .lm_controls .lm_maximise {
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAJ0lEQVR4nGP8//8/AzGAiShVI1YhCwMDA8OsWbPwBmZaWhoj0SYCAN1lBxMAX4n0AAAAAElFTkSuQmCC");
+}
+.lm_transition_indicator {
+ background-color: #000000;
+ border: 1px dashed #555555;
+}
+.lm_popin {
+ cursor: pointer;
+}
+.lm_popin .lm_bg {
+ background: #ffffff;
+ opacity: 0.3;
+}
+.lm_popin .lm_icon {
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAAJCAYAAADpeqZqAAAAWklEQVR4nJWOyw3AIAxDHcQC7L8jbwT3AlJBfNp3SiI7dtRaLSlKKeoA1oEsKSQZCEluexw8Tm3ohk+E7bnOUHUGcNh+HwbBygw4AZ7FN/Lt84p0l+yTflV8AKQyLdcCRJi/AAAAAElFTkSuQmCC");
+ background-position: center center;
+ background-repeat: no-repeat;
+ border-left: 1px solid #eeeeee;
+ border-top: 1px solid #eeeeee;
+ opacity: 0.7;
+}
+.lm_popin:hover .lm_icon {
+ opacity: 1;
+}
+
+/*# sourceMappingURL=goldenlayout.css.map*/ \ No newline at end of file
diff --git a/webAO/golden/css/goldenlayout.css.map b/webAO/golden/css/goldenlayout.css.map
new file mode 100644
index 0000000..ea8f7a7
--- /dev/null
+++ b/webAO/golden/css/goldenlayout.css.map
@@ -0,0 +1 @@
+{"version":3,"file":"css\\goldenlayout.css","sources":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","sourceRoot":""} \ No newline at end of file
diff --git a/webAO/golden/js/goldenlayout.js b/webAO/golden/js/goldenlayout.js
new file mode 100644
index 0000000..6f4c3c0
--- /dev/null
+++ b/webAO/golden/js/goldenlayout.js
@@ -0,0 +1,2 @@
+(function(e,t){'object'==typeof exports&&'object'==typeof module?module.exports=t():'function'==typeof define&&define.amd?define('GoldenLayout',[],t):'object'==typeof exports?exports.GoldenLayout=t():e.GoldenLayout=t()})('undefined'==typeof self?this:self,function(){var e=Math.min,t=Math.floor,n=Math.max;return function(e){function t(o){if(n[o])return n[o].exports;var i=n[o]={i:o,l:!1,exports:{}};return e[o].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var n=e&&e.__esModule?function(){return e['default']}:function(){return e};return t.d(n,'a',n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p='',t(t.s=35)}([function(e,t,n){'use strict';function o(e){var t=location.hash.match(new RegExp(e+'=([^&]*)'));return t?t[1]:null}t.e=function(e){return $.zepto?e.touches?e.targetTouches[0]:e:e.originalEvent&&e.originalEvent.touches?e.originalEvent.touches[0]:e},t.j=function(e){var t,n;if('function'==typeof a.a)return a()(e);for(n in t=[],e)t.push(n);return t},t.d=function(e){if(window.location.hash)return o(e);if(!window.location.search)return null;var t,n,i=window.location.search.substr(1).split('&'),a={};for(n=0;n<i.length;n++)t=i[n].split('='),a[t[0]]=t[1];return a[e]||null},t.b=function(e,t){for(var n in t)e[n]=t[n];return e},t.a=function(e){return(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)})(function(){e()})},t.g=function(e,t){if(!(t instanceof Array))throw new Error('Haystack is not an Array');if(t.indexOf)return t.indexOf(e);for(var n=0;n<t.length;n++)if(t[n]===e)return n;return-1},n.d(t,'h',function(){return l}),t.c=function(e,t,n){if(void 0!==Function.prototype.bind)return Function.prototype.bind.apply(e,[t].concat(n||[]));var o=function(){var i=(n||[]).concat(Array.prototype.slice.call(arguments,0));return this instanceof o?void e.apply(this,i):e.apply(t,i)};return o.prototype=e.prototype,o},t.i=function(){return'function'==typeof Date.now?Date.now():new Date().getTime()},t.f=function(){return(1e15*Math.random()).toString(36).replace('.','')},t.k=function(e){return $.trim(e.replace(/(<([^>]+)>)/ig,''))};var i=n(40),a=n.n(i),s=n(60),r=n.n(s),l='function'!=typeof /./&&'object'!=typeof Int8Array?function(e){return'function'==typeof e||!1}:function(e){return'[object Function]'===toString.call(e)}},function(e,t,n){'use strict';var o=n(0);const a='__all';t.a=a;t.b=class{constructor(){this._mSubscriptions={},this._mSubscriptions[a]=[],this.on=function(e,t,n){if(!Object(o.h)(t))throw new Error('Tried to listen to event '+e+' with non-function callback '+t);this._mSubscriptions[e]||(this._mSubscriptions[e]=[]),this._mSubscriptions[e].push({fn:t,ctx:n})},this.emit=function(e){var t,n,o;o=Array.prototype.slice.call(arguments,1);var i=this._mSubscriptions[e];if(i)for(i=i.slice(),t=0;t<i.length;t++)n=i[t].ctx||{},i[t].fn.apply(n,o);o.unshift(e);var s=this._mSubscriptions[a].slice();for(t=0;t<s.length;t++)n=s[t].ctx||{},s[t].fn.apply(n,o)},this.unbind=function(e,t,n){if(!this._mSubscriptions[e])throw new Error('No subscribtions to unsubscribe for event '+e);var o,i=!1;for(o=0;o<this._mSubscriptions[e].length;o++)t&&this._mSubscriptions[e][o].fn!==t||n&&n!==this._mSubscriptions[e][o].ctx||(this._mSubscriptions[e].splice(o,1),i=!0);if(!1==i)throw new Error('Nothing to unbind for '+e)},this.off=this.unbind,this.trigger=this.emit}}},function(e){var t=e.exports={version:'2.5.6'};'number'==typeof __e&&(__e=t)},function(e,t,n){'use strict';var o=n(1),i=n(26),a=n(12),s=n(27),r=n(66),l=n(0);class c extends o.b{constructor(e,t,n){super(),this.config=this._extendItemNode(t),this.type=t.type,this.contentItems=[],this.parent=n,this.isInitialised=!1,this.isMaximised=!1,this.isRoot=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.layoutManager=e,this._pendingEventPropagations={},this._throttledEvents=['stateChanged'],this.on(o.a,this._propagateEvent,this),t.content&&this._createContentItems(t)}setSize(){throw new Error('Abstract Method')}callDownwards(e,t,n,o){var a;for(!0!==n&&!0!==o&&this[e].apply(this,t||[]),a=0;a<this.contentItems.length;a++)this.contentItems[a].callDownwards(e,t,n);!0===n&&!0!==o&&this[e].apply(this,t||[])}removeChild(e,t){var n=Object(l.g)(e,this.contentItems);if(-1===n)throw new Error('Can\'t remove child item. Unknown content item');!0!==t&&this.contentItems[n]._$destroy(),this.contentItems.splice(n,1),this.config.content.splice(n,1),0<this.contentItems.length?this.callDownwards('setSize'):!(this instanceof a.a)&&!0===this.config.isClosable&&this.parent.removeChild(this)}undisplayChild(e){var t=Object(l.g)(e,this.contentItems);if(-1===t)throw new Error('Can\'t remove child item. Unknown content item');this instanceof a.a||!0!==this.config.isClosable||this.parent.undisplayChild(this)}addChild(e,t){t===void 0&&(t=this.contentItems.length),this.contentItems.splice(t,0,e),this.config.content===void 0&&(this.config.content=[]),this.config.content.splice(t,0,e.config),e.parent=this,!0===e.parent.isInitialised&&!1===e.isInitialised&&e._$init()}replaceChild(e,t,n){t=this.layoutManager._$normalizeContentItem(t);var o=Object(l.g)(e,this.contentItems),i=e.element[0].parentNode;if(-1===o)throw new Error('Can\'t replace child. oldChild is not child of this');i.replaceChild(t.element[0],e.element[0]),!0===n&&(e.parent=null,e._$destroy()),this.contentItems[o]=t,t.parent=this,this.isStack&&(this.header.tabs[o].contentItem=t),!0===t.parent.isInitialised&&!1===t.isInitialised&&t._$init(),this.callDownwards('setSize')}remove(){this.parent.removeChild(this)}popout(){var e=this.layoutManager.createPopout(this);return this.emitBubblingEvent('stateChanged'),e}toggleMaximise(t){t&&t.preventDefault(),!0===this.isMaximised?this.layoutManager._$minimiseItem(this):this.layoutManager._$maximiseItem(this),this.isMaximised=!this.isMaximised,this.emitBubblingEvent('stateChanged')}select(){this.layoutManager.selectedItem!==this&&(this.layoutManager.selectItem(this,!0),this.element.addClass('lm_selected'))}deselect(){this.layoutManager.selectedItem===this&&(this.layoutManager.selectedItem=null,this.element.removeClass('lm_selected'))}setTitle(e){this.config.title=e,this.emit('titleChanged',e),this.emit('stateChanged')}hasId(e){if(!this.config.id)return!1;return'string'==typeof this.config.id?this.config.id===e:this.config.id instanceof Array?-1!==Object(l.g)(e,this.config.id):void 0}addId(e){this.hasId(e)||(this.config.id?'string'==typeof this.config.id?this.config.id=[this.config.id,e]:this.config.id instanceof Array&&this.config.id.push(e):this.config.id=e)}removeId(e){if(!this.hasId(e))throw new Error('Id not found');if('string'==typeof this.config.id)delete this.config.id;else if(this.config.id instanceof Array){var t=Object(l.g)(e,this.config.id);this.config.id.splice(t,1)}}getItemsByFilter(e){var t=[],n=function(o){for(var a=0;a<o.contentItems.length;a++)!0===e(o.contentItems[a])&&t.push(o.contentItems[a]),n(o.contentItems[a])};return n(this),t}getItemsById(e){return this.getItemsByFilter(function(t){return t.config.id instanceof Array?-1!==Object(l.g)(e,t.config.id):t.config.id===e})}getItemsByType(e){return this._$getItemsByProperty('type',e)}getComponentsByName(e){var t,n=this._$getItemsByProperty('componentName',e),o=[];for(t=0;t<n.length;t++)o.push(n[t].instance);return o}_$getItemsByProperty(e,t){return this.getItemsByFilter(function(n){return n[e]===t})}_$setParent(e){this.parent=e}_$highlightDropZone(e,t,n){this.layoutManager.dropTargetIndicator.highlightArea(n)}_$onDrop(e){this.addChild(e)}_$hide(){this._callOnActiveComponents('hide'),this.element.hide(),this.layoutManager.updateSize()}_$show(){this._callOnActiveComponents('show'),this.element.show(),this.layoutManager.updateSize()}_callOnActiveComponents(e){var t,n,o=this.getItemsByType('stack');for(n=0;n<o.length;n++)t=o[n].getActiveContentItem(),t&&t.isComponent&&t.container[e]()}_$destroy(){this.emitBubblingEvent('beforeItemDestroyed'),this.callDownwards('_$destroy',[],!0,!0),this.element.remove(),this.emitBubblingEvent('itemDestroyed')}_$getArea(e){e=e||this.element;var t=e.offset(),n=e.width(),o=e.height();return{x1:t.left,y1:t.top,x2:t.left+n,y2:t.top+o,surface:n*o,contentItem:this}}_$init(){var e;for(this.setSize(),e=0;e<this.contentItems.length;e++)this.childElementContainer.append(this.contentItems[e].element);this.isInitialised=!0,this.emitBubblingEvent('itemCreated'),this.emitBubblingEvent(this.type+'Created')}emitBubblingEvent(e){var t=new i.a(e,this);this.emit(e,t)}_createContentItems(e){var t,n;if(!(e.content instanceof Array))throw new s.a('content must be an Array',e);for(n=0;n<e.content.length;n++)t=this.layoutManager.createContentItem(e.content[n],this),this.contentItems.push(t)}_extendItemNode(e){for(var t in r.a)void 0===e[t]&&(e[t]=r.a[t]);return e}_propagateEvent(e,t){t instanceof i.a&&!1===t.isPropagationStopped&&!0===this.isInitialised&&(!1===this.isRoot&&this.parent?this.parent.emit.apply(this.parent,Array.prototype.slice.call(arguments,0)):this._scheduleEventPropagationToLayoutManager(e,t))}_scheduleEventPropagationToLayoutManager(e,t){-1===Object(l.g)(e,this._throttledEvents)?this.layoutManager.emit(e,t.origin):!0!==this._pendingEventPropagations[e]&&(this._pendingEventPropagations[e]=!0,Object(l.a)(Object(l.c)(this._propagateEventToLayoutManager,this,[e,t])))}_propagateEventToLayoutManager(e,t){this._pendingEventPropagations[e]=!1,this.layoutManager.emit(e,t)}}t.a=c},function(e){var t=e.exports='undefined'!=typeof window&&window.Math==Math?window:'undefined'!=typeof self&&self.Math==Math?self:Function('return this')();'number'==typeof __g&&(__g=t)},function(e,t,n){e.exports=!n(10)(function(){return 7!=Object.defineProperty({},'a',{get:function(){return 7}}).a})},function(e,o,i){'use strict';var a=Math.round,s=i(3),r=i(13),l=i(67),c=i(0);class p extends s.a{constructor(e,t,n,o){super(t,n,o),this.isRow=!e,this.isColumn=e,this.element=$('<div class="lm_item lm_'+(e?'column':'row')+'"></div>'),this.childElementContainer=this.element,this._splitterSize=t.config.dimensions.borderWidth,this._splitterGrabSize=t.config.dimensions.borderGrabWidth,this._isColumn=e,this._dimension=e?'height':'width',this._splitter=[],this._splitterPosition=null,this._splitterMinPosition=null,this._splitterMaxPosition=null}addChild(e,t,o){var a,r,l,i;if(e=this.layoutManager._$normalizeContentItem(e,this),void 0===t&&(t=this.contentItems.length),0<this.contentItems.length?(i=this._createSplitter(n(0,t-1)).element,0<t?(this.contentItems[t-1].element.after(i),i.after(e.element),this._isDocked(t-1)&&(this._splitter[t-1].element.hide(),this._splitter[t].element.show())):(this.contentItems[0].element.before(i),i.before(e.element))):this.childElementContainer.append(e.element),s.a.prototype.addChild.call(this,e,t),a=100*(1/this.contentItems.length),!0===o)return void this.emitBubblingEvent('stateChanged');for(l=0;l<this.contentItems.length;l++)this.contentItems[l]===e?e.config[this._dimension]=a:(r=this.contentItems[l].config[this._dimension]*=(100-a)/100,this.contentItems[l].config[this._dimension]=r);this.callDownwards('setSize'),this.emitBubblingEvent('stateChanged'),this._validateDocking()}undisplayChild(e){var t,o=e.config[this._dimension],i=Object(c.g)(e,this.contentItems),a=n(i-1,0);if(-1===i)throw new Error('Can\'t undisplay child. ContentItem is not child of this Row or Column');this._splitter[a]&&this._splitter[a].element.hide(),a<this._splitter.length&&this._isDocked(a)&&this._splitter[a].element.hide();var r=this._isDocked();for(t=0;t<this.contentItems.length;t++)this.contentItems[t]===e?this.contentItems[t].config[this._dimension]=0:this._isDocked(t)||(this.contentItems[t].config[this._dimension]+=o/(this.contentItems.length-1-r));1===this.contentItems.length&&s.a.prototype.undisplayChild.call(this,e),this.callDownwards('setSize'),this.emitBubblingEvent('stateChanged')}removeChild(e,t){var o,i,a=e.config[this._dimension],r=Object(c.g)(e,this.contentItems),l=n(r-1,0);if(-1===r)throw new Error('Can\'t remove child. ContentItem is not child of this Row or Column');this._splitter[l]&&(this._splitter[l]._$destroy(),this._splitter.splice(l,1)),l<this._splitter.length&&this._isDocked(l)&&this._splitter[l].element.hide();var p=this._isDocked();for(o=0;o<this.contentItems.length;o++)this.contentItems[o]!==e&&(this._isDocked(o)||(this.contentItems[o].config[this._dimension]+=a/(this.contentItems.length-1-p)));s.a.prototype.removeChild.call(this,e,t),1===this.contentItems.length&&!0===this.config.isClosable?(i=this.contentItems[0],this.contentItems=[],this.parent.replaceChild(this,i,!0),this._validateDocking(this.parent)):(this.callDownwards('setSize'),this.emitBubblingEvent('stateChanged'),this._validateDocking())}replaceChild(e,t){var n=e.config[this._dimension];s.a.prototype.replaceChild.call(this,e,t),t.config[this._dimension]=n,this.callDownwards('setSize'),this.emitBubblingEvent('stateChanged')}setSize(){0<this.contentItems.length&&(this._calculateRelativeSizes(),this._setAbsoluteSizes()),this.emitBubblingEvent('stateChanged'),this.emit('resize')}dock(e,t,o){if(1===this.contentItems.length)throw new Error('Can\'t dock child when it single');var a=e.config[this._dimension],s=this.layoutManager.config.dimensions.headerHeight,r=Object(c.g)(e,this.contentItems),l=n(r-1,0);if(-1===r)throw new Error('Can\'t dock child. ContentItem is not child of this Row or Column');var p,i=e._docker&&e._docker.docked;if('undefined'==typeof t||t!=i){if(i){for(this._splitter[l].element.show(),p=0;p<this.contentItems.length;p++){var d=e._docker.size;this.contentItems[p]===e?e.config[this._dimension]=d:(itemSize=this.contentItems[p].config[this._dimension]*=(100-d)/100,this.contentItems[p].config[this._dimension]=itemSize)}e._docker={docked:!1}}else{if(2>this.contentItems.length-this._isDocked())throw new Error('Can\'t dock child when it is last in '+this.config.type);var m={column:{first:'top',last:'bottom'},row:{first:'left',last:'right'}}[this.config.type][r?'last':'first'];e.header.position()!=m&&e.header.position(m),this._splitter[l]&&this._splitter[l].element.hide();var _=this._isDocked();for(p=0;p<this.contentItems.length;p++)this.contentItems[p]===e?this.contentItems[p].config[this._dimension]=0:this._isDocked(p)||(this.contentItems[p].config[this._dimension]+=a/(this.contentItems.length-1-_));e._docker={dimension:this._dimension,size:a,realSize:e.element[this._dimension]()-s,docked:!0},o&&e.childElementContainer[this._dimension](0)}e.element.toggleClass('lm_docked',e._docker.docked),this.callDownwards('setSize'),this.emitBubblingEvent('stateChanged'),this._validateDocking()}}_$init(){if(!0!==this.isInitialised){var e;for(s.a.prototype._$init.call(this),e=0;e<this.contentItems.length-1;e++)this.contentItems[e].element.after(this._createSplitter(e).element);for(e=0;e<this.contentItems.length;e++)this.contentItems[e]._header&&this.contentItems[e]._header.docked&&this.dock(this.contentItems[e],!0,!0)}}_setAbsoluteSizes(){var e,t=this._calculateAbsoluteSizes();for(e=0;e<this.contentItems.length;e++)0<t.additionalPixel-e&&t.itemSizes[e]++,this._isColumn?(this.contentItems[e].element.width(t.totalWidth),this.contentItems[e].element.height(t.itemSizes[e])):(this.contentItems[e].element.width(t.itemSizes[e]),this.contentItems[e].element.height(t.totalHeight))}_calculateAbsoluteSizes(){var e,n,o,i=(this.contentItems.length-1)*this._splitterSize,a=this.layoutManager.config.dimensions.headerHeight,s=this.element.width(),r=this.element.height(),l=0,c=[];for(this._isColumn?r-=i:s-=i,e=0;e<this.contentItems.length;e++)this._isDocked(e)&&(this._isColumn?r-=a-this._splitterSize:s-=a-this._splitterSize);for(e=0;e<this.contentItems.length;e++)o=this._isColumn?t(r*(this.contentItems[e].config.height/100)):t(s*(this.contentItems[e].config.width/100)),this._isDocked(e)&&(o=a),l+=o,c.push(o);return n=t((this._isColumn?r:s)-l),{itemSizes:c,additionalPixel:n,totalWidth:s,totalHeight:r}}_calculateRelativeSizes(){var e,t=0,n=[],o=this._isColumn?'height':'width';for(e=0;e<this.contentItems.length;e++)void 0===this.contentItems[e].config[o]?n.push(this.contentItems[e]):t+=this.contentItems[e].config[o];if(100===a(t))return void this._respectMinItemWidth();if(100>a(t)&&0<n.length){for(e=0;e<n.length;e++)n[e].config[o]=(100-t)/n.length;return void this._respectMinItemWidth()}if(100<a(t))for(e=0;e<n.length;e++)n[e].config[o]=50,t+=50;for(e=0;e<this.contentItems.length;e++)this.contentItems[e].config[o]=100*(this.contentItems[e].config[o]/t);this._respectMinItemWidth()}_respectMinItemWidth(){var e,t,n,o=this.layoutManager.config.dimensions?this.layoutManager.config.dimensions.minItemWidth||0:0,s=null,r=[],l=0,c=0,p=0,d=0,m=null,_=[];if(!(this._isColumn||!o||1>=this.contentItems.length)){s=this._calculateAbsoluteSizes();for(var g=0;g<this.contentItems.length;g++)m=this.contentItems[g],d=s.itemSizes[g],d<o?(c+=o-d,n={width:o}):(l+=d-o,n={width:d},r.push(n)),_.push(n);if(!(0==c||c>l)){for(e=c/l,p=c,g=0;g<r.length;g++)n=r[g],t=a((n.width-o)*e),p-=t,n.width-=t;for(0!==p&&(_[_.length-1].width-=p),g=0;g<this.contentItems.length;g++)this.contentItems[g].config.width=100*(_[g].width/s.totalWidth)}}}_createSplitter(e){var t;return t=new l.a(this._isColumn,this._splitterSize,this._splitterGrabSize),t.on('drag',Object(c.c)(this._onSplitterDrag,this,[t]),this),t.on('dragStop',Object(c.c)(this._onSplitterDragStop,this,[t]),this),t.on('dragStart',Object(c.c)(this._onSplitterDragStart,this,[t]),this),this._splitter.splice(e,0,t),t}_getItemsForSplitter(e){var t=Object(c.g)(e,this._splitter);return{before:this.contentItems[t],after:this.contentItems[t+1]}}_isDocked(e){if('undefined'==typeof e){for(var t=0,n=0;n<this.contentItems.length;++n)this._isDocked(n)&&t++;return t}return e<this.contentItems.length?this.contentItems[e]._docker&&this.contentItems[e]._docker.docked:void 0}_validateDocking(e){e=e||this;for(var t=1<e.contentItems.length-e._isDocked(),n=0;n<e.contentItems.length;++n)e.contentItems[n]instanceof r.a&&(e.contentItems[n].header._setDockable(e._isDocked(n)||t),e.contentItems[n].header._$setClosable(t))}_getMinimumDimensions(e){for(var t=0,o=0,a=0;a<e.length;++a)t=n(e[a].minWidth||0,t),o=n(e[a].minHeight||0,o);return{horizontal:t,vertical:o}}_onSplitterDragStart(e){var t=this._getItemsForSplitter(e),n=this.layoutManager.config.dimensions[this._isColumn?'minItemHeight':'minItemWidth'],o=this._getMinimumDimensions(t.before.config.content),i=this._isColumn?o.vertical:o.horizontal,a=this._getMinimumDimensions(t.after.config.content),s=this._isColumn?a.vertical:a.horizontal;this._splitterPosition=0,this._splitterMinPosition=-1*(t.before.element[this._dimension]()-(i||n)),this._splitterMaxPosition=t.after.element[this._dimension]()-(s||n)}_onSplitterDrag(e,t,n){var o=this._isColumn?n:t;o>this._splitterMinPosition&&o<this._splitterMaxPosition&&(this._splitterPosition=o,e.element.css(this._isColumn?'top':'left',o))}_onSplitterDragStop(e){var t=this._getItemsForSplitter(e),n=t.before.element[this._dimension](),o=t.after.element[this._dimension](),i=(this._splitterPosition+n)/(n+o),a=t.before.config[this._dimension]+t.after.config[this._dimension];t.before.config[this._dimension]=i*a,t.after.config[this._dimension]=(1-i)*a,e.element.css({top:0,left:0}),Object(c.a)(Object(c.c)(this.callDownwards,this,['setSize']))}}o.a=p},function(e,t,n){'use strict';var o=n(1),i=n(0);class a extends o.b{constructor(e,t){super(),this._timeout=null,this._eElement=$(e),this._oDocument=$(document),this._eBody=$(document.body),this._nButtonCode=t||0,this._nDelay=200,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._bDragging=!1,this._fMove=Object(i.c)(this.onMouseMove,this),this._fUp=Object(i.c)(this.onMouseUp,this),this._fDown=Object(i.c)(this.onMouseDown,this),this._eElement.on('mousedown touchstart',this._fDown)}destroy(){this._eElement.unbind('mousedown touchstart',this._fDown),this._oDocument.unbind('mouseup touchend',this._fUp),this._eElement=null,this._oDocument=null,this._eBody=null}onMouseDown(e){if(e.preventDefault(),0==e.button||'touchstart'===e.type){var t=this._getCoordinates(e);this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.on('mousemove touchmove',this._fMove),this._oDocument.one('mouseup touchend',this._fUp),this._timeout=setTimeout(Object(i.c)(this._startDrag,this),this._nDelay)}}onMouseMove(e){var t=Math.abs;if(null!=this._timeout){e.preventDefault();var n=this._getCoordinates(e);this._nX=n.x-this._nOriginalX,this._nY=n.y-this._nOriginalY,!1===this._bDragging&&(t(this._nX)>this._nDistance||t(this._nY)>this._nDistance)&&(clearTimeout(this._timeout),this._startDrag()),this._bDragging&&this.emit('drag',this._nX,this._nY,e)}}onMouseUp(e){null!=this._timeout&&(clearTimeout(this._timeout),this._eBody.removeClass('lm_dragging'),this._eElement.removeClass('lm_dragging'),this._oDocument.find('iframe').css('pointer-events',''),this._oDocument.unbind('mousemove touchmove',this._fMove),this._oDocument.unbind('mouseup touchend',this._fUp),!0===this._bDragging&&(this._bDragging=!1,this.emit('dragStop',e,this._nOriginalX+this._nX)))}_startDrag(){this._bDragging=!0,this._eBody.addClass('lm_dragging'),this._eElement.addClass('lm_dragging'),this._oDocument.find('iframe').css('pointer-events','none'),this.emit('dragStart',this._nOriginalX,this._nOriginalY)}_getCoordinates(e){return e=Object(i.e)(e),{x:e.pageX,y:e.pageY}}}t.a=a},function(e,t,n){var o=n(9);e.exports=function(e){if(!o(e))throw TypeError(e+' is not an object!');return e}},function(e){e.exports=function(e){return'object'==typeof e?null!==e:'function'==typeof e}},function(e){e.exports=function(e){try{return!!e()}catch(t){return!0}}},function(e,t,n){'use strict';var o=n(0);t.a=class{constructor(){if(this._keys=['settings','hasHeaders','constrainDragToContainer','selectionEnabled','dimensions','borderWidth','minItemHeight','minItemWidth','headerHeight','dragProxyWidth','dragProxyHeight','labels','close','maximise','minimise','popout','content','componentName','componentState','id','width','type','height','isClosable','title','popoutWholeStack','openPopouts','parentId','activeItemIndex','reorderEnabled','borderGrabWidth'],36<this._keys.length)throw new Error('Too many keys in config minifier map');this._values=[!0,!1,'row','column','stack','component','close','maximise','minimise','open in new window']}minifyConfig(e){var t={};return this._nextLevel(e,t,'_min'),t}unminifyConfig(e){var t={};return this._nextLevel(e,t,'_max'),t}_nextLevel(e,t,n){var o,i;for(o in e)e instanceof Array&&(o=parseInt(o,10)),e.hasOwnProperty(o)&&(i=this[n](o,this._keys),'object'==typeof e[o]?(t[i]=e[o]instanceof Array?[]:{},this._nextLevel(e[o],t[i],n)):t[i]=this[n](e[o],this._values))}_min(e,t){if('string'==typeof e&&1===e.length)return'___'+e;var n=Object(o.g)(e,t);return-1===n?e:n.toString(36)}_max(e,t){return'string'==typeof e&&1===e.length?t[parseInt(e,36)]:'string'==typeof e&&'___'===e.substr(0,3)?e[3]:e}}},function(e,t,n){'use strict';var o=n(3),i=n(6);class a extends o.a{constructor(e,t,n){super(e,t,null),this.isRoot=!0,this.type='root',this.element=$('<div class="lm_goldenlayout lm_item lm_root"></div>'),this.childElementContainer=this.element,this._containerElement=n,this._containerElement.append(this.element)}addChild(e){if(0<this.contentItems.length)throw new Error('Root node can only have a single child');e=this.layoutManager._$normalizeContentItem(e,this),this.childElementContainer.append(e.element),o.a.prototype.addChild.call(this,e),this.callDownwards('setSize'),this.emitBubblingEvent('stateChanged')}setSize(e,t){e='undefined'==typeof e?this._containerElement.width():e,t='undefined'==typeof t?this._containerElement.height():t,this.element.width(e),this.element.height(t),this.contentItems[0]&&(this.contentItems[0].element.width(e),this.contentItems[0].element.height(t))}_$highlightDropZone(){this.layoutManager.tabDropPlaceholder.remove(),o.a.prototype._$highlightDropZone.apply(this,arguments)}_$onDrop(e,t){var n;if(e.isComponent&&(n=this.layoutManager.createContentItem({type:'stack',header:e.config.header||{}},this),n._$init(),n.addChild(e),e=n),!this.contentItems.length)this.addChild(e);else{('row'===e.config.type||'column'===e.config.type)&&(n=this.layoutManager.createContentItem({type:'stack'},this),n.addChild(e),e=n);var o='x'==t.side[0]?'row':'column',a='x'==t.side[0]?'width':'height',s='2'==t.side[1],r=this.contentItems[0];if(!(r instanceof i.a)||r.type!=o){var l=this.layoutManager.createContentItem({type:o},this);this.replaceChild(r,l),l.addChild(e,s?0:void 0,!0),l.addChild(r,s?void 0:0,!0),r.config[a]=50,e.config[a]=50,l.callDownwards('setSize')}else{var c=r.contentItems[s?0:r.contentItems.length-1];r.addChild(e,s?0:void 0,!0),c.config[a]*=0.5,e.config[a]=c.config[a],r.callDownwards('setSize')}}}}t.a=a},function(t,o,i){'use strict';var a=i(3),s=i(6),r=i(28),l=i(0);class c extends a.a{constructor(e,t,n){super(e,t,n),this.element=$('<div class="lm_item lm_stack"></div>'),this._activeContentItem=null;var o=e.config;this._header={show:!0===o.settings.hasHeaders&&!1!==t.hasHeaders,popout:o.settings.showPopoutIcon&&o.labels.popout,maximise:o.settings.showMaximiseIcon&&o.labels.maximise,close:o.settings.showCloseIcon&&o.labels.close,minimise:o.labels.minimise},o.header&&Object(l.b)(this._header,o.header),t.header&&Object(l.b)(this._header,t.header),t.content&&t.content[0]&&t.content[0].header&&Object(l.b)(this._header,t.content[0].header),this._dropZones={},this._dropSegment=null,this._contentAreaDimensions=null,this._dropIndex=null,this.isStack=!0,this.childElementContainer=$('<div class="lm_items"></div>'),this.header=new r.a(e,this),this.element.on('mouseleave mouseenter',Object(l.c)(function(e){this._docker&&this._docker.docked&&this.childElementContainer[this._docker.dimension]('mouseenter'==e.type?this._docker.realSize:0)},this)),this.element.append(this.header.element),this.element.append(this.childElementContainer),this._setupHeaderPosition(),this._$validateClosability()}dock(e){this._header.dock&&this.parent instanceof s.a&&this.parent.dock(this,e)}setSize(){if('none'!==this.element.css('display')){var e=this._docker&&this._docker.docked,t={width:this.element.width(),height:this.element.height()};this._header.show&&(t[this._sided?'width':'height']-=this.layoutManager.config.dimensions.headerHeight),e&&(t[this._docker.dimension]=this._docker.realSize),e&&'height'!=this._docker.dimension||this.childElementContainer.width(t.width),e&&'width'!=this._docker.dimension||this.childElementContainer.height(t.height);for(var n=0;n<this.contentItems.length;n++)this.contentItems[n].element.width(t.width),this.contentItems[n].element.height(t.height);this.emit('resize'),this.emitBubblingEvent('stateChanged')}}_$init(){var e,t;if(!0!==this.isInitialised){for(a.a.prototype._$init.call(this),e=0;e<this.contentItems.length;e++)this.header.createTab(this.contentItems[e]),this.contentItems[e]._$hide();if(0<this.contentItems.length){if(t=this.contentItems[this.config.activeItemIndex||0],!t)throw new Error('Configured activeItemIndex out of bounds');this.setActiveContentItem(t)}}}setActiveContentItem(e){if(-1===Object(l.g)(e,this.contentItems))throw new Error('contentItem is not a child of this stack');null!==this._activeContentItem&&this._activeContentItem._$hide(),this._activeContentItem=e,this.header.setActiveContentItem(e),e._$show(),this.emit('activeContentItemChanged',e),this.layoutManager.emit('activeContentItemChanged',e),this.emitBubblingEvent('stateChanged')}getActiveContentItem(){return this.header.activeContentItem}addChild(e,t){t>this.contentItems.length&&(t-=1),e=this.layoutManager._$normalizeContentItem(e,this),a.a.prototype.addChild.call(this,e,t),this.childElementContainer.append(e.element),this.header.createTab(e,t),this.setActiveContentItem(e),this.callDownwards('setSize'),this._$validateClosability(),this.parent instanceof s.a&&this.parent._validateDocking(),this.emitBubblingEvent('stateChanged')}removeChild(e,t){var o=Object(l.g)(e,this.contentItems);a.a.prototype.removeChild.call(this,e,t),this.header.removeTab(e),this.header.activeContentItem===e&&(0<this.contentItems.length?this.setActiveContentItem(this.contentItems[n(o-1,0)]):this._activeContentItem=null),this._$validateClosability(),this.parent instanceof s.a&&this.parent._validateDocking(),this.emitBubblingEvent('stateChanged')}undisplayChild(e){if(1<this.contentItems.length){var t=Object(l.g)(e,this.contentItems);e._$hide&&e._$hide(),this.setActiveContentItem(this.contentItems[0===t?t+1:t-1])}else this.header.hideTab(e),e._$hide&&e._$hide(),a.a.prototype.undisplayChild.call(this,e),this.parent instanceof s.a&&this.parent._validateDocking();this.emitBubblingEvent('stateChanged')}_$validateClosability(){var e,t,n;for(e=this.header._isClosable(),n=0,t=this.contentItems.length;n<t&&!!e;n++)e=this.contentItems[n].config.isClosable;this.header._$setClosable(e)}_$destroy(){a.a.prototype._$destroy.call(this),this.header._$destroy(),this.element.off('mouseenter mouseleave')}_$onDrop(e){if('header'===this._dropSegment)return this._resetHeaderDropZone(),void this.addChild(e,this._dropIndex);if('body'===this._dropSegment)return void this.addChild(e);var t,n,o,i='top'===this._dropSegment||'bottom'===this._dropSegment,a='left'===this._dropSegment||'right'===this._dropSegment,s='top'===this._dropSegment||'left'===this._dropSegment,r=i&&this.parent.isColumn||a&&this.parent.isRow,c=i?'column':'row',p=i?'height':'width';e.isComponent&&(n=this.layoutManager.createContentItem({type:'stack',header:e.config.header||{}},this),n._$init(),n.addChild(e),e=n),('row'===e.config.type||'column'===e.config.type)&&(n=this.layoutManager.createContentItem({type:'stack'},this),n.addChild(e),e=n),r?(t=Object(l.g)(this,this.parent.contentItems),this.parent.addChild(e,s?t:t+1,!0),this.config[p]*=0.5,e.config[p]=this.config[p],this.parent.callDownwards('setSize')):(c=i?'column':'row',o=this.layoutManager.createContentItem({type:c},this),this.parent.replaceChild(this,o),o.addChild(e,s?0:void 0,!0),o.addChild(this,s?void 0:0,!0),this.config[p]=50,e.config[p]=50,o.callDownwards('setSize')),this.parent._validateDocking()}_$highlightDropZone(e,t){var n,o;for(n in this._contentAreaDimensions)if(o=this._contentAreaDimensions[n].hoverArea,o.x1<e&&o.x2>e&&o.y1<t&&o.y2>t)return void('header'===n?(this._dropSegment='header',this._highlightHeaderDropZone(this._sided?t:e)):(this._resetHeaderDropZone(),this._highlightBodyDropZone(n)))}_$getArea(){if('none'===this.element.css('display'))return null;var e=a.a.prototype._$getArea,t=e.call(this,this.header.element),n=e.call(this,this.childElementContainer),o=n.x2-n.x1,i=n.y2-n.y1;return(this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},this._activeContentItem&&!1===this._activeContentItem.isComponent)?t:0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:n.x1,y1:n.y1,x2:n.x2,y2:n.y2},highlightArea:{x1:n.x1,y1:n.y1,x2:n.x2,y2:n.y2}},e.call(this,this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:n.x1,y1:n.y1,x2:n.x1+0.25*o,y2:n.y2},highlightArea:{x1:n.x1,y1:n.y1,x2:n.x1+0.5*o,y2:n.y2}},this._contentAreaDimensions.top={hoverArea:{x1:n.x1+0.25*o,y1:n.y1,x2:n.x1+0.75*o,y2:n.y1+0.5*i},highlightArea:{x1:n.x1,y1:n.y1,x2:n.x2,y2:n.y1+0.5*i}},this._contentAreaDimensions.right={hoverArea:{x1:n.x1+0.75*o,y1:n.y1,x2:n.x2,y2:n.y2},highlightArea:{x1:n.x1+0.5*o,y1:n.y1,x2:n.x2,y2:n.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:n.x1+0.25*o,y1:n.y1+0.5*i,x2:n.x1+0.75*o,y2:n.y2},highlightArea:{x1:n.x1,y1:n.y1+0.5*i,x2:n.x2,y2:n.y2}},e.call(this,this.element))}_highlightHeaderDropZone(t){var n,o,i,a,s,r,l,c,p,d=this.header.tabs.length,m=!1;if(0===d)return l=this.header.element.offset(),void this.layoutManager.dropTargetIndicator.highlightArea({x1:l.left,x2:l.left+100,y1:l.top+this.header.element.height()-20,y2:l.top+this.header.element.height()});for(n=0;n<d;n++)if(o=this.header.tabs[n].element,s=o.offset(),this._sided?(a=s.top,i=s.left,c=o.height()):(a=s.left,i=s.top,c=o.width()),t>a&&t<a+c){m=!0;break}if(!(!1==m&&t<a)){if(p=a+c/2,t<p?(this._dropIndex=n,o.before(this.layoutManager.tabDropPlaceholder)):(this._dropIndex=e(n+1,d),o.after(this.layoutManager.tabDropPlaceholder)),this._sided){var _=this.layoutManager.tabDropPlaceholder.offset().top;return void this.layoutManager.dropTargetIndicator.highlightArea({x1:i,x2:i+o.innerHeight(),y1:_,y2:_+this.layoutManager.tabDropPlaceholder.width()})}r=this.layoutManager.tabDropPlaceholder.offset().left,this.layoutManager.dropTargetIndicator.highlightArea({x1:r,x2:r+this.layoutManager.tabDropPlaceholder.width(),y1:i,y2:i+o.innerHeight()})}}_resetHeaderDropZone(){this.layoutManager.tabDropPlaceholder.remove()}toggleMaximise(t){this.isMaximised||this.dock(!1),a.a.prototype.toggleMaximise.call(this,t)}_setupHeaderPosition(){var e=0<=['right','left','bottom'].indexOf(this._header.show)&&this._header.show;if(this.header.element.toggle(!!this._header.show),this._side=e,this._sided=0<=['right','left'].indexOf(this._side),this.element.removeClass('lm_left lm_right lm_bottom'),this._side&&this.element.addClass('lm_'+this._side),this.element.find('.lm_header').length&&this.childElementContainer){var t=0<=['right','bottom'].indexOf(this._side)?'before':'after';this.header.element[t](this.childElementContainer),this.callDownwards('setSize')}}_highlightBodyDropZone(e){var t=this._contentAreaDimensions[e].highlightArea;this.layoutManager.dropTargetIndicator.highlightArea(t),this._dropSegment=e}}o.a=c},function(e){e.exports=function(e){if(e==void 0)throw TypeError('Can\'t call method on '+e);return e}},function(e,t,n){var o=n(44),i=n(20);e.exports=Object.keys||function(e){return o(e,i)}},function(e){var t={}.hasOwnProperty;e.exports=function(e,n){return t.call(e,n)}},function(e,t,n){var o=n(45),i=n(14);e.exports=function(e){return o(i(e))}},function(e){var n=Math.ceil;e.exports=function(e){return isNaN(e=+e)?0:(0<e?t:n)(e)}},function(e,t,n){var o=n(50)('keys'),i=n(52);e.exports=function(e){return o[e]||(o[e]=i(e))}},function(e){e.exports=['constructor','hasOwnProperty','isPrototypeOf','propertyIsEnumerable','toLocaleString','toString','valueOf']},function(e,t,n){var o=n(4),i=n(2),a=n(54),s=n(56),r=n(16),l='prototype',c=function(e,t,n){var p,d,m,_=e&c.F,g=e&c.G,u=e&c.S,f=e&c.P,h=e&c.B,y=e&c.W,v=g?i:i[t]||(i[t]={}),b=v[l],k=g?o:u?o[t]:(o[t]||{})[l];for(p in g&&(n=t),n)d=!_&&k&&void 0!==k[p],d&&r(v,p)||(m=d?k[p]:n[p],v[p]=g&&'function'!=typeof k[p]?n[p]:h&&d?a(m,o):y&&k[p]==m?function(e){var t=function(t,n,o){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n);}return new e(t,n,o)}return e.apply(this,arguments)};return t[l]=e[l],t}(m):f&&'function'==typeof m?a(Function.call,m):m,f&&((v.virtual||(v.virtual={}))[p]=m,e&c.R&&b&&!b[p]&&s(b,p,m)))};c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,e.exports=c},function(e,t,n){var o=n(8),i=n(57),a=n(58),s=Object.defineProperty;t.f=n(5)?Object.defineProperty:function(e,t,n){if(o(e),t=a(t,!0),o(n),i)try{return s(e,t,n)}catch(t){}if('get'in n||'set'in n)throw TypeError('Accessors not supported!');return'value'in n&&(e[t]=n.value),e}},function(e,t,n){var o=n(9),i=n(4).document,a=o(i)&&o(i.createElement);e.exports=function(e){return a?i.createElement(e):{}}},function(e,t){'use strict';t.a=class{constructor(e,t){this._reactComponent=null,this._originalComponentWillUpdate=null,this._container=e,this._initialState=t,this._reactClass=this._getReactClass(),this._container.on('open',this._render,this),this._container.on('destroy',this._destroy,this)}_render(){this._reactComponent=ReactDOM.render(this._getReactComponent(),this._container.getElement()[0]),this._originalComponentWillUpdate=this._reactComponent.componentWillUpdate||function(){},this._reactComponent.componentWillUpdate=this._onUpdate.bind(this),this._container.getState()&&this._reactComponent.setState(this._container.getState())}_destroy(){ReactDOM.unmountComponentAtNode(this._container.getElement()[0]),this._container.off('open',this._render,this),this._container.off('destroy',this._destroy,this)}_onUpdate(e,t){this._container.setState(t),this._originalComponentWillUpdate.call(this._reactComponent,e,t)}_getReactClass(){var e,t=this._container._config.component;if(!t)throw new Error('No react component name. type: react-component needs a field `component`');if(e=this._container.layoutManager.getComponent(t),!e)throw new Error('React component "'+t+'" not found. Please register all components with GoldenLayout using `registerComponent(name, component)`');return e}_getReactComponent(){var e={glEventHub:this._container.layoutManager.eventHub,glContainer:this._container},t=$.extend(e,this._container._config.props);return React.createElement(this._reactClass,t)}}},function(e,t,n){'use strict';var o=n(1),i=n(0);class a extends o.b{constructor(e){super(),this._layoutManager=e,this._dontPropagateToParent=null,this._childEventSource=null,this.on(o.a,Object(i.c)(this._onEventFromThis,this)),this._boundOnEventFromChild=Object(i.c)(this._onEventFromChild,this),$(window).on('gl_child_event',this._boundOnEventFromChild)}_onEventFromThis(){var e=Array.prototype.slice.call(arguments);this._layoutManager.isSubWindow&&e[0]!==this._dontPropagateToParent&&this._propagateToParent(e),this._propagateToChildren(e),this._dontPropagateToParent=null,this._childEventSource=null}_$onEventFromParent(e){this._dontPropagateToParent=e[0],this.emit.apply(this,e)}_onEventFromChild(e){this._childEventSource=e.originalEvent.__gl,this.emit.apply(this,e.originalEvent.__glArgs)}_propagateToParent(e){var t,n='gl_child_event';document.createEvent?(t=window.opener.document.createEvent('HTMLEvents'),t.initEvent(n,!0,!0)):(t=window.opener.document.createEventObject(),t.eventType=n),t.eventName=n,t.__glArgs=e,t.__gl=this._layoutManager,document.createEvent?window.opener.dispatchEvent(t):window.opener.fireEvent('on'+t.eventType,t)}_propagateToChildren(e){var t,n;for(n=0;n<this._layoutManager.openPopouts.length;n++)t=this._layoutManager.openPopouts[n].getGlInstance(),t&&t!==this._childEventSource&&t.eventHub._$onEventFromParent(e)}destroy(){$(window).off('gl_child_event',this._boundOnEventFromChild)}}t.a=a},function(e,t){'use strict';t.a=class{constructor(e,t){this.name=e,this.origin=t,this.isPropagationStopped=!1}stopPropagation(){this.isPropagationStopped=!0}}},function(e,t){'use strict';class n extends Error{constructor(e,t){super(),this.name='Configuration Error',this.message=e,this.node=t}}t.a=n},function(e,t,n){'use strict';var o=n(1),a=n(29),i=n(31),s=n(0);class r extends o.b{constructor(e,t){super(),this.layoutManager=e,this.element=$('<div class="lm_header"><ul class="lm_tabs"></ul><ul class="lm_controls"></ul><ul class="lm_tabdropdown_list"></ul></div>'),!0===this.layoutManager.config.settings.selectionEnabled&&(this.element.addClass('lm_selectable'),this.element.on('click touchstart',Object(s.c)(this._onHeaderClick,this))),this.tabsContainer=this.element.find('.lm_tabs'),this.tabDropdownContainer=this.element.find('.lm_tabdropdown_list'),this.tabDropdownContainer.hide(),this.controlsContainer=this.element.find('.lm_controls'),this.parent=t,this.parent.on('resize',this._updateTabSizes,this),this.tabs=[],this.tabsMarkedForRemoval=[],this.activeContentItem=null,this.closeButton=null,this.dockButton=null,this.tabDropdownButton=null,this.hideAdditionalTabsDropdown=Object(s.c)(this._hideAdditionalTabsDropdown,this),$(document).mouseup(this.hideAdditionalTabsDropdown),this._lastVisibleTabIndex=-1,this._tabControlOffset=this.layoutManager.config.settings.tabControlOffset,this._createControls()}createTab(e,t){var n,o;for(o=0;o<this.tabs.length;o++)if(this.tabs[o].contentItem===e)return;return n=new a.a(this,e),0===this.tabs.length?(this.tabs.push(n),void this.tabsContainer.append(n.element)):void(void 0===t&&(t=this.tabs.length),0<t?this.tabs[t-1].element.after(n.element):this.tabs[0].element.before(n.element),this.tabs.splice(t,0,n),this._updateTabSizes())}removeTab(e){for(var t=0;t<this.tabs.length;t++)if(this.tabs[t].contentItem===e)return this.tabs[t]._$destroy(),void this.tabs.splice(t,1);for(t=0;t<this.tabsMarkedForRemoval.length;t++)if(this.tabsMarkedForRemoval[t].contentItem===e)return this.tabsMarkedForRemoval[t]._$destroy(),void this.tabsMarkedForRemoval.splice(t,1);throw new Error('contentItem is not controlled by this header')}hideTab(e){for(var t=0;t<this.tabs.length;t++)if(this.tabs[t].contentItem===e)return this.tabs[t].element.hide(),this.tabsMarkedForRemoval.push(this.tabs[t]),void this.tabs.splice(t,1);throw new Error('contentItem is not controlled by this header')}setActiveContentItem(e){var t,n,o,i;for(t=0;t<this.tabs.length;t++)o=this.tabs[t].contentItem===e,this.tabs[t].setActive(o),!0===o&&(this.activeContentItem=e,this.parent.config.activeItemIndex=t);if(this.layoutManager.config.settings.reorderOnTabMenuClick&&-1!==this._lastVisibleTabIndex&&this.parent.config.activeItemIndex>this._lastVisibleTabIndex){for(i=this.tabs[this.parent.config.activeItemIndex],n=this.parent.config.activeItemIndex;0<n;n--)this.tabs[n]=this.tabs[n-1];this.tabs[0]=i,this.parent.config.activeItemIndex=0}this._updateTabSizes(),this.parent.emitBubblingEvent('stateChanged')}position(e){var t=this.parent._header.show;if(this.parent._docker&&this.parent._docker.docked)throw new Error('Can\'t change header position in docked stack');return t&&!this.parent._side&&(t='top'),void 0!==e&&this.parent._header.show!=e&&(this.parent._header.show=e,this.parent._setupHeaderPosition()),t}_$setClosable(e){return this._canDestroy=e||1<this.tabs.length,this.closeButton&&this._isClosable()&&(this.closeButton.element[e?'show':'hide'](),!0)}_setDockable(e){return this.dockButton&&this.parent._header&&this.parent._header.dock&&(this.dockButton.element.toggle(!!e),!0)}_$destroy(){this.emit('destroy',this);for(var e=0;e<this.tabs.length;e++)this.tabs[e]._$destroy();$(document).off('mouseup',this.hideAdditionalTabsDropdown),this.element.remove()}_getHeaderSetting(e){if(e in this.parent._header)return this.parent._header[e]}_createControls(){var e,t,n,o,a,r,l,c,p;if(p=Object(s.c)(this._showAdditionalTabsDropdown,this),c=this.layoutManager.config.labels.tabDropdown,this.tabDropdownButton=new i.a(this,c,'lm_tabdropdown',p),this.tabDropdownButton.element.hide(),this.parent._header&&this.parent._header.dock){var d=Object(s.c)(this.parent.dock,this.parent);n=this._getHeaderSetting('dock'),this.dockButton=new i.a(this,n,'lm_dock',d)}this._getHeaderSetting('popout')&&(t=Object(s.c)(this._onPopoutClick,this),n=this._getHeaderSetting('popout'),new i.a(this,n,'lm_popout',t)),this._getHeaderSetting('maximise')&&(r=Object(s.c)(this.parent.toggleMaximise,this.parent),o=this._getHeaderSetting('maximise'),a=this._getHeaderSetting('minimise'),l=new i.a(this,o,'lm_maximise',r),this.parent.on('maximised',function(){l.element.attr('title',a)}),this.parent.on('minimised',function(){l.element.attr('title',o)})),this._isClosable()&&(e=Object(s.c)(this.parent.remove,this.parent),n=this._getHeaderSetting('close'),this.closeButton=new i.a(this,n,'lm_close',e))}_showAdditionalTabsDropdown(){this.tabDropdownContainer.show()}_hideAdditionalTabsDropdown(){this.tabDropdownContainer.hide()}_isClosable(){return this.parent.config.isClosable&&this.layoutManager.config.settings.showCloseIcon}_onPopoutClick(){!0===this.layoutManager.config.settings.popoutWholeStack?this.parent.popout():this.activeContentItem.popout()}_onHeaderClick(e){e.target===this.element[0]&&this.parent.select()}_updateTabSizes(e){if(0!==this.tabs.length){this.tabDropdownButton.element.toggle(!0===e);var t=function(e){return e?'width':'height'};this.element.css(t(!this.parent._sided),''),this.element[t(this.parent._sided)](this.layoutManager.config.dimensions.headerHeight);var n,o,i,a,s,r=this.element.outerWidth()-this.controlsContainer.outerWidth()-this._tabControlOffset,l=0,c=0,p=0,d=this.layoutManager.config.settings.tabOverlapAllowance,m=!1,_=this.activeContentItem?this.tabs.indexOf(this.activeContentItem.tab):0,g=this.tabs[_];for(this.parent._sided&&(r=this.element.outerHeight()-this.controlsContainer.outerHeight()-this._tabControlOffset),this._lastVisibleTabIndex=-1,o=0;o<this.tabs.length;o++)if(n=this.tabs[o].element,this.tabsContainer.append(n),s=n.outerWidth()+parseInt(n.css('margin-right'),10),l+=s,c=_<=o?l:l+g.element.outerWidth()+parseInt(g.element.css('margin-right'),10),c>r){if(!!m)o===_&&(n.css({"z-index":'auto',"margin-left":''}),this.tabsContainer.append(n));else if(p=0<_&&_<=o?(c-r)/(o-1):(c-r)/o,p<d){for(i=0;i<=o;i++)a=i!==_&&0!==i?'-'+p+'px':'',this.tabs[i].element.css({"z-index":o-i,"margin-left":a});this._lastVisibleTabIndex=o,this.tabsContainer.append(n)}else m=!0;if(m&&o!==_)if(e)n.css({"z-index":'auto',"margin-left":''}),this.tabDropdownContainer.append(n);else return void this._updateTabSizes(!0)}else this._lastVisibleTabIndex=o,n.css({"z-index":'auto',"margin-left":''}),this.tabsContainer.append(n)}}}t.a=r},function(e,t,n){'use strict';var o=n(7),i=n(30),a=n(0);t.a=class{constructor(e,t){this.header=e,this.contentItem=t,this.element=$('<li class="lm_tab"><i class="lm_left"></i><span class="lm_title"></span><div class="lm_close_tab"></div><i class="lm_right"></i></li>'),this.titleElement=this.element.find('.lm_title'),this.closeElement=this.element.find('.lm_close_tab'),this.closeElement[t.config.isClosable?'show':'hide'](),this.isActive=!1,this.setTitle(t.config.title),this.contentItem.on('titleChanged',this.setTitle,this),this._layoutManager=this.contentItem.layoutManager,!0===this._layoutManager.config.settings.reorderEnabled&&!0===t.config.reorderEnabled&&(this._dragListener=new o.a(this.element),this._dragListener.on('dragStart',this._onDragStart,this),this.contentItem.on('destroy',this._dragListener.destroy,this._dragListener)),this._onTabClickFn=Object(a.c)(this._onTabClick,this),this._onCloseClickFn=Object(a.c)(this._onCloseClick,this),this.element.on('mousedown touchstart',this._onTabClickFn),this.contentItem.config.isClosable?(this.closeElement.on('click touchstart',this._onCloseClickFn),this.closeElement.on('mousedown',this._onCloseMousedown)):this.closeElement.remove(),this.contentItem.tab=this,this.contentItem.emit('tab',this),this.contentItem.layoutManager.emit('tabCreated',this),this.contentItem.isComponent&&(this.contentItem.container.tab=this,this.contentItem.container.emit('tab',this))}setTitle(e){this.element.attr('title',Object(a.k)(e)),this.titleElement.html(e)}setActive(e){e===this.isActive||(this.isActive=e,e?this.element.addClass('lm_active'):this.element.removeClass('lm_active'))}_$destroy(){this.element.off('mousedown touchstart',this._onTabClickFn),this.closeElement.off('click touchstart',this._onCloseClickFn),this._dragListener&&(this.contentItem.off('destroy',this._dragListener.destroy,this._dragListener),this._dragListener.off('dragStart',this._onDragStart),this._dragListener=null),this.element.remove()}_onDragStart(e,t){return this.header._canDestroy?void(!0===this.contentItem.parent.isMaximised&&this.contentItem.parent.toggleMaximise(),new i.a(e,t,this._dragListener,this._layoutManager,this.contentItem,this.header.parent)):null}_onTabClick(e){if(0===e.button||'touchstart'===e.type){var t=this.header.parent.getActiveContentItem();this.contentItem!==t&&this.header.parent.setActiveContentItem(this.contentItem)}else 1===e.button&&this.contentItem.config.isClosable&&this._onCloseClick(e)}_onCloseClick(e){e.stopPropagation();this.header._canDestroy&&this.header.parent.removeChild(this.contentItem)}_onCloseMousedown(e){e.stopPropagation()}}},function(e,t,n){'use strict';var o=n(1),i=n(0);class a extends o.b{constructor(e,t,n,o,a,s){super(),this._dragListener=n,this._layoutManager=o,this._contentItem=a,this._originalParent=s,this._area=null,this._lastValidArea=null,this._dragListener.on('drag',this._onDrag,this),this._dragListener.on('dragStop',this._onDrop,this),this.element=$('<div class="lm_dragProxy"><div class="lm_header"><ul class="lm_tabs"><li class="lm_tab lm_active"><i class="lm_left"></i><span class="lm_title"></span><i class="lm_right"></i></li></ul></div><div class="lm_content"></div></div>'),s&&s._side&&(this._sided=s._sided,this.element.addClass('lm_'+s._side),0<=['right','bottom'].indexOf(s._side)&&this.element.find('.lm_content').after(this.element.find('.lm_header'))),this.element.css({left:e,top:t}),this.element.find('.lm_tab').attr('title',Object(i.k)(this._contentItem.config.title)),this.element.find('.lm_title').html(this._contentItem.config.title),this.childElementContainer=this.element.find('.lm_content'),this.childElementContainer.append(a.element),this._undisplayTree(),this._layoutManager._$calculateItemAreas(),this._setDimensions(),$(document.body).append(this.element);var r=this._layoutManager.container.offset();this._minX=r.left,this._minY=r.top,this._maxX=this._layoutManager.container.width()+this._minX,this._maxY=this._layoutManager.container.height()+this._minY,this._width=this.element.width(),this._height=this.element.height(),this._setDropPosition(e,t)}_onDrag(e,t,n){n=Object(i.e)(n);var o=n.pageX,a=n.pageY,s=o>this._minX&&o<this._maxX&&a>this._minY&&a<this._maxY;(s||!0!==this._layoutManager.config.settings.constrainDragToContainer)&&this._setDropPosition(o,a)}_setDropPosition(e,t){this.element.css({left:e,top:t}),this._area=this._layoutManager._$getArea(e,t),null!==this._area&&(this._lastValidArea=this._area,this._area.contentItem._$highlightDropZone(e,t,this._area))}_onDrop(){this._updateTree(),this._layoutManager.dropTargetIndicator.hide(),null===this._area?null===this._lastValidArea?this._originalParent?this._originalParent.addChild(this._contentItem):this._contentItem._$destroy():this._lastValidArea.contentItem._$onDrop(this._contentItem,this._lastValidArea):this._area.contentItem._$onDrop(this._contentItem,this._area),this.element.remove(),this._layoutManager.emit('itemDropped',this._contentItem)}_undisplayTree(){this._contentItem.parent&&this._contentItem.parent.undisplayChild(this._contentItem)}_updateTree(){this._contentItem.parent&&this._contentItem.parent.removeChild(this._contentItem,!0),this._contentItem._$setParent(this)}_setDimensions(){var e=this._layoutManager.config.dimensions,t=e.dragProxyWidth,n=e.dragProxyHeight;this.element.width(t),this.element.height(n),t-=this._sided?e.headerHeight:0,n-=this._sided?0:e.headerHeight,this.childElementContainer.width(t),this.childElementContainer.height(n),this._contentItem.element.width(t),this._contentItem.element.height(n),this._contentItem.callDownwards('_$show'),this._contentItem.callDownwards('setSize')}}t.a=a},function(e,t){'use strict';t.a=class{constructor(e,t,n,o){this._header=e,this.element=$('<li class="'+n+'" title="'+t+'"></li>'),this._header.on('destroy',this._$destroy,this),this._action=o,this.element.on('click touchstart',this._action),this._header.controlsContainer.append(this.element)}_$destroy(){this.element.off(),this.element.remove()}}},function(e,t,n){'use strict';var o=n(3),i=n(33);class a extends o.a{constructor(e,t,n){super(e,t,n);var o=e.getComponent(this.config.componentName),a=$.extend(!0,{},this.config.componentState||{});a.componentName=this.config.componentName,this.componentName=this.config.componentName,''===this.config.title&&(this.config.title=this.config.componentName),this.isComponent=!0,this.container=new i.a(this.config,this,e),this.instance=new o(this.container,a),this.element=this.container._element}close(){this.parent.removeChild(this)}setSize(){'none'!==this.element.css('display')&&this.container._$setSize(this.element.width(),this.element.height())}_$init(){o.a.prototype._$init.call(this),this.container.emit('open')}_$hide(){this.container.hide(),o.a.prototype._$hide.call(this)}_$show(){this.container.show(),o.a.prototype._$show.call(this)}_$shown(){this.container.shown(),o.a.prototype._$shown.call(this)}_$destroy(){this.container.emit('destroy',this),o.a.prototype._$destroy.call(this)}_$getArea(){return null}}t.a=a},function(e,t,n){'use strict';var o=n(1);class i extends o.b{constructor(e,t,n){super(),this.width=null,this.height=null,this.title=e.componentName,this.parent=t,this.layoutManager=n,this.isHidden=!1,this._config=e,this._element=$('<div class="lm_item_container"><div class="lm_content"></div></div>'),this._contentElement=this._element.find('.lm_content')}getElement(){return this._contentElement}hide(){this.emit('hide'),this.isHidden=!0,this._element.hide()}show(){this.emit('show'),this.isHidden=!1,this._element.show(),(0!=this.height||0!=this.width)&&this.emit('shown')}setSize(e,t){for(var n,o,a,s,r,l,i=this.parent,c=this;!i.isColumn&&!i.isRow;)if(c=i,i=i.parent,i.isRoot)return!1;for(a=i.isColumn?'height':'width',s='height'===a?t:e,n=this[a]*(1/(c.config[a]/100)),o=100*(s/n),r=(c.config[a]-o)/(i.contentItems.length-1),l=0;l<i.contentItems.length;l++)i.contentItems[l]===c?i.contentItems[l].config[a]=o:i.contentItems[l].config[a]+=r;return i.callDownwards('setSize'),!0}close(){this._config.isClosable&&(this.emit('close'),this.parent.close())}getState(){return this._config.componentState}extendState(e){this.setState($.extend(!0,this.getState(),e))}setState(e){this._config.componentState=e,this.parent.emitBubblingEvent('stateChanged')}setTitle(e){this.parent.setTitle(e)}_$setSize(e,t){(e!==this.width||t!==this.height)&&(this.width=e,this.height=t,$.zepto?this._contentElement.width(e):this._contentElement.outerWidth(e),$.zepto?this._contentElement.height(t):this._contentElement.outerHeight(t),this.emit('resize'))}}t.a=i},function(e,n,o){'use strict';var i=o(68),a=o.n(i),s=o(1),r=o(11),l=o(0);class c extends s.b{constructor(e,t,n,o,i){super(),this.isInitialised=!1,this._config=e,this._dimensions=t,this._parentId=n,this._indexInParent=o,this._layoutManager=i,this._popoutWindow=null,this._id=null,this._createWindow()}toConfig(){if(!1===this.isInitialised)throw new Error('Can\'t create config, layout not yet initialised');return{dimensions:{width:this.getGlInstance().width,height:this.getGlInstance().height,left:this._popoutWindow.screenX||this._popoutWindow.screenLeft,top:this._popoutWindow.screenY||this._popoutWindow.screenTop},content:this.getGlInstance().toConfig().content,parentId:this._parentId,indexInParent:this._indexInParent}}getGlInstance(){return this._popoutWindow.__glInstance}getWindow(){return this._popoutWindow}close(){if(this.getGlInstance())this.getGlInstance()._$closeWindow();else try{this.getWindow().close()}catch(t){}}popIn(){var e,t,n=this._indexInParent;this._parentId&&(e=$.extend(!0,{},this.getGlInstance().toConfig()).content[0],t=this._layoutManager.root.getItemsById(this._parentId)[0],!t&&(t=0<this._layoutManager.root.contentItems.length?this._layoutManager.root.contentItems[0]:this._layoutManager.root,n=0)),t.addChild(e,this._indexInParent),this.close()}_createWindow(){var e,n=this._createUrl(),o=t(1e6*Math.random()).toString(36),i=this._serializeWindowOptions({width:this._dimensions.width,height:this._dimensions.height,innerWidth:this._dimensions.width,innerHeight:this._dimensions.height,menubar:'no',toolbar:'no',location:'no',personalbar:'no',resizable:'yes',scrollbars:'no',status:'no'});if(this._popoutWindow=window.open(n,o,i),!this._popoutWindow)if(!0===this._layoutManager.config.settings.blockedPopoutsThrowError){var a=new Error('Popout blocked');throw a.type='popoutBlocked',a}else return;$(this._popoutWindow).on('load',Object(l.c)(this._positionWindow,this)).on('unload beforeunload',Object(l.c)(this._onClose,this)),e=setInterval(Object(l.c)(function(){this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this._onInitialised(),clearInterval(e))},this),10)}_serializeWindowOptions(e){var t,n=[];for(t in e)n.push(t+'='+e[t]);return n.join(',')}_createUrl(){var e,t={content:this._config},n='gl-window-config-'+Object(l.f)();t=new r.a().minifyConfig(t);try{localStorage.setItem(n,a()(t))}catch(t){throw new Error('Error while writing to localStorage '+t.toString())}return e=document.location.href.split('?'),1===e.length?e[0]+'?gl-window='+n:document.location.href+'&gl-window='+n}_positionWindow(){this._popoutWindow.moveTo(this._dimensions.left,this._dimensions.top),this._popoutWindow.focus()}_onInitialised(){this.isInitialised=!0,this.getGlInstance().on('popIn',this.popIn,this),this.emit('initialised')}_onClose(){setTimeout(Object(l.c)(this.emit,this,['closed']),50)}}n.a=c},function(e,t,n){'use strict';Object.defineProperty(t,'__esModule',{value:!0});var o=n(36),i=n.n(o),a=n(37),s=n.n(a),r=n(38),l=n.n(r),c=n(39);n.d(t,'default',function(){return c.a});var p=n(33);n.d(t,'ItemContainer',function(){return p.a});var d=n(34);n.d(t,'BrowserPopout',function(){return d.a});var m=n(28);n.d(t,'Header',function(){return m.a});var _=n(31);n.d(t,'HeaderButton',function(){return _.a});var g=n(29);n.d(t,'Tab',function(){return g.a});var u=n(32);n.d(t,'Component',function(){return u.a});var f=n(12);n.d(t,'Root',function(){return f.a});var h=n(6);n.d(t,'RowOrColumn',function(){return h.a});var y=n(13);n.d(t,'Stack',function(){return y.a});var v=n(26);n.d(t,'BubblingEvent',function(){return v.a});var b=n(11);n.d(t,'ConfigMinifier',function(){return b.a});var k=n(7);n.d(t,'DragListener',function(){return k.a});var x=n(1);n.d(t,'EventEmitter',function(){return x.b});var D=n(25);n.d(t,'EventHub',function(){return D.a});var w=n(24);n.d(t,'ReactComponentHandler',function(){return w.a}),{}.ES6&&(n(74),n(77))},function(){},function(){},function(){},function(e,o,i){'use strict';var a=i(1),s=i(24),r=i(11),l=i(25),c=i(12),p=i(6),d=i(13),m=i(32),_=i(3),g=i(34),u=i(70),f=i(71),h=i(72),y=i(27),v=i(73),b=i(0);class k extends a.b{constructor(e,t){if(!$){var n='jQuery is missing as dependency for GoldenLayout. ';throw n+='Please either expose $ on GoldenLayout\'s scope (e.g. window) or add "jquery" to ',n+='your paths when using RequireJS/AMD',new Error(n)}super(),this.isInitialised=!1,this._isFullPage=!1,this._resizeTimeoutId=null,this._components={"lm-react-component":s.a},this._itemAreas=[],this._resizeFunction=Object(b.c)(this._onResize,this),this._unloadFunction=Object(b.c)(this._onUnload,this),this._maximisedItem=null,this._maximisePlaceholder=$('<div class="lm_maximise_place"></div>'),this._creationTimeoutPassed=!1,this._subWindowsCreated=!1,this._dragSources=[],this._updatingColumnsResponsive=!1,this._firstLoad=!0,this.width=null,this.height=null,this.root=null,this.openPopouts=[],this.selectedItem=null,this.isSubWindow=!1,this.eventHub=new l.a(this),this.config=this._createConfig(e),this.container=t,this.dropTargetIndicator=null,this.transitionIndicator=null,this.tabDropPlaceholder=$('<div class="lm_drop_tab_placeholder"></div>'),!0===this.isSubWindow&&$('body').css('visibility','hidden'),this._typeToItem={column:Object(b.c)(p.a,this,[!0]),row:Object(b.c)(p.a,this,[!1]),stack:d.a,component:m.a}}minifyConfig(e){return new r.a().minifyConfig(e)}unminifyConfig(e){return new r.a().unminifyConfig(e)}registerComponent(e,t){if('function'!=typeof t)throw new Error('Please register a constructor function');if(void 0!==this._components[e])throw new Error('Component '+e+' is already registered');this._components[e]=t}toConfig(e){var t,n,o;if(!1===this.isInitialised)throw new Error('Can\'t create config, layout not yet initialised');if(e&&!(e instanceof _.a))throw new Error('Root must be a ContentItem');for(t={settings:Object(b.b)({},this.config.settings),dimensions:Object(b.b)({},this.config.dimensions),labels:Object(b.b)({},this.config.labels)},t.content=[],n=function(e,t){var o,a;for(o in t.config)'content'!==o&&(e[o]=t.config[o]);if(t.contentItems.length)for(e.content=[],a=0;a<t.contentItems.length;a++)e.content[a]={},n(e.content[a],t.contentItems[a])},e?n(t,{contentItems:[e]}):n(t,this.root),this._$reconcilePopoutWindows(),t.openPopouts=[],o=0;o<this.openPopouts.length;o++)t.openPopouts.push(this.openPopouts[o].toConfig());return t.maximisedItemId=this._maximisedItem?'__glMaximised':null,t}getComponent(e){if(this._components[e]===void 0)throw new y.a('Unknown component "'+e+'"');return this._components[e]}init(){return!1===this._subWindowsCreated&&(this._createSubWindows(),this._subWindowsCreated=!0),'loading'===document.readyState||null===document.body?void $(document).ready(Object(b.c)(this.init,this)):!0===this.isSubWindow&&!1===this._creationTimeoutPassed?(setTimeout(Object(b.c)(this.init,this),7),void(this._creationTimeoutPassed=!0)):void(!0===this.isSubWindow&&this._adjustToWindowMode(),this._setContainer(),this.dropTargetIndicator=new f.a(this.container),this.transitionIndicator=new h.a,this.updateSize(),this._create(this.config),this._bindEvents(),this.isInitialised=!0,this._adjustColumnsResponsive(),this.emit('initialised'))}updateSize(e,t){2===arguments.length?(this.width=e,this.height=t):(this.width=this.container.width(),this.height=this.container.height()),!0===this.isInitialised&&(this.root.callDownwards('setSize',[this.width,this.height]),this._maximisedItem&&(this._maximisedItem.element.width(this.container.width()),this._maximisedItem.element.height(this.container.height()),this._maximisedItem.callDownwards('setSize')),this._adjustColumnsResponsive())}destroy(){!1===this.isInitialised||(this._onUnload(),$(window).off('resize',this._resizeFunction),$(window).off('unload beforeunload',this._unloadFunction),this.root.callDownwards('_$destroy',[],!0),this.root.contentItems=[],this.tabDropPlaceholder.remove(),this.dropTargetIndicator.destroy(),this.transitionIndicator.destroy(),this.eventHub.destroy(),this._dragSources.forEach(function(e){e._dragListener.destroy(),e._element=null,e._itemConfig=null,e._dragListener=null}),this._dragSources=[])}createContentItem(e,t){var n,o;if('string'!=typeof e.type)throw new y.a('Missing parameter \'type\'',e);if('react-component'===e.type&&(e.type='component',e.componentName='lm-react-component'),!this._typeToItem[e.type])throw n='Unknown type \''+e.type+'\'. Valid types are '+Object(b.j)(this._typeToItem).join(','),new y.a(n);return'component'!==e.type||t instanceof d.a||!t||!0===this.isSubWindow&&t instanceof c.a||(e={type:'stack',width:e.width,height:e.height,content:[e]}),o=new this._typeToItem[e.type](this,e,t),o}createPopout(e,t,n,o){var i,a,s,r,l,c,p=e,d=e instanceof _.a,m=this;if(n=n||null,d){for(p=this.toConfig(e).content,n=Object(b.f)(),r=e.parent,l=e;1===r.contentItems.length&&!r.isRoot;)r=r.parent,l=l.parent;r.addId(n),isNaN(o)&&(o=Object(b.g)(l,r.contentItems))}else p instanceof Array||(p=[p]);return!t&&d&&(i=window.screenX||window.screenLeft,a=window.screenY||window.screenTop,s=e.element.offset(),t={left:i+s.left,top:a+s.top,width:e.element.width(),height:e.element.height()}),t||d||(t={left:window.screenX||window.screenLeft+20,top:window.screenY||window.screenTop+20,width:500,height:309}),d&&e.remove(),c=new g.a(p,t,n,o,this),c.on('initialised',function(){m.emit('windowOpened',c)}),c.on('closed',function(){m._$reconcilePopoutWindows()}),this.openPopouts.push(c),c}createDragSource(e,t){this.config.settings.constrainDragToContainer=!1;var n=new u.a($(e),t,this);return this._dragSources.push(n),n}selectItem(e,t){if(!0!==this.config.settings.selectionEnabled)throw new Error('Please set selectionEnabled to true to use this feature');e===this.selectedItem||(null!==this.selectedItem&&this.selectedItem.deselect(),e&&!0!==t&&e.select(),this.selectedItem=e,this.emit('selectionChanged',e))}_$maximiseItem(e){null!==this._maximisedItem&&this._$minimiseItem(this._maximisedItem),this._maximisedItem=e,this._maximisedItem.addId('__glMaximised'),e.element.addClass('lm_maximised'),e.element.after(this._maximisePlaceholder),this.root.element.prepend(e.element),e.element.width(this.container.width()),e.element.height(this.container.height()),e.callDownwards('setSize'),this._maximisedItem.emit('maximised'),this.emit('stateChanged')}_$minimiseItem(e){e.element.removeClass('lm_maximised'),e.removeId('__glMaximised'),this._maximisePlaceholder.after(e.element),this._maximisePlaceholder.remove(),e.parent.callDownwards('setSize'),this._maximisedItem=null,e.emit('minimised'),this.emit('stateChanged')}_$closeWindow(){window.setTimeout(function(){window.close()},1)}_$getArea(e,t){var n,o,i=Infinity,a=null;for(n=0;n<this._itemAreas.length;n++)o=this._itemAreas[n],e>o.x1&&e<o.x2&&t>o.y1&&t<o.y2&&i>o.surface&&(i=o.surface,a=o);return a}_$createRootItemAreas(){var e=50,t={y2:0,x2:0,y1:'y2',x1:'x2'};for(var n in t){var o=this.root._$getArea();o.side=n,o[n]=t[n]?o[t[n]]-e:e,o.surface=(o.x2-o.x1)*(o.y2-o.y1),this._itemAreas.push(o)}}_$calculateItemAreas(){var e,t,n=this._getAllContentItems();if(this._itemAreas=[],1===n.length)return void this._itemAreas.push(this.root._$getArea());for(this._$createRootItemAreas(),e=0;e<n.length;e++)if(n[e].isStack)if(t=n[e]._$getArea(),null===t)continue;else if(t instanceof Array)this._itemAreas=this._itemAreas.concat(t);else{this._itemAreas.push(t);var o={};Object(b.b)(o,t),Object(b.b)(o,t.contentItem._contentAreaDimensions.header.highlightArea),o.surface=(o.x2-o.x1)*(o.y2-o.y1),this._itemAreas.push(o)}}_$normalizeContentItem(e,t){if(!e)throw new Error('No content item defined');if(Object(b.h)(e)&&(e=e()),e instanceof _.a)return e;if($.isPlainObject(e)&&e.type){var n=this.createContentItem(e,t);return n.callDownwards('_$init'),n}throw new Error('Invalid contentItem')}_$reconcilePopoutWindows(){var e,t=[];for(e=0;e<this.openPopouts.length;e++)!1===this.openPopouts[e].getWindow().closed?t.push(this.openPopouts[e]):this.emit('windowClosed',this.openPopouts[e]);this.openPopouts.length!==t.length&&(this.emit('stateChanged'),this.openPopouts=t)}_getAllContentItems(){var e=[],t=function(n){if(e.push(n),n.contentItems instanceof Array)for(var o=0;o<n.contentItems.length;o++)t(n.contentItems[o])};return t(this.root),e}_bindEvents(){this._isFullPage&&$(window).resize(this._resizeFunction),$(window).on('unload beforeunload',this._unloadFunction)}_onResize(){clearTimeout(this._resizeTimeoutId),this._resizeTimeoutId=setTimeout(Object(b.c)(this.updateSize,this),100)}_createConfig(e){var t=Object(b.d)('gl-window');t&&(this.isSubWindow=!0,e=localStorage.getItem(t),e=JSON.parse(e),e=new r.a().unminifyConfig(e),localStorage.removeItem(t)),e=$.extend(!0,{},v.a,e);var n=function(e){for(var t in e)'props'!=t&&'object'==typeof e[t]?n(e[t]):'type'==t&&'react-component'===e[t]&&(e.type='component',e.componentName='lm-react-component')};return n(e),!1===e.settings.hasHeaders&&(e.dimensions.headerHeight=0),e}_adjustToWindowMode(){var e=$('<div class="lm_popin" title="'+this.config.labels.popin+'"><div class="lm_icon"></div><div class="lm_bg"></div></div>');e.click(Object(b.c)(function(){this.emit('popIn')},this)),document.title=Object(b.k)(this.config.content[0].title),$('head').append($('body link, body style, template, .gl_keep')),this.container=$('body').html('').css('visibility','visible').append(e);document.body.offsetHeight;window.__glInstance=this}_createSubWindows(){var e,t;for(e=0;e<this.config.openPopouts.length;e++)t=this.config.openPopouts[e],this.createPopout(t.content,t.dimensions,t.parentId,t.indexInParent)}_setContainer(){var e=$(this.container||'body');if(0===e.length)throw new Error('GoldenLayout container not found');if(1<e.length)throw new Error('GoldenLayout more than one container element specified');e[0]===document.body&&(this._isFullPage=!0,$('html, body').css({height:'100%',margin:0,padding:0,overflow:'hidden'})),this.container=e}_create(e){var t;if(!(e.content instanceof Array))throw t=void 0===e.content?'Missing setting \'content\' on top level of configuration':'Configuration parameter \'content\' must be an array',new y.a(t,e);if(1<e.content.length)throw t='Top level content can\'t contain more then one element.',new y.a(t,e);this.root=new c.a(this,{content:e.content},this.container),this.root.callDownwards('_$init'),'__glMaximised'===e.maximisedItemId&&this.root.getItemsById(e.maximisedItemId)[0].toggleMaximise()}_onUnload(){if(!0===this.config.settings.closePopoutsOnUnload)for(var e=0;e<this.openPopouts.length;e++)this.openPopouts[e].close()}_adjustColumnsResponsive(){if(!this._useResponsiveLayout()||this._updatingColumnsResponsive||!this.config.dimensions||!this.config.dimensions.minItemWidth||0===this.root.contentItems.length||!this.root.contentItems[0].isRow)return void(this._firstLoad=!1);this._firstLoad=!1;var e=this.root.contentItems[0].contentItems.length;if(!(1>=e)){var o=this.config.dimensions.minItemWidth;if(!(e*o<=this.width)){this._updatingColumnsResponsive=!0;for(var a,s=n(t(this.width/o),1),r=this.root.contentItems[0],l=this._findAllStackContainers()[0],c=0;c<e-s;c++)a=r.contentItems[r.contentItems.length-1],this._addChildContentItemsToContainer(l,a);this._updatingColumnsResponsive=!1}}}_useResponsiveLayout(){return this.config.settings&&('always'==this.config.settings.responsiveMode||'onload'==this.config.settings.responsiveMode&&this._firstLoad)}_addChildContentItemsToContainer(e,t){'stack'===t.type?t.contentItems.forEach(function(n){e.addChild(n),t.removeChild(n,!0)}):t.contentItems.forEach(Object(b.c)(function(t){this._addChildContentItemsToContainer(e,t)},this))}_findAllStackContainers(){var e=[];return this._findAllStackContainersRecursive(e,this.root),e}_findAllStackContainersRecursive(e,t){t.contentItems.forEach(Object(b.c)(function(t){'stack'==t.type?e.push(t):!t.isComponent&&this._findAllStackContainersRecursive(e,t)},this))}}o.a=k},function(e,t,n){e.exports={default:n(41),__esModule:!0}},function(e,t,n){n(42),e.exports=n(2).Object.keys},function(e,t,n){var o=n(43),i=n(15);n(53)('keys',function(){return function(e){return i(o(e))}})},function(e,t,n){var o=n(14);e.exports=function(e){return Object(o(e))}},function(e,t,n){var o=n(16),a=n(17),s=n(47)(!1),i=n(19)('IE_PROTO');e.exports=function(e,t){var n,r=a(e),l=0,c=[];for(n in r)n!=i&&o(r,n)&&c.push(n);for(;t.length>l;)o(r,n=t[l++])&&(~s(c,n)||c.push(n));return c}},function(e,t,n){var o=n(46);e.exports=Object('z').propertyIsEnumerable(0)?Object:function(e){return'String'==o(e)?e.split(''):Object(e)}},function(e){var t={}.toString;e.exports=function(e){return t.call(e).slice(8,-1)}},function(e,t,n){var o=n(17),i=n(48),a=n(49);e.exports=function(e){return function(t,n,s){var r,l=o(t),c=i(l.length),p=a(s,c);if(e&&n!=n){for(;c>p;)if(r=l[p++],r!=r)return!0;}else for(;c>p;p++)if((e||p in l)&&l[p]===n)return e||p||0;return!e&&-1}}},function(t,n,o){var i=o(18);t.exports=function(t){return 0<t?e(i(t),9007199254740991):0}},function(t,o,i){var a=i(18);t.exports=function(t,o){return t=a(t),0>t?n(t+o,0):e(t,o)}},function(e,t,n){var o=n(2),i=n(4),a='__core-js_shared__',s=i[a]||(i[a]={});(e.exports=function(e,t){return s[e]||(s[e]=t===void 0?{}:t)})('versions',[]).push({version:o.version,mode:n(51)?'pure':'global',copyright:'\xA9 2018 Denis Pushkarev (zloirock.ru)'})},function(e){e.exports=!0},function(e){var t=0,n=Math.random();e.exports=function(e){return'Symbol('.concat(e===void 0?'':e,')_',(++t+n).toString(36))}},function(e,t,n){var o=n(21),i=n(2),a=n(10);e.exports=function(e,t){var n=(i.Object||{})[e]||Object[e],s={};s[e]=t(n),o(o.S+o.F*a(function(){n(1)}),'Object',s)}},function(e,t,n){var o=n(55);e.exports=function(e,t,n){return(o(e),void 0===t)?e:1===n?function(n){return e.call(t,n)}:2===n?function(n,o){return e.call(t,n,o)}:3===n?function(n,o,i){return e.call(t,n,o,i)}:function(){return e.apply(t,arguments)}}},function(e){e.exports=function(e){if('function'!=typeof e)throw TypeError(e+' is not a function!');return e}},function(e,t,n){var o=n(22),i=n(59);e.exports=n(5)?function(e,t,n){return o.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){e.exports=!n(5)&&!n(10)(function(){return 7!=Object.defineProperty(n(23)('div'),'a',{get:function(){return 7}}).a})},function(e,t,n){var o=n(9);e.exports=function(e,t){if(!o(e))return e;var n,i;if(t&&'function'==typeof(n=e.toString)&&!o(i=n.call(e)))return i;if('function'==typeof(n=e.valueOf)&&!o(i=n.call(e)))return i;if(!t&&'function'==typeof(n=e.toString)&&!o(i=n.call(e)))return i;throw TypeError('Can\'t convert object to primitive value')}},function(e){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){e.exports={default:n(61),__esModule:!0}},function(e,t,n){n(62);var o=n(2).Object;e.exports=function(e,t){return o.create(e,t)}},function(e,t,n){var o=n(21);o(o.S,'Object',{create:n(63)})},function(e,t,n){var o=n(8),i=n(64),a=n(20),s=n(19)('IE_PROTO'),r=function(){},l='prototype',c=function(){var e,t=n(23)('iframe'),o=a.length,i='<',s='>';for(t.style.display='none',n(65).appendChild(t),t.src='javascript:',e=t.contentWindow.document,e.open(),e.write(i+'script'+s+'document.F=Object'+i+'/script'+s),e.close(),c=e.F;o--;)delete c[l][a[o]];return c()};e.exports=Object.create||function(e,t){var n;return null===e?n=c():(r[l]=o(e),n=new r,r[l]=null,n[s]=e),void 0===t?n:i(n,t)}},function(e,t,n){var o=n(22),a=n(8),s=n(15);e.exports=n(5)?Object.defineProperties:function(e,t){a(e);for(var n,r=s(t),l=r.length,c=0;l>c;)o.f(e,n=r[c++],t[n]);return e}},function(e,t,n){var o=n(4).document;e.exports=o&&o.documentElement},function(e,t){'use strict';t.a={isClosable:!0,reorderEnabled:!0,title:''}},function(e,t,n){'use strict';var o=n(7);t.a=class{constructor(e,t,n){this._isVertical=e,this._size=t,this._grabSize=n<t?t:n,this.element=this._createElement(),this._dragListener=new o.a(this.element)}on(e,t,n){this._dragListener.on(e,t,n)}_$destroy(){this.element.remove()}_createElement(){var e=$('<div class="lm_drag_handle"></div>'),t=$('<div class="lm_splitter"></div>');t.append(e);var n=this._grabSize-this._size,o=n/2;return this._isVertical?(e.css('top',-o),e.css('height',this._size+n),t.addClass('lm_vertical'),t.height(this._size)):(e.css('left',-o),e.css('width',this._size+n),t.addClass('lm_horizontal'),t.width(this._size)),t}}},function(e,t,n){e.exports={default:n(69),__esModule:!0}},function(e,t,n){var o=n(2),i=o.JSON||(o.JSON={stringify:JSON.stringify});e.exports=function(){return i.stringify.apply(i,arguments)}},function(e,t,n){'use strict';var o=n(7),i=n(30),a=n(0);t.a=class{constructor(e,t,n){this._element=e,this._itemConfig=t,this._layoutManager=n,this._dragListener=null,this._createDragListener()}_createDragListener(){null!==this._dragListener&&this._dragListener.destroy(),this._dragListener=new o.a(this._element),this._dragListener.on('dragStart',this._onDragStart,this),this._dragListener.on('dragStop',this._createDragListener,this)}_onDragStart(e,t){var n=this._itemConfig;Object(a.h)(n)&&(n=n());var o=this._layoutManager._$normalizeContentItem($.extend(!0,{},n)),s=new i.a(e,t,this._dragListener,this._layoutManager,o,null);this._layoutManager.transitionIndicator.transitionElements(this._element,s.element)}}},function(e,t){'use strict';t.a=class{constructor(){this.element=$('<div class="lm_dropTargetIndicator"><div class="lm_inner"></div></div>'),$(document.body).append(this.element)}destroy(){this.element.remove()}highlight(e,t,n,o){this.highlightArea({x1:e,y1:t,x2:n,y2:o})}highlightArea(e){this.element.css({left:e.x1,top:e.y1,width:e.x2-e.x1,height:e.y2-e.y1}).show()}hide(){this.element.hide()}}},function(e,t,n){'use strict';var o=n(0);t.a=class{constructor(){this._element=$('<div class="lm_transition_indicator"></div>'),$(document.body).append(this._element),this._toElement=null,this._fromDimensions=null,this._totalAnimationDuration=200,this._animationStartTime=null}destroy(){this._element.remove()}transitionElements(){}_nextAnimationFrame(){var e,t=this._measure(this._toElement),n=(Object(o.i)()-this._animationStartTime)/this._totalAnimationDuration,i={};if(1<=n)return void this._element.hide();for(e in t.opacity=0,this._fromDimensions)i[e]=this._fromDimensions[e]+(t[e]-this._fromDimensions[e])*n;this._element.css(i),Object(o.a)(Object(o.c)(this._nextAnimationFrame,this))}_measure(e){var t=e.offset();return{left:t.left,top:t.top,width:e.outerWidth(),height:e.outerHeight()}}}},function(e,t){'use strict';t.a={openPopouts:[],settings:{hasHeaders:!0,constrainDragToContainer:!0,reorderEnabled:!0,selectionEnabled:!1,popoutWholeStack:!1,blockedPopoutsThrowError:!0,closePopoutsOnUnload:!0,showPopoutIcon:!0,showMaximiseIcon:!0,showCloseIcon:!0,responsiveMode:'onload',tabOverlapAllowance:0,reorderOnTabMenuClick:!0,tabControlOffset:10},dimensions:{borderWidth:5,borderGrabWidth:15,minItemHeight:10,minItemWidth:10,headerHeight:20,dragProxyWidth:300,dragProxyHeight:200},labels:{close:'close',maximise:'maximise',minimise:'minimise',popout:'open in new window',popin:'pop in',tabDropdown:'additional tabs'}}},function(e,t,n){n(75)(n(76))},function(e){e.exports=function(e){function t(e){'undefined'!=typeof console&&(console.error||console.log)('[Script Loader]',e)}function n(){return'undefined'!=typeof attachEvent&&'undefined'==typeof addEventListener}try{'undefined'!=typeof execScript&&n()?execScript(e):'undefined'==typeof eval?t('EvalError: No eval function available'):eval.call(null,e)}catch(e){t(e)}}},function(e){e.exports='/* Zepto v1.2.0 - zepto event ajax form ie - zeptojs.com/license */\n(function(global, factory) {\n if (typeof define === \'function\' && define.amd)\n define(function() { return factory(global) })\n else\n factory(global)\n}(this, function(window) {\n var Zepto = (function() {\n var undefined, key, $, classList, emptyArray = [], concat = emptyArray.concat, filter = emptyArray.filter, slice = emptyArray.slice,\n document = window.document,\n elementDisplay = {}, classCache = {},\n cssNumber = { \'column-count\': 1, \'columns\': 1, \'font-weight\': 1, \'line-height\': 1,\'opacity\': 1, \'z-index\': 1, \'zoom\': 1 },\n fragmentRE = /^\\s*<(\\w+|!)[^>]*>/,\n singleTagRE = /^<(\\w+)\\s*\\/?>(?:<\\/\\1>|)$/,\n tagExpanderRE = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\\w:]+)[^>]*)\\/>/ig,\n rootNodeRE = /^(?:body|html)$/i,\n capitalRE = /([A-Z])/g,\n\n // special attributes that should be get/set via method calls\n methodAttributes = [\'val\', \'css\', \'html\', \'text\', \'data\', \'width\', \'height\', \'offset\'],\n\n adjacencyOperators = [ \'after\', \'prepend\', \'before\', \'append\' ],\n table = document.createElement(\'table\'),\n tableRow = document.createElement(\'tr\'),\n containers = {\n \'tr\': document.createElement(\'tbody\'),\n \'tbody\': table, \'thead\': table, \'tfoot\': table,\n \'td\': tableRow, \'th\': tableRow,\n \'*\': document.createElement(\'div\')\n },\n readyRE = /complete|loaded|interactive/,\n simpleSelectorRE = /^[\\w-]*$/,\n class2type = {},\n toString = class2type.toString,\n zepto = {},\n camelize, uniq,\n tempParent = document.createElement(\'div\'),\n propMap = {\n \'tabindex\': \'tabIndex\',\n \'readonly\': \'readOnly\',\n \'for\': \'htmlFor\',\n \'class\': \'className\',\n \'maxlength\': \'maxLength\',\n \'cellspacing\': \'cellSpacing\',\n \'cellpadding\': \'cellPadding\',\n \'rowspan\': \'rowSpan\',\n \'colspan\': \'colSpan\',\n \'usemap\': \'useMap\',\n \'frameborder\': \'frameBorder\',\n \'contenteditable\': \'contentEditable\'\n },\n isArray = Array.isArray ||\n function(object){ return object instanceof Array }\n\n zepto.matches = function(element, selector) {\n if (!selector || !element || element.nodeType !== 1) return false\n var matchesSelector = element.matches || element.webkitMatchesSelector ||\n element.mozMatchesSelector || element.oMatchesSelector ||\n element.matchesSelector\n if (matchesSelector) return matchesSelector.call(element, selector)\n // fall back to performing a selector:\n var match, parent = element.parentNode, temp = !parent\n if (temp) (parent = tempParent).appendChild(element)\n match = ~zepto.qsa(parent, selector).indexOf(element)\n temp && tempParent.removeChild(element)\n return match\n }\n\n function type(obj) {\n return obj == null ? String(obj) :\n class2type[toString.call(obj)] || "object"\n }\n\n function isFunction(value) { return type(value) == "function" }\n function isWindow(obj) { return obj != null && obj == obj.window }\n function isDocument(obj) { return obj != null && obj.nodeType == obj.DOCUMENT_NODE }\n function isObject(obj) { return type(obj) == "object" }\n function isPlainObject(obj) {\n return isObject(obj) && !isWindow(obj) && Object.getPrototypeOf(obj) == Object.prototype\n }\n\n function likeArray(obj) {\n var length = !!obj && \'length\' in obj && obj.length,\n type = $.type(obj)\n\n return \'function\' != type && !isWindow(obj) && (\n \'array\' == type || length === 0 ||\n (typeof length == \'number\' && length > 0 && (length - 1) in obj)\n )\n }\n\n function compact(array) { return filter.call(array, function(item){ return item != null }) }\n function flatten(array) { return array.length > 0 ? $.fn.concat.apply([], array) : array }\n camelize = function(str){ return str.replace(/-+(.)?/g, function(match, chr){ return chr ? chr.toUpperCase() : \'\' }) }\n function dasherize(str) {\n return str.replace(/::/g, \'/\')\n .replace(/([A-Z]+)([A-Z][a-z])/g, \'$1_$2\')\n .replace(/([a-z\\d])([A-Z])/g, \'$1_$2\')\n .replace(/_/g, \'-\')\n .toLowerCase()\n }\n uniq = function(array){ return filter.call(array, function(item, idx){ return array.indexOf(item) == idx }) }\n\n function classRE(name) {\n return name in classCache ?\n classCache[name] : (classCache[name] = new RegExp(\'(^|\\\\s)\' + name + \'(\\\\s|$)\'))\n }\n\n function maybeAddPx(name, value) {\n return (typeof value == "number" && !cssNumber[dasherize(name)]) ? value + "px" : value\n }\n\n function defaultDisplay(nodeName) {\n var element, display\n if (!elementDisplay[nodeName]) {\n element = document.createElement(nodeName)\n document.body.appendChild(element)\n display = getComputedStyle(element, \'\').getPropertyValue("display")\n element.parentNode.removeChild(element)\n display == "none" && (display = "block")\n elementDisplay[nodeName] = display\n }\n return elementDisplay[nodeName]\n }\n\n function children(element) {\n return \'children\' in element ?\n slice.call(element.children) :\n $.map(element.childNodes, function(node){ if (node.nodeType == 1) return node })\n }\n\n function Z(dom, selector) {\n var i, len = dom ? dom.length : 0\n for (i = 0; i < len; i++) this[i] = dom[i]\n this.length = len\n this.selector = selector || \'\'\n }\n\n // `$.zepto.fragment` takes a html string and an optional tag name\n // to generate DOM nodes from the given html string.\n // The generated DOM nodes are returned as an array.\n // This function can be overridden in plugins for example to make\n // it compatible with browsers that don\'t support the DOM fully.\n zepto.fragment = function(html, name, properties) {\n var dom, nodes, container\n\n // A special case optimization for a single tag\n if (singleTagRE.test(html)) dom = $(document.createElement(RegExp.$1))\n\n if (!dom) {\n if (html.replace) html = html.replace(tagExpanderRE, "<$1></$2>")\n if (name === undefined) name = fragmentRE.test(html) && RegExp.$1\n if (!(name in containers)) name = \'*\'\n\n container = containers[name]\n container.innerHTML = \'\' + html\n dom = $.each(slice.call(container.childNodes), function(){\n container.removeChild(this)\n })\n }\n\n if (isPlainObject(properties)) {\n nodes = $(dom)\n $.each(properties, function(key, value) {\n if (methodAttributes.indexOf(key) > -1) nodes[key](value)\n else nodes.attr(key, value)\n })\n }\n\n return dom\n }\n\n // `$.zepto.Z` swaps out the prototype of the given `dom` array\n // of nodes with `$.fn` and thus supplying all the Zepto functions\n // to the array. This method can be overridden in plugins.\n zepto.Z = function(dom, selector) {\n return new Z(dom, selector)\n }\n\n // `$.zepto.isZ` should return `true` if the given object is a Zepto\n // collection. This method can be overridden in plugins.\n zepto.isZ = function(object) {\n return object instanceof zepto.Z\n }\n\n // `$.zepto.init` is Zepto\'s counterpart to jQuery\'s `$.fn.init` and\n // takes a CSS selector and an optional context (and handles various\n // special cases).\n // This method can be overridden in plugins.\n zepto.init = function(selector, context) {\n var dom\n // If nothing given, return an empty Zepto collection\n if (!selector) return zepto.Z()\n // Optimize for string selectors\n else if (typeof selector == \'string\') {\n selector = selector.trim()\n // If it\'s a html fragment, create nodes from it\n // Note: In both Chrome 21 and Firefox 15, DOM error 12\n // is thrown if the fragment doesn\'t begin with <\n if (selector[0] == \'<\' && fragmentRE.test(selector))\n dom = zepto.fragment(selector, RegExp.$1, context), selector = null\n // If there\'s a context, create a collection on that context first, and select\n // nodes from there\n else if (context !== undefined) return $(context).find(selector)\n // If it\'s a CSS selector, use it to select nodes.\n else dom = zepto.qsa(document, selector)\n }\n // If a function is given, call it when the DOM is ready\n else if (isFunction(selector)) return $(document).ready(selector)\n // If a Zepto collection is given, just return it\n else if (zepto.isZ(selector)) return selector\n else {\n // normalize array if an array of nodes is given\n if (isArray(selector)) dom = compact(selector)\n // Wrap DOM nodes.\n else if (isObject(selector))\n dom = [selector], selector = null\n // If it\'s a html fragment, create nodes from it\n else if (fragmentRE.test(selector))\n dom = zepto.fragment(selector.trim(), RegExp.$1, context), selector = null\n // If there\'s a context, create a collection on that context first, and select\n // nodes from there\n else if (context !== undefined) return $(context).find(selector)\n // And last but no least, if it\'s a CSS selector, use it to select nodes.\n else dom = zepto.qsa(document, selector)\n }\n // create a new Zepto collection from the nodes found\n return zepto.Z(dom, selector)\n }\n\n // `$` will be the base `Zepto` object. When calling this\n // function just call `$.zepto.init, which makes the implementation\n // details of selecting nodes and creating Zepto collections\n // patchable in plugins.\n $ = function(selector, context){\n return zepto.init(selector, context)\n }\n\n function extend(target, source, deep) {\n for (key in source)\n if (deep && (isPlainObject(source[key]) || isArray(source[key]))) {\n if (isPlainObject(source[key]) && !isPlainObject(target[key]))\n target[key] = {}\n if (isArray(source[key]) && !isArray(target[key]))\n target[key] = []\n extend(target[key], source[key], deep)\n }\n else if (source[key] !== undefined) target[key] = source[key]\n }\n\n // Copy all but undefined properties from one or more\n // objects to the `target` object.\n $.extend = function(target){\n var deep, args = slice.call(arguments, 1)\n if (typeof target == \'boolean\') {\n deep = target\n target = args.shift()\n }\n args.forEach(function(arg){ extend(target, arg, deep) })\n return target\n }\n\n // `$.zepto.qsa` is Zepto\'s CSS selector implementation which\n // uses `document.querySelectorAll` and optimizes for some special cases, like `#id`.\n // This method can be overridden in plugins.\n zepto.qsa = function(element, selector){\n var found,\n maybeID = selector[0] == \'#\',\n maybeClass = !maybeID && selector[0] == \'.\',\n nameOnly = maybeID || maybeClass ? selector.slice(1) : selector, // Ensure that a 1 char tag name still gets checked\n isSimple = simpleSelectorRE.test(nameOnly)\n return (element.getElementById && isSimple && maybeID) ? // Safari DocumentFragment doesn\'t have getElementById\n ( (found = element.getElementById(nameOnly)) ? [found] : [] ) :\n (element.nodeType !== 1 && element.nodeType !== 9 && element.nodeType !== 11) ? [] :\n slice.call(\n isSimple && !maybeID && element.getElementsByClassName ? // DocumentFragment doesn\'t have getElementsByClassName/TagName\n maybeClass ? element.getElementsByClassName(nameOnly) : // If it\'s simple, it could be a class\n element.getElementsByTagName(selector) : // Or a tag\n element.querySelectorAll(selector) // Or it\'s not simple, and we need to query all\n )\n }\n\n function filtered(nodes, selector) {\n return selector == null ? $(nodes) : $(nodes).filter(selector)\n }\n\n $.contains = document.documentElement.contains ?\n function(parent, node) {\n return parent !== node && parent.contains(node)\n } :\n function(parent, node) {\n while (node && (node = node.parentNode))\n if (node === parent) return true\n return false\n }\n\n function funcArg(context, arg, idx, payload) {\n return isFunction(arg) ? arg.call(context, idx, payload) : arg\n }\n\n function setAttribute(node, name, value) {\n value == null ? node.removeAttribute(name) : node.setAttribute(name, value)\n }\n\n // access className property while respecting SVGAnimatedString\n function className(node, value){\n var klass = node.className || \'\',\n svg = klass && klass.baseVal !== undefined\n\n if (value === undefined) return svg ? klass.baseVal : klass\n svg ? (klass.baseVal = value) : (node.className = value)\n }\n\n // "true" => true\n // "false" => false\n // "null" => null\n // "42" => 42\n // "42.5" => 42.5\n // "08" => "08"\n // JSON => parse if valid\n // String => self\n function deserializeValue(value) {\n try {\n return value ?\n value == "true" ||\n ( value == "false" ? false :\n value == "null" ? null :\n +value + "" == value ? +value :\n /^[\\[\\{]/.test(value) ? $.parseJSON(value) :\n value )\n : value\n } catch(e) {\n return value\n }\n }\n\n $.type = type\n $.isFunction = isFunction\n $.isWindow = isWindow\n $.isArray = isArray\n $.isPlainObject = isPlainObject\n\n $.isEmptyObject = function(obj) {\n var name\n for (name in obj) return false\n return true\n }\n\n $.isNumeric = function(val) {\n var num = Number(val), type = typeof val\n return val != null && type != \'boolean\' &&\n (type != \'string\' || val.length) &&\n !isNaN(num) && isFinite(num) || false\n }\n\n $.inArray = function(elem, array, i){\n return emptyArray.indexOf.call(array, elem, i)\n }\n\n $.camelCase = camelize\n $.trim = function(str) {\n return str == null ? "" : String.prototype.trim.call(str)\n }\n\n // plugin compatibility\n $.uuid = 0\n $.support = { }\n $.expr = { }\n $.noop = function() {}\n\n $.map = function(elements, callback){\n var value, values = [], i, key\n if (likeArray(elements))\n for (i = 0; i < elements.length; i++) {\n value = callback(elements[i], i)\n if (value != null) values.push(value)\n }\n else\n for (key in elements) {\n value = callback(elements[key], key)\n if (value != null) values.push(value)\n }\n return flatten(values)\n }\n\n $.each = function(elements, callback){\n var i, key\n if (likeArray(elements)) {\n for (i = 0; i < elements.length; i++)\n if (callback.call(elements[i], i, elements[i]) === false) return elements\n } else {\n for (key in elements)\n if (callback.call(elements[key], key, elements[key]) === false) return elements\n }\n\n return elements\n }\n\n $.grep = function(elements, callback){\n return filter.call(elements, callback)\n }\n\n if (window.JSON) $.parseJSON = JSON.parse\n\n // Populate the class2type map\n $.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) {\n class2type[ "[object " + name + "]" ] = name.toLowerCase()\n })\n\n // Define methods that will be available on all\n // Zepto collections\n $.fn = {\n constructor: zepto.Z,\n length: 0,\n\n // Because a collection acts like an array\n // copy over these useful array functions.\n forEach: emptyArray.forEach,\n reduce: emptyArray.reduce,\n push: emptyArray.push,\n sort: emptyArray.sort,\n splice: emptyArray.splice,\n indexOf: emptyArray.indexOf,\n concat: function(){\n var i, value, args = []\n for (i = 0; i < arguments.length; i++) {\n value = arguments[i]\n args[i] = zepto.isZ(value) ? value.toArray() : value\n }\n return concat.apply(zepto.isZ(this) ? this.toArray() : this, args)\n },\n\n // `map` and `slice` in the jQuery API work differently\n // from their array counterparts\n map: function(fn){\n return $($.map(this, function(el, i){ return fn.call(el, i, el) }))\n },\n slice: function(){\n return $(slice.apply(this, arguments))\n },\n\n ready: function(callback){\n // need to check if document.body exists for IE as that browser reports\n // document ready when it hasn\'t yet created the body element\n if (readyRE.test(document.readyState) && document.body) callback($)\n else document.addEventListener(\'DOMContentLoaded\', function(){ callback($) }, false)\n return this\n },\n get: function(idx){\n return idx === undefined ? slice.call(this) : this[idx >= 0 ? idx : idx + this.length]\n },\n toArray: function(){ return this.get() },\n size: function(){\n return this.length\n },\n remove: function(){\n return this.each(function(){\n if (this.parentNode != null)\n this.parentNode.removeChild(this)\n })\n },\n each: function(callback){\n emptyArray.every.call(this, function(el, idx){\n return callback.call(el, idx, el) !== false\n })\n return this\n },\n filter: function(selector){\n if (isFunction(selector)) return this.not(this.not(selector))\n return $(filter.call(this, function(element){\n return zepto.matches(element, selector)\n }))\n },\n add: function(selector,context){\n return $(uniq(this.concat($(selector,context))))\n },\n is: function(selector){\n return this.length > 0 && zepto.matches(this[0], selector)\n },\n not: function(selector){\n var nodes=[]\n if (isFunction(selector) && selector.call !== undefined)\n this.each(function(idx){\n if (!selector.call(this,idx)) nodes.push(this)\n })\n else {\n var excludes = typeof selector == \'string\' ? this.filter(selector) :\n (likeArray(selector) && isFunction(selector.item)) ? slice.call(selector) : $(selector)\n this.forEach(function(el){\n if (excludes.indexOf(el) < 0) nodes.push(el)\n })\n }\n return $(nodes)\n },\n has: function(selector){\n return this.filter(function(){\n return isObject(selector) ?\n $.contains(this, selector) :\n $(this).find(selector).size()\n })\n },\n eq: function(idx){\n return idx === -1 ? this.slice(idx) : this.slice(idx, + idx + 1)\n },\n first: function(){\n var el = this[0]\n return el && !isObject(el) ? el : $(el)\n },\n last: function(){\n var el = this[this.length - 1]\n return el && !isObject(el) ? el : $(el)\n },\n find: function(selector){\n var result, $this = this\n if (!selector) result = $()\n else if (typeof selector == \'object\')\n result = $(selector).filter(function(){\n var node = this\n return emptyArray.some.call($this, function(parent){\n return $.contains(parent, node)\n })\n })\n else if (this.length == 1) result = $(zepto.qsa(this[0], selector))\n else result = this.map(function(){ return zepto.qsa(this, selector) })\n return result\n },\n closest: function(selector, context){\n var nodes = [], collection = typeof selector == \'object\' && $(selector)\n this.each(function(_, node){\n while (node && !(collection ? collection.indexOf(node) >= 0 : zepto.matches(node, selector)))\n node = node !== context && !isDocument(node) && node.parentNode\n if (node && nodes.indexOf(node) < 0) nodes.push(node)\n })\n return $(nodes)\n },\n parents: function(selector){\n var ancestors = [], nodes = this\n while (nodes.length > 0)\n nodes = $.map(nodes, function(node){\n if ((node = node.parentNode) && !isDocument(node) && ancestors.indexOf(node) < 0) {\n ancestors.push(node)\n return node\n }\n })\n return filtered(ancestors, selector)\n },\n parent: function(selector){\n return filtered(uniq(this.pluck(\'parentNode\')), selector)\n },\n children: function(selector){\n return filtered(this.map(function(){ return children(this) }), selector)\n },\n contents: function() {\n return this.map(function() { return this.contentDocument || slice.call(this.childNodes) })\n },\n siblings: function(selector){\n return filtered(this.map(function(i, el){\n return filter.call(children(el.parentNode), function(child){ return child!==el })\n }), selector)\n },\n empty: function(){\n return this.each(function(){ this.innerHTML = \'\' })\n },\n // `pluck` is borrowed from Prototype.js\n pluck: function(property){\n return $.map(this, function(el){ return el[property] })\n },\n show: function(){\n return this.each(function(){\n this.style.display == "none" && (this.style.display = \'\')\n if (getComputedStyle(this, \'\').getPropertyValue("display") == "none")\n this.style.display = defaultDisplay(this.nodeName)\n })\n },\n replaceWith: function(newContent){\n return this.before(newContent).remove()\n },\n wrap: function(structure){\n var func = isFunction(structure)\n if (this[0] && !func)\n var dom = $(structure).get(0),\n clone = dom.parentNode || this.length > 1\n\n return this.each(function(index){\n $(this).wrapAll(\n func ? structure.call(this, index) :\n clone ? dom.cloneNode(true) : dom\n )\n })\n },\n wrapAll: function(structure){\n if (this[0]) {\n $(this[0]).before(structure = $(structure))\n var children\n // drill down to the inmost element\n while ((children = structure.children()).length) structure = children.first()\n $(structure).append(this)\n }\n return this\n },\n wrapInner: function(structure){\n var func = isFunction(structure)\n return this.each(function(index){\n var self = $(this), contents = self.contents(),\n dom = func ? structure.call(this, index) : structure\n contents.length ? contents.wrapAll(dom) : self.append(dom)\n })\n },\n unwrap: function(){\n this.parent().each(function(){\n $(this).replaceWith($(this).children())\n })\n return this\n },\n clone: function(){\n return this.map(function(){ return this.cloneNode(true) })\n },\n hide: function(){\n return this.css("display", "none")\n },\n toggle: function(setting){\n return this.each(function(){\n var el = $(this)\n ;(setting === undefined ? el.css("display") == "none" : setting) ? el.show() : el.hide()\n })\n },\n prev: function(selector){ return $(this.pluck(\'previousElementSibling\')).filter(selector || \'*\') },\n next: function(selector){ return $(this.pluck(\'nextElementSibling\')).filter(selector || \'*\') },\n html: function(html){\n return 0 in arguments ?\n this.each(function(idx){\n var originHtml = this.innerHTML\n $(this).empty().append( funcArg(this, html, idx, originHtml) )\n }) :\n (0 in this ? this[0].innerHTML : null)\n },\n text: function(text){\n return 0 in arguments ?\n this.each(function(idx){\n var newText = funcArg(this, text, idx, this.textContent)\n this.textContent = newText == null ? \'\' : \'\'+newText\n }) :\n (0 in this ? this.pluck(\'textContent\').join("") : null)\n },\n attr: function(name, value){\n var result\n return (typeof name == \'string\' && !(1 in arguments)) ?\n (0 in this && this[0].nodeType == 1 && (result = this[0].getAttribute(name)) != null ? result : undefined) :\n this.each(function(idx){\n if (this.nodeType !== 1) return\n if (isObject(name)) for (key in name) setAttribute(this, key, name[key])\n else setAttribute(this, name, funcArg(this, value, idx, this.getAttribute(name)))\n })\n },\n removeAttr: function(name){\n return this.each(function(){ this.nodeType === 1 && name.split(\' \').forEach(function(attribute){\n setAttribute(this, attribute)\n }, this)})\n },\n prop: function(name, value){\n name = propMap[name] || name\n return (1 in arguments) ?\n this.each(function(idx){\n this[name] = funcArg(this, value, idx, this[name])\n }) :\n (this[0] && this[0][name])\n },\n removeProp: function(name){\n name = propMap[name] || name\n return this.each(function(){ delete this[name] })\n },\n data: function(name, value){\n var attrName = \'data-\' + name.replace(capitalRE, \'-$1\').toLowerCase()\n\n var data = (1 in arguments) ?\n this.attr(attrName, value) :\n this.attr(attrName)\n\n return data !== null ? deserializeValue(data) : undefined\n },\n val: function(value){\n if (0 in arguments) {\n if (value == null) value = ""\n return this.each(function(idx){\n this.value = funcArg(this, value, idx, this.value)\n })\n } else {\n return this[0] && (this[0].multiple ?\n $(this[0]).find(\'option\').filter(function(){ return this.selected }).pluck(\'value\') :\n this[0].value)\n }\n },\n offset: function(coordinates){\n if (coordinates) return this.each(function(index){\n var $this = $(this),\n coords = funcArg(this, coordinates, index, $this.offset()),\n parentOffset = $this.offsetParent().offset(),\n props = {\n top: coords.top - parentOffset.top,\n left: coords.left - parentOffset.left\n }\n\n if ($this.css(\'position\') == \'static\') props[\'position\'] = \'relative\'\n $this.css(props)\n })\n if (!this.length) return null\n if (document.documentElement !== this[0] && !$.contains(document.documentElement, this[0]))\n return {top: 0, left: 0}\n var obj = this[0].getBoundingClientRect()\n return {\n left: obj.left + window.pageXOffset,\n top: obj.top + window.pageYOffset,\n width: Math.round(obj.width),\n height: Math.round(obj.height)\n }\n },\n css: function(property, value){\n if (arguments.length < 2) {\n var element = this[0]\n if (typeof property == \'string\') {\n if (!element) return\n return element.style[camelize(property)] || getComputedStyle(element, \'\').getPropertyValue(property)\n } else if (isArray(property)) {\n if (!element) return\n var props = {}\n var computedStyle = getComputedStyle(element, \'\')\n $.each(property, function(_, prop){\n props[prop] = (element.style[camelize(prop)] || computedStyle.getPropertyValue(prop))\n })\n return props\n }\n }\n\n var css = \'\'\n if (type(property) == \'string\') {\n if (!value && value !== 0)\n this.each(function(){ this.style.removeProperty(dasherize(property)) })\n else\n css = dasherize(property) + ":" + maybeAddPx(property, value)\n } else {\n for (key in property)\n if (!property[key] && property[key] !== 0)\n this.each(function(){ this.style.removeProperty(dasherize(key)) })\n else\n css += dasherize(key) + \':\' + maybeAddPx(key, property[key]) + \';\'\n }\n\n return this.each(function(){ this.style.cssText += \';\' + css })\n },\n index: function(element){\n return element ? this.indexOf($(element)[0]) : this.parent().children().indexOf(this[0])\n },\n hasClass: function(name){\n if (!name) return false\n return emptyArray.some.call(this, function(el){\n return this.test(className(el))\n }, classRE(name))\n },\n addClass: function(name){\n if (!name) return this\n return this.each(function(idx){\n if (!(\'className\' in this)) return\n classList = []\n var cls = className(this), newName = funcArg(this, name, idx, cls)\n newName.split(/\\s+/g).forEach(function(klass){\n if (!$(this).hasClass(klass)) classList.push(klass)\n }, this)\n classList.length && className(this, cls + (cls ? " " : "") + classList.join(" "))\n })\n },\n removeClass: function(name){\n return this.each(function(idx){\n if (!(\'className\' in this)) return\n if (name === undefined) return className(this, \'\')\n classList = className(this)\n funcArg(this, name, idx, classList).split(/\\s+/g).forEach(function(klass){\n classList = classList.replace(classRE(klass), " ")\n })\n className(this, classList.trim())\n })\n },\n toggleClass: function(name, when){\n if (!name) return this\n return this.each(function(idx){\n var $this = $(this), names = funcArg(this, name, idx, className(this))\n names.split(/\\s+/g).forEach(function(klass){\n (when === undefined ? !$this.hasClass(klass) : when) ?\n $this.addClass(klass) : $this.removeClass(klass)\n })\n })\n },\n scrollTop: function(value){\n if (!this.length) return\n var hasScrollTop = \'scrollTop\' in this[0]\n if (value === undefined) return hasScrollTop ? this[0].scrollTop : this[0].pageYOffset\n return this.each(hasScrollTop ?\n function(){ this.scrollTop = value } :\n function(){ this.scrollTo(this.scrollX, value) })\n },\n scrollLeft: function(value){\n if (!this.length) return\n var hasScrollLeft = \'scrollLeft\' in this[0]\n if (value === undefined) return hasScrollLeft ? this[0].scrollLeft : this[0].pageXOffset\n return this.each(hasScrollLeft ?\n function(){ this.scrollLeft = value } :\n function(){ this.scrollTo(value, this.scrollY) })\n },\n position: function() {\n if (!this.length) return\n\n var elem = this[0],\n // Get *real* offsetParent\n offsetParent = this.offsetParent(),\n // Get correct offsets\n offset = this.offset(),\n parentOffset = rootNodeRE.test(offsetParent[0].nodeName) ? { top: 0, left: 0 } : offsetParent.offset()\n\n // Subtract element margins\n // note: when an element has margin: auto the offsetLeft and marginLeft\n // are the same in Safari causing offset.left to incorrectly be 0\n offset.top -= parseFloat( $(elem).css(\'margin-top\') ) || 0\n offset.left -= parseFloat( $(elem).css(\'margin-left\') ) || 0\n\n // Add offsetParent borders\n parentOffset.top += parseFloat( $(offsetParent[0]).css(\'border-top-width\') ) || 0\n parentOffset.left += parseFloat( $(offsetParent[0]).css(\'border-left-width\') ) || 0\n\n // Subtract the two offsets\n return {\n top: offset.top - parentOffset.top,\n left: offset.left - parentOffset.left\n }\n },\n offsetParent: function() {\n return this.map(function(){\n var parent = this.offsetParent || document.body\n while (parent && !rootNodeRE.test(parent.nodeName) && $(parent).css("position") == "static")\n parent = parent.offsetParent\n return parent\n })\n }\n }\n\n // for now\n $.fn.detach = $.fn.remove\n\n // Generate the `width` and `height` functions\n ;[\'width\', \'height\'].forEach(function(dimension){\n var dimensionProperty =\n dimension.replace(/./, function(m){ return m[0].toUpperCase() })\n\n $.fn[dimension] = function(value){\n var offset, el = this[0]\n if (value === undefined) return isWindow(el) ? el[\'inner\' + dimensionProperty] :\n isDocument(el) ? el.documentElement[\'scroll\' + dimensionProperty] :\n (offset = this.offset()) && offset[dimension]\n else return this.each(function(idx){\n el = $(this)\n el.css(dimension, funcArg(this, value, idx, el[dimension]()))\n })\n }\n })\n\n function traverseNode(node, fun) {\n fun(node)\n for (var i = 0, len = node.childNodes.length; i < len; i++)\n traverseNode(node.childNodes[i], fun)\n }\n\n // Generate the `after`, `prepend`, `before`, `append`,\n // `insertAfter`, `insertBefore`, `appendTo`, and `prependTo` methods.\n adjacencyOperators.forEach(function(operator, operatorIndex) {\n var inside = operatorIndex % 2 //=> prepend, append\n\n $.fn[operator] = function(){\n // arguments can be nodes, arrays of nodes, Zepto objects and HTML strings\n var argType, nodes = $.map(arguments, function(arg) {\n var arr = []\n argType = type(arg)\n if (argType == "array") {\n arg.forEach(function(el) {\n if (el.nodeType !== undefined) return arr.push(el)\n else if ($.zepto.isZ(el)) return arr = arr.concat(el.get())\n arr = arr.concat(zepto.fragment(el))\n })\n return arr\n }\n return argType == "object" || arg == null ?\n arg : zepto.fragment(arg)\n }),\n parent, copyByClone = this.length > 1\n if (nodes.length < 1) return this\n\n return this.each(function(_, target){\n parent = inside ? target : target.parentNode\n\n // convert all methods to a "before" operation\n target = operatorIndex == 0 ? target.nextSibling :\n operatorIndex == 1 ? target.firstChild :\n operatorIndex == 2 ? target :\n null\n\n var parentInDocument = $.contains(document.documentElement, parent)\n\n nodes.forEach(function(node){\n if (copyByClone) node = node.cloneNode(true)\n else if (!parent) return $(node).remove()\n\n parent.insertBefore(node, target)\n if (parentInDocument) traverseNode(node, function(el){\n if (el.nodeName != null && el.nodeName.toUpperCase() === \'SCRIPT\' &&\n (!el.type || el.type === \'text/javascript\') && !el.src){\n var target = el.ownerDocument ? el.ownerDocument.defaultView : window\n target[\'eval\'].call(target, el.innerHTML)\n }\n })\n })\n })\n }\n\n // after => insertAfter\n // prepend => prependTo\n // before => insertBefore\n // append => appendTo\n $.fn[inside ? operator+\'To\' : \'insert\'+(operatorIndex ? \'Before\' : \'After\')] = function(html){\n $(html)[operator](this)\n return this\n }\n })\n\n zepto.Z.prototype = Z.prototype = $.fn\n\n // Export internal API functions in the `$.zepto` namespace\n zepto.uniq = uniq\n zepto.deserializeValue = deserializeValue\n $.zepto = zepto\n\n return $\n})()\n\nwindow.Zepto = Zepto\nwindow.$ === undefined && (window.$ = Zepto)\n\n;(function($){\n var _zid = 1, undefined,\n slice = Array.prototype.slice,\n isFunction = $.isFunction,\n isString = function(obj){ return typeof obj == \'string\' },\n handlers = {},\n specialEvents={},\n focusinSupported = \'onfocusin\' in window,\n focus = { focus: \'focusin\', blur: \'focusout\' },\n hover = { mouseenter: \'mouseover\', mouseleave: \'mouseout\' }\n\n specialEvents.click = specialEvents.mousedown = specialEvents.mouseup = specialEvents.mousemove = \'MouseEvents\'\n\n function zid(element) {\n return element._zid || (element._zid = _zid++)\n }\n function findHandlers(element, event, fn, selector) {\n event = parse(event)\n if (event.ns) var matcher = matcherFor(event.ns)\n return (handlers[zid(element)] || []).filter(function(handler) {\n return handler\n && (!event.e || handler.e == event.e)\n && (!event.ns || matcher.test(handler.ns))\n && (!fn || zid(handler.fn) === zid(fn))\n && (!selector || handler.sel == selector)\n })\n }\n function parse(event) {\n var parts = (\'\' + event).split(\'.\')\n return {e: parts[0], ns: parts.slice(1).sort().join(\' \')}\n }\n function matcherFor(ns) {\n return new RegExp(\'(?:^| )\' + ns.replace(\' \', \' .* ?\') + \'(?: |$)\')\n }\n\n function eventCapture(handler, captureSetting) {\n return handler.del &&\n (!focusinSupported && (handler.e in focus)) ||\n !!captureSetting\n }\n\n function realEvent(type) {\n return hover[type] || (focusinSupported && focus[type]) || type\n }\n\n function add(element, events, fn, data, selector, delegator, capture){\n var id = zid(element), set = (handlers[id] || (handlers[id] = []))\n events.split(/\\s/).forEach(function(event){\n if (event == \'ready\') return $(document).ready(fn)\n var handler = parse(event)\n handler.fn = fn\n handler.sel = selector\n // emulate mouseenter, mouseleave\n if (handler.e in hover) fn = function(e){\n var related = e.relatedTarget\n if (!related || (related !== this && !$.contains(this, related)))\n return handler.fn.apply(this, arguments)\n }\n handler.del = delegator\n var callback = delegator || fn\n handler.proxy = function(e){\n e = compatible(e)\n if (e.isImmediatePropagationStopped()) return\n e.data = data\n var result = callback.apply(element, e._args == undefined ? [e] : [e].concat(e._args))\n if (result === false) e.preventDefault(), e.stopPropagation()\n return result\n }\n handler.i = set.length\n set.push(handler)\n if (\'addEventListener\' in element)\n element.addEventListener(realEvent(handler.e), handler.proxy, eventCapture(handler, capture))\n })\n }\n function remove(element, events, fn, selector, capture){\n var id = zid(element)\n ;(events || \'\').split(/\\s/).forEach(function(event){\n findHandlers(element, event, fn, selector).forEach(function(handler){\n delete handlers[id][handler.i]\n if (\'removeEventListener\' in element)\n element.removeEventListener(realEvent(handler.e), handler.proxy, eventCapture(handler, capture))\n })\n })\n }\n\n $.event = { add: add, remove: remove }\n\n $.proxy = function(fn, context) {\n var args = (2 in arguments) && slice.call(arguments, 2)\n if (isFunction(fn)) {\n var proxyFn = function(){ return fn.apply(context, args ? args.concat(slice.call(arguments)) : arguments) }\n proxyFn._zid = zid(fn)\n return proxyFn\n } else if (isString(context)) {\n if (args) {\n args.unshift(fn[context], fn)\n return $.proxy.apply(null, args)\n } else {\n return $.proxy(fn[context], fn)\n }\n } else {\n throw new TypeError("expected function")\n }\n }\n\n $.fn.bind = function(event, data, callback){\n return this.on(event, data, callback)\n }\n $.fn.unbind = function(event, callback){\n return this.off(event, callback)\n }\n $.fn.one = function(event, selector, data, callback){\n return this.on(event, selector, data, callback, 1)\n }\n\n var returnTrue = function(){return true},\n returnFalse = function(){return false},\n ignoreProperties = /^([A-Z]|returnValue$|layer[XY]$|webkitMovement[XY]$)/,\n eventMethods = {\n preventDefault: \'isDefaultPrevented\',\n stopImmediatePropagation: \'isImmediatePropagationStopped\',\n stopPropagation: \'isPropagationStopped\'\n }\n\n function compatible(event, source) {\n if (source || !event.isDefaultPrevented) {\n source || (source = event)\n\n $.each(eventMethods, function(name, predicate) {\n var sourceMethod = source[name]\n event[name] = function(){\n this[predicate] = returnTrue\n return sourceMethod && sourceMethod.apply(source, arguments)\n }\n event[predicate] = returnFalse\n })\n\n event.timeStamp || (event.timeStamp = Date.now())\n\n if (source.defaultPrevented !== undefined ? source.defaultPrevented :\n \'returnValue\' in source ? source.returnValue === false :\n source.getPreventDefault && source.getPreventDefault())\n event.isDefaultPrevented = returnTrue\n }\n return event\n }\n\n function createProxy(event) {\n var key, proxy = { originalEvent: event }\n for (key in event)\n if (!ignoreProperties.test(key) && event[key] !== undefined) proxy[key] = event[key]\n\n return compatible(proxy, event)\n }\n\n $.fn.delegate = function(selector, event, callback){\n return this.on(event, selector, callback)\n }\n $.fn.undelegate = function(selector, event, callback){\n return this.off(event, selector, callback)\n }\n\n $.fn.live = function(event, callback){\n $(document.body).delegate(this.selector, event, callback)\n return this\n }\n $.fn.die = function(event, callback){\n $(document.body).undelegate(this.selector, event, callback)\n return this\n }\n\n $.fn.on = function(event, selector, data, callback, one){\n var autoRemove, delegator, $this = this\n if (event && !isString(event)) {\n $.each(event, function(type, fn){\n $this.on(type, selector, data, fn, one)\n })\n return $this\n }\n\n if (!isString(selector) && !isFunction(callback) && callback !== false)\n callback = data, data = selector, selector = undefined\n if (callback === undefined || data === false)\n callback = data, data = undefined\n\n if (callback === false) callback = returnFalse\n\n return $this.each(function(_, element){\n if (one) autoRemove = function(e){\n remove(element, e.type, callback)\n return callback.apply(this, arguments)\n }\n\n if (selector) delegator = function(e){\n var evt, match = $(e.target).closest(selector, element).get(0)\n if (match && match !== element) {\n evt = $.extend(createProxy(e), {currentTarget: match, liveFired: element})\n return (autoRemove || callback).apply(match, [evt].concat(slice.call(arguments, 1)))\n }\n }\n\n add(element, event, callback, data, selector, delegator || autoRemove)\n })\n }\n $.fn.off = function(event, selector, callback){\n var $this = this\n if (event && !isString(event)) {\n $.each(event, function(type, fn){\n $this.off(type, selector, fn)\n })\n return $this\n }\n\n if (!isString(selector) && !isFunction(callback) && callback !== false)\n callback = selector, selector = undefined\n\n if (callback === false) callback = returnFalse\n\n return $this.each(function(){\n remove(this, event, callback, selector)\n })\n }\n\n $.fn.trigger = function(event, args){\n event = (isString(event) || $.isPlainObject(event)) ? $.Event(event) : compatible(event)\n event._args = args\n return this.each(function(){\n // handle focus(), blur() by calling them directly\n if (event.type in focus && typeof this[event.type] == "function") this[event.type]()\n // items in the collection might not be DOM elements\n else if (\'dispatchEvent\' in this) this.dispatchEvent(event)\n else $(this).triggerHandler(event, args)\n })\n }\n\n // triggers event handlers on current element just as if an event occurred,\n // doesn\'t trigger an actual event, doesn\'t bubble\n $.fn.triggerHandler = function(event, args){\n var e, result\n this.each(function(i, element){\n e = createProxy(isString(event) ? $.Event(event) : event)\n e._args = args\n e.target = element\n $.each(findHandlers(element, event.type || event), function(i, handler){\n result = handler.proxy(e)\n if (e.isImmediatePropagationStopped()) return false\n })\n })\n return result\n }\n\n // shortcut methods for `.bind(event, fn)` for each event type\n ;(\'focusin focusout focus blur load resize scroll unload click dblclick \'+\n \'mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave \'+\n \'change select keydown keypress keyup error\').split(\' \').forEach(function(event) {\n $.fn[event] = function(callback) {\n return (0 in arguments) ?\n this.bind(event, callback) :\n this.trigger(event)\n }\n })\n\n $.Event = function(type, props) {\n if (!isString(type)) props = type, type = props.type\n var event = document.createEvent(specialEvents[type] || \'Events\'), bubbles = true\n if (props) for (var name in props) (name == \'bubbles\') ? (bubbles = !!props[name]) : (event[name] = props[name])\n event.initEvent(type, bubbles, true)\n return compatible(event)\n }\n\n})(Zepto)\n\n;(function($){\n var jsonpID = +new Date(),\n document = window.document,\n key,\n name,\n rscript = /<script\\b[^<]*(?:(?!<\\/script>)<[^<]*)*<\\/script>/gi,\n scriptTypeRE = /^(?:text|application)\\/javascript/i,\n xmlTypeRE = /^(?:text|application)\\/xml/i,\n jsonType = \'application/json\',\n htmlType = \'text/html\',\n blankRE = /^\\s*$/,\n originAnchor = document.createElement(\'a\')\n\n originAnchor.href = window.location.href\n\n // trigger a custom event and return false if it was cancelled\n function triggerAndReturn(context, eventName, data) {\n var event = $.Event(eventName)\n $(context).trigger(event, data)\n return !event.isDefaultPrevented()\n }\n\n // trigger an Ajax "global" event\n function triggerGlobal(settings, context, eventName, data) {\n if (settings.global) return triggerAndReturn(context || document, eventName, data)\n }\n\n // Number of active Ajax requests\n $.active = 0\n\n function ajaxStart(settings) {\n if (settings.global && $.active++ === 0) triggerGlobal(settings, null, \'ajaxStart\')\n }\n function ajaxStop(settings) {\n if (settings.global && !(--$.active)) triggerGlobal(settings, null, \'ajaxStop\')\n }\n\n // triggers an extra global event "ajaxBeforeSend" that\'s like "ajaxSend" but cancelable\n function ajaxBeforeSend(xhr, settings) {\n var context = settings.context\n if (settings.beforeSend.call(context, xhr, settings) === false ||\n triggerGlobal(settings, context, \'ajaxBeforeSend\', [xhr, settings]) === false)\n return false\n\n triggerGlobal(settings, context, \'ajaxSend\', [xhr, settings])\n }\n function ajaxSuccess(data, xhr, settings, deferred) {\n var context = settings.context, status = \'success\'\n settings.success.call(context, data, status, xhr)\n if (deferred) deferred.resolveWith(context, [data, status, xhr])\n triggerGlobal(settings, context, \'ajaxSuccess\', [xhr, settings, data])\n ajaxComplete(status, xhr, settings)\n }\n // type: "timeout", "error", "abort", "parsererror"\n function ajaxError(error, type, xhr, settings, deferred) {\n var context = settings.context\n settings.error.call(context, xhr, type, error)\n if (deferred) deferred.rejectWith(context, [xhr, type, error])\n triggerGlobal(settings, context, \'ajaxError\', [xhr, settings, error || type])\n ajaxComplete(type, xhr, settings)\n }\n // status: "success", "notmodified", "error", "timeout", "abort", "parsererror"\n function ajaxComplete(status, xhr, settings) {\n var context = settings.context\n settings.complete.call(context, xhr, status)\n triggerGlobal(settings, context, \'ajaxComplete\', [xhr, settings])\n ajaxStop(settings)\n }\n\n function ajaxDataFilter(data, type, settings) {\n if (settings.dataFilter == empty) return data\n var context = settings.context\n return settings.dataFilter.call(context, data, type)\n }\n\n // Empty function, used as default callback\n function empty() {}\n\n $.ajaxJSONP = function(options, deferred){\n if (!(\'type\' in options)) return $.ajax(options)\n\n var _callbackName = options.jsonpCallback,\n callbackName = ($.isFunction(_callbackName) ?\n _callbackName() : _callbackName) || (\'Zepto\' + (jsonpID++)),\n script = document.createElement(\'script\'),\n originalCallback = window[callbackName],\n responseData,\n abort = function(errorType) {\n $(script).triggerHandler(\'error\', errorType || \'abort\')\n },\n xhr = { abort: abort }, abortTimeout\n\n if (deferred) deferred.promise(xhr)\n\n $(script).on(\'load error\', function(e, errorType){\n clearTimeout(abortTimeout)\n $(script).off().remove()\n\n if (e.type == \'error\' || !responseData) {\n ajaxError(null, errorType || \'error\', xhr, options, deferred)\n } else {\n ajaxSuccess(responseData[0], xhr, options, deferred)\n }\n\n window[callbackName] = originalCallback\n if (responseData && $.isFunction(originalCallback))\n originalCallback(responseData[0])\n\n originalCallback = responseData = undefined\n })\n\n if (ajaxBeforeSend(xhr, options) === false) {\n abort(\'abort\')\n return xhr\n }\n\n window[callbackName] = function(){\n responseData = arguments\n }\n\n script.src = options.url.replace(/\\?(.+)=\\?/, \'?$1=\' + callbackName)\n document.head.appendChild(script)\n\n if (options.timeout > 0) abortTimeout = setTimeout(function(){\n abort(\'timeout\')\n }, options.timeout)\n\n return xhr\n }\n\n $.ajaxSettings = {\n // Default type of request\n type: \'GET\',\n // Callback that is executed before request\n beforeSend: empty,\n // Callback that is executed if the request succeeds\n success: empty,\n // Callback that is executed the the server drops error\n error: empty,\n // Callback that is executed on request complete (both: error and success)\n complete: empty,\n // The context for the callbacks\n context: null,\n // Whether to trigger "global" Ajax events\n global: true,\n // Transport\n xhr: function () {\n return new window.XMLHttpRequest()\n },\n // MIME types mapping\n // IIS returns Javascript as "application/x-javascript"\n accepts: {\n script: \'text/javascript, application/javascript, application/x-javascript\',\n json: jsonType,\n xml: \'application/xml, text/xml\',\n html: htmlType,\n text: \'text/plain\'\n },\n // Whether the request is to another domain\n crossDomain: false,\n // Default timeout\n timeout: 0,\n // Whether data should be serialized to string\n processData: true,\n // Whether the browser should be allowed to cache GET responses\n cache: true,\n //Used to handle the raw response data of XMLHttpRequest.\n //This is a pre-filtering function to sanitize the response.\n //The sanitized response should be returned\n dataFilter: empty\n }\n\n function mimeToDataType(mime) {\n if (mime) mime = mime.split(\';\', 2)[0]\n return mime && ( mime == htmlType ? \'html\' :\n mime == jsonType ? \'json\' :\n scriptTypeRE.test(mime) ? \'script\' :\n xmlTypeRE.test(mime) && \'xml\' ) || \'text\'\n }\n\n function appendQuery(url, query) {\n if (query == \'\') return url\n return (url + \'&\' + query).replace(/[&?]{1,2}/, \'?\')\n }\n\n // serialize payload and append it to the URL for GET requests\n function serializeData(options) {\n if (options.processData && options.data && $.type(options.data) != "string")\n options.data = $.param(options.data, options.traditional)\n if (options.data && (!options.type || options.type.toUpperCase() == \'GET\' || \'jsonp\' == options.dataType))\n options.url = appendQuery(options.url, options.data), options.data = undefined\n }\n\n $.ajax = function(options){\n var settings = $.extend({}, options || {}),\n deferred = $.Deferred && $.Deferred(),\n urlAnchor, hashIndex\n for (key in $.ajaxSettings) if (settings[key] === undefined) settings[key] = $.ajaxSettings[key]\n\n ajaxStart(settings)\n\n if (!settings.crossDomain) {\n urlAnchor = document.createElement(\'a\')\n urlAnchor.href = settings.url\n // cleans up URL for .href (IE only), see https://github.com/madrobby/zepto/pull/1049\n urlAnchor.href = urlAnchor.href\n settings.crossDomain = (originAnchor.protocol + \'//\' + originAnchor.host) !== (urlAnchor.protocol + \'//\' + urlAnchor.host)\n }\n\n if (!settings.url) settings.url = window.location.toString()\n if ((hashIndex = settings.url.indexOf(\'#\')) > -1) settings.url = settings.url.slice(0, hashIndex)\n serializeData(settings)\n\n var dataType = settings.dataType, hasPlaceholder = /\\?.+=\\?/.test(settings.url)\n if (hasPlaceholder) dataType = \'jsonp\'\n\n if (settings.cache === false || (\n (!options || options.cache !== true) &&\n (\'script\' == dataType || \'jsonp\' == dataType)\n ))\n settings.url = appendQuery(settings.url, \'_=\' + Date.now())\n\n if (\'jsonp\' == dataType) {\n if (!hasPlaceholder)\n settings.url = appendQuery(settings.url,\n settings.jsonp ? (settings.jsonp + \'=?\') : settings.jsonp === false ? \'\' : \'callback=?\')\n return $.ajaxJSONP(settings, deferred)\n }\n\n var mime = settings.accepts[dataType],\n headers = { },\n setHeader = function(name, value) { headers[name.toLowerCase()] = [name, value] },\n protocol = /^([\\w-]+:)\\/\\//.test(settings.url) ? RegExp.$1 : window.location.protocol,\n xhr = settings.xhr(),\n nativeSetHeader = xhr.setRequestHeader,\n abortTimeout\n\n if (deferred) deferred.promise(xhr)\n\n if (!settings.crossDomain) setHeader(\'X-Requested-With\', \'XMLHttpRequest\')\n setHeader(\'Accept\', mime || \'*/*\')\n if (mime = settings.mimeType || mime) {\n if (mime.indexOf(\',\') > -1) mime = mime.split(\',\', 2)[0]\n xhr.overrideMimeType && xhr.overrideMimeType(mime)\n }\n if (settings.contentType || (settings.contentType !== false && settings.data && settings.type.toUpperCase() != \'GET\'))\n setHeader(\'Content-Type\', settings.contentType || \'application/x-www-form-urlencoded\')\n\n if (settings.headers) for (name in settings.headers) setHeader(name, settings.headers[name])\n xhr.setRequestHeader = setHeader\n\n xhr.onreadystatechange = function(){\n if (xhr.readyState == 4) {\n xhr.onreadystatechange = empty\n clearTimeout(abortTimeout)\n var result, error = false\n if ((xhr.status >= 200 && xhr.status < 300) || xhr.status == 304 || (xhr.status == 0 && protocol == \'file:\')) {\n dataType = dataType || mimeToDataType(settings.mimeType || xhr.getResponseHeader(\'content-type\'))\n\n if (xhr.responseType == \'arraybuffer\' || xhr.responseType == \'blob\')\n result = xhr.response\n else {\n result = xhr.responseText\n\n try {\n // http://perfectionkills.com/global-eval-what-are-the-options/\n // sanitize response accordingly if data filter callback provided\n result = ajaxDataFilter(result, dataType, settings)\n if (dataType == \'script\') (1,eval)(result)\n else if (dataType == \'xml\') result = xhr.responseXML\n else if (dataType == \'json\') result = blankRE.test(result) ? null : $.parseJSON(result)\n } catch (e) { error = e }\n\n if (error) return ajaxError(error, \'parsererror\', xhr, settings, deferred)\n }\n\n ajaxSuccess(result, xhr, settings, deferred)\n } else {\n ajaxError(xhr.statusText || null, xhr.status ? \'error\' : \'abort\', xhr, settings, deferred)\n }\n }\n }\n\n if (ajaxBeforeSend(xhr, settings) === false) {\n xhr.abort()\n ajaxError(null, \'abort\', xhr, settings, deferred)\n return xhr\n }\n\n var async = \'async\' in settings ? settings.async : true\n xhr.open(settings.type, settings.url, async, settings.username, settings.password)\n\n if (settings.xhrFields) for (name in settings.xhrFields) xhr[name] = settings.xhrFields[name]\n\n for (name in headers) nativeSetHeader.apply(xhr, headers[name])\n\n if (settings.timeout > 0) abortTimeout = setTimeout(function(){\n xhr.onreadystatechange = empty\n xhr.abort()\n ajaxError(null, \'timeout\', xhr, settings, deferred)\n }, settings.timeout)\n\n // avoid sending empty string (#319)\n xhr.send(settings.data ? settings.data : null)\n return xhr\n }\n\n // handle optional data/success arguments\n function parseArguments(url, data, success, dataType) {\n if ($.isFunction(data)) dataType = success, success = data, data = undefined\n if (!$.isFunction(success)) dataType = success, success = undefined\n return {\n url: url\n , data: data\n , success: success\n , dataType: dataType\n }\n }\n\n $.get = function(/* url, data, success, dataType */){\n return $.ajax(parseArguments.apply(null, arguments))\n }\n\n $.post = function(/* url, data, success, dataType */){\n var options = parseArguments.apply(null, arguments)\n options.type = \'POST\'\n return $.ajax(options)\n }\n\n $.getJSON = function(/* url, data, success */){\n var options = parseArguments.apply(null, arguments)\n options.dataType = \'json\'\n return $.ajax(options)\n }\n\n $.fn.load = function(url, data, success){\n if (!this.length) return this\n var self = this, parts = url.split(/\\s/), selector,\n options = parseArguments(url, data, success),\n callback = options.success\n if (parts.length > 1) options.url = parts[0], selector = parts[1]\n options.success = function(response){\n self.html(selector ?\n $(\'<div>\').html(response.replace(rscript, "")).find(selector)\n : response)\n callback && callback.apply(self, arguments)\n }\n $.ajax(options)\n return this\n }\n\n var escape = encodeURIComponent\n\n function serialize(params, obj, traditional, scope){\n var type, array = $.isArray(obj), hash = $.isPlainObject(obj)\n $.each(obj, function(key, value) {\n type = $.type(value)\n if (scope) key = traditional ? scope :\n scope + \'[\' + (hash || type == \'object\' || type == \'array\' ? key : \'\') + \']\'\n // handle data in serializeArray() format\n if (!scope && array) params.add(value.name, value.value)\n // recurse into nested objects\n else if (type == "array" || (!traditional && type == "object"))\n serialize(params, value, traditional, key)\n else params.add(key, value)\n })\n }\n\n $.param = function(obj, traditional){\n var params = []\n params.add = function(key, value) {\n if ($.isFunction(value)) value = value()\n if (value == null) value = ""\n this.push(escape(key) + \'=\' + escape(value))\n }\n serialize(params, obj, traditional)\n return params.join(\'&\').replace(/%20/g, \'+\')\n }\n})(Zepto)\n\n;(function($){\n $.fn.serializeArray = function() {\n var name, type, result = [],\n add = function(value) {\n if (value.forEach) return value.forEach(add)\n result.push({ name: name, value: value })\n }\n if (this[0]) $.each(this[0].elements, function(_, field){\n type = field.type, name = field.name\n if (name && field.nodeName.toLowerCase() != \'fieldset\' &&\n !field.disabled && type != \'submit\' && type != \'reset\' && type != \'button\' && type != \'file\' &&\n ((type != \'radio\' && type != \'checkbox\') || field.checked))\n add($(field).val())\n })\n return result\n }\n\n $.fn.serialize = function(){\n var result = []\n this.serializeArray().forEach(function(elm){\n result.push(encodeURIComponent(elm.name) + \'=\' + encodeURIComponent(elm.value))\n })\n return result.join(\'&\')\n }\n\n $.fn.submit = function(callback) {\n if (0 in arguments) this.bind(\'submit\', callback)\n else if (this.length) {\n var event = $.Event(\'submit\')\n this.eq(0).trigger(event)\n if (!event.isDefaultPrevented()) this.get(0).submit()\n }\n return this\n }\n\n})(Zepto)\n\n;(function(){\n // getComputedStyle shouldn\'t freak out when called\n // without a valid element as argument\n try {\n getComputedStyle(undefined)\n } catch(e) {\n var nativeGetComputedStyle = getComputedStyle\n window.getComputedStyle = function(element, pseudoElement){\n try {\n return nativeGetComputedStyle(element, pseudoElement)\n } catch(e) {\n return null\n }\n }\n }\n})()\n return Zepto\n}))\n'},function(){(function(e){e.expr={":":{}},e.support={},e.fn.clone=function(){var t=e();return this.each(function(){t.push(this.cloneNode(!0))}),t},['Left','Top'].forEach(function(t,n){function o(e){return e&&'object'==typeof e&&'setInterval'in e}function i(e){return o(e)?e:!(9!==e.nodeType)&&(e.defaultView||e.parentWindow)}var a='scroll'+t;e.fn[a]=function(t){var o,s;return void 0===t?(o=this[0],!o)?null:(s=i(o),s?'pageXOffset'in s?s[n?'pageYOffset':'pageXOffset']:s.document.documentElement[a]||s.document.body[a]:o[a]):void this.each(function(){if(s=i(this),s){var o=n?e(s).scrollLeft():t,r=n?t:e(s).scrollTop();s.scrollTo(o,r)}else this[a]=t})}}),['width','height'].forEach(function(t){var n=t.replace(/./,function(e){return e[0].toUpperCase()});e.fn['inner'+n]=function(e){var n=this;if(n){var o=n[t]();return{width:['left','right'],height:['top','bottom']}[t].forEach(function(t){o+=parseInt(n.css('padding-'+t),10),e&&(o+=parseInt(n.css('margin-'+t),10))}),o}return null},e.fn['outer'+n]=function(e){var n=this;if(n){var o=n[t]();return{width:['left','right'],height:['top','bottom']}[t].forEach(function(t){e&&(o+=parseInt(n.css('margin-'+t),10))}),o}return null}}),e.proxy=function(t,n){if('string'==typeof n){var o=t[n];n=t,t=o}if(e.isFunction(t)){var i=Array.prototype.slice.call(arguments,2),a=function(){return t.apply(n,i.concat(Array.prototype.slice.call(arguments)))};return a.guid=t.guid=t.guid||a.guid||e.guid++,a}};var t=String.prototype.trim;e.trim=function(e,n){return!n&&t?t.call(e):(n=defaultToWhiteSpace(n),e.replace(new RegExp('^['+n+']+|['+n+']+$','g'),''))};var n=/^t(?:able|d|h)$/i,o=/^(?:body|html)$/i;e.fn.position=function(){if(!this[0])return null;var t=this[0],n=this.offsetParent(),i=this.offset(),a=o.test(n[0].nodeName)?{top:0,left:0}:n.offset();return i.top-=parseFloat(e(t).css('margin-top'))||0,i.left-=parseFloat(e(t).css('margin-left'))||0,a.top+=parseFloat(e(n[0]).css('border-top-width'))||0,a.left+=parseFloat(e(n[0]).css('border-left-width'))||0,{top:i.top-a.top,left:i.left-a.left}},e.fn.offsetParent=function(){var t=e();return this.each(function(){for(var n=this.offsetParent||document.body;n&&!o.test(n.nodeName)&&'static'===e(n).css('position');)n=n.offsetParent;t.push(n)}),t}})(Zepto)}])});
+//# sourceMappingURL=goldenlayout.js.map \ No newline at end of file
diff --git a/webAO/golden/js/goldenlayout.js.map b/webAO/golden/js/goldenlayout.js.map
new file mode 100644
index 0000000..b28cd6f
--- /dev/null
+++ b/webAO/golden/js/goldenlayout.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"js\\goldenlayout.js","sources":["webpack:///webpack/universalModuleDefinition"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"GoldenLayout\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"GoldenLayout\"] = factory();\n\telse\n\t\troot[\"GoldenLayout\"] = factory();\n})(typeof self !== 'undefined' ? self : this, function() {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition"],"mappings":"AAAA","sourceRoot":""} \ No newline at end of file
diff --git a/webAO/images/logo-neo.png b/webAO/images/logo-neo.png
new file mode 100644
index 0000000..c625cac
--- /dev/null
+++ b/webAO/images/logo-neo.png
Binary files differ
diff --git a/webAO/images/logo-new.png b/webAO/images/logo-new.png
new file mode 100644
index 0000000..f53fe30
--- /dev/null
+++ b/webAO/images/logo-new.png
Binary files differ
diff --git a/webAO/ui.b.js b/webAO/ui.b.js
index 292acc0..fb4146e 100644
--- a/webAO/ui.b.js
+++ b/webAO/ui.b.js
@@ -1,2 +1,2 @@
-!function(e){var t={};function n(i){if(t[i])return t[i].exports;var o=t[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=3)}([,function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){"use strict";(function(e){var n,i,o,r,s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};"undefined"==typeof self||self,r=function(){var e=Math.min,t=Math.floor,n=Math.max;return function(e){function t(i){if(n[i])return n[i].exports;var o=n[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:i})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=67)}([function(e,t){t.__esModule=!0,t.default=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,n){t.__esModule=!0;var i=function(e){return e&&e.__esModule?e:{default:e}}(n(100));t.default=function(){function e(e,t){for(var n,o=0;o<t.length;o++)(n=t[o]).enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),(0,i.default)(e,n.key,n)}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}()},function(e,t,n){function i(e){return e&&e.__esModule?e:{default:e}}function o(){}function r(e){return"function"==typeof u.default?(0,u.default)(e):(o.prototype=e,new o)}function s(e){var t=location.hash.match(new RegExp(e+"=([^&]*)"));return t?t[1]:null}function a(e,t){if(!(t instanceof Array))throw new Error("Haystack is not an Array");if(t.indexOf)return t.indexOf(e);for(var n=0;n<t.length;n++)if(t[n]===e)return n;return-1}Object.defineProperty(t,"__esModule",{value:!0}),t.isFunction=void 0;var l=i(n(17)),c=i(n(109)),u=i(n(55));t.F=o,t.getTouchEvent=function(e){return $.zepto?e.touches?e.targetTouches[0]:e:e.originalEvent&&e.originalEvent.touches?e.originalEvent.touches[0]:e},t.extend=function(e,t){e.prototype=r(t.prototype),e.prototype.contructor=e},t.createObject=r,t.objectKeys=function(e){var t,n;if("function"==typeof c.default)return(0,c.default)(e);for(n in t=[],e)t.push(n);return t},t.getHashValue=s,t.getQueryStringParam=function(e){if(window.location.hash)return s(e);if(!window.location.search)return null;var t,n,i=window.location.search.substr(1).split("&"),o={};for(n=0;n<i.length;n++)o[(t=i[n].split("="))[0]]=t[1];return o[e]||null},t.copy=function(e,t){for(var n in t)e[n]=t[n];return e},t.animFrame=function(e){return(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)})(function(){e()})},t.indexOf=a,t.fnBind=function(e,t,n){if(void 0!==Function.prototype.bind)return Function.prototype.bind.apply(e,[t].concat(n||[]));var i=function i(){var o=(n||[]).concat(Array.prototype.slice.call(arguments,0));return this instanceof i?void e.apply(this,o):e.apply(t,o)};return i.prototype=e.prototype,i},t.removeFromArray=function(e,t){var n=a(e,t);if(-1===n)throw new Error("Can't remove item from array. Item is not in the array");t.splice(n,1)},t.now=function(){return"function"==typeof Date.now?Date.now():(new Date).getTime()},t.getUniqueId=function(){return(1e15*Math.random()).toString(36).replace(".","")},t.filterXss=function(e,t){var n=e.replace(/javascript/gi,"j&#97;vascript").replace(/expression/gi,"expr&#101;ssion").replace(/onload/gi,"onlo&#97;d").replace(/script/gi,"&#115;cript").replace(/onerror/gi,"on&#101;rror");return!0===t?n:n.replace(/>/g,"&gt;").replace(/</g,"&lt;")},t.stripTags=function(e){return $.trim(e.replace(/(<([^>]+)>)/gi,""))},t.isFunction="function"!=typeof/./&&"object"!=("undefined"==typeof Int8Array?"undefined":(0,l.default)(Int8Array))?function(e){return"function"==typeof e||!1}:function(e){return"[object Function]"===toString.call(e)}},function(e,t,n){e.exports={default:n(98),__esModule:!0}},function(e,t,n){t.__esModule=!0;var i=function(e){return e&&e.__esModule?e:{default:e}}(n(17));t.default=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":(0,i.default)(t))&&"function"!=typeof t?e:t}},function(e,t,n){function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var o=i(n(103)),r=i(n(55)),s=i(n(17));t.default=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":(0,s.default)(t)));e.prototype=(0,r.default)(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(o.default?(0,o.default)(e,t):e.__proto__=t)}},function(e){var t=e.exports={version:"2.5.6"};"number"==typeof __e&&(__e=t)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.ALL_EVENT=void 0;var i=function(e){return e&&e.__esModule?e:{default:e}}(n(0)),o=n(2),r=t.ALL_EVENT="__all";t.default=function e(){(0,i.default)(this,e),this._mSubscriptions={},this._mSubscriptions[r]=[],this.on=function(e,t,n){if(!(0,o.isFunction)(t))throw new Error("Tried to listen to event "+e+" with non-function callback "+t);this._mSubscriptions[e]||(this._mSubscriptions[e]=[]),this._mSubscriptions[e].push({fn:t,ctx:n})},this.emit=function(e){var t,n,i;i=Array.prototype.slice.call(arguments,1);var o=this._mSubscriptions[e];if(o)for(o=o.slice(),t=0;t<o.length;t++)n=o[t].ctx||{},o[t].fn.apply(n,i);i.unshift(e);var s=this._mSubscriptions[r].slice();for(t=0;t<s.length;t++)n=s[t].ctx||{},s[t].fn.apply(n,i)},this.unbind=function(e,t,n){if(!this._mSubscriptions[e])throw new Error("No subscribtions to unsubscribe for event "+e);var i,o=!1;for(i=0;i<this._mSubscriptions[e].length;i++)t&&this._mSubscriptions[e][i].fn!==t||n&&n!==this._mSubscriptions[e][i].ctx||(this._mSubscriptions[e].splice(i,1),o=!0);if(0==o)throw new Error("Nothing to unbind for "+e)},this.off=this.unbind,this.trigger=this.emit}},function(e){var t=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=t)},function(e,t,n){var i=n(18),o=n(45),r=n(29),s=Object.defineProperty;t.f=n(10)?Object.defineProperty:function(e,t,n){if(i(e),t=r(t,!0),i(n),o)try{return s(e,t,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){e.exports=!n(19)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e){var t={}.hasOwnProperty;e.exports=function(e,n){return t.call(e,n)}},function(e,t,n){var i=n(8),o=n(6),r=n(44),s=n(13),a=n(11),l="prototype",c=function e(t,n,c){var u,h,d,f=t&e.F,p=t&e.G,m=t&e.S,g=t&e.P,y=t&e.B,v=t&e.W,_=p?o:o[n]||(o[n]={}),b=_[l],w=p?i:m?i[n]:(i[n]||{})[l];for(u in p&&(c=n),c)(h=!f&&w&&void 0!==w[u])&&a(_,u)||(d=h?w[u]:c[u],_[u]=p&&"function"!=typeof w[u]?c[u]:y&&h?r(d,i):v&&w[u]==d?function(e){var t=function(t,n,i){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,i)}return e.apply(this,arguments)};return t[l]=e[l],t}(d):g&&"function"==typeof d?r(Function.call,d):d,g&&((_.virtual||(_.virtual={}))[u]=d,t&e.R&&b&&!b[u]&&s(b,u,d)))};c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,e.exports=c},function(e,t,n){var i=n(9),o=n(22);e.exports=n(10)?function(e,t,n){return i.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},function(e){e.exports=function(e){return"object"==(void 0===e?"undefined":s(e))?null!==e:"function"==typeof e}},function(e,t,n){var i=n(79),o=n(28);e.exports=function(e){return i(o(e))}},function(e,t,n){var i=n(33)("wks"),o=n(24),r=n(8).Symbol,s="function"==typeof r;(e.exports=function(e){return i[e]||(i[e]=s&&r[e]||(s?r:o)("Symbol."+e))}).store=i},function(e,t,n){function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var o=i(n(72)),r=i(n(88)),a="function"==typeof r.default&&"symbol"==s(o.default)?function(e){return void 0===e?"undefined":s(e)}:function(e){return e&&"function"==typeof r.default&&e.constructor===r.default&&e!==r.default.prototype?"symbol":void 0===e?"undefined":s(e)};t.default="function"==typeof r.default&&"symbol"===a(o.default)?function(e){return void 0===e?"undefined":a(e)}:function(e){return e&&"function"==typeof r.default&&e.constructor===r.default&&e!==r.default.prototype?"symbol":void 0===e?"undefined":a(e)}},function(e,t,n){var i=n(14);e.exports=function(e){if(!i(e))throw TypeError(e+" is not an object!");return e}},function(e){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=i(n(3)),r=i(n(0)),s=i(n(1)),a=i(n(4)),l=i(n(5)),c=n(7),u=i(c),h=i(n(58)),d=i(n(41)),f=i(n(59)),p=i(n(112)),m=n(2),g=function(e){function t(e,n,i){(0,r.default)(this,t);var s=(0,a.default)(this,(t.__proto__||(0,o.default)(t)).call(this));return s.config=s._extendItemNode(n),s.type=n.type,s.contentItems=[],s.parent=i,s.isInitialised=!1,s.isMaximised=!1,s.isRoot=!1,s.isRow=!1,s.isColumn=!1,s.isStack=!1,s.isComponent=!1,s.layoutManager=e,s._pendingEventPropagations={},s._throttledEvents=["stateChanged"],s.on(c.ALL_EVENT,s._propagateEvent,s),n.content&&s._createContentItems(n),s}return(0,l.default)(t,e),(0,s.default)(t,[{key:"setSize",value:function(){throw new Error("Abstract Method")}},{key:"callDownwards",value:function(e,t,n,i){var o;for(!0!==n&&!0!==i&&this[e].apply(this,t||[]),o=0;o<this.contentItems.length;o++)this.contentItems[o].callDownwards(e,t,n);!0===n&&!0!==i&&this[e].apply(this,t||[])}},{key:"removeChild",value:function(e,t){var n=(0,m.indexOf)(e,this.contentItems);if(-1===n)throw new Error("Can't remove child item. Unknown content item");!0!==t&&this.contentItems[n]._$destroy(),this.contentItems.splice(n,1),this.config.content.splice(n,1),0<this.contentItems.length?this.callDownwards("setSize"):!(this instanceof d.default)&&!0===this.config.isClosable&&this.parent.removeChild(this)}},{key:"undisplayChild",value:function(e){if(-1===(0,m.indexOf)(e,this.contentItems))throw new Error("Can't remove child item. Unknown content item");this instanceof d.default||!0!==this.config.isClosable||this.parent.undisplayChild(this)}},{key:"addChild",value:function(e,t){void 0===t&&(t=this.contentItems.length),this.contentItems.splice(t,0,e),void 0===this.config.content&&(this.config.content=[]),this.config.content.splice(t,0,e.config),e.parent=this,!0===e.parent.isInitialised&&!1===e.isInitialised&&e._$init()}},{key:"replaceChild",value:function(e,t,n){t=this.layoutManager._$normalizeContentItem(t);var i=(0,m.indexOf)(e,this.contentItems),o=e.element[0].parentNode;if(-1===i)throw new Error("Can't replace child. oldChild is not child of this");o.replaceChild(t.element[0],e.element[0]),!0===n&&(e.parent=null,e._$destroy()),this.contentItems[i]=t,t.parent=this,this.isStack&&(this.header.tabs[i].contentItem=t),!0===t.parent.isInitialised&&!1===t.isInitialised&&t._$init(),this.callDownwards("setSize")}},{key:"remove",value:function(){this.parent.removeChild(this)}},{key:"popout",value:function(){var e=this.layoutManager.createPopout(this);return this.emitBubblingEvent("stateChanged"),e}},{key:"toggleMaximise",value:function(e){e&&e.preventDefault(),!0===this.isMaximised?this.layoutManager._$minimiseItem(this):this.layoutManager._$maximiseItem(this),this.isMaximised=!this.isMaximised,this.emitBubblingEvent("stateChanged")}},{key:"select",value:function(){this.layoutManager.selectedItem!==this&&(this.layoutManager.selectItem(this,!0),this.element.addClass("lm_selected"))}},{key:"deselect",value:function(){this.layoutManager.selectedItem===this&&(this.layoutManager.selectedItem=null,this.element.removeClass("lm_selected"))}},{key:"setTitle",value:function(e){this.config.title=e,this.emit("titleChanged",e),this.emit("stateChanged")}},{key:"hasId",value:function(e){return!!this.config.id&&("string"==typeof this.config.id?this.config.id===e:this.config.id instanceof Array?-1!==(0,m.indexOf)(e,this.config.id):void 0)}},{key:"addId",value:function(e){this.hasId(e)||(this.config.id?"string"==typeof this.config.id?this.config.id=[this.config.id,e]:this.config.id instanceof Array&&this.config.id.push(e):this.config.id=e)}},{key:"removeId",value:function(e){if(!this.hasId(e))throw new Error("Id not found");if("string"==typeof this.config.id)delete this.config.id;else if(this.config.id instanceof Array){var t=(0,m.indexOf)(e,this.config.id);this.config.id.splice(t,1)}}},{key:"getItemsByFilter",value:function(e){var t=[];return function n(i){for(var o=0;o<i.contentItems.length;o++)!0===e(i.contentItems[o])&&t.push(i.contentItems[o]),n(i.contentItems[o])}(this),t}},{key:"getItemsById",value:function(e){return this.getItemsByFilter(function(t){return t.config.id instanceof Array?-1!==(0,m.indexOf)(e,t.config.id):t.config.id===e})}},{key:"getItemsByType",value:function(e){return this._$getItemsByProperty("type",e)}},{key:"getComponentsByName",value:function(e){var t,n=this._$getItemsByProperty("componentName",e),i=[];for(t=0;t<n.length;t++)i.push(n[t].instance);return i}},{key:"_$getItemsByProperty",value:function(e,t){return this.getItemsByFilter(function(n){return n[e]===t})}},{key:"_$setParent",value:function(e){this.parent=e}},{key:"_$highlightDropZone",value:function(e,t,n){this.layoutManager.dropTargetIndicator.highlightArea(n)}},{key:"_$onDrop",value:function(e){this.addChild(e)}},{key:"_$hide",value:function(){this._callOnActiveComponents("hide"),this.element.hide(),this.layoutManager.updateSize()}},{key:"_$show",value:function(){this._callOnActiveComponents("show"),this.element.show(),this.layoutManager.updateSize()}},{key:"_callOnActiveComponents",value:function(e){var t,n,i=this.getItemsByType("stack");for(n=0;n<i.length;n++)(t=i[n].getActiveContentItem())&&t.isComponent&&t.container[e]()}},{key:"_$destroy",value:function(){this.emitBubblingEvent("beforeItemDestroyed"),this.callDownwards("_$destroy",[],!0,!0),this.element.remove(),this.emitBubblingEvent("itemDestroyed")}},{key:"_$getArea",value:function(e){var t=(e=e||this.element).offset(),n=e.width(),i=e.height();return{x1:t.left,y1:t.top,x2:t.left+n,y2:t.top+i,surface:n*i,contentItem:this}}},{key:"_$init",value:function(){var e;for(this.setSize(),e=0;e<this.contentItems.length;e++)this.childElementContainer.append(this.contentItems[e].element);this.isInitialised=!0,this.emitBubblingEvent("itemCreated"),this.emitBubblingEvent(this.type+"Created")}},{key:"emitBubblingEvent",value:function(e){var t=new h.default(e,this);this.emit(e,t)}},{key:"_createContentItems",value:function(e){var t,n;if(!(e.content instanceof Array))throw new f.default("content must be an Array",e);for(n=0;n<e.content.length;n++)t=this.layoutManager.createContentItem(e.content[n],this),this.contentItems.push(t)}},{key:"_extendItemNode",value:function(e){for(var t in p.default)void 0===e[t]&&(e[t]=p.default[t]);return e}},{key:"_propagateEvent",value:function(e,t){t instanceof h.default&&!1===t.isPropagationStopped&&!0===this.isInitialised&&(!1===this.isRoot&&this.parent?this.parent.emit.apply(this.parent,Array.prototype.slice.call(arguments,0)):this._scheduleEventPropagationToLayoutManager(e,t))}},{key:"_scheduleEventPropagationToLayoutManager",value:function(e,t){-1===(0,m.indexOf)(e,this._throttledEvents)?this.layoutManager.emit(e,t.origin):!0!==this._pendingEventPropagations[e]&&(this._pendingEventPropagations[e]=!0,(0,m.animFrame)((0,m.fnBind)(this._propagateEventToLayoutManager,this,[e,t])))}},{key:"_propagateEventToLayoutManager",value:function(e,t){this._pendingEventPropagations[e]=!1,this.layoutManager.emit(e,t)}}]),t}(u.default);t.default=g},function(e){e.exports=!0},function(e){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){var i=n(48),o=n(34);e.exports=Object.keys||function(e){return i(e,o)}},function(e){var t=0,n=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++t+n).toString(36))}},function(e,i,o){function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(i,"__esModule",{value:!0});var s=r(o(3)),a=r(o(0)),l=r(o(1)),c=r(o(4)),u=r(o(5)),h=r(o(20)),d=r(o(42)),f=r(o(113)),p=o(2),m=function(e){function i(e,t,n,o){(0,a.default)(this,i);var r=(0,c.default)(this,(i.__proto__||(0,s.default)(i)).call(this,t,n,o));return r.isRow=!e,r.isColumn=e,r.element=$('<div class="lm_item lm_'+(e?"column":"row")+'"></div>'),r.childElementContainer=r.element,r._splitterSize=t.config.dimensions.borderWidth,r._splitterGrabSize=t.config.dimensions.borderGrabWidth,r._isColumn=e,r._dimension=e?"height":"width",r._splitter=[],r._splitterPosition=null,r._splitterMinPosition=null,r._splitterMaxPosition=null,r}var o=Math.round;return(0,u.default)(i,e),(0,l.default)(i,[{key:"addChild",value:function(e,t,i){var o,r,s,a;if(e=this.layoutManager._$normalizeContentItem(e,this),void 0===t&&(t=this.contentItems.length),0<this.contentItems.length?(a=this._createSplitter(n(0,t-1)).element,0<t?(this.contentItems[t-1].element.after(a),a.after(e.element),this._isDocked(t-1)&&(this._splitter[t-1].element.hide(),this._splitter[t].element.show())):(this.contentItems[0].element.before(a),a.before(e.element))):this.childElementContainer.append(e.element),h.default.prototype.addChild.call(this,e,t),o=1/this.contentItems.length*100,!0!==i){for(s=0;s<this.contentItems.length;s++)this.contentItems[s]===e?e.config[this._dimension]=o:(r=this.contentItems[s].config[this._dimension]*=(100-o)/100,this.contentItems[s].config[this._dimension]=r);this.callDownwards("setSize"),this.emitBubblingEvent("stateChanged"),this._validateDocking()}else this.emitBubblingEvent("stateChanged")}},{key:"undisplayChild",value:function(e){var t,i=e.config[this._dimension],o=(0,p.indexOf)(e,this.contentItems),r=n(o-1,0);if(-1===o)throw new Error("Can't undisplay child. ContentItem is not child of this Row or Column");this._splitter[r]&&(this._splitter[r].element.hide(),this._splitter.splice(r,1)),r<this._splitter.length&&this._isDocked(r)&&this._splitter[r].element.hide();var s=this._isDocked();for(t=0;t<this.contentItems.length;t++)this.contentItems[t]===e?this.contentItems[t].config[this._dimension]=0:this._isDocked(t)||(this.contentItems[t].config[this._dimension]+=i/(this.contentItems.length-1-s));this.callDownwards("setSize"),this.emitBubblingEvent("stateChanged")}},{key:"removeChild",value:function(e,t){var i,o,r=e.config[this._dimension],s=(0,p.indexOf)(e,this.contentItems),a=n(s-1,0);if(-1===s)throw new Error("Can't remove child. ContentItem is not child of this Row or Column");this._splitter[a]&&(this._splitter[a]._$destroy(),this._splitter.splice(a,1)),a<this._splitter.length&&this._isDocked(a)&&this._splitter[a].element.hide();var l=this._isDocked();for(i=0;i<this.contentItems.length;i++)this.contentItems[i]!==e&&(this._isDocked(i)||(this.contentItems[i].config[this._dimension]+=r/(this.contentItems.length-1-l)));h.default.prototype.removeChild.call(this,e,t),1===this.contentItems.length&&!0===this.config.isClosable?(o=this.contentItems[0],this.contentItems=[],this.parent.replaceChild(this,o,!0),this._validateDocking(this.parent)):(this.callDownwards("setSize"),this.emitBubblingEvent("stateChanged"),this._validateDocking())}},{key:"replaceChild",value:function(e,t){var n=e.config[this._dimension];h.default.prototype.replaceChild.call(this,e,t),t.config[this._dimension]=n,this.callDownwards("setSize"),this.emitBubblingEvent("stateChanged")}},{key:"setSize",value:function(){0<this.contentItems.length&&(this._calculateRelativeSizes(),this._setAbsoluteSizes()),this.emitBubblingEvent("stateChanged"),this.emit("resize")}},{key:"dock",value:function(e,t,i){if(1===this.contentItems.length)throw new Error("Can't dock child when it single");var o=e.config[this._dimension],r=this.layoutManager.config.dimensions.headerHeight,s=(0,p.indexOf)(e,this.contentItems),a=n(s-1,0);if(-1===s)throw new Error("Can't dock child. ContentItem is not child of this Row or Column");var l,c=e._docker&&e._docker.docked;if(void 0===t||t!=c){if(c){for(this._splitter[a].element.show(),l=0;l<this.contentItems.length;l++){var u=e._docker.size;this.contentItems[l]===e?e.config[this._dimension]=u:(itemSize=this.contentItems[l].config[this._dimension]*=(100-u)/100,this.contentItems[l].config[this._dimension]=itemSize)}e._docker={docked:!1}}else{if(2>this.contentItems.length-this._isDocked())throw new Error("Can't dock child when it is last in "+this.config.type);var h={column:{first:"top",last:"bottom"},row:{first:"left",last:"right"}}[this.config.type][s?"last":"first"];e.header.position()!=h&&e.header.position(h),this._splitter[a]&&this._splitter[a].element.hide();var d=this._isDocked();for(l=0;l<this.contentItems.length;l++)this.contentItems[l]===e?this.contentItems[l].config[this._dimension]=0:this._isDocked(l)||(this.contentItems[l].config[this._dimension]+=o/(this.contentItems.length-1-d));e._docker={dimension:this._dimension,size:o,realSize:e.element[this._dimension]()-r,docked:!0},i&&e.childElementContainer[this._dimension](0)}e.element.toggleClass("lm_docked",e._docker.docked),this.callDownwards("setSize"),this.emitBubblingEvent("stateChanged"),this._validateDocking()}}},{key:"_$init",value:function(){if(!0!==this.isInitialised){var e;for(h.default.prototype._$init.call(this),e=0;e<this.contentItems.length-1;e++)this.contentItems[e].element.after(this._createSplitter(e).element);for(e=0;e<this.contentItems.length;e++)this.contentItems[e]._header&&this.contentItems[e]._header.docked&&this.dock(this.contentItems[e],!0,!0)}}},{key:"_setAbsoluteSizes",value:function(){var e,t=this._calculateAbsoluteSizes();for(e=0;e<this.contentItems.length;e++)0<t.additionalPixel-e&&t.itemSizes[e]++,this._isColumn?(this.contentItems[e].element.width(t.totalWidth),this.contentItems[e].element.height(t.itemSizes[e])):(this.contentItems[e].element.width(t.itemSizes[e]),this.contentItems[e].element.height(t.totalHeight))}},{key:"_calculateAbsoluteSizes",value:function(){var e,n,i=(this.contentItems.length-1)*this._splitterSize,o=this.layoutManager.config.dimensions.headerHeight,r=this.element.width(),s=this.element.height(),a=0,l=[];for(this._isColumn?s-=i:r-=i,e=0;e<this.contentItems.length;e++)this._isDocked(e)&&(this._isColumn?s-=o-this._splitterSize:r-=o-this._splitterSize);for(e=0;e<this.contentItems.length;e++)n=this._isColumn?t(s*(this.contentItems[e].config.height/100)):t(r*(this.contentItems[e].config.width/100)),this._isDocked(e)&&(n=o),a+=n,l.push(n);return{itemSizes:l,additionalPixel:t((this._isColumn?s:r)-a),totalWidth:r,totalHeight:s}}},{key:"_calculateRelativeSizes",value:function(){var e,t=0,n=[],i=this._isColumn?"height":"width";for(e=0;e<this.contentItems.length;e++)void 0===this.contentItems[e].config[i]?n.push(this.contentItems[e]):t+=this.contentItems[e].config[i];if(100!==o(t))if(100>o(t)&&0<n.length){for(e=0;e<n.length;e++)n[e].config[i]=(100-t)/n.length;this._respectMinItemWidth()}else{if(100<o(t))for(e=0;e<n.length;e++)n[e].config[i]=50,t+=50;for(e=0;e<this.contentItems.length;e++)this.contentItems[e].config[i]=this.contentItems[e].config[i]/t*100;this._respectMinItemWidth()}else this._respectMinItemWidth()}},{key:"_respectMinItemWidth",value:function(){var e,t,n,i=this.layoutManager.config.dimensions&&this.layoutManager.config.dimensions.minItemWidth||0,r=null,s=[],a=0,l=0,c=0,u=0,h=[];if(!(this._isColumn||!i||1>=this.contentItems.length)){r=this._calculateAbsoluteSizes();for(var d=0;d<this.contentItems.length;d++)this.contentItems[d],(u=r.itemSizes[d])<i?(l+=i-u,n={width:i}):(a+=u-i,n={width:u},s.push(n)),h.push(n);if(!(0==l||l>a)){for(e=l/a,c=l,d=0;d<s.length;d++)n=s[d],c-=t=o((n.width-i)*e),n.width-=t;for(0!==c&&(h[h.length-1].width-=c),d=0;d<this.contentItems.length;d++)this.contentItems[d].config.width=h[d].width/r.totalWidth*100}}}},{key:"_createSplitter",value:function(e){var t;return(t=new f.default(this._isColumn,this._splitterSize,this._splitterGrabSize)).on("drag",(0,p.fnBind)(this._onSplitterDrag,this,[t]),this),t.on("dragStop",(0,p.fnBind)(this._onSplitterDragStop,this,[t]),this),t.on("dragStart",(0,p.fnBind)(this._onSplitterDragStart,this,[t]),this),this._splitter.splice(e,0,t),t}},{key:"_getItemsForSplitter",value:function(e){var t=(0,p.indexOf)(e,this._splitter);return{before:this.contentItems[t],after:this.contentItems[t+1]}}},{key:"_isDocked",value:function(e){if(void 0===e){for(var t=0,n=0;n<this.contentItems.length;++n)this._isDocked(n)&&t++;return t}return e<this.contentItems.length?this.contentItems[e]._docker&&this.contentItems[e]._docker.docked:void 0}},{key:"_validateDocking",value:function(e){for(var t=1<(e=e||this).contentItems.length-e._isDocked(),n=0;n<e.contentItems.length;++n)e.contentItems[n]instanceof d.default&&(e.contentItems[n].header._setDockable(e._isDocked(n)||t),e.contentItems[n].header._$setClosable(t))}},{key:"_getMinimumDimensions",value:function(e){for(var t=0,i=0,o=0;o<e.length;++o)t=n(e[o].minWidth||0,t),i=n(e[o].minHeight||0,i);return{horizontal:t,vertical:i}}},{key:"_onSplitterDragStart",value:function(e){var t=this._getItemsForSplitter(e),n=this.layoutManager.config.dimensions[this._isColumn?"minItemHeight":"minItemWidth"],i=this._getMinimumDimensions(t.before.config.content),o=this._isColumn?i.vertical:i.horizontal,r=this._getMinimumDimensions(t.after.config.content),s=this._isColumn?r.vertical:r.horizontal;this._splitterPosition=0,this._splitterMinPosition=-1*(t.before.element[this._dimension]()-(o||n)),this._splitterMaxPosition=t.after.element[this._dimension]()-(s||n)}},{key:"_onSplitterDrag",value:function(e,t,n){var i=this._isColumn?n:t;i>this._splitterMinPosition&&i<this._splitterMaxPosition&&(this._splitterPosition=i,e.element.css(this._isColumn?"top":"left",i))}},{key:"_onSplitterDragStop",value:function(e){var t=this._getItemsForSplitter(e),n=t.before.element[this._dimension](),i=t.after.element[this._dimension](),o=(this._splitterPosition+n)/(n+i),r=t.before.config[this._dimension]+t.after.config[this._dimension];t.before.config[this._dimension]=o*r,t.after.config[this._dimension]=(1-o)*r,e.element.css({top:0,left:0}),(0,p.animFrame)((0,p.fnBind)(this.callDownwards,this,["setSize"]))}}]),i}(h.default);i.default=m},function(e,t,n){function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=i(n(3)),r=i(n(0)),s=i(n(1)),a=i(n(4)),l=i(n(5)),c=i(n(7)),u=n(2),h=function(e){function t(e,n){(0,r.default)(this,t);var i=(0,a.default)(this,(t.__proto__||(0,o.default)(t)).call(this));return i.timeout=null,i._eElement=$(e),i._oDocument=$(document),i._eBody=$(document.body),i._nButtonCode=n||0,i._nDelay=200,i._nDistance=10,i._nX=0,i._nY=0,i._nOriginalX=0,i._nOriginalY=0,i._bDragging=!1,i._fMove=(0,u.fnBind)(i.onMouseMove,i),i._fUp=(0,u.fnBind)(i.onMouseUp,i),i._fDown=(0,u.fnBind)(i.onMouseDown,i),i._eElement.on("mousedown touchstart",i._fDown),i}return(0,l.default)(t,e),(0,s.default)(t,[{key:"destroy",value:function(){this._eElement.unbind("mousedown touchstart",this._fDown),this._oDocument.unbind("mouseup touchend",this._fUp),this._eElement=null,this._oDocument=null,this._eBody=null}},{key:"onMouseDown",value:function(e){if(e.preventDefault(),0==e.button||"touchstart"===e.type){var t=this._getCoordinates(e);this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.on("mousemove touchmove",this._fMove),this._oDocument.one("mouseup touchend",this._fUp),this._timeout=setTimeout((0,u.fnBind)(this._startDrag,this),this._nDelay)}}},{key:"onMouseMove",value:function(e){var t=Math.abs;if(null!=this._timeout){e.preventDefault();var n=this._getCoordinates(e);this._nX=n.x-this._nOriginalX,this._nY=n.y-this._nOriginalY,!1===this._bDragging&&(t(this._nX)>this._nDistance||t(this._nY)>this._nDistance)&&(clearTimeout(this._timeout),this._startDrag()),this._bDragging&&this.emit("drag",this._nX,this._nY,e)}}},{key:"onMouseUp",value:function(e){null!=this._timeout&&(clearTimeout(this._timeout),this._eBody.removeClass("lm_dragging"),this._eElement.removeClass("lm_dragging"),this._oDocument.find("iframe").css("pointer-events",""),this._oDocument.unbind("mousemove touchmove",this._fMove),this._oDocument.unbind("mouseup touchend",this._fUp),!0===this._bDragging&&(this._bDragging=!1,this.emit("dragStop",e,this._nOriginalX+this._nX)))}},{key:"_startDrag",value:function(){this._bDragging=!0,this._eBody.addClass("lm_dragging"),this._eElement.addClass("lm_dragging"),this._oDocument.find("iframe").css("pointer-events","none"),this.emit("dragStart",this._nOriginalX,this._nOriginalY)}},{key:"_getCoordinates",value:function(e){return{x:(e=(0,u.getTouchEvent)(e)).pageX,y:e.pageY}}}]),t}(c.default);t.default=h},function(e){var n=Math.ceil;e.exports=function(e){return isNaN(e=+e)?0:(0<e?t:n)(e)}},function(e){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){var i=n(14);e.exports=function(e,t){if(!i(e))return e;var n,o;if(t&&"function"==typeof(n=e.toString)&&!i(o=n.call(e)))return o;if("function"==typeof(n=e.valueOf)&&!i(o=n.call(e)))return o;if(!t&&"function"==typeof(n=e.toString)&&!i(o=n.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},function(e){e.exports={}},function(e,t,n){var i=n(18),o=n(78),r=n(34),s=n(32)("IE_PROTO"),a=function(){},l="prototype",c=function(){var e,t=n(46)("iframe"),i=r.length;for(t.style.display="none",n(83).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),c=e.F;i--;)delete c[l][r[i]];return c()};e.exports=Object.create||function(e,t){var n;return null===e?n=c():(a[l]=i(e),n=new a,a[l]=null,n[s]=e),void 0===t?n:o(n,t)}},function(e,t,n){var i=n(33)("keys"),o=n(24);e.exports=function(e){return i[e]||(i[e]=o(e))}},function(e,t,n){var i=n(6),o=n(8),r="__core-js_shared__",s=o[r]||(o[r]={});(e.exports=function(e,t){return s[e]||(s[e]=void 0===t?{}:t)})("versions",[]).push({version:i.version,mode:n(21)?"pure":"global",copyright:"© 2018 Denis Pushkarev (zloirock.ru)"})},function(e){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(e,t,n){var i=n(9).f,o=n(11),r=n(16)("toStringTag");e.exports=function(e,t,n){e&&!o(e=n?e:e.prototype,r)&&i(e,r,{configurable:!0,value:t})}},function(e,t,n){var i=n(28);e.exports=function(e){return Object(i(e))}},function(e,t,n){t.f=n(16)},function(e,t,n){var i=n(8),o=n(6),r=n(21),s=n(37),a=n(9).f;e.exports=function(e){var t=o.Symbol||(o.Symbol=r?{}:i.Symbol||{});"_"==e.charAt(0)||e in t||a(t,e,{value:s.f(e)})}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,n){function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=i(n(17)),r=i(n(0)),s=i(n(1)),a=n(2),l=function(){function e(){if((0,r.default)(this,e),this._keys=["settings","hasHeaders","constrainDragToContainer","selectionEnabled","dimensions","borderWidth","minItemHeight","minItemWidth","headerHeight","dragProxyWidth","dragProxyHeight","labels","close","maximise","minimise","popout","content","componentName","componentState","id","width","type","height","isClosable","title","popoutWholeStack","openPopouts","parentId","activeItemIndex","reorderEnabled","borderGrabWidth"],36<this._keys.length)throw new Error("Too many keys in config minifier map");this._values=[!0,!1,"row","column","stack","component","close","maximise","minimise","open in new window"]}return(0,s.default)(e,[{key:"minifyConfig",value:function(e){var t={};return this._nextLevel(e,t,"_min"),t}},{key:"unminifyConfig",value:function(e){var t={};return this._nextLevel(e,t,"_max"),t}},{key:"_nextLevel",value:function(e,t,n){var i,r;for(i in e)e instanceof Array&&(i=parseInt(i,10)),e.hasOwnProperty(i)&&(r=this[n](i,this._keys),"object"===(0,o.default)(e[i])?(t[r]=e[i]instanceof Array?[]:{},this._nextLevel(e[i],t[r],n)):t[r]=this[n](e[i],this._values))}},{key:"_min",value:function(e,t){if("string"==typeof e&&1===e.length)return"___"+e;var n=(0,a.indexOf)(e,t);return-1===n?e:n.toString(36)}},{key:"_max",value:function(e,t){return"string"==typeof e&&1===e.length?t[parseInt(e,36)]:"string"==typeof e&&"___"===e.substr(0,3)?e[3]:e}}]),e}();t.default=l},function(e,t,n){function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=i(n(3)),r=i(n(0)),s=i(n(1)),a=i(n(4)),l=i(n(5)),c=i(n(20)),u=i(n(25)),h=function(e){function t(e,n,i){(0,r.default)(this,t);var s=(0,a.default)(this,(t.__proto__||(0,o.default)(t)).call(this,e,n,null));return s.isRoot=!0,s.type="root",s.element=$('<div class="lm_goldenlayout lm_item lm_root"></div>'),s.childElementContainer=s.element,s._containerElement=i,s._containerElement.append(s.element),s}return(0,l.default)(t,e),(0,s.default)(t,[{key:"addChild",value:function(e){if(0<this.contentItems.length)throw new Error("Root node can only have a single child");e=this.layoutManager._$normalizeContentItem(e,this),this.childElementContainer.append(e.element),c.default.prototype.addChild.call(this,e),this.callDownwards("setSize"),this.emitBubblingEvent("stateChanged")}},{key:"setSize",value:function(e,t){e=void 0===e?this._containerElement.width():e,t=void 0===t?this._containerElement.height():t,this.element.width(e),this.element.height(t),this.contentItems[0]&&(this.contentItems[0].element.width(e),this.contentItems[0].element.height(t))}},{key:"_$highlightDropZone",value:function(){this.layoutManager.tabDropPlaceholder.remove(),c.default.prototype._$highlightDropZone.apply(this,arguments)}},{key:"_$onDrop",value:function(e,t){var n;if(e.isComponent&&((n=this.layoutManager.createContentItem({type:"stack",header:e.config.header||{}},this))._$init(),n.addChild(e),e=n),this.contentItems.length){var i="x"==t.side[0]?"row":"column",o="x"==t.side[0]?"width":"height",r="2"==t.side[1],s=this.contentItems[0];if(s instanceof u.default&&s.type==i){var a=s.contentItems[r?0:s.contentItems.length-1];s.addChild(e,r?0:void 0,!0),a.config[o]*=.5,e.config[o]=a.config[o],s.callDownwards("setSize")}else{var l=this.layoutManager.createContentItem({type:i},this);this.replaceChild(s,l),l.addChild(e,r?0:void 0,!0),l.addChild(s,r?void 0:0,!0),s.config[o]=50,e.config[o]=50,l.callDownwards("setSize")}}else this.addChild(e)}}]),t}(c.default);t.default=h},function(t,i,o){function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(i,"__esModule",{value:!0});var s=r(o(3)),a=r(o(0)),l=r(o(1)),c=r(o(4)),u=r(o(5)),h=r(o(20)),d=r(o(25)),f=r(o(60)),p=o(2),m=function(t){function i(e,t,n){(0,a.default)(this,i);var o=(0,c.default)(this,(i.__proto__||(0,s.default)(i)).call(this,e,t,n));o.element=$('<div class="lm_item lm_stack"></div>'),o._activeContentItem=null;var r=e.config;return o._header={show:!0===r.settings.hasHeaders&&!1!==t.hasHeaders,popout:r.settings.showPopoutIcon&&r.labels.popout,maximise:r.settings.showMaximiseIcon&&r.labels.maximise,close:r.settings.showCloseIcon&&r.labels.close,minimise:r.labels.minimise},r.header&&(0,p.copy)(o._header,r.header),t.header&&(0,p.copy)(o._header,t.header),t.content&&t.content[0]&&t.content[0].header&&(0,p.copy)(o._header,t.content[0].header),o._dropZones={},o._dropSegment=null,o._contentAreaDimensions=null,o._dropIndex=null,o.isStack=!0,o.childElementContainer=$('<div class="lm_items"></div>'),o.header=new f.default(e,o),o.element.on("mouseleave mouseenter",(0,p.fnBind)(function(e){this._docker&&this._docker.docked&&this.childElementContainer[this._docker.dimension]("mouseenter"==e.type?this._docker.realSize:0)},o)),o.element.append(o.header.element),o.element.append(o.childElementContainer),o._setupHeaderPosition(),o._$validateClosability(),o}return(0,u.default)(i,t),(0,l.default)(i,[{key:"dock",value:function(e){this._header.dock&&this.parent instanceof d.default&&this.parent.dock(this,e)}},{key:"setSize",value:function(){if("none"!==this.element.css("display")){var e=this._docker&&this._docker.docked,t={width:this.element.width(),height:this.element.height()};this._header.show&&(t[this._sided?"width":"height"]-=this.layoutManager.config.dimensions.headerHeight),e&&(t[this._docker.dimension]=this._docker.realSize),e&&"height"!=this._docker.dimension||this.childElementContainer.width(t.width),e&&"width"!=this._docker.dimension||this.childElementContainer.height(t.height);for(var n=0;n<this.contentItems.length;n++)this.contentItems[n].element.width(t.width),this.contentItems[n].element.height(t.height);this.emit("resize"),this.emitBubblingEvent("stateChanged")}}},{key:"_$init",value:function(){var e,t;if(!0!==this.isInitialised){for(h.default.prototype._$init.call(this),e=0;e<this.contentItems.length;e++)this.header.createTab(this.contentItems[e]),this.contentItems[e]._$hide();if(0<this.contentItems.length){if(!(t=this.contentItems[this.config.activeItemIndex||0]))throw new Error("Configured activeItemIndex out of bounds");this.setActiveContentItem(t)}}}},{key:"setActiveContentItem",value:function(e){if(-1===(0,p.indexOf)(e,this.contentItems))throw new Error("contentItem is not a child of this stack");null!==this._activeContentItem&&this._activeContentItem._$hide(),this._activeContentItem=e,this.header.setActiveContentItem(e),e._$show(),this.emit("activeContentItemChanged",e),this.layoutManager.emit("activeContentItemChanged",e),this.emitBubblingEvent("stateChanged")}},{key:"getActiveContentItem",value:function(){return this.header.activeContentItem}},{key:"addChild",value:function(e,t){t>this.contentItems.length&&(t-=1),e=this.layoutManager._$normalizeContentItem(e,this),h.default.prototype.addChild.call(this,e,t),this.childElementContainer.append(e.element),this.header.createTab(e,t),this.setActiveContentItem(e),this.callDownwards("setSize"),this._$validateClosability(),this.parent instanceof d.default&&this.parent._validateDocking(),this.emitBubblingEvent("stateChanged")}},{key:"removeChild",value:function(e,t){var i=(0,p.indexOf)(e,this.contentItems);h.default.prototype.removeChild.call(this,e,t),this.header.removeTab(e),this.header.activeContentItem===e&&(0<this.contentItems.length?this.setActiveContentItem(this.contentItems[n(i-1,0)]):this._activeContentItem=null),this._$validateClosability(),this.parent instanceof d.default&&this.parent._validateDocking(),this.emitBubblingEvent("stateChanged")}},{key:"undisplayChild",value:function(e){if(1<this.contentItems.length){var t=(0,p.indexOf)(e,this.contentItems);e._$hide&&e._$hide(),this.setActiveContentItem(this.contentItems[0===t?t+1:t-1])}else h.default.prototype.undisplayChild.call(this,e),this.parent instanceof d.default&&this.parent._validateDocking();this.emitBubblingEvent("stateChanged")}},{key:"_$validateClosability",value:function(){var e,t,n;for(e=this.header._isClosable(),n=0,t=this.contentItems.length;n<t&&e;n++)e=this.contentItems[n].config.isClosable;this.header._$setClosable(e)}},{key:"_$destroy",value:function(){h.default.prototype._$destroy.call(this),this.header._$destroy(),this.element.off("mouseenter mouseleave")}},{key:"_$onDrop",value:function(e){if("header"===this._dropSegment)return this._resetHeaderDropZone(),void this.addChild(e,this._dropIndex);if("body"!==this._dropSegment){var t,n,i,o="top"===this._dropSegment||"bottom"===this._dropSegment,r="left"===this._dropSegment||"right"===this._dropSegment,s="top"===this._dropSegment||"left"===this._dropSegment,a=o&&this.parent.isColumn||r&&this.parent.isRow,l=o?"column":"row",c=o?"height":"width";e.isComponent&&((n=this.layoutManager.createContentItem({type:"stack",header:e.config.header||{}},this))._$init(),n.addChild(e),e=n),a?(t=(0,p.indexOf)(this,this.parent.contentItems),this.parent.addChild(e,s?t:t+1,!0),this.config[c]*=.5,e.config[c]=this.config[c],this.parent.callDownwards("setSize")):(l=o?"column":"row",i=this.layoutManager.createContentItem({type:l},this),this.parent.replaceChild(this,i),i.addChild(e,s?0:void 0,!0),i.addChild(this,s?void 0:0,!0),this.config[c]=50,e.config[c]=50,i.callDownwards("setSize")),this.parent._validateDocking()}else this.addChild(e)}},{key:"_$highlightDropZone",value:function(e,t){var n,i;for(n in this._contentAreaDimensions)if((i=this._contentAreaDimensions[n].hoverArea).x1<e&&i.x2>e&&i.y1<t&&i.y2>t)return void("header"===n?(this._dropSegment="header",this._highlightHeaderDropZone(this._sided?t:e)):(this._resetHeaderDropZone(),this._highlightBodyDropZone(n)))}},{key:"_$getArea",value:function(){if("none"===this.element.css("display"))return null;var e=h.default.prototype._$getArea,t=e.call(this,this.header.element),n=e.call(this,this.childElementContainer),i=n.x2-n.x1,o=n.y2-n.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},this._activeContentItem&&!1===this._activeContentItem.isComponent?t:0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:n.x1,y1:n.y1,x2:n.x2,y2:n.y2},highlightArea:{x1:n.x1,y1:n.y1,x2:n.x2,y2:n.y2}},e.call(this,this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:n.x1,y1:n.y1,x2:n.x1+.25*i,y2:n.y2},highlightArea:{x1:n.x1,y1:n.y1,x2:n.x1+.5*i,y2:n.y2}},this._contentAreaDimensions.top={hoverArea:{x1:n.x1+.25*i,y1:n.y1,x2:n.x1+.75*i,y2:n.y1+.5*o},highlightArea:{x1:n.x1,y1:n.y1,x2:n.x2,y2:n.y1+.5*o}},this._contentAreaDimensions.right={hoverArea:{x1:n.x1+.75*i,y1:n.y1,x2:n.x2,y2:n.y2},highlightArea:{x1:n.x1+.5*i,y1:n.y1,x2:n.x2,y2:n.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:n.x1+.25*i,y1:n.y1+.5*o,x2:n.x1+.75*i,y2:n.y2},highlightArea:{x1:n.x1,y1:n.y1+.5*o,x2:n.x2,y2:n.y2}},e.call(this,this.element))}},{key:"_highlightHeaderDropZone",value:function(t){var n,i,o,r,s,a,l,c,u=this.header.tabs.length,h=!1;if(0===u)return l=this.header.element.offset(),void this.layoutManager.dropTargetIndicator.highlightArea({x1:l.left,x2:l.left+100,y1:l.top+this.header.element.height()-20,y2:l.top+this.header.element.height()});for(n=0;n<u;n++)if(s=(i=this.header.tabs[n].element).offset(),this._sided?(r=s.top,o=s.left,c=i.height()):(r=s.left,o=s.top,c=i.width()),t>r&&t<r+c){h=!0;break}if(!(0==h&&t<r)){if(t<r+c/2?(this._dropIndex=n,i.before(this.layoutManager.tabDropPlaceholder)):(this._dropIndex=e(n+1,u),i.after(this.layoutManager.tabDropPlaceholder)),this._sided){var d=this.layoutManager.tabDropPlaceholder.offset().top;return void this.layoutManager.dropTargetIndicator.highlightArea({x1:o,x2:o+i.innerHeight(),y1:d,y2:d+this.layoutManager.tabDropPlaceholder.width()})}a=this.layoutManager.tabDropPlaceholder.offset().left,this.layoutManager.dropTargetIndicator.highlightArea({x1:a,x2:a+this.layoutManager.tabDropPlaceholder.width(),y1:o,y2:o+i.innerHeight()})}}},{key:"_resetHeaderDropZone",value:function(){this.layoutManager.tabDropPlaceholder.remove()}},{key:"toggleMaximise",value:function(e){this.isMaximised||this.dock(!1),h.default.prototype.toggleMaximise.call(this,e)}},{key:"_setupHeaderPosition",value:function(){var e=0<=["right","left","bottom"].indexOf(this._header.show)&&this._header.show;if(this.header.element.toggle(!!this._header.show),this._side=e,this._sided=0<=["right","left"].indexOf(this._side),this.element.removeClass("lm_left lm_right lm_bottom"),this._side&&this.element.addClass("lm_"+this._side),this.element.find(".lm_header").length&&this.childElementContainer){var t=0<=["right","bottom"].indexOf(this._side)?"before":"after";this.header.element[t](this.childElementContainer),this.callDownwards("setSize")}}},{key:"_highlightBodyDropZone",value:function(e){var t=this._contentAreaDimensions[e].highlightArea;this.layoutManager.dropTargetIndicator.highlightArea(t),this._dropSegment=e}}]),i}(h.default);i.default=m},function(e,t,n){var i=n(21),o=n(12),r=n(47),s=n(13),a=n(30),l=n(77),c=n(35),u=n(50),h=n(16)("iterator"),d=!([].keys&&"next"in[].keys()),f="keys",p="values",m=function(){return this};e.exports=function(e,t,n,g,y,v,_){l(n,t,g);var b,w,x,k=function(e){return!d&&e in $?$[e]:function(){return new n(this,e)}},I=t+" Iterator",C=y==p,S=!1,$=e.prototype,E=$[h]||$["@@iterator"]||y&&$[y],M=E||k(y),T=y?C?k("entries"):M:void 0,P="Array"==t&&$.entries||E;if(P&&((x=u(P.call(new e)))!==Object.prototype&&x.next&&(c(x,I,!0),!i&&"function"!=typeof x[h]&&s(x,h,m))),C&&E&&E.name!==p&&(S=!0,M=function(){return E.call(this)}),(!i||_)&&(d||S||!$[h])&&s($,h,M),a[t]=M,a[I]=m,y)if(b={values:C?M:k(p),keys:v?M:k(f),entries:T},_)for(w in b)w in $||r($,w,b[w]);else o(o.P+o.F*(d||S),t,b);return b}},function(e,t,n){var i=n(76);e.exports=function(e,t,n){return i(e),void 0===t?e:1===n?function(n){return e.call(t,n)}:2===n?function(n,i){return e.call(t,n,i)}:3===n?function(n,i,o){return e.call(t,n,i,o)}:function(){return e.apply(t,arguments)}}},function(e,t,n){e.exports=!n(10)&&!n(19)(function(){return 7!=Object.defineProperty(n(46)("div"),"a",{get:function(){return 7}}).a})},function(e,t,n){var i=n(14),o=n(8).document,r=i(o)&&i(o.createElement);e.exports=function(e){return r?o.createElement(e):{}}},function(e,t,n){e.exports=n(13)},function(e,t,n){var i=n(11),o=n(15),r=n(80)(!1),s=n(32)("IE_PROTO");e.exports=function(e,t){var n,a=o(e),l=0,c=[];for(n in a)n!=s&&i(a,n)&&c.push(n);for(;t.length>l;)i(a,n=t[l++])&&(~r(c,n)||c.push(n));return c}},function(e){var t={}.toString;e.exports=function(e){return t.call(e).slice(8,-1)}},function(e,t,n){var i=n(11),o=n(36),r=n(32)("IE_PROTO"),s=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=o(e),i(e,r)?e[r]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?s:null}},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){var i=n(48),o=n(34).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return i(e,o)}},function(e,t,n){var i=n(39),o=n(22),r=n(15),s=n(29),a=n(11),l=n(45),c=Object.getOwnPropertyDescriptor;t.f=n(10)?c:function(e,t){if(e=r(e),t=s(t,!0),l)try{return c(e,t)}catch(t){}return a(e,t)?o(!i.f.call(e,t),e[t]):void 0}},function(e,t,n){var i=n(12),o=n(6),r=n(19);e.exports=function(e,t){var n=(o.Object||{})[e]||Object[e],s={};s[e]=t(n),i(i.S+i.F*r(function(){n(1)}),"Object",s)}},function(e,t,n){e.exports={default:n(107),__esModule:!0}},function(e,t,n){function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=i(n(0)),r=i(n(1)),s=function(){function e(t,n){(0,o.default)(this,e),this._reactComponent=null,this._originalComponentWillUpdate=null,this._container=t,this._initialState=n,this._reactClass=this._getReactClass(),this._container.on("open",this._render,this),this._container.on("destroy",this._destroy,this)}return(0,r.default)(e,[{key:"_render",value:function(){this._reactComponent=ReactDOM.render(this._getReactComponent(),this._container.getElement()[0]),this._originalComponentWillUpdate=this._reactComponent.componentWillUpdate||function(){},this._reactComponent.componentWillUpdate=this._onUpdate.bind(this),this._container.getState()&&this._reactComponent.setState(this._container.getState())}},{key:"_destroy",value:function(){ReactDOM.unmountComponentAtNode(this._container.getElement()[0]),this._container.off("open",this._render,this),this._container.off("destroy",this._destroy,this)}},{key:"_onUpdate",value:function(e,t){this._container.setState(t),this._originalComponentWillUpdate.call(this._reactComponent,e,t)}},{key:"_getReactClass",value:function(){var e,t=this._container._config.component;if(!t)throw new Error("No react component name. type: react-component needs a field `component`");if(!(e=this._container.layoutManager.getComponent(t)))throw new Error('React component "'+t+'" not found. Please register all components with GoldenLayout using `registerComponent(name, component)`');return e}},{key:"_getReactComponent",value:function(){var e={glEventHub:this._container.layoutManager.eventHub,glContainer:this._container},t=$.extend(e,this._container._config.props);return React.createElement(this._reactClass,t)}}]),e}();t.default=s},function(e,t,n){function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=i(n(3)),r=i(n(0)),s=i(n(1)),a=i(n(4)),l=i(n(5)),c=n(7),u=i(c),h=n(2),d=function(e){function t(e){(0,r.default)(this,t);var n=(0,a.default)(this,(t.__proto__||(0,o.default)(t)).call(this));return n._layoutManager=e,n._dontPropagateToParent=null,n._childEventSource=null,n.on(c.ALL_EVENT,(0,h.fnBind)(n._onEventFromThis,n)),n._boundOnEventFromChild=(0,h.fnBind)(n._onEventFromChild,n),$(window).on("gl_child_event",n._boundOnEventFromChild),n}return(0,l.default)(t,e),(0,s.default)(t,[{key:"_onEventFromThis",value:function(){var e=Array.prototype.slice.call(arguments);this._layoutManager.isSubWindow&&e[0]!==this._dontPropagateToParent&&this._propagateToParent(e),this._propagateToChildren(e),this._dontPropagateToParent=null,this._childEventSource=null}},{key:"_$onEventFromParent",value:function(e){this._dontPropagateToParent=e[0],this.emit.apply(this,e)}},{key:"_onEventFromChild",value:function(e){this._childEventSource=e.originalEvent.__gl,this.emit.apply(this,e.originalEvent.__glArgs)}},{key:"_propagateToParent",value:function(e){var t,n="gl_child_event";document.createEvent?(t=window.opener.document.createEvent("HTMLEvents")).initEvent(n,!0,!0):(t=window.opener.document.createEventObject()).eventType=n,t.eventName=n,t.__glArgs=e,t.__gl=this._layoutManager,document.createEvent?window.opener.dispatchEvent(t):window.opener.fireEvent("on"+t.eventType,t)}},{key:"_propagateToChildren",value:function(e){var t,n;for(n=0;n<this._layoutManager.openPopouts.length;n++)(t=this._layoutManager.openPopouts[n].getGlInstance())&&t!==this._childEventSource&&t.eventHub._$onEventFromParent(e)}},{key:"destroy",value:function(){$(window).off("gl_child_event",this._boundOnEventFromChild)}}]),t}(u.default);t.default=d},function(e,t,n){function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=i(n(0)),r=i(n(1)),s=function(){function e(t,n){(0,o.default)(this,e),this.name=t,this.origin=n,this.isPropagationStopped=!1}return(0,r.default)(e,[{key:"stopPropagation",value:function(){this.isPropagationStopped=!0}}]),e}();t.default=s},function(e,t,n){function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=i(n(3)),r=i(n(0)),s=i(n(4)),a=i(n(5)),l=function(e){function t(e,n){(0,r.default)(this,t);var i=(0,s.default)(this,(t.__proto__||(0,o.default)(t)).call(this));return i.name="Configuration Error",i.message=e,i.node=n,i}return(0,a.default)(t,e),t}(Error);t.default=l,l.prototype=new Error},function(e,t,n){function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=i(n(3)),r=i(n(0)),s=i(n(1)),a=i(n(4)),l=i(n(5)),c=i(n(7)),u=i(n(61)),h=i(n(63)),d=n(2),f=function(e){function t(e,n){(0,r.default)(this,t);var i=(0,a.default)(this,(t.__proto__||(0,o.default)(t)).call(this));return i.layoutManager=e,i.element=$('<div class="lm_header"><ul class="lm_tabs"></ul><ul class="lm_controls"></ul><ul class="lm_tabdropdown_list"></ul></div>'),!0===i.layoutManager.config.settings.selectionEnabled&&(i.element.addClass("lm_selectable"),i.element.on("click touchstart",(0,d.fnBind)(i._onHeaderClick,i))),i.tabsContainer=i.element.find(".lm_tabs"),i.tabDropdownContainer=i.element.find(".lm_tabdropdown_list"),i.tabDropdownContainer.hide(),i.controlsContainer=i.element.find(".lm_controls"),i.parent=n,i.parent.on("resize",i._updateTabSizes,i),i.tabs=[],i.activeContentItem=null,i.closeButton=null,i.dockButton=null,i.tabDropdownButton=null,i.hideAdditionalTabsDropdown=(0,d.fnBind)(i._hideAdditionalTabsDropdown,i),$(document).mouseup(i.hideAdditionalTabsDropdown),i._lastVisibleTabIndex=-1,i._tabControlOffset=i.layoutManager.config.settings.tabControlOffset,i._createControls(),i}return(0,l.default)(t,e),(0,s.default)(t,[{key:"createTab",value:function(e,t){var n,i;for(i=0;i<this.tabs.length;i++)if(this.tabs[i].contentItem===e)return;return n=new u.default(this,e),0===this.tabs.length?(this.tabs.push(n),void this.tabsContainer.append(n.element)):(void 0===t&&(t=this.tabs.length),0<t?this.tabs[t-1].element.after(n.element):this.tabs[0].element.before(n.element),this.tabs.splice(t,0,n),void this._updateTabSizes())}},{key:"removeTab",value:function(e){for(var t=0;t<this.tabs.length;t++)if(this.tabs[t].contentItem===e)return this.tabs[t]._$destroy(),void this.tabs.splice(t,1);throw new Error("contentItem is not controlled by this header")}},{key:"setActiveContentItem",value:function(e){var t,n,i,o;for(t=0;t<this.tabs.length;t++)i=this.tabs[t].contentItem===e,this.tabs[t].setActive(i),!0===i&&(this.activeContentItem=e,this.parent.config.activeItemIndex=t);if(this.layoutManager.config.settings.reorderOnTabMenuClick&&-1!==this._lastVisibleTabIndex&&this.parent.config.activeItemIndex>this._lastVisibleTabIndex){for(o=this.tabs[this.parent.config.activeItemIndex],n=this.parent.config.activeItemIndex;0<n;n--)this.tabs[n]=this.tabs[n-1];this.tabs[0]=o,this.parent.config.activeItemIndex=0}this._updateTabSizes(),this.parent.emitBubblingEvent("stateChanged")}},{key:"position",value:function(e){var t=this.parent._header.show;if(this.parent._docker&&this.parent._docker.docked)throw new Error("Can't change header position in docked stack");return t&&!this.parent._side&&(t="top"),void 0!==e&&this.parent._header.show!=e&&(this.parent._header.show=e,this.parent._setupHeaderPosition()),t}},{key:"_$setClosable",value:function(e){return this._canDestroy=e||1<this.tabs.length,this.closeButton&&this._isClosable()&&(this.closeButton.element[e?"show":"hide"](),!0)}},{key:"_setDockable",value:function(e){return this.dockButton&&this.parent._header&&this.parent._header.dock&&(this.dockButton.element.toggle(!!e),!0)}},{key:"_$destroy",value:function(){this.emit("destroy",this);for(var e=0;e<this.tabs.length;e++)this.tabs[e]._$destroy();$(document).off("mouseup",this.hideAdditionalTabsDropdown),this.element.remove()}},{key:"_getHeaderSetting",value:function(e){if(e in this.parent._header)return this.parent._header[e]}},{key:"_createControls",value:function(){var e,t,n,i,o,r,s,a,l;if(l=(0,d.fnBind)(this._showAdditionalTabsDropdown,this),a=this.layoutManager.config.labels.tabDropdown,this.tabDropdownButton=new h.default(this,a,"lm_tabdropdown",l),this.tabDropdownButton.element.hide(),this.parent._header&&this.parent._header.dock){var c=(0,d.fnBind)(this.parent.dock,this.parent);n=this._getHeaderSetting("dock"),this.dockButton=new h.default(this,n,"lm_dock",c)}this._getHeaderSetting("popout")&&(t=(0,d.fnBind)(this._onPopoutClick,this),n=this._getHeaderSetting("popout"),new h.default(this,n,"lm_popout",t)),this._getHeaderSetting("maximise")&&(r=(0,d.fnBind)(this.parent.toggleMaximise,this.parent),i=this._getHeaderSetting("maximise"),o=this._getHeaderSetting("minimise"),s=new h.default(this,i,"lm_maximise",r),this.parent.on("maximised",function(){s.element.attr("title",o)}),this.parent.on("minimised",function(){s.element.attr("title",i)})),this._isClosable()&&(e=(0,d.fnBind)(this.parent.remove,this.parent),n=this._getHeaderSetting("close"),this.closeButton=new h.default(this,n,"lm_close",e))}},{key:"_showAdditionalTabsDropdown",value:function(){this.tabDropdownContainer.show()}},{key:"_hideAdditionalTabsDropdown",value:function(){this.tabDropdownContainer.hide()}},{key:"_isClosable",value:function(){return this.parent.config.isClosable&&this.layoutManager.config.settings.showCloseIcon}},{key:"_onPopoutClick",value:function(){!0===this.layoutManager.config.settings.popoutWholeStack?this.parent.popout():this.activeContentItem.popout()}},{key:"_onHeaderClick",value:function(e){e.target===this.element[0]&&this.parent.select()}},{key:"_updateTabSizes",value:function(e){if(0!==this.tabs.length){this.tabDropdownButton.element.toggle(!0===e);var t=function(e){return e?"width":"height"};this.element.css(t(!this.parent._sided),""),this.element[t(this.parent._sided)](this.layoutManager.config.dimensions.headerHeight);var n,i,o,r,s=this.element.outerWidth()-this.controlsContainer.outerWidth()-this._tabControlOffset,a=0,l=0,c=0,u=this.layoutManager.config.settings.tabOverlapAllowance,h=!1,d=this.activeContentItem?this.tabs.indexOf(this.activeContentItem.tab):0,f=this.tabs[d];for(this.parent._sided&&(s=this.element.outerHeight()-this.controlsContainer.outerHeight()-this._tabControlOffset),this._lastVisibleTabIndex=-1,i=0;i<this.tabs.length;i++)if(n=this.tabs[i].element,this.tabsContainer.append(n),a+=n.outerWidth()+parseInt(n.css("margin-right"),10),(l=d<=i?a:a+f.element.outerWidth()+parseInt(f.element.css("margin-right"),10))>s){if(h)i===d&&(n.css({"z-index":"auto","margin-left":""}),this.tabsContainer.append(n));else if((c=0<d&&d<=i?(l-s)/(i-1):(l-s)/i)<u){for(o=0;o<=i;o++)r=o!==d&&0!==o?"-"+c+"px":"",this.tabs[o].element.css({"z-index":i-o,"margin-left":r});this._lastVisibleTabIndex=i,this.tabsContainer.append(n)}else h=!0;if(h&&i!==d){if(!e)return void this._updateTabSizes(!0);n.css({"z-index":"auto","margin-left":""}),this.tabDropdownContainer.append(n)}}else this._lastVisibleTabIndex=i,n.css({"z-index":"auto","margin-left":""}),this.tabsContainer.append(n)}}}]),t}(c.default);t.default=f},function(e,t,n){function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=i(n(0)),r=i(n(1)),s=i(n(26)),a=i(n(62)),l=n(2),c=function(){function e(t,n){(0,o.default)(this,e),this.header=t,this.contentItem=n,this.element=$('<li class="lm_tab"><i class="lm_left"></i><span class="lm_title"></span><div class="lm_close_tab"></div><i class="lm_right"></i></li>'),this.titleElement=this.element.find(".lm_title"),this.closeElement=this.element.find(".lm_close_tab"),this.closeElement[n.config.isClosable?"show":"hide"](),this.isActive=!1,this.setTitle(n.config.title),this.contentItem.on("titleChanged",this.setTitle,this),this._layoutManager=this.contentItem.layoutManager,!0===this._layoutManager.config.settings.reorderEnabled&&!0===n.config.reorderEnabled&&(this._dragListener=new s.default(this.element),this._dragListener.on("dragStart",this._onDragStart,this),this.contentItem.on("destroy",this._dragListener.destroy,this._dragListener)),this._onTabClickFn=(0,l.fnBind)(this._onTabClick,this),this._onCloseClickFn=(0,l.fnBind)(this._onCloseClick,this),this.element.on("mousedown touchstart",this._onTabClickFn),this.contentItem.config.isClosable?(this.closeElement.on("click touchstart",this._onCloseClickFn),this.closeElement.on("mousedown",this._onCloseMousedown)):this.closeElement.remove(),this.contentItem.tab=this,this.contentItem.emit("tab",this),this.contentItem.layoutManager.emit("tabCreated",this),this.contentItem.isComponent&&(this.contentItem.container.tab=this,this.contentItem.container.emit("tab",this))}return(0,r.default)(e,[{key:"setTitle",value:function(e){this.element.attr("title",(0,l.stripTags)(e)),this.titleElement.html(e)}},{key:"setActive",value:function(e){e===this.isActive||(this.isActive=e,e?this.element.addClass("lm_active"):this.element.removeClass("lm_active"))}},{key:"_$destroy",value:function(){this.element.off("mousedown touchstart",this._onTabClickFn),this.closeElement.off("click touchstart",this._onCloseClickFn),this._dragListener&&(this.contentItem.off("destroy",this._dragListener.destroy,this._dragListener),this._dragListener.off("dragStart",this._onDragStart),this._dragListener=null),this.element.remove()}},{key:"_onDragStart",value:function(e,t){return this.header._canDestroy?(!0===this.contentItem.parent.isMaximised&&this.contentItem.parent.toggleMaximise(),void new a.default(e,t,this._dragListener,this._layoutManager,this.contentItem,this.header.parent)):null}},{key:"_onTabClick",value:function(e){if(0===e.button||"touchstart"===e.type){var t=this.header.parent.getActiveContentItem();this.contentItem!==t&&this.header.parent.setActiveContentItem(this.contentItem)}else 1===e.button&&this.contentItem.config.isClosable&&this._onCloseClick(e)}},{key:"_onCloseClick",value:function(e){e.stopPropagation(),this.header._canDestroy&&this.header.parent.removeChild(this.contentItem)}},{key:"_onCloseMousedown",value:function(e){e.stopPropagation()}}]),e}();t.default=c},function(e,t,n){function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=i(n(3)),r=i(n(0)),s=i(n(1)),a=i(n(4)),l=i(n(5)),c=i(n(7)),u=n(2),h=function(e){function t(e,n,i,s,l,c){(0,r.default)(this,t);var h=(0,a.default)(this,(t.__proto__||(0,o.default)(t)).call(this));h._dragListener=i,h._layoutManager=s,h._contentItem=l,h._originalParent=c,h._area=null,h._lastValidArea=null,h._dragListener.on("drag",h._onDrag,h),h._dragListener.on("dragStop",h._onDrop,h),h.element=$('<div class="lm_dragProxy"><div class="lm_header"><ul class="lm_tabs"><li class="lm_tab lm_active"><i class="lm_left"></i><span class="lm_title"></span><i class="lm_right"></i></li></ul></div><div class="lm_content"></div></div>'),c&&c._side&&(h._sided=c._sided,h.element.addClass("lm_"+c._side),0<=["right","bottom"].indexOf(c._side)&&h.element.find(".lm_content").after(h.element.find(".lm_header"))),h.element.css({left:e,top:n}),h.element.find(".lm_tab").attr("title",(0,u.stripTags)(h._contentItem.config.title)),h.element.find(".lm_title").html(h._contentItem.config.title),h.childElementContainer=h.element.find(".lm_content"),h.childElementContainer.append(l.element),h._undisplayTree(),h._layoutManager._$calculateItemAreas(),h._setDimensions(),$(document.body).append(h.element);var d=h._layoutManager.container.offset();return h._minX=d.left,h._minY=d.top,h._maxX=h._layoutManager.container.width()+h._minX,h._maxY=h._layoutManager.container.height()+h._minY,h._width=h.element.width(),h._height=h.element.height(),h._setDropPosition(e,n),h}return(0,l.default)(t,e),(0,s.default)(t,[{key:"_onDrag",value:function(e,t,n){var i=(n=(0,u.getTouchEvent)(n)).pageX,o=n.pageY;(i>this._minX&&i<this._maxX&&o>this._minY&&o<this._maxY||!0!==this._layoutManager.config.settings.constrainDragToContainer)&&this._setDropPosition(i,o)}},{key:"_setDropPosition",value:function(e,t){this.element.css({left:e,top:t}),this._area=this._layoutManager._$getArea(e,t),null!==this._area&&(this._lastValidArea=this._area,this._area.contentItem._$highlightDropZone(e,t,this._area))}},{key:"_onDrop",value:function(){this._updateTree(),this._layoutManager.dropTargetIndicator.hide(),null===this._area?null===this._lastValidArea?this._originalParent?this._originalParent.addChild(this._contentItem):this._contentItem._$destroy():this._lastValidArea.contentItem._$onDrop(this._contentItem,this._lastValidArea):this._area.contentItem._$onDrop(this._contentItem,this._area),this.element.remove(),this._layoutManager.emit("itemDropped",this._contentItem)}},{key:"_undisplayTree",value:function(){this._contentItem.parent&&this._contentItem.parent.undisplayChild(this._contentItem)}},{key:"_updateTree",value:function(){this._contentItem.parent&&this._contentItem.parent.removeChild(this._contentItem,!0),this._contentItem._$setParent(this)}},{key:"_setDimensions",value:function(){var e=this._layoutManager.config.dimensions,t=e.dragProxyWidth,n=e.dragProxyHeight;this.element.width(t),this.element.height(n),t-=this._sided?e.headerHeight:0,n-=this._sided?0:e.headerHeight,this.childElementContainer.width(t),this.childElementContainer.height(n),this._contentItem.element.width(t),this._contentItem.element.height(n),this._contentItem.callDownwards("_$show"),this._contentItem.callDownwards("setSize")}}]),t}(c.default);t.default=h},function(e,t,n){function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=i(n(0)),r=i(n(1)),s=function(){function e(t,n,i,r){(0,o.default)(this,e),this._header=t,this.element=$('<li class="'+i+'" title="'+n+'"></li>'),this._header.on("destroy",this._$destroy,this),this._action=r,this.element.on("click touchstart",this._action),this._header.controlsContainer.append(this.element)}return(0,r.default)(e,[{key:"_$destroy",value:function(){this.element.off(),this.element.remove()}}]),e}();t.default=s},function(e,t,n){function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=i(n(3)),r=i(n(0)),s=i(n(1)),a=i(n(4)),l=i(n(5)),c=i(n(20)),u=i(n(65)),h=function(e){function t(e,n,i){(0,r.default)(this,t);var s=(0,a.default)(this,(t.__proto__||(0,o.default)(t)).call(this,e,n,i)),l=e.getComponent(s.config.componentName),c=$.extend(!0,{},s.config.componentState||{});return c.componentName=s.config.componentName,s.componentName=s.config.componentName,""===s.config.title&&(s.config.title=s.config.componentName),s.isComponent=!0,s.container=new u.default(s.config,s,e),s.instance=new l(s.container,c),s.element=s.container._element,s}return(0,l.default)(t,e),(0,s.default)(t,[{key:"close",value:function(){this.parent.removeChild(this)}},{key:"setSize",value:function(){"none"!==this.element.css("display")&&this.container._$setSize(this.element.width(),this.element.height())}},{key:"_$init",value:function(){c.default.prototype._$init.call(this),this.container.emit("open")}},{key:"_$hide",value:function(){this.container.hide(),c.default.prototype._$hide.call(this)}},{key:"_$show",value:function(){this.container.show(),c.default.prototype._$show.call(this)}},{key:"_$shown",value:function(){this.container.shown(),c.default.prototype._$shown.call(this)}},{key:"_$destroy",value:function(){this.container.emit("destroy",this),c.default.prototype._$destroy.call(this)}},{key:"_$getArea",value:function(){return null}}]),t}(c.default);t.default=h},function(e,t,n){function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=i(n(3)),r=i(n(0)),s=i(n(1)),a=i(n(4)),l=i(n(5)),c=function(e){function t(e,n,i){(0,r.default)(this,t);var s=(0,a.default)(this,(t.__proto__||(0,o.default)(t)).call(this));return s.width=null,s.height=null,s.title=e.componentName,s.parent=n,s.layoutManager=i,s.isHidden=!1,s._config=e,s._element=$('<div class="lm_item_container"><div class="lm_content"></div></div>'),s._contentElement=s._element.find(".lm_content"),s}return(0,l.default)(t,e),(0,s.default)(t,[{key:"getElement",value:function(){return this._contentElement}},{key:"hide",value:function(){this.emit("hide"),this.isHidden=!0,this._element.hide()}},{key:"show",value:function(){this.emit("show"),this.isHidden=!1,this._element.show(),(0!=this.height||0!=this.width)&&this.emit("shown")}},{key:"setSize",value:function(e,t){for(var n,i,o,r,s=this.parent,a=this;!s.isColumn&&!s.isRow;)if(a=s,(s=s.parent).isRoot)return!1;for(n=("height"===(i=s.isColumn?"height":"width")?t:e)/(this[i]*(1/(a.config[i]/100)))*100,o=(a.config[i]-n)/(s.contentItems.length-1),r=0;r<s.contentItems.length;r++)s.contentItems[r]===a?s.contentItems[r].config[i]=n:s.contentItems[r].config[i]+=o;return s.callDownwards("setSize"),!0}},{key:"close",value:function(){this._config.isClosable&&(this.emit("close"),this.parent.close())}},{key:"getState",value:function(){return this._config.componentState}},{key:"extendState",value:function(e){this.setState($.extend(!0,this.getState(),e))}},{key:"setState",value:function(e){this._config.componentState=e,this.parent.emitBubblingEvent("stateChanged")}},{key:"setTitle",value:function(e){this.parent.setTitle(e)}},{key:"_$setSize",value:function(e,t){(e!==this.width||t!==this.height)&&(this.width=e,this.height=t,$.zepto?this._contentElement.width(e):this._contentElement.outerWidth(e),$.zepto?this._contentElement.height(t):this._contentElement.outerHeight(t),this.emit("resize"))}}]),t}(i(n(7)).default);t.default=c},function(e,n,i){function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var r=o(i(114)),s=o(i(3)),a=o(i(0)),l=o(i(1)),c=o(i(4)),u=o(i(5)),h=o(i(7)),d=o(i(40)),f=i(2),p=function(e){function n(e,t,i,o,r){(0,a.default)(this,n);var l=(0,c.default)(this,(n.__proto__||(0,s.default)(n)).call(this));return l.isInitialised=!1,l._config=e,l._dimensions=t,l._parentId=i,l._indexInParent=o,l._layoutManager=r,l._popoutWindow=null,l._id=null,l._createWindow(),l}return(0,u.default)(n,e),(0,l.default)(n,[{key:"toConfig",value:function(){if(!1===this.isInitialised)throw new Error("Can't create config, layout not yet initialised");return{dimensions:{width:this.getGlInstance().width,height:this.getGlInstance().height,left:this._popoutWindow.screenX||this._popoutWindow.screenLeft,top:this._popoutWindow.screenY||this._popoutWindow.screenTop},content:this.getGlInstance().toConfig().content,parentId:this._parentId,indexInParent:this._indexInParent}}},{key:"getGlInstance",value:function(){return this._popoutWindow.__glInstance}},{key:"getWindow",value:function(){return this._popoutWindow}},{key:"close",value:function(){if(this.getGlInstance())this.getGlInstance()._$closeWindow();else try{this.getWindow().close()}catch(e){}}},{key:"popIn",value:function(){var e,t;this._indexInParent;this._parentId&&(e=$.extend(!0,{},this.getGlInstance().toConfig()).content[0],!(t=this._layoutManager.root.getItemsById(this._parentId)[0])&&(t=0<this._layoutManager.root.contentItems.length?this._layoutManager.root.contentItems[0]:this._layoutManager.root)),t.addChild(e,this._indexInParent),this.close()}},{key:"_createWindow",value:function(){var e,n=this._createUrl(),i=t(1e6*Math.random()).toString(36),o=this._serializeWindowOptions({width:this._dimensions.width,height:this._dimensions.height,innerWidth:this._dimensions.width,innerHeight:this._dimensions.height,menubar:"no",toolbar:"no",location:"no",personalbar:"no",resizable:"yes",scrollbars:"no",status:"no"});if(this._popoutWindow=window.open(n,i,o),this._popoutWindow)$(this._popoutWindow).on("load",(0,f.fnBind)(this._positionWindow,this)).on("unload beforeunload",(0,f.fnBind)(this._onClose,this)),e=setInterval((0,f.fnBind)(function(){this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this._onInitialised(),clearInterval(e))},this),10);else if(!0===this._layoutManager.config.settings.blockedPopoutsThrowError){var r=new Error("Popout blocked");throw r.type="popoutBlocked",r}}},{key:"_serializeWindowOptions",value:function(e){var t,n=[];for(t in e)n.push(t+"="+e[t]);return n.join(",")}},{key:"_createUrl",value:function(){var e,t={content:this._config},n="gl-window-config-"+(0,f.getUniqueId)();t=(new d.default).minifyConfig(t);try{localStorage.setItem(n,(0,r.default)(t))}catch(n){throw new Error("Error while writing to localStorage "+n.toString())}return 1===(e=document.location.href.split("?")).length?e[0]+"?gl-window="+n:document.location.href+"&gl-window="+n}},{key:"_positionWindow",value:function(){this._popoutWindow.moveTo(this._dimensions.left,this._dimensions.top),this._popoutWindow.focus()}},{key:"_onInitialised",value:function(){this.isInitialised=!0,this.getGlInstance().on("popIn",this.popIn,this),this.emit("initialised")}},{key:"_onClose",value:function(){setTimeout((0,f.fnBind)(this.emit,this,["closed"]),50)}}]),n}(h.default);n.default=p},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(68),o=(n.n(i),n(69)),r=(n.n(o),n(70)),s=(n.n(r),n(71)),a=n.n(s);n.d(t,"default",function(){return a.a});var l=n(65),c=n.n(l);n.d(t,"ItemContainer",function(){return c.a});var u=n(66),h=n.n(u);n.d(t,"BrowserPopout",function(){return h.a});var d=n(60),f=n.n(d);n.d(t,"Header",function(){return f.a});var p=n(63),m=n.n(p);n.d(t,"HeaderButton",function(){return m.a});var g=n(61),y=n.n(g);n.d(t,"Tab",function(){return y.a});var v=n(64),_=n.n(v);n.d(t,"Component",function(){return _.a});var b=n(41),w=n.n(b);n.d(t,"Root",function(){return w.a});var x=n(25),k=n.n(x);n.d(t,"RowOrColumn",function(){return k.a});var I=n(42),C=n.n(I);n.d(t,"Stack",function(){return C.a});var S=n(58),$=n.n(S);n.d(t,"BubblingEvent",function(){return $.a});var E=n(40),M=n.n(E);n.d(t,"ConfigMinifier",function(){return M.a});var T=n(26),P=n.n(T);n.d(t,"DragListener",function(){return P.a});var D=n(7),j=n.n(D);n.d(t,"EventEmitter",function(){return j.a});var A=n(57),O=n.n(A);n.d(t,"EventHub",function(){return O.a});var z=n(56),N=n.n(z);n.d(t,"ReactComponentHandler",function(){return N.a}),n(120),n(123)},function(){},function(){},function(){},function(e,i,o){function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(i,"__esModule",{value:!0});var s=r(o(17)),a=r(o(3)),l=r(o(0)),c=r(o(1)),u=r(o(4)),h=r(o(5)),d=r(o(7)),f=r(o(56)),p=r(o(40)),m=r(o(57)),g=r(o(41)),y=r(o(25)),v=r(o(42)),_=r(o(64)),b=r(o(20)),w=r(o(66)),x=r(o(116)),k=r(o(117)),I=r(o(118)),C=r(o(59)),S=r(o(119)),E=o(2),M=function(e){function i(e,t){if((0,l.default)(this,i),!$){var n="jQuery is missing as dependency for GoldenLayout. ";throw n+='Please either expose $ on GoldenLayout\'s scope (e.g. window) or add "jquery" to ',n+="your paths when using RequireJS/AMD",new Error(n)}var o=(0,u.default)(this,(i.__proto__||(0,a.default)(i)).call(this));return o.isInitialised=!1,o._isFullPage=!1,o._resizeTimeoutId=null,o._components={"lm-react-component":f.default},o._itemAreas=[],o._resizeFunction=(0,E.fnBind)(o._onResize,o),o._unloadFunction=(0,E.fnBind)(o._onUnload,o),o._maximisedItem=null,o._maximisePlaceholder=$('<div class="lm_maximise_place"></div>'),o._creationTimeoutPassed=!1,o._subWindowsCreated=!1,o._dragSources=[],o._updatingColumnsResponsive=!1,o._firstLoad=!0,o.width=null,o.height=null,o.root=null,o.openPopouts=[],o.selectedItem=null,o.isSubWindow=!1,o.eventHub=new m.default(o),o.config=o._createConfig(e),o.container=t,o.dropTargetIndicator=null,o.transitionIndicator=null,o.tabDropPlaceholder=$('<div class="lm_drop_tab_placeholder"></div>'),!0===o.isSubWindow&&$("body").css("visibility","hidden"),o._typeToItem={column:(0,E.fnBind)(y.default,o,[!0]),row:(0,E.fnBind)(y.default,o,[!1]),stack:v.default,component:_.default},o}return(0,h.default)(i,e),(0,c.default)(i,[{key:"minifyConfig",value:function(e){return(new p.default).minifyConfig(e)}},{key:"unminifyConfig",value:function(e){return(new p.default).unminifyConfig(e)}},{key:"registerComponent",value:function(e,t){if("function"!=typeof t)throw new Error("Please register a constructor function");if(void 0!==this._components[e])throw new Error("Component "+e+" is already registered");this._components[e]=t}},{key:"toConfig",value:function(e){var t,n,i;if(!1===this.isInitialised)throw new Error("Can't create config, layout not yet initialised");if(e&&!(e instanceof b.default))throw new Error("Root must be a ContentItem");for((t={settings:(0,E.copy)({},this.config.settings),dimensions:(0,E.copy)({},this.config.dimensions),labels:(0,E.copy)({},this.config.labels)}).content=[],(n=function(e,t){var i,o;for(i in t.config)"content"!==i&&(e[i]=t.config[i]);if(t.contentItems.length)for(e.content=[],o=0;o<t.contentItems.length;o++)e.content[o]={},n(e.content[o],t.contentItems[o])})(t,e?{contentItems:[e]}:this.root),this._$reconcilePopoutWindows(),t.openPopouts=[],i=0;i<this.openPopouts.length;i++)t.openPopouts.push(this.openPopouts[i].toConfig());return t.maximisedItemId=this._maximisedItem?"__glMaximised":null,t}},{key:"getComponent",value:function(e){if(void 0===this._components[e])throw new C.default('Unknown component "'+e+'"');return this._components[e]}},{key:"init",value:function(){return!1===this._subWindowsCreated&&(this._createSubWindows(),this._subWindowsCreated=!0),"loading"===document.readyState||null===document.body?void $(document).ready((0,E.fnBind)(this.init,this)):!0===this.isSubWindow&&!1===this._creationTimeoutPassed?(setTimeout((0,E.fnBind)(this.init,this),7),void(this._creationTimeoutPassed=!0)):(!0===this.isSubWindow&&this._adjustToWindowMode(),this._setContainer(),this.dropTargetIndicator=new k.default(this.container),this.transitionIndicator=new I.default,this.updateSize(),this._create(this.config),this._bindEvents(),this.isInitialised=!0,this._adjustColumnsResponsive(),void this.emit("initialised"))}},{key:"updateSize",value:function(e,t){2===arguments.length?(this.width=e,this.height=t):(this.width=this.container.width(),this.height=this.container.height()),!0===this.isInitialised&&(this.root.callDownwards("setSize",[this.width,this.height]),this._maximisedItem&&(this._maximisedItem.element.width(this.container.width()),this._maximisedItem.element.height(this.container.height()),this._maximisedItem.callDownwards("setSize")),this._adjustColumnsResponsive())}},{key:"destroy",value:function(){!1===this.isInitialised||(this._onUnload(),$(window).off("resize",this._resizeFunction),$(window).off("unload beforeunload",this._unloadFunction),this.root.callDownwards("_$destroy",[],!0),this.root.contentItems=[],this.tabDropPlaceholder.remove(),this.dropTargetIndicator.destroy(),this.transitionIndicator.destroy(),this.eventHub.destroy(),this._dragSources.forEach(function(e){e._dragListener.destroy(),e._element=null,e._itemConfig=null,e._dragListener=null}),this._dragSources=[])}},{key:"createContentItem",value:function(e,t){var n;if("string"!=typeof e.type)throw new C.default("Missing parameter 'type'",e);if("react-component"===e.type&&(e.type="component",e.componentName="lm-react-component"),!this._typeToItem[e.type])throw n="Unknown type '"+e.type+"'. Valid types are "+(0,E.objectKeys)(this._typeToItem).join(","),new C.default(n);return"component"!==e.type||t instanceof v.default||!t||!0===this.isSubWindow&&t instanceof g.default||(e={type:"stack",width:e.width,height:e.height,content:[e]}),new this._typeToItem[e.type](this,e,t)}},{key:"createPopout",value:function(e,t,n,i){var o,r,s,a,l,c,u=e,h=e instanceof b.default,d=this;if(n=n||null,h){for(u=this.toConfig(e).content,n=(0,E.getUniqueId)(),a=e.parent,l=e;1===a.contentItems.length&&!a.isRoot;)a=a.parent,l=l.parent;a.addId(n),isNaN(i)&&(i=(0,E.indexOf)(l,a.contentItems))}else u instanceof Array||(u=[u]);return!t&&h&&(o=window.screenX||window.screenLeft,r=window.screenY||window.screenTop,t={left:o+(s=e.element.offset()).left,top:r+s.top,width:e.element.width(),height:e.element.height()}),t||h||(t={left:window.screenX||window.screenLeft+20,top:window.screenY||window.screenTop+20,width:500,height:309}),h&&e.remove(),(c=new w.default(u,t,n,i,this)).on("initialised",function(){d.emit("windowOpened",c)}),c.on("closed",function(){d._$reconcilePopoutWindows()}),this.openPopouts.push(c),c}},{key:"createDragSource",value:function(e,t){this.config.settings.constrainDragToContainer=!1;var n=new x.default($(e),t,this);return this._dragSources.push(n),n}},{key:"selectItem",value:function(e,t){if(!0!==this.config.settings.selectionEnabled)throw new Error("Please set selectionEnabled to true to use this feature");e===this.selectedItem||(null!==this.selectedItem&&this.selectedItem.deselect(),e&&!0!==t&&e.select(),this.selectedItem=e,this.emit("selectionChanged",e))}},{key:"_$maximiseItem",value:function(e){null!==this._maximisedItem&&this._$minimiseItem(this._maximisedItem),this._maximisedItem=e,this._maximisedItem.addId("__glMaximised"),e.element.addClass("lm_maximised"),e.element.after(this._maximisePlaceholder),this.root.element.prepend(e.element),e.element.width(this.container.width()),e.element.height(this.container.height()),e.callDownwards("setSize"),this._maximisedItem.emit("maximised"),this.emit("stateChanged")}},{key:"_$minimiseItem",value:function(e){e.element.removeClass("lm_maximised"),e.removeId("__glMaximised"),this._maximisePlaceholder.after(e.element),this._maximisePlaceholder.remove(),e.parent.callDownwards("setSize"),this._maximisedItem=null,e.emit("minimised"),this.emit("stateChanged")}},{key:"_$closeWindow",value:function(){window.setTimeout(function(){window.close()},1)}},{key:"_$getArea",value:function(e,t){var n,i,o=1/0,r=null;for(n=0;n<this._itemAreas.length;n++)e>(i=this._itemAreas[n]).x1&&e<i.x2&&t>i.y1&&t<i.y2&&o>i.surface&&(o=i.surface,r=i);return r}},{key:"_$createRootItemAreas",value:function(){var e={y2:0,x2:0,y1:"y2",x1:"x2"};for(var t in e){var n=this.root._$getArea();n.side=t,n[t]=e[t]?n[e[t]]-50:50,n.surface=(n.x2-n.x1)*(n.y2-n.y1),this._itemAreas.push(n)}}},{key:"_$calculateItemAreas",value:function(){var e,t,n=this._getAllContentItems();if(this._itemAreas=[],1!==n.length){for(this._$createRootItemAreas(),e=0;e<n.length;e++)if(n[e].isStack){if(null===(t=n[e]._$getArea()))continue;if(t instanceof Array)this._itemAreas=this._itemAreas.concat(t);else{this._itemAreas.push(t);var i={};(0,E.copy)(i,t),(0,E.copy)(i,t.contentItem._contentAreaDimensions.header.highlightArea),i.surface=(i.x2-i.x1)*(i.y2-i.y1),this._itemAreas.push(i)}}}else this._itemAreas.push(this.root._$getArea())}},{key:"_$normalizeContentItem",value:function(e,t){if(!e)throw new Error("No content item defined");if((0,E.isFunction)(e)&&(e=e()),e instanceof b.default)return e;if($.isPlainObject(e)&&e.type){var n=this.createContentItem(e,t);return n.callDownwards("_$init"),n}throw new Error("Invalid contentItem")}},{key:"_$reconcilePopoutWindows",value:function(){var e,t=[];for(e=0;e<this.openPopouts.length;e++)!1===this.openPopouts[e].getWindow().closed?t.push(this.openPopouts[e]):this.emit("windowClosed",this.openPopouts[e]);this.openPopouts.length!==t.length&&(this.emit("stateChanged"),this.openPopouts=t)}},{key:"_getAllContentItems",value:function(){var e=[];return function t(n){if(e.push(n),n.contentItems instanceof Array)for(var i=0;i<n.contentItems.length;i++)t(n.contentItems[i])}(this.root),e}},{key:"_bindEvents",value:function(){this._isFullPage&&$(window).resize(this._resizeFunction),$(window).on("unload beforeunload",this._unloadFunction)}},{key:"_onResize",value:function(){clearTimeout(this._resizeTimeoutId),this._resizeTimeoutId=setTimeout((0,E.fnBind)(this.updateSize,this),100)}},{key:"_createConfig",value:function(e){var t=(0,E.getQueryStringParam)("gl-window");return t&&(this.isSubWindow=!0,e=localStorage.getItem(t),e=JSON.parse(e),e=(new p.default).unminifyConfig(e),localStorage.removeItem(t)),function e(t){for(var n in t)"props"!=n&&"object"===(0,s.default)(t[n])?e(t[n]):"type"==n&&"react-component"===t[n]&&(t.type="component",t.componentName="lm-react-component")}(e=$.extend(!0,{},S.default,e)),!1===e.settings.hasHeaders&&(e.dimensions.headerHeight=0),e}},{key:"_adjustToWindowMode",value:function(){var e=$('<div class="lm_popin" title="'+this.config.labels.popin+'"><div class="lm_icon"></div><div class="lm_bg"></div></div>');e.click((0,E.fnBind)(function(){this.emit("popIn")},this)),document.title=(0,E.stripTags)(this.config.content[0].title),$("head").append($("body link, body style, template, .gl_keep")),this.container=$("body").html("").css("visibility","visible").append(e),document.body.offsetHeight,window.__glInstance=this}},{key:"_createSubWindows",value:function(){var e,t;for(e=0;e<this.config.openPopouts.length;e++)t=this.config.openPopouts[e],this.createPopout(t.content,t.dimensions,t.parentId,t.indexInParent)}},{key:"_setContainer",value:function(){var e=$(this.container||"body");if(0===e.length)throw new Error("GoldenLayout container not found");if(1<e.length)throw new Error("GoldenLayout more than one container element specified");e[0]===document.body&&(this._isFullPage=!0,$("html, body").css({height:"100%",margin:0,padding:0,overflow:"hidden"})),this.container=e}},{key:"_create",value:function(e){var t;if(!(e.content instanceof Array))throw t=void 0===e.content?"Missing setting 'content' on top level of configuration":"Configuration parameter 'content' must be an array",new C.default(t,e);if(1<e.content.length)throw t="Top level content can't contain more then one element.",new C.default(t,e);this.root=new g.default(this,{content:e.content},this.container),this.root.callDownwards("_$init"),"__glMaximised"===e.maximisedItemId&&this.root.getItemsById(e.maximisedItemId)[0].toggleMaximise()}},{key:"_onUnload",value:function(){if(!0===this.config.settings.closePopoutsOnUnload)for(var e=0;e<this.openPopouts.length;e++)this.openPopouts[e].close()}},{key:"_adjustColumnsResponsive",value:function(){if(this._useResponsiveLayout()&&!this._updatingColumnsResponsive&&this.config.dimensions&&this.config.dimensions.minItemWidth&&0!==this.root.contentItems.length&&this.root.contentItems[0].isRow){this._firstLoad=!1;var e=this.root.contentItems[0].contentItems.length;if(!(1>=e)){var i=this.config.dimensions.minItemWidth;if(!(e*i<=this.width)){this._updatingColumnsResponsive=!0;for(var o,r=n(t(this.width/i),1),s=this.root.contentItems[0],a=this._findAllStackContainers()[0],l=0;l<e-r;l++)o=s.contentItems[s.contentItems.length-1],this._addChildContentItemsToContainer(a,o);this._updatingColumnsResponsive=!1}}}else this._firstLoad=!1}},{key:"_useResponsiveLayout",value:function(){return this.config.settings&&("always"==this.config.settings.responsiveMode||"onload"==this.config.settings.responsiveMode&&this._firstLoad)}},{key:"_addChildContentItemsToContainer",value:function(e,t){"stack"===t.type?t.contentItems.forEach(function(n){e.addChild(n),t.removeChild(n,!0)}):t.contentItems.forEach((0,E.fnBind)(function(t){this._addChildContentItemsToContainer(e,t)},this))}},{key:"_findAllStackContainers",value:function(){var e=[];return this._findAllStackContainersRecursive(e,this.root),e}},{key:"_findAllStackContainersRecursive",value:function(e,t){t.contentItems.forEach((0,E.fnBind)(function(t){"stack"==t.type?e.push(t):!t.isComponent&&this._findAllStackContainersRecursive(e,t)},this))}}]),i}(d.default);i.default=M},function(e,t,n){e.exports={default:n(73),__esModule:!0}},function(e,t,n){n(74),n(84),e.exports=n(37).f("iterator")},function(e,t,n){var i=n(75)(!0);n(43)(String,"String",function(e){this._t=e+"",this._i=0},function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=i(t,n),this._i+=e.length,{value:e,done:!1})})},function(e,t,n){var i=n(27),o=n(28);e.exports=function(e){return function(t,n){var r,s,a=o(t)+"",l=i(n),c=a.length;return 0>l||l>=c?e?"":void 0:55296>(r=a.charCodeAt(l))||56319<r||l+1===c||56320>(s=a.charCodeAt(l+1))||57343<s?e?a.charAt(l):r:e?a.slice(l,l+2):s-56320+(r-55296<<10)+65536}}},function(e){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,n){var i=n(31),o=n(22),r=n(35),s={};n(13)(s,n(16)("iterator"),function(){return this}),e.exports=function(e,t,n){e.prototype=i(s,{next:o(1,n)}),r(e,t+" Iterator")}},function(e,t,n){var i=n(9),o=n(18),r=n(23);e.exports=n(10)?Object.defineProperties:function(e,t){o(e);for(var n,s=r(t),a=s.length,l=0;a>l;)i.f(e,n=s[l++],t[n]);return e}},function(e,t,n){var i=n(49);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==i(e)?e.split(""):Object(e)}},function(e,t,n){var i=n(15),o=n(81),r=n(82);e.exports=function(e){return function(t,n,s){var a,l=i(t),c=o(l.length),u=r(s,c);if(e&&n!=n){for(;c>u;)if((a=l[u++])!=a)return!0}else for(;c>u;u++)if((e||u in l)&&l[u]===n)return e||u||0;return!e&&-1}}},function(t,n,i){var o=i(27);t.exports=function(t){return 0<t?e(o(t),9007199254740991):0}},function(t,i,o){var r=o(27);t.exports=function(t,i){return 0>(t=r(t))?n(t+i,0):e(t,i)}},function(e,t,n){var i=n(8).document;e.exports=i&&i.documentElement},function(e,t,n){n(85);for(var i=n(8),o=n(13),r=n(30),s=n(16)("toStringTag"),a="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),l=0;l<a.length;l++){var c=a[l],u=i[c],h=u&&u.prototype;h&&!h[s]&&o(h,s,c),r[c]=r.Array}},function(e,t,n){var i=n(86),o=n(87),r=n(30),s=n(15);e.exports=n(43)(Array,"Array",function(e,t){this._t=s(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,o(1)):o(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])},"values"),r.Arguments=r.Array,i("keys"),i("values"),i("entries")},function(e){e.exports=function(){}},function(e){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){e.exports={default:n(89),__esModule:!0}},function(e,t,n){n(90),n(95),n(96),n(97),e.exports=n(6).Symbol},function(e,t,n){var i=n(8),o=n(11),r=n(10),a=n(12),l=n(47),c=n(91).KEY,u=n(19),h=n(33),d=n(35),f=n(24),p=n(16),m=n(37),g=n(38),y=n(92),v=n(93),_=n(18),b=n(14),w=n(15),x=n(29),k=n(22),I=n(31),C=n(94),S=n(53),$=n(9),E=n(23),M=S.f,T=$.f,P=C.f,D=i.Symbol,j=i.JSON,A=j&&j.stringify,O="prototype",z=p("_hidden"),N=p("toPrimitive"),L={}.propertyIsEnumerable,F=h("symbol-registry"),B=h("symbols"),R=h("op-symbols"),W=Object[O],H="function"==typeof D,Z=i.QObject,G=!Z||!Z[O]||!Z[O].findChild,q=r&&u(function(){return 7!=I(T({},"a",{get:function(){return T(this,"a",{value:7}).a}})).a})?function(e,t,n){var i=M(W,t);i&&delete W[t],T(e,t,n),i&&e!==W&&T(W,t,i)}:T,V=function(e){var t=B[e]=I(D[O]);return t._k=e,t},U=H&&"symbol"==s(D.iterator)?function(e){return"symbol"==(void 0===e?"undefined":s(e))}:function(e){return e instanceof D},X=function e(t,n,i){return t===W&&e(R,n,i),_(t),n=x(n,!0),_(i),o(B,n)?(i.enumerable?(o(t,z)&&t[z][n]&&(t[z][n]=!1),i=I(i,{enumerable:k(0,!1)})):(!o(t,z)&&T(t,z,k(1,{})),t[z][n]=!0),q(t,n,i)):T(t,n,i)},Y=function(e,t){_(e);for(var n,i=y(t=w(t)),o=0,r=i.length;r>o;)X(e,n=i[o++],t[n]);return e},J=function(e){var t=L.call(this,e=x(e,!0));return!(this===W&&o(B,e)&&!o(R,e))&&(!(t||!o(this,e)||!o(B,e)||o(this,z)&&this[z][e])||t)},Q=function(e,t){if(e=w(e),t=x(t,!0),e!==W||!o(B,t)||o(R,t)){var n=M(e,t);return n&&o(B,t)&&!(o(e,z)&&e[z][t])&&(n.enumerable=!0),n}},K=function(e){for(var t,n=P(w(e)),i=[],r=0;n.length>r;)o(B,t=n[r++])||t==z||t==c||i.push(t);return i},ee=function(e){for(var t,n=e===W,i=P(n?R:w(e)),r=[],s=0;i.length>s;)o(B,t=i[s++])&&(!n||o(W,t))&&r.push(B[t]);return r};H||(l((D=function(){if(this instanceof D)throw TypeError("Symbol is not a constructor!");var e=f(0<arguments.length?arguments[0]:void 0);return r&&G&&q(W,e,{configurable:!0,set:function t(n){this===W&&t.call(R,n),o(this,z)&&o(this[z],e)&&(this[z][e]=!1),q(this,e,k(1,n))}}),V(e)})[O],"toString",function(){return this._k}),S.f=Q,$.f=X,n(52).f=C.f=K,n(39).f=J,n(51).f=ee,r&&!n(21)&&l(W,"propertyIsEnumerable",J,!0),m.f=function(e){return V(p(e))}),a(a.G+a.W+a.F*!H,{Symbol:D});for(var te=["hasInstance","isConcatSpreadable","iterator","match","replace","search","species","split","toPrimitive","toStringTag","unscopables"],ne=0;te.length>ne;)p(te[ne++]);for(var ie=E(p.store),oe=0;ie.length>oe;)g(ie[oe++]);a(a.S+a.F*!H,"Symbol",{for:function(e){return o(F,e+="")?F[e]:F[e]=D(e)},keyFor:function(e){if(!U(e))throw TypeError(e+" is not a symbol!");for(var t in F)if(F[t]===e)return t},useSetter:function(){G=!0},useSimple:function(){G=!1}}),a(a.S+a.F*!H,"Object",{create:function(e,t){return void 0===t?I(e):Y(I(e),t)},defineProperty:X,defineProperties:Y,getOwnPropertyDescriptor:Q,getOwnPropertyNames:K,getOwnPropertySymbols:ee}),j&&a(a.S+a.F*(!H||u(function(){var e=D();return"[null]"!=A([e])||"{}"!=A({a:e})||"{}"!=A(Object(e))})),"JSON",{stringify:function(e){for(var t,n,i=[e],o=1;arguments.length>o;)i.push(arguments[o++]);if(n=t=i[1],(b(t)||void 0!==e)&&!U(e))return v(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!U(t))return t}),i[1]=t,A.apply(j,i)}}),D[O][N]||n(13)(D[O],N,D[O].valueOf),d(D,"Symbol"),d(Math,"Math",!0),d(i.JSON,"JSON",!0)},function(e,t,n){var i=n(24)("meta"),o=n(14),r=n(11),a=n(9).f,l=0,c=Object.isExtensible||function(){return!0},u=!n(19)(function(){return c(Object.preventExtensions({}))}),h=function(e){a(e,i,{value:{i:"O"+ ++l,w:{}}})},d=e.exports={KEY:i,NEED:!1,fastKey:function(e,t){if(!o(e))return"symbol"==(void 0===e?"undefined":s(e))?e:("string"==typeof e?"S":"P")+e;if(!r(e,i)){if(!c(e))return"F";if(!t)return"E";h(e)}return e[i].i},getWeak:function(e,t){if(!r(e,i)){if(!c(e))return!0;if(!t)return!1;h(e)}return e[i].w},onFreeze:function(e){return u&&d.NEED&&c(e)&&!r(e,i)&&h(e),e}}},function(e,t,n){var i=n(23),o=n(51),r=n(39);e.exports=function(e){var t=i(e),n=o.f;if(n)for(var s,a=n(e),l=r.f,c=0;a.length>c;)l.call(e,s=a[c++])&&t.push(s);return t}},function(e,t,n){var i=n(49);e.exports=Array.isArray||function(e){return"Array"==i(e)}},function(e,t,n){var i=n(15),o=n(52).f,r={}.toString,a="object"==("undefined"==typeof window?"undefined":s(window))&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return a&&"[object Window]"==r.call(e)?function(e){try{return o(e)}catch(e){return a.slice()}}(e):o(i(e))}},function(){},function(e,t,n){n(38)("asyncIterator")},function(e,t,n){n(38)("observable")},function(e,t,n){n(99),e.exports=n(6).Object.getPrototypeOf},function(e,t,n){var i=n(36),o=n(50);n(54)("getPrototypeOf",function(){return function(e){return o(i(e))}})},function(e,t,n){e.exports={default:n(101),__esModule:!0}},function(e,t,n){n(102);var i=n(6).Object;e.exports=function(e,t,n){return i.defineProperty(e,t,n)}},function(e,t,n){var i=n(12);i(i.S+i.F*!n(10),"Object",{defineProperty:n(9).f})},function(e,t,n){e.exports={default:n(104),__esModule:!0}},function(e,t,n){n(105),e.exports=n(6).Object.setPrototypeOf},function(e,t,n){var i=n(12);i(i.S,"Object",{setPrototypeOf:n(106).set})},function(e,t,n){var i=n(14),o=n(18),r=function(e,t){if(o(e),!i(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,i){try{(i=n(44)(Function.call,n(53).f(Object.prototype,"__proto__").set,2))(e,[]),t=!(e instanceof Array)}catch(e){t=!0}return function(e,n){return r(e,n),t?e.__proto__=n:i(e,n),e}}({},!1):void 0),check:r}},function(e,t,n){n(108);var i=n(6).Object;e.exports=function(e,t){return i.create(e,t)}},function(e,t,n){var i=n(12);i(i.S,"Object",{create:n(31)})},function(e,t,n){e.exports={default:n(110),__esModule:!0}},function(e,t,n){n(111),e.exports=n(6).Object.keys},function(e,t,n){var i=n(36),o=n(23);n(54)("keys",function(){return function(e){return o(i(e))}})},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default={isClosable:!0,reorderEnabled:!0,title:""}},function(e,t,n){function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=i(n(0)),r=i(n(1)),s=i(n(26)),a=function(){function e(t,n,i){(0,o.default)(this,e),this._isVertical=t,this._size=n,this._grabSize=i<n?n:i,this.element=this._createElement(),this._dragListener=new s.default(this.element)}return(0,r.default)(e,[{key:"on",value:function(e,t,n){this._dragListener.on(e,t,n)}},{key:"_$destroy",value:function(){this.element.remove()}},{key:"_createElement",value:function(){var e=$('<div class="lm_drag_handle"></div>'),t=$('<div class="lm_splitter"></div>');t.append(e);var n=this._grabSize-this._size,i=n/2;return this._isVertical?(e.css("top",-i),e.css("height",this._size+n),t.addClass("lm_vertical"),t.height(this._size)):(e.css("left",-i),e.css("width",this._size+n),t.addClass("lm_horizontal"),t.width(this._size)),t}}]),e}();t.default=a},function(e,t,n){e.exports={default:n(115),__esModule:!0}},function(e,t,n){var i=n(6),o=i.JSON||(i.JSON={stringify:JSON.stringify});e.exports=function(){return o.stringify.apply(o,arguments)}},function(e,t,n){function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=i(n(0)),r=i(n(1)),s=i(n(26)),a=i(n(62)),l=n(2),c=function(){function e(t,n,i){(0,o.default)(this,e),this._element=t,this._itemConfig=n,this._layoutManager=i,this._dragListener=null,this._createDragListener()}return(0,r.default)(e,[{key:"_createDragListener",value:function(){null!==this._dragListener&&this._dragListener.destroy(),this._dragListener=new s.default(this._element),this._dragListener.on("dragStart",this._onDragStart,this),this._dragListener.on("dragStop",this._createDragListener,this)}},{key:"_onDragStart",value:function(e,t){var n=this._itemConfig;(0,l.isFunction)(n)&&(n=n());var i=this._layoutManager._$normalizeContentItem($.extend(!0,{},n)),o=new a.default(e,t,this._dragListener,this._layoutManager,i,null);this._layoutManager.transitionIndicator.transitionElements(this._element,o.element)}}]),e}();t.default=c},function(e,t,n){function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=i(n(0)),r=i(n(1)),s=function(){function e(){(0,o.default)(this,e),this.element=$('<div class="lm_dropTargetIndicator"><div class="lm_inner"></div></div>'),$(document.body).append(this.element)}return(0,r.default)(e,[{key:"destroy",value:function(){this.element.remove()}},{key:"highlight",value:function(e,t,n,i){this.highlightArea({x1:e,y1:t,x2:n,y2:i})}},{key:"highlightArea",value:function(e){this.element.css({left:e.x1,top:e.y1,width:e.x2-e.x1,height:e.y2-e.y1}).show()}},{key:"hide",value:function(){this.element.hide()}}]),e}();t.default=s},function(e,t,n){function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=i(n(0)),r=i(n(1)),s=n(2),a=function(){function e(){(0,o.default)(this,e),this._element=$('<div class="lm_transition_indicator"></div>'),$(document.body).append(this._element),this._toElement=null,this._fromDimensions=null,this._totalAnimationDuration=200,this._animationStartTime=null}return(0,r.default)(e,[{key:"destroy",value:function(){this._element.remove()}},{key:"transitionElements",value:function(){}},{key:"_nextAnimationFrame",value:function(){var e,t=this._measure(this._toElement),n=((0,s.now)()-this._animationStartTime)/this._totalAnimationDuration,i={};if(1<=n)this._element.hide();else{for(e in t.opacity=0,this._fromDimensions)i[e]=this._fromDimensions[e]+(t[e]-this._fromDimensions[e])*n;this._element.css(i),(0,s.animFrame)((0,s.fnBind)(this._nextAnimationFrame,this))}}},{key:"_measure",value:function(e){var t=e.offset();return{left:t.left,top:t.top,width:e.outerWidth(),height:e.outerHeight()}}}]),e}();t.default=a},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default={openPopouts:[],settings:{hasHeaders:!0,constrainDragToContainer:!0,reorderEnabled:!0,selectionEnabled:!1,popoutWholeStack:!1,blockedPopoutsThrowError:!0,closePopoutsOnUnload:!0,showPopoutIcon:!0,showMaximiseIcon:!0,showCloseIcon:!0,responsiveMode:"onload",tabOverlapAllowance:0,reorderOnTabMenuClick:!0,tabControlOffset:10},dimensions:{borderWidth:5,borderGrabWidth:15,minItemHeight:10,minItemWidth:10,headerHeight:20,dragProxyWidth:300,dragProxyHeight:200},labels:{close:"close",maximise:"maximise",minimise:"minimise",popout:"open in new window",popin:"pop in",tabDropdown:"additional tabs"}}},function(e,t,n){n(121)(n(122))},function(e){e.exports=function(e){function t(e){"undefined"!=typeof console&&(console.error||console.log)("[Script Loader]",e)}try{"undefined"!=typeof execScript&&"undefined"!=typeof attachEvent&&"undefined"==typeof addEventListener?execScript(e):"undefined"==typeof eval?t("EvalError: No eval function available"):eval.call(null,e)}catch(e){t(e)}}},function(e){e.exports="/* Zepto v1.2.0 - zepto event ajax form ie - zeptojs.com/license */\n(function(global, factory) {\n if (typeof define === 'function' && define.amd)\n define(function() { return factory(global) })\n else\n factory(global)\n}(this, function(window) {\n var Zepto = (function() {\n var undefined, key, $, classList, emptyArray = [], concat = emptyArray.concat, filter = emptyArray.filter, slice = emptyArray.slice,\n document = window.document,\n elementDisplay = {}, classCache = {},\n cssNumber = { 'column-count': 1, 'columns': 1, 'font-weight': 1, 'line-height': 1,'opacity': 1, 'z-index': 1, 'zoom': 1 },\n fragmentRE = /^\\s*<(\\w+|!)[^>]*>/,\n singleTagRE = /^<(\\w+)\\s*\\/?>(?:<\\/\\1>|)$/,\n tagExpanderRE = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\\w:]+)[^>]*)\\/>/ig,\n rootNodeRE = /^(?:body|html)$/i,\n capitalRE = /([A-Z])/g,\n\n // special attributes that should be get/set via method calls\n methodAttributes = ['val', 'css', 'html', 'text', 'data', 'width', 'height', 'offset'],\n\n adjacencyOperators = [ 'after', 'prepend', 'before', 'append' ],\n table = document.createElement('table'),\n tableRow = document.createElement('tr'),\n containers = {\n 'tr': document.createElement('tbody'),\n 'tbody': table, 'thead': table, 'tfoot': table,\n 'td': tableRow, 'th': tableRow,\n '*': document.createElement('div')\n },\n readyRE = /complete|loaded|interactive/,\n simpleSelectorRE = /^[\\w-]*$/,\n class2type = {},\n toString = class2type.toString,\n zepto = {},\n camelize, uniq,\n tempParent = document.createElement('div'),\n propMap = {\n 'tabindex': 'tabIndex',\n 'readonly': 'readOnly',\n 'for': 'htmlFor',\n 'class': 'className',\n 'maxlength': 'maxLength',\n 'cellspacing': 'cellSpacing',\n 'cellpadding': 'cellPadding',\n 'rowspan': 'rowSpan',\n 'colspan': 'colSpan',\n 'usemap': 'useMap',\n 'frameborder': 'frameBorder',\n 'contenteditable': 'contentEditable'\n },\n isArray = Array.isArray ||\n function(object){ return object instanceof Array }\n\n zepto.matches = function(element, selector) {\n if (!selector || !element || element.nodeType !== 1) return false\n var matchesSelector = element.matches || element.webkitMatchesSelector ||\n element.mozMatchesSelector || element.oMatchesSelector ||\n element.matchesSelector\n if (matchesSelector) return matchesSelector.call(element, selector)\n // fall back to performing a selector:\n var match, parent = element.parentNode, temp = !parent\n if (temp) (parent = tempParent).appendChild(element)\n match = ~zepto.qsa(parent, selector).indexOf(element)\n temp && tempParent.removeChild(element)\n return match\n }\n\n function type(obj) {\n return obj == null ? String(obj) :\n class2type[toString.call(obj)] || \"object\"\n }\n\n function isFunction(value) { return type(value) == \"function\" }\n function isWindow(obj) { return obj != null && obj == obj.window }\n function isDocument(obj) { return obj != null && obj.nodeType == obj.DOCUMENT_NODE }\n function isObject(obj) { return type(obj) == \"object\" }\n function isPlainObject(obj) {\n return isObject(obj) && !isWindow(obj) && Object.getPrototypeOf(obj) == Object.prototype\n }\n\n function likeArray(obj) {\n var length = !!obj && 'length' in obj && obj.length,\n type = $.type(obj)\n\n return 'function' != type && !isWindow(obj) && (\n 'array' == type || length === 0 ||\n (typeof length == 'number' && length > 0 && (length - 1) in obj)\n )\n }\n\n function compact(array) { return filter.call(array, function(item){ return item != null }) }\n function flatten(array) { return array.length > 0 ? $.fn.concat.apply([], array) : array }\n camelize = function(str){ return str.replace(/-+(.)?/g, function(match, chr){ return chr ? chr.toUpperCase() : '' }) }\n function dasherize(str) {\n return str.replace(/::/g, '/')\n .replace(/([A-Z]+)([A-Z][a-z])/g, '$1_$2')\n .replace(/([a-z\\d])([A-Z])/g, '$1_$2')\n .replace(/_/g, '-')\n .toLowerCase()\n }\n uniq = function(array){ return filter.call(array, function(item, idx){ return array.indexOf(item) == idx }) }\n\n function classRE(name) {\n return name in classCache ?\n classCache[name] : (classCache[name] = new RegExp('(^|\\\\s)' + name + '(\\\\s|$)'))\n }\n\n function maybeAddPx(name, value) {\n return (typeof value == \"number\" && !cssNumber[dasherize(name)]) ? value + \"px\" : value\n }\n\n function defaultDisplay(nodeName) {\n var element, display\n if (!elementDisplay[nodeName]) {\n element = document.createElement(nodeName)\n document.body.appendChild(element)\n display = getComputedStyle(element, '').getPropertyValue(\"display\")\n element.parentNode.removeChild(element)\n display == \"none\" && (display = \"block\")\n elementDisplay[nodeName] = display\n }\n return elementDisplay[nodeName]\n }\n\n function children(element) {\n return 'children' in element ?\n slice.call(element.children) :\n $.map(element.childNodes, function(node){ if (node.nodeType == 1) return node })\n }\n\n function Z(dom, selector) {\n var i, len = dom ? dom.length : 0\n for (i = 0; i < len; i++) this[i] = dom[i]\n this.length = len\n this.selector = selector || ''\n }\n\n // `$.zepto.fragment` takes a html string and an optional tag name\n // to generate DOM nodes from the given html string.\n // The generated DOM nodes are returned as an array.\n // This function can be overridden in plugins for example to make\n // it compatible with browsers that don't support the DOM fully.\n zepto.fragment = function(html, name, properties) {\n var dom, nodes, container\n\n // A special case optimization for a single tag\n if (singleTagRE.test(html)) dom = $(document.createElement(RegExp.$1))\n\n if (!dom) {\n if (html.replace) html = html.replace(tagExpanderRE, \"<$1></$2>\")\n if (name === undefined) name = fragmentRE.test(html) && RegExp.$1\n if (!(name in containers)) name = '*'\n\n container = containers[name]\n container.innerHTML = '' + html\n dom = $.each(slice.call(container.childNodes), function(){\n container.removeChild(this)\n })\n }\n\n if (isPlainObject(properties)) {\n nodes = $(dom)\n $.each(properties, function(key, value) {\n if (methodAttributes.indexOf(key) > -1) nodes[key](value)\n else nodes.attr(key, value)\n })\n }\n\n return dom\n }\n\n // `$.zepto.Z` swaps out the prototype of the given `dom` array\n // of nodes with `$.fn` and thus supplying all the Zepto functions\n // to the array. This method can be overridden in plugins.\n zepto.Z = function(dom, selector) {\n return new Z(dom, selector)\n }\n\n // `$.zepto.isZ` should return `true` if the given object is a Zepto\n // collection. This method can be overridden in plugins.\n zepto.isZ = function(object) {\n return object instanceof zepto.Z\n }\n\n // `$.zepto.init` is Zepto's counterpart to jQuery's `$.fn.init` and\n // takes a CSS selector and an optional context (and handles various\n // special cases).\n // This method can be overridden in plugins.\n zepto.init = function(selector, context) {\n var dom\n // If nothing given, return an empty Zepto collection\n if (!selector) return zepto.Z()\n // Optimize for string selectors\n else if (typeof selector == 'string') {\n selector = selector.trim()\n // If it's a html fragment, create nodes from it\n // Note: In both Chrome 21 and Firefox 15, DOM error 12\n // is thrown if the fragment doesn't begin with <\n if (selector[0] == '<' && fragmentRE.test(selector))\n dom = zepto.fragment(selector, RegExp.$1, context), selector = null\n // If there's a context, create a collection on that context first, and select\n // nodes from there\n else if (context !== undefined) return $(context).find(selector)\n // If it's a CSS selector, use it to select nodes.\n else dom = zepto.qsa(document, selector)\n }\n // If a function is given, call it when the DOM is ready\n else if (isFunction(selector)) return $(document).ready(selector)\n // If a Zepto collection is given, just return it\n else if (zepto.isZ(selector)) return selector\n else {\n // normalize array if an array of nodes is given\n if (isArray(selector)) dom = compact(selector)\n // Wrap DOM nodes.\n else if (isObject(selector))\n dom = [selector], selector = null\n // If it's a html fragment, create nodes from it\n else if (fragmentRE.test(selector))\n dom = zepto.fragment(selector.trim(), RegExp.$1, context), selector = null\n // If there's a context, create a collection on that context first, and select\n // nodes from there\n else if (context !== undefined) return $(context).find(selector)\n // And last but no least, if it's a CSS selector, use it to select nodes.\n else dom = zepto.qsa(document, selector)\n }\n // create a new Zepto collection from the nodes found\n return zepto.Z(dom, selector)\n }\n\n // `$` will be the base `Zepto` object. When calling this\n // function just call `$.zepto.init, which makes the implementation\n // details of selecting nodes and creating Zepto collections\n // patchable in plugins.\n $ = function(selector, context){\n return zepto.init(selector, context)\n }\n\n function extend(target, source, deep) {\n for (key in source)\n if (deep && (isPlainObject(source[key]) || isArray(source[key]))) {\n if (isPlainObject(source[key]) && !isPlainObject(target[key]))\n target[key] = {}\n if (isArray(source[key]) && !isArray(target[key]))\n target[key] = []\n extend(target[key], source[key], deep)\n }\n else if (source[key] !== undefined) target[key] = source[key]\n }\n\n // Copy all but undefined properties from one or more\n // objects to the `target` object.\n $.extend = function(target){\n var deep, args = slice.call(arguments, 1)\n if (typeof target == 'boolean') {\n deep = target\n target = args.shift()\n }\n args.forEach(function(arg){ extend(target, arg, deep) })\n return target\n }\n\n // `$.zepto.qsa` is Zepto's CSS selector implementation which\n // uses `document.querySelectorAll` and optimizes for some special cases, like `#id`.\n // This method can be overridden in plugins.\n zepto.qsa = function(element, selector){\n var found,\n maybeID = selector[0] == '#',\n maybeClass = !maybeID && selector[0] == '.',\n nameOnly = maybeID || maybeClass ? selector.slice(1) : selector, // Ensure that a 1 char tag name still gets checked\n isSimple = simpleSelectorRE.test(nameOnly)\n return (element.getElementById && isSimple && maybeID) ? // Safari DocumentFragment doesn't have getElementById\n ( (found = element.getElementById(nameOnly)) ? [found] : [] ) :\n (element.nodeType !== 1 && element.nodeType !== 9 && element.nodeType !== 11) ? [] :\n slice.call(\n isSimple && !maybeID && element.getElementsByClassName ? // DocumentFragment doesn't have getElementsByClassName/TagName\n maybeClass ? element.getElementsByClassName(nameOnly) : // If it's simple, it could be a class\n element.getElementsByTagName(selector) : // Or a tag\n element.querySelectorAll(selector) // Or it's not simple, and we need to query all\n )\n }\n\n function filtered(nodes, selector) {\n return selector == null ? $(nodes) : $(nodes).filter(selector)\n }\n\n $.contains = document.documentElement.contains ?\n function(parent, node) {\n return parent !== node && parent.contains(node)\n } :\n function(parent, node) {\n while (node && (node = node.parentNode))\n if (node === parent) return true\n return false\n }\n\n function funcArg(context, arg, idx, payload) {\n return isFunction(arg) ? arg.call(context, idx, payload) : arg\n }\n\n function setAttribute(node, name, value) {\n value == null ? node.removeAttribute(name) : node.setAttribute(name, value)\n }\n\n // access className property while respecting SVGAnimatedString\n function className(node, value){\n var klass = node.className || '',\n svg = klass && klass.baseVal !== undefined\n\n if (value === undefined) return svg ? klass.baseVal : klass\n svg ? (klass.baseVal = value) : (node.className = value)\n }\n\n // \"true\" => true\n // \"false\" => false\n // \"null\" => null\n // \"42\" => 42\n // \"42.5\" => 42.5\n // \"08\" => \"08\"\n // JSON => parse if valid\n // String => self\n function deserializeValue(value) {\n try {\n return value ?\n value == \"true\" ||\n ( value == \"false\" ? false :\n value == \"null\" ? null :\n +value + \"\" == value ? +value :\n /^[\\[\\{]/.test(value) ? $.parseJSON(value) :\n value )\n : value\n } catch(e) {\n return value\n }\n }\n\n $.type = type\n $.isFunction = isFunction\n $.isWindow = isWindow\n $.isArray = isArray\n $.isPlainObject = isPlainObject\n\n $.isEmptyObject = function(obj) {\n var name\n for (name in obj) return false\n return true\n }\n\n $.isNumeric = function(val) {\n var num = Number(val), type = typeof val\n return val != null && type != 'boolean' &&\n (type != 'string' || val.length) &&\n !isNaN(num) && isFinite(num) || false\n }\n\n $.inArray = function(elem, array, i){\n return emptyArray.indexOf.call(array, elem, i)\n }\n\n $.camelCase = camelize\n $.trim = function(str) {\n return str == null ? \"\" : String.prototype.trim.call(str)\n }\n\n // plugin compatibility\n $.uuid = 0\n $.support = { }\n $.expr = { }\n $.noop = function() {}\n\n $.map = function(elements, callback){\n var value, values = [], i, key\n if (likeArray(elements))\n for (i = 0; i < elements.length; i++) {\n value = callback(elements[i], i)\n if (value != null) values.push(value)\n }\n else\n for (key in elements) {\n value = callback(elements[key], key)\n if (value != null) values.push(value)\n }\n return flatten(values)\n }\n\n $.each = function(elements, callback){\n var i, key\n if (likeArray(elements)) {\n for (i = 0; i < elements.length; i++)\n if (callback.call(elements[i], i, elements[i]) === false) return elements\n } else {\n for (key in elements)\n if (callback.call(elements[key], key, elements[key]) === false) return elements\n }\n\n return elements\n }\n\n $.grep = function(elements, callback){\n return filter.call(elements, callback)\n }\n\n if (window.JSON) $.parseJSON = JSON.parse\n\n // Populate the class2type map\n $.each(\"Boolean Number String Function Array Date RegExp Object Error\".split(\" \"), function(i, name) {\n class2type[ \"[object \" + name + \"]\" ] = name.toLowerCase()\n })\n\n // Define methods that will be available on all\n // Zepto collections\n $.fn = {\n constructor: zepto.Z,\n length: 0,\n\n // Because a collection acts like an array\n // copy over these useful array functions.\n forEach: emptyArray.forEach,\n reduce: emptyArray.reduce,\n push: emptyArray.push,\n sort: emptyArray.sort,\n splice: emptyArray.splice,\n indexOf: emptyArray.indexOf,\n concat: function(){\n var i, value, args = []\n for (i = 0; i < arguments.length; i++) {\n value = arguments[i]\n args[i] = zepto.isZ(value) ? value.toArray() : value\n }\n return concat.apply(zepto.isZ(this) ? this.toArray() : this, args)\n },\n\n // `map` and `slice` in the jQuery API work differently\n // from their array counterparts\n map: function(fn){\n return $($.map(this, function(el, i){ return fn.call(el, i, el) }))\n },\n slice: function(){\n return $(slice.apply(this, arguments))\n },\n\n ready: function(callback){\n // need to check if document.body exists for IE as that browser reports\n // document ready when it hasn't yet created the body element\n if (readyRE.test(document.readyState) && document.body) callback($)\n else document.addEventListener('DOMContentLoaded', function(){ callback($) }, false)\n return this\n },\n get: function(idx){\n return idx === undefined ? slice.call(this) : this[idx >= 0 ? idx : idx + this.length]\n },\n toArray: function(){ return this.get() },\n size: function(){\n return this.length\n },\n remove: function(){\n return this.each(function(){\n if (this.parentNode != null)\n this.parentNode.removeChild(this)\n })\n },\n each: function(callback){\n emptyArray.every.call(this, function(el, idx){\n return callback.call(el, idx, el) !== false\n })\n return this\n },\n filter: function(selector){\n if (isFunction(selector)) return this.not(this.not(selector))\n return $(filter.call(this, function(element){\n return zepto.matches(element, selector)\n }))\n },\n add: function(selector,context){\n return $(uniq(this.concat($(selector,context))))\n },\n is: function(selector){\n return this.length > 0 && zepto.matches(this[0], selector)\n },\n not: function(selector){\n var nodes=[]\n if (isFunction(selector) && selector.call !== undefined)\n this.each(function(idx){\n if (!selector.call(this,idx)) nodes.push(this)\n })\n else {\n var excludes = typeof selector == 'string' ? this.filter(selector) :\n (likeArray(selector) && isFunction(selector.item)) ? slice.call(selector) : $(selector)\n this.forEach(function(el){\n if (excludes.indexOf(el) < 0) nodes.push(el)\n })\n }\n return $(nodes)\n },\n has: function(selector){\n return this.filter(function(){\n return isObject(selector) ?\n $.contains(this, selector) :\n $(this).find(selector).size()\n })\n },\n eq: function(idx){\n return idx === -1 ? this.slice(idx) : this.slice(idx, + idx + 1)\n },\n first: function(){\n var el = this[0]\n return el && !isObject(el) ? el : $(el)\n },\n last: function(){\n var el = this[this.length - 1]\n return el && !isObject(el) ? el : $(el)\n },\n find: function(selector){\n var result, $this = this\n if (!selector) result = $()\n else if (typeof selector == 'object')\n result = $(selector).filter(function(){\n var node = this\n return emptyArray.some.call($this, function(parent){\n return $.contains(parent, node)\n })\n })\n else if (this.length == 1) result = $(zepto.qsa(this[0], selector))\n else result = this.map(function(){ return zepto.qsa(this, selector) })\n return result\n },\n closest: function(selector, context){\n var nodes = [], collection = typeof selector == 'object' && $(selector)\n this.each(function(_, node){\n while (node && !(collection ? collection.indexOf(node) >= 0 : zepto.matches(node, selector)))\n node = node !== context && !isDocument(node) && node.parentNode\n if (node && nodes.indexOf(node) < 0) nodes.push(node)\n })\n return $(nodes)\n },\n parents: function(selector){\n var ancestors = [], nodes = this\n while (nodes.length > 0)\n nodes = $.map(nodes, function(node){\n if ((node = node.parentNode) && !isDocument(node) && ancestors.indexOf(node) < 0) {\n ancestors.push(node)\n return node\n }\n })\n return filtered(ancestors, selector)\n },\n parent: function(selector){\n return filtered(uniq(this.pluck('parentNode')), selector)\n },\n children: function(selector){\n return filtered(this.map(function(){ return children(this) }), selector)\n },\n contents: function() {\n return this.map(function() { return this.contentDocument || slice.call(this.childNodes) })\n },\n siblings: function(selector){\n return filtered(this.map(function(i, el){\n return filter.call(children(el.parentNode), function(child){ return child!==el })\n }), selector)\n },\n empty: function(){\n return this.each(function(){ this.innerHTML = '' })\n },\n // `pluck` is borrowed from Prototype.js\n pluck: function(property){\n return $.map(this, function(el){ return el[property] })\n },\n show: function(){\n return this.each(function(){\n this.style.display == \"none\" && (this.style.display = '')\n if (getComputedStyle(this, '').getPropertyValue(\"display\") == \"none\")\n this.style.display = defaultDisplay(this.nodeName)\n })\n },\n replaceWith: function(newContent){\n return this.before(newContent).remove()\n },\n wrap: function(structure){\n var func = isFunction(structure)\n if (this[0] && !func)\n var dom = $(structure).get(0),\n clone = dom.parentNode || this.length > 1\n\n return this.each(function(index){\n $(this).wrapAll(\n func ? structure.call(this, index) :\n clone ? dom.cloneNode(true) : dom\n )\n })\n },\n wrapAll: function(structure){\n if (this[0]) {\n $(this[0]).before(structure = $(structure))\n var children\n // drill down to the inmost element\n while ((children = structure.children()).length) structure = children.first()\n $(structure).append(this)\n }\n return this\n },\n wrapInner: function(structure){\n var func = isFunction(structure)\n return this.each(function(index){\n var self = $(this), contents = self.contents(),\n dom = func ? structure.call(this, index) : structure\n contents.length ? contents.wrapAll(dom) : self.append(dom)\n })\n },\n unwrap: function(){\n this.parent().each(function(){\n $(this).replaceWith($(this).children())\n })\n return this\n },\n clone: function(){\n return this.map(function(){ return this.cloneNode(true) })\n },\n hide: function(){\n return this.css(\"display\", \"none\")\n },\n toggle: function(setting){\n return this.each(function(){\n var el = $(this)\n ;(setting === undefined ? el.css(\"display\") == \"none\" : setting) ? el.show() : el.hide()\n })\n },\n prev: function(selector){ return $(this.pluck('previousElementSibling')).filter(selector || '*') },\n next: function(selector){ return $(this.pluck('nextElementSibling')).filter(selector || '*') },\n html: function(html){\n return 0 in arguments ?\n this.each(function(idx){\n var originHtml = this.innerHTML\n $(this).empty().append( funcArg(this, html, idx, originHtml) )\n }) :\n (0 in this ? this[0].innerHTML : null)\n },\n text: function(text){\n return 0 in arguments ?\n this.each(function(idx){\n var newText = funcArg(this, text, idx, this.textContent)\n this.textContent = newText == null ? '' : ''+newText\n }) :\n (0 in this ? this.pluck('textContent').join(\"\") : null)\n },\n attr: function(name, value){\n var result\n return (typeof name == 'string' && !(1 in arguments)) ?\n (0 in this && this[0].nodeType == 1 && (result = this[0].getAttribute(name)) != null ? result : undefined) :\n this.each(function(idx){\n if (this.nodeType !== 1) return\n if (isObject(name)) for (key in name) setAttribute(this, key, name[key])\n else setAttribute(this, name, funcArg(this, value, idx, this.getAttribute(name)))\n })\n },\n removeAttr: function(name){\n return this.each(function(){ this.nodeType === 1 && name.split(' ').forEach(function(attribute){\n setAttribute(this, attribute)\n }, this)})\n },\n prop: function(name, value){\n name = propMap[name] || name\n return (1 in arguments) ?\n this.each(function(idx){\n this[name] = funcArg(this, value, idx, this[name])\n }) :\n (this[0] && this[0][name])\n },\n removeProp: function(name){\n name = propMap[name] || name\n return this.each(function(){ delete this[name] })\n },\n data: function(name, value){\n var attrName = 'data-' + name.replace(capitalRE, '-$1').toLowerCase()\n\n var data = (1 in arguments) ?\n this.attr(attrName, value) :\n this.attr(attrName)\n\n return data !== null ? deserializeValue(data) : undefined\n },\n val: function(value){\n if (0 in arguments) {\n if (value == null) value = \"\"\n return this.each(function(idx){\n this.value = funcArg(this, value, idx, this.value)\n })\n } else {\n return this[0] && (this[0].multiple ?\n $(this[0]).find('option').filter(function(){ return this.selected }).pluck('value') :\n this[0].value)\n }\n },\n offset: function(coordinates){\n if (coordinates) return this.each(function(index){\n var $this = $(this),\n coords = funcArg(this, coordinates, index, $this.offset()),\n parentOffset = $this.offsetParent().offset(),\n props = {\n top: coords.top - parentOffset.top,\n left: coords.left - parentOffset.left\n }\n\n if ($this.css('position') == 'static') props['position'] = 'relative'\n $this.css(props)\n })\n if (!this.length) return null\n if (document.documentElement !== this[0] && !$.contains(document.documentElement, this[0]))\n return {top: 0, left: 0}\n var obj = this[0].getBoundingClientRect()\n return {\n left: obj.left + window.pageXOffset,\n top: obj.top + window.pageYOffset,\n width: Math.round(obj.width),\n height: Math.round(obj.height)\n }\n },\n css: function(property, value){\n if (arguments.length < 2) {\n var element = this[0]\n if (typeof property == 'string') {\n if (!element) return\n return element.style[camelize(property)] || getComputedStyle(element, '').getPropertyValue(property)\n } else if (isArray(property)) {\n if (!element) return\n var props = {}\n var computedStyle = getComputedStyle(element, '')\n $.each(property, function(_, prop){\n props[prop] = (element.style[camelize(prop)] || computedStyle.getPropertyValue(prop))\n })\n return props\n }\n }\n\n var css = ''\n if (type(property) == 'string') {\n if (!value && value !== 0)\n this.each(function(){ this.style.removeProperty(dasherize(property)) })\n else\n css = dasherize(property) + \":\" + maybeAddPx(property, value)\n } else {\n for (key in property)\n if (!property[key] && property[key] !== 0)\n this.each(function(){ this.style.removeProperty(dasherize(key)) })\n else\n css += dasherize(key) + ':' + maybeAddPx(key, property[key]) + ';'\n }\n\n return this.each(function(){ this.style.cssText += ';' + css })\n },\n index: function(element){\n return element ? this.indexOf($(element)[0]) : this.parent().children().indexOf(this[0])\n },\n hasClass: function(name){\n if (!name) return false\n return emptyArray.some.call(this, function(el){\n return this.test(className(el))\n }, classRE(name))\n },\n addClass: function(name){\n if (!name) return this\n return this.each(function(idx){\n if (!('className' in this)) return\n classList = []\n var cls = className(this), newName = funcArg(this, name, idx, cls)\n newName.split(/\\s+/g).forEach(function(klass){\n if (!$(this).hasClass(klass)) classList.push(klass)\n }, this)\n classList.length && className(this, cls + (cls ? \" \" : \"\") + classList.join(\" \"))\n })\n },\n removeClass: function(name){\n return this.each(function(idx){\n if (!('className' in this)) return\n if (name === undefined) return className(this, '')\n classList = className(this)\n funcArg(this, name, idx, classList).split(/\\s+/g).forEach(function(klass){\n classList = classList.replace(classRE(klass), \" \")\n })\n className(this, classList.trim())\n })\n },\n toggleClass: function(name, when){\n if (!name) return this\n return this.each(function(idx){\n var $this = $(this), names = funcArg(this, name, idx, className(this))\n names.split(/\\s+/g).forEach(function(klass){\n (when === undefined ? !$this.hasClass(klass) : when) ?\n $this.addClass(klass) : $this.removeClass(klass)\n })\n })\n },\n scrollTop: function(value){\n if (!this.length) return\n var hasScrollTop = 'scrollTop' in this[0]\n if (value === undefined) return hasScrollTop ? this[0].scrollTop : this[0].pageYOffset\n return this.each(hasScrollTop ?\n function(){ this.scrollTop = value } :\n function(){ this.scrollTo(this.scrollX, value) })\n },\n scrollLeft: function(value){\n if (!this.length) return\n var hasScrollLeft = 'scrollLeft' in this[0]\n if (value === undefined) return hasScrollLeft ? this[0].scrollLeft : this[0].pageXOffset\n return this.each(hasScrollLeft ?\n function(){ this.scrollLeft = value } :\n function(){ this.scrollTo(value, this.scrollY) })\n },\n position: function() {\n if (!this.length) return\n\n var elem = this[0],\n // Get *real* offsetParent\n offsetParent = this.offsetParent(),\n // Get correct offsets\n offset = this.offset(),\n parentOffset = rootNodeRE.test(offsetParent[0].nodeName) ? { top: 0, left: 0 } : offsetParent.offset()\n\n // Subtract element margins\n // note: when an element has margin: auto the offsetLeft and marginLeft\n // are the same in Safari causing offset.left to incorrectly be 0\n offset.top -= parseFloat( $(elem).css('margin-top') ) || 0\n offset.left -= parseFloat( $(elem).css('margin-left') ) || 0\n\n // Add offsetParent borders\n parentOffset.top += parseFloat( $(offsetParent[0]).css('border-top-width') ) || 0\n parentOffset.left += parseFloat( $(offsetParent[0]).css('border-left-width') ) || 0\n\n // Subtract the two offsets\n return {\n top: offset.top - parentOffset.top,\n left: offset.left - parentOffset.left\n }\n },\n offsetParent: function() {\n return this.map(function(){\n var parent = this.offsetParent || document.body\n while (parent && !rootNodeRE.test(parent.nodeName) && $(parent).css(\"position\") == \"static\")\n parent = parent.offsetParent\n return parent\n })\n }\n }\n\n // for now\n $.fn.detach = $.fn.remove\n\n // Generate the `width` and `height` functions\n ;['width', 'height'].forEach(function(dimension){\n var dimensionProperty =\n dimension.replace(/./, function(m){ return m[0].toUpperCase() })\n\n $.fn[dimension] = function(value){\n var offset, el = this[0]\n if (value === undefined) return isWindow(el) ? el['inner' + dimensionProperty] :\n isDocument(el) ? el.documentElement['scroll' + dimensionProperty] :\n (offset = this.offset()) && offset[dimension]\n else return this.each(function(idx){\n el = $(this)\n el.css(dimension, funcArg(this, value, idx, el[dimension]()))\n })\n }\n })\n\n function traverseNode(node, fun) {\n fun(node)\n for (var i = 0, len = node.childNodes.length; i < len; i++)\n traverseNode(node.childNodes[i], fun)\n }\n\n // Generate the `after`, `prepend`, `before`, `append`,\n // `insertAfter`, `insertBefore`, `appendTo`, and `prependTo` methods.\n adjacencyOperators.forEach(function(operator, operatorIndex) {\n var inside = operatorIndex % 2 //=> prepend, append\n\n $.fn[operator] = function(){\n // arguments can be nodes, arrays of nodes, Zepto objects and HTML strings\n var argType, nodes = $.map(arguments, function(arg) {\n var arr = []\n argType = type(arg)\n if (argType == \"array\") {\n arg.forEach(function(el) {\n if (el.nodeType !== undefined) return arr.push(el)\n else if ($.zepto.isZ(el)) return arr = arr.concat(el.get())\n arr = arr.concat(zepto.fragment(el))\n })\n return arr\n }\n return argType == \"object\" || arg == null ?\n arg : zepto.fragment(arg)\n }),\n parent, copyByClone = this.length > 1\n if (nodes.length < 1) return this\n\n return this.each(function(_, target){\n parent = inside ? target : target.parentNode\n\n // convert all methods to a \"before\" operation\n target = operatorIndex == 0 ? target.nextSibling :\n operatorIndex == 1 ? target.firstChild :\n operatorIndex == 2 ? target :\n null\n\n var parentInDocument = $.contains(document.documentElement, parent)\n\n nodes.forEach(function(node){\n if (copyByClone) node = node.cloneNode(true)\n else if (!parent) return $(node).remove()\n\n parent.insertBefore(node, target)\n if (parentInDocument) traverseNode(node, function(el){\n if (el.nodeName != null && el.nodeName.toUpperCase() === 'SCRIPT' &&\n (!el.type || el.type === 'text/javascript') && !el.src){\n var target = el.ownerDocument ? el.ownerDocument.defaultView : window\n target['eval'].call(target, el.innerHTML)\n }\n })\n })\n })\n }\n\n // after => insertAfter\n // prepend => prependTo\n // before => insertBefore\n // append => appendTo\n $.fn[inside ? operator+'To' : 'insert'+(operatorIndex ? 'Before' : 'After')] = function(html){\n $(html)[operator](this)\n return this\n }\n })\n\n zepto.Z.prototype = Z.prototype = $.fn\n\n // Export internal API functions in the `$.zepto` namespace\n zepto.uniq = uniq\n zepto.deserializeValue = deserializeValue\n $.zepto = zepto\n\n return $\n})()\n\nwindow.Zepto = Zepto\nwindow.$ === undefined && (window.$ = Zepto)\n\n;(function($){\n var _zid = 1, undefined,\n slice = Array.prototype.slice,\n isFunction = $.isFunction,\n isString = function(obj){ return typeof obj == 'string' },\n handlers = {},\n specialEvents={},\n focusinSupported = 'onfocusin' in window,\n focus = { focus: 'focusin', blur: 'focusout' },\n hover = { mouseenter: 'mouseover', mouseleave: 'mouseout' }\n\n specialEvents.click = specialEvents.mousedown = specialEvents.mouseup = specialEvents.mousemove = 'MouseEvents'\n\n function zid(element) {\n return element._zid || (element._zid = _zid++)\n }\n function findHandlers(element, event, fn, selector) {\n event = parse(event)\n if (event.ns) var matcher = matcherFor(event.ns)\n return (handlers[zid(element)] || []).filter(function(handler) {\n return handler\n && (!event.e || handler.e == event.e)\n && (!event.ns || matcher.test(handler.ns))\n && (!fn || zid(handler.fn) === zid(fn))\n && (!selector || handler.sel == selector)\n })\n }\n function parse(event) {\n var parts = ('' + event).split('.')\n return {e: parts[0], ns: parts.slice(1).sort().join(' ')}\n }\n function matcherFor(ns) {\n return new RegExp('(?:^| )' + ns.replace(' ', ' .* ?') + '(?: |$)')\n }\n\n function eventCapture(handler, captureSetting) {\n return handler.del &&\n (!focusinSupported && (handler.e in focus)) ||\n !!captureSetting\n }\n\n function realEvent(type) {\n return hover[type] || (focusinSupported && focus[type]) || type\n }\n\n function add(element, events, fn, data, selector, delegator, capture){\n var id = zid(element), set = (handlers[id] || (handlers[id] = []))\n events.split(/\\s/).forEach(function(event){\n if (event == 'ready') return $(document).ready(fn)\n var handler = parse(event)\n handler.fn = fn\n handler.sel = selector\n // emulate mouseenter, mouseleave\n if (handler.e in hover) fn = function(e){\n var related = e.relatedTarget\n if (!related || (related !== this && !$.contains(this, related)))\n return handler.fn.apply(this, arguments)\n }\n handler.del = delegator\n var callback = delegator || fn\n handler.proxy = function(e){\n e = compatible(e)\n if (e.isImmediatePropagationStopped()) return\n e.data = data\n var result = callback.apply(element, e._args == undefined ? [e] : [e].concat(e._args))\n if (result === false) e.preventDefault(), e.stopPropagation()\n return result\n }\n handler.i = set.length\n set.push(handler)\n if ('addEventListener' in element)\n element.addEventListener(realEvent(handler.e), handler.proxy, eventCapture(handler, capture))\n })\n }\n function remove(element, events, fn, selector, capture){\n var id = zid(element)\n ;(events || '').split(/\\s/).forEach(function(event){\n findHandlers(element, event, fn, selector).forEach(function(handler){\n delete handlers[id][handler.i]\n if ('removeEventListener' in element)\n element.removeEventListener(realEvent(handler.e), handler.proxy, eventCapture(handler, capture))\n })\n })\n }\n\n $.event = { add: add, remove: remove }\n\n $.proxy = function(fn, context) {\n var args = (2 in arguments) && slice.call(arguments, 2)\n if (isFunction(fn)) {\n var proxyFn = function(){ return fn.apply(context, args ? args.concat(slice.call(arguments)) : arguments) }\n proxyFn._zid = zid(fn)\n return proxyFn\n } else if (isString(context)) {\n if (args) {\n args.unshift(fn[context], fn)\n return $.proxy.apply(null, args)\n } else {\n return $.proxy(fn[context], fn)\n }\n } else {\n throw new TypeError(\"expected function\")\n }\n }\n\n $.fn.bind = function(event, data, callback){\n return this.on(event, data, callback)\n }\n $.fn.unbind = function(event, callback){\n return this.off(event, callback)\n }\n $.fn.one = function(event, selector, data, callback){\n return this.on(event, selector, data, callback, 1)\n }\n\n var returnTrue = function(){return true},\n returnFalse = function(){return false},\n ignoreProperties = /^([A-Z]|returnValue$|layer[XY]$|webkitMovement[XY]$)/,\n eventMethods = {\n preventDefault: 'isDefaultPrevented',\n stopImmediatePropagation: 'isImmediatePropagationStopped',\n stopPropagation: 'isPropagationStopped'\n }\n\n function compatible(event, source) {\n if (source || !event.isDefaultPrevented) {\n source || (source = event)\n\n $.each(eventMethods, function(name, predicate) {\n var sourceMethod = source[name]\n event[name] = function(){\n this[predicate] = returnTrue\n return sourceMethod && sourceMethod.apply(source, arguments)\n }\n event[predicate] = returnFalse\n })\n\n event.timeStamp || (event.timeStamp = Date.now())\n\n if (source.defaultPrevented !== undefined ? source.defaultPrevented :\n 'returnValue' in source ? source.returnValue === false :\n source.getPreventDefault && source.getPreventDefault())\n event.isDefaultPrevented = returnTrue\n }\n return event\n }\n\n function createProxy(event) {\n var key, proxy = { originalEvent: event }\n for (key in event)\n if (!ignoreProperties.test(key) && event[key] !== undefined) proxy[key] = event[key]\n\n return compatible(proxy, event)\n }\n\n $.fn.delegate = function(selector, event, callback){\n return this.on(event, selector, callback)\n }\n $.fn.undelegate = function(selector, event, callback){\n return this.off(event, selector, callback)\n }\n\n $.fn.live = function(event, callback){\n $(document.body).delegate(this.selector, event, callback)\n return this\n }\n $.fn.die = function(event, callback){\n $(document.body).undelegate(this.selector, event, callback)\n return this\n }\n\n $.fn.on = function(event, selector, data, callback, one){\n var autoRemove, delegator, $this = this\n if (event && !isString(event)) {\n $.each(event, function(type, fn){\n $this.on(type, selector, data, fn, one)\n })\n return $this\n }\n\n if (!isString(selector) && !isFunction(callback) && callback !== false)\n callback = data, data = selector, selector = undefined\n if (callback === undefined || data === false)\n callback = data, data = undefined\n\n if (callback === false) callback = returnFalse\n\n return $this.each(function(_, element){\n if (one) autoRemove = function(e){\n remove(element, e.type, callback)\n return callback.apply(this, arguments)\n }\n\n if (selector) delegator = function(e){\n var evt, match = $(e.target).closest(selector, element).get(0)\n if (match && match !== element) {\n evt = $.extend(createProxy(e), {currentTarget: match, liveFired: element})\n return (autoRemove || callback).apply(match, [evt].concat(slice.call(arguments, 1)))\n }\n }\n\n add(element, event, callback, data, selector, delegator || autoRemove)\n })\n }\n $.fn.off = function(event, selector, callback){\n var $this = this\n if (event && !isString(event)) {\n $.each(event, function(type, fn){\n $this.off(type, selector, fn)\n })\n return $this\n }\n\n if (!isString(selector) && !isFunction(callback) && callback !== false)\n callback = selector, selector = undefined\n\n if (callback === false) callback = returnFalse\n\n return $this.each(function(){\n remove(this, event, callback, selector)\n })\n }\n\n $.fn.trigger = function(event, args){\n event = (isString(event) || $.isPlainObject(event)) ? $.Event(event) : compatible(event)\n event._args = args\n return this.each(function(){\n // handle focus(), blur() by calling them directly\n if (event.type in focus && typeof this[event.type] == \"function\") this[event.type]()\n // items in the collection might not be DOM elements\n else if ('dispatchEvent' in this) this.dispatchEvent(event)\n else $(this).triggerHandler(event, args)\n })\n }\n\n // triggers event handlers on current element just as if an event occurred,\n // doesn't trigger an actual event, doesn't bubble\n $.fn.triggerHandler = function(event, args){\n var e, result\n this.each(function(i, element){\n e = createProxy(isString(event) ? $.Event(event) : event)\n e._args = args\n e.target = element\n $.each(findHandlers(element, event.type || event), function(i, handler){\n result = handler.proxy(e)\n if (e.isImmediatePropagationStopped()) return false\n })\n })\n return result\n }\n\n // shortcut methods for `.bind(event, fn)` for each event type\n ;('focusin focusout focus blur load resize scroll unload click dblclick '+\n 'mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave '+\n 'change select keydown keypress keyup error').split(' ').forEach(function(event) {\n $.fn[event] = function(callback) {\n return (0 in arguments) ?\n this.bind(event, callback) :\n this.trigger(event)\n }\n })\n\n $.Event = function(type, props) {\n if (!isString(type)) props = type, type = props.type\n var event = document.createEvent(specialEvents[type] || 'Events'), bubbles = true\n if (props) for (var name in props) (name == 'bubbles') ? (bubbles = !!props[name]) : (event[name] = props[name])\n event.initEvent(type, bubbles, true)\n return compatible(event)\n }\n\n})(Zepto)\n\n;(function($){\n var jsonpID = +new Date(),\n document = window.document,\n key,\n name,\n rscript = /<script\\b[^<]*(?:(?!<\\/script>)<[^<]*)*<\\/script>/gi,\n scriptTypeRE = /^(?:text|application)\\/javascript/i,\n xmlTypeRE = /^(?:text|application)\\/xml/i,\n jsonType = 'application/json',\n htmlType = 'text/html',\n blankRE = /^\\s*$/,\n originAnchor = document.createElement('a')\n\n originAnchor.href = window.location.href\n\n // trigger a custom event and return false if it was cancelled\n function triggerAndReturn(context, eventName, data) {\n var event = $.Event(eventName)\n $(context).trigger(event, data)\n return !event.isDefaultPrevented()\n }\n\n // trigger an Ajax \"global\" event\n function triggerGlobal(settings, context, eventName, data) {\n if (settings.global) return triggerAndReturn(context || document, eventName, data)\n }\n\n // Number of active Ajax requests\n $.active = 0\n\n function ajaxStart(settings) {\n if (settings.global && $.active++ === 0) triggerGlobal(settings, null, 'ajaxStart')\n }\n function ajaxStop(settings) {\n if (settings.global && !(--$.active)) triggerGlobal(settings, null, 'ajaxStop')\n }\n\n // triggers an extra global event \"ajaxBeforeSend\" that's like \"ajaxSend\" but cancelable\n function ajaxBeforeSend(xhr, settings) {\n var context = settings.context\n if (settings.beforeSend.call(context, xhr, settings) === false ||\n triggerGlobal(settings, context, 'ajaxBeforeSend', [xhr, settings]) === false)\n return false\n\n triggerGlobal(settings, context, 'ajaxSend', [xhr, settings])\n }\n function ajaxSuccess(data, xhr, settings, deferred) {\n var context = settings.context, status = 'success'\n settings.success.call(context, data, status, xhr)\n if (deferred) deferred.resolveWith(context, [data, status, xhr])\n triggerGlobal(settings, context, 'ajaxSuccess', [xhr, settings, data])\n ajaxComplete(status, xhr, settings)\n }\n // type: \"timeout\", \"error\", \"abort\", \"parsererror\"\n function ajaxError(error, type, xhr, settings, deferred) {\n var context = settings.context\n settings.error.call(context, xhr, type, error)\n if (deferred) deferred.rejectWith(context, [xhr, type, error])\n triggerGlobal(settings, context, 'ajaxError', [xhr, settings, error || type])\n ajaxComplete(type, xhr, settings)\n }\n // status: \"success\", \"notmodified\", \"error\", \"timeout\", \"abort\", \"parsererror\"\n function ajaxComplete(status, xhr, settings) {\n var context = settings.context\n settings.complete.call(context, xhr, status)\n triggerGlobal(settings, context, 'ajaxComplete', [xhr, settings])\n ajaxStop(settings)\n }\n\n function ajaxDataFilter(data, type, settings) {\n if (settings.dataFilter == empty) return data\n var context = settings.context\n return settings.dataFilter.call(context, data, type)\n }\n\n // Empty function, used as default callback\n function empty() {}\n\n $.ajaxJSONP = function(options, deferred){\n if (!('type' in options)) return $.ajax(options)\n\n var _callbackName = options.jsonpCallback,\n callbackName = ($.isFunction(_callbackName) ?\n _callbackName() : _callbackName) || ('Zepto' + (jsonpID++)),\n script = document.createElement('script'),\n originalCallback = window[callbackName],\n responseData,\n abort = function(errorType) {\n $(script).triggerHandler('error', errorType || 'abort')\n },\n xhr = { abort: abort }, abortTimeout\n\n if (deferred) deferred.promise(xhr)\n\n $(script).on('load error', function(e, errorType){\n clearTimeout(abortTimeout)\n $(script).off().remove()\n\n if (e.type == 'error' || !responseData) {\n ajaxError(null, errorType || 'error', xhr, options, deferred)\n } else {\n ajaxSuccess(responseData[0], xhr, options, deferred)\n }\n\n window[callbackName] = originalCallback\n if (responseData && $.isFunction(originalCallback))\n originalCallback(responseData[0])\n\n originalCallback = responseData = undefined\n })\n\n if (ajaxBeforeSend(xhr, options) === false) {\n abort('abort')\n return xhr\n }\n\n window[callbackName] = function(){\n responseData = arguments\n }\n\n script.src = options.url.replace(/\\?(.+)=\\?/, '?$1=' + callbackName)\n document.head.appendChild(script)\n\n if (options.timeout > 0) abortTimeout = setTimeout(function(){\n abort('timeout')\n }, options.timeout)\n\n return xhr\n }\n\n $.ajaxSettings = {\n // Default type of request\n type: 'GET',\n // Callback that is executed before request\n beforeSend: empty,\n // Callback that is executed if the request succeeds\n success: empty,\n // Callback that is executed the the server drops error\n error: empty,\n // Callback that is executed on request complete (both: error and success)\n complete: empty,\n // The context for the callbacks\n context: null,\n // Whether to trigger \"global\" Ajax events\n global: true,\n // Transport\n xhr: function () {\n return new window.XMLHttpRequest()\n },\n // MIME types mapping\n // IIS returns Javascript as \"application/x-javascript\"\n accepts: {\n script: 'text/javascript, application/javascript, application/x-javascript',\n json: jsonType,\n xml: 'application/xml, text/xml',\n html: htmlType,\n text: 'text/plain'\n },\n // Whether the request is to another domain\n crossDomain: false,\n // Default timeout\n timeout: 0,\n // Whether data should be serialized to string\n processData: true,\n // Whether the browser should be allowed to cache GET responses\n cache: true,\n //Used to handle the raw response data of XMLHttpRequest.\n //This is a pre-filtering function to sanitize the response.\n //The sanitized response should be returned\n dataFilter: empty\n }\n\n function mimeToDataType(mime) {\n if (mime) mime = mime.split(';', 2)[0]\n return mime && ( mime == htmlType ? 'html' :\n mime == jsonType ? 'json' :\n scriptTypeRE.test(mime) ? 'script' :\n xmlTypeRE.test(mime) && 'xml' ) || 'text'\n }\n\n function appendQuery(url, query) {\n if (query == '') return url\n return (url + '&' + query).replace(/[&?]{1,2}/, '?')\n }\n\n // serialize payload and append it to the URL for GET requests\n function serializeData(options) {\n if (options.processData && options.data && $.type(options.data) != \"string\")\n options.data = $.param(options.data, options.traditional)\n if (options.data && (!options.type || options.type.toUpperCase() == 'GET' || 'jsonp' == options.dataType))\n options.url = appendQuery(options.url, options.data), options.data = undefined\n }\n\n $.ajax = function(options){\n var settings = $.extend({}, options || {}),\n deferred = $.Deferred && $.Deferred(),\n urlAnchor, hashIndex\n for (key in $.ajaxSettings) if (settings[key] === undefined) settings[key] = $.ajaxSettings[key]\n\n ajaxStart(settings)\n\n if (!settings.crossDomain) {\n urlAnchor = document.createElement('a')\n urlAnchor.href = settings.url\n // cleans up URL for .href (IE only), see https://github.com/madrobby/zepto/pull/1049\n urlAnchor.href = urlAnchor.href\n settings.crossDomain = (originAnchor.protocol + '//' + originAnchor.host) !== (urlAnchor.protocol + '//' + urlAnchor.host)\n }\n\n if (!settings.url) settings.url = window.location.toString()\n if ((hashIndex = settings.url.indexOf('#')) > -1) settings.url = settings.url.slice(0, hashIndex)\n serializeData(settings)\n\n var dataType = settings.dataType, hasPlaceholder = /\\?.+=\\?/.test(settings.url)\n if (hasPlaceholder) dataType = 'jsonp'\n\n if (settings.cache === false || (\n (!options || options.cache !== true) &&\n ('script' == dataType || 'jsonp' == dataType)\n ))\n settings.url = appendQuery(settings.url, '_=' + Date.now())\n\n if ('jsonp' == dataType) {\n if (!hasPlaceholder)\n settings.url = appendQuery(settings.url,\n settings.jsonp ? (settings.jsonp + '=?') : settings.jsonp === false ? '' : 'callback=?')\n return $.ajaxJSONP(settings, deferred)\n }\n\n var mime = settings.accepts[dataType],\n headers = { },\n setHeader = function(name, value) { headers[name.toLowerCase()] = [name, value] },\n protocol = /^([\\w-]+:)\\/\\//.test(settings.url) ? RegExp.$1 : window.location.protocol,\n xhr = settings.xhr(),\n nativeSetHeader = xhr.setRequestHeader,\n abortTimeout\n\n if (deferred) deferred.promise(xhr)\n\n if (!settings.crossDomain) setHeader('X-Requested-With', 'XMLHttpRequest')\n setHeader('Accept', mime || '*/*')\n if (mime = settings.mimeType || mime) {\n if (mime.indexOf(',') > -1) mime = mime.split(',', 2)[0]\n xhr.overrideMimeType && xhr.overrideMimeType(mime)\n }\n if (settings.contentType || (settings.contentType !== false && settings.data && settings.type.toUpperCase() != 'GET'))\n setHeader('Content-Type', settings.contentType || 'application/x-www-form-urlencoded')\n\n if (settings.headers) for (name in settings.headers) setHeader(name, settings.headers[name])\n xhr.setRequestHeader = setHeader\n\n xhr.onreadystatechange = function(){\n if (xhr.readyState == 4) {\n xhr.onreadystatechange = empty\n clearTimeout(abortTimeout)\n var result, error = false\n if ((xhr.status >= 200 && xhr.status < 300) || xhr.status == 304 || (xhr.status == 0 && protocol == 'file:')) {\n dataType = dataType || mimeToDataType(settings.mimeType || xhr.getResponseHeader('content-type'))\n\n if (xhr.responseType == 'arraybuffer' || xhr.responseType == 'blob')\n result = xhr.response\n else {\n result = xhr.responseText\n\n try {\n // http://perfectionkills.com/global-eval-what-are-the-options/\n // sanitize response accordingly if data filter callback provided\n result = ajaxDataFilter(result, dataType, settings)\n if (dataType == 'script') (1,eval)(result)\n else if (dataType == 'xml') result = xhr.responseXML\n else if (dataType == 'json') result = blankRE.test(result) ? null : $.parseJSON(result)\n } catch (e) { error = e }\n\n if (error) return ajaxError(error, 'parsererror', xhr, settings, deferred)\n }\n\n ajaxSuccess(result, xhr, settings, deferred)\n } else {\n ajaxError(xhr.statusText || null, xhr.status ? 'error' : 'abort', xhr, settings, deferred)\n }\n }\n }\n\n if (ajaxBeforeSend(xhr, settings) === false) {\n xhr.abort()\n ajaxError(null, 'abort', xhr, settings, deferred)\n return xhr\n }\n\n var async = 'async' in settings ? settings.async : true\n xhr.open(settings.type, settings.url, async, settings.username, settings.password)\n\n if (settings.xhrFields) for (name in settings.xhrFields) xhr[name] = settings.xhrFields[name]\n\n for (name in headers) nativeSetHeader.apply(xhr, headers[name])\n\n if (settings.timeout > 0) abortTimeout = setTimeout(function(){\n xhr.onreadystatechange = empty\n xhr.abort()\n ajaxError(null, 'timeout', xhr, settings, deferred)\n }, settings.timeout)\n\n // avoid sending empty string (#319)\n xhr.send(settings.data ? settings.data : null)\n return xhr\n }\n\n // handle optional data/success arguments\n function parseArguments(url, data, success, dataType) {\n if ($.isFunction(data)) dataType = success, success = data, data = undefined\n if (!$.isFunction(success)) dataType = success, success = undefined\n return {\n url: url\n , data: data\n , success: success\n , dataType: dataType\n }\n }\n\n $.get = function(/* url, data, success, dataType */){\n return $.ajax(parseArguments.apply(null, arguments))\n }\n\n $.post = function(/* url, data, success, dataType */){\n var options = parseArguments.apply(null, arguments)\n options.type = 'POST'\n return $.ajax(options)\n }\n\n $.getJSON = function(/* url, data, success */){\n var options = parseArguments.apply(null, arguments)\n options.dataType = 'json'\n return $.ajax(options)\n }\n\n $.fn.load = function(url, data, success){\n if (!this.length) return this\n var self = this, parts = url.split(/\\s/), selector,\n options = parseArguments(url, data, success),\n callback = options.success\n if (parts.length > 1) options.url = parts[0], selector = parts[1]\n options.success = function(response){\n self.html(selector ?\n $('<div>').html(response.replace(rscript, \"\")).find(selector)\n : response)\n callback && callback.apply(self, arguments)\n }\n $.ajax(options)\n return this\n }\n\n var escape = encodeURIComponent\n\n function serialize(params, obj, traditional, scope){\n var type, array = $.isArray(obj), hash = $.isPlainObject(obj)\n $.each(obj, function(key, value) {\n type = $.type(value)\n if (scope) key = traditional ? scope :\n scope + '[' + (hash || type == 'object' || type == 'array' ? key : '') + ']'\n // handle data in serializeArray() format\n if (!scope && array) params.add(value.name, value.value)\n // recurse into nested objects\n else if (type == \"array\" || (!traditional && type == \"object\"))\n serialize(params, value, traditional, key)\n else params.add(key, value)\n })\n }\n\n $.param = function(obj, traditional){\n var params = []\n params.add = function(key, value) {\n if ($.isFunction(value)) value = value()\n if (value == null) value = \"\"\n this.push(escape(key) + '=' + escape(value))\n }\n serialize(params, obj, traditional)\n return params.join('&').replace(/%20/g, '+')\n }\n})(Zepto)\n\n;(function($){\n $.fn.serializeArray = function() {\n var name, type, result = [],\n add = function(value) {\n if (value.forEach) return value.forEach(add)\n result.push({ name: name, value: value })\n }\n if (this[0]) $.each(this[0].elements, function(_, field){\n type = field.type, name = field.name\n if (name && field.nodeName.toLowerCase() != 'fieldset' &&\n !field.disabled && type != 'submit' && type != 'reset' && type != 'button' && type != 'file' &&\n ((type != 'radio' && type != 'checkbox') || field.checked))\n add($(field).val())\n })\n return result\n }\n\n $.fn.serialize = function(){\n var result = []\n this.serializeArray().forEach(function(elm){\n result.push(encodeURIComponent(elm.name) + '=' + encodeURIComponent(elm.value))\n })\n return result.join('&')\n }\n\n $.fn.submit = function(callback) {\n if (0 in arguments) this.bind('submit', callback)\n else if (this.length) {\n var event = $.Event('submit')\n this.eq(0).trigger(event)\n if (!event.isDefaultPrevented()) this.get(0).submit()\n }\n return this\n }\n\n})(Zepto)\n\n;(function(){\n // getComputedStyle shouldn't freak out when called\n // without a valid element as argument\n try {\n getComputedStyle(undefined)\n } catch(e) {\n var nativeGetComputedStyle = getComputedStyle\n window.getComputedStyle = function(element, pseudoElement){\n try {\n return nativeGetComputedStyle(element, pseudoElement)\n } catch(e) {\n return null\n }\n }\n }\n})()\n return Zepto\n}))\n"},function(){!function(e){e.expr={":":{}},e.support={},e.fn.clone=function(){var t=e();return this.each(function(){t.push(this.cloneNode(!0))}),t},["Left","Top"].forEach(function(t,n){function i(e){return function(e){return e&&"object"==(void 0===e?"undefined":s(e))&&"setInterval"in e}(e)?e:!(9!==e.nodeType)&&(e.defaultView||e.parentWindow)}var o="scroll"+t;e.fn[o]=function(t){var r,s;return void 0===t?(r=this[0])?(s=i(r))?"pageXOffset"in s?s[n?"pageYOffset":"pageXOffset"]:s.document.documentElement[o]||s.document.body[o]:r[o]:null:void this.each(function(){if(s=i(this)){var r=n?e(s).scrollLeft():t,a=n?t:e(s).scrollTop();s.scrollTo(r,a)}else this[o]=t})}}),["width","height"].forEach(function(t){var n=t.replace(/./,function(e){return e[0].toUpperCase()});e.fn["inner"+n]=function(e){var n=this;if(n){var i=n[t]();return{width:["left","right"],height:["top","bottom"]}[t].forEach(function(t){i+=parseInt(n.css("padding-"+t),10),e&&(i+=parseInt(n.css("margin-"+t),10))}),i}return null},e.fn["outer"+n]=function(e){var n=this;if(n){var i=n[t]();return{width:["left","right"],height:["top","bottom"]}[t].forEach(function(t){e&&(i+=parseInt(n.css("margin-"+t),10))}),i}return null}}),e.proxy=function(t,n){if("string"==typeof n){var i=t[n];n=t,t=i}if(e.isFunction(t)){var o=Array.prototype.slice.call(arguments,2),r=function(){return t.apply(n,o.concat(Array.prototype.slice.call(arguments)))};return r.guid=t.guid=t.guid||r.guid||e.guid++,r}};var t=String.prototype.trim;e.trim=function(e,n){return!n&&t?t.call(e):(n=defaultToWhiteSpace(n),e.replace(new RegExp("^["+n+"]+|["+n+"]+$","g"),""))};var n=/^(?:body|html)$/i;e.fn.position=function(){if(!this[0])return null;var t=this[0],i=this.offsetParent(),o=this.offset(),r=n.test(i[0].nodeName)?{top:0,left:0}:i.offset();return o.top-=parseFloat(e(t).css("margin-top"))||0,o.left-=parseFloat(e(t).css("margin-left"))||0,r.top+=parseFloat(e(i[0]).css("border-top-width"))||0,r.left+=parseFloat(e(i[0]).css("border-left-width"))||0,{top:o.top-r.top,left:o.left-r.left}},e.fn.offsetParent=function(){var t=e();return this.each(function(){for(var i=this.offsetParent||document.body;i&&!n.test(i.nodeName)&&"static"===e(i).css("position");)i=i.offsetParent;t.push(i)}),t}}(Zepto)}])},"object"==s(t)&&"object"==s(e)?e.exports=r():(i=[],void 0===(o="function"==typeof(n=r)?n.apply(t,i):n)||(e.exports=o))}).call(this,n(1)(e))},function(e,t,n){"use strict";var i,o=n(2);var r=new((i=o)&&i.__esModule?i:{default:i}).default({settings:{showPopoutIcon:!1,showCloseIcon:!1},dimensions:{minItemHeight:40},content:[{type:"row",content:[{type:"column",width:40,content:[{type:"component",componentName:"template",title:"Game",componentState:{id:"client_wrapper"}},{type:"component",title:"Miscellaneous",height:5,componentName:"template",componentState:{id:"misc"}}]},{type:"column",content:[{type:"stack",height:60,content:[{type:"component",title:"Server chat",componentName:"template",componentState:{id:"ooc"}},{type:"component",title:"Log",componentName:"template",componentState:{id:"log"}}]},{type:"row",content:[{type:"component",title:"Music",componentName:"template",componentState:{id:"music"}},{type:"component",title:"Settings",componentName:"template",componentState:{id:"client_settings"}}]}]}]}]});r.registerComponent("template",function(e,t){var n=document.querySelector("#"+t.id);e.getElement().html(n.content)}),r.init()}]);
+!function(e){var t={};function n(i){if(t[i])return t[i].exports;var o=t[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=3)}([,function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){"use strict";(function(e){var n,i,o,s,r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function c(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}"undefined"==typeof self||self,s=function(){var e=Math.min,t=Math.floor,n=Math.max;return function(e){function t(i){if(n[i])return n[i].exports;var o=n[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:i})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=35)}([function(e,t,n){t.e=function(e){return $.zepto?e.touches?e.targetTouches[0]:e:e.originalEvent&&e.originalEvent.touches?e.originalEvent.touches[0]:e},t.j=function(e){var t,n;if("function"==typeof o.a)return o()(e);for(n in t=[],e)t.push(n);return t},t.d=function(e){if(window.location.hash)return function(e){var t=location.hash.match(new RegExp(e+"=([^&]*)"));return t?t[1]:null}(e);if(!window.location.search)return null;var t,n,i=window.location.search.substr(1).split("&"),o={};for(n=0;n<i.length;n++)o[(t=i[n].split("="))[0]]=t[1];return o[e]||null},t.b=function(e,t){for(var n in t)e[n]=t[n];return e},t.a=function(e){return(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)})(function(){e()})},t.g=function(e,t){if(!(t instanceof Array))throw new Error("Haystack is not an Array");if(t.indexOf)return t.indexOf(e);for(var n=0;n<t.length;n++)if(t[n]===e)return n;return-1},n.d(t,"h",function(){return r}),t.c=function(e,t,n){if(void 0!==Function.prototype.bind)return Function.prototype.bind.apply(e,[t].concat(n||[]));var i=function i(){var o=(n||[]).concat(Array.prototype.slice.call(arguments,0));return this instanceof i?void e.apply(this,o):e.apply(t,o)};return i.prototype=e.prototype,i},t.i=function(){return"function"==typeof Date.now?Date.now():(new Date).getTime()},t.f=function(){return(1e15*Math.random()).toString(36).replace(".","")},t.k=function(e){return $.trim(e.replace(/(<([^>]+)>)/gi,""))};var i=n(40),o=n.n(i),s=n(60),r=(n.n(s),"function"!=typeof/./&&"object"!=("undefined"==typeof Int8Array?"undefined":a(Int8Array))?function(e){return"function"==typeof e||!1}:function(e){return"[object Function]"===toString.call(e)})},function(e,t,n){var i=n(0),o="__all";t.a=o,t.b=function(){return function e(){h(this,e),this._mSubscriptions={},this._mSubscriptions[o]=[],this.on=function(e,t,n){if(!Object(i.h)(t))throw new Error("Tried to listen to event "+e+" with non-function callback "+t);this._mSubscriptions[e]||(this._mSubscriptions[e]=[]),this._mSubscriptions[e].push({fn:t,ctx:n})},this.emit=function(e){var t,n,i;i=Array.prototype.slice.call(arguments,1);var s=this._mSubscriptions[e];if(s)for(s=s.slice(),t=0;t<s.length;t++)n=s[t].ctx||{},s[t].fn.apply(n,i);i.unshift(e);var r=this._mSubscriptions[o].slice();for(t=0;t<r.length;t++)n=r[t].ctx||{},r[t].fn.apply(n,i)},this.unbind=function(e,t,n){if(!this._mSubscriptions[e])throw new Error("No subscribtions to unsubscribe for event "+e);var i,o=!1;for(i=0;i<this._mSubscriptions[e].length;i++)t&&this._mSubscriptions[e][i].fn!==t||n&&n!==this._mSubscriptions[e][i].ctx||(this._mSubscriptions[e].splice(i,1),o=!0);if(0==o)throw new Error("Nothing to unbind for "+e)},this.off=this.unbind,this.trigger=this.emit}}()},function(e){var t=e.exports={version:"2.5.6"};"number"==typeof __e&&(__e=t)},function(e,t,n){var i=n(1),o=n(26),s=n(12),a=n(27),u=n(66),d=n(0),f=function(e){function t(e,n,o){var s;return h(this,t),(s=l(this,(t.__proto__||Object.getPrototypeOf(t)).call(this))).config=s._extendItemNode(n),s.type=n.type,s.contentItems=[],s.parent=o,s.isInitialised=!1,s.isMaximised=!1,s.isRoot=!1,s.isRow=!1,s.isColumn=!1,s.isStack=!1,s.isComponent=!1,s.layoutManager=e,s._pendingEventPropagations={},s._throttledEvents=["stateChanged"],s.on(i.a,s._propagateEvent,s),n.content&&s._createContentItems(n),s}return c(t,i.b),r(t,[{key:"setSize",value:function(){throw new Error("Abstract Method")}},{key:"callDownwards",value:function(e,t,n,i){var o;for(!0!==n&&!0!==i&&this[e].apply(this,t||[]),o=0;o<this.contentItems.length;o++)this.contentItems[o].callDownwards(e,t,n);!0===n&&!0!==i&&this[e].apply(this,t||[])}},{key:"removeChild",value:function(e,t){var n=Object(d.g)(e,this.contentItems);if(-1===n)throw new Error("Can't remove child item. Unknown content item");!0!==t&&this.contentItems[n]._$destroy(),this.contentItems.splice(n,1),this.config.content.splice(n,1),0<this.contentItems.length?this.callDownwards("setSize"):!(this instanceof s.a)&&!0===this.config.isClosable&&this.parent.removeChild(this)}},{key:"undisplayChild",value:function(e){if(-1===Object(d.g)(e,this.contentItems))throw new Error("Can't remove child item. Unknown content item");this instanceof s.a||!0!==this.config.isClosable||this.parent.undisplayChild(this)}},{key:"addChild",value:function(e,t){void 0===t&&(t=this.contentItems.length),this.contentItems.splice(t,0,e),void 0===this.config.content&&(this.config.content=[]),this.config.content.splice(t,0,e.config),e.parent=this,!0===e.parent.isInitialised&&!1===e.isInitialised&&e._$init()}},{key:"replaceChild",value:function(e,t,n){t=this.layoutManager._$normalizeContentItem(t);var i=Object(d.g)(e,this.contentItems),o=e.element[0].parentNode;if(-1===i)throw new Error("Can't replace child. oldChild is not child of this");o.replaceChild(t.element[0],e.element[0]),!0===n&&(e.parent=null,e._$destroy()),this.contentItems[i]=t,t.parent=this,this.isStack&&(this.header.tabs[i].contentItem=t),!0===t.parent.isInitialised&&!1===t.isInitialised&&t._$init(),this.callDownwards("setSize")}},{key:"remove",value:function(){this.parent.removeChild(this)}},{key:"popout",value:function(){var e=this.layoutManager.createPopout(this);return this.emitBubblingEvent("stateChanged"),e}},{key:"toggleMaximise",value:function(e){e&&e.preventDefault(),!0===this.isMaximised?this.layoutManager._$minimiseItem(this):this.layoutManager._$maximiseItem(this),this.isMaximised=!this.isMaximised,this.emitBubblingEvent("stateChanged")}},{key:"select",value:function(){this.layoutManager.selectedItem!==this&&(this.layoutManager.selectItem(this,!0),this.element.addClass("lm_selected"))}},{key:"deselect",value:function(){this.layoutManager.selectedItem===this&&(this.layoutManager.selectedItem=null,this.element.removeClass("lm_selected"))}},{key:"setTitle",value:function(e){this.config.title=e,this.emit("titleChanged",e),this.emit("stateChanged")}},{key:"hasId",value:function(e){return!!this.config.id&&("string"==typeof this.config.id?this.config.id===e:this.config.id instanceof Array?-1!==Object(d.g)(e,this.config.id):void 0)}},{key:"addId",value:function(e){this.hasId(e)||(this.config.id?"string"==typeof this.config.id?this.config.id=[this.config.id,e]:this.config.id instanceof Array&&this.config.id.push(e):this.config.id=e)}},{key:"removeId",value:function(e){if(!this.hasId(e))throw new Error("Id not found");if("string"==typeof this.config.id)delete this.config.id;else if(this.config.id instanceof Array){var t=Object(d.g)(e,this.config.id);this.config.id.splice(t,1)}}},{key:"getItemsByFilter",value:function(e){var t=[];return function n(i){for(var o=0;o<i.contentItems.length;o++)!0===e(i.contentItems[o])&&t.push(i.contentItems[o]),n(i.contentItems[o])}(this),t}},{key:"getItemsById",value:function(e){return this.getItemsByFilter(function(t){return t.config.id instanceof Array?-1!==Object(d.g)(e,t.config.id):t.config.id===e})}},{key:"getItemsByType",value:function(e){return this._$getItemsByProperty("type",e)}},{key:"getComponentsByName",value:function(e){var t,n=this._$getItemsByProperty("componentName",e),i=[];for(t=0;t<n.length;t++)i.push(n[t].instance);return i}},{key:"_$getItemsByProperty",value:function(e,t){return this.getItemsByFilter(function(n){return n[e]===t})}},{key:"_$setParent",value:function(e){this.parent=e}},{key:"_$highlightDropZone",value:function(e,t,n){this.layoutManager.dropTargetIndicator.highlightArea(n)}},{key:"_$onDrop",value:function(e){this.addChild(e)}},{key:"_$hide",value:function(){this._callOnActiveComponents("hide"),this.element.hide(),this.layoutManager.updateSize()}},{key:"_$show",value:function(){this._callOnActiveComponents("show"),this.element.show(),this.layoutManager.updateSize()}},{key:"_callOnActiveComponents",value:function(e){var t,n,i=this.getItemsByType("stack");for(n=0;n<i.length;n++)(t=i[n].getActiveContentItem())&&t.isComponent&&t.container[e]()}},{key:"_$destroy",value:function(){this.emitBubblingEvent("beforeItemDestroyed"),this.callDownwards("_$destroy",[],!0,!0),this.element.remove(),this.emitBubblingEvent("itemDestroyed")}},{key:"_$getArea",value:function(e){var t=(e=e||this.element).offset(),n=e.width(),i=e.height();return{x1:t.left,y1:t.top,x2:t.left+n,y2:t.top+i,surface:n*i,contentItem:this}}},{key:"_$init",value:function(){var e;for(this.setSize(),e=0;e<this.contentItems.length;e++)this.childElementContainer.append(this.contentItems[e].element);this.isInitialised=!0,this.emitBubblingEvent("itemCreated"),this.emitBubblingEvent(this.type+"Created")}},{key:"emitBubblingEvent",value:function(e){var t=new o.a(e,this);this.emit(e,t)}},{key:"_createContentItems",value:function(e){var t,n;if(!(e.content instanceof Array))throw new a.a("content must be an Array",e);for(n=0;n<e.content.length;n++)t=this.layoutManager.createContentItem(e.content[n],this),this.contentItems.push(t)}},{key:"_extendItemNode",value:function(e){for(var t in u.a)void 0===e[t]&&(e[t]=u.a[t]);return e}},{key:"_propagateEvent",value:function(e,t){t instanceof o.a&&!1===t.isPropagationStopped&&!0===this.isInitialised&&(!1===this.isRoot&&this.parent?this.parent.emit.apply(this.parent,Array.prototype.slice.call(arguments,0)):this._scheduleEventPropagationToLayoutManager(e,t))}},{key:"_scheduleEventPropagationToLayoutManager",value:function(e,t){-1===Object(d.g)(e,this._throttledEvents)?this.layoutManager.emit(e,t.origin):!0!==this._pendingEventPropagations[e]&&(this._pendingEventPropagations[e]=!0,Object(d.a)(Object(d.c)(this._propagateEventToLayoutManager,this,[e,t])))}},{key:"_propagateEventToLayoutManager",value:function(e,t){this._pendingEventPropagations[e]=!1,this.layoutManager.emit(e,t)}}]),t}();t.a=f},function(e){var t=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=t)},function(e,t,n){e.exports=!n(10)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,i,o){var s=Math.round,a=o(3),u=o(13),d=o(67),f=o(0),m=function(e){function i(e,t,n,o){var s;return h(this,i),(s=l(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,t,n,o))).isRow=!e,s.isColumn=e,s.element=$('<div class="lm_item lm_'+(e?"column":"row")+'"></div>'),s.childElementContainer=s.element,s._splitterSize=t.config.dimensions.borderWidth,s._splitterGrabSize=t.config.dimensions.borderGrabWidth,s._isColumn=e,s._dimension=e?"height":"width",s._splitter=[],s._splitterPosition=null,s._splitterMinPosition=null,s._splitterMaxPosition=null,s}return c(i,a.a),r(i,[{key:"addChild",value:function(e,t,i){var o,s,r,l;if(e=this.layoutManager._$normalizeContentItem(e,this),void 0===t&&(t=this.contentItems.length),0<this.contentItems.length?(l=this._createSplitter(n(0,t-1)).element,0<t?(this.contentItems[t-1].element.after(l),l.after(e.element),this._isDocked(t-1)&&(this._splitter[t-1].element.hide(),this._splitter[t].element.show())):(this.contentItems[0].element.before(l),l.before(e.element))):this.childElementContainer.append(e.element),a.a.prototype.addChild.call(this,e,t),o=1/this.contentItems.length*100,!0!==i){for(r=0;r<this.contentItems.length;r++)this.contentItems[r]===e?e.config[this._dimension]=o:(s=this.contentItems[r].config[this._dimension]*=(100-o)/100,this.contentItems[r].config[this._dimension]=s);this.callDownwards("setSize"),this.emitBubblingEvent("stateChanged"),this._validateDocking()}else this.emitBubblingEvent("stateChanged")}},{key:"undisplayChild",value:function(e){var t,i=e.config[this._dimension],o=Object(f.g)(e,this.contentItems),s=n(o-1,0);if(-1===o)throw new Error("Can't undisplay child. ContentItem is not child of this Row or Column");this._splitter[s]&&this._splitter[s].element.hide(),s<this._splitter.length&&this._isDocked(s)&&this._splitter[s].element.hide();var r=this._isDocked();for(t=0;t<this.contentItems.length;t++)this.contentItems[t]===e?this.contentItems[t].config[this._dimension]=0:this._isDocked(t)||(this.contentItems[t].config[this._dimension]+=i/(this.contentItems.length-1-r));1===this.contentItems.length&&a.a.prototype.undisplayChild.call(this,e),this.callDownwards("setSize"),this.emitBubblingEvent("stateChanged")}},{key:"removeChild",value:function(e,t){var i,o,s=e.config[this._dimension],r=Object(f.g)(e,this.contentItems),l=n(r-1,0);if(-1===r)throw new Error("Can't remove child. ContentItem is not child of this Row or Column");this._splitter[l]&&(this._splitter[l]._$destroy(),this._splitter.splice(l,1)),l<this._splitter.length&&this._isDocked(l)&&this._splitter[l].element.hide();var c=this._isDocked();for(i=0;i<this.contentItems.length;i++)this.contentItems[i]!==e&&(this._isDocked(i)||(this.contentItems[i].config[this._dimension]+=s/(this.contentItems.length-1-c)));a.a.prototype.removeChild.call(this,e,t),1===this.contentItems.length&&!0===this.config.isClosable?(o=this.contentItems[0],this.contentItems=[],this.parent.replaceChild(this,o,!0),this._validateDocking(this.parent)):(this.callDownwards("setSize"),this.emitBubblingEvent("stateChanged"),this._validateDocking())}},{key:"replaceChild",value:function(e,t){var n=e.config[this._dimension];a.a.prototype.replaceChild.call(this,e,t),t.config[this._dimension]=n,this.callDownwards("setSize"),this.emitBubblingEvent("stateChanged")}},{key:"setSize",value:function(){0<this.contentItems.length&&(this._calculateRelativeSizes(),this._setAbsoluteSizes()),this.emitBubblingEvent("stateChanged"),this.emit("resize")}},{key:"dock",value:function(e,t,i){if(1===this.contentItems.length)throw new Error("Can't dock child when it single");var o=e.config[this._dimension],s=this.layoutManager.config.dimensions.headerHeight,r=Object(f.g)(e,this.contentItems),a=n(r-1,0);if(-1===r)throw new Error("Can't dock child. ContentItem is not child of this Row or Column");var l,c=e._docker&&e._docker.docked;if(void 0===t||t!=c){if(c){for(this._splitter[a].element.show(),l=0;l<this.contentItems.length;l++){var h=e._docker.size;this.contentItems[l]===e?e.config[this._dimension]=h:(itemSize=this.contentItems[l].config[this._dimension]*=(100-h)/100,this.contentItems[l].config[this._dimension]=itemSize)}e._docker={docked:!1}}else{if(2>this.contentItems.length-this._isDocked())throw new Error("Can't dock child when it is last in "+this.config.type);var u={column:{first:"top",last:"bottom"},row:{first:"left",last:"right"}}[this.config.type][r?"last":"first"];e.header.position()!=u&&e.header.position(u),this._splitter[a]&&this._splitter[a].element.hide();var d=this._isDocked();for(l=0;l<this.contentItems.length;l++)this.contentItems[l]===e?this.contentItems[l].config[this._dimension]=0:this._isDocked(l)||(this.contentItems[l].config[this._dimension]+=o/(this.contentItems.length-1-d));e._docker={dimension:this._dimension,size:o,realSize:e.element[this._dimension]()-s,docked:!0},i&&e.childElementContainer[this._dimension](0)}e.element.toggleClass("lm_docked",e._docker.docked),this.callDownwards("setSize"),this.emitBubblingEvent("stateChanged"),this._validateDocking()}}},{key:"_$init",value:function(){if(!0!==this.isInitialised){var e;for(a.a.prototype._$init.call(this),e=0;e<this.contentItems.length-1;e++)this.contentItems[e].element.after(this._createSplitter(e).element);for(e=0;e<this.contentItems.length;e++)this.contentItems[e]._header&&this.contentItems[e]._header.docked&&this.dock(this.contentItems[e],!0,!0)}}},{key:"_setAbsoluteSizes",value:function(){var e,t=this._calculateAbsoluteSizes();for(e=0;e<this.contentItems.length;e++)0<t.additionalPixel-e&&t.itemSizes[e]++,this._isColumn?(this.contentItems[e].element.width(t.totalWidth),this.contentItems[e].element.height(t.itemSizes[e])):(this.contentItems[e].element.width(t.itemSizes[e]),this.contentItems[e].element.height(t.totalHeight))}},{key:"_calculateAbsoluteSizes",value:function(){var e,n,i=(this.contentItems.length-1)*this._splitterSize,o=this.layoutManager.config.dimensions.headerHeight,s=this.element.width(),r=this.element.height(),a=0,l=[];for(this._isColumn?r-=i:s-=i,e=0;e<this.contentItems.length;e++)this._isDocked(e)&&(this._isColumn?r-=o-this._splitterSize:s-=o-this._splitterSize);for(e=0;e<this.contentItems.length;e++)n=this._isColumn?t(r*(this.contentItems[e].config.height/100)):t(s*(this.contentItems[e].config.width/100)),this._isDocked(e)&&(n=o),a+=n,l.push(n);return{itemSizes:l,additionalPixel:t((this._isColumn?r:s)-a),totalWidth:s,totalHeight:r}}},{key:"_calculateRelativeSizes",value:function(){var e,t=0,n=[],i=this._isColumn?"height":"width";for(e=0;e<this.contentItems.length;e++)void 0===this.contentItems[e].config[i]?n.push(this.contentItems[e]):t+=this.contentItems[e].config[i];if(100!==s(t))if(100>s(t)&&0<n.length){for(e=0;e<n.length;e++)n[e].config[i]=(100-t)/n.length;this._respectMinItemWidth()}else{if(100<s(t))for(e=0;e<n.length;e++)n[e].config[i]=50,t+=50;for(e=0;e<this.contentItems.length;e++)this.contentItems[e].config[i]=this.contentItems[e].config[i]/t*100;this._respectMinItemWidth()}else this._respectMinItemWidth()}},{key:"_respectMinItemWidth",value:function(){var e,t,n,i=this.layoutManager.config.dimensions&&this.layoutManager.config.dimensions.minItemWidth||0,o=null,r=[],a=0,l=0,c=0,h=0,u=[];if(!(this._isColumn||!i||1>=this.contentItems.length)){o=this._calculateAbsoluteSizes();for(var d=0;d<this.contentItems.length;d++)this.contentItems[d],(h=o.itemSizes[d])<i?(l+=i-h,n={width:i}):(a+=h-i,n={width:h},r.push(n)),u.push(n);if(!(0==l||l>a)){for(e=l/a,c=l,d=0;d<r.length;d++)n=r[d],c-=t=s((n.width-i)*e),n.width-=t;for(0!==c&&(u[u.length-1].width-=c),d=0;d<this.contentItems.length;d++)this.contentItems[d].config.width=u[d].width/o.totalWidth*100}}}},{key:"_createSplitter",value:function(e){var t;return(t=new d.a(this._isColumn,this._splitterSize,this._splitterGrabSize)).on("drag",Object(f.c)(this._onSplitterDrag,this,[t]),this),t.on("dragStop",Object(f.c)(this._onSplitterDragStop,this,[t]),this),t.on("dragStart",Object(f.c)(this._onSplitterDragStart,this,[t]),this),this._splitter.splice(e,0,t),t}},{key:"_getItemsForSplitter",value:function(e){var t=Object(f.g)(e,this._splitter);return{before:this.contentItems[t],after:this.contentItems[t+1]}}},{key:"_isDocked",value:function(e){if(void 0===e){for(var t=0,n=0;n<this.contentItems.length;++n)this._isDocked(n)&&t++;return t}return e<this.contentItems.length?this.contentItems[e]._docker&&this.contentItems[e]._docker.docked:void 0}},{key:"_validateDocking",value:function(e){for(var t=1<(e=e||this).contentItems.length-e._isDocked(),n=0;n<e.contentItems.length;++n)e.contentItems[n]instanceof u.a&&(e.contentItems[n].header._setDockable(e._isDocked(n)||t),e.contentItems[n].header._$setClosable(t))}},{key:"_getMinimumDimensions",value:function(e){for(var t=0,i=0,o=0;o<e.length;++o)t=n(e[o].minWidth||0,t),i=n(e[o].minHeight||0,i);return{horizontal:t,vertical:i}}},{key:"_onSplitterDragStart",value:function(e){var t=this._getItemsForSplitter(e),n=this.layoutManager.config.dimensions[this._isColumn?"minItemHeight":"minItemWidth"],i=this._getMinimumDimensions(t.before.config.content),o=this._isColumn?i.vertical:i.horizontal,s=this._getMinimumDimensions(t.after.config.content),r=this._isColumn?s.vertical:s.horizontal;this._splitterPosition=0,this._splitterMinPosition=-1*(t.before.element[this._dimension]()-(o||n)),this._splitterMaxPosition=t.after.element[this._dimension]()-(r||n)}},{key:"_onSplitterDrag",value:function(e,t,n){var i=this._isColumn?n:t;i>this._splitterMinPosition&&i<this._splitterMaxPosition&&(this._splitterPosition=i,e.element.css(this._isColumn?"top":"left",i))}},{key:"_onSplitterDragStop",value:function(e){var t=this._getItemsForSplitter(e),n=t.before.element[this._dimension](),i=t.after.element[this._dimension](),o=(this._splitterPosition+n)/(n+i),s=t.before.config[this._dimension]+t.after.config[this._dimension];t.before.config[this._dimension]=o*s,t.after.config[this._dimension]=(1-o)*s,e.element.css({top:0,left:0}),Object(f.a)(Object(f.c)(this.callDownwards,this,["setSize"]))}}]),i}();i.a=m},function(e,t,n){var i=n(1),o=n(0),s=function(e){function t(e,n){var i;return h(this,t),(i=l(this,(t.__proto__||Object.getPrototypeOf(t)).call(this)))._timeout=null,i._eElement=$(e),i._oDocument=$(document),i._eBody=$(document.body),i._nButtonCode=n||0,i._nDelay=200,i._nDistance=10,i._nX=0,i._nY=0,i._nOriginalX=0,i._nOriginalY=0,i._bDragging=!1,i._fMove=Object(o.c)(i.onMouseMove,i),i._fUp=Object(o.c)(i.onMouseUp,i),i._fDown=Object(o.c)(i.onMouseDown,i),i._eElement.on("mousedown touchstart",i._fDown),i}return c(t,i.b),r(t,[{key:"destroy",value:function(){this._eElement.unbind("mousedown touchstart",this._fDown),this._oDocument.unbind("mouseup touchend",this._fUp),this._eElement=null,this._oDocument=null,this._eBody=null}},{key:"onMouseDown",value:function(e){if(e.preventDefault(),0==e.button||"touchstart"===e.type){var t=this._getCoordinates(e);this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.on("mousemove touchmove",this._fMove),this._oDocument.one("mouseup touchend",this._fUp),this._timeout=setTimeout(Object(o.c)(this._startDrag,this),this._nDelay)}}},{key:"onMouseMove",value:function(e){var t=Math.abs;if(null!=this._timeout){e.preventDefault();var n=this._getCoordinates(e);this._nX=n.x-this._nOriginalX,this._nY=n.y-this._nOriginalY,!1===this._bDragging&&(t(this._nX)>this._nDistance||t(this._nY)>this._nDistance)&&(clearTimeout(this._timeout),this._startDrag()),this._bDragging&&this.emit("drag",this._nX,this._nY,e)}}},{key:"onMouseUp",value:function(e){null!=this._timeout&&(clearTimeout(this._timeout),this._eBody.removeClass("lm_dragging"),this._eElement.removeClass("lm_dragging"),this._oDocument.find("iframe").css("pointer-events",""),this._oDocument.unbind("mousemove touchmove",this._fMove),this._oDocument.unbind("mouseup touchend",this._fUp),!0===this._bDragging&&(this._bDragging=!1,this.emit("dragStop",e,this._nOriginalX+this._nX)))}},{key:"_startDrag",value:function(){this._bDragging=!0,this._eBody.addClass("lm_dragging"),this._eElement.addClass("lm_dragging"),this._oDocument.find("iframe").css("pointer-events","none"),this.emit("dragStart",this._nOriginalX,this._nOriginalY)}},{key:"_getCoordinates",value:function(e){return{x:(e=Object(o.e)(e)).pageX,y:e.pageY}}}]),t}();t.a=s},function(e,t,n){var i=n(9);e.exports=function(e){if(!i(e))throw TypeError(e+" is not an object!");return e}},function(e){e.exports=function(e){return"object"==(void 0===e?"undefined":a(e))?null!==e:"function"==typeof e}},function(e){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){var i=n(0);t.a=function(){function e(){if(h(this,e),this._keys=["settings","hasHeaders","constrainDragToContainer","selectionEnabled","dimensions","borderWidth","minItemHeight","minItemWidth","headerHeight","dragProxyWidth","dragProxyHeight","labels","close","maximise","minimise","popout","content","componentName","componentState","id","width","type","height","isClosable","title","popoutWholeStack","openPopouts","parentId","activeItemIndex","reorderEnabled","borderGrabWidth"],36<this._keys.length)throw new Error("Too many keys in config minifier map");this._values=[!0,!1,"row","column","stack","component","close","maximise","minimise","open in new window"]}return r(e,[{key:"minifyConfig",value:function(e){var t={};return this._nextLevel(e,t,"_min"),t}},{key:"unminifyConfig",value:function(e){var t={};return this._nextLevel(e,t,"_max"),t}},{key:"_nextLevel",value:function(e,t,n){var i,o;for(i in e)e instanceof Array&&(i=parseInt(i,10)),e.hasOwnProperty(i)&&(o=this[n](i,this._keys),"object"==a(e[i])?(t[o]=e[i]instanceof Array?[]:{},this._nextLevel(e[i],t[o],n)):t[o]=this[n](e[i],this._values))}},{key:"_min",value:function(e,t){if("string"==typeof e&&1===e.length)return"___"+e;var n=Object(i.g)(e,t);return-1===n?e:n.toString(36)}},{key:"_max",value:function(e,t){return"string"==typeof e&&1===e.length?t[parseInt(e,36)]:"string"==typeof e&&"___"===e.substr(0,3)?e[3]:e}}]),e}()},function(e,t,n){var i=n(3),o=n(6),s=function(e){function t(e,n,i){var o;return h(this,t),(o=l(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n,null))).isRoot=!0,o.type="root",o.element=$('<div class="lm_goldenlayout lm_item lm_root"></div>'),o.childElementContainer=o.element,o._containerElement=i,o._containerElement.append(o.element),o}return c(t,i.a),r(t,[{key:"addChild",value:function(e){if(0<this.contentItems.length)throw new Error("Root node can only have a single child");e=this.layoutManager._$normalizeContentItem(e,this),this.childElementContainer.append(e.element),i.a.prototype.addChild.call(this,e),this.callDownwards("setSize"),this.emitBubblingEvent("stateChanged")}},{key:"setSize",value:function(e,t){e=void 0===e?this._containerElement.width():e,t=void 0===t?this._containerElement.height():t,this.element.width(e),this.element.height(t),this.contentItems[0]&&(this.contentItems[0].element.width(e),this.contentItems[0].element.height(t))}},{key:"_$highlightDropZone",value:function(){this.layoutManager.tabDropPlaceholder.remove(),i.a.prototype._$highlightDropZone.apply(this,arguments)}},{key:"_$onDrop",value:function(e,t){var n;if(e.isComponent&&((n=this.layoutManager.createContentItem({type:"stack",header:e.config.header||{}},this))._$init(),n.addChild(e),e=n),this.contentItems.length){("row"===e.config.type||"column"===e.config.type)&&((n=this.layoutManager.createContentItem({type:"stack"},this)).addChild(e),e=n);var i="x"==t.side[0]?"row":"column",s="x"==t.side[0]?"width":"height",r="2"==t.side[1],a=this.contentItems[0];if(a instanceof o.a&&a.type==i){var l=a.contentItems[r?0:a.contentItems.length-1];a.addChild(e,r?0:void 0,!0),l.config[s]*=.5,e.config[s]=l.config[s],a.callDownwards("setSize")}else{var c=this.layoutManager.createContentItem({type:i},this);this.replaceChild(a,c),c.addChild(e,r?0:void 0,!0),c.addChild(a,r?void 0:0,!0),a.config[s]=50,e.config[s]=50,c.callDownwards("setSize")}}else this.addChild(e)}}]),t}();t.a=s},function(t,i,o){var s=o(3),a=o(6),u=o(28),d=o(0),f=function(t){function i(e,t,n){var o;h(this,i),(o=l(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,e,t,n))).element=$('<div class="lm_item lm_stack"></div>'),o._activeContentItem=null;var s=e.config;return o._header={show:!0===s.settings.hasHeaders&&!1!==t.hasHeaders,popout:s.settings.showPopoutIcon&&s.labels.popout,maximise:s.settings.showMaximiseIcon&&s.labels.maximise,close:s.settings.showCloseIcon&&s.labels.close,minimise:s.labels.minimise},s.header&&Object(d.b)(o._header,s.header),t.header&&Object(d.b)(o._header,t.header),t.content&&t.content[0]&&t.content[0].header&&Object(d.b)(o._header,t.content[0].header),o._dropZones={},o._dropSegment=null,o._contentAreaDimensions=null,o._dropIndex=null,o.isStack=!0,o.childElementContainer=$('<div class="lm_items"></div>'),o.header=new u.a(e,o),o.element.on("mouseleave mouseenter",Object(d.c)(function(e){this._docker&&this._docker.docked&&this.childElementContainer[this._docker.dimension]("mouseenter"==e.type?this._docker.realSize:0)},o)),o.element.append(o.header.element),o.element.append(o.childElementContainer),o._setupHeaderPosition(),o._$validateClosability(),o}return c(i,s.a),r(i,[{key:"dock",value:function(e){this._header.dock&&this.parent instanceof a.a&&this.parent.dock(this,e)}},{key:"setSize",value:function(){if("none"!==this.element.css("display")){var e=this._docker&&this._docker.docked,t={width:this.element.width(),height:this.element.height()};this._header.show&&(t[this._sided?"width":"height"]-=this.layoutManager.config.dimensions.headerHeight),e&&(t[this._docker.dimension]=this._docker.realSize),e&&"height"!=this._docker.dimension||this.childElementContainer.width(t.width),e&&"width"!=this._docker.dimension||this.childElementContainer.height(t.height);for(var n=0;n<this.contentItems.length;n++)this.contentItems[n].element.width(t.width),this.contentItems[n].element.height(t.height);this.emit("resize"),this.emitBubblingEvent("stateChanged")}}},{key:"_$init",value:function(){var e,t;if(!0!==this.isInitialised){for(s.a.prototype._$init.call(this),e=0;e<this.contentItems.length;e++)this.header.createTab(this.contentItems[e]),this.contentItems[e]._$hide();if(0<this.contentItems.length){if(!(t=this.contentItems[this.config.activeItemIndex||0]))throw new Error("Configured activeItemIndex out of bounds");this.setActiveContentItem(t)}}}},{key:"setActiveContentItem",value:function(e){if(-1===Object(d.g)(e,this.contentItems))throw new Error("contentItem is not a child of this stack");null!==this._activeContentItem&&this._activeContentItem._$hide(),this._activeContentItem=e,this.header.setActiveContentItem(e),e._$show(),this.emit("activeContentItemChanged",e),this.layoutManager.emit("activeContentItemChanged",e),this.emitBubblingEvent("stateChanged")}},{key:"getActiveContentItem",value:function(){return this.header.activeContentItem}},{key:"addChild",value:function(e,t){t>this.contentItems.length&&(t-=1),e=this.layoutManager._$normalizeContentItem(e,this),s.a.prototype.addChild.call(this,e,t),this.childElementContainer.append(e.element),this.header.createTab(e,t),this.setActiveContentItem(e),this.callDownwards("setSize"),this._$validateClosability(),this.parent instanceof a.a&&this.parent._validateDocking(),this.emitBubblingEvent("stateChanged")}},{key:"removeChild",value:function(e,t){var i=Object(d.g)(e,this.contentItems);s.a.prototype.removeChild.call(this,e,t),this.header.removeTab(e),this.header.activeContentItem===e&&(0<this.contentItems.length?this.setActiveContentItem(this.contentItems[n(i-1,0)]):this._activeContentItem=null),this._$validateClosability(),this.parent instanceof a.a&&this.parent._validateDocking(),this.emitBubblingEvent("stateChanged")}},{key:"undisplayChild",value:function(e){if(1<this.contentItems.length){var t=Object(d.g)(e,this.contentItems);e._$hide&&e._$hide(),this.setActiveContentItem(this.contentItems[0===t?t+1:t-1])}else this.header.hideTab(e),e._$hide&&e._$hide(),s.a.prototype.undisplayChild.call(this,e),this.parent instanceof a.a&&this.parent._validateDocking();this.emitBubblingEvent("stateChanged")}},{key:"_$validateClosability",value:function(){var e,t,n;for(e=this.header._isClosable(),n=0,t=this.contentItems.length;n<t&&e;n++)e=this.contentItems[n].config.isClosable;this.header._$setClosable(e)}},{key:"_$destroy",value:function(){s.a.prototype._$destroy.call(this),this.header._$destroy(),this.element.off("mouseenter mouseleave")}},{key:"_$onDrop",value:function(e){if("header"===this._dropSegment)return this._resetHeaderDropZone(),void this.addChild(e,this._dropIndex);if("body"!==this._dropSegment){var t,n,i,o="top"===this._dropSegment||"bottom"===this._dropSegment,s="left"===this._dropSegment||"right"===this._dropSegment,r="top"===this._dropSegment||"left"===this._dropSegment,a=o&&this.parent.isColumn||s&&this.parent.isRow,l=o?"column":"row",c=o?"height":"width";e.isComponent&&((n=this.layoutManager.createContentItem({type:"stack",header:e.config.header||{}},this))._$init(),n.addChild(e),e=n),("row"===e.config.type||"column"===e.config.type)&&((n=this.layoutManager.createContentItem({type:"stack"},this)).addChild(e),e=n),a?(t=Object(d.g)(this,this.parent.contentItems),this.parent.addChild(e,r?t:t+1,!0),this.config[c]*=.5,e.config[c]=this.config[c],this.parent.callDownwards("setSize")):(l=o?"column":"row",i=this.layoutManager.createContentItem({type:l},this),this.parent.replaceChild(this,i),i.addChild(e,r?0:void 0,!0),i.addChild(this,r?void 0:0,!0),this.config[c]=50,e.config[c]=50,i.callDownwards("setSize")),this.parent._validateDocking()}else this.addChild(e)}},{key:"_$highlightDropZone",value:function(e,t){var n,i;for(n in this._contentAreaDimensions)if((i=this._contentAreaDimensions[n].hoverArea).x1<e&&i.x2>e&&i.y1<t&&i.y2>t)return void("header"===n?(this._dropSegment="header",this._highlightHeaderDropZone(this._sided?t:e)):(this._resetHeaderDropZone(),this._highlightBodyDropZone(n)))}},{key:"_$getArea",value:function(){if("none"===this.element.css("display"))return null;var e=s.a.prototype._$getArea,t=e.call(this,this.header.element),n=e.call(this,this.childElementContainer),i=n.x2-n.x1,o=n.y2-n.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},this._activeContentItem&&!1===this._activeContentItem.isComponent?t:0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:n.x1,y1:n.y1,x2:n.x2,y2:n.y2},highlightArea:{x1:n.x1,y1:n.y1,x2:n.x2,y2:n.y2}},e.call(this,this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:n.x1,y1:n.y1,x2:n.x1+.25*i,y2:n.y2},highlightArea:{x1:n.x1,y1:n.y1,x2:n.x1+.5*i,y2:n.y2}},this._contentAreaDimensions.top={hoverArea:{x1:n.x1+.25*i,y1:n.y1,x2:n.x1+.75*i,y2:n.y1+.5*o},highlightArea:{x1:n.x1,y1:n.y1,x2:n.x2,y2:n.y1+.5*o}},this._contentAreaDimensions.right={hoverArea:{x1:n.x1+.75*i,y1:n.y1,x2:n.x2,y2:n.y2},highlightArea:{x1:n.x1+.5*i,y1:n.y1,x2:n.x2,y2:n.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:n.x1+.25*i,y1:n.y1+.5*o,x2:n.x1+.75*i,y2:n.y2},highlightArea:{x1:n.x1,y1:n.y1+.5*o,x2:n.x2,y2:n.y2}},e.call(this,this.element))}},{key:"_highlightHeaderDropZone",value:function(t){var n,i,o,s,r,a,l,c,h=this.header.tabs.length,u=!1;if(0===h)return l=this.header.element.offset(),void this.layoutManager.dropTargetIndicator.highlightArea({x1:l.left,x2:l.left+100,y1:l.top+this.header.element.height()-20,y2:l.top+this.header.element.height()});for(n=0;n<h;n++)if(r=(i=this.header.tabs[n].element).offset(),this._sided?(s=r.top,o=r.left,c=i.height()):(s=r.left,o=r.top,c=i.width()),t>s&&t<s+c){u=!0;break}if(!(0==u&&t<s)){if(t<s+c/2?(this._dropIndex=n,i.before(this.layoutManager.tabDropPlaceholder)):(this._dropIndex=e(n+1,h),i.after(this.layoutManager.tabDropPlaceholder)),this._sided){var d=this.layoutManager.tabDropPlaceholder.offset().top;return void this.layoutManager.dropTargetIndicator.highlightArea({x1:o,x2:o+i.innerHeight(),y1:d,y2:d+this.layoutManager.tabDropPlaceholder.width()})}a=this.layoutManager.tabDropPlaceholder.offset().left,this.layoutManager.dropTargetIndicator.highlightArea({x1:a,x2:a+this.layoutManager.tabDropPlaceholder.width(),y1:o,y2:o+i.innerHeight()})}}},{key:"_resetHeaderDropZone",value:function(){this.layoutManager.tabDropPlaceholder.remove()}},{key:"toggleMaximise",value:function(e){this.isMaximised||this.dock(!1),s.a.prototype.toggleMaximise.call(this,e)}},{key:"_setupHeaderPosition",value:function(){var e=0<=["right","left","bottom"].indexOf(this._header.show)&&this._header.show;if(this.header.element.toggle(!!this._header.show),this._side=e,this._sided=0<=["right","left"].indexOf(this._side),this.element.removeClass("lm_left lm_right lm_bottom"),this._side&&this.element.addClass("lm_"+this._side),this.element.find(".lm_header").length&&this.childElementContainer){var t=0<=["right","bottom"].indexOf(this._side)?"before":"after";this.header.element[t](this.childElementContainer),this.callDownwards("setSize")}}},{key:"_highlightBodyDropZone",value:function(e){var t=this._contentAreaDimensions[e].highlightArea;this.layoutManager.dropTargetIndicator.highlightArea(t),this._dropSegment=e}}]),i}();i.a=f},function(e){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){var i=n(44),o=n(20);e.exports=Object.keys||function(e){return i(e,o)}},function(e){var t={}.hasOwnProperty;e.exports=function(e,n){return t.call(e,n)}},function(e,t,n){var i=n(45),o=n(14);e.exports=function(e){return i(o(e))}},function(e){var n=Math.ceil;e.exports=function(e){return isNaN(e=+e)?0:(0<e?t:n)(e)}},function(e,t,n){var i=n(50)("keys"),o=n(52);e.exports=function(e){return i[e]||(i[e]=o(e))}},function(e){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(e,t,n){var i=n(4),o=n(2),s=n(54),r=n(56),a=n(16),l="prototype",c=function e(t,n,c){var h,u,d,f=t&e.F,m=t&e.G,p=t&e.S,g=t&e.P,y=t&e.B,v=t&e.W,_=m?o:o[n]||(o[n]={}),b=_[l],w=m?i:p?i[n]:(i[n]||{})[l];for(h in m&&(c=n),c)(u=!f&&w&&void 0!==w[h])&&a(_,h)||(d=u?w[h]:c[h],_[h]=m&&"function"!=typeof w[h]?c[h]:y&&u?s(d,i):v&&w[h]==d?function(e){var t=function(t,n,i){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,i)}return e.apply(this,arguments)};return t[l]=e[l],t}(d):g&&"function"==typeof d?s(Function.call,d):d,g&&((_.virtual||(_.virtual={}))[h]=d,t&e.R&&b&&!b[h]&&r(b,h,d)))};c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,e.exports=c},function(e,t,n){var i=n(8),o=n(57),s=n(58),r=Object.defineProperty;t.f=n(5)?Object.defineProperty:function(e,t,n){if(i(e),t=s(t,!0),i(n),o)try{return r(e,t,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var i=n(9),o=n(4).document,s=i(o)&&i(o.createElement);e.exports=function(e){return s?o.createElement(e):{}}},function(e,t){t.a=function(){function e(t,n){h(this,e),this._reactComponent=null,this._originalComponentWillUpdate=null,this._container=t,this._initialState=n,this._reactClass=this._getReactClass(),this._container.on("open",this._render,this),this._container.on("destroy",this._destroy,this)}return r(e,[{key:"_render",value:function(){this._reactComponent=ReactDOM.render(this._getReactComponent(),this._container.getElement()[0]),this._originalComponentWillUpdate=this._reactComponent.componentWillUpdate||function(){},this._reactComponent.componentWillUpdate=this._onUpdate.bind(this),this._container.getState()&&this._reactComponent.setState(this._container.getState())}},{key:"_destroy",value:function(){ReactDOM.unmountComponentAtNode(this._container.getElement()[0]),this._container.off("open",this._render,this),this._container.off("destroy",this._destroy,this)}},{key:"_onUpdate",value:function(e,t){this._container.setState(t),this._originalComponentWillUpdate.call(this._reactComponent,e,t)}},{key:"_getReactClass",value:function(){var e,t=this._container._config.component;if(!t)throw new Error("No react component name. type: react-component needs a field `component`");if(!(e=this._container.layoutManager.getComponent(t)))throw new Error('React component "'+t+'" not found. Please register all components with GoldenLayout using `registerComponent(name, component)`');return e}},{key:"_getReactComponent",value:function(){var e={glEventHub:this._container.layoutManager.eventHub,glContainer:this._container},t=$.extend(e,this._container._config.props);return React.createElement(this._reactClass,t)}}]),e}()},function(e,t,n){var i=n(1),o=n(0),s=function(e){function t(e){var n;return h(this,t),(n=l(this,(t.__proto__||Object.getPrototypeOf(t)).call(this)))._layoutManager=e,n._dontPropagateToParent=null,n._childEventSource=null,n.on(i.a,Object(o.c)(n._onEventFromThis,n)),n._boundOnEventFromChild=Object(o.c)(n._onEventFromChild,n),$(window).on("gl_child_event",n._boundOnEventFromChild),n}return c(t,i.b),r(t,[{key:"_onEventFromThis",value:function(){var e=Array.prototype.slice.call(arguments);this._layoutManager.isSubWindow&&e[0]!==this._dontPropagateToParent&&this._propagateToParent(e),this._propagateToChildren(e),this._dontPropagateToParent=null,this._childEventSource=null}},{key:"_$onEventFromParent",value:function(e){this._dontPropagateToParent=e[0],this.emit.apply(this,e)}},{key:"_onEventFromChild",value:function(e){this._childEventSource=e.originalEvent.__gl,this.emit.apply(this,e.originalEvent.__glArgs)}},{key:"_propagateToParent",value:function(e){var t,n="gl_child_event";document.createEvent?(t=window.opener.document.createEvent("HTMLEvents")).initEvent(n,!0,!0):(t=window.opener.document.createEventObject()).eventType=n,t.eventName=n,t.__glArgs=e,t.__gl=this._layoutManager,document.createEvent?window.opener.dispatchEvent(t):window.opener.fireEvent("on"+t.eventType,t)}},{key:"_propagateToChildren",value:function(e){var t,n;for(n=0;n<this._layoutManager.openPopouts.length;n++)(t=this._layoutManager.openPopouts[n].getGlInstance())&&t!==this._childEventSource&&t.eventHub._$onEventFromParent(e)}},{key:"destroy",value:function(){$(window).off("gl_child_event",this._boundOnEventFromChild)}}]),t}();t.a=s},function(e,t){t.a=function(){function e(t,n){h(this,e),this.name=t,this.origin=n,this.isPropagationStopped=!1}return r(e,[{key:"stopPropagation",value:function(){this.isPropagationStopped=!0}}]),e}()},function(e,t){var n=function(e){function t(e,n){var i;return h(this,t),(i=l(this,(t.__proto__||Object.getPrototypeOf(t)).call(this))).name="Configuration Error",i.message=e,i.node=n,i}return c(t,Error),t}();t.a=n},function(e,t,n){var i=n(1),o=n(29),s=n(31),a=n(0),u=function(e){function t(e,n){var i;return h(this,t),(i=l(this,(t.__proto__||Object.getPrototypeOf(t)).call(this))).layoutManager=e,i.element=$('<div class="lm_header"><ul class="lm_tabs"></ul><ul class="lm_controls"></ul><ul class="lm_tabdropdown_list"></ul></div>'),!0===i.layoutManager.config.settings.selectionEnabled&&(i.element.addClass("lm_selectable"),i.element.on("click touchstart",Object(a.c)(i._onHeaderClick,i))),i.tabsContainer=i.element.find(".lm_tabs"),i.tabDropdownContainer=i.element.find(".lm_tabdropdown_list"),i.tabDropdownContainer.hide(),i.controlsContainer=i.element.find(".lm_controls"),i.parent=n,i.parent.on("resize",i._updateTabSizes,i),i.tabs=[],i.tabsMarkedForRemoval=[],i.activeContentItem=null,i.closeButton=null,i.dockButton=null,i.tabDropdownButton=null,i.hideAdditionalTabsDropdown=Object(a.c)(i._hideAdditionalTabsDropdown,i),$(document).mouseup(i.hideAdditionalTabsDropdown),i._lastVisibleTabIndex=-1,i._tabControlOffset=i.layoutManager.config.settings.tabControlOffset,i._createControls(),i}return c(t,i.b),r(t,[{key:"createTab",value:function(e,t){var n,i;for(i=0;i<this.tabs.length;i++)if(this.tabs[i].contentItem===e)return;return n=new o.a(this,e),0===this.tabs.length?(this.tabs.push(n),void this.tabsContainer.append(n.element)):(void 0===t&&(t=this.tabs.length),0<t?this.tabs[t-1].element.after(n.element):this.tabs[0].element.before(n.element),this.tabs.splice(t,0,n),void this._updateTabSizes())}},{key:"removeTab",value:function(e){for(var t=0;t<this.tabs.length;t++)if(this.tabs[t].contentItem===e)return this.tabs[t]._$destroy(),void this.tabs.splice(t,1);for(t=0;t<this.tabsMarkedForRemoval.length;t++)if(this.tabsMarkedForRemoval[t].contentItem===e)return this.tabsMarkedForRemoval[t]._$destroy(),void this.tabsMarkedForRemoval.splice(t,1);throw new Error("contentItem is not controlled by this header")}},{key:"hideTab",value:function(e){for(var t=0;t<this.tabs.length;t++)if(this.tabs[t].contentItem===e)return this.tabs[t].element.hide(),this.tabsMarkedForRemoval.push(this.tabs[t]),void this.tabs.splice(t,1);throw new Error("contentItem is not controlled by this header")}},{key:"setActiveContentItem",value:function(e){var t,n,i,o;for(t=0;t<this.tabs.length;t++)i=this.tabs[t].contentItem===e,this.tabs[t].setActive(i),!0===i&&(this.activeContentItem=e,this.parent.config.activeItemIndex=t);if(this.layoutManager.config.settings.reorderOnTabMenuClick&&-1!==this._lastVisibleTabIndex&&this.parent.config.activeItemIndex>this._lastVisibleTabIndex){for(o=this.tabs[this.parent.config.activeItemIndex],n=this.parent.config.activeItemIndex;0<n;n--)this.tabs[n]=this.tabs[n-1];this.tabs[0]=o,this.parent.config.activeItemIndex=0}this._updateTabSizes(),this.parent.emitBubblingEvent("stateChanged")}},{key:"position",value:function(e){var t=this.parent._header.show;if(this.parent._docker&&this.parent._docker.docked)throw new Error("Can't change header position in docked stack");return t&&!this.parent._side&&(t="top"),void 0!==e&&this.parent._header.show!=e&&(this.parent._header.show=e,this.parent._setupHeaderPosition()),t}},{key:"_$setClosable",value:function(e){return this._canDestroy=e||1<this.tabs.length,this.closeButton&&this._isClosable()&&(this.closeButton.element[e?"show":"hide"](),!0)}},{key:"_setDockable",value:function(e){return this.dockButton&&this.parent._header&&this.parent._header.dock&&(this.dockButton.element.toggle(!!e),!0)}},{key:"_$destroy",value:function(){this.emit("destroy",this);for(var e=0;e<this.tabs.length;e++)this.tabs[e]._$destroy();$(document).off("mouseup",this.hideAdditionalTabsDropdown),this.element.remove()}},{key:"_getHeaderSetting",value:function(e){if(e in this.parent._header)return this.parent._header[e]}},{key:"_createControls",value:function(){var e,t,n,i,o,r,l,c,h;if(h=Object(a.c)(this._showAdditionalTabsDropdown,this),c=this.layoutManager.config.labels.tabDropdown,this.tabDropdownButton=new s.a(this,c,"lm_tabdropdown",h),this.tabDropdownButton.element.hide(),this.parent._header&&this.parent._header.dock){var u=Object(a.c)(this.parent.dock,this.parent);n=this._getHeaderSetting("dock"),this.dockButton=new s.a(this,n,"lm_dock",u)}this._getHeaderSetting("popout")&&(t=Object(a.c)(this._onPopoutClick,this),n=this._getHeaderSetting("popout"),new s.a(this,n,"lm_popout",t)),this._getHeaderSetting("maximise")&&(r=Object(a.c)(this.parent.toggleMaximise,this.parent),i=this._getHeaderSetting("maximise"),o=this._getHeaderSetting("minimise"),l=new s.a(this,i,"lm_maximise",r),this.parent.on("maximised",function(){l.element.attr("title",o)}),this.parent.on("minimised",function(){l.element.attr("title",i)})),this._isClosable()&&(e=Object(a.c)(this.parent.remove,this.parent),n=this._getHeaderSetting("close"),this.closeButton=new s.a(this,n,"lm_close",e))}},{key:"_showAdditionalTabsDropdown",value:function(){this.tabDropdownContainer.show()}},{key:"_hideAdditionalTabsDropdown",value:function(){this.tabDropdownContainer.hide()}},{key:"_isClosable",value:function(){return this.parent.config.isClosable&&this.layoutManager.config.settings.showCloseIcon}},{key:"_onPopoutClick",value:function(){!0===this.layoutManager.config.settings.popoutWholeStack?this.parent.popout():this.activeContentItem.popout()}},{key:"_onHeaderClick",value:function(e){e.target===this.element[0]&&this.parent.select()}},{key:"_updateTabSizes",value:function(e){if(0!==this.tabs.length){this.tabDropdownButton.element.toggle(!0===e);var t=function(e){return e?"width":"height"};this.element.css(t(!this.parent._sided),""),this.element[t(this.parent._sided)](this.layoutManager.config.dimensions.headerHeight);var n,i,o,s,r=this.element.outerWidth()-this.controlsContainer.outerWidth()-this._tabControlOffset,a=0,l=0,c=0,h=this.layoutManager.config.settings.tabOverlapAllowance,u=!1,d=this.activeContentItem?this.tabs.indexOf(this.activeContentItem.tab):0,f=this.tabs[d];for(this.parent._sided&&(r=this.element.outerHeight()-this.controlsContainer.outerHeight()-this._tabControlOffset),this._lastVisibleTabIndex=-1,i=0;i<this.tabs.length;i++)if(n=this.tabs[i].element,this.tabsContainer.append(n),a+=n.outerWidth()+parseInt(n.css("margin-right"),10),(l=d<=i?a:a+f.element.outerWidth()+parseInt(f.element.css("margin-right"),10))>r){if(u)i===d&&(n.css({"z-index":"auto","margin-left":""}),this.tabsContainer.append(n));else if((c=0<d&&d<=i?(l-r)/(i-1):(l-r)/i)<h){for(o=0;o<=i;o++)s=o!==d&&0!==o?"-"+c+"px":"",this.tabs[o].element.css({"z-index":i-o,"margin-left":s});this._lastVisibleTabIndex=i,this.tabsContainer.append(n)}else u=!0;if(u&&i!==d){if(!e)return void this._updateTabSizes(!0);n.css({"z-index":"auto","margin-left":""}),this.tabDropdownContainer.append(n)}}else this._lastVisibleTabIndex=i,n.css({"z-index":"auto","margin-left":""}),this.tabsContainer.append(n)}}}]),t}();t.a=u},function(e,t,n){var i=n(7),o=n(30),s=n(0);t.a=function(){function e(t,n){h(this,e),this.header=t,this.contentItem=n,this.element=$('<li class="lm_tab"><i class="lm_left"></i><span class="lm_title"></span><div class="lm_close_tab"></div><i class="lm_right"></i></li>'),this.titleElement=this.element.find(".lm_title"),this.closeElement=this.element.find(".lm_close_tab"),this.closeElement[n.config.isClosable?"show":"hide"](),this.isActive=!1,this.setTitle(n.config.title),this.contentItem.on("titleChanged",this.setTitle,this),this._layoutManager=this.contentItem.layoutManager,!0===this._layoutManager.config.settings.reorderEnabled&&!0===n.config.reorderEnabled&&(this._dragListener=new i.a(this.element),this._dragListener.on("dragStart",this._onDragStart,this),this.contentItem.on("destroy",this._dragListener.destroy,this._dragListener)),this._onTabClickFn=Object(s.c)(this._onTabClick,this),this._onCloseClickFn=Object(s.c)(this._onCloseClick,this),this.element.on("mousedown touchstart",this._onTabClickFn),this.contentItem.config.isClosable?(this.closeElement.on("click touchstart",this._onCloseClickFn),this.closeElement.on("mousedown",this._onCloseMousedown)):this.closeElement.remove(),this.contentItem.tab=this,this.contentItem.emit("tab",this),this.contentItem.layoutManager.emit("tabCreated",this),this.contentItem.isComponent&&(this.contentItem.container.tab=this,this.contentItem.container.emit("tab",this))}return r(e,[{key:"setTitle",value:function(e){this.element.attr("title",Object(s.k)(e)),this.titleElement.html(e)}},{key:"setActive",value:function(e){e===this.isActive||(this.isActive=e,e?this.element.addClass("lm_active"):this.element.removeClass("lm_active"))}},{key:"_$destroy",value:function(){this.element.off("mousedown touchstart",this._onTabClickFn),this.closeElement.off("click touchstart",this._onCloseClickFn),this._dragListener&&(this.contentItem.off("destroy",this._dragListener.destroy,this._dragListener),this._dragListener.off("dragStart",this._onDragStart),this._dragListener=null),this.element.remove()}},{key:"_onDragStart",value:function(e,t){return this.header._canDestroy?(!0===this.contentItem.parent.isMaximised&&this.contentItem.parent.toggleMaximise(),void new o.a(e,t,this._dragListener,this._layoutManager,this.contentItem,this.header.parent)):null}},{key:"_onTabClick",value:function(e){if(0===e.button||"touchstart"===e.type){var t=this.header.parent.getActiveContentItem();this.contentItem!==t&&this.header.parent.setActiveContentItem(this.contentItem)}else 1===e.button&&this.contentItem.config.isClosable&&this._onCloseClick(e)}},{key:"_onCloseClick",value:function(e){e.stopPropagation(),this.header._canDestroy&&this.header.parent.removeChild(this.contentItem)}},{key:"_onCloseMousedown",value:function(e){e.stopPropagation()}}]),e}()},function(e,t,n){var i=n(1),o=n(0),s=function(e){function t(e,n,i,s,r,a){var c;h(this,t),(c=l(this,(t.__proto__||Object.getPrototypeOf(t)).call(this)))._dragListener=i,c._layoutManager=s,c._contentItem=r,c._originalParent=a,c._area=null,c._lastValidArea=null,c._dragListener.on("drag",c._onDrag,c),c._dragListener.on("dragStop",c._onDrop,c),c.element=$('<div class="lm_dragProxy"><div class="lm_header"><ul class="lm_tabs"><li class="lm_tab lm_active"><i class="lm_left"></i><span class="lm_title"></span><i class="lm_right"></i></li></ul></div><div class="lm_content"></div></div>'),a&&a._side&&(c._sided=a._sided,c.element.addClass("lm_"+a._side),0<=["right","bottom"].indexOf(a._side)&&c.element.find(".lm_content").after(c.element.find(".lm_header"))),c.element.css({left:e,top:n}),c.element.find(".lm_tab").attr("title",Object(o.k)(c._contentItem.config.title)),c.element.find(".lm_title").html(c._contentItem.config.title),c.childElementContainer=c.element.find(".lm_content"),c.childElementContainer.append(r.element),c._undisplayTree(),c._layoutManager._$calculateItemAreas(),c._setDimensions(),$(document.body).append(c.element);var u=c._layoutManager.container.offset();return c._minX=u.left,c._minY=u.top,c._maxX=c._layoutManager.container.width()+c._minX,c._maxY=c._layoutManager.container.height()+c._minY,c._width=c.element.width(),c._height=c.element.height(),c._setDropPosition(e,n),c}return c(t,i.b),r(t,[{key:"_onDrag",value:function(e,t,n){var i=(n=Object(o.e)(n)).pageX,s=n.pageY;(i>this._minX&&i<this._maxX&&s>this._minY&&s<this._maxY||!0!==this._layoutManager.config.settings.constrainDragToContainer)&&this._setDropPosition(i,s)}},{key:"_setDropPosition",value:function(e,t){this.element.css({left:e,top:t}),this._area=this._layoutManager._$getArea(e,t),null!==this._area&&(this._lastValidArea=this._area,this._area.contentItem._$highlightDropZone(e,t,this._area))}},{key:"_onDrop",value:function(){this._updateTree(),this._layoutManager.dropTargetIndicator.hide(),null===this._area?null===this._lastValidArea?this._originalParent?this._originalParent.addChild(this._contentItem):this._contentItem._$destroy():this._lastValidArea.contentItem._$onDrop(this._contentItem,this._lastValidArea):this._area.contentItem._$onDrop(this._contentItem,this._area),this.element.remove(),this._layoutManager.emit("itemDropped",this._contentItem)}},{key:"_undisplayTree",value:function(){this._contentItem.parent&&this._contentItem.parent.undisplayChild(this._contentItem)}},{key:"_updateTree",value:function(){this._contentItem.parent&&this._contentItem.parent.removeChild(this._contentItem,!0),this._contentItem._$setParent(this)}},{key:"_setDimensions",value:function(){var e=this._layoutManager.config.dimensions,t=e.dragProxyWidth,n=e.dragProxyHeight;this.element.width(t),this.element.height(n),t-=this._sided?e.headerHeight:0,n-=this._sided?0:e.headerHeight,this.childElementContainer.width(t),this.childElementContainer.height(n),this._contentItem.element.width(t),this._contentItem.element.height(n),this._contentItem.callDownwards("_$show"),this._contentItem.callDownwards("setSize")}}]),t}();t.a=s},function(e,t){t.a=function(){function e(t,n,i,o){h(this,e),this._header=t,this.element=$('<li class="'+i+'" title="'+n+'"></li>'),this._header.on("destroy",this._$destroy,this),this._action=o,this.element.on("click touchstart",this._action),this._header.controlsContainer.append(this.element)}return r(e,[{key:"_$destroy",value:function(){this.element.off(),this.element.remove()}}]),e}()},function(e,t,n){var i=n(3),o=n(33),s=function(e){function t(e,n,i){h(this,t);var s=l(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n,i)),r=e.getComponent(s.config.componentName),a=$.extend(!0,{},s.config.componentState||{});return a.componentName=s.config.componentName,s.componentName=s.config.componentName,""===s.config.title&&(s.config.title=s.config.componentName),s.isComponent=!0,s.container=new o.a(s.config,s,e),s.instance=new r(s.container,a),s.element=s.container._element,s}return c(t,i.a),r(t,[{key:"close",value:function(){this.parent.removeChild(this)}},{key:"setSize",value:function(){"none"!==this.element.css("display")&&this.container._$setSize(this.element.width(),this.element.height())}},{key:"_$init",value:function(){i.a.prototype._$init.call(this),this.container.emit("open")}},{key:"_$hide",value:function(){this.container.hide(),i.a.prototype._$hide.call(this)}},{key:"_$show",value:function(){this.container.show(),i.a.prototype._$show.call(this)}},{key:"_$shown",value:function(){this.container.shown(),i.a.prototype._$shown.call(this)}},{key:"_$destroy",value:function(){this.container.emit("destroy",this),i.a.prototype._$destroy.call(this)}},{key:"_$getArea",value:function(){return null}}]),t}();t.a=s},function(e,t,n){var i=n(1),o=function(e){function t(e,n,i){var o;return h(this,t),(o=l(this,(t.__proto__||Object.getPrototypeOf(t)).call(this))).width=null,o.height=null,o.title=e.componentName,o.parent=n,o.layoutManager=i,o.isHidden=!1,o._config=e,o._element=$('<div class="lm_item_container"><div class="lm_content"></div></div>'),o._contentElement=o._element.find(".lm_content"),o}return c(t,i.b),r(t,[{key:"getElement",value:function(){return this._contentElement}},{key:"hide",value:function(){this.emit("hide"),this.isHidden=!0,this._element.hide()}},{key:"show",value:function(){this.emit("show"),this.isHidden=!1,this._element.show(),(0!=this.height||0!=this.width)&&this.emit("shown")}},{key:"setSize",value:function(e,t){for(var n,i,o,s,r=this.parent,a=this;!r.isColumn&&!r.isRow;)if(a=r,(r=r.parent).isRoot)return!1;for(n=("height"===(i=r.isColumn?"height":"width")?t:e)/(this[i]*(1/(a.config[i]/100)))*100,o=(a.config[i]-n)/(r.contentItems.length-1),s=0;s<r.contentItems.length;s++)r.contentItems[s]===a?r.contentItems[s].config[i]=n:r.contentItems[s].config[i]+=o;return r.callDownwards("setSize"),!0}},{key:"close",value:function(){this._config.isClosable&&(this.emit("close"),this.parent.close())}},{key:"getState",value:function(){return this._config.componentState}},{key:"extendState",value:function(e){this.setState($.extend(!0,this.getState(),e))}},{key:"setState",value:function(e){this._config.componentState=e,this.parent.emitBubblingEvent("stateChanged")}},{key:"setTitle",value:function(e){this.parent.setTitle(e)}},{key:"_$setSize",value:function(e,t){(e!==this.width||t!==this.height)&&(this.width=e,this.height=t,$.zepto?this._contentElement.width(e):this._contentElement.outerWidth(e),$.zepto?this._contentElement.height(t):this._contentElement.outerHeight(t),this.emit("resize"))}}]),t}();t.a=o},function(e,n,i){var o=i(68),s=i.n(o),a=i(1),u=i(11),d=i(0),f=function(e){function n(e,t,i,o,s){var r;return h(this,n),(r=l(this,(n.__proto__||Object.getPrototypeOf(n)).call(this))).isInitialised=!1,r._config=e,r._dimensions=t,r._parentId=i,r._indexInParent=o,r._layoutManager=s,r._popoutWindow=null,r._id=null,r._createWindow(),r}return c(n,a.b),r(n,[{key:"toConfig",value:function(){if(!1===this.isInitialised)throw new Error("Can't create config, layout not yet initialised");return{dimensions:{width:this.getGlInstance().width,height:this.getGlInstance().height,left:this._popoutWindow.screenX||this._popoutWindow.screenLeft,top:this._popoutWindow.screenY||this._popoutWindow.screenTop},content:this.getGlInstance().toConfig().content,parentId:this._parentId,indexInParent:this._indexInParent}}},{key:"getGlInstance",value:function(){return this._popoutWindow.__glInstance}},{key:"getWindow",value:function(){return this._popoutWindow}},{key:"close",value:function(){if(this.getGlInstance())this.getGlInstance()._$closeWindow();else try{this.getWindow().close()}catch(e){}}},{key:"popIn",value:function(){var e,t;this._indexInParent;this._parentId&&(e=$.extend(!0,{},this.getGlInstance().toConfig()).content[0],!(t=this._layoutManager.root.getItemsById(this._parentId)[0])&&(t=0<this._layoutManager.root.contentItems.length?this._layoutManager.root.contentItems[0]:this._layoutManager.root)),t.addChild(e,this._indexInParent),this.close()}},{key:"_createWindow",value:function(){var e,n=this._createUrl(),i=t(1e6*Math.random()).toString(36),o=this._serializeWindowOptions({width:this._dimensions.width,height:this._dimensions.height,innerWidth:this._dimensions.width,innerHeight:this._dimensions.height,menubar:"no",toolbar:"no",location:"no",personalbar:"no",resizable:"yes",scrollbars:"no",status:"no"});if(this._popoutWindow=window.open(n,i,o),this._popoutWindow)$(this._popoutWindow).on("load",Object(d.c)(this._positionWindow,this)).on("unload beforeunload",Object(d.c)(this._onClose,this)),e=setInterval(Object(d.c)(function(){this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this._onInitialised(),clearInterval(e))},this),10);else if(!0===this._layoutManager.config.settings.blockedPopoutsThrowError){var s=new Error("Popout blocked");throw s.type="popoutBlocked",s}}},{key:"_serializeWindowOptions",value:function(e){var t,n=[];for(t in e)n.push(t+"="+e[t]);return n.join(",")}},{key:"_createUrl",value:function(){var e,t={content:this._config},n="gl-window-config-"+Object(d.f)();t=(new u.a).minifyConfig(t);try{localStorage.setItem(n,s()(t))}catch(t){throw new Error("Error while writing to localStorage "+t.toString())}return 1===(e=document.location.href.split("?")).length?e[0]+"?gl-window="+n:document.location.href+"&gl-window="+n}},{key:"_positionWindow",value:function(){this._popoutWindow.moveTo(this._dimensions.left,this._dimensions.top),this._popoutWindow.focus()}},{key:"_onInitialised",value:function(){this.isInitialised=!0,this.getGlInstance().on("popIn",this.popIn,this),this.emit("initialised")}},{key:"_onClose",value:function(){setTimeout(Object(d.c)(this.emit,this,["closed"]),50)}}]),n}();n.a=f},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(36),o=(n.n(i),n(37)),s=(n.n(o),n(38)),r=(n.n(s),n(39));n.d(t,"default",function(){return r.a});var a=n(33);n.d(t,"ItemContainer",function(){return a.a});var l=n(34);n.d(t,"BrowserPopout",function(){return l.a});var c=n(28);n.d(t,"Header",function(){return c.a});var h=n(31);n.d(t,"HeaderButton",function(){return h.a});var u=n(29);n.d(t,"Tab",function(){return u.a});var d=n(32);n.d(t,"Component",function(){return d.a});var f=n(12);n.d(t,"Root",function(){return f.a});var m=n(6);n.d(t,"RowOrColumn",function(){return m.a});var p=n(13);n.d(t,"Stack",function(){return p.a});var g=n(26);n.d(t,"BubblingEvent",function(){return g.a});var y=n(11);n.d(t,"ConfigMinifier",function(){return y.a});var v=n(7);n.d(t,"DragListener",function(){return v.a});var _=n(1);n.d(t,"EventEmitter",function(){return _.b});var b=n(25);n.d(t,"EventHub",function(){return b.a});var w=n(24);n.d(t,"ReactComponentHandler",function(){return w.a}),{}.ES6&&(n(74),n(77))},function(){},function(){},function(){},function(e,i,o){var s=o(1),u=o(24),d=o(11),f=o(25),m=o(12),p=o(6),g=o(13),y=o(32),v=o(3),_=o(34),b=o(70),w=o(71),x=o(72),k=o(27),I=o(73),C=o(0),S=function(e){function i(e,t){var n;if(h(this,i),!$){var o="jQuery is missing as dependency for GoldenLayout. ";throw o+='Please either expose $ on GoldenLayout\'s scope (e.g. window) or add "jquery" to ',o+="your paths when using RequireJS/AMD",new Error(o)}return(n=l(this,(i.__proto__||Object.getPrototypeOf(i)).call(this))).isInitialised=!1,n._isFullPage=!1,n._resizeTimeoutId=null,n._components={"lm-react-component":u.a},n._itemAreas=[],n._resizeFunction=Object(C.c)(n._onResize,n),n._unloadFunction=Object(C.c)(n._onUnload,n),n._maximisedItem=null,n._maximisePlaceholder=$('<div class="lm_maximise_place"></div>'),n._creationTimeoutPassed=!1,n._subWindowsCreated=!1,n._dragSources=[],n._updatingColumnsResponsive=!1,n._firstLoad=!0,n.width=null,n.height=null,n.root=null,n.openPopouts=[],n.selectedItem=null,n.isSubWindow=!1,n.eventHub=new f.a(n),n.config=n._createConfig(e),n.container=t,n.dropTargetIndicator=null,n.transitionIndicator=null,n.tabDropPlaceholder=$('<div class="lm_drop_tab_placeholder"></div>'),!0===n.isSubWindow&&$("body").css("visibility","hidden"),n._typeToItem={column:Object(C.c)(p.a,n,[!0]),row:Object(C.c)(p.a,n,[!1]),stack:g.a,component:y.a},n}return c(i,s.b),r(i,[{key:"minifyConfig",value:function(e){return(new d.a).minifyConfig(e)}},{key:"unminifyConfig",value:function(e){return(new d.a).unminifyConfig(e)}},{key:"registerComponent",value:function(e,t){if("function"!=typeof t)throw new Error("Please register a constructor function");if(void 0!==this._components[e])throw new Error("Component "+e+" is already registered");this._components[e]=t}},{key:"toConfig",value:function(e){var t,n,i;if(!1===this.isInitialised)throw new Error("Can't create config, layout not yet initialised");if(e&&!(e instanceof v.a))throw new Error("Root must be a ContentItem");for((t={settings:Object(C.b)({},this.config.settings),dimensions:Object(C.b)({},this.config.dimensions),labels:Object(C.b)({},this.config.labels)}).content=[],(n=function(e,t){var i,o;for(i in t.config)"content"!==i&&(e[i]=t.config[i]);if(t.contentItems.length)for(e.content=[],o=0;o<t.contentItems.length;o++)e.content[o]={},n(e.content[o],t.contentItems[o])})(t,e?{contentItems:[e]}:this.root),this._$reconcilePopoutWindows(),t.openPopouts=[],i=0;i<this.openPopouts.length;i++)t.openPopouts.push(this.openPopouts[i].toConfig());return t.maximisedItemId=this._maximisedItem?"__glMaximised":null,t}},{key:"getComponent",value:function(e){if(void 0===this._components[e])throw new k.a('Unknown component "'+e+'"');return this._components[e]}},{key:"init",value:function(){return!1===this._subWindowsCreated&&(this._createSubWindows(),this._subWindowsCreated=!0),"loading"===document.readyState||null===document.body?void $(document).ready(Object(C.c)(this.init,this)):!0===this.isSubWindow&&!1===this._creationTimeoutPassed?(setTimeout(Object(C.c)(this.init,this),7),void(this._creationTimeoutPassed=!0)):(!0===this.isSubWindow&&this._adjustToWindowMode(),this._setContainer(),this.dropTargetIndicator=new w.a(this.container),this.transitionIndicator=new x.a,this.updateSize(),this._create(this.config),this._bindEvents(),this.isInitialised=!0,this._adjustColumnsResponsive(),void this.emit("initialised"))}},{key:"updateSize",value:function(e,t){2===arguments.length?(this.width=e,this.height=t):(this.width=this.container.width(),this.height=this.container.height()),!0===this.isInitialised&&(this.root.callDownwards("setSize",[this.width,this.height]),this._maximisedItem&&(this._maximisedItem.element.width(this.container.width()),this._maximisedItem.element.height(this.container.height()),this._maximisedItem.callDownwards("setSize")),this._adjustColumnsResponsive())}},{key:"destroy",value:function(){!1===this.isInitialised||(this._onUnload(),$(window).off("resize",this._resizeFunction),$(window).off("unload beforeunload",this._unloadFunction),this.root.callDownwards("_$destroy",[],!0),this.root.contentItems=[],this.tabDropPlaceholder.remove(),this.dropTargetIndicator.destroy(),this.transitionIndicator.destroy(),this.eventHub.destroy(),this._dragSources.forEach(function(e){e._dragListener.destroy(),e._element=null,e._itemConfig=null,e._dragListener=null}),this._dragSources=[])}},{key:"createContentItem",value:function(e,t){var n;if("string"!=typeof e.type)throw new k.a("Missing parameter 'type'",e);if("react-component"===e.type&&(e.type="component",e.componentName="lm-react-component"),!this._typeToItem[e.type])throw n="Unknown type '"+e.type+"'. Valid types are "+Object(C.j)(this._typeToItem).join(","),new k.a(n);return"component"!==e.type||t instanceof g.a||!t||!0===this.isSubWindow&&t instanceof m.a||(e={type:"stack",width:e.width,height:e.height,content:[e]}),new this._typeToItem[e.type](this,e,t)}},{key:"createPopout",value:function(e,t,n,i){var o,s,r,a,l,c,h=e,u=e instanceof v.a,d=this;if(n=n||null,u){for(h=this.toConfig(e).content,n=Object(C.f)(),a=e.parent,l=e;1===a.contentItems.length&&!a.isRoot;)a=a.parent,l=l.parent;a.addId(n),isNaN(i)&&(i=Object(C.g)(l,a.contentItems))}else h instanceof Array||(h=[h]);return!t&&u&&(o=window.screenX||window.screenLeft,s=window.screenY||window.screenTop,t={left:o+(r=e.element.offset()).left,top:s+r.top,width:e.element.width(),height:e.element.height()}),t||u||(t={left:window.screenX||window.screenLeft+20,top:window.screenY||window.screenTop+20,width:500,height:309}),u&&e.remove(),(c=new _.a(h,t,n,i,this)).on("initialised",function(){d.emit("windowOpened",c)}),c.on("closed",function(){d._$reconcilePopoutWindows()}),this.openPopouts.push(c),c}},{key:"createDragSource",value:function(e,t){this.config.settings.constrainDragToContainer=!1;var n=new b.a($(e),t,this);return this._dragSources.push(n),n}},{key:"selectItem",value:function(e,t){if(!0!==this.config.settings.selectionEnabled)throw new Error("Please set selectionEnabled to true to use this feature");e===this.selectedItem||(null!==this.selectedItem&&this.selectedItem.deselect(),e&&!0!==t&&e.select(),this.selectedItem=e,this.emit("selectionChanged",e))}},{key:"_$maximiseItem",value:function(e){null!==this._maximisedItem&&this._$minimiseItem(this._maximisedItem),this._maximisedItem=e,this._maximisedItem.addId("__glMaximised"),e.element.addClass("lm_maximised"),e.element.after(this._maximisePlaceholder),this.root.element.prepend(e.element),e.element.width(this.container.width()),e.element.height(this.container.height()),e.callDownwards("setSize"),this._maximisedItem.emit("maximised"),this.emit("stateChanged")}},{key:"_$minimiseItem",value:function(e){e.element.removeClass("lm_maximised"),e.removeId("__glMaximised"),this._maximisePlaceholder.after(e.element),this._maximisePlaceholder.remove(),e.parent.callDownwards("setSize"),this._maximisedItem=null,e.emit("minimised"),this.emit("stateChanged")}},{key:"_$closeWindow",value:function(){window.setTimeout(function(){window.close()},1)}},{key:"_$getArea",value:function(e,t){var n,i,o=1/0,s=null;for(n=0;n<this._itemAreas.length;n++)e>(i=this._itemAreas[n]).x1&&e<i.x2&&t>i.y1&&t<i.y2&&o>i.surface&&(o=i.surface,s=i);return s}},{key:"_$createRootItemAreas",value:function(){var e={y2:0,x2:0,y1:"y2",x1:"x2"};for(var t in e){var n=this.root._$getArea();n.side=t,n[t]=e[t]?n[e[t]]-50:50,n.surface=(n.x2-n.x1)*(n.y2-n.y1),this._itemAreas.push(n)}}},{key:"_$calculateItemAreas",value:function(){var e,t,n=this._getAllContentItems();if(this._itemAreas=[],1!==n.length){for(this._$createRootItemAreas(),e=0;e<n.length;e++)if(n[e].isStack){if(null===(t=n[e]._$getArea()))continue;if(t instanceof Array)this._itemAreas=this._itemAreas.concat(t);else{this._itemAreas.push(t);var i={};Object(C.b)(i,t),Object(C.b)(i,t.contentItem._contentAreaDimensions.header.highlightArea),i.surface=(i.x2-i.x1)*(i.y2-i.y1),this._itemAreas.push(i)}}}else this._itemAreas.push(this.root._$getArea())}},{key:"_$normalizeContentItem",value:function(e,t){if(!e)throw new Error("No content item defined");if(Object(C.h)(e)&&(e=e()),e instanceof v.a)return e;if($.isPlainObject(e)&&e.type){var n=this.createContentItem(e,t);return n.callDownwards("_$init"),n}throw new Error("Invalid contentItem")}},{key:"_$reconcilePopoutWindows",value:function(){var e,t=[];for(e=0;e<this.openPopouts.length;e++)!1===this.openPopouts[e].getWindow().closed?t.push(this.openPopouts[e]):this.emit("windowClosed",this.openPopouts[e]);this.openPopouts.length!==t.length&&(this.emit("stateChanged"),this.openPopouts=t)}},{key:"_getAllContentItems",value:function(){var e=[];return function t(n){if(e.push(n),n.contentItems instanceof Array)for(var i=0;i<n.contentItems.length;i++)t(n.contentItems[i])}(this.root),e}},{key:"_bindEvents",value:function(){this._isFullPage&&$(window).resize(this._resizeFunction),$(window).on("unload beforeunload",this._unloadFunction)}},{key:"_onResize",value:function(){clearTimeout(this._resizeTimeoutId),this._resizeTimeoutId=setTimeout(Object(C.c)(this.updateSize,this),100)}},{key:"_createConfig",value:function(e){var t=Object(C.d)("gl-window");t&&(this.isSubWindow=!0,e=localStorage.getItem(t),e=JSON.parse(e),e=(new d.a).unminifyConfig(e),localStorage.removeItem(t));return function e(t){for(var n in t)"props"!=n&&"object"==a(t[n])?e(t[n]):"type"==n&&"react-component"===t[n]&&(t.type="component",t.componentName="lm-react-component")}(e=$.extend(!0,{},I.a,e)),!1===e.settings.hasHeaders&&(e.dimensions.headerHeight=0),e}},{key:"_adjustToWindowMode",value:function(){var e=$('<div class="lm_popin" title="'+this.config.labels.popin+'"><div class="lm_icon"></div><div class="lm_bg"></div></div>');e.click(Object(C.c)(function(){this.emit("popIn")},this)),document.title=Object(C.k)(this.config.content[0].title),$("head").append($("body link, body style, template, .gl_keep")),this.container=$("body").html("").css("visibility","visible").append(e),document.body.offsetHeight,window.__glInstance=this}},{key:"_createSubWindows",value:function(){var e,t;for(e=0;e<this.config.openPopouts.length;e++)t=this.config.openPopouts[e],this.createPopout(t.content,t.dimensions,t.parentId,t.indexInParent)}},{key:"_setContainer",value:function(){var e=$(this.container||"body");if(0===e.length)throw new Error("GoldenLayout container not found");if(1<e.length)throw new Error("GoldenLayout more than one container element specified");e[0]===document.body&&(this._isFullPage=!0,$("html, body").css({height:"100%",margin:0,padding:0,overflow:"hidden"})),this.container=e}},{key:"_create",value:function(e){var t;if(!(e.content instanceof Array))throw t=void 0===e.content?"Missing setting 'content' on top level of configuration":"Configuration parameter 'content' must be an array",new k.a(t,e);if(1<e.content.length)throw t="Top level content can't contain more then one element.",new k.a(t,e);this.root=new m.a(this,{content:e.content},this.container),this.root.callDownwards("_$init"),"__glMaximised"===e.maximisedItemId&&this.root.getItemsById(e.maximisedItemId)[0].toggleMaximise()}},{key:"_onUnload",value:function(){if(!0===this.config.settings.closePopoutsOnUnload)for(var e=0;e<this.openPopouts.length;e++)this.openPopouts[e].close()}},{key:"_adjustColumnsResponsive",value:function(){if(this._useResponsiveLayout()&&!this._updatingColumnsResponsive&&this.config.dimensions&&this.config.dimensions.minItemWidth&&0!==this.root.contentItems.length&&this.root.contentItems[0].isRow){this._firstLoad=!1;var e=this.root.contentItems[0].contentItems.length;if(!(1>=e)){var i=this.config.dimensions.minItemWidth;if(!(e*i<=this.width)){this._updatingColumnsResponsive=!0;for(var o,s=n(t(this.width/i),1),r=this.root.contentItems[0],a=this._findAllStackContainers()[0],l=0;l<e-s;l++)o=r.contentItems[r.contentItems.length-1],this._addChildContentItemsToContainer(a,o);this._updatingColumnsResponsive=!1}}}else this._firstLoad=!1}},{key:"_useResponsiveLayout",value:function(){return this.config.settings&&("always"==this.config.settings.responsiveMode||"onload"==this.config.settings.responsiveMode&&this._firstLoad)}},{key:"_addChildContentItemsToContainer",value:function(e,t){"stack"===t.type?t.contentItems.forEach(function(n){e.addChild(n),t.removeChild(n,!0)}):t.contentItems.forEach(Object(C.c)(function(t){this._addChildContentItemsToContainer(e,t)},this))}},{key:"_findAllStackContainers",value:function(){var e=[];return this._findAllStackContainersRecursive(e,this.root),e}},{key:"_findAllStackContainersRecursive",value:function(e,t){t.contentItems.forEach(Object(C.c)(function(t){"stack"==t.type?e.push(t):!t.isComponent&&this._findAllStackContainersRecursive(e,t)},this))}}]),i}();i.a=S},function(e,t,n){e.exports={default:n(41),__esModule:!0}},function(e,t,n){n(42),e.exports=n(2).Object.keys},function(e,t,n){var i=n(43),o=n(15);n(53)("keys",function(){return function(e){return o(i(e))}})},function(e,t,n){var i=n(14);e.exports=function(e){return Object(i(e))}},function(e,t,n){var i=n(16),o=n(17),s=n(47)(!1),r=n(19)("IE_PROTO");e.exports=function(e,t){var n,a=o(e),l=0,c=[];for(n in a)n!=r&&i(a,n)&&c.push(n);for(;t.length>l;)i(a,n=t[l++])&&(~s(c,n)||c.push(n));return c}},function(e,t,n){var i=n(46);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==i(e)?e.split(""):Object(e)}},function(e){var t={}.toString;e.exports=function(e){return t.call(e).slice(8,-1)}},function(e,t,n){var i=n(17),o=n(48),s=n(49);e.exports=function(e){return function(t,n,r){var a,l=i(t),c=o(l.length),h=s(r,c);if(e&&n!=n){for(;c>h;)if((a=l[h++])!=a)return!0}else for(;c>h;h++)if((e||h in l)&&l[h]===n)return e||h||0;return!e&&-1}}},function(t,n,i){var o=i(18);t.exports=function(t){return 0<t?e(o(t),9007199254740991):0}},function(t,i,o){var s=o(18);t.exports=function(t,i){return 0>(t=s(t))?n(t+i,0):e(t,i)}},function(e,t,n){var i=n(2),o=n(4),s="__core-js_shared__",r=o[s]||(o[s]={});(e.exports=function(e,t){return r[e]||(r[e]=void 0===t?{}:t)})("versions",[]).push({version:i.version,mode:n(51)?"pure":"global",copyright:"© 2018 Denis Pushkarev (zloirock.ru)"})},function(e){e.exports=!0},function(e){var t=0,n=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++t+n).toString(36))}},function(e,t,n){var i=n(21),o=n(2),s=n(10);e.exports=function(e,t){var n=(o.Object||{})[e]||Object[e],r={};r[e]=t(n),i(i.S+i.F*s(function(){n(1)}),"Object",r)}},function(e,t,n){var i=n(55);e.exports=function(e,t,n){return i(e),void 0===t?e:1===n?function(n){return e.call(t,n)}:2===n?function(n,i){return e.call(t,n,i)}:3===n?function(n,i,o){return e.call(t,n,i,o)}:function(){return e.apply(t,arguments)}}},function(e){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,n){var i=n(22),o=n(59);e.exports=n(5)?function(e,t,n){return i.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){e.exports=!n(5)&&!n(10)(function(){return 7!=Object.defineProperty(n(23)("div"),"a",{get:function(){return 7}}).a})},function(e,t,n){var i=n(9);e.exports=function(e,t){if(!i(e))return e;var n,o;if(t&&"function"==typeof(n=e.toString)&&!i(o=n.call(e)))return o;if("function"==typeof(n=e.valueOf)&&!i(o=n.call(e)))return o;if(!t&&"function"==typeof(n=e.toString)&&!i(o=n.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},function(e){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){e.exports={default:n(61),__esModule:!0}},function(e,t,n){n(62);var i=n(2).Object;e.exports=function(e,t){return i.create(e,t)}},function(e,t,n){var i=n(21);i(i.S,"Object",{create:n(63)})},function(e,t,n){var i=n(8),o=n(64),s=n(20),r=n(19)("IE_PROTO"),a=function(){},l="prototype",c=function(){var e,t=n(23)("iframe"),i=s.length;for(t.style.display="none",n(65).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),c=e.F;i--;)delete c[l][s[i]];return c()};e.exports=Object.create||function(e,t){var n;return null===e?n=c():(a[l]=i(e),n=new a,a[l]=null,n[r]=e),void 0===t?n:o(n,t)}},function(e,t,n){var i=n(22),o=n(8),s=n(15);e.exports=n(5)?Object.defineProperties:function(e,t){o(e);for(var n,r=s(t),a=r.length,l=0;a>l;)i.f(e,n=r[l++],t[n]);return e}},function(e,t,n){var i=n(4).document;e.exports=i&&i.documentElement},function(e,t){t.a={isClosable:!0,reorderEnabled:!0,title:""}},function(e,t,n){var i=n(7);t.a=function(){function e(t,n,o){h(this,e),this._isVertical=t,this._size=n,this._grabSize=o<n?n:o,this.element=this._createElement(),this._dragListener=new i.a(this.element)}return r(e,[{key:"on",value:function(e,t,n){this._dragListener.on(e,t,n)}},{key:"_$destroy",value:function(){this.element.remove()}},{key:"_createElement",value:function(){var e=$('<div class="lm_drag_handle"></div>'),t=$('<div class="lm_splitter"></div>');t.append(e);var n=this._grabSize-this._size,i=n/2;return this._isVertical?(e.css("top",-i),e.css("height",this._size+n),t.addClass("lm_vertical"),t.height(this._size)):(e.css("left",-i),e.css("width",this._size+n),t.addClass("lm_horizontal"),t.width(this._size)),t}}]),e}()},function(e,t,n){e.exports={default:n(69),__esModule:!0}},function(e,t,n){var i=n(2),o=i.JSON||(i.JSON={stringify:JSON.stringify});e.exports=function(){return o.stringify.apply(o,arguments)}},function(e,t,n){var i=n(7),o=n(30),s=n(0);t.a=function(){function e(t,n,i){h(this,e),this._element=t,this._itemConfig=n,this._layoutManager=i,this._dragListener=null,this._createDragListener()}return r(e,[{key:"_createDragListener",value:function(){null!==this._dragListener&&this._dragListener.destroy(),this._dragListener=new i.a(this._element),this._dragListener.on("dragStart",this._onDragStart,this),this._dragListener.on("dragStop",this._createDragListener,this)}},{key:"_onDragStart",value:function(e,t){var n=this._itemConfig;Object(s.h)(n)&&(n=n());var i=this._layoutManager._$normalizeContentItem($.extend(!0,{},n)),r=new o.a(e,t,this._dragListener,this._layoutManager,i,null);this._layoutManager.transitionIndicator.transitionElements(this._element,r.element)}}]),e}()},function(e,t){t.a=function(){function e(){h(this,e),this.element=$('<div class="lm_dropTargetIndicator"><div class="lm_inner"></div></div>'),$(document.body).append(this.element)}return r(e,[{key:"destroy",value:function(){this.element.remove()}},{key:"highlight",value:function(e,t,n,i){this.highlightArea({x1:e,y1:t,x2:n,y2:i})}},{key:"highlightArea",value:function(e){this.element.css({left:e.x1,top:e.y1,width:e.x2-e.x1,height:e.y2-e.y1}).show()}},{key:"hide",value:function(){this.element.hide()}}]),e}()},function(e,t,n){var i=n(0);t.a=function(){function e(){h(this,e),this._element=$('<div class="lm_transition_indicator"></div>'),$(document.body).append(this._element),this._toElement=null,this._fromDimensions=null,this._totalAnimationDuration=200,this._animationStartTime=null}return r(e,[{key:"destroy",value:function(){this._element.remove()}},{key:"transitionElements",value:function(){}},{key:"_nextAnimationFrame",value:function(){var e,t=this._measure(this._toElement),n=(Object(i.i)()-this._animationStartTime)/this._totalAnimationDuration,o={};if(1<=n)this._element.hide();else{for(e in t.opacity=0,this._fromDimensions)o[e]=this._fromDimensions[e]+(t[e]-this._fromDimensions[e])*n;this._element.css(o),Object(i.a)(Object(i.c)(this._nextAnimationFrame,this))}}},{key:"_measure",value:function(e){var t=e.offset();return{left:t.left,top:t.top,width:e.outerWidth(),height:e.outerHeight()}}}]),e}()},function(e,t){t.a={openPopouts:[],settings:{hasHeaders:!0,constrainDragToContainer:!0,reorderEnabled:!0,selectionEnabled:!1,popoutWholeStack:!1,blockedPopoutsThrowError:!0,closePopoutsOnUnload:!0,showPopoutIcon:!0,showMaximiseIcon:!0,showCloseIcon:!0,responsiveMode:"onload",tabOverlapAllowance:0,reorderOnTabMenuClick:!0,tabControlOffset:10},dimensions:{borderWidth:5,borderGrabWidth:15,minItemHeight:10,minItemWidth:10,headerHeight:20,dragProxyWidth:300,dragProxyHeight:200},labels:{close:"close",maximise:"maximise",minimise:"minimise",popout:"open in new window",popin:"pop in",tabDropdown:"additional tabs"}}},function(e,t,n){n(75)(n(76))},function(e){e.exports=function(e){function t(e){"undefined"!=typeof console&&(console.error||console.log)("[Script Loader]",e)}try{"undefined"!=typeof execScript&&"undefined"!=typeof attachEvent&&"undefined"==typeof addEventListener?execScript(e):"undefined"==typeof eval?t("EvalError: No eval function available"):eval.call(null,e)}catch(e){t(e)}}},function(e){e.exports="/* Zepto v1.2.0 - zepto event ajax form ie - zeptojs.com/license */\n(function(global, factory) {\n if (typeof define === 'function' && define.amd)\n define(function() { return factory(global) })\n else\n factory(global)\n}(this, function(window) {\n var Zepto = (function() {\n var undefined, key, $, classList, emptyArray = [], concat = emptyArray.concat, filter = emptyArray.filter, slice = emptyArray.slice,\n document = window.document,\n elementDisplay = {}, classCache = {},\n cssNumber = { 'column-count': 1, 'columns': 1, 'font-weight': 1, 'line-height': 1,'opacity': 1, 'z-index': 1, 'zoom': 1 },\n fragmentRE = /^\\s*<(\\w+|!)[^>]*>/,\n singleTagRE = /^<(\\w+)\\s*\\/?>(?:<\\/\\1>|)$/,\n tagExpanderRE = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\\w:]+)[^>]*)\\/>/ig,\n rootNodeRE = /^(?:body|html)$/i,\n capitalRE = /([A-Z])/g,\n\n // special attributes that should be get/set via method calls\n methodAttributes = ['val', 'css', 'html', 'text', 'data', 'width', 'height', 'offset'],\n\n adjacencyOperators = [ 'after', 'prepend', 'before', 'append' ],\n table = document.createElement('table'),\n tableRow = document.createElement('tr'),\n containers = {\n 'tr': document.createElement('tbody'),\n 'tbody': table, 'thead': table, 'tfoot': table,\n 'td': tableRow, 'th': tableRow,\n '*': document.createElement('div')\n },\n readyRE = /complete|loaded|interactive/,\n simpleSelectorRE = /^[\\w-]*$/,\n class2type = {},\n toString = class2type.toString,\n zepto = {},\n camelize, uniq,\n tempParent = document.createElement('div'),\n propMap = {\n 'tabindex': 'tabIndex',\n 'readonly': 'readOnly',\n 'for': 'htmlFor',\n 'class': 'className',\n 'maxlength': 'maxLength',\n 'cellspacing': 'cellSpacing',\n 'cellpadding': 'cellPadding',\n 'rowspan': 'rowSpan',\n 'colspan': 'colSpan',\n 'usemap': 'useMap',\n 'frameborder': 'frameBorder',\n 'contenteditable': 'contentEditable'\n },\n isArray = Array.isArray ||\n function(object){ return object instanceof Array }\n\n zepto.matches = function(element, selector) {\n if (!selector || !element || element.nodeType !== 1) return false\n var matchesSelector = element.matches || element.webkitMatchesSelector ||\n element.mozMatchesSelector || element.oMatchesSelector ||\n element.matchesSelector\n if (matchesSelector) return matchesSelector.call(element, selector)\n // fall back to performing a selector:\n var match, parent = element.parentNode, temp = !parent\n if (temp) (parent = tempParent).appendChild(element)\n match = ~zepto.qsa(parent, selector).indexOf(element)\n temp && tempParent.removeChild(element)\n return match\n }\n\n function type(obj) {\n return obj == null ? String(obj) :\n class2type[toString.call(obj)] || \"object\"\n }\n\n function isFunction(value) { return type(value) == \"function\" }\n function isWindow(obj) { return obj != null && obj == obj.window }\n function isDocument(obj) { return obj != null && obj.nodeType == obj.DOCUMENT_NODE }\n function isObject(obj) { return type(obj) == \"object\" }\n function isPlainObject(obj) {\n return isObject(obj) && !isWindow(obj) && Object.getPrototypeOf(obj) == Object.prototype\n }\n\n function likeArray(obj) {\n var length = !!obj && 'length' in obj && obj.length,\n type = $.type(obj)\n\n return 'function' != type && !isWindow(obj) && (\n 'array' == type || length === 0 ||\n (typeof length == 'number' && length > 0 && (length - 1) in obj)\n )\n }\n\n function compact(array) { return filter.call(array, function(item){ return item != null }) }\n function flatten(array) { return array.length > 0 ? $.fn.concat.apply([], array) : array }\n camelize = function(str){ return str.replace(/-+(.)?/g, function(match, chr){ return chr ? chr.toUpperCase() : '' }) }\n function dasherize(str) {\n return str.replace(/::/g, '/')\n .replace(/([A-Z]+)([A-Z][a-z])/g, '$1_$2')\n .replace(/([a-z\\d])([A-Z])/g, '$1_$2')\n .replace(/_/g, '-')\n .toLowerCase()\n }\n uniq = function(array){ return filter.call(array, function(item, idx){ return array.indexOf(item) == idx }) }\n\n function classRE(name) {\n return name in classCache ?\n classCache[name] : (classCache[name] = new RegExp('(^|\\\\s)' + name + '(\\\\s|$)'))\n }\n\n function maybeAddPx(name, value) {\n return (typeof value == \"number\" && !cssNumber[dasherize(name)]) ? value + \"px\" : value\n }\n\n function defaultDisplay(nodeName) {\n var element, display\n if (!elementDisplay[nodeName]) {\n element = document.createElement(nodeName)\n document.body.appendChild(element)\n display = getComputedStyle(element, '').getPropertyValue(\"display\")\n element.parentNode.removeChild(element)\n display == \"none\" && (display = \"block\")\n elementDisplay[nodeName] = display\n }\n return elementDisplay[nodeName]\n }\n\n function children(element) {\n return 'children' in element ?\n slice.call(element.children) :\n $.map(element.childNodes, function(node){ if (node.nodeType == 1) return node })\n }\n\n function Z(dom, selector) {\n var i, len = dom ? dom.length : 0\n for (i = 0; i < len; i++) this[i] = dom[i]\n this.length = len\n this.selector = selector || ''\n }\n\n // `$.zepto.fragment` takes a html string and an optional tag name\n // to generate DOM nodes from the given html string.\n // The generated DOM nodes are returned as an array.\n // This function can be overridden in plugins for example to make\n // it compatible with browsers that don't support the DOM fully.\n zepto.fragment = function(html, name, properties) {\n var dom, nodes, container\n\n // A special case optimization for a single tag\n if (singleTagRE.test(html)) dom = $(document.createElement(RegExp.$1))\n\n if (!dom) {\n if (html.replace) html = html.replace(tagExpanderRE, \"<$1></$2>\")\n if (name === undefined) name = fragmentRE.test(html) && RegExp.$1\n if (!(name in containers)) name = '*'\n\n container = containers[name]\n container.innerHTML = '' + html\n dom = $.each(slice.call(container.childNodes), function(){\n container.removeChild(this)\n })\n }\n\n if (isPlainObject(properties)) {\n nodes = $(dom)\n $.each(properties, function(key, value) {\n if (methodAttributes.indexOf(key) > -1) nodes[key](value)\n else nodes.attr(key, value)\n })\n }\n\n return dom\n }\n\n // `$.zepto.Z` swaps out the prototype of the given `dom` array\n // of nodes with `$.fn` and thus supplying all the Zepto functions\n // to the array. This method can be overridden in plugins.\n zepto.Z = function(dom, selector) {\n return new Z(dom, selector)\n }\n\n // `$.zepto.isZ` should return `true` if the given object is a Zepto\n // collection. This method can be overridden in plugins.\n zepto.isZ = function(object) {\n return object instanceof zepto.Z\n }\n\n // `$.zepto.init` is Zepto's counterpart to jQuery's `$.fn.init` and\n // takes a CSS selector and an optional context (and handles various\n // special cases).\n // This method can be overridden in plugins.\n zepto.init = function(selector, context) {\n var dom\n // If nothing given, return an empty Zepto collection\n if (!selector) return zepto.Z()\n // Optimize for string selectors\n else if (typeof selector == 'string') {\n selector = selector.trim()\n // If it's a html fragment, create nodes from it\n // Note: In both Chrome 21 and Firefox 15, DOM error 12\n // is thrown if the fragment doesn't begin with <\n if (selector[0] == '<' && fragmentRE.test(selector))\n dom = zepto.fragment(selector, RegExp.$1, context), selector = null\n // If there's a context, create a collection on that context first, and select\n // nodes from there\n else if (context !== undefined) return $(context).find(selector)\n // If it's a CSS selector, use it to select nodes.\n else dom = zepto.qsa(document, selector)\n }\n // If a function is given, call it when the DOM is ready\n else if (isFunction(selector)) return $(document).ready(selector)\n // If a Zepto collection is given, just return it\n else if (zepto.isZ(selector)) return selector\n else {\n // normalize array if an array of nodes is given\n if (isArray(selector)) dom = compact(selector)\n // Wrap DOM nodes.\n else if (isObject(selector))\n dom = [selector], selector = null\n // If it's a html fragment, create nodes from it\n else if (fragmentRE.test(selector))\n dom = zepto.fragment(selector.trim(), RegExp.$1, context), selector = null\n // If there's a context, create a collection on that context first, and select\n // nodes from there\n else if (context !== undefined) return $(context).find(selector)\n // And last but no least, if it's a CSS selector, use it to select nodes.\n else dom = zepto.qsa(document, selector)\n }\n // create a new Zepto collection from the nodes found\n return zepto.Z(dom, selector)\n }\n\n // `$` will be the base `Zepto` object. When calling this\n // function just call `$.zepto.init, which makes the implementation\n // details of selecting nodes and creating Zepto collections\n // patchable in plugins.\n $ = function(selector, context){\n return zepto.init(selector, context)\n }\n\n function extend(target, source, deep) {\n for (key in source)\n if (deep && (isPlainObject(source[key]) || isArray(source[key]))) {\n if (isPlainObject(source[key]) && !isPlainObject(target[key]))\n target[key] = {}\n if (isArray(source[key]) && !isArray(target[key]))\n target[key] = []\n extend(target[key], source[key], deep)\n }\n else if (source[key] !== undefined) target[key] = source[key]\n }\n\n // Copy all but undefined properties from one or more\n // objects to the `target` object.\n $.extend = function(target){\n var deep, args = slice.call(arguments, 1)\n if (typeof target == 'boolean') {\n deep = target\n target = args.shift()\n }\n args.forEach(function(arg){ extend(target, arg, deep) })\n return target\n }\n\n // `$.zepto.qsa` is Zepto's CSS selector implementation which\n // uses `document.querySelectorAll` and optimizes for some special cases, like `#id`.\n // This method can be overridden in plugins.\n zepto.qsa = function(element, selector){\n var found,\n maybeID = selector[0] == '#',\n maybeClass = !maybeID && selector[0] == '.',\n nameOnly = maybeID || maybeClass ? selector.slice(1) : selector, // Ensure that a 1 char tag name still gets checked\n isSimple = simpleSelectorRE.test(nameOnly)\n return (element.getElementById && isSimple && maybeID) ? // Safari DocumentFragment doesn't have getElementById\n ( (found = element.getElementById(nameOnly)) ? [found] : [] ) :\n (element.nodeType !== 1 && element.nodeType !== 9 && element.nodeType !== 11) ? [] :\n slice.call(\n isSimple && !maybeID && element.getElementsByClassName ? // DocumentFragment doesn't have getElementsByClassName/TagName\n maybeClass ? element.getElementsByClassName(nameOnly) : // If it's simple, it could be a class\n element.getElementsByTagName(selector) : // Or a tag\n element.querySelectorAll(selector) // Or it's not simple, and we need to query all\n )\n }\n\n function filtered(nodes, selector) {\n return selector == null ? $(nodes) : $(nodes).filter(selector)\n }\n\n $.contains = document.documentElement.contains ?\n function(parent, node) {\n return parent !== node && parent.contains(node)\n } :\n function(parent, node) {\n while (node && (node = node.parentNode))\n if (node === parent) return true\n return false\n }\n\n function funcArg(context, arg, idx, payload) {\n return isFunction(arg) ? arg.call(context, idx, payload) : arg\n }\n\n function setAttribute(node, name, value) {\n value == null ? node.removeAttribute(name) : node.setAttribute(name, value)\n }\n\n // access className property while respecting SVGAnimatedString\n function className(node, value){\n var klass = node.className || '',\n svg = klass && klass.baseVal !== undefined\n\n if (value === undefined) return svg ? klass.baseVal : klass\n svg ? (klass.baseVal = value) : (node.className = value)\n }\n\n // \"true\" => true\n // \"false\" => false\n // \"null\" => null\n // \"42\" => 42\n // \"42.5\" => 42.5\n // \"08\" => \"08\"\n // JSON => parse if valid\n // String => self\n function deserializeValue(value) {\n try {\n return value ?\n value == \"true\" ||\n ( value == \"false\" ? false :\n value == \"null\" ? null :\n +value + \"\" == value ? +value :\n /^[\\[\\{]/.test(value) ? $.parseJSON(value) :\n value )\n : value\n } catch(e) {\n return value\n }\n }\n\n $.type = type\n $.isFunction = isFunction\n $.isWindow = isWindow\n $.isArray = isArray\n $.isPlainObject = isPlainObject\n\n $.isEmptyObject = function(obj) {\n var name\n for (name in obj) return false\n return true\n }\n\n $.isNumeric = function(val) {\n var num = Number(val), type = typeof val\n return val != null && type != 'boolean' &&\n (type != 'string' || val.length) &&\n !isNaN(num) && isFinite(num) || false\n }\n\n $.inArray = function(elem, array, i){\n return emptyArray.indexOf.call(array, elem, i)\n }\n\n $.camelCase = camelize\n $.trim = function(str) {\n return str == null ? \"\" : String.prototype.trim.call(str)\n }\n\n // plugin compatibility\n $.uuid = 0\n $.support = { }\n $.expr = { }\n $.noop = function() {}\n\n $.map = function(elements, callback){\n var value, values = [], i, key\n if (likeArray(elements))\n for (i = 0; i < elements.length; i++) {\n value = callback(elements[i], i)\n if (value != null) values.push(value)\n }\n else\n for (key in elements) {\n value = callback(elements[key], key)\n if (value != null) values.push(value)\n }\n return flatten(values)\n }\n\n $.each = function(elements, callback){\n var i, key\n if (likeArray(elements)) {\n for (i = 0; i < elements.length; i++)\n if (callback.call(elements[i], i, elements[i]) === false) return elements\n } else {\n for (key in elements)\n if (callback.call(elements[key], key, elements[key]) === false) return elements\n }\n\n return elements\n }\n\n $.grep = function(elements, callback){\n return filter.call(elements, callback)\n }\n\n if (window.JSON) $.parseJSON = JSON.parse\n\n // Populate the class2type map\n $.each(\"Boolean Number String Function Array Date RegExp Object Error\".split(\" \"), function(i, name) {\n class2type[ \"[object \" + name + \"]\" ] = name.toLowerCase()\n })\n\n // Define methods that will be available on all\n // Zepto collections\n $.fn = {\n constructor: zepto.Z,\n length: 0,\n\n // Because a collection acts like an array\n // copy over these useful array functions.\n forEach: emptyArray.forEach,\n reduce: emptyArray.reduce,\n push: emptyArray.push,\n sort: emptyArray.sort,\n splice: emptyArray.splice,\n indexOf: emptyArray.indexOf,\n concat: function(){\n var i, value, args = []\n for (i = 0; i < arguments.length; i++) {\n value = arguments[i]\n args[i] = zepto.isZ(value) ? value.toArray() : value\n }\n return concat.apply(zepto.isZ(this) ? this.toArray() : this, args)\n },\n\n // `map` and `slice` in the jQuery API work differently\n // from their array counterparts\n map: function(fn){\n return $($.map(this, function(el, i){ return fn.call(el, i, el) }))\n },\n slice: function(){\n return $(slice.apply(this, arguments))\n },\n\n ready: function(callback){\n // need to check if document.body exists for IE as that browser reports\n // document ready when it hasn't yet created the body element\n if (readyRE.test(document.readyState) && document.body) callback($)\n else document.addEventListener('DOMContentLoaded', function(){ callback($) }, false)\n return this\n },\n get: function(idx){\n return idx === undefined ? slice.call(this) : this[idx >= 0 ? idx : idx + this.length]\n },\n toArray: function(){ return this.get() },\n size: function(){\n return this.length\n },\n remove: function(){\n return this.each(function(){\n if (this.parentNode != null)\n this.parentNode.removeChild(this)\n })\n },\n each: function(callback){\n emptyArray.every.call(this, function(el, idx){\n return callback.call(el, idx, el) !== false\n })\n return this\n },\n filter: function(selector){\n if (isFunction(selector)) return this.not(this.not(selector))\n return $(filter.call(this, function(element){\n return zepto.matches(element, selector)\n }))\n },\n add: function(selector,context){\n return $(uniq(this.concat($(selector,context))))\n },\n is: function(selector){\n return this.length > 0 && zepto.matches(this[0], selector)\n },\n not: function(selector){\n var nodes=[]\n if (isFunction(selector) && selector.call !== undefined)\n this.each(function(idx){\n if (!selector.call(this,idx)) nodes.push(this)\n })\n else {\n var excludes = typeof selector == 'string' ? this.filter(selector) :\n (likeArray(selector) && isFunction(selector.item)) ? slice.call(selector) : $(selector)\n this.forEach(function(el){\n if (excludes.indexOf(el) < 0) nodes.push(el)\n })\n }\n return $(nodes)\n },\n has: function(selector){\n return this.filter(function(){\n return isObject(selector) ?\n $.contains(this, selector) :\n $(this).find(selector).size()\n })\n },\n eq: function(idx){\n return idx === -1 ? this.slice(idx) : this.slice(idx, + idx + 1)\n },\n first: function(){\n var el = this[0]\n return el && !isObject(el) ? el : $(el)\n },\n last: function(){\n var el = this[this.length - 1]\n return el && !isObject(el) ? el : $(el)\n },\n find: function(selector){\n var result, $this = this\n if (!selector) result = $()\n else if (typeof selector == 'object')\n result = $(selector).filter(function(){\n var node = this\n return emptyArray.some.call($this, function(parent){\n return $.contains(parent, node)\n })\n })\n else if (this.length == 1) result = $(zepto.qsa(this[0], selector))\n else result = this.map(function(){ return zepto.qsa(this, selector) })\n return result\n },\n closest: function(selector, context){\n var nodes = [], collection = typeof selector == 'object' && $(selector)\n this.each(function(_, node){\n while (node && !(collection ? collection.indexOf(node) >= 0 : zepto.matches(node, selector)))\n node = node !== context && !isDocument(node) && node.parentNode\n if (node && nodes.indexOf(node) < 0) nodes.push(node)\n })\n return $(nodes)\n },\n parents: function(selector){\n var ancestors = [], nodes = this\n while (nodes.length > 0)\n nodes = $.map(nodes, function(node){\n if ((node = node.parentNode) && !isDocument(node) && ancestors.indexOf(node) < 0) {\n ancestors.push(node)\n return node\n }\n })\n return filtered(ancestors, selector)\n },\n parent: function(selector){\n return filtered(uniq(this.pluck('parentNode')), selector)\n },\n children: function(selector){\n return filtered(this.map(function(){ return children(this) }), selector)\n },\n contents: function() {\n return this.map(function() { return this.contentDocument || slice.call(this.childNodes) })\n },\n siblings: function(selector){\n return filtered(this.map(function(i, el){\n return filter.call(children(el.parentNode), function(child){ return child!==el })\n }), selector)\n },\n empty: function(){\n return this.each(function(){ this.innerHTML = '' })\n },\n // `pluck` is borrowed from Prototype.js\n pluck: function(property){\n return $.map(this, function(el){ return el[property] })\n },\n show: function(){\n return this.each(function(){\n this.style.display == \"none\" && (this.style.display = '')\n if (getComputedStyle(this, '').getPropertyValue(\"display\") == \"none\")\n this.style.display = defaultDisplay(this.nodeName)\n })\n },\n replaceWith: function(newContent){\n return this.before(newContent).remove()\n },\n wrap: function(structure){\n var func = isFunction(structure)\n if (this[0] && !func)\n var dom = $(structure).get(0),\n clone = dom.parentNode || this.length > 1\n\n return this.each(function(index){\n $(this).wrapAll(\n func ? structure.call(this, index) :\n clone ? dom.cloneNode(true) : dom\n )\n })\n },\n wrapAll: function(structure){\n if (this[0]) {\n $(this[0]).before(structure = $(structure))\n var children\n // drill down to the inmost element\n while ((children = structure.children()).length) structure = children.first()\n $(structure).append(this)\n }\n return this\n },\n wrapInner: function(structure){\n var func = isFunction(structure)\n return this.each(function(index){\n var self = $(this), contents = self.contents(),\n dom = func ? structure.call(this, index) : structure\n contents.length ? contents.wrapAll(dom) : self.append(dom)\n })\n },\n unwrap: function(){\n this.parent().each(function(){\n $(this).replaceWith($(this).children())\n })\n return this\n },\n clone: function(){\n return this.map(function(){ return this.cloneNode(true) })\n },\n hide: function(){\n return this.css(\"display\", \"none\")\n },\n toggle: function(setting){\n return this.each(function(){\n var el = $(this)\n ;(setting === undefined ? el.css(\"display\") == \"none\" : setting) ? el.show() : el.hide()\n })\n },\n prev: function(selector){ return $(this.pluck('previousElementSibling')).filter(selector || '*') },\n next: function(selector){ return $(this.pluck('nextElementSibling')).filter(selector || '*') },\n html: function(html){\n return 0 in arguments ?\n this.each(function(idx){\n var originHtml = this.innerHTML\n $(this).empty().append( funcArg(this, html, idx, originHtml) )\n }) :\n (0 in this ? this[0].innerHTML : null)\n },\n text: function(text){\n return 0 in arguments ?\n this.each(function(idx){\n var newText = funcArg(this, text, idx, this.textContent)\n this.textContent = newText == null ? '' : ''+newText\n }) :\n (0 in this ? this.pluck('textContent').join(\"\") : null)\n },\n attr: function(name, value){\n var result\n return (typeof name == 'string' && !(1 in arguments)) ?\n (0 in this && this[0].nodeType == 1 && (result = this[0].getAttribute(name)) != null ? result : undefined) :\n this.each(function(idx){\n if (this.nodeType !== 1) return\n if (isObject(name)) for (key in name) setAttribute(this, key, name[key])\n else setAttribute(this, name, funcArg(this, value, idx, this.getAttribute(name)))\n })\n },\n removeAttr: function(name){\n return this.each(function(){ this.nodeType === 1 && name.split(' ').forEach(function(attribute){\n setAttribute(this, attribute)\n }, this)})\n },\n prop: function(name, value){\n name = propMap[name] || name\n return (1 in arguments) ?\n this.each(function(idx){\n this[name] = funcArg(this, value, idx, this[name])\n }) :\n (this[0] && this[0][name])\n },\n removeProp: function(name){\n name = propMap[name] || name\n return this.each(function(){ delete this[name] })\n },\n data: function(name, value){\n var attrName = 'data-' + name.replace(capitalRE, '-$1').toLowerCase()\n\n var data = (1 in arguments) ?\n this.attr(attrName, value) :\n this.attr(attrName)\n\n return data !== null ? deserializeValue(data) : undefined\n },\n val: function(value){\n if (0 in arguments) {\n if (value == null) value = \"\"\n return this.each(function(idx){\n this.value = funcArg(this, value, idx, this.value)\n })\n } else {\n return this[0] && (this[0].multiple ?\n $(this[0]).find('option').filter(function(){ return this.selected }).pluck('value') :\n this[0].value)\n }\n },\n offset: function(coordinates){\n if (coordinates) return this.each(function(index){\n var $this = $(this),\n coords = funcArg(this, coordinates, index, $this.offset()),\n parentOffset = $this.offsetParent().offset(),\n props = {\n top: coords.top - parentOffset.top,\n left: coords.left - parentOffset.left\n }\n\n if ($this.css('position') == 'static') props['position'] = 'relative'\n $this.css(props)\n })\n if (!this.length) return null\n if (document.documentElement !== this[0] && !$.contains(document.documentElement, this[0]))\n return {top: 0, left: 0}\n var obj = this[0].getBoundingClientRect()\n return {\n left: obj.left + window.pageXOffset,\n top: obj.top + window.pageYOffset,\n width: Math.round(obj.width),\n height: Math.round(obj.height)\n }\n },\n css: function(property, value){\n if (arguments.length < 2) {\n var element = this[0]\n if (typeof property == 'string') {\n if (!element) return\n return element.style[camelize(property)] || getComputedStyle(element, '').getPropertyValue(property)\n } else if (isArray(property)) {\n if (!element) return\n var props = {}\n var computedStyle = getComputedStyle(element, '')\n $.each(property, function(_, prop){\n props[prop] = (element.style[camelize(prop)] || computedStyle.getPropertyValue(prop))\n })\n return props\n }\n }\n\n var css = ''\n if (type(property) == 'string') {\n if (!value && value !== 0)\n this.each(function(){ this.style.removeProperty(dasherize(property)) })\n else\n css = dasherize(property) + \":\" + maybeAddPx(property, value)\n } else {\n for (key in property)\n if (!property[key] && property[key] !== 0)\n this.each(function(){ this.style.removeProperty(dasherize(key)) })\n else\n css += dasherize(key) + ':' + maybeAddPx(key, property[key]) + ';'\n }\n\n return this.each(function(){ this.style.cssText += ';' + css })\n },\n index: function(element){\n return element ? this.indexOf($(element)[0]) : this.parent().children().indexOf(this[0])\n },\n hasClass: function(name){\n if (!name) return false\n return emptyArray.some.call(this, function(el){\n return this.test(className(el))\n }, classRE(name))\n },\n addClass: function(name){\n if (!name) return this\n return this.each(function(idx){\n if (!('className' in this)) return\n classList = []\n var cls = className(this), newName = funcArg(this, name, idx, cls)\n newName.split(/\\s+/g).forEach(function(klass){\n if (!$(this).hasClass(klass)) classList.push(klass)\n }, this)\n classList.length && className(this, cls + (cls ? \" \" : \"\") + classList.join(\" \"))\n })\n },\n removeClass: function(name){\n return this.each(function(idx){\n if (!('className' in this)) return\n if (name === undefined) return className(this, '')\n classList = className(this)\n funcArg(this, name, idx, classList).split(/\\s+/g).forEach(function(klass){\n classList = classList.replace(classRE(klass), \" \")\n })\n className(this, classList.trim())\n })\n },\n toggleClass: function(name, when){\n if (!name) return this\n return this.each(function(idx){\n var $this = $(this), names = funcArg(this, name, idx, className(this))\n names.split(/\\s+/g).forEach(function(klass){\n (when === undefined ? !$this.hasClass(klass) : when) ?\n $this.addClass(klass) : $this.removeClass(klass)\n })\n })\n },\n scrollTop: function(value){\n if (!this.length) return\n var hasScrollTop = 'scrollTop' in this[0]\n if (value === undefined) return hasScrollTop ? this[0].scrollTop : this[0].pageYOffset\n return this.each(hasScrollTop ?\n function(){ this.scrollTop = value } :\n function(){ this.scrollTo(this.scrollX, value) })\n },\n scrollLeft: function(value){\n if (!this.length) return\n var hasScrollLeft = 'scrollLeft' in this[0]\n if (value === undefined) return hasScrollLeft ? this[0].scrollLeft : this[0].pageXOffset\n return this.each(hasScrollLeft ?\n function(){ this.scrollLeft = value } :\n function(){ this.scrollTo(value, this.scrollY) })\n },\n position: function() {\n if (!this.length) return\n\n var elem = this[0],\n // Get *real* offsetParent\n offsetParent = this.offsetParent(),\n // Get correct offsets\n offset = this.offset(),\n parentOffset = rootNodeRE.test(offsetParent[0].nodeName) ? { top: 0, left: 0 } : offsetParent.offset()\n\n // Subtract element margins\n // note: when an element has margin: auto the offsetLeft and marginLeft\n // are the same in Safari causing offset.left to incorrectly be 0\n offset.top -= parseFloat( $(elem).css('margin-top') ) || 0\n offset.left -= parseFloat( $(elem).css('margin-left') ) || 0\n\n // Add offsetParent borders\n parentOffset.top += parseFloat( $(offsetParent[0]).css('border-top-width') ) || 0\n parentOffset.left += parseFloat( $(offsetParent[0]).css('border-left-width') ) || 0\n\n // Subtract the two offsets\n return {\n top: offset.top - parentOffset.top,\n left: offset.left - parentOffset.left\n }\n },\n offsetParent: function() {\n return this.map(function(){\n var parent = this.offsetParent || document.body\n while (parent && !rootNodeRE.test(parent.nodeName) && $(parent).css(\"position\") == \"static\")\n parent = parent.offsetParent\n return parent\n })\n }\n }\n\n // for now\n $.fn.detach = $.fn.remove\n\n // Generate the `width` and `height` functions\n ;['width', 'height'].forEach(function(dimension){\n var dimensionProperty =\n dimension.replace(/./, function(m){ return m[0].toUpperCase() })\n\n $.fn[dimension] = function(value){\n var offset, el = this[0]\n if (value === undefined) return isWindow(el) ? el['inner' + dimensionProperty] :\n isDocument(el) ? el.documentElement['scroll' + dimensionProperty] :\n (offset = this.offset()) && offset[dimension]\n else return this.each(function(idx){\n el = $(this)\n el.css(dimension, funcArg(this, value, idx, el[dimension]()))\n })\n }\n })\n\n function traverseNode(node, fun) {\n fun(node)\n for (var i = 0, len = node.childNodes.length; i < len; i++)\n traverseNode(node.childNodes[i], fun)\n }\n\n // Generate the `after`, `prepend`, `before`, `append`,\n // `insertAfter`, `insertBefore`, `appendTo`, and `prependTo` methods.\n adjacencyOperators.forEach(function(operator, operatorIndex) {\n var inside = operatorIndex % 2 //=> prepend, append\n\n $.fn[operator] = function(){\n // arguments can be nodes, arrays of nodes, Zepto objects and HTML strings\n var argType, nodes = $.map(arguments, function(arg) {\n var arr = []\n argType = type(arg)\n if (argType == \"array\") {\n arg.forEach(function(el) {\n if (el.nodeType !== undefined) return arr.push(el)\n else if ($.zepto.isZ(el)) return arr = arr.concat(el.get())\n arr = arr.concat(zepto.fragment(el))\n })\n return arr\n }\n return argType == \"object\" || arg == null ?\n arg : zepto.fragment(arg)\n }),\n parent, copyByClone = this.length > 1\n if (nodes.length < 1) return this\n\n return this.each(function(_, target){\n parent = inside ? target : target.parentNode\n\n // convert all methods to a \"before\" operation\n target = operatorIndex == 0 ? target.nextSibling :\n operatorIndex == 1 ? target.firstChild :\n operatorIndex == 2 ? target :\n null\n\n var parentInDocument = $.contains(document.documentElement, parent)\n\n nodes.forEach(function(node){\n if (copyByClone) node = node.cloneNode(true)\n else if (!parent) return $(node).remove()\n\n parent.insertBefore(node, target)\n if (parentInDocument) traverseNode(node, function(el){\n if (el.nodeName != null && el.nodeName.toUpperCase() === 'SCRIPT' &&\n (!el.type || el.type === 'text/javascript') && !el.src){\n var target = el.ownerDocument ? el.ownerDocument.defaultView : window\n target['eval'].call(target, el.innerHTML)\n }\n })\n })\n })\n }\n\n // after => insertAfter\n // prepend => prependTo\n // before => insertBefore\n // append => appendTo\n $.fn[inside ? operator+'To' : 'insert'+(operatorIndex ? 'Before' : 'After')] = function(html){\n $(html)[operator](this)\n return this\n }\n })\n\n zepto.Z.prototype = Z.prototype = $.fn\n\n // Export internal API functions in the `$.zepto` namespace\n zepto.uniq = uniq\n zepto.deserializeValue = deserializeValue\n $.zepto = zepto\n\n return $\n})()\n\nwindow.Zepto = Zepto\nwindow.$ === undefined && (window.$ = Zepto)\n\n;(function($){\n var _zid = 1, undefined,\n slice = Array.prototype.slice,\n isFunction = $.isFunction,\n isString = function(obj){ return typeof obj == 'string' },\n handlers = {},\n specialEvents={},\n focusinSupported = 'onfocusin' in window,\n focus = { focus: 'focusin', blur: 'focusout' },\n hover = { mouseenter: 'mouseover', mouseleave: 'mouseout' }\n\n specialEvents.click = specialEvents.mousedown = specialEvents.mouseup = specialEvents.mousemove = 'MouseEvents'\n\n function zid(element) {\n return element._zid || (element._zid = _zid++)\n }\n function findHandlers(element, event, fn, selector) {\n event = parse(event)\n if (event.ns) var matcher = matcherFor(event.ns)\n return (handlers[zid(element)] || []).filter(function(handler) {\n return handler\n && (!event.e || handler.e == event.e)\n && (!event.ns || matcher.test(handler.ns))\n && (!fn || zid(handler.fn) === zid(fn))\n && (!selector || handler.sel == selector)\n })\n }\n function parse(event) {\n var parts = ('' + event).split('.')\n return {e: parts[0], ns: parts.slice(1).sort().join(' ')}\n }\n function matcherFor(ns) {\n return new RegExp('(?:^| )' + ns.replace(' ', ' .* ?') + '(?: |$)')\n }\n\n function eventCapture(handler, captureSetting) {\n return handler.del &&\n (!focusinSupported && (handler.e in focus)) ||\n !!captureSetting\n }\n\n function realEvent(type) {\n return hover[type] || (focusinSupported && focus[type]) || type\n }\n\n function add(element, events, fn, data, selector, delegator, capture){\n var id = zid(element), set = (handlers[id] || (handlers[id] = []))\n events.split(/\\s/).forEach(function(event){\n if (event == 'ready') return $(document).ready(fn)\n var handler = parse(event)\n handler.fn = fn\n handler.sel = selector\n // emulate mouseenter, mouseleave\n if (handler.e in hover) fn = function(e){\n var related = e.relatedTarget\n if (!related || (related !== this && !$.contains(this, related)))\n return handler.fn.apply(this, arguments)\n }\n handler.del = delegator\n var callback = delegator || fn\n handler.proxy = function(e){\n e = compatible(e)\n if (e.isImmediatePropagationStopped()) return\n e.data = data\n var result = callback.apply(element, e._args == undefined ? [e] : [e].concat(e._args))\n if (result === false) e.preventDefault(), e.stopPropagation()\n return result\n }\n handler.i = set.length\n set.push(handler)\n if ('addEventListener' in element)\n element.addEventListener(realEvent(handler.e), handler.proxy, eventCapture(handler, capture))\n })\n }\n function remove(element, events, fn, selector, capture){\n var id = zid(element)\n ;(events || '').split(/\\s/).forEach(function(event){\n findHandlers(element, event, fn, selector).forEach(function(handler){\n delete handlers[id][handler.i]\n if ('removeEventListener' in element)\n element.removeEventListener(realEvent(handler.e), handler.proxy, eventCapture(handler, capture))\n })\n })\n }\n\n $.event = { add: add, remove: remove }\n\n $.proxy = function(fn, context) {\n var args = (2 in arguments) && slice.call(arguments, 2)\n if (isFunction(fn)) {\n var proxyFn = function(){ return fn.apply(context, args ? args.concat(slice.call(arguments)) : arguments) }\n proxyFn._zid = zid(fn)\n return proxyFn\n } else if (isString(context)) {\n if (args) {\n args.unshift(fn[context], fn)\n return $.proxy.apply(null, args)\n } else {\n return $.proxy(fn[context], fn)\n }\n } else {\n throw new TypeError(\"expected function\")\n }\n }\n\n $.fn.bind = function(event, data, callback){\n return this.on(event, data, callback)\n }\n $.fn.unbind = function(event, callback){\n return this.off(event, callback)\n }\n $.fn.one = function(event, selector, data, callback){\n return this.on(event, selector, data, callback, 1)\n }\n\n var returnTrue = function(){return true},\n returnFalse = function(){return false},\n ignoreProperties = /^([A-Z]|returnValue$|layer[XY]$|webkitMovement[XY]$)/,\n eventMethods = {\n preventDefault: 'isDefaultPrevented',\n stopImmediatePropagation: 'isImmediatePropagationStopped',\n stopPropagation: 'isPropagationStopped'\n }\n\n function compatible(event, source) {\n if (source || !event.isDefaultPrevented) {\n source || (source = event)\n\n $.each(eventMethods, function(name, predicate) {\n var sourceMethod = source[name]\n event[name] = function(){\n this[predicate] = returnTrue\n return sourceMethod && sourceMethod.apply(source, arguments)\n }\n event[predicate] = returnFalse\n })\n\n event.timeStamp || (event.timeStamp = Date.now())\n\n if (source.defaultPrevented !== undefined ? source.defaultPrevented :\n 'returnValue' in source ? source.returnValue === false :\n source.getPreventDefault && source.getPreventDefault())\n event.isDefaultPrevented = returnTrue\n }\n return event\n }\n\n function createProxy(event) {\n var key, proxy = { originalEvent: event }\n for (key in event)\n if (!ignoreProperties.test(key) && event[key] !== undefined) proxy[key] = event[key]\n\n return compatible(proxy, event)\n }\n\n $.fn.delegate = function(selector, event, callback){\n return this.on(event, selector, callback)\n }\n $.fn.undelegate = function(selector, event, callback){\n return this.off(event, selector, callback)\n }\n\n $.fn.live = function(event, callback){\n $(document.body).delegate(this.selector, event, callback)\n return this\n }\n $.fn.die = function(event, callback){\n $(document.body).undelegate(this.selector, event, callback)\n return this\n }\n\n $.fn.on = function(event, selector, data, callback, one){\n var autoRemove, delegator, $this = this\n if (event && !isString(event)) {\n $.each(event, function(type, fn){\n $this.on(type, selector, data, fn, one)\n })\n return $this\n }\n\n if (!isString(selector) && !isFunction(callback) && callback !== false)\n callback = data, data = selector, selector = undefined\n if (callback === undefined || data === false)\n callback = data, data = undefined\n\n if (callback === false) callback = returnFalse\n\n return $this.each(function(_, element){\n if (one) autoRemove = function(e){\n remove(element, e.type, callback)\n return callback.apply(this, arguments)\n }\n\n if (selector) delegator = function(e){\n var evt, match = $(e.target).closest(selector, element).get(0)\n if (match && match !== element) {\n evt = $.extend(createProxy(e), {currentTarget: match, liveFired: element})\n return (autoRemove || callback).apply(match, [evt].concat(slice.call(arguments, 1)))\n }\n }\n\n add(element, event, callback, data, selector, delegator || autoRemove)\n })\n }\n $.fn.off = function(event, selector, callback){\n var $this = this\n if (event && !isString(event)) {\n $.each(event, function(type, fn){\n $this.off(type, selector, fn)\n })\n return $this\n }\n\n if (!isString(selector) && !isFunction(callback) && callback !== false)\n callback = selector, selector = undefined\n\n if (callback === false) callback = returnFalse\n\n return $this.each(function(){\n remove(this, event, callback, selector)\n })\n }\n\n $.fn.trigger = function(event, args){\n event = (isString(event) || $.isPlainObject(event)) ? $.Event(event) : compatible(event)\n event._args = args\n return this.each(function(){\n // handle focus(), blur() by calling them directly\n if (event.type in focus && typeof this[event.type] == \"function\") this[event.type]()\n // items in the collection might not be DOM elements\n else if ('dispatchEvent' in this) this.dispatchEvent(event)\n else $(this).triggerHandler(event, args)\n })\n }\n\n // triggers event handlers on current element just as if an event occurred,\n // doesn't trigger an actual event, doesn't bubble\n $.fn.triggerHandler = function(event, args){\n var e, result\n this.each(function(i, element){\n e = createProxy(isString(event) ? $.Event(event) : event)\n e._args = args\n e.target = element\n $.each(findHandlers(element, event.type || event), function(i, handler){\n result = handler.proxy(e)\n if (e.isImmediatePropagationStopped()) return false\n })\n })\n return result\n }\n\n // shortcut methods for `.bind(event, fn)` for each event type\n ;('focusin focusout focus blur load resize scroll unload click dblclick '+\n 'mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave '+\n 'change select keydown keypress keyup error').split(' ').forEach(function(event) {\n $.fn[event] = function(callback) {\n return (0 in arguments) ?\n this.bind(event, callback) :\n this.trigger(event)\n }\n })\n\n $.Event = function(type, props) {\n if (!isString(type)) props = type, type = props.type\n var event = document.createEvent(specialEvents[type] || 'Events'), bubbles = true\n if (props) for (var name in props) (name == 'bubbles') ? (bubbles = !!props[name]) : (event[name] = props[name])\n event.initEvent(type, bubbles, true)\n return compatible(event)\n }\n\n})(Zepto)\n\n;(function($){\n var jsonpID = +new Date(),\n document = window.document,\n key,\n name,\n rscript = /<script\\b[^<]*(?:(?!<\\/script>)<[^<]*)*<\\/script>/gi,\n scriptTypeRE = /^(?:text|application)\\/javascript/i,\n xmlTypeRE = /^(?:text|application)\\/xml/i,\n jsonType = 'application/json',\n htmlType = 'text/html',\n blankRE = /^\\s*$/,\n originAnchor = document.createElement('a')\n\n originAnchor.href = window.location.href\n\n // trigger a custom event and return false if it was cancelled\n function triggerAndReturn(context, eventName, data) {\n var event = $.Event(eventName)\n $(context).trigger(event, data)\n return !event.isDefaultPrevented()\n }\n\n // trigger an Ajax \"global\" event\n function triggerGlobal(settings, context, eventName, data) {\n if (settings.global) return triggerAndReturn(context || document, eventName, data)\n }\n\n // Number of active Ajax requests\n $.active = 0\n\n function ajaxStart(settings) {\n if (settings.global && $.active++ === 0) triggerGlobal(settings, null, 'ajaxStart')\n }\n function ajaxStop(settings) {\n if (settings.global && !(--$.active)) triggerGlobal(settings, null, 'ajaxStop')\n }\n\n // triggers an extra global event \"ajaxBeforeSend\" that's like \"ajaxSend\" but cancelable\n function ajaxBeforeSend(xhr, settings) {\n var context = settings.context\n if (settings.beforeSend.call(context, xhr, settings) === false ||\n triggerGlobal(settings, context, 'ajaxBeforeSend', [xhr, settings]) === false)\n return false\n\n triggerGlobal(settings, context, 'ajaxSend', [xhr, settings])\n }\n function ajaxSuccess(data, xhr, settings, deferred) {\n var context = settings.context, status = 'success'\n settings.success.call(context, data, status, xhr)\n if (deferred) deferred.resolveWith(context, [data, status, xhr])\n triggerGlobal(settings, context, 'ajaxSuccess', [xhr, settings, data])\n ajaxComplete(status, xhr, settings)\n }\n // type: \"timeout\", \"error\", \"abort\", \"parsererror\"\n function ajaxError(error, type, xhr, settings, deferred) {\n var context = settings.context\n settings.error.call(context, xhr, type, error)\n if (deferred) deferred.rejectWith(context, [xhr, type, error])\n triggerGlobal(settings, context, 'ajaxError', [xhr, settings, error || type])\n ajaxComplete(type, xhr, settings)\n }\n // status: \"success\", \"notmodified\", \"error\", \"timeout\", \"abort\", \"parsererror\"\n function ajaxComplete(status, xhr, settings) {\n var context = settings.context\n settings.complete.call(context, xhr, status)\n triggerGlobal(settings, context, 'ajaxComplete', [xhr, settings])\n ajaxStop(settings)\n }\n\n function ajaxDataFilter(data, type, settings) {\n if (settings.dataFilter == empty) return data\n var context = settings.context\n return settings.dataFilter.call(context, data, type)\n }\n\n // Empty function, used as default callback\n function empty() {}\n\n $.ajaxJSONP = function(options, deferred){\n if (!('type' in options)) return $.ajax(options)\n\n var _callbackName = options.jsonpCallback,\n callbackName = ($.isFunction(_callbackName) ?\n _callbackName() : _callbackName) || ('Zepto' + (jsonpID++)),\n script = document.createElement('script'),\n originalCallback = window[callbackName],\n responseData,\n abort = function(errorType) {\n $(script).triggerHandler('error', errorType || 'abort')\n },\n xhr = { abort: abort }, abortTimeout\n\n if (deferred) deferred.promise(xhr)\n\n $(script).on('load error', function(e, errorType){\n clearTimeout(abortTimeout)\n $(script).off().remove()\n\n if (e.type == 'error' || !responseData) {\n ajaxError(null, errorType || 'error', xhr, options, deferred)\n } else {\n ajaxSuccess(responseData[0], xhr, options, deferred)\n }\n\n window[callbackName] = originalCallback\n if (responseData && $.isFunction(originalCallback))\n originalCallback(responseData[0])\n\n originalCallback = responseData = undefined\n })\n\n if (ajaxBeforeSend(xhr, options) === false) {\n abort('abort')\n return xhr\n }\n\n window[callbackName] = function(){\n responseData = arguments\n }\n\n script.src = options.url.replace(/\\?(.+)=\\?/, '?$1=' + callbackName)\n document.head.appendChild(script)\n\n if (options.timeout > 0) abortTimeout = setTimeout(function(){\n abort('timeout')\n }, options.timeout)\n\n return xhr\n }\n\n $.ajaxSettings = {\n // Default type of request\n type: 'GET',\n // Callback that is executed before request\n beforeSend: empty,\n // Callback that is executed if the request succeeds\n success: empty,\n // Callback that is executed the the server drops error\n error: empty,\n // Callback that is executed on request complete (both: error and success)\n complete: empty,\n // The context for the callbacks\n context: null,\n // Whether to trigger \"global\" Ajax events\n global: true,\n // Transport\n xhr: function () {\n return new window.XMLHttpRequest()\n },\n // MIME types mapping\n // IIS returns Javascript as \"application/x-javascript\"\n accepts: {\n script: 'text/javascript, application/javascript, application/x-javascript',\n json: jsonType,\n xml: 'application/xml, text/xml',\n html: htmlType,\n text: 'text/plain'\n },\n // Whether the request is to another domain\n crossDomain: false,\n // Default timeout\n timeout: 0,\n // Whether data should be serialized to string\n processData: true,\n // Whether the browser should be allowed to cache GET responses\n cache: true,\n //Used to handle the raw response data of XMLHttpRequest.\n //This is a pre-filtering function to sanitize the response.\n //The sanitized response should be returned\n dataFilter: empty\n }\n\n function mimeToDataType(mime) {\n if (mime) mime = mime.split(';', 2)[0]\n return mime && ( mime == htmlType ? 'html' :\n mime == jsonType ? 'json' :\n scriptTypeRE.test(mime) ? 'script' :\n xmlTypeRE.test(mime) && 'xml' ) || 'text'\n }\n\n function appendQuery(url, query) {\n if (query == '') return url\n return (url + '&' + query).replace(/[&?]{1,2}/, '?')\n }\n\n // serialize payload and append it to the URL for GET requests\n function serializeData(options) {\n if (options.processData && options.data && $.type(options.data) != \"string\")\n options.data = $.param(options.data, options.traditional)\n if (options.data && (!options.type || options.type.toUpperCase() == 'GET' || 'jsonp' == options.dataType))\n options.url = appendQuery(options.url, options.data), options.data = undefined\n }\n\n $.ajax = function(options){\n var settings = $.extend({}, options || {}),\n deferred = $.Deferred && $.Deferred(),\n urlAnchor, hashIndex\n for (key in $.ajaxSettings) if (settings[key] === undefined) settings[key] = $.ajaxSettings[key]\n\n ajaxStart(settings)\n\n if (!settings.crossDomain) {\n urlAnchor = document.createElement('a')\n urlAnchor.href = settings.url\n // cleans up URL for .href (IE only), see https://github.com/madrobby/zepto/pull/1049\n urlAnchor.href = urlAnchor.href\n settings.crossDomain = (originAnchor.protocol + '//' + originAnchor.host) !== (urlAnchor.protocol + '//' + urlAnchor.host)\n }\n\n if (!settings.url) settings.url = window.location.toString()\n if ((hashIndex = settings.url.indexOf('#')) > -1) settings.url = settings.url.slice(0, hashIndex)\n serializeData(settings)\n\n var dataType = settings.dataType, hasPlaceholder = /\\?.+=\\?/.test(settings.url)\n if (hasPlaceholder) dataType = 'jsonp'\n\n if (settings.cache === false || (\n (!options || options.cache !== true) &&\n ('script' == dataType || 'jsonp' == dataType)\n ))\n settings.url = appendQuery(settings.url, '_=' + Date.now())\n\n if ('jsonp' == dataType) {\n if (!hasPlaceholder)\n settings.url = appendQuery(settings.url,\n settings.jsonp ? (settings.jsonp + '=?') : settings.jsonp === false ? '' : 'callback=?')\n return $.ajaxJSONP(settings, deferred)\n }\n\n var mime = settings.accepts[dataType],\n headers = { },\n setHeader = function(name, value) { headers[name.toLowerCase()] = [name, value] },\n protocol = /^([\\w-]+:)\\/\\//.test(settings.url) ? RegExp.$1 : window.location.protocol,\n xhr = settings.xhr(),\n nativeSetHeader = xhr.setRequestHeader,\n abortTimeout\n\n if (deferred) deferred.promise(xhr)\n\n if (!settings.crossDomain) setHeader('X-Requested-With', 'XMLHttpRequest')\n setHeader('Accept', mime || '*/*')\n if (mime = settings.mimeType || mime) {\n if (mime.indexOf(',') > -1) mime = mime.split(',', 2)[0]\n xhr.overrideMimeType && xhr.overrideMimeType(mime)\n }\n if (settings.contentType || (settings.contentType !== false && settings.data && settings.type.toUpperCase() != 'GET'))\n setHeader('Content-Type', settings.contentType || 'application/x-www-form-urlencoded')\n\n if (settings.headers) for (name in settings.headers) setHeader(name, settings.headers[name])\n xhr.setRequestHeader = setHeader\n\n xhr.onreadystatechange = function(){\n if (xhr.readyState == 4) {\n xhr.onreadystatechange = empty\n clearTimeout(abortTimeout)\n var result, error = false\n if ((xhr.status >= 200 && xhr.status < 300) || xhr.status == 304 || (xhr.status == 0 && protocol == 'file:')) {\n dataType = dataType || mimeToDataType(settings.mimeType || xhr.getResponseHeader('content-type'))\n\n if (xhr.responseType == 'arraybuffer' || xhr.responseType == 'blob')\n result = xhr.response\n else {\n result = xhr.responseText\n\n try {\n // http://perfectionkills.com/global-eval-what-are-the-options/\n // sanitize response accordingly if data filter callback provided\n result = ajaxDataFilter(result, dataType, settings)\n if (dataType == 'script') (1,eval)(result)\n else if (dataType == 'xml') result = xhr.responseXML\n else if (dataType == 'json') result = blankRE.test(result) ? null : $.parseJSON(result)\n } catch (e) { error = e }\n\n if (error) return ajaxError(error, 'parsererror', xhr, settings, deferred)\n }\n\n ajaxSuccess(result, xhr, settings, deferred)\n } else {\n ajaxError(xhr.statusText || null, xhr.status ? 'error' : 'abort', xhr, settings, deferred)\n }\n }\n }\n\n if (ajaxBeforeSend(xhr, settings) === false) {\n xhr.abort()\n ajaxError(null, 'abort', xhr, settings, deferred)\n return xhr\n }\n\n var async = 'async' in settings ? settings.async : true\n xhr.open(settings.type, settings.url, async, settings.username, settings.password)\n\n if (settings.xhrFields) for (name in settings.xhrFields) xhr[name] = settings.xhrFields[name]\n\n for (name in headers) nativeSetHeader.apply(xhr, headers[name])\n\n if (settings.timeout > 0) abortTimeout = setTimeout(function(){\n xhr.onreadystatechange = empty\n xhr.abort()\n ajaxError(null, 'timeout', xhr, settings, deferred)\n }, settings.timeout)\n\n // avoid sending empty string (#319)\n xhr.send(settings.data ? settings.data : null)\n return xhr\n }\n\n // handle optional data/success arguments\n function parseArguments(url, data, success, dataType) {\n if ($.isFunction(data)) dataType = success, success = data, data = undefined\n if (!$.isFunction(success)) dataType = success, success = undefined\n return {\n url: url\n , data: data\n , success: success\n , dataType: dataType\n }\n }\n\n $.get = function(/* url, data, success, dataType */){\n return $.ajax(parseArguments.apply(null, arguments))\n }\n\n $.post = function(/* url, data, success, dataType */){\n var options = parseArguments.apply(null, arguments)\n options.type = 'POST'\n return $.ajax(options)\n }\n\n $.getJSON = function(/* url, data, success */){\n var options = parseArguments.apply(null, arguments)\n options.dataType = 'json'\n return $.ajax(options)\n }\n\n $.fn.load = function(url, data, success){\n if (!this.length) return this\n var self = this, parts = url.split(/\\s/), selector,\n options = parseArguments(url, data, success),\n callback = options.success\n if (parts.length > 1) options.url = parts[0], selector = parts[1]\n options.success = function(response){\n self.html(selector ?\n $('<div>').html(response.replace(rscript, \"\")).find(selector)\n : response)\n callback && callback.apply(self, arguments)\n }\n $.ajax(options)\n return this\n }\n\n var escape = encodeURIComponent\n\n function serialize(params, obj, traditional, scope){\n var type, array = $.isArray(obj), hash = $.isPlainObject(obj)\n $.each(obj, function(key, value) {\n type = $.type(value)\n if (scope) key = traditional ? scope :\n scope + '[' + (hash || type == 'object' || type == 'array' ? key : '') + ']'\n // handle data in serializeArray() format\n if (!scope && array) params.add(value.name, value.value)\n // recurse into nested objects\n else if (type == \"array\" || (!traditional && type == \"object\"))\n serialize(params, value, traditional, key)\n else params.add(key, value)\n })\n }\n\n $.param = function(obj, traditional){\n var params = []\n params.add = function(key, value) {\n if ($.isFunction(value)) value = value()\n if (value == null) value = \"\"\n this.push(escape(key) + '=' + escape(value))\n }\n serialize(params, obj, traditional)\n return params.join('&').replace(/%20/g, '+')\n }\n})(Zepto)\n\n;(function($){\n $.fn.serializeArray = function() {\n var name, type, result = [],\n add = function(value) {\n if (value.forEach) return value.forEach(add)\n result.push({ name: name, value: value })\n }\n if (this[0]) $.each(this[0].elements, function(_, field){\n type = field.type, name = field.name\n if (name && field.nodeName.toLowerCase() != 'fieldset' &&\n !field.disabled && type != 'submit' && type != 'reset' && type != 'button' && type != 'file' &&\n ((type != 'radio' && type != 'checkbox') || field.checked))\n add($(field).val())\n })\n return result\n }\n\n $.fn.serialize = function(){\n var result = []\n this.serializeArray().forEach(function(elm){\n result.push(encodeURIComponent(elm.name) + '=' + encodeURIComponent(elm.value))\n })\n return result.join('&')\n }\n\n $.fn.submit = function(callback) {\n if (0 in arguments) this.bind('submit', callback)\n else if (this.length) {\n var event = $.Event('submit')\n this.eq(0).trigger(event)\n if (!event.isDefaultPrevented()) this.get(0).submit()\n }\n return this\n }\n\n})(Zepto)\n\n;(function(){\n // getComputedStyle shouldn't freak out when called\n // without a valid element as argument\n try {\n getComputedStyle(undefined)\n } catch(e) {\n var nativeGetComputedStyle = getComputedStyle\n window.getComputedStyle = function(element, pseudoElement){\n try {\n return nativeGetComputedStyle(element, pseudoElement)\n } catch(e) {\n return null\n }\n }\n }\n})()\n return Zepto\n}))\n"},function(){!function(e){e.expr={":":{}},e.support={},e.fn.clone=function(){var t=e();return this.each(function(){t.push(this.cloneNode(!0))}),t},["Left","Top"].forEach(function(t,n){function i(e){return function(e){return e&&"object"==(void 0===e?"undefined":a(e))&&"setInterval"in e}(e)?e:!(9!==e.nodeType)&&(e.defaultView||e.parentWindow)}var o="scroll"+t;e.fn[o]=function(t){var s,r;return void 0===t?(s=this[0])?(r=i(s))?"pageXOffset"in r?r[n?"pageYOffset":"pageXOffset"]:r.document.documentElement[o]||r.document.body[o]:s[o]:null:void this.each(function(){if(r=i(this)){var s=n?e(r).scrollLeft():t,a=n?t:e(r).scrollTop();r.scrollTo(s,a)}else this[o]=t})}}),["width","height"].forEach(function(t){var n=t.replace(/./,function(e){return e[0].toUpperCase()});e.fn["inner"+n]=function(e){var n=this;if(n){var i=n[t]();return{width:["left","right"],height:["top","bottom"]}[t].forEach(function(t){i+=parseInt(n.css("padding-"+t),10),e&&(i+=parseInt(n.css("margin-"+t),10))}),i}return null},e.fn["outer"+n]=function(e){var n=this;if(n){var i=n[t]();return{width:["left","right"],height:["top","bottom"]}[t].forEach(function(t){e&&(i+=parseInt(n.css("margin-"+t),10))}),i}return null}}),e.proxy=function(t,n){if("string"==typeof n){var i=t[n];n=t,t=i}if(e.isFunction(t)){var o=Array.prototype.slice.call(arguments,2),s=function(){return t.apply(n,o.concat(Array.prototype.slice.call(arguments)))};return s.guid=t.guid=t.guid||s.guid||e.guid++,s}};var t=String.prototype.trim;e.trim=function(e,n){return!n&&t?t.call(e):(n=defaultToWhiteSpace(n),e.replace(new RegExp("^["+n+"]+|["+n+"]+$","g"),""))};var n=/^(?:body|html)$/i;e.fn.position=function(){if(!this[0])return null;var t=this[0],i=this.offsetParent(),o=this.offset(),s=n.test(i[0].nodeName)?{top:0,left:0}:i.offset();return o.top-=parseFloat(e(t).css("margin-top"))||0,o.left-=parseFloat(e(t).css("margin-left"))||0,s.top+=parseFloat(e(i[0]).css("border-top-width"))||0,s.left+=parseFloat(e(i[0]).css("border-left-width"))||0,{top:o.top-s.top,left:o.left-s.left}},e.fn.offsetParent=function(){var t=e();return this.each(function(){for(var i=this.offsetParent||document.body;i&&!n.test(i.nodeName)&&"static"===e(i).css("position");)i=i.offsetParent;t.push(i)}),t}}(Zepto)}])},"object"==a(t)&&"object"==a(e)?e.exports=s():(i=[],void 0===(o="function"==typeof(n=s)?n.apply(t,i):n)||(e.exports=o))}).call(this,n(1)(e))},function(e,t,n){"use strict";var i,o=n(2);var s=new((i=o)&&i.__esModule?i:{default:i}).default({settings:{showPopoutIcon:!1,showCloseIcon:!1},dimensions:{minItemHeight:40},content:[{type:"row",content:[{type:"column",width:40,content:[{type:"component",componentName:"template",title:"Game",componentState:{id:"client_wrapper"}},{type:"component",title:"Miscellaneous",height:5,componentName:"template",componentState:{id:"misc"}}]},{type:"column",content:[{type:"stack",height:60,content:[{type:"component",title:"Server chat",componentName:"template",componentState:{id:"ooc"}},{type:"component",title:"Log",componentName:"template",componentState:{id:"log"}}]},{type:"row",content:[{type:"component",title:"Music",componentName:"template",componentState:{id:"music"}},{type:"stack",content:[{type:"component",title:"Settings",componentName:"template",componentState:{id:"client_settings"}},{type:"component",title:"About",componentName:"template",componentState:{id:"about"}}]}]}]}]}]});s.registerComponent("template",function(e,t){var n=document.querySelector("#"+t.id);e.getElement().html(n.content)}),s.init()}]);
//# sourceMappingURL=ui.b.js.map \ No newline at end of file
diff --git a/webAO/ui.b.js.map b/webAO/ui.b.js.map
new file mode 100644
index 0000000..521a66f
--- /dev/null
+++ b/webAO/ui.b.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///(webpack)/buildin/module.js","webpack:///./webAO/golden/js/goldenlayout.js","webpack:///./webAO/ui.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","r","value","n","__esModule","object","property","prototype","hasOwnProperty","p","s","webpackPolyfill","deprecate","paths","children","t","self","e","Math","min","floor","max","$","zepto","touches","targetTouches","originalEvent","j","a","push","window","location","hash","match","RegExp","search","substr","split","length","b","requestAnimationFrame","webkitRequestAnimationFrame","mozRequestAnimationFrame","setTimeout","g","Array","Error","indexOf","Function","bind","apply","concat","slice","arguments","this","Date","now","getTime","f","random","toString","replace","k","trim","Int8Array","_typeof","_class","_classCallCheck","_mSubscriptions","on","h","fn","ctx","emit","unshift","unbind","splice","off","trigger","version","__e","_o$b","_this","_possibleConstructorReturn","__proto__","getPrototypeOf","config","_extendItemNode","type","contentItems","parent","isInitialised","isMaximised","isRoot","isRow","isColumn","isStack","isComponent","layoutManager","_pendingEventPropagations","_throttledEvents","_propagateEvent","content","_createContentItems","_inherits","_createClass","key","callDownwards","_$destroy","isClosable","removeChild","undisplayChild","_$init","_$normalizeContentItem","element","parentNode","replaceChild","header","tabs","contentItem","createPopout","emitBubblingEvent","preventDefault","_$minimiseItem","_$maximiseItem","selectedItem","selectItem","addClass","removeClass","title","id","hasId","getItemsByFilter","_$getItemsByProperty","instance","dropTargetIndicator","highlightArea","addChild","_callOnActiveComponents","hide","updateSize","show","getItemsByType","getActiveContentItem","container","remove","offset","width","height","x1","left","y1","top","x2","y2","surface","setSize","childElementContainer","append","createContentItem","isPropagationStopped","_scheduleEventPropagationToLayoutManager","origin","_propagateEventToLayoutManager","__g","round","_s$a","_this2","_splitterSize","dimensions","borderWidth","_splitterGrabSize","borderGrabWidth","_isColumn","_dimension","_splitter","_splitterPosition","_splitterMinPosition","_splitterMaxPosition","_createSplitter","after","_isDocked","before","_validateDocking","_calculateRelativeSizes","_setAbsoluteSizes","headerHeight","_docker","docked","size","itemSize","column","first","last","row","position","_","dimension","realSize","toggleClass","_header","dock","_calculateAbsoluteSizes","additionalPixel","itemSizes","totalWidth","totalHeight","_respectMinItemWidth","minItemWidth","_onSplitterDrag","_onSplitterDragStop","_onSplitterDragStart","_setDockable","_$setClosable","minWidth","minHeight","horizontal","vertical","_getItemsForSplitter","_getMinimumDimensions","css","_o$b2","_this3","_timeout","_eElement","_oDocument","document","_eBody","body","_nButtonCode","_nDelay","_nDistance","_nX","_nY","_nOriginalX","_nOriginalY","_bDragging","_fMove","onMouseMove","_fUp","onMouseUp","_fDown","onMouseDown","button","_getCoordinates","x","y","one","_startDrag","abs","clearTimeout","find","pageX","pageY","TypeError","_class2","_keys","_values","_nextLevel","parseInt","_o$a","_this4","_containerElement","tabDropPlaceholder","_$highlightDropZone","side","_a$a","_this5","_activeContentItem","settings","hasHeaders","popout","showPopoutIcon","labels","maximise","showMaximiseIcon","close","showCloseIcon","minimise","_dropZones","_dropSegment","_contentAreaDimensions","_dropIndex","_setupHeaderPosition","_$validateClosability","_sided","createTab","_$hide","activeItemIndex","setActiveContentItem","_$show","activeContentItem","removeTab","hideTab","_isClosable","_resetHeaderDropZone","hoverArea","_highlightHeaderDropZone","_highlightBodyDropZone","_$getArea","right","bottom","innerHeight","toggleMaximise","toggle","_side","keys","ceil","isNaN","F","G","u","S","P","B","W","v","virtual","R","U","createElement","_class3","_reactComponent","_originalComponentWillUpdate","_container","_initialState","_reactClass","_getReactClass","_render","_destroy","ReactDOM","render","_getReactComponent","getElement","componentWillUpdate","_onUpdate","getState","setState","unmountComponentAtNode","_config","component","getComponent","glEventHub","eventHub","glContainer","extend","props","React","_o$b3","_this6","_layoutManager","_dontPropagateToParent","_childEventSource","_onEventFromThis","_boundOnEventFromChild","_onEventFromChild","isSubWindow","_propagateToParent","_propagateToChildren","__gl","__glArgs","createEvent","opener","initEvent","createEventObject","eventType","eventName","dispatchEvent","fireEvent","openPopouts","getGlInstance","_$onEventFromParent","_class4","_Error","_this7","message","node","_o$b4","_this8","selectionEnabled","_onHeaderClick","tabsContainer","tabDropdownContainer","controlsContainer","_updateTabSizes","tabsMarkedForRemoval","closeButton","dockButton","tabDropdownButton","hideAdditionalTabsDropdown","_hideAdditionalTabsDropdown","mouseup","_lastVisibleTabIndex","_tabControlOffset","tabControlOffset","_createControls","setActive","reorderOnTabMenuClick","_canDestroy","_showAdditionalTabsDropdown","tabDropdown","_getHeaderSetting","_onPopoutClick","attr","popoutWholeStack","target","select","outerWidth","tabOverlapAllowance","tab","outerHeight","z-index","margin-left","_class5","titleElement","closeElement","isActive","setTitle","reorderEnabled","_dragListener","_onDragStart","destroy","_onTabClickFn","_onTabClick","_onCloseClickFn","_onCloseClick","_onCloseMousedown","html","stopPropagation","_o$b5","_this9","_contentItem","_originalParent","_area","_lastValidArea","_onDrag","_onDrop","_undisplayTree","_$calculateItemAreas","_setDimensions","_minX","_minY","_maxX","_maxY","_width","_height","_setDropPosition","constrainDragToContainer","_updateTree","_$onDrop","_$setParent","dragProxyWidth","dragProxyHeight","_class6","_action","_o$a2","_this10","componentName","componentState","_element","_$setSize","shown","_$shown","_o$b6","_this11","isHidden","_contentElement","_s$b","_this12","_dimensions","_parentId","_indexInParent","_popoutWindow","_id","_createWindow","screenX","screenLeft","screenY","screenTop","toConfig","parentId","indexInParent","__glInstance","_$closeWindow","getWindow","root","getItemsById","_createUrl","_serializeWindowOptions","innerWidth","menubar","toolbar","personalbar","resizable","scrollbars","status","open","_positionWindow","_onClose","setInterval","_onInitialised","clearInterval","blockedPopoutsThrowError","join","minifyConfig","localStorage","setItem","href","moveTo","focus","popIn","D","w","ES6","_a$b","_this13","_isFullPage","_resizeTimeoutId","_components","lm-react-component","_itemAreas","_resizeFunction","_onResize","_unloadFunction","_onUnload","_maximisedItem","_maximisePlaceholder","_creationTimeoutPassed","_subWindowsCreated","_dragSources","_updatingColumnsResponsive","_firstLoad","_createConfig","transitionIndicator","_typeToItem","stack","unminifyConfig","_$reconcilePopoutWindows","maximisedItemId","_createSubWindows","readyState","ready","init","_adjustToWindowMode","_setContainer","_create","_bindEvents","_adjustColumnsResponsive","forEach","_itemConfig","addId","deselect","prepend","removeId","Infinity","_getAllContentItems","_$createRootItemAreas","isPlainObject","closed","resize","getItem","JSON","parse","removeItem","popin","click","offsetHeight","margin","padding","overflow","closePopoutsOnUnload","_useResponsiveLayout","_findAllStackContainers","_addChildContentItemsToContainer","responsiveMode","_findAllStackContainersRecursive","default","propertyIsEnumerable","mode","copyright","valueOf","writable","create","style","display","appendChild","src","contentWindow","write","defineProperties","documentElement","_class7","_isVertical","_size","_grabSize","_createElement","stringify","_class8","_createDragListener","transitionElements","_class9","_class10","_toElement","_fromDimensions","_totalAnimationDuration","_animationStartTime","_measure","opacity","_nextAnimationFrame","minItemHeight","console","error","log","execScript","attachEvent","addEventListener","eval","expr",":","support","clone","each","cloneNode","nodeType","defaultView","parentWindow","scrollLeft","scrollTop","scrollTo","toUpperCase","proxy","isFunction","guid","String","defaultToWhiteSpace","offsetParent","test","nodeName","parseFloat","Zepto","__WEBPACK_AMD_DEFINE_ARRAY__","undefined","__WEBPACK_AMD_DEFINE_RESULT__","__WEBPACK_AMD_DEFINE_FACTORY__","_goldenlayout","golden","GoldenLayout","registerComponent","template","querySelector"],"mappings":"aACA,IAAAA,KAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAC,QAGA,IAAAC,EAAAJ,EAAAE,IACAG,EAAAH,EACAI,GAAA,EACAH,YAUA,OANAI,EAAAL,GAAAM,KAAAJ,EAAAD,QAAAC,IAAAD,QAAAF,GAGAG,EAAAE,GAAA,EAGAF,EAAAD,QAKAF,EAAAQ,EAAAF,EAGAN,EAAAS,EAAAV,EAGAC,EAAAU,EAAA,SAAAR,EAAAS,EAAAC,GACAZ,EAAAa,EAAAX,EAAAS,IACAG,OAAAC,eAAAb,EAAAS,GACAK,cAAA,EACAC,YAAA,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,YACNyC,MAAO,MACPwU,cAAe,WACfC,gBAAkBxU,GAAI,WAK9B1C,KAAM,MACNc,UAEQd,KAAM,YACNyC,MAAO,QACPwU,cAAe,WACfC,gBAAkBxU,GAAI,WAGtB1C,KAAM,QACNc,UAEQd,KAAM,YACNyC,MAAO,WACPwU,cAAe,WACfC,gBAAkBxU,GAAI,qBAGtB1C,KAAM,YACNyC,MAAO,QACPwU,cAAe,WACfC,gBAAkBxU,GAAI,qBAa9DmgB,EAAOE,kBAAkB,WAAY,SAASvf,EAAW0T,GACrD,IAAI8L,EAAWta,SAASua,cAAT,IAA2B/L,EAAexU,IACzDc,EAAU6L,aAAa8F,KAAK6N,EAASliB,WAIzC+hB,EAAOvG","file":"ui.b.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 3);\n","module.exports = function(module) {\r\n\tif (!module.webpackPolyfill) {\r\n\t\tmodule.deprecate = function() {};\r\n\t\tmodule.paths = [];\r\n\t\t// module.parent = undefined by default\r\n\t\tif (!module.children) module.children = [];\r\n\t\tObject.defineProperty(module, \"loaded\", {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function() {\r\n\t\t\t\treturn module.l;\r\n\t\t\t}\r\n\t\t});\r\n\t\tObject.defineProperty(module, \"id\", {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function() {\r\n\t\t\t\treturn module.i;\r\n\t\t\t}\r\n\t\t});\r\n\t\tmodule.webpackPolyfill = 1;\r\n\t}\r\n\treturn module;\r\n};\r\n","(function(e,t){'object'==typeof exports&&'object'==typeof module?module.exports=t():'function'==typeof define&&define.amd?define('GoldenLayout',[],t):'object'==typeof exports?exports.GoldenLayout=t():e.GoldenLayout=t()})('undefined'==typeof self?this:self,function(){var e=Math.min,t=Math.floor,n=Math.max;return function(e){function t(o){if(n[o])return n[o].exports;var i=n[o]={i:o,l:!1,exports:{}};return e[o].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var n=e&&e.__esModule?function(){return e['default']}:function(){return e};return t.d(n,'a',n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p='',t(t.s=35)}([function(e,t,n){'use strict';function o(e){var t=location.hash.match(new RegExp(e+'=([^&]*)'));return t?t[1]:null}t.e=function(e){return $.zepto?e.touches?e.targetTouches[0]:e:e.originalEvent&&e.originalEvent.touches?e.originalEvent.touches[0]:e},t.j=function(e){var t,n;if('function'==typeof a.a)return a()(e);for(n in t=[],e)t.push(n);return t},t.d=function(e){if(window.location.hash)return o(e);if(!window.location.search)return null;var t,n,i=window.location.search.substr(1).split('&'),a={};for(n=0;n<i.length;n++)t=i[n].split('='),a[t[0]]=t[1];return a[e]||null},t.b=function(e,t){for(var n in t)e[n]=t[n];return e},t.a=function(e){return(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)})(function(){e()})},t.g=function(e,t){if(!(t instanceof Array))throw new Error('Haystack is not an Array');if(t.indexOf)return t.indexOf(e);for(var n=0;n<t.length;n++)if(t[n]===e)return n;return-1},n.d(t,'h',function(){return l}),t.c=function(e,t,n){if(void 0!==Function.prototype.bind)return Function.prototype.bind.apply(e,[t].concat(n||[]));var o=function(){var i=(n||[]).concat(Array.prototype.slice.call(arguments,0));return this instanceof o?void e.apply(this,i):e.apply(t,i)};return o.prototype=e.prototype,o},t.i=function(){return'function'==typeof Date.now?Date.now():new Date().getTime()},t.f=function(){return(1e15*Math.random()).toString(36).replace('.','')},t.k=function(e){return $.trim(e.replace(/(<([^>]+)>)/ig,''))};var i=n(40),a=n.n(i),s=n(60),r=n.n(s),l='function'!=typeof /./&&'object'!=typeof Int8Array?function(e){return'function'==typeof e||!1}:function(e){return'[object Function]'===toString.call(e)}},function(e,t,n){'use strict';var o=n(0);const a='__all';t.a=a;t.b=class{constructor(){this._mSubscriptions={},this._mSubscriptions[a]=[],this.on=function(e,t,n){if(!Object(o.h)(t))throw new Error('Tried to listen to event '+e+' with non-function callback '+t);this._mSubscriptions[e]||(this._mSubscriptions[e]=[]),this._mSubscriptions[e].push({fn:t,ctx:n})},this.emit=function(e){var t,n,o;o=Array.prototype.slice.call(arguments,1);var i=this._mSubscriptions[e];if(i)for(i=i.slice(),t=0;t<i.length;t++)n=i[t].ctx||{},i[t].fn.apply(n,o);o.unshift(e);var s=this._mSubscriptions[a].slice();for(t=0;t<s.length;t++)n=s[t].ctx||{},s[t].fn.apply(n,o)},this.unbind=function(e,t,n){if(!this._mSubscriptions[e])throw new Error('No subscribtions to unsubscribe for event '+e);var o,i=!1;for(o=0;o<this._mSubscriptions[e].length;o++)t&&this._mSubscriptions[e][o].fn!==t||n&&n!==this._mSubscriptions[e][o].ctx||(this._mSubscriptions[e].splice(o,1),i=!0);if(!1==i)throw new Error('Nothing to unbind for '+e)},this.off=this.unbind,this.trigger=this.emit}}},function(e){var t=e.exports={version:'2.5.6'};'number'==typeof __e&&(__e=t)},function(e,t,n){'use strict';var o=n(1),i=n(26),a=n(12),s=n(27),r=n(66),l=n(0);class c extends o.b{constructor(e,t,n){super(),this.config=this._extendItemNode(t),this.type=t.type,this.contentItems=[],this.parent=n,this.isInitialised=!1,this.isMaximised=!1,this.isRoot=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.layoutManager=e,this._pendingEventPropagations={},this._throttledEvents=['stateChanged'],this.on(o.a,this._propagateEvent,this),t.content&&this._createContentItems(t)}setSize(){throw new Error('Abstract Method')}callDownwards(e,t,n,o){var a;for(!0!==n&&!0!==o&&this[e].apply(this,t||[]),a=0;a<this.contentItems.length;a++)this.contentItems[a].callDownwards(e,t,n);!0===n&&!0!==o&&this[e].apply(this,t||[])}removeChild(e,t){var n=Object(l.g)(e,this.contentItems);if(-1===n)throw new Error('Can\\'t remove child item. Unknown content item');!0!==t&&this.contentItems[n]._$destroy(),this.contentItems.splice(n,1),this.config.content.splice(n,1),0<this.contentItems.length?this.callDownwards('setSize'):!(this instanceof a.a)&&!0===this.config.isClosable&&this.parent.removeChild(this)}undisplayChild(e){var t=Object(l.g)(e,this.contentItems);if(-1===t)throw new Error('Can\\'t remove child item. Unknown content item');this instanceof a.a||!0!==this.config.isClosable||this.parent.undisplayChild(this)}addChild(e,t){t===void 0&&(t=this.contentItems.length),this.contentItems.splice(t,0,e),this.config.content===void 0&&(this.config.content=[]),this.config.content.splice(t,0,e.config),e.parent=this,!0===e.parent.isInitialised&&!1===e.isInitialised&&e._$init()}replaceChild(e,t,n){t=this.layoutManager._$normalizeContentItem(t);var o=Object(l.g)(e,this.contentItems),i=e.element[0].parentNode;if(-1===o)throw new Error('Can\\'t replace child. oldChild is not child of this');i.replaceChild(t.element[0],e.element[0]),!0===n&&(e.parent=null,e._$destroy()),this.contentItems[o]=t,t.parent=this,this.isStack&&(this.header.tabs[o].contentItem=t),!0===t.parent.isInitialised&&!1===t.isInitialised&&t._$init(),this.callDownwards('setSize')}remove(){this.parent.removeChild(this)}popout(){var e=this.layoutManager.createPopout(this);return this.emitBubblingEvent('stateChanged'),e}toggleMaximise(t){t&&t.preventDefault(),!0===this.isMaximised?this.layoutManager._$minimiseItem(this):this.layoutManager._$maximiseItem(this),this.isMaximised=!this.isMaximised,this.emitBubblingEvent('stateChanged')}select(){this.layoutManager.selectedItem!==this&&(this.layoutManager.selectItem(this,!0),this.element.addClass('lm_selected'))}deselect(){this.layoutManager.selectedItem===this&&(this.layoutManager.selectedItem=null,this.element.removeClass('lm_selected'))}setTitle(e){this.config.title=e,this.emit('titleChanged',e),this.emit('stateChanged')}hasId(e){if(!this.config.id)return!1;return'string'==typeof this.config.id?this.config.id===e:this.config.id instanceof Array?-1!==Object(l.g)(e,this.config.id):void 0}addId(e){this.hasId(e)||(this.config.id?'string'==typeof this.config.id?this.config.id=[this.config.id,e]:this.config.id instanceof Array&&this.config.id.push(e):this.config.id=e)}removeId(e){if(!this.hasId(e))throw new Error('Id not found');if('string'==typeof this.config.id)delete this.config.id;else if(this.config.id instanceof Array){var t=Object(l.g)(e,this.config.id);this.config.id.splice(t,1)}}getItemsByFilter(e){var t=[],n=function(o){for(var a=0;a<o.contentItems.length;a++)!0===e(o.contentItems[a])&&t.push(o.contentItems[a]),n(o.contentItems[a])};return n(this),t}getItemsById(e){return this.getItemsByFilter(function(t){return t.config.id instanceof Array?-1!==Object(l.g)(e,t.config.id):t.config.id===e})}getItemsByType(e){return this._$getItemsByProperty('type',e)}getComponentsByName(e){var t,n=this._$getItemsByProperty('componentName',e),o=[];for(t=0;t<n.length;t++)o.push(n[t].instance);return o}_$getItemsByProperty(e,t){return this.getItemsByFilter(function(n){return n[e]===t})}_$setParent(e){this.parent=e}_$highlightDropZone(e,t,n){this.layoutManager.dropTargetIndicator.highlightArea(n)}_$onDrop(e){this.addChild(e)}_$hide(){this._callOnActiveComponents('hide'),this.element.hide(),this.layoutManager.updateSize()}_$show(){this._callOnActiveComponents('show'),this.element.show(),this.layoutManager.updateSize()}_callOnActiveComponents(e){var t,n,o=this.getItemsByType('stack');for(n=0;n<o.length;n++)t=o[n].getActiveContentItem(),t&&t.isComponent&&t.container[e]()}_$destroy(){this.emitBubblingEvent('beforeItemDestroyed'),this.callDownwards('_$destroy',[],!0,!0),this.element.remove(),this.emitBubblingEvent('itemDestroyed')}_$getArea(e){e=e||this.element;var t=e.offset(),n=e.width(),o=e.height();return{x1:t.left,y1:t.top,x2:t.left+n,y2:t.top+o,surface:n*o,contentItem:this}}_$init(){var e;for(this.setSize(),e=0;e<this.contentItems.length;e++)this.childElementContainer.append(this.contentItems[e].element);this.isInitialised=!0,this.emitBubblingEvent('itemCreated'),this.emitBubblingEvent(this.type+'Created')}emitBubblingEvent(e){var t=new i.a(e,this);this.emit(e,t)}_createContentItems(e){var t,n;if(!(e.content instanceof Array))throw new s.a('content must be an Array',e);for(n=0;n<e.content.length;n++)t=this.layoutManager.createContentItem(e.content[n],this),this.contentItems.push(t)}_extendItemNode(e){for(var t in r.a)void 0===e[t]&&(e[t]=r.a[t]);return e}_propagateEvent(e,t){t instanceof i.a&&!1===t.isPropagationStopped&&!0===this.isInitialised&&(!1===this.isRoot&&this.parent?this.parent.emit.apply(this.parent,Array.prototype.slice.call(arguments,0)):this._scheduleEventPropagationToLayoutManager(e,t))}_scheduleEventPropagationToLayoutManager(e,t){-1===Object(l.g)(e,this._throttledEvents)?this.layoutManager.emit(e,t.origin):!0!==this._pendingEventPropagations[e]&&(this._pendingEventPropagations[e]=!0,Object(l.a)(Object(l.c)(this._propagateEventToLayoutManager,this,[e,t])))}_propagateEventToLayoutManager(e,t){this._pendingEventPropagations[e]=!1,this.layoutManager.emit(e,t)}}t.a=c},function(e){var t=e.exports='undefined'!=typeof window&&window.Math==Math?window:'undefined'!=typeof self&&self.Math==Math?self:Function('return this')();'number'==typeof __g&&(__g=t)},function(e,t,n){e.exports=!n(10)(function(){return 7!=Object.defineProperty({},'a',{get:function(){return 7}}).a})},function(e,o,i){'use strict';var a=Math.round,s=i(3),r=i(13),l=i(67),c=i(0);class p extends s.a{constructor(e,t,n,o){super(t,n,o),this.isRow=!e,this.isColumn=e,this.element=$('<div class=\"lm_item lm_'+(e?'column':'row')+'\"></div>'),this.childElementContainer=this.element,this._splitterSize=t.config.dimensions.borderWidth,this._splitterGrabSize=t.config.dimensions.borderGrabWidth,this._isColumn=e,this._dimension=e?'height':'width',this._splitter=[],this._splitterPosition=null,this._splitterMinPosition=null,this._splitterMaxPosition=null}addChild(e,t,o){var a,r,l,i;if(e=this.layoutManager._$normalizeContentItem(e,this),void 0===t&&(t=this.contentItems.length),0<this.contentItems.length?(i=this._createSplitter(n(0,t-1)).element,0<t?(this.contentItems[t-1].element.after(i),i.after(e.element),this._isDocked(t-1)&&(this._splitter[t-1].element.hide(),this._splitter[t].element.show())):(this.contentItems[0].element.before(i),i.before(e.element))):this.childElementContainer.append(e.element),s.a.prototype.addChild.call(this,e,t),a=100*(1/this.contentItems.length),!0===o)return void this.emitBubblingEvent('stateChanged');for(l=0;l<this.contentItems.length;l++)this.contentItems[l]===e?e.config[this._dimension]=a:(r=this.contentItems[l].config[this._dimension]*=(100-a)/100,this.contentItems[l].config[this._dimension]=r);this.callDownwards('setSize'),this.emitBubblingEvent('stateChanged'),this._validateDocking()}undisplayChild(e){var t,o=e.config[this._dimension],i=Object(c.g)(e,this.contentItems),a=n(i-1,0);if(-1===i)throw new Error('Can\\'t undisplay child. ContentItem is not child of this Row or Column');this._splitter[a]&&this._splitter[a].element.hide(),a<this._splitter.length&&this._isDocked(a)&&this._splitter[a].element.hide();var r=this._isDocked();for(t=0;t<this.contentItems.length;t++)this.contentItems[t]===e?this.contentItems[t].config[this._dimension]=0:this._isDocked(t)||(this.contentItems[t].config[this._dimension]+=o/(this.contentItems.length-1-r));1===this.contentItems.length&&s.a.prototype.undisplayChild.call(this,e),this.callDownwards('setSize'),this.emitBubblingEvent('stateChanged')}removeChild(e,t){var o,i,a=e.config[this._dimension],r=Object(c.g)(e,this.contentItems),l=n(r-1,0);if(-1===r)throw new Error('Can\\'t remove child. ContentItem is not child of this Row or Column');this._splitter[l]&&(this._splitter[l]._$destroy(),this._splitter.splice(l,1)),l<this._splitter.length&&this._isDocked(l)&&this._splitter[l].element.hide();var p=this._isDocked();for(o=0;o<this.contentItems.length;o++)this.contentItems[o]!==e&&(this._isDocked(o)||(this.contentItems[o].config[this._dimension]+=a/(this.contentItems.length-1-p)));s.a.prototype.removeChild.call(this,e,t),1===this.contentItems.length&&!0===this.config.isClosable?(i=this.contentItems[0],this.contentItems=[],this.parent.replaceChild(this,i,!0),this._validateDocking(this.parent)):(this.callDownwards('setSize'),this.emitBubblingEvent('stateChanged'),this._validateDocking())}replaceChild(e,t){var n=e.config[this._dimension];s.a.prototype.replaceChild.call(this,e,t),t.config[this._dimension]=n,this.callDownwards('setSize'),this.emitBubblingEvent('stateChanged')}setSize(){0<this.contentItems.length&&(this._calculateRelativeSizes(),this._setAbsoluteSizes()),this.emitBubblingEvent('stateChanged'),this.emit('resize')}dock(e,t,o){if(1===this.contentItems.length)throw new Error('Can\\'t dock child when it single');var a=e.config[this._dimension],s=this.layoutManager.config.dimensions.headerHeight,r=Object(c.g)(e,this.contentItems),l=n(r-1,0);if(-1===r)throw new Error('Can\\'t dock child. ContentItem is not child of this Row or Column');var p,i=e._docker&&e._docker.docked;if('undefined'==typeof t||t!=i){if(i){for(this._splitter[l].element.show(),p=0;p<this.contentItems.length;p++){var d=e._docker.size;this.contentItems[p]===e?e.config[this._dimension]=d:(itemSize=this.contentItems[p].config[this._dimension]*=(100-d)/100,this.contentItems[p].config[this._dimension]=itemSize)}e._docker={docked:!1}}else{if(2>this.contentItems.length-this._isDocked())throw new Error('Can\\'t dock child when it is last in '+this.config.type);var m={column:{first:'top',last:'bottom'},row:{first:'left',last:'right'}}[this.config.type][r?'last':'first'];e.header.position()!=m&&e.header.position(m),this._splitter[l]&&this._splitter[l].element.hide();var _=this._isDocked();for(p=0;p<this.contentItems.length;p++)this.contentItems[p]===e?this.contentItems[p].config[this._dimension]=0:this._isDocked(p)||(this.contentItems[p].config[this._dimension]+=a/(this.contentItems.length-1-_));e._docker={dimension:this._dimension,size:a,realSize:e.element[this._dimension]()-s,docked:!0},o&&e.childElementContainer[this._dimension](0)}e.element.toggleClass('lm_docked',e._docker.docked),this.callDownwards('setSize'),this.emitBubblingEvent('stateChanged'),this._validateDocking()}}_$init(){if(!0!==this.isInitialised){var e;for(s.a.prototype._$init.call(this),e=0;e<this.contentItems.length-1;e++)this.contentItems[e].element.after(this._createSplitter(e).element);for(e=0;e<this.contentItems.length;e++)this.contentItems[e]._header&&this.contentItems[e]._header.docked&&this.dock(this.contentItems[e],!0,!0)}}_setAbsoluteSizes(){var e,t=this._calculateAbsoluteSizes();for(e=0;e<this.contentItems.length;e++)0<t.additionalPixel-e&&t.itemSizes[e]++,this._isColumn?(this.contentItems[e].element.width(t.totalWidth),this.contentItems[e].element.height(t.itemSizes[e])):(this.contentItems[e].element.width(t.itemSizes[e]),this.contentItems[e].element.height(t.totalHeight))}_calculateAbsoluteSizes(){var e,n,o,i=(this.contentItems.length-1)*this._splitterSize,a=this.layoutManager.config.dimensions.headerHeight,s=this.element.width(),r=this.element.height(),l=0,c=[];for(this._isColumn?r-=i:s-=i,e=0;e<this.contentItems.length;e++)this._isDocked(e)&&(this._isColumn?r-=a-this._splitterSize:s-=a-this._splitterSize);for(e=0;e<this.contentItems.length;e++)o=this._isColumn?t(r*(this.contentItems[e].config.height/100)):t(s*(this.contentItems[e].config.width/100)),this._isDocked(e)&&(o=a),l+=o,c.push(o);return n=t((this._isColumn?r:s)-l),{itemSizes:c,additionalPixel:n,totalWidth:s,totalHeight:r}}_calculateRelativeSizes(){var e,t=0,n=[],o=this._isColumn?'height':'width';for(e=0;e<this.contentItems.length;e++)void 0===this.contentItems[e].config[o]?n.push(this.contentItems[e]):t+=this.contentItems[e].config[o];if(100===a(t))return void this._respectMinItemWidth();if(100>a(t)&&0<n.length){for(e=0;e<n.length;e++)n[e].config[o]=(100-t)/n.length;return void this._respectMinItemWidth()}if(100<a(t))for(e=0;e<n.length;e++)n[e].config[o]=50,t+=50;for(e=0;e<this.contentItems.length;e++)this.contentItems[e].config[o]=100*(this.contentItems[e].config[o]/t);this._respectMinItemWidth()}_respectMinItemWidth(){var e,t,n,o=this.layoutManager.config.dimensions?this.layoutManager.config.dimensions.minItemWidth||0:0,s=null,r=[],l=0,c=0,p=0,d=0,m=null,_=[];if(!(this._isColumn||!o||1>=this.contentItems.length)){s=this._calculateAbsoluteSizes();for(var g=0;g<this.contentItems.length;g++)m=this.contentItems[g],d=s.itemSizes[g],d<o?(c+=o-d,n={width:o}):(l+=d-o,n={width:d},r.push(n)),_.push(n);if(!(0==c||c>l)){for(e=c/l,p=c,g=0;g<r.length;g++)n=r[g],t=a((n.width-o)*e),p-=t,n.width-=t;for(0!==p&&(_[_.length-1].width-=p),g=0;g<this.contentItems.length;g++)this.contentItems[g].config.width=100*(_[g].width/s.totalWidth)}}}_createSplitter(e){var t;return t=new l.a(this._isColumn,this._splitterSize,this._splitterGrabSize),t.on('drag',Object(c.c)(this._onSplitterDrag,this,[t]),this),t.on('dragStop',Object(c.c)(this._onSplitterDragStop,this,[t]),this),t.on('dragStart',Object(c.c)(this._onSplitterDragStart,this,[t]),this),this._splitter.splice(e,0,t),t}_getItemsForSplitter(e){var t=Object(c.g)(e,this._splitter);return{before:this.contentItems[t],after:this.contentItems[t+1]}}_isDocked(e){if('undefined'==typeof e){for(var t=0,n=0;n<this.contentItems.length;++n)this._isDocked(n)&&t++;return t}return e<this.contentItems.length?this.contentItems[e]._docker&&this.contentItems[e]._docker.docked:void 0}_validateDocking(e){e=e||this;for(var t=1<e.contentItems.length-e._isDocked(),n=0;n<e.contentItems.length;++n)e.contentItems[n]instanceof r.a&&(e.contentItems[n].header._setDockable(e._isDocked(n)||t),e.contentItems[n].header._$setClosable(t))}_getMinimumDimensions(e){for(var t=0,o=0,a=0;a<e.length;++a)t=n(e[a].minWidth||0,t),o=n(e[a].minHeight||0,o);return{horizontal:t,vertical:o}}_onSplitterDragStart(e){var t=this._getItemsForSplitter(e),n=this.layoutManager.config.dimensions[this._isColumn?'minItemHeight':'minItemWidth'],o=this._getMinimumDimensions(t.before.config.content),i=this._isColumn?o.vertical:o.horizontal,a=this._getMinimumDimensions(t.after.config.content),s=this._isColumn?a.vertical:a.horizontal;this._splitterPosition=0,this._splitterMinPosition=-1*(t.before.element[this._dimension]()-(i||n)),this._splitterMaxPosition=t.after.element[this._dimension]()-(s||n)}_onSplitterDrag(e,t,n){var o=this._isColumn?n:t;o>this._splitterMinPosition&&o<this._splitterMaxPosition&&(this._splitterPosition=o,e.element.css(this._isColumn?'top':'left',o))}_onSplitterDragStop(e){var t=this._getItemsForSplitter(e),n=t.before.element[this._dimension](),o=t.after.element[this._dimension](),i=(this._splitterPosition+n)/(n+o),a=t.before.config[this._dimension]+t.after.config[this._dimension];t.before.config[this._dimension]=i*a,t.after.config[this._dimension]=(1-i)*a,e.element.css({top:0,left:0}),Object(c.a)(Object(c.c)(this.callDownwards,this,['setSize']))}}o.a=p},function(e,t,n){'use strict';var o=n(1),i=n(0);class a extends o.b{constructor(e,t){super(),this._timeout=null,this._eElement=$(e),this._oDocument=$(document),this._eBody=$(document.body),this._nButtonCode=t||0,this._nDelay=200,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._bDragging=!1,this._fMove=Object(i.c)(this.onMouseMove,this),this._fUp=Object(i.c)(this.onMouseUp,this),this._fDown=Object(i.c)(this.onMouseDown,this),this._eElement.on('mousedown touchstart',this._fDown)}destroy(){this._eElement.unbind('mousedown touchstart',this._fDown),this._oDocument.unbind('mouseup touchend',this._fUp),this._eElement=null,this._oDocument=null,this._eBody=null}onMouseDown(e){if(e.preventDefault(),0==e.button||'touchstart'===e.type){var t=this._getCoordinates(e);this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.on('mousemove touchmove',this._fMove),this._oDocument.one('mouseup touchend',this._fUp),this._timeout=setTimeout(Object(i.c)(this._startDrag,this),this._nDelay)}}onMouseMove(e){var t=Math.abs;if(null!=this._timeout){e.preventDefault();var n=this._getCoordinates(e);this._nX=n.x-this._nOriginalX,this._nY=n.y-this._nOriginalY,!1===this._bDragging&&(t(this._nX)>this._nDistance||t(this._nY)>this._nDistance)&&(clearTimeout(this._timeout),this._startDrag()),this._bDragging&&this.emit('drag',this._nX,this._nY,e)}}onMouseUp(e){null!=this._timeout&&(clearTimeout(this._timeout),this._eBody.removeClass('lm_dragging'),this._eElement.removeClass('lm_dragging'),this._oDocument.find('iframe').css('pointer-events',''),this._oDocument.unbind('mousemove touchmove',this._fMove),this._oDocument.unbind('mouseup touchend',this._fUp),!0===this._bDragging&&(this._bDragging=!1,this.emit('dragStop',e,this._nOriginalX+this._nX)))}_startDrag(){this._bDragging=!0,this._eBody.addClass('lm_dragging'),this._eElement.addClass('lm_dragging'),this._oDocument.find('iframe').css('pointer-events','none'),this.emit('dragStart',this._nOriginalX,this._nOriginalY)}_getCoordinates(e){return e=Object(i.e)(e),{x:e.pageX,y:e.pageY}}}t.a=a},function(e,t,n){var o=n(9);e.exports=function(e){if(!o(e))throw TypeError(e+' is not an object!');return e}},function(e){e.exports=function(e){return'object'==typeof e?null!==e:'function'==typeof e}},function(e){e.exports=function(e){try{return!!e()}catch(t){return!0}}},function(e,t,n){'use strict';var o=n(0);t.a=class{constructor(){if(this._keys=['settings','hasHeaders','constrainDragToContainer','selectionEnabled','dimensions','borderWidth','minItemHeight','minItemWidth','headerHeight','dragProxyWidth','dragProxyHeight','labels','close','maximise','minimise','popout','content','componentName','componentState','id','width','type','height','isClosable','title','popoutWholeStack','openPopouts','parentId','activeItemIndex','reorderEnabled','borderGrabWidth'],36<this._keys.length)throw new Error('Too many keys in config minifier map');this._values=[!0,!1,'row','column','stack','component','close','maximise','minimise','open in new window']}minifyConfig(e){var t={};return this._nextLevel(e,t,'_min'),t}unminifyConfig(e){var t={};return this._nextLevel(e,t,'_max'),t}_nextLevel(e,t,n){var o,i;for(o in e)e instanceof Array&&(o=parseInt(o,10)),e.hasOwnProperty(o)&&(i=this[n](o,this._keys),'object'==typeof e[o]?(t[i]=e[o]instanceof Array?[]:{},this._nextLevel(e[o],t[i],n)):t[i]=this[n](e[o],this._values))}_min(e,t){if('string'==typeof e&&1===e.length)return'___'+e;var n=Object(o.g)(e,t);return-1===n?e:n.toString(36)}_max(e,t){return'string'==typeof e&&1===e.length?t[parseInt(e,36)]:'string'==typeof e&&'___'===e.substr(0,3)?e[3]:e}}},function(e,t,n){'use strict';var o=n(3),i=n(6);class a extends o.a{constructor(e,t,n){super(e,t,null),this.isRoot=!0,this.type='root',this.element=$('<div class=\"lm_goldenlayout lm_item lm_root\"></div>'),this.childElementContainer=this.element,this._containerElement=n,this._containerElement.append(this.element)}addChild(e){if(0<this.contentItems.length)throw new Error('Root node can only have a single child');e=this.layoutManager._$normalizeContentItem(e,this),this.childElementContainer.append(e.element),o.a.prototype.addChild.call(this,e),this.callDownwards('setSize'),this.emitBubblingEvent('stateChanged')}setSize(e,t){e='undefined'==typeof e?this._containerElement.width():e,t='undefined'==typeof t?this._containerElement.height():t,this.element.width(e),this.element.height(t),this.contentItems[0]&&(this.contentItems[0].element.width(e),this.contentItems[0].element.height(t))}_$highlightDropZone(){this.layoutManager.tabDropPlaceholder.remove(),o.a.prototype._$highlightDropZone.apply(this,arguments)}_$onDrop(e,t){var n;if(e.isComponent&&(n=this.layoutManager.createContentItem({type:'stack',header:e.config.header||{}},this),n._$init(),n.addChild(e),e=n),!this.contentItems.length)this.addChild(e);else{('row'===e.config.type||'column'===e.config.type)&&(n=this.layoutManager.createContentItem({type:'stack'},this),n.addChild(e),e=n);var o='x'==t.side[0]?'row':'column',a='x'==t.side[0]?'width':'height',s='2'==t.side[1],r=this.contentItems[0];if(!(r instanceof i.a)||r.type!=o){var l=this.layoutManager.createContentItem({type:o},this);this.replaceChild(r,l),l.addChild(e,s?0:void 0,!0),l.addChild(r,s?void 0:0,!0),r.config[a]=50,e.config[a]=50,l.callDownwards('setSize')}else{var c=r.contentItems[s?0:r.contentItems.length-1];r.addChild(e,s?0:void 0,!0),c.config[a]*=0.5,e.config[a]=c.config[a],r.callDownwards('setSize')}}}}t.a=a},function(t,o,i){'use strict';var a=i(3),s=i(6),r=i(28),l=i(0);class c extends a.a{constructor(e,t,n){super(e,t,n),this.element=$('<div class=\"lm_item lm_stack\"></div>'),this._activeContentItem=null;var o=e.config;this._header={show:!0===o.settings.hasHeaders&&!1!==t.hasHeaders,popout:o.settings.showPopoutIcon&&o.labels.popout,maximise:o.settings.showMaximiseIcon&&o.labels.maximise,close:o.settings.showCloseIcon&&o.labels.close,minimise:o.labels.minimise},o.header&&Object(l.b)(this._header,o.header),t.header&&Object(l.b)(this._header,t.header),t.content&&t.content[0]&&t.content[0].header&&Object(l.b)(this._header,t.content[0].header),this._dropZones={},this._dropSegment=null,this._contentAreaDimensions=null,this._dropIndex=null,this.isStack=!0,this.childElementContainer=$('<div class=\"lm_items\"></div>'),this.header=new r.a(e,this),this.element.on('mouseleave mouseenter',Object(l.c)(function(e){this._docker&&this._docker.docked&&this.childElementContainer[this._docker.dimension]('mouseenter'==e.type?this._docker.realSize:0)},this)),this.element.append(this.header.element),this.element.append(this.childElementContainer),this._setupHeaderPosition(),this._$validateClosability()}dock(e){this._header.dock&&this.parent instanceof s.a&&this.parent.dock(this,e)}setSize(){if('none'!==this.element.css('display')){var e=this._docker&&this._docker.docked,t={width:this.element.width(),height:this.element.height()};this._header.show&&(t[this._sided?'width':'height']-=this.layoutManager.config.dimensions.headerHeight),e&&(t[this._docker.dimension]=this._docker.realSize),e&&'height'!=this._docker.dimension||this.childElementContainer.width(t.width),e&&'width'!=this._docker.dimension||this.childElementContainer.height(t.height);for(var n=0;n<this.contentItems.length;n++)this.contentItems[n].element.width(t.width),this.contentItems[n].element.height(t.height);this.emit('resize'),this.emitBubblingEvent('stateChanged')}}_$init(){var e,t;if(!0!==this.isInitialised){for(a.a.prototype._$init.call(this),e=0;e<this.contentItems.length;e++)this.header.createTab(this.contentItems[e]),this.contentItems[e]._$hide();if(0<this.contentItems.length){if(t=this.contentItems[this.config.activeItemIndex||0],!t)throw new Error('Configured activeItemIndex out of bounds');this.setActiveContentItem(t)}}}setActiveContentItem(e){if(-1===Object(l.g)(e,this.contentItems))throw new Error('contentItem is not a child of this stack');null!==this._activeContentItem&&this._activeContentItem._$hide(),this._activeContentItem=e,this.header.setActiveContentItem(e),e._$show(),this.emit('activeContentItemChanged',e),this.layoutManager.emit('activeContentItemChanged',e),this.emitBubblingEvent('stateChanged')}getActiveContentItem(){return this.header.activeContentItem}addChild(e,t){t>this.contentItems.length&&(t-=1),e=this.layoutManager._$normalizeContentItem(e,this),a.a.prototype.addChild.call(this,e,t),this.childElementContainer.append(e.element),this.header.createTab(e,t),this.setActiveContentItem(e),this.callDownwards('setSize'),this._$validateClosability(),this.parent instanceof s.a&&this.parent._validateDocking(),this.emitBubblingEvent('stateChanged')}removeChild(e,t){var o=Object(l.g)(e,this.contentItems);a.a.prototype.removeChild.call(this,e,t),this.header.removeTab(e),this.header.activeContentItem===e&&(0<this.contentItems.length?this.setActiveContentItem(this.contentItems[n(o-1,0)]):this._activeContentItem=null),this._$validateClosability(),this.parent instanceof s.a&&this.parent._validateDocking(),this.emitBubblingEvent('stateChanged')}undisplayChild(e){if(1<this.contentItems.length){var t=Object(l.g)(e,this.contentItems);e._$hide&&e._$hide(),this.setActiveContentItem(this.contentItems[0===t?t+1:t-1])}else this.header.hideTab(e),e._$hide&&e._$hide(),a.a.prototype.undisplayChild.call(this,e),this.parent instanceof s.a&&this.parent._validateDocking();this.emitBubblingEvent('stateChanged')}_$validateClosability(){var e,t,n;for(e=this.header._isClosable(),n=0,t=this.contentItems.length;n<t&&!!e;n++)e=this.contentItems[n].config.isClosable;this.header._$setClosable(e)}_$destroy(){a.a.prototype._$destroy.call(this),this.header._$destroy(),this.element.off('mouseenter mouseleave')}_$onDrop(e){if('header'===this._dropSegment)return this._resetHeaderDropZone(),void this.addChild(e,this._dropIndex);if('body'===this._dropSegment)return void this.addChild(e);var t,n,o,i='top'===this._dropSegment||'bottom'===this._dropSegment,a='left'===this._dropSegment||'right'===this._dropSegment,s='top'===this._dropSegment||'left'===this._dropSegment,r=i&&this.parent.isColumn||a&&this.parent.isRow,c=i?'column':'row',p=i?'height':'width';e.isComponent&&(n=this.layoutManager.createContentItem({type:'stack',header:e.config.header||{}},this),n._$init(),n.addChild(e),e=n),('row'===e.config.type||'column'===e.config.type)&&(n=this.layoutManager.createContentItem({type:'stack'},this),n.addChild(e),e=n),r?(t=Object(l.g)(this,this.parent.contentItems),this.parent.addChild(e,s?t:t+1,!0),this.config[p]*=0.5,e.config[p]=this.config[p],this.parent.callDownwards('setSize')):(c=i?'column':'row',o=this.layoutManager.createContentItem({type:c},this),this.parent.replaceChild(this,o),o.addChild(e,s?0:void 0,!0),o.addChild(this,s?void 0:0,!0),this.config[p]=50,e.config[p]=50,o.callDownwards('setSize')),this.parent._validateDocking()}_$highlightDropZone(e,t){var n,o;for(n in this._contentAreaDimensions)if(o=this._contentAreaDimensions[n].hoverArea,o.x1<e&&o.x2>e&&o.y1<t&&o.y2>t)return void('header'===n?(this._dropSegment='header',this._highlightHeaderDropZone(this._sided?t:e)):(this._resetHeaderDropZone(),this._highlightBodyDropZone(n)))}_$getArea(){if('none'===this.element.css('display'))return null;var e=a.a.prototype._$getArea,t=e.call(this,this.header.element),n=e.call(this,this.childElementContainer),o=n.x2-n.x1,i=n.y2-n.y1;return(this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},this._activeContentItem&&!1===this._activeContentItem.isComponent)?t:0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:n.x1,y1:n.y1,x2:n.x2,y2:n.y2},highlightArea:{x1:n.x1,y1:n.y1,x2:n.x2,y2:n.y2}},e.call(this,this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:n.x1,y1:n.y1,x2:n.x1+0.25*o,y2:n.y2},highlightArea:{x1:n.x1,y1:n.y1,x2:n.x1+0.5*o,y2:n.y2}},this._contentAreaDimensions.top={hoverArea:{x1:n.x1+0.25*o,y1:n.y1,x2:n.x1+0.75*o,y2:n.y1+0.5*i},highlightArea:{x1:n.x1,y1:n.y1,x2:n.x2,y2:n.y1+0.5*i}},this._contentAreaDimensions.right={hoverArea:{x1:n.x1+0.75*o,y1:n.y1,x2:n.x2,y2:n.y2},highlightArea:{x1:n.x1+0.5*o,y1:n.y1,x2:n.x2,y2:n.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:n.x1+0.25*o,y1:n.y1+0.5*i,x2:n.x1+0.75*o,y2:n.y2},highlightArea:{x1:n.x1,y1:n.y1+0.5*i,x2:n.x2,y2:n.y2}},e.call(this,this.element))}_highlightHeaderDropZone(t){var n,o,i,a,s,r,l,c,p,d=this.header.tabs.length,m=!1;if(0===d)return l=this.header.element.offset(),void this.layoutManager.dropTargetIndicator.highlightArea({x1:l.left,x2:l.left+100,y1:l.top+this.header.element.height()-20,y2:l.top+this.header.element.height()});for(n=0;n<d;n++)if(o=this.header.tabs[n].element,s=o.offset(),this._sided?(a=s.top,i=s.left,c=o.height()):(a=s.left,i=s.top,c=o.width()),t>a&&t<a+c){m=!0;break}if(!(!1==m&&t<a)){if(p=a+c/2,t<p?(this._dropIndex=n,o.before(this.layoutManager.tabDropPlaceholder)):(this._dropIndex=e(n+1,d),o.after(this.layoutManager.tabDropPlaceholder)),this._sided){var _=this.layoutManager.tabDropPlaceholder.offset().top;return void this.layoutManager.dropTargetIndicator.highlightArea({x1:i,x2:i+o.innerHeight(),y1:_,y2:_+this.layoutManager.tabDropPlaceholder.width()})}r=this.layoutManager.tabDropPlaceholder.offset().left,this.layoutManager.dropTargetIndicator.highlightArea({x1:r,x2:r+this.layoutManager.tabDropPlaceholder.width(),y1:i,y2:i+o.innerHeight()})}}_resetHeaderDropZone(){this.layoutManager.tabDropPlaceholder.remove()}toggleMaximise(t){this.isMaximised||this.dock(!1),a.a.prototype.toggleMaximise.call(this,t)}_setupHeaderPosition(){var e=0<=['right','left','bottom'].indexOf(this._header.show)&&this._header.show;if(this.header.element.toggle(!!this._header.show),this._side=e,this._sided=0<=['right','left'].indexOf(this._side),this.element.removeClass('lm_left lm_right lm_bottom'),this._side&&this.element.addClass('lm_'+this._side),this.element.find('.lm_header').length&&this.childElementContainer){var t=0<=['right','bottom'].indexOf(this._side)?'before':'after';this.header.element[t](this.childElementContainer),this.callDownwards('setSize')}}_highlightBodyDropZone(e){var t=this._contentAreaDimensions[e].highlightArea;this.layoutManager.dropTargetIndicator.highlightArea(t),this._dropSegment=e}}o.a=c},function(e){e.exports=function(e){if(e==void 0)throw TypeError('Can\\'t call method on '+e);return e}},function(e,t,n){var o=n(44),i=n(20);e.exports=Object.keys||function(e){return o(e,i)}},function(e){var t={}.hasOwnProperty;e.exports=function(e,n){return t.call(e,n)}},function(e,t,n){var o=n(45),i=n(14);e.exports=function(e){return o(i(e))}},function(e){var n=Math.ceil;e.exports=function(e){return isNaN(e=+e)?0:(0<e?t:n)(e)}},function(e,t,n){var o=n(50)('keys'),i=n(52);e.exports=function(e){return o[e]||(o[e]=i(e))}},function(e){e.exports=['constructor','hasOwnProperty','isPrototypeOf','propertyIsEnumerable','toLocaleString','toString','valueOf']},function(e,t,n){var o=n(4),i=n(2),a=n(54),s=n(56),r=n(16),l='prototype',c=function(e,t,n){var p,d,m,_=e&c.F,g=e&c.G,u=e&c.S,f=e&c.P,h=e&c.B,y=e&c.W,v=g?i:i[t]||(i[t]={}),b=v[l],k=g?o:u?o[t]:(o[t]||{})[l];for(p in g&&(n=t),n)d=!_&&k&&void 0!==k[p],d&&r(v,p)||(m=d?k[p]:n[p],v[p]=g&&'function'!=typeof k[p]?n[p]:h&&d?a(m,o):y&&k[p]==m?function(e){var t=function(t,n,o){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n);}return new e(t,n,o)}return e.apply(this,arguments)};return t[l]=e[l],t}(m):f&&'function'==typeof m?a(Function.call,m):m,f&&((v.virtual||(v.virtual={}))[p]=m,e&c.R&&b&&!b[p]&&s(b,p,m)))};c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,e.exports=c},function(e,t,n){var o=n(8),i=n(57),a=n(58),s=Object.defineProperty;t.f=n(5)?Object.defineProperty:function(e,t,n){if(o(e),t=a(t,!0),o(n),i)try{return s(e,t,n)}catch(t){}if('get'in n||'set'in n)throw TypeError('Accessors not supported!');return'value'in n&&(e[t]=n.value),e}},function(e,t,n){var o=n(9),i=n(4).document,a=o(i)&&o(i.createElement);e.exports=function(e){return a?i.createElement(e):{}}},function(e,t){'use strict';t.a=class{constructor(e,t){this._reactComponent=null,this._originalComponentWillUpdate=null,this._container=e,this._initialState=t,this._reactClass=this._getReactClass(),this._container.on('open',this._render,this),this._container.on('destroy',this._destroy,this)}_render(){this._reactComponent=ReactDOM.render(this._getReactComponent(),this._container.getElement()[0]),this._originalComponentWillUpdate=this._reactComponent.componentWillUpdate||function(){},this._reactComponent.componentWillUpdate=this._onUpdate.bind(this),this._container.getState()&&this._reactComponent.setState(this._container.getState())}_destroy(){ReactDOM.unmountComponentAtNode(this._container.getElement()[0]),this._container.off('open',this._render,this),this._container.off('destroy',this._destroy,this)}_onUpdate(e,t){this._container.setState(t),this._originalComponentWillUpdate.call(this._reactComponent,e,t)}_getReactClass(){var e,t=this._container._config.component;if(!t)throw new Error('No react component name. type: react-component needs a field `component`');if(e=this._container.layoutManager.getComponent(t),!e)throw new Error('React component \"'+t+'\" not found. Please register all components with GoldenLayout using `registerComponent(name, component)`');return e}_getReactComponent(){var e={glEventHub:this._container.layoutManager.eventHub,glContainer:this._container},t=$.extend(e,this._container._config.props);return React.createElement(this._reactClass,t)}}},function(e,t,n){'use strict';var o=n(1),i=n(0);class a extends o.b{constructor(e){super(),this._layoutManager=e,this._dontPropagateToParent=null,this._childEventSource=null,this.on(o.a,Object(i.c)(this._onEventFromThis,this)),this._boundOnEventFromChild=Object(i.c)(this._onEventFromChild,this),$(window).on('gl_child_event',this._boundOnEventFromChild)}_onEventFromThis(){var e=Array.prototype.slice.call(arguments);this._layoutManager.isSubWindow&&e[0]!==this._dontPropagateToParent&&this._propagateToParent(e),this._propagateToChildren(e),this._dontPropagateToParent=null,this._childEventSource=null}_$onEventFromParent(e){this._dontPropagateToParent=e[0],this.emit.apply(this,e)}_onEventFromChild(e){this._childEventSource=e.originalEvent.__gl,this.emit.apply(this,e.originalEvent.__glArgs)}_propagateToParent(e){var t,n='gl_child_event';document.createEvent?(t=window.opener.document.createEvent('HTMLEvents'),t.initEvent(n,!0,!0)):(t=window.opener.document.createEventObject(),t.eventType=n),t.eventName=n,t.__glArgs=e,t.__gl=this._layoutManager,document.createEvent?window.opener.dispatchEvent(t):window.opener.fireEvent('on'+t.eventType,t)}_propagateToChildren(e){var t,n;for(n=0;n<this._layoutManager.openPopouts.length;n++)t=this._layoutManager.openPopouts[n].getGlInstance(),t&&t!==this._childEventSource&&t.eventHub._$onEventFromParent(e)}destroy(){$(window).off('gl_child_event',this._boundOnEventFromChild)}}t.a=a},function(e,t){'use strict';t.a=class{constructor(e,t){this.name=e,this.origin=t,this.isPropagationStopped=!1}stopPropagation(){this.isPropagationStopped=!0}}},function(e,t){'use strict';class n extends Error{constructor(e,t){super(),this.name='Configuration Error',this.message=e,this.node=t}}t.a=n},function(e,t,n){'use strict';var o=n(1),a=n(29),i=n(31),s=n(0);class r extends o.b{constructor(e,t){super(),this.layoutManager=e,this.element=$('<div class=\"lm_header\"><ul class=\"lm_tabs\"></ul><ul class=\"lm_controls\"></ul><ul class=\"lm_tabdropdown_list\"></ul></div>'),!0===this.layoutManager.config.settings.selectionEnabled&&(this.element.addClass('lm_selectable'),this.element.on('click touchstart',Object(s.c)(this._onHeaderClick,this))),this.tabsContainer=this.element.find('.lm_tabs'),this.tabDropdownContainer=this.element.find('.lm_tabdropdown_list'),this.tabDropdownContainer.hide(),this.controlsContainer=this.element.find('.lm_controls'),this.parent=t,this.parent.on('resize',this._updateTabSizes,this),this.tabs=[],this.tabsMarkedForRemoval=[],this.activeContentItem=null,this.closeButton=null,this.dockButton=null,this.tabDropdownButton=null,this.hideAdditionalTabsDropdown=Object(s.c)(this._hideAdditionalTabsDropdown,this),$(document).mouseup(this.hideAdditionalTabsDropdown),this._lastVisibleTabIndex=-1,this._tabControlOffset=this.layoutManager.config.settings.tabControlOffset,this._createControls()}createTab(e,t){var n,o;for(o=0;o<this.tabs.length;o++)if(this.tabs[o].contentItem===e)return;return n=new a.a(this,e),0===this.tabs.length?(this.tabs.push(n),void this.tabsContainer.append(n.element)):void(void 0===t&&(t=this.tabs.length),0<t?this.tabs[t-1].element.after(n.element):this.tabs[0].element.before(n.element),this.tabs.splice(t,0,n),this._updateTabSizes())}removeTab(e){for(var t=0;t<this.tabs.length;t++)if(this.tabs[t].contentItem===e)return this.tabs[t]._$destroy(),void this.tabs.splice(t,1);for(t=0;t<this.tabsMarkedForRemoval.length;t++)if(this.tabsMarkedForRemoval[t].contentItem===e)return this.tabsMarkedForRemoval[t]._$destroy(),void this.tabsMarkedForRemoval.splice(t,1);throw new Error('contentItem is not controlled by this header')}hideTab(e){for(var t=0;t<this.tabs.length;t++)if(this.tabs[t].contentItem===e)return this.tabs[t].element.hide(),this.tabsMarkedForRemoval.push(this.tabs[t]),void this.tabs.splice(t,1);throw new Error('contentItem is not controlled by this header')}setActiveContentItem(e){var t,n,o,i;for(t=0;t<this.tabs.length;t++)o=this.tabs[t].contentItem===e,this.tabs[t].setActive(o),!0===o&&(this.activeContentItem=e,this.parent.config.activeItemIndex=t);if(this.layoutManager.config.settings.reorderOnTabMenuClick&&-1!==this._lastVisibleTabIndex&&this.parent.config.activeItemIndex>this._lastVisibleTabIndex){for(i=this.tabs[this.parent.config.activeItemIndex],n=this.parent.config.activeItemIndex;0<n;n--)this.tabs[n]=this.tabs[n-1];this.tabs[0]=i,this.parent.config.activeItemIndex=0}this._updateTabSizes(),this.parent.emitBubblingEvent('stateChanged')}position(e){var t=this.parent._header.show;if(this.parent._docker&&this.parent._docker.docked)throw new Error('Can\\'t change header position in docked stack');return t&&!this.parent._side&&(t='top'),void 0!==e&&this.parent._header.show!=e&&(this.parent._header.show=e,this.parent._setupHeaderPosition()),t}_$setClosable(e){return this._canDestroy=e||1<this.tabs.length,this.closeButton&&this._isClosable()&&(this.closeButton.element[e?'show':'hide'](),!0)}_setDockable(e){return this.dockButton&&this.parent._header&&this.parent._header.dock&&(this.dockButton.element.toggle(!!e),!0)}_$destroy(){this.emit('destroy',this);for(var e=0;e<this.tabs.length;e++)this.tabs[e]._$destroy();$(document).off('mouseup',this.hideAdditionalTabsDropdown),this.element.remove()}_getHeaderSetting(e){if(e in this.parent._header)return this.parent._header[e]}_createControls(){var e,t,n,o,a,r,l,c,p;if(p=Object(s.c)(this._showAdditionalTabsDropdown,this),c=this.layoutManager.config.labels.tabDropdown,this.tabDropdownButton=new i.a(this,c,'lm_tabdropdown',p),this.tabDropdownButton.element.hide(),this.parent._header&&this.parent._header.dock){var d=Object(s.c)(this.parent.dock,this.parent);n=this._getHeaderSetting('dock'),this.dockButton=new i.a(this,n,'lm_dock',d)}this._getHeaderSetting('popout')&&(t=Object(s.c)(this._onPopoutClick,this),n=this._getHeaderSetting('popout'),new i.a(this,n,'lm_popout',t)),this._getHeaderSetting('maximise')&&(r=Object(s.c)(this.parent.toggleMaximise,this.parent),o=this._getHeaderSetting('maximise'),a=this._getHeaderSetting('minimise'),l=new i.a(this,o,'lm_maximise',r),this.parent.on('maximised',function(){l.element.attr('title',a)}),this.parent.on('minimised',function(){l.element.attr('title',o)})),this._isClosable()&&(e=Object(s.c)(this.parent.remove,this.parent),n=this._getHeaderSetting('close'),this.closeButton=new i.a(this,n,'lm_close',e))}_showAdditionalTabsDropdown(){this.tabDropdownContainer.show()}_hideAdditionalTabsDropdown(){this.tabDropdownContainer.hide()}_isClosable(){return this.parent.config.isClosable&&this.layoutManager.config.settings.showCloseIcon}_onPopoutClick(){!0===this.layoutManager.config.settings.popoutWholeStack?this.parent.popout():this.activeContentItem.popout()}_onHeaderClick(e){e.target===this.element[0]&&this.parent.select()}_updateTabSizes(e){if(0!==this.tabs.length){this.tabDropdownButton.element.toggle(!0===e);var t=function(e){return e?'width':'height'};this.element.css(t(!this.parent._sided),''),this.element[t(this.parent._sided)](this.layoutManager.config.dimensions.headerHeight);var n,o,i,a,s,r=this.element.outerWidth()-this.controlsContainer.outerWidth()-this._tabControlOffset,l=0,c=0,p=0,d=this.layoutManager.config.settings.tabOverlapAllowance,m=!1,_=this.activeContentItem?this.tabs.indexOf(this.activeContentItem.tab):0,g=this.tabs[_];for(this.parent._sided&&(r=this.element.outerHeight()-this.controlsContainer.outerHeight()-this._tabControlOffset),this._lastVisibleTabIndex=-1,o=0;o<this.tabs.length;o++)if(n=this.tabs[o].element,this.tabsContainer.append(n),s=n.outerWidth()+parseInt(n.css('margin-right'),10),l+=s,c=_<=o?l:l+g.element.outerWidth()+parseInt(g.element.css('margin-right'),10),c>r){if(!!m)o===_&&(n.css({\"z-index\":'auto',\"margin-left\":''}),this.tabsContainer.append(n));else if(p=0<_&&_<=o?(c-r)/(o-1):(c-r)/o,p<d){for(i=0;i<=o;i++)a=i!==_&&0!==i?'-'+p+'px':'',this.tabs[i].element.css({\"z-index\":o-i,\"margin-left\":a});this._lastVisibleTabIndex=o,this.tabsContainer.append(n)}else m=!0;if(m&&o!==_)if(e)n.css({\"z-index\":'auto',\"margin-left\":''}),this.tabDropdownContainer.append(n);else return void this._updateTabSizes(!0)}else this._lastVisibleTabIndex=o,n.css({\"z-index\":'auto',\"margin-left\":''}),this.tabsContainer.append(n)}}}t.a=r},function(e,t,n){'use strict';var o=n(7),i=n(30),a=n(0);t.a=class{constructor(e,t){this.header=e,this.contentItem=t,this.element=$('<li class=\"lm_tab\"><i class=\"lm_left\"></i><span class=\"lm_title\"></span><div class=\"lm_close_tab\"></div><i class=\"lm_right\"></i></li>'),this.titleElement=this.element.find('.lm_title'),this.closeElement=this.element.find('.lm_close_tab'),this.closeElement[t.config.isClosable?'show':'hide'](),this.isActive=!1,this.setTitle(t.config.title),this.contentItem.on('titleChanged',this.setTitle,this),this._layoutManager=this.contentItem.layoutManager,!0===this._layoutManager.config.settings.reorderEnabled&&!0===t.config.reorderEnabled&&(this._dragListener=new o.a(this.element),this._dragListener.on('dragStart',this._onDragStart,this),this.contentItem.on('destroy',this._dragListener.destroy,this._dragListener)),this._onTabClickFn=Object(a.c)(this._onTabClick,this),this._onCloseClickFn=Object(a.c)(this._onCloseClick,this),this.element.on('mousedown touchstart',this._onTabClickFn),this.contentItem.config.isClosable?(this.closeElement.on('click touchstart',this._onCloseClickFn),this.closeElement.on('mousedown',this._onCloseMousedown)):this.closeElement.remove(),this.contentItem.tab=this,this.contentItem.emit('tab',this),this.contentItem.layoutManager.emit('tabCreated',this),this.contentItem.isComponent&&(this.contentItem.container.tab=this,this.contentItem.container.emit('tab',this))}setTitle(e){this.element.attr('title',Object(a.k)(e)),this.titleElement.html(e)}setActive(e){e===this.isActive||(this.isActive=e,e?this.element.addClass('lm_active'):this.element.removeClass('lm_active'))}_$destroy(){this.element.off('mousedown touchstart',this._onTabClickFn),this.closeElement.off('click touchstart',this._onCloseClickFn),this._dragListener&&(this.contentItem.off('destroy',this._dragListener.destroy,this._dragListener),this._dragListener.off('dragStart',this._onDragStart),this._dragListener=null),this.element.remove()}_onDragStart(e,t){return this.header._canDestroy?void(!0===this.contentItem.parent.isMaximised&&this.contentItem.parent.toggleMaximise(),new i.a(e,t,this._dragListener,this._layoutManager,this.contentItem,this.header.parent)):null}_onTabClick(e){if(0===e.button||'touchstart'===e.type){var t=this.header.parent.getActiveContentItem();this.contentItem!==t&&this.header.parent.setActiveContentItem(this.contentItem)}else 1===e.button&&this.contentItem.config.isClosable&&this._onCloseClick(e)}_onCloseClick(e){e.stopPropagation();this.header._canDestroy&&this.header.parent.removeChild(this.contentItem)}_onCloseMousedown(e){e.stopPropagation()}}},function(e,t,n){'use strict';var o=n(1),i=n(0);class a extends o.b{constructor(e,t,n,o,a,s){super(),this._dragListener=n,this._layoutManager=o,this._contentItem=a,this._originalParent=s,this._area=null,this._lastValidArea=null,this._dragListener.on('drag',this._onDrag,this),this._dragListener.on('dragStop',this._onDrop,this),this.element=$('<div class=\"lm_dragProxy\"><div class=\"lm_header\"><ul class=\"lm_tabs\"><li class=\"lm_tab lm_active\"><i class=\"lm_left\"></i><span class=\"lm_title\"></span><i class=\"lm_right\"></i></li></ul></div><div class=\"lm_content\"></div></div>'),s&&s._side&&(this._sided=s._sided,this.element.addClass('lm_'+s._side),0<=['right','bottom'].indexOf(s._side)&&this.element.find('.lm_content').after(this.element.find('.lm_header'))),this.element.css({left:e,top:t}),this.element.find('.lm_tab').attr('title',Object(i.k)(this._contentItem.config.title)),this.element.find('.lm_title').html(this._contentItem.config.title),this.childElementContainer=this.element.find('.lm_content'),this.childElementContainer.append(a.element),this._undisplayTree(),this._layoutManager._$calculateItemAreas(),this._setDimensions(),$(document.body).append(this.element);var r=this._layoutManager.container.offset();this._minX=r.left,this._minY=r.top,this._maxX=this._layoutManager.container.width()+this._minX,this._maxY=this._layoutManager.container.height()+this._minY,this._width=this.element.width(),this._height=this.element.height(),this._setDropPosition(e,t)}_onDrag(e,t,n){n=Object(i.e)(n);var o=n.pageX,a=n.pageY,s=o>this._minX&&o<this._maxX&&a>this._minY&&a<this._maxY;(s||!0!==this._layoutManager.config.settings.constrainDragToContainer)&&this._setDropPosition(o,a)}_setDropPosition(e,t){this.element.css({left:e,top:t}),this._area=this._layoutManager._$getArea(e,t),null!==this._area&&(this._lastValidArea=this._area,this._area.contentItem._$highlightDropZone(e,t,this._area))}_onDrop(){this._updateTree(),this._layoutManager.dropTargetIndicator.hide(),null===this._area?null===this._lastValidArea?this._originalParent?this._originalParent.addChild(this._contentItem):this._contentItem._$destroy():this._lastValidArea.contentItem._$onDrop(this._contentItem,this._lastValidArea):this._area.contentItem._$onDrop(this._contentItem,this._area),this.element.remove(),this._layoutManager.emit('itemDropped',this._contentItem)}_undisplayTree(){this._contentItem.parent&&this._contentItem.parent.undisplayChild(this._contentItem)}_updateTree(){this._contentItem.parent&&this._contentItem.parent.removeChild(this._contentItem,!0),this._contentItem._$setParent(this)}_setDimensions(){var e=this._layoutManager.config.dimensions,t=e.dragProxyWidth,n=e.dragProxyHeight;this.element.width(t),this.element.height(n),t-=this._sided?e.headerHeight:0,n-=this._sided?0:e.headerHeight,this.childElementContainer.width(t),this.childElementContainer.height(n),this._contentItem.element.width(t),this._contentItem.element.height(n),this._contentItem.callDownwards('_$show'),this._contentItem.callDownwards('setSize')}}t.a=a},function(e,t){'use strict';t.a=class{constructor(e,t,n,o){this._header=e,this.element=$('<li class=\"'+n+'\" title=\"'+t+'\"></li>'),this._header.on('destroy',this._$destroy,this),this._action=o,this.element.on('click touchstart',this._action),this._header.controlsContainer.append(this.element)}_$destroy(){this.element.off(),this.element.remove()}}},function(e,t,n){'use strict';var o=n(3),i=n(33);class a extends o.a{constructor(e,t,n){super(e,t,n);var o=e.getComponent(this.config.componentName),a=$.extend(!0,{},this.config.componentState||{});a.componentName=this.config.componentName,this.componentName=this.config.componentName,''===this.config.title&&(this.config.title=this.config.componentName),this.isComponent=!0,this.container=new i.a(this.config,this,e),this.instance=new o(this.container,a),this.element=this.container._element}close(){this.parent.removeChild(this)}setSize(){'none'!==this.element.css('display')&&this.container._$setSize(this.element.width(),this.element.height())}_$init(){o.a.prototype._$init.call(this),this.container.emit('open')}_$hide(){this.container.hide(),o.a.prototype._$hide.call(this)}_$show(){this.container.show(),o.a.prototype._$show.call(this)}_$shown(){this.container.shown(),o.a.prototype._$shown.call(this)}_$destroy(){this.container.emit('destroy',this),o.a.prototype._$destroy.call(this)}_$getArea(){return null}}t.a=a},function(e,t,n){'use strict';var o=n(1);class i extends o.b{constructor(e,t,n){super(),this.width=null,this.height=null,this.title=e.componentName,this.parent=t,this.layoutManager=n,this.isHidden=!1,this._config=e,this._element=$('<div class=\"lm_item_container\"><div class=\"lm_content\"></div></div>'),this._contentElement=this._element.find('.lm_content')}getElement(){return this._contentElement}hide(){this.emit('hide'),this.isHidden=!0,this._element.hide()}show(){this.emit('show'),this.isHidden=!1,this._element.show(),(0!=this.height||0!=this.width)&&this.emit('shown')}setSize(e,t){for(var n,o,a,s,r,l,i=this.parent,c=this;!i.isColumn&&!i.isRow;)if(c=i,i=i.parent,i.isRoot)return!1;for(a=i.isColumn?'height':'width',s='height'===a?t:e,n=this[a]*(1/(c.config[a]/100)),o=100*(s/n),r=(c.config[a]-o)/(i.contentItems.length-1),l=0;l<i.contentItems.length;l++)i.contentItems[l]===c?i.contentItems[l].config[a]=o:i.contentItems[l].config[a]+=r;return i.callDownwards('setSize'),!0}close(){this._config.isClosable&&(this.emit('close'),this.parent.close())}getState(){return this._config.componentState}extendState(e){this.setState($.extend(!0,this.getState(),e))}setState(e){this._config.componentState=e,this.parent.emitBubblingEvent('stateChanged')}setTitle(e){this.parent.setTitle(e)}_$setSize(e,t){(e!==this.width||t!==this.height)&&(this.width=e,this.height=t,$.zepto?this._contentElement.width(e):this._contentElement.outerWidth(e),$.zepto?this._contentElement.height(t):this._contentElement.outerHeight(t),this.emit('resize'))}}t.a=i},function(e,n,o){'use strict';var i=o(68),a=o.n(i),s=o(1),r=o(11),l=o(0);class c extends s.b{constructor(e,t,n,o,i){super(),this.isInitialised=!1,this._config=e,this._dimensions=t,this._parentId=n,this._indexInParent=o,this._layoutManager=i,this._popoutWindow=null,this._id=null,this._createWindow()}toConfig(){if(!1===this.isInitialised)throw new Error('Can\\'t create config, layout not yet initialised');return{dimensions:{width:this.getGlInstance().width,height:this.getGlInstance().height,left:this._popoutWindow.screenX||this._popoutWindow.screenLeft,top:this._popoutWindow.screenY||this._popoutWindow.screenTop},content:this.getGlInstance().toConfig().content,parentId:this._parentId,indexInParent:this._indexInParent}}getGlInstance(){return this._popoutWindow.__glInstance}getWindow(){return this._popoutWindow}close(){if(this.getGlInstance())this.getGlInstance()._$closeWindow();else try{this.getWindow().close()}catch(t){}}popIn(){var e,t,n=this._indexInParent;this._parentId&&(e=$.extend(!0,{},this.getGlInstance().toConfig()).content[0],t=this._layoutManager.root.getItemsById(this._parentId)[0],!t&&(t=0<this._layoutManager.root.contentItems.length?this._layoutManager.root.contentItems[0]:this._layoutManager.root,n=0)),t.addChild(e,this._indexInParent),this.close()}_createWindow(){var e,n=this._createUrl(),o=t(1e6*Math.random()).toString(36),i=this._serializeWindowOptions({width:this._dimensions.width,height:this._dimensions.height,innerWidth:this._dimensions.width,innerHeight:this._dimensions.height,menubar:'no',toolbar:'no',location:'no',personalbar:'no',resizable:'yes',scrollbars:'no',status:'no'});if(this._popoutWindow=window.open(n,o,i),!this._popoutWindow)if(!0===this._layoutManager.config.settings.blockedPopoutsThrowError){var a=new Error('Popout blocked');throw a.type='popoutBlocked',a}else return;$(this._popoutWindow).on('load',Object(l.c)(this._positionWindow,this)).on('unload beforeunload',Object(l.c)(this._onClose,this)),e=setInterval(Object(l.c)(function(){this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this._onInitialised(),clearInterval(e))},this),10)}_serializeWindowOptions(e){var t,n=[];for(t in e)n.push(t+'='+e[t]);return n.join(',')}_createUrl(){var e,t={content:this._config},n='gl-window-config-'+Object(l.f)();t=new r.a().minifyConfig(t);try{localStorage.setItem(n,a()(t))}catch(t){throw new Error('Error while writing to localStorage '+t.toString())}return e=document.location.href.split('?'),1===e.length?e[0]+'?gl-window='+n:document.location.href+'&gl-window='+n}_positionWindow(){this._popoutWindow.moveTo(this._dimensions.left,this._dimensions.top),this._popoutWindow.focus()}_onInitialised(){this.isInitialised=!0,this.getGlInstance().on('popIn',this.popIn,this),this.emit('initialised')}_onClose(){setTimeout(Object(l.c)(this.emit,this,['closed']),50)}}n.a=c},function(e,t,n){'use strict';Object.defineProperty(t,'__esModule',{value:!0});var o=n(36),i=n.n(o),a=n(37),s=n.n(a),r=n(38),l=n.n(r),c=n(39);n.d(t,'default',function(){return c.a});var p=n(33);n.d(t,'ItemContainer',function(){return p.a});var d=n(34);n.d(t,'BrowserPopout',function(){return d.a});var m=n(28);n.d(t,'Header',function(){return m.a});var _=n(31);n.d(t,'HeaderButton',function(){return _.a});var g=n(29);n.d(t,'Tab',function(){return g.a});var u=n(32);n.d(t,'Component',function(){return u.a});var f=n(12);n.d(t,'Root',function(){return f.a});var h=n(6);n.d(t,'RowOrColumn',function(){return h.a});var y=n(13);n.d(t,'Stack',function(){return y.a});var v=n(26);n.d(t,'BubblingEvent',function(){return v.a});var b=n(11);n.d(t,'ConfigMinifier',function(){return b.a});var k=n(7);n.d(t,'DragListener',function(){return k.a});var x=n(1);n.d(t,'EventEmitter',function(){return x.b});var D=n(25);n.d(t,'EventHub',function(){return D.a});var w=n(24);n.d(t,'ReactComponentHandler',function(){return w.a}),{}.ES6&&(n(74),n(77))},function(){},function(){},function(){},function(e,o,i){'use strict';var a=i(1),s=i(24),r=i(11),l=i(25),c=i(12),p=i(6),d=i(13),m=i(32),_=i(3),g=i(34),u=i(70),f=i(71),h=i(72),y=i(27),v=i(73),b=i(0);class k extends a.b{constructor(e,t){if(!$){var n='jQuery is missing as dependency for GoldenLayout. ';throw n+='Please either expose $ on GoldenLayout\\'s scope (e.g. window) or add \"jquery\" to ',n+='your paths when using RequireJS/AMD',new Error(n)}super(),this.isInitialised=!1,this._isFullPage=!1,this._resizeTimeoutId=null,this._components={\"lm-react-component\":s.a},this._itemAreas=[],this._resizeFunction=Object(b.c)(this._onResize,this),this._unloadFunction=Object(b.c)(this._onUnload,this),this._maximisedItem=null,this._maximisePlaceholder=$('<div class=\"lm_maximise_place\"></div>'),this._creationTimeoutPassed=!1,this._subWindowsCreated=!1,this._dragSources=[],this._updatingColumnsResponsive=!1,this._firstLoad=!0,this.width=null,this.height=null,this.root=null,this.openPopouts=[],this.selectedItem=null,this.isSubWindow=!1,this.eventHub=new l.a(this),this.config=this._createConfig(e),this.container=t,this.dropTargetIndicator=null,this.transitionIndicator=null,this.tabDropPlaceholder=$('<div class=\"lm_drop_tab_placeholder\"></div>'),!0===this.isSubWindow&&$('body').css('visibility','hidden'),this._typeToItem={column:Object(b.c)(p.a,this,[!0]),row:Object(b.c)(p.a,this,[!1]),stack:d.a,component:m.a}}minifyConfig(e){return new r.a().minifyConfig(e)}unminifyConfig(e){return new r.a().unminifyConfig(e)}registerComponent(e,t){if('function'!=typeof t)throw new Error('Please register a constructor function');if(void 0!==this._components[e])throw new Error('Component '+e+' is already registered');this._components[e]=t}toConfig(e){var t,n,o;if(!1===this.isInitialised)throw new Error('Can\\'t create config, layout not yet initialised');if(e&&!(e instanceof _.a))throw new Error('Root must be a ContentItem');for(t={settings:Object(b.b)({},this.config.settings),dimensions:Object(b.b)({},this.config.dimensions),labels:Object(b.b)({},this.config.labels)},t.content=[],n=function(e,t){var o,a;for(o in t.config)'content'!==o&&(e[o]=t.config[o]);if(t.contentItems.length)for(e.content=[],a=0;a<t.contentItems.length;a++)e.content[a]={},n(e.content[a],t.contentItems[a])},e?n(t,{contentItems:[e]}):n(t,this.root),this._$reconcilePopoutWindows(),t.openPopouts=[],o=0;o<this.openPopouts.length;o++)t.openPopouts.push(this.openPopouts[o].toConfig());return t.maximisedItemId=this._maximisedItem?'__glMaximised':null,t}getComponent(e){if(this._components[e]===void 0)throw new y.a('Unknown component \"'+e+'\"');return this._components[e]}init(){return!1===this._subWindowsCreated&&(this._createSubWindows(),this._subWindowsCreated=!0),'loading'===document.readyState||null===document.body?void $(document).ready(Object(b.c)(this.init,this)):!0===this.isSubWindow&&!1===this._creationTimeoutPassed?(setTimeout(Object(b.c)(this.init,this),7),void(this._creationTimeoutPassed=!0)):void(!0===this.isSubWindow&&this._adjustToWindowMode(),this._setContainer(),this.dropTargetIndicator=new f.a(this.container),this.transitionIndicator=new h.a,this.updateSize(),this._create(this.config),this._bindEvents(),this.isInitialised=!0,this._adjustColumnsResponsive(),this.emit('initialised'))}updateSize(e,t){2===arguments.length?(this.width=e,this.height=t):(this.width=this.container.width(),this.height=this.container.height()),!0===this.isInitialised&&(this.root.callDownwards('setSize',[this.width,this.height]),this._maximisedItem&&(this._maximisedItem.element.width(this.container.width()),this._maximisedItem.element.height(this.container.height()),this._maximisedItem.callDownwards('setSize')),this._adjustColumnsResponsive())}destroy(){!1===this.isInitialised||(this._onUnload(),$(window).off('resize',this._resizeFunction),$(window).off('unload beforeunload',this._unloadFunction),this.root.callDownwards('_$destroy',[],!0),this.root.contentItems=[],this.tabDropPlaceholder.remove(),this.dropTargetIndicator.destroy(),this.transitionIndicator.destroy(),this.eventHub.destroy(),this._dragSources.forEach(function(e){e._dragListener.destroy(),e._element=null,e._itemConfig=null,e._dragListener=null}),this._dragSources=[])}createContentItem(e,t){var n,o;if('string'!=typeof e.type)throw new y.a('Missing parameter \\'type\\'',e);if('react-component'===e.type&&(e.type='component',e.componentName='lm-react-component'),!this._typeToItem[e.type])throw n='Unknown type \\''+e.type+'\\'. Valid types are '+Object(b.j)(this._typeToItem).join(','),new y.a(n);return'component'!==e.type||t instanceof d.a||!t||!0===this.isSubWindow&&t instanceof c.a||(e={type:'stack',width:e.width,height:e.height,content:[e]}),o=new this._typeToItem[e.type](this,e,t),o}createPopout(e,t,n,o){var i,a,s,r,l,c,p=e,d=e instanceof _.a,m=this;if(n=n||null,d){for(p=this.toConfig(e).content,n=Object(b.f)(),r=e.parent,l=e;1===r.contentItems.length&&!r.isRoot;)r=r.parent,l=l.parent;r.addId(n),isNaN(o)&&(o=Object(b.g)(l,r.contentItems))}else p instanceof Array||(p=[p]);return!t&&d&&(i=window.screenX||window.screenLeft,a=window.screenY||window.screenTop,s=e.element.offset(),t={left:i+s.left,top:a+s.top,width:e.element.width(),height:e.element.height()}),t||d||(t={left:window.screenX||window.screenLeft+20,top:window.screenY||window.screenTop+20,width:500,height:309}),d&&e.remove(),c=new g.a(p,t,n,o,this),c.on('initialised',function(){m.emit('windowOpened',c)}),c.on('closed',function(){m._$reconcilePopoutWindows()}),this.openPopouts.push(c),c}createDragSource(e,t){this.config.settings.constrainDragToContainer=!1;var n=new u.a($(e),t,this);return this._dragSources.push(n),n}selectItem(e,t){if(!0!==this.config.settings.selectionEnabled)throw new Error('Please set selectionEnabled to true to use this feature');e===this.selectedItem||(null!==this.selectedItem&&this.selectedItem.deselect(),e&&!0!==t&&e.select(),this.selectedItem=e,this.emit('selectionChanged',e))}_$maximiseItem(e){null!==this._maximisedItem&&this._$minimiseItem(this._maximisedItem),this._maximisedItem=e,this._maximisedItem.addId('__glMaximised'),e.element.addClass('lm_maximised'),e.element.after(this._maximisePlaceholder),this.root.element.prepend(e.element),e.element.width(this.container.width()),e.element.height(this.container.height()),e.callDownwards('setSize'),this._maximisedItem.emit('maximised'),this.emit('stateChanged')}_$minimiseItem(e){e.element.removeClass('lm_maximised'),e.removeId('__glMaximised'),this._maximisePlaceholder.after(e.element),this._maximisePlaceholder.remove(),e.parent.callDownwards('setSize'),this._maximisedItem=null,e.emit('minimised'),this.emit('stateChanged')}_$closeWindow(){window.setTimeout(function(){window.close()},1)}_$getArea(e,t){var n,o,i=Infinity,a=null;for(n=0;n<this._itemAreas.length;n++)o=this._itemAreas[n],e>o.x1&&e<o.x2&&t>o.y1&&t<o.y2&&i>o.surface&&(i=o.surface,a=o);return a}_$createRootItemAreas(){var e=50,t={y2:0,x2:0,y1:'y2',x1:'x2'};for(var n in t){var o=this.root._$getArea();o.side=n,o[n]=t[n]?o[t[n]]-e:e,o.surface=(o.x2-o.x1)*(o.y2-o.y1),this._itemAreas.push(o)}}_$calculateItemAreas(){var e,t,n=this._getAllContentItems();if(this._itemAreas=[],1===n.length)return void this._itemAreas.push(this.root._$getArea());for(this._$createRootItemAreas(),e=0;e<n.length;e++)if(n[e].isStack)if(t=n[e]._$getArea(),null===t)continue;else if(t instanceof Array)this._itemAreas=this._itemAreas.concat(t);else{this._itemAreas.push(t);var o={};Object(b.b)(o,t),Object(b.b)(o,t.contentItem._contentAreaDimensions.header.highlightArea),o.surface=(o.x2-o.x1)*(o.y2-o.y1),this._itemAreas.push(o)}}_$normalizeContentItem(e,t){if(!e)throw new Error('No content item defined');if(Object(b.h)(e)&&(e=e()),e instanceof _.a)return e;if($.isPlainObject(e)&&e.type){var n=this.createContentItem(e,t);return n.callDownwards('_$init'),n}throw new Error('Invalid contentItem')}_$reconcilePopoutWindows(){var e,t=[];for(e=0;e<this.openPopouts.length;e++)!1===this.openPopouts[e].getWindow().closed?t.push(this.openPopouts[e]):this.emit('windowClosed',this.openPopouts[e]);this.openPopouts.length!==t.length&&(this.emit('stateChanged'),this.openPopouts=t)}_getAllContentItems(){var e=[],t=function(n){if(e.push(n),n.contentItems instanceof Array)for(var o=0;o<n.contentItems.length;o++)t(n.contentItems[o])};return t(this.root),e}_bindEvents(){this._isFullPage&&$(window).resize(this._resizeFunction),$(window).on('unload beforeunload',this._unloadFunction)}_onResize(){clearTimeout(this._resizeTimeoutId),this._resizeTimeoutId=setTimeout(Object(b.c)(this.updateSize,this),100)}_createConfig(e){var t=Object(b.d)('gl-window');t&&(this.isSubWindow=!0,e=localStorage.getItem(t),e=JSON.parse(e),e=new r.a().unminifyConfig(e),localStorage.removeItem(t)),e=$.extend(!0,{},v.a,e);var n=function(e){for(var t in e)'props'!=t&&'object'==typeof e[t]?n(e[t]):'type'==t&&'react-component'===e[t]&&(e.type='component',e.componentName='lm-react-component')};return n(e),!1===e.settings.hasHeaders&&(e.dimensions.headerHeight=0),e}_adjustToWindowMode(){var e=$('<div class=\"lm_popin\" title=\"'+this.config.labels.popin+'\"><div class=\"lm_icon\"></div><div class=\"lm_bg\"></div></div>');e.click(Object(b.c)(function(){this.emit('popIn')},this)),document.title=Object(b.k)(this.config.content[0].title),$('head').append($('body link, body style, template, .gl_keep')),this.container=$('body').html('').css('visibility','visible').append(e);document.body.offsetHeight;window.__glInstance=this}_createSubWindows(){var e,t;for(e=0;e<this.config.openPopouts.length;e++)t=this.config.openPopouts[e],this.createPopout(t.content,t.dimensions,t.parentId,t.indexInParent)}_setContainer(){var e=$(this.container||'body');if(0===e.length)throw new Error('GoldenLayout container not found');if(1<e.length)throw new Error('GoldenLayout more than one container element specified');e[0]===document.body&&(this._isFullPage=!0,$('html, body').css({height:'100%',margin:0,padding:0,overflow:'hidden'})),this.container=e}_create(e){var t;if(!(e.content instanceof Array))throw t=void 0===e.content?'Missing setting \\'content\\' on top level of configuration':'Configuration parameter \\'content\\' must be an array',new y.a(t,e);if(1<e.content.length)throw t='Top level content can\\'t contain more then one element.',new y.a(t,e);this.root=new c.a(this,{content:e.content},this.container),this.root.callDownwards('_$init'),'__glMaximised'===e.maximisedItemId&&this.root.getItemsById(e.maximisedItemId)[0].toggleMaximise()}_onUnload(){if(!0===this.config.settings.closePopoutsOnUnload)for(var e=0;e<this.openPopouts.length;e++)this.openPopouts[e].close()}_adjustColumnsResponsive(){if(!this._useResponsiveLayout()||this._updatingColumnsResponsive||!this.config.dimensions||!this.config.dimensions.minItemWidth||0===this.root.contentItems.length||!this.root.contentItems[0].isRow)return void(this._firstLoad=!1);this._firstLoad=!1;var e=this.root.contentItems[0].contentItems.length;if(!(1>=e)){var o=this.config.dimensions.minItemWidth;if(!(e*o<=this.width)){this._updatingColumnsResponsive=!0;for(var a,s=n(t(this.width/o),1),r=this.root.contentItems[0],l=this._findAllStackContainers()[0],c=0;c<e-s;c++)a=r.contentItems[r.contentItems.length-1],this._addChildContentItemsToContainer(l,a);this._updatingColumnsResponsive=!1}}}_useResponsiveLayout(){return this.config.settings&&('always'==this.config.settings.responsiveMode||'onload'==this.config.settings.responsiveMode&&this._firstLoad)}_addChildContentItemsToContainer(e,t){'stack'===t.type?t.contentItems.forEach(function(n){e.addChild(n),t.removeChild(n,!0)}):t.contentItems.forEach(Object(b.c)(function(t){this._addChildContentItemsToContainer(e,t)},this))}_findAllStackContainers(){var e=[];return this._findAllStackContainersRecursive(e,this.root),e}_findAllStackContainersRecursive(e,t){t.contentItems.forEach(Object(b.c)(function(t){'stack'==t.type?e.push(t):!t.isComponent&&this._findAllStackContainersRecursive(e,t)},this))}}o.a=k},function(e,t,n){e.exports={default:n(41),__esModule:!0}},function(e,t,n){n(42),e.exports=n(2).Object.keys},function(e,t,n){var o=n(43),i=n(15);n(53)('keys',function(){return function(e){return i(o(e))}})},function(e,t,n){var o=n(14);e.exports=function(e){return Object(o(e))}},function(e,t,n){var o=n(16),a=n(17),s=n(47)(!1),i=n(19)('IE_PROTO');e.exports=function(e,t){var n,r=a(e),l=0,c=[];for(n in r)n!=i&&o(r,n)&&c.push(n);for(;t.length>l;)o(r,n=t[l++])&&(~s(c,n)||c.push(n));return c}},function(e,t,n){var o=n(46);e.exports=Object('z').propertyIsEnumerable(0)?Object:function(e){return'String'==o(e)?e.split(''):Object(e)}},function(e){var t={}.toString;e.exports=function(e){return t.call(e).slice(8,-1)}},function(e,t,n){var o=n(17),i=n(48),a=n(49);e.exports=function(e){return function(t,n,s){var r,l=o(t),c=i(l.length),p=a(s,c);if(e&&n!=n){for(;c>p;)if(r=l[p++],r!=r)return!0;}else for(;c>p;p++)if((e||p in l)&&l[p]===n)return e||p||0;return!e&&-1}}},function(t,n,o){var i=o(18);t.exports=function(t){return 0<t?e(i(t),9007199254740991):0}},function(t,o,i){var a=i(18);t.exports=function(t,o){return t=a(t),0>t?n(t+o,0):e(t,o)}},function(e,t,n){var o=n(2),i=n(4),a='__core-js_shared__',s=i[a]||(i[a]={});(e.exports=function(e,t){return s[e]||(s[e]=t===void 0?{}:t)})('versions',[]).push({version:o.version,mode:n(51)?'pure':'global',copyright:'\\xA9 2018 Denis Pushkarev (zloirock.ru)'})},function(e){e.exports=!0},function(e){var t=0,n=Math.random();e.exports=function(e){return'Symbol('.concat(e===void 0?'':e,')_',(++t+n).toString(36))}},function(e,t,n){var o=n(21),i=n(2),a=n(10);e.exports=function(e,t){var n=(i.Object||{})[e]||Object[e],s={};s[e]=t(n),o(o.S+o.F*a(function(){n(1)}),'Object',s)}},function(e,t,n){var o=n(55);e.exports=function(e,t,n){return(o(e),void 0===t)?e:1===n?function(n){return e.call(t,n)}:2===n?function(n,o){return e.call(t,n,o)}:3===n?function(n,o,i){return e.call(t,n,o,i)}:function(){return e.apply(t,arguments)}}},function(e){e.exports=function(e){if('function'!=typeof e)throw TypeError(e+' is not a function!');return e}},function(e,t,n){var o=n(22),i=n(59);e.exports=n(5)?function(e,t,n){return o.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){e.exports=!n(5)&&!n(10)(function(){return 7!=Object.defineProperty(n(23)('div'),'a',{get:function(){return 7}}).a})},function(e,t,n){var o=n(9);e.exports=function(e,t){if(!o(e))return e;var n,i;if(t&&'function'==typeof(n=e.toString)&&!o(i=n.call(e)))return i;if('function'==typeof(n=e.valueOf)&&!o(i=n.call(e)))return i;if(!t&&'function'==typeof(n=e.toString)&&!o(i=n.call(e)))return i;throw TypeError('Can\\'t convert object to primitive value')}},function(e){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){e.exports={default:n(61),__esModule:!0}},function(e,t,n){n(62);var o=n(2).Object;e.exports=function(e,t){return o.create(e,t)}},function(e,t,n){var o=n(21);o(o.S,'Object',{create:n(63)})},function(e,t,n){var o=n(8),i=n(64),a=n(20),s=n(19)('IE_PROTO'),r=function(){},l='prototype',c=function(){var e,t=n(23)('iframe'),o=a.length,i='<',s='>';for(t.style.display='none',n(65).appendChild(t),t.src='javascript:',e=t.contentWindow.document,e.open(),e.write(i+'script'+s+'document.F=Object'+i+'/script'+s),e.close(),c=e.F;o--;)delete c[l][a[o]];return c()};e.exports=Object.create||function(e,t){var n;return null===e?n=c():(r[l]=o(e),n=new r,r[l]=null,n[s]=e),void 0===t?n:i(n,t)}},function(e,t,n){var o=n(22),a=n(8),s=n(15);e.exports=n(5)?Object.defineProperties:function(e,t){a(e);for(var n,r=s(t),l=r.length,c=0;l>c;)o.f(e,n=r[c++],t[n]);return e}},function(e,t,n){var o=n(4).document;e.exports=o&&o.documentElement},function(e,t){'use strict';t.a={isClosable:!0,reorderEnabled:!0,title:''}},function(e,t,n){'use strict';var o=n(7);t.a=class{constructor(e,t,n){this._isVertical=e,this._size=t,this._grabSize=n<t?t:n,this.element=this._createElement(),this._dragListener=new o.a(this.element)}on(e,t,n){this._dragListener.on(e,t,n)}_$destroy(){this.element.remove()}_createElement(){var e=$('<div class=\"lm_drag_handle\"></div>'),t=$('<div class=\"lm_splitter\"></div>');t.append(e);var n=this._grabSize-this._size,o=n/2;return this._isVertical?(e.css('top',-o),e.css('height',this._size+n),t.addClass('lm_vertical'),t.height(this._size)):(e.css('left',-o),e.css('width',this._size+n),t.addClass('lm_horizontal'),t.width(this._size)),t}}},function(e,t,n){e.exports={default:n(69),__esModule:!0}},function(e,t,n){var o=n(2),i=o.JSON||(o.JSON={stringify:JSON.stringify});e.exports=function(){return i.stringify.apply(i,arguments)}},function(e,t,n){'use strict';var o=n(7),i=n(30),a=n(0);t.a=class{constructor(e,t,n){this._element=e,this._itemConfig=t,this._layoutManager=n,this._dragListener=null,this._createDragListener()}_createDragListener(){null!==this._dragListener&&this._dragListener.destroy(),this._dragListener=new o.a(this._element),this._dragListener.on('dragStart',this._onDragStart,this),this._dragListener.on('dragStop',this._createDragListener,this)}_onDragStart(e,t){var n=this._itemConfig;Object(a.h)(n)&&(n=n());var o=this._layoutManager._$normalizeContentItem($.extend(!0,{},n)),s=new i.a(e,t,this._dragListener,this._layoutManager,o,null);this._layoutManager.transitionIndicator.transitionElements(this._element,s.element)}}},function(e,t){'use strict';t.a=class{constructor(){this.element=$('<div class=\"lm_dropTargetIndicator\"><div class=\"lm_inner\"></div></div>'),$(document.body).append(this.element)}destroy(){this.element.remove()}highlight(e,t,n,o){this.highlightArea({x1:e,y1:t,x2:n,y2:o})}highlightArea(e){this.element.css({left:e.x1,top:e.y1,width:e.x2-e.x1,height:e.y2-e.y1}).show()}hide(){this.element.hide()}}},function(e,t,n){'use strict';var o=n(0);t.a=class{constructor(){this._element=$('<div class=\"lm_transition_indicator\"></div>'),$(document.body).append(this._element),this._toElement=null,this._fromDimensions=null,this._totalAnimationDuration=200,this._animationStartTime=null}destroy(){this._element.remove()}transitionElements(){}_nextAnimationFrame(){var e,t=this._measure(this._toElement),n=(Object(o.i)()-this._animationStartTime)/this._totalAnimationDuration,i={};if(1<=n)return void this._element.hide();for(e in t.opacity=0,this._fromDimensions)i[e]=this._fromDimensions[e]+(t[e]-this._fromDimensions[e])*n;this._element.css(i),Object(o.a)(Object(o.c)(this._nextAnimationFrame,this))}_measure(e){var t=e.offset();return{left:t.left,top:t.top,width:e.outerWidth(),height:e.outerHeight()}}}},function(e,t){'use strict';t.a={openPopouts:[],settings:{hasHeaders:!0,constrainDragToContainer:!0,reorderEnabled:!0,selectionEnabled:!1,popoutWholeStack:!1,blockedPopoutsThrowError:!0,closePopoutsOnUnload:!0,showPopoutIcon:!0,showMaximiseIcon:!0,showCloseIcon:!0,responsiveMode:'onload',tabOverlapAllowance:0,reorderOnTabMenuClick:!0,tabControlOffset:10},dimensions:{borderWidth:5,borderGrabWidth:15,minItemHeight:10,minItemWidth:10,headerHeight:20,dragProxyWidth:300,dragProxyHeight:200},labels:{close:'close',maximise:'maximise',minimise:'minimise',popout:'open in new window',popin:'pop in',tabDropdown:'additional tabs'}}},function(e,t,n){n(75)(n(76))},function(e){e.exports=function(e){function t(e){'undefined'!=typeof console&&(console.error||console.log)('[Script Loader]',e)}function n(){return'undefined'!=typeof attachEvent&&'undefined'==typeof addEventListener}try{'undefined'!=typeof execScript&&n()?execScript(e):'undefined'==typeof eval?t('EvalError: No eval function available'):eval.call(null,e)}catch(e){t(e)}}},function(e){e.exports='/* Zepto v1.2.0 - zepto event ajax form ie - zeptojs.com/license */\\n(function(global, factory) {\\n if (typeof define === \\'function\\' && define.amd)\\n define(function() { return factory(global) })\\n else\\n factory(global)\\n}(this, function(window) {\\n var Zepto = (function() {\\n var undefined, key, $, classList, emptyArray = [], concat = emptyArray.concat, filter = emptyArray.filter, slice = emptyArray.slice,\\n document = window.document,\\n elementDisplay = {}, classCache = {},\\n cssNumber = { \\'column-count\\': 1, \\'columns\\': 1, \\'font-weight\\': 1, \\'line-height\\': 1,\\'opacity\\': 1, \\'z-index\\': 1, \\'zoom\\': 1 },\\n fragmentRE = /^\\\\s*<(\\\\w+|!)[^>]*>/,\\n singleTagRE = /^<(\\\\w+)\\\\s*\\\\/?>(?:<\\\\/\\\\1>|)$/,\\n tagExpanderRE = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\\\\w:]+)[^>]*)\\\\/>/ig,\\n rootNodeRE = /^(?:body|html)$/i,\\n capitalRE = /([A-Z])/g,\\n\\n // special attributes that should be get/set via method calls\\n methodAttributes = [\\'val\\', \\'css\\', \\'html\\', \\'text\\', \\'data\\', \\'width\\', \\'height\\', \\'offset\\'],\\n\\n adjacencyOperators = [ \\'after\\', \\'prepend\\', \\'before\\', \\'append\\' ],\\n table = document.createElement(\\'table\\'),\\n tableRow = document.createElement(\\'tr\\'),\\n containers = {\\n \\'tr\\': document.createElement(\\'tbody\\'),\\n \\'tbody\\': table, \\'thead\\': table, \\'tfoot\\': table,\\n \\'td\\': tableRow, \\'th\\': tableRow,\\n \\'*\\': document.createElement(\\'div\\')\\n },\\n readyRE = /complete|loaded|interactive/,\\n simpleSelectorRE = /^[\\\\w-]*$/,\\n class2type = {},\\n toString = class2type.toString,\\n zepto = {},\\n camelize, uniq,\\n tempParent = document.createElement(\\'div\\'),\\n propMap = {\\n \\'tabindex\\': \\'tabIndex\\',\\n \\'readonly\\': \\'readOnly\\',\\n \\'for\\': \\'htmlFor\\',\\n \\'class\\': \\'className\\',\\n \\'maxlength\\': \\'maxLength\\',\\n \\'cellspacing\\': \\'cellSpacing\\',\\n \\'cellpadding\\': \\'cellPadding\\',\\n \\'rowspan\\': \\'rowSpan\\',\\n \\'colspan\\': \\'colSpan\\',\\n \\'usemap\\': \\'useMap\\',\\n \\'frameborder\\': \\'frameBorder\\',\\n \\'contenteditable\\': \\'contentEditable\\'\\n },\\n isArray = Array.isArray ||\\n function(object){ return object instanceof Array }\\n\\n zepto.matches = function(element, selector) {\\n if (!selector || !element || element.nodeType !== 1) return false\\n var matchesSelector = element.matches || element.webkitMatchesSelector ||\\n element.mozMatchesSelector || element.oMatchesSelector ||\\n element.matchesSelector\\n if (matchesSelector) return matchesSelector.call(element, selector)\\n // fall back to performing a selector:\\n var match, parent = element.parentNode, temp = !parent\\n if (temp) (parent = tempParent).appendChild(element)\\n match = ~zepto.qsa(parent, selector).indexOf(element)\\n temp && tempParent.removeChild(element)\\n return match\\n }\\n\\n function type(obj) {\\n return obj == null ? String(obj) :\\n class2type[toString.call(obj)] || \"object\"\\n }\\n\\n function isFunction(value) { return type(value) == \"function\" }\\n function isWindow(obj) { return obj != null && obj == obj.window }\\n function isDocument(obj) { return obj != null && obj.nodeType == obj.DOCUMENT_NODE }\\n function isObject(obj) { return type(obj) == \"object\" }\\n function isPlainObject(obj) {\\n return isObject(obj) && !isWindow(obj) && Object.getPrototypeOf(obj) == Object.prototype\\n }\\n\\n function likeArray(obj) {\\n var length = !!obj && \\'length\\' in obj && obj.length,\\n type = $.type(obj)\\n\\n return \\'function\\' != type && !isWindow(obj) && (\\n \\'array\\' == type || length === 0 ||\\n (typeof length == \\'number\\' && length > 0 && (length - 1) in obj)\\n )\\n }\\n\\n function compact(array) { return filter.call(array, function(item){ return item != null }) }\\n function flatten(array) { return array.length > 0 ? $.fn.concat.apply([], array) : array }\\n camelize = function(str){ return str.replace(/-+(.)?/g, function(match, chr){ return chr ? chr.toUpperCase() : \\'\\' }) }\\n function dasherize(str) {\\n return str.replace(/::/g, \\'/\\')\\n .replace(/([A-Z]+)([A-Z][a-z])/g, \\'$1_$2\\')\\n .replace(/([a-z\\\\d])([A-Z])/g, \\'$1_$2\\')\\n .replace(/_/g, \\'-\\')\\n .toLowerCase()\\n }\\n uniq = function(array){ return filter.call(array, function(item, idx){ return array.indexOf(item) == idx }) }\\n\\n function classRE(name) {\\n return name in classCache ?\\n classCache[name] : (classCache[name] = new RegExp(\\'(^|\\\\\\\\s)\\' + name + \\'(\\\\\\\\s|$)\\'))\\n }\\n\\n function maybeAddPx(name, value) {\\n return (typeof value == \"number\" && !cssNumber[dasherize(name)]) ? value + \"px\" : value\\n }\\n\\n function defaultDisplay(nodeName) {\\n var element, display\\n if (!elementDisplay[nodeName]) {\\n element = document.createElement(nodeName)\\n document.body.appendChild(element)\\n display = getComputedStyle(element, \\'\\').getPropertyValue(\"display\")\\n element.parentNode.removeChild(element)\\n display == \"none\" && (display = \"block\")\\n elementDisplay[nodeName] = display\\n }\\n return elementDisplay[nodeName]\\n }\\n\\n function children(element) {\\n return \\'children\\' in element ?\\n slice.call(element.children) :\\n $.map(element.childNodes, function(node){ if (node.nodeType == 1) return node })\\n }\\n\\n function Z(dom, selector) {\\n var i, len = dom ? dom.length : 0\\n for (i = 0; i < len; i++) this[i] = dom[i]\\n this.length = len\\n this.selector = selector || \\'\\'\\n }\\n\\n // `$.zepto.fragment` takes a html string and an optional tag name\\n // to generate DOM nodes from the given html string.\\n // The generated DOM nodes are returned as an array.\\n // This function can be overridden in plugins for example to make\\n // it compatible with browsers that don\\'t support the DOM fully.\\n zepto.fragment = function(html, name, properties) {\\n var dom, nodes, container\\n\\n // A special case optimization for a single tag\\n if (singleTagRE.test(html)) dom = $(document.createElement(RegExp.$1))\\n\\n if (!dom) {\\n if (html.replace) html = html.replace(tagExpanderRE, \"<$1></$2>\")\\n if (name === undefined) name = fragmentRE.test(html) && RegExp.$1\\n if (!(name in containers)) name = \\'*\\'\\n\\n container = containers[name]\\n container.innerHTML = \\'\\' + html\\n dom = $.each(slice.call(container.childNodes), function(){\\n container.removeChild(this)\\n })\\n }\\n\\n if (isPlainObject(properties)) {\\n nodes = $(dom)\\n $.each(properties, function(key, value) {\\n if (methodAttributes.indexOf(key) > -1) nodes[key](value)\\n else nodes.attr(key, value)\\n })\\n }\\n\\n return dom\\n }\\n\\n // `$.zepto.Z` swaps out the prototype of the given `dom` array\\n // of nodes with `$.fn` and thus supplying all the Zepto functions\\n // to the array. This method can be overridden in plugins.\\n zepto.Z = function(dom, selector) {\\n return new Z(dom, selector)\\n }\\n\\n // `$.zepto.isZ` should return `true` if the given object is a Zepto\\n // collection. This method can be overridden in plugins.\\n zepto.isZ = function(object) {\\n return object instanceof zepto.Z\\n }\\n\\n // `$.zepto.init` is Zepto\\'s counterpart to jQuery\\'s `$.fn.init` and\\n // takes a CSS selector and an optional context (and handles various\\n // special cases).\\n // This method can be overridden in plugins.\\n zepto.init = function(selector, context) {\\n var dom\\n // If nothing given, return an empty Zepto collection\\n if (!selector) return zepto.Z()\\n // Optimize for string selectors\\n else if (typeof selector == \\'string\\') {\\n selector = selector.trim()\\n // If it\\'s a html fragment, create nodes from it\\n // Note: In both Chrome 21 and Firefox 15, DOM error 12\\n // is thrown if the fragment doesn\\'t begin with <\\n if (selector[0] == \\'<\\' && fragmentRE.test(selector))\\n dom = zepto.fragment(selector, RegExp.$1, context), selector = null\\n // If there\\'s a context, create a collection on that context first, and select\\n // nodes from there\\n else if (context !== undefined) return $(context).find(selector)\\n // If it\\'s a CSS selector, use it to select nodes.\\n else dom = zepto.qsa(document, selector)\\n }\\n // If a function is given, call it when the DOM is ready\\n else if (isFunction(selector)) return $(document).ready(selector)\\n // If a Zepto collection is given, just return it\\n else if (zepto.isZ(selector)) return selector\\n else {\\n // normalize array if an array of nodes is given\\n if (isArray(selector)) dom = compact(selector)\\n // Wrap DOM nodes.\\n else if (isObject(selector))\\n dom = [selector], selector = null\\n // If it\\'s a html fragment, create nodes from it\\n else if (fragmentRE.test(selector))\\n dom = zepto.fragment(selector.trim(), RegExp.$1, context), selector = null\\n // If there\\'s a context, create a collection on that context first, and select\\n // nodes from there\\n else if (context !== undefined) return $(context).find(selector)\\n // And last but no least, if it\\'s a CSS selector, use it to select nodes.\\n else dom = zepto.qsa(document, selector)\\n }\\n // create a new Zepto collection from the nodes found\\n return zepto.Z(dom, selector)\\n }\\n\\n // `$` will be the base `Zepto` object. When calling this\\n // function just call `$.zepto.init, which makes the implementation\\n // details of selecting nodes and creating Zepto collections\\n // patchable in plugins.\\n $ = function(selector, context){\\n return zepto.init(selector, context)\\n }\\n\\n function extend(target, source, deep) {\\n for (key in source)\\n if (deep && (isPlainObject(source[key]) || isArray(source[key]))) {\\n if (isPlainObject(source[key]) && !isPlainObject(target[key]))\\n target[key] = {}\\n if (isArray(source[key]) && !isArray(target[key]))\\n target[key] = []\\n extend(target[key], source[key], deep)\\n }\\n else if (source[key] !== undefined) target[key] = source[key]\\n }\\n\\n // Copy all but undefined properties from one or more\\n // objects to the `target` object.\\n $.extend = function(target){\\n var deep, args = slice.call(arguments, 1)\\n if (typeof target == \\'boolean\\') {\\n deep = target\\n target = args.shift()\\n }\\n args.forEach(function(arg){ extend(target, arg, deep) })\\n return target\\n }\\n\\n // `$.zepto.qsa` is Zepto\\'s CSS selector implementation which\\n // uses `document.querySelectorAll` and optimizes for some special cases, like `#id`.\\n // This method can be overridden in plugins.\\n zepto.qsa = function(element, selector){\\n var found,\\n maybeID = selector[0] == \\'#\\',\\n maybeClass = !maybeID && selector[0] == \\'.\\',\\n nameOnly = maybeID || maybeClass ? selector.slice(1) : selector, // Ensure that a 1 char tag name still gets checked\\n isSimple = simpleSelectorRE.test(nameOnly)\\n return (element.getElementById && isSimple && maybeID) ? // Safari DocumentFragment doesn\\'t have getElementById\\n ( (found = element.getElementById(nameOnly)) ? [found] : [] ) :\\n (element.nodeType !== 1 && element.nodeType !== 9 && element.nodeType !== 11) ? [] :\\n slice.call(\\n isSimple && !maybeID && element.getElementsByClassName ? // DocumentFragment doesn\\'t have getElementsByClassName/TagName\\n maybeClass ? element.getElementsByClassName(nameOnly) : // If it\\'s simple, it could be a class\\n element.getElementsByTagName(selector) : // Or a tag\\n element.querySelectorAll(selector) // Or it\\'s not simple, and we need to query all\\n )\\n }\\n\\n function filtered(nodes, selector) {\\n return selector == null ? $(nodes) : $(nodes).filter(selector)\\n }\\n\\n $.contains = document.documentElement.contains ?\\n function(parent, node) {\\n return parent !== node && parent.contains(node)\\n } :\\n function(parent, node) {\\n while (node && (node = node.parentNode))\\n if (node === parent) return true\\n return false\\n }\\n\\n function funcArg(context, arg, idx, payload) {\\n return isFunction(arg) ? arg.call(context, idx, payload) : arg\\n }\\n\\n function setAttribute(node, name, value) {\\n value == null ? node.removeAttribute(name) : node.setAttribute(name, value)\\n }\\n\\n // access className property while respecting SVGAnimatedString\\n function className(node, value){\\n var klass = node.className || \\'\\',\\n svg = klass && klass.baseVal !== undefined\\n\\n if (value === undefined) return svg ? klass.baseVal : klass\\n svg ? (klass.baseVal = value) : (node.className = value)\\n }\\n\\n // \"true\" => true\\n // \"false\" => false\\n // \"null\" => null\\n // \"42\" => 42\\n // \"42.5\" => 42.5\\n // \"08\" => \"08\"\\n // JSON => parse if valid\\n // String => self\\n function deserializeValue(value) {\\n try {\\n return value ?\\n value == \"true\" ||\\n ( value == \"false\" ? false :\\n value == \"null\" ? null :\\n +value + \"\" == value ? +value :\\n /^[\\\\[\\\\{]/.test(value) ? $.parseJSON(value) :\\n value )\\n : value\\n } catch(e) {\\n return value\\n }\\n }\\n\\n $.type = type\\n $.isFunction = isFunction\\n $.isWindow = isWindow\\n $.isArray = isArray\\n $.isPlainObject = isPlainObject\\n\\n $.isEmptyObject = function(obj) {\\n var name\\n for (name in obj) return false\\n return true\\n }\\n\\n $.isNumeric = function(val) {\\n var num = Number(val), type = typeof val\\n return val != null && type != \\'boolean\\' &&\\n (type != \\'string\\' || val.length) &&\\n !isNaN(num) && isFinite(num) || false\\n }\\n\\n $.inArray = function(elem, array, i){\\n return emptyArray.indexOf.call(array, elem, i)\\n }\\n\\n $.camelCase = camelize\\n $.trim = function(str) {\\n return str == null ? \"\" : String.prototype.trim.call(str)\\n }\\n\\n // plugin compatibility\\n $.uuid = 0\\n $.support = { }\\n $.expr = { }\\n $.noop = function() {}\\n\\n $.map = function(elements, callback){\\n var value, values = [], i, key\\n if (likeArray(elements))\\n for (i = 0; i < elements.length; i++) {\\n value = callback(elements[i], i)\\n if (value != null) values.push(value)\\n }\\n else\\n for (key in elements) {\\n value = callback(elements[key], key)\\n if (value != null) values.push(value)\\n }\\n return flatten(values)\\n }\\n\\n $.each = function(elements, callback){\\n var i, key\\n if (likeArray(elements)) {\\n for (i = 0; i < elements.length; i++)\\n if (callback.call(elements[i], i, elements[i]) === false) return elements\\n } else {\\n for (key in elements)\\n if (callback.call(elements[key], key, elements[key]) === false) return elements\\n }\\n\\n return elements\\n }\\n\\n $.grep = function(elements, callback){\\n return filter.call(elements, callback)\\n }\\n\\n if (window.JSON) $.parseJSON = JSON.parse\\n\\n // Populate the class2type map\\n $.each(\"Boolean Number String Function Array Date RegExp Object Error\".split(\" \"), function(i, name) {\\n class2type[ \"[object \" + name + \"]\" ] = name.toLowerCase()\\n })\\n\\n // Define methods that will be available on all\\n // Zepto collections\\n $.fn = {\\n constructor: zepto.Z,\\n length: 0,\\n\\n // Because a collection acts like an array\\n // copy over these useful array functions.\\n forEach: emptyArray.forEach,\\n reduce: emptyArray.reduce,\\n push: emptyArray.push,\\n sort: emptyArray.sort,\\n splice: emptyArray.splice,\\n indexOf: emptyArray.indexOf,\\n concat: function(){\\n var i, value, args = []\\n for (i = 0; i < arguments.length; i++) {\\n value = arguments[i]\\n args[i] = zepto.isZ(value) ? value.toArray() : value\\n }\\n return concat.apply(zepto.isZ(this) ? this.toArray() : this, args)\\n },\\n\\n // `map` and `slice` in the jQuery API work differently\\n // from their array counterparts\\n map: function(fn){\\n return $($.map(this, function(el, i){ return fn.call(el, i, el) }))\\n },\\n slice: function(){\\n return $(slice.apply(this, arguments))\\n },\\n\\n ready: function(callback){\\n // need to check if document.body exists for IE as that browser reports\\n // document ready when it hasn\\'t yet created the body element\\n if (readyRE.test(document.readyState) && document.body) callback($)\\n else document.addEventListener(\\'DOMContentLoaded\\', function(){ callback($) }, false)\\n return this\\n },\\n get: function(idx){\\n return idx === undefined ? slice.call(this) : this[idx >= 0 ? idx : idx + this.length]\\n },\\n toArray: function(){ return this.get() },\\n size: function(){\\n return this.length\\n },\\n remove: function(){\\n return this.each(function(){\\n if (this.parentNode != null)\\n this.parentNode.removeChild(this)\\n })\\n },\\n each: function(callback){\\n emptyArray.every.call(this, function(el, idx){\\n return callback.call(el, idx, el) !== false\\n })\\n return this\\n },\\n filter: function(selector){\\n if (isFunction(selector)) return this.not(this.not(selector))\\n return $(filter.call(this, function(element){\\n return zepto.matches(element, selector)\\n }))\\n },\\n add: function(selector,context){\\n return $(uniq(this.concat($(selector,context))))\\n },\\n is: function(selector){\\n return this.length > 0 && zepto.matches(this[0], selector)\\n },\\n not: function(selector){\\n var nodes=[]\\n if (isFunction(selector) && selector.call !== undefined)\\n this.each(function(idx){\\n if (!selector.call(this,idx)) nodes.push(this)\\n })\\n else {\\n var excludes = typeof selector == \\'string\\' ? this.filter(selector) :\\n (likeArray(selector) && isFunction(selector.item)) ? slice.call(selector) : $(selector)\\n this.forEach(function(el){\\n if (excludes.indexOf(el) < 0) nodes.push(el)\\n })\\n }\\n return $(nodes)\\n },\\n has: function(selector){\\n return this.filter(function(){\\n return isObject(selector) ?\\n $.contains(this, selector) :\\n $(this).find(selector).size()\\n })\\n },\\n eq: function(idx){\\n return idx === -1 ? this.slice(idx) : this.slice(idx, + idx + 1)\\n },\\n first: function(){\\n var el = this[0]\\n return el && !isObject(el) ? el : $(el)\\n },\\n last: function(){\\n var el = this[this.length - 1]\\n return el && !isObject(el) ? el : $(el)\\n },\\n find: function(selector){\\n var result, $this = this\\n if (!selector) result = $()\\n else if (typeof selector == \\'object\\')\\n result = $(selector).filter(function(){\\n var node = this\\n return emptyArray.some.call($this, function(parent){\\n return $.contains(parent, node)\\n })\\n })\\n else if (this.length == 1) result = $(zepto.qsa(this[0], selector))\\n else result = this.map(function(){ return zepto.qsa(this, selector) })\\n return result\\n },\\n closest: function(selector, context){\\n var nodes = [], collection = typeof selector == \\'object\\' && $(selector)\\n this.each(function(_, node){\\n while (node && !(collection ? collection.indexOf(node) >= 0 : zepto.matches(node, selector)))\\n node = node !== context && !isDocument(node) && node.parentNode\\n if (node && nodes.indexOf(node) < 0) nodes.push(node)\\n })\\n return $(nodes)\\n },\\n parents: function(selector){\\n var ancestors = [], nodes = this\\n while (nodes.length > 0)\\n nodes = $.map(nodes, function(node){\\n if ((node = node.parentNode) && !isDocument(node) && ancestors.indexOf(node) < 0) {\\n ancestors.push(node)\\n return node\\n }\\n })\\n return filtered(ancestors, selector)\\n },\\n parent: function(selector){\\n return filtered(uniq(this.pluck(\\'parentNode\\')), selector)\\n },\\n children: function(selector){\\n return filtered(this.map(function(){ return children(this) }), selector)\\n },\\n contents: function() {\\n return this.map(function() { return this.contentDocument || slice.call(this.childNodes) })\\n },\\n siblings: function(selector){\\n return filtered(this.map(function(i, el){\\n return filter.call(children(el.parentNode), function(child){ return child!==el })\\n }), selector)\\n },\\n empty: function(){\\n return this.each(function(){ this.innerHTML = \\'\\' })\\n },\\n // `pluck` is borrowed from Prototype.js\\n pluck: function(property){\\n return $.map(this, function(el){ return el[property] })\\n },\\n show: function(){\\n return this.each(function(){\\n this.style.display == \"none\" && (this.style.display = \\'\\')\\n if (getComputedStyle(this, \\'\\').getPropertyValue(\"display\") == \"none\")\\n this.style.display = defaultDisplay(this.nodeName)\\n })\\n },\\n replaceWith: function(newContent){\\n return this.before(newContent).remove()\\n },\\n wrap: function(structure){\\n var func = isFunction(structure)\\n if (this[0] && !func)\\n var dom = $(structure).get(0),\\n clone = dom.parentNode || this.length > 1\\n\\n return this.each(function(index){\\n $(this).wrapAll(\\n func ? structure.call(this, index) :\\n clone ? dom.cloneNode(true) : dom\\n )\\n })\\n },\\n wrapAll: function(structure){\\n if (this[0]) {\\n $(this[0]).before(structure = $(structure))\\n var children\\n // drill down to the inmost element\\n while ((children = structure.children()).length) structure = children.first()\\n $(structure).append(this)\\n }\\n return this\\n },\\n wrapInner: function(structure){\\n var func = isFunction(structure)\\n return this.each(function(index){\\n var self = $(this), contents = self.contents(),\\n dom = func ? structure.call(this, index) : structure\\n contents.length ? contents.wrapAll(dom) : self.append(dom)\\n })\\n },\\n unwrap: function(){\\n this.parent().each(function(){\\n $(this).replaceWith($(this).children())\\n })\\n return this\\n },\\n clone: function(){\\n return this.map(function(){ return this.cloneNode(true) })\\n },\\n hide: function(){\\n return this.css(\"display\", \"none\")\\n },\\n toggle: function(setting){\\n return this.each(function(){\\n var el = $(this)\\n ;(setting === undefined ? el.css(\"display\") == \"none\" : setting) ? el.show() : el.hide()\\n })\\n },\\n prev: function(selector){ return $(this.pluck(\\'previousElementSibling\\')).filter(selector || \\'*\\') },\\n next: function(selector){ return $(this.pluck(\\'nextElementSibling\\')).filter(selector || \\'*\\') },\\n html: function(html){\\n return 0 in arguments ?\\n this.each(function(idx){\\n var originHtml = this.innerHTML\\n $(this).empty().append( funcArg(this, html, idx, originHtml) )\\n }) :\\n (0 in this ? this[0].innerHTML : null)\\n },\\n text: function(text){\\n return 0 in arguments ?\\n this.each(function(idx){\\n var newText = funcArg(this, text, idx, this.textContent)\\n this.textContent = newText == null ? \\'\\' : \\'\\'+newText\\n }) :\\n (0 in this ? this.pluck(\\'textContent\\').join(\"\") : null)\\n },\\n attr: function(name, value){\\n var result\\n return (typeof name == \\'string\\' && !(1 in arguments)) ?\\n (0 in this && this[0].nodeType == 1 && (result = this[0].getAttribute(name)) != null ? result : undefined) :\\n this.each(function(idx){\\n if (this.nodeType !== 1) return\\n if (isObject(name)) for (key in name) setAttribute(this, key, name[key])\\n else setAttribute(this, name, funcArg(this, value, idx, this.getAttribute(name)))\\n })\\n },\\n removeAttr: function(name){\\n return this.each(function(){ this.nodeType === 1 && name.split(\\' \\').forEach(function(attribute){\\n setAttribute(this, attribute)\\n }, this)})\\n },\\n prop: function(name, value){\\n name = propMap[name] || name\\n return (1 in arguments) ?\\n this.each(function(idx){\\n this[name] = funcArg(this, value, idx, this[name])\\n }) :\\n (this[0] && this[0][name])\\n },\\n removeProp: function(name){\\n name = propMap[name] || name\\n return this.each(function(){ delete this[name] })\\n },\\n data: function(name, value){\\n var attrName = \\'data-\\' + name.replace(capitalRE, \\'-$1\\').toLowerCase()\\n\\n var data = (1 in arguments) ?\\n this.attr(attrName, value) :\\n this.attr(attrName)\\n\\n return data !== null ? deserializeValue(data) : undefined\\n },\\n val: function(value){\\n if (0 in arguments) {\\n if (value == null) value = \"\"\\n return this.each(function(idx){\\n this.value = funcArg(this, value, idx, this.value)\\n })\\n } else {\\n return this[0] && (this[0].multiple ?\\n $(this[0]).find(\\'option\\').filter(function(){ return this.selected }).pluck(\\'value\\') :\\n this[0].value)\\n }\\n },\\n offset: function(coordinates){\\n if (coordinates) return this.each(function(index){\\n var $this = $(this),\\n coords = funcArg(this, coordinates, index, $this.offset()),\\n parentOffset = $this.offsetParent().offset(),\\n props = {\\n top: coords.top - parentOffset.top,\\n left: coords.left - parentOffset.left\\n }\\n\\n if ($this.css(\\'position\\') == \\'static\\') props[\\'position\\'] = \\'relative\\'\\n $this.css(props)\\n })\\n if (!this.length) return null\\n if (document.documentElement !== this[0] && !$.contains(document.documentElement, this[0]))\\n return {top: 0, left: 0}\\n var obj = this[0].getBoundingClientRect()\\n return {\\n left: obj.left + window.pageXOffset,\\n top: obj.top + window.pageYOffset,\\n width: Math.round(obj.width),\\n height: Math.round(obj.height)\\n }\\n },\\n css: function(property, value){\\n if (arguments.length < 2) {\\n var element = this[0]\\n if (typeof property == \\'string\\') {\\n if (!element) return\\n return element.style[camelize(property)] || getComputedStyle(element, \\'\\').getPropertyValue(property)\\n } else if (isArray(property)) {\\n if (!element) return\\n var props = {}\\n var computedStyle = getComputedStyle(element, \\'\\')\\n $.each(property, function(_, prop){\\n props[prop] = (element.style[camelize(prop)] || computedStyle.getPropertyValue(prop))\\n })\\n return props\\n }\\n }\\n\\n var css = \\'\\'\\n if (type(property) == \\'string\\') {\\n if (!value && value !== 0)\\n this.each(function(){ this.style.removeProperty(dasherize(property)) })\\n else\\n css = dasherize(property) + \":\" + maybeAddPx(property, value)\\n } else {\\n for (key in property)\\n if (!property[key] && property[key] !== 0)\\n this.each(function(){ this.style.removeProperty(dasherize(key)) })\\n else\\n css += dasherize(key) + \\':\\' + maybeAddPx(key, property[key]) + \\';\\'\\n }\\n\\n return this.each(function(){ this.style.cssText += \\';\\' + css })\\n },\\n index: function(element){\\n return element ? this.indexOf($(element)[0]) : this.parent().children().indexOf(this[0])\\n },\\n hasClass: function(name){\\n if (!name) return false\\n return emptyArray.some.call(this, function(el){\\n return this.test(className(el))\\n }, classRE(name))\\n },\\n addClass: function(name){\\n if (!name) return this\\n return this.each(function(idx){\\n if (!(\\'className\\' in this)) return\\n classList = []\\n var cls = className(this), newName = funcArg(this, name, idx, cls)\\n newName.split(/\\\\s+/g).forEach(function(klass){\\n if (!$(this).hasClass(klass)) classList.push(klass)\\n }, this)\\n classList.length && className(this, cls + (cls ? \" \" : \"\") + classList.join(\" \"))\\n })\\n },\\n removeClass: function(name){\\n return this.each(function(idx){\\n if (!(\\'className\\' in this)) return\\n if (name === undefined) return className(this, \\'\\')\\n classList = className(this)\\n funcArg(this, name, idx, classList).split(/\\\\s+/g).forEach(function(klass){\\n classList = classList.replace(classRE(klass), \" \")\\n })\\n className(this, classList.trim())\\n })\\n },\\n toggleClass: function(name, when){\\n if (!name) return this\\n return this.each(function(idx){\\n var $this = $(this), names = funcArg(this, name, idx, className(this))\\n names.split(/\\\\s+/g).forEach(function(klass){\\n (when === undefined ? !$this.hasClass(klass) : when) ?\\n $this.addClass(klass) : $this.removeClass(klass)\\n })\\n })\\n },\\n scrollTop: function(value){\\n if (!this.length) return\\n var hasScrollTop = \\'scrollTop\\' in this[0]\\n if (value === undefined) return hasScrollTop ? this[0].scrollTop : this[0].pageYOffset\\n return this.each(hasScrollTop ?\\n function(){ this.scrollTop = value } :\\n function(){ this.scrollTo(this.scrollX, value) })\\n },\\n scrollLeft: function(value){\\n if (!this.length) return\\n var hasScrollLeft = \\'scrollLeft\\' in this[0]\\n if (value === undefined) return hasScrollLeft ? this[0].scrollLeft : this[0].pageXOffset\\n return this.each(hasScrollLeft ?\\n function(){ this.scrollLeft = value } :\\n function(){ this.scrollTo(value, this.scrollY) })\\n },\\n position: function() {\\n if (!this.length) return\\n\\n var elem = this[0],\\n // Get *real* offsetParent\\n offsetParent = this.offsetParent(),\\n // Get correct offsets\\n offset = this.offset(),\\n parentOffset = rootNodeRE.test(offsetParent[0].nodeName) ? { top: 0, left: 0 } : offsetParent.offset()\\n\\n // Subtract element margins\\n // note: when an element has margin: auto the offsetLeft and marginLeft\\n // are the same in Safari causing offset.left to incorrectly be 0\\n offset.top -= parseFloat( $(elem).css(\\'margin-top\\') ) || 0\\n offset.left -= parseFloat( $(elem).css(\\'margin-left\\') ) || 0\\n\\n // Add offsetParent borders\\n parentOffset.top += parseFloat( $(offsetParent[0]).css(\\'border-top-width\\') ) || 0\\n parentOffset.left += parseFloat( $(offsetParent[0]).css(\\'border-left-width\\') ) || 0\\n\\n // Subtract the two offsets\\n return {\\n top: offset.top - parentOffset.top,\\n left: offset.left - parentOffset.left\\n }\\n },\\n offsetParent: function() {\\n return this.map(function(){\\n var parent = this.offsetParent || document.body\\n while (parent && !rootNodeRE.test(parent.nodeName) && $(parent).css(\"position\") == \"static\")\\n parent = parent.offsetParent\\n return parent\\n })\\n }\\n }\\n\\n // for now\\n $.fn.detach = $.fn.remove\\n\\n // Generate the `width` and `height` functions\\n ;[\\'width\\', \\'height\\'].forEach(function(dimension){\\n var dimensionProperty =\\n dimension.replace(/./, function(m){ return m[0].toUpperCase() })\\n\\n $.fn[dimension] = function(value){\\n var offset, el = this[0]\\n if (value === undefined) return isWindow(el) ? el[\\'inner\\' + dimensionProperty] :\\n isDocument(el) ? el.documentElement[\\'scroll\\' + dimensionProperty] :\\n (offset = this.offset()) && offset[dimension]\\n else return this.each(function(idx){\\n el = $(this)\\n el.css(dimension, funcArg(this, value, idx, el[dimension]()))\\n })\\n }\\n })\\n\\n function traverseNode(node, fun) {\\n fun(node)\\n for (var i = 0, len = node.childNodes.length; i < len; i++)\\n traverseNode(node.childNodes[i], fun)\\n }\\n\\n // Generate the `after`, `prepend`, `before`, `append`,\\n // `insertAfter`, `insertBefore`, `appendTo`, and `prependTo` methods.\\n adjacencyOperators.forEach(function(operator, operatorIndex) {\\n var inside = operatorIndex % 2 //=> prepend, append\\n\\n $.fn[operator] = function(){\\n // arguments can be nodes, arrays of nodes, Zepto objects and HTML strings\\n var argType, nodes = $.map(arguments, function(arg) {\\n var arr = []\\n argType = type(arg)\\n if (argType == \"array\") {\\n arg.forEach(function(el) {\\n if (el.nodeType !== undefined) return arr.push(el)\\n else if ($.zepto.isZ(el)) return arr = arr.concat(el.get())\\n arr = arr.concat(zepto.fragment(el))\\n })\\n return arr\\n }\\n return argType == \"object\" || arg == null ?\\n arg : zepto.fragment(arg)\\n }),\\n parent, copyByClone = this.length > 1\\n if (nodes.length < 1) return this\\n\\n return this.each(function(_, target){\\n parent = inside ? target : target.parentNode\\n\\n // convert all methods to a \"before\" operation\\n target = operatorIndex == 0 ? target.nextSibling :\\n operatorIndex == 1 ? target.firstChild :\\n operatorIndex == 2 ? target :\\n null\\n\\n var parentInDocument = $.contains(document.documentElement, parent)\\n\\n nodes.forEach(function(node){\\n if (copyByClone) node = node.cloneNode(true)\\n else if (!parent) return $(node).remove()\\n\\n parent.insertBefore(node, target)\\n if (parentInDocument) traverseNode(node, function(el){\\n if (el.nodeName != null && el.nodeName.toUpperCase() === \\'SCRIPT\\' &&\\n (!el.type || el.type === \\'text/javascript\\') && !el.src){\\n var target = el.ownerDocument ? el.ownerDocument.defaultView : window\\n target[\\'eval\\'].call(target, el.innerHTML)\\n }\\n })\\n })\\n })\\n }\\n\\n // after => insertAfter\\n // prepend => prependTo\\n // before => insertBefore\\n // append => appendTo\\n $.fn[inside ? operator+\\'To\\' : \\'insert\\'+(operatorIndex ? \\'Before\\' : \\'After\\')] = function(html){\\n $(html)[operator](this)\\n return this\\n }\\n })\\n\\n zepto.Z.prototype = Z.prototype = $.fn\\n\\n // Export internal API functions in the `$.zepto` namespace\\n zepto.uniq = uniq\\n zepto.deserializeValue = deserializeValue\\n $.zepto = zepto\\n\\n return $\\n})()\\n\\nwindow.Zepto = Zepto\\nwindow.$ === undefined && (window.$ = Zepto)\\n\\n;(function($){\\n var _zid = 1, undefined,\\n slice = Array.prototype.slice,\\n isFunction = $.isFunction,\\n isString = function(obj){ return typeof obj == \\'string\\' },\\n handlers = {},\\n specialEvents={},\\n focusinSupported = \\'onfocusin\\' in window,\\n focus = { focus: \\'focusin\\', blur: \\'focusout\\' },\\n hover = { mouseenter: \\'mouseover\\', mouseleave: \\'mouseout\\' }\\n\\n specialEvents.click = specialEvents.mousedown = specialEvents.mouseup = specialEvents.mousemove = \\'MouseEvents\\'\\n\\n function zid(element) {\\n return element._zid || (element._zid = _zid++)\\n }\\n function findHandlers(element, event, fn, selector) {\\n event = parse(event)\\n if (event.ns) var matcher = matcherFor(event.ns)\\n return (handlers[zid(element)] || []).filter(function(handler) {\\n return handler\\n && (!event.e || handler.e == event.e)\\n && (!event.ns || matcher.test(handler.ns))\\n && (!fn || zid(handler.fn) === zid(fn))\\n && (!selector || handler.sel == selector)\\n })\\n }\\n function parse(event) {\\n var parts = (\\'\\' + event).split(\\'.\\')\\n return {e: parts[0], ns: parts.slice(1).sort().join(\\' \\')}\\n }\\n function matcherFor(ns) {\\n return new RegExp(\\'(?:^| )\\' + ns.replace(\\' \\', \\' .* ?\\') + \\'(?: |$)\\')\\n }\\n\\n function eventCapture(handler, captureSetting) {\\n return handler.del &&\\n (!focusinSupported && (handler.e in focus)) ||\\n !!captureSetting\\n }\\n\\n function realEvent(type) {\\n return hover[type] || (focusinSupported && focus[type]) || type\\n }\\n\\n function add(element, events, fn, data, selector, delegator, capture){\\n var id = zid(element), set = (handlers[id] || (handlers[id] = []))\\n events.split(/\\\\s/).forEach(function(event){\\n if (event == \\'ready\\') return $(document).ready(fn)\\n var handler = parse(event)\\n handler.fn = fn\\n handler.sel = selector\\n // emulate mouseenter, mouseleave\\n if (handler.e in hover) fn = function(e){\\n var related = e.relatedTarget\\n if (!related || (related !== this && !$.contains(this, related)))\\n return handler.fn.apply(this, arguments)\\n }\\n handler.del = delegator\\n var callback = delegator || fn\\n handler.proxy = function(e){\\n e = compatible(e)\\n if (e.isImmediatePropagationStopped()) return\\n e.data = data\\n var result = callback.apply(element, e._args == undefined ? [e] : [e].concat(e._args))\\n if (result === false) e.preventDefault(), e.stopPropagation()\\n return result\\n }\\n handler.i = set.length\\n set.push(handler)\\n if (\\'addEventListener\\' in element)\\n element.addEventListener(realEvent(handler.e), handler.proxy, eventCapture(handler, capture))\\n })\\n }\\n function remove(element, events, fn, selector, capture){\\n var id = zid(element)\\n ;(events || \\'\\').split(/\\\\s/).forEach(function(event){\\n findHandlers(element, event, fn, selector).forEach(function(handler){\\n delete handlers[id][handler.i]\\n if (\\'removeEventListener\\' in element)\\n element.removeEventListener(realEvent(handler.e), handler.proxy, eventCapture(handler, capture))\\n })\\n })\\n }\\n\\n $.event = { add: add, remove: remove }\\n\\n $.proxy = function(fn, context) {\\n var args = (2 in arguments) && slice.call(arguments, 2)\\n if (isFunction(fn)) {\\n var proxyFn = function(){ return fn.apply(context, args ? args.concat(slice.call(arguments)) : arguments) }\\n proxyFn._zid = zid(fn)\\n return proxyFn\\n } else if (isString(context)) {\\n if (args) {\\n args.unshift(fn[context], fn)\\n return $.proxy.apply(null, args)\\n } else {\\n return $.proxy(fn[context], fn)\\n }\\n } else {\\n throw new TypeError(\"expected function\")\\n }\\n }\\n\\n $.fn.bind = function(event, data, callback){\\n return this.on(event, data, callback)\\n }\\n $.fn.unbind = function(event, callback){\\n return this.off(event, callback)\\n }\\n $.fn.one = function(event, selector, data, callback){\\n return this.on(event, selector, data, callback, 1)\\n }\\n\\n var returnTrue = function(){return true},\\n returnFalse = function(){return false},\\n ignoreProperties = /^([A-Z]|returnValue$|layer[XY]$|webkitMovement[XY]$)/,\\n eventMethods = {\\n preventDefault: \\'isDefaultPrevented\\',\\n stopImmediatePropagation: \\'isImmediatePropagationStopped\\',\\n stopPropagation: \\'isPropagationStopped\\'\\n }\\n\\n function compatible(event, source) {\\n if (source || !event.isDefaultPrevented) {\\n source || (source = event)\\n\\n $.each(eventMethods, function(name, predicate) {\\n var sourceMethod = source[name]\\n event[name] = function(){\\n this[predicate] = returnTrue\\n return sourceMethod && sourceMethod.apply(source, arguments)\\n }\\n event[predicate] = returnFalse\\n })\\n\\n event.timeStamp || (event.timeStamp = Date.now())\\n\\n if (source.defaultPrevented !== undefined ? source.defaultPrevented :\\n \\'returnValue\\' in source ? source.returnValue === false :\\n source.getPreventDefault && source.getPreventDefault())\\n event.isDefaultPrevented = returnTrue\\n }\\n return event\\n }\\n\\n function createProxy(event) {\\n var key, proxy = { originalEvent: event }\\n for (key in event)\\n if (!ignoreProperties.test(key) && event[key] !== undefined) proxy[key] = event[key]\\n\\n return compatible(proxy, event)\\n }\\n\\n $.fn.delegate = function(selector, event, callback){\\n return this.on(event, selector, callback)\\n }\\n $.fn.undelegate = function(selector, event, callback){\\n return this.off(event, selector, callback)\\n }\\n\\n $.fn.live = function(event, callback){\\n $(document.body).delegate(this.selector, event, callback)\\n return this\\n }\\n $.fn.die = function(event, callback){\\n $(document.body).undelegate(this.selector, event, callback)\\n return this\\n }\\n\\n $.fn.on = function(event, selector, data, callback, one){\\n var autoRemove, delegator, $this = this\\n if (event && !isString(event)) {\\n $.each(event, function(type, fn){\\n $this.on(type, selector, data, fn, one)\\n })\\n return $this\\n }\\n\\n if (!isString(selector) && !isFunction(callback) && callback !== false)\\n callback = data, data = selector, selector = undefined\\n if (callback === undefined || data === false)\\n callback = data, data = undefined\\n\\n if (callback === false) callback = returnFalse\\n\\n return $this.each(function(_, element){\\n if (one) autoRemove = function(e){\\n remove(element, e.type, callback)\\n return callback.apply(this, arguments)\\n }\\n\\n if (selector) delegator = function(e){\\n var evt, match = $(e.target).closest(selector, element).get(0)\\n if (match && match !== element) {\\n evt = $.extend(createProxy(e), {currentTarget: match, liveFired: element})\\n return (autoRemove || callback).apply(match, [evt].concat(slice.call(arguments, 1)))\\n }\\n }\\n\\n add(element, event, callback, data, selector, delegator || autoRemove)\\n })\\n }\\n $.fn.off = function(event, selector, callback){\\n var $this = this\\n if (event && !isString(event)) {\\n $.each(event, function(type, fn){\\n $this.off(type, selector, fn)\\n })\\n return $this\\n }\\n\\n if (!isString(selector) && !isFunction(callback) && callback !== false)\\n callback = selector, selector = undefined\\n\\n if (callback === false) callback = returnFalse\\n\\n return $this.each(function(){\\n remove(this, event, callback, selector)\\n })\\n }\\n\\n $.fn.trigger = function(event, args){\\n event = (isString(event) || $.isPlainObject(event)) ? $.Event(event) : compatible(event)\\n event._args = args\\n return this.each(function(){\\n // handle focus(), blur() by calling them directly\\n if (event.type in focus && typeof this[event.type] == \"function\") this[event.type]()\\n // items in the collection might not be DOM elements\\n else if (\\'dispatchEvent\\' in this) this.dispatchEvent(event)\\n else $(this).triggerHandler(event, args)\\n })\\n }\\n\\n // triggers event handlers on current element just as if an event occurred,\\n // doesn\\'t trigger an actual event, doesn\\'t bubble\\n $.fn.triggerHandler = function(event, args){\\n var e, result\\n this.each(function(i, element){\\n e = createProxy(isString(event) ? $.Event(event) : event)\\n e._args = args\\n e.target = element\\n $.each(findHandlers(element, event.type || event), function(i, handler){\\n result = handler.proxy(e)\\n if (e.isImmediatePropagationStopped()) return false\\n })\\n })\\n return result\\n }\\n\\n // shortcut methods for `.bind(event, fn)` for each event type\\n ;(\\'focusin focusout focus blur load resize scroll unload click dblclick \\'+\\n \\'mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave \\'+\\n \\'change select keydown keypress keyup error\\').split(\\' \\').forEach(function(event) {\\n $.fn[event] = function(callback) {\\n return (0 in arguments) ?\\n this.bind(event, callback) :\\n this.trigger(event)\\n }\\n })\\n\\n $.Event = function(type, props) {\\n if (!isString(type)) props = type, type = props.type\\n var event = document.createEvent(specialEvents[type] || \\'Events\\'), bubbles = true\\n if (props) for (var name in props) (name == \\'bubbles\\') ? (bubbles = !!props[name]) : (event[name] = props[name])\\n event.initEvent(type, bubbles, true)\\n return compatible(event)\\n }\\n\\n})(Zepto)\\n\\n;(function($){\\n var jsonpID = +new Date(),\\n document = window.document,\\n key,\\n name,\\n rscript = /<script\\\\b[^<]*(?:(?!<\\\\/script>)<[^<]*)*<\\\\/script>/gi,\\n scriptTypeRE = /^(?:text|application)\\\\/javascript/i,\\n xmlTypeRE = /^(?:text|application)\\\\/xml/i,\\n jsonType = \\'application/json\\',\\n htmlType = \\'text/html\\',\\n blankRE = /^\\\\s*$/,\\n originAnchor = document.createElement(\\'a\\')\\n\\n originAnchor.href = window.location.href\\n\\n // trigger a custom event and return false if it was cancelled\\n function triggerAndReturn(context, eventName, data) {\\n var event = $.Event(eventName)\\n $(context).trigger(event, data)\\n return !event.isDefaultPrevented()\\n }\\n\\n // trigger an Ajax \"global\" event\\n function triggerGlobal(settings, context, eventName, data) {\\n if (settings.global) return triggerAndReturn(context || document, eventName, data)\\n }\\n\\n // Number of active Ajax requests\\n $.active = 0\\n\\n function ajaxStart(settings) {\\n if (settings.global && $.active++ === 0) triggerGlobal(settings, null, \\'ajaxStart\\')\\n }\\n function ajaxStop(settings) {\\n if (settings.global && !(--$.active)) triggerGlobal(settings, null, \\'ajaxStop\\')\\n }\\n\\n // triggers an extra global event \"ajaxBeforeSend\" that\\'s like \"ajaxSend\" but cancelable\\n function ajaxBeforeSend(xhr, settings) {\\n var context = settings.context\\n if (settings.beforeSend.call(context, xhr, settings) === false ||\\n triggerGlobal(settings, context, \\'ajaxBeforeSend\\', [xhr, settings]) === false)\\n return false\\n\\n triggerGlobal(settings, context, \\'ajaxSend\\', [xhr, settings])\\n }\\n function ajaxSuccess(data, xhr, settings, deferred) {\\n var context = settings.context, status = \\'success\\'\\n settings.success.call(context, data, status, xhr)\\n if (deferred) deferred.resolveWith(context, [data, status, xhr])\\n triggerGlobal(settings, context, \\'ajaxSuccess\\', [xhr, settings, data])\\n ajaxComplete(status, xhr, settings)\\n }\\n // type: \"timeout\", \"error\", \"abort\", \"parsererror\"\\n function ajaxError(error, type, xhr, settings, deferred) {\\n var context = settings.context\\n settings.error.call(context, xhr, type, error)\\n if (deferred) deferred.rejectWith(context, [xhr, type, error])\\n triggerGlobal(settings, context, \\'ajaxError\\', [xhr, settings, error || type])\\n ajaxComplete(type, xhr, settings)\\n }\\n // status: \"success\", \"notmodified\", \"error\", \"timeout\", \"abort\", \"parsererror\"\\n function ajaxComplete(status, xhr, settings) {\\n var context = settings.context\\n settings.complete.call(context, xhr, status)\\n triggerGlobal(settings, context, \\'ajaxComplete\\', [xhr, settings])\\n ajaxStop(settings)\\n }\\n\\n function ajaxDataFilter(data, type, settings) {\\n if (settings.dataFilter == empty) return data\\n var context = settings.context\\n return settings.dataFilter.call(context, data, type)\\n }\\n\\n // Empty function, used as default callback\\n function empty() {}\\n\\n $.ajaxJSONP = function(options, deferred){\\n if (!(\\'type\\' in options)) return $.ajax(options)\\n\\n var _callbackName = options.jsonpCallback,\\n callbackName = ($.isFunction(_callbackName) ?\\n _callbackName() : _callbackName) || (\\'Zepto\\' + (jsonpID++)),\\n script = document.createElement(\\'script\\'),\\n originalCallback = window[callbackName],\\n responseData,\\n abort = function(errorType) {\\n $(script).triggerHandler(\\'error\\', errorType || \\'abort\\')\\n },\\n xhr = { abort: abort }, abortTimeout\\n\\n if (deferred) deferred.promise(xhr)\\n\\n $(script).on(\\'load error\\', function(e, errorType){\\n clearTimeout(abortTimeout)\\n $(script).off().remove()\\n\\n if (e.type == \\'error\\' || !responseData) {\\n ajaxError(null, errorType || \\'error\\', xhr, options, deferred)\\n } else {\\n ajaxSuccess(responseData[0], xhr, options, deferred)\\n }\\n\\n window[callbackName] = originalCallback\\n if (responseData && $.isFunction(originalCallback))\\n originalCallback(responseData[0])\\n\\n originalCallback = responseData = undefined\\n })\\n\\n if (ajaxBeforeSend(xhr, options) === false) {\\n abort(\\'abort\\')\\n return xhr\\n }\\n\\n window[callbackName] = function(){\\n responseData = arguments\\n }\\n\\n script.src = options.url.replace(/\\\\?(.+)=\\\\?/, \\'?$1=\\' + callbackName)\\n document.head.appendChild(script)\\n\\n if (options.timeout > 0) abortTimeout = setTimeout(function(){\\n abort(\\'timeout\\')\\n }, options.timeout)\\n\\n return xhr\\n }\\n\\n $.ajaxSettings = {\\n // Default type of request\\n type: \\'GET\\',\\n // Callback that is executed before request\\n beforeSend: empty,\\n // Callback that is executed if the request succeeds\\n success: empty,\\n // Callback that is executed the the server drops error\\n error: empty,\\n // Callback that is executed on request complete (both: error and success)\\n complete: empty,\\n // The context for the callbacks\\n context: null,\\n // Whether to trigger \"global\" Ajax events\\n global: true,\\n // Transport\\n xhr: function () {\\n return new window.XMLHttpRequest()\\n },\\n // MIME types mapping\\n // IIS returns Javascript as \"application/x-javascript\"\\n accepts: {\\n script: \\'text/javascript, application/javascript, application/x-javascript\\',\\n json: jsonType,\\n xml: \\'application/xml, text/xml\\',\\n html: htmlType,\\n text: \\'text/plain\\'\\n },\\n // Whether the request is to another domain\\n crossDomain: false,\\n // Default timeout\\n timeout: 0,\\n // Whether data should be serialized to string\\n processData: true,\\n // Whether the browser should be allowed to cache GET responses\\n cache: true,\\n //Used to handle the raw response data of XMLHttpRequest.\\n //This is a pre-filtering function to sanitize the response.\\n //The sanitized response should be returned\\n dataFilter: empty\\n }\\n\\n function mimeToDataType(mime) {\\n if (mime) mime = mime.split(\\';\\', 2)[0]\\n return mime && ( mime == htmlType ? \\'html\\' :\\n mime == jsonType ? \\'json\\' :\\n scriptTypeRE.test(mime) ? \\'script\\' :\\n xmlTypeRE.test(mime) && \\'xml\\' ) || \\'text\\'\\n }\\n\\n function appendQuery(url, query) {\\n if (query == \\'\\') return url\\n return (url + \\'&\\' + query).replace(/[&?]{1,2}/, \\'?\\')\\n }\\n\\n // serialize payload and append it to the URL for GET requests\\n function serializeData(options) {\\n if (options.processData && options.data && $.type(options.data) != \"string\")\\n options.data = $.param(options.data, options.traditional)\\n if (options.data && (!options.type || options.type.toUpperCase() == \\'GET\\' || \\'jsonp\\' == options.dataType))\\n options.url = appendQuery(options.url, options.data), options.data = undefined\\n }\\n\\n $.ajax = function(options){\\n var settings = $.extend({}, options || {}),\\n deferred = $.Deferred && $.Deferred(),\\n urlAnchor, hashIndex\\n for (key in $.ajaxSettings) if (settings[key] === undefined) settings[key] = $.ajaxSettings[key]\\n\\n ajaxStart(settings)\\n\\n if (!settings.crossDomain) {\\n urlAnchor = document.createElement(\\'a\\')\\n urlAnchor.href = settings.url\\n // cleans up URL for .href (IE only), see https://github.com/madrobby/zepto/pull/1049\\n urlAnchor.href = urlAnchor.href\\n settings.crossDomain = (originAnchor.protocol + \\'//\\' + originAnchor.host) !== (urlAnchor.protocol + \\'//\\' + urlAnchor.host)\\n }\\n\\n if (!settings.url) settings.url = window.location.toString()\\n if ((hashIndex = settings.url.indexOf(\\'#\\')) > -1) settings.url = settings.url.slice(0, hashIndex)\\n serializeData(settings)\\n\\n var dataType = settings.dataType, hasPlaceholder = /\\\\?.+=\\\\?/.test(settings.url)\\n if (hasPlaceholder) dataType = \\'jsonp\\'\\n\\n if (settings.cache === false || (\\n (!options || options.cache !== true) &&\\n (\\'script\\' == dataType || \\'jsonp\\' == dataType)\\n ))\\n settings.url = appendQuery(settings.url, \\'_=\\' + Date.now())\\n\\n if (\\'jsonp\\' == dataType) {\\n if (!hasPlaceholder)\\n settings.url = appendQuery(settings.url,\\n settings.jsonp ? (settings.jsonp + \\'=?\\') : settings.jsonp === false ? \\'\\' : \\'callback=?\\')\\n return $.ajaxJSONP(settings, deferred)\\n }\\n\\n var mime = settings.accepts[dataType],\\n headers = { },\\n setHeader = function(name, value) { headers[name.toLowerCase()] = [name, value] },\\n protocol = /^([\\\\w-]+:)\\\\/\\\\//.test(settings.url) ? RegExp.$1 : window.location.protocol,\\n xhr = settings.xhr(),\\n nativeSetHeader = xhr.setRequestHeader,\\n abortTimeout\\n\\n if (deferred) deferred.promise(xhr)\\n\\n if (!settings.crossDomain) setHeader(\\'X-Requested-With\\', \\'XMLHttpRequest\\')\\n setHeader(\\'Accept\\', mime || \\'*/*\\')\\n if (mime = settings.mimeType || mime) {\\n if (mime.indexOf(\\',\\') > -1) mime = mime.split(\\',\\', 2)[0]\\n xhr.overrideMimeType && xhr.overrideMimeType(mime)\\n }\\n if (settings.contentType || (settings.contentType !== false && settings.data && settings.type.toUpperCase() != \\'GET\\'))\\n setHeader(\\'Content-Type\\', settings.contentType || \\'application/x-www-form-urlencoded\\')\\n\\n if (settings.headers) for (name in settings.headers) setHeader(name, settings.headers[name])\\n xhr.setRequestHeader = setHeader\\n\\n xhr.onreadystatechange = function(){\\n if (xhr.readyState == 4) {\\n xhr.onreadystatechange = empty\\n clearTimeout(abortTimeout)\\n var result, error = false\\n if ((xhr.status >= 200 && xhr.status < 300) || xhr.status == 304 || (xhr.status == 0 && protocol == \\'file:\\')) {\\n dataType = dataType || mimeToDataType(settings.mimeType || xhr.getResponseHeader(\\'content-type\\'))\\n\\n if (xhr.responseType == \\'arraybuffer\\' || xhr.responseType == \\'blob\\')\\n result = xhr.response\\n else {\\n result = xhr.responseText\\n\\n try {\\n // http://perfectionkills.com/global-eval-what-are-the-options/\\n // sanitize response accordingly if data filter callback provided\\n result = ajaxDataFilter(result, dataType, settings)\\n if (dataType == \\'script\\') (1,eval)(result)\\n else if (dataType == \\'xml\\') result = xhr.responseXML\\n else if (dataType == \\'json\\') result = blankRE.test(result) ? null : $.parseJSON(result)\\n } catch (e) { error = e }\\n\\n if (error) return ajaxError(error, \\'parsererror\\', xhr, settings, deferred)\\n }\\n\\n ajaxSuccess(result, xhr, settings, deferred)\\n } else {\\n ajaxError(xhr.statusText || null, xhr.status ? \\'error\\' : \\'abort\\', xhr, settings, deferred)\\n }\\n }\\n }\\n\\n if (ajaxBeforeSend(xhr, settings) === false) {\\n xhr.abort()\\n ajaxError(null, \\'abort\\', xhr, settings, deferred)\\n return xhr\\n }\\n\\n var async = \\'async\\' in settings ? settings.async : true\\n xhr.open(settings.type, settings.url, async, settings.username, settings.password)\\n\\n if (settings.xhrFields) for (name in settings.xhrFields) xhr[name] = settings.xhrFields[name]\\n\\n for (name in headers) nativeSetHeader.apply(xhr, headers[name])\\n\\n if (settings.timeout > 0) abortTimeout = setTimeout(function(){\\n xhr.onreadystatechange = empty\\n xhr.abort()\\n ajaxError(null, \\'timeout\\', xhr, settings, deferred)\\n }, settings.timeout)\\n\\n // avoid sending empty string (#319)\\n xhr.send(settings.data ? settings.data : null)\\n return xhr\\n }\\n\\n // handle optional data/success arguments\\n function parseArguments(url, data, success, dataType) {\\n if ($.isFunction(data)) dataType = success, success = data, data = undefined\\n if (!$.isFunction(success)) dataType = success, success = undefined\\n return {\\n url: url\\n , data: data\\n , success: success\\n , dataType: dataType\\n }\\n }\\n\\n $.get = function(/* url, data, success, dataType */){\\n return $.ajax(parseArguments.apply(null, arguments))\\n }\\n\\n $.post = function(/* url, data, success, dataType */){\\n var options = parseArguments.apply(null, arguments)\\n options.type = \\'POST\\'\\n return $.ajax(options)\\n }\\n\\n $.getJSON = function(/* url, data, success */){\\n var options = parseArguments.apply(null, arguments)\\n options.dataType = \\'json\\'\\n return $.ajax(options)\\n }\\n\\n $.fn.load = function(url, data, success){\\n if (!this.length) return this\\n var self = this, parts = url.split(/\\\\s/), selector,\\n options = parseArguments(url, data, success),\\n callback = options.success\\n if (parts.length > 1) options.url = parts[0], selector = parts[1]\\n options.success = function(response){\\n self.html(selector ?\\n $(\\'<div>\\').html(response.replace(rscript, \"\")).find(selector)\\n : response)\\n callback && callback.apply(self, arguments)\\n }\\n $.ajax(options)\\n return this\\n }\\n\\n var escape = encodeURIComponent\\n\\n function serialize(params, obj, traditional, scope){\\n var type, array = $.isArray(obj), hash = $.isPlainObject(obj)\\n $.each(obj, function(key, value) {\\n type = $.type(value)\\n if (scope) key = traditional ? scope :\\n scope + \\'[\\' + (hash || type == \\'object\\' || type == \\'array\\' ? key : \\'\\') + \\']\\'\\n // handle data in serializeArray() format\\n if (!scope && array) params.add(value.name, value.value)\\n // recurse into nested objects\\n else if (type == \"array\" || (!traditional && type == \"object\"))\\n serialize(params, value, traditional, key)\\n else params.add(key, value)\\n })\\n }\\n\\n $.param = function(obj, traditional){\\n var params = []\\n params.add = function(key, value) {\\n if ($.isFunction(value)) value = value()\\n if (value == null) value = \"\"\\n this.push(escape(key) + \\'=\\' + escape(value))\\n }\\n serialize(params, obj, traditional)\\n return params.join(\\'&\\').replace(/%20/g, \\'+\\')\\n }\\n})(Zepto)\\n\\n;(function($){\\n $.fn.serializeArray = function() {\\n var name, type, result = [],\\n add = function(value) {\\n if (value.forEach) return value.forEach(add)\\n result.push({ name: name, value: value })\\n }\\n if (this[0]) $.each(this[0].elements, function(_, field){\\n type = field.type, name = field.name\\n if (name && field.nodeName.toLowerCase() != \\'fieldset\\' &&\\n !field.disabled && type != \\'submit\\' && type != \\'reset\\' && type != \\'button\\' && type != \\'file\\' &&\\n ((type != \\'radio\\' && type != \\'checkbox\\') || field.checked))\\n add($(field).val())\\n })\\n return result\\n }\\n\\n $.fn.serialize = function(){\\n var result = []\\n this.serializeArray().forEach(function(elm){\\n result.push(encodeURIComponent(elm.name) + \\'=\\' + encodeURIComponent(elm.value))\\n })\\n return result.join(\\'&\\')\\n }\\n\\n $.fn.submit = function(callback) {\\n if (0 in arguments) this.bind(\\'submit\\', callback)\\n else if (this.length) {\\n var event = $.Event(\\'submit\\')\\n this.eq(0).trigger(event)\\n if (!event.isDefaultPrevented()) this.get(0).submit()\\n }\\n return this\\n }\\n\\n})(Zepto)\\n\\n;(function(){\\n // getComputedStyle shouldn\\'t freak out when called\\n // without a valid element as argument\\n try {\\n getComputedStyle(undefined)\\n } catch(e) {\\n var nativeGetComputedStyle = getComputedStyle\\n window.getComputedStyle = function(element, pseudoElement){\\n try {\\n return nativeGetComputedStyle(element, pseudoElement)\\n } catch(e) {\\n return null\\n }\\n }\\n }\\n})()\\n return Zepto\\n}))\\n'},function(){(function(e){e.expr={\":\":{}},e.support={},e.fn.clone=function(){var t=e();return this.each(function(){t.push(this.cloneNode(!0))}),t},['Left','Top'].forEach(function(t,n){function o(e){return e&&'object'==typeof e&&'setInterval'in e}function i(e){return o(e)?e:!(9!==e.nodeType)&&(e.defaultView||e.parentWindow)}var a='scroll'+t;e.fn[a]=function(t){var o,s;return void 0===t?(o=this[0],!o)?null:(s=i(o),s?'pageXOffset'in s?s[n?'pageYOffset':'pageXOffset']:s.document.documentElement[a]||s.document.body[a]:o[a]):void this.each(function(){if(s=i(this),s){var o=n?e(s).scrollLeft():t,r=n?t:e(s).scrollTop();s.scrollTo(o,r)}else this[a]=t})}}),['width','height'].forEach(function(t){var n=t.replace(/./,function(e){return e[0].toUpperCase()});e.fn['inner'+n]=function(e){var n=this;if(n){var o=n[t]();return{width:['left','right'],height:['top','bottom']}[t].forEach(function(t){o+=parseInt(n.css('padding-'+t),10),e&&(o+=parseInt(n.css('margin-'+t),10))}),o}return null},e.fn['outer'+n]=function(e){var n=this;if(n){var o=n[t]();return{width:['left','right'],height:['top','bottom']}[t].forEach(function(t){e&&(o+=parseInt(n.css('margin-'+t),10))}),o}return null}}),e.proxy=function(t,n){if('string'==typeof n){var o=t[n];n=t,t=o}if(e.isFunction(t)){var i=Array.prototype.slice.call(arguments,2),a=function(){return t.apply(n,i.concat(Array.prototype.slice.call(arguments)))};return a.guid=t.guid=t.guid||a.guid||e.guid++,a}};var t=String.prototype.trim;e.trim=function(e,n){return!n&&t?t.call(e):(n=defaultToWhiteSpace(n),e.replace(new RegExp('^['+n+']+|['+n+']+$','g'),''))};var n=/^t(?:able|d|h)$/i,o=/^(?:body|html)$/i;e.fn.position=function(){if(!this[0])return null;var t=this[0],n=this.offsetParent(),i=this.offset(),a=o.test(n[0].nodeName)?{top:0,left:0}:n.offset();return i.top-=parseFloat(e(t).css('margin-top'))||0,i.left-=parseFloat(e(t).css('margin-left'))||0,a.top+=parseFloat(e(n[0]).css('border-top-width'))||0,a.left+=parseFloat(e(n[0]).css('border-left-width'))||0,{top:i.top-a.top,left:i.left-a.left}},e.fn.offsetParent=function(){var t=e();return this.each(function(){for(var n=this.offsetParent||document.body;n&&!o.test(n.nodeName)&&'static'===e(n).css('position');)n=n.offsetParent;t.push(n)}),t}})(Zepto)}])});\n//# sourceMappingURL=goldenlayout.js.map","import GoldenLayout from \"./golden/js/goldenlayout.js\";\r\n\r\nvar config = {\r\n settings: {\r\n showPopoutIcon: false,\r\n showCloseIcon: false\r\n },\r\n dimensions: {\r\n minItemHeight: 40\r\n },\r\n content: [\r\n {\r\n type: \"row\",\r\n content: [\r\n {\r\n type: \"column\",\r\n width: 40,\r\n content: [\r\n {\r\n type: \"component\",\r\n componentName: \"template\",\r\n title: \"Game\",\r\n componentState: { id: \"client_wrapper\" }\r\n },\r\n {\r\n type: \"component\",\r\n title: \"Miscellaneous\",\r\n height: 5,\r\n componentName: \"template\",\r\n componentState: { id: \"misc\" }\r\n },\r\n ]\r\n },\r\n {\r\n type: \"column\",\r\n content: [\r\n {\r\n type: \"stack\",\r\n height: 60,\r\n content: [\r\n {\r\n type: \"component\",\r\n title: \"Server chat\",\r\n componentName: \"template\",\r\n componentState: { id: \"ooc\" }\r\n },\r\n {\r\n type: \"component\",\r\n title: \"Log\",\r\n componentName: \"template\",\r\n componentState: { id: \"log\" }\r\n }\r\n ]\r\n },\r\n {\r\n type: \"row\",\r\n content: [\r\n {\r\n type: \"component\",\r\n title: \"Music\",\r\n componentName: \"template\",\r\n componentState: { id: \"music\" }\r\n },\r\n {\r\n type: \"stack\",\r\n content: [\r\n {\r\n type: \"component\",\r\n title: \"Settings\",\r\n componentName: \"template\",\r\n componentState: { id: \"client_settings\" }\r\n },\r\n {\r\n type: \"component\",\r\n title: \"About\",\r\n componentName: \"template\",\r\n componentState: { id: \"about\" }\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n ]\r\n }]\r\n};\r\n\r\nvar golden = new GoldenLayout(config);\r\ngolden.registerComponent(\"template\", function(container, componentState) {\r\n let template = document.querySelector(`#${componentState.id}`);\r\n container.getElement().html(template.content);\r\n // TODO: support multiple locales\r\n // container.setTitle(document.querySelector(`#${componentState.id} meta[name='frame-title']`).getAttribute(\"content\"));\r\n});\r\ngolden.init();"],"sourceRoot":""} \ No newline at end of file