text: !function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return t[r].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}var i=n(109),o=r(i);n(153);var s=o.default;for(var u in o)o.hasOwnProperty(u)&&(s[u]=o[u]);window&&(window.msa=s),t.exports=s},function(t,e,n){"use strict";t.exports.Model=n(41),t.exports.Collection=n(55),t.exports.Events=n(22),t.exports.extend=n(23)},function(t,e,n){"use strict";var r=n(60),i=n(58),o=n(59),s=n(5),u=function(t){this.cid=r.uniqueId("view"),t||(t={}),r.extend(this,r.pick(t,l)),this._ensureElement(),this.initialize.apply(this,arguments)},a=/^(\S+)\s*(.*)$/,l=["model","collection","el","id","attributes","className","tagName","events"];r.extend(u.prototype,i,{tagName:"div",$:function(t){return this.$el.find(t)},initialize:function(){},render:function(){return this},remove:function(){return this._removeElement(),this.stopListening(),this},_removeElement:function(){this.$el.remove()},setElement:function(t){return this.undelegateEvents(),this._setElement(t),this.delegateEvents(),this},_setElement:function(t){this.$el=t instanceof s?t:s(t),this.el=this.$el[0]},delegateEvents:function(t){if(!t&&!(t=r.result(this,"events")))return this;this.undelegateEvents();for(var e in t){var n=t[e];if(r.isFunction(n)||(n=this[t[e]]),n){var i=e.match(a);this.delegate(i[1],i[2],r.bind(n,this))}}return this},delegate:function(t,e,n){this.$el.on(t+".delegateEvents"+this.cid,e,n)},undelegateEvents:function(){return this.$el&&this.$el.off(".delegateEvents"+this.cid),this},undelegate:function(t,e,n){this.$el.off(t+".delegateEvents"+this.cid,e,n)},_createElement:function(t){return document.createElement(t)},_ensureElement:function(){if(this.el)this.setElement(r.result(this,"el"));else{var t=r.extend({},r.result(this,"attributes"));this.id&&(t.id=r.result(this,"id")),this.className&&(t.class=r.result(this,"className")),this.setElement(this._createElement(r.result(this,"tagName"))),this._setAttributes(t)}},_setAttributes:function(t){this.$el.attr(t)}}),u.extend=o,t.exports=u},function(t,e,n){var r;(function(t,i){"use strict";var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};(function(){function s(t,e){return t.set(e[0],e[1]),t}function u(t,e){return t.add(e),t}function a(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function l(t,e,n,r){for(var i=-1,o=null==t?0:t.length;++i<o;){var s=t[i];e(r,s,n(s),t)}return r}function c(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&e(t[n],n,t)!==!1;);return t}function f(t,e){for(var n=null==t?0:t.length;n--&&e(t[n],n,t)!==!1;);return t}function h(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function d(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var s=t[n];e(s,n,t)&&(o[i++]=s)}return o}function p(t,e){return!!(null==t?0:t.length)&&j(t,e,0)>-1}function g(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}function v(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}function m(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}function y(t,e,n,r){var i=-1,o=null==t?0:t.length;for(r&&o&&(n=t[++i]);++i<o;)n=e(n,t[i],i,t);return n}function _(t,e,n,r){var i=null==t?0:t.length;for(r&&i&&(n=t[--i]);i--;)n=e(n,t[i],i,t);return n}function b(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}function x(t){return t.split("")}function w(t){return t.match(Ue)||[]}function S(t,e,n){var r;return n(t,function(t,n,i){if(e(t,n,i))return r=n,!1}),r}function k(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o<i;)if(e(t[o],o,t))return o;return-1}function j(t,e,n){return e===e?Y(t,e,n):k(t,O,n)}function z(t,e,n,r){for(var i=n-1,o=t.length;++i<o;)if(r(t[i],e))return i;return-1}function O(t){return t!==t}function M(t,e){var n=null==t?0:t.length;return n?I(t,e)/n:Ft}function E(t){return function(e){return null==e?ot:e[t]}}function C(t){return function(e){return null==t?ot:t[e]}}function A(t,e,n,r,i){return i(t,function(t,i,o){n=r?(r=!1,t):e(n,t,i,o)}),n}function T(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}function I(t,e){for(var n,r=-1,i=t.length;++r<i;){var o=e(t[r]);o!==ot&&(n=n===ot?o:n+o)}return n}function N(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function L(t,e){return v(e,function(e){return[e,t[e]]})}function R(t){return function(e){return t(e)}}function q(t,e){return v(e,function(e){return t[e]})}function F(t,e){return t.has(e)}function P(t,e){for(var n=-1,r=t.length;++n<r&&j(e,t[n],0)>-1;);return n}function B(t,e){for(var n=t.length;n--&&j(e,t[n],0)>-1;);return n}function W(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}function D(t){return"\\"+rr[t]}function H(t,e){return null==t?ot:t[e]}function U(t){return Kn.test(t)}function V(t){return Xn.test(t)}function $(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}function G(t){var e=-1,n=Array(t.size);return t.forEach(function(t,r){n[++e]=[r,t]}),n}function K(t,e){return function(n){return t(e(n))}}function X(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var s=t[n];s!==e&&s!==ht||(t[n]=ht,o[i++]=n)}return o}function Z(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n}function J(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=[t,t]}),n}function Y(t,e,n){for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}function Q(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}function tt(t){return U(t)?nt(t):br(t)}function et(t){return U(t)?rt(t):x(t)}function nt(t){for(var e=$n.lastIndex=0;$n.test(t);)++e;return e}function rt(t){return t.match($n)||[]}function it(t){return t.match(Gn)||[]}var ot,st="4.17.4",ut=200,at="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",lt="Expected a function",ct="__lodash_hash_undefined__",ft=500,ht="__lodash_placeholder__",dt=1,pt=2,gt=4,vt=1,mt=2,yt=1,_t=2,bt=4,xt=8,wt=16,St=32,kt=64,jt=128,zt=256,Ot=512,Mt=30,Et="...",Ct=800,At=16,Tt=1,It=2,Nt=3,Lt=1/0,Rt=9007199254740991,qt=1.7976931348623157e308,Ft=NaN,Pt=4294967295,Bt=Pt-1,Wt=Pt>>>1,Dt=[["ary",jt],["bind",yt],["bindKey",_t],["curry",xt],["curryRight",wt],["flip",Ot],["partial",St],["partialRight",kt],["rearg",zt]],Ht="[object Arguments]",Ut="[object Array]",Vt="[object AsyncFunction]",$t="[object Boolean]",Gt="[object Date]",Kt="[object DOMException]",Xt="[object Error]",Zt="[object Function]",Jt="[object GeneratorFunction]",Yt="[object Map]",Qt="[object Number]",te="[object Null]",ee="[object Object]",ne="[object Promise]",re="[object Proxy]",ie="[object RegExp]",oe="[object Set]",se="[object String]",ue="[object Symbol]",ae="[object Undefined]",le="[object WeakMap]",ce="[object WeakSet]",fe="[object ArrayBuffer]",he="[object DataView]",de="[object Float32Array]",pe="[object Float64Array]",ge="[object Int8Array]",ve="[object Int16Array]",me="[object Int32Array]",ye="[object Uint8Array]",_e="[object Uint8ClampedArray]",be="[object Uint16Array]",xe="[object Uint32Array]",we=/\b__p \+= '';/g,Se=/\b(__p \+=) '' \+/g,ke=/(__e\(.*?\)|\b__t\)) \+\n'';/g,je=/&(?:amp|lt|gt|quot|#39);/g,ze=/[&<>"']/g,Oe=RegExp(je.source),Me=RegExp(ze.source),Ee=/<%-([\s\S]+?)%>/g,Ce=/<%([\s\S]+?)%>/g,Ae=/<%=([\s\S]+?)%>/g,Te=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ie=/^\w*$/,Ne=/^\./,Le=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Re=/[\\^$.*+?()[\]{}|]/g,qe=RegExp(Re.source),Fe=/^\s+|\s+$/g,Pe=/^\s+/,Be=/\s+$/,We=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,De=/\{\n\/\* \[wrapped with (.+)\] \*/,He=/,? & /,Ue=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Ve=/\\(\\)?/g,$e=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ge=/\w*$/,Ke=/^[-+]0x[0-9a-f]+$/i,Xe=/^0b[01]+$/i,Ze=/^\[object .+?Constructor\]$/,Je=/^0o[0-7]+$/i,Ye=/^(?:0|[1-9]\d*)$/,Qe=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,tn=/($^)/,en=/['\n\r\u2028\u2029\\]/g,nn="\\ud800-\\udfff",rn="\\u0300-\\u036f",on="\\ufe20-\\ufe2f",sn="\\u20d0-\\u20ff",un=rn+on+sn,an="\\u2700-\\u27bf",ln="a-z\\xdf-\\xf6\\xf8-\\xff",cn="\\xac\\xb1\\xd7\\xf7",fn="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",hn="\\u2000-\\u206f",dn=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",pn="A-Z\\xc0-\\xd6\\xd8-\\xde",gn="\\ufe0e\\ufe0f",vn=cn+fn+hn+dn,mn="['â€™]",yn="["+nn+"]",_n="["+vn+"]",bn="["+un+"]",xn="\\d+",wn="["+an+"]",Sn="["+ln+"]",kn="[^"+nn+vn+xn+an+ln+pn+"]",jn="\\ud83c[\\udffb-\\udfff]",zn="(?:"+bn+"|"+jn+")",On="[^"+nn+"]",Mn="(?:\\ud83c[\\udde6-\\uddff]){2}",En="[\\ud800-\\udbff][\\udc00-\\udfff]",Cn="["+pn+"]",An="\\u200d",Tn="(?:"+Sn+"|"+kn+")",In="(?:"+Cn+"|"+kn+")",Nn="(?:"+mn+"(?:d|ll|m|re|s|t|ve))?",Ln="(?:"+mn+"(?:D|LL|M|RE|S|T|VE))?",Rn=zn+"?",qn="["+gn+"]?",Fn="(?:"+An+"(?:"+[On,Mn,En].join("|")+")"+qn+Rn+")*",Pn="\\d*(?:(?:1st|2nd|3rd|(?![123])\\dth)\\b)",Bn="\\d*(?:(?:1ST|2ND|3RD|(?![123])\\dTH)\\b)",Wn=qn+Rn+Fn,Dn="(?:"+[wn,Mn,En].join("|")+")"+Wn,Hn="(?:"+[On+bn+"?",bn,Mn,En,yn].join("|")+")",Un=RegExp(mn,"g"),Vn=RegExp(bn,"g"),$n=RegExp(jn+"(?="+jn+")|"+Hn+Wn,"g"),Gn=RegExp([Cn+"?"+Sn+"+"+Nn+"(?="+[_n,Cn,"$"].join("|")+")",In+"+"+Ln+"(?="+[_n,Cn+Tn,"$"].join("|")+")",Cn+"?"+Tn+"+"+Nn,Cn+"+"+Ln,Bn,Pn,xn,Dn].join("|"),"g"),Kn=RegExp("["+An+nn+un+gn+"]"),Xn=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Zn=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Jn=-1,Yn={};Yn[de]=Yn[pe]=Yn[ge]=Yn[ve]=Yn[me]=Yn[ye]=Yn[_e]=Yn[be]=Yn[xe]=!0,Yn[Ht]=Yn[Ut]=Yn[fe]=Yn[$t]=Yn[he]=Yn[Gt]=Yn[Xt]=Yn[Zt]=Yn[Yt]=Yn[Qt]=Yn[ee]=Yn[ie]=Yn[oe]=Yn[se]=Yn[le]=!1;var Qn={};Qn[Ht]=Qn[Ut]=Qn[fe]=Qn[he]=Qn[$t]=Qn[Gt]=Qn[de]=Qn[pe]=Qn[ge]=Qn[ve]=Qn[me]=Qn[Yt]=Qn[Qt]=Qn[ee]=Qn[ie]=Qn[oe]=Qn[se]=Qn[ue]=Qn[ye]=Qn[_e]=Qn[be]=Qn[xe]=!0,Qn[Xt]=Qn[Zt]=Qn[le]=!1;var tr={"Ã€":"A","Ã":"A","Ã‚":"A","Ãƒ":"A","Ã„":"A","Ã…":"A","Ã ":"a","Ã¡":"a","Ã¢":"a","Ã£":"a","Ã¤":"a","Ã¥":"a","Ã‡":"C","Ã§":"c","Ã":"D","Ã°":"d","Ãˆ":"E","Ã‰":"E","ÃŠ":"E","Ã‹":"E","Ã¨":"e","Ã©":"e","Ãª":"e","Ã«":"e","ÃŒ":"I","Ã":"I","ÃŽ":"I","Ã":"I","Ã¬":"i","Ã­":"i","Ã®":"i","Ã¯":"i","Ã‘":"N","Ã±":"n","Ã’":"O","Ã“":"O","Ã”":"O","Ã•":"O","Ã–":"O","Ã˜":"O","Ã²":"o","Ã³":"o","Ã´":"o","Ãµ":"o","Ã¶":"o","Ã¸":"o","Ã™":"U","Ãš":"U","Ã›":"U","Ãœ":"U","Ã¹":"u","Ãº":"u","Ã»":"u","Ã¼":"u","Ã":"Y","Ã½":"y","Ã¿":"y","Ã†":"Ae","Ã¦":"ae","Ãž":"Th","Ã¾":"th","ÃŸ":"ss","Ä€":"A","Ä‚":"A","Ä„":"A","Ä":"a","Äƒ":"a","Ä…":"a","Ä†":"C","Äˆ":"C","ÄŠ":"C","ÄŒ":"C","Ä‡":"c","Ä‰":"c","Ä‹":"c","Ä":"c","ÄŽ":"D","Ä":"D","Ä":"d","Ä‘":"d","Ä’":"E","Ä”":"E","Ä–":"E","Ä˜":"E","Äš":"E","Ä“":"e","Ä•":"e","Ä—":"e","Ä™":"e","Ä›":"e","Äœ":"G","Äž":"G","Ä ":"G","Ä¢":"G","Ä":"g","ÄŸ":"g","Ä¡":"g","Ä£":"g","Ä¤":"H","Ä¦":"H","Ä¥":"h","Ä§":"h","Ä¨":"I","Äª":"I","Ä¬":"I","Ä®":"I","Ä°":"I","Ä©":"i","Ä«":"i","Ä­":"i","Ä¯":"i","Ä±":"i","Ä´":"J","Äµ":"j","Ä¶":"K","Ä·":"k","Ä¸":"k","Ä¹":"L","Ä»":"L","Ä½":"L","Ä¿":"L","Å":"L","Äº":"l","Ä¼":"l","Ä¾":"l","Å€":"l","Å‚":"l","Åƒ":"N","Å…":"N","Å‡":"N","ÅŠ":"N","Å„":"n","Å†":"n","Åˆ":"n","Å‹":"n","ÅŒ":"O","ÅŽ":"O","Å":"O","Å":"o","Å":"o","Å‘":"o","Å”":"R","Å–":"R","Å˜":"R","Å•":"r","Å—":"r","Å™":"r","Åš":"S","Åœ":"S","Åž":"S","Å ":"S","Å›":"s","Å":"s","ÅŸ":"s","Å¡":"s","Å¢":"T","Å¤":"T","Å¦":"T","Å£":"t","Å¥":"t","Å§":"t","Å¨":"U","Åª":"U","Å¬":"U","Å®":"U","Å°":"U","Å²":"U","Å©":"u","Å«":"u","Å­":"u","Å¯":"u","Å±":"u","Å³":"u","Å´":"W","Åµ":"w","Å¶":"Y","Å·":"y","Å¸":"Y","Å¹":"Z","Å»":"Z","Å½":"Z","Åº":"z","Å¼":"z","Å¾":"z","Ä²":"IJ","Ä³":"ij","Å’":"Oe","Å“":"oe","Å‰":"'n","Å¿":"s"},er={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},nr={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},rr={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ir=parseFloat,or=parseInt,sr="object"==("undefined"==typeof t?"undefined":o(t))&&t&&t.Object===Object&&t,ur="object"==("undefined"==typeof self?"undefined":o(self))&&self&&self.Object===Object&&self,ar=sr||ur||Function("return this")(),lr="object"==o(e)&&e&&!e.nodeType&&e,cr=lr&&"object"==o(i)&&i&&!i.nodeType&&i,fr=cr&&cr.exports===lr,hr=fr&&sr.process,dr=function(){try{return hr&&hr.binding&&hr.binding("util")}catch(t){}}(),pr=dr&&dr.isArrayBuffer,gr=dr&&dr.isDate,vr=dr&&dr.isMap,mr=dr&&dr.isRegExp,yr=dr&&dr.isSet,_r=dr&&dr.isTypedArray,br=E("length"),xr=C(tr),wr=C(er),Sr=C(nr),kr=function t(e){function n(t){if(ca(t)&&!wh(t)&&!(t instanceof x)){if(t instanceof i)return t;if(xc.call(t,"__wrapped__"))return us(t)}return new i(t)}function r(){}function i(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=ot}function x(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Pt,this.__views__=[]}function C(){var t=new x(this.__wrapped__);return t.__actions__=Wi(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Wi(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Wi(this.__views__),t}function Y(){if(this.__filtered__){var t=new x(this);t.__dir__=-1,t.__filtered__=!0}else t=this.clone(),t.__dir__*=-1;return t}function nt(){var t=this.__wrapped__.value(),e=this.__dir__,n=wh(t),r=e<0,i=n?t.length:0,o=Ao(0,i,this.__views__),s=o.start,u=o.end,a=u-s,l=r?u:s-1,c=this.__iteratees__,f=c.length,h=0,d=Jc(a,this.__takeCount__);if(!n||!r&&i==a&&d==a)return wi(t,this.__actions__);var p=[];t:for(;a--&&h<d;){l+=e;for(var g=-1,v=t[l];++g<f;){var m=c[g],y=m.iteratee,_=m.type,b=y(v);if(_==It)v=b;else if(!b){if(_==Tt)continue t;break t}}p[h++]=v}return p}function rt(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Ue(){this.__data__=af?af(null):{},this.size=0}function nn(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}function rn(t){var e=this.__data__;if(af){var n=e[t];return n===ct?ot:n}return xc.call(e,t)?e[t]:ot}function on(t){var e=this.__data__;return af?e[t]!==ot:xc.call(e,t)}function sn(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=af&&e===ot?ct:e,this}function un(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function an(){this.__data__=[],this.size=0}function ln(t){var e=this.__data__,n=Nn(e,t);return!(n<0||(n==e.length-1?e.pop():Lc.call(e,n,1),--this.size,0))}function cn(t){var e=this.__data__,n=Nn(e,t);return n<0?ot:e[n][1]}function fn(t){return Nn(this.__data__,t)>-1}function hn(t,e){var n=this.__data__,r=Nn(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}function dn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function pn(){this.size=0,this.__data__={hash:new rt,map:new(rf||un),string:new rt}}function gn(t){var e=Oo(this,t).delete(t);return this.size-=e?1:0,e}function vn(t){return Oo(this,t).get(t)}function mn(t){return Oo(this,t).has(t)}function yn(t,e){var n=Oo(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}function _n(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new dn;++e<n;)this.add(t[e])}function bn(t){return this.__data__.set(t,ct),this}function xn(t){return this.__data__.has(t)}function wn(t){var e=this.__data__=new un(t);this.size=e.size}function Sn(){this.__data__=new un,this.size=0}function kn(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}function jn(t){return this.__data__.get(t)}function zn(t){return this.__data__.has(t)}function On(t,e){var n=this.__data__;if(n instanceof un){var r=n.__data__;if(!rf||r.length<ut-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new dn(r)}return n.set(t,e),this.size=n.size,this}function Mn(t,e){var n=wh(t),r=!n&&xh(t),i=!n&&!r&&kh(t),o=!n&&!r&&!i&&Eh(t),s=n||r||i||o,u=s?N(t.length,pc):[],a=u.length;for(var l in t)!e&&!xc.call(t,l)||s&&("length"==l||i&&("offset"==l||"parent"==l)||o&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||Po(l,a))||u.push(l);return u}function En(t){var e=t.length;return e?t[ri(0,e-1)]:ot}function Cn(t,e){return rs(Wi(t),Bn(e,0,t.length))}function An(t){return rs(Wi(t))}function Tn(t,e,n){(n===ot||Zu(t[e],n))&&(n!==ot||e in t)||Fn(t,e,n)}function In(t,e,n){var r=t[e];xc.call(t,e)&&Zu(r,n)&&(n!==ot||e in t)||Fn(t,e,n)}function Nn(t,e){for(var n=t.length;n--;)if(Zu(t[n][0],e))return n;return-1}function Ln(t,e,n,r){return bf(t,function(t,i,o){e(r,t,n(t),o)}),r}function Rn(t,e){return t&&Di(e,Va(e),t)}function qn(t,e){return t&&Di(e,$a(e),t)}function Fn(t,e,n){"__proto__"==e&&Pc?Pc(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function Pn(t,e){for(var n=-1,r=e.length,i=uc(r),o=null==t;++n<r;)i[n]=o?ot:Da(t,e[n]);return i}function Bn(t,e,n){return t===t&&(n!==ot&&(t=t<=n?t:n),e!==ot&&(t=t>=e?t:e)),t}function Wn(t,e,n,r,i,o){var s,u=e&dt,a=e&pt,l=e&gt;if(n&&(s=i?n(t,r,i,o):n(t)),s!==ot)return s;if(!la(t))return t;var f=wh(t);if(f){if(s=No(t),!u)return Wi(t,s)}else{var h=Tf(t),d=h==Zt||h==Jt;if(kh(t))return Ei(t,u);if(h==ee||h==Ht||d&&!i){if(s=a||d?{}:Lo(t),!u)return a?Ui(t,qn(s,t)):Hi(t,Rn(s,t))}else{if(!Qn[h])return i?t:{};s=Ro(t,h,Wn,u)}}o||(o=new wn);var p=o.get(t);if(p)return p;o.set(t,s);var g=l?a?So:wo:a?$a:Va,v=f?ot:g(t);return c(v||t,function(r,i){v&&(i=r,r=t[i]),In(s,i,Wn(r,e,n,i,t,o))}),s}function Dn(t){var e=Va(t);return function(n){return Hn(n,t,e)}}function Hn(t,e,n){var r=n.length;if(null==t)return!r;for(t=hc(t);r--;){var i=n[r],o=e[i],s=t[i];if(s===ot&&!(i in t)||!o(s))return!1}return!0}function $n(t,e,n){if("function"!=typeof t)throw new gc(lt);return Lf(function(){t.apply(ot,n)},e)}function Gn(t,e,n,r){var i=-1,o=p,s=!0,u=t.length,a=[],l=e.length;if(!u)return a;n&&(e=v(e,R(n))),r?(o=g,s=!1):e.length>=ut&&(o=F,s=!1,e=new _n(e));t:for(;++i<u;){var c=t[i],f=null==n?c:n(c);if(c=r||0!==c?c:0,s&&f===f){for(var h=l;h--;)if(e[h]===f)continue t;a.push(c)}else o(e,f,r)||a.push(c)}return a}function Kn(t,e){var n=!0;return bf(t,function(t,r,i){return n=!!e(t,r,i)}),n}function Xn(t,e,n){for(var r=-1,i=t.length;++r<i;){var o=t[r],s=e(o);if(null!=s&&(u===ot?s===s&&!xa(s):n(s,u)))var u=s,a=o}return a}function tr(t,e,n,r){var i=t.length;for(n=Oa(n),n<0&&(n=-n>i?0:i+n),r=r===ot||r>i?i:Oa(r),r<0&&(r+=i),r=n>r?0:Ma(r);n<r;)t[n++]=e;return t}function er(t,e){var n=[];return bf(t,function(t,r,i){e(t,r,i)&&n.push(t)}),n}function nr(t,e,n,r,i){var o=-1,s=t.length;for(n||(n=Fo),i||(i=[]);++o<s;){var u=t[o];e>0&&n(u)?e>1?nr(u,e-1,n,r,i):m(i,u):r||(i[i.length]=u)}return i}function rr(t,e){return t&&wf(t,e,Va)}function sr(t,e){return t&&Sf(t,e,Va)}function ur(t,e){return d(e,function(e){return sa(t[e])})}function lr(t,e){e=Oi(e,t);for(var n=0,r=e.length;null!=t&&n<r;)t=t[is(e[n++])];return n&&n==r?t:ot}function cr(t,e,n){var r=e(t);return wh(t)?r:m(r,n(t))}function hr(t){return null==t?t===ot?ae:te:Fc&&Fc in hc(t)?Co(t):Jo(t)}function dr(t,e){return t>e}function br(t,e){return null!=t&&xc.call(t,e)}function kr(t,e){return null!=t&&e in hc(t)}function zr(t,e,n){return t>=Jc(e,n)&&t<Zc(e,n)}function Or(t,e,n){for(var r=n?g:p,i=t[0].length,o=t.length,s=o,u=uc(o),a=1/0,l=[];s--;){var c=t[s];s&&e&&(c=v(c,R(e))),a=Jc(c.length,a),u[s]=!n&&(e||i>=120&&c.length>=120)?new _n(s&&c):ot}c=t[0];var f=-1,h=u[0];t:for(;++f<i&&l.length<a;){var d=c[f],m=e?e(d):d;if(d=n||0!==d?d:0,!(h?F(h,m):r(l,m,n))){for(s=o;--s;){var y=u[s];if(!(y?F(y,m):r(t[s],m,n)))continue t}h&&h.push(m),l.push(d)}}return l}function Mr(t,e,n,r){return rr(t,function(t,i,o){e(r,n(t),i,o)}),r}function Er(t,e,n){e=Oi(e,t),t=Qo(t,e);var r=null==t?t:t[is(zs(e))];return null==r?ot:a(r,t,n)}function Cr(t){return ca(t)&&hr(t)==Ht}function Ar(t){return ca(t)&&hr(t)==fe}function Tr(t){return ca(t)&&hr(t)==Gt}function Ir(t,e,n,r,i){return t===e||(null==t||null==e||!ca(t)&&!ca(e)?t!==t&&e!==e:Nr(t,e,n,r,Ir,i))}function Nr(t,e,n,r,i,o){var s=wh(t),u=wh(e),a=s?Ut:Tf(t),l=u?Ut:Tf(e);a=a==Ht?ee:a,l=l==Ht?ee:l;var c=a==ee,f=l==ee,h=a==l;if(h&&kh(t)){if(!kh(e))return!1;s=!0,c=!1}if(h&&!c)return o||(o=new wn),s||Eh(t)?yo(t,e,n,r,i,o):_o(t,e,a,n,r,i,o);if(!(n&vt)){var d=c&&xc.call(t,"__wrapped__"),p=f&&xc.call(e,"__wrapped__");if(d||p){var g=d?t.value():t,v=p?e.value():e;return o||(o=new wn),i(g,v,n,r,o)}}return!!h&&(o||(o=new wn),bo(t,e,n,r,i,o))}function Lr(t){return ca(t)&&Tf(t)==Yt}function Rr(t,e,n,r){var i=n.length,o=i,s=!r;if(null==t)return!o;for(t=hc(t);i--;){var u=n[i];if(s&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++i<o;){u=n[i];var a=u[0],l=t[a],c=u[1];if(s&&u[2]){if(l===ot&&!(a in t))return!1}else{var f=new wn;if(r)var h=r(l,c,a,t,e,f);if(!(h===ot?Ir(c,l,vt|mt,r,f):h))return!1}}return!0}function qr(t){return!(!la(t)||Uo(t))&&(sa(t)?Oc:Ze).test(os(t))}function Fr(t){return ca(t)&&hr(t)==ie}function Pr(t){return ca(t)&&Tf(t)==oe}function Br(t){return ca(t)&&aa(t.length)&&!!Yn[hr(t)]}function Wr(t){return"function"==typeof t?t:null==t?Ll:"object"==("undefined"==typeof t?"undefined":o(t))?wh(t)?Gr(t[0],t[1]):$r(t):Hl(t)}function Dr(t){if(!Vo(t))return Xc(t);var e=[];for(var n in hc(t))xc.call(t,n)&&"constructor"!=n&&e.push(n);return e}function Hr(t){if(!la(t))return Zo(t);var e=Vo(t),n=[];for(var r in t)("constructor"!=r||!e&&xc.call(t,r))&&n.push(r);return n}function Ur(t,e){return t<e}function Vr(t,e){var n=-1,r=Ju(t)?uc(t.length):[];return bf(t,function(t,i,o){r[++n]=e(t,i,o)}),r}function $r(t){var e=Mo(t);return 1==e.length&&e[0][2]?Go(e[0][0],e[0][1]):function(n){return n===t||Rr(n,t,e)}}function Gr(t,e){return Wo(t)&&$o(e)?Go(is(t),e):function(n){var r=Da(n,t);return r===ot&&r===e?Ua(n,t):Ir(e,r,vt|mt)}}function Kr(t,e,n,r,i){t!==e&&wf(e,function(o,s){if(la(o))i||(i=new wn),Xr(t,e,s,n,Kr,r,i);else{var u=r?r(t[s],o,s+"",t,e,i):ot;u===ot&&(u=o),Tn(t,s,u)}},$a)}function Xr(t,e,n,r,i,o,s){var u=t[n],a=e[n],l=s.get(a);if(l)return void Tn(t,n,l);var c=o?o(u,a,n+"",t,e,s):ot,f=c===ot;if(f){var h=wh(a),d=!h&&kh(a),p=!h&&!d&&Eh(a);c=a,h||d||p?wh(u)?c=u:Yu(u)?c=Wi(u):d?(f=!1,c=Ei(a,!0)):p?(f=!1,c=Ri(a,!0)):c=[]:ya(a)||xh(a)?(c=u,xh(u)?c=Ca(u):(!la(u)||r&&sa(u))&&(c=Lo(a))):f=!1}f&&(s.set(a,c),i(c,a,r,o,s),s.delete(a)),Tn(t,n,c)}function Zr(t,e){var n=t.length;if(n)return e+=e<0?n:0,Po(e,n)?t[e]:ot}function Jr(t,e,n){var r=-1;return e=v(e.length?e:[Ll],R(zo())),T(Vr(t,function(t,n,i){return{criteria:v(e,function(e){return e(t)}),index:++r,value:t}}),function(t,e){return Fi(t,e,n)})}function Yr(t,e){return Qr(t,e,function(e,n){return Ua(t,n)})}function Qr(t,e,n){for(var r=-1,i=e.length,o={};++r<i;){var s=e[r],u=lr(t,s);n(u,s)&&li(o,Oi(s,t),u)}return o}function ti(t){return function(e){return lr(e,t)}}function ei(t,e,n,r){var i=r?z:j,o=-1,s=e.length,u=t;for(t===e&&(e=Wi(e)),n&&(u=v(t,R(n)));++o<s;)for(var a=0,l=e[o],c=n?n(l):l;(a=i(u,c,a,r))>-1;)u!==t&&Lc.call(u,a,1),Lc.call(t,a,1);return t}function ni(t,e){for(var n=t?e.length:0,r=n-1;n--;){var i=e[n];if(n==r||i!==o){var o=i;Po(i)?Lc.call(t,i,1):_i(t,i)}}return t}function ri(t,e){return t+Uc(tf()*(e-t+1))}function ii(t,e,n,r){for(var i=-1,o=Zc(Hc((e-t)/(n||1)),0),s=uc(o);o--;)s[r?o:++i]=t,t+=n;return s}function oi(t,e){var n="";if(!t||e<1||e>Rt)return n;do e%2&&(n+=t),e=Uc(e/2),e&&(t+=t);while(e);return n}function si(t,e){return Rf(Yo(t,e,Ll),t+"")}function ui(t){return En(il(t))}function ai(t,e){var n=il(t);return rs(n,Bn(e,0,n.length))}function li(t,e,n,r){if(!la(t))return t;e=Oi(e,t);for(var i=-1,o=e.length,s=o-1,u=t;null!=u&&++i<o;){var a=is(e[i]),l=n;if(i!=s){var c=u[a];l=r?r(c,a,u):ot,l===ot&&(l=la(c)?c:Po(e[i+1])?[]:{})}In(u,a,l),u=u[a]}return t}function ci(t){return rs(il(t))}function fi(t,e,n){var r=-1,i=t.length;e<0&&(e=-e>i?0:i+e),n=n>i?i:n,n<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var o=uc(i);++r<i;)o[r]=t[r+e];return o}function hi(t,e){var n;return bf(t,function(t,r,i){return n=e(t,r,i),!n}),!!n}function di(t,e,n){var r=0,i=null==t?r:t.length;if("number"==typeof e&&e===e&&i<=Wt){for(;r<i;){var o=r+i>>>1,s=t[o];null!==s&&!xa(s)&&(n?s<=e:s<e)?r=o+1:i=o}return i}return pi(t,e,Ll,n)}function pi(t,e,n,r){e=n(e);for(var i=0,o=null==t?0:t.length,s=e!==e,u=null===e,a=xa(e),l=e===ot;i<o;){var c=Uc((i+o)/2),f=n(t[c]),h=f!==ot,d=null===f,p=f===f,g=xa(f);if(s)var v=r||p;else v=l?p&&(r||h):u?p&&h&&(r||!d):a?p&&h&&!d&&(r||!g):!d&&!g&&(r?f<=e:f<e);v?i=c+1:o=c}return Jc(o,Bt)}function gi(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var s=t[n],u=e?e(s):s;if(!n||!Zu(u,a)){var a=u;o[i++]=0===s?0:s}}return o}function vi(t){return"number"==typeof t?t:xa(t)?Ft:+t}function mi(t){if("string"==typeof t)return t;if(wh(t))return v(t,mi)+"";if(xa(t))return yf?yf.call(t):"";var e=t+"";return"0"==e&&1/t==-Lt?"-0":e}function yi(t,e,n){var r=-1,i=p,o=t.length,s=!0,u=[],a=u;if(n)s=!1,i=g;else if(o>=ut){var l=e?null:Mf(t);if(l)return Z(l);s=!1,i=F,a=new _n}else a=e?[]:u;t:for(;++r<o;){var c=t[r],f=e?e(c):c;if(c=n||0!==c?c:0,s&&f===f){for(var h=a.length;h--;)if(a[h]===f)continue t;e&&a.push(f),u.push(c)}else i(a,f,n)||(a!==u&&a.push(f),u.push(c))}return u}function _i(t,e){return e=Oi(e,t),t=Qo(t,e),null==t||delete t[is(zs(e))]}function bi(t,e,n,r){return li(t,e,n(lr(t,e)),r)}function xi(t,e,n,r){for(var i=t.length,o=r?i:-1;(r?o--:++o<i)&&e(t[o],o,t););return n?fi(t,r?0:o,r?o+1:i):fi(t,r?o+1:0,r?i:o)}function wi(t,e){var n=t;return n instanceof x&&(n=n.value()),y(e,function(t,e){return e.func.apply(e.thisArg,m([t],e.args))},n)}function Si(t,e,n){var r=t.length;if(r<2)return r?yi(t[0]):[];for(var i=-1,o=uc(r);++i<r;)for(var s=t[i],u=-1;++u<r;)u!=i&&(o[i]=Gn(o[i]||s,t[u],e,n));return yi(nr(o,1),e,n)}function ki(t,e,n){for(var r=-1,i=t.length,o=e.length,s={};++r<i;){var u=r<o?e[r]:ot;n(s,t[r],u)}return s}function ji(t){return Yu(t)?t:[]}function zi(t){return"function"==typeof t?t:Ll}function Oi(t,e){return wh(t)?t:Wo(t,e)?[t]:qf(Ta(t))}function Mi(t,e,n){var r=t.length;return n=n===ot?r:n,!e&&n>=r?t:fi(t,e,n)}function Ei(t,e){if(e)return t.slice();var n=t.length,r=Ac?Ac(n):new t.constructor(n);return t.copy(r),r}function Ci(t){var e=new t.constructor(t.byteLength);return new Cc(e).set(new Cc(t)),e}function Ai(t,e){var n=e?Ci(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}function Ti(t,e,n){return y(e?n(G(t),dt):G(t),s,new t.constructor)}function Ii(t){var e=new t.constructor(t.source,Ge.exec(t));return e.lastIndex=t.lastIndex,e}function Ni(t,e,n){return y(e?n(Z(t),dt):Z(t),u,new t.constructor)}function Li(t){return mf?hc(mf.call(t)):{}}function Ri(t,e){var n=e?Ci(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function qi(t,e){if(t!==e){var n=t!==ot,r=null===t,i=t===t,o=xa(t),s=e!==ot,u=null===e,a=e===e,l=xa(e);if(!u&&!l&&!o&&t>e||o&&s&&a&&!u&&!l||r&&s&&a||!n&&a||!i)return 1;if(!r&&!o&&!l&&t<e||l&&n&&i&&!r&&!o||u&&n&&i||!s&&i||!a)return-1}return 0}function Fi(t,e,n){for(var r=-1,i=t.criteria,o=e.criteria,s=i.length,u=n.length;++r<s;){var a=qi(i[r],o[r]);if(a)return r>=u?a:a*("desc"==n[r]?-1:1)}return t.index-e.index}function Pi(t,e,n,r){for(var i=-1,o=t.length,s=n.length,u=-1,a=e.length,l=Zc(o-s,0),c=uc(a+l),f=!r;++u<a;)c[u]=e[u];for(;++i<s;)(f||i<o)&&(c[n[i]]=t[i]);for(;l--;)c[u++]=t[i++];return c}function Bi(t,e,n,r){for(var i=-1,o=t.length,s=-1,u=n.length,a=-1,l=e.length,c=Zc(o-u,0),f=uc(c+l),h=!r;++i<c;)f[i]=t[i];for(var d=i;++a<l;)f[d+a]=e[a];for(;++s<u;)(h||i<o)&&(f[d+n[s]]=t[i++]);return f}function Wi(t,e){var n=-1,r=t.length;for(e||(e=uc(r));++n<r;)e[n]=t[n];return e}function Di(t,e,n,r){var i=!n;n||(n={});for(var o=-1,s=e.length;++o<s;){var u=e[o],a=r?r(n[u],t[u],u,n,t):ot;a===ot&&(a=t[u]),i?Fn(n,u,a):In(n,u,a)}return n}function Hi(t,e){return Di(t,Cf(t),e)}function Ui(t,e){return Di(t,Af(t),e)}function Vi(t,e){return function(n,r){var i=wh(n)?l:Ln,o=e?e():{};return i(n,t,zo(r,2),o)}}function $i(t){return si(function(e,n){var r=-1,i=n.length,o=i>1?n[i-1]:ot,s=i>2?n[2]:ot;for(o=t.length>3&&"function"==typeof o?(i--,o):ot,s&&Bo(n[0],n[1],s)&&(o=i<3?ot:o,i=1),e=hc(e);++r<i;){var u=n[r];u&&t(e,u,r,o)}return e})}function Gi(t,e){return function(n,r){if(null==n)return n;if(!Ju(n))return t(n,r);for(var i=n.length,o=e?i:-1,s=hc(n);(e?o--:++o<i)&&r(s[o],o,s)!==!1;);return n}}function Ki(t){return function(e,n,r){for(var i=-1,o=hc(e),s=r(e),u=s.length;u--;){var a=s[t?u:++i];if(n(o[a],a,o)===!1)break}return e}}function Xi(t,e,n){function r(){return(this&&this!==ar&&this instanceof r?o:t).apply(i?n:this,arguments)}var i=e&yt,o=Yi(t);return r}function Zi(t){return function(e){e=Ta(e);var n=U(e)?et(e):ot,r=n?n[0]:e.charAt(0),i=n?Mi(n,1).join(""):e.slice(1);return r[t]()+i}}function Ji(t){return function(e){return y(Cl(cl(e).replace(Un,"")),t,"")}}function Yi(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=_f(t.prototype),r=t.apply(n,e);return la(r)?r:n}}function Qi(t,e,n){function r(){for(var o=arguments.length,s=uc(o),u=o,l=jo(r);u--;)s[u]=arguments[u];var c=o<3&&s[0]!==l&&s[o-1]!==l?[]:X(s,l);return o-=c.length,o<n?co(t,e,no,r.placeholder,ot,s,c,ot,ot,n-o):a(this&&this!==ar&&this instanceof r?i:t,this,s)}var i=Yi(t);return r}function to(t){return function(e,n,r){var i=hc(e);if(!Ju(e)){var o=zo(n,3);e=Va(e),n=function(t){return o(i[t],t,i)}}var s=t(e,n,r);return s>-1?i[o?e[s]:s]:ot}}function eo(t){return xo(function(e){var n=e.length,r=n,o=i.prototype.thru;for(t&&e.reverse();r--;){var s=e[r];if("function"!=typeof s)throw new gc(lt);if(o&&!u&&"wrapper"==ko(s))var u=new i([],!0)}for(r=u?r:n;++r<n;){s=e[r];var a=ko(s),l="wrapper"==a?Ef(s):ot;u=l&&Ho(l[0])&&l[1]==(jt|xt|St|zt)&&!l[4].length&&1==l[9]?u[ko(l[0])].apply(u,l[3]):1==s.length&&Ho(s)?u[a]():u.thru(s)}return function(){var t=arguments,r=t[0];if(u&&1==t.length&&wh(r))return u.plant(r).value();for(var i=0,o=n?e[i].apply(this,t):r;++i<n;)o=e[i].call(this,o);return o}})}function no(t,e,n,r,i,o,s,u,a,l){function c(){for(var m=arguments.length,y=uc(m),_=m;_--;)y[_]=arguments[_];if(p)var b=jo(c),x=W(y,b);if(r&&(y=Pi(y,r,i,p)),o&&(y=Bi(y,o,s,p)),m-=x,p&&m<l){var w=X(y,b);return co(t,e,no,c.placeholder,n,y,w,u,a,l-m)}var S=h?n:this,k=d?S[t]:t;return m=y.length,u?y=ts(y,u):g&&m>1&&y.reverse(),f&&a<m&&(y.length=a),this&&this!==ar&&this instanceof c&&(k=v||Yi(k)),k.apply(S,y)}var f=e&jt,h=e&yt,d=e&_t,p=e&(xt|wt),g=e&Ot,v=d?ot:Yi(t);return c}function ro(t,e){return function(n,r){return Mr(n,t,e(r),{})}}function io(t,e){return function(n,r){var i;if(n===ot&&r===ot)return e;if(n!==ot&&(i=n),r!==ot){if(i===ot)return r;"string"==typeof n||"string"==typeof r?(n=mi(n),r=mi(r)):(n=vi(n),r=vi(r)),i=t(n,r)}return i}}function oo(t){return xo(function(e){return e=v(e,R(zo())),si(function(n){var r=this;return t(e,function(t){return a(t,r,n)})})})}function so(t,e){e=e===ot?" ":mi(e);var n=e.length;if(n<2)return n?oi(e,t):e;var r=oi(e,Hc(t/tt(e)));return U(e)?Mi(et(r),0,t).join(""):r.slice(0,t)}function uo(t,e,n,r){function i(){for(var e=-1,u=arguments.length,l=-1,c=r.length,f=uc(c+u),h=this&&this!==ar&&this instanceof i?s:t;++l<c;)f[l]=r[l];for(;u--;)f[l++]=arguments[++e];return a(h,o?n:this,f)}var o=e&yt,s=Yi(t);return i}function ao(t){return function(e,n,r){return r&&"number"!=typeof r&&Bo(e,n,r)&&(n=r=ot),e=za(e),n===ot?(n=e,e=0):n=za(n),r=r===ot?e<n?1:-1:za(r),ii(e,n,r,t)}}function lo(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=Ea(e),n=Ea(n)),t(e,n)}}function co(t,e,n,r,i,o,s,u,a,l){var c=e&xt,f=c?s:ot,h=c?ot:s,d=c?o:ot,p=c?ot:o;e|=c?St:kt,e&=~(c?kt:St),e&bt||(e&=~(yt|_t));var g=[t,e,i,d,f,p,h,u,a,l],v=n.apply(ot,g);
  return Ho(t)&&Nf(v,g),v.placeholder=r,es(v,t,e)}function fo(t){var e=fc[t];return function(t,n){if(t=Ea(t),n=null==n?0:Jc(Oa(n),292)){var r=(Ta(t)+"e").split("e");return r=(Ta(e(r[0]+"e"+(+r[1]+n)))+"e").split("e"),+(r[0]+"e"+(+r[1]-n))}return e(t)}}function ho(t){return function(e){var n=Tf(e);return n==Yt?G(e):n==oe?J(e):L(e,t(e))}}function po(t,e,n,r,i,o,s,u){var a=e&_t;if(!a&&"function"!=typeof t)throw new gc(lt);var l=r?r.length:0;if(l||(e&=~(St|kt),r=i=ot),s=s===ot?s:Zc(Oa(s),0),u=u===ot?u:Oa(u),l-=i?i.length:0,e&kt){var c=r,f=i;r=i=ot}var h=a?ot:Ef(t),d=[t,e,n,r,i,c,f,o,s,u];if(h&&Xo(d,h),t=d[0],e=d[1],n=d[2],r=d[3],i=d[4],u=d[9]=d[9]===ot?a?0:t.length:Zc(d[9]-l,0),!u&&e&(xt|wt)&&(e&=~(xt|wt)),e&&e!=yt)p=e==xt||e==wt?Qi(t,e,u):e!=St&&e!=(yt|St)||i.length?no.apply(ot,d):uo(t,e,n,r);else var p=Xi(t,e,n);return es((h?kf:Nf)(p,d),t,e)}function go(t,e,n,r){return t===ot||Zu(t,yc[n])&&!xc.call(r,n)?e:t}function vo(t,e,n,r,i,o){return la(t)&&la(e)&&(o.set(e,t),Kr(t,e,ot,vo,o),o.delete(e)),t}function mo(t){return ya(t)?ot:t}function yo(t,e,n,r,i,o){var s=n&vt,u=t.length,a=e.length;if(u!=a&&!(s&&a>u))return!1;var l=o.get(t);if(l&&o.get(e))return l==e;var c=-1,f=!0,h=n&mt?new _n:ot;for(o.set(t,e),o.set(e,t);++c<u;){var d=t[c],p=e[c];if(r)var g=s?r(p,d,c,e,t,o):r(d,p,c,t,e,o);if(g!==ot){if(g)continue;f=!1;break}if(h){if(!b(e,function(t,e){if(!F(h,e)&&(d===t||i(d,t,n,r,o)))return h.push(e)})){f=!1;break}}else if(d!==p&&!i(d,p,n,r,o)){f=!1;break}}return o.delete(t),o.delete(e),f}function _o(t,e,n,r,i,o,s){switch(n){case he:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case fe:return!(t.byteLength!=e.byteLength||!o(new Cc(t),new Cc(e)));case $t:case Gt:case Qt:return Zu(+t,+e);case Xt:return t.name==e.name&&t.message==e.message;case ie:case se:return t==e+"";case Yt:var u=G;case oe:var a=r&vt;if(u||(u=Z),t.size!=e.size&&!a)return!1;var l=s.get(t);if(l)return l==e;r|=mt,s.set(t,e);var c=yo(u(t),u(e),r,i,o,s);return s.delete(t),c;case ue:if(mf)return mf.call(t)==mf.call(e)}return!1}function bo(t,e,n,r,i,o){var s=n&vt,u=wo(t),a=u.length;if(a!=wo(e).length&&!s)return!1;for(var l=a;l--;){var c=u[l];if(!(s?c in e:xc.call(e,c)))return!1}var f=o.get(t);if(f&&o.get(e))return f==e;var h=!0;o.set(t,e),o.set(e,t);for(var d=s;++l<a;){c=u[l];var p=t[c],g=e[c];if(r)var v=s?r(g,p,c,e,t,o):r(p,g,c,t,e,o);if(!(v===ot?p===g||i(p,g,n,r,o):v)){h=!1;break}d||(d="constructor"==c)}if(h&&!d){var m=t.constructor,y=e.constructor;m!=y&&"constructor"in t&&"constructor"in e&&!("function"==typeof m&&m instanceof m&&"function"==typeof y&&y instanceof y)&&(h=!1)}return o.delete(t),o.delete(e),h}function xo(t){return Rf(Yo(t,ot,ys),t+"")}function wo(t){return cr(t,Va,Cf)}function So(t){return cr(t,$a,Af)}function ko(t){for(var e=t.name+"",n=cf[e],r=xc.call(cf,e)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==t)return i.name}return e}function jo(t){return(xc.call(n,"placeholder")?n:t).placeholder}function zo(){var t=n.iteratee||Rl;return t=t===Rl?Wr:t,arguments.length?t(arguments[0],arguments[1]):t}function Oo(t,e){var n=t.__data__;return Do(e)?n["string"==typeof e?"string":"hash"]:n.map}function Mo(t){for(var e=Va(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,$o(i)]}return e}function Eo(t,e){var n=H(t,e);return qr(n)?n:ot}function Co(t){var e=xc.call(t,Fc),n=t[Fc];try{t[Fc]=ot;var r=!0}catch(t){}var i=kc.call(t);return r&&(e?t[Fc]=n:delete t[Fc]),i}function Ao(t,e,n){for(var r=-1,i=n.length;++r<i;){var o=n[r],s=o.size;switch(o.type){case"drop":t+=s;break;case"dropRight":e-=s;break;case"take":e=Jc(e,t+s);break;case"takeRight":t=Zc(t,e-s)}}return{start:t,end:e}}function To(t){var e=t.match(De);return e?e[1].split(He):[]}function Io(t,e,n){e=Oi(e,t);for(var r=-1,i=e.length,o=!1;++r<i;){var s=is(e[r]);if(!(o=null!=t&&n(t,s)))break;t=t[s]}return o||++r!=i?o:(i=null==t?0:t.length,!!i&&aa(i)&&Po(s,i)&&(wh(t)||xh(t)))}function No(t){var e=t.length,n=t.constructor(e);return e&&"string"==typeof t[0]&&xc.call(t,"index")&&(n.index=t.index,n.input=t.input),n}function Lo(t){return"function"!=typeof t.constructor||Vo(t)?{}:_f(Tc(t))}function Ro(t,e,n,r){var i=t.constructor;switch(e){case fe:return Ci(t);case $t:case Gt:return new i(+t);case he:return Ai(t,r);case de:case pe:case ge:case ve:case me:case ye:case _e:case be:case xe:return Ri(t,r);case Yt:return Ti(t,r,n);case Qt:case se:return new i(t);case ie:return Ii(t);case oe:return Ni(t,r,n);case ue:return Li(t)}}function qo(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(We,"{\n/* [wrapped with "+e+"] */\n")}function Fo(t){return wh(t)||xh(t)||!!(Rc&&t&&t[Rc])}function Po(t,e){return e=null==e?Rt:e,!!e&&("number"==typeof t||Ye.test(t))&&t>-1&&t%1==0&&t<e}function Bo(t,e,n){if(!la(n))return!1;var r="undefined"==typeof e?"undefined":o(e);return!!("number"==r?Ju(n)&&Po(e,n.length):"string"==r&&e in n)&&Zu(n[e],t)}function Wo(t,e){if(wh(t))return!1;var n="undefined"==typeof t?"undefined":o(t);return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!xa(t))||Ie.test(t)||!Te.test(t)||null!=e&&t in hc(e)}function Do(t){var e="undefined"==typeof t?"undefined":o(t);return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}function Ho(t){var e=ko(t),r=n[e];if("function"!=typeof r||!(e in x.prototype))return!1;if(t===r)return!0;var i=Ef(r);return!!i&&t===i[0]}function Uo(t){return!!Sc&&Sc in t}function Vo(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||yc)}function $o(t){return t===t&&!la(t)}function Go(t,e){return function(n){return null!=n&&n[t]===e&&(e!==ot||t in hc(n))}}function Ko(t){var e=Ru(t,function(t){return n.size===ft&&n.clear(),t}),n=e.cache;return e}function Xo(t,e){var n=t[1],r=e[1],i=n|r,o=i<(yt|_t|jt),s=r==jt&&n==xt||r==jt&&n==zt&&t[7].length<=e[8]||r==(jt|zt)&&e[7].length<=e[8]&&n==xt;if(!o&&!s)return t;r&yt&&(t[2]=e[2],i|=n&yt?0:bt);var u=e[3];if(u){var a=t[3];t[3]=a?Pi(a,u,e[4]):u,t[4]=a?X(t[3],ht):e[4]}return u=e[5],u&&(a=t[5],t[5]=a?Bi(a,u,e[6]):u,t[6]=a?X(t[5],ht):e[6]),u=e[7],u&&(t[7]=u),r&jt&&(t[8]=null==t[8]?e[8]:Jc(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=i,t}function Zo(t){var e=[];if(null!=t)for(var n in hc(t))e.push(n);return e}function Jo(t){return kc.call(t)}function Yo(t,e,n){return e=Zc(e===ot?t.length-1:e,0),function(){for(var r=arguments,i=-1,o=Zc(r.length-e,0),s=uc(o);++i<o;)s[i]=r[e+i];i=-1;for(var u=uc(e+1);++i<e;)u[i]=r[i];return u[e]=n(s),a(t,this,u)}}function Qo(t,e){return e.length<2?t:lr(t,fi(e,0,-1))}function ts(t,e){for(var n=t.length,r=Jc(e.length,n),i=Wi(t);r--;){var o=e[r];t[r]=Po(o,n)?i[o]:ot}return t}function es(t,e,n){var r=e+"";return Rf(t,qo(r,ss(To(r),n)))}function ns(t){var e=0,n=0;return function(){var r=Yc(),i=At-(r-n);if(n=r,i>0){if(++e>=Ct)return arguments[0]}else e=0;return t.apply(ot,arguments)}}function rs(t,e){var n=-1,r=t.length,i=r-1;for(e=e===ot?r:e;++n<e;){var o=ri(n,i),s=t[o];t[o]=t[n],t[n]=s}return t.length=e,t}function is(t){if("string"==typeof t||xa(t))return t;var e=t+"";return"0"==e&&1/t==-Lt?"-0":e}function os(t){if(null!=t){try{return bc.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function ss(t,e){return c(Dt,function(n){var r="_."+n[0];e&n[1]&&!p(t,r)&&t.push(r)}),t.sort()}function us(t){if(t instanceof x)return t.clone();var e=new i(t.__wrapped__,t.__chain__);return e.__actions__=Wi(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}function as(t,e,n){e=(n?Bo(t,e,n):e===ot)?1:Zc(Oa(e),0);var r=null==t?0:t.length;if(!r||e<1)return[];for(var i=0,o=0,s=uc(Hc(r/e));i<r;)s[o++]=fi(t,i,i+=e);return s}function ls(t){for(var e=-1,n=null==t?0:t.length,r=0,i=[];++e<n;){var o=t[e];o&&(i[r++]=o)}return i}function cs(){var t=arguments.length;if(!t)return[];for(var e=uc(t-1),n=arguments[0],r=t;r--;)e[r-1]=arguments[r];return m(wh(n)?Wi(n):[n],nr(e,1))}function fs(t,e,n){var r=null==t?0:t.length;return r?(e=n||e===ot?1:Oa(e),fi(t,e<0?0:e,r)):[]}function hs(t,e,n){var r=null==t?0:t.length;return r?(e=n||e===ot?1:Oa(e),e=r-e,fi(t,0,e<0?0:e)):[]}function ds(t,e){return t&&t.length?xi(t,zo(e,3),!0,!0):[]}function ps(t,e){return t&&t.length?xi(t,zo(e,3),!0):[]}function gs(t,e,n,r){var i=null==t?0:t.length;return i?(n&&"number"!=typeof n&&Bo(t,e,n)&&(n=0,r=i),tr(t,e,n,r)):[]}function vs(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:Oa(n);return i<0&&(i=Zc(r+i,0)),k(t,zo(e,3),i)}function ms(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r-1;return n!==ot&&(i=Oa(n),i=n<0?Zc(r+i,0):Jc(i,r-1)),k(t,zo(e,3),i,!0)}function ys(t){return(null==t?0:t.length)?nr(t,1):[]}function _s(t){return(null==t?0:t.length)?nr(t,Lt):[]}function bs(t,e){return(null==t?0:t.length)?(e=e===ot?1:Oa(e),nr(t,e)):[]}function xs(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var i=t[e];r[i[0]]=i[1]}return r}function ws(t){return t&&t.length?t[0]:ot}function Ss(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:Oa(n);return i<0&&(i=Zc(r+i,0)),j(t,e,i)}function ks(t){return(null==t?0:t.length)?fi(t,0,-1):[]}function js(t,e){return null==t?"":Kc.call(t,e)}function zs(t){var e=null==t?0:t.length;return e?t[e-1]:ot}function Os(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r;return n!==ot&&(i=Oa(n),i=i<0?Zc(r+i,0):Jc(i,r-1)),e===e?Q(t,e,i):k(t,O,i,!0)}function Ms(t,e){return t&&t.length?Zr(t,Oa(e)):ot}function Es(t,e){return t&&t.length&&e&&e.length?ei(t,e):t}function Cs(t,e,n){return t&&t.length&&e&&e.length?ei(t,e,zo(n,2)):t}function As(t,e,n){return t&&t.length&&e&&e.length?ei(t,e,ot,n):t}function Ts(t,e){var n=[];if(!t||!t.length)return n;var r=-1,i=[],o=t.length;for(e=zo(e,3);++r<o;){var s=t[r];e(s,r,t)&&(n.push(s),i.push(r))}return ni(t,i),n}function Is(t){return null==t?t:ef.call(t)}function Ns(t,e,n){var r=null==t?0:t.length;return r?(n&&"number"!=typeof n&&Bo(t,e,n)?(e=0,n=r):(e=null==e?0:Oa(e),n=n===ot?r:Oa(n)),fi(t,e,n)):[]}function Ls(t,e){return di(t,e)}function Rs(t,e,n){return pi(t,e,zo(n,2))}function qs(t,e){var n=null==t?0:t.length;if(n){var r=di(t,e);if(r<n&&Zu(t[r],e))return r}return-1}function Fs(t,e){return di(t,e,!0)}function Ps(t,e,n){return pi(t,e,zo(n,2),!0)}function Bs(t,e){if(null==t?0:t.length){var n=di(t,e,!0)-1;if(Zu(t[n],e))return n}return-1}function Ws(t){return t&&t.length?gi(t):[]}function Ds(t,e){return t&&t.length?gi(t,zo(e,2)):[]}function Hs(t){var e=null==t?0:t.length;return e?fi(t,1,e):[]}function Us(t,e,n){return t&&t.length?(e=n||e===ot?1:Oa(e),fi(t,0,e<0?0:e)):[]}function Vs(t,e,n){var r=null==t?0:t.length;return r?(e=n||e===ot?1:Oa(e),e=r-e,fi(t,e<0?0:e,r)):[]}function $s(t,e){return t&&t.length?xi(t,zo(e,3),!1,!0):[]}function Gs(t,e){return t&&t.length?xi(t,zo(e,3)):[]}function Ks(t){return t&&t.length?yi(t):[]}function Xs(t,e){return t&&t.length?yi(t,zo(e,2)):[]}function Zs(t,e){return e="function"==typeof e?e:ot,t&&t.length?yi(t,ot,e):[]}function Js(t){if(!t||!t.length)return[];var e=0;return t=d(t,function(t){if(Yu(t))return e=Zc(t.length,e),!0}),N(e,function(e){return v(t,E(e))})}function Ys(t,e){if(!t||!t.length)return[];var n=Js(t);return null==e?n:v(n,function(t){return a(e,ot,t)})}function Qs(t,e){return ki(t||[],e||[],In)}function tu(t,e){return ki(t||[],e||[],li)}function eu(t){var e=n(t);return e.__chain__=!0,e}function nu(t,e){return e(t),t}function ru(t,e){return e(t)}function iu(){return eu(this)}function ou(){return new i(this.value(),this.__chain__)}function su(){this.__values__===ot&&(this.__values__=ja(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?ot:this.__values__[this.__index__++]}}function uu(){return this}function au(t){for(var e,n=this;n instanceof r;){var i=us(n);i.__index__=0,i.__values__=ot,e?o.__wrapped__=i:e=i;var o=i;n=n.__wrapped__}return o.__wrapped__=t,e}function lu(){var t=this.__wrapped__;if(t instanceof x){var e=t;return this.__actions__.length&&(e=new x(this)),e=e.reverse(),e.__actions__.push({func:ru,args:[Is],thisArg:ot}),new i(e,this.__chain__)}return this.thru(Is)}function cu(){return wi(this.__wrapped__,this.__actions__)}function fu(t,e,n){var r=wh(t)?h:Kn;return n&&Bo(t,e,n)&&(e=ot),r(t,zo(e,3))}function hu(t,e){return(wh(t)?d:er)(t,zo(e,3))}function du(t,e){return nr(_u(t,e),1)}function pu(t,e){return nr(_u(t,e),Lt)}function gu(t,e,n){return n=n===ot?1:Oa(n),nr(_u(t,e),n)}function vu(t,e){return(wh(t)?c:bf)(t,zo(e,3))}function mu(t,e){return(wh(t)?f:xf)(t,zo(e,3))}function yu(t,e,n,r){t=Ju(t)?t:il(t),n=n&&!r?Oa(n):0;var i=t.length;return n<0&&(n=Zc(i+n,0)),ba(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&j(t,e,n)>-1}function _u(t,e){return(wh(t)?v:Vr)(t,zo(e,3))}function bu(t,e,n,r){return null==t?[]:(wh(e)||(e=null==e?[]:[e]),n=r?ot:n,wh(n)||(n=null==n?[]:[n]),Jr(t,e,n))}function xu(t,e,n){var r=wh(t)?y:A,i=arguments.length<3;return r(t,zo(e,4),n,i,bf)}function wu(t,e,n){var r=wh(t)?_:A,i=arguments.length<3;return r(t,zo(e,4),n,i,xf)}function Su(t,e){return(wh(t)?d:er)(t,qu(zo(e,3)))}function ku(t){return(wh(t)?En:ui)(t)}function ju(t,e,n){return e=(n?Bo(t,e,n):e===ot)?1:Oa(e),(wh(t)?Cn:ai)(t,e)}function zu(t){return(wh(t)?An:ci)(t)}function Ou(t){if(null==t)return 0;if(Ju(t))return ba(t)?tt(t):t.length;var e=Tf(t);return e==Yt||e==oe?t.size:Dr(t).length}function Mu(t,e,n){var r=wh(t)?b:hi;return n&&Bo(t,e,n)&&(e=ot),r(t,zo(e,3))}function Eu(t,e){if("function"!=typeof e)throw new gc(lt);return t=Oa(t),function(){if(--t<1)return e.apply(this,arguments)}}function Cu(t,e,n){return e=n?ot:e,e=t&&null==e?t.length:e,po(t,jt,ot,ot,ot,ot,e)}function Au(t,e){var n;if("function"!=typeof e)throw new gc(lt);return t=Oa(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=ot),n}}function Tu(t,e,n){e=n?ot:e;var r=po(t,xt,ot,ot,ot,ot,ot,e);return r.placeholder=Tu.placeholder,r}function Iu(t,e,n){e=n?ot:e;var r=po(t,wt,ot,ot,ot,ot,ot,e);return r.placeholder=Iu.placeholder,r}function Nu(t,e,n){function r(e){var n=h,r=d;return h=d=ot,y=e,g=t.apply(r,n)}function i(t){return y=t,v=Lf(u,e),_?r(t):g}function o(t){var n=t-m,r=t-y,i=e-n;return b?Jc(i,p-r):i}function s(t){var n=t-m,r=t-y;return m===ot||n>=e||n<0||b&&r>=p}function u(){var t=ch();return s(t)?a(t):void(v=Lf(u,o(t)))}function a(t){return v=ot,x&&h?r(t):(h=d=ot,g)}function l(){v!==ot&&Of(v),y=0,h=m=d=v=ot}function c(){return v===ot?g:a(ch())}function f(){var t=ch(),n=s(t);if(h=arguments,d=this,m=t,n){if(v===ot)return i(m);if(b)return v=Lf(u,e),r(m)}return v===ot&&(v=Lf(u,e)),g}var h,d,p,g,v,m,y=0,_=!1,b=!1,x=!0;if("function"!=typeof t)throw new gc(lt);return e=Ea(e)||0,la(n)&&(_=!!n.leading,b="maxWait"in n,p=b?Zc(Ea(n.maxWait)||0,e):p,x="trailing"in n?!!n.trailing:x),f.cancel=l,f.flush=c,f}function Lu(t){return po(t,Ot)}function Ru(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new gc(lt);var n=function n(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=t.apply(this,r);return n.cache=o.set(i,s)||o,s};return n.cache=new(Ru.Cache||dn),n}function qu(t){if("function"!=typeof t)throw new gc(lt);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}function Fu(t){return Au(2,t)}function Pu(t,e){if("function"!=typeof t)throw new gc(lt);return e=e===ot?e:Oa(e),si(t,e)}function Bu(t,e){if("function"!=typeof t)throw new gc(lt);return e=null==e?0:Zc(Oa(e),0),si(function(n){var r=n[e],i=Mi(n,0,e);return r&&m(i,r),a(t,this,i)})}function Wu(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new gc(lt);return la(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Nu(t,e,{leading:r,maxWait:e,trailing:i})}function Du(t){return Cu(t,1)}function Hu(t,e){return vh(zi(e),t)}function Uu(){if(!arguments.length)return[];var t=arguments[0];return wh(t)?t:[t]}function Vu(t){return Wn(t,gt)}function $u(t,e){return e="function"==typeof e?e:ot,Wn(t,gt,e)}function Gu(t){return Wn(t,dt|gt)}function Ku(t,e){return e="function"==typeof e?e:ot,Wn(t,dt|gt,e)}function Xu(t,e){return null==e||Hn(t,e,Va(e))}function Zu(t,e){return t===e||t!==t&&e!==e}function Ju(t){return null!=t&&aa(t.length)&&!sa(t)}function Yu(t){return ca(t)&&Ju(t)}function Qu(t){return t===!0||t===!1||ca(t)&&hr(t)==$t}function ta(t){return ca(t)&&1===t.nodeType&&!ya(t)}function ea(t){if(null==t)return!0;if(Ju(t)&&(wh(t)||"string"==typeof t||"function"==typeof t.splice||kh(t)||Eh(t)||xh(t)))return!t.length;var e=Tf(t);if(e==Yt||e==oe)return!t.size;if(Vo(t))return!Dr(t).length;for(var n in t)if(xc.call(t,n))return!1;return!0}function na(t,e){return Ir(t,e)}function ra(t,e,n){n="function"==typeof n?n:ot;var r=n?n(t,e):ot;return r===ot?Ir(t,e,ot,n):!!r}function ia(t){if(!ca(t))return!1;var e=hr(t);return e==Xt||e==Kt||"string"==typeof t.message&&"string"==typeof t.name&&!ya(t)}function oa(t){return"number"==typeof t&&Gc(t)}function sa(t){if(!la(t))return!1;var e=hr(t);return e==Zt||e==Jt||e==Vt||e==re}function ua(t){return"number"==typeof t&&t==Oa(t)}function aa(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=Rt}function la(t){var e="undefined"==typeof t?"undefined":o(t);return null!=t&&("object"==e||"function"==e)}function ca(t){return null!=t&&"object"==("undefined"==typeof t?"undefined":o(t))}function fa(t,e){return t===e||Rr(t,e,Mo(e))}function ha(t,e,n){return n="function"==typeof n?n:ot,Rr(t,e,Mo(e),n)}function da(t){return ma(t)&&t!=+t}function pa(t){if(If(t))throw new lc(at);return qr(t)}function ga(t){return null===t}function va(t){return null==t}function ma(t){return"number"==typeof t||ca(t)&&hr(t)==Qt}function ya(t){if(!ca(t)||hr(t)!=ee)return!1;var e=Tc(t);if(null===e)return!0;var n=xc.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&bc.call(n)==jc}function _a(t){return ua(t)&&t>=-Rt&&t<=Rt}function ba(t){return"string"==typeof t||!wh(t)&&ca(t)&&hr(t)==se}function xa(t){return"symbol"==("undefined"==typeof t?"undefined":o(t))||ca(t)&&hr(t)==ue}function wa(t){return t===ot}function Sa(t){return ca(t)&&Tf(t)==le}function ka(t){return ca(t)&&hr(t)==ce}function ja(t){if(!t)return[];if(Ju(t))return ba(t)?et(t):Wi(t);if(qc&&t[qc])return $(t[qc]());var e=Tf(t);return(e==Yt?G:e==oe?Z:il)(t)}function za(t){return t?(t=Ea(t),t===Lt||t===-Lt?(t<0?-1:1)*qt:t===t?t:0):0===t?t:0}function Oa(t){var e=za(t),n=e%1;return e===e?n?e-n:e:0}function Ma(t){return t?Bn(Oa(t),0,Pt):0}function Ea(t){if("number"==typeof t)return t;if(xa(t))return Ft;if(la(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=la(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(Fe,"");var n=Xe.test(t);return n||Je.test(t)?or(t.slice(2),n?2:8):Ke.test(t)?Ft:+t}function Ca(t){return Di(t,$a(t))}function Aa(t){return t?Bn(Oa(t),-Rt,Rt):0===t?t:0}function Ta(t){return null==t?"":mi(t)}function Ia(t,e){var n=_f(t);return null==e?n:Rn(n,e)}function Na(t,e){return S(t,zo(e,3),rr)}function La(t,e){return S(t,zo(e,3),sr)}function Ra(t,e){return null==t?t:wf(t,zo(e,3),$a)}function qa(t,e){return null==t?t:Sf(t,zo(e,3),$a)}function Fa(t,e){return t&&rr(t,zo(e,3))}function Pa(t,e){return t&&sr(t,zo(e,3))}function Ba(t){return null==t?[]:ur(t,Va(t))}function Wa(t){return null==t?[]:ur(t,$a(t))}function Da(t,e,n){var r=null==t?ot:lr(t,e);return r===ot?n:r}function Ha(t,e){return null!=t&&Io(t,e,br)}function Ua(t,e){return null!=t&&Io(t,e,kr)}function Va(t){return Ju(t)?Mn(t):Dr(t)}function $a(t){return Ju(t)?Mn(t,!0):Hr(t)}function Ga(t,e){var n={};return e=zo(e,3),rr(t,function(t,r,i){Fn(n,e(t,r,i),t)}),n}function Ka(t,e){var n={};return e=zo(e,3),rr(t,function(t,r,i){Fn(n,r,e(t,r,i))}),n}function Xa(t,e){return Za(t,qu(zo(e)))}function Za(t,e){if(null==t)return{};var n=v(So(t),function(t){return[t]});return e=zo(e),Qr(t,n,function(t,n){return e(t,n[0])})}function Ja(t,e,n){e=Oi(e,t);var r=-1,i=e.length;for(i||(i=1,t=ot);++r<i;){var o=null==t?ot:t[is(e[r])];o===ot&&(r=i,o=n),t=sa(o)?o.call(t):o}return t}function Ya(t,e,n){return null==t?t:li(t,e,n)}function Qa(t,e,n,r){return r="function"==typeof r?r:ot,null==t?t:li(t,e,n,r)}function tl(t,e,n){var r=wh(t),i=r||kh(t)||Eh(t);if(e=zo(e,4),null==n){var o=t&&t.constructor;n=i?r?new o:[]:la(t)&&sa(o)?_f(Tc(t)):{}}return(i?c:rr)(t,function(t,r,i){return e(n,t,r,i)}),n}function el(t,e){return null==t||_i(t,e)}function nl(t,e,n){return null==t?t:bi(t,e,zi(n))}function rl(t,e,n,r){return r="function"==typeof r?r:ot,null==t?t:bi(t,e,zi(n),r)}function il(t){return null==t?[]:q(t,Va(t))}function ol(t){return null==t?[]:q(t,$a(t))}function sl(t,e,n){return n===ot&&(n=e,e=ot),n!==ot&&(n=Ea(n),n=n===n?n:0),e!==ot&&(e=Ea(e),e=e===e?e:0),Bn(Ea(t),e,n)}function ul(t,e,n){return e=za(e),n===ot?(n=e,e=0):n=za(n),t=Ea(t),zr(t,e,n)}function al(t,e,n){if(n&&"boolean"!=typeof n&&Bo(t,e,n)&&(e=n=ot),n===ot&&("boolean"==typeof e?(n=e,e=ot):"boolean"==typeof t&&(n=t,t=ot)),t===ot&&e===ot?(t=0,e=1):(t=za(t),e===ot?(e=t,t=0):e=za(e)),t>e){var r=t;t=e,e=r}if(n||t%1||e%1){var i=tf();return Jc(t+i*(e-t+ir("1e-"+((i+"").length-1))),e)}return ri(t,e)}function ll(t){return ed(Ta(t).toLowerCase())}function cl(t){return t=Ta(t),t&&t.replace(Qe,xr).replace(Vn,"")}function fl(t,e,n){t=Ta(t),e=mi(e);var r=t.length;n=n===ot?r:Bn(Oa(n),0,r);var i=n;return n-=e.length,n>=0&&t.slice(n,i)==e}function hl(t){return t=Ta(t),t&&Me.test(t)?t.replace(ze,wr):t}function dl(t){return t=Ta(t),t&&qe.test(t)?t.replace(Re,"\\$&"):t}function pl(t,e,n){t=Ta(t),e=Oa(e);var r=e?tt(t):0;if(!e||r>=e)return t;var i=(e-r)/2;return so(Uc(i),n)+t+so(Hc(i),n)}function gl(t,e,n){t=Ta(t),e=Oa(e);var r=e?tt(t):0;return e&&r<e?t+so(e-r,n):t}function vl(t,e,n){t=Ta(t),e=Oa(e);var r=e?tt(t):0;return e&&r<e?so(e-r,n)+t:t}function ml(t,e,n){return n||null==e?e=0:e&&(e=+e),Qc(Ta(t).replace(Pe,""),e||0)}function yl(t,e,n){return e=(n?Bo(t,e,n):e===ot)?1:Oa(e),oi(Ta(t),e)}function _l(){var t=arguments,e=Ta(t[0]);return t.length<3?e:e.replace(t[1],t[2])}function bl(t,e,n){return n&&"number"!=typeof n&&Bo(t,e,n)&&(e=n=ot),(n=n===ot?Pt:n>>>0)?(t=Ta(t),t&&("string"==typeof e||null!=e&&!Oh(e))&&(e=mi(e),!e&&U(t))?Mi(et(t),0,n):t.split(e,n)):[]}function xl(t,e,n){return t=Ta(t),n=null==n?0:Bn(Oa(n),0,t.length),e=mi(e),t.slice(n,n+e.length)==e}function wl(t,e,r){var i=n.templateSettings;r&&Bo(t,e,r)&&(e=ot),t=Ta(t),e=Nh({},e,i,go);var o,s,u=Nh({},e.imports,i.imports,go),a=Va(u),l=q(u,a),c=0,f=e.interpolate||tn,h="__p += '",d=dc((e.escape||tn).source+"|"+f.source+"|"+(f===Ae?$e:tn).source+"|"+(e.evaluate||tn).source+"|$","g"),p="//# sourceURL="+("sourceURL"in e?e.sourceURL:"lodash.templateSources["+ ++Jn+"]")+"\n";t.replace(d,function(e,n,r,i,u,a){return r||(r=i),h+=t.slice(c,a).replace(en,D),n&&(o=!0,h+="' +\n__e("+n+") +\n'"),u&&(s=!0,h+="';\n"+u+";\n__p += '"),r&&(h+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),c=a+e.length,e}),h+="';\n";var g=e.variable;g||(h="with (obj) {\n"+h+"\n}\n"),h=(s?h.replace(we,""):h).replace(Se,"$1").replace(ke,"$1;"),h="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var v=nd(function(){return cc(a,p+"return "+h).apply(ot,l)});if(v.source=h,ia(v))throw v;return v}function Sl(t){return Ta(t).toLowerCase()}function kl(t){return Ta(t).toUpperCase()}function jl(t,e,n){if(t=Ta(t),t&&(n||e===ot))return t.replace(Fe,"");if(!t||!(e=mi(e)))return t;var r=et(t),i=et(e);return Mi(r,P(r,i),B(r,i)+1).join("")}function zl(t,e,n){if(t=Ta(t),t&&(n||e===ot))return t.replace(Be,"");if(!t||!(e=mi(e)))return t;var r=et(t);return Mi(r,0,B(r,et(e))+1).join("")}function Ol(t,e,n){if(t=Ta(t),t&&(n||e===ot))return t.replace(Pe,"");if(!t||!(e=mi(e)))return t;var r=et(t);return Mi(r,P(r,et(e))).join("")}function Ml(t,e){var n=Mt,r=Et;if(la(e)){var i="separator"in e?e.separator:i;n="length"in e?Oa(e.length):n,r="omission"in e?mi(e.omission):r}t=Ta(t);var o=t.length;if(U(t)){var s=et(t);o=s.length}if(n>=o)return t;var u=n-tt(r);if(u<1)return r;var a=s?Mi(s,0,u).join(""):t.slice(0,u);if(i===ot)return a+r;if(s&&(u+=a.length-u),Oh(i)){if(t.slice(u).search(i)){var l,c=a;for(i.global||(i=dc(i.source,Ta(Ge.exec(i))+"g")),i.lastIndex=0;l=i.exec(c);)var f=l.index;a=a.slice(0,f===ot?u:f)}}else if(t.indexOf(mi(i),u)!=u){var h=a.lastIndexOf(i);h>-1&&(a=a.slice(0,h))}return a+r}function El(t){return t=Ta(t),t&&Oe.test(t)?t.replace(je,Sr):t}function Cl(t,e,n){return t=Ta(t),e=n?ot:e,e===ot?V(t)?it(t):w(t):t.match(e)||[]}function Al(t){var e=null==t?0:t.length,n=zo();return t=e?v(t,function(t){if("function"!=typeof t[1])throw new gc(lt);return[n(t[0]),t[1]]}):[],si(function(n){for(var r=-1;++r<e;){var i=t[r];if(a(i[0],this,n))return a(i[1],this,n)}})}function Tl(t){return Dn(Wn(t,dt))}function Il(t){return function(){return t}}function Nl(t,e){return null==t||t!==t?e:t}function Ll(t){return t}function Rl(t){return Wr("function"==typeof t?t:Wn(t,dt))}function ql(t){return $r(Wn(t,dt))}function Fl(t,e){return Gr(t,Wn(e,dt))}function Pl(t,e,n){var r=Va(e),i=ur(e,r);null!=n||la(e)&&(i.length||!r.length)||(n=e,e=t,t=this,i=ur(e,Va(e)));var o=!(la(n)&&"chain"in n&&!n.chain),s=sa(t);return c(i,function(n){var r=e[n];t[n]=r,s&&(t.prototype[n]=function(){var e=this.__chain__;if(o||e){var n=t(this.__wrapped__);return(n.__actions__=Wi(this.__actions__)).push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,m([this.value()],arguments))})}),t}function Bl(){return ar._===this&&(ar._=zc),this}function Wl(){}function Dl(t){return t=Oa(t),si(function(e){return Zr(e,t)})}function Hl(t){return Wo(t)?E(is(t)):ti(t)}function Ul(t){return function(e){return null==t?ot:lr(t,e)}}function Vl(){return[]}function $l(){return!1}function Gl(){return{}}function Kl(){return""}function Xl(){return!0}function Zl(t,e){if(t=Oa(t),t<1||t>Rt)return[];var n=Pt,r=Jc(t,Pt);e=zo(e),t-=Pt;for(var i=N(r,e);++n<t;)e(n);return i}function Jl(t){return wh(t)?v(t,is):xa(t)?[t]:Wi(qf(Ta(t)))}function Yl(t){var e=++wc;return Ta(t)+e}function Ql(t){return t&&t.length?Xn(t,Ll,dr):ot}function tc(t,e){return t&&t.length?Xn(t,zo(e,2),dr):ot}function ec(t){return M(t,Ll)}function nc(t,e){return M(t,zo(e,2))}function rc(t){return t&&t.length?Xn(t,Ll,Ur):ot}function ic(t,e){return t&&t.length?Xn(t,zo(e,2),Ur):ot}function oc(t){return t&&t.length?I(t,Ll):0}function sc(t,e){return t&&t.length?I(t,zo(e,2)):0}e=null==e?ar:jr.defaults(ar.Object(),e,jr.pick(ar,Zn));var uc=e.Array,ac=e.Date,lc=e.Error,cc=e.Function,fc=e.Math,hc=e.Object,dc=e.RegExp,pc=e.String,gc=e.TypeError,vc=uc.prototype,mc=cc.prototype,yc=hc.prototype,_c=e["__core-js_shared__"],bc=mc.toString,xc=yc.hasOwnProperty,wc=0,Sc=function(){var t=/[^.]+$/.exec(_c&&_c.keys&&_c.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),kc=yc.toString,jc=bc.call(hc),zc=ar._,Oc=dc("^"+bc.call(xc).replace(Re,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Mc=fr?e.Buffer:ot,Ec=e.Symbol,Cc=e.Uint8Array,Ac=Mc?Mc.allocUnsafe:ot,Tc=K(hc.getPrototypeOf,hc),Ic=hc.create,Nc=yc.propertyIsEnumerable,Lc=vc.splice,Rc=Ec?Ec.isConcatSpreadable:ot,qc=Ec?Ec.iterator:ot,Fc=Ec?Ec.toStringTag:ot,Pc=function(){try{var t=Eo(hc,"defineProperty");return t({},"",{}),t}catch(t){}}(),Bc=e.clearTimeout!==ar.clearTimeout&&e.clearTimeout,Wc=ac&&ac.now!==ar.Date.now&&ac.now,Dc=e.setTimeout!==ar.setTimeout&&e.setTimeout,Hc=fc.ceil,Uc=fc.floor,Vc=hc.getOwnPropertySymbols,$c=Mc?Mc.isBuffer:ot,Gc=e.isFinite,Kc=vc.join,Xc=K(hc.keys,hc),Zc=fc.max,Jc=fc.min,Yc=ac.now,Qc=e.parseInt,tf=fc.random,ef=vc.reverse,nf=Eo(e,"DataView"),rf=Eo(e,"Map"),of=Eo(e,"Promise"),sf=Eo(e,"Set"),uf=Eo(e,"WeakMap"),af=Eo(hc,"create"),lf=uf&&new uf,cf={},ff=os(nf),hf=os(rf),df=os(of),pf=os(sf),gf=os(uf),vf=Ec?Ec.prototype:ot,mf=vf?vf.valueOf:ot,yf=vf?vf.toString:ot,_f=function(){function t(){}return function(e){if(!la(e))return{};if(Ic)return Ic(e);t.prototype=e;var n=new t;return t.prototype=ot,n}}();n.templateSettings={escape:Ee,evaluate:Ce,interpolate:Ae,variable:"",imports:{_:n}},n.prototype=r.prototype,n.prototype.constructor=n,i.prototype=_f(r.prototype),i.prototype.constructor=i,x.prototype=_f(r.prototype),x.prototype.constructor=x,rt.prototype.clear=Ue,rt.prototype.delete=nn,rt.prototype.get=rn,rt.prototype.has=on,rt.prototype.set=sn,un.prototype.clear=an,un.prototype.delete=ln,un.prototype.get=cn,un.prototype.has=fn,un.prototype.set=hn,dn.prototype.clear=pn,dn.prototype.delete=gn,dn.prototype.get=vn,dn.prototype.has=mn,dn.prototype.set=yn,_n.prototype.add=_n.prototype.push=bn,_n.prototype.has=xn,wn.prototype.clear=Sn,wn.prototype.delete=kn,wn.prototype.get=jn,wn.prototype.has=zn,wn.prototype.set=On;var bf=Gi(rr),xf=Gi(sr,!0),wf=Ki(),Sf=Ki(!0),kf=lf?function(t,e){return lf.set(t,e),t}:Ll,jf=Pc?function(t,e){return Pc(t,"toString",{configurable:!0,enumerable:!1,value:Il(e),writable:!0})}:Ll,zf=si,Of=Bc||function(t){return ar.clearTimeout(t)},Mf=sf&&1/Z(new sf([,-0]))[1]==Lt?function(t){return new sf(t)}:Wl,Ef=lf?function(t){return lf.get(t)}:Wl,Cf=Vc?function(t){return null==t?[]:(t=hc(t),d(Vc(t),function(e){return Nc.call(t,e)}))}:Vl,Af=Vc?function(t){for(var e=[];t;)m(e,Cf(t)),t=Tc(t);return e}:Vl,Tf=hr;(nf&&Tf(new nf(new ArrayBuffer(1)))!=he||rf&&Tf(new rf)!=Yt||of&&Tf(of.resolve())!=ne||sf&&Tf(new sf)!=oe||uf&&Tf(new uf)!=le)&&(Tf=function(t){var e=hr(t),n=e==ee?t.constructor:ot,r=n?os(n):"";if(r)switch(r){case ff:return he;case hf:return Yt;case df:return ne;case pf:return oe;case gf:return le}return e});var If=_c?sa:$l,Nf=ns(kf),Lf=Dc||function(t,e){return ar.setTimeout(t,e)},Rf=ns(jf),qf=Ko(function(t){var e=[];return Ne.test(t)&&e.push(""),t.replace(Le,function(t,n,r,i){e.push(r?i.replace(Ve,"$1"):n||t)}),e}),Ff=si(function(t,e){return Yu(t)?Gn(t,nr(e,1,Yu,!0)):[]}),Pf=si(function(t,e){var n=zs(e);return Yu(n)&&(n=ot),Yu(t)?Gn(t,nr(e,1,Yu,!0),zo(n,2)):[]}),Bf=si(function(t,e){var n=zs(e);return Yu(n)&&(n=ot),Yu(t)?Gn(t,nr(e,1,Yu,!0),ot,n):[]}),Wf=si(function(t){var e=v(t,ji);return e.length&&e[0]===t[0]?Or(e):[]}),Df=si(function(t){var e=zs(t),n=v(t,ji);return e===zs(n)?e=ot:n.pop(),n.length&&n[0]===t[0]?Or(n,zo(e,2)):[]}),Hf=si(function(t){var e=zs(t),n=v(t,ji);return e="function"==typeof e?e:ot,e&&n.pop(),n.length&&n[0]===t[0]?Or(n,ot,e):[]}),Uf=si(Es),Vf=xo(function(t,e){var n=null==t?0:t.length,r=Pn(t,e);return ni(t,v(e,function(t){return Po(t,n)?+t:t}).sort(qi)),r}),$f=si(function(t){return yi(nr(t,1,Yu,!0))}),Gf=si(function(t){var e=zs(t);return Yu(e)&&(e=ot),yi(nr(t,1,Yu,!0),zo(e,2))}),Kf=si(function(t){var e=zs(t);return e="function"==typeof e?e:ot,yi(nr(t,1,Yu,!0),ot,e)}),Xf=si(function(t,e){return Yu(t)?Gn(t,e):[]}),Zf=si(function(t){return Si(d(t,Yu))}),Jf=si(function(t){var e=zs(t);return Yu(e)&&(e=ot),Si(d(t,Yu),zo(e,2))}),Yf=si(function(t){var e=zs(t);return e="function"==typeof e?e:ot,Si(d(t,Yu),ot,e)}),Qf=si(Js),th=si(function(t){var e=t.length,n=e>1?t[e-1]:ot;return n="function"==typeof n?(t.pop(),n):ot,Ys(t,n)}),eh=xo(function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,o=function(e){return Pn(e,t)};return!(e>1||this.__actions__.length)&&r instanceof x&&Po(n)?(r=r.slice(n,+n+(e?1:0)),r.__actions__.push({func:ru,args:[o],thisArg:ot}),new i(r,this.__chain__).thru(function(t){return e&&!t.length&&t.push(ot),t})):this.thru(o)}),nh=Vi(function(t,e,n){xc.call(t,n)?++t[n]:Fn(t,n,1)}),rh=to(vs),ih=to(ms),oh=Vi(function(t,e,n){xc.call(t,n)?t[n].push(e):Fn(t,n,[e])}),sh=si(function(t,e,n){var r=-1,i="function"==typeof e,o=Ju(t)?uc(t.length):[];return bf(t,function(t){o[++r]=i?a(e,t,n):Er(t,e,n)}),o}),uh=Vi(function(t,e,n){Fn(t,n,e)}),ah=Vi(function(t,e,n){t[n?0:1].push(e)},function(){return[[],[]]}),lh=si(function(t,e){if(null==t)return[];var n=e.length;return n>1&&Bo(t,e[0],e[1])?e=[]:n>2&&Bo(e[0],e[1],e[2])&&(e=[e[0]]),Jr(t,nr(e,1),[])}),ch=Wc||function(){return ar.Date.now()},fh=si(function(t,e,n){var r=yt;if(n.length){var i=X(n,jo(fh));r|=St}return po(t,r,e,n,i)}),hh=si(function(t,e,n){var r=yt|_t;if(n.length){var i=X(n,jo(hh));r|=St}return po(e,r,t,n,i)}),dh=si(function(t,e){return $n(t,1,e)}),ph=si(function(t,e,n){return $n(t,Ea(e)||0,n)});Ru.Cache=dn;var gh=zf(function(t,e){e=1==e.length&&wh(e[0])?v(e[0],R(zo())):v(nr(e,1),R(zo()));
  var n=e.length;return si(function(r){for(var i=-1,o=Jc(r.length,n);++i<o;)r[i]=e[i].call(this,r[i]);return a(t,this,r)})}),vh=si(function(t,e){return po(t,St,ot,e,X(e,jo(vh)))}),mh=si(function(t,e){return po(t,kt,ot,e,X(e,jo(mh)))}),yh=xo(function(t,e){return po(t,zt,ot,ot,ot,e)}),_h=lo(dr),bh=lo(function(t,e){return t>=e}),xh=Cr(function(){return arguments}())?Cr:function(t){return ca(t)&&xc.call(t,"callee")&&!Nc.call(t,"callee")},wh=uc.isArray,Sh=pr?R(pr):Ar,kh=$c||$l,jh=gr?R(gr):Tr,zh=vr?R(vr):Lr,Oh=mr?R(mr):Fr,Mh=yr?R(yr):Pr,Eh=_r?R(_r):Br,Ch=lo(Ur),Ah=lo(function(t,e){return t<=e}),Th=$i(function(t,e){if(Vo(e)||Ju(e))return void Di(e,Va(e),t);for(var n in e)xc.call(e,n)&&In(t,n,e[n])}),Ih=$i(function(t,e){Di(e,$a(e),t)}),Nh=$i(function(t,e,n,r){Di(e,$a(e),t,r)}),Lh=$i(function(t,e,n,r){Di(e,Va(e),t,r)}),Rh=xo(Pn),qh=si(function(t){return t.push(ot,go),a(Nh,ot,t)}),Fh=si(function(t){return t.push(ot,vo),a(Hh,ot,t)}),Ph=ro(function(t,e,n){t[e]=n},Il(Ll)),Bh=ro(function(t,e,n){xc.call(t,e)?t[e].push(n):t[e]=[n]},zo),Wh=si(Er),Dh=$i(function(t,e,n){Kr(t,e,n)}),Hh=$i(function(t,e,n,r){Kr(t,e,n,r)}),Uh=xo(function(t,e){var n={};if(null==t)return n;var r=!1;e=v(e,function(e){return e=Oi(e,t),r||(r=e.length>1),e}),Di(t,So(t),n),r&&(n=Wn(n,dt|pt|gt,mo));for(var i=e.length;i--;)_i(n,e[i]);return n}),Vh=xo(function(t,e){return null==t?{}:Yr(t,e)}),$h=ho(Va),Gh=ho($a),Kh=Ji(function(t,e,n){return e=e.toLowerCase(),t+(n?ll(e):e)}),Xh=Ji(function(t,e,n){return t+(n?"-":"")+e.toLowerCase()}),Zh=Ji(function(t,e,n){return t+(n?" ":"")+e.toLowerCase()}),Jh=Zi("toLowerCase"),Yh=Ji(function(t,e,n){return t+(n?"_":"")+e.toLowerCase()}),Qh=Ji(function(t,e,n){return t+(n?" ":"")+ed(e)}),td=Ji(function(t,e,n){return t+(n?" ":"")+e.toUpperCase()}),ed=Zi("toUpperCase"),nd=si(function(t,e){try{return a(t,ot,e)}catch(t){return ia(t)?t:new lc(t)}}),rd=xo(function(t,e){return c(e,function(e){e=is(e),Fn(t,e,fh(t[e],t))}),t}),id=eo(),od=eo(!0),sd=si(function(t,e){return function(n){return Er(n,t,e)}}),ud=si(function(t,e){return function(n){return Er(t,n,e)}}),ad=oo(v),ld=oo(h),cd=oo(b),fd=ao(),hd=ao(!0),dd=io(function(t,e){return t+e},0),pd=fo("ceil"),gd=io(function(t,e){return t/e},1),vd=fo("floor"),md=io(function(t,e){return t*e},1),yd=fo("round"),_d=io(function(t,e){return t-e},0);return n.after=Eu,n.ary=Cu,n.assign=Th,n.assignIn=Ih,n.assignInWith=Nh,n.assignWith=Lh,n.at=Rh,n.before=Au,n.bind=fh,n.bindAll=rd,n.bindKey=hh,n.castArray=Uu,n.chain=eu,n.chunk=as,n.compact=ls,n.concat=cs,n.cond=Al,n.conforms=Tl,n.constant=Il,n.countBy=nh,n.create=Ia,n.curry=Tu,n.curryRight=Iu,n.debounce=Nu,n.defaults=qh,n.defaultsDeep=Fh,n.defer=dh,n.delay=ph,n.difference=Ff,n.differenceBy=Pf,n.differenceWith=Bf,n.drop=fs,n.dropRight=hs,n.dropRightWhile=ds,n.dropWhile=ps,n.fill=gs,n.filter=hu,n.flatMap=du,n.flatMapDeep=pu,n.flatMapDepth=gu,n.flatten=ys,n.flattenDeep=_s,n.flattenDepth=bs,n.flip=Lu,n.flow=id,n.flowRight=od,n.fromPairs=xs,n.functions=Ba,n.functionsIn=Wa,n.groupBy=oh,n.initial=ks,n.intersection=Wf,n.intersectionBy=Df,n.intersectionWith=Hf,n.invert=Ph,n.invertBy=Bh,n.invokeMap=sh,n.iteratee=Rl,n.keyBy=uh,n.keys=Va,n.keysIn=$a,n.map=_u,n.mapKeys=Ga,n.mapValues=Ka,n.matches=ql,n.matchesProperty=Fl,n.memoize=Ru,n.merge=Dh,n.mergeWith=Hh,n.method=sd,n.methodOf=ud,n.mixin=Pl,n.negate=qu,n.nthArg=Dl,n.omit=Uh,n.omitBy=Xa,n.once=Fu,n.orderBy=bu,n.over=ad,n.overArgs=gh,n.overEvery=ld,n.overSome=cd,n.partial=vh,n.partialRight=mh,n.partition=ah,n.pick=Vh,n.pickBy=Za,n.property=Hl,n.propertyOf=Ul,n.pull=Uf,n.pullAll=Es,n.pullAllBy=Cs,n.pullAllWith=As,n.pullAt=Vf,n.range=fd,n.rangeRight=hd,n.rearg=yh,n.reject=Su,n.remove=Ts,n.rest=Pu,n.reverse=Is,n.sampleSize=ju,n.set=Ya,n.setWith=Qa,n.shuffle=zu,n.slice=Ns,n.sortBy=lh,n.sortedUniq=Ws,n.sortedUniqBy=Ds,n.split=bl,n.spread=Bu,n.tail=Hs,n.take=Us,n.takeRight=Vs,n.takeRightWhile=$s,n.takeWhile=Gs,n.tap=nu,n.throttle=Wu,n.thru=ru,n.toArray=ja,n.toPairs=$h,n.toPairsIn=Gh,n.toPath=Jl,n.toPlainObject=Ca,n.transform=tl,n.unary=Du,n.union=$f,n.unionBy=Gf,n.unionWith=Kf,n.uniq=Ks,n.uniqBy=Xs,n.uniqWith=Zs,n.unset=el,n.unzip=Js,n.unzipWith=Ys,n.update=nl,n.updateWith=rl,n.values=il,n.valuesIn=ol,n.without=Xf,n.words=Cl,n.wrap=Hu,n.xor=Zf,n.xorBy=Jf,n.xorWith=Yf,n.zip=Qf,n.zipObject=Qs,n.zipObjectDeep=tu,n.zipWith=th,n.entries=$h,n.entriesIn=Gh,n.extend=Ih,n.extendWith=Nh,Pl(n,n),n.add=dd,n.attempt=nd,n.camelCase=Kh,n.capitalize=ll,n.ceil=pd,n.clamp=sl,n.clone=Vu,n.cloneDeep=Gu,n.cloneDeepWith=Ku,n.cloneWith=$u,n.conformsTo=Xu,n.deburr=cl,n.defaultTo=Nl,n.divide=gd,n.endsWith=fl,n.eq=Zu,n.escape=hl,n.escapeRegExp=dl,n.every=fu,n.find=rh,n.findIndex=vs,n.findKey=Na,n.findLast=ih,n.findLastIndex=ms,n.findLastKey=La,n.floor=vd,n.forEach=vu,n.forEachRight=mu,n.forIn=Ra,n.forInRight=qa,n.forOwn=Fa,n.forOwnRight=Pa,n.get=Da,n.gt=_h,n.gte=bh,n.has=Ha,n.hasIn=Ua,n.head=ws,n.identity=Ll,n.includes=yu,n.indexOf=Ss,n.inRange=ul,n.invoke=Wh,n.isArguments=xh,n.isArray=wh,n.isArrayBuffer=Sh,n.isArrayLike=Ju,n.isArrayLikeObject=Yu,n.isBoolean=Qu,n.isBuffer=kh,n.isDate=jh,n.isElement=ta,n.isEmpty=ea,n.isEqual=na,n.isEqualWith=ra,n.isError=ia,n.isFinite=oa,n.isFunction=sa,n.isInteger=ua,n.isLength=aa,n.isMap=zh,n.isMatch=fa,n.isMatchWith=ha,n.isNaN=da,n.isNative=pa,n.isNil=va,n.isNull=ga,n.isNumber=ma,n.isObject=la,n.isObjectLike=ca,n.isPlainObject=ya,n.isRegExp=Oh,n.isSafeInteger=_a,n.isSet=Mh,n.isString=ba,n.isSymbol=xa,n.isTypedArray=Eh,n.isUndefined=wa,n.isWeakMap=Sa,n.isWeakSet=ka,n.join=js,n.kebabCase=Xh,n.last=zs,n.lastIndexOf=Os,n.lowerCase=Zh,n.lowerFirst=Jh,n.lt=Ch,n.lte=Ah,n.max=Ql,n.maxBy=tc,n.mean=ec,n.meanBy=nc,n.min=rc,n.minBy=ic,n.stubArray=Vl,n.stubFalse=$l,n.stubObject=Gl,n.stubString=Kl,n.stubTrue=Xl,n.multiply=md,n.nth=Ms,n.noConflict=Bl,n.noop=Wl,n.now=ch,n.pad=pl,n.padEnd=gl,n.padStart=vl,n.parseInt=ml,n.random=al,n.reduce=xu,n.reduceRight=wu,n.repeat=yl,n.replace=_l,n.result=Ja,n.round=yd,n.runInContext=t,n.sample=ku,n.size=Ou,n.snakeCase=Yh,n.some=Mu,n.sortedIndex=Ls,n.sortedIndexBy=Rs,n.sortedIndexOf=qs,n.sortedLastIndex=Fs,n.sortedLastIndexBy=Ps,n.sortedLastIndexOf=Bs,n.startCase=Qh,n.startsWith=xl,n.subtract=_d,n.sum=oc,n.sumBy=sc,n.template=wl,n.times=Zl,n.toFinite=za,n.toInteger=Oa,n.toLength=Ma,n.toLower=Sl,n.toNumber=Ea,n.toSafeInteger=Aa,n.toString=Ta,n.toUpper=kl,n.trim=jl,n.trimEnd=zl,n.trimStart=Ol,n.truncate=Ml,n.unescape=El,n.uniqueId=Yl,n.upperCase=td,n.upperFirst=ed,n.each=vu,n.eachRight=mu,n.first=ws,Pl(n,function(){var t={};return rr(n,function(e,r){xc.call(n.prototype,r)||(t[r]=e)}),t}(),{chain:!1}),n.VERSION=st,c(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){n[t].placeholder=n}),c(["drop","take"],function(t,e){x.prototype[t]=function(n){n=n===ot?1:Zc(Oa(n),0);var r=this.__filtered__&&!e?new x(this):this.clone();return r.__filtered__?r.__takeCount__=Jc(n,r.__takeCount__):r.__views__.push({size:Jc(n,Pt),type:t+(r.__dir__<0?"Right":"")}),r},x.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}}),c(["filter","map","takeWhile"],function(t,e){var n=e+1,r=n==Tt||n==Nt;x.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:zo(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}}),c(["head","last"],function(t,e){var n="take"+(e?"Right":"");x.prototype[t]=function(){return this[n](1).value()[0]}}),c(["initial","tail"],function(t,e){var n="drop"+(e?"":"Right");x.prototype[t]=function(){return this.__filtered__?new x(this):this[n](1)}}),x.prototype.compact=function(){return this.filter(Ll)},x.prototype.find=function(t){return this.filter(t).head()},x.prototype.findLast=function(t){return this.reverse().find(t)},x.prototype.invokeMap=si(function(t,e){return"function"==typeof t?new x(this):this.map(function(n){return Er(n,t,e)})}),x.prototype.reject=function(t){return this.filter(qu(zo(t)))},x.prototype.slice=function(t,e){t=Oa(t);var n=this;return n.__filtered__&&(t>0||e<0)?new x(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==ot&&(e=Oa(e),n=e<0?n.dropRight(-e):n.take(e-t)),n)},x.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},x.prototype.toArray=function(){return this.take(Pt)},rr(x.prototype,function(t,e){var r=/^(?:filter|find|map|reject)|While$/.test(e),o=/^(?:head|last)$/.test(e),s=n[o?"take"+("last"==e?"Right":""):e],u=o||/^find/.test(e);s&&(n.prototype[e]=function(){var e=this.__wrapped__,a=o?[1]:arguments,l=e instanceof x,c=a[0],f=l||wh(e),h=function(t){var e=s.apply(n,m([t],a));return o&&d?e[0]:e};f&&r&&"function"==typeof c&&1!=c.length&&(l=f=!1);var d=this.__chain__,p=!!this.__actions__.length,g=u&&!d,v=l&&!p;if(!u&&f){e=v?e:new x(this);var y=t.apply(e,a);return y.__actions__.push({func:ru,args:[h],thisArg:ot}),new i(y,d)}return g&&v?t.apply(this,a):(y=this.thru(h),g?o?y.value()[0]:y.value():y)})}),c(["pop","push","shift","sort","splice","unshift"],function(t){var e=vc[t],r=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",i=/^(?:pop|shift)$/.test(t);n.prototype[t]=function(){var t=arguments;if(i&&!this.__chain__){var n=this.value();return e.apply(wh(n)?n:[],t)}return this[r](function(n){return e.apply(wh(n)?n:[],t)})}}),rr(x.prototype,function(t,e){var r=n[e];if(r){var i=r.name+"";(cf[i]||(cf[i]=[])).push({name:e,func:r})}}),cf[no(ot,_t).name]=[{name:"wrapper",func:ot}],x.prototype.clone=C,x.prototype.reverse=Y,x.prototype.value=nt,n.prototype.at=eh,n.prototype.chain=iu,n.prototype.commit=ou,n.prototype.next=su,n.prototype.plant=au,n.prototype.reverse=lu,n.prototype.toJSON=n.prototype.valueOf=n.prototype.value=cu,n.prototype.first=n.prototype.head,qc&&(n.prototype[qc]=uu),n},jr=kr();"object"==o(n(53))&&n(53)?(ar._=jr,r=function(){return jr}.call(e,n,e,i),!(r!==ot&&(i.exports=r))):cr?((cr.exports=jr)._=jr,lr._=jr):ar._=jr}).call(void 0)}).call(e,function(){return this}(),n(20)(t))},function(t,e,n){"use strict";function r(t){var e=t.parentNode,n=t.nextSibling;return e.removeChild(t),function(){n?e.insertBefore(t,n):e.appendChild(t)}}var i,o=n(54),s=n(2),u=function(t){for(var e;e=t.lastChild;)t.removeChild(e)};t.exports=i=s.extend({renderSubviews:function(){var t=this.el,e=void 0!=t.parentNode;if(e)var n=r(t);u(t);for(var i,s,a=document.createDocumentFragment(),l=this._views(),c=o.sortBy(l,function(t){return t.ordering}),f=0;f<c.length;f++)i=c[f],i.render(),s=i.el,null!=s&&a.appendChild(s);return t.appendChild(a),e&&n(),t},addView:function(t,e){var n=this._views();if(null==e)throw"Invalid plugin. ";return null==e.ordering&&(e.ordering=t),n[t]=e},removeViews:function(){var t,e,n=this._views();for(e in n)t=n[e],t.undelegateEvents(),t.unbind(),null!=t.removeViews&&t.removeViews(),t.remove();return this.views={}},removeView:function(t){var e=this._views();return e[t].remove(),delete e[t]},getView:function(t){return this._views()[t]},remove:function(){return this.removeViews(),s.prototype.remove.apply(this)},_views:function(){return null==this.views&&(this.views={}),this.views}})},function(t,e,n){var r;(function(t){"use strict";var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};/*!
  	 * jBone v1.2.1 - 2017-09-19 - Library for DOM manipulation
  	 *
  	 * http://jbone.js.org
  	 *
  	 * Copyright 2017 Alexey Kupriyanenko
  	 * Released under the MIT license.
  	 */
  !function(o){function s(t){var e=t.length,n="undefined"==typeof t?"undefined":i(t);return!_(n)&&t!==o&&(!(1!==t.nodeType||!e)||b(n)||0===e||"number"==typeof e&&e>0&&e-1 in t)}function u(t,e){var n,r;this.originalEvent=t,r=function(t,e){"preventDefault"===t?this[t]=function(){return this.defaultPrevented=!0,e[t]()}:"stopImmediatePropagation"===t?this[t]=function(){return this.immediatePropagationStopped=!0,e[t]()}:_(e[t])?this[t]=function(){return e[t]()}:this[t]=e[t]};for(n in t)(t[n]||"function"==typeof t[n])&&r.call(this,n,t);x.extend(this,e,{isImmediatePropagationStopped:function(){return!!this.immediatePropagationStopped}})}var a,l=o.$,c=o.jBone,f=/^<(\w+)\s*\/?>$/,h=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,d=[].slice,p=[].splice,g=Object.keys,v=o.document,m=function(t){return"string"==typeof t},y=function(t){return t instanceof Object},_=function(t){return"[object Function]"==={}.toString.call(t)},b=function(t){return Array.isArray(t)},x=function(t,e){return new a.init(t,e)};x.noConflict=function(){return o.$=l,o.jBone=c,x},a=x.fn=x.prototype={init:function(t,e){var n,r,i,o;if(!t)return this;if(m(t)){if(r=f.exec(t))return this[0]=v.createElement(r[1]),this.length=1,y(e)&&this.attr(e),this;if((r=h.exec(t))&&r[1]){for(o=v.createDocumentFragment(),i=v.createElement("div"),i.innerHTML=t;i.lastChild;)o.appendChild(i.firstChild);return n=d.call(o.childNodes),x.merge(this,n)}if(x.isElement(e))return x(e).find(t);try{return n=v.querySelectorAll(t),x.merge(this,n)}catch(t){return this}}return t.nodeType?(this[0]=t,this.length=1,this):_(t)?t():t instanceof x?t:x.makeArray(t,this)},pop:[].pop,push:[].push,reverse:[].reverse,shift:[].shift,sort:[].sort,splice:[].splice,slice:[].slice,indexOf:[].indexOf,forEach:[].forEach,unshift:[].unshift,concat:[].concat,join:[].join,every:[].every,some:[].some,filter:[].filter,map:[].map,reduce:[].reduce,reduceRight:[].reduceRight,length:0},a.constructor=x,a.init.prototype=a,x.setId=function(t){var e=t.jid;t===o?e="window":void 0===t.jid&&(t.jid=e=++x._cache.jid),x._cache.events[e]||(x._cache.events[e]={})},x.getData=function(t){t=t instanceof x?t[0]:t;var e=t===o?"window":t.jid;return{jid:e,events:x._cache.events[e]}},x.isElement=function(t){return t&&t instanceof x||t instanceof HTMLElement||m(t)},x._cache={events:{},jid:0},a.pushStack=function(t){return x.merge(this.constructor(),t)},x.merge=function(t,e){for(var n=e.length,r=t.length,i=0;i<n;)t[r++]=e[i++];return t.length=r,t},x.contains=function(t,e){return t.contains(e)},x.extend=function(t){var e;return p.call(arguments,1).forEach(function(n){if(e=t,n)for(var r in n)e[r]=n[r]}),t},x.makeArray=function(t,e){var n=e||[];return null!==t&&(s(t)?x.merge(n,m(t)?[t]:t):n.push(t)),n},x.unique=function(t){if(null==t)return[];for(var e=[],n=0,r=t.length;n<r;n++){var i=t[n];e.indexOf(i)<0&&e.push(i)}return e},x.Event=function(t,e){var n,r;return t.type&&!e&&(e=t,t=t.type),n=t.split(".").splice(1).join("."),r=t.split(".")[0],t=v.createEvent("Event"),t.initEvent(r,!0,!0),x.extend(t,{namespace:n,isDefaultPrevented:function(){return t.defaultPrevented}},e)},x.event={add:function(t,e,n,r,i){x.setId(t);var o,s,u,a=function(e){x.event.dispatch.call(t,e)},l=x.getData(t).events;for(e=e.split(" "),s=e.length;s--;)u=e[s],o=u.split(".")[0],l[o]=l[o]||[],l[o].length?a=l[o][0].fn:t.addEventListener&&t.addEventListener(o,a,!1),l[o].push({namespace:u.split(".").splice(1).join("."),fn:a,selector:i,data:r,originfn:n})},remove:function(t,e,n,r){var i,o,s=function(t,e,r,i,o){var s;(n&&o.originfn===n||!n)&&(s=o.fn),t[e][r].fn===s&&(t[e].splice(r,1),t[e].length||i.removeEventListener(e,s))},u=x.getData(t).events;if(u)return!e&&u?g(u).forEach(function(e){for(o=u[e],i=o.length;i--;)s(u,e,i,t,o[i])}):void e.split(" ").forEach(function(e){var n,a=e.split(".")[0],l=e.split(".").splice(1).join(".");if(u[a])for(o=u[a],i=o.length;i--;)n=o[i],(!l||l&&n.namespace===l)&&(!r||r&&n.selector===r)&&s(u,a,i,t,n);else l&&g(u).forEach(function(e){for(o=u[e],i=o.length;i--;)n=o[i],n.namespace.split(".")[0]===l.split(".")[0]&&s(u,e,i,t,n)})})},trigger:function(t,e){var n=[];m(e)?n=e.split(" ").map(function(t){return x.Event(t)}):(e=e instanceof Event?e:x.Event(e),n=[e]),n.forEach(function(e){e.type&&t.dispatchEvent&&t.dispatchEvent(e)})},dispatch:function(t){for(var e,n,r,i,o,s=0,a=0,l=this,c=x.getData(l).events[t.type],f=c.length,h=[],d=[];s<f;s++)h.push(c[s]);for(s=0,f=h.length;s<f&&~c.indexOf(h[s])&&(!i||!i.isImmediatePropagationStopped());s++)if(n=null,o={},r=h[s],r.data&&(o.data=r.data),r.selector){if(~(d=x(l).find(r.selector)).indexOf(t.target)&&(n=t.target)||l!==t.target&&l.contains(t.target)){if(!n)for(e=d.length,a=0;a<e;a++)d[a]&&d[a].contains(t.target)&&(n=d[a]);if(!n)continue;o.currentTarget=n,i=new u(t,o),t.namespace&&t.namespace!==r.namespace||r.originfn.call(n,i)}}else i=new u(t,o),t.namespace&&t.namespace!==r.namespace||r.originfn.call(l,i)}},a.on=function(t,e,n,r){var i=this.length,o=0;if(null==n&&null==r?(r=e,n=e=void 0):null==r&&("string"==typeof e?(r=n,n=void 0):(r=n,n=e,e=void 0)),!r)return this;for(;o<i;o++)x.event.add(this[o],t,r,n,e);return this},a.one=function(t){var e,n=arguments,r=0,i=this.length,o=d.call(n,1,n.length-1),s=d.call(n,-1)[0];for(e=function(e){var n=x(e);t.split(" ").forEach(function(t){var r=function r(i){n.off(t,r),s.call(e,i)};n.on.apply(n,[t].concat(o,r))})};r<i;r++)e(this[r]);return this},a.trigger=function(t){var e=0,n=this.length;if(!t)return this;for(;e<n;e++)x.event.trigger(this[e],t);return this},a.off=function(t,e,n){var r=0,i=this.length;for(_(e)&&(n=e,e=void 0);r<i;r++)x.event.remove(this[r],t,n,e);return this},a.find=function(t){for(var e=[],n=0,r=this.length,i=function(n){_(n.querySelectorAll)&&[].forEach.call(n.querySelectorAll(t),function(t){e.push(t)})};n<r;n++)i(this[n]);return x(e)},a.get=function(t){return null!=t?t<0?this[t+this.length]:this[t]:d.call(this)},a.eq=function(t){return x(this[t])},a.parent=function(){for(var t,e=[],n=0,r=this.length;n<r;n++)!~e.indexOf(t=this[n].parentElement)&&t&&e.push(t);return x(e)},a.toArray=function(){return d.call(this)},a.is=function(){var t=arguments;return this.some(function(e){return e.tagName.toLowerCase()===t[0]})},a.has=function(){var t=arguments;return this.some(function(e){return e.querySelectorAll(t[0]).length})},a.add=function(t,e){return this.pushStack(x.unique(x.merge(this.get(),x(t,e))))},a.attr=function(t,e){var n,r=arguments,i=0,o=this.length;if(m(t)&&1===r.length)return this[0]&&this[0].getAttribute(t);for(2===r.length?n=function(n){n.setAttribute(t,e)}:y(t)&&(n=function(e){g(t).forEach(function(n){e.setAttribute(n,t[n])})});i<o;i++)n(this[i]);return this},a.removeAttr=function(t){for(var e=0,n=this.length;e<n;e++)this[e].removeAttribute(t);return this},a.val=function(t){var e=0,n=this.length;if(0===arguments.length)return this[0]&&this[0].value;for(;e<n;e++)this[e].value=t;return this},a.css=function(t,e){var n,r=arguments,i=0,s=this.length;if(m(t)&&1===r.length)return this[0]&&o.getComputedStyle(this[0])[t];for(2===r.length?n=function(n){n.style[t]=e}:y(t)&&(n=function(e){g(t).forEach(function(n){e.style[n]=t[n]})});i<s;i++)n(this[i]);return this},a.data=function(t,e){var n,r=arguments,i={},o=0,s=this.length,u=function(t,e,n){y(n)?(t.jdata=t.jdata||{},t.jdata[e]=n):t.dataset[e]=n},a=function(t){return"true"===t||"false"!==t&&t};if(0===r.length)return this[0].jdata&&(i=this[0].jdata),g(this[0].dataset).forEach(function(t){i[t]=a(this[0].dataset[t])},this),i;if(1===r.length&&m(t))return this[0]&&a(this[0].dataset[t]||this[0].jdata&&this[0].jdata[t]);for(1===r.length&&y(t)?n=function(e){g(t).forEach(function(n){u(e,n,t[n])})}:2===r.length&&(n=function(n){u(n,t,e)});o<s;o++)n(this[o]);return this},a.removeData=function(t){for(var e,n,r=0,i=this.length;r<i;r++)if(e=this[r].jdata,n=this[r].dataset,t)e&&e[t]&&delete e[t],delete n[t];else{for(t in e)delete e[t];for(t in n)delete n[t]}return this},a.addClass=function(t){for(var e=0,n=0,r=this.length,i=t?t.trim().split(/\s+/):[];e<r;e++)for(n=0,n=0;n<i.length;n++)this[e].classList.add(i[n]);return this},a.removeClass=function(t){for(var e=0,n=0,r=this.length,i=t?t.trim().split(/\s+/):[];e<r;e++)for(n=0,n=0;n<i.length;n++)this[e].classList.remove(i[n]);return this},a.toggleClass=function(t,e){var n=0,r=this.length,i="toggle";if(e===!0&&(i="add")||e===!1&&(i="remove"),t)for(;n<r;n++)this[n].classList[i](t);return this},a.hasClass=function(t){var e=0,n=this.length;if(t)for(;e<n;e++)if(this[e].classList.contains(t))return!0;return!1},a.html=function(t){var e,n=arguments;return 1===n.length&&void 0!==t?this.empty().append(t):0===n.length&&(e=this[0])?e.innerHTML:this},a.append=function(t){var e,n=0,r=this.length;for(m(t)&&h.exec(t)?t=x(t):y(t)||(t=document.createTextNode(t)),t=t instanceof x?t:x(t),e=function(e,n){t.forEach(function(t){n?e.appendChild(t.cloneNode(!0)):e.appendChild(t)})};n<r;n++)e(this[n],n);return this},a.appendTo=function(t){return x(t).append(this),this},a.empty=function(){for(var t,e=0,n=this.length;e<n;e++)for(t=this[e];t.lastChild;)t.removeChild(t.lastChild);return this},a.remove=function(){var t,e=0,n=this.length;for(this.off();e<n;e++)t=this[e],delete t.jdata,t.parentNode&&t.parentNode.removeChild(t);return this},"object"===i(t)&&t&&"object"===i(t.exports)?t.exports=x:(r=function(){return x}.call(e,n,e,t),!(void 0!==r&&(t.exports=r)),o.jBone=o.$=x)}("undefined"!=typeof window?window:void 0)}).call(e,n(20)(t))},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(112),o=r(i),s=o.default.extend({buildDOM:function(){return this.on("new:node",this.buildNode),this.on("new:button",this.buildButton),this.on("new:menu",this.buildMenu),o.default.prototype.buildDOM.call(this)},buildNode:function(t){if(null!=this.g)return t.style.lineHeight=this.g.menuconfig.get("menuItemLineHeight")},buildButton:function(t){if(null!=this.g)return t.style.fontSize=this.g.menuconfig.get("menuFontsize"),t.style.marginLeft=this.g.menuconfig.get("menuMarginLeft"),t.style.padding=this.g.menuconfig.get("menuPadding")},buildMenu:function(t){if(null!=this.g)return t.style.fontSize=this.g.menuconfig.get("menuItemFontsize")}});e.default=s},function(t,e){"use strict";var n={};n.removeToInsertLater=function(t){var e,n;return n=t.parentNode,e=t.nextSibling,n.removeChild(t),function(){e?n.insertBefore(t,e):n.appendChild(t)}},n.removeAllChilds=function(t){var e;for(e=0;t.firstChild;)e++,t.removeChild(t.firstChild)},t.exports=n},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.columnsel=e.rowsel=e.possel=e.sel=void 0;var r=n(3),i=n(1).Model,o=i.extend({defaults:{type:"super"}}),s=o.extend({defaults:(0,r.extend)({},o.prototype.defaults,{type:"row",seqId:""}),inRow:function(t){return t===this.get("seqId")},inColumn:function(t){return!0},getLength:function(){return 1}}),u=o.extend({defaults:(0,r.extend)({},o.prototype.defaults,{type:"column",xStart:-1,xEnd:-1}),inRow:function(){return!0},inColumn:function(t){return xStart<=t&&t<=xEnd},getLength:function(){return xEnd-xStart}}),a=s.extend((0,r.extend)({},(0,r.pick)(u,"inColumn"),(0,r.pick)(u,"getLength"),{defaults:(0,r.extend)({},u.prototype.defaults,s.prototype.defaults,{type:"pos"})}));e.sel=o,e.possel=a,e.rowsel=s,e.columnsel=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(8),i=n(3),o=n(1).Collection,s=o.extend({model:r.sel,initialize:function(t,e){if("undefined"!=typeof e&&null!==e)return this.g=e.g,this.listenTo(this.g,"residue:click",function(t){return this._handleE(t.evt,new r.possel({xStart:t.rowPos,xEnd:t.rowPos,seqId:t.seqId}))}),this.listenTo(this.g,"row:click",function(t){return this._handleE(t.evt,new r.rowsel({seqId:t.seqId}))}),this.listenTo(this.g,"column:click",function(t){return this._handleE(t.evt,new r.columnsel({xStart:t.rowPos,xEnd:t.rowPos+t.stepSize-1}))})},getSelForRow:function(t){return this.filter(function(e){return e.inRow(t)})},getSelForColumns:function(t){return this.filter(function(e){return e.inColumn(t)})},addJSON:function(t){return this.add(this._fromJSON(t))},_fromJSON:function(t){switch(t.type){case"column":return new r.columnsel(t);case"row":return new r.rowsel(t);case"pos":return new r.possel(t)}},resetJSON:function(t){return t=t.map(this._fromJSON),this.reset(t)},getBlocksForRow:function(t,e){for(var n,r=this.filter(function(e){return e.inRow(t)}),i=[],o=function(t,n){var n=r[t];return"row"===n.attributes.type?(i=function(){var t=[],n=0;if(0<=e)for(;n<=e;)t.push(n++);else for(;n>=e;)t.push(n--);return t}(),"break"):void(i=i.concat(function(){var t=[],e=n.attributes.xStart;if(n.attributes.xStart<=n.attributes.xEnd)for(;e<=n.attributes.xEnd;)t.push(e++);else for(;e>=n.attributes.xEnd;)t.push(e--);return t}()))},s=0;s<r.length&&"break"!==o(s,n);s++);return i},getAllColumnBlocks:function(t){var e=(t.maxLen,t.withPos,[]),n=void 0;n=t.withPos?this.filter(function(t){return null!=t.get("xStart")}):this.filter(function(t){return"column"===t.get("type")});for(var r,o=function(t,r){var r=n[t];e=e.concat(function(){var t=[],e=r.attributes.xStart;if(r.attributes.xStart<=r.attributes.xEnd)for(;e<=r.attributes.xEnd;)t.push(e++);else for(;e>=r.attributes.xEnd;)t.push(e--);return t}())},s=0;s<n.length;s++)o(s,r);return e=(0,i.uniq)(e)},invertRow:function(t){var e=this.where({type:"row"});e=e.map(function(t){return t.attributes.seqId});for(var n,o=(0,i.filter)(t,function(t){return!(e.indexOf(t)>=0)}),s=[],u=0;u<o.length;u++){var n=o[u];s.push(new r.rowsel({seqId:n}))}return this.reset(s)},invertCol:function(t){var e=this.where({type:"column"}).reduce(function(t,e){return t.concat(function(){var t=[],n=e.attributes.xStart;if(e.attributes.xStart<=e.attributes.xEnd)for(;n<=e.attributes.xEnd;)t.push(n++);else for(;n>=e.attributes.xEnd;)t.push(n--);return t}())},[]),n=(0,i.filter)(t,function(t){return!(e.indexOf(t)>=0)});if(0!==n.length){for(var o,s=[],u=n[0],a=u,l=0;l<n.length;l++)o=n[l],a+1===o?a=o:(s.push(new r.columnsel({xStart:u,xEnd:a})),u=a=o);return u!==a&&s.push(new r.columnsel({xStart:u,xEnd:n[n.length-1]})),this.reset(s)}},_handleE:function(t,e){return t.ctrlKey||t.metaKey?this.add(e):this.reset([e])},_reduceColumns:function(){return this.each(function(t,e,n){for(var r=(0,i.filter)(n,function(t){return"column"===t.get("type")}),o=t.get("xStart"),s=t.get("xEnd"),u=(0,i.filter)(r,function(t){return t.get("xEnd")===o-1}),a=0;a<u.length;a++)u[a].set("xEnd",o);for(var l=(0,i.filter)(r,function(t){return t.get("xStart")===s+1}),c=0;c<l.length;c++)l[c].set("xStart",s);if(u.length>0||l.length>0)return t.collection.remove(t)})}});e.default=s},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.version=e.xhr=e.seqs=e.parser=e.newick=e.matrix=e.gff=e.fasta=e.clustal=void 0;var i=n(61),o=r(i),s=n(62),u=r(s),a=n(63),l=r(a),c=n(65),f=r(c),h=n(67),d=r(h),p=n(11),g=r(p),v=n(24),m=r(v);e.clustal=o.default,e.fasta=u.default,e.gff=l.default,e.matrix=f.default,e.newick=d.default,e.parser=g.default,e.seqs=m.default;var y=n(21);e.xhr=y;var _="imported";"undefined"!=typeof IO_VERSION&&(_=IO_VERSION),e.version=_},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=n(21),o={};e.default=o,o.read=function(t,e){var n=function(t){return function(n,r,i){return o._onRetrieval(n,i,e,t)}}(this);return"undefined"==typeof e?new Promise(function(r,o){e=function(t,e){t?o(t):r(e)},i(t,n)}):i(t,n)},o._onRetrieval=function(t,e,n,r){var i=void 0;return"undefined"!=typeof t&&(i=r.parse(e)),n.call(r,t,i)},o.extend=function(t,e){return extend(o,t,e)},o.mixin=function(t){var e=["read"];return"object"!==("undefined"==typeof t?"undefined":r(t))&&(t=t.prototype),e.forEach(function(e){t[e]=o[e]},this),t}},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n="http://www.w3.org/2000/svg",r=function(t,e){for(var n in e){var r=e[n];t.setAttributeNS(null,n,r)}return t},i=function(t){var e=document.createElementNS(n,"svg");return e.setAttribute("width",t.width),e.setAttribute("height",t.height),e},o=function(t){return r(document.createElementNS(n,"rect"),t)},s=function(t){return r(document.createElementNS(n,"line"),t)},u=function(t){return r(document.createElementNS(n,"polygon"),t)};e.base=i,e.line=s,e.rect=o,e.polygon=u},function(t,e,n){"use strict";var r=n(71);r.onAll=function(t,e){return this.on("all",t,e),this},r.oldMixin=r.mixin,r.mixin=function(t){r.oldMixin(t);for(var e=["onAll"],n=0;n<e.length;n++){var i=e[n];t[i]=this[i]}return t},t.exports=r},function(t,e,n){(function(t){"use strict";var e={};e.d=e.defaultValue=function(t,e){return void 0===t?"function"==typeof t?e():e:t},e.id=function(t){return document.getElementById(t)},e.mk=function(t){return document.createElement(t)},void 0!==t&&void 0!==t.exports&&(t.exports=e)}).call(e,n(20)(t))},function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=function(){function t(){n(this,t)}return r(t,null,[{key:"randomInt",value:function(t,e){if("undefined"==typeof e||null===e){var n=[0,t];t=n[0],e=n[1]}if(t>e){var r=[e,t];t=r[0],e=r[1]}return Math.floor(Math.random()*(e-t+1)+t)}},{key:"uniqueId",value:function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8,e="";e.length<t;)e+=Math.random().toString(36).substr(2);return e.substr(0,t)}},{key:"getRandomInt",value:function(t,e){return Math.floor(Math.random()*(e-t+1))+t}}]),t}();e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(10),i=n(3),o=n(87),s=n(88),u={openInJalview:function(t,e){"."===t.charAt(0)&&(t=document.URL.substr(0,document.URL.lastIndexOf("/"))+"/"+t),t.indexOf("http")<0&&(t="http://"+window.location.hostname+t),t=encodeURIComponent(t);var n="http://www.jalview.org/services/launchApp?open="+t;return n+="&colour="+e,window.open(n,"_blank")},publishWeb:function(t,e){var n=r.fasta.write(t.seqs.toJSON());return n=encodeURIComponent(n),(0,r.xhr)({method:"POST",body:"sprunge="+n,uri:"http://sprunge.biojs.net",headers:{"Content-Type":"application/x-www-form-urlencoded"}},function(t,n,r){return e(r.trim())})},shareLink:function(t,e){var n=t.g.config.get("importURL"),r="http://msa.biojs.net/app/?seq=",i=function(t){var n=r+t;if(e)return e(n)};return n?i(n):u.publishWeb(t,i)},saveAsFile:function(t,e){var n=r.fasta.write(t.seqs.toJSON());return s(new Blob([n],{type:"text/plain"}),e)},saveSelection:function(t,e){var n=t.g.selcol.pluck("seqId");if(n.length>0){n=t.seqs.filter(function(t){return n.indexOf(t.get("id"))>=0});for(var i=n.length-1,o=0;0<i?o<=i:o>=i;0<i?o++:o--)n[o]=n[o].toJSON()}else n=t.seqs.toJSON(),console.warn("no selection found");var u=r.fasta.write(n);return s(new Blob([u],{type:"text/plain"}),e)},saveAnnots:function(t,e){var n=t.seqs.map(function(t){if(n=t.get("features"),0!==n.length){var e=t.get("name");return n.each(function(t){return t.set("seqname",e)}),n.toJSON()}});n=(0,i.flatten)((0,i.compact)(n));var o=r.gff.exportLines(n);return s(new Blob([o],{type:"text/plain"}),e)},saveAsImg:function(t,e){var n=t.getView("stage").getView("body").getView("seqblock").el;if("undefined"!=typeof n&&null!==n)return s(o(n.toDataURL("image/png")),e,"image/png")}};e.default=u},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var s,u=t[Symbol.iterator]();!(r=(s=u.next()).done)&&(n.push(s.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&u.return&&u.return()}finally{if(i)throw o}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=n(3),s=n(10),u=n(38),a=r(u),l=function(t){return this.msa=t,this},c={guessFileFromText:function(t,e){if("undefined"==typeof t||null===t)return console.warn("invalid file format"),["","error"];switch((0,a.default)(t,e)){case"clustal":var n=s.clustal,r="seqs";break;case"fasta":n=s.fasta,r="seqs";break;case"newick":r="newick";break;case"gff":n=s.gff,r="features";break;default:alert("Unknown file format. Please contact us on Github for help.")}return[n,r]},parseText:function(t,e){var n=this.guessFileFromText(t,e),r=i(n,2),o=r[0],s=r[1];return"seqs"===s?[o.parse(t),s]:"features"===s?[o.parseSeqs(t),s]:[t,s]},importFiles:function(t){var e=this;return function(){for(var n=[],r=t.length-1,i=0;0<r?i<=r:i>=r;0<r?i++:i--){var o=t[i],s=new FileReader;s.onload=function(t){return e.importFile(t.target.result)},n.push(s.readAsText(o))}return n}()},importFile:function(t,e){var n=this;e=e||{},e.name=t.name;var r,o=this.parseText(t,e),s=i(o,2),u=s[0],a=s[1];return"error"===a?(alert("An error happened"),"error"):("seqs"===a?(this.msa.seqs.reset(u),this.msa.g.config.set("url","userimport"),this.msa.g.trigger("url:userImport")):"features"===a?this.msa.seqs.addFeatures(u):"newick"===a?this.msa.u.tree.loadTree(function(){return n.msa.u.tree.showTree(t)}):alert("Unknown file!"),r=t.name)},importURL:function(t,e){var n=this;return t=this.msa.u.proxy.corsURL(t),this.msa.g.config.set("url",t),(0,s.xhr)({url:t,timeout:0},function(r,i,o){return r?console.error(r):"error"!==n.importFile(o,{url:t})?(n.msa.g.trigger("import:url",t),e?e():void 0):void 0})}};(0,o.extend)(l.prototype,c),e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(14),i={loadScript:function(t,e){var n=r.mk("script");return n.type="text/javascript",n.src=t,n.async=!0,n.onload=n.onreadystatechange=function(){if(!(t||this.readyState&&"complete"!==this.readyState)){var t=!0;return e()}},document.getElementsByTagName("script")[0].parentNode.appendChild(n)},joinCb:function(t,e,n){e=e||1;var r=0,i=function(t,e){return"undefined"==typeof t||null===t?o():function(){var n;return n="apply",t.indexOf(n)>=0&&t.apply(e,arguments),o()}},o=function(){if(r++,r===e)return t.call(n)};return i}};e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3),i=function(t){return this.g=t.g,this},o={corsURL:function(t){return document.URL.indexOf("localhost")>=0&&"/"===t[0]?t:"."===t.charAt(0)||"/"===t.charAt(0)?t:(this.g.config.get("importProxyStripHttp")&&(t=t.replace("http://",""),t=t.replace("https://","")),t=this.g.config.get("importProxy")+t)}};(0,r.extend)(i.prototype,o),e.default=i},function(t,e){"use strict";t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}},function(t,e,n){"use strict";function r(t,e){for(var n=0;n<t.length;n++)e(t[n])}function i(t){for(var e in t)if(t.hasOwnProperty(e))return!1;return!0}function o(t,e,n){var r=t;return f(e)?(n=e,"string"==typeof t&&(r={uri:t})):r=d(e,{uri:t}),r.callback=n,r}function s(t,e,n){return e=o(t,e,n),u(e)}function u(t){function e(){4===c.readyState&&setTimeout(o,0)}function n(){var t=void 0;if(t=c.response?c.response:c.responseText||a(c),b)try{t=JSON.parse(t)}catch(t){}return t}function r(t){return clearTimeout(p),t instanceof Error||(t=new Error(""+(t||"Unknown XMLHttpRequest Error"))),t.statusCode=0,l(t,x)}function o(){if(!d){var e;clearTimeout(p),e=t.useXDR&&void 0===c.status?200:1223===c.status?204:c.status;var r=x,i=null;return 0!==e?(r={body:n(),statusCode:e,method:v,headers:{},url:g,rawRequest:c},c.getAllResponseHeaders&&(r.headers=h(c.getAllResponseHeaders()))):i=new Error("Internal XMLHttpRequest Error"),l(i,r,r.body)}}if("undefined"==typeof t.callback)throw new Error("callback argument missing");var u=!1,l=function(e,n,r){u||(u=!0,t.callback(e,n,r))},c=t.xhr||null;c||(c=t.cors||t.useXDR?new s.XDomainRequest:new s.XMLHttpRequest);var f,d,p,g=c.url=t.uri||t.url,v=c.method=t.method||"GET",m=t.body||t.data,y=c.headers=t.headers||{},_=!!t.sync,b=!1,x={body:void 0,headers:{},statusCode:0,method:v,url:g,rawRequest:c};if("json"in t&&t.json!==!1&&(b=!0,y.accept||y.Accept||(y.Accept="application/json"),"GET"!==v&&"HEAD"!==v&&(y["content-type"]||y["Content-Type"]||(y["Content-Type"]="application/json"),m=JSON.stringify(t.json===!0?m:t.json))),c.onreadystatechange=e,c.onload=o,c.onerror=r,c.onprogress=function(){},c.onabort=function(){d=!0},c.ontimeout=r,c.open(v,g,!_,t.username,t.password),_||(c.withCredentials=!!t.withCredentials),!_&&t.timeout>0&&(p=setTimeout(function(){if(!d){d=!0,c.abort("timeout");var t=new Error("XMLHttpRequest timeout");t.code="ETIMEDOUT",r(t)}},t.timeout)),c.setRequestHeader)for(f in y)y.hasOwnProperty(f)&&c.setRequestHeader(f,y[f]);else if(t.headers&&!i(t.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in t&&(c.responseType=t.responseType),"beforeSend"in t&&"function"==typeof t.beforeSend&&t.beforeSend(c),c.send(m||null),c}function a(t){try{if("document"===t.responseType)return t.responseXML;var e=t.responseXML&&"parsererror"===t.responseXML.documentElement.nodeName;if(""===t.responseType&&!e)return t.responseXML}catch(t){}return null}function l(){}var c=n(146),f=n(52),h=n(149),d=n(150);t.exports=s,s.XMLHttpRequest=c.XMLHttpRequest||l,s.XDomainRequest="withCredentials"in new s.XMLHttpRequest?s.XMLHttpRequest:c.XDomainRequest,r(["get","put","post","patch","head","delete"],function(t){s["delete"===t?"del":t]=function(e,n,r){return n=o(e,n,r),n.method=t.toUpperCase(),u(n)}})},function(t,e,n){"use strict";t.exports=n(56)},function(t,e,n){var r,i,o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};!function(s){"object"===o(e)?t.exports=s():(r=s,i="function"==typeof r?r.call(e,n,e,t):r,!(void 0!==i&&(t.exports=i)))}(function(){"use strict";var t={has:function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},extend:function(t){for(var e=1;e<arguments.length;++e){var n=arguments[e];if(n)for(var r in n)t[r]=n[r]}return t}};return function(e,n){var r,i=this;r=e&&t.has(e,"constructor")?e.constructor:function(){return i.apply(this,arguments)},t.extend(r,i,n);var o=function(){this.constructor=r};return o.prototype=i.prototype,r.prototype=new o,e&&t.extend(r.prototype,e),r.__super__=i.prototype,r}})},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n={};e.default=n,n.getMeta=function(t){var e,n,r=!1,i=!1,o={},s={},u=t.split(" ");if(u.length>=1?(r=u.shift(),i=u.join(" ")):r=t,r){var a=r.split("|");for(e=a.pop(),s.en=e;0!=a.length;){var l=a.shift(),c=a.shift();o[l]=c}}else e=r;if(i){var f=i.split("=");if(f.length>1){var h,d;f.length-1,f.forEach(function(t){t=t.trim();var e,r=t.split(" ");r.length>1?(d=r.pop(),e=r.join(" ")):e=t,h?s[h.toLowerCase()]=e:n=e,h=d})}else n=f.shift()}var p={name:e,ids:o,details:s};return n&&(p.desc=n),p};var r={sp:{link:"http://www.uniprot.org/%s",name:"Uniprot"},tr:{link:"http://www.uniprot.org/%s",name:"Trembl"},gb:{link:"http://www.ncbi.nlm.nih.gov/nuccore/%s",name:"Genbank"},pdb:{link:"http://www.rcsb.org/pdb/explore/explore.do?structureId=%s",name:"PDB"}};n.buildLinks=function(t){var e={};return t=t||{},Object.keys(t).forEach(function(n){if(n in r){var i=r[n],o=i.link.replace("%s",t[n]);e[i.name]=o}}),e},n.contains=function(t,e){return"".indexOf.call(t,e,0)!==-1},n.splitNChars=function(t,e){var n,r;e=e||80;var i=[];for(n=0,r=t.length-1;n<=r;n+=e)i.push(t.substr(n,e));return i},n.reverse=function(t){return t.split("").reverse().join("")},n.complement=function(t){var e=t+"",n=[[/g/g,"0"],[/c/g,"1"],[/0/g,"c"],[/1/g,"g"],[/G/g,"0"],[/C/g,"1"],[/0/g,"C"],[/1/g,"G"],[/a/g,"0"],[/t/g,"1"],[/0/g,"t"],[/1/g,"a"],[/A/g,"0"],[/T/g,"1"],[/0/g,"T"],[/1/g,"A"]];for(var r in n)e=e.replace(n[r][0],n[r][1]);return e},n.reverseComplement=function(t){return n.reverse(n.complement(t))},n.model=function(t,e,n){this.seq=t,this.name=e,this.id=n,this.ids={}}},function(t,e,n){"use strict";var r,i=n(1).Model;n(90),t.exports=r=i.extend({constructor:function(t,e){return this.g=e.g,i.apply(this,arguments),this},defaults:{currentSize:5,step:1,originalSize:!1,scaleCategories:[{columnWidth:1,markerStepSize:20,stepSize:0},{columnWidth:3,markerStepSize:20,stepSize:0},{columnWidth:5,markerStepSize:10,stepSize:0},{columnWidth:9,markerStepSize:5,stepSize:1},{columnWidth:15,markerStepSize:2,stepSize:1},{columnWidth:20,markerStepSize:1,stepSize:1},{columnWidth:30,markerStepSize:1,stepSize:1},{columnWidth:45,markerStepSize:1,stepSize:1}]},initialize:function(t){var e=this.get("scaleCategories"),n=this.g.zoomer.get("columnWidth")||this._getScaleInfo().columnWidth,r=_.find(e,{columnWidth:n});if(!r){var i=this._insertScaleCategory(n);r=e[i],this.set("currentSize",i+1)}var o=this.get("currentSize");return this.set("originalSize",o),this.setSize(o),this},_insertScaleCategory:function(t){var e=this.get("scaleCategories"),n=_.findLastIndex(e,function(e){return e.columnWidth<t}),r=e[n],i=n+1,o={columnWidth:t,markerStepSize:r.markerStepSize,stepSize:r.markerStepSize};return e.splice(i,0,o),this.set("scaleCategories",e),i},getSizeRange:function(){return[1,this.get("scaleCategories").length]},bigger:function(){return this.setSize(this.get("currentSize")+this.get("step"))},smaller:function(){return this.setSize(this.get("currentSize")-this.get("step"))},reset:function(){return this.setSize(this.get("originalSize"))},setSize:function(t){var e=this.getSizeRange();t=parseInt(t),t=t<e[0]?e[0]:t>e[1]?e[1]:t,this.set("currentSize",t);var n=this._getScaleInfo();return this.g.zoomer.set({columnWidth:n.columnWidth,stepSize:n.stepSize,markerStepSize:n.markerStepSize}),this},getSize:function(){return this.get("currentSize")},_getScaleInfo:function(){var t=this.getSize(),e=this.get("scaleCategories");return t>0&&t<=e.length?e[t-1]:void console.error("out of bounds")}})},function(t,e,n){"use strict";var r,i=n(97),o=n(1).Model;t.exports=r=o.extend({defaults:{scheme:"taylor",colorBackground:!0,showLowerCase:!0,opacity:.6},initialize:function(t,e,n){return this.colors=new i({seqs:e,conservation:function(){return n.scale(n.conservation())}}),n.on("reset",function(){if("dyn"===this.getSelectedScheme().type){var t;if(t="reset",this.getSelectedScheme().indexOf(t)>=0)return this.getSelectedScheme().reset()}},this)},addStaticScheme:function(t,e){return this.colors.addStaticScheme(t,e)},addDynScheme:function(t,e){return this.colors.addDynScheme(t,e)},getScheme:function(t){return this.colors.getScheme(t)},getSelectedScheme:function(){return this.colors.getScheme(this.get("scheme"))}})},function(t,e,n){"use strict";var r,i=n(1).Model;t.exports=r=i.extend({initialize:function(t,e){return null==this.get("hidden")&&this.set("hidden",[]),this.stats=e},calcHiddenColumns:function(t){for(var e,n=this.get("hidden"),r=t,i=0;i<n.length;i++)e=n[i],e<=r&&r++;return r-t}})},function(t,e,n){"use strict";var r,i=n(1).Model;t.exports=r=i.extend({defaults:{registerMouseHover:!1,registerMouseClicks:!0,importProxy:"https://cors-anywhere.herokuapp.com/",importProxyStripHttp:!0,eventBus:!0,alphabetSize:20,dropImport:!1,debug:!1,hasRef:!1,bootstrapMenu:!1,manualRendering:!1}})},function(t,e,n){"use strict";var r,i=n(18),o=n(1).Model;t.exports=r=o.extend({initialize:function(t){return this.g=t},development:{"msa-tnt":"/node_modules/msa-tnt/build/bundle.js","biojs-io-newick":"/node_modules/biojs-io-newick/build/biojs-io-newick.min.js"},loadPackage:function(t,e){try{return e(n(154)(t))}catch(n){return i.default.loadScript(this._pkgURL(t),e)}},loadPackages:function(t,e){
  var n=this,r=i.default.joinCb(function(){return e()},t.length);return t.forEach(function(t){return n.loadPackage(t,r)})},_pkgURL:function(t){if(this.g.config.get("debug"))var e=this.development[t];else e="http://wzrd.in/bundle/"+t+"@latest";return e}})},function(t,e,n){"use strict";var r,i=n(1).Model;t.exports=r=i.extend({defaults:{searchText:""}})},function(t,e,n){"use strict";var r,i=n(1).Model;t.exports=r=i.extend({defaults:{searchBox:-10,overviewBox:30,headerBox:-1,alignmentBody:0,scaleSlider:50}})},function(t,e,n){"use strict";var r,i=n(1).Model;t.exports=r=i.extend({defaults:{sequences:!0,markers:!0,metacell:!1,conserv:!1,overviewbox:!1,seqlogo:!1,gapHeader:!1,leftHeader:!0,scaleslider:!1,labels:!0,labelName:!0,labelId:!0,labelPartition:!1,labelCheckbox:!1,metaGaps:!0,metaIdentity:!0,metaLinks:!0},constructor:function(t,e){return this.calcDefaults(e.model),i.apply(this,arguments)},initialize:function(){return this.listenTo(this,"change:metaLinks change:metaIdentity change:metaGaps",function(){return this.trigger("change:metacell")},this),this.listenTo(this,"change:labelName change:labelId change:labelPartition change:labelCheckbox",function(){return this.trigger("change:labels")},this),this.listenTo(this,"change:markers change:conserv change:seqlogo change:gapHeader",function(){return this.trigger("change:header")},this)},calcDefaults:function(t){if(t.length>0){var e=t.at(0),n=e.get("ids");if(void 0!==n&&0===Object.keys(n).length)return this.defaults.metaLinks=!1}}})},function(t,e,n){"use strict";var r,i=n(1).Model;t.exports=r=i.extend({constructor:function(t,e){return this.calcDefaults(e.model),i.apply(this,arguments),this.g=e.g,this.listenTo(this,"change:labelIdLength change:labelNameLength change:labelPartLength change:labelCheckLength",function(){return this.trigger("change:labelWidth",this.getLabelWidth())},this),this.listenTo(this,"change:metaLinksWidth change:metaIdentWidth change:metaGapWidth",function(){return this.trigger("change:metaWidth",this.getMetaWidth())},this),this},defaults:{alignmentWidth:"auto",alignmentHeight:225,columnWidth:15,rowHeight:15,autoResize:!0,labelIdLength:20,labelNameLength:100,labelPartLength:15,labelCheckLength:15,labelFontsize:13,labelLineHeight:"13px",markerFontsize:"10px",stepSize:1,markerStepSize:2,markerHeight:20,residueFont:"13",canvasEventScale:1,minLetterDrawSize:11,boxRectHeight:2,boxRectWidth:2,overviewboxPaddingTop:10,overviewboxWidth:"fixed",overviewboxHeight:"fixed",metaGapWidth:35,metaIdentWidth:40,_alignmentScrollLeft:0,_alignmentScrollTop:0},calcDefaults:function(t){return t.getMaxLength()<200&&t.length<30&&(this.defaults.boxRectWidth=this.defaults.boxRectHeight=5),this},getAlignmentWidth:function(t){return this.get("autoResize")&&void 0!==t?this.get("columnWidth")*t:void 0===this.get("alignmentWidth")||"auto"===this.get("alignmentWidth")||0===this.get("alignmentWidth")?this._adjustWidth():this.get("alignmentWidth")},setLeftOffset:function(t){var e=t;return e=Math.max(0,e),e-=this.g.columns.calcHiddenColumns(e),this.set("_alignmentScrollLeft",e*this.get("columnWidth"))},setTopOffset:function(t){for(var e=Math.max(0,t-1),n=0,r=0;0<e?r<=e:r>=e;0<e?r++:r--)n+=this.model.at(r).attributes.height||1;return this.set("_alignmentScrollTop",n*this.get("rowHeight"))},getLeftBlockWidth:function(){var t=0;return this.g.vis.get("labels")&&(t+=this.getLabelWidth()),this.g.vis.get("metacell")&&(t+=this.getMetaWidth()),t},getMetaWidth:function(){var t=0;return this.g.vis.get("metaGaps")&&(t+=this.get("metaGapWidth")),this.g.vis.get("metaIdentity")&&(t+=this.get("metaIdentWidth")),this.g.vis.get("metaLinks")&&(t+=this.get("metaLinksWidth")),t},getLabelWidth:function(){var t=0;return this.g.vis.get("labelName")&&(t+=this.get("labelNameLength")),this.g.vis.get("labelId")&&(t+=this.get("labelIdLength")),this.g.vis.get("labelPartition")&&(t+=this.get("labelPartLength")),this.g.vis.get("labelCheckbox")&&(t+=this.get("labelCheckLength")),t},_adjustWidth:function(){if(void 0!==this.el&&void 0!==this.model){if(null!=this.el.parentNode&&0!==this.el.parentNode.offsetWidth)var t=this.el.parentNode.offsetWidth;else t=document.body.clientWidth-35;var e=t-this.getLeftBlockWidth(),n=this.getAlignmentWidth(this.model.getMaxLength()-this.g.columns.get("hidden").length),r=Math.min(e,n);return r=Math.floor(r/this.get("columnWidth"))*this.get("columnWidth"),this.attributes.alignmentWidth=r}},autoResize:function(){if(this.get("autoResize"))return this._adjustWidth(this.el,this.model)},autoHeight:function(t){var e=this.getMaxAlignmentHeight();return void 0!==t&&t>0&&(e=Math.min(e,t)),this.set("alignmentHeight",e)},setEl:function(t,e){return this.el=t,this.model=e},_checkScrolling:function(t,e){var n=t[0],r=t[1];return this.set("_alignmentScrollLeft",n,e),this.set("_alignmentScrollTop",r,e)},getMaxAlignmentHeight:function(){var t=0;return this.model.each(function(e){return t+=e.attributes.height||1}),t*this.get("rowHeight")},getMaxAlignmentWidth:function(){return this.model.getMaxLength()*this.get("columnWidth")}})},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(3),o=n(50),s=r(o),u=n(1).Collection,a=u.extend({model:s.default,constructor:function(){return this.startOnCache=[],this.on("all",function(){return this.startOnCache=[]},this),u.apply(this,arguments)},startOn:function(t){return null==this.startOnCache[t]&&(this.startOnCache[t]=this.where({xStart:t})),this.startOnCache[t]},contains:function(t){return this.reduce(function(e,n){return n||e.contains(t)},!1)},getFeatureOnRow:function(t,e){return this.filter(function(n){return n.get("row")===t&&n.get("xStart")<=e&&e<=n.get("xEnd")})},assignRows:function(){var t=this.max(function(t){return t.get("xEnd")}).attributes.xEnd,e=function(){for(var e=[],n=0;0<t?n<=t:n>=t;0<t?n++:n--)e.push(0);return e}();return this.each(function(t){for(var n=0,r=t.get("xStart"),i=t.get("xEnd"),o=r;r<i?o<=i:o>=i;r<i?o++:o--)e[o]>n&&(n=e[o]),e[o]++;return t.set("row",n)}),(0,i.max)(e)},getCurrentHeight:function(){return this.max(function(t){return t.get("row")}).attributes.row+1},getMinRows:function(){var t=this.max(function(t){return t.get("xEnd")}).attributes.xEnd,e=function(){for(var e=[],n=0;0<t?n<=t:n>=t;0<t?n++:n--)e.push(0);return e}();return this.each(function(t){return function(){for(var n=[],r=t.get("xStart"),i=t.get("xEnd"),o=r;r<i?o<=i:o>=i;r<i?o++:o++)n.push(e[o]++);return n}()}),(0,i.max)(e)}});e.default=a},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(36),o=r(i),s=n(34),u=r(s),a=n(1).Collection,l=a.extend({model:o.default,constructor:function(t,e){var n=this;return a.apply(this,arguments),this.g=e,this.on("add reset remove",function(){return n.lengthCache=null,n._bindSeqsWithFeatures()},this),this.on("reset",function(){return n._autoSetRefSeq()}),this._autoSetRefSeq(),this.lengthCache=null,this.features={},this},getMaxLength:function(){return 0===this.models.length?0:(null===this.lengthCache&&(this.lengthCache=this.max(function(t){return t.get("seq").length}).get("seq").length),this.lengthCache)},prev:function(t,e){var n=this.indexOf(t)-1;return n<0&&e&&(n=this.length-1),this.at(n)},next:function(t,e){var n=this.indexOf(t)+1;return n===this.length&&e&&(n=0),this.at(n)},calcHiddenSeqs:function(t){for(var e=t,n=0;0<e?n<=e:n>=e;0<e?n++:n--)this.at(n).get("hidden")&&e++;return e-t},addFeatures:function(t){var e=this;if(null!=t.config){var n=t;if(t=t.seqs,null!=n.config.colors){var r=n.config.colors;_.each(t,function(t){return _.each(t,function(t){if(null!=r[t.feature])return t.fillColor=r[t.feature]})})}}return _.isEmpty(this.features)?this.features=t:_.each(t,function(t,n){return e.features.hasOwnProperty(n)?e.features[n]=_.union(e.features[n],t):e.features[n]=t}),this._bindSeqsWithFeatures()},_bindSeqWithFeatures:function(t){var e=this.features[t.attributes.name];e&&(t.attributes.features=new u.default(e),t.attributes.features.assignRows(),t.attributes.height=t.attributes.features.getCurrentHeight()+1)},_bindSeqsWithFeatures:function(){var t=this;return this.each(function(e){return t._bindSeqWithFeatures(e)})},removeAllFeatures:function(){return delete this.features},_autoSetRefSeq:function(){if(this.length>0)return this.at(0).set("ref",!0)},setRef:function(t){var e=this.get(t);return this.each(function(n){if(t.cid)return e.cid===n.cid?n.set("ref",!0):n.set("ref",!1)}),this.g.config.set("hasRef",!0),this.trigger("change:reference",t)}});e.default=l},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(34),o=r(i),s=n(1).Model,u=s.extend({defaults:{name:"",id:"",seq:"",height:1,ref:!1},initialize:function(){if(this.set("grey",[]),null==this.get("features"))return this.set("features",new o.default)}});e.default=u},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.exporter=e.file=e.seqgen=e.proxy=e.bmath=void 0;var i=n(15),o=r(i),s=n(19),u=r(s),a=n(39),l=r(a),c=n(17),f=r(c),h=n(16),d=r(h);e.bmath=o.default,e.proxy=u.default,e.seqgen=l.default,e.file=f.default,e.exporter=d.default},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){for(var n=e.name||e.url||"",r=n.split("."),i=r[r.length-1]||"",o=0;o<s.length;o++){var u=s[o](t,i);if(u)return u}return"unknown"};var n=function(t,e){return("CLUSTAL"===t.substring(0,7)||"clustal"==e||"aln"==e)&&"clustal"},r=function(t,e){return(">"===t.substring(0,1)||"fasta"==e||"fa"==e)&&"fasta"},i=function(t,e){return("("===t.substring(0,1)||"nwk"==e)&&"newick"},o=function(t,e){if(t.length<=10)return!1;var n=t.split("\n");return n[0].indexOf("gff")>=0||e.indexOf("gff")>=0?"gff":n[0].indexOf("#")<0&&2===n[0].split("\t").length&&"gff"},s=[n,r,i,o]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(15),o=r(i),s=n(72).seq,u=n(48),a={_generateSequence:function(t){for(var e="",n=t-1,r=0;0<n?r<=n:r>=n;0<n?r++:r--)e+=a.getRandomChar();return e},getDummySequences:function(t,e){var n=[];"undefined"!=typeof t&&null!==t||(t=o.default.getRandomInt(3,5)),"undefined"!=typeof e&&null!==e||(e=o.default.getRandomInt(50,200));for(var r=1;1<t?r<=t:r>=t;1<t?r++:r--)n.push(new s(a._generateSequence(e),"seq"+r,"r"+r));return n},getRandomChar:function(t){var e=t||"ABCDEFGHIJKLMNOPQRSTUVWXYZ";return e.charAt(Math.floor(Math.random()*e.length))},genConservedSequences:function(t,e,n){var r=[];"undefined"!=typeof t&&null!==t||(t=o.default.getRandomInt(3,5)),"undefined"!=typeof e&&null!==e||(e=o.default.getRandomInt(50,200)),n=n||"ACDEFGHIKLMNPQRSTVWY---";for(var i=1;1<t?i<=t:i>=t;1<t?i++:i--)r[i-1]="";for(var l=.2,c=1,f=e-1,h=0;0<f?h<=f:h>=f;0<f?h++:h--){h%3===0&&(c=o.default.getRandomInt(50,100)/100);for(var d=[],p=t-1,g=0;0<p?g<=p:g>=p;0<p?g++:g--){for(var v=0,m=void 0;v<100;){m=a.getRandomChar(n);var y=u(d);if(y.addSeq(m),v++,Math.abs(c-y.scale(y.conservation())[0])<l)break}r[g]+=m,d.push(m)}}for(var _=[],b=1;1<t?b<=t:b>=t;1<t?b++:b--)_.push(new s(r[b-1],"seq"+b,"r"+b));return _}};e.default=a},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(3),o=n(35),s=(r(o),function(t){return this.msa=t,this}),u={loadTree:function(t){return this.msa.g.package.loadPackages(["msa-tnt","biojs-io-newick"],t)},showTree:function(t){function e(t){if(null!=t.children)t.children.forEach(function(t){return e(t)});else{var n=a.filter(function(e){return e.name===t.name})[0];null!=n&&("number"==typeof n.id?(n.ids=["s"+(n.id+1)],t.name="s"+(n.id+1)):t.name=n.id)}}var r=window.require("biojs-io-newick"),i=window.require("msa-tnt");if("string"==typeof t)var o=r.parse_newick(t);else o=t;var s,u=new i.selections;0===this.msa.el.getElementsByClassName("tnt_groupDiv").length?(s=document.createElement("div"),this.msa.el.appendChild(s)):(s=this.msa.el.getElementsByClassName("tnt_groupDiv")[0].parentNode,s.innerHTML="");var a=this.msa.seqs.toJSON();e(o);var l=i.app({seqs:a,tree:o});return new i.adapters.tree({model:l,el:s,sel:u}),new i.adapters.msa({model:l,sel:u,msa:this.msa}),l.models.forEach(function(t){return delete t.collection,Object.setPrototypeOf(t,n(1).Model.prototype)}),this.msa.seqs.reset(l.models),console.log(this.msa.seqs)},require:function(t){function e(e){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}(function(t){return n(155)(t)})};(0,i.extend)(s.prototype,u),e.default=s},function(t,e,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=n(22),o=n(23),s=n(42),u=function(t,e){var n=t||{};e||(e={}),this.cid=s.uniqueId("c"),this.attributes={},e.collection&&(this.collection=e.collection),e.parse&&(n=this.parse(n,e)||{}),n=s.defaults({},n,s.result(this,"defaults")),this.set(n,e),this.changed={},this.initialize.apply(this,arguments)};s.extend(u.prototype,i,{changed:null,validationError:null,idAttribute:"id",initialize:function(){},toJSON:function(t){return s.clone(this.attributes)},sync:function(){return Backbone.sync.apply(this,arguments)},get:function(t){return this.attributes[t]},escape:function(t){return s.escape(this.get(t))},has:function(t){return null!=this.get(t)},set:function(t,e,n){var i,o,u,a,l,c,f,h;if(null==t)return this;if("object"===("undefined"==typeof t?"undefined":r(t))?(o=t,n=e):(o={})[t]=e,n||(n={}),!this._validate(o,n))return!1;u=n.unset,l=n.silent,a=[],c=this._changing,this._changing=!0,c||(this._previousAttributes=s.clone(this.attributes),this.changed={}),h=this.attributes,f=this._previousAttributes,this.idAttribute in o&&(this.id=o[this.idAttribute]);for(i in o)e=o[i],s.isEqual(h[i],e)||a.push(i),s.isEqual(f[i],e)?delete this.changed[i]:this.changed[i]=e,u?delete h[i]:h[i]=e;if(!l){a.length&&(this._pending=n);for(var d=0,p=a.length;d<p;d++)this.trigger("change:"+a[d],this,h[a[d]],n)}if(c)return this;if(!l)for(;this._pending;)n=this._pending,this._pending=!1,this.trigger("change",this,n);return this._pending=!1,this._changing=!1,this},unset:function(t,e){return this.set(t,void 0,s.extend({},e,{unset:!0}))},clear:function(t){var e={};for(var n in this.attributes)e[n]=void 0;return this.set(e,s.extend({},t,{unset:!0}))},hasChanged:function(t){return null==t?!s.isEmpty(this.changed):s.has(this.changed,t)},changedAttributes:function(t){if(!t)return!!this.hasChanged()&&s.clone(this.changed);var e,n=!1,r=this._changing?this._previousAttributes:this.attributes;for(var i in t)s.isEqual(r[i],e=t[i])||((n||(n={}))[i]=e);return n},previous:function(t){return null!=t&&this._previousAttributes?this._previousAttributes[t]:null},previousAttributes:function(){return s.clone(this._previousAttributes)},fetch:function(t){t=t?s.clone(t):{},void 0===t.parse&&(t.parse=!0);var e=this,n=t.success;return t.success=function(r){return!!e.set(e.parse(r,t),t)&&(n&&n(e,r,t),void e.trigger("sync",e,r,t))},wrapError(this,t),this.sync("read",this,t)},save:function(t,e,n){var i,o,u,a=this.attributes;if(null==t||"object"===("undefined"==typeof t?"undefined":r(t))?(i=t,n=e):(i={})[t]=e,n=s.extend({validate:!0},n),i&&!n.wait){if(!this.set(i,n))return!1}else if(!this._validate(i,n))return!1;i&&n.wait&&(this.attributes=s.extend({},a,i)),void 0===n.parse&&(n.parse=!0);var l=this,c=n.success;return n.success=function(t){l.attributes=a;var e=l.parse(t,n);return n.wait&&(e=s.extend(i||{},e)),!(s.isObject(e)&&!l.set(e,n))&&(c&&c(l,t,n),void l.trigger("sync",l,t,n))},wrapError(this,n),o=this.isNew()?"create":n.patch?"patch":"update","patch"!==o||n.attrs||(n.attrs=i),u=this.sync(o,this,n),i&&n.wait&&(this.attributes=a),u},destroy:function t(e){e=e?s.clone(e):{};var n=this,r=e.success,t=function(){n.stopListening(),n.trigger("destroy",n,n.collection,e)};if(e.success=function(i){(e.wait||n.isNew())&&t(),r&&r(n,i,e),n.isNew()||n.trigger("sync",n,i,e)},this.isNew())return e.success(),!1;wrapError(this,e);var i=this.sync("delete",this,e);return e.wait||t(),i},url:function(){var t=s.result(this,"urlRoot")||s.result(this.collection,"url")||urlError();return this.isNew()?t:t.replace(/([^\/])$/,"$1/")+encodeURIComponent(this.id)},parse:function(t,e){return t},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return!this.has(this.idAttribute)},isValid:function(t){return this._validate({},s.extend(t||{},{validate:!0}))},_validate:function(t,e){if(!e.validate||!this.validate)return!0;t=s.extend({},this.attributes,t);var n=this.validationError=this.validate(t,e)||null;return!n||(this.trigger("invalid",this,n,s.extend(e,{validationError:n})),!1)}});var a=["keys","values","pairs","invert","pick","omit","chain","isEmpty"];s.each(a,function(t){s[t]&&(u.prototype[t]=function(){var e=slice.call(arguments);return e.unshift(this.attributes),s[t].apply(s,e)})}),u.extend=o,t.exports=u},function(t,e,n){var r,i,o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};(function(){function n(t){function e(e,n,r,i,o,s){for(;o>=0&&o<s;o+=t){var u=i?i[o]:o;r=n(r,e[u],u,e)}return r}return function(n,r,i,o){r=k(r,o,4);var s=!A(n)&&S.keys(n),u=(s||n).length,a=t>0?0:u-1;return arguments.length<3&&(i=n[s?s[a]:a],a+=t),e(n,r,i,s,a,u)}}function s(t){return function(e,n,r){n=j(n,r);for(var i=C(e),o=t>0?0:i-1;o>=0&&o<i;o+=t)if(n(e[o],o,e))return o;return-1}}function u(t,e,n){return function(r,i,o){var s=0,u=C(r);if("number"==typeof o)t>0?s=o>=0?o:Math.max(o+u,s):u=o>=0?Math.min(o+1,u):o+u+1;else if(n&&o&&u)return o=n(r,i),r[o]===i?o:-1;if(i!==i)return o=e(g.call(r,s,u),S.isNaN),o>=0?o+s:-1;for(o=t>0?s:u-1;o>=0&&o<u;o+=t)if(r[o]===i)return o;return-1}}function a(t,e){var n=R.length,r=t.constructor,i=S.isFunction(r)&&r.prototype||h,o="constructor";for(S.has(t,o)&&!S.contains(e,o)&&e.push(o);n--;)o=R[n],o in t&&t[o]!==i[o]&&!S.contains(e,o)&&e.push(o)}var l=this,c=l._,f=Array.prototype,h=Object.prototype,d=Function.prototype,p=f.push,g=f.slice,v=h.toString,m=h.hasOwnProperty,y=Array.isArray,_=Object.keys,b=d.bind,x=Object.create,w=function(){},S=function t(e){return e instanceof t?e:this instanceof t?void(this._wrapped=e):new t(e)};"undefined"!=typeof t&&t.exports&&(e=t.exports=S),e._=S,S.VERSION="1.8.3";var k=function(t,e,n){if(void 0===e)return t;switch(null==n?3:n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)};case 4:return function(n,r,i,o){return t.call(e,n,r,i,o)}}return function(){return t.apply(e,arguments)}},j=function(t,e,n){return null==t?S.identity:S.isFunction(t)?k(t,e,n):S.isObject(t)?S.matcher(t):S.property(t)};S.iteratee=function(t,e){return j(t,e,1/0)};var z=function(t,e){return function(n){var r=arguments.length;if(r<2||null==n)return n;for(var i=1;i<r;i++)for(var o=arguments[i],s=t(o),u=s.length,a=0;a<u;a++){var l=s[a];e&&void 0!==n[l]||(n[l]=o[l])}return n}},O=function(t){if(!S.isObject(t))return{};if(x)return x(t);w.prototype=t;var e=new w;return w.prototype=null,e},M=function(t){return function(e){return null==e?void 0:e[t]}},E=Math.pow(2,53)-1,C=M("length"),A=function(t){var e=C(t);return"number"==typeof e&&e>=0&&e<=E};S.each=S.forEach=function(t,e,n){e=k(e,n);var r,i;if(A(t))for(r=0,i=t.length;r<i;r++)e(t[r],r,t);else{var o=S.keys(t);for(r=0,i=o.length;r<i;r++)e(t[o[r]],o[r],t)}return t},S.map=S.collect=function(t,e,n){e=j(e,n);for(var r=!A(t)&&S.keys(t),i=(r||t).length,o=Array(i),s=0;s<i;s++){var u=r?r[s]:s;o[s]=e(t[u],u,t)}return o},S.reduce=S.foldl=S.inject=n(1),S.reduceRight=S.foldr=n(-1),S.find=S.detect=function(t,e,n){var r;if(r=A(t)?S.findIndex(t,e,n):S.findKey(t,e,n),void 0!==r&&r!==-1)return t[r]},S.filter=S.select=function(t,e,n){var r=[];return e=j(e,n),S.each(t,function(t,n,i){e(t,n,i)&&r.push(t)}),r},S.reject=function(t,e,n){return S.filter(t,S.negate(j(e)),n)},S.every=S.all=function(t,e,n){e=j(e,n);for(var r=!A(t)&&S.keys(t),i=(r||t).length,o=0;o<i;o++){var s=r?r[o]:o;if(!e(t[s],s,t))return!1}return!0},S.some=S.any=function(t,e,n){e=j(e,n);for(var r=!A(t)&&S.keys(t),i=(r||t).length,o=0;o<i;o++){var s=r?r[o]:o;if(e(t[s],s,t))return!0}return!1},S.contains=S.includes=S.include=function(t,e,n,r){return A(t)||(t=S.values(t)),("number"!=typeof n||r)&&(n=0),S.indexOf(t,e,n)>=0},S.invoke=function(t,e){var n=g.call(arguments,2),r=S.isFunction(e);return S.map(t,function(t){var i=r?e:t[e];return null==i?i:i.apply(t,n)})},S.pluck=function(t,e){return S.map(t,S.property(e))},S.where=function(t,e){return S.filter(t,S.matcher(e))},S.findWhere=function(t,e){return S.find(t,S.matcher(e))},S.max=function(t,e,n){var r,i,o=-(1/0),s=-(1/0);if(null==e&&null!=t){t=A(t)?t:S.values(t);for(var u=0,a=t.length;u<a;u++)r=t[u],r>o&&(o=r)}else e=j(e,n),S.each(t,function(t,n,r){i=e(t,n,r),(i>s||i===-(1/0)&&o===-(1/0))&&(o=t,s=i)});return o},S.min=function(t,e,n){var r,i,o=1/0,s=1/0;if(null==e&&null!=t){t=A(t)?t:S.values(t);for(var u=0,a=t.length;u<a;u++)r=t[u],r<o&&(o=r)}else e=j(e,n),S.each(t,function(t,n,r){i=e(t,n,r),(i<s||i===1/0&&o===1/0)&&(o=t,s=i)});return o},S.shuffle=function(t){for(var e,n=A(t)?t:S.values(t),r=n.length,i=Array(r),o=0;o<r;o++)e=S.random(0,o),e!==o&&(i[o]=i[e]),i[e]=n[o];return i},S.sample=function(t,e,n){return null==e||n?(A(t)||(t=S.values(t)),t[S.random(t.length-1)]):S.shuffle(t).slice(0,Math.max(0,e))},S.sortBy=function(t,e,n){return e=j(e,n),S.pluck(S.map(t,function(t,n,r){return{value:t,index:n,criteria:e(t,n,r)}}).sort(function(t,e){var n=t.criteria,r=e.criteria;if(n!==r){if(n>r||void 0===n)return 1;if(n<r||void 0===r)return-1}return t.index-e.index}),"value")};var T=function(t){return function(e,n,r){var i={};return n=j(n,r),S.each(e,function(r,o){t(i,r,n(r,o,e))}),i}};S.groupBy=T(function(t,e,n){S.has(t,n)?t[n].push(e):t[n]=[e]}),S.indexBy=T(function(t,e,n){t[n]=e}),S.countBy=T(function(t,e,n){S.has(t,n)?t[n]++:t[n]=1}),S.toArray=function(t){return t?S.isArray(t)?g.call(t):A(t)?S.map(t,S.identity):S.values(t):[]},S.size=function(t){return null==t?0:A(t)?t.length:S.keys(t).length},S.partition=function(t,e,n){e=j(e,n);var r=[],i=[];return S.each(t,function(t,n,o){(e(t,n,o)?r:i).push(t)}),[r,i]},S.first=S.head=S.take=function(t,e,n){if(null!=t)return null==e||n?t[0]:S.initial(t,t.length-e)},S.initial=function(t,e,n){return g.call(t,0,Math.max(0,t.length-(null==e||n?1:e)))},S.last=function(t,e,n){if(null!=t)return null==e||n?t[t.length-1]:S.rest(t,Math.max(0,t.length-e))},S.rest=S.tail=S.drop=function(t,e,n){return g.call(t,null==e||n?1:e)},S.compact=function(t){return S.filter(t,S.identity)};var I=function t(e,n,r,i){for(var o=[],s=0,u=i||0,a=C(e);u<a;u++){var l=e[u];if(A(l)&&(S.isArray(l)||S.isArguments(l))){n||(l=t(l,n,r));var c=0,f=l.length;for(o.length+=f;c<f;)o[s++]=l[c++]}else r||(o[s++]=l)}return o};S.flatten=function(t,e){return I(t,e,!1)},S.without=function(t){return S.difference(t,g.call(arguments,1))},S.uniq=S.unique=function(t,e,n,r){S.isBoolean(e)||(r=n,n=e,e=!1),null!=n&&(n=j(n,r));for(var i=[],o=[],s=0,u=C(t);s<u;s++){var a=t[s],l=n?n(a,s,t):a;e?(s&&o===l||i.push(a),o=l):n?S.contains(o,l)||(o.push(l),i.push(a)):S.contains(i,a)||i.push(a)}return i},S.union=function(){return S.uniq(I(arguments,!0,!0))},S.intersection=function(t){for(var e=[],n=arguments.length,r=0,i=C(t);r<i;r++){var o=t[r];if(!S.contains(e,o)){for(var s=1;s<n&&S.contains(arguments[s],o);s++);s===n&&e.push(o)}}return e},S.difference=function(t){var e=I(arguments,!0,!0,1);return S.filter(t,function(t){return!S.contains(e,t)})},S.zip=function(){return S.unzip(arguments)},S.unzip=function(t){for(var e=t&&S.max(t,C).length||0,n=Array(e),r=0;r<e;r++)n[r]=S.pluck(t,r);return n},S.object=function(t,e){for(var n={},r=0,i=C(t);r<i;r++)e?n[t[r]]=e[r]:n[t[r][0]]=t[r][1];return n},S.findIndex=s(1),S.findLastIndex=s(-1),S.sortedIndex=function(t,e,n,r){n=j(n,r,1);for(var i=n(e),o=0,s=C(t);o<s;){var u=Math.floor((o+s)/2);n(t[u])<i?o=u+1:s=u}return o},S.indexOf=u(1,S.findIndex,S.sortedIndex),S.lastIndexOf=u(-1,S.findLastIndex),S.range=function(t,e,n){null==e&&(e=t||0,t=0),n=n||1;for(var r=Math.max(Math.ceil((e-t)/n),0),i=Array(r),o=0;o<r;o++,t+=n)i[o]=t;return i};var N=function(t,e,n,r,i){if(!(r instanceof e))return t.apply(n,i);var o=O(t.prototype),s=t.apply(o,i);return S.isObject(s)?s:o};S.bind=function(t,e){if(b&&t.bind===b)return b.apply(t,g.call(arguments,1));if(!S.isFunction(t))throw new TypeError("Bind must be called on a function");var n=g.call(arguments,2);return function r(){return N(t,r,e,this,n.concat(g.call(arguments)))}},S.partial=function(t){var e=g.call(arguments,1);return function n(){for(var r=0,i=e.length,o=Array(i),s=0;s<i;s++)o[s]=e[s]===S?arguments[r++]:e[s];for(;r<arguments.length;)o.push(arguments[r++]);return N(t,n,this,this,o)}},S.bindAll=function(t){var e,n,r=arguments.length;if(r<=1)throw new Error("bindAll must be passed function names");for(e=1;e<r;e++)n=arguments[e],t[n]=S.bind(t[n],t);return t},S.memoize=function(t,e){var n=function n(r){var i=n.cache,o=""+(e?e.apply(this,arguments):r);return S.has(i,o)||(i[o]=t.apply(this,arguments)),i[o]};return n.cache={},n},S.delay=function(t,e){var n=g.call(arguments,2);return setTimeout(function(){return t.apply(null,n)},e)},S.defer=S.partial(S.delay,S,1),S.throttle=function(t,e,n){var r,i,o,s=null,u=0;n||(n={});var a=function(){u=n.leading===!1?0:S.now(),s=null,o=t.apply(r,i),s||(r=i=null)};return function(){var l=S.now();u||n.leading!==!1||(u=l);var c=e-(l-u);return r=this,i=arguments,c<=0||c>e?(s&&(clearTimeout(s),s=null),u=l,o=t.apply(r,i),s||(r=i=null)):s||n.trailing===!1||(s=setTimeout(a,c)),o}},S.debounce=function(t,e,n){var r,i,o,s,u,a=function a(){var l=S.now()-s;l<e&&l>=0?r=setTimeout(a,e-l):(r=null,n||(u=t.apply(o,i),r||(o=i=null)))};return function(){o=this,i=arguments,s=S.now();var l=n&&!r;return r||(r=setTimeout(a,e)),l&&(u=t.apply(o,i),o=i=null),u}},S.wrap=function(t,e){return S.partial(e,t)},S.negate=function(t){return function(){return!t.apply(this,arguments)}},S.compose=function(){var t=arguments,e=t.length-1;return function(){for(var n=e,r=t[e].apply(this,arguments);n--;)r=t[n].call(this,r);return r}},S.after=function(t,e){return function(){if(--t<1)return e.apply(this,arguments)}},S.before=function(t,e){var n;return function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=null),n}},S.once=S.partial(S.before,2);var L=!{toString:null}.propertyIsEnumerable("toString"),R=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];S.keys=function(t){if(!S.isObject(t))return[];if(_)return _(t);var e=[];for(var n in t)S.has(t,n)&&e.push(n);return L&&a(t,e),e},S.allKeys=function(t){if(!S.isObject(t))return[];var e=[];for(var n in t)e.push(n);return L&&a(t,e),e},S.values=function(t){for(var e=S.keys(t),n=e.length,r=Array(n),i=0;i<n;i++)r[i]=t[e[i]];return r},S.mapObject=function(t,e,n){e=j(e,n);for(var r,i=S.keys(t),o=i.length,s={},u=0;u<o;u++)r=i[u],s[r]=e(t[r],r,t);return s},S.pairs=function(t){for(var e=S.keys(t),n=e.length,r=Array(n),i=0;i<n;i++)r[i]=[e[i],t[e[i]]];return r},S.invert=function(t){for(var e={},n=S.keys(t),r=0,i=n.length;r<i;r++)e[t[n[r]]]=n[r];return e},S.functions=S.methods=function(t){var e=[];for(var n in t)S.isFunction(t[n])&&e.push(n);return e.sort()},S.extend=z(S.allKeys),S.extendOwn=S.assign=z(S.keys),S.findKey=function(t,e,n){e=j(e,n);for(var r,i=S.keys(t),o=0,s=i.length;o<s;o++)if(r=i[o],e(t[r],r,t))return r},S.pick=function(t,e,n){var r,i,o={},s=t;if(null==s)return o;S.isFunction(e)?(i=S.allKeys(s),r=k(e,n)):(i=I(arguments,!1,!1,1),r=function(t,e,n){return e in n},s=Object(s));for(var u=0,a=i.length;u<a;u++){var l=i[u],c=s[l];r(c,l,s)&&(o[l]=c)}return o},S.omit=function(t,e,n){if(S.isFunction(e))e=S.negate(e);else{var r=S.map(I(arguments,!1,!1,1),String);e=function(t,e){return!S.contains(r,e)}}return S.pick(t,e,n)},S.defaults=z(S.allKeys,!0),S.create=function(t,e){var n=O(t);return e&&S.extendOwn(n,e),n},S.clone=function(t){return S.isObject(t)?S.isArray(t)?t.slice():S.extend({},t):t},S.tap=function(t,e){return e(t),t},S.isMatch=function(t,e){var n=S.keys(e),r=n.length;if(null==t)return!r;for(var i=Object(t),o=0;o<r;o++){var s=n[o];if(e[s]!==i[s]||!(s in i))return!1}return!0};var q=function t(e,n,r,i){if(e===n)return 0!==e||1/e===1/n;if(null==e||null==n)return e===n;e instanceof S&&(e=e._wrapped),n instanceof S&&(n=n._wrapped);var s=v.call(e);if(s!==v.call(n))return!1;switch(s){case"[object RegExp]":case"[object String]":return""+e==""+n;case"[object Number]":return+e!==+e?+n!==+n:0===+e?1/+e===1/n:+e===+n;case"[object Date]":case"[object Boolean]":return+e===+n}var u="[object Array]"===s;if(!u){if("object"!=("undefined"==typeof e?"undefined":o(e))||"object"!=("undefined"==typeof n?"undefined":o(n)))return!1;var a=e.constructor,l=n.constructor;if(a!==l&&!(S.isFunction(a)&&a instanceof a&&S.isFunction(l)&&l instanceof l)&&"constructor"in e&&"constructor"in n)return!1}r=r||[],i=i||[];for(var c=r.length;c--;)if(r[c]===e)return i[c]===n;if(r.push(e),i.push(n),u){if(c=e.length,c!==n.length)return!1;for(;c--;)if(!t(e[c],n[c],r,i))return!1}else{var f,h=S.keys(e);if(c=h.length,S.keys(n).length!==c)return!1;for(;c--;)if(f=h[c],!S.has(n,f)||!t(e[f],n[f],r,i))return!1}return r.pop(),i.pop(),!0};S.isEqual=function(t,e){return q(t,e)},S.isEmpty=function(t){return null==t||(A(t)&&(S.isArray(t)||S.isString(t)||S.isArguments(t))?0===t.length:0===S.keys(t).length)},S.isElement=function(t){return!(!t||1!==t.nodeType)},S.isArray=y||function(t){return"[object Array]"===v.call(t)},S.isObject=function(t){var e="undefined"==typeof t?"undefined":o(t);return"function"===e||"object"===e&&!!t},S.each(["Arguments","Function","String","Number","Date","RegExp","Error"],function(t){S["is"+t]=function(e){return v.call(e)==="[object "+t+"]"}}),S.isArguments(arguments)||(S.isArguments=function(t){return S.has(t,"callee")}),"function"!=typeof/./&&"object"!=("undefined"==typeof Int8Array?"undefined":o(Int8Array))&&(S.isFunction=function(t){return"function"==typeof t||!1}),S.isFinite=function(t){return isFinite(t)&&!isNaN(parseFloat(t))},S.isNaN=function(t){return S.isNumber(t)&&t!==+t},S.isBoolean=function(t){return t===!0||t===!1||"[object Boolean]"===v.call(t)},S.isNull=function(t){return null===t},S.isUndefined=function(t){return void 0===t},S.has=function(t,e){return null!=t&&m.call(t,e)},S.noConflict=function(){return l._=c,this},S.identity=function(t){return t},S.constant=function(t){return function(){return t}},S.noop=function(){},S.property=M,S.propertyOf=function(t){return null==t?function(){}:function(e){return t[e]}},S.matcher=S.matches=function(t){return t=S.extendOwn({},t),function(e){return S.isMatch(e,t)}},S.times=function(t,e,n){var r=Array(Math.max(0,t));e=k(e,n,1);for(var i=0;i<t;i++)r[i]=e(i);return r},S.random=function(t,e){return null==e&&(e=t,t=0),t+Math.floor(Math.random()*(e-t+1))},S.now=Date.now||function(){return(new Date).getTime()};var F={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},P=S.invert(F),B=function(t){var e=function(e){return t[e]},n="(?:"+S.keys(t).join("|")+")",r=RegExp(n),i=RegExp(n,"g");return function(t){return t=null==t?"":""+t,r.test(t)?t.replace(i,e):t}};S.escape=B(F),S.unescape=B(P),S.result=function(t,e,n){var r=null==t?void 0:t[e];return void 0===r&&(r=n),S.isFunction(r)?r.call(t):r};var W=0;S.uniqueId=function(t){var e=++W+"";return t?t+e:e},S.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var D=/(.)^/,H={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},U=/\\|'|\r|\n|\u2028|\u2029/g,V=function(t){return"\\"+H[t]};S.template=function(t,e,n){!e&&n&&(e=n),e=S.defaults({},e,S.templateSettings);var r=RegExp([(e.escape||D).source,(e.interpolate||D).source,(e.evaluate||D).source].join("|")+"|$","g"),i=0,o="__p+='";
  t.replace(r,function(e,n,r,s,u){return o+=t.slice(i,u).replace(U,V),i=u+e.length,n?o+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?o+="'+\n((__t=("+r+"))==null?'':__t)+\n'":s&&(o+="';\n"+s+"\n__p+='"),e}),o+="';\n",e.variable||(o="with(obj||{}){\n"+o+"}\n"),o="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+o+"return __p;\n";try{var s=new Function(e.variable||"obj","_",o)}catch(t){throw t.source=o,t}var u=function(t){return s.call(this,t,S)},a=e.variable||"obj";return u.source="function("+a+"){\n"+o+"}",u},S.chain=function(t){var e=S(t);return e._chain=!0,e};var $=function(t,e){return t._chain?S(e).chain():e};S.mixin=function(t){S.each(S.functions(t),function(e){var n=S[e]=t[e];S.prototype[e]=function(){var t=[this._wrapped];return p.apply(t,arguments),$(this,n.apply(S,t))}})},S.mixin(S),S.each(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var e=f[t];S.prototype[t]=function(){var n=this._wrapped;return e.apply(n,arguments),"shift"!==t&&"splice"!==t||0!==n.length||delete n[0],$(this,n)}}),S.each(["concat","join","slice"],function(t){var e=f[t];S.prototype[t]=function(){return $(this,e.apply(this._wrapped,arguments))}}),S.prototype.value=function(){return this._wrapped},S.prototype.valueOf=S.prototype.toJSON=S.prototype.value,S.prototype.toString=function(){return""+this._wrapped},r=[],i=function(){return S}.apply(e,r),!(void 0!==i&&(t.exports=i))}).call(void 0)},function(t,e){"use strict";function n(t){var e={};return t.split(";").forEach(function(t){var n,r,i;t.indexOf("=")>0?(n=t.split("="),r=n[0],i=n[1],e[r]=i):t.indexOf(" ")>0&&(n=t.split(" "),r=n[0],i=n[1].replace(/"/g,""),e[r]=i)}),e}function r(t){var e=t.toString(16);return 1===e.length?"0"+e:e}function i(t,e,n){return 3===t.length?i(t[0],t[1],t[2]):"#"+r(t)+r(e)+r(n)}Object.defineProperty(e,"__esModule",{value:!0}),e.extractKeys=n,e.rgbToHex=i,e.default={extractKeys:n,rgbToHex:i}},function(t,e){"use strict";t.exports=function(t,e,n){t.beginPath(),t.moveTo(0,e),t.lineTo(n,e),t.lineWidth=1,t.strokeStyle="#999999",t.stroke()}},function(t,e){"use strict";t.exports=function(t,e,n,r,i,o,s){t.font=o+"px Arial",t.textAlign=s?"right":"center",t.fillStyle="#666666",t.fillText(i,e+r/2,n)}},function(t,e){"use strict";t.exports=function(t,e,n,r,i){i=i||"#999999",t.beginPath(),t.moveTo(e,n),t.lineTo(e,n+r),t.lineWidth=1,t.strokeStyle=i,t.stroke()}},function(t,e){"use strict";var n;t.exports=n={rel:function(t){var e,n,r,i;return e=t.offsetX,n=t.offsetY,void 0==e&&(r=i.getBoundingClientRect(),i=t.target||t.srcElement,void 0==e&&(e=t.clientX-r.left,n=t.clientY-r.top),void 0==e&&(e=t.pageX-i.offsetLeft,n=t.pageY-i.offsetTop),void 0==e)?void console.log(t,"no mouse event defined. your browser sucks"):[e,n]},abs:function(t){var e,n;return e=t.pageX,n=t.pageY,void 0==e&&(e=t.layerX,n=t.layerY),void 0==e&&(e=t.clientX,n=t.clientY),void 0==e&&(e=t.x,n=t.y),[e,n]},wheelDelta:function(t){var e;return e=[t.deltaX,t.deltaY],void 0==e[0]&&t.mozMovementX&&(e=[0,t.mozMovementX]),isNaN(e[0])&&(e[0]=0),isNaN(e[1])&&(e[1]=0),e}}},function(t,e,n){"use strict";var r=n(108),i=function t(e,n){if(!this||this.constructor!==t)return new t(e);if(void 0===e||"string"==typeof e)throw new TypeError("you need to give the seq stat an array");this.resetSeqs(e),this.alphabetSize=4,this._useBackground=!1,this.useGaps=!1,this.ignoredChars=["-","*"],r.extend(this,n)};i.prototype.addSeq=function(t){this.seqs.push(t),this._reset()},i.prototype.removeSeq=function(t){"number"==typeof t?this.seqs.splice(t,1):r.each(this.seqs,function(e,n){t===e&&this.seqs.splice(n,1)}.bind(this)),this._reset()},i.prototype.addSeqs=function(t){t.forEach(function(t){this.addSeq(t)}.bind(this))},i.prototype.resetSeqs=function(t){if(this.seqs=[],!t instanceof Array||"at"in t){this.mseqs=t;var e=function(){var t=this.mseqs.pluck("seq");this.resetSeqs(t)};t.on("add change reset ",e,this),e.call(this)}else this.addSeqs(t),this._reset(),this.trigger("reset")};var o=["consensus","frequency","maxLength","ic","gaps"];i.prototype._reset=function(){for(var t=0;t<o.length;t++)this["_"+o[t]]=void 0;this._identity=void 0,this._background=void 0},i.prototype.setBackground=function(t){this._useBackground=t,this._reset()},i.prototype.useBackground=function(){this.setBackground(!0)},i.prototype.setDNA=function(){this.alphabetSize=4},i.prototype.setProtein=function(){this.alphabetSize=20},o.forEach(function(t){i.prototype[t]=function(){return void 0===this["_"+t]&&(this["_"+t]=this[t+"Calc"]()),this["_"+t]}}),i.prototype.identity=function(t){var e;return(void 0===this._identity||t)&&(e=this.identityCalc(t),this._identity=void 0),this._identity||e},i.prototype.background=function(){return void 0!==this.bg?this.bg:(void 0===this._background&&this.backgroundCalc(),this._background)},i.prototype.frequencyCalc=function(t){var e,n;e=new Array(this.maxLength()),n=new Array(this.seqs.length);var i=this.ignoredChars;return void 0!==t&&t.all&&(i=[]),r.each(this.seqs,function(t){r.each(t,function(t,r){i.indexOf(t)>=0||(void 0===e[r]&&(e[r]={}),void 0===e[r][t]&&(e[r][t]=0),e[r][t]++,void 0===n[r]&&(n[r]=0),n[r]++)})}),r.each(e,function(t,i){return r.each(t,function(t,r){return e[i][r]=t/n[i]})}),this._frequency=e,e},i.prototype.backgroundCalc=function(){var t={},e=0;return r.each(this.seqs,function(n){r.each(n,function(n){return void 0===t[n]&&(t[n]=0),t[n]++,e++})}),t=r.mapValues(t,function(t){return t/e}),this._background=t,t},i.prototype.icCalc=function(){var t=this.frequency();if(this._useBackground)var e=this.background();var n=this.ignoredChars,i=this._useBackground,o=r.map(t,function(t){return r.reduce(t,function(t,r,o){return n.indexOf(o)>=0?t:(i&&(r/=e[o]),t-r*(Math.log(r)/Math.log(2)))},0)});return this._ic=o,o},i.prototype.conservation=function(t){var e=this.ic(),n=this.gaps(),i=this;t=t||this.alphabetSize;var o=Math.log(t)/Math.log(2),s=0;return r.map(e,function(t){var e=o-t;return i.useGaps&&(e*=1-n[s++]),e})},i.prototype.conservResidue=function(t){var e,n=t?t.alphabetSize:void 0,i=this.ignoredChars;e=void 0!==t&&t.scaled?this.scale(this.conservation(n)):this.conservation(n);var o,s=this.frequency();return r.map(s,function(t,n){o=r.reject(r.keys(t),function(t){return i.indexOf(t)>=0});var s={};return r.each(o,function(r){s[r]=t[r]*e[n]}),s})},i.prototype.conservResidue2=function(t){var e=this.frequency(),n=this.conservation(t),i=this.background();return r.map(e,function(t,o){return r.map(t,function(t){var s=r.reduce(e[o],function(t,e){return t+e/i[o]},0);return t/i[o]/s*n[o]},0)})},i.prototype.scale=function(t,e){e=e||this.alphabetSize;var n=Math.log(e)/Math.log(2);return r.map(t,function(t){return t/n})},i.prototype.maxLengthCalc=function(){return 0===this.seqs.length?0:r.max(this.seqs,function(t){return t.length}).length},i.prototype.consensusCalc=function(){var t=new Array(this.maxLength());return r.each(this.seqs,function(e){r.each(e,function(e,n){void 0===t[n]&&(t[n]={}),void 0===t[n][e]&&(t[n][e]=0),t[n][e]++})}),this._consensus=r.reduce(t,function(t,e){var n;return n=r.keys(e),t+=r.max(n,function(t){return e[t]})},""),this._consensus},i.prototype.identityCalc=function(t){var e=t||this.consensus();return this._identity=this.seqs.map(function(t){for(var n=0,r=0,i=0;i<t.length;i++)"-"!==t[i]&&"-"!==e[i]&&(r++,t[i]===e[i]&&n++);return n/r}),this._identity},i.prototype.gapsCalc=function(){var t=this.maxLength();if(t<=1||"undefined"==typeof t)return[];var e=new Array(this.maxLength());return r.each(this.seqs,function(t){r.each(t,function(t,n){void 0===e[n]&&(e[n]={g:0,t:0}),t="-"===t?"g":"t",e[n][t]++})}),this._gaps=r.map(e,function(t){return t.g/(t.g+t.t)}),this._gaps},r.mixin({mapValues:function(t,e){return r.object(r.keys(t),r.map(t,e))}}),n(13).mixin(i.prototype),t.exports=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(9);Object.defineProperty(e,"SelectionManager",{enumerable:!0,get:function(){return r.SelectionManager}})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1).Model,i=r.extend({defaults:{xStart:-1,xEnd:-1,height:-1,text:"",fillColor:"red",fillOpacity:.5,type:"rectangle",borderSize:1,borderColor:"black",borderOpacity:.5,validate:!0,row:0},initialize:function(t){if(null!=t.start&&this.set("xStart",t.start-1),null!=t.end&&this.set("xEnd",t.end-1),null!=t.attributes&&(null!=t.attributes.Name&&this.set("text",t.attributes.Name),null!=t.attributes.Color&&this.set("fillColor",t.attributes.Color)),this.attributes.xEnd<this.attributes.xStart&&console.warn("invalid feature range for",this.attributes),!_.isNumber(this.attributes.xStart)||!_.isNumber(this.attributes.xEnd))return console.warn("please provide numeric feature ranges",t),this.set("xStart",parseInt(this.attributes.xStart)),this.set("xEnd",parseInt(this.attributes.xEnd))},validate:function(){if(isNaN(this.attributes.xStart||isNaN(this.attributes.xEnd)))return"features need integer start and end."},contains:function(t){return this.attributes.xStart<=t&&t<=this.attributes.xEnd}});e.default=i},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(36);Object.defineProperty(e,"seq",{enumerable:!0,get:function(){return r(i).default}});var o=n(35);Object.defineProperty(e,"seqcol",{enumerable:!0,get:function(){return r(o).default}});var s=n(50);Object.defineProperty(e,"feature",{enumerable:!0,get:function(){return r(s).default}});var u=n(34);Object.defineProperty(e,"featurecol",{enumerable:!0,get:function(){return r(u).default}})},function(t,e){"use strict";function n(t){var e=r.call(t);return"[object Function]"===e||"function"==typeof t&&"[object RegExp]"!==e||"undefined"!=typeof window&&(t===window.setTimeout||t===window.alert||t===window.confirm||t===window.prompt)}t.exports=n;var r=Object.prototype.toString},function(t,e){(function(e){t.exports=e}).call(e,{})},function(t,e,n){var r,i,o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};(function(){function n(t){function e(e,n,r,i,o,s){for(;o>=0&&o<s;o+=t){var u=i?i[o]:o;r=n(r,e[u],u,e)}return r}return function(n,r,i,o){r=k(r,o,4);var s=!A(n)&&S.keys(n),u=(s||n).length,a=t>0?0:u-1;return arguments.length<3&&(i=n[s?s[a]:a],a+=t),e(n,r,i,s,a,u)}}function s(t){return function(e,n,r){n=j(n,r);for(var i=C(e),o=t>0?0:i-1;o>=0&&o<i;o+=t)if(n(e[o],o,e))return o;return-1}}function u(t,e,n){return function(r,i,o){var s=0,u=C(r);if("number"==typeof o)t>0?s=o>=0?o:Math.max(o+u,s):u=o>=0?Math.min(o+1,u):o+u+1;else if(n&&o&&u)return o=n(r,i),r[o]===i?o:-1;if(i!==i)return o=e(g.call(r,s,u),S.isNaN),o>=0?o+s:-1;for(o=t>0?s:u-1;o>=0&&o<u;o+=t)if(r[o]===i)return o;return-1}}function a(t,e){var n=R.length,r=t.constructor,i=S.isFunction(r)&&r.prototype||h,o="constructor";for(S.has(t,o)&&!S.contains(e,o)&&e.push(o);n--;)o=R[n],o in t&&t[o]!==i[o]&&!S.contains(e,o)&&e.push(o)}var l=this,c=l._,f=Array.prototype,h=Object.prototype,d=Function.prototype,p=f.push,g=f.slice,v=h.toString,m=h.hasOwnProperty,y=Array.isArray,_=Object.keys,b=d.bind,x=Object.create,w=function(){},S=function t(e){return e instanceof t?e:this instanceof t?void(this._wrapped=e):new t(e)};"undefined"!=typeof t&&t.exports&&(e=t.exports=S),e._=S,S.VERSION="1.8.3";var k=function(t,e,n){if(void 0===e)return t;switch(null==n?3:n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)};case 4:return function(n,r,i,o){return t.call(e,n,r,i,o)}}return function(){return t.apply(e,arguments)}},j=function(t,e,n){return null==t?S.identity:S.isFunction(t)?k(t,e,n):S.isObject(t)?S.matcher(t):S.property(t)};S.iteratee=function(t,e){return j(t,e,1/0)};var z=function(t,e){return function(n){var r=arguments.length;if(r<2||null==n)return n;for(var i=1;i<r;i++)for(var o=arguments[i],s=t(o),u=s.length,a=0;a<u;a++){var l=s[a];e&&void 0!==n[l]||(n[l]=o[l])}return n}},O=function(t){if(!S.isObject(t))return{};if(x)return x(t);w.prototype=t;var e=new w;return w.prototype=null,e},M=function(t){return function(e){return null==e?void 0:e[t]}},E=Math.pow(2,53)-1,C=M("length"),A=function(t){var e=C(t);return"number"==typeof e&&e>=0&&e<=E};S.each=S.forEach=function(t,e,n){e=k(e,n);var r,i;if(A(t))for(r=0,i=t.length;r<i;r++)e(t[r],r,t);else{var o=S.keys(t);for(r=0,i=o.length;r<i;r++)e(t[o[r]],o[r],t)}return t},S.map=S.collect=function(t,e,n){e=j(e,n);for(var r=!A(t)&&S.keys(t),i=(r||t).length,o=Array(i),s=0;s<i;s++){var u=r?r[s]:s;o[s]=e(t[u],u,t)}return o},S.reduce=S.foldl=S.inject=n(1),S.reduceRight=S.foldr=n(-1),S.find=S.detect=function(t,e,n){var r;if(r=A(t)?S.findIndex(t,e,n):S.findKey(t,e,n),void 0!==r&&r!==-1)return t[r]},S.filter=S.select=function(t,e,n){var r=[];return e=j(e,n),S.each(t,function(t,n,i){e(t,n,i)&&r.push(t)}),r},S.reject=function(t,e,n){return S.filter(t,S.negate(j(e)),n)},S.every=S.all=function(t,e,n){e=j(e,n);for(var r=!A(t)&&S.keys(t),i=(r||t).length,o=0;o<i;o++){var s=r?r[o]:o;if(!e(t[s],s,t))return!1}return!0},S.some=S.any=function(t,e,n){e=j(e,n);for(var r=!A(t)&&S.keys(t),i=(r||t).length,o=0;o<i;o++){var s=r?r[o]:o;if(e(t[s],s,t))return!0}return!1},S.contains=S.includes=S.include=function(t,e,n,r){return A(t)||(t=S.values(t)),("number"!=typeof n||r)&&(n=0),S.indexOf(t,e,n)>=0},S.invoke=function(t,e){var n=g.call(arguments,2),r=S.isFunction(e);return S.map(t,function(t){var i=r?e:t[e];return null==i?i:i.apply(t,n)})},S.pluck=function(t,e){return S.map(t,S.property(e))},S.where=function(t,e){return S.filter(t,S.matcher(e))},S.findWhere=function(t,e){return S.find(t,S.matcher(e))},S.max=function(t,e,n){var r,i,o=-(1/0),s=-(1/0);if(null==e&&null!=t){t=A(t)?t:S.values(t);for(var u=0,a=t.length;u<a;u++)r=t[u],r>o&&(o=r)}else e=j(e,n),S.each(t,function(t,n,r){i=e(t,n,r),(i>s||i===-(1/0)&&o===-(1/0))&&(o=t,s=i)});return o},S.min=function(t,e,n){var r,i,o=1/0,s=1/0;if(null==e&&null!=t){t=A(t)?t:S.values(t);for(var u=0,a=t.length;u<a;u++)r=t[u],r<o&&(o=r)}else e=j(e,n),S.each(t,function(t,n,r){i=e(t,n,r),(i<s||i===1/0&&o===1/0)&&(o=t,s=i)});return o},S.shuffle=function(t){for(var e,n=A(t)?t:S.values(t),r=n.length,i=Array(r),o=0;o<r;o++)e=S.random(0,o),e!==o&&(i[o]=i[e]),i[e]=n[o];return i},S.sample=function(t,e,n){return null==e||n?(A(t)||(t=S.values(t)),t[S.random(t.length-1)]):S.shuffle(t).slice(0,Math.max(0,e))},S.sortBy=function(t,e,n){return e=j(e,n),S.pluck(S.map(t,function(t,n,r){return{value:t,index:n,criteria:e(t,n,r)}}).sort(function(t,e){var n=t.criteria,r=e.criteria;if(n!==r){if(n>r||void 0===n)return 1;if(n<r||void 0===r)return-1}return t.index-e.index}),"value")};var T=function(t){return function(e,n,r){var i={};return n=j(n,r),S.each(e,function(r,o){t(i,r,n(r,o,e))}),i}};S.groupBy=T(function(t,e,n){S.has(t,n)?t[n].push(e):t[n]=[e]}),S.indexBy=T(function(t,e,n){t[n]=e}),S.countBy=T(function(t,e,n){S.has(t,n)?t[n]++:t[n]=1}),S.toArray=function(t){return t?S.isArray(t)?g.call(t):A(t)?S.map(t,S.identity):S.values(t):[]},S.size=function(t){return null==t?0:A(t)?t.length:S.keys(t).length},S.partition=function(t,e,n){e=j(e,n);var r=[],i=[];return S.each(t,function(t,n,o){(e(t,n,o)?r:i).push(t)}),[r,i]},S.first=S.head=S.take=function(t,e,n){if(null!=t)return null==e||n?t[0]:S.initial(t,t.length-e)},S.initial=function(t,e,n){return g.call(t,0,Math.max(0,t.length-(null==e||n?1:e)))},S.last=function(t,e,n){if(null!=t)return null==e||n?t[t.length-1]:S.rest(t,Math.max(0,t.length-e))},S.rest=S.tail=S.drop=function(t,e,n){return g.call(t,null==e||n?1:e)},S.compact=function(t){return S.filter(t,S.identity)};var I=function t(e,n,r,i){for(var o=[],s=0,u=i||0,a=C(e);u<a;u++){var l=e[u];if(A(l)&&(S.isArray(l)||S.isArguments(l))){n||(l=t(l,n,r));var c=0,f=l.length;for(o.length+=f;c<f;)o[s++]=l[c++]}else r||(o[s++]=l)}return o};S.flatten=function(t,e){return I(t,e,!1)},S.without=function(t){return S.difference(t,g.call(arguments,1))},S.uniq=S.unique=function(t,e,n,r){S.isBoolean(e)||(r=n,n=e,e=!1),null!=n&&(n=j(n,r));for(var i=[],o=[],s=0,u=C(t);s<u;s++){var a=t[s],l=n?n(a,s,t):a;e?(s&&o===l||i.push(a),o=l):n?S.contains(o,l)||(o.push(l),i.push(a)):S.contains(i,a)||i.push(a)}return i},S.union=function(){return S.uniq(I(arguments,!0,!0))},S.intersection=function(t){for(var e=[],n=arguments.length,r=0,i=C(t);r<i;r++){var o=t[r];if(!S.contains(e,o)){for(var s=1;s<n&&S.contains(arguments[s],o);s++);s===n&&e.push(o)}}return e},S.difference=function(t){var e=I(arguments,!0,!0,1);return S.filter(t,function(t){return!S.contains(e,t)})},S.zip=function(){return S.unzip(arguments)},S.unzip=function(t){for(var e=t&&S.max(t,C).length||0,n=Array(e),r=0;r<e;r++)n[r]=S.pluck(t,r);return n},S.object=function(t,e){for(var n={},r=0,i=C(t);r<i;r++)e?n[t[r]]=e[r]:n[t[r][0]]=t[r][1];return n},S.findIndex=s(1),S.findLastIndex=s(-1),S.sortedIndex=function(t,e,n,r){n=j(n,r,1);for(var i=n(e),o=0,s=C(t);o<s;){var u=Math.floor((o+s)/2);n(t[u])<i?o=u+1:s=u}return o},S.indexOf=u(1,S.findIndex,S.sortedIndex),S.lastIndexOf=u(-1,S.findLastIndex),S.range=function(t,e,n){null==e&&(e=t||0,t=0),n=n||1;for(var r=Math.max(Math.ceil((e-t)/n),0),i=Array(r),o=0;o<r;o++,t+=n)i[o]=t;return i};var N=function(t,e,n,r,i){if(!(r instanceof e))return t.apply(n,i);var o=O(t.prototype),s=t.apply(o,i);return S.isObject(s)?s:o};S.bind=function(t,e){if(b&&t.bind===b)return b.apply(t,g.call(arguments,1));if(!S.isFunction(t))throw new TypeError("Bind must be called on a function");var n=g.call(arguments,2);return function r(){return N(t,r,e,this,n.concat(g.call(arguments)))}},S.partial=function(t){var e=g.call(arguments,1);return function n(){for(var r=0,i=e.length,o=Array(i),s=0;s<i;s++)o[s]=e[s]===S?arguments[r++]:e[s];for(;r<arguments.length;)o.push(arguments[r++]);return N(t,n,this,this,o)}},S.bindAll=function(t){var e,n,r=arguments.length;if(r<=1)throw new Error("bindAll must be passed function names");for(e=1;e<r;e++)n=arguments[e],t[n]=S.bind(t[n],t);return t},S.memoize=function(t,e){var n=function n(r){var i=n.cache,o=""+(e?e.apply(this,arguments):r);return S.has(i,o)||(i[o]=t.apply(this,arguments)),i[o]};return n.cache={},n},S.delay=function(t,e){var n=g.call(arguments,2);return setTimeout(function(){return t.apply(null,n)},e)},S.defer=S.partial(S.delay,S,1),S.throttle=function(t,e,n){var r,i,o,s=null,u=0;n||(n={});var a=function(){u=n.leading===!1?0:S.now(),s=null,o=t.apply(r,i),s||(r=i=null)};return function(){var l=S.now();u||n.leading!==!1||(u=l);var c=e-(l-u);return r=this,i=arguments,c<=0||c>e?(s&&(clearTimeout(s),s=null),u=l,o=t.apply(r,i),s||(r=i=null)):s||n.trailing===!1||(s=setTimeout(a,c)),o}},S.debounce=function(t,e,n){var r,i,o,s,u,a=function a(){var l=S.now()-s;l<e&&l>=0?r=setTimeout(a,e-l):(r=null,n||(u=t.apply(o,i),r||(o=i=null)))};return function(){o=this,i=arguments,s=S.now();var l=n&&!r;return r||(r=setTimeout(a,e)),l&&(u=t.apply(o,i),o=i=null),u}},S.wrap=function(t,e){return S.partial(e,t)},S.negate=function(t){return function(){return!t.apply(this,arguments)}},S.compose=function(){var t=arguments,e=t.length-1;return function(){for(var n=e,r=t[e].apply(this,arguments);n--;)r=t[n].call(this,r);return r}},S.after=function(t,e){return function(){if(--t<1)return e.apply(this,arguments)}},S.before=function(t,e){var n;return function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=null),n}},S.once=S.partial(S.before,2);var L=!{toString:null}.propertyIsEnumerable("toString"),R=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];S.keys=function(t){if(!S.isObject(t))return[];if(_)return _(t);var e=[];for(var n in t)S.has(t,n)&&e.push(n);return L&&a(t,e),e},S.allKeys=function(t){if(!S.isObject(t))return[];var e=[];for(var n in t)e.push(n);return L&&a(t,e),e},S.values=function(t){for(var e=S.keys(t),n=e.length,r=Array(n),i=0;i<n;i++)r[i]=t[e[i]];return r},S.mapObject=function(t,e,n){e=j(e,n);for(var r,i=S.keys(t),o=i.length,s={},u=0;u<o;u++)r=i[u],s[r]=e(t[r],r,t);return s},S.pairs=function(t){for(var e=S.keys(t),n=e.length,r=Array(n),i=0;i<n;i++)r[i]=[e[i],t[e[i]]];return r},S.invert=function(t){for(var e={},n=S.keys(t),r=0,i=n.length;r<i;r++)e[t[n[r]]]=n[r];return e},S.functions=S.methods=function(t){var e=[];for(var n in t)S.isFunction(t[n])&&e.push(n);return e.sort()},S.extend=z(S.allKeys),S.extendOwn=S.assign=z(S.keys),S.findKey=function(t,e,n){e=j(e,n);for(var r,i=S.keys(t),o=0,s=i.length;o<s;o++)if(r=i[o],e(t[r],r,t))return r},S.pick=function(t,e,n){var r,i,o={},s=t;if(null==s)return o;S.isFunction(e)?(i=S.allKeys(s),r=k(e,n)):(i=I(arguments,!1,!1,1),r=function(t,e,n){return e in n},s=Object(s));for(var u=0,a=i.length;u<a;u++){var l=i[u],c=s[l];r(c,l,s)&&(o[l]=c)}return o},S.omit=function(t,e,n){if(S.isFunction(e))e=S.negate(e);else{var r=S.map(I(arguments,!1,!1,1),String);e=function(t,e){return!S.contains(r,e)}}return S.pick(t,e,n)},S.defaults=z(S.allKeys,!0),S.create=function(t,e){var n=O(t);return e&&S.extendOwn(n,e),n},S.clone=function(t){return S.isObject(t)?S.isArray(t)?t.slice():S.extend({},t):t},S.tap=function(t,e){return e(t),t},S.isMatch=function(t,e){var n=S.keys(e),r=n.length;if(null==t)return!r;for(var i=Object(t),o=0;o<r;o++){var s=n[o];if(e[s]!==i[s]||!(s in i))return!1}return!0};var q=function t(e,n,r,i){if(e===n)return 0!==e||1/e===1/n;if(null==e||null==n)return e===n;e instanceof S&&(e=e._wrapped),n instanceof S&&(n=n._wrapped);var s=v.call(e);if(s!==v.call(n))return!1;switch(s){case"[object RegExp]":case"[object String]":return""+e==""+n;case"[object Number]":return+e!==+e?+n!==+n:0===+e?1/+e===1/n:+e===+n;case"[object Date]":case"[object Boolean]":return+e===+n}var u="[object Array]"===s;if(!u){if("object"!=("undefined"==typeof e?"undefined":o(e))||"object"!=("undefined"==typeof n?"undefined":o(n)))return!1;var a=e.constructor,l=n.constructor;if(a!==l&&!(S.isFunction(a)&&a instanceof a&&S.isFunction(l)&&l instanceof l)&&"constructor"in e&&"constructor"in n)return!1}r=r||[],i=i||[];for(var c=r.length;c--;)if(r[c]===e)return i[c]===n;if(r.push(e),i.push(n),u){if(c=e.length,c!==n.length)return!1;for(;c--;)if(!t(e[c],n[c],r,i))return!1}else{var f,h=S.keys(e);if(c=h.length,S.keys(n).length!==c)return!1;for(;c--;)if(f=h[c],!S.has(n,f)||!t(e[f],n[f],r,i))return!1}return r.pop(),i.pop(),!0};S.isEqual=function(t,e){return q(t,e)},S.isEmpty=function(t){return null==t||(A(t)&&(S.isArray(t)||S.isString(t)||S.isArguments(t))?0===t.length:0===S.keys(t).length)},S.isElement=function(t){return!(!t||1!==t.nodeType)},S.isArray=y||function(t){return"[object Array]"===v.call(t)},S.isObject=function(t){var e="undefined"==typeof t?"undefined":o(t);return"function"===e||"object"===e&&!!t},S.each(["Arguments","Function","String","Number","Date","RegExp","Error"],function(t){S["is"+t]=function(e){return v.call(e)==="[object "+t+"]"}}),S.isArguments(arguments)||(S.isArguments=function(t){return S.has(t,"callee")}),"function"!=typeof/./&&"object"!=("undefined"==typeof Int8Array?"undefined":o(Int8Array))&&(S.isFunction=function(t){return"function"==typeof t||!1}),S.isFinite=function(t){return isFinite(t)&&!isNaN(parseFloat(t))},S.isNaN=function(t){return S.isNumber(t)&&t!==+t},S.isBoolean=function(t){return t===!0||t===!1||"[object Boolean]"===v.call(t)},S.isNull=function(t){return null===t},S.isUndefined=function(t){return void 0===t},S.has=function(t,e){return null!=t&&m.call(t,e)},S.noConflict=function(){return l._=c,this},S.identity=function(t){return t},S.constant=function(t){return function(){return t}},S.noop=function(){},S.property=M,S.propertyOf=function(t){return null==t?function(){}:function(e){return t[e]}},S.matcher=S.matches=function(t){return t=S.extendOwn({},t),function(e){return S.isMatch(e,t)}},S.times=function(t,e,n){var r=Array(Math.max(0,t));e=k(e,n,1);for(var i=0;i<t;i++)r[i]=e(i);return r},S.random=function(t,e){return null==e&&(e=t,t=0),t+Math.floor(Math.random()*(e-t+1))},S.now=Date.now||function(){return(new Date).getTime()};var F={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},P=S.invert(F),B=function(t){var e=function(e){return t[e]},n="(?:"+S.keys(t).join("|")+")",r=RegExp(n),i=RegExp(n,"g");return function(t){return t=null==t?"":""+t,r.test(t)?t.replace(i,e):t}};S.escape=B(F),S.unescape=B(P),S.result=function(t,e,n){var r=null==t?void 0:t[e];return void 0===r&&(r=n),S.isFunction(r)?r.call(t):r};var W=0;S.uniqueId=function(t){var e=++W+"";return t?t+e:e},S.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var D=/(.)^/,H={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},U=/\\|'|\r|\n|\u2028|\u2029/g,V=function(t){return"\\"+H[t]};S.template=function(t,e,n){!e&&n&&(e=n),e=S.defaults({},e,S.templateSettings);var r=RegExp([(e.escape||D).source,(e.interpolate||D).source,(e.evaluate||D).source].join("|")+"|$","g"),i=0,o="__p+='";t.replace(r,function(e,n,r,s,u){return o+=t.slice(i,u).replace(U,V),i=u+e.length,n?o+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?o+="'+\n((__t=("+r+"))==null?'':__t)+\n'":s&&(o+="';\n"+s+"\n__p+='"),e}),o+="';\n",e.variable||(o="with(obj||{}){\n"+o+"}\n"),o="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+o+"return __p;\n";try{var s=new Function(e.variable||"obj","_",o)}catch(t){throw t.source=o,t}var u=function(t){return s.call(this,t,S)},a=e.variable||"obj";return u.source="function("+a+"){\n"+o+"}",u},S.chain=function(t){var e=S(t);return e._chain=!0,e};var $=function(t,e){return t._chain?S(e).chain():e};S.mixin=function(t){S.each(S.functions(t),function(e){var n=S[e]=t[e];S.prototype[e]=function(){var t=[this._wrapped];return p.apply(t,arguments),$(this,n.apply(S,t))}})},S.mixin(S),S.each(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var e=f[t];S.prototype[t]=function(){var n=this._wrapped;return e.apply(n,arguments),"shift"!==t&&"splice"!==t||0!==n.length||delete n[0],$(this,n)}}),S.each(["concat","join","slice"],function(t){var e=f[t];S.prototype[t]=function(){return $(this,e.apply(this._wrapped,arguments))}}),S.prototype.value=function(){return this._wrapped},S.prototype.valueOf=S.prototype.toJSON=S.prototype.value,S.prototype.toString=function(){return""+this._wrapped},r=[],i=function(){return S}.apply(e,r),!(void 0!==i&&(t.exports=i))}).call(void 0)},function(t,e,n){"use strict";var r=n(22),i=n(23),o=n(42),s=n(41),u=[],a=u.slice,l=function(t,e){e||(e={}),e.model&&(this.model=e.model),void 0!==e.comparator&&(this.comparator=e.comparator),this._reset(),this.initialize.apply(this,arguments),t&&this.reset(t,o.extend({silent:!0},e))},c={add:!0,remove:!0,merge:!0},f={add:!0,remove:!1};o.extend(l.prototype,r,{model:s,initialize:function(){},toJSON:function(t){return this.map(function(e){return e.toJSON(t)})},sync:function(){return Backbone.sync.apply(this,arguments)},add:function(t,e){return this.set(t,o.extend({merge:!1},e,f))},remove:function(t,e){var n=!o.isArray(t);t=n?[t]:o.clone(t),e||(e={});for(var r=0,i=t.length;r<i;r++){var s=t[r]=this.get(t[r]);if(s){var u=this.modelId(s.attributes);null!=u&&delete this._byId[u],delete this._byId[s.cid];var a=this.indexOf(s);this.models.splice(a,1),this.length--,e.silent||(e.index=a,s.trigger("remove",s,this,e)),this._removeReference(s,e)}}return n?t[0]:t},set:function(t,e){e=o.defaults({},e,c),e.parse&&(t=this.parse(t,e));var n=!o.isArray(t);t=n?t?[t]:[]:t.slice();for(var r,i,s,u,a,l=e.at,f=this.comparator&&null==l&&e.sort!==!1,h=o.isString(this.comparator)?this.comparator:null,d=[],p=[],g={},v=e.add,m=e.merge,y=e.remove,_=!(f||!v||!y)&&[],b=0,x=t.length;b<x;b++){if(s=t[b],u=this.get(s))y&&(g[u.cid]=!0),m&&s!==u&&(s=this._isModel(s)?s.attributes:s,e.parse&&(s=u.parse(s,e)),u.set(s,e),f&&!a&&u.hasChanged(h)&&(a=!0)),t[b]=u;else if(v){if(i=t[b]=this._prepareModel(s,e),!i)continue;d.push(i),this._addReference(i,e)}i=u||i,i&&(r=this.modelId(i.attributes),!_||!i.isNew()&&g[r]||_.push(i),g[r]=!0)}if(y){for(var b=0,x=this.length;b<x;b++)g[(i=this.models[b]).cid]||p.push(i);p.length&&this.remove(p,e)}if(d.length||_&&_.length)if(f&&(a=!0),this.length+=d.length,null!=l)for(var b=0,x=d.length;b<x;b++)this.models.splice(l+b,0,d[b]);else{_&&(this.models.length=0);for(var w=_||d,b=0,x=w.length;b<x;b++)this.models.push(w[b])}if(a&&this.sort({silent:!0}),!e.silent){for(var S=null!=l?o.clone(e):e,b=0,x=d.length;b<x;b++)null!=l&&(S.index=l+b),(i=d[b]).trigger("add",i,this,S);(a||_&&_.length)&&this.trigger("sort",this,e)}return n?t[0]:t},reset:function(t,e){e||(e={});for(var n=0,r=this.models.length;n<r;n++)this._removeReference(this.models[n],e);return e.previousModels=this.models,this._reset(),t=this.add(t,o.extend({silent:!0},e)),e.silent||this.trigger("reset",this,e),t},push:function(t,e){return this.add(t,o.extend({at:this.length},e))},pop:function(t){var e=this.at(this.length-1);return this.remove(e,t),e},unshift:function(t,e){return this.add(t,o.extend({at:0},e))},shift:function(t){var e=this.at(0);return this.remove(e,t),e},slice:function(){return a.apply(this.models,arguments)},get:function(t){if(null!=t){var e=this.modelId(this._isModel(t)?t.attributes:t);return this._byId[t]||this._byId[e]||this._byId[t.cid]}},at:function(t){return t<0&&(t+=this.length),this.models[t]},where:function(t,e){return o.isEmpty(t)?e?void 0:[]:this[e?"find":"filter"](function(e){for(var n in t)if(t[n]!==e.get(n))return!1;return!0})},findWhere:function(t){return this.where(t,!0)},sort:function(t){if(!this.comparator)throw new Error("Cannot sort a set without a comparator");return t||(t={}),o.isString(this.comparator)||1===this.comparator.length?this.models=this.sortBy(this.comparator,this):this.models.sort(o.bind(this.comparator,this)),t.silent||this.trigger("sort",this,t),this},pluck:function(t){return o.invoke(this.models,"get",t)},fetch:function(t){t=t?o.clone(t):{},void 0===t.parse&&(t.parse=!0);var e=t.success,n=this;return t.success=function(r){n[t.reset?"reset":"set"](r,t),e&&e(n,r,t),n.trigger("sync",n,r,t)},wrapError(this,t),this.sync("read",this,t)},create:function(t,e){if(e=e?o.clone(e):{},!(t=this._prepareModel(t,e)))return!1;e.wait||this.add(t,e);var n=this,r=e.success;return e.success=function(t,i){e.wait&&n.add(t,e),r&&r(t,i,e)},t.save(null,e),t},parse:function(t,e){return t},clone:function(){return new this.constructor(this.models,{model:this.model,comparator:this.comparator})},modelId:function(t){return t[this.model.prototype.idAttribute||"id"]},_reset:function(){this.length=0,this.models=[],this._byId={}},_prepareModel:function(t,e){if(this._isModel(t))return t.collection||(t.collection=this),t;e=e?o.clone(e):{},e.collection=this;var n=new this.model(t,e);return n.validationError?(this.trigger("invalid",this,n.validationError,e),!1):n},_isModel:function(t){return t instanceof s},_addReference:function(t,e){this._byId[t.cid]=t;var n=this.modelId(t.attributes);null!=n&&(this._byId[n]=t),t.on("all",this._onModelEvent,this)},_removeReference:function(t,e){this===t.collection&&delete t.collection,t.off("all",this._onModelEvent,this)},_onModelEvent:function(t,e,n,r){if("add"!==t&&"remove"!==t||n===this){if("destroy"===t&&this.remove(e,r),"change"===t){var i=this.modelId(e.previousAttributes()),o=this.modelId(e.attributes);i!==o&&(null!=i&&delete this._byId[i],null!=o&&(this._byId[o]=e))}this.trigger.apply(this,arguments)}}});var h=["forEach","each","map","collect","reduce","foldl","inject","reduceRight","foldr","find","detect","filter","select","reject","every","all","some","any","include","contains","invoke","max","min","toArray","size","first","head","take","initial","rest","tail","drop","last","without","difference","indexOf","shuffle","lastIndexOf","isEmpty","chain","sample","partition"];o.each(h,function(t){o[t]&&(l.prototype[t]=function(){var e=a.call(arguments);return e.unshift(this.models),o[t].apply(o,e)})});var d=["groupBy","countBy","sortBy","indexBy"];o.each(d,function(t){o[t]&&(l.prototype[t]=function(e,n){var r=o.isFunction(e)?e:function(t){
  return t.get(e)};return o[t](this.models,r,n)})}),l.extend=i,t.exports=l},function(t,e,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};!function(){function n(){return{keys:Object.keys||function(t){if("object"!==("undefined"==typeof t?"undefined":r(t))&&"function"!=typeof t||null===t)throw new TypeError("keys() called on a non-object");var e,n=[];for(e in t)t.hasOwnProperty(e)&&(n[n.length]=e);return n},uniqueId:function(t){var e=++a+"";return t?t+e:e},has:function(t,e){return s.call(t,e)},each:function(t,e,n){if(null!=t)if(o&&t.forEach===o)t.forEach(e,n);else if(t.length===+t.length)for(var r=0,i=t.length;r<i;r++)e.call(n,t[r],r,t);else for(var s in t)this.has(t,s)&&e.call(n,t[s],s,t)},once:function(t){var e,n=!1;return function(){return n?e:(n=!0,e=t.apply(this,arguments),t=null,e)}}}}var i,o=Array.prototype.forEach,s=Object.prototype.hasOwnProperty,u=Array.prototype.slice,a=0,l=n();i={on:function(t,e,n){return f(this,"on",t,[e,n])&&e?(this._events||(this._events={}),(this._events[t]||(this._events[t]=[])).push({callback:e,context:n,ctx:n||this}),this):this},once:function t(e,n,r){if(!f(this,"once",e,[n,r])||!n)return this;var i=this,t=l.once(function(){i.off(e,t),n.apply(this,arguments)});return t._callback=n,this.on(e,t,r)},off:function(t,e,n){var r,i,o,s,u,a,c,h;if(!this._events||!f(this,"off",t,[e,n]))return this;if(!t&&!e&&!n)return this._events={},this;for(s=t?[t]:l.keys(this._events),u=0,a=s.length;u<a;u++)if(t=s[u],o=this._events[t]){if(this._events[t]=r=[],e||n)for(c=0,h=o.length;c<h;c++)i=o[c],(e&&e!==i.callback&&e!==i.callback._callback||n&&n!==i.context)&&r.push(i);r.length||delete this._events[t]}return this},trigger:function(t){if(!this._events)return this;var e=u.call(arguments,1);if(!f(this,"trigger",t,e))return this;var n=this._events[t],r=this._events.all;return n&&h(n,e),r&&h(r,arguments),this},stopListening:function(t,e,n){var i=this._listeners;if(!i)return this;var o=!e&&!n;"object"===("undefined"==typeof e?"undefined":r(e))&&(n=this),t&&((i={})[t._listenerId]=t);for(var s in i)i[s].off(e,n,this),o&&delete this._listeners[s];return this}};var c=/\s+/,f=function(t,e,n,i){if(!n)return!0;if("object"===("undefined"==typeof n?"undefined":r(n))){for(var o in n)t[e].apply(t,[o,n[o]].concat(i));return!1}if(c.test(n)){for(var s=n.split(c),u=0,a=s.length;u<a;u++)t[e].apply(t,[s[u]].concat(i));return!1}return!0},h=function(t,e){var n,r=-1,i=t.length,o=e[0],s=e[1],u=e[2];switch(e.length){case 0:for(;++r<i;)(n=t[r]).callback.call(n.ctx);return;case 1:for(;++r<i;)(n=t[r]).callback.call(n.ctx,o);return;case 2:for(;++r<i;)(n=t[r]).callback.call(n.ctx,o,s);return;case 3:for(;++r<i;)(n=t[r]).callback.call(n.ctx,o,s,u);return;default:for(;++r<i;)(n=t[r]).callback.apply(n.ctx,e)}},d={listenTo:"on",listenToOnce:"once"};l.each(d,function(t,e){i[e]=function(e,n,i){return(this._listeners||(this._listeners={}))[e._listenerId||(e._listenerId=l.uniqueId("l"))]=e,"object"===("undefined"==typeof n?"undefined":r(n))&&(i=this),e[t](n,i,this),this}}),i.bind=i.on,i.unbind=i.off,i.mixin=function(t){var e=["on","once","off","trigger","stopListening","listenTo","listenToOnce","bind","unbind"];return l.each(e,function(e){t[e]=this[e]},this),t},"undefined"!=typeof t&&t.exports&&(e=t.exports=i),e.BackboneEvents=i}(void 0)},function(t,e,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};!function(){function n(){return{keys:Object.keys||function(t){if("object"!==("undefined"==typeof t?"undefined":r(t))&&"function"!=typeof t||null===t)throw new TypeError("keys() called on a non-object");var e,n=[];for(e in t)t.hasOwnProperty(e)&&(n[n.length]=e);return n},uniqueId:function(t){var e=++a+"";return t?t+e:e},has:function(t,e){return s.call(t,e)},each:function(t,e,n){if(null!=t)if(o&&t.forEach===o)t.forEach(e,n);else if(t.length===+t.length)for(var r=0,i=t.length;r<i;r++)e.call(n,t[r],r,t);else for(var s in t)this.has(t,s)&&e.call(n,t[s],s,t)},once:function(t){var e,n=!1;return function(){return n?e:(n=!0,e=t.apply(this,arguments),t=null,e)}}}}var i,o=Array.prototype.forEach,s=Object.prototype.hasOwnProperty,u=Array.prototype.slice,a=0,l=n();i={on:function(t,e,n){return f(this,"on",t,[e,n])&&e?(this._events||(this._events={}),(this._events[t]||(this._events[t]=[])).push({callback:e,context:n,ctx:n||this}),this):this},once:function t(e,n,r){if(!f(this,"once",e,[n,r])||!n)return this;var i=this,t=l.once(function(){i.off(e,t),n.apply(this,arguments)});return t._callback=n,this.on(e,t,r)},off:function(t,e,n){var r,i,o,s,u,a,c,h;if(!this._events||!f(this,"off",t,[e,n]))return this;if(!t&&!e&&!n)return this._events={},this;for(s=t?[t]:l.keys(this._events),u=0,a=s.length;u<a;u++)if(t=s[u],o=this._events[t]){if(this._events[t]=r=[],e||n)for(c=0,h=o.length;c<h;c++)i=o[c],(e&&e!==i.callback&&e!==i.callback._callback||n&&n!==i.context)&&r.push(i);r.length||delete this._events[t]}return this},trigger:function(t){if(!this._events)return this;var e=u.call(arguments,1);if(!f(this,"trigger",t,e))return this;var n=this._events[t],r=this._events.all;return n&&h(n,e),r&&h(r,arguments),this},stopListening:function(t,e,n){var i=this._listeners;if(!i)return this;var o=!e&&!n;"object"===("undefined"==typeof e?"undefined":r(e))&&(n=this),t&&((i={})[t._listenerId]=t);for(var s in i)i[s].off(e,n,this),o&&delete this._listeners[s];return this}};var c=/\s+/,f=function(t,e,n,i){if(!n)return!0;if("object"===("undefined"==typeof n?"undefined":r(n))){for(var o in n)t[e].apply(t,[o,n[o]].concat(i));return!1}if(c.test(n)){for(var s=n.split(c),u=0,a=s.length;u<a;u++)t[e].apply(t,[s[u]].concat(i));return!1}return!0},h=function(t,e){var n,r=-1,i=t.length,o=e[0],s=e[1],u=e[2];switch(e.length){case 0:for(;++r<i;)(n=t[r]).callback.call(n.ctx);return;case 1:for(;++r<i;)(n=t[r]).callback.call(n.ctx,o);return;case 2:for(;++r<i;)(n=t[r]).callback.call(n.ctx,o,s);return;case 3:for(;++r<i;)(n=t[r]).callback.call(n.ctx,o,s,u);return;default:for(;++r<i;)(n=t[r]).callback.apply(n.ctx,e)}},d={listenTo:"on",listenToOnce:"once"};l.each(d,function(t,e){i[e]=function(e,n,i){return(this._listeners||(this._listeners={}))[e._listenerId||(e._listenerId=l.uniqueId("l"))]=e,"object"===("undefined"==typeof n?"undefined":r(n))&&(i=this),e[t](n,i,this),this}}),i.bind=i.on,i.unbind=i.off,i.mixin=function(t){var e=["on","once","off","trigger","stopListening","listenTo","listenToOnce","bind","unbind"];return l.each(e,function(e){t[e]=this[e]},this),t},"undefined"!=typeof t&&t.exports&&(e=t.exports=i),e.BackboneEvents=i}(void 0)},function(t,e,n){"use strict";t.exports=n(57)},function(t,e,n){var r,i,o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};!function(s){"object"===o(e)?t.exports=s():(r=s,i="function"==typeof r?r.call(e,n,e,t):r,!(void 0!==i&&(t.exports=i)))}(function(){"use strict";var t={has:function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},extend:function(t){for(var e=1;e<arguments.length;++e){var n=arguments[e];if(n)for(var r in n)t[r]=n[r]}return t}};return function(e,n){var r,i=this;r=e&&t.has(e,"constructor")?e.constructor:function(){return i.apply(this,arguments)},t.extend(r,i,n);var o=function(){this.constructor=r};return o.prototype=i.prototype,r.prototype=new o,e&&t.extend(r.prototype,e),r.__super__=i.prototype,r}})},function(t,e,n){var r,i,o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};(function(){function n(t){function e(e,n,r,i,o,s){for(;o>=0&&o<s;o+=t){var u=i?i[o]:o;r=n(r,e[u],u,e)}return r}return function(n,r,i,o){r=k(r,o,4);var s=!A(n)&&S.keys(n),u=(s||n).length,a=t>0?0:u-1;return arguments.length<3&&(i=n[s?s[a]:a],a+=t),e(n,r,i,s,a,u)}}function s(t){return function(e,n,r){n=j(n,r);for(var i=C(e),o=t>0?0:i-1;o>=0&&o<i;o+=t)if(n(e[o],o,e))return o;return-1}}function u(t,e,n){return function(r,i,o){var s=0,u=C(r);if("number"==typeof o)t>0?s=o>=0?o:Math.max(o+u,s):u=o>=0?Math.min(o+1,u):o+u+1;else if(n&&o&&u)return o=n(r,i),r[o]===i?o:-1;if(i!==i)return o=e(g.call(r,s,u),S.isNaN),o>=0?o+s:-1;for(o=t>0?s:u-1;o>=0&&o<u;o+=t)if(r[o]===i)return o;return-1}}function a(t,e){var n=R.length,r=t.constructor,i=S.isFunction(r)&&r.prototype||h,o="constructor";for(S.has(t,o)&&!S.contains(e,o)&&e.push(o);n--;)o=R[n],o in t&&t[o]!==i[o]&&!S.contains(e,o)&&e.push(o)}var l=this,c=l._,f=Array.prototype,h=Object.prototype,d=Function.prototype,p=f.push,g=f.slice,v=h.toString,m=h.hasOwnProperty,y=Array.isArray,_=Object.keys,b=d.bind,x=Object.create,w=function(){},S=function t(e){return e instanceof t?e:this instanceof t?void(this._wrapped=e):new t(e)};"undefined"!=typeof t&&t.exports&&(e=t.exports=S),e._=S,S.VERSION="1.8.3";var k=function(t,e,n){if(void 0===e)return t;switch(null==n?3:n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)};case 4:return function(n,r,i,o){return t.call(e,n,r,i,o)}}return function(){return t.apply(e,arguments)}},j=function(t,e,n){return null==t?S.identity:S.isFunction(t)?k(t,e,n):S.isObject(t)?S.matcher(t):S.property(t)};S.iteratee=function(t,e){return j(t,e,1/0)};var z=function(t,e){return function(n){var r=arguments.length;if(r<2||null==n)return n;for(var i=1;i<r;i++)for(var o=arguments[i],s=t(o),u=s.length,a=0;a<u;a++){var l=s[a];e&&void 0!==n[l]||(n[l]=o[l])}return n}},O=function(t){if(!S.isObject(t))return{};if(x)return x(t);w.prototype=t;var e=new w;return w.prototype=null,e},M=function(t){return function(e){return null==e?void 0:e[t]}},E=Math.pow(2,53)-1,C=M("length"),A=function(t){var e=C(t);return"number"==typeof e&&e>=0&&e<=E};S.each=S.forEach=function(t,e,n){e=k(e,n);var r,i;if(A(t))for(r=0,i=t.length;r<i;r++)e(t[r],r,t);else{var o=S.keys(t);for(r=0,i=o.length;r<i;r++)e(t[o[r]],o[r],t)}return t},S.map=S.collect=function(t,e,n){e=j(e,n);for(var r=!A(t)&&S.keys(t),i=(r||t).length,o=Array(i),s=0;s<i;s++){var u=r?r[s]:s;o[s]=e(t[u],u,t)}return o},S.reduce=S.foldl=S.inject=n(1),S.reduceRight=S.foldr=n(-1),S.find=S.detect=function(t,e,n){var r;if(r=A(t)?S.findIndex(t,e,n):S.findKey(t,e,n),void 0!==r&&r!==-1)return t[r]},S.filter=S.select=function(t,e,n){var r=[];return e=j(e,n),S.each(t,function(t,n,i){e(t,n,i)&&r.push(t)}),r},S.reject=function(t,e,n){return S.filter(t,S.negate(j(e)),n)},S.every=S.all=function(t,e,n){e=j(e,n);for(var r=!A(t)&&S.keys(t),i=(r||t).length,o=0;o<i;o++){var s=r?r[o]:o;if(!e(t[s],s,t))return!1}return!0},S.some=S.any=function(t,e,n){e=j(e,n);for(var r=!A(t)&&S.keys(t),i=(r||t).length,o=0;o<i;o++){var s=r?r[o]:o;if(e(t[s],s,t))return!0}return!1},S.contains=S.includes=S.include=function(t,e,n,r){return A(t)||(t=S.values(t)),("number"!=typeof n||r)&&(n=0),S.indexOf(t,e,n)>=0},S.invoke=function(t,e){var n=g.call(arguments,2),r=S.isFunction(e);return S.map(t,function(t){var i=r?e:t[e];return null==i?i:i.apply(t,n)})},S.pluck=function(t,e){return S.map(t,S.property(e))},S.where=function(t,e){return S.filter(t,S.matcher(e))},S.findWhere=function(t,e){return S.find(t,S.matcher(e))},S.max=function(t,e,n){var r,i,o=-(1/0),s=-(1/0);if(null==e&&null!=t){t=A(t)?t:S.values(t);for(var u=0,a=t.length;u<a;u++)r=t[u],r>o&&(o=r)}else e=j(e,n),S.each(t,function(t,n,r){i=e(t,n,r),(i>s||i===-(1/0)&&o===-(1/0))&&(o=t,s=i)});return o},S.min=function(t,e,n){var r,i,o=1/0,s=1/0;if(null==e&&null!=t){t=A(t)?t:S.values(t);for(var u=0,a=t.length;u<a;u++)r=t[u],r<o&&(o=r)}else e=j(e,n),S.each(t,function(t,n,r){i=e(t,n,r),(i<s||i===1/0&&o===1/0)&&(o=t,s=i)});return o},S.shuffle=function(t){for(var e,n=A(t)?t:S.values(t),r=n.length,i=Array(r),o=0;o<r;o++)e=S.random(0,o),e!==o&&(i[o]=i[e]),i[e]=n[o];return i},S.sample=function(t,e,n){return null==e||n?(A(t)||(t=S.values(t)),t[S.random(t.length-1)]):S.shuffle(t).slice(0,Math.max(0,e))},S.sortBy=function(t,e,n){return e=j(e,n),S.pluck(S.map(t,function(t,n,r){return{value:t,index:n,criteria:e(t,n,r)}}).sort(function(t,e){var n=t.criteria,r=e.criteria;if(n!==r){if(n>r||void 0===n)return 1;if(n<r||void 0===r)return-1}return t.index-e.index}),"value")};var T=function(t){return function(e,n,r){var i={};return n=j(n,r),S.each(e,function(r,o){t(i,r,n(r,o,e))}),i}};S.groupBy=T(function(t,e,n){S.has(t,n)?t[n].push(e):t[n]=[e]}),S.indexBy=T(function(t,e,n){t[n]=e}),S.countBy=T(function(t,e,n){S.has(t,n)?t[n]++:t[n]=1}),S.toArray=function(t){return t?S.isArray(t)?g.call(t):A(t)?S.map(t,S.identity):S.values(t):[]},S.size=function(t){return null==t?0:A(t)?t.length:S.keys(t).length},S.partition=function(t,e,n){e=j(e,n);var r=[],i=[];return S.each(t,function(t,n,o){(e(t,n,o)?r:i).push(t)}),[r,i]},S.first=S.head=S.take=function(t,e,n){if(null!=t)return null==e||n?t[0]:S.initial(t,t.length-e)},S.initial=function(t,e,n){return g.call(t,0,Math.max(0,t.length-(null==e||n?1:e)))},S.last=function(t,e,n){if(null!=t)return null==e||n?t[t.length-1]:S.rest(t,Math.max(0,t.length-e))},S.rest=S.tail=S.drop=function(t,e,n){return g.call(t,null==e||n?1:e)},S.compact=function(t){return S.filter(t,S.identity)};var I=function t(e,n,r,i){for(var o=[],s=0,u=i||0,a=C(e);u<a;u++){var l=e[u];if(A(l)&&(S.isArray(l)||S.isArguments(l))){n||(l=t(l,n,r));var c=0,f=l.length;for(o.length+=f;c<f;)o[s++]=l[c++]}else r||(o[s++]=l)}return o};S.flatten=function(t,e){return I(t,e,!1)},S.without=function(t){return S.difference(t,g.call(arguments,1))},S.uniq=S.unique=function(t,e,n,r){S.isBoolean(e)||(r=n,n=e,e=!1),null!=n&&(n=j(n,r));for(var i=[],o=[],s=0,u=C(t);s<u;s++){var a=t[s],l=n?n(a,s,t):a;e?(s&&o===l||i.push(a),o=l):n?S.contains(o,l)||(o.push(l),i.push(a)):S.contains(i,a)||i.push(a)}return i},S.union=function(){return S.uniq(I(arguments,!0,!0))},S.intersection=function(t){for(var e=[],n=arguments.length,r=0,i=C(t);r<i;r++){var o=t[r];if(!S.contains(e,o)){for(var s=1;s<n&&S.contains(arguments[s],o);s++);s===n&&e.push(o)}}return e},S.difference=function(t){var e=I(arguments,!0,!0,1);return S.filter(t,function(t){return!S.contains(e,t)})},S.zip=function(){return S.unzip(arguments)},S.unzip=function(t){for(var e=t&&S.max(t,C).length||0,n=Array(e),r=0;r<e;r++)n[r]=S.pluck(t,r);return n},S.object=function(t,e){for(var n={},r=0,i=C(t);r<i;r++)e?n[t[r]]=e[r]:n[t[r][0]]=t[r][1];return n},S.findIndex=s(1),S.findLastIndex=s(-1),S.sortedIndex=function(t,e,n,r){n=j(n,r,1);for(var i=n(e),o=0,s=C(t);o<s;){var u=Math.floor((o+s)/2);n(t[u])<i?o=u+1:s=u}return o},S.indexOf=u(1,S.findIndex,S.sortedIndex),S.lastIndexOf=u(-1,S.findLastIndex),S.range=function(t,e,n){null==e&&(e=t||0,t=0),n=n||1;for(var r=Math.max(Math.ceil((e-t)/n),0),i=Array(r),o=0;o<r;o++,t+=n)i[o]=t;return i};var N=function(t,e,n,r,i){if(!(r instanceof e))return t.apply(n,i);var o=O(t.prototype),s=t.apply(o,i);return S.isObject(s)?s:o};S.bind=function(t,e){if(b&&t.bind===b)return b.apply(t,g.call(arguments,1));if(!S.isFunction(t))throw new TypeError("Bind must be called on a function");var n=g.call(arguments,2);return function r(){return N(t,r,e,this,n.concat(g.call(arguments)))}},S.partial=function(t){var e=g.call(arguments,1);return function n(){for(var r=0,i=e.length,o=Array(i),s=0;s<i;s++)o[s]=e[s]===S?arguments[r++]:e[s];for(;r<arguments.length;)o.push(arguments[r++]);return N(t,n,this,this,o)}},S.bindAll=function(t){var e,n,r=arguments.length;if(r<=1)throw new Error("bindAll must be passed function names");for(e=1;e<r;e++)n=arguments[e],t[n]=S.bind(t[n],t);return t},S.memoize=function(t,e){var n=function n(r){var i=n.cache,o=""+(e?e.apply(this,arguments):r);return S.has(i,o)||(i[o]=t.apply(this,arguments)),i[o]};return n.cache={},n},S.delay=function(t,e){var n=g.call(arguments,2);return setTimeout(function(){return t.apply(null,n)},e)},S.defer=S.partial(S.delay,S,1),S.throttle=function(t,e,n){var r,i,o,s=null,u=0;n||(n={});var a=function(){u=n.leading===!1?0:S.now(),s=null,o=t.apply(r,i),s||(r=i=null)};return function(){var l=S.now();u||n.leading!==!1||(u=l);var c=e-(l-u);return r=this,i=arguments,c<=0||c>e?(s&&(clearTimeout(s),s=null),u=l,o=t.apply(r,i),s||(r=i=null)):s||n.trailing===!1||(s=setTimeout(a,c)),o}},S.debounce=function(t,e,n){var r,i,o,s,u,a=function a(){var l=S.now()-s;l<e&&l>=0?r=setTimeout(a,e-l):(r=null,n||(u=t.apply(o,i),r||(o=i=null)))};return function(){o=this,i=arguments,s=S.now();var l=n&&!r;return r||(r=setTimeout(a,e)),l&&(u=t.apply(o,i),o=i=null),u}},S.wrap=function(t,e){return S.partial(e,t)},S.negate=function(t){return function(){return!t.apply(this,arguments)}},S.compose=function(){var t=arguments,e=t.length-1;return function(){for(var n=e,r=t[e].apply(this,arguments);n--;)r=t[n].call(this,r);return r}},S.after=function(t,e){return function(){if(--t<1)return e.apply(this,arguments)}},S.before=function(t,e){var n;return function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=null),n}},S.once=S.partial(S.before,2);var L=!{toString:null}.propertyIsEnumerable("toString"),R=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];S.keys=function(t){if(!S.isObject(t))return[];if(_)return _(t);var e=[];for(var n in t)S.has(t,n)&&e.push(n);return L&&a(t,e),e},S.allKeys=function(t){if(!S.isObject(t))return[];var e=[];for(var n in t)e.push(n);return L&&a(t,e),e},S.values=function(t){for(var e=S.keys(t),n=e.length,r=Array(n),i=0;i<n;i++)r[i]=t[e[i]];return r},S.mapObject=function(t,e,n){e=j(e,n);for(var r,i=S.keys(t),o=i.length,s={},u=0;u<o;u++)r=i[u],s[r]=e(t[r],r,t);return s},S.pairs=function(t){for(var e=S.keys(t),n=e.length,r=Array(n),i=0;i<n;i++)r[i]=[e[i],t[e[i]]];return r},S.invert=function(t){for(var e={},n=S.keys(t),r=0,i=n.length;r<i;r++)e[t[n[r]]]=n[r];return e},S.functions=S.methods=function(t){var e=[];for(var n in t)S.isFunction(t[n])&&e.push(n);return e.sort()},S.extend=z(S.allKeys),S.extendOwn=S.assign=z(S.keys),S.findKey=function(t,e,n){e=j(e,n);for(var r,i=S.keys(t),o=0,s=i.length;o<s;o++)if(r=i[o],e(t[r],r,t))return r},S.pick=function(t,e,n){var r,i,o={},s=t;if(null==s)return o;S.isFunction(e)?(i=S.allKeys(s),r=k(e,n)):(i=I(arguments,!1,!1,1),r=function(t,e,n){return e in n},s=Object(s));for(var u=0,a=i.length;u<a;u++){var l=i[u],c=s[l];r(c,l,s)&&(o[l]=c)}return o},S.omit=function(t,e,n){if(S.isFunction(e))e=S.negate(e);else{var r=S.map(I(arguments,!1,!1,1),String);e=function(t,e){return!S.contains(r,e)}}return S.pick(t,e,n)},S.defaults=z(S.allKeys,!0),S.create=function(t,e){var n=O(t);return e&&S.extendOwn(n,e),n},S.clone=function(t){return S.isObject(t)?S.isArray(t)?t.slice():S.extend({},t):t},S.tap=function(t,e){return e(t),t},S.isMatch=function(t,e){var n=S.keys(e),r=n.length;if(null==t)return!r;for(var i=Object(t),o=0;o<r;o++){var s=n[o];if(e[s]!==i[s]||!(s in i))return!1}return!0};var q=function t(e,n,r,i){if(e===n)return 0!==e||1/e===1/n;if(null==e||null==n)return e===n;e instanceof S&&(e=e._wrapped),n instanceof S&&(n=n._wrapped);var s=v.call(e);if(s!==v.call(n))return!1;switch(s){case"[object RegExp]":case"[object String]":return""+e==""+n;case"[object Number]":return+e!==+e?+n!==+n:0===+e?1/+e===1/n:+e===+n;case"[object Date]":case"[object Boolean]":return+e===+n}var u="[object Array]"===s;if(!u){if("object"!=("undefined"==typeof e?"undefined":o(e))||"object"!=("undefined"==typeof n?"undefined":o(n)))return!1;var a=e.constructor,l=n.constructor;if(a!==l&&!(S.isFunction(a)&&a instanceof a&&S.isFunction(l)&&l instanceof l)&&"constructor"in e&&"constructor"in n)return!1}r=r||[],i=i||[];for(var c=r.length;c--;)if(r[c]===e)return i[c]===n;if(r.push(e),i.push(n),u){if(c=e.length,c!==n.length)return!1;for(;c--;)if(!t(e[c],n[c],r,i))return!1}else{var f,h=S.keys(e);if(c=h.length,S.keys(n).length!==c)return!1;for(;c--;)if(f=h[c],!S.has(n,f)||!t(e[f],n[f],r,i))return!1}return r.pop(),i.pop(),!0};S.isEqual=function(t,e){return q(t,e)},S.isEmpty=function(t){return null==t||(A(t)&&(S.isArray(t)||S.isString(t)||S.isArguments(t))?0===t.length:0===S.keys(t).length)},S.isElement=function(t){return!(!t||1!==t.nodeType)},S.isArray=y||function(t){return"[object Array]"===v.call(t)},S.isObject=function(t){var e="undefined"==typeof t?"undefined":o(t);return"function"===e||"object"===e&&!!t},S.each(["Arguments","Function","String","Number","Date","RegExp","Error"],function(t){S["is"+t]=function(e){return v.call(e)==="[object "+t+"]"}}),S.isArguments(arguments)||(S.isArguments=function(t){return S.has(t,"callee")}),"function"!=typeof/./&&"object"!=("undefined"==typeof Int8Array?"undefined":o(Int8Array))&&(S.isFunction=function(t){return"function"==typeof t||!1}),S.isFinite=function(t){return isFinite(t)&&!isNaN(parseFloat(t))},S.isNaN=function(t){return S.isNumber(t)&&t!==+t},S.isBoolean=function(t){return t===!0||t===!1||"[object Boolean]"===v.call(t)},S.isNull=function(t){return null===t},S.isUndefined=function(t){return void 0===t},S.has=function(t,e){return null!=t&&m.call(t,e)},S.noConflict=function(){return l._=c,this},S.identity=function(t){return t},S.constant=function(t){return function(){return t}},S.noop=function(){},S.property=M,S.propertyOf=function(t){return null==t?function(){}:function(e){return t[e]}},S.matcher=S.matches=function(t){return t=S.extendOwn({},t),function(e){return S.isMatch(e,t)}},S.times=function(t,e,n){var r=Array(Math.max(0,t));e=k(e,n,1);for(var i=0;i<t;i++)r[i]=e(i);return r},S.random=function(t,e){return null==e&&(e=t,t=0),t+Math.floor(Math.random()*(e-t+1))},S.now=Date.now||function(){return(new Date).getTime()};var F={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},P=S.invert(F),B=function(t){var e=function(e){return t[e]},n="(?:"+S.keys(t).join("|")+")",r=RegExp(n),i=RegExp(n,"g");return function(t){return t=null==t?"":""+t,r.test(t)?t.replace(i,e):t}};S.escape=B(F),S.unescape=B(P),S.result=function(t,e,n){var r=null==t?void 0:t[e];return void 0===r&&(r=n),S.isFunction(r)?r.call(t):r};var W=0;S.uniqueId=function(t){var e=++W+"";return t?t+e:e},S.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var D=/(.)^/,H={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},U=/\\|'|\r|\n|\u2028|\u2029/g,V=function(t){return"\\"+H[t]};S.template=function(t,e,n){!e&&n&&(e=n),e=S.defaults({},e,S.templateSettings);var r=RegExp([(e.escape||D).source,(e.interpolate||D).source,(e.evaluate||D).source].join("|")+"|$","g"),i=0,o="__p+='";t.replace(r,function(e,n,r,s,u){return o+=t.slice(i,u).replace(U,V),i=u+e.length,n?o+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?o+="'+\n((__t=("+r+"))==null?'':__t)+\n'":s&&(o+="';\n"+s+"\n__p+='"),e}),o+="';\n",e.variable||(o="with(obj||{}){\n"+o+"}\n"),o="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+o+"return __p;\n";try{var s=new Function(e.variable||"obj","_",o)}catch(t){throw t.source=o,t}var u=function(t){return s.call(this,t,S)},a=e.variable||"obj";return u.source="function("+a+"){\n"+o+"}",u},S.chain=function(t){var e=S(t);return e._chain=!0,e};var $=function(t,e){return t._chain?S(e).chain():e};S.mixin=function(t){S.each(S.functions(t),function(e){var n=S[e]=t[e];S.prototype[e]=function(){var t=[this._wrapped];return p.apply(t,arguments),$(this,n.apply(S,t))}})},S.mixin(S),S.each(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var e=f[t];S.prototype[t]=function(){var n=this._wrapped;return e.apply(n,arguments),"shift"!==t&&"splice"!==t||0!==n.length||delete n[0],$(this,n)}}),S.each(["concat","join","slice"],function(t){var e=f[t];S.prototype[t]=function(){return $(this,e.apply(this._wrapped,arguments))}}),S.prototype.value=function(){return this._wrapped},S.prototype.valueOf=S.prototype.toJSON=S.prototype.value,S.prototype.toString=function(){return""+this._wrapped},r=[],i=function(){return S}.apply(e,r),!(void 0!==i&&(t.exports=i))}).call(void 0)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(11),o=r(i),s=n(24),u=r(s),a=void 0;e.default=a={parse:function(t){var e=[];if("[object Array]"===Object.prototype.toString.call(t))var n=t;else var n=t.split("\n");if(n[0].slice(0,6)===!1)throw new Error("Invalid CLUSTAL Header");for(var r=0,i=1,o=0;r<n.length;){r++;var s=n[r];if(null!=s&&0!==s.length)if(0!==s.trim().length){if(!u.default.contains(s,"*")){1===i&&(o=0,i=0);var a=/^(?:\s*)(\S+)(?:\s+)(\S+)(?:\s*)(\d*)(?:\s*|$)/g,l=a.exec(s);if(null!=l){var c=l[1].trim(),f=l[2].trim();if(o>=e.length){var h=u.default.getMeta(c.trim());c=h.name;var d=new u.default.model(f,c,o);d.ids=h.ids||{},d.details=h.details||{};var p=Object.keys(d.ids);p.length>0&&(d.id=d.ids[p[0]]),e.push(d)}else e[o].seq+=f;o++}else console.log("parse error",s)}}else i=1;else i=1}return e=e.filter(function(t){return t.seq.search(/[:.*]/i)===-1&&t.name.search(/[:.*]/i)===-1})}},o.default.mixin(a)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(24),o=r(i),s=n(69),u=r(s),a=n(11),l=r(a),c=void 0;e.default=c={getMeta:o.default.getMeta,extend:function(t){var e=(0,u.default)(c);return c.getMeta=t,e},parse:function(t){var e=[];if(!t||0===t.length)return[];"[object Array]"!==Object.prototype.toString.call(t)&&(t=t.split("\n"));for(var n=c,r=n.getMeta,i=0;i<t.length;i++){var s=t[i];if(">"===s[0]||";"===s[0]){var u=s.slice(1).trim(),a=r(u.trim());u=a.name;var l=a.id||e.length,f=new o.default.model("",a.name,l);f.ids=a.ids||{},f.details=a.details||{},e.push(f)}else f.seq+=s}return e},write:function(t,e){for(var n="",r=0;r<t.length;r++){var i=t[r];null!=e&&(i=e(i)),n+=">"+i.name+"\n",n+=o.default.splitNChars(i.seq,80).join("\n"),n+="\n"}return n}},l.default.mixin(c)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(11),o=r(i),s=n(43),u=r(s),a=n(64),l=r(a),c=function(){};o.default.mixin(c),e.default=c,c.parseLines=function(t){var e=t.split("\n"),n={},r=[];n.type=c._guessType(e);var i=0;if("jalview"===n.type){var o=l.default.readHeader(e);i=o.offset,n.colors=o.colors,r=o.features}for(var s=i;s<e.length;s++){var u=e[s];0!==u.length&&"#"!==u[0]&&(u=c.parseLine(u),void 0!==u&&r.push(u))}return{features:r,config:n}},c._guessType=function(t){return"##gff-version 3"===t[0].substring(0,15)?"gff3":t[0].indexOf("#")<0&&2===t[0].split("\t").length?"jalview":"gff3"},c.parseSeqs=c.parse=function(t){var e=c.parseLines(t),n={};return e.features.forEach(function(t){var e=t.seqname;void 0===n[e]&&(n[e]=[]),delete t.seqname,n[e].push(t)}),delete e.features,e.seqs=n,e},c.parseLine=function(t){var e={},n=t.split(/\s+/);if(1!==n.length){e.seqname=n[0],e.source=n[1],e.feature=n[2],e.start=parseInt(n[3]),e.end=parseInt(n[4]),e.score=n[5],e.strand=n[6],e.frame=n[7];var r=n.slice(8).join(" ");return Object.keys(e).forEach(function(t){"string"==typeof e[t]&&(e[t]=e[t].trim()),"."===e[t]&&(e[t]=void 0)}),e.score&&(e.score=parseFloat(e.score)),e.frame&&(e.frame=parseInt(e.frame)),e.attributes=u.default.extractKeys(r),e}},c.exportLine=function(t){var e=Object.keys(t.attributes).map(function(e){return e+"="+t.attributes[e]}).join(";"),n=[t.seqname,t.source,t.feature,t.start,t.end,t.score,t.strand,t.frame,e];return n=n.map(function(t){return void 0===t?".":t}),n.join("\t")},c.exportLines=function(t){return"##gff-version 3\n"+t.map(c.exportLine).join("\n")},c.exportSeqs=c.export=function(t){var e=[],n=function(t){t.seqname=r,e.push(t)};for(var r in t)t[r].forEach(n);return c.exportLines(e)},c.utils=u.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(43),i={};e.default=i,i.readHeader=function(t){for(var e,n={},r=0,o=[];r<t.length;r++){var s=t[r];if(s.indexOf("#")>=0)break;var u=s.split(/\t/),a=u[0].trim();if("GFF"===a)break;if(2===u.length)if("startgroup"===a)e=u[1].trim();else{if("endgroup"===a){e="";continue}n[u[0]]=i.parseColor(u[1])}else if(u.length>=5){var l=i.parseLine(u);e&&(l.attributes.Parent=e),o.push(l)}}return{offset:r,colors:n,features:o}},i.parseColor=function(t){return t.indexOf(",")>=0?(0,r.rgbToHex)(t.split(",").map(function(t){return parseInt(t)})):6===t.length&&parseInt(t.charAt(0),16)<=16&&"bisque"!==t?"#"+t:t},i.parseLine=function(t){var e={attributes:{}};return e.attributes.Name=t[0].trim(),e.seqname=t[1].trim(),e.start=parseInt(t[3]),e.end=parseInt(t[4]),e.feature=t[5].trim(),"ID_NOT_SPECIFIED"===e.seqname&&(e.seqname=t[2].trim()),e}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}var i=n(11),o=r(i),s=function t(e){return this.constructor!=t?new t(e):(this.matrix={},this.parsingOrder=[],void 0!=e&&this.parse(e),this)};o.default.mixin(s),t.exports=s,s.prototype.parse=function(t){return t.split("\n").forEach(function(t){this.parseLine(t)}.bind(this)),this.buildMatrix(),this.matrix},s.read=function(t,e){return(new s).read(t,e)},s.parse=function(t){return(new s).parse(t)},s.prototype.parseLine=function(t){var e=t.charAt(0);if("#"!==e){this.parsingOrder.push(e);for(var n=t.substring(1),r=n.split(/\s+/).filter(function(t){return t.length>0}).map(function(t){return parseInt(t)}),i={},o=0;o<r.length;o++)i[this.parsingOrder[o]]=r[o];this.matrix[e]=i}},s.prototype.export=function(){return s.export(this.matrix)},s.export=function(t){var e=[],n=1;"matrix"in t&&(t=t.matrix);for(var r in t){for(var i=r,o=Object.keys(t[r]),s=0;s<n;s++)i+="\t"+t[r][o[s]];e.push(i),n++}return e.join("\n")},s.prototype.buildMatrix=function(){for(var t=this.parsingOrder.length-1;t>=0;t--){var e=this.parsingOrder[t],n=this.matrix[e];for(var r in n)this.matrix[r][e]=n[r]}}},function(t,e){"use strict";function n(t){for(var e=[],n={},i=t.split(/\s*(;|\(|\)|\[|\]|,|:|=)\s*/),o=0;o<i.length;o++){var s=i[o],u=void 0;switch(s){case"(":u={},n.children=[u],e.push(n),n=u;break;case",":u={},e[e.length-1].children.push(u),n=u;break;case")":n=e.pop();break;case":":break;default:var a=i[o-1];if(")"==a||"("==a||","==a)n.name=s;else if(":"==a)"undefined"==typeof s?"undefined":r(s),isNaN(s)||(n.branch_length=parseFloat(s));else if("="==a){var l=i[o-2];switch(l){case"D":n.duplication=s;break;case"G":n.gene_id=s;break;case"T":n.taxon_id=s}}}}return n}Object.defineProperty(e,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};e.default=n},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.parseNhx=e.parse=void 0;var i=n(68),o=r(i),s=n(66),u=r(s),a={};a.parse=o.default,a.parseNhx=u.default,e.default=a,e.parse=o.default,e.parseNhx=u.default},function(t,e){"use strict";function n(t){for(var e=[],n={},r=t.split(/\s*(;|\(|\)|,|:)\s*/),i=0;i<r.length;i++){var o=r[i],s=void 0;switch(o){case"(":s={},n.children=[s],e.push(n),n=s;break;case",":s={},e[e.length-1].children.push(s),n=s;break;case")":n=e.pop();break;case":":break;default:var u=r[i-1];")"==u||"("==u||","==u?n.name=o:":"==u&&(n.branch_length=parseFloat(o))}}return n}Object.defineProperty(e,"__esModule",{value:!0}),e.default=n},function(t,e){"use strict";function n(t,e,n){for(var r=[],i=t<e,o=n?i?e+1:e-1:e,s=t;i?s<o:s>o;i?s++:s--)r.push(s);return r}Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){t=t||{};for(var e=n(0,arguments.length,!1),r=0;r<e.length;r++){var i=e[r];if(arguments[i])for(var o=0;o<arguments[i].length;o++){var s=arguments[i][o];arguments[i].hasOwnProperty(s)&&(t[s]=arguments[i][s])}}return t}},function(t,e,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){
  return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};!function(){function n(){return{keys:Object.keys||function(t){if("object"!==("undefined"==typeof t?"undefined":r(t))&&"function"!=typeof t||null===t)throw new TypeError("keys() called on a non-object");var e,n=[];for(e in t)t.hasOwnProperty(e)&&(n[n.length]=e);return n},uniqueId:function(t){var e=++a+"";return t?t+e:e},has:function(t,e){return s.call(t,e)},each:function(t,e,n){if(null!=t)if(o&&t.forEach===o)t.forEach(e,n);else if(t.length===+t.length)for(var r=0,i=t.length;r<i;r++)e.call(n,t[r],r,t);else for(var s in t)this.has(t,s)&&e.call(n,t[s],s,t)},once:function(t){var e,n=!1;return function(){return n?e:(n=!0,e=t.apply(this,arguments),t=null,e)}}}}var i,o=Array.prototype.forEach,s=Object.prototype.hasOwnProperty,u=Array.prototype.slice,a=0,l=n();i={on:function(t,e,n){return f(this,"on",t,[e,n])&&e?(this._events||(this._events={}),(this._events[t]||(this._events[t]=[])).push({callback:e,context:n,ctx:n||this}),this):this},once:function t(e,n,r){if(!f(this,"once",e,[n,r])||!n)return this;var i=this,t=l.once(function(){i.off(e,t),n.apply(this,arguments)});return t._callback=n,this.on(e,t,r)},off:function(t,e,n){var r,i,o,s,u,a,c,h;if(!this._events||!f(this,"off",t,[e,n]))return this;if(!t&&!e&&!n)return this._events={},this;for(s=t?[t]:l.keys(this._events),u=0,a=s.length;u<a;u++)if(t=s[u],o=this._events[t]){if(this._events[t]=r=[],e||n)for(c=0,h=o.length;c<h;c++)i=o[c],(e&&e!==i.callback&&e!==i.callback._callback||n&&n!==i.context)&&r.push(i);r.length||delete this._events[t]}return this},trigger:function(t){if(!this._events)return this;var e=u.call(arguments,1);if(!f(this,"trigger",t,e))return this;var n=this._events[t],r=this._events.all;return n&&h(n,e),r&&h(r,arguments),this},stopListening:function(t,e,n){var i=this._listeners;if(!i)return this;var o=!e&&!n;"object"===("undefined"==typeof e?"undefined":r(e))&&(n=this),t&&((i={})[t._listenerId]=t);for(var s in i)i[s].off(e,n,this),o&&delete this._listeners[s];return this}};var c=/\s+/,f=function(t,e,n,i){if(!n)return!0;if("object"===("undefined"==typeof n?"undefined":r(n))){for(var o in n)t[e].apply(t,[o,n[o]].concat(i));return!1}if(c.test(n)){for(var s=n.split(c),u=0,a=s.length;u<a;u++)t[e].apply(t,[s[u]].concat(i));return!1}return!0},h=function(t,e){var n,r=-1,i=t.length,o=e[0],s=e[1],u=e[2];switch(e.length){case 0:for(;++r<i;)(n=t[r]).callback.call(n.ctx);return;case 1:for(;++r<i;)(n=t[r]).callback.call(n.ctx,o);return;case 2:for(;++r<i;)(n=t[r]).callback.call(n.ctx,o,s);return;case 3:for(;++r<i;)(n=t[r]).callback.call(n.ctx,o,s,u);return;default:for(;++r<i;)(n=t[r]).callback.apply(n.ctx,e)}},d={listenTo:"on",listenToOnce:"once"};l.each(d,function(t,e){i[e]=function(e,n,i){return(this._listeners||(this._listeners={}))[e._listenerId||(e._listenerId=l.uniqueId("l"))]=e,"object"===("undefined"==typeof n?"undefined":r(n))&&(i=this),e[t](n,i,this),this}}),i.bind=i.on,i.unbind=i.off,i.mixin=function(t){var e=["on","once","off","trigger","stopListening","listenTo","listenToOnce","bind","unbind"];return l.each(e,function(e){t[e]=this[e]},this),t},"undefined"!=typeof t&&t.exports&&(e=t.exports=i),e.BackboneEvents=i}(void 0)},function(t,e,n){"use strict";t.exports=n(70)},function(t,e,n){"use strict";t.exports.seq=n(73)},function(t,e){"use strict";t.exports=function(t,e,n){this.seq=t,this.name=e,this.id=n,this.meta={}}},function(t,e,n){"use strict";t.exports=n(81)},function(t,e,n){var r,i,o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};(function(){function n(t){function e(e,n,r,i,o,s){for(;o>=0&&o<s;o+=t){var u=i?i[o]:o;r=n(r,e[u],u,e)}return r}return function(n,r,i,o){r=k(r,o,4);var s=!A(n)&&S.keys(n),u=(s||n).length,a=t>0?0:u-1;return arguments.length<3&&(i=n[s?s[a]:a],a+=t),e(n,r,i,s,a,u)}}function s(t){return function(e,n,r){n=j(n,r);for(var i=C(e),o=t>0?0:i-1;o>=0&&o<i;o+=t)if(n(e[o],o,e))return o;return-1}}function u(t,e,n){return function(r,i,o){var s=0,u=C(r);if("number"==typeof o)t>0?s=o>=0?o:Math.max(o+u,s):u=o>=0?Math.min(o+1,u):o+u+1;else if(n&&o&&u)return o=n(r,i),r[o]===i?o:-1;if(i!==i)return o=e(g.call(r,s,u),S.isNaN),o>=0?o+s:-1;for(o=t>0?s:u-1;o>=0&&o<u;o+=t)if(r[o]===i)return o;return-1}}function a(t,e){var n=R.length,r=t.constructor,i=S.isFunction(r)&&r.prototype||h,o="constructor";for(S.has(t,o)&&!S.contains(e,o)&&e.push(o);n--;)o=R[n],o in t&&t[o]!==i[o]&&!S.contains(e,o)&&e.push(o)}var l=this,c=l._,f=Array.prototype,h=Object.prototype,d=Function.prototype,p=f.push,g=f.slice,v=h.toString,m=h.hasOwnProperty,y=Array.isArray,_=Object.keys,b=d.bind,x=Object.create,w=function(){},S=function t(e){return e instanceof t?e:this instanceof t?void(this._wrapped=e):new t(e)};"undefined"!=typeof t&&t.exports&&(e=t.exports=S),e._=S,S.VERSION="1.8.3";var k=function(t,e,n){if(void 0===e)return t;switch(null==n?3:n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)};case 4:return function(n,r,i,o){return t.call(e,n,r,i,o)}}return function(){return t.apply(e,arguments)}},j=function(t,e,n){return null==t?S.identity:S.isFunction(t)?k(t,e,n):S.isObject(t)?S.matcher(t):S.property(t)};S.iteratee=function(t,e){return j(t,e,1/0)};var z=function(t,e){return function(n){var r=arguments.length;if(r<2||null==n)return n;for(var i=1;i<r;i++)for(var o=arguments[i],s=t(o),u=s.length,a=0;a<u;a++){var l=s[a];e&&void 0!==n[l]||(n[l]=o[l])}return n}},O=function(t){if(!S.isObject(t))return{};if(x)return x(t);w.prototype=t;var e=new w;return w.prototype=null,e},M=function(t){return function(e){return null==e?void 0:e[t]}},E=Math.pow(2,53)-1,C=M("length"),A=function(t){var e=C(t);return"number"==typeof e&&e>=0&&e<=E};S.each=S.forEach=function(t,e,n){e=k(e,n);var r,i;if(A(t))for(r=0,i=t.length;r<i;r++)e(t[r],r,t);else{var o=S.keys(t);for(r=0,i=o.length;r<i;r++)e(t[o[r]],o[r],t)}return t},S.map=S.collect=function(t,e,n){e=j(e,n);for(var r=!A(t)&&S.keys(t),i=(r||t).length,o=Array(i),s=0;s<i;s++){var u=r?r[s]:s;o[s]=e(t[u],u,t)}return o},S.reduce=S.foldl=S.inject=n(1),S.reduceRight=S.foldr=n(-1),S.find=S.detect=function(t,e,n){var r;if(r=A(t)?S.findIndex(t,e,n):S.findKey(t,e,n),void 0!==r&&r!==-1)return t[r]},S.filter=S.select=function(t,e,n){var r=[];return e=j(e,n),S.each(t,function(t,n,i){e(t,n,i)&&r.push(t)}),r},S.reject=function(t,e,n){return S.filter(t,S.negate(j(e)),n)},S.every=S.all=function(t,e,n){e=j(e,n);for(var r=!A(t)&&S.keys(t),i=(r||t).length,o=0;o<i;o++){var s=r?r[o]:o;if(!e(t[s],s,t))return!1}return!0},S.some=S.any=function(t,e,n){e=j(e,n);for(var r=!A(t)&&S.keys(t),i=(r||t).length,o=0;o<i;o++){var s=r?r[o]:o;if(e(t[s],s,t))return!0}return!1},S.contains=S.includes=S.include=function(t,e,n,r){return A(t)||(t=S.values(t)),("number"!=typeof n||r)&&(n=0),S.indexOf(t,e,n)>=0},S.invoke=function(t,e){var n=g.call(arguments,2),r=S.isFunction(e);return S.map(t,function(t){var i=r?e:t[e];return null==i?i:i.apply(t,n)})},S.pluck=function(t,e){return S.map(t,S.property(e))},S.where=function(t,e){return S.filter(t,S.matcher(e))},S.findWhere=function(t,e){return S.find(t,S.matcher(e))},S.max=function(t,e,n){var r,i,o=-(1/0),s=-(1/0);if(null==e&&null!=t){t=A(t)?t:S.values(t);for(var u=0,a=t.length;u<a;u++)r=t[u],r>o&&(o=r)}else e=j(e,n),S.each(t,function(t,n,r){i=e(t,n,r),(i>s||i===-(1/0)&&o===-(1/0))&&(o=t,s=i)});return o},S.min=function(t,e,n){var r,i,o=1/0,s=1/0;if(null==e&&null!=t){t=A(t)?t:S.values(t);for(var u=0,a=t.length;u<a;u++)r=t[u],r<o&&(o=r)}else e=j(e,n),S.each(t,function(t,n,r){i=e(t,n,r),(i<s||i===1/0&&o===1/0)&&(o=t,s=i)});return o},S.shuffle=function(t){for(var e,n=A(t)?t:S.values(t),r=n.length,i=Array(r),o=0;o<r;o++)e=S.random(0,o),e!==o&&(i[o]=i[e]),i[e]=n[o];return i},S.sample=function(t,e,n){return null==e||n?(A(t)||(t=S.values(t)),t[S.random(t.length-1)]):S.shuffle(t).slice(0,Math.max(0,e))},S.sortBy=function(t,e,n){return e=j(e,n),S.pluck(S.map(t,function(t,n,r){return{value:t,index:n,criteria:e(t,n,r)}}).sort(function(t,e){var n=t.criteria,r=e.criteria;if(n!==r){if(n>r||void 0===n)return 1;if(n<r||void 0===r)return-1}return t.index-e.index}),"value")};var T=function(t){return function(e,n,r){var i={};return n=j(n,r),S.each(e,function(r,o){t(i,r,n(r,o,e))}),i}};S.groupBy=T(function(t,e,n){S.has(t,n)?t[n].push(e):t[n]=[e]}),S.indexBy=T(function(t,e,n){t[n]=e}),S.countBy=T(function(t,e,n){S.has(t,n)?t[n]++:t[n]=1}),S.toArray=function(t){return t?S.isArray(t)?g.call(t):A(t)?S.map(t,S.identity):S.values(t):[]},S.size=function(t){return null==t?0:A(t)?t.length:S.keys(t).length},S.partition=function(t,e,n){e=j(e,n);var r=[],i=[];return S.each(t,function(t,n,o){(e(t,n,o)?r:i).push(t)}),[r,i]},S.first=S.head=S.take=function(t,e,n){if(null!=t)return null==e||n?t[0]:S.initial(t,t.length-e)},S.initial=function(t,e,n){return g.call(t,0,Math.max(0,t.length-(null==e||n?1:e)))},S.last=function(t,e,n){if(null!=t)return null==e||n?t[t.length-1]:S.rest(t,Math.max(0,t.length-e))},S.rest=S.tail=S.drop=function(t,e,n){return g.call(t,null==e||n?1:e)},S.compact=function(t){return S.filter(t,S.identity)};var I=function t(e,n,r,i){for(var o=[],s=0,u=i||0,a=C(e);u<a;u++){var l=e[u];if(A(l)&&(S.isArray(l)||S.isArguments(l))){n||(l=t(l,n,r));var c=0,f=l.length;for(o.length+=f;c<f;)o[s++]=l[c++]}else r||(o[s++]=l)}return o};S.flatten=function(t,e){return I(t,e,!1)},S.without=function(t){return S.difference(t,g.call(arguments,1))},S.uniq=S.unique=function(t,e,n,r){S.isBoolean(e)||(r=n,n=e,e=!1),null!=n&&(n=j(n,r));for(var i=[],o=[],s=0,u=C(t);s<u;s++){var a=t[s],l=n?n(a,s,t):a;e?(s&&o===l||i.push(a),o=l):n?S.contains(o,l)||(o.push(l),i.push(a)):S.contains(i,a)||i.push(a)}return i},S.union=function(){return S.uniq(I(arguments,!0,!0))},S.intersection=function(t){for(var e=[],n=arguments.length,r=0,i=C(t);r<i;r++){var o=t[r];if(!S.contains(e,o)){for(var s=1;s<n&&S.contains(arguments[s],o);s++);s===n&&e.push(o)}}return e},S.difference=function(t){var e=I(arguments,!0,!0,1);return S.filter(t,function(t){return!S.contains(e,t)})},S.zip=function(){return S.unzip(arguments)},S.unzip=function(t){for(var e=t&&S.max(t,C).length||0,n=Array(e),r=0;r<e;r++)n[r]=S.pluck(t,r);return n},S.object=function(t,e){for(var n={},r=0,i=C(t);r<i;r++)e?n[t[r]]=e[r]:n[t[r][0]]=t[r][1];return n},S.findIndex=s(1),S.findLastIndex=s(-1),S.sortedIndex=function(t,e,n,r){n=j(n,r,1);for(var i=n(e),o=0,s=C(t);o<s;){var u=Math.floor((o+s)/2);n(t[u])<i?o=u+1:s=u}return o},S.indexOf=u(1,S.findIndex,S.sortedIndex),S.lastIndexOf=u(-1,S.findLastIndex),S.range=function(t,e,n){null==e&&(e=t||0,t=0),n=n||1;for(var r=Math.max(Math.ceil((e-t)/n),0),i=Array(r),o=0;o<r;o++,t+=n)i[o]=t;return i};var N=function(t,e,n,r,i){if(!(r instanceof e))return t.apply(n,i);var o=O(t.prototype),s=t.apply(o,i);return S.isObject(s)?s:o};S.bind=function(t,e){if(b&&t.bind===b)return b.apply(t,g.call(arguments,1));if(!S.isFunction(t))throw new TypeError("Bind must be called on a function");var n=g.call(arguments,2);return function r(){return N(t,r,e,this,n.concat(g.call(arguments)))}},S.partial=function(t){var e=g.call(arguments,1);return function n(){for(var r=0,i=e.length,o=Array(i),s=0;s<i;s++)o[s]=e[s]===S?arguments[r++]:e[s];for(;r<arguments.length;)o.push(arguments[r++]);return N(t,n,this,this,o)}},S.bindAll=function(t){var e,n,r=arguments.length;if(r<=1)throw new Error("bindAll must be passed function names");for(e=1;e<r;e++)n=arguments[e],t[n]=S.bind(t[n],t);return t},S.memoize=function(t,e){var n=function n(r){var i=n.cache,o=""+(e?e.apply(this,arguments):r);return S.has(i,o)||(i[o]=t.apply(this,arguments)),i[o]};return n.cache={},n},S.delay=function(t,e){var n=g.call(arguments,2);return setTimeout(function(){return t.apply(null,n)},e)},S.defer=S.partial(S.delay,S,1),S.throttle=function(t,e,n){var r,i,o,s=null,u=0;n||(n={});var a=function(){u=n.leading===!1?0:S.now(),s=null,o=t.apply(r,i),s||(r=i=null)};return function(){var l=S.now();u||n.leading!==!1||(u=l);var c=e-(l-u);return r=this,i=arguments,c<=0||c>e?(s&&(clearTimeout(s),s=null),u=l,o=t.apply(r,i),s||(r=i=null)):s||n.trailing===!1||(s=setTimeout(a,c)),o}},S.debounce=function(t,e,n){var r,i,o,s,u,a=function a(){var l=S.now()-s;l<e&&l>=0?r=setTimeout(a,e-l):(r=null,n||(u=t.apply(o,i),r||(o=i=null)))};return function(){o=this,i=arguments,s=S.now();var l=n&&!r;return r||(r=setTimeout(a,e)),l&&(u=t.apply(o,i),o=i=null),u}},S.wrap=function(t,e){return S.partial(e,t)},S.negate=function(t){return function(){return!t.apply(this,arguments)}},S.compose=function(){var t=arguments,e=t.length-1;return function(){for(var n=e,r=t[e].apply(this,arguments);n--;)r=t[n].call(this,r);return r}},S.after=function(t,e){return function(){if(--t<1)return e.apply(this,arguments)}},S.before=function(t,e){var n;return function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=null),n}},S.once=S.partial(S.before,2);var L=!{toString:null}.propertyIsEnumerable("toString"),R=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];S.keys=function(t){if(!S.isObject(t))return[];if(_)return _(t);var e=[];for(var n in t)S.has(t,n)&&e.push(n);return L&&a(t,e),e},S.allKeys=function(t){if(!S.isObject(t))return[];var e=[];for(var n in t)e.push(n);return L&&a(t,e),e},S.values=function(t){for(var e=S.keys(t),n=e.length,r=Array(n),i=0;i<n;i++)r[i]=t[e[i]];return r},S.mapObject=function(t,e,n){e=j(e,n);for(var r,i=S.keys(t),o=i.length,s={},u=0;u<o;u++)r=i[u],s[r]=e(t[r],r,t);return s},S.pairs=function(t){for(var e=S.keys(t),n=e.length,r=Array(n),i=0;i<n;i++)r[i]=[e[i],t[e[i]]];return r},S.invert=function(t){for(var e={},n=S.keys(t),r=0,i=n.length;r<i;r++)e[t[n[r]]]=n[r];return e},S.functions=S.methods=function(t){var e=[];for(var n in t)S.isFunction(t[n])&&e.push(n);return e.sort()},S.extend=z(S.allKeys),S.extendOwn=S.assign=z(S.keys),S.findKey=function(t,e,n){e=j(e,n);for(var r,i=S.keys(t),o=0,s=i.length;o<s;o++)if(r=i[o],e(t[r],r,t))return r},S.pick=function(t,e,n){var r,i,o={},s=t;if(null==s)return o;S.isFunction(e)?(i=S.allKeys(s),r=k(e,n)):(i=I(arguments,!1,!1,1),r=function(t,e,n){return e in n},s=Object(s));for(var u=0,a=i.length;u<a;u++){var l=i[u],c=s[l];r(c,l,s)&&(o[l]=c)}return o},S.omit=function(t,e,n){if(S.isFunction(e))e=S.negate(e);else{var r=S.map(I(arguments,!1,!1,1),String);e=function(t,e){return!S.contains(r,e)}}return S.pick(t,e,n)},S.defaults=z(S.allKeys,!0),S.create=function(t,e){var n=O(t);return e&&S.extendOwn(n,e),n},S.clone=function(t){return S.isObject(t)?S.isArray(t)?t.slice():S.extend({},t):t},S.tap=function(t,e){return e(t),t},S.isMatch=function(t,e){var n=S.keys(e),r=n.length;if(null==t)return!r;for(var i=Object(t),o=0;o<r;o++){var s=n[o];if(e[s]!==i[s]||!(s in i))return!1}return!0};var q=function t(e,n,r,i){if(e===n)return 0!==e||1/e===1/n;if(null==e||null==n)return e===n;e instanceof S&&(e=e._wrapped),n instanceof S&&(n=n._wrapped);var s=v.call(e);if(s!==v.call(n))return!1;switch(s){case"[object RegExp]":case"[object String]":return""+e==""+n;case"[object Number]":return+e!==+e?+n!==+n:0===+e?1/+e===1/n:+e===+n;case"[object Date]":case"[object Boolean]":return+e===+n}var u="[object Array]"===s;if(!u){if("object"!=("undefined"==typeof e?"undefined":o(e))||"object"!=("undefined"==typeof n?"undefined":o(n)))return!1;var a=e.constructor,l=n.constructor;if(a!==l&&!(S.isFunction(a)&&a instanceof a&&S.isFunction(l)&&l instanceof l)&&"constructor"in e&&"constructor"in n)return!1}r=r||[],i=i||[];for(var c=r.length;c--;)if(r[c]===e)return i[c]===n;if(r.push(e),i.push(n),u){if(c=e.length,c!==n.length)return!1;for(;c--;)if(!t(e[c],n[c],r,i))return!1}else{var f,h=S.keys(e);if(c=h.length,S.keys(n).length!==c)return!1;for(;c--;)if(f=h[c],!S.has(n,f)||!t(e[f],n[f],r,i))return!1}return r.pop(),i.pop(),!0};S.isEqual=function(t,e){return q(t,e)},S.isEmpty=function(t){return null==t||(A(t)&&(S.isArray(t)||S.isString(t)||S.isArguments(t))?0===t.length:0===S.keys(t).length)},S.isElement=function(t){return!(!t||1!==t.nodeType)},S.isArray=y||function(t){return"[object Array]"===v.call(t)},S.isObject=function(t){var e="undefined"==typeof t?"undefined":o(t);return"function"===e||"object"===e&&!!t},S.each(["Arguments","Function","String","Number","Date","RegExp","Error"],function(t){S["is"+t]=function(e){return v.call(e)==="[object "+t+"]"}}),S.isArguments(arguments)||(S.isArguments=function(t){return S.has(t,"callee")}),"function"!=typeof/./&&"object"!=("undefined"==typeof Int8Array?"undefined":o(Int8Array))&&(S.isFunction=function(t){return"function"==typeof t||!1}),S.isFinite=function(t){return isFinite(t)&&!isNaN(parseFloat(t))},S.isNaN=function(t){return S.isNumber(t)&&t!==+t},S.isBoolean=function(t){return t===!0||t===!1||"[object Boolean]"===v.call(t)},S.isNull=function(t){return null===t},S.isUndefined=function(t){return void 0===t},S.has=function(t,e){return null!=t&&m.call(t,e)},S.noConflict=function(){return l._=c,this},S.identity=function(t){return t},S.constant=function(t){return function(){return t}},S.noop=function(){},S.property=M,S.propertyOf=function(t){return null==t?function(){}:function(e){return t[e]}},S.matcher=S.matches=function(t){return t=S.extendOwn({},t),function(e){return S.isMatch(e,t)}},S.times=function(t,e,n){var r=Array(Math.max(0,t));e=k(e,n,1);for(var i=0;i<t;i++)r[i]=e(i);return r},S.random=function(t,e){return null==e&&(e=t,t=0),t+Math.floor(Math.random()*(e-t+1))},S.now=Date.now||function(){return(new Date).getTime()};var F={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},P=S.invert(F),B=function(t){var e=function(e){return t[e]},n="(?:"+S.keys(t).join("|")+")",r=RegExp(n),i=RegExp(n,"g");return function(t){return t=null==t?"":""+t,r.test(t)?t.replace(i,e):t}};S.escape=B(F),S.unescape=B(P),S.result=function(t,e,n){var r=null==t?void 0:t[e];return void 0===r&&(r=n),S.isFunction(r)?r.call(t):r};var W=0;S.uniqueId=function(t){var e=++W+"";return t?t+e:e},S.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var D=/(.)^/,H={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},U=/\\|'|\r|\n|\u2028|\u2029/g,V=function(t){return"\\"+H[t]};S.template=function(t,e,n){!e&&n&&(e=n),e=S.defaults({},e,S.templateSettings);var r=RegExp([(e.escape||D).source,(e.interpolate||D).source,(e.evaluate||D).source].join("|")+"|$","g"),i=0,o="__p+='";t.replace(r,function(e,n,r,s,u){return o+=t.slice(i,u).replace(U,V),i=u+e.length,n?o+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?o+="'+\n((__t=("+r+"))==null?'':__t)+\n'":s&&(o+="';\n"+s+"\n__p+='"),e}),o+="';\n",e.variable||(o="with(obj||{}){\n"+o+"}\n"),o="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+o+"return __p;\n";try{var s=new Function(e.variable||"obj","_",o)}catch(t){throw t.source=o,t}var u=function(t){return s.call(this,t,S)},a=e.variable||"obj";return u.source="function("+a+"){\n"+o+"}",u},S.chain=function(t){var e=S(t);return e._chain=!0,e};var $=function(t,e){return t._chain?S(e).chain():e};S.mixin=function(t){S.each(S.functions(t),function(e){var n=S[e]=t[e];S.prototype[e]=function(){var t=[this._wrapped];return p.apply(t,arguments),$(this,n.apply(S,t))}})},S.mixin(S),S.each(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var e=f[t];S.prototype[t]=function(){var n=this._wrapped;return e.apply(n,arguments),"shift"!==t&&"splice"!==t||0!==n.length||delete n[0],$(this,n)}}),S.each(["concat","join","slice"],function(t){var e=f[t];S.prototype[t]=function(){return $(this,e.apply(this._wrapped,arguments))}}),S.prototype.value=function(){return this._wrapped},S.prototype.valueOf=S.prototype.toJSON=S.prototype.value,S.prototype.toString=function(){return""+this._wrapped},r=[],i=function(){return S}.apply(e,r),!(void 0!==i&&(t.exports=i))}).call(void 0)},function(t,e){"use strict";t.exports={render_x_axis_label:function(){var t="Model Position";this.display_ali_map&&(t="Alignment Column"),this.called_on.find(".logo_xaxis").remove(),this.called_on.prepend('<div class="logo_xaxis" class="centered" style="margin-left:40px"><p class="xaxis_text" style="width:10em;margin:1em auto">'+t+"</p></div>")},render_y_axis_label:function(){this.dom_element.parent().before('<canvas class="logo_yaxis" height="'+this.options.height+'" width="55"></canvas>');var t=this.called_on.find(".logo_yaxis"),e=(Math.abs(this.data.max_height),isNaN(this.data.min_height_obs)?0:parseInt(this.data.min_height_obs,10),null),n="Information Content (bits)";e=t[0].getContext("2d"),e.beginPath(),e.moveTo(55,1),e.lineTo(40,1),e.moveTo(55,this.info_content_height),e.lineTo(40,this.info_content_height),e.moveTo(55,this.info_content_height/2),e.lineTo(40,this.info_content_height/2),e.lineWidth=1,e.strokeStyle="#666666",e.stroke(),e.fillStyle="#666666",e.textAlign="right",e.font="bold 10px Arial",e.textBaseline="top",e.fillText(parseFloat(this.data.max_height).toFixed(1),38,0),e.textBaseline="middle",e.fillText(parseFloat(this.data.max_height/2).toFixed(1),38,this.info_content_height/2),e.fillText("0",38,this.info_content_height),"score"===this.data.height_calc&&(n="Score (bits)"),e.save(),e.translate(5,this.height/2-20),e.rotate(-Math.PI/2),e.textAlign="center",e.font="normal 12px Arial",e.fillText(n,1,0),e.restore(),e.fillText("occupancy",55,this.info_content_height+7),this.show_inserts&&(e.fillText("ins. prob.",50,280),e.fillText("ins. len.",46,296))}}},function(t,e){"use strict";var n=null;t.exports=function(){if(!n){var t=document.createElement("canvas");n=!(!t.getContext||!t.getContext("2d"))}return n}},function(t,e){"use strict";t.exports={A:"#FF9966",C:"#009999",D:"#FF0000",E:"#CC0033",F:"#00FF00",G:"#f2f20c",H:"#660033",I:"#CC9933",K:"#663300",L:"#FF9933",M:"#CC99CC",N:"#336666",P:"#0099FF",Q:"#6666CC",R:"#990000",S:"#0000FF",T:"#00FFFF",V:"#FFCC33",W:"#66CC66",Y:"#006600"}},function(t,e){"use strict";t.exports={A:"#cbf751",C:"#5ec0cc",G:"#ffdf59",T:"#b51f16",U:"#b51f16"}},function(t,e,n){"use strict";var r=n(5);t.exports=function(t,e,n){t.find(".logo_settings_switch, .logo_settings .close").on("click",function(t){t.preventDefault(),r(".logo_settings").toggle()}),t.find(".logo_reset").on("click",function(t){t.preventDefault(),e.changeZoom({target:e.default_zoom})}),t.find(".logo_change").on("click",function(t){t.preventDefault()}),t.find(".logo_zoomin").on("click",function(t){t.preventDefault(),e.changeZoom({distance:.1,direction:"+"})}),t.find(".logo_zoomout").on("click",function(t){t.preventDefault(),e.changeZoom({distance:.1,direction:"-"})}),t.find(".logo_scale").on("change",function(t){e.toggleScale(this.value)}),t.find(".logo_color").on("change",function(t){e.toggleColorscheme(this.value)}),t.find(".logo_ali_map").on("change",function(t){e.toggleAliMap(this.value)}),t.find(".logo_position").on("change",function(){this.value.match(/^\d+$/m)&&e.scrollToColumn(this.value,1)}),n.on("dblclick",function(n){console.log("dblclick",e),offset=e.logo_graphic.offset(),x=parseInt(n.pageX-offset.left,10),window_position=n.pageX-t.parent().offset().left,col=e.columnFromCoordinates(x),console.log("col",col),current=e.zoom,current<1?e.changeZoom({target:1,offset:window_position,column:col}):e.changeZoom({target:.3,offset:window_position,column:col})}),r(document).on(t.attr("id")+".scrolledTo",function(t,n,r,i){e.render({target:n})}),r(document).on("keydown",function(t){t.ctrlKey||(61!==t.which&&107!==t.which||(zoom+=.1,e.changeZoom({distance:.1,direction:"+"})),109!==t.which&&0!==t.which||(zoom-=.1,e.changeZoom({distance:.1,direction:"-"})))})}},function(t,e,n){"use strict";_=n(75);var r=n(77),i=n(84),o=n(83),s=n(2),u=n(76),a=n(80),l=n(82),c=n(5);t.exports=s.extend({options:{xaxis:!0,yaxis:!0,height:300,column_width:34,debug:!0,scale_height_enabled:!0,scaled_max:!0,zoom_buttons:!0,colorscheme:"default",data:void 0,start:1,end:void 0,zoom:.4,colors:void 0,divider:!1,show_probs:!1,divider_step:5,show_divider:!1,border:!1,settings:!1,scroller:!0,positionMarker:!0},loadDefault:function(t){this.data=t.data,this.display_ali_map=0,this.alphabet=t.data.alphabet||"dna",this.start=t.start,this.zoom=parseFloat(t.zoom)||.4,this.default_zoom=this.zoom,this.column_width=t.column_width,this.height=t.height,this.canvas_width=5e3,this.scale_height_enabled=t.scale_height_enabled,this.scrollme=null,this.previous_target=0,this.rendered=[],this.previous_zoom=0,void 0==this.data.max_height&&(this.data.max_height=this.calcMaxHeight(this.data.heightArr)),this.data.insert_probs&&this.data.delete_probs||(this.options.show_probs=!1),t.scaled_max?this.data.max_height=t.data.max_height_obs||this.data.max_height||2:this.data.max_height=t.data.max_height_theory||this.data.max_height||2,t.colors?this.changeColors(t.colors):"aa"===this.alphabet?(this.aa_colors=n(78),this.changeColors(this.aa_colors)):(this.dna_colors=n(79),this.changeColors(this.dna_colors))},initialize:function(t){if(!r())return void(this.el.textContent="Your browser doesn't support canvas.");void 0==t.data&&(this.el.textContent="No data added."),_.extend(this.options,t);var e=this.options;if(this.loadDefault(e),this.options.show_probs?this.data.processing&&/^observed|weighted/.test(this.data.processing)?(this.show_inserts=0,this.info_content_height=this.height-14):(this.show_inserts=1,this.info_content_height=this.height-44):this.info_content_height=this.height,this.$el=c(this.el),this.initDivs(),this.options.settings){var n=l(this,e);this.$el.append(n)}a(this.$el,this,this.logo_graphic)},initDivs:function(){var t=f("div");t.className="logo_graphic",this.logo_graphic=c(t);var e=f("div");if(e.className="logo_container",e.style.height=this.height,this.container=c(e),this.container.append(t),this.$el.append(e),this.options.divider){var n=f("div");n.className="logo_divider",this.$el.append(n)}this.dom_element=c(t),this.called_on=this.$el,this.options.xaxis&&u.render_x_axis_label.call(this),this.options.yaxis?u.render_y_axis_label.call(this):this.container[0].style.marginLeft="0px"},render:function(){return i.call(this),this},changeColors:function(t){this.colors=t,void 0!=t&&void 0!=t.type&&(this.colorscheme="dynamic"),this.buildAlphabet()},buildAlphabet:function(){this.letters={};var t=this.colors;if("dynamic"==this.colorscheme){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZ".split("");t={},e.forEach(function(e){t[e]=""})}for(var n in t)if(t.hasOwnProperty(n)){var r={color:t[n]};this.letters[n]=new o(n,r)}},toggleColorscheme:function(t){var e=this.currentColumn();t?"default"===t?this.colorscheme="default":this.colorscheme="consensus":"default"===this.colorscheme?this.colorscheme="consensus":this.colorscheme="default",this.rendered=[],this.scrollme.reflow(),this.scrollToColumn(e+1),this.scrollToColumn(e)},toggleScale:function(t){var e=this.currentColumn();t?"obs"===t?this.data.max_height=this.data.max_height_obs:this.data.max_height=this.data.max_height_theory:this.data.max_height===this.data.max_height_obs?this.data.max_height=this.data.max_height_theory:this.data.max_height=this.data.max_height_obs,this.rendered=[],this.logoYAxis&&this.logoYAxis.remove(),u.render_y_axis_label.call(this),this.scrollme.reflow(),this.scrollToColumn(e+1),this.scrollToColumn(e)},toggleAliMap:function(t){var e=this.currentColumn();t?"model"===t?this.display_ali_map=0:this.display_ali_map=1:1===this.display_ali_map?this.display_ali_map=0:this.display_ali_map=1,u.render_x_axis_label(this),this.rendered=[],this.scrollme.reflow(),this.scrollToColumn(e+1),this.scrollToColumn(e)},currentColumn:function(){var t=this.scrollme.scroller.getValues().left,e=this.column_width*this.zoom,n=t/e,r=this.container.width()/e/2;return Math.ceil(n+r)},changeZoom:function(t){var e=.3,n=null;if(t.target?e=t.target:t.distance&&(e=(parseFloat(this.zoom)-parseFloat(t.distance)).toFixed(1),"+"===t.direction&&(e=(parseFloat(this.zoom)+parseFloat(t.distance)).toFixed(1))),e>1?e=1:e<.1&&(e=.1),n=this.logo_graphic.width()*e/this.zoom,n>this.container.width())if(t.column){this.zoom=e,this.render({zoom:this.zoom}),this.scrollme.reflow();var r=this.coordinatesFromColumn(t.column);this.scrollme.scroller.scrollTo(r-t.offset)}else{var i=this.currentColumn();this.zoom=e,this.render({zoom:this.zoom}),this.scrollme.reflow(),this.scrollToColumn(i)}return this.zoom},columnFromCoordinates:function(t){return Math.ceil(t/(this.column_width*this.zoom))},coordinatesFromColumn:function(t){return(t-1)*(this.column_width*this.zoom)+this.column_width*this.zoom/2},scrollToColumn:function(t,e){var n=this.logo_container.width()/2,r=this.coordinatesFromColumn(t);this.scrollme.scroller.scrollTo(r-n,0,e)},calcMaxHeight:function(t){return t.reduce(function(t,e){var n=0;for(var r in e)n+=e[r];return n>t?n:t},0)}});var f=function(t){return document.createElement(t)}},function(t,e,n){"use strict";var r=n(5);t.exports=function(t,e){var n=r('<form class="logo_form"><fieldset><label for="position">Column number</label><input type="text" name="position" class="logo_position"></input><button class="button logo_change">Go</button></fieldset></form>'),i=r('<div class="logo_settings"></div>');if(i.append('<span class="close">x</span>'),t.scale_height_enabled&&t.data.max_height_obs<t.data.max_height_theory){var o="",s="",u="",a="";t.data.max_height_obs===t.data.max_height?o="checked":s="checked"}var l='<fieldset><legend>Scale</legend><label><input type="radio" name="scale" class="logo_scale" value="obs" '+o+"/>Maximum Observed "+a+'</label></br><label><input type="radio" name="scale" class="logo_scale" value="theory" '+s+"/>Maximum Theoretical "+u+"</label></fieldset>";if(i.append(l),"score"!==t.data.height_calc&&"aa"===t.data.alphabet&&t.data.probs_arr){var c=null,f=null,h="",d="";"default"===t.colorscheme?c="checked":f="checked",e.help&&(h='<a class="help" href="/help#colors_default" title="Each letter receives its own color."><span aria-hidden="true" data-icon="?"></span><span class="reader-text">help</span></a>',d='<a class="help" href="/help#colors_consensus" title="Letters are colored as in Clustalx and Jalview, with colors depending on composition of the column."><span aria-hidden="true" data-icon="?"></span><span class="reader-text">help</span></a>');var p='<fieldset><legend>Color Scheme</legend><label><input type="radio" name="color" class="logo_color" value="default" '+c+"/>Default "+h+'</label></br><label><input type="radio" name="color" class="logo_color" value="consensus" '+f+"/>Consensus Colors "+d+"</label></fieldset>";i.append(p)}if(t.data.ali_map){var g=null,v=null,m="",y="";0===t.display_ali_map?g="checked":v="checked",e.help&&(m='<a class="help" href="/help#coords_model" title="The coordinates along the top of the plot show the model position."><span aria-hidden="true" data-icon="?"></span><span class="reader-text">help</span></a>',y='<a class="help" href="/help#coords_ali" title="The coordinates along the top of the plot show the column in the alignment associated with the model"><span aria-hidden="true" data-icon="?"></span><span class="reader-text">help</span></a>');var _='<fieldset><legend>Coordinates</legend><label><input type="radio" name="coords" class="logo_ali_map" value="model" '+g+"/>Model "+m+'</label></br><label><input type="radio" name="coords" class="logo_ali_map" value="alignment" '+v+"/>Alignment "+y+"</label></fieldset>";i.append(_)}var b=r('<div class="logo_controls"></div>');return t.zoom_enabled&&b.append('<button class="logo_zoomout button">-</button><button class="logo_zoomin button">+</button>'),i.children().length>0&&(b.append('<button class="logo_settings_switch button">Settings</button>'),b.append(i)),n.append(b),n}},function(t,e){"use strict";t.exports=function(t,e){e=e||{},this.value=t,this.width=parseInt(e.width,10)||100,"W"===this.value&&(this.width+=30*this.width/100),this.height=parseInt(e.height,10)||100,this.color=e.color||"#000000",this.fontSize=e.fontSize||138,this.scaled=function(){},this.draw=function(t,e,n,r,i,o){
  var s=e/this.height,u=n/this.width,a=t.font;t.transform(u,0,0,s,r,i),t.fillStyle=o||this.color,t.textAlign="center",t.font="bold "+this.fontSize+"px Arial",t.fillText(this.value,0,0),t.setTransform(1,0,0,1,0,0),t.fillStyle="#000000",t.font=a}}},function(t,e,n){"use strict";function r(t,e,n,r,i){var o=s(t).find("#canv_"+r);return o.length||(s(t).append('<canvas class="canvas_logo" id="canv_'+r+'"  height="'+e+'" width="'+n+'" style="left:'+i*r+'px"></canvas>'),o=s(t).find("#canv_"+r)),s(o).attr("width",n).attr("height",e),o[0]}var i=n(86),o=n(85),s=n(5);t.exports=function(t){if(this.data){t=t||{};var e=t.zoom||this.zoom,n=t.target||1,s=(t.scaled||null,this.dom_element.parent().attr("width")),u=1,a=null,l=null,c=0;if(this.previous_target=n,t.start&&(this.start=t.start),t.end&&(this.end=t.end),e<=.1?e=.1:e>=1&&(e=1),this.zoom=e,a=this.end||this.data.heightArr.length,l=this.start||1,a=a>this.data.heightArr.length?this.data.heightArr.length:a,a=a<l?l:a,l=l>a?a:l,l=l>1?l:1,this.y=this.height-20,this.max_width=this.column_width*(a-l+1),s>this.max_width&&(e=1,this.zoom_enabled=!1),this.zoom=e,this.zoomed_column=this.column_width*e,this.total_width=this.zoomed_column*(a-l+1),e<1)for(;this.total_width<s&&(this.zoom+=.1,this.zoomed_column=this.column_width*this.zoom,this.total_width=this.zoomed_column*(a-l+1),this.zoom_enabled=!1,!(e>=1)););n>this.total_width&&(n=this.total_width),this.dom_element.attr({width:this.total_width+"px"}).css({width:this.total_width+"px"}),this.canvas_width=this.total_width;var f=Math.ceil(this.total_width/this.canvas_width);for(this.columns_per_canvas=Math.ceil(this.canvas_width/this.zoomed_column),this.previous_zoom!==this.zoom&&(this.dom_element.find("canvas").remove(),this.previous_zoom=this.zoom,this.rendered=[]),this.canvases=[],this.contexts=[],c=0;c<f;c++){var h=this.columns_per_canvas*c+l,d=h+this.columns_per_canvas-1;d>a&&(d=a);var p=(d-h+1)*this.zoomed_column;p>u&&(u=p);var g=u*c,v=g+p;if(n<v+v/2&&n>g-g/2)if(this.canvases[c]=r(this.dom_element,this.height,p,c,u),this.contexts[c]=this.canvases[c].getContext("2d"),this.contexts[c].setTransform(1,0,0,1,0,0),this.contexts[c].clearRect(0,0,p,this.height),this.contexts[c].fillStyle="#ffffff",this.contexts[c].fillRect(0,0,v,this.height),this.zoomed_column>12){var m=parseInt(10*e,10);m=m>10?10:m,this.debug&&o.call(this,h,d,c,1),i.call(this,h,d,c,m)}else o.call(this,h,d,c)}!this.scrollme&&this.options.scroller&&(this.scrollme=new EasyScroller(this.dom_element[0],{scrollingX:1,scrollingY:0,eventTarget:this.called_on})),1!==n&&this.scrollme.reflow()}}},function(t,e,n){"use strict";function r(t,e,n,r,i,o,s,u){var a="#ffffff";u?(i>.1?a="#d7301f":i>.05?a="#fc8d59":i>.03&&(a="#fdcc8a"),t.fillStyle=a,t.fillRect(e,n+15,r,10),a="#ffffff",o>9?a="#d7301f":o>7?a="#fc8d59":o>4&&(a="#fdcc8a"),t.fillStyle=a,t.fillRect(e,n+30,r,10)):n+=30,a="#ffffff",s<.75?a="#2171b5":s<.85?a="#6baed6":s<.95&&(a="#bdd7e7"),t.fillStyle=a,t.fillRect(e,n,r,10)}var i=n(44),o=n(46),s=n(45);t.exports=function(t,e,n,u){var a=0,l=t,c=null,f=0,h=Math.abs(this.data.max_height),d=Math.abs(this.data.min_height_obs),p=h+d,g=Math.round(100*Math.abs(this.data.max_height)/p),v=Math.round(this.info_content_height*g/100),m=(this.info_content_height-v,10);for(f=t;f<=e;f++){if(this.data.mmline&&1===this.data.mmline[f-1])this.contexts[n].fillStyle="#cccccc",this.contexts[n].fillRect(a,10,this.zoomed_column,this.height-40);else{var y=this.data.heightArr[f-1],_=0,b=(y.length,0);for(var b in y){var x=[b,y[b]];if(x[1]>.01){var w=parseFloat(x[1])/this.data.max_height,S=a,k=(this.info_content_height-2)*w,j=this.info_content_height-2-_-k,z=null;z="dynamic"===this.colorscheme?this.colors.getColor(x[0],{pos:f-1}):"consensus"===this.colorscheme?this.cmap[f-1][x[0]]||"#7a7a7a":this.colors[x[0]],u?(this.contexts[n].strokeStyle=z,this.contexts[n].strokeRect(S,j,this.zoomed_column,k)):(this.contexts[n].fillStyle=z,this.contexts[n].fillRect(S,j,this.zoomed_column,k)),_+=k}}}this.zoom<.2?m=20:this.zoom<.3&&(m=10),this.options.positionMarker&&f%m===0&&(this.options.show_probs&&o(this.contexts[n],a+this.zoomed_column,this.height-30,parseFloat(this.height),"#dddddd"),o(this.contexts[n],a+this.zoomed_column,0,5),c=this.display_ali_map?this.data.ali_map[f-1]:l,s(this.contexts[n],a-2,10,this.zoomed_column,c,10,!0)),this.options.show_probs&&r(this.contexts[n],a,this.height-42,this.zoomed_column,this.data.insert_probs[f-1],this.data.insert_lengths[f-1],this.data.delete_probs[f-1],this.show_inserts),this.options.show_probs&&(this.show_inserts?i(this.contexts[n],this.height-45,this.total_width):i(this.contexts[n],this.height-15,this.total_width)),this.options.border&&i(this.contexts[n],0,this.total_width),a+=this.zoomed_column,l++}}},function(t,e,n){"use strict";function r(t,e,n,r,o,s,u){var a=n-4,l="#ffffff",c="#555555";u&&(a=n-35),o<.75?(l="#2171b5",c="#ffffff"):o<.85?l="#6baed6":o<.95&&(l="#bdd7e7"),i(t,e,a,o,s,r,l,c)}function i(t,e,n,r,i,o,s,u){t.font=i+"px Arial",t.fillStyle=s,t.fillRect(e,n-10,o,14),t.textAlign="center",t.fillStyle=u,t.fillText(r,e+o/2,n)}function o(t,e){var n=e.ralign?e.x+t.zoomed_column:e.x,r=e.ralign?e.x+2:e.x;l(t.contexts[e.context_num],n,t.height-30,-30-t.height,"#dddddd"),l(t.contexts[e.context_num],n,0,5),c(t.contexts[e.context_num],r,10,t.zoomed_column,e.column_num,e.fontsize,e.ralign)}function s(t,e,n,r,o,s){var u=n-20,a="#ffffff",c="#555555";o>.1?(a="#d7301f",c="#ffffff"):o>.05?a="#fc8d59":o>.03&&(a="#fdcc8a"),i(t,e,u,o,s,r,a,c),o>.03&&l(t,e+r,n-30,-30-n,a)}function u(t,e,n,r,o,s){var u="#ffffff",a="#555555";o>9?(u="#d7301f",a="#ffffff"):o>7?u="#fc8d59":o>4&&(u="#fdcc8a"),i(t,e,n,o,s,r,u,a)}var a=n(44),l=n(46),c=n(45);t.exports=function(t,e,n,i){var c=0,f=t,h=null,d=0,p=Math.abs(this.data.max_height),g=isNaN(this.data.min_height_obs)?0:parseInt(this.data.min_height_obs,10),v=p+Math.abs(g),m=Math.round(100*Math.abs(this.data.max_height)/v),y=Math.round(this.info_content_height*m/100),_=this.info_content_height-y;for(y/this.info_content_height,_/this.info_content_height,e+3<=this.end&&(e+=3),d=t;d<=e;d++){if(this.data.mmline&&1===this.data.mmline[d-1])this.contexts[n].fillStyle="#cccccc",this.contexts[n].fillRect(c,10,this.zoomed_column,this.height-40);else{var b=this.data.heightArr[d-1],x=[];if(b){var w=0,S=(b.length,0),k=null;for(var S in b){var j=b[S],z=[S,j],O=c+this.zoomed_column/2,M=null;if(z[1]>.01){M=parseFloat(z[1])/this.data.max_height;var E=this.info_content_height-2-w,C=(this.info_content_height-2)*M;x[S]=[C,this.zoomed_column,O,E],w+=C}}for(var S in b)x[S]&&this.letters[S]&&(k="dynamic"===this.colorscheme?this.colors.getColor(S,{pos:d-1}):"consensus"===this.colorscheme?this.cmap[d-1][S]||"#7a7a7a":null,this.letters[S].draw(this.contexts[n],x[S][0],x[S][1],x[S][2],x[S][3],k))}}h=this.display_ali_map?this.data.ali_map[d-1]:f,this.options.show_divider&&(this.zoom<.7?d%this.options.divider_step===0&&o(this,{context_num:n,x:c,fontsize:10,column_num:h,ralign:!0}):o(this,{context_num:n,x:c,fontsize:i,column_num:h})),this.options.show_probs&&(r(this.contexts[n],c,this.height,this.zoomed_column,this.data.delete_probs[d-1],i,this.show_inserts),l(this.contexts[n],c,this.height-15,5),this.show_inserts&&(s(this.contexts[n],c,this.height,this.zoomed_column,this.data.insert_probs[d-1],i),u(this.contexts[n],c,this.height-5,this.zoomed_column,this.data.insert_lengths[d-1],i),l(this.contexts[n],c,this.height-45,5),l(this.contexts[n],c,this.height-30,5))),c+=this.zoomed_column,f++}this.options.show_probs&&(this.show_inserts&&(a(this.contexts[n],this.height-30,this.total_width),a(this.contexts[n],this.height-45,this.total_width)),a(this.contexts[n],this.height-15,this.total_width)),this.options.border&&a(this.contexts[n],0,this.total_width)}},function(t,e){"use strict";var n=window.HTMLCanvasElement&&window.HTMLCanvasElement.prototype,r=window.Blob&&function(){try{return Boolean(new Blob)}catch(t){return!1}}(),i=r&&window.Uint8Array&&function(){try{return 100===new Blob([new Uint8Array(100)]).size}catch(t){return!1}}(),o=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,s=(r||o)&&window.atob&&window.ArrayBuffer&&window.Uint8Array&&function(t){var e,n,s,u,a,l;for(e=t.split(",")[0].indexOf("base64")>=0?atob(t.split(",")[1]):decodeURIComponent(t.split(",")[1]),n=new ArrayBuffer(e.length),s=new Uint8Array(n),u=0;u<e.length;u+=1)s[u]=e.charCodeAt(u);return a=t.split(",")[0].split(":")[1].split(";")[0],r?new Blob([i?s:n],{type:a}):(l=new o,l.append(n),l.getBlob(a))};window.HTMLCanvasElement&&!n.toBlob&&(n.mozGetAsFile?n.toBlob=function(t,e,r){t(r&&n.toDataURL&&s?s(this.toDataURL(e,r)):this.mozGetAsFile("blob",e))}:n.toDataURL&&s&&(n.toBlob=function(t,e,n){t(s(this.toDataURL(e,n)))})),t.exports=s},function(t,e,n){(function(t){"use strict";/*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */
  var e=e||"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob&&navigator.msSaveOrOpenBlob.bind(navigator)||function(t){if("undefined"==typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var e=t.document,n=function(){return t.URL||t.webkitURL||t},r=e.createElementNS("http://www.w3.org/1999/xhtml","a"),i=!t.externalHost&&"download"in r,o=function(n){var r=e.createEvent("MouseEvents");r.initMouseEvent("click",!0,!1,t,0,0,0,0,0,!1,!1,!1,!1,0,null),n.dispatchEvent(r)},s=t.webkitRequestFileSystem,u=t.requestFileSystem||s||t.mozRequestFileSystem,a=function(e){(t.setImmediate||t.setTimeout)(function(){throw e},0)},l="application/octet-stream",c=0,f=[],h=function(){for(var t=f.length;t--;){var e=f[t];"string"==typeof e?n().revokeObjectURL(e):e.remove()}f.length=0},d=function(t,e,n){e=[].concat(e);for(var r=e.length;r--;){var i=t["on"+e[r]];if("function"==typeof i)try{i.call(t,n||t)}catch(t){a(t)}}},p=function(e,a){var h,p,g,v=this,m=e.type,y=!1,_=function(){var t=n().createObjectURL(e);return f.push(t),t},b=function(){d(v,"writestart progress write writeend".split(" "))},x=function(){!y&&h||(h=_(e)),p?p.location.href=h:window.open(h,"_blank"),v.readyState=v.DONE,b()},w=function(t){return function(){if(v.readyState!==v.DONE)return t.apply(this,arguments)}},S={create:!0,exclusive:!1};return v.readyState=v.INIT,a||(a="download"),i?(h=_(e),r.href=h,r.download=a,o(r),v.readyState=v.DONE,void b()):(t.chrome&&m&&m!==l&&(g=e.slice||e.webkitSlice,e=g.call(e,0,e.size,l),y=!0),s&&"download"!==a&&(a+=".download"),(m===l||s)&&(p=t),u?(c+=e.size,void u(t.TEMPORARY,c,w(function(t){t.root.getDirectory("saved",S,w(function(t){var n=function(){t.getFile(a,S,w(function(t){t.createWriter(w(function(n){n.onwriteend=function(e){p.location.href=t.toURL(),f.push(t),v.readyState=v.DONE,d(v,"writeend",e)},n.onerror=function(){var t=n.error;t.code!==t.ABORT_ERR&&x()},"writestart progress write abort".split(" ").forEach(function(t){n["on"+t]=v["on"+t]}),n.write(e),v.abort=function(){n.abort(),v.readyState=v.DONE},v.readyState=v.WRITING}),x)}),x)};t.getFile(a,{create:!1},w(function(t){t.remove(),n()}),w(function(t){t.code===t.NOT_FOUND_ERR?n():x()}))}),x)}),x)):void x())},g=p.prototype,v=function(t,e){return new p(t,e)};return g.abort=function(){var t=this;t.readyState=t.DONE,d(t,"abort")},g.readyState=g.INIT=0,g.WRITING=1,g.DONE=2,g.error=g.onwritestart=g.onprogress=g.onwrite=g.onabort=g.onerror=g.onwriteend=null,t.addEventListener("unload",h,!1),v.unload=function(){h(),t.removeEventListener("unload",h,!1)},v}}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||(void 0).content),n=window.define;"undefined"==typeof n&&"undefined"!=typeof window.almond&&"define"in window.almond&&(n=window.almond.define),"undefined"!=typeof t&&null!==t?t.exports=e:"undefined"!=typeof n&&null!==n&&null!=n.amd&&n("saveAs",[],function(){return e})}).call(e,n(20)(t))},function(t,e){"use strict";t.exports=function(){var t=[];return t.toString=function(){for(var t=[],e=0;e<this.length;e++){var n=this[e];n[2]?t.push("@media "+n[2]+"{"+n[1]+"}"):t.push(n[1])}return t.join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},i=0;i<this.length;i++){var o=this[i][0];"number"==typeof o&&(r[o]=!0)}for(i=0;i<e.length;i++){var s=e[i];"number"==typeof s[0]&&r[s[0]]||(n&&!s[2]?s[2]=n:n&&(s[2]="("+s[2]+") and ("+n+")"),t.push(s))}},t}},function(t,e,n){"use strict";!function(n){function r(t,e){if(!(this instanceof r))return new r(t,e);this.domain=[],this.range=[],Array.isArray(t)&&(this.domain=t),Array.isArray(e)&&(this.range=e);var n=function(t){if("number"!=typeof t)return null;var e=this.domain[0],n=this.domain[1],r=this.range[0],i=this.range[1];return"number"!==r&&"number"!=typeof i&&(r=e,i=n),r+(i-r)/(n-e)*(t-e)}.bind(this);return n.domain=function(t){return Array.isArray(t)&&(this.domain=t),n}.bind(this),n.range=function(t){return Array.isArray(t)&&(this.range=t),n}.bind(this),n}"undefined"!=typeof t&&t.exports&&(e=t.exports=r),e.LinearScale=r}(void 0)},function(t,e){"use strict";t.exports={A:"#00a35c",R:"#00fc03",N:"#00eb14",D:"#00eb14",C:"#0000ff",Q:"#00f10e",E:"#00f10e",G:"#009d62",H:"#00d52a",I:"#0054ab",L:"#007b84",K:"#00ff00",M:"#009768",F:"#008778",P:"#00e01f",S:"#00d52a",T:"#00db24",W:"#00a857",Y:"#00e619",V:"#005fa0",B:"#00eb14",X:"#00b649",Z:"#00f10e"}},function(t,e){"use strict";t.exports={A:"#BBBBBB",B:"grey",C:"yellow",D:"red",E:"red",F:"magenta",G:"brown",H:"#00FFFF",I:"#BBBBBB",J:"#fff",K:"#00FFFF",L:"#BBBBBB",M:"#BBBBBB",N:"green",O:"#fff",P:"brown",Q:"green",R:"#00FFFF",S:"green",T:"green",U:"#fff",V:"#BBBBBB",W:"magenta",X:"grey",Y:"magenta",Z:"grey",Gap:"grey"}},function(t,e){"use strict";t.exports={A:"orange",B:"#fff",C:"green",D:"red",E:"red",F:"blue",G:"orange",H:"red",I:"green",J:"#fff",K:"red",L:"green",M:"green",N:"#fff",O:"#fff",P:"orange",Q:"#fff",R:"red",S:"orange",T:"orange",U:"#fff",V:"green",W:"blue",X:"#fff",Y:"blue",Z:"#fff",Gap:"#fff"}},function(t,e){"use strict";t.exports={A:"#80a0f0",R:"#f01505",N:"#00ff00",D:"#c048c0",C:"#f08080",Q:"#00ff00",E:"#c048c0",G:"#f09048",H:"#15a4a4",I:"#80a0f0",L:"#80a0f0",K:"#f01505",M:"#80a0f0",F:"#80a0f0",P:"#ffff00",S:"#00ff00",T:"#00ff00",W:"#80a0f0",Y:"#15a4a4",V:"#80a0f0",B:"#fff",X:"#fff",Z:"#fff"}},function(t,e){"use strict";t.exports={A:"#e718e7",R:"#6f906f",N:"#1be41b",D:"#778877",C:"#23dc23",Q:"#926d92",E:"#ff00ff",G:"#00ff00",H:"#758a75",I:"#8a758a",L:"#ae51ae",K:"#a05fa0",M:"#ef10ef",F:"#986798",P:"#00ff00",S:"#36c936",T:"#47b847",W:"#8a758a",Y:"#21de21",V:"#857a85",B:"#49b649",X:"#758a75",Z:"#c936c9"}},function(t,e){"use strict";t.exports={A:"#ad0052",B:"#0c00f3",C:"#c2003d",D:"#0c00f3",E:"#0c00f3",F:"#cb0034",G:"#6a0095",H:"#1500ea",I:"#ff0000",J:"#fff",K:"#0000ff",L:"#ea0015",M:"#b0004f",N:"#0c00f3",O:"#fff",P:"#4600b9",Q:"#0c00f3",R:"#0000ff",S:"#5e00a1",T:"#61009e",U:"#fff",V:"#f60009",W:"#5b00a4",X:"#680097",Y:"#4f00b0",Z:"#0c00f3"}},function(t,e,n){"use strict";function r(t){if(null==t||"object"!=("undefined"==typeof t?"undefined":i(t)))return t;var e=t.constructor();for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=n(103),s=o.stat,u=o.dyn,a=n(91),l=n(92),c=n(93),f=n(94),h=n(95),d=n(96),p=n(98),g=n(99),v=n(100),m=n(102),y=n(104),_=n(105),b=n(106),x=n(107),w={buried:a,buried_index:a,cinema:l,clustal2:f,clustal:c,helix:h,helix_propensity:h,hydro:d,lesk:p,mae:g,nucleotide:v,purine:m,purine_pyrimidine:m,strand:y,strand_propensity:y,taylor:_,turn:b,turn_propensity:b,zappo:x},S=n(101),k={pid:S},j=function(t){this.maps=r(w),this.dyn=r(k),this.opt=t};t.exports=j,j.getScheme=function(t){return w[t]},j.prototype.getScheme=function(t){var e=this.maps[t];return void 0===e&&(e={},void 0!=this.dyn[t])?new u(this.dyn[t],this.opt):new s(e)},j.prototype.addStaticScheme=function(t,e){this.maps[t]=e},j.prototype.addDynScheme=function(t,e){this.dyn[t]=e}},function(t,e){"use strict";t.exports={A:" orange",B:" #fff",C:" green",D:" red",E:" red",F:" green",G:" orange",H:" magenta",I:" green",J:" #fff",K:" red",L:" green",M:" green",N:" magenta",O:" #fff",P:" green",Q:" magenta",R:" red",S:" orange",T:" orange",U:" #fff",V:" green",W:" green",X:" #fff",Y:" green",Z:" #fff",Gap:" #fff"}},function(t,e){"use strict";t.exports={A:" #77dd88",B:" #fff",C:" #99ee66",D:" #55bb33",E:" #55bb33",F:" #9999ff",G:" #77dd88",H:" #5555ff",I:" #66bbff",J:" #fff",K:" #ffcc77",L:" #66bbff",M:" #66bbff",N:" #55bb33",O:" #fff",P:" #eeaaaa",Q:" #55bb33",R:" #ffcc77",S:" #ff4455",T:" #ff4455",U:" #fff",V:" #66bbff",W:" #9999ff",X:" #fff",Y:" #9999ff",Z:" #fff",Gap:" #fff"}},function(t,e){"use strict";t.exports={A:" #64F73F",C:" #FFB340",G:" #EB413C",T:" #3C88EE",U:" #3C88EE"}},function(t,e){"use strict";var n;t.exports=n={},n.init=function(){this.cons=this.opt.conservation()},n.run=function(t,e){var n=this.cons[e.pos];return n>.8?"#6464ff":n>.6?"#9da5ff":n>.4?"#cccccc":"#ffffff"}},function(t,e){"use strict";t.exports={A:" #FF83FA",C:" #40E0D0",G:" #FF83FA",R:" #FF83FA",T:" #40E0D0",U:" #40E0D0",Y:" #40E0D0"}},function(t,e){"use strict";var n=function(t){this.defaultColor="#ffffff",this.type="static",this.map=t,this.getColor=function(t){return void 0!==this.map[t]?this.map[t]:this.defaultColor}},r=function(t,e){this.type="dyn",this.opt=e,void 0!==t.init?(t.init.call(this),this.getColor=t.run,this.reset=t.init):this.getColor=t};t.exports.stat=n,t.exports.dyn=r},function(t,e){"use strict";t.exports={A:"#5858a7",R:"#6b6b94",N:"#64649b",D:"#2121de",C:"#9d9d62",Q:"#8c8c73",E:"#0000ff",G:"#4949b6",H:"#60609f",I:"#ecec13",L:"#b2b24d",K:"#4747b8",M:"#82827d",F:"#c2c23d",P:"#2323dc",S:"#4949b6",T:"#9d9d62",W:"#c0c03f",Y:"#d3d32c",V:"#ffff00",B:"#4343bc",X:"#797986",Z:"#4747b8"}},function(t,e){"use strict";t.exports={A:"#ccff00",R:"#0000ff",N:"#cc00ff",D:"#ff0000",C:"#ffff00",Q:"#ff00cc",E:"#ff0066",G:"#ff9900",H:"#0066ff",I:"#66ff00",L:"#33ff00",K:"#6600ff",M:"#00ff00",F:"#00ff66",P:"#ffcc00",S:"#ff3300",T:"#ff6600",W:"#00ccff",Y:"#00ffcc",V:"#99ff00",B:"#fff",X:"#fff",Z:"#fff"}},function(t,e){"use strict";t.exports={A:"#2cd3d3",R:"#708f8f",N:"#ff0000",D:"#e81717",C:"#a85757",Q:"#3fc0c0",E:"#778888",G:"#ff0000",H:"#708f8f",I:"#00ffff",L:"#1ce3e3",K:"#7e8181",M:"#1ee1e1",F:"#1ee1e1",P:"#f60909",S:"#e11e1e",T:"#738c8c",W:"#738c8c",Y:"#9d6262",V:"#07f8f8",B:"#f30c0c",X:"#7c8383",Z:"#5ba4a4"}},function(t,e){"use strict";t.exports={A:"#ffafaf",R:"#6464ff",N:"#00ff00",D:"#ff0000",C:"#ffff00",Q:"#00ff00",E:"#ff0000",G:"#ff00ff",H:"#6464ff",I:"#ffafaf",L:"#ffafaf",K:"#6464ff",M:"#ffafaf",F:"#ffc800",P:"#ff00ff",S:"#00ff00",T:"#00ff00",W:"#ffc800",Y:"#ffc800",V:"#ffafaf",B:"#fff",X:"#fff",Z:"#fff"}},function(t,e,n){var r,i,o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};(function(){function n(t){function e(e,n,r,i,o,s){for(;o>=0&&o<s;o+=t){var u=i?i[o]:o;r=n(r,e[u],u,e)}return r}return function(n,r,i,o){r=k(r,o,4);var s=!A(n)&&S.keys(n),u=(s||n).length,a=t>0?0:u-1;return arguments.length<3&&(i=n[s?s[a]:a],a+=t),e(n,r,i,s,a,u)}}function s(t){return function(e,n,r){n=j(n,r);for(var i=C(e),o=t>0?0:i-1;o>=0&&o<i;o+=t)if(n(e[o],o,e))return o;return-1}}function u(t,e,n){return function(r,i,o){var s=0,u=C(r);if("number"==typeof o)t>0?s=o>=0?o:Math.max(o+u,s):u=o>=0?Math.min(o+1,u):o+u+1;else if(n&&o&&u)return o=n(r,i),r[o]===i?o:-1;if(i!==i)return o=e(g.call(r,s,u),S.isNaN),o>=0?o+s:-1;for(o=t>0?s:u-1;o>=0&&o<u;o+=t)if(r[o]===i)return o;return-1}}function a(t,e){var n=R.length,r=t.constructor,i=S.isFunction(r)&&r.prototype||h,o="constructor";for(S.has(t,o)&&!S.contains(e,o)&&e.push(o);n--;)o=R[n],o in t&&t[o]!==i[o]&&!S.contains(e,o)&&e.push(o)}var l=this,c=l._,f=Array.prototype,h=Object.prototype,d=Function.prototype,p=f.push,g=f.slice,v=h.toString,m=h.hasOwnProperty,y=Array.isArray,_=Object.keys,b=d.bind,x=Object.create,w=function(){},S=function t(e){return e instanceof t?e:this instanceof t?void(this._wrapped=e):new t(e)};"undefined"!=typeof t&&t.exports&&(e=t.exports=S),e._=S,S.VERSION="1.8.3";var k=function(t,e,n){if(void 0===e)return t;switch(null==n?3:n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)};case 4:return function(n,r,i,o){return t.call(e,n,r,i,o)}}return function(){return t.apply(e,arguments)}},j=function(t,e,n){return null==t?S.identity:S.isFunction(t)?k(t,e,n):S.isObject(t)?S.matcher(t):S.property(t)};S.iteratee=function(t,e){return j(t,e,1/0)};var z=function(t,e){return function(n){var r=arguments.length;if(r<2||null==n)return n;for(var i=1;i<r;i++)for(var o=arguments[i],s=t(o),u=s.length,a=0;a<u;a++){var l=s[a];e&&void 0!==n[l]||(n[l]=o[l])}return n}},O=function(t){if(!S.isObject(t))return{};if(x)return x(t);w.prototype=t;var e=new w;return w.prototype=null,e},M=function(t){return function(e){return null==e?void 0:e[t]}},E=Math.pow(2,53)-1,C=M("length"),A=function(t){var e=C(t);return"number"==typeof e&&e>=0&&e<=E};S.each=S.forEach=function(t,e,n){e=k(e,n);var r,i;if(A(t))for(r=0,i=t.length;r<i;r++)e(t[r],r,t);else{var o=S.keys(t);for(r=0,i=o.length;r<i;r++)e(t[o[r]],o[r],t)}return t},S.map=S.collect=function(t,e,n){e=j(e,n);for(var r=!A(t)&&S.keys(t),i=(r||t).length,o=Array(i),s=0;s<i;s++){var u=r?r[s]:s;o[s]=e(t[u],u,t)}return o},S.reduce=S.foldl=S.inject=n(1),S.reduceRight=S.foldr=n(-1),S.find=S.detect=function(t,e,n){var r;if(r=A(t)?S.findIndex(t,e,n):S.findKey(t,e,n),void 0!==r&&r!==-1)return t[r]},S.filter=S.select=function(t,e,n){var r=[];return e=j(e,n),S.each(t,function(t,n,i){e(t,n,i)&&r.push(t)}),r},S.reject=function(t,e,n){return S.filter(t,S.negate(j(e)),n)},S.every=S.all=function(t,e,n){e=j(e,n);for(var r=!A(t)&&S.keys(t),i=(r||t).length,o=0;o<i;o++){var s=r?r[o]:o;if(!e(t[s],s,t))return!1}return!0},S.some=S.any=function(t,e,n){e=j(e,n);for(var r=!A(t)&&S.keys(t),i=(r||t).length,o=0;o<i;o++){var s=r?r[o]:o;if(e(t[s],s,t))return!0}return!1},S.contains=S.includes=S.include=function(t,e,n,r){return A(t)||(t=S.values(t)),("number"!=typeof n||r)&&(n=0),S.indexOf(t,e,n)>=0},S.invoke=function(t,e){var n=g.call(arguments,2),r=S.isFunction(e);return S.map(t,function(t){var i=r?e:t[e];return null==i?i:i.apply(t,n)})},S.pluck=function(t,e){return S.map(t,S.property(e))},S.where=function(t,e){return S.filter(t,S.matcher(e))},S.findWhere=function(t,e){return S.find(t,S.matcher(e))},S.max=function(t,e,n){var r,i,o=-(1/0),s=-(1/0);if(null==e&&null!=t){t=A(t)?t:S.values(t);for(var u=0,a=t.length;u<a;u++)r=t[u],r>o&&(o=r)}else e=j(e,n),S.each(t,function(t,n,r){i=e(t,n,r),(i>s||i===-(1/0)&&o===-(1/0))&&(o=t,s=i)});return o},S.min=function(t,e,n){var r,i,o=1/0,s=1/0;if(null==e&&null!=t){t=A(t)?t:S.values(t);for(var u=0,a=t.length;u<a;u++)r=t[u],r<o&&(o=r)}else e=j(e,n),S.each(t,function(t,n,r){i=e(t,n,r),(i<s||i===1/0&&o===1/0)&&(o=t,s=i)});return o},S.shuffle=function(t){for(var e,n=A(t)?t:S.values(t),r=n.length,i=Array(r),o=0;o<r;o++)e=S.random(0,o),e!==o&&(i[o]=i[e]),i[e]=n[o];return i},S.sample=function(t,e,n){return null==e||n?(A(t)||(t=S.values(t)),t[S.random(t.length-1)]):S.shuffle(t).slice(0,Math.max(0,e))},S.sortBy=function(t,e,n){return e=j(e,n),S.pluck(S.map(t,function(t,n,r){return{value:t,index:n,criteria:e(t,n,r)}}).sort(function(t,e){var n=t.criteria,r=e.criteria;if(n!==r){if(n>r||void 0===n)return 1;if(n<r||void 0===r)return-1}return t.index-e.index}),"value")};var T=function(t){return function(e,n,r){var i={};return n=j(n,r),S.each(e,function(r,o){t(i,r,n(r,o,e))}),i}};S.groupBy=T(function(t,e,n){S.has(t,n)?t[n].push(e):t[n]=[e]}),S.indexBy=T(function(t,e,n){t[n]=e}),S.countBy=T(function(t,e,n){S.has(t,n)?t[n]++:t[n]=1}),S.toArray=function(t){return t?S.isArray(t)?g.call(t):A(t)?S.map(t,S.identity):S.values(t):[]},S.size=function(t){return null==t?0:A(t)?t.length:S.keys(t).length},S.partition=function(t,e,n){e=j(e,n);var r=[],i=[];return S.each(t,function(t,n,o){(e(t,n,o)?r:i).push(t)}),[r,i]},S.first=S.head=S.take=function(t,e,n){if(null!=t)return null==e||n?t[0]:S.initial(t,t.length-e)},S.initial=function(t,e,n){return g.call(t,0,Math.max(0,t.length-(null==e||n?1:e)))},S.last=function(t,e,n){if(null!=t)return null==e||n?t[t.length-1]:S.rest(t,Math.max(0,t.length-e))},S.rest=S.tail=S.drop=function(t,e,n){return g.call(t,null==e||n?1:e)},S.compact=function(t){return S.filter(t,S.identity)};var I=function t(e,n,r,i){for(var o=[],s=0,u=i||0,a=C(e);u<a;u++){var l=e[u];if(A(l)&&(S.isArray(l)||S.isArguments(l))){n||(l=t(l,n,r));var c=0,f=l.length;for(o.length+=f;c<f;)o[s++]=l[c++]}else r||(o[s++]=l)}return o};S.flatten=function(t,e){return I(t,e,!1)},S.without=function(t){return S.difference(t,g.call(arguments,1))},S.uniq=S.unique=function(t,e,n,r){S.isBoolean(e)||(r=n,n=e,e=!1),null!=n&&(n=j(n,r));for(var i=[],o=[],s=0,u=C(t);s<u;s++){var a=t[s],l=n?n(a,s,t):a;e?(s&&o===l||i.push(a),o=l):n?S.contains(o,l)||(o.push(l),i.push(a)):S.contains(i,a)||i.push(a)}return i},S.union=function(){return S.uniq(I(arguments,!0,!0))},S.intersection=function(t){for(var e=[],n=arguments.length,r=0,i=C(t);r<i;r++){var o=t[r];if(!S.contains(e,o)){for(var s=1;s<n&&S.contains(arguments[s],o);s++);s===n&&e.push(o)}}return e},S.difference=function(t){var e=I(arguments,!0,!0,1);return S.filter(t,function(t){return!S.contains(e,t)})},S.zip=function(){return S.unzip(arguments)},S.unzip=function(t){for(var e=t&&S.max(t,C).length||0,n=Array(e),r=0;r<e;r++)n[r]=S.pluck(t,r);return n},S.object=function(t,e){for(var n={},r=0,i=C(t);r<i;r++)e?n[t[r]]=e[r]:n[t[r][0]]=t[r][1];return n},S.findIndex=s(1),S.findLastIndex=s(-1),S.sortedIndex=function(t,e,n,r){n=j(n,r,1);for(var i=n(e),o=0,s=C(t);o<s;){var u=Math.floor((o+s)/2);n(t[u])<i?o=u+1:s=u}return o},S.indexOf=u(1,S.findIndex,S.sortedIndex),S.lastIndexOf=u(-1,S.findLastIndex),S.range=function(t,e,n){null==e&&(e=t||0,t=0),n=n||1;for(var r=Math.max(Math.ceil((e-t)/n),0),i=Array(r),o=0;o<r;o++,t+=n)i[o]=t;return i};var N=function(t,e,n,r,i){if(!(r instanceof e))return t.apply(n,i);var o=O(t.prototype),s=t.apply(o,i);return S.isObject(s)?s:o};S.bind=function(t,e){if(b&&t.bind===b)return b.apply(t,g.call(arguments,1));if(!S.isFunction(t))throw new TypeError("Bind must be called on a function");var n=g.call(arguments,2);return function r(){return N(t,r,e,this,n.concat(g.call(arguments)))}},S.partial=function(t){var e=g.call(arguments,1);return function n(){for(var r=0,i=e.length,o=Array(i),s=0;s<i;s++)o[s]=e[s]===S?arguments[r++]:e[s];for(;r<arguments.length;)o.push(arguments[r++]);return N(t,n,this,this,o)}},S.bindAll=function(t){var e,n,r=arguments.length;if(r<=1)throw new Error("bindAll must be passed function names");for(e=1;e<r;e++)n=arguments[e],t[n]=S.bind(t[n],t);return t},S.memoize=function(t,e){var n=function n(r){var i=n.cache,o=""+(e?e.apply(this,arguments):r);return S.has(i,o)||(i[o]=t.apply(this,arguments)),i[o]};return n.cache={},n},S.delay=function(t,e){var n=g.call(arguments,2);return setTimeout(function(){return t.apply(null,n)},e)},S.defer=S.partial(S.delay,S,1),S.throttle=function(t,e,n){var r,i,o,s=null,u=0;n||(n={});var a=function(){u=n.leading===!1?0:S.now(),s=null,o=t.apply(r,i),s||(r=i=null)};return function(){var l=S.now();u||n.leading!==!1||(u=l);var c=e-(l-u);return r=this,i=arguments,c<=0||c>e?(s&&(clearTimeout(s),s=null),u=l,o=t.apply(r,i),s||(r=i=null)):s||n.trailing===!1||(s=setTimeout(a,c)),o}},S.debounce=function(t,e,n){var r,i,o,s,u,a=function a(){var l=S.now()-s;l<e&&l>=0?r=setTimeout(a,e-l):(r=null,n||(u=t.apply(o,i),r||(o=i=null)))};return function(){o=this,i=arguments,s=S.now();var l=n&&!r;return r||(r=setTimeout(a,e)),l&&(u=t.apply(o,i),o=i=null),u}},S.wrap=function(t,e){return S.partial(e,t)},S.negate=function(t){return function(){return!t.apply(this,arguments)}},S.compose=function(){var t=arguments,e=t.length-1;return function(){for(var n=e,r=t[e].apply(this,arguments);n--;)r=t[n].call(this,r);return r}},S.after=function(t,e){return function(){if(--t<1)return e.apply(this,arguments)}},S.before=function(t,e){var n;return function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=null),n}},S.once=S.partial(S.before,2);var L=!{toString:null}.propertyIsEnumerable("toString"),R=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];S.keys=function(t){if(!S.isObject(t))return[];if(_)return _(t);var e=[];for(var n in t)S.has(t,n)&&e.push(n);return L&&a(t,e),e},S.allKeys=function(t){if(!S.isObject(t))return[];var e=[];for(var n in t)e.push(n);return L&&a(t,e),e},S.values=function(t){for(var e=S.keys(t),n=e.length,r=Array(n),i=0;i<n;i++)r[i]=t[e[i]];return r},S.mapObject=function(t,e,n){e=j(e,n);for(var r,i=S.keys(t),o=i.length,s={},u=0;u<o;u++)r=i[u],s[r]=e(t[r],r,t);return s},S.pairs=function(t){for(var e=S.keys(t),n=e.length,r=Array(n),i=0;i<n;i++)r[i]=[e[i],t[e[i]]];return r},S.invert=function(t){for(var e={},n=S.keys(t),r=0,i=n.length;r<i;r++)e[t[n[r]]]=n[r];return e},S.functions=S.methods=function(t){var e=[];for(var n in t)S.isFunction(t[n])&&e.push(n);return e.sort()},S.extend=z(S.allKeys),S.extendOwn=S.assign=z(S.keys),S.findKey=function(t,e,n){e=j(e,n);for(var r,i=S.keys(t),o=0,s=i.length;o<s;o++)if(r=i[o],e(t[r],r,t))return r},S.pick=function(t,e,n){var r,i,o={},s=t;if(null==s)return o;S.isFunction(e)?(i=S.allKeys(s),r=k(e,n)):(i=I(arguments,!1,!1,1),r=function(t,e,n){return e in n},s=Object(s));for(var u=0,a=i.length;u<a;u++){var l=i[u],c=s[l];r(c,l,s)&&(o[l]=c)}return o},S.omit=function(t,e,n){if(S.isFunction(e))e=S.negate(e);else{var r=S.map(I(arguments,!1,!1,1),String);e=function(t,e){return!S.contains(r,e)}}return S.pick(t,e,n)},S.defaults=z(S.allKeys,!0),S.create=function(t,e){var n=O(t);return e&&S.extendOwn(n,e),n},S.clone=function(t){return S.isObject(t)?S.isArray(t)?t.slice():S.extend({},t):t},S.tap=function(t,e){return e(t),t},S.isMatch=function(t,e){var n=S.keys(e),r=n.length;if(null==t)return!r;for(var i=Object(t),o=0;o<r;o++){var s=n[o];if(e[s]!==i[s]||!(s in i))return!1}return!0};var q=function t(e,n,r,i){if(e===n)return 0!==e||1/e===1/n;if(null==e||null==n)return e===n;e instanceof S&&(e=e._wrapped),n instanceof S&&(n=n._wrapped);var s=v.call(e);if(s!==v.call(n))return!1;switch(s){case"[object RegExp]":case"[object String]":return""+e==""+n;case"[object Number]":return+e!==+e?+n!==+n:0===+e?1/+e===1/n:+e===+n;case"[object Date]":case"[object Boolean]":return+e===+n}var u="[object Array]"===s;if(!u){if("object"!=("undefined"==typeof e?"undefined":o(e))||"object"!=("undefined"==typeof n?"undefined":o(n)))return!1;var a=e.constructor,l=n.constructor;if(a!==l&&!(S.isFunction(a)&&a instanceof a&&S.isFunction(l)&&l instanceof l)&&"constructor"in e&&"constructor"in n)return!1}r=r||[],i=i||[];for(var c=r.length;c--;)if(r[c]===e)return i[c]===n;if(r.push(e),i.push(n),u){if(c=e.length,c!==n.length)return!1;for(;c--;)if(!t(e[c],n[c],r,i))return!1}else{var f,h=S.keys(e);if(c=h.length,S.keys(n).length!==c)return!1;for(;c--;)if(f=h[c],!S.has(n,f)||!t(e[f],n[f],r,i))return!1}return r.pop(),i.pop(),!0};S.isEqual=function(t,e){return q(t,e)},S.isEmpty=function(t){return null==t||(A(t)&&(S.isArray(t)||S.isString(t)||S.isArguments(t))?0===t.length:0===S.keys(t).length)},S.isElement=function(t){return!(!t||1!==t.nodeType)},S.isArray=y||function(t){return"[object Array]"===v.call(t)},S.isObject=function(t){var e="undefined"==typeof t?"undefined":o(t);return"function"===e||"object"===e&&!!t},S.each(["Arguments","Function","String","Number","Date","RegExp","Error"],function(t){S["is"+t]=function(e){return v.call(e)==="[object "+t+"]"}}),S.isArguments(arguments)||(S.isArguments=function(t){return S.has(t,"callee")}),"function"!=typeof/./&&"object"!=("undefined"==typeof Int8Array?"undefined":o(Int8Array))&&(S.isFunction=function(t){return"function"==typeof t||!1}),S.isFinite=function(t){return isFinite(t)&&!isNaN(parseFloat(t))},S.isNaN=function(t){return S.isNumber(t)&&t!==+t},S.isBoolean=function(t){return t===!0||t===!1||"[object Boolean]"===v.call(t)},S.isNull=function(t){return null===t},S.isUndefined=function(t){return void 0===t},S.has=function(t,e){return null!=t&&m.call(t,e)},S.noConflict=function(){return l._=c,this},S.identity=function(t){return t},S.constant=function(t){return function(){return t}},S.noop=function(){},S.property=M,S.propertyOf=function(t){return null==t?function(){}:function(e){return t[e]}},S.matcher=S.matches=function(t){return t=S.extendOwn({},t),function(e){return S.isMatch(e,t)}},S.times=function(t,e,n){var r=Array(Math.max(0,t));e=k(e,n,1);for(var i=0;i<t;i++)r[i]=e(i);return r},S.random=function(t,e){return null==e&&(e=t,t=0),t+Math.floor(Math.random()*(e-t+1))},S.now=Date.now||function(){return(new Date).getTime()};var F={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},P=S.invert(F),B=function(t){var e=function(e){return t[e]},n="(?:"+S.keys(t).join("|")+")",r=RegExp(n),i=RegExp(n,"g");return function(t){return t=null==t?"":""+t,r.test(t)?t.replace(i,e):t}};S.escape=B(F),S.unescape=B(P),S.result=function(t,e,n){var r=null==t?void 0:t[e];return void 0===r&&(r=n),S.isFunction(r)?r.call(t):r};var W=0;S.uniqueId=function(t){var e=++W+"";return t?t+e:e},S.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var D=/(.)^/,H={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},U=/\\|'|\r|\n|\u2028|\u2029/g,V=function(t){return"\\"+H[t]};S.template=function(t,e,n){!e&&n&&(e=n),e=S.defaults({},e,S.templateSettings);var r=RegExp([(e.escape||D).source,(e.interpolate||D).source,(e.evaluate||D).source].join("|")+"|$","g"),i=0,o="__p+='";t.replace(r,function(e,n,r,s,u){return o+=t.slice(i,u).replace(U,V),i=u+e.length,n?o+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?o+="'+\n((__t=("+r+"))==null?'':__t)+\n'":s&&(o+="';\n"+s+"\n__p+='"),e}),o+="';\n",e.variable||(o="with(obj||{}){\n"+o+"}\n"),o="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+o+"return __p;\n";try{var s=new Function(e.variable||"obj","_",o)}catch(t){throw t.source=o,t}var u=function(t){return s.call(this,t,S)},a=e.variable||"obj";return u.source="function("+a+"){\n"+o+"}",u},S.chain=function(t){var e=S(t);return e._chain=!0,e};var $=function(t,e){return t._chain?S(e).chain():e};S.mixin=function(t){S.each(S.functions(t),function(e){var n=S[e]=t[e];S.prototype[e]=function(){var t=[this._wrapped];return p.apply(t,arguments),$(this,n.apply(S,t))}})},S.mixin(S),S.each(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var e=f[t];S.prototype[t]=function(){var n=this._wrapped;return e.apply(n,arguments),"shift"!==t&&"splice"!==t||0!==n.length||delete n[0],$(this,n)}}),S.each(["concat","join","slice"],function(t){var e=f[t];S.prototype[t]=function(){return $(this,e.apply(this._wrapped,arguments))}}),S.prototype.value=function(){return this._wrapped},S.prototype.valueOf=S.prototype.toJSON=S.prototype.value,S.prototype.toString=function(){return""+this._wrapped},r=[],i=function(){return S}.apply(e,r),!(void 0!==i&&(t.exports=i))}).call(void 0)},function(t,e,n){"use strict";function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.version=e.io=e.$=e.boneView=e.view=e.selcol=e.selection=e.utils=e.menu=e.model=e.msa=void 0;var o=n(8);Object.defineProperty(e,"selection",{enumerable:!0,get:function(){return i(o).default}});var s=n(9);Object.defineProperty(e,"selcol",{enumerable:!0,get:function(){return i(s).default}});var u=n(2);Object.defineProperty(e,"view",{enumerable:!0,get:function(){return i(u).default}});var a=n(4);Object.defineProperty(e,"boneView",{enumerable:!0,get:function(){return i(a).default}});var l=n(5);Object.defineProperty(e,"$",{enumerable:!0,get:function(){return i(l).default}});var c=n(124),f=i(c),h=n(51),d=r(h),p=n(111),g=r(p),v=n(37),m=r(v),y=n(10),_=function(){var t=function(t){return f.default.apply(this,t)};return t.prototype=f.default.prototype,new t(arguments)};e.default=_,e.msa=f.default,e.model=d,e.menu=g,e.utils=m;var b={xhr:n(21),fasta:y.fasta,clustal:y.clustal,gff:y.gff};e.io=b;var x="imported";e.version=x},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(120),o=r(i),s=n(118),u=r(s),a=n(122),l=r(a),c=n(123),f=r(c),h=n(114),d=r(h),p=n(121),g=r(p),v=n(117),m=r(v),y=n(116),_=r(y),b=n(119),x=r(b),w=n(115),S=r(w),k=n(113),j=r(k),z=n(4),O=z.extend({initialize:function(t){if(!t.msa)throw new Error("No msa instance provided. Please provide .msa");if(this.msa=t.msa,this.msa.g.menuconfig=new j.default(t.menu),this.addView("10_import",new o.default({model:this.msa.seqs,g:this.msa.g,msa:this.msa})),this.addView("15_ordering",new g.default({model:this.msa.seqs,g:this.msa.g})),this.addView("20_filter",new u.default({model:this.msa.seqs,g:this.msa.g})),this.addView("30_selection",new l.default({model:this.msa.seqs,g:this.msa.g})),this.addView("40_vis",new f.default({model:this.msa.seqs,g:this.msa.g})),this.addView("50_color",new d.default({model:this.msa.seqs,g:this.msa.g})),this.addView("70_extra",new m.default({model:this.msa.seqs,g:this.msa.g,msa:this.msa})),this.addView("80_export",new _.default({model:this.msa.seqs,g:this.msa.g,msa:this.msa})),this.addView("90_help",new x.default({g:this.msa.g})),this.msa.g.config.get("debug"))return this.addView("95_debug",new S.default({g:this.msa.g}))},render:function(){return this.renderSubviews(),this.el.setAttribute("class","smenubar"),this.el.appendChild(document.createElement("p"))}});e.default=O},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(110);Object.defineProperty(e,"defaultmenu",{enumerable:!0,get:function(){return r(i).default}});var o=n(6);Object.defineProperty(e,"menubuilder",{enumerable:!0,get:function(){return r(o).default}})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(5),i=n(2),o=i.extend({initialize:function(t){this._nodes=[],this.name=t.name||"",this.el.className+="smenubar"},render:function(){for(var t=this.el.firstChild;t;)this.el.removeChild(t),t=this.el.firstChild;this.el.appendChild(this.buildDOM())},setName:function(t){this.name=t},addNode:function(t,e,n){var r=void 0;null!=n&&(r=n.style),null==this._nodes&&(this._nodes=[]),this._nodes.push({label:t,callback:e,style:r})},getNode:function(t){var e=void 0;return this._nodes.forEach(function(n){n.label===t&&(e=n)}),e},modifyNode:function(t,e,n){var r=this.getNode(t);r.callback=e||r.callback,n=n||{},r.style=n.style||r.style},renameNode:function(t,e){var n=this.getNode(t);n.label=e||n.label},removeNode:function(t){var e=this.getNode(t);this._nodes.splice(this._nodes.indexOf(e),1)},removeAllNodes:function(){this._nodes=[]},buildDOM:function(){var t=document.createElement("span");return t.appendChild(this._buildM({nodes:this._nodes,name:this.name})),t},_buildM:function(t){var e=void 0,n=void 0,i=void 0,o=void 0,s=void 0,u=void 0,a=void 0,l=t.nodes,c=t.name,f=document.createElement("div");f.className="smenu-dropdown smenu-dropdown-tip",f.style.display="none";var h=document.createElement("ul");h.className="smenu-dropdown-menu";for(var d=0,p=l.length;d<p;d++){s=l[d],o=document.createElement("li"),o.textContent=s.label,a=s.style;for(i in a)u=a[i],o.style[i]=u;o.addEventListener("click",s.callback),this.trigger("new:node",o),h.appendChild(o)}return this.trigger("new:menu",h),f.appendChild(h),e=document.createElement("a"),e.textContent=c,e.className="smenubar_alink",this.trigger("new:button",e),r(e).on("click",function(t){return function(n){return t._showMenu(n,f,e),window.setTimeout(function(){return r(document.body).one("click",function(t){return f.style.display="none"})},5)}}(this)),n=document.createDocumentFragment(),n.appendChild(f),n.appendChild(e),n},_showMenu:function(t,e,n){var r=void 0;e.style.display="block",e.style.position="absolute",r=n.getBoundingClientRect()}});e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1).Model,i=r.extend({constructor:function(t,e){return"small"==t&&(t=this.small),r.apply(this,[t])},small:{menuFontsize:"12px"},defaults:{menuFontsize:"14px",menuItemFontsize:"14px",menuItemLineHeight:"14px",menuMarginLeft:"3px",menuPadding:"3px 4px 3px 4px"}});e.default=i},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(6),o=r(i),s=n(7),u=o.default.extend({initialize:function(t){return this.g=t.g,this.el.style.display="inline-block",this.listenTo(this.g.colorscheme,"change",function(){
  return this.render()})},render:function(){var t=this.setName("Color scheme");this.removeAllNodes();for(var e,n=this.getColorschemes(),r=0;r<n.length;r++)e=n[r],this.addScheme(t,e);return this.grey(t),s.removeAllChilds(this.el),this.el.appendChild(this.buildDOM()),this},addScheme:function(t,e){var n=this,r={};return this.g.colorscheme.get("scheme")===e.id&&(r.backgroundColor="#77ED80"),this.addNode(e.name,function(){n.g.colorscheme.set("scheme",e.id)},{style:r})},getColorschemes:function(){var t=[];return t.push({name:"Taylor",id:"taylor"}),t.push({name:"Buried",id:"buried"}),t.push({name:"Cinema",id:"cinema"}),t.push({name:"Clustal",id:"clustal"}),t.push({name:"Clustal2",id:"clustal2"}),t.push({name:"Helix",id:"helix"}),t.push({name:"Hydrophobicity",id:"hydro"}),t.push({name:"Lesk",id:"lesk"}),t.push({name:"MAE",id:"mae"}),t.push({name:"Nucleotide",id:"nucleotide"}),t.push({name:"Purine",id:"purine"}),t.push({name:"PID",id:"pid"}),t.push({name:"Strand",id:"strand"}),t.push({name:"Turn",id:"turn"}),t.push({name:"Zappo",id:"zappo"}),t.push({name:"No color",id:"foo"}),t},grey:function(t){}});e.default=u},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(6),o=r(i),s=o.default.extend({initialize:function(t){return this.g=t.g,this.el.style.display="inline-block"},render:function(){var t=this;return this.setName("Debug"),this.addNode("Get the code",function(){return window.open("https://github.com/wilzbach/msa")}),this.addNode("Toggle mouseover events",function(){return t.g.config.set("registerMouseHover",!t.g.config.get("registerMouseHover")),t.g.onAll(function(){return console.log(arguments)})}),this.addNode("Minimized width",function(){return t.g.zoomer.set("alignmentWidth",600)}),this.addNode("Minimized height",function(){return t.g.zoomer.set("alignmentHeight",120)}),this.el.appendChild(this.buildDOM()),this}});e.default=s},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(6),o=r(i),s=n(16),u=r(s),a=n(10),l=(a.fasta.write,"â†ª"),c=o.default.extend({initialize:function(t){return this.g=t.g,this.msa=t.msa,this.el.style.display="inline-block"},render:function(){var t=this;return this.setName("Export"),this.addNode("Share view (URL)"+l,function(){return u.default.shareLink(t.msa,function(t){return window.open(t,"_blank")})}),this.addNode("View in Jalview",function(){var e=t.g.config.get("url");return"undefined"==typeof e||null===e?alert("Sequence weren't imported via an URL"):e.indexOf("localhost")?u.default.publishWeb(t.msa,function(e){return u.default.openInJalview(e,t.g.colorscheme.get("scheme"))}):u.default.openInJalview(e,t.g.colorscheme.get("scheme"))}),this.addNode("Export alignment (FASTA)",function(){return u.default.saveAsFile(t.msa,"all.fasta")}),this.addNode("Export alignment (URL)",function(){return u.default.publishWeb(t.msa,function(t){return window.open(t,"_blank")})}),this.addNode("Export selected sequences (FASTA)",function(){return u.default.saveSelection(t.msa,"selection.fasta")}),this.addNode("Export features (GFF)",function(){return u.default.saveAnnots(t.msa,"features.gff3")}),this.addNode("Export MSA image (PNG)",function(){return u.default.saveAsImg(t.msa,"biojs-msa.png")}),this.el.appendChild(this.buildDOM()),this}});e.default=c},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(6),o=r(i),s=n(36),u=r(s),a=n(18),l=(r(a),n(21),o.default.extend({initialize:function(t){return this.g=t.g,this.el.style.display="inline-block",this.msa=t.msa},render:function(){var t=this;this.setName("Extras");var e=this.g.stats;return this.msa,this.addNode("Add consensus seq",function(){var n=e.consensus(),r=new u.default({seq:n,id:"0c",name:"Consenus"});return t.model.add(r),t.model.setRef(r),t.model.comparator=function(t){return!t.get("ref")},t.model.sort()}),this.addNode("Jump to a column",function(){var e=prompt("Column","20");return e<0||e>t.model.getMaxLength()||isNaN(e)?void alert("invalid column"):t.g.zoomer.setLeftOffset(e)}),this.el.appendChild(this.buildDOM()),this}}));e.default=l},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(6),o=r(i),s=o.default.extend({initialize:function(t){return this.g=t.g,this.el.style.display="inline-block"},render:function(){var t=this;return this.setName("Filter"),this.addNode("Hide columns by threshold",function(e){var n=prompt("Enter threshold (in percent)",20);n/=100;for(var r=t.model.getMaxLength(),i=[],o=t.g.stats.scale(t.g.stats.conservation()),s=r-1,u=0;u<=s;u++)o[u]<n&&i.push(u);return t.g.columns.set("hidden",i)}),this.addNode("Hide columns by selection",function(){var e=t.g.columns.get("hidden"),n=e.concat(t.g.selcol.getAllColumnBlocks({maxLen:t.model.getMaxLength(),withPos:!0}));return t.g.selcol.reset([]),t.g.columns.set("hidden",n)}),this.addNode("Hide columns by gaps",function(){var e=prompt("Enter threshold (in percent)",20);e/=100;for(var n=t.model.getMaxLength(),r=[],i=n-1,o=function(n){var i=0,o=0;t.model.each(function(t){return"-"===t.get("seq")[n]&&i++,o++}),i/o>e&&r.push(n)},s=0;s<=i;s++)o(s);return t.g.columns.set("hidden",r)}),this.addNode("Hide seqs by identity",function(){var e=prompt("Enter threshold (in percent)",20);return e/=100,t.model.each(function(t){if(t.get("identity")<e)return t.set("hidden",!0)})}),this.addNode("Hide seqs by selection",function(){var e=t.g.selcol.where({type:"row"}),n=e.map(function(t){return t.get("seqId")});return t.g.selcol.reset([]),t.model.each(function(t){if(n.indexOf(t.get("id"))>=0)return t.set("hidden",!0)})}),this.addNode("Hide seqs by gaps",function(){var e=prompt("Enter threshold (in percent)",40);return t.model.each(function(t,n){if(t.get("seq").reduce(function(t,e){return"-"===e?++t:void 0},0)>e)return t.set("hidden",!0)})}),this.addNode("Reset",function(){return t.g.columns.set("hidden",[]),t.model.each(function(t){if(t.get("hidden"))return t.set("hidden",!1)})}),this.el.appendChild(this.buildDOM()),this}});e.default=s},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(6),o=r(i),s=o.default.extend({initialize:function(t){return this.g=t.g},render:function(){return this.setName("Help"),this.addNode("About the project",function(){return window.open("https://github.com/wilzbach/msa")}),this.addNode("Report issues",function(){return window.open("https://github.com/wilzbach/msa/issues")}),this.addNode("User manual",function(){return window.open("https://github.com/wilzbach/msa/wiki/User-manual")}),this.el.style.display="inline-block",this.el.appendChild(this.buildDOM()),this}});e.default=s},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(6),o=r(i),s=n(14),u=o.default.extend({initialize:function(t){return this.g=t.g,this.el.style.display="inline-block",this.msa=t.msa},render:function(){var t=this,e=this.msa,n=s.mk("input");n.type="file",n.style.display="none",n.multiple=!0,n.addEventListener("change",function(){var t=n.files||[];return e.u.file.importFiles(t)}),this.el.appendChild(n);var r="(Fasta, Clustal, GFF, Jalview features, Newick)";return this.setName("Import"),this.addNode("URL",function(e){var n=prompt("URL "+r,"http://rostlab.org/~goldberg/clustalw2-I20140818-215249-0556-53699878-pg.clustalw");if(n.length>5)return t.msa.u.file.importURL(n,function(){})}),this.addNode("From file "+r,function(){return n.click()}),this.addNode("Drag & Drop",function(){return alert("Yep. Just drag & drop your file "+r)}),this.el.appendChild(this.buildDOM()),this}});e.default=u},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(6),o=r(i),s=n(7),u="â†‘",a="â†“",l=o.default.extend({initialize:function(t){return this.g=t.g,this.order="ID",this.el.style.display="inline-block"},setOrder:function(t){return this.order=t,this.render()},render:function(){this.setName("Sorting"),this.removeAllNodes();for(var t,e=this.getComparators(),n=0;n<e.length;n++)t=e[n],this._addNode(t);var r=this.buildDOM();return s.removeAllChilds(this.el),this.el.appendChild(r),this},_addNode:function(t){var e=this,n=t.text,r={};return n===this.order&&(r.backgroundColor="#77ED80"),this.addNode(n,function(){return null!=t.precode&&t.precode(),e.model.comparator=t.comparator,e.model.sort(),e.setOrder(t.text)},{style:r})},getComparators:function(){var t=this,e=[];e.push({text:"ID "+u,comparator:"id"}),e.push({text:"ID "+a,comparator:function(t,e){return-(""+t.get("id")).localeCompare(""+e.get("id"),[],{numeric:!0})}}),e.push({text:"Label "+u,comparator:"name"}),e.push({text:"Label "+a,comparator:function(t,e){return-t.get("name").localeCompare(e.get("name"))}}),e.push({text:"Seq "+u,comparator:"seq"}),e.push({text:"Seq "+a,comparator:function(t,e){return-t.get("seq").localeCompare(e.get("seq"))}});var n=function(){return t.ident=t.g.stats.identity()},r=function(){return t.gaps={},t.model.each(function(e){var n=e.attributes.seq;return t.gaps[e.id]=(n.reduce(function(t,e){return"-"===e?++t:void 0}),0/n.length)})};return e.push({text:"Identity "+u,comparator:function(e,n){var r=t.ident[e.id]-t.ident[n.id];return r>0?1:r<0?-1:0},precode:n}),e.push({text:"Identity "+a,comparator:function(e,n){var r=t.ident[e.id]-t.ident[n.id];return r>0?-1:r<0?1:0},precode:n}),e.push({text:"Gaps "+u,comparator:function(e,n){var r=t.gaps[e.id]-t.gaps[n.id];return r>0?1:r<0?-1:0},precode:r}),e.push({text:"Gaps "+a,comparator:function(e,n){var r=t.gaps[e.id]-t.gaps[n.id];return r<0?1:r>0?-1:0},precode:r}),e.push({text:"Consensus to top",comparator:function(t){return!t.get("ref")}}),e}});e.default=l},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(6),o=r(i),s=o.default.extend({initialize:function(t){return this.g=t.g,this.el.style.display="inline-block"},render:function(){var t=this;return this.setName("Selection"),this.addNode("Find Motif (supports RegEx)",function(){var e=prompt("your search","D");return t.g.user.set("searchText",e)}),this.addNode("Invert columns",function(){return t.g.selcol.invertCol(function(){var e=[],n=t.model.getMaxLength(),r=0;if(0<=n)for(;r<=n;)e.push(r++);else for(;r>=n;)e.push(r--);return e}())}),this.addNode("Invert rows",function(){return t.g.selcol.invertRow(t.model.pluck("id"))}),this.addNode("Reset",function(){return t.g.selcol.reset()}),this.el.appendChild(this.buildDOM()),this}});e.default=s},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(6),o=r(i),s=n(7),u=o.default.extend({initialize:function(t){return this.g=t.g,this.el.style.display="inline-block",this.listenTo(this.g.vis,"change",this.render)},render:function(){var t=this;this.removeAllNodes(),this.setName("Vis.elements");for(var e,n=this.getVisElements(),r=0;r<n.length;r++)e=n[r],this._addVisEl(e);return this.addNode("Reset",function(){return t.g.vis.set("labels",!0),t.g.vis.set("sequences",!0),t.g.vis.set("metacell",!0),t.g.vis.set("conserv",!0),t.g.vis.set("labelId",!0),t.g.vis.set("labelName",!0),t.g.vis.set("labelCheckbox",!1),t.g.vis.set("seqlogo",!1),t.g.vis.set("gapHeader",!1),t.g.vis.set("leftHeader",!0),t.g.vis.set("metaGaps",!0),t.g.vis.set("metaIdentity",!0),t.g.vis.set("metaLinks",!0)}),s.removeAllChilds(this.el),this.el.appendChild(this.buildDOM()),this},_addVisEl:function(t){var e=this,n={};if(this.g.vis.get(t.id)){var r="Hide ";n.color="red"}else r="Show ",n.color="green";return this.addNode(r+t.name,function(){return e.g.vis.set(t.id,!e.g.vis.get(t.id))},{style:n})},getVisElements:function(){var t=[];return t.push({name:"residues indices",id:"markers"}),t.push({name:"ID/Label",id:"labels"}),t.push({name:"meta info (Gaps/Ident)",id:"metacell"}),t.push({name:"overview panel",id:"overviewbox"}),t.push({name:"sequence logo",id:"seqlogo"}),t.push({name:"gap weights",id:"gapHeader"}),t.push({name:"conservation weights",id:"conserv"}),t.push({name:"scale slider",id:"scaleslider"}),t.push({name:"Label",id:"labelName"}),t.push({name:"ID",id:"labelId"}),t.push({name:"gaps %",id:"metaGaps"}),t.push({name:"identity score",id:"metaIdentity"}),t}});e.default=u},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(35),o=r(i),s=n(26),u=r(s),a=n(27),l=r(a),c=n(28),f=r(c),h=n(29),d=r(h),p=n(9),g=r(p),v=n(30),m=r(v),y=n(32),_=r(y),b=n(31),x=r(b),w=n(33),S=r(w),k=n(25),j=r(k),z=n(129),O=r(z),M=n(17),E=r(M),C=n(40),A=r(C),T=n(19),I=r(T),N=n(4),L=n(13),R=n(48),q=n(5),F=N.extend({initialize:function(t){var e=this;if("undefined"!=typeof t&&null!==t||(t={}),null==t.colorscheme&&(t.colorscheme={}),null==t.columns&&(t.columns={}),null==t.conf&&(t.conf={}),null==t.vis&&(t.vis={}),null==t.visorder&&(t.visorder={}),null==t.zoomer&&(t.zoomer={}),null==t.conserv&&(t.conserv={}),null==t.scale&&(t.scale={}),this.g=L.mixin({}),this.seqs=this.g.seqs=new o.default(t.seqs,this.g),this.g.config=new f.default(t.conf),this.g.package=new d.default(this.g),this.g.selcol=new g.default([],{g:this.g}),this.g.user=new m.default,this.g.vis=new _.default(t.vis,{model:this.seqs}),this.g.visorder=new x.default(t.visorder),this.g.zoomer=new S.default(t.zoomer,{g:this.g,model:this.seqs}),this.g.scale=new j.default(t.scale,{g:this.g}),this.g.conservationConfig=t.conserv,"localhost"===window.location.hostname&&this.g.config.set("debug",!0),this._loadSeqs(t),this.u={},this.u.file=new E.default(this),this.u.proxy=new I.default({g:this.g}),this.u.tree=new A.default(this),this.g.config.get("eventBus")===!0&&this.startEventBus(),this.g.config.get("dropImport")){var n={dragover:this.dragOver,drop:this.dropFile};this.delegateEvents(n)}return t.importURL&&this.u.file.importURL(t.importURL,function(){return e.render()}),t.bootstrapMenu&&(t.menu&&(this.menuConfig=t.menu),this.g.config.set("bootstrapMenu",!0)),this.draw(),this.m()},_loadSeqs:function(t){var e=this.seqs.pluck("seq");return this.g.stats=new R(this.seqs,{useGaps:!0}),this.g.stats.alphabetSize=this.g.config.get("alphabetSize"),this.g.columns=new l.default(t.columns,this.g.stats),this.g.colorscheme=new u.default(t.colorscheme,e,this.g.stats),this.g.zoomer.setEl(this.el,this.seqs)},importURL:function(){return this.u.file.importURL.apply(this.u.file,arguments)},m:function t(){var t={};return t.model=n(51),t.selection=n(8),t.selcol=n(9),t.view=n(2),t.boneView=n(4),this.m=t},draw:function(){var t=this;if(this.removeViews(),this.addView("stage",new O.default({model:this.seqs,g:this.g})),this.$el.addClass("biojs_msa_div"),this.g.config.get("bootstrapMenu")){var e=document.createElement("div"),n=document.createElement("div");this.el.parentNode?(this.el.parentNode.replaceChild(n,this.el),n.appendChild(e),n.appendChild(this.el)):(n.appendChild(e),n.appendChild(this.el));var r={el:e,msa:this};this.menuConfig&&(r.menu=this.menuConfig),new msa.menu.defaultmenu(r).render()}return q(window).on("resize",function(e){var n=function(){return this.g.zoomer.autoResize()};return setTimeout(n.bind(t),5)})},dragOver:function(t){return t.preventDefault(),t.target.className="hover",!1},dropFile:function(t){t.preventDefault();var e=t.target.files||t.dataTransfer.files;return this.u.file.importFiles(e),!1},startEventBus:function(){var t=this,e=["config","columns","colorscheme","selcol","vis","visorder","zoomer"];return function(){for(var n,r=[],i=0;i<e.length;i++)n=e[i],r.push(t._proxyToG(n));return r}()},_proxyToG:function(t){return this.listenTo(this.g[t],"all",function(e,n,r,i){if("change"!==e)return"undefined"!=typeof i&&null!==i?this.g.trigger(t+":"+e,r,n,i):this.g.trigger(t+":"+e,r,n)})},render:function(){return void 0===this.seqs||0===this.seqs.length,this.renderSubviews(),this.g.vis.set("loaded",!0),this}});e.default=F},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(133),o=r(i),s=n(142),u=r(s),a=n(4),l=a.extend({initialize:function(t){this.g=t.g;var e=new u.default({model:this.model,g:this.g});if(e.ordering=-1,this.addView("labelblock",e),this.g.vis.get("sequences")){var n=new o.default({model:this.model,g:this.g});n.ordering=0,this.addView("seqblock",n)}return this.listenTo(this.g.zoomer,"change:alignmentHeight",this.adjustHeight),this.listenTo(this.g.zoomer,"change:alignmentWidth",this.adjustWidth),this.listenTo(this.g.columns,"change:hidden",this.adjustHeight),this},render:function(){return this.renderSubviews(),this.el.className="biojs_msa_albody",this.el.style.whiteSpace="nowrap",this.adjustHeight(),this.adjustWidth(),this},adjustHeight:function(){return"auto"===this.g.zoomer.get("alignmentHeight")?this.el.style.height=this.g.zoomer.get("rowHeight")*this.model.length+5:this.el.style.height=this.g.zoomer.get("alignmentHeight")},adjustWidth:function(){return this.el.style.width=this.getWidth()},getWidth:function(){var t=0;return t+=this.g.zoomer.getLeftBlockWidth(),this.g.vis.get("sequences")&&(t+=this.g.zoomer.get("alignmentWidth")),t}});e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(8),i=n(2),o=n(47),s=n(5),u=i.extend({className:"biojs_msa_overviewbox",tagName:"canvas",initialize:function(t){return this.g=t.g,this.listenTo(this.g.zoomer,"change:boxRectWidth change:boxRectHeight change:overviewboxPaddingTop",this.rerender),this.listenTo(this.g.zoomer,"change:alignmentHeight change:alignmentWidth",this.rerender),this.listenTo(this.g.zoomer,"change:overviewboxWidth change:overviewboxHeigth",this.rerender),this.listenTo(this.g.selcol,"add reset change",this.rerender),this.listenTo(this.g.columns,"change:hidden",this.rerender),this.listenTo(this.g.colorscheme,"change:showLowerCase",this.rerender),this.listenTo(this.model,"change",_.debounce(this.rerender,5)),this.color=this.g.colorscheme.getSelectedScheme(),this.listenTo(this.g.colorscheme,"change:scheme",function(){return this.color=this.g.colorscheme.getSelectedScheme(),this.rerender()}),this.dragStart=[]},events:{click:"_onclick",mousedown:"_onmousedown"},rerender:function(){if(!this.g.config.get("manualRendering"))return this.render()},render:function(){this._createCanvas(),this.el.textContent="overview",this.el.style.marginTop=this.g.zoomer.get("overviewboxPaddingTop"),this.ctx.fillStyle="#999999",this.ctx.fillRect(0,0,this.el.width,this.el.height);for(var t=this.model.length,e=this.g.columns.get("hidden"),n=this.g.colorscheme.get("showLowerCase"),r=-this.coords.boxes_size.y,i=0;i<this.coords.boxes.y;i++){for(var o=[],s=[],u=Math.floor(i*this.coords.resid_per_box.y);u<Math.floor((i+1)*this.coords.resid_per_box.y)&&u<t;u++)this.model.at(u)&&(o.push(this.model.at(u).get("seq")),s.push(this.model.at(u).get("hidden")));var a=0;r+=this.coords.boxes_size.y;for(var l=0;l<this.coords.boxes.x;l++){for(var c=[],f=0;f<o.length;f++)for(var h=Math.floor(l*this.coords.resid_per_box.x);h<Math.floor((l+1)*this.coords.resid_per_box.x)&&h<o[f].length;h++)if(s[f])c.push("grey");else{var d=o[f][h];n&&(d=d.toUpperCase());var p=this.color.getColor(d,{pos:h});e.indexOf(h)>=0&&(p="grey"),"undefined"!=typeof p&&null!==p&&c.push(p)}0!==c.length&&(this.ctx.fillStyle=this._mode(c),this.ctx.fillRect(a,r,this.coords.boxes_size.x,this.coords.boxes_size.y)),a+=this.coords.boxes_size.x}}return this._drawSelection()},coords:{screen_to_model:function(t,e){var n=t*this.resid_per_box[e]/this.boxes_size[e];return Math.floor(n)},model_to_screen:function(t,e){return Math.floor(t*this.boxes_size[e]/this.resid_per_box[e])},updatecoords_transform:function(t){var e=t.g.zoomer.get("boxRectHeight"),n=t.g.zoomer.get("boxRectWidth"),r=t.g.zoomer.get("overviewboxWidth"),i=t.g.zoomer.get("overviewboxHeight"),o="fixed"===r?t.model.getMaxLength()*n:Math.min(t.g.zoomer.get("alignmentWidth")+t.g.zoomer.getLeftBlockWidth(),t.model.getMaxLength()*n),s="fixed"===i?t.model.length*e:Math.min(isNaN(parseInt(i,10))?1e10:parseInt(i,10),t.model.length*e);this.container_size={x:o,y:s},this.boxes_size={x:n,y:e},this.resid_per_box={x:Math.max(1,t.model.getMaxLength()/o*n),y:Math.max(1,t.model.length/s*e)},this.boxes={x:Math.ceil(o/n),y:Math.ceil(s/e)}}},_mode:function(t){return t.sort(function(e,n){return t.filter(function(t){return t===e}).length-t.filter(function(t){return t===n}).length}).pop()},_drawSelection:function(){var t=this;if(!(this.dragStart.length>0)||this.prolongSelection){this.ctx.fillStyle="#666666",this.ctx.globalAlpha=.9;for(var e=this.g.selcol.length,n=function(e){var n=t.g.selcol.at(e);if(!n)return"continue";var r=void 0,i=void 0;"column"===n.get("type")?t.ctx.fillRect(t.coords.boxes_size.x*n.get("xStart"),0,t.coords.boxes_size.x*(n.get("xEnd")-n.get("xStart")+1),t.coords.container_size.y):"row"===n.get("type")?(r=t.model.filter(function(t){return t.get("id")===n.get("seqId")})[0],i=t.model.indexOf(r),t.ctx.fillRect(0,t.coords.model_to_screen(i,"y"),t.coords.model_to_screen(r.get("seq").length,"x"),t.coords.boxes_size.y)):"pos"===n.get("type")&&(r=t.model.filter(function(t){return t.get("id")===n.get("seqId")})[0],i=t.model.indexOf(r),t.ctx.fillRect(t.coords.model_to_screen(n.get("xStart"),"x"),t.coords.model_to_screen(i,"y"),t.coords.model_to_screen(n.get("xEnd")-n.get("xStart")+1,"x"),t.coords.boxes_size.y))},r=0;r<e;r++)n(r);return this.ctx.globalAlpha=1}},_onclick:function(t){return this.g.trigger("meta:click",{seqId:this.model.get("id",{evt:t})})},_onmousemove:function(t){if(0!==this.dragStart.length){this.render(),this.ctx.fillStyle="#666666",this.ctx.globalAlpha=.9;var e=this._calcSelection(o.abs(t));return this.ctx.fillRect(e[0][0],e[1][0],e[0][1]-e[0][0],e[1][1]-e[1][0]),t.preventDefault(),t.stopPropagation()}},_onmousedown:function(t){var e=this;return this.dragStart=o.abs(t),this.dragStartRel=o.rel(t),t.ctrlKey||t.metaKey?this.prolongSelection=!0:this.prolongSelection=!1,s(document.body).on("mousemove.overmove",function(t){return e._onmousemove(t)}),s(document.body).on("mouseup.overup",function(t){return e._onmouseup(t)}),this.dragStart},_calcSelection:function(t){for(var e=[t[0]-this.dragStart[0],t[1]-this.dragStart[1]],n=0;n<=1;n++)e[n]=this.dragStartRel[n]+e[n];for(var r=[[this.dragStartRel[0],e[0]],[this.dragStartRel[1],e[1]]],i=0;i<=1;i++)r[i][1]<r[i][0]&&(r[i]=[r[i][1],r[i][0]]),r[i][0]=Math.max(r[i][0],0);return r},_endSelection:function(t){if(s(document.body).off(".overmove"),s(document.body).off(".overup"),0!==this.dragStart.length){for(var e=this._calcSelection(t),n=0;n<=1;n++)e[0][n]=this.coords.screen_to_model(e[0][n],"x");for(var n=0;n<=1;n++)e[1][n]=this.coords.screen_to_model(e[1][n],"y");e[0][1]=Math.min(this.model.getMaxLength()-1,e[0][1]),e[1][1]=Math.min(this.model.length-1,e[1][1]);for(var i=[],o=e[1][0];o<=e[1][1];o++){var u={seqId:this.model.at(o).get("id"),xStart:e[0][0],xEnd:e[0][1]};i.push(new r.possel(u))}return this.dragStart=[],this.prolongSelection?this.g.selcol.add(i):this.g.selcol.reset(i),this.g.zoomer.setLeftOffset(e[0][0]),this.g.zoomer.setTopOffset(e[1][0])}},_onmouseup:function(t){return this._endSelection(o.abs(t))},_onmouseout:function(t){return this._endSelection(o.abs(t))},_createCanvas:function(){return this.coords.updatecoords_transform(this),this.el.height=this.coords.container_size.y,this.el.width=this.coords.container_size.x,this.ctx=this.el.getContext("2d"),this.el.style.overflow="auto",this.el.style.cursor="crosshair"}});e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3),i=n(2),o=n(5),s=i.extend({initialize:function(t){return this.g=t.g,this.listenTo(this.g.zoomer,"change:columnWidth",this.render),this.toggleClass="msa-hide",this.isVisible=!0,this},attributes:{class:"biojs_msa_scale"},events:{"change input":"updateSlider","click button.msa-btn-close":"hide","click button.msa-btn-open":"show","click button[data-action]":"clickButton"},template:(0,r.template)('\t<div class="msa-scale-minimised">\t  <button class="btn msa-btn msa-btn-open">Zoom</button>\t</div>\t<div class="msa-scale-maximised">\t  <button class="btn msa-btn msa-btn-close" style="float:right">&times; close</button>\t  <div>\t  <input type="range" \t    data-provide="slider" \t    min="<%= min %>" \t    max="<%= max %>" \t    step="<%= step %>" \t    value="<%= value %>" \t  >\t  </div>\t  <div class="btngroup msa-btngroup">\t    <button class="btn msa-btn" data-action="smaller"><span class="glyphicon-zoom-out"></span>-</button>\t    <button class="btn msa-btn" data-action="bigger"><span class="glyphicon-zoom-in"></span>+</button>\t    <button class="btn msa-btn" data-action="reset"><span class="glyphicon-repeat"></span>reset</button>\t  </div>\t</div>\t'),render:function(){var t=this.model.getSizeRange(),e={value:this.model.getSize(),min:t[0],max:t[1],step:this.model.step||1};return this.$el.html(this.template(e)),this.isVisible?this.show():this.hide(),this},updateSlider:function(t){var e=t.target,n=parseInt(o(e).val());this.model.setSize(n)},clickButton:function(t){var e=t.target,n=o(e).data("action");return this.model[n],"function"==typeof this.model[n]&&this.model[n](),this},hide:function(){this.isVisible=!1,this.$el.find(".msa-scale-minimised").removeClass(this.toggleClass),this.$el.find(".msa-scale-maximised").addClass(this.toggleClass)},show:function(){this.isVisible=!1,this.$el.find(".msa-scale-minimised").addClass(this.toggleClass),this.$el.find(".msa-scale-maximised").removeClass(this.toggleClass)}});e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(8),i=n(4),o=n(14),s=(n(7),i.extend({initialize:function(t){return this.g=t.g,this.listenTo(this.g.user,"change:searchText",function(t,e){return this.search(e),this.render()}),this.sel=[],this.selPos=0},events:{scroll:"_sendScrollEvent"},render:function(){this.renderSubviews(),this.el.className="biojs_msa_searchresult";var t=this.g.user.get("searchText");return"undefined"!=typeof t&&null!==t&&t.length>0&&(0===this.sel.length?this.el.textContent="no selection found":(this.resultBox=o.mk("div"),this.resultBox.className="biojs_msa_searchresult_ovbox",this.updateResult(),this.el.appendChild(this.resultBox),this.el.appendChild(this.buildBtns()))),this},updateResult:function(){var t="search pattern: "+this.g.user.get("searchText");t+=", selection: "+(this.selPos+1);var e=this.sel[this.selPos];return t+=" (",t+=e.get("xStart")+" - "+e.get("xEnd"),t+=", id: "+e.get("seqId"),t+=")",this.resultBox.textContent=t},buildBtns:function(){var t=this,e=o.mk("button");e.textContent="Prev",e.addEventListener("click",function(){return t.moveSel(-1)});var n=o.mk("button");n.textContent="Next",n.addEventListener("click",function(){return t.moveSel(1)});var r=o.mk("button");r.textContent="All",r.addEventListener("click",function(){return t.g.selcol.reset(t.sel)});var i=o.mk("div");return i.appendChild(e),i.appendChild(n),i.appendChild(r),i.className="biojs_msa_searchresult_row",i},moveSel:function(t){var e=this.selPos+t;return e<0||e>=this.sel.length?-1:(this.focus(e),this.selPos=e,this.updateResult())},focus:function(t){var e=this.sel[t],n=e.get("xStart");return this.g.zoomer.setLeftOffset(n),this.g.selcol.reset([e])},search:function t(e){var n,t=new RegExp(e,"gi"),i=[],o=n=100042;return this.model.each(function(e){var n=e.get("seq");return function(){for(var s,u=[];s=t.exec(n);){var a=s.index,l={xStart:a,xEnd:a+s[0].length-1,seqId:e.get("id")};i.push(new r.possel(l)),u.push(o=Math.min(a,o))}return u}()}),this.g.selcol.reset(i),o===n&&(o=0),this.g.zoomer.setLeftOffset(o),this.sel=i}}));e.default=s},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(3),o=n(125),s=r(o),u=n(137),a=r(u),l=n(126),c=r(l),f=n(128),h=r(f),d=n(127),p=r(d),g=n(4),v=g.extend({initialize:function(t){return this.g=t.g,this.draw(),this.listenTo(this.g.stats,"reset",function(){return this.rerender()}),this.listenTo(this.model,"change:hidden",(0,i.debounce)(this.rerender,10)),this.listenTo(this.model,"sort",this.rerender),this.listenTo(this.model,"add",function(){return console.log("seq add")}),this.listenTo(this.g.vis,"change:sequences",this.rerender),this.listenTo(this.g.vis,"change:overviewbox",this.rerender),this.listenTo(this.g.visorder,"change",this.rerender),this.listenTo(this.g.zoomer,"change:columnWidth",this.rerender),this.listenTo(this.g.vis,"change:scaleslider",this.rerender),this},draw:function(){if(this.removeViews(),this.g.vis.get("overviewbox")){var t=new c.default({model:this.model,g:this.g});t.ordering=this.g.visorder.get("overviewBox"),this.addView("overviewBox",t)}var e=new a.default({model:this.model,g:this.g});e.ordering=this.g.visorder.get("headerBox"),this.addView("headerBox",e);var n=new h.default({model:this.model,g:this.g});n.ordering=this.g.visorder.get("searchBox"),this.addView("searchbox",n);var r=new s.default({model:this.model,g:this.g});if(r.ordering=this.g.visorder.get("alignmentBody"),this.addView("body",r),this.g.vis.get("scaleslider")){var i=new p.default({model:this.g.scale,g:this.g});i.ordering=this.g.visorder.get("scaleSlider"),this.addView("scaleSlider",i)}return this},render:function(t){return this.renderSubviews(),this.el.className="biojs_msa_stage",this},rerender:function(){if(!this.g.config.get("manualRendering"))return this.draw(),this.render()}});e.default=v},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=(n(13),function(){function t(e){r(this,t),this.g=e,this.cache={},this.cacheHeight=0,this.cacheWidth=0}return i(t,[{key:"getFontTile",value:function(t,e,n){return e===this.cacheWidth&&n===this.cacheHeight||(this.cacheHeight=n,this.cacheWidth=e,this.cache={}),void 0===this.cache[t]&&this.createTile(t,e,n),this.cache[t]}},{key:"createTile",value:function(t,e,n){var r=this.cache[t]=document.createElement("canvas");return r.width=e,r.height=n,this.ctx=r.getContext("2d"),this.ctx.font=this.g.zoomer.get("residueFont")+"px mono",this.ctx.textBaseline="middle",this.ctx.textAlign="center",this.ctx.fillText(t,e/2,n/2,e)}}]),t}());e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3),i=n(13),o={setMaxScrollHeight:function(){return this.maxScrollHeight=this.g.zoomer.getMaxAlignmentHeight()-this.g.zoomer.get("alignmentHeight")},setMaxScrollWidth:function(){return this.maxScrollWidth=this.g.zoomer.getMaxAlignmentWidth()-this.g.zoomer.getAlignmentWidth()}},s=function(t,e){return this.g=t,this.model=e,this.maxScrollWidth=0,this.maxScrollHeight=0,this.setMaxScrollHeight(),this.setMaxScrollWidth(),this.listenTo(this.g.zoomer,"change:rowHeight",this.setMaxScrollHeight),this.listenTo(this.g.zoomer,"change:columnWidth",this.setMaxScrollWidth),this.listenTo(this.g.zoomer,"change:alignmentWidth",this.setMaxScrollWidth),this.listenTo(this.g.zoomer,"change:alignmentHeight",this.setMaxScrollHeight),this.listenTo(this.model,"add change reset",function(){return this.setMaxScrollHeight(),this.setMaxScrollWidth()},this),this};(0,r.extend)(s.prototype,o),i.mixin(s.prototype),e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3),i=function(t,e){return this.g=t,this.ctx=e,this};_.extend(i.prototype,{_getSelection:function(t){var e=t.get("seq").length,n=[],i=this.g.selcol.getSelForRow(t.get("id")),o=(0,r.find)(i,function(t){return"row"===t.get("type")});if("undefined"!=typeof o&&null!==o)for(var s=e-1,u=0;u<=s;u++)n.push(u);else if(i.length>0)for(var a,l=0;l<i.length;l++){
  a=i[l];for(var c=a.get("xStart"),f=a.get("xEnd"),h=c;h<=f;h++)n.push(h)}return n},_appendSelection:function(t){var e=this,n=t.model.get("seq"),r=this._getSelection(t.model),i=this._getPrevNextSelection(t.model),o=i[0],s=i[1];if(this.g.zoomer.get("columnWidth"),this.g.zoomer.get("rowHeight"),0!==r.length){var u=0;return function(){for(var i=[],a=n.length-1,l=function(n){i.push(function(){if(t.hidden.indexOf(n)>=0)return u++;var i=n-u;return r.indexOf(n)>=0&&(0===i||r.indexOf(n-1)<0)?e._renderSelection({n:n,k:i,selection:r,mPrevSel:o,mNextSel:s,xZero:t.xZero,yZero:t.yZero,model:t.model}):void 0}())},c=0;c<=a;c++)l(c);return i}()}},_renderSelection:function(t){for(var e=t.xZero,n=t.yZero,r=t.n,i=t.k,o=t.selection,s=t.mPrevSel,u=t.mNextSel,a=0,l=t.model.get("seq").length-1,c=r;c<=l&&o.indexOf(c)>=0;c++)a++;var f=this.g.zoomer.get("columnWidth"),h=this.g.zoomer.get("rowHeight"),d=f*a+1,p=this.g.columns.get("hidden");this.ctx.beginPath();var g=this.ctx.lineWidth;this.ctx.lineWidth=3;var v=this.ctx.strokeStyle;this.ctx.strokeStyle="#FF0000",e+=i*f;for(var m=0,y=a-1,_=0;_<=y;_++){var b=r+_;p.indexOf(b)>=0||("undefined"!=typeof s&&null!==s&&s.indexOf(b)>=0||(this.ctx.moveTo(e+m,n),this.ctx.lineTo(m+f+e,n)),"undefined"!=typeof u&&null!==u&&u.indexOf(b)>=0||(this.ctx.moveTo(m+e,h+n),this.ctx.lineTo(m+f+e,h+n)),m+=f)}return this.ctx.moveTo(e,n),this.ctx.lineTo(e,h+n),this.ctx.moveTo(e+d,n),this.ctx.lineTo(e+d,h+n),this.ctx.stroke(),this.ctx.strokeStyle=v,this.ctx.lineWidth=g},_getPrevNextSelection:function(t){var e=t.collection.prev(t),n=t.collection.next(t),r=void 0,i=void 0;return"undefined"!=typeof e&&null!==e&&(r=this._getSelection(e)),"undefined"!=typeof n&&null!==n&&(i=this._getSelection(n)),[r,i]}}),e.default=i},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var s,u=t[Symbol.iterator]();!(r=(s=u.next()).done)&&(n.push(s.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&u.return&&u.return()}finally{if(i)throw o}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=n(3),s=n(130),u=r(s),a=n(132),l=r(a),c=n(134),f=r(c),h=n(131),d=r(h),p=n(4),g=n(47),v=n(5),m=p.extend({tagName:"canvas",initialize:function(t){return this.g=t.g,this.listenTo(this.g.zoomer,"change:_alignmentScrollLeft change:_alignmentScrollTop",function(t,e,n){if(null==("undefined"!=typeof n&&null!==n?n.origin:void 0)||"canvasseq"!==n.origin)return this.render()}),this.listenTo(this.g.columns,"change:hidden",this.render),this.listenTo(this.g.zoomer,"change:alignmentWidth change:alignmentHeight",this.render),this.listenTo(this.g.colorscheme,"change",this.render),this.listenTo(this.g.selcol,"reset add",this.render),this.listenTo(this.model,"reset add",this.render),this.el.style.display="inline-block",this.el.style.overflowX="hidden",this.el.style.overflowY="hidden",this.el.className="biojs_msa_seqblock",this.ctx=this.el.getContext("2d"),this.cache=new u.default(this.g),this.coordsCache=new d.default(this.g,this.model),this.listenTo(this.g.zoomer,"change:residueFont",function(){return this.cache=new u.default(this.g),this.render()}),this.sel=new l.default(this.g,this.ctx),this._setColor(),this.throttleTime=0,this.throttleCounts=0,null!=document.documentElement.style.webkitAppearance?this.throttledDraw=function(){var t=+new Date;if(this.draw(),this.throttleTime+=+new Date-t,this.throttleCounts++,this.throttleCounts>15)return Math.ceil(this.throttleTime/this.throttleCounts),this.throttledDraw=this.draw}:this.throttledDraw=(0,o.throttle)(this.throttledDraw,30),this.manageEvents()},throttledDraw:function(){var t=+new Date;if(this.draw(),this.throttleTime+=+new Date-t,this.throttleCounts++,this.throttleCounts>15){var e=Math.ceil(this.throttleTime/this.throttleCounts);return e*=1.2,e=Math.max(20,e),this.throttledDraw=_.throttle(this.draw,e)}},manageEvents:function(){var t={};return t.mousedown="_onmousedown",t.touchstart="_ontouchstart",this.g.config.get("registerMouseClicks")&&(t.dblclick="_onclick"),this.g.config.get("registerMouseHover")&&(t.mousein="_onmousein",t.mouseout="_onmouseout"),t.mousewheel="_onmousewheel",t.DOMMouseScroll="_onmousewheel",this.delegateEvents(t),this.listenTo(this.g.config,"change:registerMouseHover",this.manageEvents),this.listenTo(this.g.config,"change:registerMouseClick",this.manageEvents),this.dragStart=[]},_setColor:function(){return this.color=this.g.colorscheme.getSelectedScheme()},draw:function(){if(this.el.width=this.el.width,null!=this.seqDrawer&&this.model.length>0)return this.seqDrawer.drawLetters(),this.seqDrawer.drawRows(this.sel._appendSelection,this.sel),this.seqDrawer.drawRows(this.drawFeatures,this)},drawFeatures:function(t){var e=this.g.zoomer.get("columnWidth"),n=this.g.zoomer.get("rowHeight");if(t.model.attributes.height>1){var r=this.ctx;return t.model.attributes.features.each(function(i){r.fillStyle=i.attributes.fillColor||"red";var o=i.attributes.xEnd-i.attributes.xStart+1,s=(i.attributes.row+1)*n;return r.fillRect(i.attributes.xStart*e+t.xZero,s+t.yZero,e*o,n)}),r.fillStyle="black",r.font=this.g.zoomer.get("residueFont")+"px mono",r.textBaseline="middle",r.textAlign="center",t.model.attributes.features.each(function(i){var o=i.attributes.xEnd-i.attributes.xStart+1,s=(i.attributes.row+1)*n;return r.fillText(i.attributes.text,t.xZero+i.attributes.xStart*e+o/2*e,t.yZero+.5*n+s)})}},render:function(){return this.el.setAttribute("height",this.g.zoomer.get("alignmentHeight")+"px"),this.el.setAttribute("width",this.g.zoomer.getAlignmentWidth()+"px"),this.g.zoomer._checkScrolling(this._checkScrolling([this.g.zoomer.get("_alignmentScrollLeft"),this.g.zoomer.get("_alignmentScrollTop")]),{header:"canvasseq"}),this._setColor(),this.seqDrawer=new f.default(this.g,this.ctx,this.model,{width:this.el.width,height:this.el.height,color:this.color,cache:this.cache}),this.throttledDraw(),this},_onmousemove:function(t,e){if(0!==this.dragStart.length){var n=g.abs(t),r=[n[0]-this.dragStart[0],n[1]-this.dragStart[1]],i=this.g.zoomer.get("canvasEventScale");e&&(i=3);for(var o=0;o<=1;o++)r[o]=r[o]*i;for(var s=[this.dragStartScroll[0]-r[0],this.dragStartScroll[1]-r[1]],u=0;u<=1;u++)s[u]=Math.round(s[u]);var a=this._checkScrolling(s);this.g.zoomer._checkScrolling(a,{origin:"canvasseq"});for(var l=0;l<=1;l++)a[l]!==s[l]&&(0===a[l]?(this.dragStart[l]=n[l],this.dragStartScroll[l]=0):this.dragStart[l]=n[l]-a[l]);return this.throttledDraw(),null!=t.preventDefault?(t.preventDefault(),t.stopPropagation()):void 0}},_ontouchmove:function(t){return this._onmousemove(t.changedTouches[0],!0),t.preventDefault(),t.stopPropagation()},_onmousedown:function(t){var e=this;return this.dragStart=g.abs(t),this.dragStartScroll=[this.g.zoomer.get("_alignmentScrollLeft"),this.g.zoomer.get("_alignmentScrollTop")],v(document.body).on("mousemove.overmove",function(t){return e._onmousemove(t)}),v(document.body).on("mouseup.overup",function(){return e._cleanup()}),t.preventDefault()},_ontouchstart:function(t){var e=this;return this.dragStart=g.abs(t.changedTouches[0]),this.dragStartScroll=[this.g.zoomer.get("_alignmentScrollLeft"),this.g.zoomer.get("_alignmentScrollTop")],v(document.body).on("touchmove.overtmove",function(t){return e._ontouchmove(t)}),v(document.body).on("touchend.overtend touchleave.overtleave touchcancel.overtcanel",function(t){return e._touchCleanup(t)})},_onmousewinout:function(t){if(t.toElement===document.body.parentNode)return this._cleanup()},_cleanup:function(){return this.dragStart=[],v(document.body).off(".overmove"),v(document.body).off(".overup"),v(document.body).off(".overout")},_touchCleanup:function(t){return t.changedTouches.length>0&&this._onmousemove(t.changedTouches[0],!0),this.dragStart=[],v(document.body).off(".overtmove"),v(document.body).off(".overtend"),v(document.body).off(".overtleave"),v(document.body).off(".overtcancel")},_onmousewheel:function(t){var e=g.wheelDelta(t);return this.g.zoomer.set("_alignmentScrollLeft",this.g.zoomer.get("_alignmentScrollLeft")+e[0]),this.g.zoomer.set("_alignmentScrollTop",this.g.zoomer.get("_alignmentScrollTop")+e[1]),t.preventDefault()},_onclick:function(t){var e=this._getClickPos(t);return"undefined"!=typeof e&&null!==e&&(null!=e.feature?this.g.trigger("feature:click",e):this.g.trigger("residue:click",e)),this.throttledDraw()},_onmousein:function(t){var e=this._getClickPos(t);return"undefined"!=typeof e&&null!==e&&(null!=e.feature?this.g.trigger("feature:mousein",e):this.g.trigger("residue:mousein",e)),this.throttledDraw()},_onmouseout:function(t){var e=this._getClickPos(t);return"undefined"!=typeof e&&null!==e&&(null!=e.feature?this.g.trigger("feature:mouseout",e):this.g.trigger("residue:mouseout",e)),this.throttledDraw()},_getClickPos:function(t){var e=g.rel(t);e[0]+=this.g.zoomer.get("_alignmentScrollLeft");var n=Math.floor(e[0]/this.g.zoomer.get("columnWidth")),r=this.seqDrawer._getSeqForYClick(e[1]),o=i(r,2),s=o[0],u=o[1];n+=this.g.columns.calcHiddenColumns(n),s+=this.model.calcHiddenSeqs(s),n=Math.max(0,n),s=Math.max(0,s);var a=this.model.at(s).get("id");if(!(u>0))return{seqId:a,rowPos:n,evt:t};var l=this.model.at(s).get("features").getFeatureOnRow(u-1,n);return 0!==l.length?{seqId:a,feature:l[0],rowPos:n,evt:t}:void 0},_checkScrolling:function(t){for(var e=[this.coordsCache.maxScrollWidth,this.coordsCache.maxScrollHeight],n=0;n<=1;n++)t[n]>e[n]&&(t[n]=e[n]),t[n]<0&&(t[n]=0);return t}});e.default=m},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var s,u=t[Symbol.iterator]();!(r=(s=u.next()).done)&&(n.push(s.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&u.return&&u.return()}finally{if(i)throw o}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=n(3),o={updateConfig:function(){this.rectWidth=this.g.zoomer.get("columnWidth"),this.rectHeight=this.g.zoomer.get("rowHeight")},drawLetters:function(){return this.updateConfig(),this.ctx.globalAlpha=this.g.colorscheme.get("opacity"),this.drawSeqs(function(t){return this.drawSeq(t,this._drawRect)}),this.ctx.globalAlpha=1,this.rectWidth>=this.g.zoomer.get("minLetterDrawSize")&&this.drawSeqs(function(t){return this.drawSeq(t,this._drawLetter)}),this},drawSeqs:function(t,e){var n=this.g.columns.get("hidden");e=e||this;for(var i=this.getStartSeq(),o=r(i,2),s=o[0],u=o[1],a=s;a<this.model.length;a++){var l=this.model.at(a);if(!l.get("hidden")&&(t.call(e,{model:l,yPos:u,y:a,hidden:n}),u+=(l.attributes.height||1)*this.rectHeight,u>this.height))break}},drawRows:function(t,e){return this.drawSeqs(function(n){return this.drawRow(n,t,e)})},drawRow:function(t,e,n){var r=this.g.zoomer.get("columnWidth"),i=Math.max(0,Math.abs(Math.ceil(-this.g.zoomer.get("_alignmentScrollLeft")/r))),o=-Math.abs(-this.g.zoomer.get("_alignmentScrollLeft")%r),s=o-i*r,u=t.yPos;return e.call(n,{model:t.model,xZero:s,yZero:u,hidden:t.hidden})},getStartSeq:function(){for(var t=Math.max(0,Math.floor(this.g.zoomer.get("_alignmentScrollTop")/this.rectHeight))+1,e=0,n=0;e<t&&n<this.model.length;)e+=this.model.at(n).attributes.height||1,n++;return[n-1,-Math.max(0,this.g.zoomer.get("_alignmentScrollTop")-e*this.rectHeight+(this.model.at(n-1).attributes.height||1)*this.rectHeight)]},_getSeqForYClick:function(t){for(var e=this.getStartSeq(),n=r(e,2),i=n[0],o=n[1],s=o%this.rectHeight,u=Math.max(0,Math.floor((t-s)/this.rectHeight))+1,a=0,l=i;a<u&&l<this.model.length;)a+=this.model.at(l).attributes.height||1,l++;return[l-1,Math.max(0,Math.floor(t/this.rectHeight)-a+(this.model.at(l-1).get("height")||1))]},drawSeq:function(t,e){for(var n=t.model.get("seq"),r=t.yPos,i=this.rectWidth,o=this.rectHeight,s=Math.max(0,Math.abs(Math.ceil(-this.g.zoomer.get("_alignmentScrollLeft")/i))),u=-Math.abs(-this.g.zoomer.get("_alignmentScrollLeft")%i),a={rectWidth:i,rectHeight:o,yPos:r,y:t.y},l=this.width,c=s;c<n.length;c++){var f=n[c];if(f=f.toUpperCase(),a.x=c,a.c=f,a.xPos=u,t.hidden.indexOf(c)<0&&(e(this,a),u+=i,u>l))break}},_drawRect:function(t,e){var n=t.color.getColor(e.c,{pos:e.x,y:e.y});if("undefined"!=typeof n&&null!==n)return t.ctx.fillStyle=n,t.ctx.fillRect(e.xPos,e.yPos,e.rectWidth,e.rectHeight)},_drawLetter:function(t,e){return t.ctx.drawImage(t.cache.getFontTile(e.c,e.rectWidth,e.rectHeight),e.xPos,e.yPos,e.rectWidth,e.rectHeight)}},s=function(t,e,n,r){return this.g=t,this.ctx=e,this.model=n,this.width=r.width,this.height=r.height,this.color=r.color,this.cache=r.cache,this.rectHeight=this.g.zoomer.get("rowHeight"),this.rectWidth=this.g.zoomer.get("columnWidth"),this};(0,i.extend)(s.prototype,o),e.default=s},function(t,e,n){"use strict";function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}Object.defineProperty(e,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=n(12),s=r(o),u=n(2),a=n(7),l=u.extend({className:"biojs_msa_conserv",initialize:function(t){this.g=t.g,this.listenTo(this.g.zoomer,"change:stepSize change:labelWidth change:columnWidth",this.render),this.listenTo(this.g.vis,"change:labels change:metacell",this.render),this.listenTo(this.g.columns,"change:scaling",this.render),this.listenTo(this.g.stats,"reset",this.render);var e=_.extend({},{fillColor:["#660","#ff0"],strokeColor:"#330",maxHeight:20,rectStyler:function(t,e){return t}},this.g.conservationConfig);return this.fillColor=e.fillColor,this.strokeColor=e.strokeColor,this.maxHeight=e.maxHeight,this.rectStyler=e.rectStyler,this.manageEvents()},colorer:function t(e){var t=function(){return"none"};if("string"==typeof e)t=function(){return e};else if(Array.isArray(e)){2!=e.length&&console.error("ERROR: colorRange array should have exactly two elements",e);var n="undefined"!=typeof d3&&!!d3.scale,r="undefined"!=typeof d3_scale;if(n||r){var o=n?d3.scale.linear():d3_scale.scaleLinear(),s=o.domain([0,this.maxHeight]).range(e);t=function(t){return s(t.height)}}else console.warn("providing a [min/max] range as input requires d3 to be included - only using the first color"),t=function(t){return e[0]}}else console.warn("expected colorRange to be '#rgb' or ['#rgb', '#rgb']",e,"("+("undefined"==typeof e?"undefined":i(e))+")");return t},render:function(){var t=this.g.stats.scale(this.g.stats.conservation());a.removeAllChilds(this.el);var e=this.model.getMaxLength(),n=this.g.zoomer.get("columnWidth"),r=this.maxHeight,i=n*(e-this.g.columns.get("hidden").length),o=s.base({height:r,width:i});o.style.display="inline-block",o.style.cursor="pointer";for(var u=(this.rectData,this.colorer(this.fillColor)),l=this.colorer(this.strokeColor),c=this.rectStyler,f=this.g.zoomer.get("stepSize"),h=this.g.columns.get("hidden"),d=0,p=0;p<e;)if(h.indexOf(p)>=0)p+=f;else{i=n*f;for(var g=0,v=f-1,m=0;0<v?m<=v:m>=v;0<v?m++:m--)g+=t[p];var y=r*(g/f),_={x:d,y:r-y,maxheight:r,width:i-n/4,height:y,rowPos:p},b=s.rect(_);b.style.stroke=l(_),b.style.fill=u(_),"function"==typeof c&&c(b,_),b.rowPos=p,o.appendChild(b),d+=i,p+=f}return this.el.appendChild(o),this},_onclick:function(t){var e=this,n=t.target.rowPos,r=this.g.zoomer.get("stepSize");return function(){for(var i=[],o=r-1,s=0;0<o?s<=o:s>=o;0<o?s++:s--)i.push(e.g.trigger("bar:click",{rowPos:n+s,evt:t}));return i}()},manageEvents:function(){var t={};return this.g.config.get("registerMouseClicks")&&(t.click="_onclick"),this.g.config.get("registerMouseHover")&&(t.mousein="_onmousein",t.mouseout="_onmouseout"),this.delegateEvents(t),this.listenTo(this.g.config,"change:registerMouseHover",this.manageEvents),this.listenTo(this.g.config,"change:registerMouseClick",this.manageEvents)},_onmousein:function(t){var e=this.g.zoomer.get("stepSize"*t.rowPos);return this.g.trigger("bar:mousein",{rowPos:e,evt:t})},_onmouseout:function(t){var e=this.g.zoomer.get("stepSize"*t.rowPos);return this.g.trigger("bar:mouseout",{rowPos:e,evt:t})}});e.default=l},function(t,e,n){"use strict";function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}Object.defineProperty(e,"__esModule",{value:!0});var i=n(12),o=r(i),s=n(2),u=n(7),a=s.extend({className:"biojs_msa_gapview",initialize:function(t){return this.g=t.g,this.listenTo(this.g.zoomer,"change:stepSize change:labelWidth change:columnWidth",this.render),this.listenTo(this.g.vis,"change:labels change:metacell",this.render),this.listenTo(this.g.columns,"change:scaling",this.render),this.listenTo(this.model,"reset",this.render),this.manageEvents()},render:function(){var t=this.g.stats.gaps();u.removeAllChilds(this.el);var e=this.model.getMaxLength(),n=this.g.zoomer.get("columnWidth"),r=20,i=n*(e-this.g.columns.get("hidden").length),s=o.base({height:r,width:i});s.style.display="inline-block",s.style.cursor="pointer";for(var a=this.g.zoomer.get("stepSize"),l=this.g.columns.get("hidden"),c=0,f=0;f<e;)if(l.indexOf(f)>=0)f+=a;else{i=n*a;for(var h=0,d=a-1,p=0;0<d?p<=d:p>=d;0<d?p++:p--)h+=t[f];var g=r*(h/a),v=o.rect({x:c,y:r-g,width:i-n/4,height:g,style:"stroke:red;stroke-width:1;"});v.rowPos=f,s.appendChild(v),c+=i,f+=a}return this.el.appendChild(s),this},_onclick:function(t){var e=this,n=t.target.rowPos,r=this.g.zoomer.get("stepSize");return function(){for(var i=[],o=r-1,s=0;0<o?s<=o:s>=o;0<o?s++:s--)i.push(e.g.trigger("gap:click",{rowPos:n+s,evt:t}));return i}()},manageEvents:function(){var t={};return this.g.config.get("registerMouseClicks")&&(t.click="_onclick"),this.g.config.get("registerMouseHover")&&(t.mousein="_onmousein",t.mouseout="_onmouseout"),this.delegateEvents(t),this.listenTo(this.g.config,"change:registerMouseHover",this.manageEvents),this.listenTo(this.g.config,"change:registerMouseClick",this.manageEvents)},_onmousein:function(t){var e=this.g.zoomer.get("stepSize"*t.rowPos);return this.g.trigger("gap:mousein",{rowPos:e,evt:t})},_onmouseout:function(t){var e=this.g.zoomer.get("stepSize"*t.rowPos);return this.g.trigger("gap:mouseout",{rowPos:e,evt:t})}});e.default=a},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(138),o=r(i),s=n(140),u=r(s),a=n(4),l=a.extend({initialize:function(t){var e=this;return this.g=t.g,this.draw(),this.listenTo(this.g.vis,"change:labels change:metacell change:leftHeader",function(){return e.draw(),e.render()})},draw:function(){if(this.removeViews(),this.g.vis.get("leftHeader")&&(this.g.vis.get("labels")||this.g.vis.get("metacell"))){var t=new o.default({model:this.model,g:this.g});t.ordering=-50,this.addView("lHeader",t)}var e=new u.default({model:this.model,g:this.g});return e.ordering=0,this.addView("rHeader",e)},render:function(){return this.renderSubviews(),this.el.className="biojs_msa_header"}});e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(14),i=n(2),o=n(7),s=i.extend({className:"biojs_msa_headers",initialize:function(t){return this.g=t.g,this.listenTo(this.g.vis,"change:metacell change:labels",this.render),this.listenTo(this.g.zoomer,"change:labelWidth change:metaWidth",this.render)},render:function(){o.removeAllChilds(this.el);var t=0;return t+=this.g.zoomer.getLeftBlockWidth(),this.el.style.width=t+"px",this.g.vis.get("labels")&&this.el.appendChild(this.labelDOM()),this.g.vis.get("metacell")&&this.el.appendChild(this.metaDOM()),this.el.style.display="inline-block",this.el.style.fontSize=this.g.zoomer.get("markerFontsize"),this},labelDOM:function(){var t=r.mk("div");if(t.style.width=this.g.zoomer.getLabelWidth(),t.style.display="inline-block",this.g.vis.get("labelCheckbox")&&t.appendChild(this.addEl(".",10)),this.g.vis.get("labelId")&&t.appendChild(this.addEl("ID",this.g.zoomer.get("labelIdLength"))),this.g.vis.get("labelPartition")&&t.appendChild(this.addEl("part",15)),this.g.vis.get("labelName")){var e=this.addEl("Label");t.appendChild(e)}return t},addEl:function(t,e){var n=document.createElement("span");return n.textContent=t,"undefined"!=typeof e&&null!==e&&(n.style.width=e+"px"),n.style.display="inline-block",n},metaDOM:function(){var t=r.mk("div");return t.style.width=this.g.zoomer.getMetaWidth(),t.style.display="inline-block",this.g.vis.get("metaGaps")&&t.appendChild(this.addEl("Gaps",this.g.zoomer.get("metaGapWidth"))),this.g.vis.get("metaIdentity")&&t.appendChild(this.addEl("Ident",this.g.zoomer.get("metaIdentWidth"))),t}});e.default=s},function(t,e,n){"use strict";function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}Object.defineProperty(e,"__esModule",{value:!0});var i=n(12),o=r(i),s=n(2),u=n(7),a=n(5),l=s.extend({className:"biojs_msa_marker",initialize:function(t){return this.g=t.g,this.listenTo(this.g.zoomer,"change:stepSize change:labelWidth change:columnWidth change:markerStepSize change:markerFontsize",this.render),this.listenTo(this.g.vis,"change:labels change:metacell",this.render),this.manageEvents()},render:function(){u.removeAllChilds(this.el);var t=this.g.zoomer.get("markerFontsize"),e=this.g.zoomer.get("columnWidth"),n=this.g.zoomer.get("stepSize"),r=this.g.zoomer.get("markerStepSize"),i=this.g.columns.get("hidden");this.el.style.fontSize=t;for(var o=document.createElement("span"),s=this.model.getMaxLength(),a=0;a<s;a++)if(i.indexOf(a)>=0){var l=this.markerHidden(a,n);l&&o.appendChild(l),a+=n}else{var c=document.createElement("span");c.className="msa-col-header",c.style.width=e+"px",c.style.display="inline-block",(a+1)%r===0?c.textContent=a+1:(a+1)%n===0?c.textContent=".":c.textContent=" ",c.rowPos=a,o.appendChild(c)}return this.el.appendChild(o),this},markerHidden:function(t,e){for(var n=this,r=this.g.columns.get("hidden").slice(0),i=Math.max(0,t-e),s=!0,u=i;u<=t;u++)s&=r.indexOf(u)>=0;if(!s){for(var l=this.model.getMaxLength(),c=0,f=-1,h=t;h<=l&&(f>=0||(f=r.indexOf(h)),r.indexOf(h)>=0);h++)c++;var d=o.base({height:10,width:10});d.style.position="relative";var p=o.polygon({points:"0,0 5,5 10,0",style:"fill:lime;stroke:purple;stroke-width:1"});return a(p).on("click",function(t){return r.splice(f,c),n.g.columns.set("hidden",r)}),d.appendChild(p),d}},manageEvents:function(){var t={};return this.g.config.get("registerMouseClicks")&&(t.click="_onclick"),this.g.config.get("registerMouseHover")&&(t.mousein="_onmousein",t.mouseout="_onmouseout"),this.delegateEvents(t),this.listenTo(this.g.config,"change:registerMouseHover",this.manageEvents),this.listenTo(this.g.config,"change:registerMouseClick",this.manageEvents)},_onclick:function(t){var e=t.target.rowPos,n=this.g.zoomer.get("stepSize");return this.g.trigger("column:click",{rowPos:e,stepSize:n,evt:t})},_onmousein:function(t){var e=this.g.zoomer.get("stepSize"*t.rowPos),n=this.g.zoomer.get("stepSize");return this.g.trigger("column:mousein",{rowPos:e,stepSize:n,evt:t})},_onmouseout:function(t){var e=this.g.zoomer.get("stepSize"*t.rowPos),n=this.g.zoomer.get("stepSize");return this.g.trigger("column:mouseout",{rowPos:e,stepSize:n,evt:t})}});e.default=l},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(139),o=r(i),s=n(135),u=r(s),a=n(141),l=r(a),c=n(136),f=r(c),h=n(4),d=h.extend({initialize:function(t){return this.g=t.g,this.blockEvents=!1,this.listenTo(this.g.vis,"change:header",function(){return this.draw(),this.render()}),this.listenTo(this.g.vis,"change",this._setSpacer),this.listenTo(this.g.zoomer,"change:alignmentWidth",this._setWidth),this.listenTo(this.g.zoomer,"change:_alignmentScrollLeft",this._adjustScrollingLeft),this.listenTo(this.g.columns,"change:hidden",function(){return this.draw(),this.render()}),this.draw(),this.g.vis.once("change:loaded",this._adjustScrollingLeft,this)},events:{scroll:"_sendScrollEvent"},draw:function(){if(this.removeViews(),this.g.vis.get("conserv")){var t=new u.default({model:this.model,g:this.g});t.ordering=-20,this.addView("conserv",t)}if(this.g.vis.get("markers")){var e=new o.default({model:this.model,g:this.g});e.ordering=-10,this.addView("marker",e)}if(this.g.vis.get("seqlogo")){var n=new l.default({model:this.model,g:this.g});n.ordering=-30,this.addView("seqlogo",n)}if(this.g.vis.get("gapHeader")){var r=new f.default({model:this.model,g:this.g});return r.ordering=-25,this.addView("gapview",r)}},render:function(){return this.renderSubviews(),this._setSpacer(),this.el.className="biojs_msa_rheader",this.el.style.overflowX="auto",this.el.style.display="inline-block",this._setWidth(),this._adjustScrollingLeft(),this},_sendScrollEvent:function(){return this.blockEvents||this.g.zoomer.set("_alignmentScrollLeft",this.el.scrollLeft,{origin:"header"}),this.blockEvents=!1},_adjustScrollingLeft:function(t,e,n){if(null==("undefined"!=typeof n&&null!==n?n.origin:void 0)||"header"!==n.origin){var r=this.g.zoomer.get("_alignmentScrollLeft");return this.blockEvents=!0,this.el.scrollLeft=r}},_setSpacer:function(){return this.el.style.marginLeft=this._getLabelWidth()+"px"},_getLabelWidth:function(){var t=0;return this.g.vis.get("leftHeader")||(t+=this.g.zoomer.getLeftBlockWidth()),t},_setWidth:function(){return this.el.style.width=this.g.zoomer.getAlignmentWidth()+"px"}});e.default=d},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(74),i=n(2),o=n(7),s=i.extend({initialize:function(t){return this.g=t.g,this.listenTo(this.g.zoomer,"change:alignmentWidth",this.render),this.listenTo(this.g.colorscheme,"change",function(){var t=this.g.colorscheme.getSelectedScheme();return this.seqlogo.changeColors(t),this.render()}),this.listenTo(this.g.zoomer,"change:columnWidth",function(){return this.seqlogo.column_width=this.g.zoomer.get("columnWidth"),this.render()}),this.listenTo(this.g.stats,"reset",function(){return this.draw(),this.render()}),this.draw()},draw:function(){o.removeAllChilds(this.el);var t=this.g.stats.conservResidue({scaled:!0});t=_.map(t,function(t){return _.pick(t,function(t,e){return"-"!==e})});var e={alphabet:"aa",heightArr:t},n=this.g.colorscheme.getSelectedScheme();return this.seqlogo=new r({model:this.model,g:this.g,data:e,yaxis:!1,scroller:!1,xaxis:!1,height:100,column_width:this.g.zoomer.get("columnWidth"),positionMarker:!1,zoom:1,el:this.el,colors:n})},render:function(){return this.seqlogo.render()}});e.default=s},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(143),o=r(i),s=n(4),u=s.extend({initialize:function(t){var e=this;return this.g=t.g,this.draw(),this.listenTo(this.g.zoomer,"change:_alignmentScrollTop",this._adjustScrollingTop),this.g.vis.once("change:loaded",this._adjustScrollingTop,this),this.listenTo(this.g.zoomer,"change:alignmentHeight",this._setHeight),this.listenTo(this.model,"change:reference",this.draw),this.listenTo(this.model,"reset add remove",function(){return e.draw(),e.render()})},draw:function(){this.removeViews();for(var t=0;t<this.model.length;t++)if(!this.model.at(t).get("hidden")){var e=new o.default({model:this.model.at(t),g:this.g});e.ordering=t,this.addView("row_"+t,e)}},events:{scroll:"_sendScrollEvent"},_sendScrollEvent:function(){return this.g.zoomer.set("_alignmentScrollTop",this.el.scrollTop,{origin:"label"})},_adjustScrollingTop:function(){return this.el.scrollTop=this.g.zoomer.get("_alignmentScrollTop")},render:function(){return this.renderSubviews(),this.el.className="biojs_msa_labelblock",this.el.style.display="inline-block",this.el.style.verticalAlign="top",this.el.style.overflowY="auto",this.el.style.overflowX="hidden",this.el.style.fontSize=this.g.zoomer.get("labelFontsize")+"px",this.el.style.lineHeight=""+this.g.zoomer.get("labelLineHeight"),this._setHeight(),this},_setHeight:function(){return this.el.style.height=this.g.zoomer.get("alignmentHeight")+"px"}});e.default=u},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(144),o=r(i),s=n(145),u=r(s),a=n(4),l=a.extend({initialize:function(t){return this.g=t.g,this.draw(),this.listenTo(this.g.vis,"change:labels",this.drawR),this.listenTo(this.g.vis,"change:metacell",this.drawR),this.listenTo(this.g.zoomer,"change:rowHeight",function(){return this.el.style.height=this.g.zoomer.get("rowHeight")+"px"}),this.listenTo(this.g.selcol,"change reset add",this.setSelection)},draw:function(){if(this.removeViews(),this.g.vis.get("labels")&&this.addView("labels",new o.default({model:this.model,g:this.g})),this.g.vis.get("metacell")){var t=new u.default({model:this.model,g:this.g});return this.addView("metacell",t)}},drawR:function(){return this.draw(),this.render()},render:function(){return this.renderSubviews(),this.el.setAttribute("class","biojs_msa_labelrow"),this.el.style.height=this.g.zoomer.get("rowHeight")*(this.model.attributes.height||1)+"px",this.setSelection(),this},setSelection:function(){return this.g.selcol.getSelForRow(this.model.id).length>0?this.el.style.fontWeight="bold":this.el.style.fontWeight="normal"}});e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(2),i=n(7),o=r.extend({initialize:function(t){return this.seq=t.seq,this.g=t.g,this.manageEvents()},manageEvents:function(){var t={};return this.g.config.get("registerMouseClicks")&&(t.click="_onclick"),this.g.config.get("registerMouseHover")&&(t.mousein="_onmousein",t.mouseout="_onmouseout"),this.delegateEvents(t),this.listenTo(this.g.config,"change:registerMouseHover",this.manageEvents),this.listenTo(this.g.config,"change:registerMouseClick",this.manageEvents),this.listenTo(this.g.vis,"change:labelName change:labelId change:labelPartition change:labelCheckbox",this.render),this.listenTo(this.g.zoomer,"change:labelIdLength change:labelNameLength change:labelPartLength change:labelCheckLength",this.render),this.listenTo(this.g.zoomer,"change:labelFontSize change:labelLineHeight change:labelWidth change:rowHeight",this.render)},render:function(){if(i.removeAllChilds(this.el),this.el.style.width=this.g.zoomer.getLabelWidth()+"px",this.el.setAttribute("class","biojs_msa_labels"),this.g.vis.get("labelCheckbox")){var t=document.createElement("input");t.setAttribute("type","checkbox"),t.value=this.model.get("id"),t.name="seq",t.style.width=this.g.zoomer.get("labelCheckLength")+"px",this.el.appendChild(t)}if(this.g.vis.get("labelId")){var e=document.createElement("span"),n=this.model.get("id");isNaN(n)||n++,e.textContent=n,e.style.width=this.g.zoomer.get("labelIdLength")+"px",e.style.display="inline-block",this.el.appendChild(e)}if(this.g.vis.get("labelPartition")){var r=document.createElement("span");r.style.width=this.g.zoomer.get("labelPartLength")+"px",r.textContent=this.model.get("partition"),r.style.display="inline-block",this.el.appendChild(e),this.el.appendChild(r)}if(this.g.vis.get("labelName")){var o=document.createElement("span");o.textContent=this.model.get("name"),this.model.get("ref")&&this.g.config.get("hasRef")&&(o.style.fontWeight="bold"),o.style.width=this.g.zoomer.get("labelNameLength")+"px",this.el.appendChild(o)}return this.el.style.overflow=scroll,this.el.style.fontSize=this.g.zoomer.get("labelFontsize")+"px",this},_onclick:function(t){var e=this.model.get("id");return this.g.trigger("row:click",{seqId:e,evt:t})},_onmousein:function(t){var e=this.model.get("id");return this.g.trigger("row:mouseout",{seqId:e,evt:t})},_onmouseout:function(t){var e=this.model.get("id");return this.g.trigger("row:mouseout",{seqId:e,evt:t})}});e.default=o},function(t,e,n){"use strict";function r(t){
  return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(10),o=n(6),s=r(o),u=n(3),a=n(2),l=n(7),c=a.extend({className:"biojs_msa_metaview",initialize:function(t){return this.g=t.g,this.listenTo(this.g.vis,"change:metacell",this.render),this.listenTo(this.g.zoomer,"change:metaWidth",this.render)},events:{click:"_onclick",mousein:"_onmousein",mouseout:"_onmouseout"},render:function(){l.removeAllChilds(this.el),this.el.style.display="inline-block";var t=this.g.zoomer.getMetaWidth();if(this.el.style.width=t-10,this.el.style.paddingRight=5,this.el.style.paddingLeft=5,this.el.style.fontSize=this.g.zoomer.get("labelFontsize")-2+"px",this.g.vis.get("metaGaps")){var e=this.model.get("seq"),n=(0,u.reduce)(e,function(t,e){return"-"===e?++t:void 0},0);n=(100*n/e.length).toFixed(0)+"%";var r=document.createElement("span");r.textContent=n,r.style.display="inline-block",r.style.width=35,this.el.appendChild(r)}if(this.g.vis.get("metaIdentity")){var o=this.g.stats.identity()[this.model.id],a=document.createElement("span");this.model.get("ref")&&this.g.config.get("hasRef")?a.textContent="ref.":"undefined"!=typeof o&&null!==o&&(a.textContent=o.toFixed(2)),a.style.display="inline-block",a.style.width=40,this.el.appendChild(a)}if(this.g.vis.get("metaLinks")&&this.model.attributes.ids){var c=i.seqs.buildLinks(this.model.attributes.ids);if(Object.keys(c).length>0){var f=new s.default({name:"â†—"});c.forEach(function(t,e){return f.addNode(e,function(e){return window.open(t)})});var h=f.buildDOM();return h.style.cursor="pointer",this.el.appendChild(h)}}},_onclick:function(t){return this.g.trigger("meta:click",{seqId:this.model.get("id",{evt:t})})},_onmousein:function(t){return this.g.trigger("meta:mousein",{seqId:this.model.get("id",{evt:t})})},_onmouseout:function(t){return this.g.trigger("meta:mouseout",{seqId:this.model.get("id",{evt:t})})}});e.default=c},function(t,e){(function(e){"use strict";var n;n="undefined"!=typeof window?window:"undefined"!=typeof e?e:"undefined"!=typeof self?self:{},t.exports=n}).call(e,function(){return this}())},function(t,e,n){"use strict";function r(t,e,n){if(!u(e))throw new TypeError("iterator must be a function");arguments.length<3&&(n=this),"[object Array]"===a.call(t)?i(t,e,n):"string"==typeof t?o(t,e,n):s(t,e,n)}function i(t,e,n){for(var r=0,i=t.length;r<i;r++)l.call(t,r)&&e.call(n,t[r],r,t)}function o(t,e,n){for(var r=0,i=t.length;r<i;r++)e.call(n,t.charAt(r),r,t)}function s(t,e,n){for(var r in t)l.call(t,r)&&e.call(n,t[r],r,t)}var u=n(52);t.exports=r;var a=Object.prototype.toString,l=Object.prototype.hasOwnProperty},function(t,e){"use strict";function n(t){return t.replace(/^\s*|\s*$/g,"")}e=t.exports=n,e.left=function(t){return t.replace(/^\s*/,"")},e.right=function(t){return t.replace(/\s*$/,"")}},function(t,e,n){"use strict";var r=n(148),i=n(147),o=function(t){return"[object Array]"===Object.prototype.toString.call(t)};t.exports=function(t){if(!t)return{};var e={};return i(r(t).split("\n"),function(t){var n=t.indexOf(":"),i=r(t.slice(0,n)).toLowerCase(),s=r(t.slice(n+1));"undefined"==typeof e[i]?e[i]=s:o(e[i])?e[i].push(s):e[i]=[e[i],s]}),e}},function(t,e){"use strict";function n(){for(var t={},e=0;e<arguments.length;e++){var n=arguments[e];for(var i in n)r.call(n,i)&&(t[i]=n[i])}return t}t.exports=n;var r=Object.prototype.hasOwnProperty},function(t,e,n){e=t.exports=n(89)(),e.push([t.id,'.biojs_msa_stage{cursor:default;line-height:normal;font-family:Helvetica}.biojs_msa_seqblock{cursor:move}.biojs_msa_layer{display:block;white-space:nowrap}.biojs_msa_labels{color:#000;display:inline-block;cursor:pointer;vertical-align:middle;overflow:hidden;text-overflow:clip}.biojs_msa_header,.biojs_msa_labels{white-space:nowrap;text-align:left}.biojs_msa_labelrow:before{content:"";display:inline-block;width:0;height:100%;vertical-align:middle}.biojs_msa_labelrow{height:100%}.biojs_msa_labelblock::-webkit-scrollbar,.biojs_msa_rheader::-webkit-scrollbar{//:none;width:7px;height:7px}.biojs_msa_labelblock::-webkit-scrollbar-thumb,.biojs_msa_rheader::-webkit-scrollbar-thumb{border-radius:4px;background-color:rgba(0,0,0,.5);box-shadow:0 0 1px hsla(0,0%,100%,.5)}.biojs_msa_marker{color:#999;white-space:nowrap}.biojs_msa_marker .msa-col-header{cursor:pointer;text-align:center}.biojs_msa_marker .msa-col-header:hover{color:red}.smenubar .smenubar_alink{background:#3498db;background-image:linear-gradient(180deg,#3498db,#2980b9);border-radius:28px;font-family:Arial;color:#fff;padding:3px 10px;margin-left:10px;text-decoration:none}.smenubar{display:inline-block}.smenubar .smenubar_alink:hover{cursor:pointer}.smenu-dropdown{position:absolute;z-index:9;display:none;margin-left:5px;margin-top:22px}.smenu-dropdown .smenu-dropdown-menu,.smenu-dropdown .smenu-dropdown-panel{min-width:160px;max-width:360px;list-style:none;background:#fff;border:1px solid #ddd;border:1px solid rgba(0,0,0,.2);border-radius:6px;box-shadow:0 5px 10px rgba(0,0,0,.2);overflow:visible;padding:4px 0;margin:0}.smenu-dropdown .smenu-dropdown-panel{padding:10px}.smenu-dropdown.smenu-dropdown-scroll .smenu-dropdown-menu,.smenu-dropdown.smenu-dropdown-scroll .smenu-dropdown-panel{max-height:358px;overflow:auto}.smenu-dropdown .smenu-dropdown-menu li{display:block;color:#555;text-decoration:none;line-height:18px;padding:3px 15px;white-space:nowrap}.smenu-dropdown .smenu-dropdown-menu li:hover{background-color:#08c;color:#fff;cursor:pointer}.smenu-dropdown .smenu-dropdown-menu .smenu-dropdown-divider{font-size:1px;border-top:1px solid #e5e5e5;padding:0;margin:5px 0}.biojs_msa_div{position:relative}.biojs_msa_scale{position:absolute;bottom:0;right:0;background-color:#fff;box-shadow:0 2px 3px #999;border-radius:3px;margin:5px 0 0 auto;padding:5px;text-align:center}.biojs_msa_scale .msa-btngroup{margin:5px auto 0}.biojs_msa_scale [type=range]{cursor:pointer}.biojs_msa_scale .msa-btn-close{text-align:right;font-size:.8em;padding:2px}.biojs_msa_scale .msa-btn-open{background-color:#fff}.biojs_msa_scale .msa-hide{display:none}.msa-btn{cursor:pointer;font-size:1.1em;display:inline-block;padding:2px 8px;margin-bottom:0;border:1px solid transparent;border-radius:4px;box-sizing:border-box}.msa-btn:hover{background-color:#ddd}',""])},function(t,e,n){function r(t,e){for(var n=0;n<t.length;n++){var r=t[n],i=d[r.id];if(i){i.refs++;for(var o=0;o<i.parts.length;o++)i.parts[o](r.parts[o]);for(;o<r.parts.length;o++)i.parts.push(l(r.parts[o],e))}else{for(var s=[],o=0;o<r.parts.length;o++)s.push(l(r.parts[o],e));d[r.id]={id:r.id,refs:1,parts:s}}}}function i(t){for(var e=[],n={},r=0;r<t.length;r++){var i=t[r],o=i[0],s=i[1],u=i[2],a=i[3],l={css:s,media:u,sourceMap:a};n[o]?n[o].parts.push(l):e.push(n[o]={id:o,parts:[l]})}return e}function o(t,e){var n=v(),r=_[_.length-1];if("top"===t.insertAt)r?r.nextSibling?n.insertBefore(e,r.nextSibling):n.appendChild(e):n.insertBefore(e,n.firstChild),_.push(e);else{if("bottom"!==t.insertAt)throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");n.appendChild(e)}}function s(t){t.parentNode.removeChild(t);var e=_.indexOf(t);e>=0&&_.splice(e,1)}function u(t){var e=document.createElement("style");return e.type="text/css",o(t,e),e}function a(t){var e=document.createElement("link");return e.rel="stylesheet",o(t,e),e}function l(t,e){var n,r,i;if(e.singleton){var o=y++;n=m||(m=u(e)),r=c.bind(null,n,o,!1),i=c.bind(null,n,o,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=a(e),r=h.bind(null,n),i=function(){s(n),n.href&&URL.revokeObjectURL(n.href)}):(n=u(e),r=f.bind(null,n),i=function(){s(n)});return r(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;r(t=e)}else i()}}function c(t,e,n,r){var i=n?"":r.css;if(t.styleSheet)t.styleSheet.cssText=b(e,i);else{var o=document.createTextNode(i),s=t.childNodes;s[e]&&t.removeChild(s[e]),s.length?t.insertBefore(o,s[e]):t.appendChild(o)}}function f(t,e){var n=e.css,r=e.media;if(r&&t.setAttribute("media",r),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}function h(t,e){var n=e.css,r=e.sourceMap;r&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var i=new Blob([n],{type:"text/css"}),o=t.href;t.href=URL.createObjectURL(i),o&&URL.revokeObjectURL(o)}var d={},p=function(t){var e;return function(){return"undefined"==typeof e&&(e=t.apply(this,arguments)),e}},g=p(function(){return/msie [6-9]\b/.test(self.navigator.userAgent.toLowerCase())}),v=p(function(){return document.head||document.getElementsByTagName("head")[0]}),m=null,y=0,_=[];t.exports=function(t,e){e=e||{},"undefined"==typeof e.singleton&&(e.singleton=g()),"undefined"==typeof e.insertAt&&(e.insertAt="bottom");var n=i(t);return r(n,e),function(t){for(var o=[],s=0;s<n.length;s++){var u=n[s],a=d[u.id];a.refs--,o.push(a)}t&&r(i(t),e);for(var s=0;s<o.length;s++){var a=o[s];if(0===a.refs){for(var l=0;l<a.parts.length;l++)a.parts[l]();delete d[a.id]}}}};var b=function(){var t=[];return function(e,n){return t[e]=n,t.filter(Boolean).join("\n")}}()},function(t,e,n){var r=n(151);"string"==typeof r&&(r=[[t.id,r,""]]),n(152)(r,{}),r.locals&&(t.exports=r.locals)},function(t,e,n){function r(t){return n(i(t))}function i(t){return o[t]||function(){throw new Error("Cannot find module '"+t+"'.")}()}var o={"./StageScale":25,"./StageScale.js":25,"./colorscheme":26,"./colorscheme.js":26,"./columns":27,"./columns.js":27,"./config":28,"./config.js":28,"./package":29,"./package.js":29,"./selection/Selection":8,"./selection/Selection.js":8,"./selection/SelectionCol":9,"./selection/SelectionCol.js":9,"./selection/index":49,"./selection/index.js":49,"./user":30,"./user.js":30,"./visOrdering":31,"./visOrdering.js":31,"./visibility":32,"./visibility.js":32,"./zoomer":33,"./zoomer.js":33};r.keys=function(){return Object.keys(o)},r.resolve=i,t.exports=r,r.id=154},function(t,e,n){function r(t){return n(i(t))}function i(t){return o[t]||function(){throw new Error("Cannot find module '"+t+"'.")}()}var o={"./bmath":15,"./bmath.js":15,"./exporter":16,"./exporter.js":16,"./file":17,"./file.js":17,"./index":37,"./index.js":37,"./loader":18,"./loader.js":18,"./proxy":19,"./proxy.js":19,"./recognize":38,"./recognize.js":38,"./seqgen":39,"./seqgen.js":39,"./svg":12,"./svg.js":12,"./tree":40,"./tree.js":40};r.keys=function(){return Object.keys(o)},r.resolve=i,t.exports=r,r.id=155}]);
  //# sourceMappingURL=msa.js.map