-
Notifications
You must be signed in to change notification settings - Fork 967
/
workflow.bundled.js
8 lines (8 loc) · 219 KB
/
workflow.bundled.js
1
2
3
4
5
6
7
8
webpackJsonp([5],[,,,,function(t,e,i){"use strict";(function(t,n,o){function a(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=i(3),s=(a(r),i(22)),l=a(s),u=i(46),c=a(u),d=i(23),h=a(d),f=i(47),p=a(f),m=i(12),v=a(m),g=i(9),_=a(g),w=t.View.extend({tagName:"label",initialize:function(e){this.model=e&&e.model||new t.Model(e),this.tagName=e.tagName||this.tagName,this.setElement(n("<"+this.tagName+"/>")),this.listenTo(this.model,"change",this.render,this),this.render()},title:function(t){this.model.set("title",t)},value:function(){return this.model.get("title")},render:function(){return this.$el.removeClass().addClass("ui-label").addClass(this.model.get("cls")).html(this.model.get("title")),this}}),b=t.View.extend({initialize:function(e){this.model=e&&e.model||new t.Model({message:null,status:"info",cls:"",persistent:!1,fade:!0}).set(e),this.listenTo(this.model,"change",this.render,this),this.render()},update:function(t){this.model.set(t)},render:function(){this.$el.removeClass().addClass("ui-message").addClass(this.model.get("cls"));var t=this.model.get("status");if(this.model.get("large")?this.$el.addClass(("success"==t&&"done"||"danger"==t&&"error"||t)+"messagelarge"):this.$el.addClass("alert").addClass("alert-"+t),this.model.get("message")){if(this.$el.html(this.messageForDisplay()),this.$el[this.model.get("fade")?"fadeIn":"show"](),this.timeout&&window.clearTimeout(this.timeout),!this.model.get("persistent")){var e=this;this.timeout=window.setTimeout(function(){e.model.set("message","")},3e3)}}else this.$el.fadeOut();return this},messageForDisplay:function(){return o.escape(this.model.get("message"))}}),y=b.extend({messageForDisplay:function(){return this.model.get("message")}}),x=t.View.extend({initialize:function(e){this.model=e&&e.model||new t.Model({type:"text",placeholder:"",disabled:!1,readonly:!1,visible:!0,cls:"",area:!1,color:null,style:null}).set(e),this.tagName=this.model.get("area")?"textarea":"input",this.setElement(n("<"+this.tagName+"/>")),this.listenTo(this.model,"change",this.render,this),this.render()},events:{input:"_onchange"},value:function(t){return void 0!==t&&this.model.set("value","string"==typeof t?t:""),this.model.get("value")},render:function(){var t=this;this.$el.removeClass().addClass("ui-"+this.tagName).addClass(this.model.get("cls")).addClass(this.model.get("style")).attr("id",this.model.id).attr("type",this.model.get("type")).attr("placeholder",this.model.get("placeholder")).css("color",this.model.get("color")||"").css("border-color",this.model.get("color")||"");var e=this.model.get("datalist");return n.isArray(e)&&e.length>0&&this.$el.autocomplete({source:function(e,i){i(t.model.get("datalist"))},change:function(){t._onchange()}}),this.model.get("value")!==this.$el.val()&&this.$el.val(this.model.get("value")),o.each(["readonly","disabled"],function(e){t.model.get(e)?t.$el.attr(e,!0):t.$el.removeAttr(e)}),this.$el[this.model.get("visible")?"show":"hide"](),this},_onchange:function(){this.value(this.$el.val()),this.model.get("onchange")&&this.model.get("onchange")(this.model.get("value"))}}),C=t.View.extend({initialize:function(e){this.model=e&&e.model||new t.Model(e),this.setElement(n("<div/>").append(this.$info=n("<div/>")).append(this.$hidden=n("<div/>"))),this.listenTo(this.model,"change",this.render,this),this.render()},value:function(t){return void 0!==t&&this.model.set("value",t),this.model.get("value")},render:function(){return this.$el.attr("id",this.model.id),this.$hidden.val(this.model.get("value")),this.model.get("info")?this.$info.show().text(this.model.get("info")):this.$info.hide(),this}}),k=t.View.extend({initialize:function(e){var i=this;this.model=e&&e.model||new t.Model(e),this.setElement(n("<div/>").append(this.$info=n("<div/>")).append(this.$file=n("<input/>").attr("type","file").addClass("ui-margin-bottom")).append(this.$text=n("<textarea/>").addClass("ui-textarea").attr("disabled",!0)).append(this.$wait=n("<i/>").addClass("fa fa-spinner fa-spin"))),this.listenTo(this.model,"change",this.render,this),this.$file.on("change",function(t){i._readFile(t)}),this.render()},value:function(t){return void 0!==t&&this.model.set("value",t),this.model.get("value")},render:function(){return this.$el.attr("id",this.model.id),this.model.get("info")?this.$info.show().text(this.model.get("info")):this.$info.hide(),this.model.get("value")?this.$text.text(this.model.get("value")).show():this.$text.hide(),this.model.get("wait")?this.$wait.show():this.$wait.hide(),this},_readFile:function(t){var e=this,i=t.target.files&&t.target.files[0];if(i){var n=new FileReader;n.onload=function(){e.model.set({wait:!1,value:this.result})},this.model.set({wait:!0,value:null}),n.readAsText(i)}}});e.default={Button:v.default.ButtonDefault,ButtonIcon:v.default.ButtonIcon,ButtonCheck:v.default.ButtonCheck,ButtonMenu:v.default.ButtonMenu,ButtonLink:v.default.ButtonLink,Input:x,Label:w,Message:b,UnescapedMessage:y,Upload:k,Modal:_.default,RadioButton:h.default.RadioButton,Checkbox:h.default.Checkbox,Radio:h.default.Radio,Select:l.default,Hidden:C,Slider:c.default,Drilldown:p.default}}).call(e,i(1),i(0),i(2))},function(t,e,i){"use strict";function n(t){return"[object Array]"===k.call(t)}function o(t){return"[object ArrayBuffer]"===k.call(t)}function a(t){return"undefined"!=typeof FormData&&t instanceof FormData}function r(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer}function s(t){return"string"==typeof t}function l(t){return"number"==typeof t}function u(t){return void 0===t}function c(t){return null!==t&&"object"==typeof t}function d(t){return"[object Date]"===k.call(t)}function h(t){return"[object File]"===k.call(t)}function f(t){return"[object Blob]"===k.call(t)}function p(t){return"[object Function]"===k.call(t)}function m(t){return c(t)&&p(t.pipe)}function v(t){return"undefined"!=typeof URLSearchParams&&t instanceof URLSearchParams}function g(t){return t.replace(/^\s*/,"").replace(/\s*$/,"")}function _(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)}function w(t,e){if(null!==t&&void 0!==t)if("object"==typeof t||n(t)||(t=[t]),n(t))for(var i=0,o=t.length;i<o;i++)e.call(null,t[i],i,t);else for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&e.call(null,t[a],a,t)}function b(){function t(t,i){"object"==typeof e[i]&&"object"==typeof t?e[i]=b(e[i],t):e[i]=t}for(var e={},i=0,n=arguments.length;i<n;i++)w(arguments[i],t);return e}function y(t,e,i){return w(e,function(e,n){t[n]=i&&"function"==typeof e?x(e,i):e}),t}var x=i(27),C=i(74),k=Object.prototype.toString;t.exports={isArray:n,isArrayBuffer:o,isBuffer:C,isFormData:a,isArrayBufferView:r,isString:s,isNumber:l,isObject:c,isUndefined:u,isDate:d,isFile:h,isBlob:f,isFunction:p,isStream:m,isURLSearchParams:v,isStandardBrowserEnv:_,forEach:w,merge:b,extend:y,trim:g}},function(t,e,i){"use strict";function n(t,e){return function(i){if(t.hasOwnProperty(i))return t[i];if(!e)throw new Error("I do not know how to modify the following string: "+i+". Change your TeX file or submit a feature request at https://github.com/digitalheir/tex-to-unicode/issues.");return i+e}}Object.defineProperty(e,"__esModule",{value:!0}),e.lookupOrAppend=n},,,function(t,e,i){"use strict";(function(t,i,n){Object.defineProperty(e,"__esModule",{value:!0});var o=t.View.extend({className:"ui-modal",optionsDefault:{container:"body",title:"ui-modal",cls:"ui-modal",body:"",backdrop:!0,height:null,width:null,closing_events:!1,closing_callback:null,title_separator:!0},buttonList:{},initialize:function(t){this.options=i.defaults(t||{},this.optionsDefault),n(this.options.container).prepend(this.el),t&&this.render()},show:function(t){if(t&&(this.options=i.defaults(t,this.optionsDefault),this.render()),!this.visible&&(this.visible=!0,this.$el.fadeIn("fast"),this.options.closing_events)){var e=this;n(document).on("keyup.ui-modal",function(t){27==t.keyCode&&e.hide(!0)}),this.$backdrop.on("click",function(){e.hide(!0)})}},hide:function(t){this.visible=!1,this.$el.fadeOut("fast"),this.options.closing_callback&&this.options.closing_callback(t),n(document).off("keyup.ui-modal"),this.$backdrop.off("click")},render:function(){var t=this;if(this.$el.html(this._template()),this.$header=this.$(".modal-header"),this.$dialog=this.$(".modal-dialog"),this.$body=this.$(".modal-body"),this.$footer=this.$(".modal-footer"),this.$backdrop=this.$(".modal-backdrop"),this.$buttons=this.$(".buttons"),"progress"==this.options.body&&(this.options.body=n('<div class="progress progress-striped active"><div class="progress-bar progress-bar-info" style="width:100%"/></div>')),this.$el.removeClass().addClass("modal").addClass(this.options.cls),this.$header.find(".title").html(this.options.title),this.$body.html(this.options.body),this.$buttons.empty(),this.buttonList={},this.options.buttons){var e=0;n.each(this.options.buttons,function(i,o){var a=n("<button/>").attr("id","button-"+e++).text(i).click(o);t.$buttons.append(a).append(" "),t.buttonList[i]=a})}else this.$footer.hide();this.$backdrop[this.options.backdrop&&"addClass"||"removeClass"]("in"),this.$header[!this.options.title_separator&&"addClass"||"removeClass"]("no-separator"),this.$body.removeAttr("style"),this.options.height?(this.$body.css("height",this.options.height),this.$body.css("overflow","hidden")):this.$body.css("max-height",n(window).height()/2),this.options.width&&this.$dialog.css("width",this.options.width)},getButton:function(t){return this.buttonList[t]},enableButton:function(t){this.getButton(t).prop("disabled",!1)},disableButton:function(t){this.getButton(t).prop("disabled",!0)},showButton:function(t){this.getButton(t).show()},hideButton:function(t){this.getButton(t).hide()},scrollTop:function(){return this.$body.scrollTop()},_template:function(){return'<div class="modal-backdrop fade"/><div class="modal-dialog"><div class="modal-content"><div class="modal-header"><h4 class="title"/></div><div class="modal-body"/><div class="modal-footer"><div class="buttons"/></div></div></div>'}});e.default={View:o}}).call(e,i(1),i(2),i(0))},function(t,e,i){"use strict";function n(t){return"("+t+")"}Object.defineProperty(e,"__esModule",{value:!0}),e.simpleSuffix=function(t){return function(e){return e+t}},e.isSingleTerm=/^.$|^[0-9]+$/,e.addParenthesis=n},function(t,e,i){"use strict";(function(t,n,o){function a(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=i(3),s=a(r),l=i(4),u=a(l),c=t.View.extend({visible:!1,initialize:function(e){var i=this;this.model=e&&e.model||new t.Model({id:s.default.uid(),cls:"ui-portlet",title:"",icon:"",buttons:null,body:null,scrollable:!0,nopadding:!1,operations:null,collapsible:!1,collapsible_button:!1,collapsed:!1,onchange_title:null}).set(e),this.setElement(this._template()),this.$body=this.$(".portlet-body"),this.$title_text=this.$(".portlet-title-text"),this.$title_icon=this.$(".portlet-title-icon"),this.$header=this.$(".portlet-header"),this.$content=this.$(".portlet-content"),this.$backdrop=this.$(".portlet-backdrop"),this.$buttons=this.$(".portlet-buttons"),this.$operations=this.$(".portlet-operations"),this.model.get("body")&&this.append(this.model.get("body")),this.collapsible_button=new u.default.ButtonIcon({icon:"fa-eye",tooltip:"Collapse/Expand",cls:"ui-button-icon-plain",onclick:function(){i[i.collapsed?"expand":"collapse"]()}}),this.render()},render:function(){var t=this,e=this.model.attributes;return this.$el.removeClass().addClass(e.cls).attr("id",e.id),this.$header[e.title?"show":"hide"](),this.$title_text.html(e.title),n.each([this.$content,this.$body],function(t){t[e.nopadding?"addClass":"removeClass"]("no-padding")}),e.icon?this.$title_icon.removeClass().addClass("portlet-title-icon fa").addClass(e.icon).show():this.$title_icon.hide(),this.$title_text[e.collapsible?"addClass":"removeClass"]("no-highlight collapsible").off(),e.collapsible&&(this.$title_text.on("click",function(){t[t.collapsed?"expand":"collapse"]()}),e.collapsed?this.collapse():this.expand()),this.$title_text.prop("disabled",!e.onchange_title),e.onchange_title&&this.$title_text.make_text_editable({on_finish:function(t){e.onchange_title(t)}}),e.buttons?(this.$buttons.empty().show(),o.each(this.model.get("buttons"),function(e,i){i.$el.prop("id",e),t.$buttons.append(i.$el)})):this.$buttons.hide(),this.$operations.empty,e.collapsible_button&&this.$operations.append(this.collapsible_button.$el),e.operations&&o.each(e.operations,function(e,i){i.$el.prop("id",e),t.$operations.append(i.$el)}),this},append:function(t){this.$body.append(t)},empty:function(){this.$body.empty()},header:function(){return this.$header},body:function(){return this.$body},show:function(){this.visible=!0,this.$el.fadeIn("fast")},hide:function(){this.visible=!1,this.$el.hide()},enableButton:function(t){this.$buttons.find("#"+t).prop("disabled",!1)},disableButton:function(t){this.$buttons.find("#"+t).prop("disabled",!0)},hideOperation:function(t){this.$operations.find("#"+t).hide()},showOperation:function(t){this.$operations.find("#"+t).show()},setOperation:function(t,e){this.$operations.find("#"+t).off("click").on("click",e)},title:function(t){return t&&this.$title_text.html(t),this.$title_text.html()},collapse:function(){this.collapsed=!0,this.$content.height("0%"),this.$body.hide(),this.collapsible_button.setIcon("fa-eye-slash")},expand:function(){this.collapsed=!1,this.$content.height("100%"),this.$body.fadeIn("fast"),this.collapsible_button.setIcon("fa-eye")},disable:function(){this.$backdrop.show()},enable:function(){this.$backdrop.hide()},_template:function(){return o("<div/>").append(o("<div/>").addClass("portlet-header").append(o("<div/>").addClass("portlet-operations")).append(o("<div/>").addClass("portlet-title").append(o("<i/>").addClass("portlet-title-icon")).append(o("<span/>").addClass("portlet-title-text")))).append(o("<div/>").addClass("portlet-content").append(o("<div/>").addClass("portlet-body")).append(o("<div/>").addClass("portlet-buttons"))).append(o("<div/>").addClass("portlet-backdrop"))}});e.default={View:c}}).call(e,i(1),i(2),i(0))},function(t,e,i){"use strict";(function(t,n){Object.defineProperty(e,"__esModule",{value:!0});var o=i(3),a=function(t){return t&&t.__esModule?t:{default:t}}(o),r=t.View.extend({initialize:function(e){this.model=e&&e.model||new t.Model({id:a.default.uid(),title:"",icon:"",cls:"btn btn-default",wait:!1,wait_text:"Sending...",wait_cls:"btn btn-info",disabled:!1,percentage:-1}).set(e),this.setElement(n("<button/>").attr("type","button").append(this.$icon=n("<i/>")).append(this.$title=n("<span/>")).append(this.$progress=n("<div/>").append(this.$progress_bar=n("<div/>")))),this.listenTo(this.model,"change",this.render,this),this.render()},render:function(){var t=this,e=this.model.attributes;this.$el.removeClass().addClass("ui-button-default").addClass(e.disabled&&"disabled").attr("id",e.id).attr("disabled",e.disabled).off("click").on("click",function(){n(".tooltip").hide(),e.onclick&&!t.disabled&&e.onclick()}).tooltip({title:e.tooltip,placement:"bottom"}),this.$progress.addClass("progress").css("display",-1!==e.percentage?"block":"none"),this.$progress_bar.addClass("progress-bar").css({width:e.percentage+"%"}),this.$icon.removeClass().addClass("icon fa"),this.$title.removeClass().addClass("title"),e.wait?(this.$el.addClass(e.wait_cls).prop("disabled",!0),this.$icon.addClass("fa-spinner fa-spin ui-margin-right"),this.$title.html(e.wait_text)):(this.$el.addClass(e.cls),this.$icon.addClass(e.icon),this.$title.html(e.title),e.icon&&e.title&&this.$icon.addClass("ui-margin-right"))},show:function(){this.$el.show()},hide:function(){this.$el.hide()},disable:function(){this.model.set("disabled",!0)},enable:function(){this.model.set("disabled",!1)},wait:function(){this.model.set("wait",!0)},unwait:function(){this.model.set("wait",!1)},setIcon:function(t){this.model.set("icon",t)}}),s=r.extend({initialize:function(e){this.model=e&&e.model||new t.Model({id:a.default.uid(),title:"",icon:"",cls:""}).set(e),this.setElement(n("<a/>").append(this.$icon=n("<span/>"))),this.listenTo(this.model,"change",this.render,this),this.render()},render:function(){var t=this.model.attributes;this.$el.removeClass().addClass(t.cls).attr({id:t.id,href:t.href||"javascript:void(0)",title:t.title,target:t.target||"_top",disabled:t.disabled}).tooltip({placement:"bottom"}).off("click").on("click",function(){t.onclick&&!t.disabled&&t.onclick()}),this.$icon.removeClass().addClass(t.icon)}}),l=t.View.extend({initialize:function(e){this.model=e&&e.model||new t.Model({id:a.default.uid(),title:"Select/Unselect all",icons:["fa-square-o","fa-minus-square-o","fa-check-square-o"],value:0,onchange:function(){}}).set(e),this.setElement(n("<div/>").append(this.$icon=n("<span/>")).append(this.$title=n("<span/>"))),this.listenTo(this.model,"change",this.render,this),this.render()},render:function(t){var e=this,t=this.model.attributes;this.$el.addClass("ui-button-check").off("click").on("click",function(){e.model.set("value",0===e.model.get("value")&&2||0),t.onclick&&t.onclick()}),this.$title.html(t.title),this.$icon.removeClass().addClass("icon fa ui-margin-right").addClass(t.icons[t.value])},value:function(t,e){return void 0!==t&&(e&&0!==t&&(t=t!==e&&1||2),this.model.set("value",t),this.model.get("onchange")(this.model.get("value"))),this.model.get("value")}}),u=r.extend({initialize:function(e){this.model=e&&e.model||new t.Model({id:a.default.uid(),title:"",icon:"",cls:"ui-button-icon",disabled:!1}).set(e),this.setElement(n("<div/>").append(this.$button=n("<div/>").append(this.$icon=n("<i/>")).append(this.$title=n("<span/>")))),this.listenTo(this.model,"change",this.render,this),this.render()},render:function(t){var t=this.model.attributes;this.$el.removeClass().addClass(t.cls).addClass(t.disabled&&"disabled").attr("disabled",t.disabled).attr("id",t.id).off("click").on("click",function(){n(".tooltip").hide(),!t.disabled&&t.onclick&&t.onclick()}),this.$button.addClass("button").tooltip({title:t.tooltip,placement:"bottom"}),this.$icon.removeClass().addClass("icon fa").addClass(t.icon),this.$title.addClass("title").html(t.title),t.icon&&t.title&&this.$icon.addClass("ui-margin-right")}}),c=r.extend({$menu:null,initialize:function(e){this.model=e&&e.model||new t.Model({id:"",title:"",pull:"right",icon:null,onclick:null,cls:"ui-button-icon ui-button-menu",tooltip:"",target:"",href:"",onunload:null,visible:!0,tag:""}).set(e),this.collection=new t.Collection,this.setElement(n("<div/>").append(this.$root=n("<div/>").append(this.$icon=n("<i/>")).append(this.$title=n("<span/>")))),this.listenTo(this.model,"change",this.render,this),this.listenTo(this.collection,"change add remove reset",this.render,this),this.render()},render:function(){var t=this,e=this.model.attributes;this.$el.removeClass().addClass("dropdown").addClass(e.cls).attr("id",e.id).css({display:e.visible&&this.collection.where({visible:!0}).length>0?"block":"none"}),this.$root.addClass("root button dropdown-toggle").attr("data-toggle","dropdown").tooltip({title:e.tooltip,placement:"bottom"}).off("click").on("click",function(t){n(".tooltip").hide(),t.preventDefault(),e.onclick&&e.onclick()}),this.$icon.removeClass().addClass("icon fa").addClass(e.icon),this.$title.removeClass().addClass("title").html(e.title),e.icon&&e.title&&this.$icon.addClass("ui-margin-right"),this.$menu&&this.$menu.remove(),this.collection.length>0&&(this.$menu=n("<ul/>").addClass("menu dropdown-menu").addClass("pull-"+t.model.get("pull")).attr("role","menu"),this.$el.append(this.$menu)),this.collection.each(function(e){var i=e.attributes;if(i.visible){var o=n("<a/>").addClass("dropdown-item").attr({href:i.href,target:i.target}).append(n("<i/>").addClass("fa").addClass(i.icon).css("display",i.icon?"inline-block":"none")).append(i.title).on("click",function(t){i.onclick&&(t.preventDefault(),i.onclick())});t.$menu.append(n("<li/>").append(o)),i.divider&&t.$menu.append(n("<li/>").addClass("divider"))}})},addMenu:function(t){this.collection.add(a.default.merge(t,{title:"",target:"",href:"",onclick:null,divider:!1,visible:!0,icon:null,cls:"button-menu btn-group"}))}});e.default={ButtonDefault:r,ButtonLink:s,ButtonIcon:u,ButtonCheck:l,ButtonMenu:c}}).call(e,i(1),i(0))},,,,function(t,e,i){"use strict";(function(e){function n(t,e){!o.isUndefined(t)&&o.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var o=i(5),a=i(77),r={"Content-Type":"application/x-www-form-urlencoded"},s={adapter:function(){var t;return"undefined"!=typeof XMLHttpRequest?t=i(28):void 0!==e&&(t=i(28)),t}(),transformRequest:[function(t,e){return a(e,"Content-Type"),o.isFormData(t)||o.isArrayBuffer(t)||o.isBuffer(t)||o.isStream(t)||o.isFile(t)||o.isBlob(t)?t:o.isArrayBufferView(t)?t.buffer:o.isURLSearchParams(t)?(n(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):o.isObject(t)?(n(e,"application/json;charset=utf-8"),JSON.stringify(t)):t}],transformResponse:[function(t){if("string"==typeof t)try{t=JSON.parse(t)}catch(t){}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(t){return t>=200&&t<300}};s.headers={common:{Accept:"application/json, text/plain, */*"}},o.forEach(["delete","get","head"],function(t){s.headers[t]={}}),o.forEach(["post","put","patch"],function(t){s.headers[t]=o.merge(r)}),t.exports=s}).call(e,i(76))},function(t,e,i){"use strict";function n(t){for(var i in t)e.hasOwnProperty(i)||(e[i]=t[i])}Object.defineProperty(e,"__esModule",{value:!0}),n(i(18)),n(i(19)),n(i(96))},function(t,e,i){"use strict";function n(t,e,i,n){if(void 0===n&&(n={writable:!0,enumerable:!0,configurable:!0}),!(t instanceof Object))throw new TypeError('"target" isn\'t an Object instance');if(void 0!==e){if(!(e instanceof Object))throw new TypeError('"properties" isn\'t an Object instance');if(void 0===n)n={writable:!0,enumerable:!0,configurable:!0};else if(!(n instanceof Object))throw new TypeError('"attributes" isn\'t an Object instance');if(void 0===i)for(var o in e)void 0!==e[o]&&Object.defineProperty(t,o,Object.create(n,{value:{value:e[o]}}));else if(i instanceof Array)i.forEach(function(i){void 0!==e[i]&&Object.defineProperty(t,i,Object.create(n,{value:{value:e[i]}}))});else{if(!(i instanceof Object))throw new TypeError('"keys" isn\'t an Object instance');for(var a in i){var o=i[a];void 0!==e[o]&&Object.defineProperty(t,a,Object.create(n,{value:{value:e[o]}}))}}}}function o(t,e,i,n){if(void 0===n&&(n=!0),!(t instanceof Object))throw new TypeError('"target" isn\'t an Object instance');if(void 0===e)return!0;if(!(e instanceof Object))throw new TypeError('"properties" isn\'t an Object instance');if(void 0===n&&(n=!0),void 0===i){for(var o in e)if(t[o]!==e[o]&&(void 0!==e[o]||!n))return!1}else{if(i instanceof Array)return i.every(function(i){return t[i]===e[i]||void 0===e[i]&&n});if(!(i instanceof Object))throw new TypeError('"keys" isn\'t an Object instance');for(var a in i){var o=i[a];if(t[a]!==e[o]&&(void 0!==e[o]||!n))return!1}}return!0}function a(t){return"number"==typeof t}function r(t){return"string"==typeof t}function s(t,e){if(!t)throw new Error(e);return t}function l(t,e){if(!(t instanceof Object))throw new TypeError(e||"Expected Object");return t}function u(t,e){if("string"!=typeof t)throw new TypeError(e||"Expected string");return t}function c(t,e){if(!d(t))throw new TypeError(e||"Expected Array");return t}function d(t){return!!t&&t.constructor===Array}function h(t,e){return[].concat.apply([],t.map(e))}Object.defineProperty(e,"__esModule",{value:!0}),e.updateProperties=n,e.testProperties=o,e.mustBeNumber=function(t,e){if(!a(t))throw new TypeError(e||"Expected number");return t},e.isNumber=a,e.isString=r,e.mustNotBeUndefined=s,e.mustBeObject=l,e.mustBeString=u,e.mustBeArray=c,e.isArray=d,e.mconcat=function(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];return e.reduceRight(t)},e.snd=function(t){return t[1]},e.concatMap=h},function(t,e,i){"use strict";function n(t){return a(t)||r(t)}function o(t){return e.measureTypes.hasOwnProperty(t)}function a(t){return o(t.type)&&W.isNumber(t.value)}function r(t){return m(t.expression)}function s(t){if(void 0===t)return!1;switch(t){case"Parentheses":case"Square":case"Dollar":return!0;default:return!1}}function l(t,e){return void 0!==t&&(void 0===e?"string"==typeof t.name:e===t.name)}function u(t){return void 0!==t&&"string"==typeof t.text}function c(t){return void 0!==t&&W.isArray(t.latex)}function d(t){return t.arguments instanceof Array}function h(t){return t===K.SUP||t===K.SUB}function f(t){switch(t){case"#":return"\\#";case"$":return"\\$";case"%":return"\\%";case"^":return"\\^{}";case"&":return"\\&";case"{":return"\\{";case"}":return"\\}";case"~":return"\\~{}";case"\\":return"\\textbackslash{}";case"_":return"\\_{}";default:return t}}function p(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];return 0===e.length?"string"==typeof t.type:e.some(function(e){return t.type===e})}function m(t){return g(t)||v(t)}function v(t){return E(t)||w(t)||b(t)||x(t)||C(t)||k(t)||$(t)||S(t)}function g(t){return E(t)||_(t)||b(t)||x(t)||C(t)||k(t)||$(t)||S(t)}function _(t){return void 0!==t&&void 0!==t.type&&u(t)&&p(t,e.typeTeXRaw)}function w(t){return void 0!==t&&"string"==typeof t.string&&"number"==typeof t.category}function b(t){return l(t)&&d(t)&&p(t,e.typeTeXComm,e.typeTeXCommS)}function y(t){return b(t)&&0===t.arguments.length}function x(t,i){return p(t,e.typeTeXEnv)}function C(t){return c(t)&&p(t)&&s(t.type)}function k(t){return void 0!==t&&"boolean"==typeof t.noNewPage&&(void 0===t.measure||n(t.measure))}function T(t){return h(t.type)}function $(t){return c(t)&&p(t,e.typeTeXBraces)}function O(t){return p(t,"FixArg")}function M(t){return p(t,"OptArg")}function S(t){return u(t)&&p(t,e.typeTeXComment)}function E(t){return void 0!==t&&0===Object.keys(t).length}function A(t){return{type:"FixArg",latex:t}}function R(t){return 1===t.length?{type:"OptArg",latex:t}:{type:"MOptArg",latex:t}}function j(t){return{type:"SymArg",latex:[t]}}function P(t){return{type:"ParArg",latex:[t]}}function D(t){return{type:"MOptArg",latex:t}}function B(t){return{type:"MSymArg",latex:t}}function V(t){return{type:"MParArg",latex:t}}function q(t){return{name:t,arguments:[],type:e.typeTeXCommS}}function z(t){return{text:t,type:e.typeTeXRaw,characterCategories:G.convertToTeXCharsDefault(t)}}function I(t,e,i,n){return{latex:n,type:t,startSymbol:e,endSymbol:i}}function L(t){return{latex:[t],type:e.typeTeXBraces}}function N(t){return{text:t,type:e.typeTeXComment}}function U(t){for(var i=[],n=1;n<arguments.length;n++)i[n-1]=arguments[n];return{name:t,arguments:i,type:e.typeTeXComm}}function Y(t,e,i){return{type:t,symbol:e,arguments:i}}function X(t,i){for(var n=[],o=2;o<arguments.length;o++)n[o-2]=arguments[o];return{name:t,latex:i,arguments:n,type:e.typeTeXEnv}}function F(t){var e=[];return H(t,e),e.join("")}function H(t,e){if(b(t))e.push("\\",t.name),t.arguments.forEach(function(t){return H(t,e)});else{if(x(t))throw new Error("not supported yet");if(C(t))e.push(t.startSymbol),t.latex.forEach(function(t){return H(t,e)}),e.push(t.endSymbol);else if(k(t))e.push("\n");else if(T(t))e.push(t.symbol),t.arguments&&t.arguments.forEach(function(t){return H(t,e)});else if($(t))e.push("{"),t.latex.forEach(function(t){return H(t,e)}),e.push("}");else if(S(t))e.push("%"+t.text+"\n");else if(_(t))e.push(t.text);else{if(w(t))throw new Error("not supported yet");if(O(t))e.push("{"),t.latex.forEach(function(t){return H(t,e)}),e.push("}");else{if(!M(t))throw new Error("Did not recognize "+JSON.stringify(t));e.push("["),t.latex.forEach(function(t){return H(t,e)}),e.push("]")}}}}Object.defineProperty(e,"__esModule",{value:!0});var W=i(18),G=i(33);e.isMeasure=n,e.measureTypes={pt:!0,mm:!0,cm:!0,in:!0,ex:!0,em:!0},e.isMeasureType=o,e.isBuiltInMeasure=a,e.isCustomMeasure=r,e.mathTypes={Parentheses:"Parentheses",Square:"Square",Dollar:"Dollar"},e.isMathType=s,e.isNameHaving=l,e.isTextHaving=u,e.isLaTeXHaving=c,e.isArgumentHaving=d,e.typeTeXSeq="TeXSeq",e.typeTeXEnv="TeXEnv",e.typeTeXBraces="TeXBraces",e.typeTeXComment="TeXComment",e.typeTeXRaw="TeXRaw",e.typeTeXComm="TeXComm",e.typeTeXCommS="TeXCommS";var K;!function(t){t[t.SUP=0]="SUP",t[t.SUB=1]="SUB"}(K=e.SubOrSuperSymbol||(e.SubOrSuperSymbol={})),e.isSubOrSuperSymbol=h,e.fromStringLaTeX=function(t){return z(e.protectString(t))},e.protectString=function(t){for(var e=[],i=0;i<t.length;i++)e.push(f(t.charAt(i)));return e.join()},e.protectChar=f,e.isTypeHaving=p,e.isLaTeXBlock=m,e.isLaTeXNoRaw=v,e.isLaTeXRaw=g,e.isTeXRaw=_,e.isTeXChar=w,e.isTeXComm=b,e.isTeXCommS=y,e.isTeXEnv=x,e.isTeXMath=C,e.isTeXLineBreak=k,e.isSubOrSuperScript=T,e.isTeXBraces=$,e.isFixArg=O,e.isOptArg=M,e.isTeXComment=S,e.isTeXEmpty=E,e.newFixArg=A,e.newOptArg=R,e.newSymArg=j,e.newParArg=P,e.newMOptArg=D,e.newMSymArg=B,e.newMParArg=V,e.newCommandS=q,e.newTeXRaw=z,e.newTeXMath=I,e.newTeXBraces=L,e.newTeXMathDol=function(t){return I("Dollar","$","$",t)},e.newTeXComment=N,e.newTeXComm=U,e.newSubOrSuperScript=Y,e.newTeXEnv=X,e.stringifyLaTeX=F},function(t,e,i){"use strict";(function(t,n,o){function a(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=i(3),s=(a(r),i(11)),l=a(s),u=i(4),c=a(u),d=i(48),h=a(d),f=i(44),p=a(f);e.default=t.View.extend({initialize:function(e){this.model=new t.Model({initial_errors:!1,cls:"ui-portlet-limited",icon:null,always_refresh:!0,status:"warning",hide_operations:!1,onchange:function(){}}).set(e),this.setElement("<div/>"),this.render()},update:function(t){var e=this;this.data.matchModel(t,function(t,i){var o=e.input_list[i];if(o&&o.options&&!n.isEqual(o.options,t.options)){o.options=t.options;var a=e.field_list[i];if(a.update){var r=[];if(-1!=["data","data_collection","drill_down"].indexOf(o.type))r=o.options;else for(var s in t.options){var l=t.options[s];l.length>2&&r.push({label:l[0],value:l[1]})}a.update(r),a.trigger("change"),Galaxy.emit.debug("form-view::update()","Updating options for "+i)}}})},wait:function(t){for(var e in this.input_list){var i=this.field_list[e];this.input_list[e].is_dynamic&&i.wait&&i.unwait&&i[t?"wait":"unwait"]()}},highlight:function(t,e,i){var n=this.element_list[t];if(n&&(n.error(e||"Please verify this parameter."),this.portlet.expand(),this.trigger("expand",t),!i)){var a=this.$el.parents().filter(function(){return-1!=["auto","scroll"].indexOf(o(this).css("overflow"))}).first();a.animate({scrollTop:a.scrollTop()+n.$el.offset().top-120},500)}},errors:function(t){if(this.trigger("reset"),t&&t.errors){var e=this.data.matchResponse(t.errors);for(var i in this.element_list){this.element_list[i];e[i]&&this.highlight(i,e[i],!0)}}},render:function(){var t=this;this.off("change"),this.off("reset"),this.field_list={},this.input_list={},this.element_list={},this.data=new p.default.Manager(this),this._renderForm(),this.data.create(),this.model.get("initial_errors")&&this.errors(this.model.attributes);var e=this.data.checksum();return this.on("change",function(i){var n=t.input_list[i];if(!n||n.refresh_on_change||t.model.get("always_refresh")){var o=t.data.checksum();o!=e&&(e=o,t.model.get("onchange")())}}),this.on("reset",function(){n.each(t.element_list,function(t){t.reset()})}),this},_renderForm:function(){o(".tooltip").remove();var t=this.model.attributes;this.message=new c.default.UnescapedMessage,this.section=new h.default.View(this,{inputs:t.inputs}),this.portlet=new l.default.View({icon:t.icon,title:t.title,cls:t.cls,operations:!t.hide_operations&&t.operations,buttons:t.buttons,collapsible:t.collapsible,collapsed:t.collapsed,onchange_title:t.onchange_title}),this.portlet.append(this.message.$el),this.portlet.append(this.section.$el),this.$el.empty(),t.inputs&&this.$el.append(this.portlet.$el),t.message&&this.message.update({persistent:!0,status:t.status,message:t.message}),Galaxy.emit.debug("form-view::initialize()","Completed")}})}).call(e,i(1),i(2),i(0))},,function(t,e,i){"use strict";(function(t,n,o){function a(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=i(3),s=a(r),l=i(12),u=a(l),c=t.View.extend({initialize:function(e){var i=this;this.data=[],this.data2=[],this.model=e&&e.model||new t.Model({id:s.default.uid(),cls:"ui-select",error_text:"No options available",empty_text:"Nothing selected",visible:!0,wait:!1,multiple:!1,searchable:!0,optional:!1,disabled:!1,readonly:!1,onchange:function(){},value:null,individual:!1,pagesize:20}).set(e),this.on("change",function(){i.model.get("onchange")&&i.model.get("onchange")(i.value())}),this.listenTo(this.model,"change:data",this._changeData,this),this.listenTo(this.model,"change:disabled",this._changeDisabled,this),this.listenTo(this.model,"change:wait",this._changeWait,this),this.listenTo(this.model,"change:visible",this._changeVisible,this),this.listenTo(this.model,"change:value",this._changeValue,this),this.listenTo(this.model,"change:multiple change:searchable change:cls change:id",this.render,this),this.render()},render:function(){var t=this;this.model.get("searchable")?this._renderSearchable():this._renderClassic(),this.$el.addClass(this.model.get("cls")).attr("id",this.model.get("id")),this.$select.empty().addClass("select").attr("id",this.model.get("id")+"_select").prop("multiple",this.model.get("multiple")).on("change",function(){t.value(t._getValue()),t.trigger("change")}),this._changeData(),this._changeWait(),this._changeVisible(),this._changeDisabled()},_renderClassic:function(){var t=this;this.$el.addClass(this.model.get("multiple")?"ui-select-multiple":"ui-select").append(this.$select=n("<select/>")).append(this.$dropdown=n("<div/>")).append(this.$resize=n("<div/>").append(this.$resize_icon=n("<i/>"))),this.model.get("multiple")?(this.$dropdown.hide(),this.$resize_icon.addClass("fa fa-angle-double-right fa-rotate-45").show(),this.$resize.removeClass().addClass("icon-resize").show().off("mousedown").on("mousedown",function(e){var i=e.pageY,o=t.$select.height();t.minHeight=t.minHeight||o,n("#dd-helper").show().on("mousemove",function(e){t.$select.height(Math.max(o+(e.pageY-i),t.minHeight))}).on("mouseup mouseleave",function(){n("#dd-helper").hide().off()})})):(this.$dropdown.show(),this.$resize.hide(),this.$resize_icon.hide())},_renderSearchable:function(){var t=this;this.$el.append(this.$select=n("<div/>")).append(this.$dropdown=n("<div/>")),this.$dropdown.hide(),this.model.get("multiple")||this.$dropdown.show().on("click",function(){t.$select.select2&&t.$select.select2("open")}),this.all_button=null,!this.model.get("multiple")||this.model.get("individual")||this.model.get("readonly")||(this.all_button=new u.default.ButtonCheck({onclick:function(){var e=[];0!==t.all_button.value()&&o.each(t.model.get("data"),function(t){e.push(t.value)}),t.value(e),t.trigger("change")}}),this.$el.prepend(this.all_button.$el))},_match:function(t,e){return!t||""==t||String(e).toUpperCase().indexOf(t.toUpperCase())>=0},_changeData:function(){var t=this;this.data=[],!this.model.get("multiple")&&this.model.get("optional")&&this.data.push({value:"__null__",label:t.model.get("empty_text")}),o.each(this.model.get("data"),function(e){t.data.push(e)}),0==this.length()&&this.data.push({value:"__null__",label:this.model.get("error_text")}),this.model.get("searchable")?(this.data2=[],o.each(this.data,function(e,i){t.data2.push({order:i,id:e.value,text:e.label,tags:e.tags})}),this.$select.data("select2")&&this.$select.select2("destroy"),this.matched_tags={},this.$select.select2({data:t.data2,closeOnSelect:!this.model.get("multiple"),multiple:this.model.get("multiple"),query:function(e){t.matched_tags={};var i=t.model.get("pagesize"),n=o.filter(t.data2,function(i){var n=!1;return o.each(i.tags,function(i){t._match(e.term,i)&&(n=t.matched_tags[i]=!0)}),n||t._match(e.term,i.text)});e.callback({results:n.slice((e.page-1)*i,e.page*i),more:n.length>=e.page*i})},formatResult:function(e){return o.escape(e.text)+'<div class="ui-tags">'+o.reduce(e.tags,function(e,i){return t.matched_tags[i]?e+' <div class="label label-info">'+o.escape(i)+"</div>":e},"")+"</div>"}}),this.$(".select2-container .select2-search input").off("blur")):(this.$select.find("option").remove(),o.each(this.data,function(e){t.$select.append(n("<option/>").attr("value",e.value).html(o.escape(e.label)))})),this.model.set("disabled",this.model.get("readonly")||0==this.length()),this._changeValue()},_changeDisabled:function(){this.model.get("searchable")?this.$select.select2(this.model.get("disabled")?"disable":"enable"):this.$select.prop("disabled",this.model.get("disabled"))},_changeWait:function(){this.$dropdown.removeClass().addClass("icon-dropdown fa").addClass(this.model.get("wait")?"fa-spinner fa-spin":"fa-caret-down")},_changeVisible:function(){this.$el[this.model.get("visible")?"show":"hide"](),this.$select[this.model.get("visible")?"show":"hide"]()},_changeValue:function(){if(this._setValue(this.model.get("value")),this.model.get("multiple")){if(this.all_button){var t=this._getValue();this.all_button.value(n.isArray(t)?t.length:0,this.length())}}else null!==this._getValue()||this.model.get("optional")||this._setValue(this.first())},value:function(t){return void 0!==t&&this.model.set("value",t),this._getValue()},first:function(){return this.data.length>0?this.data[0].value:null},exists:function(t){return o.findWhere(this.data,{value:t})},text:function(){var t=this._getValue(),e=this.exists(n.isArray(t)?t[0]:t);return e?e.label:""},show:function(){this.model.set("visible",!0)},hide:function(){this.model.set("visible",!1)},wait:function(){this.model.set("wait",!0)},unwait:function(){this.model.set("wait",!1)},disabled:function(){return this.model.get("disabled")},enable:function(){this.model.set("disabled",!1)},disable:function(){this.model.set("disabled",!0)},add:function(t,e){o.each(this.model.get("data"),function(e){e.keep&&!o.findWhere(t,{value:e.value})&&t.push(e)}),e&&t&&t.sort(e),this.model.set("data",t)},update:function(t){this.model.set("data",t)},setOnChange:function(t){this.model.set("onchange",t)},length:function(){return n.isArray(this.model.get("data"))?this.model.get("data").length:0},_setValue:function(t){var e=this;if(null!==t&&void 0!==t||(t="__null__"),this.model.get("multiple")?t=n.isArray(t)?t:[t]:n.isArray(t)&&(t=t.length>0?t[0]:"__null__"),this.model.get("searchable")){if(n.isArray(t)){var i=[];o.each(t,function(t){var n=o.findWhere(e.data2,{id:t});n&&i.push(n)}),t=i}else{t=o.findWhere(this.data2,{id:t})}this.$select.select2("data",t)}else this.$select.val(t)},_getValue:function(){var t=null;if(this.model.get("searchable")){var e=this.$select.select2("data");e&&(n.isArray(e)?(t=[],e.sort(function(t,e){return t.order-e.order}),o.each(e,function(e){t.push(e.id)})):t=e.id)}else t=this.$select.val();return s.default.isEmpty(t)?null:t}});e.default={View:c}}).call(e,i(1),i(0),i(2))},function(t,e,i){"use strict";(function(t,n,o){function a(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=i(3),s=a(r),l=i(12),u=a(l),c=t.View.extend({initialize:function(e){var i=this;this.model=e&&e.model||new t.Model({visible:!0,data:[],id:s.default.uid(),error_text:"No options available.",wait_text:"Please wait...",multiple:!1,optional:!1,onchange:function(){}}).set(e),this.listenTo(this.model,"change:value",this._changeValue,this),this.listenTo(this.model,"change:wait",this._changeWait,this),this.listenTo(this.model,"change:data",this._changeData,this),this.listenTo(this.model,"change:visible",this._changeVisible,this),this.on("change",function(){i.model.get("onchange")(i.value())}),this.render()},render:function(){var t=this;this.$el.empty().removeClass().addClass("ui-options").append(this.$message=n("<div/>")).append(this.$menu=n("<div/>").addClass("ui-options-menu")).append(this.$options=n(this._template())),this.all_button=null,this.model.get("multiple")&&(this.all_button=new u.default.ButtonCheck({onclick:function(){t.$("input").prop("checked",0!==t.all_button.value()),t.value(t._getValue()),t.trigger("change")}}),this.$menu.append(this.all_button.$el)),this._changeData(),this._changeWait(),this._changeVisible()},update:function(t){this.model.set("data",t)},_changeData:function(){var t=this;this.$options.empty(),this._templateOptions?this.$options.append(this._templateOptions(this.model.get("data"))):o.each(this.model.get("data"),function(e){t.$options.append(n(t._templateOption(e)).addClass("ui-option").tooltip({title:e.tooltip,placement:"bottom"}))});var t=this;this.$("input").on("change",function(){t.value(t._getValue()),t.trigger("change")}),this._changeValue(),this._changeWait()},_changeVisible:function(){this.$el[this.model.get("visible")?"show":"hide"]()},_changeWait:function(){this.model.get("wait")?0===this.length()&&(this._messageShow(this.model.get("wait_text"),"info"),this.$options.hide(),this.$menu.hide()):0===this.length()?(this._messageShow(this.model.get("error_text"),"danger"),this.$options.hide(),this.$menu.hide()):(this.$message.hide(),this.$options.css("display","inline-block"),this.$menu.show())},_changeValue:function(){this._setValue(this.model.get("value")),null!==this._getValue()||this.model.get("multiple")||this.model.get("optional")||this._setValue(this.first()),this.all_button&&this.all_button.value(n.isArray(this._getValue())?this._getValue().length:0,this.length())},value:function(t){return void 0!==t&&this.model.set("value",t),this._getValue()},first:function(){var t=this.$("input").first();return t.length>0?t.val():null},wait:function(){this.model.set("wait",!0)},unwait:function(){this.model.set("wait",!1)},length:function(){return this.$(".ui-option").length},_setValue:function(t){var e=this;if(void 0!==t&&(this.$("input").prop("checked",!1),null!==t)){var i=n.isArray(t)?t:[t];o.each(i,function(t){e.$('input[value="'+t+'"]').first().prop("checked",!0)})}},_getValue:function(){var t=[];return this.$(":checked").each(function(){t.push(n(this).val())}),s.default.isEmpty(t)?null:this.model.get("multiple")?t:t[0]},_messageShow:function(t,e){this.$message.show().removeClass().addClass("ui-message alert alert-"+e).html(t)},_template:function(){return n("<div/>").addClass("ui-options-list")}}),d=c.extend({_templateOption:function(t){var e=s.default.uid();return n("<div/>").addClass("ui-option").append(n("<input/>").attr({id:e,type:this.model.get("type"),name:this.model.id,value:t.value})).append(n("<label/>").addClass("ui-options-label").attr("for",e).html(t.label))}}),h={};h.View=d.extend({initialize:function(t){t.type="radio",d.prototype.initialize.call(this,t)}});var f={};f.View=d.extend({initialize:function(t){t.type="checkbox",t.multiple=!0,d.prototype.initialize.call(this,t)}});var p={};p.View=c.extend({initialize:function(t){c.prototype.initialize.call(this,t)},_setValue:function(t){void 0!==t&&(this.$("input").prop("checked",!1),this.$("label").removeClass("active"),this.$('[value="'+t+'"]').prop("checked",!0).closest("label").addClass("active"))},_templateOption:function(t){var e=n("<label/>").addClass("btn btn-default");return t.icon&&e.append(n("<i/>").addClass("fa").addClass(t.icon).addClass(!t.label&&"no-padding")),e.append(n("<input/>").attr({type:"radio",name:this.model.id,value:t.value})),t.label&&e.append(t.label),e},_template:function(){return n("<div/>").addClass("btn-group ui-radiobutton").attr("data-toggle","buttons")}}),e.default={Base:c,BaseIcons:d,Radio:h,RadioButton:p,Checkbox:f}}).call(e,i(1),i(0),i(2))},function(t,e,i){"use strict";(function(t,n){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var a=i(3),r=o(a),s=i(11),l=o(s),u=i(4),c=o(u),d=t.View.extend({initialize:function(t){var e=this;this.options=t,this.name=t.name||"element",this.multiple=t.multiple||!1,this.message=new c.default.Message,this.portlet=new l.default.View({cls:"ui-portlet-section"}),this.select=new c.default.Select.View({optional:t.optional}),this.button=new c.default.ButtonIcon({icon:"fa fa-sign-in",tooltip:"Insert new "+this.name,onclick:function(){e.add({id:e.select.value(),name:e.select.text()})}}),this.setElement(this._template(t)),this.$(".ui-list-message").append(this.message.$el),this.$(".ui-list-portlet").append(this.portlet.$el),this.$(".ui-list-button").append(this.button.$el),this.$(".ui-list-select").append(this.select.$el)},value:function(t){if(void 0!==t){if(this.portlet.empty(),n.isArray(t))for(var e in t){var i=t[e],o=null,a=null;"string"!=n.type(i)?(o=i.id,a=i.name):o=a=i,null!=o&&this.add({id:o,name:a})}this._refresh()}var r=[];return this.$(".ui-list-id").each(function(){r.push({id:n(this).prop("id"),name:n(this).find(".ui-list-name").html()})}),0==r.length?null:r},add:function(t){var e=this;if(0===this.$('[id="'+t.id+'"]').length)if(r.default.isEmpty(t.id))this.message.update({message:"Please select a valid "+this.name+".",status:"danger"});else{var i=n(this._templateRow({id:t.id,name:t.name}));i.on("click",function(){i.remove(),e._refresh()}),i.on("mouseover",function(){i.addClass("portlet-highlight")}),i.on("mouseout",function(){i.removeClass("portlet-highlight")}),this.portlet.append(i),this._refresh()}else this.message.update({message:"This "+this.name+" is already in the list."})},update:function(t){this.select.update(t)},_refresh:function(){this.$(".ui-list-id").length>0?(!this.multiple&&this.button.disable(),this.$(".ui-list-portlet").show()):(this.button.enable(),this.$(".ui-list-portlet").hide()),this.options.onchange&&this.options.onchange()},_template:function(t){return'<div class="ui-list"><div class="ui-margin-top"><span class="ui-list-button"/><span class="ui-list-select"/></div><div class="ui-list-message"/><div class="ui-list-portlet"/></div>'},_templateRow:function(t){return'<div id="'+t.id+'" class="ui-list-id"><span class="ui-list-delete fa fa-trash"/><span class="ui-list-name">'+t.name+"</span></div>"}});e.default={View:d}}).call(e,i(1),i(0))},function(t,e,i){"use strict";var n=i(0),o=function(t){return t&&t.__esModule?t:{default:t}}(n),a=o.default;a.fn.make_text_editable=function(t){var e="num_cols"in t?t.num_cols:30,i="num_rows"in t?t.num_rows:4,n="use_textarea"in t&&t.use_textarea,o="on_finish"in t?t.on_finish:null,r="help_text"in t?t.help_text:null,s=a(this);return s.addClass("editable-text").click(function(r){if(!(a(this).children(":input").length>0)){s.removeClass("editable-text");var l,u,c=function(t){s.find(":input").remove(),""!==t?s.text(t):s.html("<br>"),s.addClass("editable-text"),o&&o(t)},d="cur_text"in t?t.cur_text:s.text();n?(l=a("<textarea/>").attr({rows:i,cols:e}).text(a.trim(d)).keyup(function(t){27===t.keyCode&&c(d)}),u=a("<button/>").text("Done").click(function(){return c(l.val()),!1})):l=a("<input type='text'/>").attr({value:a.trim(d),size:e}).blur(function(){c(d)}).keyup(function(t){27===t.keyCode?a(this).trigger("blur"):13===t.keyCode&&c(a(this).val()),t.stopPropagation()}),s.text(""),s.append(l),u&&s.append(u),l.focus(),l.select(),r.stopPropagation()}}),r&&s.attr("title",r).tooltip(),s}},,function(t,e,i){"use strict";t.exports=function(t,e){return function(){for(var i=new Array(arguments.length),n=0;n<i.length;n++)i[n]=arguments[n];return t.apply(e,i)}}},function(t,e,i){"use strict";var n=i(5),o=i(78),a=i(80),r=i(81),s=i(82),l=i(29),u="undefined"!=typeof window&&window.btoa&&window.btoa.bind(window)||i(83);t.exports=function(t){return new Promise(function(e,c){var d=t.data,h=t.headers;n.isFormData(d)&&delete h["Content-Type"];var f=new XMLHttpRequest,p="onreadystatechange",m=!1;if(window.XMLHttpRequest||"undefined"==typeof window||!window.XDomainRequest||"withCredentials"in f||s(t.url)||(f=new window.XDomainRequest,p="onload",m=!0,f.onprogress=function(){},f.ontimeout=function(){}),t.auth){var v=t.auth.username||"",g=t.auth.password||"";h.Authorization="Basic "+u(v+":"+g)}if(f.open(t.method.toUpperCase(),a(t.url,t.params,t.paramsSerializer),!0),f.timeout=t.timeout,f[p]=function(){if(f&&(4===f.readyState||m)&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))){var i="getAllResponseHeaders"in f?r(f.getAllResponseHeaders()):null,n=t.responseType&&"text"!==t.responseType?f.response:f.responseText,a={data:n,status:1223===f.status?204:f.status,statusText:1223===f.status?"No Content":f.statusText,headers:i,config:t,request:f};o(e,c,a),f=null}},f.onerror=function(){c(l("Network Error",t,null,f)),f=null},f.ontimeout=function(){c(l("timeout of "+t.timeout+"ms exceeded",t,"ECONNABORTED",f)),f=null},n.isStandardBrowserEnv()){var _=i(84),w=(t.withCredentials||s(t.url))&&t.xsrfCookieName?_.read(t.xsrfCookieName):void 0;w&&(h[t.xsrfHeaderName]=w)}if("setRequestHeader"in f&&n.forEach(h,function(t,e){void 0===d&&"content-type"===e.toLowerCase()?delete h[e]:f.setRequestHeader(e,t)}),t.withCredentials&&(f.withCredentials=!0),t.responseType)try{f.responseType=t.responseType}catch(e){if("json"!==t.responseType)throw e}"function"==typeof t.onDownloadProgress&&f.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&f.upload&&f.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then(function(t){f&&(f.abort(),c(t),f=null)}),void 0===d&&(d=null),f.send(d)})}},function(t,e,i){"use strict";var n=i(79);t.exports=function(t,e,i,o,a){var r=new Error(t);return n(r,e,i,o,a)}},function(t,e,i){"use strict";t.exports=function(t){return!(!t||!t.__CANCEL__)}},function(t,e,i){"use strict";function n(t){this.message=t}n.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},n.prototype.__CANCEL__=!0,t.exports=n},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.supportedMarkups={ascii:!0,unicode:!0,html:!0}},function(t,e,i){"use strict";function n(t){return o(e.defaultCategories,t)}function o(t,e){for(var i=[],n=0;n<e.length;n++){var o=e.charAt(n);i.push({string:o,category:t(o)})}return i}Object.defineProperty(e,"__esModule",{value:!0}),e.defaultCategories=function(t){switch(t){case"\\":return 0;case"{":return 1;case"}":return 2;case"$":return 3;case"&":return 4;case"\r":return 5;case"#":return 6;case"^":return 7;case"_":return 8;case"\0":return 9;case" ":return 10;case"~":return 13;case"%":return 14;case"d":return 15;default:return 11}},e.convertToTeXCharsDefault=n,e.convertToTeXChars=o},function(t,e,i){!function(e,i){t.exports=i()}(0,function(){return function(t){function e(n){if(i[n])return i[n].exports;var o=i[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var i={};return e.m=t,e.c=i,e.i=function(t){return t},e.d=function(t,i,n){e.o(t,i)||Object.defineProperty(t,i,{configurable:!1,enumerable:!0,get:n})},e.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(i,"a",i),i},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=0)}([function(t,e,i){"use strict";function n(t){if(!(this instanceof n))return new n(t);this._=t}function o(t){return t instanceof n}function a(t){return"[object Array]"==={}.toString.call(t)}function r(t,e){return{status:!0,index:t,value:e,furthest:-1,expected:[]}}function s(t,e){return{status:!1,index:-1,value:null,furthest:t,expected:[e]}}function l(t,e){if(!e)return t;if(t.furthest>e.furthest)return t;var i=t.furthest===e.furthest?c(t.expected,e.expected):e.expected;return{status:t.status,index:t.index,value:t.value,furthest:e.furthest,expected:i}}function u(t,e){var i=t.slice(0,e).split("\n");return{offset:e,line:i.length,column:i[i.length-1].length+1}}function c(t,e){var i=t.length,n=e.length;if(0===i)return e;if(0===n)return t;for(var o={},a=0;a<i;a++)o[t[a]]=!0;for(var r=0;r<n;r++)o[e[r]]=!0;var s=[];for(var l in o)o.hasOwnProperty(l)&&s.push(l);return s.sort(),s}function d(t){if(!o(t))throw new Error("not a parser: "+t)}function h(t){if(!a(t))throw new Error("not an array: "+t)}function f(t){if("number"!=typeof t)throw new Error("not a number: "+t)}function p(t){if(!(t instanceof RegExp))throw new Error("not a regexp: "+t);for(var e=b(t),i=0;i<e.length;i++){var n=e.charAt(i);if("i"!==n&&"m"!==n&&"u"!==n)throw new Error('unsupported regexp flag "'+n+'": '+t)}}function m(t){if("function"!=typeof t)throw new Error("not a function: "+t)}function v(t){if("string"!=typeof t)throw new Error("not a string: "+t)}function g(t){return 1===t.length?t[0]:"one of "+t.join(", ")}function _(t,e){var i=e.index,n=i.offset;if(n===t.length)return", got the end of the input";var o=n>0?"'...":"'",a=t.length-n>12?"...'":"'";return" at line "+i.line+" column "+i.column+", got "+o+t.slice(n,n+12)+a}function w(t,e){return"expected "+g(e.expected)+_(t,e)}function b(t){var e=""+t;return e.slice(e.lastIndexOf("/")+1)}function y(t){return RegExp("^(?:"+t.source+")",b(t))}function x(){for(var t=[].slice.call(arguments),e=t.length,i=0;i<e;i+=1)d(t[i]);return n(function(i,n){for(var o,a=new Array(e),s=0;s<e;s+=1){if(o=l(t[s]._(i,n),o),!o.status)return o;a[s]=o.value,n=o.index}return l(r(n,a),o)})}function C(){for(var t={},e=0,i=[].slice.call(arguments),s=i.length,u=0;u<s;u+=1){var c=i[u];if(!o(c)){if(a(c)&&2===c.length&&"string"==typeof c[0]&&o(c[1])){var d=c[0];if(t[d])throw new Error("seqObj: duplicate key "+d);t[d]=!0,e++;continue}throw new Error("seqObj arguments must be parsers or [string, parser] array pairs.")}}if(0===e)throw new Error("seqObj expects at least one named parser, found zero");return n(function(t,e){for(var n,o={},u=0;u<s;u+=1){var c,d;if(a(i[u])?(c=i[u][0],d=i[u][1]):(c=null,d=i[u]),n=l(d._(t,e),n),!n.status)return n;c&&(o[c]=n.value),e=n.index}return l(r(e,o),n)})}function k(){var t=[].slice.call(arguments);if(0===t.length)throw new Error("seqMap needs at least one argument");var e=t.pop();return m(e),x.apply(null,t).map(function(t){return e.apply(null,t)})}function T(t){var e={};for(var i in t)({}).hasOwnProperty.call(t,i)&&function(i){var n=function(){return t[i](e)};e[i]=L(n)}(i);return e}function $(){var t=[].slice.call(arguments),e=t.length;if(0===e)return R("zero alternates");for(var i=0;i<e;i+=1)d(t[i]);return n(function(e,i){for(var n,o=0;o<t.length;o+=1)if(n=l(t[o]._(e,i),n),n.status)return n;return n})}function O(t,e){return M(t,e).or(A([]))}function M(t,e){d(t),d(e);var i=e.then(t).many();return t.chain(function(t){return i.map(function(e){return[t].concat(e)})})}function S(t){v(t);var e="'"+t+"'";return n(function(i,n){var o=n+t.length,a=i.slice(n,o);return a===t?r(o,a):s(n,e)})}function E(t,e){p(t),arguments.length>=2?f(e):e=0;var i=y(t),o=""+t;return n(function(t,n){var a=i.exec(t.slice(n));if(a){if(0<=e&&e<=a.length){var l=a[0],u=a[e];return r(n+l.length,u)}return s(n,"valid match group (0 to "+a.length+") in "+o)}return s(n,o)})}function A(t){return n(function(e,i){return r(i,t)})}function R(t){return n(function(e,i){return s(i,t)})}function j(t){if(o(t))return n(function(e,i){var n=t._(e,i);return n.index=i,n.value="",n});if("string"==typeof t)return j(S(t));if(t instanceof RegExp)return j(E(t));throw new Error("not a string, regexp, or parser: "+t)}function P(t){return d(t),n(function(e,i){var n=t._(e,i),o=e.slice(i,n.index);return n.status?s(i,'not "'+o+'"'):r(i,null)})}function D(t){return m(t),n(function(e,i){var n=e.charAt(i);return i<e.length&&t(n)?r(i+1,n):s(i,"a character matching "+t)})}function B(t){return D(function(e){return t.indexOf(e)>=0})}function V(t){return D(function(e){return t.indexOf(e)<0})}function q(t){return n(t(r,s))}function z(t,e){return D(function(i){return t<=i&&i<=e}).desc(t+"-"+e)}function I(t){return m(t),n(function(e,i){for(var n=i;n<e.length&&t(e.charAt(n));)n++;return r(n,e.slice(i,n))})}function L(t,e){arguments.length<2&&(e=t,t=void 0);var i=n(function(t,n){return i._=e()._,i._(t,n)});return t?i.desc(t):i}function N(){return R("fantasy-land/empty")}var U=n.prototype;U.parse=function(t){if("string"!=typeof t)throw new Error(".parse must be called with a string as its argument");var e=this.skip(H)._(t,0);return e.status?{status:!0,value:e.value}:{status:!1,index:u(t,e.furthest),expected:e.expected}},U.tryParse=function(t){var e=this.parse(t);if(e.status)return e.value;var i=w(t,e),n=new Error(i);throw n.type="ParsimmonError",n.result=e,n},U.or=function(t){return $(this,t)},U.trim=function(t){return this.wrap(t,t)},U.wrap=function(t,e){return k(t,this,e,function(t,e){return e})},U.thru=function(t){return t(this)},U.then=function(t){return d(t),x(this,t).map(function(t){return t[1]})},U.many=function(){var t=this;return n(function(e,i){for(var n=[],o=void 0;;){if(o=l(t._(e,i),o),!o.status)return l(r(i,n),o);i=o.index,n.push(o.value)}})},U.tie=function(){return this.map(function(t){h(t);for(var e="",i=0;i<t.length;i++)v(t[i]),e+=t[i];return e})},U.times=function(t,e){var i=this;return arguments.length<2&&(e=t),f(t),f(e),n(function(n,o){for(var a=[],s=void 0,u=void 0,c=0;c<t;c+=1){if(s=i._(n,o),u=l(s,u),!s.status)return u;o=s.index,a.push(s.value)}for(;c<e&&(s=i._(n,o),u=l(s,u),s.status);c+=1)o=s.index,a.push(s.value);return l(r(o,a),u)})},U.result=function(t){return this.map(function(){return t})},U.atMost=function(t){return this.times(0,t)},U.atLeast=function(t){return k(this.times(t),this.many(),function(t,e){return t.concat(e)})},U.map=function(t){m(t);var e=this;return n(function(i,n){var o=e._(i,n);return o.status?l(r(o.index,t(o.value)),o):o})},U.skip=function(t){return x(this,t).map(function(t){return t[0]})},U.mark=function(){return k(Y,this,Y,function(t,e,i){return{start:t,value:e,end:i}})},U.node=function(t){return k(Y,this,Y,function(e,i,n){return{name:t,value:i,start:e,end:n}})},U.sepBy=function(t){return O(this,t)},U.sepBy1=function(t){return M(this,t)},U.lookahead=function(t){return this.skip(j(t))},U.notFollowedBy=function(t){return this.skip(P(t))},U.desc=function(t){var e=this;return n(function(i,n){var o=e._(i,n);return o.status||(o.expected=[t]),o})},U.fallback=function(t){return this.or(A(t))},U.ap=function(t){return k(t,this,function(t,e){return t(e)})},U.chain=function(t){var e=this;return n(function(i,n){var o=e._(i,n);return o.status?l(t(o.value)._(i,o.index),o):o})},U.concat=U.or,U.empty=N,U.of=A,U["fantasy-land/ap"]=U.ap,U["fantasy-land/chain"]=U.chain,U["fantasy-land/concat"]=U.concat,U["fantasy-land/empty"]=U.empty,U["fantasy-land/of"]=U.of,U["fantasy-land/map"]=U.map;var Y=n(function(t,e){return r(e,u(t,e))}),X=n(function(t,e){return e>=t.length?s(e,"any character"):r(e+1,t.charAt(e))}),F=n(function(t,e){return r(t.length,t.slice(e))}),H=n(function(t,e){return e<t.length?s(e,"EOF"):r(e,null)}),W=E(/[0-9]/).desc("a digit"),G=E(/[0-9]*/).desc("optional digits"),K=E(/[a-z]/i).desc("a letter"),J=E(/[a-z]*/i).desc("optional letters"),Z=E(/\s*/).desc("optional whitespace"),Q=E(/\s+/).desc("whitespace");n.all=F,n.alt=$,n.any=X,n.createLanguage=T,n.custom=q,n.digit=W,n.digits=G,n.empty=N,n.eof=H,n.fail=R,n.formatError=w,n.index=Y,n.isParser=o,n.lazy=L,n.letter=K,n.letters=J,n.lookahead=j,n.makeFailure=s,n.makeSuccess=r,n.noneOf=V,n.notFollowedBy=P,n.of=A,n.oneOf=B,n.optWhitespace=Z,n.Parser=n,n.range=z,n.regex=E,n.regexp=E,n.sepBy=O,n.sepBy1=M,n.seq=x,n.seqMap=k,n.seqObj=C,n.string=S,n.succeed=A,n.takeWhile=I,n.test=D,n.whitespace=Q,n["fantasy-land/empty"]=N,n["fantasy-land/of"]=A,t.exports=n}])})},function(t,e,i){"use strict";function n(t){return new Error("I do not know command "+t)}Object.defineProperty(e,"__esModule",{value:!0}),e.unknownCommandError=n},function(t,e,i){"use strict";function n(t,e,i,n){return{name:t,optionalArguments:e,argumentCount:i,apply:n}}function o(t,e,i){return{name:t,optionalArguments:e,argumentCount:i}}function a(t,e){return{name:t,optionalArguments:0,argumentCount:e}}Object.defineProperty(e,"__esModule",{value:!0}),e.createCommandHandler=n,e.createKnownCommandWithOptArgs=o,e.createKnownCommandWithArgs=a},function(t,e,i){"use strict";function n(t){return"bb"===t||"mathbb"===t||"textbb"===t}function o(t){return"bf"===t||"mathbf"===t||"textbf"===t}function a(t){return"mono"===t}function r(t){return"frak"===t||"mathfrak"===t||"textfrak"===t}function s(t){return"it"===t||"mathit"===t||"textit"===t}function l(t){return"tt"===t||"mathtt"===t||"texttt"===t}function u(t){return"cal"===t||"mathcal"===t||"textcal"===t}function c(t){return"sup"===t||"mathsup"===t||"textsup"===t||"superscript"===t||"mathsuperscript"===t||"textsuperscript"===t}function d(t){return"sub"===t||"mathsub"===t||"textsub"===t||"subscript"===t||"mathsubscript"===t||"textsubscript"===t}function h(t){return e.formattingText.hasOwnProperty(t)||e.formattingMath.hasOwnProperty(t)||e.formattingNoMode.hasOwnProperty(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.formattingText={textbb:!0,textbf:!0,textfrak:!0,textit:!0,texttt:!0,textcal:!0,textsup:!0,textsub:!0,textsuperscript:!0,textsubscript:!0},e.formattingNoMode={bb:!0,bf:!0,frak:!0,it:!0,tt:!0,cal:!0,mono:!0,sup:!0,sub:!0,superscript:!0,subscript:!0},e.formattingMath={mathbb:!0,mathbf:!0,mathfrak:!0,mathit:!0,mathtt:!0,mathcal:!0,mathsup:!0,mathsub:!0,mathsuperscript:!0,mathsubscript:!0},e.isBbCmd=n,e.isBfCmd=o,e.isMonoCmd=a,e.isFrakCmd=r,e.isItCmd=s,e.isTtCmd=l,e.isCalCmd=u,e.isSupCmd=c,e.isSubCmd=d,e.isFormattingCmd=h},function(t,e,i){"use strict";function n(t){return e.superscriptCharacters.hasOwnProperty(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.superscriptCharacters={0:"⁰",1:"¹",2:"²",3:"³",4:"⁴",5:"⁵",6:"⁶",7:"⁷",8:"⁸",9:"⁹","+":"⁺","-":"⁻","=":"⁼","(":"⁽",")":"⁾",a:"ᵃ",b:"ᵇ",c:"ᶜ",d:"ᵈ",e:"ᵉ",f:"ᶠ",g:"ᵍ",h:"ʰ",i:"ⁱ",j:"ʲ",k:"ᵏ",l:"ˡ",m:"ᵐ",n:"ⁿ",o:"ᵒ",p:"ᵖ",r:"ʳ",s:"ˢ",t:"ᵗ",u:"ᵘ",v:"ᵛ",w:"ʷ",x:"ˣ",y:"ʸ",z:"ᶻ",A:"ᴬ",B:"ᴮ",D:"ᴰ",E:"ᴱ",G:"ᴳ",H:"ᴴ",I:"ᴵ",J:"ᴶ",K:"ᴷ",L:"ᴸ",M:"ᴹ",N:"ᴺ",O:"ᴼ",P:"ᴾ",R:"ᴿ",T:"ᵀ",U:"ᵁ",V:"ⱽ",W:"ᵂ","α":"ᵅ","β":"ᵝ","γ":"ᵞ","δ":"ᵟ","∊":"ᵋ","θ":"ᶿ","ι":"ᶥ","Φ":"ᶲ","φ":"ᵠ","χ":"ᵡ"},e.isSuperscriptCharacter=n,e.translateCharToSuperscript=function(t){return n(t)?e.superscriptCharacters[t]:void 0}},function(t,e,i){"use strict";function n(t){return e.oneArgsCommands.hasOwnProperty(t)}Object.defineProperty(e,"__esModule",{value:!0});var o=i(128),a=i(129),r=i(37);e.oneArgsCommands=Object.assign({},o.spaceCmds1arg,r.formattingText,r.formattingMath,r.formattingNoMode,a.diacriticsTextMode,a.diacriticsMathMode,{cyrchar:!0,vec:!0,mono:!0}),e.is1argsCommand=n},,,,function(t,e,i){"use strict";(function(t,n){Object.defineProperty(e,"__esModule",{value:!0});var o=i(3),a=function(t){return t&&t.__esModule?t:{default:t}}(o),r=t.View.extend({initialize:function(t){this.options=a.default.merge(t,{content:"No content available.",onchange:null,ondblclick:null,onconfirm:null,cls:"ui-table",selectable:!0,cls_tr:""}),this.setElement(this._template()),this.$thead=this.$("thead"),this.$tbody=this.$("tbody"),this.$tmessage=this.$("tmessage"),this.row=this._row(),this.row_count=0},events:{click:"_onclick",dblclick:"_ondblclick"},addHeader:function(t){this.row.append(n("<th/>").append(t))},appendHeader:function(){this.$thead.append(this.row),this.row=n("<tr/>")},add:function(t,e,i){var o=n("<td/>");e&&o.css("width",e),i&&o.css("text-align",i),this.row.append(o.append(t))},append:function(t,e){this._commit(t,e,!1)},prepend:function(t,e){this._commit(t,e,!0)},get:function(t){return this.$("#"+t)},del:function(t){var e=this.$tbody.find("#"+t);e.length>0&&(e.remove(),this.row_count--,this._refresh())},delAll:function(){this.$tbody.empty(),this.row_count=0,this._refresh()},value:function(t){if(this.options.selectable){this.before=this.$tbody.find(".current").attr("id"),void 0!==t&&(this.$tbody.find("tr").removeClass("current"),t&&this.$tbody.find("#"+t).addClass("current"));var e=this.$tbody.find(".current").attr("id");return void 0===e?null:(e!=this.before&&this.options.onchange&&this.options.onchange(t),e)}},size:function(){return this.$tbody.find("tr").length},_commit:function(t,e,i){this.del(t),this.row.attr("id",t),i?this.$tbody.prepend(this.row):this.$tbody.append(this.row),e&&(this.row.hide(),this.row.fadeIn()),this.row=this._row(),this.row_count++,this._refresh()},_row:function(){return n('<tr class="'+this.options.cls_tr+'"></tr>')},_onclick:function(t){var e=this.value(),i=n(t.target).closest("tr").attr("id");""!=i&&i&&e!=i&&(this.options.onconfirm?this.options.onconfirm(i):this.value(i))},_ondblclick:function(t){var e=this.value();e&&this.options.ondblclick&&this.options.ondblclick(e)},_refresh:function(){0==this.row_count?this.$tmessage.show():this.$tmessage.hide()},_template:function(){return'<div><table class="'+this.options.cls+'"><thead/><tbody/></table><tmessage>'+this.options.content+"</tmessage><div>"}});e.default={View:r}}).call(e,i(1),i(0))},function(t,e,i){"use strict";(function(t,n,o){Object.defineProperty(e,"__esModule",{value:!0});var a=i(3),r=(function(t){t&&t.__esModule}(a),t.Model.extend({initialize:function(t){this.app=t},checksum:function(){var t="",e=this;return this.app.section.$el.find(".section-row").each(function(){var i=n(this).attr("id"),o=e.app.field_list[i];o&&(t+=i+":"+JSON.stringify(o.value&&o.value())+":"+o.collapsed+";")}),t},create:function(){function t(t,e,n){i.flat_dict[t]=e,o[t]=n,i.app.element_list[e]&&i.app.element_list[e].$el.attr("tour_id",t)}function e(n,o){for(var a in o){var r=o[a];if(r.input){var l=r.input,u=n;switch(""!=n&&(u+="|"),u+=l.name,l.type){case"repeat":var c=[],d=null;for(var h in r){var f=h.indexOf("section-");-1!=f&&(f+="section-".length,c.push(parseInt(h.substr(f))),d||(d=h.substr(0,f)))}c.sort(function(t,e){return t-e});var a=0;for(var p in c)e(u+"_"+a++,r[d+c[p]]);break;case"conditional":var m=i.app.field_list[l.id].value();t(u+"|"+l.test_param.name,l.id,m);var v=s(l,m);-1!=v&&e(u,o[l.id+"-section-"+v]);break;case"section":e(!l.flat&&u||"",r);break;default:var g=i.app.field_list[l.id];if(g&&g.value){var m=g.value();if((void 0===l.ignore||l.ignore!=m)&&(g.collapsed&&l.collapsible_value&&(m=l.collapsible_value),t(u,l.id,m),l.payload))for(var _ in l.payload)t(_,l.id,l.payload[_])}}}}}var i=this,n={};this._iterate(this.app.section.$el,n);var o={};return this.flat_dict={},e("",n),o},match:function(t){return this.flat_dict&&this.flat_dict[t]},matchCase:function(t,e){return s(t,e)},matchModel:function(t,e){var i=this;l(t.inputs,function(t,n){i.flat_dict[n]&&e(t,i.flat_dict[n])})},matchResponse:function(t){function e(t,o){if("string"==typeof o){var a=n.flat_dict[t];a&&(i[a]=o)}else for(var r in o){var s=r;if(""!==t){var l="|";o instanceof Array&&(l="_"),s=t+l+s}e(s,o[r])}}var i={},n=this;return e("",t),i},_iterate:function(t,e){var i=this;n(t).children().each(function(){var t=this,o=n(t).attr("id");if(n(t).hasClass("section-row")){var a=i.app.input_list[o];e[o]=a&&{input:a}||{},i._iterate(t,e[o])}else i._iterate(t,e)})}})),s=function(t,e){"boolean"==t.test_param.type&&(e="true"==e?t.test_param.truevalue||"true":t.test_param.falsevalue||"false");for(var i in t.cases)if(t.cases[i].value==e)return i;return-1},l=function t(e,i,a,r){r=n.extend(!0,{},r),o.each(e,function(t){t&&t.type&&t.name&&(r[t.name]=t)});for(var l in e){var u=e[l];u.name=u.name||l;var c=a?a+"|"+u.name:u.name;switch(u.type){case"repeat":o.each(u.cache,function(e,n){t(e,i,c+"_"+n,r)});break;case"conditional":if(u.test_param){i(u.test_param,c+"|"+u.test_param.name,r);var d=s(u,u.test_param.value);-1!=d?t(u.cases[d].inputs,i,c,r):Galaxy.emit.debug("form-data::visitInputs() - Invalid case for "+c+".")}else Galaxy.emit.debug("form-data::visitInputs() - Conditional test parameter missing for "+c+".");break;case"section":t(u.inputs,i,c,r);break;default:i(u,c,r)}}};e.default={Manager:r,visitInputs:l}}).call(e,i(1),i(0),i(2))},,function(t,e,i){"use strict";(function(t,n){Object.defineProperty(e,"__esModule",{value:!0});var o=i(3),a=function(t){return t&&t.__esModule?t:{default:t}}(o),r=t.View.extend({initialize:function(e){var i=this;this.model=e&&e.model||new t.Model({id:a.default.uid(),min:null,max:null,step:null,precise:!1,split:1e4,value:null,onchange:function(){}}).set(e),this.setElement(this._template()),this.$el.attr("id",this.model.id),this.$text=this.$(".ui-form-slider-text"),this.$slider=this.$(".ui-form-slider-element");var o=[];this.$text.on("change",function(){i.value(n(this).val())}).on("keyup",function(t){o[t.which]=!1}).on("keydown",function(t){var e=t.which;o[e]=!0,i.model.get("is_workflow")&&o[16]&&52==e?(i.value("$"),event.preventDefault()):8==e||9==e||13==e||37==e||39==e||e>=48&&e<=57&&!o[16]||e>=96&&e<=105||(190==e||110==e)&&-1==n(this).val().indexOf(".")&&i.model.get("precise")||(189==e||109==e)&&-1==n(this).val().indexOf("-")||i._isParameter(n(this).val())||o[91]||o[17]||event.preventDefault()});var r=this.model.attributes;this.has_slider=null!==r.max&&null!==r.min&&r.max>r.min;var s=r.step;s||(s=r.precise&&this.has_slider?(r.max-r.min)/r.split:1),this.has_slider?(this.$text.addClass("ui-form-slider-left"),this.$slider.slider({min:r.min,max:r.max,step:s}).on("slide",function(t,e){i.value(e.value)})):this.$slider.hide(),this.listenTo(this.model,"change",this.render,this),this.render()},render:function(){var t=this.model.get("value");this.has_slider&&this.$slider.slider("value",t),t!==this.$text.val()&&this.$text.val(t)},value:function(t){var e=this.model.attributes;return void 0!==t&&(null===t||""===t||this._isParameter(t)||(isNaN(t)&&(t=0),!e.precise&&(t=Math.round(t)),null!==e.max&&(t=Math.min(t,e.max)),null!==e.min&&(t=Math.max(t,e.min))),this.model.set("value",t),this.model.trigger("change"),e.onchange(t)),this.model.get("value")},_isParameter:function(t){return this.model.get("is_workflow")&&"$"===String(t).substring(0,1)},_template:function(){return'<div class="ui-form-slider"><input class="ui-form-slider-text" type="text"/><div class="ui-form-slider-element"/></div>'}});e.default={View:r}}).call(e,i(1),i(0))},function(t,e,i){"use strict";(function(t,n){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var a=i(3),r=o(a),s=i(23),l=o(s),u=l.default.BaseIcons.extend({initialize:function(t){t.type=t.display||"checkbox",t.multiple="checkbox"==t.type,l.default.BaseIcons.prototype.initialize.call(this,t)},_setValue:function(e){if(l.default.BaseIcons.prototype._setValue.call(this,e),void 0!==e&&null!==e&&this.header_index){var i=this,o=t.isArray(e)?e:[e];n.each(o,function(t){var e=i.header_index[t];n.each(e,function(t){i._setState(t,!0)})})}},_setState:function(t,e){var i=this.$(".button-"+t),n=this.$(".subgroup-"+t);i.data("is_expanded",e),e?(n.show(),i.removeClass("fa-plus-square").addClass("fa-minus-square")):(n.hide(),i.removeClass("fa-minus-square").addClass("fa-plus-square"))},_templateOptions:function(){function e(t,e){var i=t.find(".button-"+e);i.on("click",function(){n._setState(e,!i.data("is_expanded"))})}function i(o,a,s){s=s||[];for(var l in a){var u=a[l],c=u.options&&u.options.length>0,d=s.slice(0);n.header_index[u.value]=d.slice(0);var h=t("<div/>");if(c){var f=r.default.uid(),p=t("<span/>").addClass("button-"+f).addClass("ui-drilldown-button fa fa-plus-square"),m=t("<div/>").addClass("subgroup-"+f).addClass("ui-drilldown-subgroup");h.append(t("<div/>").append(p).append(n._templateOption({label:u.name,value:u.value}))),d.push(f),i(m,u.options,d),h.append(m),e(h,f)}else h.append(n._templateOption({label:u.name,value:u.value}));o.append(h)}}var n=this;this.header_index={};var o=t("<div/>");return i(o,this.model.get("data")),o},_template:function(){return t("<div/>").addClass("ui-options-list drilldown-container").attr("id",this.model.id)}});e.default={View:u}}).call(e,i(0),i(2))},function(t,e,i){"use strict";(function(t,n,o,a){function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var s=i(3),l=r(s),u=i(4),c=(r(u),i(11)),d=r(c),h=i(49),f=r(h),p=i(50),m=r(p),v=i(51),g=r(v),_=t.View.extend({initialize:function(t,e){this.app=t,this.inputs=e.inputs,this.parameters=new g.default,this.setElement(n("<div/>")),this.render()},render:function(){var t=this;this.$el.empty(),o.each(this.inputs,function(e){t.add(e)})},add:function(t){var e=a.extend(!0,{},t);switch(e.id=t.id=l.default.uid(),this.app.input_list[e.id]=e,e.type){case"conditional":this._addConditional(e);break;case"repeat":this._addRepeat(e);break;case"section":this._addSection(e);break;default:this._addRow(e)}},_addConditional:function(t){var e=this;t.test_param.id=t.id,this.app.model.get("sustain_conditionals")&&(t.test_param.disabled=!0);var i=this._addRow(t.test_param);i.model&&i.model.set("onchange",function(i){var n=e.app.data.matchCase(t,i);for(var o in t.cases){var a=t.cases[o],r=e.$("#"+t.id+"-section-"+o),s=!1;for(var l in a.inputs)if(!a.inputs[l].hidden){s=!0;break}o==n&&s?r.fadeIn("fast"):r.hide()}e.app.trigger("change")});for(var n in t.cases){var o=new _(this.app,{inputs:t.cases[n].inputs});this._append(o.$el.addClass("ui-form-section"),t.id+"-section-"+n)}i.trigger("change")},_addRepeat:function(t){function e(e){var o=t.id+"-section-"+n++,r=new _(i.app,{inputs:e});a.add({id:o,$el:r.$el,ondel:function(){a.del(o),i.app.trigger("change")}})}for(var i=this,n=0,a=new f.default.View({title:t.title||"Repeat",min:t.min,max:t.max,onnew:function(){e(t.inputs),i.app.trigger("change")}}),r=o.size(t.cache),s=0;s<Math.max(Math.max(r,t.min||0),t.default||0);s++)e(s<r?t.cache[s]:t.inputs);this.app.model.get("sustain_repeats")&&a.hideOptions();var l=new m.default(this.app,{label:t.title||t.name,help:t.help,field:a});this._append(l.$el,t.id)},_addSection:function(t){var e=new d.default.View({title:t.title||t.name,cls:"ui-portlet-section",collapsible:!0,collapsible_button:!0,collapsed:!t.expanded});e.append(new _(this.app,{inputs:t.inputs}).$el),e.append(n("<div/>").addClass("ui-form-info").html(t.help)),this.app.on("expand",function(t){e.$("#"+t).length>0&&e.expand()}),this._append(e.$el,t.id)},_addRow:function(t){var e=this,i=t.id;t.onchange=t.onchange||function(){e.app.trigger("change",i)};var n=this.parameters.create(t);this.app.field_list[i]=n;var o=new m.default(this.app,{name:t.name,label:t.hide_label?"":t.label||t.name,value:t.value,text_value:t.text_value,collapsible_value:t.collapsible_value,collapsible_preview:t.collapsible_preview,help:t.help,argument:t.argument,disabled:t.disabled,color:t.color,style:t.style,backdrop:t.backdrop,hidden:t.hidden,fixed:t.fixed,field:n});return this.app.element_list[i]=o,this._append(o.$el,t.id),n},_append:function(t,e){this.$el.append(t.addClass("section-row").attr("id",e))}});e.default={View:_}}).call(e,i(1),i(0),i(2),i(0))},function(t,e,i){"use strict";(function(t,n,o){function a(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=i(3),s=a(r),l=i(11),u=a(l),c=i(4),d=a(c),h=t.View.extend({initialize:function(t){this.list={},this.options=s.default.merge(t,{title:"Repeat",empty_text:"Not available.",max:null,min:null}),this.button_new=new d.default.ButtonIcon({icon:"fa-plus",title:"Insert "+this.options.title,tooltip:"Add new "+this.options.title+" block",cls:"ui-button-icon ui-clear-float form-repeat-add",onclick:function(){t.onnew&&t.onnew()}}),this.setElement(n("<div/>").append(this.$list=n("<div/>")).append(n("<div/>").append(this.button_new.$el)))},size:function(){return o.size(this.list)},add:function(t){if(!t.id||this.list[t.id])return void Galaxy.emit.debug("form-repeat::add()","Duplicate or invalid repeat block id.");var e=new d.default.ButtonIcon({icon:"fa-trash-o",tooltip:"Delete this repeat block",cls:"ui-button-icon-plain form-repeat-delete",onclick:function(){t.ondel&&t.ondel()}}),i=new u.default.View({id:t.id,title:"placeholder",cls:t.cls||"ui-portlet-repeat",operations:{button_delete:e}});i.append(t.$el),i.$el.addClass("section-row").hide(),this.list[t.id]=i,this.$list.append(i.$el.fadeIn("fast")),this.options.max>0&&this.size()>=this.options.max&&this.button_new.disable(),this._refresh()},del:function(t){if(!this.list[t])return void Galaxy.emit.debug("form-repeat::del()","Invalid repeat block id.");this.$list.find("#"+t).remove(),delete this.list[t],this.button_new.enable(),this._refresh()},delAll:function(){for(var t in this.list)this.del(t)},hideOptions:function(){this.button_new.$el.hide(),o.each(this.list,function(t){t.hideOperation("button_delete")}),o.isEmpty(this.list)&&this.$el.append(n("<div/>").addClass("ui-form-info").html(this.options.empty_text))},_refresh:function(){var t=0;for(var e in this.list){var i=this.list[e];i.title(++t+": "+this.options.title),i[this.size()>this.options.min?"showOperation":"hideOperation"]("button_delete")}}});e.default={View:h}}).call(e,i(1),i(0),i(2))},function(t,e,i){"use strict";(function(t,i,n){Object.defineProperty(e,"__esModule",{value:!0}),e.default=t.View.extend({initialize:function(e,i){this.app=e,this.app_options=e.model?e.model.attributes:{},this.field=i&&i.field||new t.View,this.model=i&&i.model||new t.Model({text_enable:this.app_options.text_enable||"Enable",text_disable:this.app_options.text_disable||"Disable",cls_enable:this.app_options.cls_enable||"fa fa-caret-square-o-down",cls_disable:this.app_options.cls_disable||"fa fa-caret-square-o-up",always_refresh:this.app_options.always_refresh}).set(i),this.setElement(this._template()),this.$field=this.$(".ui-form-field"),this.$info=this.$(".ui-form-info"),this.$preview=this.$(".ui-form-preview"),this.$collapsible=this.$(".ui-form-collapsible"),this.$collapsible_text=this.$(".ui-form-collapsible-text"),this.$collapsible_icon=this.$(".ui-form-collapsible-icon"),this.$title=this.$(".ui-form-title"),this.$title_text=this.$(".ui-form-title-text"),this.$error_text=this.$(".ui-form-error-text"),this.$error=this.$(".ui-form-error"),this.$backdrop=this.$(".ui-form-backdrop"),this.$field.prepend(this.field.$el);var n=this.model.get("collapsible_value");this.field.collapsed=void 0!==n&&JSON.stringify(this.model.get("value"))==JSON.stringify(n),this.listenTo(this.model,"change",this.render,this),this.render();var o=this;this.$collapsible.on("click",function(){o.field.collapsed=!o.field.collapsed,e.trigger&&e.trigger("change"),o.render()}),this.field.model&&!this.model.get("always_refresh")&&this.listenTo(this.field.model,"change:value",function(){o.reset()})},backdrop:function(){this.model.set("backdrop",!0)},error:function(t){this.model.set("error_text",t)},reset:function(){!this.model.get("fixed")&&this.model.set("error_text",null)},render:function(){i(".tooltip").hide();var t=this.model.get("help",""),e=this.model.get("argument");e&&-1==t.indexOf("("+e+")")&&(t+=" ("+e+")"),this.$info.html(t),this.$el[this.model.get("hidden")?"hide":"show"](),this.$preview[this.field.collapsed&&this.model.get("collapsible_preview")||this.model.get("disabled")?"show":"hide"]().html(n.escape(this.model.get("text_value")));var o=this.model.get("error_text");if(this.$error[o?"show":"hide"](),this.$el[o?"addClass":"removeClass"]("ui-error"),this.$error_text.html(o),this.$backdrop[this.model.get("backdrop")?"show":"hide"](),this.field.collapsed||this.model.get("disabled")?this.$field.hide():this.$field.show(),this.field.model&&this.field.model.set({color:this.model.get("color"),style:this.model.get("style")}),this.model.get("disabled")||void 0===this.model.get("collapsible_value"))this.$title_text.show().text(this.model.get("label")),this.$collapsible.hide();else{var a=this.field.collapsed?"enable":"disable";this.$title_text.hide(),this.$collapsible.show(),this.$collapsible_text.text(this.model.get("label")),this.$collapsible_icon.removeClass().addClass("icon").addClass(this.model.get("cls_"+a)).attr("data-original-title",this.model.get("text_"+a)).tooltip({placement:"bottom"})}},_template:function(){return i("<div/>").addClass("ui-form-element").append(i("<div/>").addClass("ui-form-error ui-error").append(i("<span/>").addClass("fa fa-arrow-down")).append(i("<span/>").addClass("ui-form-error-text"))).append(i("<div/>").addClass("ui-form-title").append(i("<div/>").addClass("ui-form-collapsible").append(i("<i/>").addClass("ui-form-collapsible-icon")).append(i("<span/>").addClass("ui-form-collapsible-text"))).append(i("<span/>").addClass("ui-form-title-text"))).append(i("<div/>").addClass("ui-form-field").append(i("<span/>").addClass("ui-form-info")).append(i("<div/>").addClass("ui-form-backdrop"))).append(i("<div/>").addClass("ui-form-preview"))}})}).call(e,i(1),i(0),i(2))},function(t,e,i){"use strict";(function(t,n,o){function a(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=i(3),s=a(r),l=i(4),u=a(l),c=i(52),d=a(c),h=i(53),f=a(h),p=i(54),m=a(p),v=i(55),g=a(v),_=i(57),w=a(_);e.default=t.Model.extend({types:{text:"_fieldText",password:"_fieldText",select:"_fieldSelect",data_column:"_fieldSelect",genomebuild:"_fieldSelect",data:"_fieldData",data_collection:"_fieldData",integer:"_fieldSlider",float:"_fieldSlider",boolean:"_fieldBoolean",drill_down:"_fieldDrilldown",color:"_fieldColor",hidden:"_fieldHidden",hidden_data:"_fieldHidden",baseurl:"_fieldHidden",library_data:"_fieldLibrary",ftpfile:"_fieldFtp",upload:"_fieldUpload",genomespacefile:"_fieldGenomeSpace"},create:function(t){var e=this.types[t.type],i="function"==typeof this[e]?this[e].call(this,t):null;return i||(i=t.options?this._fieldSelect(t):this._fieldText(t),Galaxy.emit.debug("form-parameters::_addRow()","Auto matched field type ("+t.type+").")),void 0===t.value&&(t.value=null),i.value(t.value),i},_fieldData:function(t){return new d.default.View({id:"field-"+t.id,extensions:t.extensions,optional:t.optional,multiple:t.multiple,type:t.type,flavor:t.flavor,data:t.options,onchange:t.onchange})},_fieldSelect:function(t){if(t.is_workflow)return this._fieldText(t);"data_column"==t.type&&(t.error_text="Missing columns in referenced dataset.");var e=t.data;e||(e=[],n.each(t.options,function(t){e.push({label:t[0],value:t[1]})}));var i=u.default.Select;switch(t.display){case"checkboxes":i=u.default.Checkbox;break;case"radio":i=u.default.Radio;break;case"radiobutton":i=u.default.RadioButton}return new i.View({id:"field-"+t.id,data:e,error_text:t.error_text||"No options available",readonly:t.readonly,multiple:t.multiple,optional:t.optional,onchange:t.onchange,individual:t.individual,searchable:"workflow"!==t.flavor})},_fieldDrilldown:function(t){return t.is_workflow?this._fieldText(t):new u.default.Drilldown.View({id:"field-"+t.id,data:t.options,display:t.display,optional:t.optional,onchange:t.onchange})},_fieldText:function(t){if(t.options&&t.data)if(t.area=t.multiple,s.default.isEmpty(t.value))t.value=null;else if(o.isArray(t.value)){var e="";for(var i in t.value){if(e+=String(t.value[i]),!t.multiple)break;e+="\n"}t.value=e}return new u.default.Input({id:"field-"+t.id,type:t.type,area:t.area,readonly:t.readonly,placeholder:t.placeholder,datalist:t.datalist,onchange:t.onchange})},_fieldSlider:function(t){return new u.default.Slider.View({id:"field-"+t.id,precise:"float"==t.type,is_workflow:t.is_workflow,min:t.min,max:t.max,onchange:t.onchange})},_fieldHidden:function(t){return new u.default.Hidden({id:"field-"+t.id,info:t.info})},_fieldBoolean:function(t){return new u.default.RadioButton.View({id:"field-"+t.id,data:[{label:"Yes",value:"true"},{label:"No",value:"false"}],onchange:t.onchange})},_fieldColor:function(t){return new w.default({id:"field-"+t.id,onchange:t.onchange})},_fieldLibrary:function(t){return new f.default.View({id:"field-"+t.id,optional:t.optional,multiple:t.multiple,onchange:t.onchange})},_fieldFtp:function(t){return new m.default.View({id:"field-"+t.id,optional:t.optional,multiple:t.multiple,onchange:t.onchange})},_fieldGenomeSpace:function(t){var e=this;return new g.default.View({id:"field-"+t.id,onchange:function(){e.app.trigger("change")}})},_fieldUpload:function(t){return new u.default.Upload({id:"field-"+t.id,onchange:t.onchange})}})}).call(e,i(1),i(2),i(0))},function(t,e,i){"use strict";(function(t,n,o){function a(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=i(3),s=a(r),l=i(4),u=a(l),c=i(22),d=a(c),h={DISABLED:"disabled",ENABLED:"enabled",LINKED:"linked"},f={data:[{src:"hda",icon:"fa-file-o",tooltip:"Single dataset",multiple:!1,batch:h.DISABLED},{src:"hda",icon:"fa-files-o",tooltip:"Multiple datasets",multiple:!0,batch:h.LINKED},{src:"hdca",icon:"fa-folder-o",tooltip:"Dataset collection",multiple:!1,batch:h.LINKED}],data_multiple:[{src:"hda",icon:"fa-files-o",tooltip:"Multiple datasets",multiple:!0,batch:h.DISABLED},{src:"hdca",icon:"fa-folder-o",tooltip:"Dataset collections",multiple:!0,batch:h.DISABLED}],data_collection:[{src:"hdca",icon:"fa-folder-o",tooltip:"Dataset collection",multiple:!1,batch:h.DISABLED}],workflow_data:[{src:"hda",icon:"fa-file-o",tooltip:"Single dataset",multiple:!1,batch:h.DISABLED}],workflow_data_multiple:[{src:"hda",icon:"fa-files-o",tooltip:"Multiple datasets",multiple:!0,batch:h.DISABLED}],workflow_data_collection:[{src:"hdca",icon:"fa-folder-o",tooltip:"Dataset collection",multiple:!1,batch:h.DISABLED}],module_data:[{src:"hda",icon:"fa-file-o",tooltip:"Single dataset",multiple:!1,batch:h.DISABLED},{src:"hda",icon:"fa-files-o",tooltip:"Multiple datasets",multiple:!0,batch:h.ENABLED}],module_data_collection:[{src:"hdca",icon:"fa-folder-o",tooltip:"Dataset collection",multiple:!1,batch:h.DISABLED},{src:"hdca",icon:"fa-folder",tooltip:"Multiple collections",multiple:!0,batch:h.ENABLED}]},p=t.View.extend({initialize:function(e){var i=this;this.model=e&&e.model||new t.Model({src_labels:{hda:"dataset",hdca:"dataset collection"},pagelimit:100,statustimer:1e3}).set(e),this.setElement(n("<div/>").addClass("ui-select-content")),this.button_product=new u.default.RadioButton.View({value:"false",data:[{icon:"fa fa-chain",value:"false",tooltip:"Linked inputs will be run in matched order with other datasets e.g. use this for matching forward and reverse reads."},{icon:"fa fa-chain-broken",value:"true",tooltip:"Unlinked dataset inputs will be run against *all* other inputs."}]});var o=n("<div/>").addClass("ui-form-info").append(n("<i/>").addClass("fa fa-sitemap")).append(n("<span/>").html("This is a batch mode input field. Separate jobs will be triggered for each dataset selection."));this.$batch={linked:o.clone(),enabled:o.clone().append(n("<div/>").append(n("<div/>").addClass("ui-form-title").html("Batch options:")).append(this.button_product.$el)).append(n("<div/>").css("clear","both"))},this.$el.on("dragenter",function(t){this.lastenter=t.target,i.$el.addClass("ui-dragover")}).on("dragover",function(t){t.preventDefault()}).on("dragleave",function(t){this.lastenter===t.target&&i.$el.removeClass("ui-dragover")}).on("drop",function(t){i._handleDrop(t)}),this.history={},this.listenTo(this.model,"change:data",this._changeData,this),this.listenTo(this.model,"change:wait",this._changeWait,this),this.listenTo(this.model,"change:current",this._changeCurrent,this),this.listenTo(this.model,"change:value",this._changeValue,this),this.listenTo(this.model,"change:type change:optional change:multiple change:extensions",this._changeType,this),this.render(),this.on("change",function(){e.onchange&&e.onchange(i.value())})},render:function(){this._changeType(),this._changeValue(),this._changeWait()},wait:function(){this.model.set("wait",!0)},unwait:function(){this.model.set("wait",!1)},update:function(t){this.model.set("data",t)},value:function(t){void 0!==t&&this.model.set("value",t);var e=this.model.get("current");if(this.config[e]){var i=this.fields[e].value();if(null!==i&&(i=n.isArray(i)?i:[i],i.length>0)){var o=this._batch({values:[]});for(var a in i){var r=this.history[i[a]+"_"+this.config[e].src];if(!r)return Galaxy.emit.debug("ui-select-content::value()","Requested details not found for '"+i[a]+"'."),null;o.values.push(r)}return o.values.sort(function(t,e){return t.hid-e.hid}),o}}else Galaxy.emit.debug("ui-select-content::value()","Invalid value/source '"+t+"'.");return null},_changeCurrent:function(){var t=this;o.each(this.fields,function(e,i){t.model.get("current")==i?(e.$el.show(),o.each(t.$batch,function(e,n){e[t.config[i].batch==n?"show":"hide"]()}),t.button_type.value(i)):e.$el.hide()})},_changeType:function(){var t=this,e=(this.model.get("flavor")?this.model.get("flavor")+"_":"")+String(this.model.get("type"))+(this.model.get("multiple")?"_multiple":"");f[e]?this.config=f[e]:(this.config=f.data,Galaxy.emit.debug("ui-select-content::_changeType()","Invalid configuration/type id '"+e+"'."));var i=t.model.get("data"),n=s.default.textify(this.model.get("extensions")),a=this.model.get("src_labels");this.fields=[],this.button_data=[],o.each(this.config,function(e,o){t.button_data.push({value:o,icon:e.icon,tooltip:e.tooltip}),t.fields.push(new d.default.View({optional:t.model.get("optional"),multiple:e.multiple,searchable:!e.multiple||i&&i[e.src]&&i[e.src].length>t.model.get("pagelimit"),individual:!0,error_text:"No "+(n?n+" ":"")+(a[e.src]||"content")+" available.",onchange:function(){t.trigger("change")}}))}),this.button_type=new u.default.RadioButton.View({value:this.model.get("current"),data:this.button_data,onchange:function(e){t.model.set("current",e),t.trigger("change")}}),this.$el.empty();var r=0;this.fields.length>1&&(this.$el.append(this.button_type.$el),r=Math.max(0,36*this.fields.length)+"px"),o.each(this.fields,function(e){t.$el.append(e.$el.css({"margin-left":r}))}),o.each(this.$batch,function(e,i){t.$el.append(e.css({"margin-left":r}))}),this.model.set("current",0),this._changeCurrent(),this._changeData()},_changeWait:function(){var t=this;o.each(this.fields,function(e){e[t.model.get("wait")?"wait":"unwait"]()})},_changeData:function(){var t=this.model.get("data"),e=this,i={};o.each(t,function(t,n){i[n]=[],o.each(t,function(t){i[n].push({hid:t.hid,keep:t.keep,label:t.hid+": "+t.name,value:t.id,tags:t.tags}),e.history[t.id+"_"+n]=t})}),o.each(this.config,function(t,n){i[t.src]&&e.fields[n].add(i[t.src],function(t,e){return e.hid-t.hid})})},_changeValue:function(){var t=this.model.get("value");if(t&&t.values&&t.values.length>0){var e=[];o.each(t.values,function(t){e.push(t.id)});for(var i=t.values[0].src,n=t.values.length>1,a=0;a<this.config.length;a++){var r=this.fields[a],s=this.config[a];if(s.src==i&&-1!==[n,!0].indexOf(s.multiple)){this.model.set("current",a),r.value(e);break}}}else o.each(this.fields,function(t){t.value(null)})},_handleDrop:function(t){try{var e=this.model.get("data"),i=this.model.get("current"),n=this.config[i],a=this.fields[i],r=JSON.parse(t.originalEvent.dataTransfer.getData("text"))[0],s=r.id,l="dataset"==r.history_content_type?"hda":"hdca",u={id:s,src:l};if(e&&o.findWhere(e[l],u)){if(n.src==l){var c=a.value();c&&n.multiple?-1==c.indexOf(s)&&c.push(s):c=s,a.value(c)}else this.model.set("value",{values:[u]}),this.model.trigger("change:value");this.trigger("change"),this._handleDropStatus("success")}else this._handleDropStatus("danger")}catch(t){this._handleDropStatus("danger")}t.preventDefault()},_handleDropStatus:function(t){var e=this;this.$el.removeClass("ui-dragover").addClass("ui-dragover-"+t),setTimeout(function(){e.$el.removeClass("ui-dragover-"+t)},this.model.get("statustimer"))},_batch:function(t){t.batch=!1;var e=this.model.get("current"),i=this.config[e];if("hdca"==i.src&&!i.multiple){var n=this.history[this.fields[e].value()+"_hdca"];n&&n.map_over_type&&(t.batch=!0)}return i.batch!=h.LINKED&&i.batch!=h.ENABLED||(t.batch=!0,i.batch==h.ENABLED&&"true"===this.button_product.value()&&(t.product=!0)),t}});e.default={View:p}}).call(e,i(1),i(0),i(2))},function(t,e,i){"use strict";(function(t){function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=i(3),a=(n(o),i(4)),r=n(a),s=i(43),l=(n(s),i(24)),u=n(l),c=t.Collection.extend({url:Galaxy.root+"api/libraries?deleted=false"}),d=t.Collection.extend({initialize:function(){var e=this;this.config=new t.Model({library_id:null}),this.config.on("change",function(){e.fetch({reset:!0})})},url:function(){return Galaxy.root+"api/libraries/"+this.config.get("library_id")+"/contents"}}),h=t.View.extend({initialize:function(t){var e=this;this.libraries=new c,this.datasets=new d,this.options=t,this.library_select=new r.default.Select.View({onchange:function(t){e.datasets.config.set("library_id",t)}}),this.dataset_list=new u.default.View({name:"dataset",optional:t.optional,multiple:t.multiple,onchange:function(){e.trigger("change")}}),this.libraries.on("reset",function(){var t=[];e.libraries.each(function(e){t.push({value:e.id,label:e.get("name")})}),e.library_select.update(t)}),this.datasets.on("reset",function(){var t=[];null!==e.library_select.text()&&e.datasets.each(function(e){"file"===e.get("type")&&t.push({value:e.id,label:e.get("name")})}),e.dataset_list.update(t)}),this.on("change",function(){t.onchange&&t.onchange(e.value())}),this.setElement(this._template()),this.$(".library-select").append(this.library_select.$el),this.$el.append(this.dataset_list.$el),this.libraries.fetch({reset:!0,success:function(){e.library_select.trigger("change"),void 0!==e.options.value&&e.value(e.options.value)}})},value:function(t){return this.dataset_list.value(t)},_template:function(){return'<div class="ui-select-library"><div class="library ui-margin-bottom"><span class="library-title">Select Library</span><span class="library-select"/></div></div>'}});e.default={View:h}}).call(e,i(1))},function(t,e,i){"use strict";(function(t){function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=i(3),a=n(o),r=i(24),s=n(r),l=t.View.extend({initialize:function(t){var e=this;this.ftpfile_list=new s.default.View({name:"file",optional:t.optional,multiple:t.multiple,onchange:function(){t.onchange&&t.onchange(e.value())}}),this.setElement(this.ftpfile_list.$el),a.default.get({url:Galaxy.root+"api/remote_files",success:function(t){var i=[];for(var n in t)i.push({value:t[n].path,label:t[n].path});e.ftpfile_list.update(i)}})},value:function(t){return this.ftpfile_list.value(t)}});e.default={View:l}}).call(e,i(1))},function(t,e,i){"use strict";(function(t){function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=i(3),a=(n(o),i(4)),r=n(a),s=i(56),l=n(s),u=t.View.extend({initialize:function(t){var e=this;this.browse_button=new r.default.ButtonIcon({title:"Browse",icon:"fa fa-sign-in",tooltip:"Browse GenomeSpace",onclick:function(){e.browseGenomeSpace()}}),this.filename_textbox=new r.default.Input,this.token_textbox=new r.default.Input({type:"password"}),this.setElement(this._template(t)),this.$(".ui-gs-browse-button").append(this.browse_button.$el),this.$(".ui-gs-filename-textbox").append(this.filename_textbox.$el),this.$(".ui-gs-token-textbox").append(this.token_textbox.$el)},browseGenomeSpace:function(t){var e=this;l.default.openFileBrowser({successCallback:function(t){e.value(t.destination+"^"+t.token)}})},_template:function(t){return'<div class="ui-gs-select-file"><div class="ui-gs-browse-field"><span class="ui-gs-browse-button" /><span class="ui-gs-filename-textbox" /></div><div class="ui-gs-token-field"><span class=ui-gs-label"><div class="ui-gs-token-label">Token</div></span><span class="ui-gs-token-textbox" /></div></div>'},value:function(t){if(void 0===t)return this._getValue();this._setValue(t)},_getValue:function(){return this.filename_textbox.value()+"^"+this.token_textbox.value()},_setValue:function(t){t&&(values=t.split("^"),this.filename_textbox.value(values[0]),this.token_textbox.value(values[1]))}});e.default={View:u}}).call(e,i(1))},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={openFileBrowser:function(t){var e=window.Galaxy.config.genomespace_ui_url,i=e+"upload/loadUrlToGenomespace.html?getLocation=true",n=window.open(i,"GenomeSpace File Browser","height=360px,width=600px");successCalBack=t.successCallback,window.addEventListener("message",function(t){successCalBack(t.data)},!1),n.focus(),null!=t.errorCallback&&(n.setCallbackOnGSUploadError=config.errorCallback)}}},function(t,e,i){"use strict";(function(t,n){Object.defineProperty(e,"__esModule",{value:!0});var o=i(3),a=function(t){return t&&t.__esModule?t:{default:t}}(o);e.default=t.View.extend({colors:{standard:["c00000","ff0000","ffc000","ffff00","92d050","00b050","00b0f0","0070c0","002060","7030a0"],base:["ffffff","000000","eeece1","1f497d","4f81bd","c0504d","9bbb59","8064a2","4bacc6","f79646"],theme:[["f2f2f2","7f7f7f","ddd9c3","c6d9f0","dbe5f1","f2dcdb","ebf1dd","e5e0ec","dbeef3","fdeada"],["d8d8d8","595959","c4bd97","8db3e2","b8cce4","e5b9b7","d7e3bc","ccc1d9","b7dde8","fbd5b5"],["bfbfbf","3f3f3f","938953","548dd4","95b3d7","d99694","c3d69b","b2a2c7","92cddc","fac08f"],["a5a5a5","262626","494429","17365d","366092","953734","76923c","5f497a","31859b","e36c09"],["7f7f7e","0c0c0c","1d1b10","0f243e","244061","632423","4f6128","3f3151","205867","974806"]]},initialize:function(t){this.options=a.default.merge(t,{}),this.setElement(this._template()),this.$panel=this.$(".ui-color-picker-panel"),this.$view=this.$(".ui-color-picker-view"),this.$value=this.$(".ui-color-picker-value"),this.$header=this.$(".ui-color-picker-header"),this._build(),this.visible=!1,this.value(this.options.value),this.$boxes=this.$(".ui-color-picker-box");var e=this;this.$boxes.on("click",function(){e.value(n(this).css("background-color")),e.$header.trigger("click")}),this.$header.on("click",function(){e.visible=!e.visible,e.visible?e.$view.fadeIn("fast"):e.$view.fadeOut("fast")})},value:function(t){return void 0!==t&&null!==t&&(this.$value.css("background-color",t),this.$(".ui-color-picker-box").empty(),this.$(this._getValue()).html(this._templateCheck()),this.options.onchange&&this.options.onchange(t)),this._getValue()},_getValue:function(){var t=this.$value.css("background-color");if(t=t.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/)){var e=function(t){return("0"+parseInt(t).toString(16)).slice(-2)};return"#"+e(t[1])+e(t[2])+e(t[3])}return null},_build:function(){this._content({colors:this.colors.base});for(var t in this.colors.theme){var e={};0==t?e.bottom=!0:t!=this.colors.theme.length-1?(e.top=!0,e.bottom=!0):e.top=!0,e.colors=this.colors.theme[t],this._content(e)}this._content({colors:this.colors.standard})},_content:function(t){var e=t.colors,i=n(this._templateContent()),o=i.find(".line");this.$panel.append(i);for(var a in e){var r=n(this._templateBox(e[a]));t.top&&(r.css("border-top","none"),r.css("border-top-left-radius","0px"),r.css("border-top-right-radius","0px")),t.bottom&&(r.css("border-bottom","none"),r.css("border-bottom-left-radius","0px"),r.css("border-bottom-right-radius","0px")),o.append(r)}return i},_templateCheck:function(){return'<div class="ui-color-picker-check fa fa-check"/>'},_templateContent:function(){return'<div class="ui-color-picker-content"><div class="line"/></div>'},_templateBox:function(t){return'<div id="'+t+'" class="ui-color-picker-box" style="background-color: #'+t+';"/>'},_template:function(){return'<div class="ui-color-picker"><div class="ui-color-picker-header"><div class="ui-color-picker-value"/><div class="ui-color-picker-label">Select a color</div></div><div class="ui-color-picker-view ui-input"><div class="ui-color-picker-panel"/></div>'}})}).call(e,i(1),i(0))},,,function(t,e,i){"use strict";(function(t,n){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var a=i(3),r=(o(a),i(61)),s=o(r),l=i(4),u=o(l),c=i(20),d=o(c),h=i(62),f=o(h),p=i(142),m=o(p);e.default=d.default.extend({initialize:function(t){var e=this;this.deferred=new s.default,d.default.prototype.initialize.call(this,t),this._update(this.model.get("initialmodel")),this.model.get("listen_to_history")&&parent.Galaxy&&parent.Galaxy.currHistoryPanel&&this.listenTo(parent.Galaxy.currHistoryPanel.collection,"change",function(){e.model.get("onchange")()}),this.$el.on("remove",function(){e._destroy()})},_update:function(t){var e=this;t=t||this.model.get("buildmodel"),t?(this.deferred.reset(),this.deferred.execute(function(i){t(i,e),i.then(function(){e._render()})})):this._render()},_destroy:function(){var t=this;this.$el.off().hide(),this.deferred.execute(function(){d.default.prototype.remove.call(t),Galaxy.emit.debug("tool-form-base::_destroy()","Destroy view.")})},_render:function(){var e=this,i=this.model.attributes;this.model.set({title:i.fixed_title||"<b>"+i.name+"</b> "+i.description+" (Galaxy Version "+i.version+")",operations:!i.hide_operations&&this._operations(),onchange:function(){e.deferred.reset(),e.deferred.execute(function(t){e.model.get("postchange")(t,e)})}}),this.render(),this.model.get("collapsible")||this.$el.append(t("<div/>").addClass("ui-margin-top-large").append(this._footer())),this.show_message&&this.message.update({status:"success",message:"Now you are using '"+i.name+"' version "+i.version+", id '"+i.id+"'.",persistent:!1}),this.show_message=!0},_operations:function(){var e=this,i=this.model.attributes,o=new u.default.ButtonMenu({icon:"fa-cubes",title:!i.narrow&&"Versions"||null,tooltip:"Select another tool version"});if(!i.sustain_version&&i.versions&&i.versions.length>1)for(var a in i.versions){var r=i.versions[a];r!=i.version&&o.addMenu({title:"Switch to "+r,version:r,icon:"fa-cube",onclick:function(){e.model.set("id",i.id.replace(i.version,this.version)),e.model.set("version",this.version),e._update()}})}else o.$el.hide();var s=new u.default.ButtonMenu({id:"options",icon:"fa-caret-down",title:!i.narrow&&"Options"||null,tooltip:"View available options"});return i.biostar_url&&(s.addMenu({icon:"fa-question-circle",title:"Question?",onclick:function(){window.open(i.biostar_url+"/p/new/post/")}}),s.addMenu({icon:"fa-search",title:"Search",onclick:function(){window.open(i.biostar_url+"/local/search/page/?q="+i.name)}})),s.addMenu({icon:"fa-share",title:"Share",onclick:function(){prompt("Copy to clipboard: Ctrl+C, Enter",window.location.origin+Galaxy.root+"root?tool_id="+i.id)}}),Galaxy.user&&Galaxy.user.get("is_admin")&&s.addMenu({icon:"fa-download",title:"Download",onclick:function(){window.location.href=Galaxy.root+"api/tools/"+i.id+"/download"}}),i.requirements&&i.requirements.length>0&&s.addMenu({icon:"fa-info-circle",title:"Requirements",onclick:function(){!this.requirements_visible||e.portlet.collapsed?(this.requirements_visible=!0,e.portlet.expand(),e.message.update({persistent:!0,message:e._templateRequirements(i),status:"info"})):(this.requirements_visible=!1,e.message.update({message:""}))}}),i.sharable_url&&s.addMenu({icon:"fa-external-link",title:"See in Tool Shed",onclick:function(){window.open(i.sharable_url)}}),t.getJSON("/api/webhooks/tool-menu/all",function(t){n.each(t,function(t){t.activate&&t.config.function&&s.addMenu({icon:t.config.icon,title:t.config.title,onclick:function(){new Function("options",t.config.function)(i)}})})}),{menu:s,versions:o}},_footer:function(){var e=this.model.attributes,i=t("<div/>").append(this._templateHelp(e));if(e.citations){var n=m.default.extend(f.default),o=document.createElement("div");i.append(o),new n({propsData:{id:e.id,source:"tools"}}).$mount(o)}return i},_templateHelp:function(e){var i=t("<div/>").addClass("ui-form-help").append(e.help);return i.find("a").attr("target","_blank"),i},_templateRequirements:function(e){var i=e.requirements.length;if(i>0){var o="This tool requires ";n.each(e.requirements,function(t,e){o+=t.name+(t.version?" (Version "+t.version+")":"")+(e<i-2?", ":e==i-2?" and ":"")});var a=t("<a/>").attr("target","_blank").attr("href","https://galaxyproject.org/tools/requirements/").text("here");return t("<span/>").append(o+". Click ").append(a).append(" for more information.")}return"No requirements found."}})}).call(e,i(0),i(2))},function(t,e,i){"use strict";(function(t,n){Object.defineProperty(e,"__esModule",{value:!0});var o=i(3),a=function(t){return t&&t.__esModule?t:{default:t}}(o);e.default=t.Model.extend({initialize:function(){this.active={},this.last=null},execute:function(t){var e=this,i=a.default.uid(),o=t.length>0;this.active[i]=!0;var r=n.Deferred();r.promise().always(function(){delete e.active[i],o&&Galaxy.emit.debug("deferred::execute()",this.state().charAt(0).toUpperCase()+this.state().slice(1)+" "+i)}),n.when(this.last).always(function(){e.active[i]?(o&&Galaxy.emit.debug("deferred::execute()","Running "+i),t(r),!o&&r.resolve()):r.reject()}),this.last=r.promise()},reset:function(){Galaxy.emit.debug("deferred::execute()","Reset");for(var t in this.active)this.active[t]=!1},ready:function(){return n.isEmptyObject(this.active)}})}).call(e,i(1),i(0))},function(t,e,i){"use strict";function n(t){i(69)}Object.defineProperty(e,"__esModule",{value:!0});var o=i(72),a=i.n(o),r=i(138),s=i(65),l=n,u=s(a.a,r.a,!1,l,null,null);e.default=u.exports},function(t,e){function i(t,e){var i=t[1]||"",o=t[3];if(!o)return i;if(e&&"function"==typeof btoa){var a=n(o);return[i].concat(o.sources.map(function(t){return"/*# sourceURL="+o.sourceRoot+t+" */"})).concat([a]).join("\n")}return[i].join("\n")}function n(t){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(t))))+" */"}t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var n=i(e,t);return e[2]?"@media "+e[2]+"{"+n+"}":n}).join("")},e.i=function(t,i){"string"==typeof t&&(t=[[null,t,""]]);for(var n={},o=0;o<this.length;o++){var a=this[o][0];"number"==typeof a&&(n[a]=!0)}for(o=0;o<t.length;o++){var r=t[o];"number"==typeof r[0]&&n[r[0]]||(i&&!r[2]?r[2]=i:i&&(r[2]="("+r[2]+") and ("+i+")"),e.push(r))}},e}},function(t,e,i){function n(t){for(var e=0;e<t.length;e++){var i=t[e],n=c[i.id];if(n){n.refs++;for(var o=0;o<n.parts.length;o++)n.parts[o](i.parts[o]);for(;o<i.parts.length;o++)n.parts.push(a(i.parts[o]));n.parts.length>i.parts.length&&(n.parts.length=i.parts.length)}else{for(var r=[],o=0;o<i.parts.length;o++)r.push(a(i.parts[o]));c[i.id]={id:i.id,refs:1,parts:r}}}}function o(){var t=document.createElement("style");return t.type="text/css",d.appendChild(t),t}function a(t){var e,i,n=document.querySelector('style[data-vue-ssr-id~="'+t.id+'"]');if(n){if(p)return m;n.parentNode.removeChild(n)}if(v){var a=f++;n=h||(h=o()),e=r.bind(null,n,a,!1),i=r.bind(null,n,a,!0)}else n=o(),e=s.bind(null,n),i=function(){n.parentNode.removeChild(n)};return e(t),function(n){if(n){if(n.css===t.css&&n.media===t.media&&n.sourceMap===t.sourceMap)return;e(t=n)}else i()}}function r(t,e,i,n){var o=i?"":n.css;if(t.styleSheet)t.styleSheet.cssText=g(e,o);else{var a=document.createTextNode(o),r=t.childNodes;r[e]&&t.removeChild(r[e]),r.length?t.insertBefore(a,r[e]):t.appendChild(a)}}function s(t,e){var i=e.css,n=e.media,o=e.sourceMap;if(n&&t.setAttribute("media",n),o&&(i+="\n/*# sourceURL="+o.sources[0]+" */",i+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */"),t.styleSheet)t.styleSheet.cssText=i;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(i))}}var l="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!l)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var u=i(71),c={},d=l&&(document.head||document.getElementsByTagName("head")[0]),h=null,f=0,p=!1,m=function(){},v="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());t.exports=function(t,e,i){p=i;var o=u(t,e);return n(o),function(e){for(var i=[],a=0;a<o.length;a++){var r=o[a],s=c[r.id];s.refs--,i.push(s)}e?(o=u(t,e),n(o)):o=[];for(var a=0;a<i.length;a++){var s=i[a];if(0===s.refs){for(var l=0;l<s.parts.length;l++)s.parts[l]();delete c[s.id]}}}};var g=function(){var t=[];return function(e,i){return t[e]=i,t.filter(Boolean).join("\n")}}()},function(t,e){t.exports=function(t,e,i,n,o,a){var r,s=t=t||{},l=typeof t.default;"object"!==l&&"function"!==l||(r=t,s=t.default);var u="function"==typeof s?s.options:s;e&&(u.render=e.render,u.staticRenderFns=e.staticRenderFns,u._compiled=!0),i&&(u.functional=!0),o&&(u._scopeId=o);var c;if(a?(c=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),n&&n.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},u._ssrRegister=c):n&&(c=n),c){var d=u.functional,h=d?u.render:u.beforeCreate;d?(u._injectStyles=c,u.render=function(t,e){return c.call(e),h(t,e)}):u.beforeCreate=h?[].concat(h,c):[c]}return{esModule:r,exports:s,options:u}}},function(t,e,i){t.exports=i(73)},,,function(t,e,i){var n=i(70);"string"==typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);i(64)("366d3a4b",n,!0)},function(t,e,i){e=t.exports=i(63)(void 0),e.push([t.i,".citations-formatted{word-wrap:break-word}.citations-bibtex-text{width:100%;height:500px}.citation-padding{padding:5px 10px}",""])},function(t,e){t.exports=function(t,e){for(var i=[],n={},o=0;o<e.length;o++){var a=e[o],r=a[0],s=a[1],l=a[2],u=a[3],c={id:t+":"+o,css:s,media:l,sourceMap:u};n[r]?n[r].parts.push(c):i.push(n[r]={id:r,parts:[c]})}return i}},function(t,e,i){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});var n=i(66),o=function(t){return t&&t.__esModule?t:{default:t}}(n),a=i(92),r=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}(a),s=i(93),l=i(17);e.default={props:{source:{type:String,required:!0},id:{type:String,required:!0},viewRender:{type:Boolean,requried:!1,default:!0}},data:function(){return{citations:[],content:"",errors:[]}},computed:{formattedReferences:function(){var t=this;return this.citations.reduce(function(e,i){return e.concat('<p class="formatted-reference">'+t.formattedReference(i)+"</p>")},"")}},created:function(){var e=this;o.default.get(Galaxy.root+"api/"+this.source+"/"+this.id+"/citations").then(function(i){e.content="";var n=!0,o=!1,a=void 0;try{for(var s,l=i.data[Symbol.iterator]();!(n=(s=l.next()).done);n=!0){var u=s.value;try{var c={fields:{},entryType:void 0},d=r.toJSON(u.content);if(d){d=t.first(d),c.entryType=d.entryType||void 0;for(var h in d.entryTags)c.fields[h.toLowerCase()]=d.entryTags[h]}e.citations.push(c),e.content+=u.content}catch(t){console.warn("Error parsing bibtex: "+t)}}}catch(t){o=!0,a=t}finally{try{!n&&l.return&&l.return()}finally{if(o)throw a}}}).catch(function(t){console.error(t)})},methods:{formattedReference:function(t){var e=t.entryType,i=t.fields,n="",o=this._asSentence((i.author?i.author:"")+(i.year?" ("+i.year+")":""))+" ",a=i.title||"",r=i.pages?"pp. "+i.pages:"",u=i.address;if("article"==e){var c=(i.volume?i.volume:"")+(i.number?" ("+i.number+")":"")+(r?", "+r:"");n=o+this._asSentence(a)+(i.journal?"In <em>"+i.journal+", ":"")+this._asSentence(c)+this._asSentence(i.address)+"</em>"}else n="inproceedings"==e||"proceedings"==e?o+this._asSentence(a)+(i.booktitle?"In <em>"+i.booktitle+", ":"")+(r||"")+(u?", "+u:"")+".</em>":"mastersthesis"==e||"phdthesis"==e?o+this._asSentence(a)+(i.howpublished?i.howpublished+". ":"")+(i.note?i.note+".":""):"techreport"==e?o+this._asSentence(a)+this._asSentence(i.institution)+this._asSentence(i.number)+this._asSentence(i.type):"book"==e||"inbook"==e||"incollection"==e?o+" "+this._formatBookInfo(i):o+" "+this._asSentence(a)+this._asSentence(i.howpublished)+this._asSentence(i.note);var d="";i.doi&&(d="http://dx.doi.org/"+i.doi,n+='[<a href="'+d+'" target="_blank">doi:'+i.doi+"</a>]");var h=i.url||d;return h&&(n+='[<a href="'+h+'" target="_blank">Link</a>]'),(0,s.convertLaTeX)({onError:function(t,e){return"{"+(0,l.stringifyLaTeX)(e)+"}"}},n)},_formatBookInfo:function(t){var e="";return t.chapter&&(e+=t.chapter+" in "),t.title&&(e+="<em>"+t.title+"</em>"),t.editor&&(e+=", Edited by "+t.editor+", "),t.publisher&&(e+=", "+t.publisher),t.pages&&(e+=", pp. "+t.pages),t.series&&(e+=", <em>"+t.series+"</em>"),t.volume&&(e+=", Vol."+t.volume),t.issn&&(e+=", ISBN: "+t.issn),e+"."},_asSentence:function(t){return t&&t.trim()?t+". ":""},toggleViewRender:function(){this.viewRender=!this.viewRender}}}}).call(e,i(2))},function(t,e,i){"use strict";function n(t){var e=new r(t),i=a(r.prototype.request,e);return o.extend(i,r.prototype,e),o.extend(i,e),i}var o=i(5),a=i(27),r=i(75),s=i(16),l=n(s);l.Axios=r,l.create=function(t){return n(o.merge(s,t))},l.Cancel=i(31),l.CancelToken=i(90),l.isCancel=i(30),l.all=function(t){return Promise.all(t)},l.spread=i(91),t.exports=l,t.exports.default=l},function(t,e){function i(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}function n(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&i(t.slice(0,0))}/*!
* Determine if an object is a Buffer
*
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
* @license MIT
*/
t.exports=function(t){return null!=t&&(i(t)||n(t)||!!t._isBuffer)}},function(t,e,i){"use strict";function n(t){this.defaults=t,this.interceptors={request:new r,response:new r}}var o=i(16),a=i(5),r=i(85),s=i(86);n.prototype.request=function(t){"string"==typeof t&&(t=a.merge({url:arguments[0]},arguments[1])),t=a.merge(o,this.defaults,{method:"get"},t),t.method=t.method.toLowerCase();var e=[s,void 0],i=Promise.resolve(t);for(this.interceptors.request.forEach(function(t){e.unshift(t.fulfilled,t.rejected)}),this.interceptors.response.forEach(function(t){e.push(t.fulfilled,t.rejected)});e.length;)i=i.then(e.shift(),e.shift());return i},a.forEach(["delete","get","head","options"],function(t){n.prototype[t]=function(e,i){return this.request(a.merge(i||{},{method:t,url:e}))}}),a.forEach(["post","put","patch"],function(t){n.prototype[t]=function(e,i,n){return this.request(a.merge(n||{},{method:t,url:e,data:i}))}}),t.exports=n},function(t,e){function i(){throw new Error("setTimeout has not been defined")}function n(){throw new Error("clearTimeout has not been defined")}function o(t){if(c===setTimeout)return setTimeout(t,0);if((c===i||!c)&&setTimeout)return c=setTimeout,setTimeout(t,0);try{return c(t,0)}catch(e){try{return c.call(null,t,0)}catch(e){return c.call(this,t,0)}}}function a(t){if(d===clearTimeout)return clearTimeout(t);if((d===n||!d)&&clearTimeout)return d=clearTimeout,clearTimeout(t);try{return d(t)}catch(e){try{return d.call(null,t)}catch(e){return d.call(this,t)}}}function r(){m&&f&&(m=!1,f.length?p=f.concat(p):v=-1,p.length&&s())}function s(){if(!m){var t=o(r);m=!0;for(var e=p.length;e;){for(f=p,p=[];++v<e;)f&&f[v].run();v=-1,e=p.length}f=null,m=!1,a(t)}}function l(t,e){this.fun=t,this.array=e}function u(){}var c,d,h=t.exports={};!function(){try{c="function"==typeof setTimeout?setTimeout:i}catch(t){c=i}try{d="function"==typeof clearTimeout?clearTimeout:n}catch(t){d=n}}();var f,p=[],m=!1,v=-1;h.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)e[i-1]=arguments[i];p.push(new l(t,e)),1!==p.length||m||o(s)},l.prototype.run=function(){this.fun.apply(null,this.array)},h.title="browser",h.browser=!0,h.env={},h.argv=[],h.version="",h.versions={},h.on=u,h.addListener=u,h.once=u,h.off=u,h.removeListener=u,h.removeAllListeners=u,h.emit=u,h.prependListener=u,h.prependOnceListener=u,h.listeners=function(t){return[]},h.binding=function(t){throw new Error("process.binding is not supported")},h.cwd=function(){return"/"},h.chdir=function(t){throw new Error("process.chdir is not supported")},h.umask=function(){return 0}},function(t,e,i){"use strict";var n=i(5);t.exports=function(t,e){n.forEach(t,function(i,n){n!==e&&n.toUpperCase()===e.toUpperCase()&&(t[e]=i,delete t[n])})}},function(t,e,i){"use strict";var n=i(29);t.exports=function(t,e,i){var o=i.config.validateStatus;i.status&&o&&!o(i.status)?e(n("Request failed with status code "+i.status,i.config,null,i.request,i)):t(i)}},function(t,e,i){"use strict";t.exports=function(t,e,i,n,o){return t.config=e,i&&(t.code=i),t.request=n,t.response=o,t}},function(t,e,i){"use strict";function n(t){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var o=i(5);t.exports=function(t,e,i){if(!e)return t;var a;if(i)a=i(e);else if(o.isURLSearchParams(e))a=e.toString();else{var r=[];o.forEach(e,function(t,e){null!==t&&void 0!==t&&(o.isArray(t)&&(e+="[]"),o.isArray(t)||(t=[t]),o.forEach(t,function(t){o.isDate(t)?t=t.toISOString():o.isObject(t)&&(t=JSON.stringify(t)),r.push(n(e)+"="+n(t))}))}),a=r.join("&")}return a&&(t+=(-1===t.indexOf("?")?"?":"&")+a),t}},function(t,e,i){"use strict";var n=i(5),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];t.exports=function(t){var e,i,a,r={};return t?(n.forEach(t.split("\n"),function(t){if(a=t.indexOf(":"),e=n.trim(t.substr(0,a)).toLowerCase(),i=n.trim(t.substr(a+1)),e){if(r[e]&&o.indexOf(e)>=0)return;r[e]="set-cookie"===e?(r[e]?r[e]:[]).concat([i]):r[e]?r[e]+", "+i:i}}),r):r}},function(t,e,i){"use strict";var n=i(5);t.exports=n.isStandardBrowserEnv()?function(){function t(t){var e=t;return i&&(o.setAttribute("href",e),e=o.href),o.setAttribute("href",e),{href:o.href,protocol:o.protocol?o.protocol.replace(/:$/,""):"",host:o.host,search:o.search?o.search.replace(/^\?/,""):"",hash:o.hash?o.hash.replace(/^#/,""):"",hostname:o.hostname,port:o.port,pathname:"/"===o.pathname.charAt(0)?o.pathname:"/"+o.pathname}}var e,i=/(msie|trident)/i.test(navigator.userAgent),o=document.createElement("a");return e=t(window.location.href),function(i){var o=n.isString(i)?t(i):i;return o.protocol===e.protocol&&o.host===e.host}}():function(){return function(){return!0}}()},function(t,e,i){"use strict";function n(){this.message="String contains an invalid character"}function o(t){for(var e,i,o=String(t),r="",s=0,l=a;o.charAt(0|s)||(l="=",s%1);r+=l.charAt(63&e>>8-s%1*8)){if((i=o.charCodeAt(s+=.75))>255)throw new n;e=e<<8|i}return r}var a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";n.prototype=new Error,n.prototype.code=5,n.prototype.name="InvalidCharacterError",t.exports=o},function(t,e,i){"use strict";var n=i(5);t.exports=n.isStandardBrowserEnv()?function(){return{write:function(t,e,i,o,a,r){var s=[];s.push(t+"="+encodeURIComponent(e)),n.isNumber(i)&&s.push("expires="+new Date(i).toGMTString()),n.isString(o)&&s.push("path="+o),n.isString(a)&&s.push("domain="+a),!0===r&&s.push("secure"),document.cookie=s.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()},function(t,e,i){"use strict";function n(){this.handlers=[]}var o=i(5);n.prototype.use=function(t,e){return this.handlers.push({fulfilled:t,rejected:e}),this.handlers.length-1},n.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},n.prototype.forEach=function(t){o.forEach(this.handlers,function(e){null!==e&&t(e)})},t.exports=n},function(t,e,i){"use strict";function n(t){t.cancelToken&&t.cancelToken.throwIfRequested()}var o=i(5),a=i(87),r=i(30),s=i(16),l=i(88),u=i(89);t.exports=function(t){return n(t),t.baseURL&&!l(t.url)&&(t.url=u(t.baseURL,t.url)),t.headers=t.headers||{},t.data=a(t.data,t.headers,t.transformRequest),t.headers=o.merge(t.headers.common||{},t.headers[t.method]||{},t.headers||{}),o.forEach(["delete","get","head","post","put","patch","common"],function(e){delete t.headers[e]}),(t.adapter||s.adapter)(t).then(function(e){return n(t),e.data=a(e.data,e.headers,t.transformResponse),e},function(e){return r(e)||(n(t),e&&e.response&&(e.response.data=a(e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)})}},function(t,e,i){"use strict";var n=i(5);t.exports=function(t,e,i){return n.forEach(i,function(i){t=i(t,e)}),t}},function(t,e,i){"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},function(t,e,i){"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},function(t,e,i){"use strict";function n(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise(function(t){e=t});var i=this;t(function(t){i.reason||(i.reason=new o(t),e(i.reason))})}var o=i(31);n.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},n.source=function(){var t;return{token:new n(function(e){t=e}),cancel:t}},t.exports=n},function(t,e,i){"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},function(t,e,i){!function(t){function e(){this.months=["jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"],this.notKey=[",","{","}"," ","="],this.pos=0,this.input="",this.entries=new Array,this.currentEntry="",this.setInput=function(t){this.input=t},this.getEntries=function(){return this.entries},this.isWhitespace=function(t){return" "==t||"\r"==t||"\t"==t||"\n"==t},this.match=function(t,e){if(void 0!=e&&null!=e||(e=!0),this.skipWhitespace(e),this.input.substring(this.pos,this.pos+t.length)!=t)throw"Token mismatch, expected "+t+", found "+this.input.substring(this.pos);this.pos+=t.length,this.skipWhitespace(e)},this.tryMatch=function(t,e){return void 0!=e&&null!=e||(e=!0),this.skipWhitespace(e),this.input.substring(this.pos,this.pos+t.length)==t},this.matchAt=function(){for(;this.input.length>this.pos&&"@"!=this.input[this.pos];)this.pos++;return"@"==this.input[this.pos]},this.skipWhitespace=function(t){for(;this.isWhitespace(this.input[this.pos]);)this.pos++;if("%"==this.input[this.pos]&&1==t){for(;"\n"!=this.input[this.pos];)this.pos++;this.skipWhitespace(t)}},this.value_braces=function(){var t=0;this.match("{",!1);for(var e=this.pos,i=!1;;){if(!i)if("}"==this.input[this.pos]){if(!(t>0)){var n=this.pos;return this.match("}",!1),this.input.substring(e,n)}t--}else if("{"==this.input[this.pos])t++;else if(this.pos>=this.input.length-1)throw"Unterminated value";i="\\"==this.input[this.pos]&&0==i,this.pos++}},this.value_comment=function(){for(var t="",e=0;!this.tryMatch("}",!1)||0!=e;){if(t+=this.input[this.pos],"{"==this.input[this.pos]&&e++,"}"==this.input[this.pos]&&e--,this.pos>=this.input.length-1)throw"Unterminated value:"+this.input.substring(start);this.pos++}return t},this.value_quotes=function(){this.match('"',!1);for(var t=this.pos,e=!1;;){if(!e){if('"'==this.input[this.pos]){var i=this.pos;return this.match('"',!1),this.input.substring(t,i)}if(this.pos>=this.input.length-1)throw"Unterminated value:"+this.input.substring(t)}e="\\"==this.input[this.pos]&&0==e,this.pos++}},this.single_value=function(){var t=this.pos;if(this.tryMatch("{"))return this.value_braces();if(this.tryMatch('"'))return this.value_quotes();var e=this.key();if(e.match("^[0-9]+$"))return e;if(this.months.indexOf(e.toLowerCase())>=0)return e.toLowerCase();throw"Value expected:"+this.input.substring(t)+" for key: "+e},this.value=function(){var t=[];for(t.push(this.single_value());this.tryMatch("#");)this.match("#"),t.push(this.single_value());return t.join("")},this.key=function(t){for(var e=this.pos;;){if(this.pos>=this.input.length)throw"Runaway key";if(this.notKey.indexOf(this.input[this.pos])>=0)return t&&","!=this.input[this.pos]?(this.pos=e,null):this.input.substring(e,this.pos);this.pos++}},this.key_equals_value=function(){var t=this.key();if(this.tryMatch("=")){this.match("=");var e=this.value();return t=t.trim(),[t,e]}throw"... = value expected, equals sign missing:"+this.input.substring(this.pos)},this.key_value_list=function(){var t=this.key_equals_value();for(this.currentEntry.entryTags={},this.currentEntry.entryTags[t[0]]=t[1];this.tryMatch(",")&&(this.match(","),!this.tryMatch("}"));)t=this.key_equals_value(),this.currentEntry.entryTags[t[0]]=t[1]},this.entry_body=function(t){this.currentEntry={},this.currentEntry.citationKey=this.key(!0),this.currentEntry.entryType=t.substring(1),null!=this.currentEntry.citationKey&&this.match(","),this.key_value_list(),this.entries.push(this.currentEntry)},this.directive=function(){return this.match("@"),"@"+this.key()},this.preamble=function(){this.currentEntry={},this.currentEntry.entryType="PREAMBLE",this.currentEntry.entry=this.value_comment(),this.entries.push(this.currentEntry)},this.comment=function(){this.currentEntry={},this.currentEntry.entryType="COMMENT",this.currentEntry.entry=this.value_comment(),this.entries.push(this.currentEntry)},this.entry=function(t){this.entry_body(t)},this.alernativeCitationKey=function(){this.entries.forEach(function(t){!t.citationKey&&t.entryTags&&(t.citationKey="",t.entryTags.author&&(t.citationKey+=t.entryTags.author.split(",")[0]+=", "),t.citationKey+=t.entryTags.year)})},this.bibtex=function(){for(;this.matchAt();){var t=this.directive();this.match("{"),"@STRING"==t.toUpperCase()?this.string():"@PREAMBLE"==t.toUpperCase()?this.preamble():"@COMMENT"==t.toUpperCase()?this.comment():this.entry(t),this.match("}")}this.alernativeCitationKey()}}t.toJSON=function(t){var i=new e;return i.setInput(t),i.bibtex(),i.entries},t.toBibtex=function(t){var e="";for(var i in t){if(e+="@"+t[i].entryType,e+="{",t[i].citationKey&&(e+=t[i].citationKey+", "),t[i].entry&&(e+=t[i].entry),t[i].entryTags){var n="";for(var o in t[i].entryTags)0!=n.length&&(n+=", "),n+=o+"= {"+t[i].entryTags[o]+"}";e+=n}e+="}\n\n"}return e}}(e)},function(t,e,i){"use strict";function n(t){for(var i in t)e.hasOwnProperty(i)||(e[i]=t[i])}Object.defineProperty(e,"__esModule",{value:!0}),n(i(94)),n(i(95)),n(i(32)),n(i(35)),n(i(10)),n(i(36)),n(i(136)),n(i(137)),n(i(39))},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.aliases={mathfrak:"frak",mathcal:"cal",mathbb:"bb",mathbf:"bf",dfrac:"frac",ldots:"dots"}},function(t,e,i){"use strict";function n(t,e){return a(t,s.mustNotBeUndefined(s.mustBeOk(s.latexParser.parse(e)).value))}function o(t){return a({translateTo:"unicode",mode:"Any"},s.mustNotBeUndefined(s.mustBeOk(s.latexParser.parse(t)).value))}function a(t,e){var i=t.translateTo;switch(i){case"html":throw new Error("Unsupported format: '"+i+"'. Use one of: "+Object.keys(r.supportedMarkups));case"unicode":default:return l.convertLaTeXBlocksToUnicode(t,e).result}}Object.defineProperty(e,"__esModule",{value:!0});var r=i(32),s=i(17),l=i(97);e.convertLaTeX=n,e.convertLaTeXToUnicode=o,e.convertLaTeXBlocks=a},function(t,e,i){"use strict";function n(t,e){var i=t.length,n=e.length;if(0===i)return e;if(0===n)return t;for(var o={},a=0;a<i;a++)o[t[a]]=!0;for(var r=0;r<n;r++)o[e[r]]=!0;var s=[];for(var l in o)o.hasOwnProperty(l)&&s.push(l);return s.sort(),s}function o(t,e){if(!e)return t;if(t.furthest>e.furthest)return t;var i=t.furthest===e.furthest?n(t.expected,e.expected):e.expected;return{status:t.status,index:t.index,value:t.value,furthest:e.furthest,expected:i}}function a(t,e,i,n){return C.Parser(function(a,r){for(var s=n,l=0,u=void 0;r<a.length;){var c=e._(a,r);if(c.status){r=$.mustBeNumber(c.index);break}var d=t._(a,r);if(y(d))return d;if(u=$.mustNotBeUndefined(o(d,u)),y(u))return u;l++;var h=$.mustNotBeUndefined(u.value);s=i(s,h),r=$.mustBeNumber(u.index)}return x(o(C.makeSuccess(r,s),u))})}function r(t,e){return a(t,e,function(t,e){return t.concat([e])},[])}function s(t){return C.Parser(function(e,i){var n=e.charAt(i);if(i>=e.length||t(n))return O.makeFailure(i,"text character");var o=[n];i++;for(var a=e.charAt(i);!t(a)&&i<e.length;)o.push(a),i++,a=e.charAt(i);return C.makeSuccess(i,o.join(""))})}function l(t){return s(c(t)).map(function(t){return T.newTeXRaw(t)})}function u(t,i){return(void 0===i?e.specialCharsDefault:i).hasOwnProperty(t)}function c(t){return function(e){return t.hasOwnProperty(e)}}function d(t,i,n){switch(void 0===i&&(i="_"),void 0===n&&(n="^"),t){case"Math":return e.latexBlockParserMathMode(i,n);default:return e.latexBlockParserTextMode}}function h(t){return t>="A"&&t<="Z"}function f(t){return t>="a"&&t<="z"}function p(t){return D.then(r(d(t,"_"),B)).map(k.newFixArg)}function m(t){return A.then(r(d(t),R)).map(k.newOptArg)}function v(t){return C.alt(p(t),m(t))}function g(t){return C.alt(C.string("{}").map(function(){return[]}),v(t).map(function(t){return t}).atLeast(0)).map(function(t){return t})}function _(t){return C.seqMap(e.commandSymbol,C.alt(e.specialChar,e.takeTill(e.endCmd)),g(t),function(t,e,i){return void 0!==i?k.newTeXComm.apply(void 0,[e].concat(i)):k.newTeXComm(e)}).map(function(t){return t})}function w(t,i,n){return C.seqMap(e.subOrSuperscriptSymbolParser(i,n),g(t),function(t,e){return k.newSubOrSuperScript(t,t===k.SubOrSuperSymbol.SUB?i:n,e)}).map(function(t){return t})}function b(t){return void 0!==t&&!0===t.status}function y(t){return void 0!==t&&!1===t.status}function x(t){if(!b(t))throw new Error("Expected parse to be success: "+JSON.stringify(t));return t}Object.defineProperty(e,"__esModule",{value:!0});var C=i(34),k=i(19),T=i(19),$=i(18),O=i(34);e.defaultParserConf={verbatimEnvironments:["verbatim"]},e.takeTill=function(t){return C.takeWhile(function(e){return!t(e)})};var M=C.regexp(/[^\n]*/),S=C.regexp(/\n?/),E=(C.regexp(/\s*/m),C.string("%")),A=C.string("["),R=C.string("]");e.notTextDefault={$:!0,"%":!0,"\\":!0,"{":!0,"]":!0,"}":!0},e.notTextMathMode={"^":!0,_:!0,$:!0,"%":!0,"\\":!0,"{":!0,"]":!0,"}":!0},e.notTextMathModeAndNotClosingBracket={"^":!0,_:!0,$:!0,"%":!0,"\\":!0,"{":!0,"}":!0},e.notTextDefaultAndNotClosingBracket={$:!0,"%":!0,"\\":!0,"{":!0,"}":!0},e.textParser=l;var j=(l(e.notTextDefault),l(e.notTextDefaultAndNotClosingBracket),C.regexp(/ */).map(T.newTeXRaw));e.comment=E.then(M).skip(S).map(k.newTeXComment),e.specialCharsDefault={"'":!0,"(":!0,")":!0,",":!0,".":!0,"-":!0,'"':!0,"!":!0,"^":!0,$:!0,"&":!0,"#":!0,"{":!0,"}":!0,"%":!0,"~":!0,"|":!0,"/":!0,":":!0,";":!0,"=":!0,"[":!0,"]":!0,"\\":!0,"`":!0," ":!0},e.isSpecialCharacter=u,e.isNotText=c,e.mathSymbol=C.string("$"),e.commandSymbol=C.string("\\"),e.latexBlockParser=d,e.latexBlockParserTextMode=C.lazy(function(){return C.alt(C.alt(l(e.notTextDefault),e.dolMath,e.comment,l(e.notTextDefaultAndNotClosingBracket),e.environment,_("Paragraph")))}),e.latexBlockParserMathMode=function(t,i){return C.lazy(function(){return C.alt(C.alt(w("Math",t,i),l(e.notTextMathMode),e.dolMath,e.comment,l(e.notTextMathModeAndNotClosingBracket),e.environment,_("Math")))})},e.latexParser=e.latexBlockParserTextMode.many();var P=C.string("{").then(e.latexBlockParserTextMode.many()).skip(C.string("}"));e.env=C.Parser(function(t,i){var n=C.string("\\begin").then(C.string("{")).then(j).then(C.regexp(/[a-zA-Z]+/)).skip(j).skip(C.string("}"))._(t,i);if(y(n))return n;i=$.mustBeNumber(n.index);var o=n.value;return r(e.latexBlockParserTextMode,C.string("\\end").then(C.string("{")).then(j).then(C.string(o)).then(j).then(C.string("}"))).map(function(t){return k.newTeXEnv(o,t)})._(t,i)}),e.environment=C.alt(P,e.env),e.specialChar=C.test(u),e.endCmd=function(t){return!f(t)&&!h(t)};var D=C.string("{"),B=C.string("}");e.fixArg=p,e.optArg=m,e.cmdArg=v,e.cmdArgs=g,e.command=_,e.subOrSuperscriptSymbolParser=function(t,e){return C.alt(C.string(t),C.string(e)).map(function(e){return e===t?k.SubOrSuperSymbol.SUB:k.SubOrSuperSymbol.SUP})},e.shiftedScript=w,e.dolMath=function(t,e,i){return void 0===t&&(t="Dollar"),void 0===e&&(e="$"),void 0===i&&(i="$"),C.string(e).then(d("Math","_").many().map(function(n){return k.newTeXMath(t,e,i,n)})).skip(C.string(i))}(),e.isOk=b,e.isNotOk=y,e.mustBeOk=x},function(t,e,i){"use strict";function n(t){return"string"==typeof t}function o(t,e){var i=t;do{t++}while(h.isTeXChar(e[t]));return{result:e.slice(i,t).map(function(t){return t.string}).join(""),blockIndex:t}}function a(t,e,i,o){var a=d(t,o);if(n(a))return{result:a,blockIndex:e+1};for(var r=[],l=[];r.length<a.argumentCount&&e<i.length-1;){e++;var u=e;if(i.length<u-1)throw new Error("Could not gobble "+a.argumentCount+" arguments for "+o.name);var c=i[u];if(h.isTeXRaw(c)){for(var f=/\s+/g,p=c.text.replace(x,""),m=-1,v=0;r.length<a.argumentCount;){var g=f.exec(p);if(!g){r.push.apply(r,y.convertToTeXCharsDefault(p));break}var _=p.substring(v,g.index);m=g.index,v=g.index+_.length,r.push.apply(r,y.convertToTeXCharsDefault(_))}m>=0&&l.push(p.substring(m))}else r.push(c)}e++;var w=r.map(function(e){return s(t,[e]).result}).map(h.newTeXRaw).map(function(t){return h.newFixArg([t])});if(w.length<a.argumentCount)throw new Error("Could not find enough arguments for command \\"+a.name+". Expected "+a.argumentCount+", but found "+w.length);var b=[a.apply(function(){},w)];return l.length>0&&b.push(l.join("")),{result:b.join(""),blockIndex:e}}function r(t){return void 0!==t&&"string"==typeof t.string&&"number"==typeof t.category}function s(t,e){var i=0;if(e.length<=0)return{result:"",blockIndex:i};for(var n=[];i<e.length;){var l=e[i];try{if(r(l)){var u=o(i,e);i=u.blockIndex,n.push(u.result)}else if(h.isTeXComm(l)){var c=a(t,i,e,l);i=c.blockIndex,n.push(c.result)}else if(h.isFixArg(l)||h.isOptArg(l)){var c=s(t,l.latex);n.push(c.result),i++}else if(h.isTextHaving(l))n.push(l.text),i++;else{if(h.isTeXMath(l))return s(t,l.latex);if(h.isTeXRaw(l))n.push(l.text),i++;else if(h.isSubOrSuperScript(l)){var d=l.arguments?l.arguments:[],c=a(t,i,e,h.newTeXComm.apply(void 0,[l.type===h.SubOrSuperSymbol.SUB?"mathsubscript":"mathsuperscript"].concat(d)));i=c.blockIndex,n.push(c.result)}else{if(!h.isArray(l))throw new Error("Can't handle LaTeX block yet: "+JSON.stringify(l)+". Leave an issue at https://github.com/digitalheir/tex-to-unicode/issues");var c=s(t,l);n.push(c.result),i++}}}catch(e){if(void 0===t.onError)throw e;var f=t.onError(e,l);if(void 0===f)throw e;n.push(f),i++}}return{result:n.join(""),blockIndex:i}}function l(t,e){if(e.arguments.length>0){var i=v.expand1argsCommand(e.name,s(t,[e.arguments[0]]).result||"");return e.arguments.length>1?i+s(t,e.arguments.slice(1)).result:i}return m.createCommandHandler(e.name,0,1,function(i,n){var o=n[0],a=n.slice(1);return v.expand1argsCommand(e.name,s(t,[o]).result)+s(t,a).result})}function u(t,e){if(e.arguments.length>1){var i=w.expand2argsCommand(e.name,s(t,[e.arguments[0]]).result||"",s(t,[e.arguments[1]]).result||"");return e.arguments.length>2?i+s(t,e.arguments.slice(1)).result:i}return m.createCommandHandler(e.name,0,2,function(i,n){var o=n[0],a=n[1],r=n.slice(2);return w.expand2argsCommand(e.name,s(t,[o]).result,s(t,[a]).result)+s(t,r).result})}function c(t,e){for(var i=void 0,n=void 0,o=0;void 0===n&&o<e.arguments.length;){var a=e.arguments[o],r=s(t,[a]).result;h.isOptArg(a)&&!i?i=r:n=r,o++}return n?_.convertSqrtToUnicode(n,i):m.createCommandHandler(e.name,1,1,function(e,i){var n=i[0],o=_.convertSqrtToUnicode(s(t,[n]).result);if(i.length>1){var a=i.slice(1);return o+s(t,a).result}return o})}function d(t,e){var i=e.name,n=p.expand0argsCommand(i);if(n)return e.arguments&&e.arguments.length>0?n+s(t,e.arguments).result:n;if(g.is1argsCommand(i))return l(t,e);if(b.is2argsCommand(i))return u(t,e);if("sqrt"===i)return c(t,e);throw f.unknownCommandError(i)}Object.defineProperty(e,"__esModule",{value:!0});var h=i(17),f=i(35),p=i(98),m=i(36),v=i(105),g=i(39),_=i(130),w=i(131),b=i(134),y=i(33),x=/^\s*/;e.isTeXChar2=r,e.convertLaTeXBlocksToUnicode=s,e.convertCommand=d},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(99),o=i(100),a=i(101),r=i(102),s=i(103),l=i(104);e.expand0argsCommand=function(t){for(var e=0,i=[a.barredLUnicode,n.spaceUnicode,r.slashedOUnicode,o.characterUnicode,l.specialCharacter,s.cyrillicUnicode];e<i.length;e++){var u=i[e],c=u(t);if(c)return c}}},function(t,e,i){"use strict";function n(t){return e.spaceCharactersUnicode.hasOwnProperty(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.mathSpace="芇",e.spaceCharactersUnicode={",":" ",quad:" ",qquad:" "," ":" ",space:" ",";":" ",":":" ",hfill:"\t"},e.isSpaceCharactersUnicode=n,e.spaceUnicode=function(t){return n(t)?e.spaceCharactersUnicode[t]:void 0}},function(t,e,i){"use strict";function n(t){return e.characterUnicodeChart.hasOwnProperty(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.characterUnicodeChart={leftrightsquigarrow:"↭",Longleftrightarrow:"⟺",blacktriangleright:"▶",longleftrightarrow:"⟷",blacktriangledown:"▼",blacktriangleleft:"◀",leftrightharpoons:"⇋",rightleftharpoons:"⇌",twoheadrightarrow:"↠",circlearrowright:"↻",downharpoonright:"⇂",rightharpoondown:"⇁",rightrightarrows:"⇉",twoheadleftarrow:"↞",vartriangleright:"⊳",bigtriangledown:"▽",circlearrowleft:"↺",curvearrowright:"↷",downharpoonleft:"⇃",leftharpoondown:"↽",leftrightarrows:"⇆",rightleftarrows:"⇄",rightsquigarrow:"⇝",rightthreetimes:"⋌",trianglerighteq:"⊵",vartriangleleft:"⊲",Leftrightarrow:"⇔",Longrightarrow:"⟹",curvearrowleft:"↶",dashrightarrow:"⇢",doublebarwedge:"⩞",downdownarrows:"⇊",hookrightarrow:"↪",leftleftarrows:"⇇",leftrightarrow:"↔",leftthreetimes:"⋋",longrightarrow:"⟶",looparrowright:"↬",rightarrowtail:"↣",rightharpoonup:"⇀",sphericalangle:"∢",textregistered:"®",trianglelefteq:"⊴",upharpoonright:"↾",Longleftarrow:"⟸",bigtriangleup:"△",blacktriangle:"▲",dashleftarrow:"⇠",divideontimes:"⋇",fallingdotseq:"≒",hookleftarrow:"↩",leftarrowtail:"↢",leftharpoonup:"↼",longleftarrow:"⟵",looparrowleft:"↫",measuredangle:"∡",shortparallel:"∥",smallsetminus:"∖",texttrademark:"™",triangleright:"▷",upharpoonleft:"↿",blacklozenge:"◆",risingdotseq:"≓",triangledown:"▽",triangleleft:"◁",Rrightarrow:"⇛",Updownarrow:"⇕",backepsilon:"∍",blacksquare:"■",circledcirc:"⊚",circleddash:"⊝",curlyeqprec:"⋞",curlyeqsucc:"⋟",diamondsuit:"♢",preccurlyeq:"≼",succcurlyeq:"≽",textgreater:">",thickapprox:"≈",updownarrow:"↕",vartriangle:"△",Lleftarrow:"⇚",Rightarrow:"⇒",circledast:"⊛",complement:"∁",curlywedge:"⋏",longmapsto:"⟼",registered:"®",rightarrow:"→",smallfrown:"⌢",smallsmile:"⌣",sqsubseteq:"⊑",sqsupseteq:"⊒",textlangle:"〈",textrangle:"〉",upuparrows:"⇈",varepsilon:"ε",varnothing:"∅",Downarrow:"⇓",Leftarrow:"⇐",backprime:"‵",bigotimes:"⨂",centerdot:"⋅",copyright:"©",downarrow:"↓",gtreqless:"⋛",heartsuit:"♡",leftarrow:"←",lesseqgtr:"⋚",pitchfork:"⋔",spadesuit:"♠",therefore:"∴",trademark:"™",triangleq:"≜",varpropto:"∝",approxeq:"≊",barwedge:"⊼",bigoplus:"⨁",bigsqcup:"⨆",biguplus:"⨄",bigwedge:"⋀",boxminus:"⊟",boxtimes:"⊠",circledS:"Ⓢ",clubsuit:"♣",curlyvee:"⋎",doteqdot:"≑",emptyset:"∅",intercal:"⊺",leqslant:"⩽",multimap:"⊸",parallel:"∥",setminus:"∖",sqsubset:"⊏",sqsupset:"⊐",subseteq:"⊆",supseteq:"⊇",textless:"<",thicksim:"∼",triangle:"△",varkappa:"ϰ",varsigma:"ς",vartheta:"ϑ",Diamond:"◇",Uparrow:"⇑",Upsilon:"Υ",backsim:"∽",because:"∵",between:"≬",bigodot:"⨀",bigstar:"★",boxplus:"⊞",ddagger:"‡",diamond:"⋄",digamma:"Ϝ",dotplus:"∔",epsilon:"∊",gtrless:"≷",implies:"⇒",leadsto:"↝",lessdot:"⋖",lessgtr:"≶",lesssim:"≲",lozenge:"◊",natural:"♮",nearrow:"↗",nexists:"∄",nwarrow:"↖",partial:"∂",pilcrow:"¶",precsim:"≾",searrow:"↘",section:"§",succsim:"≿",swarrow:"↙",textbar:"|",uparrow:"↑",upsilon:"υ",Bumpeq:"≎",Lambda:"Λ",Subset:"⋐",Supset:"⋑",Vvdash:"⊪",approx:"≈",bigcap:"⋂",bigcup:"⋃",bigvee:"⋁",bowtie:"⋈",boxdot:"⊡",bullet:"∙",bumpeq:"≏",circeq:"≗",coprod:"∐",dagger:"†",daleth:"ד",degree:"°",eqcirc:"≖",exists:"∃",forall:"∀",gtrdot:"⋗",gtrsim:"≳",hslash:"ℏ",lambda:"λ",lfloor:"⌊",ltimes:"⋉",mapsto:"↦",models:"⊨",ominus:"⊖",oslash:"⊘",otimes:"⊗",preceq:"⪯",propto:"∝",rfloor:"⌋",rtimes:"⋊",square:"□",subset:"⊂",succeq:"⪰",supset:"⊃",varphi:"φ",varrho:"ϱ",veebar:"⊻",Delta:"Δ",Gamma:"Γ",Omega:"Ω",Theta:"Θ",Vdash:"⊩",aleph:"ℵ",Alpha:"Α",alpha:"α",angle:"∠",asymp:"≍",cdots:"⋯",cents:"¢",dashv:"⊣",ddots:"⋱",delta:"δ",doteq:"≐",equiv:"≡",frown:"⌢",gamma:"γ",gimel:"ℷ",infty:"∞",kappa:"κ",Kappa:"Κ",lceil:"⌈",nabla:"∇",notin:"∉",omega:"ω",oplus:"⊕",pound:"£",prime:"′",qquad:" ",rceil:"⌉",sharp:"♯",sigma:"σ",simeq:"≃",smile:"⌣",space:"␣",sqcap:"⊓",sqcup:"⊔",theta:"θ",times:"×",unlhd:"⊴",unrhd:"⊵",uplus:"⊎",vDash:"⊨",varpi:"ϖ",vdash:"⊢",vdots:"⋮",wedge:"∧",Finv:"Ⅎ",Join:"⋈",atop:"¦",beta:"β",Beta:"Β",beth:"ב",cdot:"⋅",circ:"∘",cong:"≅",dots:"…",euro:"€",flat:"♭",geqq:"≧",hbar:"ℏ",iota:"ι",leqq:"≦",odot:"⊙",oint:"∮",perp:"⊥",prec:"≺",prod:"∏",quad:" ",star:"⋆",succ:"≻",surd:"√",zeta:"ζ",Box:"□",Cap:"⋒",Cup:"⋓",Lsh:"↰",Phi:"Φ",Psi:"Ψ",Rsh:"↱",ast:"∗",bot:"⊥",cap:"∩",chi:"χ",Chi:"Χ",cup:"∪",div:"÷",ell:"ℓ",eta:"η",eth:"ð",geq:"≥",ggg:"⋙",int:"∫",leq:"≤",lhd:"⊲",lll:"⋘",mho:"℧",mid:"∣",neg:"¬",neq:"≠",phi:"ϕ",psi:"ψ",rhd:"⊳",rho:"ρ",Rho:"Ρ",sim:"∼",sum:"∑",tau:"τ",Tau:"Τ",top:"⊤",vee:"∨",Im:"ℑ",Pi:"Π",Re:"ℜ",Xi:"Ξ",ge:"≥",gg:"≫",in:"∈",le:"≤",ll:"≪",mp:"∓",mu:"μ",Mu:"Μ",ni:"∋",nu:"ν",Nu:"Ν",pi:"π",pm:"±",wp:"℘",wr:"≀",xi:"ξ",Omicron:"Ο",omicron:"ο",textdollar:"$",textquotesingle:"'",textbackslash:"\\",textasciigrave:"`",lbrace:"{",vert:"|",rbrace:"}",textasciitilde:"~",textexclamdown:"¡",textcent:"¢",textsterling:"£",textcurrency:"¤",textyen:"¥",textbrokenbar:"¦",textsection:"§",textasciidieresis:"¨",textcopyright:"©",textordfeminine:"ª",guillemotleft:"«",lnot:"¬",textasciimacron:"¯",textdegree:"°",textasciiacute:"´",textparagraph:"¶",textordmasculine:"º",guillemotright:"»",textonequarter:"¼",textonehalf:"½",textthreequarters:"¾",textquestiondown:"¿",AA:"Å",AE:"Æ",DH:"Ð",texttimes:"×",TH:"Þ",ss:"ß",aa:"å",ae:"æ",dh:"ð",th:"þ",DJ:"Đ",dj:"đ",Elzxh:"ħ",i:"ı",NG:"Ŋ",ng:"ŋ",OE:"Œ",oe:"œ",texthvlig:"ƕ",textnrleg:"ƞ",textdoublepipe:"ǂ",Elztrna:"ɐ",Elztrnsa:"ɒ",Elzopeno:"ɔ",Elzrtld:"ɖ",Elzschwa:"ə",Elzpgamma:"ɣ",Elzpbgam:"ɤ",Elztrnh:"ɥ",Elzbtdl:"ɬ",Elzrtll:"ɭ",Elztrnm:"ɯ",Elztrnmlr:"ɰ",Elzltlmr:"ɱ",Elzltln:"ɲ",Elzrtln:"ɳ",Elzclomeg:"ɷ",textphi:"ɸ",Elztrnr:"ɹ",Elztrnrl:"ɺ",Elzrttrnr:"ɻ",Elzrl:"ɼ",Elzrtlr:"ɽ",Elzfhr:"ɾ",Elzrtls:"ʂ",Elzesh:"ʃ",Elztrnt:"ʇ",Elzrtlt:"ʈ",Elzpupsil:"ʊ",Elzpscrv:"ʋ",Elzinvv:"ʌ",Elzinvw:"ʍ",Elztrny:"ʎ",Elzrtlz:"ʐ",Elzyogh:"ʒ",Elzglst:"ʔ",Elzreglst:"ʕ",Elzinglst:"ʖ",textturnk:"ʞ",Elzdyogh:"ʤ",Elztesh:"ʧ",textasciicaron:"ˇ",Elzverts:"ˈ",Elzverti:"ˌ",Elzlmrk:"ː",Elzhlmrk:"ˑ",Elzsbrhr:"˒",Elzsblhr:"˓",Elzrais:"˔",Elzlow:"˕",textasciibreve:"˘",textperiodcentered:"˙",texttildelow:"˜",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Iota:"Ι",Sigma:"Σ",texttheta:"θ",textvartheta:"ϑ",Stigma:"Ϛ",Digamma:"Ϝ",Koppa:"Ϟ",Sampi:"Ϡ",textTheta:"ϴ",textendash:"–",textemdash:"—",Vert:"‖",Elzreapos:"‛",textquotedblleft:"“",textquotedblright:"”",textdagger:"†",textdaggerdbl:"‡",textbullet:"•",ldots:"…",textperthousand:"‰",textpertenthousand:"‱",guilsinglleft:"‹",guilsinglright:"›",nolinebreak:"",Elzxrat:"℞",nleftarrow:"↚",nrightarrow:"↛",arrowwaveleft:"↜",arrowwaveright:"↝",nleftrightarrow:"↮",dblarrowupdown:"⇅",nLeftarrow:"⇍",nLeftrightarrow:"⇎",nRightarrow:"⇏",DownArrowUpArrow:"⇵",rightangle:"∟",nmid:"∤",nparallel:"∦",surfintegral:"∯",volintegral:"∰",clwintegral:"∱",Colon:"∷",homothetic:"∻",lazysinv:"∾",NotEqualTilde:"≂",approxnotequal:"≆",tildetrpl:"≋",allequal:"≌",NotHumpDownHump:"≎",NotHumpEqual:"≏",estimates:"≙",starequal:"≛",lneqq:"≨",lvertneqq:"≨",gneqq:"≩",gvertneqq:"≩",NotLessLess:"≪",NotGreaterGreater:"≫",lessequivlnt:"≲",greaterequivlnt:"≳",notlessgreater:"≸",notgreaterless:"≹",precapprox:"≾",NotPrecedesTilde:"≾",succapprox:"≿",NotSucceedsTilde:"≿",subsetneq:"⊊",varsubsetneqq:"⊊",supsetneq:"⊋",varsupsetneq:"⊋",NotSquareSubset:"⊏",NotSquareSuperset:"⊐",truestate:"⊧",forcesextra:"⊨",VDash:"⊫",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",original:"⊶",image:"⊷",hermitconjmatrix:"⊹",rightanglearc:"⊾",backsimeq:"⋍",verymuchless:"⋘",verymuchgreater:"⋙",Elzsqspne:"⋥",lnsim:"⋦",gnsim:"⋧",precedesnotsimilar:"⋨",succnsim:"⋩",ntriangleleft:"⋪",ntriangleright:"⋫",ntrianglelefteq:"⋬",ntrianglerighteq:"⋭",upslopeellipsis:"⋰",downslopeellipsis:"⋱",perspcorrespond:"⌆",recorder:"⌕",ulcorner:"⌜",urcorner:"⌝",llcorner:"⌞",lrcorner:"⌟",langle:"〈",rangle:"〉",Elzdlcorn:"⎣",lmoustache:"⎰",rmoustache:"⎱",textvisiblespace:"␣",Elzdshfnc:"┆",Elzsqfnw:"┙",diagup:"╱",Elzvrecto:"▯",Elzcirfl:"◐",Elzcirfr:"◑",Elzcirfb:"◒",Elzrvbull:"◘",Elzsqfl:"◧",Elzsqfr:"◨",Elzsqfse:"◪",bigcirc:"◯",rightmoon:"☾",mercury:"☿",venus:"♀",male:"♂",jupiter:"♃",saturn:"♄",uranus:"♅",neptune:"♆",pluto:"♇",aries:"♈",taurus:"♉",gemini:"♊",cancer:"♋",leo:"♌",virgo:"♍",libra:"♎",scorpio:"♏",sagittarius:"♐",capricornus:"♑",aquarius:"♒",pisces:"♓",quarternote:"♩",eighthnote:"♪",UpArrowBar:"⤒",DownArrowBar:"⤓",Elolarr:"⥀",Elorarr:"⥁",ElzRlarr:"⥂",ElzrLarr:"⥄",Elzrarrx:"⥇",LeftRightVector:"⥎",RightUpDownVector:"⥏",DownLeftRightVector:"⥐",LeftUpDownVector:"⥑",LeftVectorBar:"⥒",RightVectorBar:"⥓",RightUpVectorBar:"⥔",RightDownVectorBar:"⥕",DownLeftVectorBar:"⥖",DownRightVectorBar:"⥗",LeftUpVectorBar:"⥘",LeftDownVectorBar:"⥙",LeftTeeVector:"⥚",RightTeeVector:"⥛",RightUpTeeVector:"⥜",RightDownTeeVector:"⥝",DownLeftTeeVector:"⥞",DownRightTeeVector:"⥟",LeftUpTeeVector:"⥠",LeftDownTeeVector:"⥡",UpEquilibrium:"⥮",ReverseUpEquilibrium:"⥯",RoundImplies:"⥰",Elztfnc:"⦀",Elroang:"⦆",Elzddfnc:"⦙",Angle:"⦜",Elzlpargt:"⦠",ElzLap:"⧊",Elzdefas:"⧋",LeftTriangleBar:"⧏",NotLeftTriangleBar:"⧏",RightTriangleBar:"⧐",NotRightTriangleBar:"⧐",RuleDelayed:"⧴",Elxuplus:"⨄",ElzThr:"⨅",Elxsqcup:"⨆",ElzInf:"⨇",ElzSup:"⨈",ElzCint:"⨍",clockoint:"⨏",sqrint:"⨖",ElzTimes:"⨯",amalg:"⨿",ElzAnd:"⩓",ElzOr:"⩔",ElOr:"⩖",Elzminhat:"⩟",Equal:"⩵",nleqslant:"⩽",geqslant:"⩾",ngeqslant:"⩾",lessapprox:"⪅",gtrapprox:"⪆",lneq:"⪇",gneq:"⪈",lnapprox:"⪉",gnapprox:"⪊",lesseqqgtr:"⪋",gtreqqless:"⪌",eqslantless:"⪕",eqslantgtr:"⪖",NestedLessLess:"⪡",NotNestedLessLess:"⪡",NestedGreaterGreater:"⪢",NotNestedGreaterGreater:"⪢",precneqq:"⪵",succneqq:"⪶",precnapprox:"⪹",succnapprox:"⪺",subseteqq:"⫅",nsubseteqq:"⫅",supseteqq:"⫆",subsetneqq:"⫋",supsetneqq:"⫌",Elztdcol:"⫶",openbracketleft:"〚",openbracketright:"〛"},e.isCharacterUnicode=n,e.characterUnicode=function(t){return n(t)?e.characterUnicodeChart[t]:void 0}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.barredLUnicodeChart={l:"ł",L:"Ł"},e.barredLUnicode=function(t){return e.barredLUnicodeChart[t]}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.slashed_o="ø",e.slashed_O="Ø",e.slashedOUnicodeChart={o:e.slashed_o,O:e.slashed_O},e.slashedOUnicode=function(t){return e.slashedOUnicodeChart[t]}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.cyrillicUnicodeChart={CYRF:"Ф",CYRII:"І",CYROMEGA:"Ѡ",CYRG:"Г",cyrkvcrs:"ҝ",cyryo:"ё",CYRH:"Х",CYRZHDSC:"Җ",cyrphk:"ҧ",CYRTDSC:"Ҭ",CYRI:"И",cyryi:"ї",CYRDZHE:"Џ",cyriote:"ѥ",CYRK:"К",CYRSHHA:"Һ",CYRL:"Л",CYRM:"М",CYRCHLDSC:"Ӌ",CYRNJE:"Њ",CYRYAT:"Ѣ",CYRA:"А",CYRB:"Б",cyrchrdsc:"ҷ",cyrschwa:"ә",CYRDZE:"Ѕ",CYRIE:"Є",CYRC:"Ц",CYRZH:"Ж",CYRD:"Д",CYRABHCHDSC:"Ҿ",CYRFITA:"Ѳ",CYRE:"Е",CYRABHHA:"Ҩ",cyrya:"я",cyrdzhe:"џ",CYRIOTLYUS:"Ѩ",cyrsemisftsn:"ҍ",CYRV:"В",cyrishrt:"й",cyrdje:"ђ",cyrchldsc:"ӌ",CYRY:"Ү",cyrndsc:"ң",CYRZ:"З",CYRKHCRS:"Ҟ",CYRNG:"Ҥ",CYRCHRDSC:"Ҷ",CYRYHCRS:"Ұ",CYRSHCH:"Щ",CYRUSHRT:"Ў",cyryu:"ю",cyrksi:"ѯ",CYRN:"Н",CYRO:"О",CYRBYUS:"Ѫ",CYRP:"П",CYRZDSC:"Ҙ",CYRAE:"Ӕ",CYRR:"Р",CYRS:"С",CYRT:"Т",CYRABHCH:"Ҽ",cyruk:"ѹ",CYRU:"У",cyrii:"і",CYRSEMISFTSN:"Ҍ",cyrghcrs:"ғ",CYRISHRT:"Й",cyromegatitlo:"ѽ",cyrkbeak:"ҡ",cyrie:"є",cyrzdsc:"ҙ",CYRNDSC:"Ң",CYRGUP:"Ґ",cyrshch:"щ",CYRKHK:"Ӄ",cyrzh:"ж",CYRJE:"Ј",cyrthousands:"҂",cyrabhch:"ҽ",textnumero:"№",cyrng:"ҥ",CYRPSI:"Ѱ",CYRTETSE:"Ҵ",CYRIOTBYUS:"Ѭ",cyrnje:"њ",CYRIOTE:"Ѥ",cyrdze:"ѕ",cyrae:"ӕ",CYRHRDSN:"Ъ",CYRKOPPA:"Ҁ",CYRRTICK:"Ҏ",CYRSCHWA:"Ә",cyrtdsc:"ҭ",CYRGHK:"Ҕ",cyrabhha:"ҩ",cyrshha:"һ",CYRSH:"Ш",cyru:"у",cyrkhcrs:"ҟ",cyrt:"т",CYRERY:"Ы",cyrs:"с",cyrr:"р",CYROT:"Ѿ",cyrlyus:"ѧ",CYRNHK:"Ӈ",CYRSFTSN:"Ь",cyrghk:"ҕ",cyrp:"п",cyrabhdze:"ӡ",cyro:"о",CYRTSHE:"Ћ",cyrn:"н",CYRSDSC:"Ҫ",cyryhcrs:"ұ",cyrpsi:"ѱ",cyrz:"з",cyry:"ү",cyrje:"ј",cyrv:"в",cyrchvcrs:"ҹ",cyrkhk:"ӄ",cyre:"е",cyromega:"ѡ",cyrd:"д",cyrc:"ц",cyrb:"б",CYROTLD:"Ө",cyrgup:"ґ",CYRLJE:"Љ",cyra:"а",CYROMEGATITLO:"Ѽ",CYRGHCRS:"Ғ",CYRCHVCRS:"Ҹ",cyrm:"м",cyrl:"л",cyrsh:"ш",cyrk:"к",cyri:"и",cyrh:"х",CYRHDSC:"Ҳ",CYRIZH:"Ѵ",CYRABHDZE:"Ӡ",cyrkdsc:"қ",cyrg:"г",CYRCH:"Ч",cyrf:"ф",CYRYI:"Ї",cyrmillions:"҉",CYRKSI:"Ѯ",CYROMEGARND:"Ѻ",cyrot:"ѿ",cyrtetse:"ҵ",cyrhdsc:"ҳ",cyrushrt:"ў",cyriotlyus:"ѩ",CYRYA:"Я",cyrlje:"љ",cyrotld:"ө",CYRKDSC:"Қ",cyrhrdsn:"ъ",cyrrtick:"ҏ",cyrkoppa:"ҁ",CYRDJE:"Ђ",cyriotbyus:"ѭ",cyrhundredthousands:"҈",CYRpalochka:"Ӏ",CYRKVCRS:"Ҝ",cyromegarnd:"ѻ",cyrsftsn:"ь",cyrabhchdsc:"ҿ",cyrzhdsc:"җ",cyrerev:"э",CYRLYUS:"Ѧ",CYRKBEAK:"Ҡ",cyrery:"ы",CYREREV:"Э",cyrnhk:"ӈ",cyrsdsc:"ҫ",cyrch:"ч",cyrtshe:"ћ",CYRPHK:"Ҧ",CYRYO:"Ё",CYRYU:"Ю",CYRUK:"Ѹ"},e.cyrillicUnicode=function(t){return e.cyrillicUnicodeChart[t]}},function(t,e,i){"use strict";function n(t){return e.specialCharacters.hasOwnProperty(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.specialCharacters={i:"ı",j:"ȷ",oe:"œ",OE:"Œ",ae:"æ",AE:"Æ",aa:"å",AA:"Å",o:"ø",O:"Ø",ss:"ß",l:"ł",L:"Ł"},e.isSpecialCharacter=n,e.specialCharacter=function(t){return n(t)?e.specialCharacters[t]:void 0}},function(t,e,i){"use strict";function n(t,e){switch(t){case"cyrchar":var i=r.translateCharToCyrillic(e);if(i)return i;break;default:for(var n=0,s=[o.diacriticUnicode,a.formattingUnicode];n<s.length;n++){var l=s[n],u=l(t,e);if(u)return u}}throw new Error("No implementation found to expand \\"+t+" with argument {"+e+"}")}Object.defineProperty(e,"__esModule",{value:!0});var o=i(106),a=i(118),r=i(127);e.expand1argsCommand=n},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(107),o=i(108),a=i(109),r=i(110),s=i(111),l=i(112),u=i(113),c=i(114),d=i(10),h=i(115),f=i(116),p=i(117);e.barUnderLetter=d.simpleSuffix("̱"),e.dotUnderLetter=d.simpleSuffix("̣"),e.breve=d.simpleSuffix("̆"),e.macrron=d.simpleSuffix("̄"),e.dotOverLetter=d.simpleSuffix("̇"),e.longHungarianUmlaut=d.simpleSuffix("̋"),e.modifiersTextModeUnicodeChart={"`":a.graveAccent,"'":o.acuteAccent,"^":r.circumflex,"~":s.tilde,"=":e.macrron,".":e.dotOverLetter,'"':l.dieresis,H:e.longHungarianUmlaut,c:u.cedilla,k:h.ogonek,b:e.barUnderLetter,d:e.dotUnderLetter,r:n.ringOverLetter,u:e.breve,v:c.caron,t:f.tieLetters},e.modifiersMathModeUnicodeChart={check:c.caron,acute:o.acuteAccent,grave:o.acuteAccent,breve:e.breve,vec:p.vectorArrow,mathring:n.ringOverLetter},e.diacriticUnicode=function(t,i){var n=e.modifiersTextModeUnicodeChart[t];return n||(n=e.modifiersMathModeUnicodeChart[t]),n&&n(i)}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(6);e.ringOverLetter=n.lookupOrAppend({a:"å",A:"Å",y:"ẙ"},"̊")},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(6);e.acuteAccent=n.lookupOrAppend({e:"é",y:"ý",u:"ú",i:"í",o:"ó",a:"á",E:"É",Y:"Ý",U:"Ú",I:"Í",O:"Ó",A:"Á",cyrk:"ќ",cyrg:"ѓ",CYRK:"Ќ",CYRG:"Ѓ"},"́")},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(6);e.graveAccent=n.lookupOrAppend({e:"è",u:"ù",i:"ì",o:"ò",a:"à",E:"È",U:"Ù",I:"Ì",O:"Ò",A:"À"},"̀")},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(6);e.circumflex=n.lookupOrAppend({e:"ê",u:"û",i:"î",o:"ô",a:"â",E:"Ê",U:"Û",I:"Î",O:"Ô",A:"Â"},"̂")},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(6);e.tilde=n.lookupOrAppend({o:"õ",a:"ã",n:"ñ",O:"Õ",A:"Ã",N:"Ñ"},"̃")},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(6);e.dieresis=n.lookupOrAppend({e:"ë",y:"ÿ",u:"ü",i:"ï",o:"ö",a:"ä",E:"Ë",Y:"Ÿ",U:"Ü",I:"Ï",O:"Ö",A:"Ä"},"̈")},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(6);e.cedilla=n.lookupOrAppend({c:"ç"},"̧")},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(6);e.caron=n.lookupOrAppend({s:"š"},"̌")},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(10);e.ogonek=n.simpleSuffix("̨")},function(t,e,i){"use strict";function n(t){return o(t.charAt(0),t.substring(1))}function o(t,e){return t+"͡"+e}function a(t){return"t"===t}Object.defineProperty(e,"__esModule",{value:!0}),e.tieLetters=n,e.tie2Letters=o,e.isTieLetters=a},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(6);e.vectorArrow=n.lookupOrAppend({},"⃗")},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(119),o=i(120),a=i(121),r=i(122),s=i(123),l=i(124),u=i(37),c=i(125),d=i(38),h=i(126);e.formattingUnicode=function(t,e){var i=void 0;if(u.isBbCmd(t)?i=n.translateCharToBlackboard:u.isBfCmd(t)?i=o.translateCharToBold:u.isFrakCmd(t)?i=a.translateCharToFraktur:u.isItCmd(t)?i=r.translateCharToItalic:u.isTtCmd(t)?i=s.translateCharToMonospace:u.isCalCmd(t)?i=l.translateCharToCalligraphic:u.isSubCmd(t)?i=c.translateCharToSubscript:u.isSupCmd(t)?i=d.translateCharToSuperscript:u.isMonoCmd(t)&&(i=h.translateCharToMono),i){var f=i;return e.split("").map(function(t){return f(t)||t}).join("")}}},function(t,e,i){"use strict";function n(t){return e.blackboardCharacters.hasOwnProperty(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.blackboardCharacters={A:"𝔸",B:"𝔹",C:"ℂ",D:"𝔻",E:"𝔼",F:"𝔽",G:"𝔾",H:"ℍ",I:"𝕀",J:"𝕁",K:"𝕂",L:"𝕃",M:"𝕄",N:"ℕ",O:"𝕆",P:"ℙ",Q:"ℚ",R:"ℝ",S:"𝕊",T:"𝕋",U:"𝕌",V:"𝕍",W:"𝕎",X:"𝕏",Y:"𝕐",Z:"ℤ",a:"𝕒",b:"𝕓",c:"𝕔",d:"𝕕",e:"𝕖",f:"𝕗",g:"𝕘",h:"𝕙",i:"𝕚",j:"𝕛",k:"𝕜",l:"𝕝",m:"𝕞",n:"𝕟",o:"𝕠",p:"𝕡",q:"𝕢",r:"𝕣",s:"𝕤",t:"𝕥",u:"𝕦",v:"𝕧",w:"𝕨",x:"𝕩",y:"𝕪",z:"𝕫",0:"𝟘",1:"𝟙",2:"𝟚",3:"𝟛",4:"𝟜",5:"𝟝",6:"𝟞",7:"𝟟",8:"𝟠",9:"𝟡"},e.isBlackboardCharacter=n,e.translateCharToBlackboard=function(t){return n(t)?e.blackboardCharacters[t]:void 0}},function(t,e,i){"use strict";function n(t){return e.boldCharacters.hasOwnProperty(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.boldCharacters={A:"𝐀",B:"𝐁",C:"𝐂",D:"𝐃",E:"𝐄",F:"𝐅",G:"𝐆",H:"𝐇",I:"𝐈",J:"𝐉",K:"𝐊",L:"𝐋",M:"𝐌",N:"𝐍",O:"𝐎",P:"𝐏",Q:"𝐐",R:"𝐑",S:"𝐒",T:"𝐓",U:"𝐔",V:"𝐕",W:"𝐖",X:"𝐗",Y:"𝐘",Z:"𝐙",a:"𝐚",b:"𝐛",c:"𝐜",d:"𝐝",e:"𝐞",f:"𝐟",g:"𝐠",h:"𝐡",i:"𝐢",j:"𝐣",k:"𝐤",l:"𝐥",m:"𝐦",n:"𝐧",o:"𝐨",p:"𝐩",q:"𝐪",r:"𝐫",s:"𝐬",t:"𝐭",u:"𝐮",v:"𝐯",w:"𝐰",x:"𝐱",y:"𝐲",z:"𝐳","Α":"𝚨","Β":"𝚩","Γ":"𝚪","Δ":"𝚫","Ε":"𝚬","Ζ":"𝚭","Η":"𝚮","Θ":"𝚯","Ι":"𝚰","Κ":"𝚱","Λ":"𝚲","Μ":"𝚳","Ν":"𝚴","Ξ":"𝚵","Ο":"𝚶","Π":"𝚷","Ρ":"𝚸","ϴ":"𝚹","Σ":"𝚺","Τ":"𝚻","Υ":"𝚼","Φ":"𝚽","Χ":"𝚾","Ψ":"𝚿","Ω":"𝛀","∇":"𝛁","α":"𝛂","β":"𝛃","γ":"𝛄","δ":"𝛅","ε":"𝛆","ζ":"𝛇","η":"𝛈","θ":"𝛉","ι":"𝛊","κ":"𝛋","λ":"𝛌","μ":"𝛍","ν":"𝛎","ξ":"𝛏","ο":"𝛐","π":"𝛑","ρ":"𝛒","ς":"𝛓","σ":"𝛔","τ":"𝛕","υ":"𝛖","φ":"𝛗","χ":"𝛘","ψ":"𝛙","ω":"𝛚","∂":"𝛛","ϵ":"𝛜","ϑ":"𝛝","ϰ":"𝛞","ϕ":"𝛟","ϱ":"𝛠","ϖ":"𝛡",0:"𝟎",1:"𝟏",2:"𝟐",3:"𝟑",4:"𝟒",5:"𝟓",6:"𝟔",7:"𝟕",8:"𝟖",9:"𝟗"},e.isBlackboardCharacter=n,e.translateCharToBold=function(t){return n(t)?e.boldCharacters[t]:void 0}},function(t,e,i){"use strict";function n(t){return e.frakturCharacters.hasOwnProperty(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.frakturCharacters={A:"𝔄",B:"𝔅",C:"ℭ",D:"𝔇",E:"𝔈",F:"𝔉",G:"𝔊",H:"ℌ",I:"ℑ",J:"𝔍",K:"𝔎",L:"𝔏",M:"𝔐",N:"𝔑",O:"𝔒",P:"𝔓",Q:"𝔔",R:"ℜ",S:"𝔖",T:"𝔗",U:"𝔘",V:"𝔙",W:"𝔚",X:"𝔛",Y:"𝔜",Z:"ℨ",a:"𝔞",b:"𝔟",c:"𝔠",d:"𝔡",e:"𝔢",f:"𝔣",g:"𝔤",h:"𝔥",i:"𝔦",j:"𝔧",k:"𝔨",l:"𝔩",m:"𝔪",n:"𝔫",o:"𝔬",p:"𝔭",q:"𝔮",r:"𝔯",s:"𝔰",t:"𝔱",u:"𝔲",v:"𝔳",w:"𝔴",x:"𝔵",y:"𝔶",z:"𝔷"},e.isFrakturCharacter=n,e.translateCharToFraktur=function(t){return n(t)?e.frakturCharacters[t]:void 0}},function(t,e,i){"use strict";function n(t){return e.italicCharacters.hasOwnProperty(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.italicCharacters={A:"𝐴",B:"𝐵",C:"𝐶",D:"𝐷",E:"𝐸",F:"𝐹",G:"𝐺",H:"𝐻",I:"𝐼",J:"𝐽",K:"𝐾",L:"𝐿",M:"𝑀",N:"𝑁",O:"𝑂",P:"𝑃",Q:"𝑄",R:"𝑅",S:"𝑆",T:"𝑇",U:"𝑈",V:"𝑉",W:"𝑊",X:"𝑋",Y:"𝑌",Z:"𝑍",a:"𝑎",b:"𝑏",c:"𝑐",d:"𝑑",e:"𝑒",f:"𝑓",g:"𝑔",h:"ℎ",i:"𝑖",j:"𝑗",k:"𝑘",l:"𝑙",m:"𝑚",n:"𝑛",o:"𝑜",p:"𝑝",q:"𝑞",r:"𝑟",s:"𝑠",t:"𝑡",u:"𝑢",v:"𝑣",w:"𝑤",x:"𝑥",y:"𝑦",z:"𝑧","Α":"𝛢","Β":"𝛣","Γ":"𝛤","Δ":"𝛥","Ε":"𝛦","Ζ":"𝛧","Η":"𝛨","Θ":"𝛩","Ι":"𝛪","Κ":"𝛫","Λ":"𝛬","Μ":"𝛭","Ν":"𝛮","Ξ":"𝛯","Ο":"𝛰","Π":"𝛱","Ρ":"𝛲","ϴ":"𝛳","Σ":"𝛴","Τ":"𝛵","Υ":"𝛶","Φ":"𝛷","Χ":"𝛸","Ψ":"𝛹","Ω":"𝛺","∇":"𝛻","α":"𝛼","β":"𝛽","γ":"𝛾","δ":"𝛿","ε":"𝜀","ζ":"𝜁","η":"𝜂","θ":"𝜃","ι":"𝜄","κ":"𝜅","λ":"𝜆","μ":"𝜇","ν":"𝜈","ξ":"𝜉","ο":"𝜊","π":"𝜋","ρ":"𝜌","ς":"𝜍","σ":"𝜎","τ":"𝜏","υ":"𝜐","φ":"𝜑","χ":"𝜒","ψ":"𝜓","ω":"𝜔","∂":"𝜕","ϵ":"𝜖","ϑ":"𝜗","ϰ":"𝜘","ϕ":"𝜙","ϱ":"𝜚","ϖ":"𝜛"},e.isItalicCharacter=n,e.translateCharToItalic=function(t){return n(t)?e.italicCharacters[t]:void 0}},function(t,e,i){"use strict";function n(t){return e.monospaceCharacters.hasOwnProperty(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.monospaceCharacters={A:"𝙰",B:"𝙱",C:"𝙲",D:"𝙳",E:"𝙴",F:"𝙵",G:"𝙶",H:"𝙷",I:"𝙸",J:"𝙹",K:"𝙺",L:"𝙻",M:"𝙼",N:"𝙽",O:"𝙾",P:"𝙿",Q:"𝚀",R:"𝚁",S:"𝚂",T:"𝚃",U:"𝚄",V:"𝚅",W:"𝚆",X:"𝚇",Y:"𝚈",Z:"𝚉",a:"𝚊",b:"𝚋",c:"𝚌",d:"𝚍",e:"𝚎",f:"𝚏",g:"𝚐",h:"𝚑",i:"𝚒",j:"𝚓",k:"𝚔",l:"𝚕",m:"𝚖",n:"𝚗",o:"𝚘",p:"𝚙",q:"𝚚",r:"𝚛",s:"𝚜",t:"𝚝",u:"𝚞",v:"𝚟",w:"𝚠",x:"𝚡",y:"𝚢",z:"𝚣",0:"𝟶",1:"𝟷",2:"𝟸",3:"𝟹",4:"𝟺",5:"𝟻",6:"𝟼",7:"𝟽",8:"𝟾",9:"𝟿"},e.isMonospaceCharacter=n,e.translateCharToMonospace=function(t){return n(t)?e.monospaceCharacters[t]:void 0}},function(t,e,i){"use strict";function n(t){return e.calligraphicLetters.hasOwnProperty(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.calligraphicLetters={A:"𝓐",B:"𝓑",C:"𝓒",D:"𝓓",E:"𝓔",F:"𝓕",G:"𝓖",H:"𝓗",I:"𝓘",J:"𝓙",K:"𝓚",L:"𝓛",M:"𝓜",N:"𝓝",O:"𝓞",P:"𝓟",Q:"𝓠",R:"𝓡",S:"𝓢",T:"𝓣",U:"𝓤",V:"𝓥",W:"𝓦",X:"𝓧",Y:"𝓨",Z:"𝓩",a:"𝓪",b:"𝓫",c:"𝓬",d:"𝓭",e:"𝓮",f:"𝓯",g:"𝓰",h:"𝓱",i:"𝓲",j:"𝓳",k:"𝓴",l:"𝓵",m:"𝓶",n:"𝓷",o:"𝓸",p:"𝓹",q:"𝓺",r:"𝓻",s:"𝓼",t:"𝓽",u:"𝓾",v:"𝓿",w:"𝔀",x:"𝔁",y:"𝔂",z:"𝔃"},e.isCalligraphicLetter=n,e.translateCharToCalligraphic=function(t){return n(t)?e.calligraphicLetters[t]:void 0}},function(t,e,i){"use strict";function n(t){return e.subscriptCharacters.hasOwnProperty(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.subscriptCharacters={0:"₀",1:"₁",2:"₂",3:"₃",4:"₄",5:"₅",6:"₆",7:"₇",8:"₈",9:"₉","+":"₊","-":"₋","=":"₌","(":"₍",")":"₎",a:"ₐ",e:"ₑ",h:"ₕ",i:"ᵢ",j:"ⱼ",k:"ₖ",l:"ₗ",m:"ₘ",n:"ₙ",o:"ₒ",p:"ₚ",r:"ᵣ",s:"ₛ",t:"ₜ",u:"ᵤ",v:"ᵥ",x:"ₓ","β":"ᵦ","γ":"ᵧ","ρ":"ᵨ","φ":"ᵩ","χ":"ᵪ"},e.isSubscriptCharacter=n,e.translateCharToSubscript=function(t){return n(t)?e.subscriptCharacters[t]:void 0}},function(t,e,i){"use strict";function n(t){return e.monoCharacters.hasOwnProperty(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.monoCharacters={A:"𝙰",B:"𝙱",C:"𝙲",D:"𝙳",E:"𝙴",F:"𝙵",G:"𝙶",H:"𝙷",I:"𝙸",J:"𝙹",K:"𝙺",L:"𝙻",M:"𝙼",N:"𝙽",O:"𝙾",P:"𝙿",Q:"𝚀",R:"𝚁",S:"𝚂",T:"𝚃",U:"𝚄",V:"𝚅",W:"𝚆",X:"𝚇",Y:"𝚈",Z:"𝚉",a:"𝚊",b:"𝚋",c:"𝚌",d:"𝚍",e:"𝚎",f:"𝚏",g:"𝚐",h:"𝚑",i:"𝚒",j:"𝚓",k:"𝚔",l:"𝚕",m:"𝚖",n:"𝚗",o:"𝚘",p:"𝚙",q:"𝚚",r:"𝚛",s:"𝚜",t:"𝚝",u:"𝚞",v:"𝚟",w:"𝚠",x:"𝚡",y:"𝚢",z:"𝚣",0:"𝟶",1:"𝟷",2:"𝟸",3:"𝟹",4:"𝟺",5:"𝟻",6:"𝟼",7:"𝟽",8:"𝟾",9:"𝟿"},e.isMonoCharacter=n,e.translateCharToMono=function(t){return n(t)?e.monoCharacters[t]:void 0}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.cyrillicCharacters={"Ф":"Ф","І":"І","Ѡ":"Ѡ","Г":"Г","ҝ":"ҝ","ё":"ё","Х":"Х","Җ":"Җ","ҧ":"ҧ","Ҭ":"Ҭ","И":"И","ї":"ї","Џ":"Џ","ѥ":"ѥ","К":"К","Һ":"Һ","Л":"Л","М":"М","Ӌ":"Ӌ","Њ":"Њ","Ѣ":"Ѣ","А":"А","Б":"Б","ҷ":"ҷ","ә":"ә","Ѕ":"Ѕ","Є":"Є","Ц":"Ц","Ж":"Ж","Д":"Д","Ҿ":"Ҿ","Ѳ":"Ѳ","Е":"Е","Ҩ":"Ҩ","я":"я","џ":"џ","Ѩ":"Ѩ","ҍ":"ҍ","В":"В","й":"й","ђ":"ђ","ӌ":"ӌ","Ү":"Ү","ң":"ң","З":"З","Ҟ":"Ҟ","Ҥ":"Ҥ","Ҷ":"Ҷ","Ұ":"Ұ","Щ":"Щ","Ў":"Ў","ю":"ю","ѯ":"ѯ","Н":"Н","О":"О","Ѫ":"Ѫ","П":"П","Ҙ":"Ҙ","Ӕ":"Ӕ","Р":"Р","С":"С","Т":"Т","Ҽ":"Ҽ","ѹ":"ѹ","У":"У","і":"і","Ҍ":"Ҍ","ғ":"ғ","Й":"Й","ѽ":"ѽ","ҡ":"ҡ","є":"є","ҙ":"ҙ","Ң":"Ң","Ґ":"Ґ","щ":"щ","Ӄ":"Ӄ","ж":"ж","Ј":"Ј","҂":"҂","ҽ":"ҽ","№":"№","ҥ":"ҥ","Ѱ":"Ѱ","Ҵ":"Ҵ","Ѭ":"Ѭ","њ":"њ","Ѥ":"Ѥ","ѕ":"ѕ","ӕ":"ӕ","Ъ":"Ъ","Ҁ":"Ҁ","Ҏ":"Ҏ","Ә":"Ә","ҭ":"ҭ","Ҕ":"Ҕ","ҩ":"ҩ","һ":"һ","Ш":"Ш","у":"у","ҟ":"ҟ","т":"т","Ы":"Ы","с":"с","р":"р","Ѿ":"Ѿ","ѧ":"ѧ","Ӈ":"Ӈ","Ь":"Ь","ҕ":"ҕ","п":"п","ӡ":"ӡ","о":"о","Ћ":"Ћ","н":"н","Ҫ":"Ҫ","ұ":"ұ","ѱ":"ѱ","з":"з","ү":"ү","̏":"̏","ј":"ј","в":"в","ҹ":"ҹ","ӄ":"ӄ","е":"е","ѡ":"ѡ","д":"д","ц":"ц","б":"б","Ө":"Ө","ґ":"ґ","Љ":"Љ","а":"а","Ѽ":"Ѽ","Ғ":"Ғ","Ҹ":"Ҹ","м":"м","л":"л","ш":"ш","к":"к","и":"и","х":"х","Ҳ":"Ҳ","Ѵ":"Ѵ","Ӡ":"Ӡ","қ":"қ","г":"г","Ч":"Ч","ф":"ф","Ї":"Ї","҉":"҉","Ѯ":"Ѯ","Ѻ":"Ѻ","ѿ":"ѿ","ҵ":"ҵ","ҳ":"ҳ","ў":"ў","ѩ":"ѩ","Я":"Я","љ":"љ","ө":"ө","Қ":"Қ","ъ":"ъ","ҏ":"ҏ","ҁ":"ҁ","Ђ":"Ђ","ѭ":"ѭ","҈":"҈","Ӏ":"Ӏ","Ҝ":"Ҝ","ѻ":"ѻ","ь":"ь","ҿ":"ҿ","җ":"җ","э":"э","Ѧ":"Ѧ","Ҡ":"Ҡ","ы":"ы","Э":"Э","ӈ":"ӈ","ҫ":"ҫ","ч":"ч","ћ":"ћ","Ҧ":"Ҧ","Ё":"Ё","Ю":"Ю","Ѹ":"Ѹ","ќ":"ќ","ѓ":"ѓ","Ќ":"Ќ","Ѓ":"Ѓ"},e.isCyrillicCharacter=function(t){return e.cyrillicCharacters.hasOwnProperty(t)},e.translateCharToCyrillic=function(t){return e.isCyrillicCharacter(t)?e.cyrillicCharacters[t]:void 0}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.spaceCmds1arg={kern:!0,hskip:!0,hspace:!0,hphantom:!0}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.diacriticsTextMode={"`":!0,"'":!0,"^":!0,"~":!0,"=":!0,".":!0,'"':!0,H:!0,c:!0,k:!0,b:!0,d:!0,r:!0,u:!0,v:!0},e.diacriticsMathMode={hat:!0,widehat:!0,check:!0,tilde:!0,widetilde:!0,acute:!0,grave:!0,dot:!0,ddot:!0,breve:!0,bar:!0,vec:!0,mathring:!0}},function(t,e,i){"use strict";function n(t){var e=t?t.trim():void 0;if(!e)return"√";switch(e){case"2":return"√";case"3":return"∛";case"4":return"∜";default:for(var i=[],n=0;n<e.length;n++){var o=a.translateCharToSuperscript(e.charAt(n));if(!o)throw new Error('Could not translate "'+o+'" to superscript');i.push(o)}return i.join("")+"√"}}function o(t,e){var i=n(e),o=t.trim();return""===o?i:i+"("+o+")"}Object.defineProperty(e,"__esModule",{value:!0});var a=i(38);e.convertSqrtToUnicode=o},function(t,e,i){"use strict";function n(t,e,i){switch(t){case"frac":case"nfrac":case"cfrac":case"xfrac":case"sfrac":return o.convertFracToUnicode(e,i);case"binom":return a.convertBinom(e,i)}throw new Error("No implementation found to expand \\"+t+" with arguments {"+e+", "+i)}Object.defineProperty(e,"__esModule",{value:!0});var o=i(132),a=i(133);e.expand2argsCommand=n},function(t,e,i){"use strict";function n(t,e){return"1"===t&&"2"===e?"½":"1"===t&&"3"===e?"⅓":"1"===t&&"4"===e?"¼":"1"===t&&"5"===e?"⅕":"1"===t&&"6"===e?"⅙":"1"===t&&"8"===e?"⅛":"2"===t&&"3"===e?"⅔":"2"===t&&"5"===e?"⅖":"3"===t&&"4"===e?"¾":"3"===t&&"5"===e?"⅗":"3"===t&&"8"===e?"⅜":"4"===t&&"5"===e?"⅘":"5"===t&&"6"===e?"⅚":"5"===t&&"8"===e?"⅝":"7"===t&&"8"===e?"⅞":r.test(t)&&r.test(e)?a+t+"⁄"+e+a:(t=o.isSingleTerm.test(t)?t:o.addParenthesis(t),e=o.isSingleTerm.test(e)?e:o.addParenthesis(e),"("+t+" / "+e+")")}Object.defineProperty(e,"__esModule",{value:!0});var o=i(10),a="",r=/^[0-9]*$/;e.convertFracToUnicode=n},function(t,e,i){"use strict";function n(t,e){return t=a.test(t)?t:o.addParenthesis(t),e=a.test(e)?e:o.addParenthesis(e),"("+t+" ¦ "+e+")"}Object.defineProperty(e,"__esModule",{value:!0});var o=i(10),a=/^.$|^[0-9]+$/;e.convertBinom=n},function(t,e,i){"use strict";function n(t){return e.twoArgsCommands.hasOwnProperty(t)}Object.defineProperty(e,"__esModule",{value:!0});var o=i(135);e.twoArgsCommands=Object.assign({},o.fracCmds,{binom:!0}),e.is2argsCommand=n},function(t,e,i){"use strict";function n(t){return e.fracCmds.hasOwnProperty(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.fracCmds={frac:!0,nfrac:!0,cfrac:!0,xfrac:!0,sfrac:!0},e.isFracCmd=n},function(t,e,i){"use strict";function n(t){return{name:t,optionalArguments:0,argumentCount:0}}Object.defineProperty(e,"__esModule",{value:!0}),e.createKnownCommand=n},function(t,e,i){"use strict";function n(t){return{name:t,optionalArguments:0,argumentCount:1}}Object.defineProperty(e,"__esModule",{value:!0}),e.createKnownCommandWith1Arg=n},function(t,e,i){"use strict";var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"toolForm"},[i("div",{staticClass:"toolFormTitle"},[t._v("\n Citations\n "),t.viewRender?i("button",{staticClass:"btn btn-xs",attrs:{type:"button",title:"Show all in BibTeX format."},on:{click:t.toggleViewRender}},[i("i",{staticClass:"fa fa-pencil-square-o"}),t._v("\n Show BibTeX\n ")]):i("button",{staticClass:"btn btn-xs",attrs:{type:"button",title:"Return to formatted citation list."},on:{click:t.toggleViewRender}},[i("i",{staticClass:"fa fa-times"}),t._v("\n Hide BibTeX\n ")])]),t._v(" "),i("div",{staticClass:"toolFormBody citation-padding"},["histories"===t.source?i("div",{staticClass:"infomessage"},[t._v("\n When writing up your analysis, remember to include all references that should be cited in order\n to completely describe your work. Also, please remember to "),i("a",{attrs:{href:"https://galaxyproject.org/citing-galaxy"}},[t._v("cite Galaxy")]),t._v(".\n ")]):t._e()]),t._v(" "),i("div",{staticClass:"citations-bibtex toolFormBody citation-padding"},[t.viewRender?i("span",{staticClass:"citations-formatted"},[i("p",{domProps:{innerHTML:t._s(t.formattedReferences)}})]):i("textarea",{staticClass:"citations-bibtex-text"},[t._v(" "+t._s(t.content)+"\n ")])])])},o=[],a={render:n,staticRenderFns:o};e.a=a},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={tool:"fa-wrench",data_input:"fa-file-o",data_collection_input:"fa-folder-o",subworkflow:"fa-sitemap fa-rotate-270",pause:"fa-pause"}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,i){"use strict";(function(t){function i(t,e){this.canvas=null,this.dragging=!1,this.inner_color="#FFFFFF",this.outer_color="#D8B365",t&&e&&this.connect(t,e)}Object.defineProperty(e,"__esModule",{value:!0}),t.extend(i.prototype,{connect:function(t,e){this.handle1=t,this.handle1&&this.handle1.connect(this),this.handle2=e,this.handle2&&this.handle2.connect(this)},destroy:function(){this.handle1&&this.handle1.disconnect(this),this.handle2&&this.handle2.disconnect(this),t(this.canvas).remove()},destroyIfInvalid:function(){this.handle1&&this.handle2&&!this.handle2.attachable(this.handle1)&&this.destroy()},redraw:function(){var e=t("#canvas-container");this.canvas||(this.canvas=document.createElement("canvas"),e.append(t(this.canvas)),this.dragging&&(this.canvas.style.zIndex="300"));var i=function(i){return t(i).offset().left-e.offset().left},n=function(i){return t(i).offset().top-e.offset().top};if(this.handle1&&this.handle2){var o=i(this.handle1.element)+5,a=n(this.handle1.element)+5,r=i(this.handle2.element)+5,s=n(this.handle2.element)+5,l=Math.min(o,r),u=Math.max(o,r),c=Math.min(a,s),d=Math.max(a,s),h=Math.min(Math.max(Math.abs(d-c)/2,100),300),f=l-100,p=c-100,m=u-l+200,v=d-c+200;this.canvas.style.left=f+"px",this.canvas.style.top=p+"px",this.canvas.setAttribute("width",m),this.canvas.setAttribute("height",v),o-=f,a-=p,r-=f,s-=p;var g=(this.canvas.getContext("2d"),null),_=null,w=1;if(this.handle1&&this.handle1.isMappedOver()){var g=[-6,-3,0,3,6];w=5}else var g=[0];if(this.handle2&&this.handle2.isMappedOver()){var _=[-6,-3,0,3,6];w=5}else var _=[0];for(var b=this,y=0;y<w;y++){var x=5,C=7;(g.length>1||_.length>1)&&(x=1,C=3),b.draw_outlined_curve(o,a,r,s,h,x,C,g[y%g.length],_[y%_.length])}}},draw_outlined_curve:function(t,e,i,n,o,a,r,s,l){var s=s||0,l=l||0,u=this.canvas.getContext("2d");u.lineCap="round",u.strokeStyle=this.outer_color,u.lineWidth=r,u.beginPath(),u.moveTo(t,e+s),u.bezierCurveTo(t+o,e+s,i-o,n+l,i,n+l),u.stroke(),u.strokeStyle=this.inner_color,u.lineWidth=a,u.beginPath(),u.moveTo(t,e+s),u.bezierCurveTo(t+o,e+s,i-o,n+l,i,n+l),u.stroke()}}),e.default=i}).call(e,i(0))},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,i){"use strict";function n(t){new a.default(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=n;var o=i(279),a=function(t){return t&&t.__esModule?t:{default:t}}(o);window.workflowApp=n},function(t,e,i){"use strict";(function(t,n,o){function a(t){return t&&t.__esModule?t:{default:t}}function r(e){var i=t("#galaxy_tools").contents();if(0===i.length&&(i=t(document),t(this).removeClass("search_active"),i.find(".toolTitle").removeClass("search_match"),i.find(".toolSectionBody").hide(),i.find(".toolTitle").show(),i.find(".toolPanelLabel").show(),i.find(".toolSectionWrapper").each(function(){"recently_used_wrapper"!==t(this).attr("id")?t(this).show():t(this).hasClass("user_pref_visible")&&t(this).show()}),i.find("#search-no-results").hide(),i.find("#search-spinner").hide(),e)){i.find("#tool-search-query").val("search tools")}}function s(e,i){var n=g.default[i];if(n){var o=t('<i class="icon fa"> </i>').addClass(n);e.before(o)}}Object.defineProperty(e,"__esModule",{value:!0});var l=i(3),u=a(l),c=i(280),d=a(c),h=i(281),f=a(h),p=i(282),m=a(p),v=i(190),g=a(v),_=i(287),w=a(_),b=i(4),y=a(b),x=i(203),C=a(x),k=i(42);!function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);e.default=t}(k);i(25),window.workflow_globals=window.workflow_globals||{},e.default=n.View.extend({initialize:function(e){function i(){var e=t('<form><label style="display:inline-block; width: 100%;">Save as name: </label><input type="text" id="workflow_rename" style="width: 80%;" autofocus/><br><label style="display:inline-block; width: 100%;">Annotation: </label><input type="text" id="wf_annotation" style="width: 80%;" /></form>');window.show_modal("Save As a New Workflow",e,{OK:function(){var e=t("#workflow_rename").val().length>0?t("#workflow_rename").val():"SavedAs_"+l.workflow.name,i=t("#wf_annotation").val().length>0?t("#wf_annotation").val():"";t.ajax({url:l.urls.workflow_save_as,type:"POST",data:{workflow_name:e,workflow_annotation:i,workflow_data:function(){return JSON.stringify(l.workflow.to_simple())}}}).done(function(t){window.onbeforeunload=void 0,window.location=Galaxy.root+"workflow/editor?id="+t,hide_modal()}).fail(function(){hide_modal(),alert("Saving this workflow failed. Please contact this site's administrator.")})},Cancel:hide_modal})}function n(){l.workflow.layout(),l.workflow.fit_canvas_to_nodes(),l.scroll_to_nodes(),l.canvas_manager.draw_overview()}function a(){t.jStorage.set("overview-off",!1),t("#overview-border").css("right","0px"),t("#close-viewport").css("background-position","0px 0px")}function s(){t.jStorage.set("overview-off",!0),t("#overview-border").css("right","20000px"),t("#close-viewport").css("background-position","12px 0px")}var l=window.workflow_globals.app=this;this.options=e,this.urls=e&&e.urls||{};var c=function(){if(l.workflow.check_changes_in_active_form(),workflow&&l.workflow.has_changes){var t=function(){window.onbeforeunload=void 0,window.document.location=l.urls.workflow_index};window.show_modal("Close workflow editor","There are unsaved changes to your workflow which will be lost.",{Cancel:hide_modal,"Save Changes":function(){d(null,t)}},{"Don't Save":t})}else window.document.location=l.urls.workflow_index},d=function(e,i){if(show_message("Saving workflow","progress"),l.workflow.check_changes_in_active_form(),!l.workflow.has_changes)return hide_modal(),void(i&&i());l.workflow.rectify_workflow_outputs(),u.default.request({url:Galaxy.root+"api/workflows/"+l.options.id,type:"PUT",data:{workflow:l.workflow.to_simple()},success:function(e){var n=t("<div/>").text(e.message);if(e.errors){n.addClass("warningmark");var o=t("<ul/>");t.each(e.errors,function(e,i){t("<li/>").text(i).appendTo(o)}),n.append(o)}else n.addClass("donemark");l.workflow.name=e.name,l.workflow.has_changes=!1,l.workflow.stored=!0,l.showWorkflowParameters(),e.errors?window.show_modal("Saving workflow",n,{Ok:hide_modal}):(i&&i(),hide_modal())},error:function(t){window.show_modal("Saving workflow failed.",t.err_msg,{Ok:hide_modal})}})};t("#tool-search-query").click(function(){t(this).focus(),t(this).select()}).keyup(function(){if(t(this).css("font-style","normal"),this.value.length<3)r(!1);else if(this.value!=this.lastValue){t(this).addClass("search_active");var e=this.value;this.timer&&clearTimeout(this.timer),t("#search-spinner").show(),this.timer=setTimeout(function(){t.get(l.urls.tool_search,{q:e},function(e){if(t("#search-no-results").hide(),t(".toolSectionWrapper").hide(),t(".toolSectionWrapper").find(".toolTitle").hide(),0!=e.length){var i=t.map(e,function(t,e){return"link-"+t});t(i).each(function(e,i){t("[id='"+i+"']").parent().addClass("search_match"),t("[id='"+i+"']").parent().show().parent().parent().show().parent().show()}),t(".toolPanelLabel").each(function(){for(var e=t(this),i=e.next(),n=!0;0!==i.length&&i.hasClass("toolTitle");){if(i.is(":visible")){n=!1;break}i=i.next()}n&&e.hide()})}else t("#search-no-results").show();t("#search-spinner").hide()},"json")},400)}this.lastValue=this.value}),this.canvas_manager=window.workflow_globals.canvas_manager=new f.default(this,t("#canvas-viewport"),t("#overview")),this.reset(),this.datatypes=JSON.parse(t.ajax({url:Galaxy.root+"api/datatypes",async:!1}).responseText),this.datatypes_mapping=JSON.parse(t.ajax({url:Galaxy.root+"api/datatypes/mapping",async:!1}).responseText),this.ext_to_type=this.datatypes_mapping.ext_to_class_name,this.type_to_type=this.datatypes_mapping.class_to_classes,this._workflowLoadAjax(l.options.id,{success:function(t){l.reset(),l.workflow.from_simple(t,!0),l.workflow.has_changes=!1,l.workflow.fit_canvas_to_nodes(),l.scroll_to_nodes(),l.canvas_manager.draw_overview();var e="";o.each(t.steps,function(i,n){var a="";i.errors&&(a+="<li>"+i.errors+"</li>"),o.each(t.upgrade_messages[n],function(t){a+="<li>"+t+"</li>"}),a&&(e+="<li>Step "+(parseInt(n,10)+1)+": "+l.workflow.nodes[n].name+"<ul>"+a+"</ul></li>")}),e?window.show_modal("Issues loading this workflow","Please review the following issues, possibly resulting from tool upgrades or changes.<p><ul>"+e+"</ul></p>",{Continue:hide_modal}):hide_modal(),l.showWorkflowParameters()},beforeSubmit:function(t){show_message("Loading workflow","progress")}}),window.make_popupmenu&&make_popupmenu(t("#workflow-options-button"),{Save:d,"Save As":i,Run:function(){window.location=Galaxy.root+"workflow/run?id="+l.options.id},"Edit Attributes":function(){l.workflow.clear_active_node()},"Auto Re-layout":n,Close:c});var h=t.jStorage.get("overview-size");void 0!==h&&t("#overview-border").css({width:h,height:h}),t.jStorage.get("overview-off")?s():a(),t("#overview-border").bind("dragend",function(e,i){var n=t(this).offsetParent(),o=n.offset(),a=Math.max(n.width()-(i.offsetX-o.left),n.height()-(i.offsetY-o.top));t.jStorage.set("overview-size",a+"px")}),t("#close-viewport").click(function(){"0px"===t("#overview-border").css("right")?s():a()}),window.onbeforeunload=function(){if(workflow&&l.workflow.has_changes)return"There are unsaved changes to your workflow which will be lost."},this.options.workflows.length>0&&t("#left").find(".toolMenu").append(this._buildToolPanelWorkflows()),t("div.toolSectionBody").hide(),t("div.toolSectionTitle > span").wrap("<a href='#'></a>");var p=null;t("div.toolSectionTitle").each(function(){var e=t(this).next("div.toolSectionBody");t(this).click(function(){e.is(":hidden")?(p&&p.slideUp("fast"),p=e,e.slideDown("fast")):(e.slideUp("fast"),p=null)})}),(0,C.default)("workflow-name","workflow-name",l.urls.rename_async,"new_name"),t("#workflow-tag").click(function(){return t(".tag-area").click(),!1}),(0,C.default)("workflow-annotation","workflow-annotation",l.urls.annotate_async,"new_annotation",25,!0,4)},_buildToolPanelWorkflows:function(){var e=this,i=t('<div class="toolSectionWrapper"><div class="toolSectionTitle"><a href="#"><span>Workflows</span></a></div><div class="toolSectionBody"><div class="toolSectionBg"/></div></div>');return o.each(this.options.workflows,function(n){if(n.id!==e.options.id){var o=new y.default.ButtonIcon({icon:"fa fa-copy",cls:"ui-button-icon-plain",tooltip:"Copy and insert individual steps",onclick:function(){n.step_count<2?e.copy_into_workflow(n.id,n.name):Galaxy.modal.show({title:"Warning",body:"This will copy "+n.step_count+" new steps into your workflow.",buttons:{Cancel:function(){Galaxy.modal.hide()},Copy:function(){Galaxy.modal.hide(),e.copy_into_workflow(n.id,n.name)}}})}}),a=t("<a/>").attr("href","#").html(n.name).on("click",function(){e.add_node_for_subworkflow(n.latest_id,n.name)});i.find(".toolSectionBg").append(t("<div/>").addClass("toolTitle").append(a).append(o.$el))}}),i},copy_into_workflow:function(e){var i=this;this._workflowLoadAjax(e,{success:function(e){i.workflow.from_simple(e,!1);var n="";t.each(e.upgrade_messages,function(e,o){n+="<li>Step "+(parseInt(e,10)+1)+": "+i.workflow.nodes[e].name+"<ul>",t.each(o,function(t,e){n+="<li>"+e+"</li>"}),n+="</ul></li>"}),n?window.show_modal("Subworkflow embedded with changes","Problems were encountered loading this workflow (possibly a result of tool upgrades). Please review the following parameters and then save.<ul>"+n+"</ul>",{Continue:hide_modal}):hide_modal()},beforeSubmit:function(t){show_message("Importing workflow","progress")}})},reset:function(){this.workflow&&this.workflow.remove_all(),this.workflow=window.workflow_globals.workflow=new d.default(this,t("#canvas-container"))},scroll_to_nodes:function(){var e,i,n=t("#canvas-viewport"),o=t("#canvas-container");i=o.width()<n.width()?(n.width()-o.width())/2:0,e=o.height()<n.height()?(n.height()-o.height())/2:0,o.css({left:i,top:e})},_workflowLoadAjax:function(e,i){t.ajax(u.default.merge(i,{url:this.urls.load_workflow,data:{id:e,_:"true"},dataType:"json",cache:!1}))},_moduleInitAjax:function(t,e){var i=this;u.default.request({type:"POST",url:Galaxy.root+"api/workflows/build_module",data:e,success:function(e){t.init_field_data(e),t.update_field_data(e),i.workflow.activate_node(t)}})},add_node_for_tool:function(t,e){var i=this.workflow.create_node("tool",e,t);this._moduleInitAjax(i,{type:"tool",tool_id:t,_:"true"})},add_node_for_subworkflow:function(t,e){var i=this.workflow.create_node("subworkflow",e,t);this._moduleInitAjax(i,{type:"subworkflow",content_id:t,_:"true"})},add_node_for_module:function(t,e){var i=this.workflow.create_node(t,e);this._moduleInitAjax(i,{type:t,_:"true"})},display_file_list:function(t){var e="<select id='node_data_list' name='node_data_list'>";for(var i in t.output_terminals)e+="<option value='"+i+"'>"+i+"</option>";return e+="</select>"},showWorkflowParameters:function(){var e=/\$\{.+?\}/g,i=[],n=t("#workflow-parameters-container"),o=t("#workflow-parameters-box"),a="",r=[];t.each(this.workflow.nodes,function(n,o){o.config_form&&o.config_form.inputs&&u.default.deepeach(o.config_form.inputs,function(t){if("string"==typeof t.value){var i=t.value.match(e);i&&(r=r.concat(i))}}),o.post_job_actions&&t.each(o.post_job_actions,function(i,n){n.action_arguments&&t.each(n.action_arguments,function(t,i){var n=i.match(e);n&&(r=r.concat(n))})}),r&&t.each(r,function(e,n){-1===t.inArray(n,i)&&i.push(n)})}),i&&0!==i.length?(t.each(i,function(t,e){a+="<div>"+e.substring(2,e.length-1)+"</div>"}),n.html(a),o.show()):(n.html(a),o.hide())},showAttributes:function(){t(".right-content").hide(),t("#edit-attributes").show()},showForm:function(e,i){var n="right-content",o=n+"-"+i.id,a=t("#"+n);if(e&&0==a.find("#"+o).length){var r=t('<div id="'+o+'" class="'+n+'"/>');if(e.node=i,e.workflow=this.workflow,e.datatypes=this.datatypes,e.icon=g.default[i.type],e.cls="ui-portlet-narrow",i){var s="tool"==i.type?"Tool":"Default";r.append(new w.default[s](e).form.$el),a.append(r)}else Galaxy.emit.debug("workflow-view::initialize()","Node not found in workflow.")}t("."+n).hide(),a.find("#"+o).show(),a.show(),a.scrollTop()},isSubType:function(t,e){return t=this.ext_to_type[t],e=this.ext_to_type[e],this.type_to_type[t]&&e in this.type_to_type[t]},prebuildNode:function(e,i,n){var o=this,a=t("<div class='toolForm toolFormInCanvas'/>"),r=t("<div class='toolFormTitle unselectable'><span class='nodeTitle'>"+i+"</div></div>");s(r.find(".nodeTitle"),e),a.append(r),a.css("left",t(window).scrollLeft()+20),a.css("top",t(window).scrollTop()+20),a.append(t("<div class='toolFormBody'></div>"));var l=new m.default(this,{element:a});l.type=e,l.content_id=n;var u="<div><img height='16' align='middle' src='"+Galaxy.root+"static/images/loading_small_white_bg.gif'/> loading tool info...</div>";a.find(".toolFormBody").append(u);var c=t("<div class='buttons' style='float: right;'></div>");c.append(t("<div/>").addClass("fa-icon-button fa fa-times").click(function(t){l.destroy()})),a.appendTo("#canvas-container");var d=t("#canvas-container").position(),h=t("#canvas-container").parent(),f=a.width(),p=a.height();return a.css({left:-d.left+h.width()/2-f/2,top:-d.top+h.height()/2-p/2}),c.prependTo(a.find(".toolFormTitle")),f+=c.width()+10,a.css("width",f),a.bind("dragstart",function(){o.workflow.activate_node(l)}).bind("dragend",function(){o.workflow.node_changed(this),o.workflow.fit_canvas_to_nodes(),o.canvas_manager.draw_overview()}).bind("dragclickonly",function(){o.workflow.activate_node(l)}).bind("drag",function(e,i){var n=t(this).offsetParent().offset(),o=i.offsetX-n.left,a=i.offsetY-n.top;t(this).css({left:o,top:a}),t(this).find(".terminal").each(function(){this.terminal.redraw()})}),l}})}).call(e,i(0),i(1),i(2))},function(t,e,i){"use strict";(function(t){function n(t,e){this.app=t,this.canvas_container=e,this.id_counter=0,this.nodes={},this.name=null,this.has_changes=!1,this.active_form_has_changes=!1,this.workflowOutputLabels={}}Object.defineProperty(e,"__esModule",{value:!0});var o=i(223),a=function(t){return t&&t.__esModule?t:{default:t}}(o),r=i(42),s=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}(r);t.extend(n.prototype,{canLabelOutputWith:function(t){return!t||!(t in this.workflowOutputLabels)},registerOutputLabel:function(t){t&&(this.workflowOutputLabels[t]=!0)},unregisterOutputLabel:function(t){t&&delete this.workflowOutputLabels[t]},updateOutputLabel:function(t,e){t&&this.unregisterOutputLabel(t),this.canLabelOutputWith(e)||s.warning("Workflow contains duplicate workflow output labels "+e+". This must be fixed before it can be saved."),e&&this.registerOutputLabel(e)},attemptUpdateOutputLabel:function(t,e,i){return!!this.canLabelOutputWith(i)&&(t.labelWorkflowOutput(e,i),t.nodeView.redrawWorkflowOutputs(),!0)},create_node:function(t,e,i){var n=this.app.prebuildNode(t,e,i);return this.add_node(n),this.fit_canvas_to_nodes(),this.app.canvas_manager.draw_overview(),this.activate_node(n),n},add_node:function(t){t.id=this.id_counter,t.element.attr("id","wf-node-step-"+t.id),this.id_counter++,this.nodes[t.id]=t,this.has_changes=!0,t.workflow=this},remove_node:function(t){this.active_node==t&&this.clear_active_node(),delete this.nodes[t.id],this.has_changes=!0},remove_all:function(){var e=this;t.each(this.nodes,function(t,i){i.destroy(),e.remove_node(i)})},rectify_workflow_outputs:function(){var e=!1,i=!1;if(t.each(this.nodes,function(n,o){o.workflow_outputs&&o.workflow_outputs.length>0&&(e=!0),t.each(o.post_job_actions,function(t,e){"HideDatasetAction"===e.action_type&&(i=!0)})}),!1!==e||!1!==i){var n=this;t.each(this.nodes,function(i,o){if("tool"===o.type){var a=!1;null===o.post_job_actions&&(o.post_job_actions={},a=!0);var r=[];t.each(o.post_job_actions,function(t,e){"HideDatasetAction"==e.action_type&&r.push(t)}),r.length>0&&t.each(r,function(t,e){a=!0,delete o.post_job_actions[e]}),e&&t.each(o.output_terminals,function(t,e){if(!0==!o.isWorkflowOutput(e.name)){a=!0;var i={action_type:"HideDatasetAction",output_name:e.name,action_arguments:{}};o.post_job_actions["HideDatasetAction"+e.name]=null,o.post_job_actions["HideDatasetAction"+e.name]=i}}),n.active_node==o&&!0===a&&n.reload_active_node()}})}},to_simple:function(){var e={};return t.each(this.nodes,function(i,n){var o={};t.each(n.input_terminals,function(e,i){o[i.name]=null;var n=[];t.each(i.connectors,function(t,e){if(e.handle1){var a={id:e.handle1.node.id,output_name:e.handle1.name},r=i.attributes.input.input_subworkflow_step_id;void 0!==r&&(a.input_subworkflow_step_id=r),n[t]=a,o[i.name]=n}})});var a={};n.post_job_actions&&t.each(n.post_job_actions,function(t,e){var i={action_type:e.action_type,output_name:e.output_name,action_arguments:e.action_arguments};a[e.action_type+e.output_name]=null,a[e.action_type+e.output_name]=i}),n.workflow_outputs||(n.workflow_outputs=[]);var r={id:n.id,type:n.type,content_id:n.content_id,tool_version:n.config_form.version,tool_state:n.tool_state,errors:n.errors,input_connections:o,position:t(n.element).position(),annotation:n.annotation,post_job_actions:n.post_job_actions,uuid:n.uuid,label:n.label,workflow_outputs:n.workflow_outputs};e[n.id]=r}),{steps:e}},from_simple:function(e,i){var n=void 0===i||i,o=this,r=0;n?o.name=e.name:r=Object.keys(o.nodes).length;var s=r,l=!1;t.each(e.steps,function(e,i){var a=o.app.prebuildNode(i.type,i.name,i.content_id);n||(i.uuid=null,t.each(i.workflow_outputs,function(t,e){e.uuid=null})),a.init_field_data(i),i.position&&a.element.css({top:i.position.top,left:i.position.left}),a.id=parseInt(i.id)+r,o.nodes[a.id]=a,s=Math.max(s,parseInt(e)+r),l||(a.workflow_outputs.length>0?l=!0:t.each(a.post_job_actions||[],function(t,e){"HideDatasetAction"===e.action_type&&(l=!0)}))}),o.id_counter=s+1,t.each(e.steps,function(e,i){var n=o.nodes[parseInt(e)+r];t.each(i.input_connections,function(e,i){i&&(t.isArray(i)||(i=[i]),t.each(i,function(t,i){var s=o.nodes[parseInt(i.id)+r],l=new a.default;l.connect(s.output_terminals[i.output_name],n.input_terminals[e]),l.redraw()}))}),l&&t.each(n.output_terminals,function(e,i){if(void 0===n.post_job_actions["HideDatasetAction"+i.name]){n.addWorkflowOutput(i.name);t(n.element).find(".callout."+i.name).find("img").attr("src",Galaxy.root+"static/images/fugue/asterisk-small.png"),o.has_changes=!0}})})},check_changes_in_active_form:function(){this.active_form_has_changes&&(this.has_changes=!0,t("#right-content").find("form").submit(),this.active_form_has_changes=!1)},reload_active_node:function(){if(this.active_node){var t=this.active_node;this.clear_active_node(),this.activate_node(t)}},clear_active_node:function(){this.active_node&&(this.active_node.make_inactive(),this.active_node=null),this.app.showAttributes()},activate_node:function(t){this.active_node!=t&&(this.check_changes_in_active_form(),this.clear_active_node(),this.app.showForm(t.config_form,t),t.make_active(),this.active_node=t)},node_changed:function(t,e){this.has_changes=!0,this.active_node==t&&e&&(this.check_changes_in_active_form(),this.app.showForm(t.config_form,t)),this.app.showWorkflowParameters()},layout:function(){this.check_changes_in_active_form(),this.has_changes=!0;var e={},i={};t.each(this.nodes,function(t,n){void 0===e[t]&&(e[t]=0),void 0===i[t]&&(i[t]=[])}),t.each(this.nodes,function(n,o){t.each(o.input_terminals,function(n,a){t.each(a.connectors,function(t,n){var a=n.handle1.node;e[o.id]+=1,i[a.id].push(o.id)})})});for(var n=[];;){var o=[];for(var a in e)0===e[a]&&o.push(a);if(0===o.length)break;n.push(o);for(var r in o){var s=o[r];delete e[s];for(var l in i[s])e[i[s][l]]-=1}}if(!e.length){var u=this.nodes,c=80;t.each(n,function(e,i){i.sort(function(e,i){return t(u[e].element).position().top-t(u[i].element).position().top});var n=0,o=30;t.each(i,function(e,i){var a=u[i],r=t(a.element);t(r).css({top:o,left:c}),n=Math.max(n,t(r).width()),o+=t(r).height()+30}),c+=n+80}),t.each(u,function(t,e){e.redraw()})}},bounds_for_all_nodes:function(){var e,i=1/0,n=-1/0,o=1/0,a=-1/0;return t.each(this.nodes,function(r,s){var l=t(s.element);e=l.position(),i=Math.min(i,e.left),n=Math.max(n,e.left+l.width()),o=Math.min(o,e.top),a=Math.max(a,e.top+l.width())}),{xmin:i,xmax:n,ymin:o,ymax:a}},fit_canvas_to_nodes:function(){function e(t,e){return Math.ceil(t/e)*e}function i(t,e){if(t<e||t>3*e){return-(t-(Math.ceil(t%e/e)+1)*e)}return 0}var n=this.bounds_for_all_nodes(),o=this.canvas_container.position(),a=this.canvas_container.parent(),r=i(n.xmin,100),s=i(n.ymin,100);r=Math.max(r,o.left),s=Math.max(s,o.top);var l=o.left-r,u=o.top-s,c=e(n.xmax+100,100)+r,d=e(n.ymax+100,100)+s;c=Math.max(c,-l+a.width()),d=Math.max(d,-u+a.height()),this.canvas_container.css({left:l,top:u,width:c,height:d}),this.canvas_container.children().each(function(){var e=t(this).position();t(this).css("left",e.left+r),t(this).css("top",e.top+s)})}}),e.default=n}).call(e,i(0))},function(t,e,i){"use strict";(function(t){function i(t,e,i){this.app=t,this.cv=e,this.cc=this.cv.find("#canvas-container"),this.overview=i,this.oc=i.find("#overview-canvas"),this.ov=i.find("#overview-viewport"),this.init_drag()}function n(t){this.panel=t}Object.defineProperty(e,"__esModule",{value:!0}),t.extend(i.prototype,{init_drag:function(){var e=this,i=function(t,i){t=Math.min(t,e.cv.width()/2),t=Math.max(t,-e.cc.width()+e.cv.width()/2),i=Math.min(i,e.cv.height()/2),i=Math.max(i,-e.cc.height()+e.cv.height()/2),e.cc.css({left:t,top:i}),e.cv.css({"background-position-x":t,"background-position-y":i}),e.update_viewport_overlay()};this.cc.each(function(){this.scroll_panel=new n(this)});var o,a;this.cv.bind("dragstart",function(){var i=t(this).offset(),n=e.cc.position();a=n.top-i.top,o=n.left-i.left}).bind("drag",function(t,e){i(e.offsetX+o,e.offsetY+a)}).bind("dragend",function(){e.app.workflow.fit_canvas_to_nodes(),e.draw_overview()}),this.overview.click(function(t){if(e.overview.hasClass("blockaclick"))e.overview.removeClass("blockaclick");else{var n=e.cc.width(),o=e.cc.height(),a=e.oc.width(),r=e.oc.height(),s=t.pageX-e.oc.offset().left-e.ov.width()/2,l=t.pageY-e.oc.offset().top-e.ov.height()/2;i(-s/a*n,-l/r*o),e.app.workflow.fit_canvas_to_nodes(),e.draw_overview()}}),this.ov.bind("drag",function(t,n){var o=e.cc.width(),a=e.cc.height(),r=e.oc.width(),s=e.oc.height(),l=n.offsetX-e.overview.offset().left,u=n.offsetY-e.overview.offset().top;i(-l/r*o,-u/s*a)}).bind("dragend",function(){e.overview.addClass("blockaclick"),e.app.workflow.fit_canvas_to_nodes(),e.draw_overview()}),t("#overview-border").bind("drag",function(i,n){var o=t(this).offsetParent(),a=o.offset(),r=Math.max(o.width()-(n.offsetX-a.left),o.height()-(n.offsetY-a.top));t(this).css({width:r,height:r}),e.draw_overview()}),t("#overview-border div").bind("drag",function(){})},update_viewport_overlay:function(){var t=this.cc,e=this.cv,i=this.oc,n=this.ov,o=t.width(),a=t.height(),r=i.width(),s=i.height(),l=t.position();n.css({left:-l.left/o*r,top:-l.top/a*s,width:e.width()/o*r-2,height:e.height()/a*s-2})},draw_overview:function(){var e,i,n,o,a=t("#overview-canvas"),r=a.parent().parent().width(),s=a.get(0).getContext("2d"),l=t("#canvas-container").width(),u=t("#canvas-container").height(),c=this.cv.width(),d=this.cv.height();l<c&&u<d?(n=l/c*r,o=(r-n)/2,e=u/d*r,i=(r-e)/2):l<u?(i=0,e=r,n=Math.ceil(e*l/u),o=(r-n)/2):(n=r,o=0,e=Math.ceil(n*u/l),i=(r-e)/2),a.parent().css({left:o,top:i,width:n,height:e}),a.attr("width",n),a.attr("height",e),t.each(this.app.workflow.nodes,function(i,o){s.fillStyle="#D2C099",s.strokeStyle="#D8B365",s.lineWidth=1;var a=t(o.element),r=a.position(),c=r.left/l*n,d=r.top/u*e,h=a.width()/l*n,f=a.height()/u*e;o.errors?(s.fillStyle="#FFCCCC",s.strokeStyle="#AA6666"):void 0!==o.workflow_outputs&&o.workflow_outputs.length>0&&(s.fillStyle="#E8A92D",s.strokeStyle="#E8A92D"),s.fillRect(c,d,h,f),s.strokeRect(c,d,h,f)}),this.update_viewport_overlay()}}),t.extend(n.prototype,{test:function(e,i){clearTimeout(this.timeout);var n=e.pageX,o=e.pageY,a=t(this.panel),r=a.position(),s=a.width(),l=a.height(),u=a.parent(),c=u.width(),d=u.height(),h=u.offset(),f=h.left,p=h.top,m=f+u.width(),v=p+u.height(),g=-(s-c/2),_=-(l-d/2),w=c/2,b=d/2,y=!1;if(n-5<f){if(r.left<w){var x=Math.min(23,w-r.left);a.css("left",r.left+x),y=!0}}else if(n+5>m){if(r.left>g){var x=Math.min(23,r.left-g);a.css("left",r.left-x),y=!0}}else if(o-5<p){if(r.top<b){var x=Math.min(23,b-r.top);a.css("top",r.top+x),y=!0}}else if(o+5>v&&r.top>_){var x=Math.min(23,r.top-g);a.css("top",r.top-x+"px"),y=!0}if(y){i();var a=this;this.timeout=setTimeout(function(){a.test(e,i)},50)}},stop:function(t,e){clearTimeout(this.timeout)}}),e.default=i}).call(e,i(0))},function(t,e,i){"use strict";(function(t,n,o){Object.defineProperty(e,"__esModule",{value:!0});var a=i(283),r=function(t){return t&&t.__esModule?t:{default:t}}(a),s=t.Model.extend({initialize:function(t,e){this.app=t,this.element=e.element,this.input_terminals={},this.output_terminals={},this.errors={},this.workflow_outputs=[]},getWorkflowOutput:function(t){return n.findWhere(this.workflow_outputs,{output_name:t})},isWorkflowOutput:function(t){return void 0!=this.getWorkflowOutput(t)},removeWorkflowOutput:function(t){for(;this.isWorkflowOutput(t);)this.workflow_outputs.splice(this.getWorkflowOutput(t),1)},addWorkflowOutput:function(t,e){if(!this.isWorkflowOutput(t)){var i={output_name:t};return e&&(i.label=e),this.workflow_outputs.push(i),!0}return!1},labelWorkflowOutput:function(t,e){var i=!1,n=null;if(this.isWorkflowOutput(t)){var o=this.getWorkflowOutput(t);n=o.label,o.label=e,i=n!=e}else i=this.addWorkflowOutput(t,e);return i&&(this.app.workflow.updateOutputLabel(n,e),this.markChanged(),this.nodeView.redrawWorkflowOutputs()),i},connectedOutputTerminals:function(){return this._connectedTerminals(this.output_terminals)},_connectedTerminals:function(t){var e=[];return o.each(t,function(t,i){i.connectors.length>0&&e.push(i)}),e},hasConnectedOutputTerminals:function(){var t=this.output_terminals;for(var e in t)if(t[e].connectors.length>0)return!0;return!1},connectedMappedInputTerminals:function(){return this._connectedMappedTerminals(this.input_terminals)},hasConnectedMappedInputTerminals:function(){var t=this.input_terminals;for(var e in t){var i=t[e];if(i.connectors.length>0&&i.isMappedOver())return!0}return!1},_connectedMappedTerminals:function(t){var e=[];return o.each(t,function(t,i){i.mapOver().isCollection&&i.connectors.length>0&&e.push(i)}),e},mappedInputTerminals:function(){return this._mappedTerminals(this.input_terminals)},_mappedTerminals:function(t){var e=[];return o.each(t,function(t,i){i.mapOver().isCollection&&e.push(i)}),e},hasMappedOverInputTerminals:function(){var t=!1;return n.each(this.input_terminals,function(e){e.mapOver().isCollection&&(t=!0)}),t},redraw:function(){o.each(this.input_terminals,function(t,e){e.redraw()}),o.each(this.output_terminals,function(t,e){e.redraw()})},destroy:function(){o.each(this.input_terminals,function(t,e){e.destroy()}),o.each(this.output_terminals,function(t,e){e.destroy()}),this.app.workflow.remove_node(this),o(this.element).remove()},make_active:function(){o(this.element).addClass("toolForm-active")},make_inactive:function(){var t=this.element.get(0);!function(e){e.removeChild(t),e.appendChild(t)}(t.parentNode),o(t).removeClass("toolForm-active")},init_field_data:function(t){t.type&&(this.type=t.type),this.name=t.name,this.config_form=t.config_form,this.tool_version=this.config_form&&this.config_form.version,this.tool_state=t.tool_state,this.errors=t.errors,this.tooltip=t.tooltip?t.tooltip:"",this.annotation=t.annotation,this.post_job_actions=t.post_job_actions?t.post_job_actions:{},this.label=t.label,this.uuid=t.uuid,this.workflow_outputs=t.workflow_outputs?t.workflow_outputs:[];var e=this,i=new r.default({el:this.element[0],node:e});e.nodeView=i,o.each(t.data_inputs,function(t,e){i.addDataInput(e)}),t.data_inputs.length>0&&t.data_outputs.length>0&&i.addRule(),o.each(t.data_outputs,function(t,e){i.addDataOutput(e)}),i.render(),this.app.workflow.node_changed(this,!0)},update_field_data:function(t){var e=this,i=e.nodeView,a=[];if(o.each(i.outputViews,function(e,i){var o=i.output.name,r=t.data_outputs,s=!1;n.each(r,function(t){t.name==o&&(s=!0)}),!1===s&&a.push(o)}),n.each(a,function(t){n.each(i.outputViews[t].terminalElement.terminal.connectors,function(t){t&&t.destroy()}),i.outputViews[t].remove(),delete i.outputViews[t],delete e.output_terminals[t]}),o.each(e.workflow_outputs,function(t,i){i&&!e.output_terminals[i.output_name]&&e.workflow_outputs.splice(t,1)}),o.each(t.data_outputs,function(t,n){i.outputViews[n.name]?(e.output_terminals[n.name].datatypes=n.extensions,e.output_terminals[n.name].destroyInvalidConnections()):i.addDataOutput(n)}),this.tool_state=t.tool_state,this.config_form=t.config_form,this.tool_version=this.config_form&&this.config_form.version,this.errors=t.errors,this.annotation=t.annotation,this.label=t.label,"post_job_actions"in t){var r=t.post_job_actions;this.post_job_actions=r||{}}e.nodeView.renderToolErrors();var s=i.$("div.inputs"),l=i.newInputsDiv(),u={};n.each(t.data_inputs,function(t){var i=e.nodeView.addDataInput(t,l);u[t.name]=i}),n.each(n.difference(n.values(i.terminalViews),n.values(u)),function(t){t.el.terminal.destroy()}),i.terminalViews=u,e.nodeView.render(),1==t.data_outputs.length&&"collection_type"in t.data_outputs[0]&&i.updateDataOutput(t.data_outputs[0]),s.replaceWith(l),"workflow_outputs"in t&&(this.workflow_outputs=workflow_outputs||[]),this.markChanged(),this.redraw()},error:function(t){var e=o(this.element).find(".toolFormBody");e.find("div").remove();var i="<div style='color: red; text-style: italic;'>"+t+"</div>";this.config_form=i,e.html(i),this.app.workflow.node_changed(this)},markChanged:function(){this.app.workflow.node_changed(this)}});e.default=s}).call(e,i(1),i(2),i(0))},function(t,e,i){"use strict";(function(t,n){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var a=i(2),r=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}(a),s=i(284),l=o(s),u=i(286),c=o(u);e.default=t.View.extend({initialize:function(t){this.node=t.node,this.output_width=Math.max(150,this.$el.width()),this.tool_body=this.$el.find(".toolFormBody"),this.tool_body.find("div").remove(),this.newInputsDiv().appendTo(this.tool_body),this.terminalViews={},this.outputViews={}},render:function(){this.renderToolLabel(),this.renderToolErrors(),this.$el.css("width",Math.min(250,Math.max(this.$el.width(),this.output_width)))},renderToolLabel:function(){this.$(".nodeTitle").text(this.node.label||this.node.name)},renderToolErrors:function(){this.node.errors?this.$el.addClass("tool-node-error"):this.$el.removeClass("tool-node-error")},newInputsDiv:function(){return n("<div/>").addClass("inputs")},updateMaxWidth:function(t){this.output_width=Math.max(this.output_width,t)},addRule:function(){this.tool_body.append(n("<div/>").addClass("rule"))},addDataInput:function(t,e){var i=!0;e||(e=this.$(".inputs"),i=!1);var n=this.terminalViews[t.name],o="dataset_collection"==t.input_type?l.default.InputCollectionTerminalView:l.default.InputTerminalView;if(!n||n instanceof o||(n.el.terminal.destroy(),n=null),n){var a=n.el.terminal;a.update(t),a.destroyInvalidConnections()}else n=new o({node:this.node,input:t});this.terminalViews[t.name]=n;var r=n.el,s=new c.default.DataInputView({terminalElement:r,input:t,nodeView:this,skipResize:i}),u=s.$el;return e.append(u.prepend(n.terminalElements())),n},addDataOutput:function(t){var e=t.collection?l.default.OutputCollectionTerminalView:l.default.OutputTerminalView,i=new e({node:this.node,output:t}),n=new c.default.DataOutputView({output:t,terminalElement:i.el,nodeView:this});this.outputViews[t.name]=n,this.tool_body.append(n.$el.append(i.terminalElements()))},redrawWorkflowOutputs:function(){r.each(this.outputViews,function(t){t.redrawWorkflowOutput()})},updateDataOutput:function(t){this.node.output_terminals[t.name].update(t)}})}).call(e,i(1),i(0))},function(t,e,i){"use strict";(function(t,n,o){function a(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=i(285),s=a(r),l=i(223),u=a(l);window.workflow_globals=window.workflow_globals||{};var c=t.View.extend({tagName:"div",className:"fa-icon-button fa fa-folder-o",initialize:function(t){this.$el.tooltip({delay:500,title:"Run tool in parallel over collection"}),this.model.bind("change",n.bind(this.render,this))},render:function(){this.model.mapOver.isCollection?this.$el.show():this.$el.hide()}}),d=c.extend({events:{click:"onClick",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave"},onMouseEnter:function(t){var e=this.model;!e.terminal.connected()&&e.mapOver.isCollection&&this.$el.css("color","red")},onMouseLeave:function(t){this.$el.css("color","black")},onClick:function(t){var e=this.model;!e.terminal.connected()&&e.mapOver.isCollection&&e.terminal.resetMapping()}}),h=t.View.extend({setupMappingView:function(t){var e=new this.terminalMappingClass({terminal:t}),i=new this.terminalMappingViewClass({model:e});i.render(),t.terminalMappingView=i,this.terminalMappingView=i},terminalElements:function(){return this.terminalMappingView?[this.terminalMappingView.el,this.el]:[this.el]}}),f=h.extend({className:"terminal input-terminal",initialize:function(t){var e=t.node,i=t.input,n=i.name,o=this.terminalForInput(i);o.multiple||this.setupMappingView(o),this.el.terminal=o,o.node=e,o.name=n,e.input_terminals[n]=o},events:{dropinit:"onDropInit",dropstart:"onDropStart",dropend:"onDropEnd",drop:"onDrop",hover:"onHover"},onDropInit:function(t,e){var i=this.el.terminal;return o(e.drag).hasClass("output-terminal")&&i.canAccept(e.drag.terminal)},onDropStart:function(t,e){e.proxy.terminal&&(e.proxy.terminal.connectors[0].inner_color="#BBFFBB")},onDropEnd:function(t,e){e.proxy.terminal&&(e.proxy.terminal.connectors[0].inner_color="#FFFFFF")},onDrop:function(t,e){var i=this.el.terminal;new u.default(e.drag.terminal,i).redraw()},onHover:function(){var t=this.el,e=t.terminal;if(e.connectors.length>0){var i=o("<div class='callout'></div>").css({display:"none"}).appendTo("body").append(o("<div class='button'></div>").append(o("<div/>").addClass("fa-icon-button fa fa-times").click(function(){o.each(e.connectors,function(t,e){e&&e.destroy()}),i.remove()}))).bind("mouseleave",function(){o(this).remove()});i.css({top:o(t).offset().top-2,left:o(t).offset().left-i.width(),"padding-right":o(t).width()}).show()}}}),p=f.extend({terminalMappingClass:s.default.TerminalMapping,terminalMappingViewClass:d,terminalForInput:function(t){return new s.default.InputTerminal({element:this.el,input:t})}}),m=f.extend({terminalMappingClass:s.default.TerminalMapping,terminalMappingViewClass:d,terminalForInput:function(t){return new s.default.InputCollectionTerminal({element:this.el,input:t})}}),v=h.extend({className:"terminal output-terminal",initialize:function(t){var e=t.node,i=t.output,n=i.name,o=this.terminalForOutput(i);this.setupMappingView(o),this.el.terminal=o,o.node=e,o.name=n,e.output_terminals[n]=o},events:{drag:"onDrag",dragstart:"onDragStart",dragend:"onDragEnd"},onDrag:function(t,e){var i=function(){var t=o(e.proxy).offsetParent().offset(),i=e.offsetX-t.left,n=e.offsetY-t.top;o(e.proxy).css({left:i,top:n}),e.proxy.terminal.redraw(),window.workflow_globals.canvas_manager.update_viewport_overlay()};i(),o("#canvas-container").get(0).scroll_panel.test(t,i)},onDragStart:function(t,e){o(e.available).addClass("input-terminal-active"),window.workflow_globals.workflow.check_changes_in_active_form();var i=o('<div class="drag-terminal" style="position: absolute;"></div>').appendTo("#canvas-container").get(0);i.terminal=new s.default.OutputTerminal({element:i});var n=new u.default;return n.dragging=!0,n.connect(this.el.terminal,i.terminal),i},onDragEnd:function(t,e){var i=e.proxy.terminal.connectors[0];i&&i.destroy(),o(e.proxy).remove(),o(e.available).removeClass("input-terminal-active"),o("#canvas-container").get(0).scroll_panel.stop()}}),g=v.extend({terminalMappingClass:s.default.TerminalMapping,terminalMappingViewClass:c,terminalForOutput:function(t){var e=t.extensions;return new s.default.OutputTerminal({element:this.el,datatypes:e})}}),_=v.extend({terminalMappingClass:s.default.TerminalMapping,terminalMappingViewClass:c,terminalForOutput:function(t){var e=t.collection_type,i=t.collection_type_source;return new s.default.OutputCollectionTerminal({element:this.el,collection_type:e,collection_type_source:i,datatypes:t.extensions})}});e.default={InputTerminalView:p,OutputTerminalView:g,InputCollectionTerminalView:m,OutputCollectionTerminalView:_}}).call(e,i(1),i(2),i(0))},function(t,e,i){"use strict";(function(t,i,n){function o(t){this.collectionType=t,this.isCollection=!0,this.rank=t.split(":").length}Object.defineProperty(e,"__esModule",{value:!0}),window.workflow_globals=window.workflow_globals||{};var a={isCollection:!1,canMatch:function(t){return!1},canMapOver:function(t){return!1},toString:function(){return"NullCollectionType[]"},append:function(t){return t},equal:function(t){return t===this}},r={isCollection:!0,canMatch:function(t){return a!==t},canMapOver:function(t){return!1},toString:function(){return"AnyCollectionType[]"},append:function(t){throw"Cannot append to ANY_COLLECTION_TYPE_DESCRIPTION"},equal:function(t){return t===this}};t.extend(o.prototype,{append:function(t){return t===a?this:t===r?otherCollectionType:new o(this.collectionType+":"+t.collectionType)},canMatch:function(t){return t!==a&&(t===r||t.collectionType==this.collectionType)},canMapOver:function(t){if(t===a)return!1;if(t===r)return!1;if(this.rank<=t.rank)return!1;var e=t.collectionType;return this._endsWith(this.collectionType,e)},effectiveMapOver:function(t){var e=t.collectionType;return new o(this.collectionType.substring(0,this.collectionType.length-e.length-1))},equal:function(t){return t.collectionType==this.collectionType},toString:function(){return"CollectionType["+this.collectionType+"]"},_endsWith:function(t,e){return-1!==t.indexOf(e,t.length-e.length)}});var s=i.Model.extend({initialize:function(t){this.mapOver=t.mapOver||a,this.terminal=t.terminal,this.terminal.terminalMapping=this},disableMapOver:function(){this.setMapOver(a)},setMapOver:function(t){this.mapOver=t,this.trigger("change")}}),l=i.Model.extend({initialize:function(t){this.element=t.element,this.connectors=[]},connect:function(t){this.connectors.push(t),this.node&&this.node.markChanged()},disconnect:function(e){this.connectors.splice(t.inArray(e,this.connectors),1),this.node&&(this.node.markChanged(),this.resetMappingIfNeeded())},redraw:function(){t.each(this.connectors,function(t,e){e.redraw()})},destroy:function(){t.each(this.connectors.slice(),function(t,e){e.destroy()})},destroyInvalidConnections:function(){n.each(this.connectors,function(t){t&&t.destroyIfInvalid()})},setMapOver:function(t){this.multiple||this.mapOver().equal(t)||(this.terminalMapping.setMapOver(t),n.each(this.node.output_terminals,function(e){e.setMapOver(t)}))},mapOver:function(){return this.terminalMapping?this.terminalMapping.mapOver:a},isMappedOver:function(){return this.terminalMapping&&this.terminalMapping.mapOver.isCollection},resetMapping:function(){this.terminalMapping.disableMapOver()},resetMappingIfNeeded:function(){}}),u=l.extend({initialize:function(t){l.prototype.initialize.call(this,t),this.datatypes=t.datatypes},resetMappingIfNeeded:function(){this.node.hasConnectedOutputTerminals()||this.node.hasConnectedMappedInputTerminals()||n.each(this.node.mappedInputTerminals(),function(t){t.resetMappingIfNeeded()}),!this.node.hasMappedOverInputTerminals()&&this.resetMapping()},resetMapping:function(){this.terminalMapping.disableMapOver(),n.each(this.connectors,function(t){var e=t.handle2;e&&(e.resetMappingIfNeeded(),t.destroyIfInvalid())})}}),c=l.extend({initialize:function(t){l.prototype.initialize.call(this,t),this.update(t.input)},canAccept:function(t){return!this._inputFilled()&&this.attachable(t)},resetMappingIfNeeded:function(){this.mapOver().isCollection&&((this.node.hasConnectedMappedInputTerminals()||!this.node.hasConnectedOutputTerminals())&&this.resetMapping())},resetMapping:function(){this.terminalMapping.disableMapOver(),this.node.hasMappedOverInputTerminals()||n.each(this.node.output_terminals,function(t){t.resetMapping()})},connected:function(){return 0!==this.connectors.length},_inputFilled:function(){var t;return this.connected()?this.multiple?this._collectionAttached()?inputsFilled=!0:t=!1:t=!0:t=!1,t},_collectionAttached:function(){if(this.connected()){var t=this.connectors[0].handle1;return!!t&&!!(t.isCollection||t.isMappedOver()||t.datatypes.indexOf("input_collection")>0)}return!1},_mappingConstraints:function(){if(!this.node)return[];var t=this.mapOver();if(t.isCollection)return[t];var e=[];return this.node.hasConnectedOutputTerminals()?e.push(n.first(n.values(this.node.output_terminals)).mapOver()):n.each(this.node.connectedMappedInputTerminals(),function(t){e.push(t.mapOver())}),e},_producesAcceptableDatatype:function(t){for(var e in this.datatypes){var i=this.datatypes[e];if("input"==i)return!0;var n=new Array;if(n=n.concat(t.datatypes),t.node.post_job_actions)for(var o in t.node.post_job_actions){var a=t.node.post_job_actions[o];"ChangeDatatypeAction"!=a.action_type||""!=a.output_name&&a.output_name!=t.name||!a.action_arguments||n.push(a.action_arguments.newtype)}for(var r in n){var s=n[r];if("input"==s||"_sniff_"==s||"input_collection"==s||window.workflow_globals.app.isSubType(n[r],i))return!0}}return!1},_otherCollectionType:function(t){var e=a;t.isCollection&&(e=t.collectionType);var i=t.mapOver();return i.isCollection&&(e=i.append(e)),e}}),d=c.extend({update:function(t){this.datatypes=t.extensions,this.multiple=t.multiple,this.collection=!1},connect:function(t){c.prototype.connect.call(this,t);var e=t.handle1;if(e){var i=this._otherCollectionType(e);i.isCollection&&this.setMapOver(i)}},attachable:function(t){var e=this._otherCollectionType(t),i=this.mapOver();if(e.isCollection){if(this.multiple)return!(this.connected()&&!this._collectionAttached())&&(1==e.rank&&this._producesAcceptableDatatype(t));if(i.isCollection&&i.canMatch(e))return this._producesAcceptableDatatype(t);return!!this._mappingConstraints().every(n.bind(e.canMatch,e))&&this._producesAcceptableDatatype(t)}return!i.isCollection&&this._producesAcceptableDatatype(t)}}),h=c.extend({update:function(t){this.multiple=!1,this.collection=!0,this.datatypes=t.extensions;var e=[];t.collection_types?n.each(t.collection_types,function(t){e.push(new o(t))}):e.push(r),this.collectionTypes=e},connect:function(t){c.prototype.connect.call(this,t);var e=t.handle1;if(e){var i=this._effectiveMapOver(e);this.setMapOver(i)}},_effectiveMapOver:function(t){var e=this.collectionTypes,i=this._otherCollectionType(t);if(!n.some(e,function(t){return t.canMatch(i)}))for(var o in e){var r=e[o];if(i.canMapOver(r)){var s=i.effectiveMapOver(r);if(s!=a)return s}}return a},_effectiveCollectionTypes:function(){var t=this.mapOver();return n.map(this.collectionTypes,function(e){return t.append(e)})},attachable:function(t){var e=this._otherCollectionType(t);if(e.isCollection){var i=this._effectiveCollectionTypes(),o=this.mapOver();if(n.some(i,function(t){return t.canMatch(e)}))return this._producesAcceptableDatatype(t);if(o.isCollection)return!1;if(n.some(this.collectionTypes,function(t){return e.canMapOver(t)})){var a=this._effectiveMapOver(t);if(!a.isCollection)return!1;if(this._mappingConstraints().every(a.canMatch))return this._producesAcceptableDatatype(t)}}return!1}}),f=l.extend({initialize:function(t){if(l.prototype.initialize.call(this,t),this.datatypes=t.datatypes,t.collection_type)this.collectionType=new o(t.collection_type);else{t.collection_type_source||console.log("Warning: No collection type or collection type source defined."),this.collectionType=r}this.isCollection=!0},update:function(t){var e;if(t.collection_type)e=new o(t.collection_type);else{t.collection_type_source||console.log("Warning: No collection type or collection type source defined."),e=r}e.collectionType!=this.collectionType.collectionType&&n.each(this.connectors,function(t){t.destroy()}),this.collectionType=e}});e.default={InputTerminal:d,OutputTerminal:u,InputCollectionTerminal:h,OutputCollectionTerminal:f,TerminalMapping:s,CollectionTypeDescription:o,NULL_COLLECTION_TYPE_DESCRIPTION:a,ANY_COLLECTION_TYPE_DESCRIPTION:r}}).call(e,i(0),i(1),i(2))},function(t,e,i){"use strict";(function(t,i){Object.defineProperty(e,"__esModule",{value:!0}),window.workflow_globals=window.workflow_globals||{};var n=t.View.extend({className:"form-row dataRow input-data-row",initialize:function(t){this.input=t.input,this.nodeView=t.nodeView,this.terminalElement=t.terminalElement,this.$el.attr("name",this.input.name).html(this.input.label),t.skipResize||(this.$el.css({position:"absolute",left:-1e3,top:-1e3,display:"none"}),i("body").append(this.el),this.nodeView.updateMaxWidth(this.$el.outerWidth()),this.$el.css({position:"",left:"",top:"",display:""}),this.$el.remove())}}),o=t.View.extend({className:"form-row dataRow",initialize:function(t){this.output=t.output,this.terminalElement=t.terminalElement,this.nodeView=t.nodeView;var e=this.output,n=e.name,o=this.nodeView.node;if(e.extensions.indexOf("input")>=0||e.extensions.indexOf("input_collection")>=0||(n=n+" ("+e.extensions.join(", ")+")"),this.$el.html(n),this.calloutView=null,["tool","subworkflow"].indexOf(o.type)>=0){var r=new a({label:n,output:e,node:o});this.calloutView=r,this.$el.append(r.el),this.$el.hover(function(){r.hoverImage()},function(){r.resetImage()})}this.$el.css({position:"absolute",left:-1e3,top:-1e3,display:"none"}),i("body").append(this.el),this.nodeView.updateMaxWidth(this.$el.outerWidth()+17),this.$el.css({position:"",left:"",top:"",display:""}).detach()},redrawWorkflowOutput:function(){this.calloutView&&this.calloutView.resetImage()}}),a=t.View.extend({tagName:"div",initialize:function(t){this.label=t.label,this.node=t.node,this.output=t.output;var e=this,n=this.node;this.$el.attr("class","callout "+this.label).css({display:"none"}).append(i("<div class='buttons'></div>").append(i("<img/>").attr("src",Galaxy.root+"static/images/fugue/asterisk-small-outline.png").click(function(){var t=e.output.name;n.isWorkflowOutput(t)?(n.removeWorkflowOutput(t),e.$("img").attr("src",Galaxy.root+"static/images/fugue/asterisk-small-outline.png")):(n.addWorkflowOutput(t),e.$("img").attr("src",Galaxy.root+"static/images/fugue/asterisk-small.png")),window.workflow_globals.workflow.has_changes=!0,window.workflow_globals.canvas_manager.draw_overview()}))).tooltip({delay:500,title:"Mark dataset as a workflow output. All unmarked datasets will be hidden."}),this.$el.css({top:"50%",margin:"-8px 0px 0px 0px",right:8}),this.$el.show(),this.resetImage()},resetImage:function(){this.node.isWorkflowOutput(this.output.name)?this.$("img").attr("src",Galaxy.root+"static/images/fugue/asterisk-small.png"):this.$("img").attr("src",Galaxy.root+"static/images/fugue/asterisk-small-outline.png")},hoverImage:function(){this.$("img").attr("src",Galaxy.root+"static/images/fugue/asterisk-small-yellow.png")}});e.default={DataInputView:n,DataOutputView:o}}).call(e,i(1),i(0))},function(t,e,i){"use strict";(function(t,n){function o(t){return t&&t.__esModule?t:{default:t}}function a(t){var e=t.model.attributes,i=e.workflow,n=e.node;e.inputs.unshift({type:"text",name:"__annotation",label:"Annotation",fixed:!0,value:n.annotation,area:!0,help:"Add an annotation or notes to this step. Annotations are available when a workflow is viewed."}),e.inputs.unshift({type:"text",name:"__label",label:"Label",value:n.label,help:"Add a step label.",fixed:!0,onchange:function(e){var o=!1;for(var a in i.nodes){var r=i.nodes[a];if(r.label&&r.label==e&&r.id!=n.id){o=!0;break}}var s=t.data.match("__label");t.element_list[s].model.set("error_text",o&&"Duplicate label. Please fix this before saving the workflow."),t.trigger("change")}})}function r(t){function e(t,i){i=i||[],i.push(t);for(var n in t.inputs){var o=t.inputs[n];if(o.action){if(o.name="pja__"+l+"__"+o.action,o.pja_arg&&(o.name+="__"+o.pja_arg),o.payload)for(var a in o.payload)o.payload[o.name+"__"+a]=o.payload[a],delete o.payload[a];var r=s[o.action+l];if(r){for(var u in i)i[u].expanded=!0;o.pja_arg?o.value=r.action_arguments&&r.action_arguments[o.pja_arg]||o.value:o.value="true"}}o.inputs&&e(o,i.slice(0))}}var i=t.model.attributes,n=i.inputs,o=i.datatypes,a=i.node,r=i.workflow,s=a.post_job_actions,l=a.output_terminals&&Object.keys(a.output_terminals)[0];if(l){n.push({name:"pja__"+l+"__EmailAction",label:"Email notification",type:"boolean",value:String(Boolean(s["EmailAction"+l])),ignore:"false",help:"An email notification will be sent when the job has completed.",payload:{host:window.location.host}}),n.push({name:"pja__"+l+"__DeleteIntermediatesAction",label:"Output cleanup",type:"boolean",value:String(Boolean(s["DeleteIntermediatesAction"+l])),ignore:"false",help:"Upon completion of this step, delete non-starred outputs from completed workflow steps if they are no longer required as inputs."});for(var u in a.output_terminals)n.push(function(t,i){var n=[],o=[];for(var s in i)n.push({0:i[s],1:i[s]});for(s in a.input_terminals)o.push(a.input_terminals[s].name);n.sort(function(t,e){return t.label>e.label?1:t.label<e.label?-1:0}),n.unshift({0:"Sequences",1:"Sequences"}),n.unshift({0:"Roadmaps",1:"Roadmaps"}),n.unshift({0:"Leave unchanged",1:"__empty__"});var l,u={title:"Configure Output: '"+t+"'",type:"section",flat:!0,inputs:[{label:"Label",type:"text",value:(l=a.getWorkflowOutput(t))&&l.label||"",help:"This will provide a short name to describe the output - this must be unique across workflows.",onchange:function(e){r.attemptUpdateOutputLabel(a,t,e)}},{action:"RenameDatasetAction",pja_arg:"newname",label:"Rename dataset",type:"text",value:"",ignore:"",help:'This action will rename the output dataset. Click <a href="https://galaxyproject.org/learn/advanced-workflow/variables/">here</a> for more information. Valid inputs are: <strong>'+o.join(", ")+"</strong>."},{action:"ChangeDatatypeAction",pja_arg:"newtype",label:"Change datatype",type:"select",ignore:"__empty__",value:"__empty__",options:n,help:"This action will change the datatype of the output to the indicated value."},{action:"TagDatasetAction",pja_arg:"tags",label:"Add Tags",type:"text",value:"",ignore:"",help:"This action will set tags for the dataset."},{action:"RemoveTagDatasetAction",pja_arg:"tags",label:"Remove Tags",type:"text",value:"",ignore:"",help:"This action will remove tags for the dataset."},{title:"Assign columns",type:"section",flat:!0,inputs:[{action:"ColumnSetAction",pja_arg:"chromCol",label:"Chrom column",type:"integer",value:"",ignore:""},{action:"ColumnSetAction",pja_arg:"startCol",label:"Start column",type:"integer",value:"",ignore:""},{action:"ColumnSetAction",pja_arg:"endCol",label:"End column",type:"integer",value:"",ignore:""},{action:"ColumnSetAction",pja_arg:"strandCol",label:"Strand column",type:"integer",value:"",ignore:""},{action:"ColumnSetAction",pja_arg:"nameCol",label:"Name column",type:"integer",value:"",ignore:""}],help:"This action will set column assignments in the output dataset. Blank fields are ignored."}]};return e(u),u}(u,o))}}Object.defineProperty(e,"__esModule",{value:!0});var s=i(3),l=o(s),u=i(20),c=o(u),d=i(60),h=o(d),f=t.View.extend({initialize:function(t){var e=this,i=t.node;this.form=new c.default(l.default.merge(t,{onchange:function(){l.default.request({type:"POST",url:Galaxy.root+"api/workflows/build_module",data:{id:i.id,type:i.type,content_id:i.content_id,inputs:e.form.data.create()},success:function(t){i.update_field_data(t)}})}})),a(this.form),this.form.render()}}),p=t.View.extend({initialize:function(t){var e=this,i=t.node;this.form=new h.default(l.default.merge(t,{text_enable:"Set in Advance",text_disable:"Set at Runtime",narrow:!0,initial_errors:!0,cls:"ui-portlet-narrow",initialmodel:function(t,i){e._customize(i),t.resolve()},buildmodel:function(t,e){e.model.get("postchange")(t,e)},postchange:function(t,o){var a=o.model.attributes,r={tool_id:a.id,tool_version:a.version,type:"tool",inputs:n.extend(!0,{},o.data.create())};Galaxy.emit.debug("tool-form-workflow::postchange()","Sending current state.",r),l.default.request({type:"POST",url:Galaxy.root+"api/workflows/build_module",data:r,success:function(n){o.model.set(n.config_form),e._customize(o),o.update(n.config_form),o.errors(n.config_form),i.update_field_data(n),Galaxy.emit.debug("tool-form-workflow::postchange()","Received new model.",n),t.resolve()},error:function(e){Galaxy.emit.debug("tool-form-workflow::postchange()","Refresh request failed.",e),t.reject()}})}}))},_customize:function(t){var e=t.model.attributes;l.default.deepeach(e.inputs,function(t){t.type&&(-1!=["data","data_collection"].indexOf(t.type)?(t.type="hidden",t.info="Data input '"+t.name+"' ("+l.default.textify(t.extensions)+")",t.value={__class__:"RuntimeValue"}):t.fixed||(t.collapsible_value={__class__:"RuntimeValue"},t.is_workflow=t.options&&0==t.options.length||-1!=["integer","float"].indexOf(t.type)))}),l.default.deepeach(e.inputs,function(t){"conditional"==t.type&&(t.test_param.collapsible_value=void 0)}),r(t),a(t)}});e.default={Default:f,Tool:p}}).call(e,i(1),i(0))}],[278]);
//# sourceMappingURL=workflow.bundled.js.map