!functione(t,r,n){functiono(i,s){if(!r[i]){if(!t[i]){varc="function"==typeofrequire&&require;if(!s&&c)returnc(i,!0);if(a)returna(i,!0);varu=newError("Cannot find module '"+i+"'");throwu.code="MODULE_NOT_FOUND",u}varl=r[i]={exports:{}};t[i][0].call(l.exports,function(e){varr=t[i][1][e];returno(r?r:e)},l,l.exports,e,t,r,n)}returnr[i].exports}for(vara="function"==typeofrequire&&require,i=0;i<n.length;i++)o(n[i]);returno}({1:[function(e,t,r){"use strict";varn=$,o=n.extend,a={lastFileUsed:"",files:{}},i=function(e){if(!e)throw"Missing file name"};t.exports={getCachedFile:function(e){returni(e),a.files[e]},updateCachedFile:function(e,t){i(e),a.files[e]||(a.files[e]={}),o(a.files[e],t)},getLastFileUsed:function(){returna.lastFileUsed},setLastFileUsed:function(e){a.lastFileUsed=e}}},{}],2:[function(e,t,r){"use strict";varn=e("../editor"),o=e("../tracer_manager"),a=e("../dom/setup"),i=e("../dom/loading_slider"),s=i.showLoadingSlider,c=i.hideLoadingSlider,u=e("./cache"),l={isLoading:null,editor:null,tracerManager:null,categories:null,loadedScratch:null,wikiList:null},f=function(e){l.isLoading=!1,l.editor=newn(e),l.tracerManager=e,l.categories={},l.loadedScratch=null,l.wikiList=[]},p=function(){this.getIsLoading=function(){returnl.isLoading},this.setIsLoading=function(e){l.isLoading=e,e?s():c()},this.getEditor=function(){returnl.editor},this.getCategories=function(){returnl.categories},this.getCategory=function(e){returnl.categories[e]},this.setCategories=function(e){l.categories=e},this.updateCategory=function(e,t){$.extend(l.categories[e],t)},this.getTracerManager=function(){returnl.tracerManager},this.getLoadedScratch=function(){returnl.loadedScratch},this.setLoadedScratch=function(e){l.loadedScratch=e},this.getWikiList=function(){returnl.wikiList},this.setWikiList=function(e){l.wikiList=e},this.hasWiki=function(e){return~l.wikiList.indexOf(e)};vare=o.init();f(e),a.setup(e)};p.prototype=u,t.exports=p},{"../dom/loading_slider":9,"../dom/setup":12,"../editor":31,"../tracer_manager":67,"./cache":1}],3:[function(e,t,r){"use strict";t.exports={}},{}],4:[function(e,t,r){"use strict";varn=e("../app"),o=e("../server"),a=e("./show_algorithm"),i=$,s=i.each,c=function(e,t,r){return$('<button class="indent">').append(t[r]).attr("data-algorithm",r).attr("data-category",e).click(function(){o.loadAlgorithm(e,r).then(function(t){a(e,r,t)})})},u=function(e){vart=n.getCategory(e),r=t.name,o=t.list,a=$('<button class="category">').append('<i class="fa fa-fw fa-caret-right">').append(r).attr("data-category",e);a.click(function(){vare=$(this);e.toggleClass("open"),e.find("i.fa").toggleClass("fa-caret-right fa-caret-down"),e.next().toggle(300)});vari=$('<div class="algorithms collapse">');$("#list").append(a).append(i),s(o,function(t){varr=c(e,o,t);i.append(r)})};t.exports=function(){s(n.getCategories(),u)}},{"../app":3,"../server":59,"./show_algorithm":22}],5:[function(e,t,r){"use strict";varn=e("../server"),o=$,a=o.each,i=function(e,t,r,o){vara=$("<button>").append(r).attr("data-file",r).click(function(){n.loadFile(e,t,r,o),$(".files_bar > .wrapper > button").removeClass("active"),$(this).addClass("active")});return$(".files_bar > .wrapper").append(a),a};t.exports=function(e,t,r,n){$(".files_bar > .wrapper").empty(),a(r,function(r,o){vara=i(e,t,r,o);n&&n==r&&a.click()}),n||$(".files_bar > .wrapper > button").first().click(),$(".files_bar > .wrapper").scroll()}},{"../server":59}],6:[function(e,t,r){"use strict";t.exports=function(){vare=null,t=null,r=["requestFullscreen","webkitRequestFullscreen","mozRequestFullScreen","msRequestFullscreen"],n=["exitFullscreen","webkitExitFullscreen","mozCancelFullScreen","msExitFullscreen"],o=!0,a=!1,i=void0;try{for(vars,c=r[Symbol.iterator]();!(o=(s=c.next()).done);o=!0){varu=s.value;document.body[u]&&(e=u)}}catch(l){a=!0,i=l}finally{try{!o&&c["return"]&&c["return"]()}finally{if(a)throwi}}varf=!0,p=!1,h=void0;try{for(vard,v=n[Symbol.iterator]();!(f=(d=v.next()).done);f=!0){varg=d.value;document[g]&&(t=g)}}catch(l){p=!0,h=l}finally{try{!f&&v["return"]&&v["return"]()}finally{if(p)throwh}}vary=$("#btn_fullscreen");y.click(function(){document.fullScreen||document.mozFullScreen||document.webkitIsFullScreen?t&&document[t]():e&&document.body[e]()})}},{}],7:[function(e,t,r){"use strict";t.exports=function(){vare=$("[data-category]");$("#search-bar").keyup(function(){vart=$(this).val(),r=newRegExp(t,"i");t?$("#footer").hide():$("#footer").show(),$.each($("#list .category"),function(e,t){varr=$(t);!r.hasClass("open")&&r.click()}),e.show().filter(function(){vare=$(this).attr("data-category");return$(this).hasClass("category")?!r.test($('[data-category="'+e+'"]').text()):!(r.test($('.category[data-category="'+e+'"]').text())||r.test($(this).text()))}).hide(),$(".algorithms").show().filter(function(){return!$(this).children(":visible").length}).hide()})}},{}],8:[function(e,t,r){"use strict";varn=e("./show_algorithm"),o=e("./add_categories"),a=e("./show_description"),i=e("./add_files"),s=e("./show_first_algorithm"),c=e("./show_requested_algorithm"),u=e("./show_wiki"),l=e("./enable_search"),f=e("./resize_workspace"),p=e("./enable_fullscreen");t.exports={showAlgorithm:n,addCategories:o,showDescription:a,addFiles:i,showFirstAlgorithm:s,showRequestedAlgorithm:c,showWiki:u,enableSearch:l,resizeWorkspace:f,enableFullScreen:p}},{"./add_categories":4,"./add_files":5,"./enable_fullscreen":6,"./enable_search":7,"./resize_workspace":11,"./show_algorithm":22,"./show_description":23,"./show_first_algorithm":24,"./show_requested_algorithm":25,"./show_wiki":26}],9:[function(e,t,r){"use strict";varn=function(){$("#loading-slider").removeClass("loaded")},o=function(){$("#loading-slider").addClass("loaded")};t.exports={showLoadingSlider:n,hideLoadingSlider:o}},{}],10:[function(e,t,r){"use strict";varn=function(){vare=$('<section class="module_wrapper">');return$(".module_container").append(e),e};t.exports={create:n}},{}],11:[function(e,t,r){"use strict";varn=e("../app");t.exports=function(){n.getTracerManager().resize(),n.getEditor().resize(),$(".files_bar > .wrapper").scroll()}},{"../app":3}],12:[function(e,t,r){"use strict";varn=e("./setup_dividers"),o=e("./setup_document"),a=e("./setup_files_bar"),i=e("./setup_interval"),s=e("./setup_module_container"),c=e("./setup_tab_container"),u=e("./setup_side_menu"),l=e("./setup_top_menu"),f=e("./setup_window"),p=function(){$(".btn input").click(function(e){e.stopPropagation()}),n(),o(),a(),i(),s(),c(),u(),l(),f()};t.exports={setup:p}},{"./setup_dividers":13,"./setup_document":14,"./setup_files_bar":15,"./setup_interval":16,"./setup_module_container":17,"./setup_side_menu":18,"./setup_tab_container":19,"./setup_top_menu":20,"./setup_window":21}],13:[function(e,t,r){"use strict";varn=function(){functione(e,t){varr=[],n=!0,o=!1,a=void0;try{for(vari,s=e[Symbol.iterator]();!(n=(i=s.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(c){o=!0,a=c}finally{try{!n&&s["return"]&&s["return"]()}finally{if(o)throwa}}returnr}returnfunction(t,r){if(Array.isArray(t))returnt;if(Symbol.iteratorinObject(t))returne(t,r);thrownewTypeError("Invalid attempt to destructure non-iterable instance")}}(),o=(e("../../app"),e("../resize_workspace")),a=function(e){vart=n(e,3),r=t[0],a=t[1],i=t[2],s=a.parent(),c=5,u=$('<div class="divider">'),l=!1;"v"===r?!function(){u.addClass("vertical");vare=-c/2;u.css({top:0,bottom:0,left:e,width:c});vart=void0;u.mousedown(function(e){varr=e.pageX;t=r,l=!0}),$(document).mousemove(function(e){varr=e.pageX;if(l){varn=i.position().left+r-t,c=n/s.width()*100;c=Math.min(90,Math.max(10,c)),a.css("right",100-c+"%"),i.css("left",c+"%"),t=r,o()}}),$(document).mouseup(function(e){l=!1})}():!function(){u.addClass("horizontal");vare=-c/2;u.css({top:e,height:c,left:0,right:0});vart=void0;u.mousedown(function(e){varr=e.pageY;t=r,l=!0}),$(document).mousemove(function(e){varr=e.pageY;if(l){varn=i.position().top+r-t,c=n/s.height()*100;c=Math.min(90,Math.max(10,c)),a.css("bottom",100-c+"%"),i.css("top",c+"%"),t=r,o()}}),$(document).mouseup(function(e){l=!1})}(),i.append(u)};t.exports=function(){for(vare=[["v",$(".sidemenu"),$(".workspace")],["v",$(".viewer_container"),$(".editor_container")],["h",$(".data_container"),$(".code_container")]],t=0;t<e.length;t++)a(e[t])}},{"../../app":3,"../resize_workspace":11}],14:[function(e,t,r){"use strict";varn=e("../../app");t.exports=function(){$(document).on("click","a",function(e){vart=$(this).attr("href");/^(https?:\/\/).+/.test(t)&&(e.preventDefault(),window.open(t,"_blank")||alert("Please allow popups for this site"))}),$(document).mouseup(function(e){n.getTracerManager().command("mouseup",e)})}},{"../../app":3}],15:[function(e,t,r){"use strict";varn=function(e,t){returne>t+2};t.exports=function(){$(".files_bar > .btn-left").click(function(){vare=$(".files_bar > .wrapper"),t=e.width(),r=e.scrollLeft();$(e.children("button").get().reverse()).each(function(){varn=$(this).position().left,o=n+$(this).outerWidth();return0>n?(e.scrollLeft(r+o-t),!1):void0})}),$(".files_bar > .btn-right").click(function(){vare=$(".files_bar > .wrapper"),t=e.width(),r=e.scrollLeft();e.children("button").each(function(){varn=$(this).position().left,o=n+$(this).outerWidth();returno>t?(e.scrollLeft(r+n),!1):void0})}),$(".files_bar > .wrapper").scroll(function(){vare=$(".files_bar > .wrapper"),t=e.width(),r=e.children("button:first-child"),o=e.children("button:last-child"),a=r.position().left,i=o.position().left+o.outerWidth();if(n(0,a)&&n(t,i)){vars=e.scrollLeft();returnvoide.scrollLeft(s+t-i)}varc=n(0,a),u=n(i,t);e.toggleClass("shadow-left",c),e.toggleClass("shadow-right",u),$(".files_bar > .btn-left").attr("disabled",!c),$(".files_bar > .btn-right").attr("disabled",!u)})}},{}],16:[function(e,t,r){"use strict";varn=function(){functione(e,t){varr=[],n=!0,o=!1,a=void0;try{for(vari,s=e[Symbol.iterator]();!(n=(i=s.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(c){o=!0,a=c}finally{try{!n&&s["return"]&&s["return"]()}finally{if(o)throwa}}returnr}returnfunction(t,r){if(Array.isArray(t))returnt;if(Symbol.iteratorinObject(t))returne(t,r);thrownewTypeError("Invalid attempt to destructure non-iterable instance")}}(),o=e("../../app"),a=e("../toast"),i=Number.parseFloat,s=.1,c=10,u=.5,l=.1,f=function(e){vart=void0,r=void0;returns>e?(t=s,r="Interval of "+e+" seconds is too low. Setting to min allowed interval of "+s+" second(s)."):e>c?(t=c,r="Interval of "+e+" seconds is too high. Setting to max allowed interval of "+c+" second(s)."):(t=e,r="Interval has been set to "+e+" second(s)."),[t,r]};t.exports=function(){vare=$("#interval");e.val(u),e.attr({max:c,min:s,step:l}),$("#interval").on("change",function(){vare=o.getTracerManager(),t=f(i($(this).val())),r=n(t,2),s=r[0],c=r[1];$(this).val(s),e.interval=1e3*s,a.showInfoToast(c)})}},{"../../app":3,"../toast":27}],17:[function(e,t,r){"use strict";varn=e("../../app");t.exports=function(){vare=$(".module_container");e.on("mousedown",".module_wrapper",function(e){n.getTracerManager().findOwner(this).mousedown(e)}),e.on("mousemove",".module_wrapper",function(e){n.getTracerManager().findOwner(this).mousemove(e)}),e.on("DOMMouseScroll mousewheel",".module_wrapper",function(e){n.getTracerManager().findOwner(this).mousewheel(e)})}},{"../../app":3}],18:[function(e,t,r){"use strict";varn=e("../../app"),o=e("../../server"),a=e("../show_algorithm"),i=e("../resize_workspace"),s=void0;t.exports=function(){$("#navigation").click(function(){vare=$(".sidemenu"),t=$(".workspace");e.toggleClass("active"),$(".nav-dropdown").toggleClass("fa-caret-down fa-caret-up"),e.hasClass("active")?(e.css("right",100-s+"%"),t.css("left",s+"%")):(s=t.position().left/$("body").width()*100,e.css("right",0),t.css("left",0)),i()}),$("#documentation").click(function(){$("#btn_doc").click()}),$("#powered-by").click(function(){$(this).toggleClass("open"),$("#powered-by-list").toggle(300)}),$("#scratch-paper").click(function(){vare="scratch",t=n.getLoadedScratch();o.loadAlgorithm(e,t).then(function(r){a(e,t,r)})})}},{"../../app":3,"../../server":59,"../resize_workspace":11,"../show_algorithm":22}],19:[function(e,t,r){"use strict";t.exports=function(){$(".tab_bar > button").click(function(){$(".tab_bar > button").removeClass("active"),$(".tab_container > .tab").removeClass("active"),$(this).addClass("active"),$($(this).attr("data-target")).addClass("active")})}},{}],20:[function(e,t,r){"use strict";varn=e("../../app"),o=e("../../server"),a=e("../toast"),i=e("../top_menu");t.exports=function(){$("#shared").mouseup(function(){$(this).select()}),$("#btn_share").click(function(){vare=$(this).find(".fa-share");e.addClass("fa-spin fa-spin-faster"),o.shareScratchPaper().then(function(t){e.removeClass("fa-spin fa-spin-faster"),$("#shared").removeClass("collapse"),$("#shared").val(t),a.showInfoToast("Shareable link is created.")})});vare=$("#btn_run"),t=$("#btn_trace"),r=$("#btn_pause"),s=$("#btn_prev"),c=$("#btn_next");i.disableFlowControl(),e.click(function(){t.click(),r.removeClass("active"),e.addClass("active"),i.enableFlowControl();varo=n.getEditor().execute();o&&(console.error(o),a.showErrorToast(o),i.resetTopMenuButtons())}),r.click(function(){e.toggleClass("active"),r.toggleClass("active"),n.getTracerManager().isPause()?n.getTracerManager().resumeStep():n.getTracerManager().pauseStep()}),s.click(function(){e.removeClass("active"),r.addClass("active"),n.getTracerManager().pauseStep(),n.getTracerManager().prevStep()}),c.click(function(){e.removeClass("active"),r.addClass("active"),n.getTracerManager().pauseStep(),n.getTracerManager().nextStep()})}},{"../../app":3,"../../server":59,"../toast":27,"../top_menu":28}],21:[function(e,t,r){"use strict";varn=e("../../app");t.exports=function(){$(window).resize(function(){n.getTracerManager().resize()})}},{"../../app":3}],22:[function(e,t,r){"use strict";varn=e("../app"),o=e("../utils"),a=o.isScratchPaper,i=e("./show_description"),s=e("./add_files");t.exports=function(e,t,r,o){varc=void0,u=void0,l=void0;if(a(e))c=$("#scratch-paper"),u="Scratch Paper",l=t?"Shared":"Temporary";else{c=$('[data-category="'+e+'"][data-algorithm="'+t+'"]');varf=n.getCategory(e);u=f.name,l=f.list[t]}$(".sidemenu button").removeClass("active"),c.addClass("active"),$("#category").html(u),$("#algorithm").html(l),$("#tab_desc > .wrapper").empty(),$(".files_bar > .wrapper").empty(),$("#explanation").html(""),n.setLastFileUsed(null),n.getEditor().clearContent();varp=r.files;deleter.files,i(r),s(e,t,p,o)}},{"../app":3,"../utils":73,"./add_files":5,"./show_description":23}],23:[function(e,t,r){"use strict";varn="function"==typeofSymbol&&"symbol"==typeofSymbol.iterator?function(e){returntypeofe}:function(e){returne&&"function"==typeofSymbol&&e.constructor===Symbol?"symbol":typeofe},o=Array.isArray,a=$,i=a.each;t.exports=function(e){vart=$("#tab_desc > .wrapper");t.empty(),i(e,function(e,r){e&&t.append($("<h3>").html(e)),"string"==typeofr?t.append($("<p>").html(r)):o(r)?!function(){vare=$('<ul class="applications">');t.append(e),r.forEach(function(t){e.append($("<li>").html(t))})}():"object"===("undefined"==typeofr?"undefined":n(r))&&!function(){vare=$('<ul class="complexities">');t.append(e),i(r,function(t){varn=$('<div class="complexity">'),o=$('<span class="complexity-type">').html(t+": "),a=$('<span class="complexity-value">').html(""+r[t]);n.append(o).append(a),e.append($("<li>").append(n))})}()})}},{}],24:[function(e,t,r){"use strict";t.exports=function(){$("#list .category").first().click(),$("#list .category + .algorithms > .indent").first().click()}},{}],25:[function(e,t,r){"use strict";varn=e("../server"),o=e("./show_algorithm");t.exports=function(e,t,r){$('.category[data-category="'+e+'"]').click(),n.loadAlgorithm(e,t).then(function(n){o(e,t,n,r)})}},{"../server":59,"./show_algorithm":22}],26:[function(e,t,r){"use strict";varn=e("../app"),o=e("../server"),a=newshowdown.Converter({tables:!0});t.exports=function(e){o.loadWiki(e).then(function(r){$("#tab_doc > .wrapper").html(a.makeHtml("#"+e+"\n"+r)),$("#tab_doc").scrollTop(0),$("#tab_doc > .wrapper a").click(function(e){varr=$(this).attr("href");n.hasWiki(r)&&(e.preventDefault(),t.exports(r))})})}},{"../app":3,"../server":59}],27:[function(e,t,r){"use strict";varn=function(e,t){varr=$('<div class="toast '+t+'">').append(e);$(".toast_container").append(r),setTimeout(function(){r.fadeOut(function(){r.remove()})},3e3)},o=function(e){n(e,"error")},a=function(e){n(e,"info")};t.exports={showErrorToast:o,showInfoToast:a}},{}],28:[function(e,t,r){"use strict";varn=e("../app"),o=[$("#btn_pause"),$("#btn_prev"),$("#btn_next")],a=function(e){o.forEach(function(t){returnt.attr("disabled",e)})},i=function(){a(!1)},s=function(){a(!0)},c=function(){$(".top-menu-buttons button").removeClass("active"),s(),n.getEditor().unhighlightLine()},u=function(e){$("#interval").val(interval)},l=function(){$("#btn_pause").addClass("active")},f=function(){$("#btn_pause").removeClass("active")};t.exports={enableFlowControl:i,disableFlowControl:s,resetTopMenuButtons:c,setInterval:u,activateBtnPause:l,deactivateBtnPause:f}},{"../app":3}],29:[function(e,t,r){"use strict";t.exports=function(e){vart=ace.edit(e);returnt.setOptions({enableBasicAutocompletion:!0,enableSnippets:!0,enableLiveAutocompletion:!0}),t.setTheme("ace/theme/tomorrow_night_eighties"),t.session.setMode("ace/mode/javascript"),t.$blockScrolling=1/0,t}},{}],30:[function(require,module,exports){"use strict";varexecute=functionexecute(tracerManager,code,dataLines){try{!function(){tracerManager.deallocateAll();varlines=code.split("\n"),newLines=[];lines.forEach(function(e,t){newLines.push(e.replace(/(.+\. *_wait *)(\( *\))/g,"$1("+(t-dataLines)+")"))}),eval(Babel.transform(newLines.join("\n"),{presets:["es2015"]}).code),tracerManager.visualize()}()}catch(err){returnerr}finally{tracerManager.removeUnallocated()}},executeData=function(e,t){returnexecute(e,t)},executeDataAndCode=function(e,t,r){varn=t.split("\n").length;returnexecute(e,t+"\n"+r,n)};module.exports={executeData:executeData,executeDataAndCode:executeDataAndCode}},{}],31:[function(e,t,r){"use strict";functionn(e){vart=this;if(!e)throw"Cannot create Editor. Missing the tracerManager";ace.require("ace/ext/language_tools");varr=ace.require("ace/range").Range;this.dataEditor=a("data"),this.codeEditor=a("code"),this.setData=function(e){t.dataEditor.setValue(e,-1)},this.setCode=function(e){t.codeEditor.setValue(e,-1)},this.setContent=function(e){varr=e.data,n=e.code;t.setData(r),t.setCode(n)},this.clearData=function(){t.dataEditor.setValue("")},this.clearCode=function(){t.codeEditor.setValue("")},this.clearContent=function(){t.clearData(),t.clearCode()},this.execute=function(){varr=t.dataEditor.getValue(),n=t.codeEditor.getValue();returni.executeDataAndCode(e,r,n)},this.highlightLine=function(e){varn=t.codeEditor.getSession();t.marker&&n.removeMarker(t.marker),t.marker=n.addMarker(newr(e,0,e,1/0),"executing","line",!0)},this.unhighlightLine=function(){vare=t.codeEditor.getSession();t.marker&&e.removeMarker(t.marker)},this.resize=function(){t.dataEditor.resize(),t.codeEditor.resize()},this.dataEditor.on("change",function(){varr=t.dataEditor.getValue(),n=o.getLastFileUsed();n&&o.updateCachedFile(n,{data:r}),i.executeData(e,r),s.resetTopMenuButtons()}),this.codeEditor.on("change",function(){varr=t.codeEditor.getValue(),n=o.getLastFileUsed();n&&o.updateCachedFile(n,{code:r}),e.reset(),s.resetTopMenuButtons()})}varo=e("../app"),a=e("./create"),i=e("./executor"),s=e("../dom/top_menu");t.exports=n},{"../app":3,"../dom/top_menu":28,"./create":29,"./executor":30}],32:[function(e,t,r){"use strict";varn=e("rsvp"),o=e("./app"),a=e("./app/constructor"),i=e("./dom"),s=e("./server"),c=e("./module"),u=$,l=u.extend;$.ajaxSetup({cache:!1,dataType:"text"});varf=e("./utils"),p=f.isScratchPaper,h=e("./server/helpers"),d=h.getHashValue,v=h.getParameterByName,g=h.getPath;n.on("error",function(e){console.assert(!1,e)}),$(function(){vare=newa;l(!0,o,e),l(!0,window,c),s.loadCategories().then(function(e){o.setCategories(e),i.addCategories(),i.enableSearch(),i.enableFullScreen();vart=g(),r=t.category,n=t.algorithm,a=t.file;p(r)?n?s.loadScratchPaper(n).then(function(e){vart=e.category,r=e.algorithm,n=e.data;i.showAlgorithm(t,r,n)}):s.loadAlgorithm(r).then(function(e){i.showAlgorithm(r,null,e)}):r&&n?i.showRequestedAlgorithm(r,n,a):i.showFirstAlgorithm()}),s.loadWikiList().then(function(e){o.setWikiList(e.wikis),i.showWiki("Tracer")});vart=d("scratch-paper"),r=v("scratch-paper"),n=t||r;n&&(window.location.href=window.location.protocol+"//"+window.location.host+window.location.pathname+"#path=scratch/"+n)})},{"./app":3,"./app/constructor":2,"./dom":8,"./module":42,"./server":59,"./server/helpers":58,"./utils":73,rsvp:75}],33:[function(e,t,r){"use strict";varn=e("./array2d"),o=function(e,t,r){returnn.random(1,e,t,r)[0]},a=function(e,t,r){returnn.randomSorted(1,e,t,r)[0]};t.exports={random:o,randomSorted:a}},{"./array2d":34}],34:[function(e,t,r){"use strict";varn=e("./integer"),o=function(e,t,r,o){e||(e=10),t||(t=10),void0===r&&(r=1),void0===o&&(o=9);for(vara=[],i=0;e>i;i++){a.push([]);for(vars=0;t>s;s++)a[i].push(n.random(r,o))}returna},a=function(e,t,r,n){returno(e,t,r,n).map(function(e){returne.sort(function(e,t){returne-t})})};t.exports={random:o,randomSorted:a}},{"./integer":38}],35:[function(e,t,r){"use strict";varn=e("./integer"),o=function(e,t,r){e||(e=7),t||(t=1),r||(r=10);for(varo=newArray(e),a=0;e>a;a++)o[a]=newArray(2);for(vara=0;e>a;a++)for(vari=0;i<o[a].length;i++)o[a][i]=n.random(t,r);returno};t.exports={random:o}},{"./integer":38}],36:[function(e,t,r){"use strict";varn=function(e,t){e||(e=5),t||(t=.3);for(varr=newArray(e),n=0;e>n;n++){r[n]=newArray(e);for(varo=0;e>o;o++)n!=o&&(r[n][o]=0==(Math.random()*(1/t)|0)?1:0)}returnr};t.exports={random:n}},{}],37:[function(e,t,r){"use strict";varn=e("./integer"),o=e("./array1d"),a=e("./array2d"),i=e("./coordinate_system"),s=e("./directed_graph"),c=e("./undirected_graph"),u=e("./weighted_directed_graph"),l=e("./weighted_undirected_graph");t.exports={Integer:n,Array1D:o,Array2D:a,CoordinateSystem:i,DirectedGraph:s,UndirectedGraph:c,WeightedDirectedGraph:u,WeightedUndirectedGraph:l}},{"./array1d":33,"./array2d":34,"./coordinate_system":35,"./directed_graph":36,"./integer":38,"./undirected_graph":39,"./weighted_directed_graph":40,"./weighted_undirected_graph":41}],38:[function(e,t,r){"use strict";varn=function(e,t){return(Math.random()*(t-e+1)|0)+e};t.exports={random:n}},{}],39:[function(e,t,r){"use strict";varn=function(e,t){e||(e=5),t||(t=.3);for(varr=newArray(e),n=0;e>n;n++)r[n]=newArray(e);for(varn=0;e>n;n++)for(varo=0;e>o;o++)n>o&&(r[n][o]=r[o][n]=0==(Math.random()*(1/t)|0)?1:0);returnr};t.exports={random:n}},{}],40:[function(e,t,r){"use strict";varn=e("./integer"),o=function(e,t,r,o){e||(e=5),t||(t=.3),r||(r=1),o||(o=5);for(vara=newArray(e),i=0;e>i;i++){a[i]=newArray(e);for(vars=0;e>s;s++)i!=s&&0==(Math.random()*(1/t)|0)&&(a[i][s]=n.random(r,o))}returna};t.exports={random:o}},{"./integer":38}],41:[function(e,t,r){"use strict";varn=e("./integer"),o=function(e,t,r,o){e||(e=5),t||(t=.3),r||(r=1),o||(o=5);for(vara=newArray(e),i=0;e>i;i++)a[i]=newArray(e);for(vari=0;e>i;i++)for(vars=0;e>s;s++)i>s&&0==(Math.random()*(1/t)|0)&&(a[i][s]=a[s][i]=n.random(r,o));returna};t.exports={random:o}},{"./integer":38}],42:[function(e,t,r){"use strict";varn=e("./tracer"),o=e("./data"),a=$,i=a.extend;t.exports=i(!0,{},n,o)},{"./data":37,"./tracer":48}],43:[function(e,t,r){"use strict";functionn(e,t){if(!(einstanceoft))thrownewTypeError("Cannot call a class as a function")}functiono(e,t){if(!e)thrownewReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeoft&&"function"!=typeoft?e:t}functiona(e,t){if("function"!=typeoft&&null!==t)thrownewTypeError("Super expression must either be null or a function, not "+typeoft);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)}vari=functionl(e,t,r){null===e&&(e=Function.prototype);varn=Object.getOwnPropertyDescriptor(e,t);if(void0===n){varo=Object.getPrototypeOf(e);returnnull===o?void0:l(o,t,r)}if("value"inn)returnn.value;vara=n.get;if(void0!==a)returna.call(r)},s=function(){functione(e,t){for(varr=0;r<t.length;r++){varn=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"inn&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}returnfunction(t,r,n){returnr&&e(t.prototype,r),n&&e(t,n),t}}(),c=e("./array2d"),u=function(e){functiont(e){returnn(this,t),o(this,Object.getPrototypeOf(t).call(this,e))}returna(t,e),s(t,null,[{key:"getClassName",value:function(){return"Array1DTracer"}}]),s(t,[{key:"_notify",value:function(e,r){returni(Object.getPrototypeOf(t.prototype),"_notify",this).call(this,0,e,r),this}},{key:"_denotify",value:function(e){returni(Object.getPrototypeOf(t.prototype),"_denotify",this).call(this,0,e),this}},{key:"_select",value:function(e,r){returnvoid0===r?i(Object.getPrototypeOf(t.prototype),"_select",this).call(this,0,e):i(Object.getPrototypeOf(t.prototype),"_selectRow",this).call(this,0,e,r),this}},{key:"_deselect",value:function(e,r){returnvoid0===r?i(Object.getPrototypeOf(t.prototype),"_deselect",this).call(this,0,e):i(Object.getPrototypeOf(t.prototype),"_deselectRow",this).call(this,0,e,r),this}},{key:"processStep",value:function(e,r){if(i(Object.getPrototypeOf(t.prototype),"processStep",this).call(this,e,r),this.chartTracer){varn=$.extend(!0,{},e);n.capsule=this.chartTracer.capsule,n.s=n.sy,n.e=n.ey,void0===n.s&&(n.s=n.y),deleten.x,deleten.y,deleten.sx,deleten.sy,deleten.ex,deleten.ey,this.chartTracer.processStep(n,r)}}},{key:"setData",value:function(e){returni(Object.getPrototypeOf(t.prototype),"setData",this).call(this,[e])}}]),t}(c);t.exports=u},{"./array2d":44}],44:[function(e,t,r){"use strict";functionn(e,t){if(!(einstanceoft))thrownewTypeError("Cannot call a class as a function")}functiono(e,t){if(!e)thrownewReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeoft&&"function"!=typeoft?e:t}functiona(e,t){if("function"!=typeoft&&null!==t)thrownewTypeError("Super expression must either be null or a function, not "+typeoft);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)}vari=functionh(e,t,r){null===e&&(e=Function.prototype);varn=Object.getOwnPropertyDescriptor(e,t);if(void0===n){varo=Object.getPrototypeOf(e);returnnull===o?void0:h(o,t,r)}if("value"inn)returnn.value;vara=n.get;if(void0!==a)returna.call(r)},s=function(){functione(e,t){for(varr=0;r<t.length;r++){varn=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"inn&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}returnfunction(t,r,n){returnr&&e(t.prototype,r),n&&e(t,n),t}}(),c=e("./tracer"),u=e("../../tracer_manager/util/index"),l=u.refineByType,f=function(e){functiont(e){n(this,t);varr=o(this,Object.getPrototypeOf(t).call(this,e));returnr.colorClass={selected:"selected",notified:"notified"},r.isNew&&p(r),r}returna(t,e),s(t,null,[{key:"getClassName",value:function(){return"Array2DTracer"}}]),s(t,[{key:"_notify",value:function(e,t,r){returnthis.manager.pushStep(this.capsule,{type:"notify",x:e,y:t,v:r}),this}},{key:"_denotify",value:function(e,t){returnthis.manager.pushStep(this.capsule,{type:"denotify",x:e,y:t}),this}},{key:"_select",value:function(e,t,r,n){returnthis.pushSelectingStep("select",null,arguments),this}},{key:"_selectRow",value:function(e,t,r){returnthis.pushSelectingStep("select","row",arguments),this}},{key:"_selectCol",value:function(e,t,r){returnthis.pushSelectingStep("select","col",arguments),this}},{key:"_deselect",value:function(e,t,r,n){returnthis.pushSelectingStep("deselect",null,arguments),this}},{key:"_deselectRow",value:function(e,t,r){returnthis.pushSelectingStep("deselect","row",arguments),this}},{key:"_deselectCol",value:function(e,t,r){returnthis.pushSelectingStep("deselect","col",arguments),this}},{key:"_separate",value:function(e,t){returnthis.manager.pushStep(this.capsule,{type:"separate",x:e,y:t}),this}},{key:"_separateRow",value:function(e){returnthis._separate(e,-1),this}},{key:"_separateCol",value:function(e){returnthis._separate(-1,e),this}},{key:"_deseparate",value:function(e,t){returnthis.manager.pushStep(this.capsule,{type:"deseparate",x:e,y:t}),this}},{key:"_deseparateRow",value:function(e){returnthis._deseparate(e,-1),this}},{key:"_deseparateCol",value:function(e){returnthis._deseparate(-1,e),this}},{key:"pushSelectingStep",value:function(){vare=Array.prototype.slice.call(arguments),t=e.shift(),r=e.shift();e=Array.prototype.slice.call(e.shift());varn;switch(r){case"row":n={x:e[0],sy:e[1],ey:e[2]};break;case"col":n={y:e[0],sx:e[1],ex:e[2]};break;default:n=void0===e[2]&&void0===e[3]?{x:e[0],y:e[1]}:{sx:e[0],sy:e[1],ex:e[2],ey:e[3]}}varo={type:t};$.extend(o,n),this.manager.pushStep(this.capsule,o)}},{key:"processStep",value:function(e,r){switch(e.type){case"notify":if(void0!==e.v){varn=this.$table.find(".mtbl-row").eq(e.x),o=n.find(".mtbl-col").eq(e.y);o.text(l(e.v))}case"denotify":case"select":case"deselect":vara="select"==e.type||"deselect"==e.type?this.colorClass.selected:this.colorClass.notified,s="select"==e.type||"notify"==e.type,c=e.sx,u=e.sy,f=e.ex,p=e.ey;void0===c&&(c=e.x),void0===u&&(u=e.y),void0===f&&(f=e.x),void0===p&&(p=e.y),this.paintColor(c,u,f,p,a,s);break;case"separate":this.deseparate(e.x,e.y),this.separate(e.x,e.y);break;case"deseparate":this.deseparate(e.x,e.y);break;default:i(Object.getPrototypeOf(t.prototype),"processStep",this).call(this,e,r)}}},{key:"setData",value:function(e){if(this.viewX=this.viewY=0,this.paddingH=6,this.paddingV=3,this.fontSize=16,i(Object.getPrototypeOf(t.prototype),"setData",this).apply(this,arguments))returnthis.$table.find(".mtbl-row").each(function(t){$(this).find(".mtbl-col").each(function(r){$(this).text(l(e[t][r]))})}),!0;this.$table.empty();for(varr=0;r<e.length;r++){varn=$('<div class="mtbl-row">');this.$table.append(n);for(varo=0;o<e[r].length;o++){vara=$('<div class="mtbl-col">').css(this.getCellCss()).text(l(e[r][o]));n.append(a)}}returnthis.resize(),!1}},{key:"resize",value:function(){i(Object.getPrototypeOf(t.prototype),"resize",this).call(this),this.refresh()}},{key:"clear",value:function(){i(Object.getPrototypeOf(t.prototype),"clear",this).call(this),this.clearColor(),this.deseparateAll()}},{key:"getCellCss",value:function(){return{padding:this.paddingV.toFixed(1)+"px "+this.paddingH.toFixed(1)+"px","font-size":this.fontSize.toFixed(1)+"px"}}},{key:"refresh",value:function(){i(Object.getPrototypeOf(t.prototype),"refresh",this).call(this);vare=this.$table.parent(),r=e.height()/2-this.$table.height()/2+this.viewY,n=e.width()/2-this.$table.width()/2+this.viewX;this.$table.css("margin-top",r),this.$table.css("margin-left",n)}},{key:"mousedown",value:function(e){i(Object.getPrototypeOf(t.prototype),"mousedown",this).call(this,e),this.dragX=e.pageX,this.dragY=e.pageY,this.dragging=!0}},{key:"mousemove",value:function(e){i(Object.getPrototypeOf(t.prototype),"mousemove",this).call(this,e),this.dragging&&(this.viewX+=e.pageX-this.dragX,this.viewY+=e.pageY-this.dragY,this.dragX=e.pageX,this.dragY=e.pageY,this.refresh())}},{key:"mouseup",value:function(e){i(Object.getPrototypeOf(t.prototype),"mouseup",this).call(this,e),this.dragging=!1}},{key:"mousewheel",value:function(e){i(Object.getPrototypeOf(t.prototype),"mousewheel",this).call(this,e),e.preventDefault(),e=e.originalEvent;varr=void0!==e.wheelDelta&&e.wheelDelta||void0!==e.detail&&-e.detail,n=1.01,o=r>0?1/n:n;this.fontSize<4&&1>o||this.fontSize>40&&o>1||(this.paddingV*=o,
this.paddingH*=o,this.fontSize*=o,this.$table.find(".mtbl-col").css(this.getCellCss()),this.refresh())}},{key:"paintColor",value:function(e,t,r,n,o,a){for(vari=e;r>=i;i++)for(vars=this.$table.find(".mtbl-row").eq(i),c=t;n>=c;c++){varu=s.find(".mtbl-col").eq(c);a?u.addClass(o):u.removeClass(o)}}},{key:"clearColor",value:function(){this.$table.find(".mtbl-col").removeClass(Object.keys(this.colorClass).join(""))}},{key:"separate",value:function(e,t){this.$table.find(".mtbl-row").each(function(r){varn=$(this);r==e&&n.after($('<div class="mtbl-empty-row">').attr("data-row",r)),n.find(".mtbl-col").each(function(e){varr=$(this);e==t&&r.after($('<div class="mtbl-empty-col">').attr("data-col",e))})})}},{key:"deseparate",value:function(e,t){this.$table.find("[data-row="+e+"]").remove(),this.$table.find("[data-col="+t+"]").remove()}},{key:"deseparateAll",value:function(){this.$table.find(".mtbl-empty-row, .mtbl-empty-col").remove()}}]),t}(c),p=function(e){e.$table=e.capsule.$table=$('<div class="mtbl-table">'),e.$container.append(e.$table)};t.exports=f},{"../../tracer_manager/util/index":70,"./tracer":50}],45:[function(e,t,r){"use strict";functionn(e,t){if(!(einstanceoft))thrownewTypeError("Cannot call a class as a function")}functiono(e,t){if(!e)thrownewReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeoft&&"function"!=typeoft?e:t}functiona(e,t){if("function"!=typeoft&&null!==t)thrownewTypeError("Super expression must either be null or a function, not "+typeoft);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)}vari=functionf(e,t,r){null===e&&(e=Function.prototype);varn=Object.getOwnPropertyDescriptor(e,t);if(void0===n){varo=Object.getPrototypeOf(e);returnnull===o?void0:f(o,t,r)}if("value"inn)returnn.value;vara=n.get;if(void0!==a)returna.call(r)},s=function(){functione(e,t){for(varr=0;r<t.length;r++){varn=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"inn&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}returnfunction(t,r,n){returnr&&e(t.prototype,r),n&&e(t,n),t}}(),c=e("./tracer"),u=function(e){functiont(e){n(this,t);varr=o(this,Object.getPrototypeOf(t).call(this,e));returnr.color={selected:"#2962ff",notified:"#c51162","default":"rgb(136, 136, 136)"},r.isNew&&l(r),r}returna(t,e),s(t,null,[{key:"getClassName",value:function(){return"ChartTracer"}}]),s(t,[{key:"setData",value:function(e){if(i(Object.getPrototypeOf(t.prototype),"setData",this).apply(this,arguments))returnthis.chart.config.data.datasets[0].data=e,this.chart.update(),!0;for(varr=[],n=0;n<e.length;n++)r.push(this.color["default"]);this.chart.config.data={labels:e.map(String),datasets:[{backgroundColor:r,data:e}]},this.chart.update()}},{key:"_notify",value:function(e,t){returnthis.manager.pushStep(this.capsule,{type:"notify",s:e,v:t}),this}},{key:"_denotify",value:function(e){returnthis.manager.pushStep(this.capsule,{type:"denotify",s:e}),this}},{key:"_select",value:function(e,t){returnthis.manager.pushStep(this.capsule,{type:"select",s:e,e:t}),this}},{key:"_deselect",value:function(e,t){returnthis.manager.pushStep(this.capsule,{type:"deselect",s:e,e:t}),this}},{key:"processStep",value:function(e,r){switch(e.type){case"notify":void0!==e.v&&(this.chart.config.data.datasets[0].data[e.s]=e.v,this.chart.config.data.labels[e.s]=e.v.toString());case"denotify":case"select":case"deselect":varn="notify"==e.type?this.color.notified:"select"==e.type?this.color.selected:this.color["default"];if(void0!==e.e)for(varo=e.s;o<=e.e;o++)this.chart.config.data.datasets[0].backgroundColor[o]=n;elsethis.chart.config.data.datasets[0].backgroundColor[e.s]=n;this.chart.update();break;default:i(Object.getPrototypeOf(t.prototype),"processStep",this).call(this,e,r)}}},{key:"resize",value:function(){i(Object.getPrototypeOf(t.prototype),"resize",this).call(this),this.chart.resize()}},{key:"clear",value:function(){i(Object.getPrototypeOf(t.prototype),"clear",this).call(this);vare=this.chart.config.data;if(e.datasets.length){for(varr=e.datasets[0].backgroundColor,n=0;n<r.length;n++)r[n]=this.color["default"];this.chart.update()}}}]),t}(c),l=function(e){e.$wrapper=e.capsule.$wrapper=$('<canvas class="mchrt-chart">'),e.$container.append(e.$wrapper),e.chart=e.capsule.chart=newChart(e.$wrapper,{type:"bar",data:{labels:[],datasets:[]},options:{scales:{yAxes:[{ticks:{beginAtZero:!0}}]},animation:!1,legend:!1,responsive:!0,maintainAspectRatio:!1}})};t.exports=u},{"./tracer":50}],46:[function(e,t,r){"use strict";functionn(e,t){if(!(einstanceoft))thrownewTypeError("Cannot call a class as a function")}functiono(e,t){if(!e)thrownewReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeoft&&"function"!=typeoft?e:t}functiona(e,t){if("function"!=typeoft&&null!==t)thrownewTypeError("Super expression must either be null or a function, not "+typeoft);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)}vari=functionf(e,t,r){null===e&&(e=Function.prototype);varn=Object.getOwnPropertyDescriptor(e,t);if(void0===n){varo=Object.getPrototypeOf(e);returnnull===o?void0:f(o,t,r)}if("value"inn)returnn.value;vara=n.get;if(void0!==a)returna.call(r)},s=function(){functione(e,t){for(varr=0;r<t.length;r++){varn=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"inn&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}returnfunction(t,r,n){returnr&&e(t.prototype,r),n&&e(t,n),t}}(),c=e("./directed_graph"),u=function(e){functiont(e){n(this,t);varr=o(this,Object.getPrototypeOf(t).call(this,e));returnr.isNew&&l(r),r}returna(t,e),s(t,null,[{key:"getClassName",value:function(){return"CoordinateSystemTracer"}}]),s(t,[{key:"setData",value:function(e){if(Tracer.prototype.setData.apply(this,arguments))return!0;this.graph.clear();for(vart=[],r=[],n=0;n<e.length;n++)t.push({id:this.n(n),x:e[n][0],y:e[n][1],label:""+n,size:1,color:this.color["default"]});returnthis.graph.read({nodes:t,edges:r}),this.s.camera.goTo({x:0,y:0,angle:0,ratio:1}),this.refresh(),!1}},{key:"processStep",value:function(e,r){switch(e.type){case"visit":case"leave":varn="visit"==e.type,o=this.graph.nodes(this.n(e.target)),a=n?this.color.visited:this.color.left;if(o.color=a,void0!==e.source){vars=this.e(e.source,e.target);if(this.graph.edges(s)){varc=this.graph.edges(s);c.color=a,this.graph.dropEdge(s).addEdge(c)}elsethis.graph.addEdge({id:this.e(e.target,e.source),source:this.n(e.source),target:this.n(e.target),color:a,size:1})}if(this.logTracer){varu=e.source;void0===u&&(u=""),this.logTracer.print(n?u+" -> "+e.target:u+" <- "+e.target)}break;default:i(Object.getPrototypeOf(t.prototype),"processStep",this).call(this,e,r)}}},{key:"e",value:function(e,t){if(e>t){varr=e;e=t,t=r}return"e"+e+"_"+t}},{key:"drawOnHover",value:function(e,t,r,n){varo=this;t.setLineDash([5,5]);vara=e.id.substring(1);this.graph.edges().forEach(function(i){vars=i.id.substring(1).split("_");if(s[0]==a){varc="#0ff",u=e,l=o.graph.nodes("n"+s[1]);o.drawEdge(i,u,l,c,t,r),n&&n(i,u,l,c,t,r)}elseif(s[1]==a){varc="#0ff",u=o.graph.nodes("n"+s[0]),l=e;o.drawEdge(i,u,l,c,t,r),n&&n(i,u,l,c,t,r)}})}},{key:"drawEdge",value:function(e,t,r,n,o,a){vari=a("prefix")||"",s=e[i+"size"]||1;o.strokeStyle=n,o.lineWidth=s,o.beginPath(),o.moveTo(t[i+"x"],t[i+"y"]),o.lineTo(r[i+"x"],r[i+"y"]),o.stroke()}}]),t}(c),l=function(e){e.s.settings({defaultEdgeType:"def",funcEdgesDef:function(t,r,n,o,a){vari=e.getColor(t,r,n,a);e.drawEdge(t,r,n,i,o,a)}})};t.exports=u},{"./directed_graph":47}],47:[function(e,t,r){"use strict";functionn(e,t){if(!(einstanceoft))thrownewTypeError("Cannot call a class as a function")}functiono(e,t){if(!e)thrownewReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeoft&&"function"!=typeoft?e:t}functiona(e,t){if("function"!=typeoft&&null!==t)thrownewTypeError("Super expression must either be null or a function, not "+typeoft);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)}vari=functionh(e,t,r){null===e&&(e=Function.prototype);varn=Object.getOwnPropertyDescriptor(e,t);if(void0===n){varo=Object.getPrototypeOf(e);returnnull===o?void0:h(o,t,r)}if("value"inn)returnn.value;vara=n.get;if(void0!==a)returna.call(r)},s=function(){functione(e,t){for(varr=0;r<t.length;r++){varn=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"inn&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}returnfunction(t,r,n){returnr&&e(t.prototype,r),n&&e(t,n),t}}(),c=e("./tracer"),u=e("../../tracer_manager/util/index"),l=u.refineByType,f=function(e){functiont(e){n(this,t);varr=o(this,Object.getPrototypeOf(t).call(this,e));returnr.color={selected:"#2962ff",visited:"#f50057",left:"#616161","default":"#bdbdbd"},r.isNew&&p(r),r}returna(t,e),s(t,null,[{key:"getClassName",value:function(){return"DirectedGraphTracer"}}]),s(t,[{key:"_setTreeData",value:function(e,t){returnthis.manager.pushStep(this.capsule,{type:"setTreeData",arguments:arguments}),this}},{key:"_visit",value:function(e,t){returnthis.manager.pushStep(this.capsule,{type:"visit",target:e,source:t}),this}},{key:"_leave",value:function(e,t){returnthis.manager.pushStep(this.capsule,{type:"leave",target:e,source:t}),this}},{key:"processStep",value:function(e,r){switch(e.type){case"setTreeData":this.setTreeData.apply(this,e.arguments);break;case"visit":case"leave":varn="visit"==e.type,o=this.graph.nodes(this.n(e.target)),a=n?this.color.visited:this.color.left;if(o.color=a,void0!==e.source){vars=this.e(e.source,e.target),c=this.graph.edges(s);c.color=a,this.graph.dropEdge(s).addEdge(c)}if(this.logTracer){varu=e.source;void0===u&&(u=""),this.logTracer.print(n?u+" -> "+e.target:u+" <- "+e.target)}break;default:i(Object.getPrototypeOf(t.prototype),"processStep",this).call(this,e,r)}}},{key:"setTreeData",value:function(e,t,r){varn=this;t=t||0;varo=-1,a=newArray(e.length),i=functionl(t,r){if(a[t])throw"the given graph is not a tree because it forms a circuit";a[t]=!0,r>o&&(o=r);for(varn=0;n<e[t].length;n++)e[t][n]&&l(n,r+1)};if(i(t,1),this.setData(e,r))return!0;vars=function(e,t,r){varo=n.graph.nodes(n.n(e));o.x=t,o.y=r},c=1/(o-1),u=functionf(t,r,n,o){s(t,n+o,r*c);for(vara=0,i=0;i<e[t].length;i++)e[t][i]&&a++;for(varu=(o-n)/a,l=0,i=0;i<e[t].length;i++)e[t][i]&&f(i,r+1,n+u*l,n+u*++l)};u(t,0,0,1),this.refresh()}},{key:"setData",value:function(e,r){if(i(Object.getPrototypeOf(t.prototype),"setData",this).apply(this,arguments))return!0;this.graph.clear();for(varn=[],o=[],a=2*Math.PI/e.length,s=0,c=0;c<e.length;c++)if(s+=a,n.push({id:this.n(c),label:""+c,x:.5+Math.sin(s)/2,y:.5+Math.cos(s)/2,size:1,color:this.color["default"],weight:0}),r)for(varu=0;c>=u;u++){varf=e[c][u]||e[u][c];f&&o.push({id:this.e(c,u),source:this.n(c),target:this.n(u),color:this.color["default"],size:1,weight:l(f)})}elsefor(varp=0;p<e[c].length;p++)e[c][p]&&o.push({id:this.e(c,p),source:this.n(c),target:this.n(p),color:this.color["default"],size:1,weight:l(e[c][p])});returnthis.graph.read({nodes:n,edges:o}),this.s.camera.goTo({x:0,y:0,angle:0,ratio:1}),this.refresh(),!1}},{key:"resize",value:function(){i(Object.getPrototypeOf(t.prototype),"resize",this).call(this),this.s.renderers[0].resize(),this.refresh()}},{key:"refresh",value:function(){i(Object.getPrototypeOf(t.prototype),"refresh",this).call(this),this.s.refresh()}},{key:"clear",value:function(){i(Object.getPrototypeOf(t.prototype),"clear",this).call(this),this.clearGraphColor(),this.refresh()}},{key:"clearGraphColor",value:function(){vare=this;this.graph.nodes().forEach(function(t){t.color=e.color["default"]}),this.graph.edges().forEach(function(t){t.color=e.color["default"]})}},{key:"n",value:function(e){return"n"+e}},{key:"e",value:function(e,t){return"e"+e+"_"+t}},{key:"getColor",value:function(e,t,r,n){varo=e.color,a=n("edgeColor"),i=n("defaultNodeColor"),s=n("defaultEdgeColor");if(!o)switch(a){case"source":o=t.color||i;break;case"target":o=r.color||i;break;default:o=s}returno}},{key:"drawLabel",value:function(e,t,r){varn,o=r("prefix")||"",a=e[o+"size"];a<r("labelThreshold")||e.label&&"string"==typeofe.label&&(n="fixed"===r("labelSize")?r("defaultLabelSize"):r("labelSizeRatio")*a,t.font=(r("fontStyle")?r("fontStyle")+"":"")+n+"px "+r("font"),t.fillStyle="node"===r("labelColor")?e.color||r("defaultNodeColor"):r("defaultLabelColor"),t.textAlign="center",t.fillText(e.label,Math.round(e[o+"x"]),Math.round(e[o+"y"]+n/3)))}},{key:"drawArrow",value:function(e,t,r,n,o,a){vari=a("prefix")||"",s=e[i+"size"]||1,c=r[i+"size"],u=t[i+"x"],l=t[i+"y"],f=r[i+"x"],p=r[i+"y"],h=Math.atan2(p-l,f-u),d=3;u+=Math.sin(h)*d,f+=Math.sin(h)*d,l+=-Math.cos(h)*d,p+=-Math.cos(h)*d;varv=Math.max(2.5*s,a("minArrowSize")),g=Math.sqrt(Math.pow(f-u,2)+Math.pow(p-l,2)),y=u+(f-u)*(g-v-c)/g,m=l+(p-l)*(g-v-c)/g,w=(f-u)*v/g,b=(p-l)*v/g;o.strokeStyle=n,o.lineWidth=s,o.beginPath(),o.moveTo(u,l),o.lineTo(y,m),o.stroke(),o.fillStyle=n,o.beginPath(),o.moveTo(y+w,m+b),o.lineTo(y+.6*b,m-.6*w),o.lineTo(y-.6*b,m+.6*w),o.lineTo(y+w,m+b),o.closePath(),o.fill()}},{key:"drawOnHover",value:function(e,t,r,n){varo=this;t.setLineDash([5,5]);vara=e.id.substring(1);this.graph.edges().forEach(function(i){vars=i.id.substring(1).split("_");if(s[0]==a){varc="#0ff",u=e,l=o.graph.nodes("n"+s[1]);o.drawArrow(i,u,l,c,t,r),n&&n(i,u,l,c,t,r)}elseif(s[1]==a){varc="#ff0",u=o.graph.nodes("n"+s[0]),l=e;o.drawArrow(i,u,l,c,t,r),n&&n(i,u,l,c,t,r)}})}}]),t}(c),p=function(e){e.s=e.capsule.s=newsigma({renderer:{container:e.$container[0],type:"canvas"},settings:{minArrowSize:8,defaultEdgeType:"arrow",maxEdgeSize:2.5,labelThreshold:4,font:"Roboto",defaultLabelColor:"#fff",zoomMin:.6,zoomMax:1.2,skipErrors:!0,minNodeSize:.5,maxNodeSize:12,labelSize:"proportional",labelSizeRatio:1.3,funcLabelsDef:function(t,r,n){e.drawLabel(t,r,n)},funcHoversDef:function(t,r,n,o){e.drawOnHover(t,r,n,o)},funcEdgesArrow:function(t,r,n,o,a){vari=e.getColor(t,r,n,a);e.drawArrow(t,r,n,i,o,a)}}}),sigma.plugins.dragNodes(e.s,e.s.renderers[0]),e.graph=e.capsule.graph=e.s.graph};sigma.canvas.labels.def=function(e,t,r){varn=r("funcLabelsDef");n&&n(e,t,r)},sigma.canvas.hovers.def=function(e,t,r){varn=r("funcHoversDef");n&&n(e,t,r)},sigma.canvas.edges.def=function(e,t,r,n,o){vara=o("funcEdgesDef");a&&a(e,t,r,n,o)},sigma.canvas.edges.arrow=function(e,t,r,n,o){vara=o("funcEdgesArrow");a&&a(e,t,r,n,o)},t.exports=f},{"../../tracer_manager/util/index":70,"./tracer":50}],48:[function(e,t,r){"use strict";varn=e("./tracer"),o=e("./log"),a=e("./array1d"),i=e("./array2d"),s=e("./chart"),c=e("./coordinate_system"),u=e("./directed_graph"),l=e("./undirected_graph"),f=e("./weighted_directed_graph"),p=e("./weighted_undirected_graph");t.exports={Tracer:n,LogTracer:o,Array1DTracer:a,Array2DTracer:i,ChartTracer:s,CoordinateSystemTracer:c,DirectedGraphTracer:u,UndirectedGraphTracer:l,WeightedDirectedGraphTracer:f,WeightedUndirectedGraphTracer:p}},{"./array1d":43,"./array2d":44,"./chart":45,"./coordinate_system":46,"./directed_graph":47,"./log":49,"./tracer":50,"./undirected_graph":51,"./weighted_directed_graph":52,"./weighted_undirected_graph":53}],49:[function(e,t,r){"use strict";functionn(e,t){if(!(einstanceoft))thrownewTypeError("Cannot call a class as a function")}functiono(e,t){if(!e)thrownewReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeoft&&"function"!=typeoft?e:t}functiona(e,t){if("function"!=typeoft&&null!==t)thrownewTypeError("Super expression must either be null or a function, not "+typeoft);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)}vari=functionf(e,t,r){null===e&&(e=Function.prototype);varn=Object.getOwnPropertyDescriptor(e,t);if(void0===n){varo=Object.getPrototypeOf(e);returnnull===o?void0:f(o,t,r)}if("value"inn)returnn.value;vara=n.get;if(void0!==a)returna.call(r)},s=function(){functione(e,t){for(varr=0;r<t.length;r++){varn=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"inn&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}returnfunction(t,r,n){returnr&&e(t.prototype,r),n&&e(t,n),t}}(),c=e("./tracer"),u=function(e){functiont(e){n(this,t);varr=o(this,Object.getPrototypeOf(t).call(this,e));returnr.isNew&&l(r),r}returna(t,e),s(t,null,[{key:"getClassName",value:function(){return"LogTracer"}}]),s(t,[{key:"_print",value:function(e){returnthis.manager.pushStep(this.capsule,{type:"print",msg:e}),this}},{key:"processStep",value:function(e,t){switch(e.type){case"print":this.print(e.msg)}}},{key:"refresh",value:function(){this.scrollToEnd(Math.min(50,this.interval))}},{key:"clear",value:function(){i(Object.getPrototypeOf(t.prototype),"clear",this).call(this),this.$wrapper.empty()}},{key:"print",value:function(e){this.$wrapper.append($("<span>").append(e+"<br/>"))}},{key:"scrollToEnd",value:function(e){this.$container.animate({scrollTop:this.$container[0].scrollHeight},e)}}]),t}(c),l=function(e){e.$wrapper=e.capsule.$wrapper=$('<div class="wrapper">'),e.$container.append(e.$wrapper)};t.exports=u},{"./tracer":50}],50:[function(e,t,r){"use strict";functionn(e){if(Array.isArray(e)){for(vart=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];returnr}returnArray.from(e)}functiono(e,t){if(!(einstanceoft))thrownewTypeError("Cannot call a class as a function")}vara=function(){functione(e,t){for(varr=0;r<t.length;r++){varn=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"inn&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}returnfunction(t,r,n){returnr&&e(t.prototype,r),n&&e(t,n),t}}(),i=e("../../app"),s=e("../../tracer_manager/util/index"),c=s.toJSON,u=s.fromJSON,l=function(){functione(t){o(this,e),this.module=this.constructor,this.manager=i.getTracerManager(),this.capsule=this.manager.allocate(this),$.extend(this,this.capsule),this.setName(t)}returna(e,null,[{key:"getClassName",value:function(){return"Tracer"}}]),a(e,[{key:"_setData",value:function(){for(vare=arguments.length,t=Array(e),r=0;e>r;r++)t[r]=arguments[r];returnthis.manager.pushStep(this.capsule,{type:"setData",args:c(t)}),this}},{key:"_clear",value:function(){returnthis.manager.pushStep(this.capsule,{type:"clear"}),this}},{key:"_wait",value:function(e){returnthis.manager.newStep(e),this}},{key:"processStep",value:function(e,t){varr=e.type,o=e.args;switch(r){case"setData":this.setData.apply(this,n(u(o)));break;case"clear":this.clear()}}},{key:"setName",value:function(e){vart=void0;this.isNew?(t=$('<span class="name">'),this.$container.append(t)):t=this.$container.find("span.name"),t.text(e||this.defaultName)}},{key:"setData",value:function(){vare=c(arguments);returnthis.isNew||this.lastData!==e?(this.lastData=this.capsule.lastData=e,!1):!0}},{key:"resize",value:function(){}},{key:"refresh",value:function(){}},{key:"clear",value:function(){}},{key:"attach",value:function(e){switch(e.module){caseLogTracer:this.logTracer=e;break;caseChartTracer:this.chartTracer=e}returnthis}},{key:"mousedown",value:function(e){}},{key:"mousemove",value:function(e){}},{key:"mouseup",value:function(e){}},{key:"mousewheel",value:function(e){}}]),e}();t.exports=l},{"../../app":3,"../../tracer_manager/util/index":70}],51:[function(e,t,r){"use strict";functionn(e,t){if(!(einstanceoft))thrownewTypeError("Cannot call a class as a function")}functiono(e,t){if(!e)thrownewReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeoft&&"function"!=typeoft?e:t}functiona(e,t){if("function"!=typeoft&&null!==t)thrownewTypeError("Super expression must either be null or a function, not "+typeoft);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)}vari=functionf(e,t,r){null===e&&(e=Function.prototype);varn=Object.getOwnPropertyDescriptor(e,t);if(void0===n){varo=Object.getPrototypeOf(e);returnnull===o?void0:f(o,t,r)}if("value"inn)returnn.value;vara=n.get;if(void0!==a)returna.call(r)},s=function(){functione(e,t){for(varr=0;r<t.length;r++){varn=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"inn&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}returnfunction(t,r,n){returnr&&e(t.prototype,r),n&&e(t,n),t}}(),c=e("./directed_graph"),u=function(e){functiont(e){n(this,t);varr=o(this,Object.getPrototypeOf(t).call(this,e));returnr.isNew&&l(r),r}returna(t,e),s(t,null,[{key:"getClassName",value:function(){return"UndirectedGraphTracer"}}]),s(t,[{key:"setTreeData",value:function(e,r){returni(Object.getPrototypeOf(t.prototype),"setTreeData",this).call(this,e,r,!0)}},{key:"setData",value:function(e){returni(Object.getPrototypeOf(t.prototype),"setData",this).call(this,e,!0)}},{key:"e",value:function(e,t){if(e>t){varr=e;e=t,t=r}return"e"+e+"_"+t}},{key:"drawOnHover",value:function(e,t,r,n){varo=this;t.setLineDash([5,5]);vara=e.id.substring(1);this.graph.edges().forEach(function(i){vars=i.id.substring(1).split("_");if(s[0]==a){varc="#0ff",u=e,l=o.graph.nodes("n"+s[1]);o.drawEdge(i,u,l,c,t,r),n&&n(i,u,l,c,t,r)}elseif(s[1]==a){varc="#0ff",u=o.graph.nodes("n"+s[0]),l=e;o.drawEdge(i,u,l,c,t,r),n&&n(i,u,l,c,t,r)}})}},{key:"drawEdge",value:function(e,t,r,n,o,a){vari=a("prefix")||"",s=e[i+"size"]||1;o.strokeStyle=n,o.lineWidth=s,o.beginPath(),o.moveTo(t[i+"x"],t[i+"y"]),o.lineTo(r[i+"x"],r[i+"y"]),o.stroke()}}]),t}(c),l=function(e){e.s.settings({defaultEdgeType:"def",funcEdgesDef:function(t,r,n,o,a){vari=e.getColor(t,r,n,a);e.drawEdge(t,r,n,i,o,a)}})};t.exports=u},{"./directed_graph":47}],52:[function(e,t,r){"use strict";functionn(e,t){if(!(einstanceoft))thrownewTypeError("Cannot call a class as a function")}functiono(e,t){if(!e)thrownewReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeoft&&"function"!=typeoft?e:t}functiona(e,t){if("function"!=typeoft&&null!==t)thrownewTypeError("Super expression must either be null or a function, not "+typeoft);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)}vari=functionh(e,t,r){null===e&&(e=Function.prototype);varn=Object.getOwnPropertyDescriptor(e,t);if(void0===n){varo=Object.getPrototypeOf(e);returnnull===o?void0:h(o,t,r)}if("value"inn)returnn.value;vara=n.get;if(void0!==a)returna.call(r)},s=function(){functione(e,t){for(varr=0;r<t.length;r++){varn=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"inn&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}returnfunction(t,r,n){returnr&&e(t.prototype,r),n&&e(t,n),t}}(),c=e("./directed_graph"),u=e("../../tracer_manager/util/index"),l=u.refineByType,f=function(e){functiont(e){n(this,t);varr=o(this,Object.getPrototypeOf(t).call(this,e));returnr.isNew&&p(r),r}returna(t,e),s(t,null,[{key:"getClassName",value:function(){return"WeightedDirectedGraphTracer"}}]),s(t,[{key:"_weight",value:function(e,t){returnthis.manager.pushStep(this.capsule,{type:"weight",target:e,weight:t}),this}},{key:"_visit",value:function(e,t,r){returnthis.manager.pushStep(this.capsule,{type:"visit",target:e,source:t,weight:r}),this}},{key:"_leave",value:function(e,t,r){returnthis.manager.pushStep(this.capsule,{type:"leave",target:e,source:t,weight:r}),this}},{key:"processStep",value:function(e,r){switch(e.type){case"weight":varn=this.graph.nodes(this.n(e.target));void0!==e.weight&&(n.weight=l(e.weight));break;case"visit":case"leave":varo="visit"==e.type,n=this.graph.nodes(this.n(e.target)),a=o?void0===e.weight?this.color.selected:this.color.visited:this.color.left;if(n.color=a,void0!==e.weight&&(n.weight=l(e.weight)),void0!==e.source){vars=this.e(e.source,e.target),c=this.graph.edges(s);c.color=a,this.graph.dropEdge(s).addEdge(c)}if(this.logTracer){varu=e.source;void0===u&&(u=""),this.logTracer.print(o?u+" -> "+e.target:u+" <- "+e.target)}break;default:i(Object.getPrototypeOf(t.prototype),"processStep",this).call(this,e,r)}}},{key:"clear",value:function(){i(Object.getPrototypeOf(t.prototype),"clear",this).call(this),this.clearWeights()}},{key:"clearWeights",value:function(){this.graph.nodes().forEach(function(e){e.weight=0})}},{key:"drawEdgeWeight",value:function(e,t,r,n,o,a){if(t!=r){vari=a("prefix")||"",s=e[i+"size"]||1;if(!(s<a("edgeLabelThreshold"))){if(0===a("edgeLabelSizePowRatio"))throw'"edgeLabelSizePowRatio" must not be 0.';varc,u=(t[i+"x"]+r[i+"x"])/2,l=(t[i+"y"]+r[i+"y"])/2,f=r[i+"x"]-t[i+"x"],p=r[i+"y"]-t[i+"y"],h=Math.atan2(p,f);c="fixed"===a("edgeLabelSize")?a("defaultEdgeLabelSize"):a("defaultEdgeLabelSize")*s*Math.pow(s,-1/a("edgeLabelSizePowRatio")),o.save(),e.active?(o.font=[a("activeFontStyle"),c+"px",a("activeFont")||a("font")].join(""),o.fillStyle=n):(o.font=[a("fontStyle"),c+"px",a("font")].join(""),o.fillStyle=n),o.textAlign="center",o.textBaseline="alphabetic",o.translate(u,l),o.rotate(h),o.fillText(e.weight,0,-s/2-3),o.restore()}}}},{key:"drawNodeWeight",value:function(e,t,r){varn,o=r("prefix")||"",a=e[o+"size"];a<r("labelThreshold")||(n="fixed"===r("labelSize")?r("defaultLabelSize"):r("labelSizeRatio")*a,t.font=(r("fontStyle")?r("fontStyle")+"":"")+n+"px "+r("font"),t.fillStyle="node"===r("labelColor")?e.color||r("defaultNodeColor"):r("defaultLabelColor"),t.textAlign="left",t.fillText(e.weight,Math.round(e[o+"x"]+1.5*a),Math.round(e[o+"y"]+n/3)))}}]),t}(c),p=function(e){e.s.settings({edgeLabelSize:"proportional",defaultEdgeLabelSize:20,edgeLabelSizePowRatio:.8,funcLabelsDef:function(t,r,n){e.drawNodeWeight(t,r,n),e.drawLabel(t,r,n)},funcHoversDef:function(t,r,n){e.drawOnHover(t,r,n,e.drawEdgeWeight)},funcEdgesArrow:function(t,r,n,o,a){vari=e.getColor(t,r,n,a);e.drawArrow(t,r,n,i,o,a),e.drawEdgeWeight(t,r,n,i,o,a)}})};t.exports=f},{"../../tracer_manager/util/index":70,"./directed_graph":47}],53:[function(e,t,r){"use strict";functionn(e,t){if(!(einstanceoft))thrownewTypeError("Cannot call a class as a function")}functiono(e,t){if(!e)thrownewReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeoft&&"function"!=typeoft?e:t}functiona(e,t){if("function"!=typeoft&&null!==t)thrownewTypeError("Super expression must either be null or a function, not "+typeoft);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)}vari=functionp(e,t,r){null===e&&(e=Function.prototype);varn=Object.getOwnPropertyDescriptor(e,t);if(void0===n){varo=Object.getPrototypeOf(e);returnnull===o?void0:p(o,t,r)}if("value"inn)returnn.value;vara=n.get;if(void0!==a)returna.call(r)},s=function(){functione(e,t){for(varr=0;r<t.length;r++){varn=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"inn&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}returnfunction(t,r,n){returnr&&e(t.prototype,r),n&&e(t,n),t}}(),c=e("./weighted_directed_graph"),u=e("./undirected_graph"),l=function(e){functiont(e){n(this,t);varr=o(this,Object.getPrototypeOf(t).call(this,e));returnr.e=u.prototype.e,r.drawOnHover=u.prototype.drawOnHover,r.drawEdge=u.prototype.drawEdge,r.isNew&&f(r),r}returna(t,e),s(t,null,[{key:"getClassName",value:function(){return"WeightedUndirectedGraphTracer"}}]),s(t,[{key:"setTreeData",value:function(e,r){returni(Object.getPrototypeOf(t.prototype),"setTreeData",this).call(this,e,r,!0)}},{key:"setData",value:function(e){returni(Object.getPrototypeOf(t.prototype),"setData",this).call(this,e,!0)}},{key:"drawEdgeWeight",value:function(e,t,r,n,o,a){vari=a("prefix")||"";if(t[i+"x"]>r[i+"x"]){vars=t;t=r,r=s}c.prototype.drawEdgeWeight.call(this,e,t,r,n,o,a)}}]),t}(c),f=function(e){e.s.settings({defaultEdgeType:"def",funcEdgesDef:function(t,r,n,o,a){vari=e.getColor(t,r,n,a);e.drawEdge(t,r,n,i,o,a),e.drawEdgeWeight(t,r,n,i,o,a)}})};t.exports=l},{"./undirected_graph":51,"./weighted_directed_graph":52}],54:[function(e,t,r){"use strict";varn=e("./request");t.exports=function(e){returnn(e,{type:"GET"})}},{"./request":57}],55:[function(e,t,r){"use strict";varn=e("./request");t.exports=function(e){returnn(e,{dataType:"json",type:"GET"})}},{"./request":57}],56:[function(e,t,r){"use strict";varn=e("./request");t.exports=function(e,t){returnn(e,{dataType:"json",type:"POST",data:JSON.stringify(t)})}},{"./request":57}],57:[function(e,t,r){"use strict";varn=e("rsvp"),o=e("../../app"),a=$,i=a.ajax,s=a.extend,c={};t.exports=function(e){vart=arguments.length<=1||void0===arguments[1]?{}:arguments[1];returno.setIsLoading(!0),newn.Promise(function(r,n){vara={success:function(e){o.setIsLoading(!1),r(e)},error:function(e){o.setIsLoading(!1),n(e)}},u=s({},c,t,a,{url:e});i(u)})}},{"../../app":3,rsvp:75}],58:[function(e,t,r){"use strict";varn=function(){functione(e,t){varr=[],n=!0,o=!1,a=void0;try{for(vari,s=e[Symbol.iterator]();!(n=(i=s.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(c){o=!0,a=c}finally{try{!n&&s["return"]&&s["return"]()}finally{if(o)throwa}}returnr}returnfunction(t,r){if(Array.isArray(t))returnt;if(Symbol.iteratorinObject(t))returne(t,r);thrownewTypeError("Invalid attempt to destructure non-iterable instance")}}(),o=e("../app"),a=e("../dom/toast"),i=function(){returno.getIsLoading()?(a.showErrorToast("Wait until it completes loading of previous file."),!0):!1},s=function(e){vart=window.location.href,r=newRegExp("[?&]"+e+"(=([^&#]*)|&|#|$)"),o=r.exec(t);if(!o||3!==o.length)returnnull;vara=n(o,3),i=a[2];returni},c=function(e){if(!e)returnnull;for(vart=window.location.hash.substr(1),r=t?t.split("&"):[],n=0;n<r.length;n++){varo=r[n].split("=");if(o[0]===e)returno[1]}returnnull},u=function(e,t){if(e&&t){for(varr=window.location.hash.substr(1),n=r?r.split("&"):[],o=!1,a=0;a<n.length&&!o;a++){vari=n[a].split("=");i[0]===e&&(i[1]=t,n[a]=i.join("="),o=!0)}o||n.push([e,t].join("="));vars=n.join("&");window.location.hash="#"+s}},l=function(e){if(e){for(vart=window.location.hash.substr(1),r=t?t.split("&"):[],n=0;n<r.length;n++){varo=r[n].split("=");if(o[0]===e){r.splice(n,1);break}}vara=r.join("&");window.location.hash="#"+a}},f=function(e,t,r){varn=e?e+(t?"/"+t+(r?"/"+r:""):""):"";u("path",n)},p=function(){vare=c("path");if(e){vart=e.split("/"),r=n(t,3),o=r[0],a=r[1],i=r[2];return{category:o,algorithm:a,file:i}}return!1};t.exports={checkLoading:i,getParameterByName:s,getHashValue:c,setHashValue:u,removeHashValue:l,setPath:f,getPath:p}},{"../app":3,"../dom/toast":27}],59:[function(e,t,r){"use strict";varn=e("./load_algorithm"),o=e("./load_categories"),a=e("./load_file"),i=e("./load_scratch_paper"),s=e("./share_scratch_paper"),c=e("./load_wiki_list"),u=e("./load_wiki");t.exports={loadAlgorithm:n,loadCategories:o,loadFile:a,loadScratchPaper:i,shareScratchPaper:s,loadWikiList:c,loadWiki:u}},{"./load_algorithm":60,"./load_categories":61,"./load_file":62,"./load_scratch_paper":63,"./load_wiki":64,"./load_wiki_list":65,"./share_scratch_paper":66}],60:[function(e,t,r){"use strict";varn=e("./ajax/get_json"),o=e("../utils"),a=o.getAlgorithmDir;t.exports=function(e,t){varr=a(e,t);returnn(r+"desc.json")}},{"../utils":73,"./ajax/get_json":55}],61:[function(e,t,r){"use strict";varn=e("./ajax/get_json");t.exports=function(){returnn("./algorithm/category.json")}},{"./ajax/get_json":55}],62:[function(e,t,r){"use strict";varn=e("rsvp"),o=e("../app"),a=e("../utils"),i=a.getFileDir,s=a.isScratchPaper,c=e("./helpers"),u=c.checkLoading,l=c.setPath,f=e("./ajax/get"),p=function(e){
returnn.hash({data:f(e+"data.js"),code:f(e+"code.js")})},h=function(e){returno.getEditor().clearContent(),p(e).then(function(t){o.updateCachedFile(e,t),o.getEditor().setContent(t)})},d=function(e){returne&&void0!==e.data&&void0!==e.code};t.exports=function(e,t,r,a){returnnewn.Promise(function(n,c){if(u())c();else{s(e)?l(e,o.getLoadedScratch()):l(e,t,r),$("#explanation").html(a);varf=i(e,t,r);o.setLastFileUsed(f);varp=o.getCachedFile(f);d(p)?(o.getEditor().setContent(p),n()):h(f).then(n,c)}})}},{"../app":3,"../utils":73,"./ajax/get":54,"./helpers":58,rsvp:75}],63:[function(e,t,r){"use strict";varn=e("rsvp"),o=e("../app"),a=e("../utils"),i=a.getFileDir,s=e("./ajax/get_json"),c=e("./load_algorithm"),u=function(e,t){returne[t+".js"].content};t.exports=function(e){returnnewn.Promise(function(t,r){o.setLoadedScratch(e),s("https://api.github.com/gists/"+e).then(function(r){varn=r.files,a="scratch",s=e;c(a,s).then(function(e){varr=u(n,"data"),c=u(n,"code"),l=i(a,s,"scratch_paper");o.updateCachedFile(l,{data:r,code:c,"CREDIT.md":"Shared by an anonymous user from http://parkjs814.github.io/AlgorithmVisualizer"}),t({category:a,algorithm:s,data:e})})})})}},{"../app":3,"../utils":73,"./ajax/get_json":55,"./load_algorithm":60,rsvp:75}],64:[function(e,t,r){"use strict";varn=e("./ajax/get");t.exports=function(e){returnn("./AlgorithmVisualizer.wiki/"+e+".md")}},{"./ajax/get":54}],65:[function(e,t,r){"use strict";varn=e("./ajax/get_json");t.exports=function(){returnn("./wiki.json")}},{"./ajax/get_json":55}],66:[function(e,t,r){"use strict";varn=e("rsvp"),o=e("../app"),a=e("./ajax/post_json"),i=e("./helpers"),s=i.setPath;t.exports=function(){returnnewn.Promise(function(e,t){varr=o.getEditor(),n=r.dataEditor,i=r.codeEditor,c={description:"temp","public":!0,files:{"data.js":{content:n.getValue()},"code.js":{content:i.getValue()}}};a("https://api.github.com/gists",c).then(function(t){varr=t.id;o.setLoadedScratch(r),s("scratch",r);varn=location,a=n.href;$("#algorithm").html("Shared"),e(a)})})}},{"../app":3,"./ajax/post_json":56,"./helpers":58,rsvp:75}],67:[function(e,t,r){"use strict";varn=e("./manager"),o=e("../module/tracer/tracer");t.exports={init:function(){vare=newn;returno.prototype.manager=e,e}}},{"../module/tracer/tracer":50,"./manager":68}],68:[function(e,t,r){"use strict";varn=e("../app"),o=e("../dom/module_container"),a=e("../dom/top_menu"),i=$,s=i.each,c=i.extend,u=i.grep,l=1e6,f=function(){this.timer=null,this.pause=!1,this.capsules=[],this.interval=500};f.prototype={add:function(e){vart=o.create(),r={module:e.module,tracer:e,allocated:!0,defaultName:null,$container:t,isNew:!0};returnthis.capsules.push(r),r},allocate:function(e){vart=null,r=0;s(this.capsules,function(n,o){returno.module!==e.module||(r++,o.allocated)?void0:(o.tracer=e,o.allocated=!0,o.isNew=!1,t=o,!1)}),null===t&&(r++,t=this.add(e));varn=e.module.getClassName();returnt.defaultName=n+""+r,t.order=this.order++,t},deallocateAll:function(){this.order=0,this.reset(),s(this.capsules,function(e,t){t.allocated=!1})},removeUnallocated:function(){vare=!1;this.capsules=u(this.capsules,function(t){varr=!t.allocated;return(t.isNew||r)&&(e=!0),r&&t.$container.remove(),!r}),e&&this.place()},place:function(){vare=this.capsules;s(e,function(t,r){varn=100,o=100/e.length,a=o*r.order;r.$container.css({top:a+"%",width:n+"%",height:o+"%"}),r.tracer.resize()})},resize:function(){this.command("resize")},isPause:function(){returnthis.pause},setInterval:function(e){a.setInterval(e)},reset:function(){this.traces=[],this.traceIndex=-1,this.stepCnt=0,this.timer&&clearTimeout(this.timer),this.command("clear")},pushStep:function(e,t){if(this.stepCnt++>l)throw"Tracer's stack overflow";varr=this.traces.length;0==r&&(r+=this.newStep());varn=this.traces[r-1];n.push(c(t,{capsule:e}))},newStep:function(){vare=arguments.length<=0||void0===arguments[0]?-1:arguments[0],t=this.traces.length;returnt>0&&~e&&this.traces[t-1].push(e),this.traces.push([])},pauseStep:function(){this.traceIndex<0||(this.pause=!0,this.timer&&clearTimeout(this.timer),a.activateBtnPause())},resumeStep:function(){this.pause=!1,this.step(this.traceIndex+1),a.deactivateBtnPause()},step:function(e){vart=arguments.length<=1||void0===arguments[1]?{}:arguments[1],r=this;if(!(isNaN(e)||e>=this.traces.length||0>e)){this.traceIndex=e;varo=this.traces[e];o.forEach(function(e){return"number"==typeofe?voidn.getEditor().highlightLine(e):voide.capsule.tracer.processStep(e,t)}),t.virtual||this.command("refresh"),this.pause||(this.timer=setTimeout(function(){r.nextStep(t)||a.resetTopMenuButtons()},this.interval))}},prevStep:function(){vare=arguments.length<=0||void0===arguments[0]?{}:arguments[0];this.command("clear");vart=this.traceIndex-1;if(0>t)returnthis.traceIndex=-1,this.command("refresh"),!1;for(varr=0;t>r;r++)this.step(r,c(e,{virtual:!0}));returnthis.step(t),!0},nextStep:function(){vare=arguments.length<=0||void0===arguments[0]?{}:arguments[0],t=this.traceIndex+1;returnt>=this.traces.length?(this.traceIndex=this.traces.length-1,!1):(this.step(t,e),!0)},visualize:function(){this.traceIndex=-1,this.resumeStep()},command:function(){for(vare=arguments.length,t=Array(e),r=0;e>r;r++)t[r]=arguments[r];varn=t.shift();s(this.capsules,function(e,r){r.allocated&&r.tracer.module.prototype[n].apply(r.tracer,t)})},findOwner:function(e){vart=null;returns(this.capsules,function(r,n){returnn.$container[0]===e?(t=n,!1):void0}),t.tracer}},t.exports=f},{"../app":3,"../dom/module_container":10,"../dom/top_menu":28}],69:[function(e,t,r){"use strict";varn=JSON.parse,o=function(e){returnn(e,function(e,t){return"Infinity"===t?1/0:t})};t.exports=o},{}],70:[function(e,t,r){"use strict";varn=e("./to_json"),o=e("./from_json"),a=e("./refine_by_type");t.exports={toJSON:n,fromJSON:o,refineByType:a}},{"./from_json":69,"./refine_by_type":71,"./to_json":72}],71:[function(e,t,r){"use strict";varn="function"==typeofSymbol&&"symbol"==typeofSymbol.iterator?function(e){returntypeofe}:function(e){returne&&"function"==typeofSymbol&&e.constructor===Symbol?"symbol":typeofe},o=function(e){switch("undefined"==typeofe?"undefined":n(e)){case"number":returni(e);case"boolean":returns(e);default:returna(e)}},a=function(e){return""===e?"":e},i=function(e){returne===1/0?"∞":e},s=function(e){returne?"T":"F"};t.exports=o},{}],72:[function(e,t,r){"use strict";varn=JSON.stringify,o=function(e){returnn(e,function(e,t){returnt===1/0?"Infinity":t})};t.exports=o},{}],73:[function(e,t,r){"use strict";varn=function(e,t){return"scratch"==e},o=function(e,t){returnn(e)?"./algorithm/scratch_paper/":"./algorithm/"+e+"/"+t+"/"},a=function(e,t,r){returnn(e)?"./algorithm/scratch_paper/":"./algorithm/"+e+"/"+t+"/"+r+"/"};t.exports={isScratchPaper:n,getAlgorithmDir:o,getFileDir:a}},{}],74:[function(e,t,r){functionn(){l&&s&&(l=!1,s.length?u=s.concat(u):f=-1,u.length&&o())}functiono(){if(!l){vare=setTimeout(n);l=!0;for(vart=u.length;t;){for(s=u,u=[];++f<t;)s&&s[f].run();f=-1,t=u.length}s=null,l=!1,clearTimeout(e)}}functiona(e,t){this.fun=e,this.array=t}functioni(){}vars,c=t.exports={},u=[],l=!1,f=-1;c.nextTick=function(e){vart=newArray(arguments.length-1);if(arguments.length>1)for(varr=1;r<arguments.length;r++)t[r-1]=arguments[r];u.push(newa(e,t)),1!==u.length||l||setTimeout(o,0)},a.prototype.run=function(){this.fun.apply(null,this.array)},c.title="browser",c.browser=!0,c.env={},c.argv=[],c.version="",c.versions={},c.on=i,c.addListener=i,c.once=i,c.off=i,c.removeListener=i,c.removeAllListeners=i,c.emit=i,c.binding=function(e){thrownewError("process.binding is not supported")},c.cwd=function(){return"/"},c.chdir=function(e){thrownewError("process.chdir is not supported")},c.umask=function(){return0}},{}],75:[function(e,t,r){(function(r,n){(function(){"use strict";functiono(e){return"function"==typeofe||"object"==typeofe&&null!==e}functiona(e){return"function"==typeofe}functioni(e){return"object"==typeofe&&null!==e}functions(){}functionc(e,t){for(varr=0,n=e.length;n>r;r++)if(e[r]===t)returnr;return-1}functionu(e){vart=e._promiseCallbacks;returnt||(t=e._promiseCallbacks={}),t}functionl(e,t){return"onerror"===e?void$e.on("error",t):2!==arguments.length?$e[e]:void($e[e]=t)}functionf(){setTimeout(function(){for(vare,t=0;t<je.length;t++){e=je[t];varr=e.payload;r.guid=r.key+r.id,r.childGuid=r.key+r.childId,r.error&&(r.stack=r.error.stack),$e.trigger(e.name,e.payload)}je.length=0},50)}functionp(e,t,r){1===je.push({name:e,payload:{key:t._guidKey,id:t._id,eventName:e,detail:t._result,childId:r&&r._id,label:t._label,timeStamp:ke(),error:$e["instrument-with-stack"]?newError(t._label):null}})&&f()}functionh(e,t,r){varn=this,o=n._state;if(o===Re&&!e||o===Ie&&!t)return$e.instrument&&Te("chained",n,n),n;n._onError=null;vara=newn.constructor(O,r),i=n._result;if($e.instrument&&Te("chained",n,a),o){vars=arguments[o-1];$e.async(function(){F(o,a,s,i)})}elseL(n,a,e,t);returna}functiond(e,t){varr=this;if(e&&"object"==typeofe&&e.constructor===r)returne;varn=newr(O,t);returnE(n,e),n}functionv(e,t,r){returne===Re?{state:"fulfilled",value:r}:{state:"rejected",reason:r}}functiong(e,t,r,n){this._instanceConstructor=e,this.promise=newe(O,n),this._abortOnReject=r,this._validateInput(t)?(this._input=t,this.length=t.length,this._remaining=t.length,this._init(),0===this.length?A(this.promise,this._result):(this.length=this.length||0,this._enumerate(),0===this._remaining&&A(this.promise,this._result))):D(this.promise,this._validationError())}functiony(e,t){returnnewPe(this,e,!0,t).promise}functionm(e,t){functionr(e){E(a,e)}functionn(e){D(a,e)}varo=this,a=newo(O,t);if(!xe(e))returnD(a,newTypeError("You must pass an array to race.")),a;for(vari=e.length,s=0;a._state===Fe&&i>s;s++)L(o.resolve(e[s]),void0,r,n);returna}functionw(e,t){varr=this,n=newr(O,t);returnD(n,e),n}functionb(){thrownewTypeError("You must pass a resolver function as the first argument to the promise constructor")}function_(){thrownewTypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}functionx(e,t){this._id=ze++,this._label=t,this._state=void0,this._result=void0,this._subscribers=[],$e.instrument&&Te("created",this),O!==e&&("function"!=typeofe&&b(),thisinstanceofx?R(this,e):_())}functionk(){returnnewTypeError("A promises callback cannot return that same promise.")}functionO(){}functionS(e){try{returne.then}catch(t){returnWe.error=t,We}}function$(e,t,r,n){try{e.call(t,r,n)}catch(o){returno}}functionj(e,t,r){$e.async(function(e){varn=!1,o=$(r,t,function(r){n||(n=!0,t!==r?E(e,r,void0):A(e,r))},function(t){n||(n=!0,D(e,t))},"Settle: "+(e._label||" unknown promise"));!n&&o&&(n=!0,D(e,o))},e)}functionT(e,t){t._state===Re?A(e,t._result):t._state===Ie?(t._onError=null,D(e,t._result)):L(t,void0,function(r){t!==r?E(e,r,void0):A(e,r)},function(t){D(e,t)})}functionC(e,t,r){t.constructor===e.constructor&&r===Ce&&constructor.resolve===Ee?T(e,t):r===We?D(e,We.error):void0===r?A(e,t):a(r)?j(e,t,r):A(e,t)}functionE(e,t){e===t?A(e,t):o(t)?C(e,t,S(t)):A(e,t)}functionP(e){e._onError&&e._onError(e._result),M(e)}functionA(e,t){e._state===Fe&&(e._result=t,e._state=Re,0===e._subscribers.length?$e.instrument&&Te("fulfilled",e):$e.async(M,e))}functionD(e,t){e._state===Fe&&(e._state=Ie,e._result=t,$e.async(P,e))}functionL(e,t,r,n){varo=e._subscribers,a=o.length;e._onError=null,o[a]=t,o[a+Re]=r,o[a+Ie]=n,0===a&&e._state&&$e.async(M,e)}functionM(e){vart=e._subscribers,r=e._state;if($e.instrument&&Te(r===Re?"fulfilled":"rejected",e),0!==t.length){for(varn,o,a=e._result,i=0;i<t.length;i+=3)n=t[i],o=t[i+r],n?F(r,n,o,a):o(a);e._subscribers.length=0}}functionz(){this.error=null}functionN(e,t){try{returne(t)}catch(r){returnqe.error=r,qe}}functionF(e,t,r,n){varo,i,s,c,u=a(r);if(u){if(o=N(r,n),o===qe?(c=!0,i=o.error,o=null):s=!0,t===o)returnvoidD(t,k())}elseo=n,s=!0;t._state!==Fe||(u&&s?E(t,o):c?D(t,i):e===Re?A(t,o):e===Ie&&D(t,o))}functionR(e,t){varr=!1;try{t(function(t){r||(r=!0,E(e,t))},function(t){r||(r=!0,D(e,t))})}catch(n){D(e,n)}}functionI(e,t,r){this._superConstructor(e,t,!1,r)}functionW(e,t){returnnewI(Ne,e,t).promise}functionq(e,t){returnNe.all(e,t)}functionU(e,t){et[Ge]=e,et[Ge+1]=t,Ge+=2,2===Ge&&Ve()}functionV(){vare=r.nextTick,t=r.versions.node.match(/^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)$/);returnArray.isArray(t)&&"0"===t[1]&&"10"===t[2]&&(e=setImmediate),function(){e(X)}}functionH(){returnfunction(){Ue(X)}}functionB(){vare=0,t=newKe(X),r=document.createTextNode("");returnt.observe(r,{characterData:!0}),function(){r.data=e=++e%2}}functionG(){vare=newMessageChannel;returne.port1.onmessage=X,function(){e.port2.postMessage(0)}}functionY(){returnfunction(){setTimeout(X,1)}}functionX(){for(vare=0;Ge>e;e+=2){vart=et[e],r=et[e+1];t(r),et[e]=void0,et[e+1]=void0}Ge=0}functionJ(){try{vart=e,r=t("vertx");returnUe=r.runOnLoop||r.runOnContext,H()}catch(n){returnY()}}functionK(e){vart={};returnt.promise=newNe(function(e,r){t.resolve=e,t.reject=r},e),t}functionZ(e,t,r){returnNe.all(e,r).then(function(e){if(!a(t))thrownewTypeError("You must pass a function as filter's second argument.");for(varn=e.length,o=newArray(n),i=0;n>i;i++)o[i]=t(e[i]);returnNe.all(o,r).then(function(t){for(varr=newArray(n),o=0,a=0;n>a;a++)t[a]&&(r[o]=e[a],o++);returnr.length=o,r})})}functionQ(e,t,r){this._superConstructor(e,t,!0,r)}functionee(e,t,r){this._superConstructor(e,t,!1,r)}functionte(e,t){returnnewee(Ne,e,t).promise}functionre(e,t){returnnewnt(Ne,e,t).promise}functionne(e,t,r){returnNe.all(e,r).then(function(e){if(!a(t))thrownewTypeError("You must pass a function as map's second argument.");for(varn=e.length,o=newArray(n),i=0;n>i;i++)o[i]=t(e[i]);returnNe.all(o,r)})}functionoe(){this.value=void0}functionae(e){try{returne.then}catch(t){returnct.value=t,ct}}functionie(e,t,r){try{e.apply(t,r)}catch(n){returnct.value=n,ct}}functionse(e,t){for(varr,n,o={},a=e.length,i=newArray(a),s=0;a>s;s++)i[s]=e[s];for(n=0;n<t.length;n++)r=t[n],o[r]=i[n+1];returno}functionce(e){for(vart=e.length,r=newArray(t-1),n=1;t>n;n++)r[n-1]=e[n];returnr}functionue(e,t){return{then:function(r,n){returne.call(t,r,n)}}}functionle(e,t){varr=function(){for(varr,n=this,o=arguments.length,a=newArray(o+1),i=!1,s=0;o>s;++s){if(r=arguments[s],!i){if(i=he(r),i===ut){varc=newNe(O);returnD(c,ut.value),c}i&&i!==!0&&(r=ue(i,r))}a[s]=r}varu=newNe(O);returna[o]=function(e,r){e?D(u,e):void0===t?E(u,r):t===!0?E(u,ce(arguments)):xe(t)?E(u,se(arguments,t)):E(u,r)},i?pe(u,a,e,n):fe(u,a,e,n)};returnr.__proto__=e,r}functionfe(e,t,r,n){varo=ie(r,n,t);returno===ct&&D(e,o.value),e}functionpe(e,t,r,n){returnNe.all(t).then(function(t){varo=ie(r,n,t);returno===ct&&D(e,o.value),e})}functionhe(e){returne&&"object"==typeofe?e.constructor===Ne?!0:ae(e):!1}functionde(e,t){returnNe.race(e,t)}functionve(e,t){returnNe.reject(e,t)}functionge(e,t){returnNe.resolve(e,t)}functionye(e){throwsetTimeout(function(){throwe}),e}functionme(e,t){$e.async(e,t)}functionwe(){$e.on.apply($e,arguments)}functionbe(){$e.off.apply($e,arguments)}var_e;_e=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)};varxe=_e,ke=Date.now||function(){return(newDate).getTime()},Oe=Object.create||function(e){if(arguments.length>1)thrownewError("Second argument not supported");if("object"!=typeofe)thrownewTypeError("Argument must be an object");returns.prototype=e,news},Se={mixin:function(e){returne.on=this.on,e.off=this.off,e.trigger=this.trigger,e._promiseCallbacks=void0,e},on:function(e,t){if("function"!=typeoft)thrownewTypeError("Callback must be a function");varr,n=u(this);r=n[e],r||(r=n[e]=[]),-1===c(r,t)&&r.push(t)},off:function(e,t){varr,n,o=u(this);returnt?(r=o[e],n=c(r,t),void(-1!==n&&r.splice(n,1))):void(o[e]=[])},trigger:function(e,t,r){varn,o,a=u(this);if(n=a[e])for(vari=0;i<n.length;i++)(o=n[i])(t,r)}},$e={instrument:!1};Se.mixin($e);varje=[],Te=p,Ce=h,Ee=d,Pe=g;g.prototype._validateInput=function(e){returnxe(e)},g.prototype._validationError=function(){returnnewError("Array Methods must be provided an Array")},g.prototype._init=function(){this._result=newArray(this.length)},g.prototype._enumerate=function(){for(vare=this.length,t=this.promise,r=this._input,n=0;t._state===Fe&&e>n;n++)this._eachEntry(r[n],n)},g.prototype._settleMaybeThenable=function(e,t){varr=this._instanceConstructor,n=r.resolve;if(n===Ee){varo=S(e);if(o===Ce&&e._state!==Fe)e._onError=null,this._settledAt(e._state,t,e._result);elseif("function"!=typeofo)this._remaining--,this._result[t]=this._makeResult(Re,t,e);elseif(r===Ne){vara=newr(O);C(a,e,o),this._willSettleAt(a,t)}elsethis._willSettleAt(newr(function(t){t(e)}),t)}elsethis._willSettleAt(n(e),t)},g.prototype._eachEntry=function(e,t){i(e)?this._settleMaybeThenable(e,t):(this._remaining--,this._result[t]=this._makeResult(Re,t,e))},g.prototype._settledAt=function(e,t,r){varn=this.promise;n._state===Fe&&(this._remaining--,this._abortOnReject&&e===Ie?D(n,r):this._result[t]=this._makeResult(e,t,r)),0===this._remaining&&A(n,this._result)},g.prototype._makeResult=function(e,t,r){returnr},g.prototype._willSettleAt=function(e,t){varr=this;L(e,void0,function(e){r._settledAt(Re,t,e)},function(e){r._settledAt(Ie,t,e)})};varAe=y,De=m,Le=w,Me="rsvp_"+ke()+"-",ze=0,Ne=x;x.cast=Ee,x.all=Ae,x.race=De,x.resolve=Ee,x.reject=Le,x.prototype={constructor:x,_guidKey:Me,_onError:function(e){vart=this;$e.after(function(){t._onError&&$e.trigger("error",e,t._label)})},then:Ce,"catch":function(e,t){returnthis.then(void0,e,t)},"finally":function(e,t){varr=this,n=r.constructor;returnr.then(function(t){returnn.resolve(e()).then(function(){returnt})},function(t){returnn.resolve(e()).then(function(){returnn.reject(t)})},t)}};varFe=void0,Re=1,Ie=2,We=newz,qe=newz;I.prototype=Oe(Pe.prototype),I.prototype._superConstructor=Pe,I.prototype._makeResult=v,I.prototype._validationError=function(){returnnewError("allSettled must be called with an array")};varUe,Ve,He=W,Be=q,Ge=0,Ye=({}.toString,U),Xe="undefined"!=typeofwindow?window:void0,Je=Xe||{},Ke=Je.MutationObserver||Je.WebKitMutationObserver,Ze="undefined"==typeofself&&"undefined"!=typeofr&&"[object process]"==={}.toString.call(r),Qe="undefined"!=typeofUint8ClampedArray&&"undefined"!=typeofimportScripts&&"undefined"!=typeofMessageChannel,et=newArray(1e3);Ve=Ze?V():Ke?B():Qe?G():void0===Xe&&"function"==typeofe?J():Y();vartt=K,rt=Z,nt=Q;Q.prototype=Oe(Pe.prototype),Q.prototype._superConstructor=Pe,Q.prototype._init=function(){this._result={}},Q.prototype._validateInput=function(e){returne&&"object"==typeofe},Q.prototype._validationError=function(){returnnewError("Promise.hash must be called with an object")},Q.prototype._enumerate=function(){vare=this,t=e.promise,r=e._input,n=[];for(varoinr)t._state===Fe&&Object.prototype.hasOwnProperty.call(r,o)&&n.push({position:o,entry:r[o]});vara=n.length;e._remaining=a;for(vari,s=0;t._state===Fe&&a>s;s++)i=n[s],e._eachEntry(i.entry,i.position)},ee.prototype=Oe(nt.prototype),ee.prototype._superConstructor=Pe,ee.prototype._makeResult=v,ee.prototype._validationError=function(){returnnewError("hashSettled must be called with an object")};varot,at=te,it=re,st=ne,ct=newoe,ut=newoe,lt=le;if("object"==typeofself)ot=self;else{if("object"!=typeofn)thrownewError("no global: `self` or `global` found");ot=n}varft=ot,pt=de,ht=ve,dt=ge,vt=ye;$e.async=Ye,$e.after=function(e){setTimeout(e,0)};if("undefined"!=typeofwindow&&"object"==typeofwindow.__PROMISE_INSTRUMENTATION__){vargt=window.__PROMISE_INSTRUMENTATION__;l("instrument",!0);for(varytingt)gt.hasOwnProperty(yt)&&we(yt,gt[yt])}varmt={race:pt,Promise:Ne,allSettled:He,hash:it,hashSettled:at,denodeify:lt,on:we,off:be,map:st,filter:rt,resolve:dt,reject:ht,all:Be,rethrow:vt,defer:tt,EventTarget:Se,configure:l,async:me};"function"==typeofdefine&&define.amd?define(function(){returnmt}):"undefined"!=typeoft&&t.exports?t.exports=mt:"undefined"!=typeofft&&(ft.RSVP=mt)}).call(this)}).call(this,e("_process"),"undefined"!=typeofglobal?global:"undefined"!=typeofself?self:"undefined"!=typeofwindow?window:{})},{_process:74}]},{},[32]);