//>>built
(function(k,l){var h,g=function(){},f=function(a){for(var b in a)return 0;return 1},d={}.toString,e=function(a){return"[object Function]"==d.call(a)},c=function(a){return"[object String]"==d.call(a)},b=function(a){return"[object Array]"==d.call(a)},a=function(a,b){if(a)for(var c=0;c<a.length;)b(a[c++])},m=function(a,b){for(var c in b)a[c]=b[c];return a},n=function(a,b){return m(Error(a),{src:"dojoLoader",info:b})},q=1,s=function(){return"_"+q++},r=function(a,b,c){return da(a,b,c,0,r)},p=this,t=p.document,
u=t&&t.createElement("DiV"),v=r.has=function(a){return e(x[a])?x[a]=x[a](p,t,u):x[a]},x=v.cache=l.hasCache;v.add=function(a,b,c,d){(void 0===x[a]||d)&&(x[a]=b);return c&&v(a)};for(var w in k.has)v.add(w,k.has[w],0,1);r.async=1;var y=new Function("return eval(arguments[0]);");r.eval=function(a,b){return y(a+"\r\n//# sourceURL\x3d"+b)};var z={},A=r.signal=function(c,d){var e=z[c];a(e&&e.slice(0),function(a){a.apply(null,b(d)?d:[d])})},D=r.on=function(a,b){var c=z[a]||(z[a]=[]);c.push(b);return{remove:function(){for(var a=
0;a<c.length;a++)if(c[a]===b){c.splice(a,1);break}}}},C=[],B={},I=[],M={},K=r.map={},G=[],F={},L="",E={},N={};w={};var J=0,V=function(a){var b,c,d,e;for(b in N)c=N[b],(d=b.match(/^url\:(.+)/))?E["url:"+Aa(d[1],a)]=c:"*now"==b?e=c:"*noref"!=b&&(d=ja(b,a,!0),E[d.mid]=E["url:"+d.url]=c);e&&e($(a));N={}},U=function(a){return a.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,function(a){return"\\"+a})},R=function(a,b){b.splice(0,b.length);for(var c in a)b.push([c,a[c],RegExp("^"+U(c)+"(/|$)"),c.length]);b.sort(function(a,
b){return b[3]-a[3]});return b},T=function(b,d){a(b,function(a){d.push([c(a[0])?RegExp("^"+U(a[0])+"$"):a[0],a[1]])})},H=function(a){var b=a.name;b||(b=a,a={name:b});a=m({main:"main"},a);a.location=a.location?a.location:b;a.packageMap&&(K[b]=a.packageMap);a.main.indexOf("./")||(a.main=a.main.substring(2));M[b]=a},S=[],O=function(b,d,e){for(var f in b){"waitSeconds"==f&&(r.waitms=1E3*(b[f]||0));"cacheBust"==f&&(L=b[f]?c(b[f])?b[f]:(new Date).getTime()+"":"");if("baseUrl"==f||"combo"==f)r[f]=b[f];b[f]!==
x&&(r.rawConfig[f]=b[f],"has"!=f&&v.add("config-"+f,b[f],0,d))}r.baseUrl||(r.baseUrl="./");/\/$/.test(r.baseUrl)||(r.baseUrl+="/");for(f in b.has)v.add(f,b.has[f],0,d);a(b.packages,H);for(var n in b.packagePaths)a(b.packagePaths[n],function(a){var b=n+"/"+a;c(a)&&(a={name:a});a.location=b;H(a)});R(m(K,b.map),G);a(G,function(a){a[1]=R(a[1],[]);"*"==a[0]&&(G.star=a)});R(m(B,b.paths),I);T(b.aliases,C);if(d)S.push({config:b.config});else for(f in b.config)d=ea(f,e),d.config=m(d.config||{},b.config[f]);
b.cache&&(V(),N=b.cache,b.cache["*noref"]&&V());A("config",[b,r.rawConfig])};v("dojo-cdn");var Q=t.getElementsByTagName("script");h=0;for(var W,P,ba,Z;h<Q.length;){W=Q[h++];if((ba=W.getAttribute("src"))&&(Z=ba.match(/(((.*)\/)|^)dojo\.js(\W|$)/i)))P=Z[3]||"",l.baseUrl=l.baseUrl||P,J=W;if(ba=W.getAttribute("data-dojo-config")||W.getAttribute("djConfig"))w=r.eval("({ "+ba+" })","data-dojo-config"),J=W}r.rawConfig={};O(l,1);v("dojo-cdn")&&((M.dojo.location=P)&&(P+="/"),M.dijit.location=P+"../dijit/",
M.dojox.location=P+"../dojox/");O(k,1);O(w,1);var ca=function(b){pa(function(){a(b.deps,Ba)})},da=function(a,d,e,f,q){var p;if(c(a)){if((p=ea(a,f,!0))&&p.executed)return p.result;throw n("undefinedModule",a);}b(a)||(O(a,0,f),a=d,d=e);if(b(a))if(a.length){e="require*"+s();for(var h,w=[],y=0;y<a.length;)h=a[y++],w.push(ea(h,f));p=m(ka("",e,0,""),{injected:2,deps:w,def:d||g,require:f?f.require:r,gc:1});F[p.mid]=p;ca(p);var z=ia&&0!="sync";pa(function(){qa(p,z)});p.executed||X.push(p);la()}else d&&d();
return q},$=function(a){if(!a)return r;var b=a.require;b||(b=function(c,d,e){return da(c,d,e,a,b)},a.require=m(b,r),b.module=a,b.toUrl=function(b){return Aa(b,a)},b.toAbsMid=function(b){return ra(b,a)});return b},X=[],aa=[],Y={},fa=function(a){a.injected=1;Y[a.mid]=1;a.url&&(Y[a.url]=a.pack||1);Ca()},ga=function(a){a.injected=2;delete Y[a.mid];a.url&&delete Y[a.url];f(Y)&&ma()},Ka=r.idle=function(){return!aa.length&&f(Y)&&!X.length&&!ia},sa=function(a,b){if(b)for(var c=0;c<b.length;c++)if(b[c][2].test(a))return b[c];
return 0},Da=function(a){var b=[],c,d;for(a=a.replace(/\\/g,"/").split("/");a.length;)c=a.shift(),".."==c&&b.length&&".."!=d?(b.pop(),d=b[b.length-1]):"."!=c&&b.push(d=c);return b.join("/")},ka=function(a,b,c,d){return{pid:a,mid:b,pack:c,url:d,executed:0,def:0}},Ea=function(b,c,d,m,f,q,s,r,p){var g,h,w,y;y=/^\./.test(b);if(/(^\/)|(\:)|(\.js$)/.test(b)||y&&!c)return ka(0,b,0,b);b=Da(y?c.mid+"/../"+b:b);if(/^\./.test(b))throw n("irrationalPath",b);c&&(w=sa(c.mid,q));(w=(w=w||q.star)&&sa(b,w[1]))&&(b=
w[1]+b.substring(w[3]));c=(Z=b.match(/^([^\/]+)(\/(.+))?$/))?Z[1]:"";(g=d[c])?b=c+"/"+(h=Z[3]||g.main):c="";var z=0;a(r,function(a){var c=b.match(a[0]);c&&0<c.length&&(z=e(a[1])?b.replace(a[0],a[1]):a[1])});if(z)return Ea(z,0,d,m,f,q,s,r,p);if(d=m[b])return p?ka(d.pid,d.mid,d.pack,d.url):m[b];m=(w=sa(b,s))?w[1]+b.substring(w[3]):c?g.location+"/"+h:v("config-tlmSiblingOfDojo")?"../"+b:b;/(^\/)|(\:)/.test(m)||(m=f+m);return ka(c,b,g,Da(m+".js"))},ja=function(a,b,c){return Ea(a,b,M,F,r.baseUrl,c?[]:
G,c?[]:I,c?[]:C)},Fa=function(a,b,c){return a.normalize?a.normalize(b,function(a){return ra(a,c)}):ra(b,c)},Ga=0,ea=function(a,b,c){var d,e;(d=a.match(/^(.+?)\!(.*)$/))?(e=ea(d[1],b,c),5===e.executed&&!e.load&&ta(e),e.load?(d=Fa(e,d[2],b),a=e.mid+"!"+(e.dynamic?++Ga+"!":"")+d):(d=d[2],a=e.mid+"!"+ ++Ga+"!waitingForPlugin"),a={plugin:e,mid:a,req:$(b),prid:d}):a=ja(a,b);return F[a.mid]||!c&&(F[a.mid]=a)},ra=r.toAbsMid=function(a,b){return ja(a,b).mid},Aa=r.toUrl=function(a,b){var c=ja(a+"/x",b),d=c.url;
return Ha(0===c.pid?a:d.substring(0,d.length-5))},Ia={injected:2,executed:5,def:3,result:3};P=function(a){return F[a]=m({mid:a},Ia)};var La=P("require"),Ma=P("exports"),Na=P("module"),na={},ua=0,ta=function(a){var b=a.result;a.dynamic=b.dynamic;a.normalize=b.normalize;a.load=b.load;return a},Oa=function(b){var c={};a(b.loadQ,function(a){var d=Fa(b,a.prid,a.req.module),e=b.dynamic?a.mid.replace(/waitingForPlugin$/,d):b.mid+"!"+d,d=m(m({},a),{mid:e,prid:d,injected:0});F[e]||Ja(F[e]=d);c[a.mid]=F[e];
ga(a);delete F[a.mid]});b.loadQ=0;var d=function(a){for(var b=a.deps||[],d=0;d<b.length;d++)(a=c[b[d].mid])&&(b[d]=a)},e;for(e in F)d(F[e]);a(X,d)},va=function(a){r.trace("loader-finish-exec",[a.mid]);a.executed=5;a.defOrder=ua++;a.loadQ&&(ta(a),Oa(a));for(h=0;h<X.length;)X[h]===a?X.splice(h,1):h++;/^require\*/.test(a.mid)&&delete F[a.mid]},Pa=[],qa=function(a,b){if(4===a.executed)return r.trace("loader-circular-dependency",[Pa.concat(a.mid).join("-\x3e")]),!a.def||b?na:a.cjs&&a.cjs.exports;if(!a.executed){if(!a.def)return na;
var c=a.mid,d=a.deps||[],m,f=[],q=0;for(a.executed=4;m=d[q++];){m=m===La?$(a):m===Ma?a.cjs.exports:m===Na?a.cjs:qa(m,b);if(m===na)return a.executed=0,r.trace("loader-exec-module",["abort",c]),na;f.push(m)}r.trace("loader-run-factory",[a.mid]);var c=a.def,s;if(v("config-dojo-loader-catches"))try{s=e(c)?c.apply(null,f):c}catch(p){A("error",a.result=n("factoryThrew",[a,p]))}else s=e(c)?c.apply(null,f):c;a.result=void 0===s&&a.cjs?a.cjs.exports:s;va(a)}return a.result},ia=0,pa=function(a){try{ia++,a()}catch(b){throw b;
}finally{ia--}Ka()&&A("idle",[])},la=function(){ia||pa(function(){for(var a,b,c=0;c<X.length;)a=ua,b=X[c],qa(b),a!=ua?c=0:c++})};void 0===v("dojo-loader-eval-hint-url")&&v.add("dojo-loader-eval-hint-url",1);var Ha=function(a){a+="";return a+(L?(/\?/.test(a)?"\x26":"?")+L:"")},Ja=function(a){var b=a.plugin;5===b.executed&&!b.load&&ta(b);var c=function(b){a.result=b;ga(a);va(a);la()};b.load?b.load(a.prid,a.req,c):b.loadQ?b.loadQ.push(a):(b.loadQ=[a],X.unshift(b),Ba(b))},ha=0,wa=0,xa=0,Qa=function(a,
b){v("config-stripStrict")&&(a=a.replace(/(["'])use strict\1/g,""));xa=1;if(v("config-dojo-loader-catches"))try{a===ha?ha.call(null):r.eval(a,v("dojo-loader-eval-hint-url")?b.url:b.mid)}catch(c){A("error",n("evalModuleThrew",b))}else a===ha?ha.call(null):r.eval(a,v("dojo-loader-eval-hint-url")?b.url:b.mid);xa=0},Ba=function(a){var b=a.mid,c=a.url;if(!a.executed&&!a.injected&&!(Y[b]||a.url&&(a.pack&&Y[a.url]===a.pack||1==Y[a.url])))if(fa(a),a.plugin)Ja(a);else{var d=function(){Ra(a);if(2!==a.injected){if(v("dojo-enforceDefine")){A("error",
n("noDefine",a));return}ga(a);m(a,Ia);r.trace("loader-define-nonmodule",[a.url])}la()};(ha=E[b]||E["url:"+a.url])?(r.trace("loader-inject",["cache",a.mid,c]),Qa(ha,a),d()):(r.trace("loader-inject",["script",a.mid,c]),wa=a,r.injectUrl(Ha(c),d,a),wa=0)}},ya=function(a,b,c){r.trace("loader-define-module",[a.mid,b]);if(2===a.injected)return A("error",n("multipleDefine",a)),a;m(a,{deps:b,def:c,cjs:{id:a.mid,uri:a.url,exports:a.result={},setExports:function(b){a.cjs.exports=b},config:function(){return a.config}}});
for(var d=0;b[d];d++)b[d]=ea(b[d],a);ga(a);!e(c)&&!b.length&&(a.result=c,va(a));return a},Ra=function(b,c){for(var d=[],e,m;aa.length;)m=aa.shift(),c&&(m[0]=c.shift()),e=m[0]&&ea(m[0])||b,d.push([e,m[1],m[2]]);V(b);a(d,function(a){ca(ya.apply(null,a))})},oa=0,ma=g,Ca=g,ma=function(){oa&&clearTimeout(oa);oa=0},Ca=function(){ma();r.waitms&&(oa=window.setTimeout(function(){ma();A("error",n("timeout",Y))},r.waitms))};v.add("ie-event-behavior",t.attachEvent&&"undefined"===typeof Windows&&("undefined"===
typeof opera||"[object Opera]"!=opera.toString()));var za=function(a,b,c,d){if(v("ie-event-behavior"))return a.attachEvent(c,d),function(){a.detachEvent(c,d)};a.addEventListener(b,d,!1);return function(){a.removeEventListener(b,d,!1)}},Sa=za(window,"load","onload",function(){r.pageLoaded=1;try{"complete"!=t.readyState&&(t.readyState="complete")}catch(a){}Sa()}),Q=t.getElementsByTagName("script");for(h=0;!J;)if(!/^dojo/.test((W=Q[h++])&&W.type))J=W;r.injectUrl=function(a,b,c){c=c.node=t.createElement("script");
var d=za(c,"load","onreadystatechange",function(a){a=a||window.event;var c=a.target||a.srcElement;if("load"===a.type||/complete|loaded/.test(c.readyState))d(),e(),b&&b()}),e=za(c,"error","onerror",function(b){d();e();A("error",n("scriptError",[a,b]))});c.type="text/javascript";c.charset="utf-8";c.src=a;J.parentNode.insertBefore(c,J);return c};r.log=g;r.trace=g;W=function(a,b,d){var m=arguments.length,f=["require","exports","module"],q=[0,a,b];1==m?q=[0,e(a)?f:[],a]:2==m&&c(a)?q=[a,e(b)?f:[],b]:3==
m&&(q=[a,b,d]);r.trace("loader-define",q.slice(0,2));if((m=q[0]&&ea(q[0]))&&!Y[m.mid])ca(ya(m,q[1],q[2]));else if(!v("ie-event-behavior")||xa)aa.push(q);else{m=m||wa;if(!m)for(a in Y)if((f=F[a])&&f.node&&"interactive"===f.node.readyState){m=f;break}m?(V(m),ca(ya(m,q[1],q[2]))):A("error",n("ieDefineFailed",q[0]));la()}};W.amd={vendor:"dojotoolkit.org"};m(m(r,l.loaderPatch),k.loaderPatch);D("error",function(a){try{if(console.error(a),a instanceof Error)for(var b in a);}catch(c){}});m(r,{uid:s,cache:E,
packs:M});p.define||(p.define=W,p.require=r,a(S,function(a){O(a)}),D=w.deps||k.deps||l.deps,w=w.callback||k.callback||l.callback,r.boot=D||w?[D||[],w]:0)})(this.dojoConfig||this.djConfig||this.require||{},{async:0,hasCache:{"config-selectorEngine":"acme","config-tlmSiblingOfDojo":1,"dojo-built":1,"dojo-loader":1,dom:1,"host-browser":1},packages:[{location:"../../../src/dbind",name:"dbind"},{location:"../../../src/dgrid",main:"OnDemandGrid",name:"dgrid"},{location:".",name:"dojo"},{location:"../../../src/dijit",
name:"dijit"},{location:"../../../src/dojox",name:"dojox"},{location:"../../../src/json-schema",main:"lib/validate.js",name:"json-schema"},{location:"../../../src/jszlib",name:"jszlib"},{location:"../../../src/lazyload",main:"lazyload",name:"lazyload"},{location:"../../../src/xstyle",name:"xstyle"},{location:"../../../src/put-selector",main:"put",name:"put-selector"},{location:"../../../src/jDataView",main:"jdataview",name:"jDataView"},{location:"../../../src/FileSaver",name:"FileSaver"},{location:"../../../src/JBrowse",
name:"JBrowse"}]});
require({cache:{"JBrowse/main":function(){require("JBrowse/Browser JBrowse/ConfigAdaptor/JB_json_v1 JBrowse/View/TrackList/Hierarchical JBrowse/Store/Sequence/StaticChunked JBrowse/Store/SeqFeature/NCList JBrowse/Store/TiledImage/Fixed JBrowse/Store/Names/Hash JBrowse/Store/Names/REST JBrowse/View/Track/Sequence JBrowse/View/Track/HTMLFeatures JBrowse/View/Track/FixedImage/Wiggle JBrowse/View/Track/Wiggle JBrowse/View/Track/Wiggle/XYPlot JBrowse/View/Track/Wiggle/Density JBrowse/View/Track/Alignments JBrowse/View/Track/Alignments2 JBrowse/View/Track/FeatureCoverage JBrowse/View/Track/SNPCoverage JBrowse/Store/TrackMetaData xstyle/core/load-css dojox/gfx/svg".split(" "))},"JBrowse/Browser":function(){var k=
k||[];define("dojo/_base/declare dojo/_base/lang dojo/on dojo/html dojo/query dojo/dom-construct dojo/keys dojo/Deferred dojo/DeferredList dojo/topic dojo/aspect dojo/request dojo/io-query JBrowse/has dojo/_base/array dijit/layout/ContentPane dijit/layout/BorderContainer dijit/Dialog dijit/form/ComboBox dijit/form/Button dijit/form/Select dijit/form/ToggleButton dijit/form/DropDownButton dijit/DropDownMenu dijit/CheckedMenuItem dijit/MenuItem dijit/MenuSeparator dojox/form/TriStateCheckBox JBrowse/Util JBrowse/Store/LazyTrie JBrowse/Store/Names/LazyTrieDojoData dojo/store/DataStore JBrowse/FeatureFiltererMixin JBrowse/GenomeView JBrowse/TouchScreenSupport JBrowse/ConfigManager JBrowse/View/InfoDialog JBrowse/View/FileDialog JBrowse/View/FastaFileDialog JBrowse/Store/SeqFeature/IndexedFasta JBrowse/Store/SeqFeature/UnindexedFasta JBrowse/Store/SeqFeature/TwoBit JBrowse/Model/Location JBrowse/View/LocationChoiceDialog JBrowse/View/Dialog/SetHighlight JBrowse/View/Dialog/Preferences JBrowse/View/Dialog/OpenDirectory JBrowse/View/Dialog/SetTrackHeight JBrowse/View/Dialog/QuickHelp JBrowse/View/StandaloneDatasetList dijit/focus lazyload dojo/text!./package.json dojo/domReady!".split(" "),
function(l,h,g,f,d,e,c,b,a,m,n,q,s,r,p,t,u,v,x,w,y,z,A,D,C,B,I,M,K,G,F,L,E,N,J,V,U,R,T,H,S,O,Q,W,P,ba,Z,ca,da,$,X,aa,Y){var fa=K.dojof;return l(E,{constructor:function(a){this.globalKeyboardShortcuts={};this.config=a||{};if(!this.config.unitTestMode){this.startTime=new Date;var b=this;dojo.addOnLoad(function(){b.loadConfig().then(function(){b.container=dojo.byId(b.config.containerID);b.container.onselectstart=function(){return!1};b.config.initialHighlight&&"/"!=b.config.initialHighlight&&b.setHighlight(new Q(b.config.initialHighlight));
b.initPlugins().then(function(){b.loadNames();b.loadUserCSS().then(function(){b.initTrackMetadata();b.loadRefSeqs().then(function(){var a=b._initialLocation(),c=K.parseLocString(a);c&&(c.ref&&b.allRefs[c.ref])&&(b.refSeq=b.allRefs[c.ref]);b.initView().then(function(){J.loadTouch();a&&b.navigateTo(a);var c=[];b.config.alwaysOnTracks&&(c=c.concat(b.config.alwaysOnTracks.split(",")));b.config.forceTracks?c=c.concat(b.config.forceTracks.split(",")):b.cookie("tracks")?c=c.concat(b.cookie("tracks").split(",")):
b.config.defaultTracks&&!b.config.defaultTracks instanceof Array&&(c=c.concat(b.config.defaultTracks.split(",")));0==c.length&&c.push("DNA");c=K.uniq(c);b.showTracks(c);b.passMilestone("completely initialized",{success:!0})});b.reportUsageStats()})})})})})}},_initialLocation:function(){var a=dojo.fromJson(this.cookie("location"))||{};return this.config.location?this.config.location:a[this.refSeq.name]?a[this.refSeq.name].l||a[this.refSeq.name]:this.config.defaultLocation?this.config.defaultLocation:
K.assembleLocString({ref:this.refSeq.name,start:0.4*(this.refSeq.start+this.refSeq.end),end:0.6*(this.refSeq.start+this.refSeq.end)})},version:function(){return JSON.parse(Y).version}.call(),getPlugin:function(a,b){this.afterMilestone("initPlugins",dojo.hitch(this,function(){b(this.plugins[a])}))},_corePlugins:function(){return["RegexSequenceSearch"]},initPlugins:function(){return this._milestoneFunction("initPlugins",function(c){this.plugins={};var d=this.config.plugins||this.config.Plugins||{};
!h.isArray(d)&&!d.name&&(d=function(){var a=[],b;for(b in d)h.isObject(d[b])&&!("name"in d[b])&&(d[b].name=b),a.push(d[b]);return a}.call(this));h.isArray(d)||(d=[d]);d.unshift.apply(d,this._corePlugins());if(d=p.map(d,function(a){return"object"==typeof a?a:{name:a}})){p.forEach(d,function(a){"location"in a||(a.location="plugins/"+a.name);var b=this.resolveUrl(a.location);"js"in a||(a.js=a.location+"/js");"/"!=a.js.charAt(0)&&!/^https?:/i.test(a.js)&&(a.js="../"+a.js);"css"in a||(a.css=b+"/css")},
this);var e=p.map(d,function(a){return new b});(new a(e)).then(function(){c.resolve({success:!0})});require({packages:p.map(d,function(a){return{name:a.name,location:a.js}},this)},p.map(d,function(a){return a.name}),dojo.hitch(this,function(){p.forEach(arguments,function(a,b){var c=d[b],m=e[b];if("string"==typeof a)console.error("could not load plugin "+c.name+": "+a);else{var f=dojo.mixin(dojo.clone(d[b]),{config:this.config[c.name]||{}});f.browser=this;var f=dojo.mixin(f,{browser:this}),n=this._loadCSS({url:c.css+
"/main.css"});n.then(function(){m.resolve({success:!0})});f.cssLoaded=n;this.plugins[c.name]=new a(f)}},this)}))}else c.resolve({success:!0})})},resolveUrl:function(a){var b=this.config.browserRoot||"";b&&"/"!=b.charAt(b.length-1)&&(b+="/");return K.resolveUrl(b,a)},welcomeScreen:function(a,b){var c=this;require(["dojo/text!JBrowse/View/Resource/Welcome.html"],function(d){a.innerHTML=d;dojo.create("div",{style:{overflow:"hidden"}},c.container);dojo.byId("welcome").innerHTML="Your JBrowse is "+(K.isElectron()?
"running in Desktop mode":"on the web")+". To get started with \x3ci\x3eJBrowse-"+c.version+"\x3c/i\x3e, select a sequence file";g(dojo.byId("newOpen"),"click",dojo.hitch(c,"openFastaElectron"));g(dojo.byId("newOpenDirectory"),"click",function(){(new Z({browser:c,setCallback:dojo.hitch(c,"openDirectoryElectron")})).show()});try{c.loadSessions()}catch(e){}b&&(d=dojo.byId("fatal_error_list"),dojo.create("div",{className:"error",innerHTML:b},d));q("sample_data/json/volvox/successfully_run").then(function(){try{document.getElementById("volvox_data_placeholder").innerHTML=
'The example dataset is also available. View \x3ca href\x3d"?data\x3dsample_data/json/volvox"\x3eVolvox test data here\x3c/a\x3e.'}catch(a){}})})},fatalError:function(a){function b(a){a&&(console.error(a.stack||""+a),a+="",/\.$/.exec(a)||(a+="."));return a}if(this.renderedFatalErrors){var c=dojo.byId("fatal_error_list")||document.body;dojo.create("div",{className:"error",innerHTML:b(a)+""},c)}else if(/^Could not load reference sequence/.test(a)&&this.config.datasets&&!this.config.datasets._DEFAULT_EXAMPLES)(new $({datasets:this.config.datasets})).placeAt(this.container);
else{var d=this.container||document.body;dojo.addClass(document.body,this.config.theme||"tundra");K.isElectron()?this.welcomeScreen(d,b(a)):require(["dojo/text!JBrowse/View/Resource/Welcome_old.html"],function(c){d.innerHTML=c;a&&(c=dojo.byId("fatal_error_list"),dojo.create("div",{className:"error",innerHTML:b(a)+""},c));q("sample_data/json/volvox/successfully_run").then(function(){try{dojo.byId("volvox_data_placeholder").innerHTML='However, it appears you have successfully run \x3ccode\x3e./setup.sh\x3c/code\x3e, so you can see the \x3ca href\x3d"?data\x3dsample_data/json/volvox"\x3eVolvox test data here\x3c/a\x3e.'}catch(a){}})});
this.renderedFatalErrors=!0}},loadSessions:function(){var a=electronRequire("fs"),b=electronRequire("electron").remote.app.getPath("userData")+"/sessions.json",c=JSON.parse(a.readFileSync(b,"utf8")),d=dojo.create("table",{style:{overflow:"hidden",width:"90%"}},dojo.byId("previousSessions")),e=this;if(!c.length){var m=dojo.create("tr",{},d);dojo.create("div",{innerHTML:"\x3cul\x3e\x3cli\x3eNo sessions yet!\x3c/li\x3e\x3c/ul\x3e"},m)}p.forEach(c,function(m){var f=dojo.create("tr",{},d),n=window.location.href.split("?")[0]+
"?data\x3d"+K.replacePath(m.session);dojo.create("td",{"class":"dijitIconDelete",onclick:function(f){confirm("This will simply delete your session from the list, it won't remove any data files. Are you sure you want to continue?")&&(dojo.empty(d),f=c.indexOf(m),-1!=f&&c.splice(f,1),a.writeFileSync(b,JSON.stringify(c,null,2),"utf8"),e.loadSessions())}},f);dojo.create("td",{innerHTML:'\x3ca href\x3d"'+n+'"\x3e'+m.session+"\x3c/a\x3e"},f)})},loadRefSeqs:function(){var a=this;return this._milestoneFunction("loadRefSeqs",
function(b){"string"==typeof this.config.refSeqs&&(this.config.refSeqs={url:this.config.refSeqs});this.config.refSeqs.url&&this.config.refSeqs.url.match(/.fai$/)?(new H({browser:this,faiUrlTemplate:this.config.refSeqs.url})).getRefSeqs(function(c){a.addRefseqs(c);b.resolve({success:!0})}):"data"in this.config.refSeqs?(this.addRefseqs(this.config.refSeqs.data),b.resolve({success:!0})):q(this.config.refSeqs.url,{handleAs:"text"}).then(function(c){a.addRefseqs(dojo.fromJson(c));b.resolve({success:!0})},
function(a){b.reject("Could not load reference sequence definitions. "+a)})})},loadUserCSS:function(){return this._milestoneFunction("loadUserCSS",function(b){this.config.css&&!h.isArray(this.config.css)&&(this.config.css=[this.config.css]);var c=this.config.css||[];if(c.length){var d=this,c=p.map(c,function(a){return d._loadCSS(a)});(new a(c)).then(function(){b.resolve({success:!0})})}else b.resolve({success:!0})})},_loadCSS:function(a){var c=new b;"string"==typeof a&&(-1<a.indexOf("{")?(dojo.create("style",
{"data-from":"JBrowse Config",type:"text/css",innerHTML:a},document.head),c.resolve(!0)):a={url:a});"object"==typeof a&&aa.css(a.url,function(){c.resolve(!0)});return c},loadNames:function(){return this._milestoneFunction("loadNames",function(a){var b=dojo.mixin(dojo.clone(this.config.names||{}),this.config.autocomplete||{});b.url||(b.url=this.config.nameUrl||"data/names/");b.baseUrl&&(b.url=K.resolveUrl(b.baseUrl,b.url));var c;if(c=b.type){var d=this;-1==c.indexOf("/")&&(c="JBrowse/Store/Names/"+
c);require([c],function(c){d.nameStore=new c(dojo.mixin({browser:d},b));a.resolve({success:!0})})}else this.nameStore=new L({store:new F({browser:this,namesTrie:new G(b.url,"lazy-{Chunk}.json"),stopPrefixes:b.stopPrefixes,resultLimit:b.resultLimit||15,tooManyMatchesMessage:b.tooManyMatchesMessage})}),a.resolve({success:!0})})},compareReferenceNames:function(a,b){return this.regularizeReferenceName(a).localeCompare(this.regularizeReferenceName(b))},regularizeLocation:function(a){var b=this.findReferenceSequence(a.ref||
a.objectName);b&&(a.ref=b.name);return a},regularizeReferenceName:function(a){return this.config.exactReferenceSequenceNames?a:a=a.toLowerCase().replace(/^chro?m?(osome)?/,"chr").replace(/^co?n?ti?g/,"ctg").replace(/^scaff?o?l?d?/,"scaffold").replace(/^([a-z]*)0+/,"$1").replace(/^(\d+)$/,"chr$1")},initView:function(){var a=this;return this._milestoneFunction("initView",function(b){function c(){(new da(h.mixin(a.config.quickHelp||{},{browser:a}))).show()}function d(){var b=a.makeCurrentViewURL();a.config.updateBrowserURL&&
(window.history&&window.history.replaceState)&&window.history.replaceState({},"",b);document.title=a.browserMeta().title+" "+a.view.visibleRegionLocString()}dojo.addClass(this.container,"jbrowse");dojo.addClass(document.body,this.config.theme||"tundra");var e=dojo.create("div",{style:{overflow:"hidden"}},this.container),m=this.browserMeta(),f=new U({title:"About "+m.title,content:m.description,className:"about-dialog"}),m=dojo.create("div",{className:this.config.show_nav?"menuBar":"topLink"});a.menuBar=
m;this.config.show_menu&&(this.config.show_nav?e:this.container).appendChild(m);var n=dojo.create("div",{className:"overview",id:"overview"},e);this.overviewDiv=n;this.config.show_overview||(n.style.cssText="display: none");K.isElectron()&&!this.config.hideGenomeOptions?(this.addGlobalMenuItem(this.config.classicMenu?"file":"dataset",new B({id:"menubar_dataset_file",label:"Open sequence file",iconClass:"dijitIconFolderOpen",onClick:dojo.hitch(this,"openFastaElectron")})),this.addGlobalMenuItem(this.config.classicMenu?
"file":"dataset",new B({id:"menubar_dataset_directory",label:"Open data directory",iconClass:"dijitIconFolderOpen",onClick:function(){(new Z({browser:a,setCallback:dojo.hitch(a,"openDirectoryElectron")})).show()}})),this.addGlobalMenuItem(this.config.classicMenu?"file":"dataset",new B({id:"menubar_dataset_conf",label:"Open plugin",iconClass:"dijitIconConfigure",onClick:function(){(new ba({browser:a,setCallback:dojo.hitch(a,"openConfig")})).show()}})),this.addGlobalMenuItem(this.config.classicMenu?
"file":"dataset",new B({id:"menubar_dataset_save",label:"Save session",iconClass:"dijitIconSave",onClick:dojo.hitch(this,"saveData")})),this.addGlobalMenuItem(this.config.classicMenu?"file":"dataset",new B({id:"menubar_dataset_home",label:"Return to main menu",iconClass:"dijitIconTask",onClick:dojo.hitch(this,function(){a.welcomeScreen(a.container||document.body)})}))):this.config.hideGenomeOptions||this.addGlobalMenuItem(this.config.classicMenu?"file":"dataset",new B({id:"menubar_dataset_open",label:"Open sequence file",
iconClass:"dijitIconFolderOpen",onClick:dojo.hitch(this,"openFasta")}));this.config.show_nav&&(this.navbox=this.createNavBox(e),this.config.classicMenu?(this.config.datasets&&!this.config.dataset_id&&console.warn("In JBrowse configuration, datasets specified, but dataset_id not set.  Dataset selector will not be shown."),this.config.datasets&&this.config.dataset_id?this.renderDatasetSelect(m):(this.poweredByLink=dojo.create("a",{className:"powered_by",innerHTML:this.browserMeta().title,title:"powered by JBrowse"},
m),a.poweredBy_clickHandle=dojo.connect(this.poweredByLink,"onclick",dojo.hitch(f,"show")))):this.renderDatasetSelect(m),this.addGlobalMenuItem("file",new B({id:"menubar_fileopen",label:"Open track file or URL",iconClass:"dijitIconFolderOpen",onClick:dojo.hitch(this,"openFileDialog")})),this.addGlobalMenuItem("file",new I),this.fileDialog=new R({browser:this}),this.addGlobalMenuItem("file",new B({id:"menubar_combotrack",label:"Add combination track",iconClass:"dijitIconSample",onClick:dojo.hitch(this,
"createCombinationTrack")})),this.renderGlobalMenu("file",{text:this.config.classicMenu?"File":"Track"},m),this.addGlobalMenuItem("view",new B({id:"menubar_sethighlight",label:"Set highlight",iconClass:"dijitIconFilter",onClick:function(){(new P({browser:a,setCallback:dojo.hitch(a,"setHighlightAndRedraw")})).show()}})),this._highlightClearButton=new B({id:"menubar_clearhighlight",label:"Clear highlight",iconClass:"dijitIconFilter",onClick:dojo.hitch(this,function(){var a=this.getHighlight();a&&(this.clearHighlight(),
this.view.redrawRegion(a))})}),this._updateHighlightClearButton(),this.subscribe("/jbrowse/v1/n/globalHighlightChanged",dojo.hitch(this,"_updateHighlightClearButton")),this.addGlobalMenuItem("view",this._highlightClearButton),this.addGlobalMenuItem("view",new B({label:"Resize quant. tracks",id:"menubar_settrackheight",title:"Set all visible quantitative tracks to a new height",iconClass:"jbrowseIconVerticalResize",onClick:function(){(new ca({setCallback:function(b){var c=a.view.visibleTracks();p.forEach(c,
function(a){/\b(XYPlot|Density)/.test(a.config.type)&&(a.trackHeightChanged=!0,a.updateUserStyles({height:b}))})}})).show()}})),this.renderGlobalMenu("view",{text:"View"},m),this.renderGlobalMenu("options",{text:"Options",title:"configure JBrowse"},m));this.config.show_nav&&(this.addGlobalMenuItem("help",new B({id:"menubar_about",label:"About",onClick:dojo.hitch(f,"show")})),this.setGlobalKeyboardShortcut("?",c),this.addGlobalMenuItem("help",new B({id:"menubar_generalhelp",label:"General",iconClass:"jbrowseIconHelp",
onClick:c})),this.renderGlobalMenu("help",{},m));this.config.show_nav&&this.config.show_tracklist&&this.config.show_overview&&!K.isElectron()?(f=this.makeShareLink())&&m.appendChild(f):K.isElectron()?(f=this.makeSnapLink())&&m.appendChild(f):this.config.show_fullviewlink&&m.appendChild(this.makeFullViewLink());this.viewElem=document.createElement("div");this.viewElem.className="dragWindow";this.container.appendChild(this.viewElem);this.containerWidget=new u({liveSplitters:!1,design:"sidebar",gutters:!1},
this.container);new t({region:"top"},e);this.view=this.viewElem.view=new N({browser:this,elem:this.viewElem,config:this.config.view,stripeWidth:250,refSeq:this.refSeq,zoomLevel:0.005});dojo.connect(this.view,"onFineMove",this,"onFineMove");dojo.connect(this.view,"onCoarseMove",this,"onCoarseMove");this.browserWidget=new t({region:"center"},this.viewElem);dojo.connect(this.browserWidget,"resize",this,"onResize");dojo.connect(this.browserWidget,"resize",this.view,"onResize");dojo.connect(this,"onCoarseMove",
d);this.subscribe("/jbrowse/v1/n/tracks/visibleChanged",d);this.subscribe("/jbrowse/v1/n/globalHighlightChanged",d);this.afterMilestone("loadRefSeqs",dojo.hitch(this,function(){this.afterMilestone("initTrackMetadata",dojo.hitch(this,function(){this.createTrackList().then(dojo.hitch(this,function(){this.containerWidget.startup();this.onResize();g(document.body,"keypress",dojo.hitch(this,"globalKeyHandler"));this._initEventRouting();b.resolve({success:!0})}))}))}))})},createCombinationTrack:function(){void 0===
this._combinationTrackCount&&(this._combinationTrackCount=0);var a=new b,c={browser:this,refSeq:this.refSeq,type:"JBrowse/Store/SeqFeature/Combination"},d=this.addStoreConfig(void 0,c);c.name=d;this.getStore(d,function(b){a.resolve(!0)});var e=this;a.promise.then(function(){var a={type:"JBrowse/View/Track/Combination",label:"combination_track"+e._combinationTrackCount++,key:"Combination Track "+e._combinationTrackCount,metadata:{Description:"Drag-and-drop interface that creates a track out of combinations of other tracks."},
store:d};e.publish("/jbrowse/v1/v/tracks/new",[a]);e.publish("/jbrowse/v1/v/tracks/show",[a])})},renderDatasetSelect:function(a){if(this.config.classicMenu){var b=this.config.datasets||{},c=[],d;for(d in b)/^_/.test(d)||c.push(dojo.mixin({id:d},b[d]));(new y({name:"dataset",className:"dataset_select",value:this.config.dataset_id,options:p.map(c,function(a){return{label:a.name,value:a.id}}),onChange:dojo.hitch(this,function(a){if(a=(this.config.datasets||{})[a])window.location=a.url;return!1})})).placeAt(a)}else{if(this.config.datasets&&
this.config.dataset_id)for(d in this.addGlobalMenuItem("dataset",new I),this.config.datasets)/^_/.test(d)||(b=this.config.datasets[d],this.addGlobalMenuItem("dataset",new B({id:"menubar_dataset_bookmark_"+d,label:d==this.config.dataset_id?"\x3cb\x3e"+b.name+"\x3c/b\x3e":b.name,iconClass:"dijitIconBookmark",onClick:dojo.hitch(b,function(){window.location=this.url})})));this.renderGlobalMenu("dataset",{text:"Genome"},a)}},saveSessionDir:function(a){var b=electronRequire("fs"),c=electronRequire("electron").remote.app.getPath("userData")+
"/sessions.json",d=[];try{d=JSON.parse(b.readFileSync(c,"utf8"))}catch(e){}var m=K.replacePath(a);p.every(d,function(a){return a.session!=m})&&d.push({session:m});b.writeFileSync(c,JSON.stringify(d,null,2),"utf8")},openDirectoryElectron:function(a){this.saveSessionDir(a);window.location="?data\x3d"+K.replacePath(a)},openConfig:function(a){if(confirm("If you have opened any new tracks, please save them before continuing. Are you sure you want to continue?")){var b=electronRequire("fs"),c=this.config.dataRoot,
d=JSON.parse(b.readFileSync(c+"/trackList.json","utf8"));d.plugins=d.plugins||{};if(h.isArray(d.plugins)){var e={};p.forEach(d.plugins,function(a){e[a]={name:a,location:c+"/"+a}});d.plugins=e}p.forEach(a,function(a){var b=a.match(/\/(\w+)$/)[1];d.plugins[b]={location:a,name:b}});try{b.writeFileSync(c+"/trackList.json",JSON.stringify(d,null,2))}catch(m){}window.location.reload()}},saveData:function(){if(confirm("This will overwrite tracks and config data in your data directory. Are you sure you want to continue?")){var a=
electronRequire("fs"),b=this.config.dataRoot,c=p.map(this.config.tracks,function(a){var b=h.clone(a);this.getStore(b.store,h.hitch(this,function(a){b.storeClass=a.config.type;b.urlTemplate||(h.mixin(b,a.saveStore()),b.histograms&&b.histograms.store&&this.getStore(b.histograms.store,function(a){h.mixin(b.histograms,a.saveStore())}));delete b.store}));return b},this);p.filter(K.uniq(this.config.plugins),function(a){return"RegexSequenceSearch"!=a});var d={};h.isArray(this.config.plugins)?p.forEach(this.config.plugins,
function(a){d[a]="object"==typeof a?a:{name:a}}):d=this.config.plugins;c={tracks:c,refSeqs:this.config.refSeqs,refSeqOrder:this.config.refSeqOrder,plugins:d};try{a.writeFileSync(K.unReplacePath(b)+"/trackList.json",JSON.stringify(c,null,2))}catch(e){alert("Unable to save track data")}}},openFastaElectron:function(){this.fastaFileDialog=this.fastaFileDialog||new T({browser:this});var a=electronRequire("electron").remote.app,b=electronRequire("fs");electronRequire("path");this.fastaFileDialog.show({openCallback:dojo.hitch(this,
function(c){var d=c.trackConfs||[];if(d.length)if(d[0].store.fasta&&d[0].store.fai){var e=K.replacePath(d[0].store.fasta.url),m=K.replacePath(d[0].store.fai.url),m={tracks:[{label:d[0].label,key:d[0].key,type:"SequenceTrack",category:"Reference sequence",storeClass:"JBrowse/Store/SeqFeature/IndexedFasta",useAsRefSeqStore:!0,chunkSize:2E4,urlTemplate:e,faiUrlTemplate:m}],refSeqs:m,refSeqOrder:c.refSeqOrder},f=a.getPath("userData")+"/"+d[0].label;try{b.existsSync(f)||b.mkdirSync(f),b.writeFileSync(f+
"/trackList.json",JSON.stringify(m,null,2)),b.closeSync(b.openSync(f+"/tracks.conf","w")),this.saveSessionDir(f),window.location=window.location.href.split("?")[0]+"?data\x3d"+K.replacePath(f)}catch(n){alert(n)}}else if(d[0].store.blob){var q=K.replacePath(d[0].store.blob.url),m=new O({browser:this,urlTemplate:q}),s=this;m.getRefSeqs(function(e){e={tracks:[{label:d[0].label,key:d[0].key,type:"SequenceTrack",category:"Reference sequence",useAsRefSeqStore:!0,storeClass:"JBrowse/Store/SeqFeature/TwoBit",
chunkSize:2E4,urlTemplate:q}],refSeqs:{data:e},refSeqOrder:c.refSeqOrder};try{var m=a.getPath("userData")+"/"+d[0].label;b.existsSync(m)||b.mkdirSync(m);b.writeFileSync(m+"/trackList.json",JSON.stringify(e,null,2));b.closeSync(b.openSync(m+"/tracks.conf","w"));s.saveSessionDir(m);window.location=window.location.href.split("?")[0]+"?data\x3d"+K.replacePath(m)}catch(f){alert(f)}},function(a){console.error("error",a)})}else{e=K.replacePath(d[0].store.fasta.url);try{if(1E8<b.statSync(e).size&&!confirm("Warning: you are opening a non-indexed fasta larger than 100MB. It is recommended to load a fasta (.fa) and the fasta index (.fai) to provide speedier loading. Do you wish to continue anyways?"))return}catch(r){}m=
new S({browser:this,urlTemplate:e});s=this;m.getRefSeqs(function(m){m={tracks:[{label:d[0].label,key:d[0].key,type:"SequenceTrack",category:"Reference sequence",useAsRefSeqStore:!0,storeClass:"JBrowse/Store/SeqFeature/UnindexedFasta",chunkSize:2E4,urlTemplate:e}],refSeqs:{data:m},refSeqOrder:c.refSeqOrder};try{var f=a.getPath("userData")+"/"+d[0].label;b.existsSync(f)||b.mkdirSync(f);b.writeFileSync(f+"/trackList.json",JSON.stringify(m,null,2));b.closeSync(b.openSync(f+"/tracks.conf","w"));s.saveSessionDir(f);
window.location=window.location.href.split("?")[0]+"?data\x3d"+K.replacePath(f)}catch(n){alert(n)}},function(a){console.error("error",a)})}})})},openFasta:function(){var a=this;this.fastaFileDialog=this.fastaFileDialog||new T({browser:this});var b=function(b){a.teardown();b()};this.fastaFileDialog.show({openCallback:dojo.hitch(this,function(c){function d(e,m){b(function(){var b=new a.constructor({refSeqs:{data:e},refSeqOrder:c.refSeqOrder});b.afterMilestone("completely initialized",function(){p.forEach(m,
function(a){var b=a.store;b&&"object"==typeof b&&(delete a.store,b.name="refseqs",a.store=this.addStoreConfig(b.name,b))},b);b.publish("/jbrowse/v1/v/tracks/new",m)})})}var e=c.trackConfs||[];e.length&&(e[0].store.fasta&&e[0].store.fai?(new H({browser:this,fai:e[0].store.fai,fasta:e[0].store.fasta})).getRefSeqs(function(a){d(a,e)},function(a){alert("Error getting refSeq: "+a)}):e[0].store.blob?(new O({browser:this,blob:e[0].store.blob})).getRefSeqs(function(a){d(a,e)},function(a){alert("Error getting refSeq: "+
a)}):e[0].store.fasta&&(!(1E8<e[0].store.fasta.size)||confirm("Warning: you are opening a non-indexed fasta larger than 100MB. It is recommended to load a fasta (.fa) and the fasta index (.fai) to provide speedier loading. Do you wish to continue anyways?"))&&(new S({browser:this,fasta:e[0].store.fasta})).getRefSeqs(function(a){d(a,e)},function(a){alert("Error getting refSeq: "+a)}))})})},browserMeta:function(){var a=this.config.aboutThisBrowser||{};a.title=a.title||"JBrowse";var b=this.version;a.description=
a.description?a.description+('\x3cdiv class\x3d"powered_by"\x3ePowered by \x3ca target\x3d"_blank" href\x3d"http://jbrowse.org"\x3eJBrowse '+b+"\x3c/a\x3e.\x3c/div\x3e"):'\x3cdiv class\x3d"default_about"\x3e  \x3cimg class\x3d"logo" src\x3d"'+this.resolveUrl("img/JBrowseLogo_small.png")+'"\x3e  \x3ch1\x3eJBrowse '+b+'\x3c/h1\x3e  \x3cdiv class\x3d"tagline"\x3eA next-generation genome browser\x3cbr\x3e built with JavaScript and HTML5.\x3c/div\x3e  \x3ca class\x3d"mainsite" target\x3d"_blank" href\x3d"http://jbrowse.org"\x3eJBrowse website\x3c/a\x3e  \x3cdiv class\x3d"gmod"\x3eJBrowse is a \x3ca target\x3d"_blank" href\x3d"http://gmod.org"\x3eGMOD\x3c/a\x3e project.\x3c/div\x3e  \x3cdiv class\x3d"copyright"\x3e'+
JSON.parse(Y).copyright+"\x3c/div\x3e"+(1<Object.keys(this.plugins).length&&!this.config.noPluginsForAboutBox?'  \x3cdiv class\x3d"loaded-plugins"\x3eLoaded plugins\x3cul class\x3d"plugins-list"\x3e'+p.map(Object.keys(this.plugins),function(a){a=this.plugins[a];return"\x3cli\x3e"+(a.url?'\x3ca href\x3d"'+a.url+'"\x3e':"")+a.name+(a.url?"\x3c/a\x3e":"")+(a.author?" ("+a.author+")":"")+"\x3c/li\x3e"},this).join("")+"  \x3c/ul\x3e\x3c/div\x3e":"")+"\x3c/div\x3e";return a},registerTrackType:function(a){var b=
this.getTrackTypes(),c=a.type,d=a.defaultForStoreTypes||[];b.knownTrackTypes.push(c);a.label&&(b.trackTypeLabels[c]=a.label);var e={};b.knownTrackTypes=p.filter(b.knownTrackTypes,function(a){var b=e[a];e[a]=!0;return!b});p.forEach(d,function(a){b.trackTypeDefaults[a]=c});this._knownTrackTypes=b},getTrackTypes:function(){this._knownTrackTypes||(this._knownTrackTypes={trackTypeDefaults:{"JBrowse/Store/SeqFeature/BAM":"JBrowse/View/Track/Alignments2","JBrowse/Store/SeqFeature/NCList":"JBrowse/View/Track/CanvasFeatures",
"JBrowse/Store/SeqFeature/BigWig":"JBrowse/View/Track/Wiggle/XYPlot","JBrowse/Store/SeqFeature/VCFTabix":"JBrowse/View/Track/CanvasVariants","JBrowse/Store/SeqFeature/GFF3":"JBrowse/View/Track/CanvasFeatures","JBrowse/Store/SeqFeature/GFF3Tabix":"JBrowse/View/Track/CanvasFeatures","JBrowse/Store/SeqFeature/BED":"JBrowse/View/Track/CanvasFeatures","JBrowse/Store/SeqFeature/BEDTabix":"JBrowse/View/Track/CanvasFeatures","JBrowse/Store/SeqFeature/GTF":"JBrowse/View/Track/CanvasFeatures","JBrowse/Store/SeqFeature/StaticChunked":"JBrowse/View/Track/Sequence",
"JBrowse/Store/SeqFeature/UnindexedFasta":"JBrowse/View/Track/Sequence","JBrowse/Store/SeqFeature/IndexedFasta":"JBrowse/View/Track/Sequence","JBrowse/Store/SeqFeature/TwoBit":"JBrowse/View/Track/Sequence"},knownTrackTypes:"JBrowse/View/Track/Alignments JBrowse/View/Track/Alignments2 JBrowse/View/Track/FeatureCoverage JBrowse/View/Track/SNPCoverage JBrowse/View/Track/HTMLFeatures JBrowse/View/Track/CanvasFeatures JBrowse/View/Track/HTMLVariants JBrowse/View/Track/CanvasVariants JBrowse/View/Track/Wiggle/XYPlot JBrowse/View/Track/Wiggle/Density JBrowse/View/Track/Sequence".split(" "),
trackTypeLabels:{}});return this._knownTrackTypes},openFileDialog:function(){this.fileDialog.show({openCallback:dojo.hitch(this,function(a){var b=a.trackConfs||[];b.length&&(p.forEach(b,function(a){var b=a.store;b&&"object"==typeof b&&(delete a.store,b=this.addStoreConfig(b.name,b),a.store=b);if((b=a.histograms&&a.histograms.store)&&"object"==typeof b)delete a.histograms.store,b=this.addStoreConfig(b.name,b),a.histograms.store=b},this),this.publish("/jbrowse/v1/v/tracks/new",b),"openImmediately"==
a.trackDisposition&&this.publish("/jbrowse/v1/v/tracks/show",b))})})},addTracks:function(a){this._addTrackConfigs(a)},replaceTracks:function(a){this._replaceTrackConfigs(a)},deleteTracks:function(a){this._deleteTrackConfigs(a)},renderGlobalMenu:function(a,b,c){this.afterMilestone("initView",function(){var d=this.makeGlobalMenu(a);d&&(b=dojo.mixin({className:a,innerHTML:'\x3cspan class\x3d"icon"\x3e\x3c/span\x3e '+(b.text||K.ucFirst(a)),dropDown:d,id:"dropdownbutton_"+a},b||{}),d=new A(b),dojo.addClass(d.domNode,
"menu"),c.appendChild(d.domNode))},this)},makeGlobalMenu:function(a){var b=(this._globalMenuItems||{})[a]||[];if(!b.length)return null;var c=new D({id:"dropdownmenu_"+a,leftClickToOpen:!0});dojo.forEach(b,function(a){c.addChild(a)});dojo.addClass(c.domNode,"globalMenu");dojo.addClass(c.domNode,a);c.startup();return c},addGlobalMenuItem:function(a,b){this._globalMenuItems||(this._globalMenuItems={});this._globalMenuItems[a]||(this._globalMenuItems[a]=[]);this._globalMenuItems[a].push(b)},_initEventRouting:function(){var a=
this;a.subscribe("/jbrowse/v1/v/store/new",function(b){p.forEach(b,function(b){b=h.mixin({},b);var c=b.name;delete b.name;a.addStoreConfig(c,b)})});a.subscribe("/jbrowse/v1/v/tracks/hide",function(b){a.publish("/jbrowse/v1/c/tracks/hide",b)});a.subscribe("/jbrowse/v1/v/tracks/show",function(b){a.addRecentlyUsedTracks(dojo.map(b,function(a){return a.label}));a.publish("/jbrowse/v1/c/tracks/show",b)});a.subscribe("/jbrowse/v1/v/tracks/new",function(b){a.addTracks(b);a.publish("/jbrowse/v1/c/tracks/new",
b);a.publish("/jbrowse/v1/n/tracks/new",b)});a.subscribe("/jbrowse/v1/v/tracks/replace",function(b){a.replaceTracks(b);a.publish("/jbrowse/v1/c/tracks/replace",b);a.publish("/jbrowse/v1/n/tracks/replace",b)});a.subscribe("/jbrowse/v1/v/tracks/delete",function(b){a.deleteTracks(b);a.publish("/jbrowse/v1/c/tracks/delete",b);a.publish("/jbrowse/v1/n/tracks/delete",b)});a.subscribe("/jbrowse/v1/v/tracks/pin",function(b){a.publish("/jbrowse/v1/c/tracks/pin",b);a.publish("/jbrowse/v1/n/tracks/pin",b)});
a.subscribe("/jbrowse/v1/v/tracks/unpin",function(b){a.publish("/jbrowse/v1/c/tracks/unpin",b);a.publish("/jbrowse/v1/n/tracks/unpin",b)})},reportUsageStats:function(){if(!this.config.suppressUsageStatistics){var a=this._calculateClientStats();this._reportGoogleUsageStats(a);this._reportCustomUsageStats(a)}},_reportGoogleUsageStats:function(a){k.push.apply(k,[["_setAccount","UA-7115575-2"],["_setDomainName","none"],["_setAllowLinker",!0],["_setCustomVar",1,"tracks-count",a["tracks-count"],3],["_setCustomVar",
2,"refSeqs-count",a["refSeqs-count"],3],["_setCustomVar",3,"refSeqs-avgLen",a["refSeqs-avgLen"],3],["_setCustomVar",4,"jbrowse-version",a.ver,3],["_setCustomVar",5,"loadTime",a.loadTime,3],["_trackPageview"]]);a=document.createElement("script");a.type="text/javascript";a.async=!0;a.src=("https:"==document.location.protocol?"https://ssl":"http://www")+".google-analytics.com/ga.js";var b=document.getElementsByTagName("script")[0];b.parentNode.insertBefore(a,b)},_reportCustomUsageStats:function(a){var b=
"https";"undefined"!=typeof this.config.clientReport&&"undefined"!=typeof this.config.clientReport.protocol&&(b=this.config.clientReport.protocol);a=b+"://jbrowse.org/analytics/clientReport?"+dojo.objectToQuery(a);dojo.create("img",{style:{display:"none"},src:a},document.body)},getStore:function(a,b){if(!b)throw"invalid arguments";var c=this._storeCache||{};this._storeCache=c;if(c=c[a])c.refCount++,b(c.store);else{var d=this.config.stores[a];d?(c=d.type)?require([c],dojo.hitch(this,function(c){var e=
{};dojo.mixin(e,d);dojo.mixin(e,{config:d,browser:this,refSeq:this.refSeq});c=new c(e);if("undefined"===typeof e.storeCache||!1!==e.storeCache)this._storeCache[a]={refCount:1,store:c};b(c);b=void 0})):(console.warn("store "+a+" has no type defined"),b(null)):(console.warn("store '"+a+"' not found"),b(null))}},uniqCounter:0,addStoreConfig:function(a,b){a=a||"addStore"+this.uniqCounter++;this.config.stores||(this.config.stores={});this._storeCache||(this._storeCache={});if(this.config.stores[a]||this._storeCache[a])throw"store "+
a+" already exists!";this.config.stores[a]=b;return a},clearStores:function(){this._storeCache={}},releaseStore:function(a){var b=this._storeCache[a];b&&!--b.refCount&&delete this._storeCache[a]},_calculateClientStats:function(){var a=screen||window.screen,b=new Date,c={ver:this.version||"dev","refSeqs-count":this.refSeqOrder.length,"refSeqs-avgLen":!this.refSeqOrder.length?null:fa.reduce(dojo.map(this.refSeqOrder,function(a){a=this.allRefs[a];return!a?0:a.end-a.start},this),"+"),"tracks-count":this.config.tracks.length,
plugins:fa.keys(this.plugins).sort().join(","),"scn-h":a?a.height:null,"scn-w":a?a.width:null,"win-h":document.body.offsetHeight,"win-w":document.body.offsetWidth,"el-h":this.container.offsetHeight,"el-w":this.container.offsetWidth,t:b.getTime()/1E3,electron:K.isElectron(),tzoffset:b.getTimezoneOffset(),loadTime:(b.getTime()-this.startTime)/1E3};dojo.forEach(this.config.tracks,function(a){a="track-types-"+a.type||"null";c[a]=(c[a]||0)+1});return c},publish:function(){return m.publish.apply(m,arguments)},
subscribe:function(){this._uniqueSubscriptionId=this._uniqueSubscriptionId||0;this._subscription=this._subscription||{};var a=++this._uniqueSubscriptionId,b=m.subscribe.apply(m,arguments),c=this;this._subscription[a]=b;return function(a){return{remove:function(){delete c._subscription[a];b.remove()}}}(a)},onResize:function(){this.navbox&&(this.view.locationTrapHeight=dojo.marginBox(this.navbox).h)},getRecentlyUsedTracks:function(){return dojo.fromJson(this.cookie("recentTracks")||"[]")},addRecentlyUsedTracks:function(a){a=
K.uniq(dojo.map(a,function(a){return{label:a,time:Math.round(new Date/1E3)}},this).concat(dojo.fromJson(this.cookie("recentTracks"))||[]),function(a){return a.label}).slice(0,this.config.maxRecentTracks||10);this.cookie("recentTracks",a,{expires:365});return a},_milestoneFunction:function(a,b){var c=Array.prototype.slice.call(arguments,2),d=this._getDeferred(a);c.unshift(d);try{b.apply(this,c)}catch(e){console.error(e,e.stack),d.reject(e)}return d},_getDeferred:function(a){this._deferred||(this._deferred=
{});var c;if(!(c=this._deferred[a])){c=this._deferred;var d=new b;d.then(null,h.hitch(this,"fatalError"));c=c[a]=d}return c},afterMilestone:function(a,b,c){return this._getDeferred(a).then(function(){try{b.call(c||this)}catch(a){console.error(""+a,a.stack,a)}})},passMilestone:function(a,b){return this._getDeferred(a).resolve(b)},reachedMilestone:function(a){return this._getDeferred(a).isResolved()},loadConfig:function(){return this._milestoneFunction("loadConfig",function(a){(new V({bootConfig:this.config,
defaults:this._configDefaults(),browser:this})).getFinalConfig().then(dojo.hitch(this,function(b){this.config=b;this.config.documentDomain&&(document.domain=this.config.documentDomain);var c=b.tracks||[];delete b.tracks;this._addTrackConfigs(c);dojo.forEach("show_tracklist show_nav show_overview show_menu show_fullviewlink show_tracklabels".split(" "),function(a){this.config[a]=this._coerceBoolean(this.config[a])},this);this.config.tracks||(this.config.tracks=[]);a.resolve({success:!0})}),a.reject)})},
_addTrackConfigs:function(a){this.config.tracks||(this.config.tracks=[]);this.trackConfigsByName||(this.trackConfigsByName={});p.forEach(a,function(a){this.trackConfigsByName[a.label]=a;this.config.tracks.push(a)},this);return a},_replaceTrackConfigs:function(a){this.trackConfigsByName||(this.trackConfigsByName={});p.forEach(a,function(a){this.trackConfigsByName[a.label]||console.warn("track with label "+a.label+" does not exist yet.  creating a new one.");this.trackConfigsByName[a.label]=dojo.mixin(this.trackConfigsByName[a.label]||
{},a)},this)},_deleteTrackConfigs:function(a){this.config.tracks=p.filter(this.config.tracks||[],function(b){return!p.some(a,function(a){return a.label==b.label})});p.forEach(a,function(a){this.trackConfigsByName[a.label]?delete this.trackConfigsByName[a.label]:console.warn("track "+a.label+" does not exist, cannot delete")},this)},_configDefaults:function(){return{tracks:[],containerID:"GenomeBrowser",dataRoot:"data",show_tracklist:!0,show_nav:!0,show_menu:!0,show_overview:!0,show_fullviewlink:!0,
refSeqs:"{dataRoot}/seq/refSeqs.json",include:["jbrowse.conf","jbrowse_conf.json"],nameUrl:"{dataRoot}/names/root.json",datasets:{_DEFAULT_EXAMPLES:!0,volvox:{url:"?data\x3dsample_data/json/volvox",name:"Volvox Example"},modencode:{url:"?data\x3dsample_data/json/modencode",name:"MODEncode Example"},yeast:{url:"?data\x3dsample_data/json/yeast",name:"Yeast Example"}},highlightSearchedRegions:!1,highResolutionMode:"disabled"}},_coerceBoolean:function(a){return"string"==typeof a?(a=a.toLowerCase(),"true"==
a?!0:"false"==a?!1:parseInt(a)):"boolean"==typeof a?a:"number"==typeof a?!!a:!0},addRefseqs:function(a){this.allRefs=this.allRefs||{};dojo.forEach(a,function(a){this.allRefs[a.name]=a},this);this.refSeqOrder=function(){var b;this.config.refSeqOrder?(b=a.slice(0),b.sort("length"==this.config.refSeqOrder||"length ascending"==this.config.refSeqOrder?function(a,b){return a.length-b.length}:"length descending"==this.config.refSeqOrder?function(a,b){return b.length-a.length}:"name descending"==this.config.refSeqOrder?
function(a,b){return b.name.localeCompare(a.name)}:function(a,b){return a.name.localeCompare(b.name)})):b=a;return p.map(b,function(a){return a.name})}.call(this);var b=this.cookie("refseq");this.refSeq=this.refSeq||this.allRefs[b]||this.allRefs[this.refSeqOrder[0]]},getRefSeq:function(a){return"string"!=typeof a?this.refSeq||void 0:this.allRefs[a]},onFineMove:function(a,b){if(this.locationTrap){var c=this.view.ref.end-this.view.ref.start,d=Math.round((a-this.view.ref.start)/c*this.view.overviewBox.w+
this.view.overviewBox.l),c=Math.round((b-this.view.ref.start)/c*this.view.overviewBox.w+this.view.overviewBox.l);dojo.style(this.locationTrap,{width:c-d+"px",borderBottomWidth:this.view.locationTrapHeight+"px",borderLeftWidth:d+"px",borderRightWidth:this.view.overviewBox.w-c+"px"})}},initTrackMetadata:function(a){return this._milestoneFunction("initTrackMetadata",function(a){var b=dojo.map((this.config.trackMetadata||{}).sources||[],function(a){var b=a.url||"trackMeta.csv",c=a.type||(/\.csv$/i.test(b)?
"csv":/\.js(on)?$/i.test(b)?"json":"csv");a=a["class"]||{csv:"dojox/data/CsvStore",json:"dojox/data/JsonRestStore"}[c];return!a?(console.error("No store class found for type '"+c+"', cannot load track metadata from URL "+b),null):{class_:a,url:b}});require(Array.prototype.concat.apply(["JBrowse/Store/TrackMetaData"],dojo.map(b,function(a){return a.class_})),dojo.hitch(this,function(c){for(var d=[],e=1;e<arguments.length;e++)d.push(new arguments[e]({url:b[e-1].url}));this.trackMetaDataStore=new c(dojo.mixin(dojo.clone(this.config.trackMetadata||
{}),{trackConfigs:this.config.tracks,browser:this,metadataStores:d}));a.resolve({success:!0})}))})},createTrackList:function(){return this._milestoneFunction("createTrack",function(a){var b=!this.config.show_tracklist?"Null":(this.config.trackSelector||{}).type?this.config.trackSelector.type:"Hierarchical";/\//.test(b)||(b="JBrowse/View/TrackList/"+b);require([b],dojo.hitch(this,function(b){this.trackListView=new b(dojo.mixin(dojo.clone(this.config.trackSelector)||{},{trackConfigs:this.config.tracks,
browser:this,trackMetaData:this.trackMetaDataStore}));this.setGlobalKeyboardShortcut("t",this.trackListView,"toggle");this.subscribe("/jbrowse/v1/n/tracks/visibleChanged",dojo.hitch(this,function(){this.cookie("tracks",this.view.visibleTrackNames().join(","),{expires:60})}));a.resolve({success:!0})}))})},onVisibleTracksChanged:function(){},showRegion:function(a){var b=Math.round(0.2*(a.end-a.start));this.navigateToLocation({ref:a.ref,start:a.start-b,end:a.end+b});a.tracks&&this.showTracks(p.map(a.tracks,
function(a){return a&&(a.label||a.name)||a}))},navigateTo:function(a){var b=this;this.afterMilestone("initView",function(){b.afterMilestone("loadNames",function(){b.searchNames(a).then(function(c){c||b.callLocation(a)&&(new U({title:"Not found",content:'Not found: \x3cspan class\x3d"locString"\x3e'+a+"\x3c/span\x3e",className:"notfound-dialog"})).show()});b.callLocation(a)})})},callLocation:function(a){var b="string"==typeof a?K.parseLocString(a):a;if(b&&"start"in b&&"end"in b)return this.navigateToLocation(b),
!1;"string"!=typeof a&&(a=a.ref);if(a=this.findReferenceSequence(a))return this.navigateToLocation({ref:a.name}),!1},findReferenceSequence:function(a){for(var b in this.allRefs)if(!this.compareReferenceNames(b,a))return this.allRefs[b];return null},navigateToLocation:function(a){this.afterMilestone("initView",dojo.hitch(this,function(){var b=a.ref?this.findReferenceSequence(a.ref.name||a.ref):this.refSeq;if(b){a.ref=b.name;if("ref"in a&&!("start"in a&&"end"in a)){var c;try{c=K.parseLocString(dojo.fromJson(this.cookie("location"))[a.ref].l),
c.ref=a.ref}catch(d){}c?a=c:(c=b.end-b.start,a.start=b.start+0.1*c,a.end=b.start+0.9*c)}a.start=Math.max(0,a.start||0);a.end=Math.max(a.start,Math.min(b.end,a.end||b.end));a.ref==this.refSeq.name?(this.view.setLocation(this.refSeq,a.start,a.end),this._updateLocationCookies(a)):(b=this.view.visibleTrackNames(),this.refSeq=this.allRefs[a.ref],this.clearStores(),this.view.setLocation(this.refSeq,a.start,a.end),this._updateLocationCookies(a),this.showTracks(b))}}))},searchNames:function(a){var b=this;
return this.nameStore.query({name:a}).then(function(c){if(!c.length)return!1;for(var d,e=0;e<c.length;e++)c[e].name==a&&(d=c[e]);if(!d)for(e=0;e<c.length;e++)c[e].name.toLowerCase()==a.toLowerCase()&&(d=c[e]);d||(d=c[0]);d.location?b.showRegionAfterSearch(d.location):d.multipleLocations&&(new W({browser:b,locationChoices:d.multipleLocations,title:"Choose "+d.name+" location",prompt:'"'+d.name+'" is found in multiple locations.  Please choose a location to view.'})).show();return!0},function(a){console.error(a);
(new U({title:"Error",content:"Error reading from name store."})).show();return!1})},showTracks:function(a){this.afterMilestone("initView",dojo.hitch(this,function(){"string"==typeof a&&(a=a.split(","));if(a){var b=dojo.filter(dojo.map(a,function(a){return this.trackConfigsByName[a]},this),function(a){return a});this.publish("/jbrowse/v1/c/tracks/show",b);this.publish("/jbrowse/v1/n/tracks/visibleChanged")}}))},setGlobalKeyboardShortcut:function(a){this.globalKeyboardShortcuts[a]&&console.warn("WARNING: JBrowse global keyboard shortcut '"+
a+"' redefined");var b=dojo.hitch.apply(dojo,Array.prototype.slice.call(arguments,1));this.globalKeyboardShortcuts[a]=b},globalKeyHandler:function(a){if(!X.curNode){var b=this.globalKeyboardShortcuts[a.keyChar||String.fromCharCode(a.charCode||a.keyCode)];b&&(b.call(this),a.stopPropagation())}},makeSnapLink:function(){return(new w({className:"share",innerHTML:"Screenshot",title:"share this view",onClick:function(){electronRequire("fs");var a=electronRequire("electron-screenshot");electronRequire("electron").remote.dialog.showSaveDialog(function(b){a({filename:b,
delay:1},function(){})})}})).domNode},makeShareLink:function(){if("share_link"in this.config&&!this.config.share_link)return null;var a=this,b="#",c=new w({className:"share",innerHTML:'\x3cspan class\x3d"icon"\x3e\x3c/span\x3e Share',title:"share this view",onClick:function(){m.value=b;f.href=b;n.show();var a=dojo.position(c.domNode);dojo.style(n.domNode,{top:a.y+a.h+"px",right:0,left:""});m.focus();m.select();e.style.display="block";return!1}}),d=dojo.create("div",{innerHTML:"Paste this link in \x3cb\x3eemail\x3c/b\x3e or \x3cb\x3eIM\x3c/b\x3e"}),
e=dojo.create("div",{className:"copyReminder",innerHTML:"Press CTRL-C to copy"}),m=dojo.create("input",{type:"text",value:b,size:50,readonly:"readonly",onclick:function(){this.select();e.style.display="block"},onblur:function(){e.style.display="none"}}),f=dojo.create("a",{innerHTML:"Preview",target:"_blank",href:b,style:{display:"block","float":"right"}},d),n=new v({className:"sharePane",title:"Share this view",draggable:!1,content:[d,m,e],autofocus:!1}),d=function(){b=a.makeCurrentViewURL()};dojo.connect(this,
"onCoarseMove",d);this.subscribe("/jbrowse/v1/n/tracks/visibleChanged",d);this.subscribe("/jbrowse/v1/n/globalHighlightChanged",d);return c.domNode},makeCurrentViewURL:function(a){var b=typeof this.config.shareURL;return"function"==b?this.config.shareURL.call(this,this):"string"==b?this.config.shareURL:"".concat(window.location.protocol,"//",window.location.host,window.location.pathname,"?",dojo.objectToQuery(dojo.mixin(dojo.mixin({},this.config.queryParams||{}),dojo.mixin({loc:this.view.visibleRegionLocString(),
tracks:this.view.visibleTrackNames().join(","),highlight:(this.getHighlight()||"").toString()},a||{}))))},makeFullViewLink:function(){var a=this,b=dojo.create("a",{className:"topLink",href:window.location.href,target:"_blank",title:"View in full-screen browser",innerHTML:"Full-screen view"}),c=this.config.makeFullViewURL||this.makeCurrentViewURL,d=function(){b.href=c.call(a,a)};dojo.connect(this,"onCoarseMove",d);this.subscribe("/jbrowse/v1/n/tracks/visibleChanged",d);this.subscribe("/jbrowse/v1/n/globalHighlightChanged",
d);return b},onCoarseMove:function(a,b){var c={start:a,end:b,ref:this.refSeq.name},d="";if(this.locationBox){d=this.locationBox.get("value");d.length&&(d=' "'+d+'"');var e=K.assembleLocStringWithLength(c);this.locationBox.set("value",e,!1);this.locationBox.set("placeholder","search features, IDs");this.goButton.set("disabled",!0)}if(e=dojo.byId("location-info")){var m=K.assembleLocStringWithLength(c);f.set(e,m+d);this.locationBox.set("value","",!1)}this._updateRefSeqSelectBox();this.reachedMilestone("completely initialized")&&
this._updateLocationCookies(c);this.publish("/jbrowse/v1/n/navigate",c)},_updateRefSeqSelectBox:function(){this.refSeqSelectBox&&(p.some(this.refSeqSelectBox.getOptions(),function(a){return a.value==this.refSeq.name},this)||this.refSeqSelectBox.set("options",this.refSeqSelectBox.getOptions().concat({label:this.refSeq.name,value:this.refSeq.name})),this.refSeqSelectBox.set("value",this.refSeq.name,!1))},_updateLocationCookies:function(a){a="string"==typeof a?a:K.assembleLocString(a);var b=dojo.fromJson(this.cookie("location"))||
{_version:1};b._version||(b=this._migrateLocMap(b));b[this.refSeq.name]={l:a,t:Math.round((new Date).getTime()/1E3)-1340211510};b=this._limitLocMap(b,this.config.maxSavedLocations||10);this.cookie("location",dojo.toJson(b),{expires:60});this.cookie("refseq",this.refSeq.name)},_migrateLocMap:function(a){var b={_version:1},c;for(c in a)b[c]={l:a[c],t:0};return b},_limitLocMap:function(a,b){var c=fa.keys(a);if(c.length<=b)return a;a=dojo.clone(a);c=c.sort(function(b,c){return a[c].t-a[b].t}).slice(b-
1);dojo.forEach(c,function(b){delete a[b]});return a},cookie:function(a,b){a=this.config.containerID+"-"+a;var c=a+"-"+(this.config.dataset_id||"");"object"==typeof b&&(b=dojo.toJson(b));var d=this.config.cookieSizeLimit||1200;if(null!=b&&b.length>d)return console.warn("not setting cookie '"+c+"', value too big ("+b.length+" \x3e "+d+")"),localStorage.getItem(c);if(null!=b)try{return localStorage.setItem(c,b)}catch(e){}return localStorage.getItem(c)||dojo.cookie(a)},createNavBox:function(a){var b=
this;a=dojo.create("div",{id:"navbox",style:{"text-align":"center"}},a);var d=dojo.create("div",{className:"locationTrapContainer"},a);this.locationTrap=dojo.create("div",{className:"locationTrap"},d);d=String.fromCharCode(160);d=d+d+d+d;a.appendChild(document.createTextNode(d));var m=document.createElement("img");m.src=this.resolveUrl("img/Empty.png");m.id="moveLeft";m.className="icon nav";a.appendChild(m);dojo.connect(m,"click",this,function(a){dojo.stopEvent(a);this.view.slide(0.9)});m=document.createElement("img");
m.src=this.resolveUrl("img/Empty.png");m.id="moveRight";m.className="icon nav";a.appendChild(m);dojo.connect(m,"click",this,function(a){dojo.stopEvent(a);this.view.slide(-0.9)});a.appendChild(document.createTextNode(d));m=document.createElement("img");m.src=this.resolveUrl("img/Empty.png");m.id="bigZoomOut";m.className="icon nav";a.appendChild(m);dojo.connect(m,"click",this,function(a){dojo.stopEvent(a);this.view.zoomOut(void 0,void 0,2)});m=document.createElement("img");m.src=this.resolveUrl("img/Empty.png");
m.id="zoomOut";m.className="icon nav";a.appendChild(m);dojo.connect(m,"click",this,function(a){dojo.stopEvent(a);this.view.zoomOut()});m=document.createElement("img");m.src=this.resolveUrl("img/Empty.png");m.id="zoomIn";m.className="icon nav";a.appendChild(m);dojo.connect(m,"click",this,function(a){dojo.stopEvent(a);this.view.zoomIn()});m=document.createElement("img");m.src=this.resolveUrl("img/Empty.png");m.id="bigZoomIn";m.className="icon nav";a.appendChild(m);dojo.connect(m,"click",this,function(a){dojo.stopEvent(a);
this.view.zoomIn(void 0,void 0,2)});a.appendChild(document.createTextNode(d));m="";d="40ex";"separate"===this.config.locationBox&&(m="separate-location-box",d="25ex");var m=dojo.create("span",{id:"search-box","class":m},a),f=dojo.create("span",{id:"search-refseq"},m);this.locationBox=new x({id:"location",name:"location",style:{width:d},maxLength:400,searchAttr:"name",title:"Enter a chromosomal position, symbol or ID to search"},dojo.create("input",{},m));this.afterMilestone("loadNames",dojo.hitch(this,
function(){this.nameStore&&this.locationBox.set("store",this.nameStore)}));this.locationBox.focusNode.spellcheck=!1;dojo.query("div.dijitArrowButton",this.locationBox.domNode).orphan();dojo.connect(this.locationBox.focusNode,"keydown",this,function(a){a.keyCode==c.ESCAPE?this.locationBox.set("value",""):a.keyCode==c.ENTER?(this.locationBox.closeDropDown(!1),this.navigateTo(this.locationBox.get("value")),this.goButton.set("disabled",!0),dojo.stopEvent(a)):this.goButton.set("disabled",!1)});dojo.connect(a,
"onselectstart",function(a){a.stopPropagation();return!0});(function(){var a=eval(this.locationBox.dropDownClass).prototype,b=a._createOption;a._createOption=function(a){var c=b.apply(this,arguments);a.hitLimit&&dojo.addClass(c,"moreMatches");return c};var c=a.onClick;a.onClick=function(a){return dojo.hasClass(a,"moreMatches")?null:c.apply(this,arguments)}}).call(this);this.goButton=new w({label:"Go",onClick:dojo.hitch(this,function(a){this.navigateTo(this.locationBox.get("value"));this.goButton.set("disabled",
!0);dojo.stopEvent(a)}),id:"search-go-btn"},dojo.create("button",{},m));this.highlightButtonPreviousState=!1;"separate"===this.config.locationBox&&(this.locationInfoBox=e.place("\x3cdiv id\x3d'location-info'\x3elocation\x3c/div\x3e",a));this.highlightButton=new M({title:"Highlight a Region",id:"highlight-btn",states:[!1,!0,"mixed"],onChange:function(){if(!0==this.get("checked"))b.view._rubberStop(),b.view.behaviorManager.swapBehaviors("normalMouse","highlightingMouse");else if(!1==this.get("checked")){var a=
b.getHighlight();a&&(b.clearHighlight(),b.view.redrawRegion(a))}else!0!=b.highlightButtonPreviousState?b.highlightButton.set("checked",!1):b.highlightButtonPreviousState=!1,b.view._rubberStop(),b.view.behaviorManager.swapBehaviors("highlightingMouse","normalMouse")}},dojo.create("button",{id:"highlight-btn"},a));this.subscribe("/jbrowse/v1/n/globalHighlightChanged",function(){b.highlightButton.set("checked",!1)});this.afterMilestone("loadRefSeqs",dojo.hitch(this,function(){if(this.refSeqOrder&&this.refSeqOrder.length){for(var a=
this.config.refSeqSelectorMaxSize||30,b=Math.min(a,this.refSeqOrder.length),c=[],d=0;d<b;d++)c.push({label:this.refSeqOrder[d],value:this.refSeqOrder[d]});var e="(first "+b+" ref seqs)";this.refSeqOrder.length>a&&c.push({label:e,value:e,disabled:!0});this.refSeqSelectBox=(new y({name:"refseq",value:this.refSeq?this.refSeq.name:null,options:c,onChange:dojo.hitch(this,function(a){a==e?this.refSeqSelectBox.set("value",this.refSeq.name):a!=this.refSeq.name&&this.navigateToLocation({ref:a})})})).placeAt(f)}a=
this.config.locationBoxLength||function(){if(!this.refSeqOrder.length)return 20;var a=1E3>this.refSeqOrder.length&&function(){var a;p.forEach(this.refSeqOrder,function(b){b=this.allRefs[b];b.length||(b.length=b.end-b.start+1);if(!a||a.length<b.length)a=b},this);return a}.call(this)||this.refSeqOrder.length&&this.allRefs[this.refSeqOrder[this.refSeqOrder.length-1]]||20;return K.assembleLocStringWithLength({ref:a.name,start:a.end-1,end:a.end,length:a.length}).length}.call(this)||20;this.locationBox.domNode.style.width=
a+"ex"}));return a},getHighlight:function(){return this._highlight||null},getBookmarks:function(){return this.config.bookmarkService?q(this.config.bookmarkService+"?"+s.objectToQuery({sequence:this.refSeq.name,organism:this.config.dataset_id}),{handleAs:"json"}):this.config.bookmarks},setHighlight:function(a){a&&a instanceof Q?this._highlight=a:a&&(this._highlight=new Q(a));this.publish("/jbrowse/v1/n/globalHighlightChanged",[this._highlight]);return this.getHighlight()},_updateHighlightClearButton:function(){var a=
!!this._highlight;this._highlightClearButton&&this._highlightClearButton.set("disabled",!a);this.highlightButton&&(this.highlightButton.set("checked",a?"mixed":!1),this.highlightButtonPreviousState=a)},clearHighlight:function(){this._highlight&&(delete this._highlight,this.publish("/jbrowse/v1/n/globalHighlightChanged",[]))},setHighlightAndRedraw:function(a){a=this.regularizeLocation(a);var b=this.getHighlight();b&&this.view.hideRegion(b);this.view.hideRegion(a);this.setHighlight(a);this.view.showVisibleBlocks(!1)},
showRegionAfterSearch:function(a){a=this.regularizeLocation(a);if(this.config.highlightSearchedRegions){var b=this.getHighlight();b&&this.view.hideRegion(b);this.view.hideRegion(a);this.setHighlight(a)}this.showRegion(a)},showRegionWithHighlight:function(){return this.showRegionAfterSearch.apply(this,arguments)},teardown:function(){for(var a in this._subscription)this._subscription[a].remove();for(this.containerWidget&&this.containerWidget.destroyRecursive(!0);this.container&&this.container.firstChild;)this.container.removeChild(this.container.firstChild)}})})},
"dojo/_base/declare":function(){define(["./kernel","../has","./lang"],function(k,l,h){function g(a,b){throw Error("declare"+(b?" "+b:"")+": "+a);}function f(a,b,c){var d,e,m,f,n,q,s,r=this._inherited=this._inherited||{};"string"==typeof a&&(d=a,a=b,b=c);c=0;f=a.callee;(d=d||f.nom)||g("can't deduce a name to call inherited()",this.declaredClass);n=this.constructor._meta;m=n.bases;s=r.p;if(d!=A){if(r.c!==f&&(s=0,q=m[0],n=q._meta,n.hidden[d]!==f)){(e=n.chains)&&"string"==typeof e[d]&&g("calling chained method with inherited: "+
d,this.declaredClass);do if(n=q._meta,e=q.prototype,n&&(e[d]===f&&e.hasOwnProperty(d)||n.hidden[d]===f))break;while(q=m[++s]);s=q?s:-1}if(q=m[++s])if(e=q.prototype,q._meta&&e.hasOwnProperty(d))c=e[d];else{f=x[d];do if(e=q.prototype,(c=e[d])&&(q._meta?e.hasOwnProperty(d):c!==f))break;while(q=m[++s])}c=q&&c||x[d]}else{if(r.c!==f&&(s=0,(n=m[0]._meta)&&n.ctor!==f)){e=n.chains;for((!e||"manual"!==e.constructor)&&g("calling chained constructor with inherited",this.declaredClass);(q=m[++s])&&!((n=q._meta)&&
n.ctor===f););s=q?s:-1}for(;(q=m[++s])&&!(c=(n=q._meta)?n.ctor:q););c=q&&c}r.c=c;r.p=s;if(c)return!0===b?c:c.apply(this,b||a)}function d(a,b){return"string"==typeof a?this.__inherited(a,b,!0):this.__inherited(a,!0)}function e(a,b,c){var d=this.getInherited(a,b);if(d)return d.apply(this,c||b||a)}function c(a){for(var b=this.constructor._meta.bases,c=0,d=b.length;c<d;++c)if(b[c]===a)return!0;return this instanceof a}function b(a,b){for(var c in b)c!=A&&b.hasOwnProperty(c)&&(a[c]=b[c]);if(l("bug-for-in-skips-shadowed"))for(var d=
h._extraNames,e=d.length;e;)c=d[--e],c!=A&&b.hasOwnProperty(c)&&(a[c]=b[c])}function a(a){u.safeMixin(this.prototype,a);return this}function m(a,b){return u([this].concat(a),b||{})}function n(a,b){return function(){var c=arguments,d=c,e=c[0],m,f;f=a.length;var n;if(!(this instanceof c.callee))return t(c);if(b&&(e&&e.preamble||this.preamble)){n=Array(a.length);n[0]=c;for(m=0;;){if(e=c[0])(e=e.preamble)&&(c=e.apply(this,c)||c);e=a[m].prototype;(e=e.hasOwnProperty("preamble")&&e.preamble)&&(c=e.apply(this,
c)||c);if(++m==f)break;n[m]=c}}for(m=f-1;0<=m;--m)e=a[m],(e=(f=e._meta)?f.ctor:e)&&e.apply(this,n?n[m]:c);(e=this.postscript)&&e.apply(this,d)}}function q(a,b){return function(){var c=arguments,d=c,e=c[0];if(!(this instanceof c.callee))return t(c);b&&(e&&(e=e.preamble)&&(d=e.apply(this,d)||d),(e=this.preamble)&&e.apply(this,d));a&&a.apply(this,c);(e=this.postscript)&&e.apply(this,c)}}function s(a){return function(){var b=arguments,c=0,d,e;if(!(this instanceof b.callee))return t(b);for(;d=a[c];++c)if(d=
(e=d._meta)?e.ctor:d){d.apply(this,b);break}(d=this.postscript)&&d.apply(this,b)}}function r(a,b,c){return function(){var d,e,m=0,f=1;c&&(m=b.length-1,f=-1);for(;d=b[m];m+=f)e=d._meta,(d=(e?e.hidden:d.prototype)[a])&&d.apply(this,arguments)}}function p(a){y.prototype=a.prototype;a=new y;y.prototype=null;return a}function t(a){var b=a.callee,c=p(b);b.apply(c,a);return c}function u(e,y,t){"string"!=typeof e&&(t=y,y=e,e="");t=t||{};var k,l,G,F,L,E,N,J=1,V=y;if("[object Array]"==w.call(y)){J=e;G=[];F=
[{cls:0,refs:[]}];E={};for(var U=1,R=y.length,T=0,H,S,O,Q;T<R;++T){(H=y[T])?"[object Function]"!=w.call(H)&&g("mixin #"+T+" is not a callable constructor.",J):g("mixin #"+T+" is unknown. Did you use dojo.require to pull it in?",J);S=H._meta?H._meta.bases:[H];O=0;for(H=S.length-1;0<=H;--H)Q=S[H].prototype,Q.hasOwnProperty("declaredClass")||(Q.declaredClass="uniqName_"+z++),Q=Q.declaredClass,E.hasOwnProperty(Q)||(E[Q]={count:0,refs:[],cls:S[H]},++U),Q=E[Q],O&&O!==Q&&(Q.refs.push(O),++O.count),O=Q;++O.count;
F[0].refs.push(O)}for(;F.length;){O=F.pop();G.push(O.cls);for(--U;l=O.refs,1==l.length;){O=l[0];if(!O||--O.count){O=0;break}G.push(O.cls);--U}if(O){T=0;for(R=l.length;T<R;++T)O=l[T],--O.count||F.push(O)}}U&&g("can't build consistent linearization",J);H=y[0];G[0]=H?H._meta&&H===G[G.length-H._meta.bases.length]?H._meta.bases.length:1:0;E=G;G=E[0];J=E.length-G;y=E[J]}else E=[0],y?"[object Function]"==w.call(y)?(G=y._meta,E=E.concat(G?G.bases:y)):g("base class is not a callable constructor.",e):null!==
y&&g("unknown base class. Did you use dojo.require to pull it in?",e);if(y)for(l=J-1;;--l){k=p(y);if(!l)break;G=E[l];(G._meta?b:v)(k,G.prototype);F=new Function;F.superclass=y;F.prototype=k;y=k.constructor=F}else k={};u.safeMixin(k,t);G=t.constructor;G!==x.constructor&&(G.nom=A,k.constructor=G);for(l=J-1;l;--l)(G=E[l]._meta)&&G.chains&&(N=v(N||{},G.chains));k["-chains-"]&&(N=v(N||{},k["-chains-"]));G=!N||!N.hasOwnProperty(A);E[0]=F=N&&"manual"===N.constructor?s(E):1==E.length?q(t.constructor,G):n(E,
G);F._meta={bases:E,hidden:t,chains:N,parents:V,ctor:t.constructor};F.superclass=y&&y.prototype;F.extend=a;F.createSubclass=m;F.prototype=k;k.constructor=F;k.getInherited=d;k.isInstanceOf=c;k.inherited=D;k.__inherited=f;e&&(k.declaredClass=e,h.setObject(e,F));if(N)for(L in N)k[L]&&("string"==typeof N[L]&&L!=A)&&(G=k[L]=r(L,E,"after"===N[L]),G.nom=L);return F}var v=h.mixin,x=Object.prototype,w=x.toString,y=new Function,z=0,A="constructor",D=k.config.isDebug?e:f;k.safeMixin=u.safeMixin=function(a,b){var c,
d;for(c in b)if(d=b[c],(d!==x[c]||!(c in x))&&c!=A)"[object Function]"==w.call(d)&&(d.nom=c),a[c]=d;if(l("bug-for-in-skips-shadowed"))for(var e=h._extraNames,m=e.length;m;)if(c=e[--m],d=b[c],(d!==x[c]||!(c in x))&&c!=A)"[object Function]"==w.call(d)&&(d.nom=c),a[c]=d;return a};return k.declare=u})},"dojo/_base/kernel":function(){define(["../has","./config","require","module"],function(k,l,h,g){var f,d;f=function(){return this}();var e={},c={},b={config:l,global:f,dijit:e,dojox:c},e={dojo:["dojo",
b],dijit:["dijit",e],dojox:["dojox",c]};g=h.map&&h.map[g.id.match(/[^\/]+/)[0]];for(d in g)e[d]?e[d][0]=g[d]:e[d]=[g[d],{}];for(d in e)g=e[d],g[1]._scopeName=g[0],l.noGlobals||(f[g[0]]=g[1]);b.scopeMap=e;b.baseUrl=b.config.baseUrl=h.baseUrl;b.isAsync=h.async;b.locale=l.locale;f="$Rev: 033146e $".match(/[0-9a-f]{7,}/);b.version={major:1,minor:9,patch:8,flag:"",revision:f?f[0]:NaN,toString:function(){var a=b.version;return a.major+"."+a.minor+"."+a.patch+a.flag+" ("+a.revision+")"}};Function("d","d.eval \x3d function(){return d.global.eval ? d.global.eval(arguments[0]) : eval(arguments[0]);}")(b);
b.exit=function(){};k.add("console-as-object",Function.prototype.bind&&console&&"object"===typeof console.log);"undefined"!=typeof console||(console={});g="assert count debug dir dirxml error group groupEnd info profile profileEnd time timeEnd trace warn log".split(" ");var a;for(f=0;a=g[f++];)console[a]?k("console-as-object")&&(console[a]=Function.prototype.bind.call(console[a],console)):function(){var b=a+"";console[b]="log"in console?function(){var a=Array.prototype.slice.call(arguments);a.unshift(b+
":");console.log(a.join(" "))}:function(){};console[b]._fake=!0}();k.add("dojo-debug-messages",!!l.isDebug);b.deprecated=b.experimental=function(){};k("dojo-debug-messages")&&(b.deprecated=function(a,b,c){a="DEPRECATED: "+a;b&&(a+=" "+b);c&&(a+=" -- will be removed in version: "+c);console.warn(a)},b.experimental=function(a,b){var c="EXPERIMENTAL: "+a+" -- APIs subject to change without notice.";b&&(c+=" "+b);console.warn(c)});if(l.modulePaths){b.deprecated("dojo.modulePaths","use paths configuration");
k={};for(d in l.modulePaths)k[d.replace(/\./g,"/")]=l.modulePaths[d];h({paths:k})}b.moduleUrl=function(a,c){b.deprecated("dojo.moduleUrl()","use require.toUrl","2.0");var d=null;a&&(d=h.toUrl(a.replace(/\./g,"/")+(c?"/"+c:"")+"/*.*").replace(/\/\*\.\*/,"")+(c?"":"/"));return d};b._hasResource={};return b})},"dojo/has":function(){define(["require","module"],function(k,l){var h=k.has||function(){};h.add("dom-addeventlistener",!!document.addEventListener);h.add("touch","ontouchstart"in document||0<window.navigator.msMaxTouchPoints);
h.add("device-width",screen.availWidth||innerWidth);var g=document.createElement("form");h.add("dom-attributes-explicit",0==g.attributes.length);h.add("dom-attributes-specified-flag",0<g.attributes.length&&40>g.attributes.length);h.clearElement=function(f){f.innerHTML="";return f};h.normalize=function(f,d){var e=f.match(/[\?:]|[^:\?]*/g),c=0,b=function(a){var d=e[c++];if(":"==d)return 0;if("?"==e[c++]){if(!a&&h(d))return b();b(!0);return b(a)}return d||0};return(f=b())&&d(f)};h.load=function(f,d,
e){f?d([f],e):e()};return h})},"dojo/_base/config":function(){define(["../has","require"],function(k,l){var h={},g=l.rawConfig,f;for(f in g)h[f]=g[f];!h.locale&&"undefined"!=typeof navigator&&(h.locale=(navigator.language||navigator.userLanguage).toLowerCase());return h})},"dojo/_base/lang":function(){define(["./kernel","../has","../sniff"],function(k,l){l.add("bug-for-in-skips-shadowed",function(){for(var a in{toString:1})return 0;return 1});var h=l("bug-for-in-skips-shadowed")?"hasOwnProperty valueOf isPrototypeOf propertyIsEnumerable toLocaleString toString constructor".split(" "):
[],g=h.length,f=function(a,b,c){var d,e=0,f=k.global;if(!c)if(a.length){d=a[e++];try{c=k.scopeMap[d]&&k.scopeMap[d][1]}catch(p){}c=c||(d in f?f[d]:b?f[d]={}:void 0)}else return f;for(;c&&(d=a[e++]);)c=d in c?c[d]:b?c[d]={}:void 0;return c},d=Object.prototype.toString,e=function(a,b,c){return(c||[]).concat(Array.prototype.slice.call(a,b||0))},c=/\{([^\}]+)\}/g,b={_extraNames:h,_mixin:function(a,b,c){var d,e,f,p={};for(d in b)if(e=b[d],!(d in a)||a[d]!==e&&(!(d in p)||p[d]!==e))a[d]=c?c(e):e;if(l("bug-for-in-skips-shadowed")&&
b)for(f=0;f<g;++f)if(d=h[f],e=b[d],!(d in a)||a[d]!==e&&(!(d in p)||p[d]!==e))a[d]=c?c(e):e;return a},mixin:function(a,c){a||(a={});for(var d=1,e=arguments.length;d<e;d++)b._mixin(a,arguments[d]);return a},setObject:function(a,b,c){var d=a.split(".");a=d.pop();return(c=f(d,!0,c))&&a?c[a]=b:void 0},getObject:function(a,b,c){return f(a.split("."),b,c)},exists:function(a,c){return void 0!==b.getObject(a,!1,c)},isString:function(a){return"string"==typeof a||a instanceof String},isArray:function(a){return a&&
(a instanceof Array||"array"==typeof a)},isFunction:function(a){return"[object Function]"===d.call(a)},isObject:function(a){return void 0!==a&&(null===a||"object"==typeof a||b.isArray(a)||b.isFunction(a))},isArrayLike:function(a){return a&&void 0!==a&&!b.isString(a)&&!b.isFunction(a)&&!(a.tagName&&"form"==a.tagName.toLowerCase())&&(b.isArray(a)||isFinite(a.length))},isAlien:function(a){return a&&!b.isFunction(a)&&/\{\s*\[native code\]\s*\}/.test(String(a))},extend:function(a,c){for(var d=1,e=arguments.length;d<
e;d++)b._mixin(a.prototype,arguments[d]);return a},_hitchArgs:function(a,c){var d=b._toArray(arguments,2),e=b.isString(c);return function(){var f=b._toArray(arguments),r=e?(a||k.global)[c]:c;return r&&r.apply(a||this,d.concat(f))}},hitch:function(a,c){if(2<arguments.length)return b._hitchArgs.apply(k,arguments);c||(c=a,a=null);if(b.isString(c)){a=a||k.global;if(!a[c])throw['lang.hitch: scope["',c,'"] is null (scope\x3d"',a,'")'].join("");return function(){return a[c].apply(a,arguments||[])}}return!a?
c:function(){return c.apply(a,arguments||[])}},delegate:function(){function a(){}return function(c,d){a.prototype=c;var e=new a;a.prototype=null;d&&b._mixin(e,d);return e}}(),_toArray:l("ie")?function(){function a(a,b,c){c=c||[];for(b=b||0;b<a.length;b++)c.push(a[b]);return c}return function(b){return(b.item?a:e).apply(this,arguments)}}():e,partial:function(a){return b.hitch.apply(k,[null].concat(b._toArray(arguments)))},clone:function(a){if(!a||"object"!=typeof a||b.isFunction(a))return a;if(a.nodeType&&
"cloneNode"in a)return a.cloneNode(!0);if(a instanceof Date)return new Date(a.getTime());if(a instanceof RegExp)return RegExp(a);var c,d,e;if(b.isArray(a)){c=[];d=0;for(e=a.length;d<e;++d)d in a&&c.push(b.clone(a[d]))}else c=a.constructor?new a.constructor:{};return b._mixin(c,a,b.clone)},trim:String.prototype.trim?function(a){return a.trim()}:function(a){return a.replace(/^\s\s*/,"").replace(/\s\s*$/,"")},replace:function(a,d,e){return a.replace(e||c,b.isFunction(d)?d:function(a,c){return b.getObject(c,
!1,d)})}};b.mixin(k,b);return b})},"dojo/sniff":function(){define(["./has"],function(k){var l=navigator,h=l.userAgent,l=l.appVersion,g=parseFloat(l);k.add("air",0<=h.indexOf("AdobeAIR"));k.add("wp",parseFloat(h.split("Windows Phone")[1])||void 0);k.add("msapp",parseFloat(h.split("MSAppHost/")[1])||void 0);k.add("khtml",0<=l.indexOf("Konqueror")?g:void 0);k.add("edge",parseFloat(h.split("Edge/")[1])||void 0);k.add("opr",parseFloat(h.split("OPR/")[1])||void 0);k.add("webkit",!k("wp")&&!k("edge")&&parseFloat(h.split("WebKit/")[1])||
void 0);k.add("chrome",!k("edge")&&!k("opr")&&parseFloat(h.split("Chrome/")[1])||void 0);k.add("android",!k("wp")&&parseFloat(h.split("Android ")[1])||void 0);k.add("safari",0<=l.indexOf("Safari")&&!k("wp")&&!k("chrome")&&!k("android")&&!k("edge")&&!k("opr")?parseFloat(l.split("Version/")[1]):void 0);k.add("mac",0<=l.indexOf("Macintosh"));k.add("quirks","BackCompat"==document.compatMode);if(!k("wp")&&h.match(/(iPhone|iPod|iPad)/)){var f=RegExp.$1.replace(/P/,"p"),d=h.match(/OS ([\d_]+)/)?RegExp.$1:
"1",d=parseFloat(d.replace(/_/,".").replace(/_/g,""));k.add(f,d);k.add("ios",d)}k.add("bb",(0<=h.indexOf("BlackBerry")||0<=h.indexOf("BB10"))&&parseFloat(h.split("Version/")[1])||void 0);k.add("trident",parseFloat(l.split("Trident/")[1])||void 0);k.add("svg","undefined"!==typeof SVGAngle);k("webkit")||(0<=h.indexOf("Opera")&&k.add("opera",9.8<=g?parseFloat(h.split("Version/")[1])||g:g),0<=h.indexOf("Gecko")&&(!k("wp")&&!k("khtml")&&!k("trident")&&!k("edge"))&&k.add("mozilla",g),k("mozilla")&&k.add("ff",
parseFloat(h.split("Firefox/")[1]||h.split("Minefield/")[1])||void 0),document.all&&!k("opera")&&(h=parseFloat(l.split("MSIE ")[1])||void 0,(l=document.documentMode)&&(5!=l&&Math.floor(h)!=l)&&(h=l),k.add("ie",h)),k.add("wii","undefined"!=typeof opera&&opera.wiiremote));return k})},"dojo/on":function(){define(["./has!dom-addeventlistener?:./aspect","./_base/kernel","./sniff"],function(k,l,h){function g(a,d,e,m,f){if(m=d.match(/(.*):(.*)/))return d=m[2],m=m[1],c.selector(m,d).call(f,a,e);h("touch")&&
(b.test(d)&&(e=z(e)),!h("event-orientationchange")&&"orientationchange"==d&&(d="resize",a=window,e=z(e)));s&&(e=s(e));if(a.addEventListener){var q=d in n,r=q?n[d]:d;a.addEventListener(r,e,q);return{remove:function(){a.removeEventListener(r,e,q)}}}if(u&&a.attachEvent)return u(a,"on"+d,e);throw Error("Target must be an event emitter");}function f(){this.cancelable=!1;this.defaultPrevented=!0}function d(){this.bubbles=!1}var e=window.ScriptEngineMajorVersion;h.add("jscript",e&&e()+ScriptEngineMinorVersion()/
10);h.add("event-orientationchange",h("touch")&&!h("android"));h.add("event-stopimmediatepropagation",window.Event&&!!window.Event.prototype&&!!window.Event.prototype.stopImmediatePropagation);h.add("event-focusin",function(a,b,c){return"onfocusin"in c});h("touch")&&h.add("touch-can-modify-event-delegate",function(){var a=function(){};a.prototype=document.createEvent("MouseEvents");try{var b=new a;b.target=null;return null===b.target}catch(c){return!1}});var c=function(a,b,d,e){return"function"==
typeof a.on&&"function"!=typeof b&&!a.nodeType?a.on(b,d):c.parse(a,b,d,g,e,this)};c.pausable=function(a,b,d,e){var m;a=c(a,b,function(){if(!m)return d.apply(this,arguments)},e);a.pause=function(){m=!0};a.resume=function(){m=!1};return a};c.once=function(a,b,d,e){var m=c(a,b,function(){m.remove();return d.apply(this,arguments)});return m};c.parse=function(a,b,c,d,e,m){if(b.call)return b.call(m,a,c);if(-1<b.indexOf(",")){b=b.split(/\s*,\s*/);for(var f=[],n=0,q;q=b[n++];)f.push(d(a,q,c,e,m));f.remove=
function(){for(var a=0;a<f.length;a++)f[a].remove()};return f}return d(a,b,c,e,m)};var b=/^touch/;c.selector=function(a,b,d){return function(e,m){function f(b){for(n=n&&n.matches?n:l.query;!n.matches(b,a,e);)if(b==e||!1===d||!(b=b.parentNode)||1!=b.nodeType)return;return b}var n="function"==typeof a?{matches:a}:this,q=b.bubble;return q?c(e,q(f),m):c(e,b,function(a){var b=f(a.target);if(b)return m.call(b,a)})}};var a=[].slice,m=c.emit=function(b,c,e){var m=a.call(arguments,2),n="on"+c;if("parentNode"in
b){var q=m[0]={},s;for(s in e)q[s]=e[s];q.preventDefault=f;q.stopPropagation=d;q.target=b;q.type=c;e=q}do b[n]&&b[n].apply(b,m);while(e&&e.bubbles&&(b=b.parentNode));return e&&e.cancelable&&e},n=h("event-focusin")?{}:{focusin:"focus",focusout:"blur"};if(!h("event-stopimmediatepropagation"))var q=function(){this.modified=this.immediatelyStopped=!0},s=function(a){return function(b){if(!b.immediatelyStopped)return b.stopImmediatePropagation=q,a.apply(this,arguments)}};if(h("dom-addeventlistener"))c.emit=
function(a,b,d){if(a.dispatchEvent&&document.createEvent){var e=(a.ownerDocument||document).createEvent("HTMLEvents");e.initEvent(b,!!d.bubbles,!!d.cancelable);for(var f in d)f in e||(e[f]=d[f]);return a.dispatchEvent(e)&&e}return m.apply(c,arguments)};else{c._fixEvent=function(a,b){a||(a=(b&&(b.ownerDocument||b.document||b).parentWindow||window).event);if(!a)return a;try{r&&(a.type==r.type&&a.srcElement==r.target)&&(a=r)}catch(c){}if(!a.target)switch(a.target=a.srcElement,a.currentTarget=b||a.srcElement,
"mouseover"==a.type&&(a.relatedTarget=a.fromElement),"mouseout"==a.type&&(a.relatedTarget=a.toElement),a.stopPropagation||(a.stopPropagation=v,a.preventDefault=x),a.type){case "keypress":var d="charCode"in a?a.charCode:a.keyCode;10==d?(d=0,a.keyCode=13):13==d||27==d?d=0:3==d&&(d=99);a.charCode=d;d=a;d.keyChar=d.charCode?String.fromCharCode(d.charCode):"";d.charOrCode=d.keyChar||d.keyCode}return a};var r,p=function(a){this.handle=a};p.prototype.remove=function(){delete _dojoIEListeners_[this.handle]};
var t=function(a){return function(b){b=c._fixEvent(b,this);var d=a.call(this,b);b.modified&&(r||setTimeout(function(){r=null}),r=b);return d}},u=function(a,b,c){c=t(c);if(((a.ownerDocument?a.ownerDocument.parentWindow:a.parentWindow||a.window||window)!=top||5.8>h("jscript"))&&!h("config-_allow_leaks")){"undefined"==typeof _dojoIEListeners_&&(_dojoIEListeners_=[]);var d=a[b];if(!d||!d.listeners){var e=d,d=Function("event","var callee \x3d arguments.callee; for(var i \x3d 0; i\x3ccallee.listeners.length; i++){var listener \x3d _dojoIEListeners_[callee.listeners[i]]; if(listener){listener.call(this,event);}}");
d.listeners=[];a[b]=d;d.global=this;e&&d.listeners.push(_dojoIEListeners_.push(e)-1)}d.listeners.push(a=d.global._dojoIEListeners_.push(c)-1);return new p(a)}return k.after(a,b,c,!0)},v=function(){this.cancelBubble=!0},x=c._preventDefault=function(){this.bubbledKeyCode=this.keyCode;if(this.ctrlKey)try{this.keyCode=0}catch(a){}this.defaultPrevented=!0;this.returnValue=!1;this.modified=!0}}if(h("touch"))var w=function(){},y=window.orientation,z=function(a){return function(b){var c=b.corrected;if(!c){var d=
b.type;try{delete b.type}catch(e){}if(b.type){if(h("touch-can-modify-event-delegate"))w.prototype=b,c=new w;else{var c={},m;for(m in b)c[m]=b[m]}c.preventDefault=function(){b.preventDefault()};c.stopPropagation=function(){b.stopPropagation()}}else c=b,c.type=d;b.corrected=c;if("resize"==d){if(y==window.orientation)return null;y=window.orientation;c.type="orientationchange";return a.call(this,c)}"rotation"in c||(c.rotation=0,c.scale=1);var d=c.changedTouches[0],f;for(f in d)delete c[f],c[f]=d[f]}return a.call(this,
c)}};return c})},"dojo/html":function(){define("./_base/kernel ./_base/lang ./_base/array ./_base/declare ./dom ./dom-construct ./parser".split(" "),function(k,l,h,g,f,d,e){var c=0,b={_secureForInnerHtml:function(a){return a.replace(/(?:\s*<!DOCTYPE\s[^>]+>|<title[^>]*>[\s\S]*?<\/title>)/ig,"")},_emptyNode:d.empty,_setNodeContent:function(a,b){d.empty(a);if(b)if("string"==typeof b&&(b=d.toDom(b,a.ownerDocument)),!b.nodeType&&l.isArrayLike(b))for(var c=b.length,e=0;e<b.length;e=c==b.length?e+1:0)d.place(b[e],
a,"last");else d.place(b,a,"last");return a},_ContentSetter:g("dojo.html._ContentSetter",null,{node:"",content:"",id:"",cleanContent:!1,extractContent:!1,parseContent:!1,parserScope:k._scopeName,startup:!0,constructor:function(a,b){l.mixin(this,a||{});b=this.node=f.byId(this.node||b);this.id||(this.id=["Setter",b?b.id||b.tagName:"",c++].join("_"))},set:function(a,b){void 0!==a&&(this.content=a);b&&this._mixin(b);this.onBegin();this.setContent();var c=this.onEnd();return c&&c.then?c:this.node},setContent:function(){var a=
this.node;if(!a)throw Error(this.declaredClass+": setContent given no node");try{a=b._setNodeContent(a,this.content)}catch(c){var d=this.onContentError(c);try{a.innerHTML=d}catch(e){console.error("Fatal "+this.declaredClass+".setContent could not change content due to "+e.message,e)}}this.node=a},empty:function(){this.parseDeferred&&(this.parseDeferred.isResolved()||this.parseDeferred.cancel(),delete this.parseDeferred);this.parseResults&&this.parseResults.length&&(h.forEach(this.parseResults,function(a){a.destroy&&
a.destroy()}),delete this.parseResults);d.empty(this.node)},onBegin:function(){var a=this.content;if(l.isString(a)&&(this.cleanContent&&(a=b._secureForInnerHtml(a)),this.extractContent)){var c=a.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);c&&(a=c[1])}this.empty();this.content=a;return this.node},onEnd:function(){this.parseContent&&this._parse();return this.node},tearDown:function(){delete this.parseResults;delete this.parseDeferred;delete this.node;delete this.content},onContentError:function(a){return"Error occurred setting content: "+
a},onExecError:function(a){return"Error occurred executing scripts: "+a},_mixin:function(a){var b={},c;for(c in a)c in b||(this[c]=a[c])},_parse:function(){var a=this.node;try{var b={};h.forEach(["dir","lang","textDir"],function(a){this[a]&&(b[a]=this[a])},this);var c=this;this.parseDeferred=e.parse({rootNode:a,noStart:!this.startup,inherited:b,scope:this.parserScope}).then(function(a){return c.parseResults=a},function(a){c._onError("Content",a,"Error parsing in _ContentSetter#"+this.id)})}catch(d){this._onError("Content",
d,"Error parsing in _ContentSetter#"+this.id)}},_onError:function(a,c,d){a=this["on"+a+"Error"].call(this,c);d?console.error(d,c):a&&b._setNodeContent(this.node,a,!0)}}),set:function(a,c,d){void 0==c&&(console.warn("dojo.html.set: no cont argument provided, using empty string"),c="");return d?(new b._ContentSetter(l.mixin(d,{content:c,node:a}))).set():b._setNodeContent(a,c,!0)}};l.setObject("dojo.html",b);return b})},"dojo/_base/array":function(){define(["./kernel","../has","./lang"],function(k,l,
h){function g(a){return e[a]=new Function("item","index","array",a)}function f(a){var b=!a;return function(c,d,f){var r=0,p=c&&c.length||0,h;p&&"string"==typeof c&&(c=c.split(""));"string"==typeof d&&(d=e[d]||g(d));if(f)for(;r<p;++r){if(h=!d.call(f,c[r],r,c),a^h)return!h}else for(;r<p;++r)if(h=!d(c[r],r,c),a^h)return!h;return b}}function d(a){var d=1,e=0,f=0;a||(d=e=f=-1);return function(s,r,p,g){if(g&&0<d)return b.lastIndexOf(s,r,p);g=s&&s.length||0;var h=a?g+f:e;p===c?p=a?e:g+f:0>p?(p=g+p,0>p&&
(p=e)):p=p>=g?g+f:p;for(g&&"string"==typeof s&&(s=s.split(""));p!=h;p+=d)if(s[p]==r)return p;return-1}}var e={},c,b={every:f(!1),some:f(!0),indexOf:d(!0),lastIndexOf:d(!1),forEach:function(a,b,c){var d=0,f=a&&a.length||0;f&&"string"==typeof a&&(a=a.split(""));"string"==typeof b&&(b=e[b]||g(b));if(c)for(;d<f;++d)b.call(c,a[d],d,a);else for(;d<f;++d)b(a[d],d,a)},map:function(a,b,c,d){var f=0,r=a&&a.length||0;d=new (d||Array)(r);r&&"string"==typeof a&&(a=a.split(""));"string"==typeof b&&(b=e[b]||g(b));
if(c)for(;f<r;++f)d[f]=b.call(c,a[f],f,a);else for(;f<r;++f)d[f]=b(a[f],f,a);return d},filter:function(a,b,c){var d=0,f=a&&a.length||0,r=[],p;f&&"string"==typeof a&&(a=a.split(""));"string"==typeof b&&(b=e[b]||g(b));if(c)for(;d<f;++d)p=a[d],b.call(c,p,d,a)&&r.push(p);else for(;d<f;++d)p=a[d],b(p,d,a)&&r.push(p);return r},clearCache:function(){e={}}};h.mixin(k,b);return b})},"dojo/dom":function(){define(["./sniff","./_base/window"],function(k,l){if(7>=k("ie"))try{document.execCommand("BackgroundImageCache",
!1,!0)}catch(h){}var g={};k("ie")?g.byId=function(d,e){if("string"!=typeof d)return d;var c=e||l.doc,b=d&&c.getElementById(d);if(b&&(b.attributes.id.value==d||b.id==d))return b;c=c.all[d];if(!c||c.nodeName)c=[c];for(var a=0;b=c[a++];)if(b.attributes&&b.attributes.id&&b.attributes.id.value==d||b.id==d)return b}:g.byId=function(d,e){return("string"==typeof d?(e||l.doc).getElementById(d):d)||null};g.isDescendant=function(d,e){try{d=g.byId(d);for(e=g.byId(e);d;){if(d==e)return!0;d=d.parentNode}}catch(c){}return!1};
k.add("css-user-select",function(d,e,c){if(!c)return!1;d=c.style;e=["Khtml","O","Moz","Webkit"];c=e.length;var b="userSelect";do if("undefined"!==typeof d[b])return b;while(c--&&(b=e[c]+"UserSelect"));return!1});var f=k("css-user-select");g.setSelectable=f?function(d,e){g.byId(d).style[f]=e?"":"none"}:function(d,e){d=g.byId(d);var c=d.getElementsByTagName("*"),b=c.length;if(e)for(d.removeAttribute("unselectable");b--;)c[b].removeAttribute("unselectable");else for(d.setAttribute("unselectable","on");b--;)c[b].setAttribute("unselectable",
"on")};return g})},"dojo/_base/window":function(){define(["./kernel","./lang","../sniff"],function(k,l,h){var g={global:k.global,doc:k.global.document||null,body:function(f){f=f||k.doc;return f.body||f.getElementsByTagName("body")[0]},setContext:function(f,d){k.global=g.global=f;k.doc=g.doc=d},withGlobal:function(f,d,e,c){var b=k.global;try{return k.global=g.global=f,g.withDoc.call(null,f.document,d,e,c)}finally{k.global=g.global=b}},withDoc:function(f,d,e,c){var b=g.doc,a=h("quirks"),m=h("ie"),n,
q,s;try{k.doc=g.doc=f;k.isQuirks=h.add("quirks","BackCompat"==k.doc.compatMode,!0,!0);if(h("ie")&&(s=f.parentWindow)&&s.navigator)n=parseFloat(s.navigator.appVersion.split("MSIE ")[1])||void 0,(q=f.documentMode)&&(5!=q&&Math.floor(n)!=q)&&(n=q),k.isIE=h.add("ie",n,!0,!0);e&&"string"==typeof d&&(d=e[d]);return d.apply(e,c||[])}finally{k.doc=g.doc=b,k.isQuirks=h.add("quirks",a,!0,!0),k.isIE=h.add("ie",m,!0,!0)}}};l.mixin(k,g);return g})},"dojo/dom-construct":function(){define("exports ./_base/kernel ./sniff ./_base/window ./dom ./dom-attr".split(" "),
function(k,l,h,g,f,d){function e(a,b){var c=b.parentNode;c&&c.insertBefore(a,b)}function c(a){if(a.canHaveChildren)try{a.innerHTML="";return}catch(c){}for(var d;d=a.lastChild;)b(d,a)}function b(a,b){a.firstChild&&c(a);b&&(h("ie")&&b.canHaveChildren&&"removeNode"in a?a.removeNode(!1):b.removeChild(a))}var a={option:["select"],tbody:["table"],thead:["table"],tfoot:["table"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","thead","tr"],legend:["fieldset"],caption:["table"],colgroup:["table"],
col:["table","colgroup"],li:["ul"]},m=/<\s*([\w\:]+)/,n={},q=0,s="__"+l._scopeName+"ToDomId",r;for(r in a)a.hasOwnProperty(r)&&(l=a[r],l.pre="option"==r?'\x3cselect multiple\x3d"multiple"\x3e':"\x3c"+l.join("\x3e\x3c")+"\x3e",l.post="\x3c/"+l.reverse().join("\x3e\x3c/")+"\x3e");var p;8>=h("ie")&&(p=function(a){a.__dojo_html5_tested="yes";var b=t("div",{innerHTML:"\x3cnav\x3ea\x3c/nav\x3e",style:{visibility:"hidden"}},a.body);1!==b.childNodes.length&&"abbr article aside audio canvas details figcaption figure footer header hgroup mark meter nav output progress section summary time video".replace(/\b\w+\b/g,
function(b){a.createElement(b)});u(b)});k.toDom=function(b,c){c=c||g.doc;var d=c[s];d||(c[s]=d=++q+"",n[d]=c.createElement("div"));8>=h("ie")&&!c.__dojo_html5_tested&&c.body&&p(c);b+="";var e=b.match(m),f=e?e[1].toLowerCase():"",d=n[d];if(e&&a[f]){e=a[f];d.innerHTML=e.pre+b+e.post;for(e=e.length;e;--e)d=d.firstChild}else d.innerHTML=b;if(1==d.childNodes.length)return d.removeChild(d.firstChild);for(f=c.createDocumentFragment();e=d.firstChild;)f.appendChild(e);return f};k.place=function(a,b,c){b=f.byId(b);
"string"==typeof a&&(a=/^\s*</.test(a)?k.toDom(a,b.ownerDocument):f.byId(a));if("number"==typeof c){var d=b.childNodes;!d.length||d.length<=c?b.appendChild(a):e(a,d[0>c?0:c])}else switch(c){case "before":e(a,b);break;case "after":c=a;(d=b.parentNode)&&(d.lastChild==b?d.appendChild(c):d.insertBefore(c,b.nextSibling));break;case "replace":b.parentNode.replaceChild(a,b);break;case "only":k.empty(b);b.appendChild(a);break;case "first":if(b.firstChild){e(a,b.firstChild);break}default:b.appendChild(a)}return a};
var t=k.create=function(a,b,c,e){var m=g.doc;c&&(c=f.byId(c),m=c.ownerDocument);"string"==typeof a&&(a=m.createElement(a));b&&d.set(a,b);c&&k.place(a,c,e);return a};k.empty=function(a){c(f.byId(a))};var u=k.destroy=function(a){(a=f.byId(a))&&b(a,a.parentNode)}})},"dojo/dom-attr":function(){define("exports ./sniff ./_base/lang ./dom ./dom-style ./dom-prop".split(" "),function(k,l,h,g,f,d){function e(a,b){var c=a.getAttributeNode&&a.getAttributeNode(b);return!!c&&c.specified}var c={innerHTML:1,className:1,
htmlFor:l("ie"),value:1},b={classname:"class",htmlfor:"for",tabindex:"tabIndex",readonly:"readOnly"};k.has=function(a,f){var n=f.toLowerCase();return c[d.names[n]||f]||e(g.byId(a),b[n]||f)};k.get=function(a,f){a=g.byId(a);var n=f.toLowerCase(),q=d.names[n]||f,s=a[q];if(c[q]&&"undefined"!=typeof s||"href"!=q&&("boolean"==typeof s||h.isFunction(s)))return s;n=b[n]||f;return e(a,n)?a.getAttribute(n):null};k.set=function(a,e,n){a=g.byId(a);if(2==arguments.length){for(var q in e)k.set(a,q,e[q]);return a}q=
e.toLowerCase();var s=d.names[q]||e,r=c[s];if("style"==s&&"string"!=typeof n)return f.set(a,n),a;if(r||"boolean"==typeof n||h.isFunction(n))return d.set(a,e,n);a.setAttribute(b[q]||e,n);return a};k.remove=function(a,c){g.byId(a).removeAttribute(b[c.toLowerCase()]||c)};k.getNodeProp=function(a,c){a=g.byId(a);var f=c.toLowerCase(),q=d.names[f]||c;if(q in a&&"href"!=q)return a[q];f=b[f]||c;return e(a,f)?a.getAttribute(f):null}})},"dojo/dom-style":function(){define(["./sniff","./dom"],function(k,l){function h(b,
c,e){c=c.toLowerCase();if("auto"==e){if("height"==c)return b.offsetHeight;if("width"==c)return b.offsetWidth}if("fontweight"==c)switch(e){case 700:return"bold";default:return"normal"}c in a||(a[c]=m.test(c));return a[c]?d(b,e):e}var g,f={};g=k("webkit")?function(a){var b;if(1==a.nodeType){var c=a.ownerDocument.defaultView;b=c.getComputedStyle(a,null);!b&&a.style&&(a.style.display="",b=c.getComputedStyle(a,null))}return b||{}}:k("ie")&&(9>k("ie")||k("quirks"))?function(a){return 1==a.nodeType&&a.currentStyle?
a.currentStyle:{}}:function(a){return 1==a.nodeType?a.ownerDocument.defaultView.getComputedStyle(a,null):{}};f.getComputedStyle=g;var d;d=k("ie")?function(a,b){if(!b)return 0;if("medium"==b)return 4;if(b.slice&&"px"==b.slice(-2))return parseFloat(b);var c=a.style,d=a.runtimeStyle,e=c.left,f=d.left;d.left=a.currentStyle.left;try{c.left=b,b=c.pixelLeft}catch(m){b=0}c.left=e;d.left=f;return b}:function(a,b){return parseFloat(b)||0};f.toPixelValue=d;var e=function(a,b){try{return a.filters.item("DXImageTransform.Microsoft.Alpha")}catch(c){return b?
{}:null}},c=9>k("ie")||10>k("ie")&&k("quirks")?function(a){try{return e(a).Opacity/100}catch(b){return 1}}:function(a){return g(a).opacity},b=9>k("ie")||10>k("ie")&&k("quirks")?function(a,c){""===c&&(c=1);var d=100*c;1===c?(a.style.zoom="",e(a)&&(a.style.filter=a.style.filter.replace(/\s*progid:DXImageTransform.Microsoft.Alpha\([^\)]+?\)/i,""))):(a.style.zoom=1,e(a)?e(a,1).Opacity=d:a.style.filter+=" progid:DXImageTransform.Microsoft.Alpha(Opacity\x3d"+d+")",e(a,1).Enabled=!0);if("tr"==a.tagName.toLowerCase())for(d=
a.firstChild;d;d=d.nextSibling)"td"==d.tagName.toLowerCase()&&b(d,c);return c}:function(a,b){return a.style.opacity=b},a={left:!0,top:!0},m=/margin|padding|width|height|max|min|offset/,n={cssFloat:1,styleFloat:1,"float":1};f.get=function(a,b){var d=l.byId(a),e=arguments.length;if(2==e&&"opacity"==b)return c(d);b=n[b]?"cssFloat"in d.style?"cssFloat":"styleFloat":b;var m=f.getComputedStyle(d);return 1==e?m:h(d,b,m[b]||d.style[b])};f.set=function(a,c,d){var e=l.byId(a),m=arguments.length,g="opacity"==
c;c=n[c]?"cssFloat"in e.style?"cssFloat":"styleFloat":c;if(3==m)return g?b(e,d):e.style[c]=d;for(var h in c)f.set(a,h,c[h]);return f.getComputedStyle(e)};return f})},"dojo/dom-prop":function(){define("exports ./_base/kernel ./sniff ./_base/lang ./dom ./dom-style ./dom-construct ./_base/connect".split(" "),function(k,l,h,g,f,d,e,c){var b={},a=0,m=l._scopeName+"attrid";k.names={"class":"className","for":"htmlFor",tabindex:"tabIndex",readonly:"readOnly",colspan:"colSpan",frameborder:"frameBorder",rowspan:"rowSpan",
valuetype:"valueType"};k.get=function(a,b){a=f.byId(a);var c=b.toLowerCase();return a[k.names[c]||b]};k.set=function(n,q,s){n=f.byId(n);if(2==arguments.length&&"string"!=typeof q){for(var r in q)k.set(n,r,q[r]);return n}r=q.toLowerCase();r=k.names[r]||q;if("style"==r&&"string"!=typeof s)return d.set(n,s),n;if("innerHTML"==r)return h("ie")&&n.tagName.toLowerCase()in{col:1,colgroup:1,table:1,tbody:1,tfoot:1,thead:1,tr:1,title:1}?(e.empty(n),n.appendChild(e.toDom(s,n.ownerDocument))):n[r]=s,n;if(g.isFunction(s)){var p=
n[m];p||(p=a++,n[m]=p);b[p]||(b[p]={});var t=b[p][r];if(t)c.disconnect(t);else try{delete n[r]}catch(l){}s?b[p][r]=c.connect(n,r,s):n[r]=null;return n}n[r]=s;return n}})},"dojo/_base/connect":function(){define("./kernel ../on ../topic ../aspect ./event ../mouse ./sniff ./lang ../keys".split(" "),function(k,l,h,g,f,d,e,c){function b(a,b,e,f,m){f=c.hitch(e,f);if(!a||!a.addEventListener&&!a.attachEvent)return g.after(a||k.global,b,f,!0);"string"==typeof b&&"on"==b.substring(0,2)&&(b=b.substring(2));
a||(a=k.global);if(!m)switch(b){case "keypress":b=s;break;case "mouseenter":b=d.enter;break;case "mouseleave":b=d.leave}return l(a,b,f,m)}function a(a){a.keyChar=a.charCode?String.fromCharCode(a.charCode):"";a.charOrCode=a.keyChar||a.keyCode}e.add("events-keypress-typed",function(){var a={charCode:0};try{a=document.createEvent("KeyboardEvent"),(a.initKeyboardEvent||a.initKeyEvent).call(a,"keypress",!0,!0,null,!1,!1,!1,!1,9,3)}catch(b){}return 0==a.charCode&&!e("opera")});var m={106:42,111:47,186:59,
187:43,188:44,189:45,190:46,191:47,192:96,219:91,220:92,221:93,222:39,229:113},n=e("mac")?"metaKey":"ctrlKey",q=function(b,d){var e=c.mixin({},b,d);a(e);e.preventDefault=function(){b.preventDefault()};e.stopPropagation=function(){b.stopPropagation()};return e},s;s=e("events-keypress-typed")?function(a,b){var c=l(a,"keydown",function(a){var c=a.keyCode,d=13!=c&&32!=c&&(27!=c||!e("ie"))&&(48>c||90<c)&&(96>c||111<c)&&(186>c||192<c)&&(219>c||222<c)&&229!=c;if(d||a.ctrlKey){d=d?0:c;if(a.ctrlKey){if(3==
c||13==c)return b.call(a.currentTarget,a);d=95<d&&106>d?d-48:!a.shiftKey&&65<=d&&90>=d?d+32:m[d]||d}c=q(a,{type:"keypress",faux:!0,charCode:d});b.call(a.currentTarget,c);if(e("ie"))try{a.keyCode=c.keyCode}catch(f){}}}),d=l(a,"keypress",function(a){var c=a.charCode;a=q(a,{charCode:32<=c?c:0,faux:!0});return b.call(this,a)});return{remove:function(){c.remove();d.remove()}}}:e("opera")?function(a,b){return l(a,"keypress",function(a){var c=a.which;3==c&&(c=99);c=32>c&&!a.shiftKey?0:c;a.ctrlKey&&(!a.shiftKey&&
65<=c&&90>=c)&&(c+=32);return b.call(this,q(a,{charCode:c}))})}:function(b,c){return l(b,"keypress",function(b){a(b);return c.call(this,b)})};var r={_keypress:s,connect:function(a,c,d,e,f){var m=arguments,n=[],q=0;n.push("string"==typeof m[0]?null:m[q++],m[q++]);var s=m[q+1];n.push("string"==typeof s||"function"==typeof s?m[q++]:null,m[q++]);for(s=m.length;q<s;q++)n.push(m[q]);return b.apply(this,n)},disconnect:function(a){a&&a.remove()},subscribe:function(a,b,d){return h.subscribe(a,c.hitch(b,d))},
publish:function(a,b){return h.publish.apply(h,[a].concat(b))},connectPublisher:function(a,b,c){var d=function(){r.publish(a,arguments)};return c?r.connect(b,c,d):r.connect(b,d)},isCopyKey:function(a){return a[n]}};r.unsubscribe=r.disconnect;c.mixin(k,r);return r})},"dojo/topic":function(){define(["./Evented"],function(k){var l=new k;return{publish:function(h,g){return l.emit.apply(l,arguments)},subscribe:function(h,g){return l.on.apply(l,arguments)}}})},"dojo/Evented":function(){define(["./aspect",
"./on"],function(k,l){function h(){}var g=k.after;h.prototype={on:function(f,d){return l.parse(this,f,d,function(e,c){return g(e,"on"+c,d,!0)})},emit:function(f,d){var e=[this];e.push.apply(e,arguments);return l.emit.apply(l,e)}};return h})},"dojo/aspect":function(){define([],function(){function k(d,c,b,a){var f=d[c],n="around"==c,q;if(n){var s=b(function(){return f.advice(this,arguments)});q={remove:function(){s&&(s=d=b=null)},advice:function(a,b){return s?s.apply(a,b):f.advice(a,b)}}}else q={remove:function(){if(q.advice){var a=
q.previous,f=q.next;!f&&!a?delete d[c]:(a?a.next=f:d[c]=f,f&&(f.previous=a));d=b=q.advice=null}},id:d.nextId++,advice:b,receiveArguments:a};if(f&&!n)if("after"==c){for(;f.next&&(f=f.next););f.next=q;q.previous=f}else"before"==c&&(d[c]=q,q.next=f,f.previous=q);else d[c]=q;return q}function l(d){return function(c,b,a,f){var n=c[b],q;if(!n||n.target!=c)c[b]=q=function(){for(var a=q.nextId,b=arguments,c=q.before;c;)c.advice&&(b=c.advice.apply(this,b)||b),c=c.next;if(q.around)var d=q.around.advice(this,
b);for(c=q.after;c&&c.id<a;){if(c.advice)if(c.receiveArguments)var e=c.advice.apply(this,b),d=e===h?d:e;else d=c.advice.call(this,d,b);c=c.next}return d},n&&(q.around={advice:function(a,b){return n.apply(a,b)}}),q.target=c,q.nextId=q.nextId||0;c=k(q||n,d,a,f);a=null;return c}}var h,g=l("after"),f=l("before"),d=l("around");return{before:f,around:d,after:g}})},"dojo/_base/event":function(){define(["./kernel","../on","../has","../dom-geometry"],function(k,l,h,g){if(l._fixEvent){var f=l._fixEvent;l._fixEvent=
function(d,c){(d=f(d,c))&&g.normalizeEvent(d);return d}}var d={fix:function(d,c){return l._fixEvent?l._fixEvent(d,c):d},stop:function(d){h("dom-addeventlistener")||d&&d.preventDefault?(d.preventDefault(),d.stopPropagation()):(d=d||window.event,d.cancelBubble=!0,l._preventDefault.call(d))}};k.fixEvent=d.fix;k.stopEvent=d.stop;return d})},"dojo/dom-geometry":function(){define(["./sniff","./_base/window","./dom","./dom-style"],function(k,l,h,g){function f(a,b,c,d,e,f){f=f||"px";a=a.style;isNaN(b)||(a.left=
b+f);isNaN(c)||(a.top=c+f);0<=d&&(a.width=d+f);0<=e&&(a.height=e+f)}function d(a){return"button"==a.tagName.toLowerCase()||"input"==a.tagName.toLowerCase()&&"button"==(a.getAttribute("type")||"").toLowerCase()}function e(a){return"border-box"==c.boxModel||"table"==a.tagName.toLowerCase()||d(a)}var c={boxModel:"content-box"};k("ie")&&(c.boxModel="BackCompat"==document.compatMode?"border-box":"content-box");c.getPadExtents=function(a,b){a=h.byId(a);var c=b||g.getComputedStyle(a),d=g.toPixelValue,e=
d(a,c.paddingLeft),f=d(a,c.paddingTop),p=d(a,c.paddingRight),c=d(a,c.paddingBottom);return{l:e,t:f,r:p,b:c,w:e+p,h:f+c}};c.getBorderExtents=function(a,b){a=h.byId(a);var c=g.toPixelValue,d=b||g.getComputedStyle(a),e="none"!=d.borderLeftStyle?c(a,d.borderLeftWidth):0,f="none"!=d.borderTopStyle?c(a,d.borderTopWidth):0,p="none"!=d.borderRightStyle?c(a,d.borderRightWidth):0,c="none"!=d.borderBottomStyle?c(a,d.borderBottomWidth):0;return{l:e,t:f,r:p,b:c,w:e+p,h:f+c}};c.getPadBorderExtents=function(a,b){a=
h.byId(a);var d=b||g.getComputedStyle(a),e=c.getPadExtents(a,d),d=c.getBorderExtents(a,d);return{l:e.l+d.l,t:e.t+d.t,r:e.r+d.r,b:e.b+d.b,w:e.w+d.w,h:e.h+d.h}};c.getMarginExtents=function(a,b){a=h.byId(a);var c=b||g.getComputedStyle(a),d=g.toPixelValue,e=d(a,c.marginLeft),f=d(a,c.marginTop),p=d(a,c.marginRight),c=d(a,c.marginBottom);return{l:e,t:f,r:p,b:c,w:e+p,h:f+c}};c.getMarginBox=function(a,b){a=h.byId(a);var d=b||g.getComputedStyle(a),e=c.getMarginExtents(a,d),f=a.offsetLeft-e.l,r=a.offsetTop-
e.t,p=a.parentNode,t=g.toPixelValue;if(k("mozilla")){var l=parseFloat(d.left),d=parseFloat(d.top);!isNaN(l)&&!isNaN(d)?(f=l,r=d):p&&p.style&&(p=g.getComputedStyle(p),"visible"!=p.overflow&&(f+="none"!=p.borderLeftStyle?t(a,p.borderLeftWidth):0,r+="none"!=p.borderTopStyle?t(a,p.borderTopWidth):0))}else if((k("opera")||8==k("ie")&&!k("quirks"))&&p)p=g.getComputedStyle(p),f-="none"!=p.borderLeftStyle?t(a,p.borderLeftWidth):0,r-="none"!=p.borderTopStyle?t(a,p.borderTopWidth):0;return{l:f,t:r,w:a.offsetWidth+
e.w,h:a.offsetHeight+e.h}};c.getContentBox=function(a,b){a=h.byId(a);var d=b||g.getComputedStyle(a),e=a.clientWidth,f=c.getPadExtents(a,d),r=c.getBorderExtents(a,d);e?(d=a.clientHeight,r.w=r.h=0):(e=a.offsetWidth,d=a.offsetHeight);k("opera")&&(f.l+=r.l,f.t+=r.t);return{l:f.l,t:f.t,w:e-f.w-r.w,h:d-f.h-r.h}};c.setContentSize=function(a,b,d){a=h.byId(a);var q=b.w;b=b.h;e(a)&&(d=c.getPadBorderExtents(a,d),0<=q&&(q+=d.w),0<=b&&(b+=d.h));f(a,NaN,NaN,q,b)};var b={l:0,t:0,w:0,h:0};c.setMarginBox=function(a,
m,n){a=h.byId(a);var q=n||g.getComputedStyle(a);n=m.w;var s=m.h,r=e(a)?b:c.getPadBorderExtents(a,q),q=c.getMarginExtents(a,q);if(k("webkit")&&d(a)){var p=a.style;0<=n&&!p.width&&(p.width="4px");0<=s&&!p.height&&(p.height="4px")}0<=n&&(n=Math.max(n-r.w-q.w,0));0<=s&&(s=Math.max(s-r.h-q.h,0));f(a,m.l,m.t,n,s)};c.isBodyLtr=function(a){a=a||l.doc;return"ltr"==(l.body(a).dir||a.documentElement.dir||"ltr").toLowerCase()};c.docScroll=function(a){a=a||l.doc;var b=l.doc.parentWindow||l.doc.defaultView;return"pageXOffset"in
b?{x:b.pageXOffset,y:b.pageYOffset}:(b=k("quirks")?l.body(a):a.documentElement)&&{x:c.fixIeBiDiScrollLeft(b.scrollLeft||0,a),y:b.scrollTop||0}};c.getIeDocumentElementOffset=function(a){a=a||l.doc;a=a.documentElement;if(8>k("ie")){var b=a.getBoundingClientRect(),c=b.left,b=b.top;7>k("ie")&&(c+=a.clientLeft,b+=a.clientTop);return{x:0>c?0:c,y:0>b?0:b}}return{x:0,y:0}};c.fixIeBiDiScrollLeft=function(a,b){b=b||l.doc;var d=k("ie");if(d&&!c.isBodyLtr(b)){var e=k("quirks"),f=e?l.body(b):b.documentElement,
r=l.global;6==d&&(!e&&r.frameElement&&f.scrollHeight>f.clientHeight)&&(a+=f.clientLeft);return 8>d||e?a+f.clientWidth-f.scrollWidth:-a}return a};c.position=function(a,b){a=h.byId(a);var d=l.body(a.ownerDocument),e=a.getBoundingClientRect(),e={x:e.left,y:e.top,w:e.right-e.left,h:e.bottom-e.top};if(9>k("ie")){var f=c.getIeDocumentElementOffset(a.ownerDocument);e.x-=f.x+(k("quirks")?d.clientLeft+d.offsetLeft:0);e.y-=f.y+(k("quirks")?d.clientTop+d.offsetTop:0)}b&&(d=c.docScroll(a.ownerDocument),e.x+=
d.x,e.y+=d.y);return e};c.getMarginSize=function(a,b){a=h.byId(a);var d=c.getMarginExtents(a,b||g.getComputedStyle(a)),e=a.getBoundingClientRect();return{w:e.right-e.left+d.w,h:e.bottom-e.top+d.h}};c.normalizeEvent=function(a){"layerX"in a||(a.layerX=a.offsetX,a.layerY=a.offsetY);if(!k("dom-addeventlistener")){var b=a.target,b=b&&b.ownerDocument||document,d=k("quirks")?b.body:b.documentElement,e=c.getIeDocumentElementOffset(b);a.pageX=a.clientX+c.fixIeBiDiScrollLeft(d.scrollLeft||0,b)-e.x;a.pageY=
a.clientY+(d.scrollTop||0)-e.y}};return c})},"dojo/mouse":function(){define(["./_base/kernel","./on","./has","./dom","./_base/window"],function(k,l,h,g,f){function d(e,c){var b=function(a,b){return l(a,e,function(d){if(c)return c(d,b);if(!g.isDescendant(d.relatedTarget,a))return b.call(this,d)})};b.bubble=function(a){return d(e,function(b,c){var d=a(b.target),e=b.relatedTarget;if(d&&d!=(e&&1==e.nodeType&&a(e)))return c.call(d,b)})};return b}h.add("dom-quirks",f.doc&&"BackCompat"==f.doc.compatMode);
h.add("events-mouseenter",f.doc&&"onmouseenter"in f.doc.createElement("div"));h.add("events-mousewheel",f.doc&&"onmousewheel"in f.doc);f=h("dom-quirks")&&h("ie")||!h("dom-addeventlistener")?{LEFT:1,MIDDLE:4,RIGHT:2,isButton:function(d,c){return d.button&c},isLeft:function(d){return d.button&1},isMiddle:function(d){return d.button&4},isRight:function(d){return d.button&2}}:{LEFT:0,MIDDLE:1,RIGHT:2,isButton:function(d,c){return d.button==c},isLeft:function(d){return 0==d.button},isMiddle:function(d){return 1==
d.button},isRight:function(d){return 2==d.button}};k.mouseButtons=f;k=h("events-mousewheel")?"mousewheel":function(d,c){return l(d,"DOMMouseScroll",function(b){b.wheelDelta=-b.detail;c.call(this,b)})};return{_eventHandler:d,enter:d("mouseover"),leave:d("mouseout"),wheel:k,isLeft:f.isLeft,isMiddle:f.isMiddle,isRight:f.isRight}})},"dojo/_base/sniff":function(){define(["./kernel","./lang","../sniff"],function(k,l,h){k._name="browser";l.mixin(k,{isBrowser:!0,isFF:h("ff"),isIE:h("ie"),isKhtml:h("khtml"),
isWebKit:h("webkit"),isMozilla:h("mozilla"),isMoz:h("mozilla"),isOpera:h("opera"),isSafari:h("safari"),isChrome:h("chrome"),isMac:h("mac"),isIos:h("ios"),isAndroid:h("android"),isWii:h("wii"),isQuirks:h("quirks"),isAir:h("air")});return h})},"dojo/keys":function(){define(["./_base/kernel","./sniff"],function(k,l){return k.keys={BACKSPACE:8,TAB:9,CLEAR:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,META:l("webkit")?91:224,PAUSE:19,CAPS_LOCK:20,ESCAPE:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT_ARROW:37,
UP_ARROW:38,RIGHT_ARROW:39,DOWN_ARROW:40,INSERT:45,DELETE:46,HELP:47,LEFT_WINDOW:91,RIGHT_WINDOW:92,SELECT:93,NUMPAD_0:96,NUMPAD_1:97,NUMPAD_2:98,NUMPAD_3:99,NUMPAD_4:100,NUMPAD_5:101,NUMPAD_6:102,NUMPAD_7:103,NUMPAD_8:104,NUMPAD_9:105,NUMPAD_MULTIPLY:106,NUMPAD_PLUS:107,NUMPAD_ENTER:108,NUMPAD_MINUS:109,NUMPAD_PERIOD:110,NUMPAD_DIVIDE:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,F13:124,F14:125,F15:126,NUM_LOCK:144,SCROLL_LOCK:145,UP_DPAD:175,DOWN_DPAD:176,
LEFT_DPAD:177,RIGHT_DPAD:178,copyKey:l("mac")&&!l("air")?l("safari")?91:224:17}})},"dojo/parser":function(){define("require ./_base/kernel ./_base/lang ./_base/array ./_base/config ./dom ./_base/window ./_base/url ./aspect ./promise/all ./date/stamp ./Deferred ./has ./query ./on ./ready".split(" "),function(k,l,h,g,f,d,e,c,b,a,m,n,q,s,r,p){function t(a){return eval("("+a+")")}function u(a){var b=a._nameCaseMap,c=a.prototype;if(!b||b._extendCnt<x){var b=a._nameCaseMap={},d;for(d in c)"_"!==d.charAt(0)&&
(b[d.toLowerCase()]=d);b._extendCnt=x}return b}function v(a,b){var c=a.join();if(!w[c]){for(var d=[],e=0,f=a.length;e<f;e++){var m=a[e];d[d.length]=w[m]=w[m]||h.getObject(m)||~m.indexOf("/")&&(b?b(m):k(m))}e=d.shift();w[c]=d.length?e.createSubclass?e.createSubclass(d):e.extend.apply(e,d):e}return w[c]}new Date("X");var x=0;b.after(h,"extend",function(){x++},!0);var w={},y={_clearCache:function(){x++;w={}},_functionFromScript:function(a,b){var c="",d="",e=a.getAttribute(b+"args")||a.getAttribute("args"),
f=a.getAttribute("with"),e=(e||"").split(/\s*,\s*/);f&&f.length&&g.forEach(f.split(/\s*,\s*/),function(a){c+="with("+a+"){";d+="}"});return new Function(e,c+a.innerHTML+d)},instantiate:function(a,b,c){b=b||{};c=c||{};var d=(c.scope||l._scopeName)+"Type",e="data-"+(c.scope||l._scopeName)+"-",f=e+"type",m=e+"mixins",n=[];g.forEach(a,function(a){var c=d in b?b[d]:a.getAttribute(f)||a.getAttribute(d);if(c){var e=a.getAttribute(m),c=e?[c].concat(e.split(/\s*,\s*/)):[c];n.push({node:a,types:c})}});return this._instantiate(n,
b,c)},_instantiate:function(b,c,d,e){function f(a){!c._started&&!d.noStart&&g.forEach(a,function(a){"function"===typeof a.startup&&!a._started&&a.startup()});return a}b=g.map(b,function(a){var b=a.ctor||v(a.types,d.contextRequire);if(!b)throw Error("Unable to resolve constructor for: '"+a.types.join()+"'");return this.construct(b,a.node,c,d,a.scripts,a.inherited)},this);return e?a(b).then(f):f(b)},construct:function(a,d,e,f,n,p){function y(a){V&&h.setObject(V,a);for(N=0;N<S.length;N++)b[S[N].advice||
"after"](a,S[N].method,h.hitch(a,S[N].func),!0);for(N=0;N<O.length;N++)O[N].call(a);for(N=0;N<Q.length;N++)a.watch(Q[N].prop,Q[N].func);for(N=0;N<W.length;N++)r(a,W[N].event,W[N].func);return a}var w=a&&a.prototype;f=f||{};var v={};f.defaults&&h.mixin(v,f.defaults);p&&h.mixin(v,p);var k;q("dom-attributes-explicit")?k=d.attributes:q("dom-attributes-specified-flag")?k=g.filter(d.attributes,function(a){return a.specified}):(p=(/^input$|^img$/i.test(d.nodeName)?d:d.cloneNode(!1)).outerHTML.replace(/=[^\s"']+|="[^"]*"|='[^']*'/g,
"").replace(/^\s*<[a-zA-Z0-9]*\s*/,"").replace(/\s*>.*$/,""),k=g.map(p.split(/\s+/),function(a){var b=a.toLowerCase();return{name:a,value:"LI"==d.nodeName&&"value"==a||"enctype"==b?d.getAttribute(b):d.getAttributeNode(b).value}}));var x=f.scope||l._scopeName;p="data-"+x+"-";var E={};"dojo"!==x&&(E[p+"props"]="data-dojo-props",E[p+"type"]="data-dojo-type",E[p+"mixins"]="data-dojo-mixins",E[x+"type"]="dojoType",E[p+"id"]="data-dojo-id");for(var N=0,J,x=[],V,U;J=k[N++];){var R=J.name,T=R.toLowerCase();
J=J.value;switch(E[T]||T){case "data-dojo-type":case "dojotype":case "data-dojo-mixins":break;case "data-dojo-props":U=J;break;case "data-dojo-id":case "jsid":V=J;break;case "data-dojo-attach-point":case "dojoattachpoint":v.dojoAttachPoint=J;break;case "data-dojo-attach-event":case "dojoattachevent":v.dojoAttachEvent=J;break;case "class":v["class"]=d.className;break;case "style":v.style=d.style&&d.style.cssText;break;default:if(R in w||(R=u(a)[T]||R),R in w)switch(typeof w[R]){case "string":v[R]=
J;break;case "number":v[R]=J.length?Number(J):NaN;break;case "boolean":v[R]="false"!=J.toLowerCase();break;case "function":""===J||-1!=J.search(/[^\w\.]+/i)?v[R]=new Function(J):v[R]=h.getObject(J,!1)||new Function(J);x.push(R);break;default:T=w[R],v[R]=T&&"length"in T?J?J.split(/\s*,\s*/):[]:T instanceof Date?""==J?new Date(""):"now"==J?new Date:m.fromISOString(J):T instanceof c?l.baseUrl+J:t(J)}else v[R]=J}}for(k=0;k<x.length;k++)E=x[k].toLowerCase(),d.removeAttribute(E),d[E]=null;if(U)try{U=t.call(f.propsThis,
"{"+U+"}"),h.mixin(v,U)}catch(H){throw Error(H.toString()+" in data-dojo-props\x3d'"+U+"'");}h.mixin(v,e);n||(n=a&&(a._noScript||w._noScript)?[]:s("\x3e script[type^\x3d'dojo/']",d));var S=[],O=[],Q=[],W=[];if(n)for(N=0;N<n.length;N++)E=n[N],d.removeChild(E),e=E.getAttribute(p+"event")||E.getAttribute("event"),f=E.getAttribute(p+"prop"),U=E.getAttribute(p+"method"),x=E.getAttribute(p+"advice"),k=E.getAttribute("type"),E=this._functionFromScript(E,p),e?"dojo/connect"==k?S.push({method:e,func:E}):"dojo/on"==
k?W.push({event:e,func:E}):v[e]=E:"dojo/aspect"==k?S.push({method:U,advice:x,func:E}):"dojo/watch"==k?Q.push({prop:f,func:E}):O.push(E);a=(n=a.markupFactory||w.markupFactory)?n(v,d,a):new a(v,d);return a.then?a.then(y):y(a)},scan:function(a,b){function c(a){if(!a.inherited){a.inherited={};var b=a.node,d=c(a.parent),b={dir:b.getAttribute("dir")||d.dir,lang:b.getAttribute("lang")||d.lang,textDir:b.getAttribute(h)||d.textDir},e;for(e in b)b[e]&&(a.inherited[e]=b[e])}return a.inherited}var d=[],e=[],
f={},m=(b.scope||l._scopeName)+"Type",s="data-"+(b.scope||l._scopeName)+"-",r=s+"type",h=s+"textdir",s=s+"mixins",p=a.firstChild,y=b.inherited;if(!y){var w=function(a,b){return a.getAttribute&&a.getAttribute(b)||a.parentNode&&w(a.parentNode,b)},y={dir:w(a,"dir"),lang:w(a,"lang"),textDir:w(a,h)},t;for(t in y)y[t]||delete y[t]}for(var y={inherited:y},x,u;;)if(p)if(1!=p.nodeType)p=p.nextSibling;else if(x&&"script"==p.nodeName.toLowerCase())(R=p.getAttribute("type"))&&/^dojo\/\w/i.test(R)&&x.push(p),
p=p.nextSibling;else if(u)p=p.nextSibling;else{var R=p.getAttribute(r)||p.getAttribute(m);t=p.firstChild;if(!R&&(!t||3==t.nodeType&&!t.nextSibling))p=p.nextSibling;else{u=null;if(R){var T=p.getAttribute(s);x=T?[R].concat(T.split(/\s*,\s*/)):[R];try{u=v(x,b.contextRequire)}catch(H){}u||g.forEach(x,function(a){~a.indexOf("/")&&!f[a]&&(f[a]=!0,e[e.length]=a)});T=u&&!u.prototype._noScript?[]:null;y={types:x,ctor:u,parent:y,node:p,scripts:T};y.inherited=c(y);d.push(y)}else y={node:p,scripts:x,parent:y};
x=T;u=p.stopParser||u&&u.prototype.stopParser&&!b.template;p=t}}else{if(!y||!y.node)break;p=y.node.nextSibling;u=!1;y=y.parent;x=y.scripts}var S=new n;e.length?(q("dojo-debug-messages")&&console.warn("WARNING: Modules being Auto-Required: "+e.join(", ")),(b.contextRequire||k)(e,function(){S.resolve(g.filter(d,function(a){if(!a.ctor)try{a.ctor=v(a.types,b.contextRequire)}catch(c){}for(var d=a.parent;d&&!d.types;)d=d.parent;var e=a.ctor&&a.ctor.prototype;a.instantiateChildren=!(e&&e.stopParser&&!b.template);
a.instantiate=!d||d.instantiate&&d.instantiateChildren;return a.instantiate}))})):S.resolve(d);return S.promise},_require:function(a,b){var c=t("{"+a.innerHTML+"}"),d=[],e=[],f=new n,m=b&&b.contextRequire||k,q;for(q in c)d.push(q),e.push(c[q]);m(e,function(){for(var a=0;a<d.length;a++)h.setObject(d[a],arguments[a]);f.resolve(arguments)});return f.promise},_scanAmd:function(a,b){var c=new n,d=c.promise;c.resolve(!0);var e=this;s("script[type\x3d'dojo/require']",a).forEach(function(a){d=d.then(function(){return e._require(a,
b)});a.parentNode.removeChild(a)});return d},parse:function(a,b){var c;!b&&a&&a.rootNode?(b=a,c=b.rootNode):a&&h.isObject(a)&&!("nodeType"in a)?b=a:c=a;c=c?d.byId(c):e.body();b=b||{};var f=b.template?{template:!0}:{},m=[],n=this,q=this._scanAmd(c,b).then(function(){return n.scan(c,b)}).then(function(a){return n._instantiate(a,f,b,!0)}).then(function(a){return m=m.concat(a)}).otherwise(function(a){console.error("dojo/parser::parse() error",a);throw a;});h.mixin(m,q);return m}};l.parser=y;f.parseOnLoad&&
p(100,y,"parse");return y})},"dojo/_base/url":function(){define(["./kernel"],function(k){var l=/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/,h=/^((([^\[:]+):)?([^@]+)@)?(\[([^\]]+)\]|([^\[:]*))(:([0-9]+))?$/,g=function(){for(var f=arguments,d=[f[0]],e=1;e<f.length;e++)if(f[e]){var c=new g(f[e]+""),d=new g(d[0]+"");if(""==c.path&&!c.scheme&&!c.authority&&!c.query)null!=c.fragment&&(d.fragment=c.fragment),c=d;else if(!c.scheme&&(c.scheme=d.scheme,!c.authority&&(c.authority=d.authority,
"/"!=c.path.charAt(0)))){for(var d=(d.path.substring(0,d.path.lastIndexOf("/")+1)+c.path).split("/"),b=0;b<d.length;b++)"."==d[b]?b==d.length-1?d[b]="":(d.splice(b,1),b--):0<b&&(!(1==b&&""==d[0])&&".."==d[b]&&".."!=d[b-1])&&(b==d.length-1?(d.splice(b,1),d[b-1]=""):(d.splice(b-1,2),b-=2));c.path=d.join("/")}d=[];c.scheme&&d.push(c.scheme,":");c.authority&&d.push("//",c.authority);d.push(c.path);c.query&&d.push("?",c.query);c.fragment&&d.push("#",c.fragment)}this.uri=d.join("");f=this.uri.match(l);
this.scheme=f[2]||(f[1]?"":null);this.authority=f[4]||(f[3]?"":null);this.path=f[5];this.query=f[7]||(f[6]?"":null);this.fragment=f[9]||(f[8]?"":null);null!=this.authority&&(f=this.authority.match(h),this.user=f[3]||null,this.password=f[4]||null,this.host=f[6]||f[7],this.port=f[9]||null)};g.prototype.toString=function(){return this.uri};return k._Url=g})},"dojo/promise/all":function(){define(["../_base/array","../Deferred","../when"],function(k,l,h){var g=k.some;return function(f){var d,e;f instanceof
Array?e=f:f&&"object"===typeof f&&(d=f);var c,b=[];if(d){e=[];for(var a in d)Object.hasOwnProperty.call(d,a)&&(b.push(a),e.push(d[a]));c={}}else e&&(c=[]);if(!e||!e.length)return(new l).resolve(c);var m=new l;m.promise.always(function(){c=b=null});var n=e.length;g(e,function(a,e){d||b.push(e);h(a,function(a){m.isFulfilled()||(c[b[e]]=a,0===--n&&m.resolve(c))},m.reject);return m.isFulfilled()});return m.promise}})},"dojo/Deferred":function(){define(["./has","./_base/lang","./errors/CancelError","./promise/Promise",
"./promise/instrumentation"],function(k,l,h,g,f){var d=Object.freeze||function(){},e=function(a,b,d,e,f){2===b&&(m.instrumentRejected&&0===a.length)&&m.instrumentRejected(d,!1,e,f);for(f=0;f<a.length;f++)c(a[f],b,d,e)},c=function(c,d,e,f){var g=c[d],h=c.deferred;if(g)try{var k=g(e);if(0===d)"undefined"!==typeof k&&a(h,d,k);else{if(k&&"function"===typeof k.then){c.cancel=k.cancel;k.then(b(h,1),b(h,2),b(h,0));return}a(h,1,k)}}catch(v){a(h,2,v)}else a(h,d,e);2===d&&m.instrumentRejected&&m.instrumentRejected(e,
!!g,f,h.promise)},b=function(b,c){return function(d){a(b,c,d)}},a=function(a,b,c){if(!a.isCanceled())switch(b){case 0:a.progress(c);break;case 1:a.resolve(c);break;case 2:a.reject(c)}},m=function(a){var b=this.promise=new g,f=this,r,p,t,k=!1,v=[];Error.captureStackTrace&&(Error.captureStackTrace(f,m),Error.captureStackTrace(b,m));this.isResolved=b.isResolved=function(){return 1===r};this.isRejected=b.isRejected=function(){return 2===r};this.isFulfilled=b.isFulfilled=function(){return!!r};this.isCanceled=
b.isCanceled=function(){return k};this.progress=function(a,c){if(r){if(!0===c)throw Error("This deferred has already been fulfilled.");return b}e(v,0,a,null,f);return b};this.resolve=function(a,c){if(r){if(!0===c)throw Error("This deferred has already been fulfilled.");return b}e(v,r=1,p=a,null,f);v=null;return b};var l=this.reject=function(a,c){if(r){if(!0===c)throw Error("This deferred has already been fulfilled.");return b}Error.captureStackTrace&&Error.captureStackTrace(t={},l);e(v,r=2,p=a,t,
f);v=null;return b};this.then=b.then=function(a,d,e){var f=[e,a,d];f.cancel=b.cancel;f.deferred=new m(function(a){return f.cancel&&f.cancel(a)});r&&!v?c(f,r,p,t):v.push(f);return f.deferred.promise};this.cancel=b.cancel=function(b,c){if(r){if(!0===c)throw Error("This deferred has already been fulfilled.");}else{if(a){var d=a(b);b="undefined"===typeof d?b:d}k=!0;if(r){if(2===r&&p===b)return b}else return"undefined"===typeof b&&(b=new h),l(b),b}};d(b)};m.prototype.toString=function(){return"[object Deferred]"};
f&&f(m);return m})},"dojo/errors/CancelError":function(){define(["./create"],function(k){return k("CancelError",null,null,{dojoType:"cancel"})})},"dojo/errors/create":function(){define(["../_base/lang"],function(k){return function(l,h,g,f){g=g||Error;var d=function(e){if(g===Error){Error.captureStackTrace&&Error.captureStackTrace(this,d);var c=Error.call(this,e),b;for(b in c)c.hasOwnProperty(b)&&(this[b]=c[b]);this.message=e;this.stack=c.stack}else g.apply(this,arguments);h&&h.apply(this,arguments)};
d.prototype=k.delegate(g.prototype,f);d.prototype.name=l;return d.prototype.constructor=d}})},"dojo/promise/Promise":function(){define(["../_base/lang"],function(k){function l(){throw new TypeError("abstract");}return k.extend(function(){},{then:function(h,g,f){l()},cancel:function(h,g){l()},isResolved:function(){l()},isRejected:function(){l()},isFulfilled:function(){l()},isCanceled:function(){l()},always:function(h){return this.then(h,h)},otherwise:function(h){return this.then(null,h)},trace:function(){return this},
traceRejected:function(){return this},toString:function(){return"[object Promise]"}})})},"dojo/promise/instrumentation":function(){define(["./tracer","../has","../_base/lang","../_base/array"],function(k,l,h,g){function f(a,b,c){var d="";a&&a.stack&&(d+=a.stack);b&&b.stack&&(d+="\n    ----------------------------------------\n    rejected"+b.stack.split("\n").slice(1).join("\n").replace(/^\s+/," "));c&&c.stack&&(d+="\n    ----------------------------------------\n"+c.stack);console.error(a,d)}function d(a,
b,c,d){b||f(a,c,d)}function e(d,e,f,r){g.some(b,function(a){if(a.error===d)return e&&(a.handled=!0),!0})||b.push({error:d,rejection:f,handled:e,deferred:r,timestamp:(new Date).getTime()});a||(a=setTimeout(c,m))}function c(){var d=(new Date).getTime(),e=d-m;b=g.filter(b,function(a){return a.timestamp<e?(a.handled||f(a.error,a.rejection,a.deferred),!1):!0});a=b.length?setTimeout(c,b[0].timestamp+m-d):!1}l.add("config-useDeferredInstrumentation","report-unhandled-rejections");var b=[],a=!1,m=1E3;return function(a){var b=
l("config-useDeferredInstrumentation");if(b){k.on("resolved",h.hitch(console,"log","resolved"));k.on("rejected",h.hitch(console,"log","rejected"));k.on("progress",h.hitch(console,"log","progress"));var c=[];"string"===typeof b&&(c=b.split(","),b=c.shift());if("report-rejections"===b)a.instrumentRejected=d;else if("report-unhandled-rejections"===b||!0===b||1===b)a.instrumentRejected=e,m=parseInt(c[0],10)||m;else throw Error("Unsupported instrumentation usage \x3c"+b+"\x3e");}}})},"dojo/promise/tracer":function(){define(["../_base/lang",
"./Promise","../Evented"],function(k,l,h){function g(e){setTimeout(function(){d.apply(f,e)},0)}var f=new h,d=f.emit;f.emit=null;l.prototype.trace=function(){var d=k._toArray(arguments);this.then(function(c){g(["resolved",c].concat(d))},function(c){g(["rejected",c].concat(d))},function(c){g(["progress",c].concat(d))});return this};l.prototype.traceRejected=function(){var d=k._toArray(arguments);this.otherwise(function(c){g(["rejected",c].concat(d))});return this};return f})},"dojo/when":function(){define(["./Deferred",
"./promise/Promise"],function(k,l){return function(h,g,f,d){var e=h&&"function"===typeof h.then,c=e&&h instanceof l;if(e)c||(e=new k(h.cancel),h.then(e.resolve,e.reject,e.progress),h=e.promise);else return 1<arguments.length?g?g(h):h:(new k).resolve(h);return g||f||d?h.then(g,f,d):h}})},"dojo/date/stamp":function(){define(["../_base/lang","../_base/array"],function(k,l){var h={};k.setObject("dojo.date.stamp",h);h.fromISOString=function(g,f){h._isoRegExp||(h._isoRegExp=/^(?:(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?)?(?:T(\d{2}):(\d{2})(?::(\d{2})(.\d+)?)?((?:[+-](\d{2}):(\d{2}))|Z)?)?$/);
var d=h._isoRegExp.exec(g),e=null;if(d){d.shift();d[1]&&d[1]--;d[6]&&(d[6]*=1E3);f&&(f=new Date(f),l.forEach(l.map("FullYear Month Date Hours Minutes Seconds Milliseconds".split(" "),function(a){return f["get"+a]()}),function(a,b){d[b]=d[b]||a}));e=new Date(d[0]||1970,d[1]||0,d[2]||1,d[3]||0,d[4]||0,d[5]||0,d[6]||0);100>d[0]&&e.setFullYear(d[0]||1970);var c=0,b=d[7]&&d[7].charAt(0);"Z"!=b&&(c=60*(d[8]||0)+(Number(d[9])||0),"-"!=b&&(c*=-1));b&&(c-=e.getTimezoneOffset());c&&e.setTime(e.getTime()+6E4*
c)}return e};h.toISOString=function(g,f){var d=function(a){return 10>a?"0"+a:a};f=f||{};var e=[],c=f.zulu?"getUTC":"get",b="";"time"!=f.selector&&(b=g[c+"FullYear"](),b=["0000".substr((b+"").length)+b,d(g[c+"Month"]()+1),d(g[c+"Date"]())].join("-"));e.push(b);if("date"!=f.selector){b=[d(g[c+"Hours"]()),d(g[c+"Minutes"]()),d(g[c+"Seconds"]())].join(":");c=g[c+"Milliseconds"]();f.milliseconds&&(b+="."+(100>c?"0":"")+d(c));if(f.zulu)b+="Z";else if("time"!=f.selector)var c=g.getTimezoneOffset(),a=Math.abs(c),
b=b+((0<c?"-":"+")+d(Math.floor(a/60))+":"+d(a%60));e.push(b)}return e.join("T")};return h})},"dojo/query":function(){define("./_base/kernel ./has ./dom ./on ./_base/array ./_base/lang ./selector/_loader ./selector/_loader!default".split(" "),function(k,l,h,g,f,d,e,c){function b(a,b){var c=function(c,d){if("string"==typeof d&&(d=h.byId(d),!d))return new b([]);var e="string"==typeof c?a(c,d):c?c.end&&c.on?c:[c]:[];return e.end&&e.on?e:new b(e)};c.matches=a.match||function(a,b,d){return 0<c.filter([a],
b,d).length};c.filter=a.filter||function(a,b,d){return c(b,d).filter(function(b){return-1<f.indexOf(a,b)})};if("function"!=typeof a){var d=a.search;a=function(a,b){return d(b||document,a)}}return c}l.add("array-extensible",function(){return 1==d.delegate([],{length:1}).length&&!l("bug-for-in-skips-shadowed")});var a=Array.prototype,m=a.slice,n=a.concat,q=f.forEach,s=function(a,b,c){b=[0].concat(m.call(b,0));c=c||k.global;return function(d){b[0]=d;return a.apply(c,b)}},r=function(a){var b=this instanceof
p&&l("array-extensible");"number"==typeof a&&(a=Array(a));var c=a&&"length"in a?a:arguments;if(b||!c.sort){for(var e=b?this:[],f=e.length=c.length,m=0;m<f;m++)e[m]=c[m];if(b)return e;c=e}d._mixin(c,t);c._NodeListCtor=function(a){return p(a)};return c},p=r,t=p.prototype=l("array-extensible")?[]:{};p._wrap=t._wrap=function(a,b,c){a=new (c||this._NodeListCtor||p)(a);return b?a._stash(b):a};p._adaptAsMap=function(a,b){return function(){return this.map(s(a,arguments,b))}};p._adaptAsForEach=function(a,
b){return function(){this.forEach(s(a,arguments,b));return this}};p._adaptAsFilter=function(a,b){return function(){return this.filter(s(a,arguments,b))}};p._adaptWithCondition=function(a,b,c){return function(){var d=arguments,e=s(a,d,c);if(b.call(c||k.global,d))return this.map(e);this.forEach(e);return this}};q(["slice","splice"],function(b){var c=a[b];t[b]=function(){return this._wrap(c.apply(this,arguments),"slice"==b?this:null)}});q(["indexOf","lastIndexOf","every","some"],function(a){var b=f[a];
t[a]=function(){return b.apply(k,[this].concat(m.call(arguments,0)))}});d.extend(r,{constructor:p,_NodeListCtor:p,toString:function(){return this.join(",")},_stash:function(a){this._parent=a;return this},on:function(a,b){var c=this.map(function(c){return g(c,a,b)});c.remove=function(){for(var a=0;a<c.length;a++)c[a].remove()};return c},end:function(){return this._parent?this._parent:new this._NodeListCtor(0)},concat:function(a){var b=m.call(this,0),c=f.map(arguments,function(a){return m.call(a,0)});
return this._wrap(n.apply(b,c),this)},map:function(a,b){return this._wrap(f.map(this,a,b),this)},forEach:function(a,b){q(this,a,b);return this},filter:function(a){var b=arguments,c=this,d=0;if("string"==typeof a){c=u._filterResult(this,b[0]);if(1==b.length)return c._stash(this);d=1}return this._wrap(f.filter(c,b[d],b[d+1]),this)},instantiate:function(a,b){var c=d.isFunction(a)?a:d.getObject(a);b=b||{};return this.forEach(function(a){new c(b,a)})},at:function(){var a=new this._NodeListCtor(0);q(arguments,
function(b){0>b&&(b=this.length+b);this[b]&&a.push(this[b])},this);return a._stash(this)}});var u=b(c,r);k.query=b(c,function(a){return r(a)});u.load=function(a,c,d){e.load(a,c,function(a){d(b(a,r))})};k._filterQueryResult=u._filterResult=function(a,b,c){return new r(u.filter(a,b,c))};k.NodeList=u.NodeList=r;return u})},"dojo/selector/_loader":function(){define(["../has","require"],function(k,l){var h=document.createElement("div");k.add("dom-qsa2.1",!!h.querySelectorAll);k.add("dom-qsa3",function(){try{return h.innerHTML=
"\x3cp class\x3d'TEST'\x3e\x3c/p\x3e",1==h.querySelectorAll(".TEST:empty").length}catch(f){}});var g;return{load:function(f,d,e,c){c=l;f="default"==f?k("config-selectorEngine")||"css3":f;f="css2"==f||"lite"==f?"./lite":"css2.1"==f?k("dom-qsa2.1")?"./lite":"./acme":"css3"==f?k("dom-qsa3")?"./lite":"./acme":"acme"==f?"./acme":(c=d)&&f;if("?"==f.charAt(f.length-1)){f=f.substring(0,f.length-1);var b=!0}if(b&&(k("dom-compliant-qsa")||g))return e(g);c([f],function(a){"./lite"!=f&&(g=a);e(a)})}}})},"dojo/selector/acme":function(){define(["../dom",
"../sniff","../_base/array","../_base/lang","../_base/window"],function(k,l,h,g,f){var d=g.trim,e=h.forEach,c="BackCompat"==f.doc.compatMode,b=!1,a=function(){return!0},m=function(a){a=0<="\x3e~+".indexOf(a.slice(-1))?a+" * ":a+" ";for(var c=function(b,c){return d(a.slice(b,c))},e=[],f=-1,m=-1,n=-1,q=-1,s=-1,r=-1,g=-1,h,p="",y="",w,t=0,z=a.length,k=null,l=null,v=function(){0<=r&&(k.id=c(r,t).replace(/\\/g,""),r=-1);if(0<=g){var a=g==t?null:c(g,t);k[0>"\x3e~+".indexOf(a)?"tag":"oper"]=a;g=-1}0<=s&&
(k.classes.push(c(s+1,t).replace(/\\/g,"")),s=-1)};p=y,y=a.charAt(t),t<z;t++)if("\\"!=p)if(k||(w=t,k={query:null,pseudos:[],attrs:[],classes:[],tag:null,oper:null,id:null,getTag:function(){return b?this.otag:this.tag}},g=t),h)y==h&&(h=null);else if("'"==y||'"'==y)h=y;else if(0<=f)if("]"==y){l.attr?l.matchFor=c(n||f+1,t):l.attr=c(f+1,t);if((f=l.matchFor)&&('"'==f.charAt(0)||"'"==f.charAt(0)))l.matchFor=f.slice(1,-1);l.matchFor&&(l.matchFor=l.matchFor.replace(/\\/g,""));k.attrs.push(l);l=null;f=n=-1}else"\x3d"==
y&&(n=0<="|~^$*".indexOf(p)?p:"",l.type=n+y,l.attr=c(f+1,t-n.length),n=t+1);else 0<=m?")"==y&&(0<=q&&(l.value=c(m+1,t)),q=m=-1):"#"==y?(v(),r=t+1):"."==y?(v(),s=t):":"==y?(v(),q=t):"["==y?(v(),f=t,l={}):"("==y?(0<=q&&(l={name:c(q+1,t),value:null},k.pseudos.push(l)),m=t):" "==y&&p!=y&&(v(),0<=q&&k.pseudos.push({name:c(q+1,t)}),k.loops=k.pseudos.length||k.attrs.length||k.classes.length,k.oquery=k.query=c(w,t),k.otag=k.tag=k.oper?null:k.tag||"*",k.tag&&(k.tag=k.tag.toUpperCase()),e.length&&e[e.length-
1].oper&&(k.infixOper=e.pop(),k.query=k.infixOper.query+" "+k.query),e.push(k),k=null);return e},n=function(a,b){return!a?b:!b?a:function(){return a.apply(window,arguments)&&b.apply(window,arguments)}},q=function(a,b){var c=b||[];a&&c.push(a);return c},s=function(a){return 1==a.nodeType},r=function(a,c){return!a?"":"class"==c?a.className||"":"for"==c?a.htmlFor||"":"style"==c?a.style.cssText||"":(b?a.getAttribute(c):a.getAttribute(c,2))||""},p={"*\x3d":function(a,b){return function(c){return 0<=r(c,
a).indexOf(b)}},"^\x3d":function(a,b){return function(c){return 0==r(c,a).indexOf(b)}},"$\x3d":function(a,b){return function(c){c=" "+r(c,a);var d=c.lastIndexOf(b);return-1<d&&d==c.length-b.length}},"~\x3d":function(a,b){var c=" "+b+" ";return function(b){return 0<=(" "+r(b,a)+" ").indexOf(c)}},"|\x3d":function(a,b){var c=b+"-";return function(d){d=r(d,a);return d==b||0==d.indexOf(c)}},"\x3d":function(a,b){return function(c){return r(c,a)==b}}};g=f.doc.documentElement;var t=!(g.nextElementSibling||
"nextElementSibling"in g),u=!t?"nextElementSibling":"nextSibling",v=!t?"previousElementSibling":"previousSibling",x=t?s:a,w=function(a){for(;a=a[v];)if(x(a))return!1;return!0},y=function(a){for(;a=a[u];)if(x(a))return!1;return!0},z=function(a){var b=a.parentNode,b=7!=b.nodeType?b:b.nextSibling,c=0,d=b.children||b.childNodes,e=a._i||a.getAttribute("_i")||-1,f=b._l||("undefined"!==typeof b.getAttribute?b.getAttribute("_l"):-1);if(!d)return-1;d=d.length;if(f==d&&0<=e&&0<=f)return e;l("ie")&&"undefined"!==
typeof b.setAttribute?b.setAttribute("_l",d):b._l=d;e=-1;for(b=b.firstElementChild||b.firstChild;b;b=b[u])x(b)&&(l("ie")?b.setAttribute("_i",++c):b._i=++c,a===b&&(e=c));return e},A=function(a){return!(z(a)%2)},D=function(a){return z(a)%2},C={checked:function(a,b){return function(a){return!!("checked"in a?a.checked:a.selected)}},disabled:function(a,b){return function(a){return a.disabled}},enabled:function(a,b){return function(a){return!a.disabled}},"first-child":function(){return w},"last-child":function(){return y},
"only-child":function(a,b){return function(a){return w(a)&&y(a)}},empty:function(a,b){return function(a){var b=a.childNodes;for(a=a.childNodes.length-1;0<=a;a--){var c=b[a].nodeType;if(1===c||3==c)return!1}return!0}},contains:function(a,b){var c=b.charAt(0);if('"'==c||"'"==c)b=b.slice(1,-1);return function(a){return 0<=a.innerHTML.indexOf(b)}},not:function(a,b){var c=m(b)[0],d={el:1};"*"!=c.tag&&(d.tag=1);c.classes.length||(d.classes=1);var e=I(c,d);return function(a){return!e(a)}},"nth-child":function(a,
b){var c=parseInt;if("odd"==b)return D;if("even"==b)return A;if(-1!=b.indexOf("n")){var d=b.split("n",2),e=d[0]?"-"==d[0]?-1:c(d[0]):1,f=d[1]?c(d[1]):0,m=0,n=-1;0<e?0>f?f=f%e&&e+f%e:0<f&&(f>=e&&(m=f-f%e),f%=e):0>e&&(e*=-1,0<f&&(n=f,f%=e));if(0<e)return function(a){a=z(a);return a>=m&&(0>n||a<=n)&&a%e==f};b=f}var q=c(b);return function(a){return z(a)==q}}},B=9>l("ie")||9==l("ie")&&l("quirks")?function(a){var c=a.toLowerCase();"class"==c&&(a="className");return function(d){return b?d.getAttribute(a):
d[a]||d[c]}}:function(a){return function(b){return b&&b.getAttribute&&b.hasAttribute(a)}},I=function(c,d){if(!c)return a;d=d||{};var f=null;"el"in d||(f=n(f,s));"tag"in d||"*"!=c.tag&&(f=n(f,function(a){return a&&(b?a.tagName:a.tagName.toUpperCase())==c.getTag()}));"classes"in d||e(c.classes,function(a,b,c){var d=RegExp("(?:^|\\s)"+a+"(?:\\s|$)");f=n(f,function(a){return d.test(a.className)});f.count=b});"pseudos"in d||e(c.pseudos,function(a){var b=a.name;C[b]&&(f=n(f,C[b](b,a.value)))});"attrs"in
d||e(c.attrs,function(a){var b,c=a.attr;a.type&&p[a.type]?b=p[a.type](c,a.matchFor):c.length&&(b=B(c));b&&(f=n(f,b))});"id"in d||c.id&&(f=n(f,function(a){return!!a&&a.id==c.id}));f||"default"in d||(f=a);return f},M=function(a){return function(b,c,d){for(;b=b[u];)if(!t||s(b)){(!d||P(b,d))&&a(b)&&c.push(b);break}return c}},K=function(a){return function(b,c,d){for(b=b[u];b;){if(x(b)){if(d&&!P(b,d))break;a(b)&&c.push(b)}b=b[u]}return c}},G=function(b){b=b||a;return function(a,c,d){for(var e=0,f=a.children||
a.childNodes;a=f[e++];)x(a)&&((!d||P(a,d))&&b(a,e))&&c.push(a);return c}},F={},L=function(b){var d=F[b.query];if(d)return d;var e=b.infixOper,e=e?e.oper:"",m=I(b,{el:1}),n="*"==b.tag,s=f.doc.getElementsByClassName;if(e)s={el:1},n&&(s.tag=1),m=I(b,s),"+"==e?d=M(m):"~"==e?d=K(m):"\x3e"==e&&(d=G(m));else if(b.id)m=!b.loops&&n?a:I(b,{el:1,id:1}),d=function(a,c){var d=k.byId(b.id,a.ownerDocument||a);if(d&&m(d)){if(9==a.nodeType)return q(d,c);for(var e=d.parentNode;e&&e!=a;)e=e.parentNode;if(e)return q(d,
c)}};else if(s&&/\{\s*\[native code\]\s*\}/.test(String(s))&&b.classes.length&&!c)var m=I(b,{el:1,classes:1,id:1}),r=b.classes.join(" "),d=function(a,b,c){b=q(0,b);for(var d,e=0,f=a.getElementsByClassName(r);d=f[e++];)m(d,a)&&P(d,c)&&b.push(d);return b};else!n&&!b.loops?d=function(a,c,d){c=q(0,c);for(var e=0,f=b.getTag(),f=f?a.getElementsByTagName(f):[];a=f[e++];)P(a,d)&&c.push(a);return c}:(m=I(b,{el:1,tag:1,id:1}),d=function(a,c,d){c=q(0,c);for(var e,f=0,n=(e=b.getTag())?a.getElementsByTagName(e):
[];e=n[f++];)m(e,a)&&P(e,d)&&c.push(e);return c});return F[b.query]=d},E={},N={},J=function(a){var b=m(d(a));if(1==b.length){var c=L(b[0]);return function(a){if(a=c(a,[]))a.nozip=!0;return a}}return function(a){a=q(a);for(var c,d,e=b.length,f,m,n=0;n<e;n++){m=[];c=b[n];d=a.length-1;0<d&&(f={},m.nozip=!0);d=L(c);for(var s=0;c=a[s];s++)d(c,m,f);if(!m.length)break;a=m}return m}},V=l("ie")?"commentStrip":"nozip",U=!!f.doc.querySelectorAll,R=/\\[>~+]|n\+\d|([^ \\])?([>~+])([^ =])?/g,T=function(a,b,c,d){return c?
(b?b+" ":"")+c+(d?" "+d:""):a},H=/([^[]*)([^\]]*])?/g,S=function(a,b,c){return b.replace(R,T)+(c||"")},O=function(a,b){a=a.replace(H,S);if(U){var d=N[a];if(d&&!b)return d}if(d=E[a])return d;var d=a.charAt(0),e=-1==a.indexOf(" ");0<=a.indexOf("#")&&e&&(b=!0);if(U&&!b&&-1=="\x3e~+".indexOf(d)&&(!l("ie")||-1==a.indexOf(":"))&&!(c&&0<=a.indexOf("."))&&-1==a.indexOf(":contains")&&-1==a.indexOf(":checked")&&-1==a.indexOf("|\x3d")){var f=0<="\x3e~+".indexOf(a.charAt(a.length-1))?a+" *":a;return N[a]=function(b){try{if(!(9==
b.nodeType||e))throw"";var c=b.querySelectorAll(f);c[V]=!0;return c}catch(d){return O(a,!0)(b)}}}var m=a.match(/([^\s,](?:"(?:\\.|[^"])+"|'(?:\\.|[^'])+'|[^,])*)/g);return E[a]=2>m.length?J(a):function(a){for(var b=0,c=[],d;d=m[b++];)c=c.concat(J(d)(a));return c}},Q=0,W=l("ie")?function(a){return b?a.getAttribute("_uid")||a.setAttribute("_uid",++Q)||Q:a.uniqueID}:function(a){return a._uid||(a._uid=++Q)},P=function(a,b){if(!b)return 1;var c=W(a);return!b[c]?b[c]=1:0},ba=function(a){if(a&&a.nozip)return a;
if(!a||!a.length)return[];if(2>a.length)return[a[0]];var c=[];Q++;var d,e;if(l("ie")&&b){var f=Q+"";for(d=0;d<a.length;d++)if((e=a[d])&&e.getAttribute("_zipIdx")!=f)c.push(e),e.setAttribute("_zipIdx",f)}else if(l("ie")&&a.commentStrip)try{for(d=0;d<a.length;d++)(e=a[d])&&s(e)&&c.push(e)}catch(m){}else for(d=0;d<a.length;d++)if((e=a[d])&&e._zipIdx!=Q)c.push(e),e._zipIdx=Q;return c},Z=function(a,c){c=c||f.doc;b="div"===(c.ownerDocument||c).createElement("div").tagName;var d=O(a)(c);return d&&d.nozip?
d:ba(d)};Z.filter=function(a,b,c){for(var d=[],e=m(b),e=1==e.length&&!/[^\w#\.]/.test(b)?I(e[0]):function(a){return-1!=h.indexOf(Z(b,k.byId(c)),a)},f=0,n;n=a[f];f++)e(n)&&d.push(n);return d};return Z})},"dojo/ready":function(){define(["./_base/kernel","./has","require","./domReady","./_base/lang"],function(k,l,h,g,f){var d=0,e=[],c=0;l=function(){d=1;k._postLoad=k.config.afterOnLoad=!0;b()};var b=function(){if(!c){for(c=1;d&&(!g||0==g._Q.length)&&(h.idle?h.idle():1)&&e.length;){var a=e.shift();try{a()}catch(b){if(b.info=
b.message,h.signal)h.signal("error",b);else throw b;}}c=0}};h.on&&h.on("idle",b);g&&(g._onQEmpty=b);var a=k.ready=k.addOnLoad=function(a,c,d){var m=f._toArray(arguments);"number"!=typeof a?(d=c,c=a,a=1E3):m.shift();d=d?f.hitch.apply(k,m):function(){c()};d.priority=a;for(m=0;m<e.length&&a>=e[m].priority;m++);e.splice(m,0,d);b()},m=k.config.addOnLoad;if(m)a[f.isArray(m)?"apply":"call"](k,m);g?g(l):l();return a})},"dojo/domReady":function(){define(["./has"],function(k){function l(a){b.push(a);c&&h()}
function h(){if(!a){for(a=!0;b.length;)try{b.shift()(f)}catch(c){console.error(c,"in domReady callback",c.stack)}a=!1;l._onQEmpty()}}var g=function(){return this}(),f=document,d={loaded:1,complete:1},e="string"!=typeof f.readyState,c=!!d[f.readyState],b=[],a;l.load=function(a,b,c){l(c)};l._Q=b;l._onQEmpty=function(){};e&&(f.readyState="loading");if(!c){var m=[],n=function(a){a=a||g.event;c||"readystatechange"==a.type&&!d[f.readyState]||(e&&(f.readyState="complete"),c=1,h())},q=function(a,c){a.addEventListener(c,
n,!1);b.push(function(){a.removeEventListener(c,n,!1)})};if(!k("dom-addeventlistener")){var q=function(a,c){c="on"+c;a.attachEvent(c,n);b.push(function(){a.detachEvent(c,n)})},s=f.createElement("div");try{s.doScroll&&null===g.frameElement&&m.push(function(){try{return s.doScroll("left"),1}catch(a){}})}catch(r){}}q(f,"DOMContentLoaded");q(g,"load");"onreadystatechange"in f?q(f,"readystatechange"):e||m.push(function(){return d[f.readyState]});if(m.length){var p=function(){if(!c){for(var a=m.length;a--;)if(m[a]()){n("poller");
return}setTimeout(p,30)}};p()}}return l})},"dojo/DeferredList":function(){define(["./_base/kernel","./_base/Deferred","./_base/array"],function(k,l,h){k.DeferredList=function(g,f,d,e,c){var b=[];l.call(this);var a=this;0===g.length&&!f&&this.resolve([0,[]]);var m=0;h.forEach(g,function(c,q){function s(c,d){b[q]=[c,d];m++;m===g.length&&a.resolve(b)}c.then(function(b){f?a.resolve([q,b]):s(!0,b)},function(b){d?a.reject(b):s(!1,b);if(e)return null;throw b;})})};k.DeferredList.prototype=new l;k.DeferredList.prototype.gatherResults=
function(g){g=new k.DeferredList(g,!1,!0,!1);g.addCallback(function(f){var d=[];h.forEach(f,function(e){d.push(e[1])});return d});return g};return k.DeferredList})},"dojo/_base/Deferred":function(){define("./kernel ../Deferred ../promise/Promise ../errors/CancelError ../has ./lang ../when".split(" "),function(k,l,h,g,f,d,e){var c=function(){},b=Object.freeze||function(){},a=k.Deferred=function(e){function n(a){if(r)throw Error("This deferred has already been resolved");s=a;r=!0;q()}function q(){for(var a;!a&&
x;){var b=x;x=x.next;if(a=b.progress==c)r=!1;var e=k?b.error:b.resolved;f("config-useDeferredInstrumentation")&&k&&l.instrumentRejected&&l.instrumentRejected(s,!!e);if(e)try{var m=e(s);m&&"function"===typeof m.then?m.then(d.hitch(b.deferred,"resolve"),d.hitch(b.deferred,"reject"),d.hitch(b.deferred,"progress")):(e=a&&void 0===m,a&&!e&&(k=m instanceof Error),b.deferred[e&&k?"reject":"resolve"](e?s:m))}catch(n){b.deferred.reject(n)}else k?b.deferred.reject(s):b.deferred.resolve(s)}}var s,r,p,t,k,v,
x,w=this.promise=new h;this.isResolved=w.isResolved=function(){return 0==t};this.isRejected=w.isRejected=function(){return 1==t};this.isFulfilled=w.isFulfilled=function(){return 0<=t};this.isCanceled=w.isCanceled=function(){return p};this.resolve=this.callback=function(a){this.fired=t=0;this.results=[a,null];n(a)};this.reject=this.errback=function(a){k=!0;this.fired=t=1;f("config-useDeferredInstrumentation")&&l.instrumentRejected&&l.instrumentRejected(a,!!x);n(a);this.results=[null,a]};this.progress=
function(a){for(var b=x;b;){var c=b.progress;c&&c(a);b=b.next}};this.addCallbacks=function(a,b){this.then(a,b,c);return this};w.then=this.then=function(b,d,e){var f=e==c?this:new a(w.cancel);b={resolved:b,error:d,progress:e,deferred:f};x?v=v.next=b:x=v=b;r&&q();return f.promise};var y=this;w.cancel=this.cancel=function(){if(!r){var a=e&&e(y);r||(a instanceof Error||(a=new g(a)),a.log=!1,y.reject(a))}p=!0};b(w)};d.extend(a,{addCallback:function(a){return this.addCallbacks(d.hitch.apply(k,arguments))},
addErrback:function(a){return this.addCallbacks(null,d.hitch.apply(k,arguments))},addBoth:function(a){var b=d.hitch.apply(k,arguments);return this.addCallbacks(b,b)},fired:-1});a.when=k.when=e;return a})},"dojo/request":function(){define(["./request/default!"],function(k){return k})},"dojo/request/default":function(){define(["exports","require","../has"],function(k,l,h){var g=h("config-requestProvider");g||(g="./xhr");k.getPlatformDefaultId=function(){return"./xhr"};k.load=function(f,d,e,c){l(["platform"==
f?"./xhr":g],function(b){e(b)})}})},"dojo/io-query":function(){define(["./_base/lang"],function(k){var l={};return{objectToQuery:function(h){var g=encodeURIComponent,f=[],d;for(d in h){var e=h[d];if(e!=l[d]){var c=g(d)+"\x3d";if(k.isArray(e))for(var b=0,a=e.length;b<a;++b)f.push(c+g(e[b]));else f.push(c+g(e))}}return f.join("\x26")},queryToObject:function(h){var g=decodeURIComponent;h=h.split("\x26");for(var f={},d,e,c=0,b=h.length;c<b;++c)if(e=h[c],e.length){var a=e.indexOf("\x3d");0>a?(d=g(e),e=
""):(d=g(e.slice(0,a)),e=g(e.slice(a+1)));"string"==typeof f[d]&&(f[d]=[f[d]]);k.isArray(f[d])?f[d].push(e):f[d]=e}return f}}})},"JBrowse/has":function(){define(["dojo/has","dojo/sniff"],function(k){k.add("typed-arrays",function(){try{return!!new Uint8Array(1)}catch(k){}return!1});k.add("canvas",function(){try{return!!document.createElement("canvas").getContext("2d")}catch(k){}return!1});k.add("inaccurate-html-layout",function(){return k("safari")||9>k("ie")},!0);k.add("save-generated-files",function(){var l=
!1;try{l=Blob&&!(10>k("ie"))&&!k("safari")}catch(h){}return l},!0);k.add("inaccurate-html-width",function(){return k("safari")||k("chrome")},!0);return k})},"dijit/layout/ContentPane":function(){define("dojo/_base/kernel dojo/_base/lang ../_Widget ../_Container ./_ContentPaneResizeMixin dojo/string dojo/html dojo/i18n!../nls/loading dojo/_base/array dojo/_base/declare dojo/_base/Deferred dojo/dom dojo/dom-attr dojo/dom-construct dojo/_base/xhr dojo/i18n dojo/when".split(" "),function(k,l,h,g,f,d,
e,c,b,a,m,n,q,s,r,p,t){return a("dijit.layout.ContentPane",[h,g,f],{href:"",content:"",extractContent:!1,parseOnLoad:!0,parserScope:k._scopeName,preventCache:!1,preload:!1,refreshOnShow:!1,loadingMessage:"\x3cspan class\x3d'dijitContentPaneLoading'\x3e\x3cspan class\x3d'dijitInline dijitIconLoading'\x3e\x3c/span\x3e${loadingState}\x3c/span\x3e",errorMessage:"\x3cspan class\x3d'dijitContentPaneError'\x3e\x3cspan class\x3d'dijitInline dijitIconError'\x3e\x3c/span\x3e${errorState}\x3c/span\x3e",isLoaded:!1,
baseClass:"dijitContentPane",ioArgs:{},onLoadDeferred:null,_setTitleAttr:null,stopParser:!0,template:!1,markupFactory:function(a,b,c){var d=new c(a,b);return!d.href&&d._contentSetter&&d._contentSetter.parseDeferred&&!d._contentSetter.parseDeferred.isFulfilled()?d._contentSetter.parseDeferred.then(function(){return d}):d},create:function(a,b){if((!a||!a.template)&&b&&!("href"in a)&&!("content"in a)){b=n.byId(b);for(var c=b.ownerDocument.createDocumentFragment();b.firstChild;)c.appendChild(b.firstChild);
a=l.delegate(a,{content:c})}this.inherited(arguments,[a,b])},postMixInProperties:function(){this.inherited(arguments);var a=p.getLocalization("dijit","loading",this.lang);this.loadingMessage=d.substitute(this.loadingMessage,a);this.errorMessage=d.substitute(this.errorMessage,a)},buildRendering:function(){this.inherited(arguments);this.containerNode||(this.containerNode=this.domNode);this.domNode.removeAttribute("title")},startup:function(){this.inherited(arguments);this._contentSetter&&b.forEach(this._contentSetter.parseResults,
function(a){!a._started&&(!a._destroyed&&l.isFunction(a.startup))&&(a.startup(),a._started=!0)},this)},_startChildren:function(){b.forEach(this.getChildren(),function(a){!a._started&&(!a._destroyed&&l.isFunction(a.startup))&&(a.startup(),a._started=!0)});this._contentSetter&&b.forEach(this._contentSetter.parseResults,function(a){!a._started&&(!a._destroyed&&l.isFunction(a.startup))&&(a.startup(),a._started=!0)},this)},setHref:function(a){k.deprecated("dijit.layout.ContentPane.setHref() is deprecated. Use set('href', ...) instead.",
"","2.0");return this.set("href",a)},_setHrefAttr:function(a){this.cancel();this.onLoadDeferred=new m(l.hitch(this,"cancel"));this.onLoadDeferred.then(l.hitch(this,"onLoad"));this._set("href",a);this.preload||this._created&&this._isShown()?this._load():this._hrefChanged=!0;return this.onLoadDeferred},setContent:function(a){k.deprecated("dijit.layout.ContentPane.setContent() is deprecated.  Use set('content', ...) instead.","","2.0");this.set("content",a)},_setContentAttr:function(a){this._set("href",
"");this.cancel();this.onLoadDeferred=new m(l.hitch(this,"cancel"));this._created&&this.onLoadDeferred.then(l.hitch(this,"onLoad"));this._setContent(a||"");this._isDownloaded=!1;return this.onLoadDeferred},_getContentAttr:function(){return this.containerNode.innerHTML},cancel:function(){this._xhrDfd&&-1==this._xhrDfd.fired&&this._xhrDfd.cancel();delete this._xhrDfd;this.onLoadDeferred=null},destroy:function(){this.cancel();this.inherited(arguments)},destroyRecursive:function(a){this._beingDestroyed||
this.inherited(arguments)},_onShow:function(){this.inherited(arguments);if(this.href&&!this._xhrDfd&&(!this.isLoaded||this._hrefChanged||this.refreshOnShow))return this.refresh()},refresh:function(){this.cancel();this.onLoadDeferred=new m(l.hitch(this,"cancel"));this.onLoadDeferred.then(l.hitch(this,"onLoad"));this._load();return this.onLoadDeferred},_load:function(){this._setContent(this.onDownloadStart(),!0);var a=this,b={preventCache:this.preventCache||this.refreshOnShow,url:this.href,handleAs:"text"};
l.isObject(this.ioArgs)&&l.mixin(b,this.ioArgs);var c=this._xhrDfd=(this.ioMethod||r.get)(b),d;c.then(function(b){d=b;try{return a._isDownloaded=!0,a._setContent(b,!1)}catch(c){a._onError("Content",c)}},function(b){c.canceled||a._onError("Download",b);delete a._xhrDfd;return b}).then(function(){a.onDownloadEnd();delete a._xhrDfd;return d});delete this._hrefChanged},_onLoadHandler:function(a){this._set("isLoaded",!0);try{this.onLoadDeferred.resolve(a)}catch(b){console.error("Error "+this.widgetId+
" running custom onLoad code: "+b.message)}},_onUnloadHandler:function(){this._set("isLoaded",!1);try{this.onUnload()}catch(a){console.error("Error "+this.widgetId+" running custom onUnload code: "+a.message)}},destroyDescendants:function(a){this.isLoaded&&this._onUnloadHandler();var c=this._contentSetter;b.forEach(this.getChildren(),function(b){b.destroyRecursive?b.destroyRecursive(a):b.destroy&&b.destroy(a);b._destroyed=!0});c&&(b.forEach(c.parseResults,function(b){b._destroyed||(b.destroyRecursive?
b.destroyRecursive(a):b.destroy&&b.destroy(a),b._destroyed=!0)}),delete c.parseResults);a||s.empty(this.containerNode);delete this._singleChild},_setContent:function(a,b){this.destroyDescendants();var c=this._contentSetter;c&&c instanceof e._ContentSetter||(c=this._contentSetter=new e._ContentSetter({node:this.containerNode,_onError:l.hitch(this,this._onError),onContentError:l.hitch(this,function(a){a=this.onContentError(a);try{this.containerNode.innerHTML=a}catch(b){console.error("Fatal "+this.id+
" could not change content due to "+b.message,b)}})}));var d=l.mixin({cleanContent:this.cleanContent,extractContent:this.extractContent,parseContent:!a.domNode&&this.parseOnLoad,parserScope:this.parserScope,startup:!1,dir:this.dir,lang:this.lang,textDir:this.textDir},this._contentSetterParams||{}),d=c.set(l.isObject(a)&&a.domNode?a.domNode:a,d),f=this;return t(d&&d.then?d:c.parseDeferred,function(){delete f._contentSetterParams;b||(f._started&&(f._startChildren(),f._scheduleLayout()),f._onLoadHandler(a))})},
_onError:function(a,b,c){this.onLoadDeferred.reject(b);a=this["on"+a+"Error"].call(this,b);c?console.error(c,b):a&&this._setContent(a,!0)},onLoad:function(){},onUnload:function(){},onDownloadStart:function(){return this.loadingMessage},onContentError:function(){},onDownloadError:function(){return this.errorMessage},onDownloadEnd:function(){}})})},"dijit/_Widget":function(){define("dojo/aspect dojo/_base/config dojo/_base/connect dojo/_base/declare dojo/has dojo/_base/kernel dojo/_base/lang dojo/query dojo/ready ./registry ./_WidgetBase ./_OnDijitClickMixin ./_FocusMixin dojo/uacss ./hccss".split(" "),
function(k,l,h,g,f,d,e,c,b,a,m,n,q){function s(){}function r(a){return function(b,c,d,f){return b&&"string"==typeof c&&b[c]==s?b.on(c.substring(2).toLowerCase(),e.hitch(d,f)):a.apply(h,arguments)}}k.around(h,"connect",r);d.connect&&k.around(d,"connect",r);k=g("dijit._Widget",[m,n,q],{onClick:s,onDblClick:s,onKeyDown:s,onKeyPress:s,onKeyUp:s,onMouseDown:s,onMouseMove:s,onMouseOut:s,onMouseOver:s,onMouseLeave:s,onMouseEnter:s,onMouseUp:s,constructor:function(a){this._toConnect={};for(var b in a)this[b]===
s&&(this._toConnect[b.replace(/^on/,"").toLowerCase()]=a[b],delete a[b])},postCreate:function(){this.inherited(arguments);for(var a in this._toConnect)this.on(a,this._toConnect[a]);delete this._toConnect},on:function(a,b){return this[this._onMap(a)]===s?h.connect(this.domNode,a.toLowerCase(),this,b):this.inherited(arguments)},_setFocusedAttr:function(a){this._focused=a;this._set("focused",a)},setAttribute:function(a,b){d.deprecated(this.declaredClass+"::setAttribute(attr, value) is deprecated. Use set() instead.",
"","2.0");this.set(a,b)},attr:function(a,b){return 2<=arguments.length||"object"===typeof a?this.set.apply(this,arguments):this.get(a)},getDescendants:function(){d.deprecated(this.declaredClass+"::getDescendants() is deprecated. Use getChildren() instead.","","2.0");return this.containerNode?c("[widgetId]",this.containerNode).map(a.byNode):[]},_onShow:function(){this.onShow()},onShow:function(){},onHide:function(){},onClose:function(){return!0}});f("dijit-legacy-requires")&&b(0,function(){require(["dijit/_base"])});
return k})},"dijit/registry":function(){define(["dojo/_base/array","dojo/sniff","dojo/_base/window","./main"],function(k,l,h,g){var f={},d={},e={length:0,add:function(c){if(d[c.id])throw Error("Tried to register widget with id\x3d\x3d"+c.id+" but that id is already registered");d[c.id]=c;this.length++},remove:function(c){d[c]&&(delete d[c],this.length--)},byId:function(c){return"string"==typeof c?d[c]:c},byNode:function(c){return d[c.getAttribute("widgetId")]},toArray:function(){var c=[],b;for(b in d)c.push(d[b]);
return c},getUniqueId:function(c){var b;do b=c+"_"+(c in f?++f[c]:f[c]=0);while(d[b]);return"dijit"==g._scopeName?b:g._scopeName+"_"+b},findWidgets:function(c,b){function a(c){for(c=c.firstChild;c;c=c.nextSibling)if(1==c.nodeType){var f=c.getAttribute("widgetId");f?(f=d[f])&&e.push(f):c!==b&&a(c)}}var e=[];a(c);return e},_destroyAll:function(){g._curFocus=null;g._prevFocus=null;g._activeStack=[];k.forEach(e.findWidgets(h.body()),function(c){c._destroyed||(c.destroyRecursive?c.destroyRecursive():c.destroy&&
c.destroy())})},getEnclosingWidget:function(c){for(;c;){var b=1==c.nodeType&&c.getAttribute("widgetId");if(b)return d[b];c=c.parentNode}return null},_hash:d};return g.registry=e})},"dijit/main":function(){define(["dojo/_base/kernel"],function(k){return k.dijit})},"dijit/_WidgetBase":function(){define("require dojo/_base/array dojo/aspect dojo/_base/config dojo/_base/connect dojo/_base/declare dojo/dom dojo/dom-attr dojo/dom-class dojo/dom-construct dojo/dom-geometry dojo/dom-style dojo/has dojo/_base/kernel dojo/_base/lang dojo/on dojo/ready dojo/Stateful dojo/topic dojo/_base/window ./Destroyable dojo/has!dojo-bidi?./_BidiMixin ./registry".split(" "),
function(k,l,h,g,f,d,e,c,b,a,m,n,q,s,r,p,t,u,v,x,w,y,z){function A(a){return function(b){c[b?"set":"remove"](this.domNode,a,b);this._set(a,b)}}q.add("dijit-legacy-requires",!s.isAsync);q.add("dojo-bidi",!1);q("dijit-legacy-requires")&&t(0,function(){k(["dijit/_base/manager"])});var D={};g=d("dijit._WidgetBase",[u,w],{id:"",_setIdAttr:"domNode",lang:"",_setLangAttr:A("lang"),dir:"",_setDirAttr:A("dir"),"class":"",_setClassAttr:{node:"domNode",type:"class"},style:"",title:"",tooltip:"",baseClass:"",
srcNodeRef:null,domNode:null,containerNode:null,ownerDocument:null,_setOwnerDocumentAttr:function(a){this._set("ownerDocument",a)},attributeMap:{},_blankGif:g.blankGif||k.toUrl("dojo/resources/blank.gif"),_introspect:function(){var a=this.constructor;if(!a._setterAttrs){var b=a.prototype,c=a._setterAttrs=[],a=a._onMap={},d;for(d in b.attributeMap)c.push(d);for(d in b)/^on/.test(d)&&(a[d.substring(2).toLowerCase()]=d),/^_set[A-Z](.*)Attr$/.test(d)&&(d=d.charAt(4).toLowerCase()+d.substr(5,d.length-
9),(!b.attributeMap||!(d in b.attributeMap))&&c.push(d))}},postscript:function(a,b){this.create(a,b)},create:function(a,b){this._introspect();this.srcNodeRef=e.byId(b);this._connects=[];this._supportingWidgets=[];this.srcNodeRef&&"string"==typeof this.srcNodeRef.id&&(this.id=this.srcNodeRef.id);a&&(this.params=a,r.mixin(this,a));this.postMixInProperties();this.id||(this.id=z.getUniqueId(this.declaredClass.replace(/\./g,"_")),this.params&&delete this.params.id);this.ownerDocument=this.ownerDocument||
(this.srcNodeRef?this.srcNodeRef.ownerDocument:document);this.ownerDocumentBody=x.body(this.ownerDocument);z.add(this);this.buildRendering();var c;if(this.domNode){this._applyAttributes();var d=this.srcNodeRef;d&&(d.parentNode&&this.domNode!==d)&&(d.parentNode.replaceChild(this.domNode,d),c=!0);this.domNode.setAttribute("widgetId",this.id)}this.postCreate();c&&delete this.srcNodeRef;this._created=!0},_applyAttributes:function(){var a={},b;for(b in this.params||{})a[b]=this._get(b);l.forEach(this.constructor._setterAttrs,
function(b){if(!(b in a)){var c=this._get(b);c&&this.set(b,c)}},this);for(b in a)this.set(b,a[b])},postMixInProperties:function(){},buildRendering:function(){this.domNode||(this.domNode=this.srcNodeRef||this.ownerDocument.createElement("div"));if(this.baseClass){var a=this.baseClass.split(" ");this.isLeftToRight()||(a=a.concat(l.map(a,function(a){return a+"Rtl"})));b.add(this.domNode,a)}},postCreate:function(){},startup:function(){this._started||(this._started=!0,l.forEach(this.getChildren(),function(a){!a._started&&
(!a._destroyed&&r.isFunction(a.startup))&&(a.startup(),a._started=!0)}))},destroyRecursive:function(a){this._beingDestroyed=!0;this.destroyDescendants(a);this.destroy(a)},destroy:function(a){function b(c){c.destroyRecursive?c.destroyRecursive(a):c.destroy&&c.destroy(a)}this._beingDestroyed=!0;this.uninitialize();l.forEach(this._connects,r.hitch(this,"disconnect"));l.forEach(this._supportingWidgets,b);this.domNode&&l.forEach(z.findWidgets(this.domNode,this.containerNode),b);this.destroyRendering(a);
z.remove(this.id);this._destroyed=!0},destroyRendering:function(b){this.bgIframe&&(this.bgIframe.destroy(b),delete this.bgIframe);this.domNode&&(b?c.remove(this.domNode,"widgetId"):a.destroy(this.domNode),delete this.domNode);this.srcNodeRef&&(b||a.destroy(this.srcNodeRef),delete this.srcNodeRef)},destroyDescendants:function(a){l.forEach(this.getChildren(),function(b){b.destroyRecursive&&b.destroyRecursive(a)})},uninitialize:function(){return!1},_setStyleAttr:function(a){var b=this.domNode;r.isObject(a)?
n.set(b,a):b.style.cssText=b.style.cssText?b.style.cssText+("; "+a):a;this._set("style",a)},_attrToDom:function(a,d,e){e=3<=arguments.length?e:this.attributeMap[a];l.forEach(r.isArray(e)?e:[e],function(e){var f=this[e.node||e||"domNode"];switch(e.type||"attribute"){case "attribute":r.isFunction(d)&&(d=r.hitch(this,d));e=e.attribute?e.attribute:/^on[A-Z][a-zA-Z]*$/.test(a)?a.toLowerCase():a;f.tagName?c.set(f,e,d):f.set(e,d);break;case "innerText":f.innerHTML="";f.appendChild(this.ownerDocument.createTextNode(d));
break;case "innerHTML":f.innerHTML=d;break;case "class":b.replace(f,d,this[a])}},this)},get:function(a){var b=this._getAttrNames(a);return this[b.g]?this[b.g]():this._get(a)},set:function(a,b){if("object"===typeof a){for(var c in a)this.set(c,a[c]);return this}c=this._getAttrNames(a);var d=this[c.s];if(r.isFunction(d))var e=d.apply(this,Array.prototype.slice.call(arguments,1));else{var d=this.focusNode&&!r.isFunction(this.focusNode)?"focusNode":"domNode",f=this[d]&&this[d].tagName,m;if(m=f)if(!(m=
D[f])){m=this[d];var n={},q;for(q in m)n[q.toLowerCase()]=!0;m=D[f]=n}q=m;c=a in this.attributeMap?this.attributeMap[a]:c.s in this?this[c.s]:q&&c.l in q&&"function"!=typeof b||/^aria-|^data-|^role$/.test(a)?d:null;null!=c&&this._attrToDom(a,b,c);this._set(a,b)}return e||this},_attrPairNames:{},_getAttrNames:function(a){var b=this._attrPairNames;if(b[a])return b[a];var c=a.replace(/^[a-z]|-[a-zA-Z]/g,function(a){return a.charAt(a.length-1).toUpperCase()});return b[a]={n:a+"Node",s:"_set"+c+"Attr",
g:"_get"+c+"Attr",l:c.toLowerCase()}},_set:function(a,b){var c=this[a];this[a]=b;if(this._created&&!(c===b||c!==c&&b!==b))this._watchCallbacks&&this._watchCallbacks(a,c,b),this.emit("attrmodified-"+a,{detail:{prevValue:c,newValue:b}})},_get:function(a){return this[a]},emit:function(a,b,c){b=b||{};void 0===b.bubbles&&(b.bubbles=!0);void 0===b.cancelable&&(b.cancelable=!0);b.detail||(b.detail={});b.detail.widget=this;var d,e=this["on"+a];e&&(d=e.apply(this,c?c:[b]));this._started&&!this._beingDestroyed&&
p.emit(this.domNode,a.toLowerCase(),b);return d},on:function(a,b){var c=this._onMap(a);return c?h.after(this,c,b,!0):this.own(p(this.domNode,a,b))[0]},_onMap:function(a){var b=this.constructor,c=b._onMap;if(!c){var c=b._onMap={},d;for(d in b.prototype)/^on/.test(d)&&(c[d.replace(/^on/,"").toLowerCase()]=d)}return c["string"==typeof a&&a.toLowerCase()]},toString:function(){return"[Widget "+this.declaredClass+", "+(this.id||"NO ID")+"]"},getChildren:function(){return this.containerNode?z.findWidgets(this.containerNode):
[]},getParent:function(){return z.getEnclosingWidget(this.domNode.parentNode)},connect:function(a,b,c){return this.own(f.connect(a,b,this,c))[0]},disconnect:function(a){a.remove()},subscribe:function(a,b){return this.own(v.subscribe(a,r.hitch(this,b)))[0]},unsubscribe:function(a){a.remove()},isLeftToRight:function(){return this.dir?"ltr"==this.dir:m.isBodyLtr(this.ownerDocument)},isFocusable:function(){return this.focus&&"none"!=n.get(this.domNode,"display")},placeAt:function(b,c){var d=!b.tagName&&
z.byId(b);d&&d.addChild&&(!c||"number"===typeof c)?d.addChild(this,c):(d=d?d.containerNode&&!/after|before|replace/.test(c||"")?d.containerNode:d.domNode:e.byId(b,this.ownerDocument),a.place(this.domNode,d,c),!this._started&&(this.getParent()||{})._started&&this.startup());return this},defer:function(a,b){var c=setTimeout(r.hitch(this,function(){c&&(c=null,this._destroyed||r.hitch(this,a)())}),b||0);return{remove:function(){c&&(clearTimeout(c),c=null);return null}}}});q("dojo-bidi")&&g.extend(y);
return g})},"dojo/dom-class":function(){define(["./_base/lang","./_base/array","./dom"],function(k,l,h){function g(b){if("string"==typeof b||b instanceof String){if(b&&!d.test(b))return e[0]=b,e;b=b.split(d);b.length&&!b[0]&&b.shift();b.length&&!b[b.length-1]&&b.pop();return b}return!b?[]:l.filter(b,function(a){return a})}var f,d=/\s+/,e=[""],c={};return f={contains:function(b,a){return 0<=(" "+h.byId(b).className+" ").indexOf(" "+a+" ")},add:function(b,a){b=h.byId(b);a=g(a);var c=b.className,d,c=
c?" "+c+" ":" ";d=c.length;for(var e=0,f=a.length,r;e<f;++e)(r=a[e])&&0>c.indexOf(" "+r+" ")&&(c+=r+" ");d<c.length&&(b.className=c.substr(1,c.length-2))},remove:function(b,a){b=h.byId(b);var c;if(void 0!==a){a=g(a);c=" "+b.className+" ";for(var d=0,e=a.length;d<e;++d)c=c.replace(" "+a[d]+" "," ");c=k.trim(c)}else c="";b.className!=c&&(b.className=c)},replace:function(b,a,d){b=h.byId(b);c.className=b.className;f.remove(c,d);f.add(c,a);b.className!==c.className&&(b.className=c.className)},toggle:function(b,
a,c){b=h.byId(b);if(void 0===c){a=g(a);for(var d=0,e=a.length,s;d<e;++d)s=a[d],f[f.contains(b,s)?"remove":"add"](b,s)}else f[c?"add":"remove"](b,a);return c}}})},"dojo/Stateful":function(){define(["./_base/declare","./_base/lang","./_base/array","./when"],function(k,l,h,g){return k("dojo.Stateful",null,{_attrPairNames:{},_getAttrNames:function(f){var d=this._attrPairNames;return d[f]?d[f]:d[f]={s:"_"+f+"Setter",g:"_"+f+"Getter"}},postscript:function(f){f&&this.set(f)},_get:function(f,d){return"function"===
typeof this[d.g]?this[d.g]():this[f]},get:function(f){return this._get(f,this._getAttrNames(f))},set:function(f,d){if("object"===typeof f){for(var e in f)f.hasOwnProperty(e)&&"_watchCallbacks"!=e&&this.set(e,f[e]);return this}e=this._getAttrNames(f);var c=this._get(f,e);e=this[e.s];var b;"function"===typeof e?b=e.apply(this,Array.prototype.slice.call(arguments,1)):this[f]=d;if(this._watchCallbacks){var a=this;g(b,function(){a._watchCallbacks(f,c,d)})}return this},_changeAttrValue:function(f,d){var e=
this.get(f);this[f]=d;this._watchCallbacks&&this._watchCallbacks(f,e,d);return this},watch:function(f,d){var e=this._watchCallbacks;if(!e)var c=this,e=this._watchCallbacks=function(a,b,d,f){var r=function(e){if(e){e=e.slice();for(var f=0,s=e.length;f<s;f++)e[f].call(c,a,b,d)}};r(e["_"+a]);f||r(e["*"])};!d&&"function"===typeof f?(d=f,f="*"):f="_"+f;var b=e[f];"object"!==typeof b&&(b=e[f]=[]);b.push(d);var a={};a.unwatch=a.remove=function(){var a=h.indexOf(b,d);-1<a&&b.splice(a,1)};return a}})})},"dijit/Destroyable":function(){define(["dojo/_base/array",
"dojo/aspect","dojo/_base/declare"],function(k,l,h){return h("dijit.Destroyable",null,{destroy:function(g){this._destroyed=!0},own:function(){k.forEach(arguments,function(g){var f="destroyRecursive"in g?"destroyRecursive":"destroy"in g?"destroy":"remove",d=l.before(this,"destroy",function(c){g[f](c)}),e=l.after(g,f,function(){d.remove();e.remove()},!0)},this);return arguments}})})},"dijit/_OnDijitClickMixin":function(){define("dojo/on dojo/_base/array dojo/keys dojo/_base/declare dojo/has ./a11yclick".split(" "),
function(k,l,h,g,f,d){k=g("dijit._OnDijitClickMixin",null,{connect:function(e,c,b){return this.inherited(arguments,[e,"ondijitclick"==c?d:c,b])}});k.a11yclick=d;return k})},"dijit/a11yclick":function(){define(["dojo/keys","dojo/mouse","dojo/on","dojo/touch"],function(k,l,h,g){function f(c){if((c.keyCode===k.ENTER||c.keyCode===k.SPACE)&&!/input|button|textarea/i.test(c.target.nodeName))for(c=c.target;c;c=c.parentNode)if(c.dojoClick)return!0}var d;h(document,"keydown",function(c){f(c)?(d=c.target,c.preventDefault()):
d=null});h(document,"keyup",function(c){f(c)&&c.target==d&&(d=null,h.emit(c.target,"click",{cancelable:!0,bubbles:!0,ctrlKey:c.ctrlKey,shiftKey:c.shiftKey,metaKey:c.metaKey,altKey:c.altKey,_origType:c.type}))});var e=function(c,b){c.dojoClick=!0;return h(c,"click",b)};e.click=e;e.press=function(c,b){var a=h(c,g.press,function(a){("mousedown"!=a.type||l.isLeft(a))&&b(a)}),d=h(c,"keydown",function(a){(a.keyCode===k.ENTER||a.keyCode===k.SPACE)&&b(a)});return{remove:function(){a.remove();d.remove()}}};
e.release=function(c,b){var a=h(c,g.release,function(a){("mouseup"!=a.type||l.isLeft(a))&&b(a)}),d=h(c,"keyup",function(a){(a.keyCode===k.ENTER||a.keyCode===k.SPACE)&&b(a)});return{remove:function(){a.remove();d.remove()}}};e.move=g.move;return e})},"dojo/touch":function(){define("./_base/kernel ./aspect ./dom ./dom-class ./_base/lang ./on ./has ./mouse ./domReady ./_base/window".split(" "),function(k,l,h,g,f,d,e,c,b,a){function m(a,b,c){return p&&c?function(a,b){return d(a,c,b)}:s?function(c,e){var f=
d(c,b,function(a){e.call(this,a);C=(new Date).getTime()}),m=d(c,a,function(a){(!C||(new Date).getTime()>C+1E3)&&e.call(this,a)});return{remove:function(){f.remove();m.remove()}}}:function(b,c){return d(b,a,c)}}function n(a){do if(void 0!==a.dojoClick)return a.dojoClick;while(a=a.parentNode)}function q(b,c,e){if(v=!b.target.disabled&&n(b.target))x=b.target,w=b.changedTouches?b.changedTouches[0].pageX:b.clientX,y=b.changedTouches?b.changedTouches[0].pageY:b.clientY,z=("object"==typeof v?v.x:"number"==
typeof v?v:0)||4,A=("object"==typeof v?v.y:"number"==typeof v?v:0)||4,u||(u=!0,a.doc.addEventListener(c,function(a){v=v&&(a.changedTouches?a.changedTouches[0].target:a.target)==x&&Math.abs((a.changedTouches?a.changedTouches[0].pageX:a.clientX)-w)<=z&&Math.abs((a.changedTouches?a.changedTouches[0].pageY:a.clientY)-y)<=A},!0),a.doc.addEventListener(e,function(a){if(v){D=(new Date).getTime();var b=a.target;"LABEL"===b.tagName&&(b=h.byId(b.getAttribute("for"))||b);var c=a.changedTouches?a.changedTouches[0]:
a,e=document.createEvent("MouseEvents");e._dojo_click=!0;e.initMouseEvent("click",!0,!0,a.view,a.detail,c.screenX,c.screenY,c.clientX,c.clientY,a.ctrlKey,a.altKey,a.shiftKey,a.metaKey,0,null);setTimeout(function(){d.emit(b,"click",e)},0)}},!0),b=function(b){a.doc.addEventListener(b,function(a){!a._dojo_click&&((new Date).getTime()<=D+1E3&&!("INPUT"==a.target.tagName&&g.contains(a.target,"dijitOffScreen")))&&(a.stopPropagation(),a.stopImmediatePropagation&&a.stopImmediatePropagation(),"click"==b&&
(("INPUT"!=a.target.tagName||"radio"==a.target.type||"checkbox"==a.target.type)&&"TEXTAREA"!=a.target.tagName&&"AUDIO"!=a.target.tagName&&"VIDEO"!=a.target.tagName)&&a.preventDefault())},!0)},b("click"),b("mousedown"),b("mouseup"))}var s=e("touch"),r=5>e("ios"),p=navigator.pointerEnabled||navigator.msPointerEnabled,t=function(){var a={},b;for(b in{down:1,move:1,up:1,cancel:1,over:1,out:1})a[b]=!navigator.pointerEnabled?"MSPointer"+b.charAt(0).toUpperCase()+b.slice(1):"pointer"+b;return a}(),u,v,x,
w,y,z,A,D,C,B;s&&(p?b(function(){a.doc.addEventListener(t.down,function(a){q(a,t.move,t.up)},!0)}):b(function(){function b(a){var c=f.delegate(a,{bubbles:!0});6<=e("ios")&&(c.touches=a.touches,c.altKey=a.altKey,c.changedTouches=a.changedTouches,c.ctrlKey=a.ctrlKey,c.metaKey=a.metaKey,c.shiftKey=a.shiftKey,c.targetTouches=a.targetTouches);return c}B=a.body();a.doc.addEventListener("touchstart",function(a){C=(new Date).getTime();var b=B;B=a.target;d.emit(b,"dojotouchout",{relatedTarget:B,bubbles:!0});
d.emit(B,"dojotouchover",{relatedTarget:b,bubbles:!0});q(a,"touchmove","touchend")},!0);d(a.doc,"touchmove",function(c){C=(new Date).getTime();var e=a.doc.elementFromPoint(c.pageX-(r?0:a.global.pageXOffset),c.pageY-(r?0:a.global.pageYOffset));e&&(B!==e&&(d.emit(B,"dojotouchout",{relatedTarget:e,bubbles:!0}),d.emit(e,"dojotouchover",{relatedTarget:B,bubbles:!0}),B=e),d.emit(e,"dojotouchmove",b(c))||c.preventDefault())});d(a.doc,"touchend",function(c){C=(new Date).getTime();var e=a.doc.elementFromPoint(c.pageX-
(r?0:a.global.pageXOffset),c.pageY-(r?0:a.global.pageYOffset))||a.body();d.emit(e,"dojotouchend",b(c))})}));l={press:m("mousedown","touchstart",t.down),move:m("mousemove","dojotouchmove",t.move),release:m("mouseup","dojotouchend",t.up),cancel:m(c.leave,"touchcancel",s?t.cancel:null),over:m("mouseover","dojotouchover",t.over),out:m("mouseout","dojotouchout",t.out),enter:c._eventHandler(m("mouseover","dojotouchover",t.over)),leave:c._eventHandler(m("mouseout","dojotouchout",t.out))};return k.touch=
l})},"dijit/_FocusMixin":function(){define(["./focus","./_WidgetBase","dojo/_base/declare","dojo/_base/lang"],function(k,l,h,g){g.extend(l,{focused:!1,onFocus:function(){},onBlur:function(){},_onFocus:function(){this.onFocus()},_onBlur:function(){this.onBlur()}});return h("dijit._FocusMixin",null,{_focusManager:k})})},"dijit/focus":function(){define("dojo/aspect dojo/_base/declare dojo/dom dojo/dom-attr dojo/dom-class dojo/dom-construct dojo/Evented dojo/_base/lang dojo/on dojo/domReady dojo/sniff dojo/Stateful dojo/_base/window dojo/window ./a11y ./registry ./main".split(" "),
function(k,l,h,g,f,d,e,c,b,a,m,n,q,s,r,p,t){var u,v,x=new (l([n,e],{curNode:null,activeStack:[],constructor:function(){var a=c.hitch(this,function(a){h.isDescendant(this.curNode,a)&&this.set("curNode",null);h.isDescendant(this.prevNode,a)&&this.set("prevNode",null)});k.before(d,"empty",a);k.before(d,"destroy",a)},registerIframe:function(a){return this.registerWin(a.contentWindow,a)},registerWin:function(a,c){var d=this,e=a.document&&a.document.body;if(e){var f=b(a.document,navigator.pointerEnabled?
"pointerdown":navigator.msPointerEnabled?"MSPointerDown":"ontouchstart"in document?"mousedown, touchstart":"mousedown",function(a){if(!a||!(a.target&&null==a.target.parentNode))d._onTouchNode(c||a.target,"mouse")}),m=b(e,"focusin",function(a){if(a.target.tagName){var b=a.target.tagName.toLowerCase();"#document"==b||"body"==b||(r.isFocusable(a.target)?d._onFocusNode(c||a.target):d._onTouchNode(c||a.target))}}),n=b(e,"focusout",function(a){d._onBlurNode(c||a.target)});return{remove:function(){f.remove();
m.remove();n.remove();e=f=m=n=null}}}},_onBlurNode:function(a){a=(new Date).getTime();a<u+100||(this._clearFocusTimer&&clearTimeout(this._clearFocusTimer),this._clearFocusTimer=setTimeout(c.hitch(this,function(){this.set("prevNode",this.curNode);this.set("curNode",null)}),0),this._clearActiveWidgetsTimer&&clearTimeout(this._clearActiveWidgetsTimer),a<v+100||(this._clearActiveWidgetsTimer=setTimeout(c.hitch(this,function(){delete this._clearActiveWidgetsTimer;this._setStack([])}),0)))},_onTouchNode:function(a,
b){v=(new Date).getTime();this._clearActiveWidgetsTimer&&(clearTimeout(this._clearActiveWidgetsTimer),delete this._clearActiveWidgetsTimer);f.contains(a,"dijitPopup")&&(a=a.firstChild);var c=[];try{for(;a;){var d=g.get(a,"dijitPopupParent");if(d)a=p.byId(d).domNode;else if(a.tagName&&"body"==a.tagName.toLowerCase()){if(a===q.body())break;a=s.get(a.ownerDocument).frameElement}else{var e=a.getAttribute&&a.getAttribute("widgetId"),m=e&&p.byId(e);m&&!("mouse"==b&&m.get("disabled"))&&c.unshift(e);a=a.parentNode}}}catch(n){}this._setStack(c,
b)},_onFocusNode:function(a){a&&9!=a.nodeType&&(u=(new Date).getTime(),this._clearFocusTimer&&(clearTimeout(this._clearFocusTimer),delete this._clearFocusTimer),this._onTouchNode(a),a!=this.curNode&&(this.set("prevNode",this.curNode),this.set("curNode",a)))},_setStack:function(a,b){var c=this.activeStack,d=c.length-1,e=a.length-1;if(a[e]!=c[d]){this.set("activeStack",a);var f;for(f=d;0<=f&&c[f]!=a[f];f--)if(d=p.byId(c[f]))d._hasBeenBlurred=!0,d.set("focused",!1),d._focusManager==this&&d._onBlur(b),
this.emit("widget-blur",d,b);for(f++;f<=e;f++)if(d=p.byId(a[f]))d.set("focused",!0),d._focusManager==this&&d._onFocus(b),this.emit("widget-focus",d,b)}},focus:function(a){if(a)try{a.focus()}catch(b){}}}));a(function(){var a=x.registerWin(s.get(document));m("ie")&&b(window,"unload",function(){a&&(a.remove(),a=null)})});t.focus=function(a){x.focus(a)};for(var w in x)/^_/.test(w)||(t.focus[w]="function"==typeof x[w]?c.hitch(x,w):x[w]);x.watch(function(a,b,c){t.focus[a]=c});return x})},"dojo/window":function(){define("./_base/lang ./sniff ./_base/window ./dom ./dom-geometry ./dom-style ./dom-construct".split(" "),
function(k,l,h,g,f,d,e){l.add("rtl-adjust-position-for-verticalScrollBar",function(b,a){var c=h.body(a),d=e.create("div",{style:{overflow:"scroll",overflowX:"visible",direction:"rtl",visibility:"hidden",position:"absolute",left:"0",top:"0",width:"64px",height:"64px"}},c,"last"),q=e.create("div",{style:{overflow:"hidden",direction:"ltr"}},d,"last"),s=0!=f.position(q).x;d.removeChild(q);c.removeChild(d);return s});l.add("position-fixed-support",function(b,a){var c=h.body(a),d=e.create("span",{style:{visibility:"hidden",
position:"fixed",left:"1px",top:"1px"}},c,"last"),q=e.create("span",{style:{position:"fixed",left:"0",top:"0"}},d,"last"),s=f.position(q).x!=f.position(d).x;d.removeChild(q);c.removeChild(d);return s});var c={getBox:function(b){b=b||h.doc;var a="BackCompat"==b.compatMode?h.body(b):b.documentElement,d=f.docScroll(b);if(l("touch")){var e=c.get(b);b=e.innerWidth||a.clientWidth;a=e.innerHeight||a.clientHeight}else b=a.clientWidth,a=a.clientHeight;return{l:d.x,t:d.y,w:b,h:a}},get:function(b){if(l("ie")&&
c!==document.parentWindow){b.parentWindow.execScript("document._parentWindow \x3d window;","Javascript");var a=b._parentWindow;b._parentWindow=null;return a}return b.parentWindow||b.defaultView},scrollIntoView:function(b,a){try{b=g.byId(b);var c=b.ownerDocument||h.doc,e=h.body(c),q=c.documentElement||e.parentNode,s=l("ie")||l("trident"),r=l("webkit");if(!(b==e||b==q))if(!l("mozilla")&&(!s&&!r&&!l("opera")&&!l("trident")&&!l("edge"))&&"scrollIntoView"in b)b.scrollIntoView(!1);else{var p="BackCompat"==
c.compatMode,t=Math.min(e.clientWidth||q.clientWidth,q.clientWidth||e.clientWidth),k=Math.min(e.clientHeight||q.clientHeight,q.clientHeight||e.clientHeight),c=r||p?e:q,v=a||f.position(b),x=b.parentNode,r=function(a){return 6>=s||7==s&&p?!1:l("position-fixed-support")&&"fixed"==d.get(a,"position").toLowerCase()},w=this,y=function(a,b,c){"BODY"==a.tagName||"HTML"==a.tagName?w.get(a.ownerDocument).scrollBy(b,c):(b&&(a.scrollLeft+=b),c&&(a.scrollTop+=c))};if(!r(b))for(;x;){x==e&&(x=c);var z=f.position(x),
A=r(x),D="rtl"==d.getComputedStyle(x).direction.toLowerCase();if(x==c){z.w=t;z.h=k;if(c==q&&(s||l("trident"))&&D)z.x+=c.offsetWidth-z.w;z.x=0;z.y=0}else{var C=f.getPadBorderExtents(x);z.w-=C.w;z.h-=C.h;z.x+=C.l;z.y+=C.t;var B=x.clientWidth,I=z.w-B;0<B&&0<I&&(D&&l("rtl-adjust-position-for-verticalScrollBar")&&(z.x+=I),z.w=B);B=x.clientHeight;I=z.h-B;0<B&&0<I&&(z.h=B)}A&&(0>z.y&&(z.h+=z.y,z.y=0),0>z.x&&(z.w+=z.x,z.x=0),z.y+z.h>k&&(z.h=k-z.y),z.x+z.w>t&&(z.w=t-z.x));var M=v.x-z.x,K=v.y-z.y,G=M+v.w-z.w,
F=K+v.h-z.h,L,E;if(0<G*M&&(x.scrollLeft||x==c||x.scrollWidth>x.offsetHeight)){L=Math[0>M?"max":"min"](M,G);if(D&&(8==s&&!p||5<=l("trident")))L=-L;E=x.scrollLeft;y(x,L,0);L=x.scrollLeft-E;v.x-=L}if(0<F*K&&(x.scrollTop||x==c||x.scrollHeight>x.offsetHeight))L=Math.ceil(Math[0>K?"max":"min"](K,F)),E=x.scrollTop,y(x,0,L),L=x.scrollTop-E,v.y-=L;x=x!=c&&!A&&x.parentNode}}}catch(N){console.error("scrollIntoView: "+N),b.scrollIntoView(!1)}}};k.setObject("dojo.window",c);return c})},"dijit/a11y":function(){define("dojo/_base/array dojo/dom dojo/dom-attr dojo/dom-style dojo/_base/lang dojo/sniff ./main".split(" "),
function(k,l,h,g,f,d,e){var c={_isElementShown:function(b){var a=g.get(b);return"hidden"!=a.visibility&&"collapsed"!=a.visibility&&"none"!=a.display&&"hidden"!=h.get(b,"type")},hasDefaultTabStop:function(b){switch(b.nodeName.toLowerCase()){case "a":return h.has(b,"href");case "area":case "button":case "input":case "object":case "select":case "textarea":return!0;case "iframe":var a;try{var c=b.contentDocument;if("designMode"in c&&"on"==c.designMode)return!0;a=c.body}catch(d){try{a=b.contentWindow.document.body}catch(e){return!1}}return a&&
("true"==a.contentEditable||a.firstChild&&"true"==a.firstChild.contentEditable);default:return"true"==b.contentEditable}},effectiveTabIndex:function(b){return h.get(b,"disabled")?void 0:h.has(b,"tabIndex")?+h.get(b,"tabIndex"):c.hasDefaultTabStop(b)?0:void 0},isTabNavigable:function(b){return 0<=c.effectiveTabIndex(b)},isFocusable:function(b){return-1<=c.effectiveTabIndex(b)},_getTabNavigable:function(b){function a(a){return a&&"input"==a.tagName.toLowerCase()&&a.type&&"radio"==a.type.toLowerCase()&&
a.name&&a.name.toLowerCase()}var e,f,q,s,r,g,t={},k=c._isElementShown,l=c.effectiveTabIndex,x=function(b){for(b=b.firstChild;b;b=b.nextSibling)if(!(1!=b.nodeType||9>=d("ie")&&"HTML"!==b.scopeName||!k(b))){var c=l(b);if(0<=c){if(0==c)e||(e=b),f=b;else if(0<c){if(!q||c<s)s=c,q=b;if(!r||c>=g)g=c,r=b}c=a(b);h.get(b,"checked")&&c&&(t[c]=b)}"SELECT"!=b.nodeName.toUpperCase()&&x(b)}};k(b)&&x(b);return{first:t[a(e)]||e,last:t[a(f)]||f,lowest:t[a(q)]||q,highest:t[a(r)]||r}},getFirstInTabbingOrder:function(b,
a){var d=c._getTabNavigable(l.byId(b,a));return d.lowest?d.lowest:d.first},getLastInTabbingOrder:function(b,a){var d=c._getTabNavigable(l.byId(b,a));return d.last?d.last:d.highest}};f.mixin(e,c);return c})},"dojo/uacss":function(){define(["./dom-geometry","./_base/lang","./domReady","./sniff","./_base/window"],function(k,l,h,g,f){var d=f.doc.documentElement;f=g("ie");var e=g("trident"),c=g("opera"),b=Math.floor,a=g("ff"),m=k.boxModel.replace(/-/,""),c={dj_quirks:g("quirks"),dj_opera:c,dj_khtml:g("khtml"),
dj_webkit:g("webkit"),dj_safari:g("safari"),dj_chrome:g("chrome"),dj_edge:g("edge"),dj_gecko:g("mozilla"),dj_ios:g("ios"),dj_android:g("android")};f&&(c.dj_ie=!0,c["dj_ie"+b(f)]=!0,c.dj_iequirks=g("quirks"));e&&(c.dj_trident=!0,c["dj_trident"+b(e)]=!0);a&&(c["dj_ff"+b(a)]=!0);c["dj_"+m]=!0;var n="",q;for(q in c)c[q]&&(n+=q+" ");d.className=l.trim(d.className+" "+n);h(function(){if(!k.isBodyLtr()){var a="dj_rtl dijitRtl "+n.replace(/ /g,"-rtl ");d.className=l.trim(d.className+" "+a+"dj_rtl dijitRtl "+
n.replace(/ /g,"-rtl "))}});return g})},"dijit/hccss":function(){define(["dojo/dom-class","dojo/hccss","dojo/domReady","dojo/_base/window"],function(k,l,h,g){h(function(){l("highcontrast")&&k.add(g.body(),"dijit_a11y")});return l})},"dojo/hccss":function(){define("require ./_base/config ./dom-class ./dom-style ./has ./domReady ./_base/window".split(" "),function(k,l,h,g,f,d,e){f.add("highcontrast",function(){var c=e.doc.createElement("div");c.style.cssText="border: 1px solid; border-color:red green; position: absolute; height: 5px; top: -999px;background-image: url("+
(l.blankGif||k.toUrl("./resources/blank.gif"))+");";e.body().appendChild(c);var b=g.getComputedStyle(c),a=b.backgroundImage,b=b.borderTopColor==b.borderRightColor||a&&("none"==a||"url(invalid-url:)"==a);8>=f("ie")?c.outerHTML="":e.body().removeChild(c);return b});d(function(){f("highcontrast")&&h.add(e.body(),"dj_a11y")});return f})},"dijit/_Container":function(){define(["dojo/_base/array","dojo/_base/declare","dojo/dom-construct","dojo/_base/kernel"],function(k,l,h,g){return l("dijit._Container",
null,{buildRendering:function(){this.inherited(arguments);this.containerNode||(this.containerNode=this.domNode)},addChild:function(f,d){var e=this.containerNode;if(0<d){for(e=e.firstChild;0<d;)1==e.nodeType&&d--,e=e.nextSibling;e?d="before":(e=this.containerNode,d="last")}h.place(f.domNode,e,d);this._started&&!f._started&&f.startup()},removeChild:function(f){"number"==typeof f&&(f=this.getChildren()[f]);f&&(f=f.domNode)&&f.parentNode&&f.parentNode.removeChild(f)},hasChildren:function(){return 0<this.getChildren().length},
_getSiblingOfChild:function(f,d){var e=this.getChildren(),c=k.indexOf(e,f);return e[c+d]},getIndexOfChild:function(f){return k.indexOf(this.getChildren(),f)}})})},"dijit/layout/_ContentPaneResizeMixin":function(){define("dojo/_base/array dojo/_base/declare dojo/dom-class dojo/dom-geometry dojo/dom-style dojo/_base/lang dojo/query dojo/sniff ../registry ../Viewport ./utils".split(" "),function(k,l,h,g,f,d,e,c,b,a,m){return l("dijit.layout._ContentPaneResizeMixin",null,{doLayout:!0,isLayoutContainer:!0,
startup:function(){if(!this._started){var b=this.getParent();this._childOfLayoutWidget=b&&b.isLayoutContainer;this._needLayout=!this._childOfLayoutWidget;this.inherited(arguments);this._isShown()&&this._onShow();this._childOfLayoutWidget||this.own(a.on("resize",d.hitch(this,"resize")))}},_checkIfSingleChild:function(){var a=[],c=!1;e("\x3e *",this.containerNode).some(function(d){var e=b.byNode(d);e&&e.resize?a.push(e):!/script|link|style/i.test(d.nodeName)&&d.offsetHeight&&(c=!0)});this._singleChild=
1==a.length&&!c?a[0]:null;h.toggle(this.containerNode,this.baseClass+"SingleChild",!!this._singleChild)},resize:function(a,b){this._resizeCalled=!0;this._scheduleLayout(a,b)},_scheduleLayout:function(a,b){this._isShown()?this._layout(a,b):(this._needLayout=!0,this._changeSize=a,this._resultSize=b)},_layout:function(a,b){delete this._needLayout;!this._wasShown&&!1!==this.open&&this._onShow();a&&g.setMarginBox(this.domNode,a);var c=this.containerNode;if(c===this.domNode){var e=b||{};d.mixin(e,a||{});
if(!("h"in e)||!("w"in e))e=d.mixin(g.getMarginBox(c),e);this._contentBox=m.marginBox2contentBox(c,e)}else this._contentBox=g.getContentBox(c);this._layoutChildren()},_layoutChildren:function(){this.doLayout&&this._checkIfSingleChild();if(this._singleChild&&this._singleChild.resize){var a=this._contentBox||g.getContentBox(this.containerNode);this._singleChild.resize({w:a.w,h:a.h})}else for(var a=this.getChildren(),b,c=0;b=a[c++];)b.resize&&b.resize()},_isShown:function(){if(this._childOfLayoutWidget)return this._resizeCalled&&
"open"in this?this.open:this._resizeCalled;if("open"in this)return this.open;var a=this.domNode,b=this.domNode.parentNode;return"none"!=a.style.display&&"hidden"!=a.style.visibility&&!h.contains(a,"dijitHidden")&&b&&b.style&&"none"!=b.style.display},_onShow:function(){this._wasShown=!0;this._needLayout&&this._layout(this._changeSize,this._resultSize);this.inherited(arguments)}})})},"dijit/Viewport":function(){define(["dojo/Evented","dojo/on","dojo/domReady","dojo/sniff","dojo/window"],function(k,
l,h,g,f){var d=new k,e;h(function(){var c=f.getBox();d._rlh=l(window,"resize",function(){var a=f.getBox();c.h==a.h&&c.w==a.w||(c=a,d.emit("resize"))});if(8==g("ie")){var b=screen.deviceXDPI;setInterval(function(){screen.deviceXDPI!=b&&(b=screen.deviceXDPI,d.emit("resize"))},500)}g("ios")&&(l(document,"focusin",function(a){e=a.target}),l(document,"focusout",function(a){e=null}))});d.getEffectiveBox=function(c){c=f.getBox(c);var b=e&&e.tagName&&e.tagName.toLowerCase();if(g("ios")&&e&&!e.readOnly&&("textarea"==
b||"input"==b&&/^(color|email|number|password|search|tel|text|url)$/.test(e.type)))c.h*=0==orientation||180==orientation?0.66:0.4,b=e.getBoundingClientRect(),c.h=Math.max(c.h,b.top+b.height);return c};return d})},"dijit/layout/utils":function(){define(["dojo/_base/array","dojo/dom-class","dojo/dom-geometry","dojo/dom-style","dojo/_base/lang"],function(k,l,h,g,f){function d(c,b){var a=c.resize?c.resize(b):h.setMarginBox(c.domNode,b);a?f.mixin(c,a):(f.mixin(c,h.getMarginBox(c.domNode)),f.mixin(c,b))}
var e={marginBox2contentBox:function(c,b){var a=g.getComputedStyle(c),d=h.getMarginExtents(c,a),e=h.getPadBorderExtents(c,a);return{l:g.toPixelValue(c,a.paddingLeft),t:g.toPixelValue(c,a.paddingTop),w:b.w-(d.w+e.w),h:b.h-(d.h+e.h)}},layoutChildren:function(c,b,a,e,n){b=f.mixin({},b);l.add(c,"dijitLayoutContainer");a=k.filter(a,function(a){return"center"!=a.region&&"client"!=a.layoutAlign}).concat(k.filter(a,function(a){return"center"==a.region||"client"==a.layoutAlign}));k.forEach(a,function(a){var c=
a.domNode,f=a.region||a.layoutAlign;if(!f)throw Error("No region setting for "+a.id);var g=c.style;g.left=b.l+"px";g.top=b.t+"px";g.position="absolute";l.add(c,"dijitAlign"+(f.substring(0,1).toUpperCase()+f.substring(1)));c={};e&&e==a.id&&(c["top"==a.region||"bottom"==a.region?"h":"w"]=n);"leading"==f&&(f=a.isLeftToRight()?"left":"right");"trailing"==f&&(f=a.isLeftToRight()?"right":"left");"top"==f||"bottom"==f?(c.w=b.w,d(a,c),b.h-=a.h,"top"==f?b.t+=a.h:g.top=b.t+b.h+"px"):"left"==f||"right"==f?(c.h=
b.h,d(a,c),b.w-=a.w,"left"==f?b.l+=a.w:g.left=b.l+b.w+"px"):("client"==f||"center"==f)&&d(a,b)})}};f.setObject("dijit.layout.utils",e);return e})},"dojo/string":function(){define(["./_base/kernel","./_base/lang"],function(k,l){var h={};l.setObject("dojo.string",h);h.rep=function(g,f){if(0>=f||!g)return"";for(var d=[];;){f&1&&d.push(g);if(!(f>>=1))break;g+=g}return d.join("")};h.pad=function(g,f,d,e){d||(d="0");g=String(g);f=h.rep(d,Math.ceil((f-g.length)/d.length));return e?g+f:f+g};h.substitute=
function(g,f,d,e){e=e||k.global;d=d?l.hitch(e,d):function(c){return c};return g.replace(/\$\{([^\s\:\}]+)(?:\:([^\s\:\}]+))?\}/g,function(c,b,a){c=l.getObject(b,!1,f);a&&(c=l.getObject(a,!1,e).call(e,c,b));return d(c,b).toString()})};h.trim=String.prototype.trim?l.trim:function(g){g=g.replace(/^\s+/,"");for(var f=g.length-1;0<=f;f--)if(/\S/.test(g.charAt(f))){g=g.substring(0,f+1);break}return g};return h})},"dojo/i18n":function(){define("./_base/kernel require ./has ./_base/array ./_base/config ./_base/lang ./_base/xhr ./json module".split(" "),
function(k,l,h,g,f,d,e,c,b){h.add("dojo-preload-i18n-Api",1);e=k.i18n={};var a=/(^.*(^|\/)nls)(\/|$)([^\/]*)\/?([^\/]*)/,m=function(a,b,c,d){var e=[c+d];b=b.split("-");for(var f="",m=0;m<b.length;m++)if(f+=(f?"-":"")+b[m],!a||a[f])e.push(c+f+"/"+d),e.specificity=f;return e},n={},q=function(a,b,c){c=c?c.toLowerCase():k.locale;a=a.replace(/\./g,"/");b=b.replace(/\./g,"/");return/root/i.test(c)?a+"/nls/"+b:a+"/nls/"+c+"/"+b},s=k.getL10nName=function(a,c,d){return b.id+"!"+q(a,c,d)},r=function(a,b,c,
e,f,q){a([b],function(s){var g=d.clone(s.root||s.ROOT),r=m(!s._v1x&&s,f,c,e);a(r,function(){for(var a=1;a<r.length;a++)g=d.mixin(d.clone(g),arguments[a]);n[b+"/"+f]=g;g.$locale=r.specificity;q()})})},p=function(a){var b=f.extraLocale||[],b=d.isArray(b)?b:[b];b.push(a);return b},t=function(b,e,f){if(h("dojo-preload-i18n-Api")){var m=b.split("*"),q="preload"==m[1];q&&(n[b]||(n[b]=1,y(m[2],c.parse(m[3]),1,e)),f(1));if(!(m=q))x&&w.push([b,e,f]),m=x;if(m)return}b=a.exec(b);var s=b[1]+"/",t=b[5]||b[4],
l=s+t,m=(b=b[5]&&b[4])||k.locale||"",v=l+"/"+m;b=b?[m]:p(m);var u=b.length,A=function(){--u||f(d.delegate(n[v]))};g.forEach(b,function(a){var b=l+"/"+a;h("dojo-preload-i18n-Api")&&z(b);n[b]?A():r(e,l,s,t,a,A)})};if(h("dojo-unit-tests"))var u=e.unitTests=[];h("dojo-preload-i18n-Api");var v=e.normalizeLocale=function(a){a=a?a.toLowerCase():k.locale;return"root"==a?"ROOT":a},x=0,w=[],y=e._preloadLocalizations=function(a,b,c,e){function f(a,b){e([a],b)}function m(a,b){for(var c=a.split("-");c.length;){if(b(c.join("-")))return;
c.pop()}b("ROOT")}function q(){for(--x;!x&&w.length;)t.apply(null,w.shift())}function s(c){c=v(c);m(c,function(s){if(0<=g.indexOf(b,s)){var r=a.replace(/\./g,"/")+"_"+s;x++;f(r,function(a){for(var b in a){var f=a[b],g=b.match(/(.+)\/([^\/]+)$/),r;if(g&&(r=g[2],g=g[1]+"/",f._localized)){var h;if("ROOT"===s){var p=h=f._localized;delete f._localized;p.root=f;n[l.toAbsMid(b)]=p}else h=f._localized,n[l.toAbsMid(g+r+"/"+s)]=f;s!==c&&function(a,b,f,s){var g=[],r=[];m(c,function(c){s[c]&&(g.push(l.toAbsMid(a+
c+"/"+b)),r.push(l.toAbsMid(a+b+"/"+c)))});g.length?(x++,e(g,function(){for(var e=g.length-1;0<=e;e--)f=d.mixin(d.clone(f),arguments[e]),n[r[e]]=f;n[l.toAbsMid(a+b+"/"+c)]=d.clone(f);q()})):n[l.toAbsMid(a+b+"/"+c)]=f}(g,r,f,h)}}q()});return!0}return!1})}e=e||l;s();g.forEach(k.config.extraLocale,s)},z=function(){},A={},D=new Function("__bundle","__checkForLegacyModules","__mid","__amdValue","var define \x3d function(mid, factory){define.called \x3d 1; __amdValue.result \x3d factory || mid;},\t   require \x3d function(){define.called \x3d 1;};try{define.called \x3d 0;eval(__bundle);if(define.called\x3d\x3d1)return __amdValue;if((__checkForLegacyModules \x3d __checkForLegacyModules(__mid)))return __checkForLegacyModules;}catch(e){}try{return eval('('+__bundle+')');}catch(e){return e;}"),
z=function(a){for(var b,c=a.split("/"),d=k.global[c[0]],e=1;d&&e<c.length-1;d=d[c[e++]]);d&&((b=d[c[e]])||(b=d[c[e].replace(/-/g,"_")]),b&&(n[a]=b));return b};e.getLocalization=function(a,b,c){var d;a=q(a,b,c);t(a,l,function(a){d=a});return d};h("dojo-unit-tests")&&u.push(function(a){a.register("tests.i18n.unit",function(a){var b;b=D("{prop:1}",z,"nonsense",A);a.is({prop:1},b);a.is(void 0,b[1]);b=D("({prop:1})",z,"nonsense",A);a.is({prop:1},b);a.is(void 0,b[1]);b=D("{'prop-x':1}",z,"nonsense",A);
a.is({"prop-x":1},b);a.is(void 0,b[1]);b=D("({'prop-x':1})",z,"nonsense",A);a.is({"prop-x":1},b);a.is(void 0,b[1]);b=D("define({'prop-x':1})",z,"nonsense",A);a.is(A,b);a.is({"prop-x":1},A.result);b=D("define('some/module', {'prop-x':1})",z,"nonsense",A);a.is(A,b);a.is({"prop-x":1},A.result);b=D("this is total nonsense and should throw an error",z,"nonsense",A);a.is(b instanceof Error,!0)})});return d.mixin(e,{dynamic:!0,normalize:function(a,b){return/^\./.test(a)?b(a):a},load:t,cache:n,getL10nName:s})})},
"dojo/_base/xhr":function(){define("./kernel ./sniff require ../io-query ../dom ../dom-form ./Deferred ./config ./json ./lang ./array ../on ../aspect ../request/watch ../request/xhr ../request/util".split(" "),function(k,l,h,g,f,d,e,c,b,a,m,n,q,s,r,p){k._xhrObj=r._create;var t=k.config;k.objectToQuery=g.objectToQuery;k.queryToObject=g.queryToObject;k.fieldToObject=d.fieldToObject;k.formToObject=d.toObject;k.formToQuery=d.toQuery;k.formToJson=d.toJson;k._blockAsync=!1;var u=k._contentHandlers=k.contentHandlers=
{text:function(a){return a.responseText},json:function(a){return b.fromJson(a.responseText||null)},"json-comment-filtered":function(a){c.useCommentedJson||console.warn("Consider using the standard mimetype:application/json. json-commenting can introduce security issues. To decrease the chances of hijacking, use the standard the 'json' handler and prefix your json with: {}\x26\x26\nUse djConfig.useCommentedJson\x3dtrue to turn off this message.");a=a.responseText;var d=a.indexOf("/*"),e=a.lastIndexOf("*/");
if(-1==d||-1==e)throw Error("JSON was not comment filtered");return b.fromJson(a.substring(d+2,e))},javascript:function(a){return k.eval(a.responseText)},xml:function(a){var b=a.responseXML;b&&(l("dom-qsa2.1")&&!b.querySelectorAll&&l("dom-parser"))&&(b=(new DOMParser).parseFromString(a.responseText,"application/xml"));if(l("ie")&&(!b||!b.documentElement)){var c=function(a){return"MSXML"+a+".DOMDocument"},c=["Microsoft.XMLDOM",c(6),c(4),c(3),c(2)];m.some(c,function(c){try{var d=new ActiveXObject(c);
d.async=!1;d.loadXML(a.responseText);b=d}catch(e){return!1}return!0})}return b},"json-comment-optional":function(a){return a.responseText&&/^[^{\[]*\/\*/.test(a.responseText)?u["json-comment-filtered"](a):u.json(a)}};k._ioSetArgs=function(b,c,m,n){var q={args:b,url:b.url},s=null;if(b.form){var s=f.byId(b.form),r=s.getAttributeNode("action");q.url=q.url||(r?r.value:null);s=d.toObject(s)}r=[{}];s&&r.push(s);b.content&&r.push(b.content);b.preventCache&&r.push({"dojo.preventCache":(new Date).valueOf()});
q.query=g.objectToQuery(a.mixin.apply(null,r));q.handleAs=b.handleAs||"text";var h=new e(function(a){a.canceled=!0;c&&c(a);var b=a.ioArgs.error;b||(b=Error("request cancelled"),b.dojoType="cancel",a.ioArgs.error=b);return b});h.addCallback(m);var p=b.load;p&&a.isFunction(p)&&h.addCallback(function(a){return p.call(b,a,q)});var y=b.error;y&&a.isFunction(y)&&h.addErrback(function(a){return y.call(b,a,q)});var w=b.handle;w&&a.isFunction(w)&&h.addBoth(function(a){return w.call(b,a,q)});h.addErrback(function(a){return n(a,
h)});t.ioPublish&&(k.publish&&!1!==q.args.ioPublish)&&(h.addCallbacks(function(a){k.publish("/dojo/io/load",[h,a]);return a},function(a){k.publish("/dojo/io/error",[h,a]);return a}),h.addBoth(function(a){k.publish("/dojo/io/done",[h,a]);return a}));h.ioArgs=q;return h};var v=function(a){a=u[a.ioArgs.handleAs](a.ioArgs.xhr);return void 0===a?null:a},x=function(a,b){b.ioArgs.args.failOk||console.error(a);return a},w=function(a){0>=y&&(y=0,t.ioPublish&&(k.publish&&(!a||a&&!1!==a.ioArgs.args.ioPublish))&&
k.publish("/dojo/io/stop"))},y=0;q.after(s,"_onAction",function(){y-=1});q.after(s,"_onInFlight",w);k._ioCancelAll=s.cancelAll;k._ioNotifyStart=function(a){t.ioPublish&&(k.publish&&!1!==a.ioArgs.args.ioPublish)&&(y||k.publish("/dojo/io/start"),y+=1,k.publish("/dojo/io/send",[a]))};k._ioWatch=function(b,c,d,e){b.ioArgs.options=b.ioArgs.args;a.mixin(b,{response:b.ioArgs,isValid:function(a){return c(b)},isReady:function(a){return d(b)},handleResponse:function(a){return e(b)}});s(b);w(b)};k._ioAddQueryToUrl=
function(a){a.query.length&&(a.url+=(-1==a.url.indexOf("?")?"?":"\x26")+a.query,a.query=null)};k.xhr=function(a,b,c){var d,e=k._ioSetArgs(b,function(a){d&&d.cancel()},v,x),f=e.ioArgs;"postData"in b?f.query=b.postData:"putData"in b?f.query=b.putData:"rawBody"in b?f.query=b.rawBody:(2<arguments.length&&!c||-1==="POST|PUT".indexOf(a.toUpperCase()))&&k._ioAddQueryToUrl(f);var m={method:a,handleAs:"text",timeout:b.timeout,withCredentials:b.withCredentials,ioArgs:f};"undefined"!==typeof b.headers&&(m.headers=
b.headers);"undefined"!==typeof b.contentType&&(m.headers||(m.headers={}),m.headers["Content-Type"]=b.contentType);"undefined"!==typeof f.query&&(m.data=f.query);"undefined"!==typeof b.sync&&(m.sync=b.sync);k._ioNotifyStart(e);try{d=r(f.url,m,!0)}catch(n){return e.cancel(),e}e.ioArgs.xhr=d.response.xhr;d.then(function(){e.resolve(e)}).otherwise(function(a){f.error=a;a.response&&(a.status=a.response.status,a.responseText=a.response.text,a.xhr=a.response.xhr);e.reject(a)});return e};k.xhrGet=function(a){return k.xhr("GET",
a)};k.rawXhrPost=k.xhrPost=function(a){return k.xhr("POST",a,!0)};k.rawXhrPut=k.xhrPut=function(a){return k.xhr("PUT",a,!0)};k.xhrDelete=function(a){return k.xhr("DELETE",a)};k._isDocumentOk=function(a){return p.checkStatus(a.status)};k._getText=function(a){var b;k.xhrGet({url:a,sync:!0,load:function(a){b=a}});return b};a.mixin(k.xhr,{_xhrObj:k._xhrObj,fieldToObject:d.fieldToObject,formToObject:d.toObject,objectToQuery:g.objectToQuery,formToQuery:d.toQuery,formToJson:d.toJson,queryToObject:g.queryToObject,
contentHandlers:u,_ioSetArgs:k._ioSetArgs,_ioCancelAll:k._ioCancelAll,_ioNotifyStart:k._ioNotifyStart,_ioWatch:k._ioWatch,_ioAddQueryToUrl:k._ioAddQueryToUrl,_isDocumentOk:k._isDocumentOk,_getText:k._getText,get:k.xhrGet,post:k.xhrPost,put:k.xhrPut,del:k.xhrDelete});return k.xhr})},"dojo/dom-form":function(){define(["./_base/lang","./dom","./io-query","./json"],function(k,l,h,g){var f={fieldToObject:function(d){var e=null;if(d=l.byId(d)){var c=d.name,b=(d.type||"").toLowerCase();if(c&&b&&!d.disabled)if("radio"==
b||"checkbox"==b)d.checked&&(e=d.value);else if(d.multiple){e=[];for(d=[d.firstChild];d.length;)for(c=d.pop();c;c=c.nextSibling)if(1==c.nodeType&&"option"==c.tagName.toLowerCase())c.selected&&e.push(c.value);else{c.nextSibling&&d.push(c.nextSibling);c.firstChild&&d.push(c.firstChild);break}}else e=d.value}return e},toObject:function(d){var e={};d=l.byId(d).elements;for(var c=0,b=d.length;c<b;++c){var a=d[c],m=a.name,n=(a.type||"").toLowerCase();if(m&&n&&0>"file|submit|image|reset|button".indexOf(n)&&
!a.disabled){var q=e,s=m,a=f.fieldToObject(a);if(null!==a){var g=q[s];"string"==typeof g?q[s]=[g,a]:k.isArray(g)?g.push(a):q[s]=a}"image"==n&&(e[m+".x"]=e[m+".y"]=e[m].x=e[m].y=0)}}return e},toQuery:function(d){return h.objectToQuery(f.toObject(d))},toJson:function(d,e){return g.stringify(f.toObject(d),null,e?4:0)}};return f})},"dojo/json":function(){define(["./has"],function(k){var l="undefined"!=typeof JSON;k.add("json-parse",l);k.add("json-stringify",l&&'{"a":1}'==JSON.stringify({a:0},function(g,
f){return f||1}));if(k("json-stringify"))return JSON;var h=function(g){return('"'+g.replace(/(["\\])/g,"\\$1")+'"').replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r")};return{parse:k("json-parse")?JSON.parse:function(g,f){if(f&&!/^([\s\[\{]*(?:"(?:\\.|[^"])*"|-?\d[\d\.]*(?:[Ee][+-]?\d+)?|null|true|false|)[\s\]\}]*(?:,|:|$))+$/.test(g))throw new SyntaxError("Invalid characters in JSON");return eval("("+g+")")},stringify:function(g,f,d){function e(b,
a,m){f&&(b=f(m,b));var n;n=typeof b;if("number"==n)return isFinite(b)?b+"":"null";if("boolean"==n)return b+"";if(null===b)return"null";if("string"==typeof b)return h(b);if("function"==n||"undefined"==n)return c;if("function"==typeof b.toJSON)return e(b.toJSON(m),a,m);if(b instanceof Date)return'"{FullYear}-{Month+}-{Date}T{Hours}:{Minutes}:{Seconds}Z"'.replace(/\{(\w+)(\+)?\}/g,function(a,c,d){a=b["getUTC"+c]()+(d?1:0);return 10>a?"0"+a:a});if(b.valueOf()!==b)return e(b.valueOf(),a,m);var q=d?a+d:
"",s=d?" ":"",g=d?"\n":"";if(b instanceof Array){var s=b.length,p=[];for(m=0;m<s;m++)n=e(b[m],q,m),"string"!=typeof n&&(n="null"),p.push(g+q+n);return"["+p.join(",")+g+a+"]"}p=[];for(m in b){var t;if(b.hasOwnProperty(m)){if("number"==typeof m)t='"'+m+'"';else if("string"==typeof m)t=h(m);else continue;n=e(b[m],q,m);"string"==typeof n&&p.push(g+q+t+":"+s+n)}}return"{"+p.join(",")+g+a+"}"}var c;"string"==typeof f&&(d=f,f=null);return e(g,"","")}}})},"dojo/_base/json":function(){define(["./kernel","../json"],
function(k,l){k.fromJson=function(h){return eval("("+h+")")};k._escapeString=l.stringify;k.toJsonIndentStr="\t";k.toJson=function(h,g){return l.stringify(h,function(f,d){if(d){var e=d.__json__||d.json;if("function"==typeof e)return e.call(d)}return d},g&&k.toJsonIndentStr)};return k})},"dojo/request/watch":function(){define("./util ../errors/RequestTimeoutError ../errors/CancelError ../_base/array ../_base/window ../has!host-browser?dom-addeventlistener?:../on:".split(" "),function(k,l,h,g,f,d){function e(){for(var d=
+new Date,e=0,f;e<a.length&&(f=a[e]);e++){var s=f.response,g=s.options;if(f.isCanceled&&f.isCanceled()||f.isValid&&!f.isValid(s))a.splice(e--,1),c._onAction&&c._onAction();else if(f.isReady&&f.isReady(s))a.splice(e--,1),f.handleResponse(s),c._onAction&&c._onAction();else if(f.startTime&&f.startTime+(g.timeout||0)<d)a.splice(e--,1),f.cancel(new l("Timeout exceeded",s)),c._onAction&&c._onAction()}c._onInFlight&&c._onInFlight(f);a.length||(clearInterval(b),b=null)}function c(c){c.response.options.timeout&&
(c.startTime=+new Date);c.isFulfilled()||(a.push(c),b||(b=setInterval(e,50)),c.response.options.sync&&e())}var b=null,a=[];c.cancelAll=function(){try{g.forEach(a,function(a){try{a.cancel(new h("All requests canceled."))}catch(b){}})}catch(b){}};f&&(d&&f.doc.attachEvent)&&d(f.global,"unload",function(){c.cancelAll()});return c})},"dojo/request/util":function(){define("exports ../errors/RequestError ../errors/CancelError ../Deferred ../io-query ../_base/array ../_base/lang ../promise/Promise".split(" "),
function(k,l,h,g,f,d,e,c){function b(a){return m(a)}function a(a){return void 0!==a.data?a.data:a.text}k.deepCopy=function(a,b){for(var c in b){var d=a[c],e=b[c];d!==e&&(d&&"object"===typeof d&&e&&"object"===typeof e?k.deepCopy(d,e):a[c]=e)}return a};k.deepCreate=function(a,b){b=b||{};var c=e.delegate(a),d,f;for(d in a)(f=a[d])&&"object"===typeof f&&(c[d]=k.deepCreate(f,b[d]));return k.deepCopy(c,b)};var m=Object.freeze||function(a){return a};k.deferred=function(d,f,s,r,p,t){var u=new g(function(a){f&&
f(u,d);return!a||!(a instanceof l)&&!(a instanceof h)?new h("Request canceled",d):a});u.response=d;u.isValid=s;u.isReady=r;u.handleResponse=p;s=u.then(b).otherwise(function(a){a.response=d;throw a;});k.notify&&s.then(e.hitch(k.notify,"emit","load"),e.hitch(k.notify,"emit","error"));r=s.then(a);p=new c;for(var v in r)r.hasOwnProperty(v)&&(p[v]=r[v]);p.response=s;m(p);t&&u.then(function(a){t.call(u,a)},function(a){t.call(u,d,a)});u.promise=p;u.then=p.then;return u};k.addCommonMethods=function(a,b){d.forEach(b||
["GET","POST","PUT","DELETE"],function(b){a[("DELETE"===b?"DEL":b).toLowerCase()]=function(c,d){d=e.delegate(d||{});d.method=b;return a(c,d)}})};k.parseArgs=function(a,b,c){var d=b.data,e=b.query;d&&!c&&"object"===typeof d&&(b.data=f.objectToQuery(d));e?("object"===typeof e&&(e=f.objectToQuery(e)),b.preventCache&&(e+=(e?"\x26":"")+"request.preventCache\x3d"+ +new Date)):b.preventCache&&(e="request.preventCache\x3d"+ +new Date);a&&e&&(a+=(~a.indexOf("?")?"\x26":"?")+e);return{url:a,options:b,getHeader:function(a){return null}}};
k.checkStatus=function(a){a=a||0;return 200<=a&&300>a||304===a||1223===a||!a}})},"dojo/errors/RequestError":function(){define(["./create"],function(k){return k("RequestError",function(k,h){this.response=h})})},"dojo/errors/RequestTimeoutError":function(){define(["./create","./RequestError"],function(k,l){return k("RequestTimeoutError",null,l,{dojoType:"timeout"})})},"dojo/request/xhr":function(){define(["../errors/RequestError","./watch","./handlers","./util","../has"],function(k,l,h,g,f){function d(a,
b){var c=a.xhr;a.status=a.xhr.status;a.text=c.responseText;"xml"===a.options.handleAs&&(a.data=c.responseXML);if(!b)try{h(a)}catch(d){b=d}b?this.reject(b):g.checkStatus(c.status)?this.resolve(a):(b=new k("Unable to load "+a.url+" status: "+c.status,a),this.reject(b))}function e(a){return this.xhr.getResponseHeader(a)}function c(h,r,p){var x=g.parseArgs(h,g.deepCreate(s,r),f("native-formdata")&&r&&r.data&&r.data instanceof FormData);h=x.url;r=x.options;var w,y=g.deferred(x,n,b,a,d,function(){w&&w()}),
z=x.xhr=c._create();if(!z)return y.cancel(new k("XHR was not created")),p?y:y.promise;x.getHeader=e;m&&(w=m(z,y,x));var A=r.data,D=!r.sync,C=r.method;try{z.open(C,h,D,r.user||q,r.password||q);r.withCredentials&&(z.withCredentials=r.withCredentials);var B=r.headers;h="application/x-www-form-urlencoded";if(B)for(var I in B)"content-type"===I.toLowerCase()?h=B[I]:B[I]&&z.setRequestHeader(I,B[I]);h&&!1!==h&&z.setRequestHeader("Content-Type",h);(!B||!("X-Requested-With"in B))&&z.setRequestHeader("X-Requested-With",
"XMLHttpRequest");g.notify&&g.notify.emit("send",x,y.promise.cancel);z.send(A)}catch(M){y.reject(M)}l(y);z=null;return p?y:y.promise}f.add("native-xhr",function(){return"undefined"!==typeof XMLHttpRequest});f.add("dojo-force-activex-xhr",function(){return f("activex")&&"file:"===window.location.protocol});f.add("native-xhr2",function(){if(f("native-xhr")&&!f("dojo-force-activex-xhr")){var a=new XMLHttpRequest;return"undefined"!==typeof a.addEventListener&&("undefined"===typeof opera||"undefined"!==
typeof a.upload)}});f.add("native-formdata",function(){return"undefined"!==typeof FormData});var b,a,m,n;f("native-xhr2")?(b=function(a){return!this.isFulfilled()},n=function(a,b){b.xhr.abort()},m=function(a,b,c){function d(a){b.handleResponse(c)}function e(a){a=new k("Unable to load "+c.url+" status: "+a.target.status,c);b.handleResponse(c,a)}function f(a){a.lengthComputable&&(c.loaded=a.loaded,c.total=a.total,b.progress(c))}a.addEventListener("load",d,!1);a.addEventListener("error",e,!1);a.addEventListener("progress",
f,!1);return function(){a.removeEventListener("load",d,!1);a.removeEventListener("error",e,!1);a.removeEventListener("progress",f,!1);a=null}}):(b=function(a){return a.xhr.readyState},a=function(a){return 4===a.xhr.readyState},n=function(a,b){var c=b.xhr,d=typeof c.abort;("function"===d||"object"===d||"unknown"===d)&&c.abort()});var q,s={data:null,query:null,sync:!1,method:"GET"};c._create=function(){throw Error("XMLHTTP not available");};if(f("native-xhr")&&!f("dojo-force-activex-xhr"))c._create=
function(){return new XMLHttpRequest};else if(f("activex"))try{new ActiveXObject("Msxml2.XMLHTTP"),c._create=function(){return new ActiveXObject("Msxml2.XMLHTTP")}}catch(r){try{new ActiveXObject("Microsoft.XMLHTTP"),c._create=function(){return new ActiveXObject("Microsoft.XMLHTTP")}}catch(p){}}g.addCommonMethods(c);return c})},"dojo/request/handlers":function(){define(["../json","../_base/kernel","../_base/array","../has","../selector/_loader"],function(k,l,h,g){function f(b){var a=c[b.options.handleAs];
b.data=a?a(b):b.data||b.text;return b}g.add("activex","undefined"!==typeof ActiveXObject);g.add("dom-parser",function(b){return"DOMParser"in b});var d;if(g("activex")){var e=["Msxml2.DOMDocument.6.0","Msxml2.DOMDocument.4.0","MSXML2.DOMDocument.3.0","MSXML.DOMDocument"];d=function(b){var a=b.data;a&&(g("dom-qsa2.1")&&!a.querySelectorAll&&g("dom-parser"))&&(a=(new DOMParser).parseFromString(b.text,"application/xml"));if(!a||!a.documentElement){var c=b.text;h.some(e,function(b){try{var d=new ActiveXObject(b);
d.async=!1;d.loadXML(c);a=d}catch(e){return!1}return!0})}return a}}var c={javascript:function(b){return l.eval(b.text||"")},json:function(b){return k.parse(b.text||null)},xml:d};f.register=function(b,a){c[b]=a};return f})},"dijit/layout/BorderContainer":function(){define("dojo/_base/array dojo/cookie dojo/_base/declare dojo/dom-class dojo/dom-construct dojo/dom-geometry dojo/dom-style dojo/keys dojo/_base/lang dojo/on dojo/touch ../_WidgetBase ../_Widget ../_TemplatedMixin ./LayoutContainer ./utils".split(" "),
function(k,l,h,g,f,d,e,c,b,a,m,n,q,s,r,p){var t=h("dijit.layout._Splitter",[q,s],{live:!0,templateString:'\x3cdiv class\x3d"dijitSplitter" data-dojo-attach-event\x3d"onkeydown:_onKeyDown,press:_startDrag,onmouseenter:_onMouse,onmouseleave:_onMouse" tabIndex\x3d"0" role\x3d"separator"\x3e\x3cdiv class\x3d"dijitSplitterThumb"\x3e\x3c/div\x3e\x3c/div\x3e',constructor:function(){this._handlers=[]},postMixInProperties:function(){this.inherited(arguments);this.horizontal=/top|bottom/.test(this.region);
this._factor=/top|left/.test(this.region)?1:-1;this._cookieName=this.container.id+"_"+this.region},buildRendering:function(){this.inherited(arguments);g.add(this.domNode,"dijitSplitter"+(this.horizontal?"H":"V"));if(this.container.persist){var a=l(this._cookieName);a&&(this.child.domNode.style[this.horizontal?"height":"width"]=a)}},_computeMaxSize:function(){var a=this.horizontal?"h":"w",b=d.getMarginBox(this.child.domNode)[a],c=k.filter(this.container.getChildren(),function(a){return"center"==a.region})[0],
a=d.getContentBox(c.domNode)[a]-10;return Math.min(this.child.maxSize,b+a)},_startDrag:function(c){this.cover||(this.cover=f.place("\x3cdiv class\x3ddijitSplitterCover\x3e\x3c/div\x3e",this.child.domNode,"after"));g.add(this.cover,"dijitSplitterCoverActive");this.fake&&f.destroy(this.fake);if(!(this._resize=this.live))(this.fake=this.domNode.cloneNode(!0)).removeAttribute("id"),g.add(this.domNode,"dijitSplitterShadow"),f.place(this.fake,this.domNode,"after");g.add(this.domNode,"dijitSplitterActive dijitSplitter"+
(this.horizontal?"H":"V")+"Active");this.fake&&g.remove(this.fake,"dijitSplitterHover dijitSplitter"+(this.horizontal?"H":"V")+"Hover");var n=this._factor,q=this.horizontal,s=q?"pageY":"pageX",h=c[s],r=this.domNode.style,q=q?"h":"w",p=e.getComputedStyle(this.child.domNode),k=d.getMarginBox(this.child.domNode,p)[q],t=this._computeMaxSize(),l=Math.max(this.child.minSize,d.getPadBorderExtents(this.child.domNode,p)[q]+10),q=this.region,u="top"==q||"bottom"==q?"top":"left",K=parseInt(r[u],10),G=this._resize,
F=b.hitch(this.container,"_layoutChildren",this.child.id),q=this.ownerDocument;this._handlers=this._handlers.concat([a(q,m.move,this._drag=function(a,b){var c=a[s]-h,d=n*c+k,e=Math.max(Math.min(d,t),l);(G||b)&&F(e);r[u]=c+K+n*(e-d)+"px"}),a(q,"dragstart",function(a){a.stopPropagation();a.preventDefault()}),a(this.ownerDocumentBody,"selectstart",function(a){a.stopPropagation();a.preventDefault()}),a(q,m.release,b.hitch(this,"_stopDrag"))]);c.stopPropagation();c.preventDefault()},_onMouse:function(a){a=
"mouseover"==a.type||"mouseenter"==a.type;g.toggle(this.domNode,"dijitSplitterHover",a);g.toggle(this.domNode,"dijitSplitter"+(this.horizontal?"H":"V")+"Hover",a)},_stopDrag:function(a){try{this.cover&&g.remove(this.cover,"dijitSplitterCoverActive"),this.fake&&f.destroy(this.fake),g.remove(this.domNode,"dijitSplitterActive dijitSplitter"+(this.horizontal?"H":"V")+"Active dijitSplitterShadow"),this._drag(a),this._drag(a,!0)}finally{this._cleanupHandlers(),delete this._drag}this.container.persist&&
l(this._cookieName,this.child.domNode.style[this.horizontal?"height":"width"],{expires:365})},_cleanupHandlers:function(){for(var a;a=this._handlers.pop();)a.remove()},_onKeyDown:function(a){this._resize=!0;var b=this.horizontal,e=1;switch(a.keyCode){case b?c.UP_ARROW:c.LEFT_ARROW:e*=-1;case b?c.DOWN_ARROW:c.RIGHT_ARROW:break;default:return}b=d.getMarginSize(this.child.domNode)[b?"h":"w"]+this._factor*e;this.container._layoutChildren(this.child.id,Math.max(Math.min(b,this._computeMaxSize()),this.child.minSize));
a.stopPropagation();a.preventDefault()},destroy:function(){this._cleanupHandlers();delete this.child;delete this.container;delete this.cover;delete this.fake;this.inherited(arguments)}}),u=h("dijit.layout._Gutter",[q,s],{templateString:'\x3cdiv class\x3d"dijitGutter" role\x3d"presentation"\x3e\x3c/div\x3e',postMixInProperties:function(){this.inherited(arguments);this.horizontal=/top|bottom/.test(this.region)},buildRendering:function(){this.inherited(arguments);g.add(this.domNode,"dijitGutter"+(this.horizontal?
"H":"V"))}});h=h("dijit.layout.BorderContainer",r,{gutters:!0,liveSplitters:!0,persist:!1,baseClass:"dijitBorderContainer",_splitterClass:t,postMixInProperties:function(){this.gutters||(this.baseClass+="NoGutter");this.inherited(arguments)},_setupChild:function(a){this.inherited(arguments);var c=a.region,d=a.isLeftToRight();"leading"==c&&(c=d?"left":"right");"trailing"==c&&(c=d?"right":"left");if(c&&"center"!=c&&(a.splitter||this.gutters)&&!a._splitterWidget)d=a.splitter?this._splitterClass:u,b.isString(d)&&
(d=b.getObject(d)),d=new d({id:a.id+"_splitter",container:this,child:a,region:c,live:this.liveSplitters}),d.isSplitter=!0,a._splitterWidget=d,c="bottom"==c||c==(this.isLeftToRight()?"right":"left"),f.place(d.domNode,a.domNode,c?"before":"after"),d.startup()},layout:function(){this._layoutChildren()},removeChild:function(a){var b=a._splitterWidget;b&&(b.destroy(),delete a._splitterWidget);this.inherited(arguments)},getChildren:function(){return k.filter(this.inherited(arguments),function(a){return!a.isSplitter})},
getSplitter:function(a){return k.filter(this.getChildren(),function(b){return b.region==a})[0]._splitterWidget},resize:function(a,b){if(!this.cs||!this.pe){var c=this.domNode;this.cs=e.getComputedStyle(c);this.pe=d.getPadExtents(c,this.cs);this.pe.r=e.toPixelValue(c,this.cs.paddingRight);this.pe.b=e.toPixelValue(c,this.cs.paddingBottom);e.set(c,"padding","0px")}this.inherited(arguments)},_layoutChildren:function(a,b){if(this._borderBox&&this._borderBox.h){var c=[];k.forEach(this._getOrderedChildren(),
function(a){c.push(a);a._splitterWidget&&c.push(a._splitterWidget)});p.layoutChildren(this.domNode,{l:this.pe.l,t:this.pe.t,w:this._borderBox.w-this.pe.w,h:this._borderBox.h-this.pe.h},c,a,b)}},destroyRecursive:function(){k.forEach(this.getChildren(),function(a){var b=a._splitterWidget;b&&b.destroy();delete a._splitterWidget});this.inherited(arguments)}});h.ChildWidgetProperties={splitter:!1,minSize:0,maxSize:Infinity};b.mixin(h.ChildWidgetProperties,r.ChildWidgetProperties);b.extend(n,h.ChildWidgetProperties);
h._Splitter=t;h._Gutter=u;return h})},"dojo/cookie":function(){define(["./_base/kernel","./regexp"],function(k,l){k.cookie=function(h,g,f){var d=document.cookie,e;if(1==arguments.length)e=(e=d.match(RegExp("(?:^|; )"+l.escapeString(h)+"\x3d([^;]*)")))?decodeURIComponent(e[1]):void 0;else{f=f||{};d=f.expires;if("number"==typeof d){var c=new Date;c.setTime(c.getTime()+864E5*d);d=f.expires=c}d&&d.toUTCString&&(f.expires=d.toUTCString());g=encodeURIComponent(g);var d=h+"\x3d"+g,b;for(b in f)d+="; "+b,
c=f[b],!0!==c&&(d+="\x3d"+c);document.cookie=d}return e};k.cookie.isSupported=function(){"cookieEnabled"in navigator||(this("__djCookieTest__","CookiesAllowed"),navigator.cookieEnabled="CookiesAllowed"==this("__djCookieTest__"),navigator.cookieEnabled&&this("__djCookieTest__","",{expires:-1}));return navigator.cookieEnabled};return k.cookie})},"dojo/regexp":function(){define(["./_base/kernel","./_base/lang"],function(k,l){var h={};l.setObject("dojo.regexp",h);h.escapeString=function(g,f){return g.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,
function(d){return f&&-1!=f.indexOf(d)?d:"\\"+d})};h.buildGroupRE=function(g,f,d){if(!(g instanceof Array))return f(g);for(var e=[],c=0;c<g.length;c++)e.push(f(g[c]));return h.group(e.join("|"),d)};h.group=function(g,f){return"("+(f?"?:":"")+g+")"};return h})},"dijit/_TemplatedMixin":function(){define("dojo/cache dojo/_base/declare dojo/dom-construct dojo/_base/lang dojo/on dojo/sniff dojo/string ./_AttachMixin".split(" "),function(k,l,h,g,f,d,e,c){var b=l("dijit._TemplatedMixin",c,{templateString:null,
templatePath:null,_skipNodeCache:!1,searchContainerNode:!0,_stringRepl:function(a){var b=this.declaredClass,c=this;return e.substitute(a,this,function(a,d){"!"==d.charAt(0)&&(a=g.getObject(d.substr(1),!1,c));if("undefined"==typeof a)throw Error(b+" template:"+d);return null==a?"":"!"==d.charAt(0)?a:a.toString().replace(/"/g,"\x26quot;")},this)},buildRendering:function(){if(!this._rendered){this.templateString||(this.templateString=k(this.templatePath,{sanitize:!0}));var a=b.getCachedTemplate(this.templateString,
this._skipNodeCache,this.ownerDocument),c;if(g.isString(a)){if(c=h.toDom(this._stringRepl(a),this.ownerDocument),1!=c.nodeType)throw Error("Invalid template: "+a);}else c=a.cloneNode(!0);this.domNode=c}this.inherited(arguments);this._rendered||this._fillContent(this.srcNodeRef);this._rendered=!0},_fillContent:function(a){var b=this.containerNode;if(a&&b)for(;a.hasChildNodes();)b.appendChild(a.firstChild)}});b._templateCache={};b.getCachedTemplate=function(a,c,d){var f=b._templateCache,s=a,g=f[s];
if(g){try{if(!g.ownerDocument||g.ownerDocument==(d||document))return g}catch(p){}h.destroy(g)}a=e.trim(a);if(c||a.match(/\$\{([^\}]+)\}/g))return f[s]=a;c=h.toDom(a,d);if(1!=c.nodeType)throw Error("Invalid template: "+a);return f[s]=c};d("ie")&&f(window,"unload",function(){var a=b._templateCache,c;for(c in a){var d=a[c];"object"==typeof d&&h.destroy(d);delete a[c]}});return b})},"dojo/cache":function(){define(["./_base/kernel","./text"],function(k){return k.cache})},"dojo/text":function(){define(["./_base/kernel",
"require","./has","./request"],function(k,l,h,g){var f;f=function(a,b,c){g(a,{sync:!!b,headers:{"X-Requested-With":null}}).then(c)};var d={},e=function(a){if(a){a=a.replace(/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,"");var b=a.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);b&&(a=b[1])}else a="";return a},c={},b={};k.cache=function(a,b,c){var q;"string"==typeof a?/\//.test(a)?(q=a,c=b):q=l.toUrl(a.replace(/\./g,"/")+(b?"/"+b:"")):(q=a+"",c=b);a=void 0!=c&&"string"!=typeof c?c.value:
c;c=c&&c.sanitize;if("string"==typeof a)return d[q]=a,c?e(a):a;if(null===a)return delete d[q],null;q in d||f(q,!0,function(a){d[q]=a});return c?e(d[q]):d[q]};return{dynamic:!0,normalize:function(a,b){var c=a.split("!"),d=c[0];return(/^\./.test(d)?b(d):d)+(c[1]?"!"+c[1]:"")},load:function(a,m,n){a=a.split("!");var q=1<a.length,s=a[0],g=m.toUrl(a[0]);a="url:"+g;var h=c,k=function(a){n(q?e(a):a)};s in d?h=d[s]:m.cache&&a in m.cache?h=m.cache[a]:g in d&&(h=d[g]);if(h===c)if(b[g])b[g].push(k);else{var l=
b[g]=[k];f(g,!m.async,function(a){d[s]=d[g]=a;for(var c=0;c<l.length;)l[c++](a);delete b[g]})}else k(h)}}})},"dijit/_AttachMixin":function(){define("require dojo/_base/array dojo/_base/connect dojo/_base/declare dojo/_base/lang dojo/mouse dojo/on dojo/touch ./_WidgetBase".split(" "),function(k,l,h,g,f,d,e,c,b){var a=f.delegate(c,{mouseenter:d.enter,mouseleave:d.leave,keypress:h._keypress}),m;h=g("dijit._AttachMixin",null,{constructor:function(){this._attachPoints=[];this._attachEvents=[]},buildRendering:function(){this.inherited(arguments);
this._attachTemplateNodes(this.domNode);this._beforeFillContent()},_beforeFillContent:function(){},_attachTemplateNodes:function(a){for(var b=a;;)if(1==b.nodeType&&(this._processTemplateNode(b,function(a,b){return a.getAttribute(b)},this._attach)||this.searchContainerNode)&&b.firstChild)b=b.firstChild;else{if(b==a)break;for(;!b.nextSibling;)if(b=b.parentNode,b==a)return;b=b.nextSibling}},_processTemplateNode:function(a,b,c){var d=!0,e=this.attachScope||this,m=b(a,"dojoAttachPoint")||b(a,"data-dojo-attach-point");
if(m)for(var g=m.split(/\s*,\s*/);m=g.shift();)f.isArray(e[m])?e[m].push(a):e[m]=a,d="containerNode"!=m,this._attachPoints.push(m);if(b=b(a,"dojoAttachEvent")||b(a,"data-dojo-attach-event")){m=b.split(/\s*,\s*/);for(g=f.trim;b=m.shift();)if(b){var h=null;-1!=b.indexOf(":")?(h=b.split(":"),b=g(h[0]),h=g(h[1])):b=g(b);h||(h=b);this._attachEvents.push(c(a,b,f.hitch(e,h)))}}return d},_attach:function(b,c,d){c=c.replace(/^on/,"").toLowerCase();c="dijitclick"==c?m||(m=k("./a11yclick")):a[c]||c;return e(b,
c,d)},_detachTemplateNodes:function(){var a=this.attachScope||this;l.forEach(this._attachPoints,function(b){delete a[b]});this._attachPoints=[];l.forEach(this._attachEvents,function(a){a.remove()});this._attachEvents=[]},destroyRendering:function(){this._detachTemplateNodes();this.inherited(arguments)}});f.extend(b,{dojoAttachEvent:"",dojoAttachPoint:""});return h})},"dijit/layout/LayoutContainer":function(){define("dojo/_base/array dojo/_base/declare dojo/dom-class dojo/dom-style dojo/_base/lang ../_WidgetBase ./_LayoutWidget ./utils".split(" "),
function(k,l,h,g,f,d,e,c){l=l("dijit.layout.LayoutContainer",e,{design:"headline",baseClass:"dijitLayoutContainer",startup:function(){this._started||(k.forEach(this.getChildren(),this._setupChild,this),this.inherited(arguments))},_setupChild:function(b){this.inherited(arguments);b.region&&h.add(b.domNode,this.baseClass+"Pane")},_getOrderedChildren:function(){var b=k.map(this.getChildren(),function(a,b){return{pane:a,weight:["center"==a.region?Infinity:0,a.layoutPriority,("sidebar"==this.design?1:
-1)*(/top|bottom/.test(a.region)?1:-1),b]}},this);b.sort(function(a,b){for(var c=a.weight,d=b.weight,e=0;e<c.length;e++)if(c[e]!=d[e])return c[e]-d[e];return 0});return k.map(b,function(a){return a.pane})},layout:function(){c.layoutChildren(this.domNode,this._contentBox,this._getOrderedChildren())},addChild:function(b,a){this.inherited(arguments);this._started&&this.layout()},removeChild:function(b){this.inherited(arguments);this._started&&this.layout();h.remove(b.domNode,this.baseClass+"Pane");g.set(b.domNode,
{top:"auto",bottom:"auto",left:"auto",right:"auto",position:"static"});g.set(b.domNode,/top|bottom/.test(b.region)?"width":"height","auto")}});l.ChildWidgetProperties={region:"",layoutAlign:"",layoutPriority:0};f.extend(d,l.ChildWidgetProperties);return l})},"dijit/layout/_LayoutWidget":function(){define("dojo/_base/lang ../_Widget ../_Container ../_Contained ../Viewport dojo/_base/declare dojo/dom-class dojo/dom-geometry dojo/dom-style".split(" "),function(k,l,h,g,f,d,e,c,b){return d("dijit.layout._LayoutWidget",
[l,h,g],{baseClass:"dijitLayoutContainer",isLayoutContainer:!0,buildRendering:function(){this.inherited(arguments);e.add(this.domNode,"dijitContainer")},startup:function(){if(!this._started){this.inherited(arguments);var a=this.getParent&&this.getParent();if(!a||!a.isLayoutContainer)this.resize(),this.own(f.on("resize",k.hitch(this,"resize")))}},resize:function(a,d){var e=this.domNode;a&&c.setMarginBox(e,a);var f=d||{};k.mixin(f,a||{});if(!("h"in f)||!("w"in f))f=k.mixin(c.getMarginBox(e),f);var g=
b.getComputedStyle(e),h=c.getMarginExtents(e,g),p=c.getBorderExtents(e,g),f=this._borderBox={w:f.w-(h.w+p.w),h:f.h-(h.h+p.h)},h=c.getPadExtents(e,g);this._contentBox={l:b.toPixelValue(e,g.paddingLeft),t:b.toPixelValue(e,g.paddingTop),w:f.w-h.w,h:f.h-h.h};this.layout()},layout:function(){},_setupChild:function(a){e.add(a.domNode,this.baseClass+"-child "+(a.baseClass?this.baseClass+"-"+a.baseClass:""))},addChild:function(a,b){this.inherited(arguments);this._started&&this._setupChild(a)},removeChild:function(a){e.remove(a.domNode,
this.baseClass+"-child"+(a.baseClass?" "+this.baseClass+"-"+a.baseClass:""));this.inherited(arguments)}})})},"dijit/_Contained":function(){define(["dojo/_base/declare","./registry"],function(k,l){return k("dijit._Contained",null,{_getSibling:function(h){var g=this.getParent();return g&&g._getSiblingOfChild&&g._getSiblingOfChild(this,"previous"==h?-1:1)||null},getPreviousSibling:function(){return this._getSibling("previous")},getNextSibling:function(){return this._getSibling("next")},getIndexInParent:function(){var h=
this.getParent();return!h||!h.getIndexOfChild?-1:h.getIndexOfChild(this)}})})},"dijit/Dialog":function(){define("require dojo/_base/array dojo/aspect dojo/_base/declare dojo/Deferred dojo/dom dojo/dom-class dojo/dom-geometry dojo/dom-style dojo/_base/fx dojo/i18n dojo/keys dojo/_base/lang dojo/on dojo/ready dojo/sniff dojo/window dojo/dnd/Moveable dojo/dnd/TimedMoveable ./focus ./_base/manager ./_Widget ./_TemplatedMixin ./_CssStateMixin ./form/_FormMixin ./_DialogMixin ./DialogUnderlay ./layout/ContentPane dojo/text!./templates/Dialog.html dojo/i18n!./nls/common".split(" "),
function(k,l,h,g,f,d,e,c,b,a,m,n,q,s,r,p,t,u,v,x,w,y,z,A,D,C,B,I,M){w=g("dijit._DialogBase"+(p("dojo-bidi")?"_NoBidi":""),[z,D,C,A],{templateString:M,baseClass:"dijitDialog",cssStateNodes:{closeButtonNode:"dijitDialogCloseIcon"},_setTitleAttr:{node:"titleNode",type:"innerHTML"},open:!1,duration:w.defaultDuration,refocus:!0,autofocus:!0,_firstFocusItem:null,_lastFocusItem:null,doLayout:!1,draggable:!0,_setDraggableAttr:function(a){this._set("draggable",a)},maxRatio:0.9,closable:!0,_setClosableAttr:function(a){this.closeButtonNode.style.display=
a?"":"none";this._set("closable",a)},postMixInProperties:function(){var a=m.getLocalization("dijit","common");q.mixin(this,a);this.inherited(arguments)},postCreate:function(){b.set(this.domNode,{display:"none",position:"absolute"});this.ownerDocumentBody.appendChild(this.domNode);this.inherited(arguments);h.after(this,"onExecute",q.hitch(this,"hide"),!0);h.after(this,"onCancel",q.hitch(this,"hide"),!0);this._modalconnects=[]},onLoad:function(){this._size();this._position();this.autofocus&&G.isTop(this)&&
(this._getFocusItems(this.domNode),x.focus(this._firstFocusItem));this.inherited(arguments)},focus:function(){this._getFocusItems(this.domNode);x.focus(this._firstFocusItem)},_endDrag:function(){var a=c.position(this.domNode),b=t.getBox(this.ownerDocument);a.y=Math.min(Math.max(a.y,0),b.h-a.h);a.x=Math.min(Math.max(a.x,0),b.w-a.w);this._relativePosition=a;this._position()},_setup:function(){var a=this.domNode;this.titleBar&&this.draggable?(this._moveable=new (6==p("ie")?v:u)(a,{handle:this.titleBar}),
h.after(this._moveable,"onMoveStop",q.hitch(this,"_endDrag"),!0)):e.add(a,"dijitDialogFixed");this.underlayAttrs={dialogId:this.id,"class":l.map(this["class"].split(/\s/),function(a){return a+"_underlay"}).join(" "),_onKeyDown:q.hitch(this,"_onKey"),ownerDocument:this.ownerDocument}},_size:function(){this._checkIfSingleChild();this._singleChild?"undefined"!=typeof this._singleChildOriginalStyle&&(this._singleChild.domNode.style.cssText=this._singleChildOriginalStyle,delete this._singleChildOriginalStyle):
b.set(this.containerNode,{width:"auto",height:"auto"});var a=c.position(this.domNode),d=t.getBox(this.ownerDocument);d.w*=this.maxRatio;d.h*=this.maxRatio;if(a.w>=d.w||a.h>=d.h){var e=c.position(this.containerNode),f=Math.min(a.w,d.w)-(a.w-e.w),a=Math.min(a.h,d.h)-(a.h-e.h);this._singleChild&&this._singleChild.resize?("undefined"==typeof this._singleChildOriginalStyle&&(this._singleChildOriginalStyle=this._singleChild.domNode.style.cssText),this._singleChild.resize({w:f,h:a})):b.set(this.containerNode,
{width:f+"px",height:a+"px",overflow:"auto",position:"relative"})}else this._singleChild&&this._singleChild.resize&&this._singleChild.resize()},_position:function(){if(!e.contains(this.ownerDocumentBody,"dojoMove")){var a=this.domNode,d=t.getBox(this.ownerDocument),f=this._relativePosition,m=f?null:c.position(a);b.set(a,{left:Math.floor(d.l+(f?f.x:(d.w-m.w)/2))+"px",top:Math.floor(d.t+(f?f.y:(d.h-m.h)/2))+"px"})}},_onKey:function(a){if(a.keyCode==n.TAB){this._getFocusItems(this.domNode);var b=a.target;
this._firstFocusItem==this._lastFocusItem?(a.stopPropagation(),a.preventDefault()):b==this._firstFocusItem&&a.shiftKey?(x.focus(this._lastFocusItem),a.stopPropagation(),a.preventDefault()):b==this._lastFocusItem&&!a.shiftKey&&(x.focus(this._firstFocusItem),a.stopPropagation(),a.preventDefault())}else this.closable&&a.keyCode==n.ESCAPE&&(this.onCancel(),a.stopPropagation(),a.preventDefault())},show:function(){if(!this.open){this._started||this.startup();this._alreadyInitialized||(this._setup(),this._alreadyInitialized=
!0);this._fadeOutDeferred&&(this._fadeOutDeferred.cancel(),G.hide(this));var c=t.get(this.ownerDocument);this._modalconnects.push(s(c,"scroll",q.hitch(this,"resize")));this._modalconnects.push(s(this.domNode,"keydown",q.hitch(this,"_onKey")));b.set(this.domNode,{opacity:0,display:""});this._set("open",!0);this._onShow();this._size();this._position();var d;this._fadeInDeferred=new f(q.hitch(this,function(){d.stop();delete this._fadeInDeferred}));c=this._fadeInDeferred.promise;d=a.fadeIn({node:this.domNode,
duration:this.duration,beforeBegin:q.hitch(this,function(){G.show(this,this.underlayAttrs)}),onEnd:q.hitch(this,function(){this.autofocus&&G.isTop(this)&&(this._getFocusItems(this.domNode),x.focus(this._firstFocusItem));this._fadeInDeferred.resolve(!0);delete this._fadeInDeferred})}).play();return c}},hide:function(){if(this._alreadyInitialized&&this.open){this._fadeInDeferred&&this._fadeInDeferred.cancel();var b;this._fadeOutDeferred=new f(q.hitch(this,function(){b.stop();delete this._fadeOutDeferred}));
this._fadeOutDeferred.then(q.hitch(this,"onHide"));var c=this._fadeOutDeferred.promise;b=a.fadeOut({node:this.domNode,duration:this.duration,onEnd:q.hitch(this,function(){this.domNode.style.display="none";G.hide(this);this._fadeOutDeferred.resolve(!0);delete this._fadeOutDeferred})}).play();this._scrollConnected&&(this._scrollConnected=!1);for(var d;d=this._modalconnects.pop();)d.remove();this._relativePosition&&delete this._relativePosition;this._set("open",!1);return c}},resize:function(){"none"!=
this.domNode.style.display&&(this._size(),p("touch")||this._position())},destroy:function(){this._fadeInDeferred&&this._fadeInDeferred.cancel();this._fadeOutDeferred&&this._fadeOutDeferred.cancel();this._moveable&&this._moveable.destroy();for(var a;a=this._modalconnects.pop();)a.remove();G.hide(this);this.inherited(arguments)}});p("dojo-bidi")&&(w=g("dijit._DialogBase",w,{_setTitleAttr:function(a){this._set("title",a);this.titleNode.innerHTML=a;this.applyTextDir(this.titleNode)},_setTextDirAttr:function(a){this._created&&
this.textDir!=a&&(this._set("textDir",a),this.set("title",this.title))}}));var K=g("dijit.Dialog",[I,w],{});K._DialogBase=w;var G=K._DialogLevelManager={_beginZIndex:950,show:function(a,c){F[F.length-1].focus=x.curNode;var d=F[F.length-1].dialog?F[F.length-1].zIndex+2:K._DialogLevelManager._beginZIndex;b.set(a.domNode,"zIndex",d);B.show(c,d-1);F.push({dialog:a,underlayAttrs:c,zIndex:d})},hide:function(a){if(F[F.length-1].dialog==a){F.pop();var b=F[F.length-1];1==F.length?B.hide():B.show(b.underlayAttrs,
b.zIndex-1);if(a.refocus){a=b.focus;if(b.dialog&&(!a||!d.isDescendant(a,b.dialog.domNode)))b.dialog._getFocusItems(b.dialog.domNode),a=b.dialog._firstFocusItem;if(a)try{a.focus()}catch(c){}}}else b=l.indexOf(l.map(F,function(a){return a.dialog}),a),-1!=b&&F.splice(b,1)},isTop:function(a){return F[F.length-1].dialog==a}},F=K._dialogStack=[{dialog:null,focus:null,underlayAttrs:null}];x.watch("curNode",function(a,b,c){a=F[F.length-1].dialog;if(c&&a&&!a._fadeOutDeferred&&c.ownerDocument==a.ownerDocument){do if(c==
a.domNode||e.contains(c,"dijitPopup"))return;while(c=c.parentNode);a.focus()}});p("dijit-legacy-requires")&&r(0,function(){k(["dijit/TooltipDialog"])});return K})},"dojo/_base/fx":function(){define("./kernel ./config ./lang ../Evented ./Color ../aspect ../sniff ../dom ../dom-style".split(" "),function(k,l,h,g,f,d,e,c,b){var a=h.mixin,m={},n=m._Line=function(a,b){this.start=a;this.end=b};n.prototype.getValue=function(a){return(this.end-this.start)*a+this.start};var q=m.Animation=function(b){a(this,
b);h.isArray(this.curve)&&(this.curve=new n(this.curve[0],this.curve[1]))};q.prototype=new g;h.extend(q,{duration:350,repeat:0,rate:20,_percent:0,_startRepeatCount:0,_getStep:function(){var a=this._percent,b=this.easing;return b?b(a):a},_fire:function(a,b){var c=b||[];if(this[a])if(l.debugAtAllCosts)this[a].apply(this,c);else try{this[a].apply(this,c)}catch(d){console.error("exception in animation handler for:",a),console.error(d)}return this},play:function(a,b){this._delayTimer&&this._clearTimer();
if(b)this._stopTimer(),this._active=this._paused=!1,this._percent=0;else if(this._active&&!this._paused)return this;this._fire("beforeBegin",[this.node]);var c=a||this.delay,d=h.hitch(this,"_play",b);if(0<c)return this._delayTimer=setTimeout(d,c),this;d();return this},_play:function(a){this._delayTimer&&this._clearTimer();this._startTime=(new Date).valueOf();this._paused&&(this._startTime-=this.duration*this._percent);this._active=!0;this._paused=!1;a=this.curve.getValue(this._getStep());this._percent||
(this._startRepeatCount||(this._startRepeatCount=this.repeat),this._fire("onBegin",[a]));this._fire("onPlay",[a]);this._cycle();return this},pause:function(){this._delayTimer&&this._clearTimer();this._stopTimer();if(!this._active)return this;this._paused=!0;this._fire("onPause",[this.curve.getValue(this._getStep())]);return this},gotoPercent:function(a,b){this._stopTimer();this._active=this._paused=!0;this._percent=a;b&&this.play();return this},stop:function(a){this._delayTimer&&this._clearTimer();
if(!this._timer)return this;this._stopTimer();a&&(this._percent=1);this._fire("onStop",[this.curve.getValue(this._getStep())]);this._active=this._paused=!1;return this},status:function(){return this._active?this._paused?"paused":"playing":"stopped"},_cycle:function(){if(this._active){var a=(new Date).valueOf(),a=0===this.duration?1:(a-this._startTime)/this.duration;1<=a&&(a=1);this._percent=a;this.easing&&(a=this.easing(a));this._fire("onAnimate",[this.curve.getValue(a)]);1>this._percent?this._startTimer():
(this._active=!1,0<this.repeat?(this.repeat--,this.play(null,!0)):-1==this.repeat?this.play(null,!0):this._startRepeatCount&&(this.repeat=this._startRepeatCount,this._startRepeatCount=0),this._percent=0,this._fire("onEnd",[this.node]),!this.repeat&&this._stopTimer())}return this},_clearTimer:function(){clearTimeout(this._delayTimer);delete this._delayTimer}});var s=0,r=null,p={run:function(){}};h.extend(q,{_startTimer:function(){this._timer||(this._timer=d.after(p,"run",h.hitch(this,"_cycle"),!0),
s++);r||(r=setInterval(h.hitch(p,"run"),this.rate))},_stopTimer:function(){this._timer&&(this._timer.remove(),this._timer=null,s--);0>=s&&(clearInterval(r),r=null,s=0)}});var t=e("ie")?function(a){var c=a.style;!c.width.length&&"auto"==b.get(a,"width")&&(c.width="auto")}:function(){};m._fade=function(e){e.node=c.byId(e.node);var f=a({properties:{}},e);e=f.properties.opacity={};e.start=!("start"in f)?function(){return+b.get(f.node,"opacity")||0}:f.start;e.end=f.end;e=m.animateProperty(f);d.after(e,
"beforeBegin",h.partial(t,f.node),!0);return e};m.fadeIn=function(b){return m._fade(a({end:1},b))};m.fadeOut=function(b){return m._fade(a({end:0},b))};m._defaultEasing=function(a){return 0.5+Math.sin((a+1.5)*Math.PI)/2};var u=function(a){this._properties=a;for(var b in a){var c=a[b];c.start instanceof f&&(c.tempColor=new f)}};u.prototype.getValue=function(a){var b={},c;for(c in this._properties){var d=this._properties[c],e=d.start;e instanceof f?b[c]=f.blendColors(e,d.end,a,d.tempColor).toCss():h.isArray(e)||
(b[c]=(d.end-e)*a+e+("opacity"!=c?d.units||"px":0))}return b};m.animateProperty=function(e){var m=e.node=c.byId(e.node);e.easing||(e.easing=k._defaultEasing);e=new q(e);d.after(e,"beforeBegin",h.hitch(e,function(){var c={},d;for(d in this.properties){if("width"==d||"height"==d)this.node.display="block";var e=this.properties[d];h.isFunction(e)&&(e=e(m));e=c[d]=a({},h.isObject(e)?e:{end:e});h.isFunction(e.start)&&(e.start=e.start(m));h.isFunction(e.end)&&(e.end=e.end(m));var n=0<=d.toLowerCase().indexOf("color"),
g=function(a,c){var d={height:a.offsetHeight,width:a.offsetWidth}[c];if(void 0!==d)return d;d=b.get(a,c);return"opacity"==c?+d:n?d:parseFloat(d)};"end"in e?"start"in e||(e.start=g(m,d)):e.end=g(m,d);n?(e.start=new f(e.start),e.end=new f(e.end)):e.start="opacity"==d?+e.start:parseFloat(e.start)}this.curve=new u(c)}),!0);d.after(e,"onAnimate",h.hitch(b,"set",e.node),!0);return e};m.anim=function(a,b,c,d,e,f){return m.animateProperty({node:a,duration:c||q.prototype.duration,properties:b,easing:d,onEnd:e}).play(f||
0)};a(k,m);k._Animation=q;return m})},"dojo/_base/Color":function(){define(["./kernel","./lang","./array","./config"],function(k,l,h,g){var f=k.Color=function(d){d&&this.setColor(d)};f.named={black:[0,0,0],silver:[192,192,192],gray:[128,128,128],white:[255,255,255],maroon:[128,0,0],red:[255,0,0],purple:[128,0,128],fuchsia:[255,0,255],green:[0,128,0],lime:[0,255,0],olive:[128,128,0],yellow:[255,255,0],navy:[0,0,128],blue:[0,0,255],teal:[0,128,128],aqua:[0,255,255],transparent:g.transparentColor||[0,
0,0,0]};l.extend(f,{r:255,g:255,b:255,a:1,_set:function(d,e,c,b){this.r=d;this.g=e;this.b=c;this.a=b},setColor:function(d){l.isString(d)?f.fromString(d,this):l.isArray(d)?f.fromArray(d,this):(this._set(d.r,d.g,d.b,d.a),d instanceof f||this.sanitize());return this},sanitize:function(){return this},toRgb:function(){return[this.r,this.g,this.b]},toRgba:function(){return[this.r,this.g,this.b,this.a]},toHex:function(){return"#"+h.map(["r","g","b"],function(d){d=this[d].toString(16);return 2>d.length?"0"+
d:d},this).join("")},toCss:function(d){var e=this.r+", "+this.g+", "+this.b;return(d?"rgba("+e+", "+this.a:"rgb("+e)+")"},toString:function(){return this.toCss(!0)}});f.blendColors=k.blendColors=function(d,e,c,b){var a=b||new f;h.forEach(["r","g","b","a"],function(b){a[b]=d[b]+(e[b]-d[b])*c;"a"!=b&&(a[b]=Math.round(a[b]))});return a.sanitize()};f.fromRgb=k.colorFromRgb=function(d,e){var c=d.toLowerCase().match(/^rgba?\(([\s\.,0-9]+)\)/);return c&&f.fromArray(c[1].split(/\s*,\s*/),e)};f.fromHex=k.colorFromHex=
function(d,e){var c=e||new f,b=4==d.length?4:8,a=(1<<b)-1;d=Number("0x"+d.substr(1));if(isNaN(d))return null;h.forEach(["b","g","r"],function(e){var f=d&a;d>>=b;c[e]=4==b?17*f:f});c.a=1;return c};f.fromArray=k.colorFromArray=function(d,e){var c=e||new f;c._set(Number(d[0]),Number(d[1]),Number(d[2]),Number(d[3]));isNaN(c.a)&&(c.a=1);return c.sanitize()};f.fromString=k.colorFromString=function(d,e){var c=f.named[d];return c&&f.fromArray(c,e)||f.fromRgb(d,e)||f.fromHex(d,e)};return f})},"dojo/dnd/Moveable":function(){define("../_base/array ../_base/declare ../_base/lang ../dom ../dom-class ../Evented ../on ../topic ../touch ./common ./Mover ../_base/window".split(" "),
function(k,l,h,g,f,d,e,c,b,a,m,n){return l("dojo.dnd.Moveable",[d],{handle:"",delay:0,skip:!1,constructor:function(a,c){this.node=g.byId(a);c||(c={});this.handle=c.handle?g.byId(c.handle):null;this.handle||(this.handle=this.node);this.delay=0<c.delay?c.delay:0;this.skip=c.skip;this.mover=c.mover?c.mover:m;this.events=[e(this.handle,b.press,h.hitch(this,"onMouseDown")),e(this.handle,"dragstart",h.hitch(this,"onSelectStart")),e(this.handle,"selectstart",h.hitch(this,"onSelectStart"))]},markupFactory:function(a,
b,c){return new c(b,a)},destroy:function(){k.forEach(this.events,function(a){a.remove()});this.events=this.node=this.handle=null},onMouseDown:function(c){if(!this.skip||!a.isFormElement(c)){if(this.delay)this.events.push(e(this.handle,b.move,h.hitch(this,"onMouseMove")),e(this.handle,b.release,h.hitch(this,"onMouseUp"))),this._lastX=c.pageX,this._lastY=c.pageY;else this.onDragDetected(c);c.stopPropagation();c.preventDefault()}},onMouseMove:function(a){if(Math.abs(a.pageX-this._lastX)>this.delay||
Math.abs(a.pageY-this._lastY)>this.delay)this.onMouseUp(a),this.onDragDetected(a);a.stopPropagation();a.preventDefault()},onMouseUp:function(a){for(var b=0;2>b;++b)this.events.pop().remove();a.stopPropagation();a.preventDefault()},onSelectStart:function(b){if(!this.skip||!a.isFormElement(b))b.stopPropagation(),b.preventDefault()},onDragDetected:function(a){new this.mover(this.node,a,this)},onMoveStart:function(a){c.publish("/dnd/move/start",a);f.add(n.body(),"dojoMove");f.add(this.node,"dojoMoveItem")},
onMoveStop:function(a){c.publish("/dnd/move/stop",a);f.remove(n.body(),"dojoMove");f.remove(this.node,"dojoMoveItem")},onFirstMove:function(){},onMove:function(a,b){this.onMoving(a,b);var c=a.node.style;c.left=b.l+"px";c.top=b.t+"px";this.onMoved(a,b)},onMoving:function(){},onMoved:function(){}})})},"dojo/dnd/common":function(){define(["../sniff","../_base/kernel","../_base/lang","../dom"],function(k,l,h,g){var f=h.getObject("dojo.dnd",!0);f.getCopyKeyState=function(d){return d[k("mac")?"metaKey":
"ctrlKey"]};f._uniqueId=0;f.getUniqueId=function(){var d;do d=l._scopeName+"Unique"+ ++f._uniqueId;while(g.byId(d));return d};f._empty={};f.isFormElement=function(d){d=d.target;3==d.nodeType&&(d=d.parentNode);return 0<=" a button textarea input select option ".indexOf(" "+d.tagName.toLowerCase()+" ")};return f})},"dojo/dnd/Mover":function(){define("../_base/array ../_base/declare ../_base/lang ../sniff ../_base/window ../dom ../dom-geometry ../dom-style ../Evented ../on ../touch ./common ./autoscroll".split(" "),
function(k,l,h,g,f,d,e,c,b,a,m,n,q){return l("dojo.dnd.Mover",[b],{constructor:function(b,c,e){function f(a){a.preventDefault();a.stopPropagation()}this.node=d.byId(b);this.marginBox={l:c.pageX,t:c.pageY};this.mouseButton=c.button;c=this.host=e;b=b.ownerDocument;this.events=[a(b,m.move,h.hitch(this,"onFirstMove")),a(b,m.move,h.hitch(this,"onMouseMove")),a(b,m.release,h.hitch(this,"onMouseUp")),a(b,"dragstart",f),a(b.body,"selectstart",f)];q.autoScrollStart(b);if(c&&c.onMoveStart)c.onMoveStart(this)},
onMouseMove:function(a){q.autoScroll(a);var b=this.marginBox;this.host.onMove(this,{l:b.l+a.pageX,t:b.t+a.pageY},a);a.preventDefault();a.stopPropagation()},onMouseUp:function(a){(g("webkit")&&g("mac")&&2==this.mouseButton?0==a.button:this.mouseButton==a.button)&&this.destroy();a.preventDefault();a.stopPropagation()},onFirstMove:function(a){var b=this.node.style,d,m=this.host;switch(b.position){case "relative":case "absolute":d=Math.round(parseFloat(b.left))||0;b=Math.round(parseFloat(b.top))||0;break;
default:b.position="absolute";b=e.getMarginBox(this.node);d=f.doc.body;var n=c.getComputedStyle(d),g=e.getMarginBox(d,n),n=e.getContentBox(d,n);d=b.l-(n.l-g.l);b=b.t-(n.t-g.t)}this.marginBox.l=d-this.marginBox.l;this.marginBox.t=b-this.marginBox.t;if(m&&m.onFirstMove)m.onFirstMove(this,a);this.events.shift().remove()},destroy:function(){k.forEach(this.events,function(a){a.remove()});var a=this.host;if(a&&a.onMoveStop)a.onMoveStop(this);this.events=this.node=this.host=null}})})},"dojo/dnd/autoscroll":function(){define("../_base/lang ../sniff ../_base/window ../dom-geometry ../dom-style ../window".split(" "),
function(k,l,h,g,f,d){var e={};k.setObject("dojo.dnd.autoscroll",e);e.getViewport=d.getBox;e.V_TRIGGER_AUTOSCROLL=32;e.H_TRIGGER_AUTOSCROLL=32;e.V_AUTOSCROLL_VALUE=16;e.H_AUTOSCROLL_VALUE=16;var c,b=h.doc,a=Infinity,m=Infinity;e.autoScrollStart=function(e){b=e;c=d.getBox(b);e=h.body(b).parentNode;a=Math.max(e.scrollHeight-c.h,0);m=Math.max(e.scrollWidth-c.w,0)};e.autoScroll=function(f){var g=c||d.getBox(b),s=h.body(b).parentNode,r=0,p=0;f.clientX<e.H_TRIGGER_AUTOSCROLL?r=-e.H_AUTOSCROLL_VALUE:f.clientX>
g.w-e.H_TRIGGER_AUTOSCROLL&&(r=Math.min(e.H_AUTOSCROLL_VALUE,m-s.scrollLeft));f.clientY<e.V_TRIGGER_AUTOSCROLL?p=-e.V_AUTOSCROLL_VALUE:f.clientY>g.h-e.V_TRIGGER_AUTOSCROLL&&(p=Math.min(e.V_AUTOSCROLL_VALUE,a-s.scrollTop));window.scrollBy(r,p)};e._validNodes={div:1,p:1,td:1};e._validOverflow={auto:1,scroll:1};e.autoScrollNodes=function(a){for(var b,c,d,m,k,u,v=0,x=0,w=a.target;w;){if(1==w.nodeType&&w.tagName.toLowerCase()in e._validNodes){d=f.getComputedStyle(w);m=d.overflow.toLowerCase()in e._validOverflow;
k=d.overflowX.toLowerCase()in e._validOverflow;u=d.overflowY.toLowerCase()in e._validOverflow;if(m||k||u)b=g.getContentBox(w,d),c=g.position(w,!0);if(m||k){d=Math.min(e.H_TRIGGER_AUTOSCROLL,b.w/2);k=a.pageX-c.x;if(l("webkit")||l("opera"))k+=h.body().scrollLeft;v=0;0<k&&k<b.w&&(k<d?v=-d:k>b.w-d&&(v=d),w.scrollLeft+=v)}if(m||u){m=Math.min(e.V_TRIGGER_AUTOSCROLL,b.h/2);u=a.pageY-c.y;if(l("webkit")||l("opera"))u+=h.body().scrollTop;x=0;0<u&&u<b.h&&(u<m?x=-m:u>b.h-m&&(x=m),w.scrollTop+=x)}if(v||x)return}try{w=
w.parentNode}catch(y){w=null}}e.autoScroll(a)};return e})},"dojo/dnd/TimedMoveable":function(){define(["../_base/declare","./Moveable"],function(k,l){var h=l.prototype.onMove;return k("dojo.dnd.TimedMoveable",l,{timeout:40,constructor:function(g,f){f||(f={});f.timeout&&("number"==typeof f.timeout&&0<=f.timeout)&&(this.timeout=f.timeout)},onMoveStop:function(g){g._timer&&(clearTimeout(g._timer),h.call(this,g,g._leftTop));l.prototype.onMoveStop.apply(this,arguments)},onMove:function(g,f){g._leftTop=
f;if(!g._timer){var d=this;g._timer=setTimeout(function(){g._timer=null;h.call(d,g,g._leftTop)},this.timeout)}}})})},"dijit/_base/manager":function(){define(["dojo/_base/array","dojo/_base/config","dojo/_base/lang","../registry","../main"],function(k,l,h,g,f){var d={};k.forEach("byId getUniqueId findWidgets _destroyAll byNode getEnclosingWidget".split(" "),function(e){d[e]=g[e]});h.mixin(d,{defaultDuration:l.defaultDuration||200});h.mixin(f,d);return f})},"dijit/_CssStateMixin":function(){define("dojo/_base/array dojo/_base/declare dojo/dom dojo/dom-class dojo/has dojo/_base/lang dojo/on dojo/domReady dojo/touch dojo/_base/window ./a11yclick ./registry".split(" "),
function(k,l,h,g,f,d,e,c,b,a,m,n){l=l("dijit._CssStateMixin",[],{hovering:!1,active:!1,_applyAttributes:function(){this.inherited(arguments);k.forEach("disabled readOnly checked selected focused state hovering active _opened".split(" "),function(a){this.watch(a,d.hitch(this,"_setStateClass"))},this);for(var a in this.cssStateNodes||{})this._trackMouseState(this[a],this.cssStateNodes[a]);this._trackMouseState(this.domNode,this.baseClass);this._setStateClass()},_cssMouseEvent:function(a){if(!this.disabled)switch(a.type){case "mouseover":case "MSPointerOver":case "pointerover":this._set("hovering",
!0);this._set("active",this._mouseDown);break;case "mouseout":case "MSPointerOut":case "pointerout":this._set("hovering",!1);this._set("active",!1);break;case "mousedown":case "touchstart":case "MSPointerDown":case "pointerdown":case "keydown":this._set("active",!0);break;case "mouseup":case "dojotouchend":case "MSPointerUp":case "pointerup":case "keyup":this._set("active",!1)}},_setStateClass:function(){function a(c){b=b.concat(k.map(b,function(a){return a+c}),"dijit"+c)}var b=this.baseClass.split(" ");
this.isLeftToRight()||a("Rtl");var c="mixed"==this.checked?"Mixed":this.checked?"Checked":"";this.checked&&a(c);this.state&&a(this.state);this.selected&&a("Selected");this._opened&&a("Opened");this.disabled?a("Disabled"):this.readOnly?a("ReadOnly"):this.active?a("Active"):this.hovering&&a("Hover");this.focused&&a("Focused");var c=this.stateNode||this.domNode,d={};k.forEach(c.className.split(" "),function(a){d[a]=!0});"_stateClasses"in this&&k.forEach(this._stateClasses,function(a){delete d[a]});k.forEach(b,
function(a){d[a]=!0});var e=[],f;for(f in d)e.push(f);c.className=e.join(" ");this._stateClasses=b},_subnodeCssMouseEvent:function(a,b,c){function d(c){g.toggle(a,b+"Active",c)}if(!this.disabled&&!this.readOnly)switch(c.type){case "mouseover":case "MSPointerOver":case "pointerover":g.toggle(a,b+"Hover",!0);break;case "mouseout":case "MSPointerOut":case "pointerout":g.toggle(a,b+"Hover",!1);d(!1);break;case "mousedown":case "touchstart":case "MSPointerDown":case "pointerdown":case "keydown":d(!0);
break;case "mouseup":case "MSPointerUp":case "pointerup":case "dojotouchend":case "keyup":d(!1);break;case "focus":case "focusin":g.toggle(a,b+"Focused",!0);break;case "blur":case "focusout":g.toggle(a,b+"Focused",!1)}},_trackMouseState:function(a,b){a._cssState=b}});c(function(){function c(a,b,d){if(!d||!h.isDescendant(d,b))for(;b&&b!=d;b=b.parentNode)if(b._cssState){var e=n.getEnclosingWidget(b);e&&(b==e.domNode?e._cssMouseEvent(a):e._subnodeCssMouseEvent(b,b._cssState,a))}}var d=a.body(),f;e(d,
b.over,function(a){c(a,a.target,a.relatedTarget)});e(d,b.out,function(a){c(a,a.target,a.relatedTarget)});e(d,m.press,function(a){f=a.target;c(a,f)});e(d,m.release,function(a){c(a,f);f=null});e(d,"focusin, focusout",function(a){var b=a.target;if(b._cssState&&!b.getAttribute("widgetId")){var c=n.getEnclosingWidget(b);c&&c._subnodeCssMouseEvent(b,b._cssState,a)}})});return l})},"dijit/form/_FormMixin":function(){define("dojo/_base/array dojo/_base/declare dojo/_base/kernel dojo/_base/lang dojo/on dojo/window".split(" "),
function(k,l,h,g,f,d){return l("dijit.form._FormMixin",null,{state:"",_getDescendantFormWidgets:function(d){var c=[];k.forEach(d||this.getChildren(),function(b){"value"in b?c.push(b):c=c.concat(this._getDescendantFormWidgets(b.getChildren()))},this);return c},reset:function(){k.forEach(this._getDescendantFormWidgets(),function(d){d.reset&&d.reset()})},validate:function(){var e=!1;return k.every(k.map(this._getDescendantFormWidgets(),function(c){c._hasBeenBlurred=!0;var b=c.disabled||!c.validate||
c.validate();!b&&!e&&(d.scrollIntoView(c.containerNode||c.domNode),c.focus(),e=!0);return b}),function(c){return c})},setValues:function(d){h.deprecated(this.declaredClass+"::setValues() is deprecated. Use set('value', val) instead.","","2.0");return this.set("value",d)},_setValueAttr:function(d){var c={};k.forEach(this._getDescendantFormWidgets(),function(a){a.name&&(c[a.name]||(c[a.name]=[])).push(a)});for(var b in c)if(c.hasOwnProperty(b)){var a=c[b],f=g.getObject(b,!1,d);void 0!==f&&(f=[].concat(f),
"boolean"==typeof a[0].checked?k.forEach(a,function(a){a.set("value",-1!=k.indexOf(f,a._get("value")))}):a[0].multiple?a[0].set("value",f):k.forEach(a,function(a,b){a.set("value",f[b])}))}},getValues:function(){h.deprecated(this.declaredClass+"::getValues() is deprecated. Use get('value') instead.","","2.0");return this.get("value")},_getValueAttr:function(){var d={};k.forEach(this._getDescendantFormWidgets(),function(c){var b=c.name;if(b&&!c.disabled){var a=c.get("value");"boolean"==typeof c.checked?
/Radio/.test(c.declaredClass)?!1!==a?g.setObject(b,a,d):(a=g.getObject(b,!1,d),void 0===a&&g.setObject(b,null,d)):(c=g.getObject(b,!1,d),c||(c=[],g.setObject(b,c,d)),!1!==a&&c.push(a)):(c=g.getObject(b,!1,d),"undefined"!=typeof c?g.isArray(c)?c.push(a):g.setObject(b,[c,a],d):g.setObject(b,a,d))}});return d},isValid:function(){return""==this.state},onValidStateChange:function(){},_getState:function(){var d=k.map(this._descendants,function(c){return c.get("state")||""});return 0<=k.indexOf(d,"Error")?
"Error":0<=k.indexOf(d,"Incomplete")?"Incomplete":""},disconnectChildren:function(){},connectChildren:function(d){this._descendants=this._getDescendantFormWidgets();k.forEach(this._descendants,function(c){c._started||c.startup()});d||this._onChildChange()},_onChildChange:function(d){(!d||"state"==d||"disabled"==d)&&this._set("state",this._getState());if(!d||"value"==d||"disabled"==d||"checked"==d)this._onChangeDelayTimer&&this._onChangeDelayTimer.remove(),this._onChangeDelayTimer=this.defer(function(){delete this._onChangeDelayTimer;
this._set("value",this.get("value"))},10)},startup:function(){this.inherited(arguments);this._descendants=this._getDescendantFormWidgets();this.value=this.get("value");this.state=this._getState();var d=this;this.own(f(this.containerNode,"attrmodified-state, attrmodified-disabled, attrmodified-value, attrmodified-checked",function(c){c.target!=d.domNode&&d._onChildChange(c.type.replace("attrmodified-",""))}));this.watch("state",function(c,b,a){this.onValidStateChange(""==a)})},destroy:function(){this.inherited(arguments)}})})},
"dijit/_DialogMixin":function(){define(["dojo/_base/declare","./a11y"],function(k,l){return k("dijit._DialogMixin",null,{execute:function(){},onCancel:function(){},onExecute:function(){},_onSubmit:function(){this.onExecute();this.execute(this.get("value"))},_getFocusItems:function(){var h=l._getTabNavigable(this.containerNode);this._firstFocusItem=h.lowest||h.first||this.closeButtonNode||this.domNode;this._lastFocusItem=h.last||h.highest||this._firstFocusItem}})})},"dijit/DialogUnderlay":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/dom-attr dojo/dom-style dojo/on dojo/window ./_Widget ./_TemplatedMixin ./BackgroundIframe ./Viewport ./main".split(" "),
function(k,l,h,g,f,d,e,c,b,a,m,n){var q=k("dijit.DialogUnderlay",[c,b],{templateString:"\x3cdiv class\x3d'dijitDialogUnderlayWrapper'\x3e\x3cdiv class\x3d'dijitDialogUnderlay' tabIndex\x3d'-1' data-dojo-attach-point\x3d'node'\x3e\x3c/div\x3e\x3c/div\x3e",dialogId:"","class":"",_modalConnects:[],_setDialogIdAttr:function(a){g.set(this.node,"id",a+"_underlay");this._set("dialogId",a)},_setClassAttr:function(a){this.node.className="dijitDialogUnderlay "+a;this._set("class",a)},postCreate:function(){this.ownerDocumentBody.appendChild(this.domNode);
this.own(d(this.domNode,"keydown",l.hitch(this,"_onKeyDown")));this.inherited(arguments)},layout:function(){var a=this.node.style,b=this.domNode.style;b.display="none";var c=e.getBox(this.ownerDocument);b.top=c.t+"px";b.left=c.l+"px";a.width=c.w+"px";a.height=c.h+"px";b.display="block"},show:function(){this.domNode.style.display="block";this.open=!0;this.layout();this.bgIframe=new a(this.domNode);var b=e.get(this.ownerDocument);this._modalConnects=[m.on("resize",l.hitch(this,"layout")),d(b,"scroll",
l.hitch(this,"layout"))]},hide:function(){this.bgIframe.destroy();delete this.bgIframe;for(this.domNode.style.display="none";this._modalConnects.length;)this._modalConnects.pop().remove();this.open=!1},destroy:function(){for(;this._modalConnects.length;)this._modalConnects.pop().remove();this.inherited(arguments)},_onKeyDown:function(){}});q.show=function(a,b){var c=q._singleton;!c||c._destroyed?c=n._underlay=q._singleton=new q(a):a&&c.set(a);f.set(c.domNode,"zIndex",b);c.open||c.show()};q.hide=function(){var a=
q._singleton;a&&!a._destroyed&&a.hide()};return q})},"dijit/BackgroundIframe":function(){define("require ./main dojo/_base/config dojo/dom-construct dojo/dom-style dojo/_base/lang dojo/on dojo/sniff".split(" "),function(k,l,h,g,f,d,e,c){c.add("config-bgIframe",!c("touch"));var b=new function(){var a=[];this.pop=function(){var b;a.length?(b=a.pop(),b.style.display=""):(9>c("ie")?(b="\x3ciframe src\x3d'"+(h.dojoBlankHtmlUrl||k.toUrl("dojo/resources/blank.html")||'javascript:""')+"' role\x3d'presentation' style\x3d'position: absolute; left: 0px; top: 0px;z-index: -1; filter:Alpha(Opacity\x3d\"0\");'\x3e",
b=document.createElement(b)):(b=g.create("iframe"),b.src='javascript:""',b.className="dijitBackgroundIframe",b.setAttribute("role","presentation"),f.set(b,"opacity",0.1)),b.tabIndex=-1);return b};this.push=function(b){b.style.display="none";a.push(b)}};l.BackgroundIframe=function(a){if(!a.id)throw Error("no id");if(c("config-bgIframe")){var m=this.iframe=b.pop();a.appendChild(m);7>c("ie")||c("quirks")?(this.resize(a),this._conn=e(a,"resize",d.hitch(this,"resize",a))):f.set(m,{width:"100%",height:"100%"})}};
d.extend(l.BackgroundIframe,{resize:function(a){this.iframe&&f.set(this.iframe,{width:a.offsetWidth+"px",height:a.offsetHeight+"px"})},destroy:function(){this._conn&&(this._conn.remove(),this._conn=null);this.iframe&&(b.push(this.iframe),delete this.iframe)}});return l.BackgroundIframe})},"dijit/form/ComboBox":function(){define(["dojo/_base/declare","./ValidationTextBox","./ComboBoxMixin"],function(k,l,h){return k("dijit.form.ComboBox",[l,h],{})})},"dijit/form/ValidationTextBox":function(){define("dojo/_base/declare dojo/_base/kernel dojo/i18n ./TextBox ../Tooltip dojo/text!./templates/ValidationTextBox.html dojo/i18n!./nls/validate".split(" "),
function(k,l,h,g,f,d){var e;return e=k("dijit.form.ValidationTextBox",g,{templateString:d,required:!1,promptMessage:"",invalidMessage:"$_unset_$",missingMessage:"$_unset_$",message:"",constraints:{},pattern:".*",regExp:"",regExpGen:function(){},state:"",tooltipPosition:[],_deprecateRegExp:function(c,b){b!=e.prototype[c]&&(l.deprecated("ValidationTextBox id\x3d"+this.id+", set('"+c+"', ...) is deprecated.  Use set('pattern', ...) instead.","","2.0"),this.set("pattern",b))},_setRegExpGenAttr:function(c){this._deprecateRegExp("regExpGen",
c);this._set("regExpGen",this._computeRegexp)},_setRegExpAttr:function(c){this._deprecateRegExp("regExp",c)},_setValueAttr:function(){this.inherited(arguments);this._refreshState()},validator:function(c,b){return RegExp("^(?:"+this._computeRegexp(b)+")"+(this.required?"":"?")+"$").test(c)&&(!this.required||!this._isEmpty(c))&&(this._isEmpty(c)||void 0!==this.parse(c,b))},_isValidSubset:function(){return 0==this.textbox.value.search(this._partialre)},isValid:function(){return this.validator(this.textbox.value,
this.get("constraints"))},_isEmpty:function(c){return(this.trim?/^\s*$/:/^$/).test(c)},getErrorMessage:function(){var c="$_unset_$"==this.invalidMessage?this.messages.invalidMessage:!this.invalidMessage?this.promptMessage:this.invalidMessage,b="$_unset_$"==this.missingMessage?this.messages.missingMessage:!this.missingMessage?c:this.missingMessage;return this.required&&this._isEmpty(this.textbox.value)?b:c},getPromptMessage:function(){return this.promptMessage},_maskValidSubsetError:!0,validate:function(c){var b=
"",a=this.disabled||this.isValid(c);a&&(this._maskValidSubsetError=!0);var d=this._isEmpty(this.textbox.value),e=!a&&c&&this._isValidSubset();this._set("state",a?"":((!this._hasBeenBlurred||c)&&d||e)&&(this._maskValidSubsetError||e&&!this._hasBeenBlurred&&c)?"Incomplete":"Error");this.focusNode.setAttribute("aria-invalid","Error"==this.state?"true":"false");"Error"==this.state?(this._maskValidSubsetError=c&&e,b=this.getErrorMessage(c)):"Incomplete"==this.state?(b=this.getPromptMessage(c),this._maskValidSubsetError=
!this._hasBeenBlurred||c):d&&(b=this.getPromptMessage(c));this.set("message",b);return a},displayMessage:function(c){c&&this.focused?f.show(c,this.domNode,this.tooltipPosition,!this.isLeftToRight()):f.hide(this.domNode)},_refreshState:function(){this._created&&this.validate(this.focused);this.inherited(arguments)},constructor:function(c){this.constraints={};this.baseClass+=" dijitValidationTextBox"},startup:function(){this.inherited(arguments);this._refreshState()},_setConstraintsAttr:function(c){!c.locale&&
this.lang&&(c.locale=this.lang);this._set("constraints",c);this._refreshState()},_setPatternAttr:function(c){this._set("pattern",c);this._refreshState()},_computeRegexp:function(c){var b=this.pattern;"function"==typeof b&&(b=b.call(this,c));if(b!=this._lastRegExp){var a="";this._lastRegExp=b;".*"!=b&&b.replace(/\\.|\[\]|\[.*?[^\\]{1}\]|\{.*?\}|\(\?[=:!]|./g,function(b){switch(b.charAt(0)){case "{":case "+":case "?":case "*":case "^":case "$":case "|":case "(":a+=b;break;case ")":a+="|$)";break;default:a+=
"(?:"+b+"|$)"}});try{"".search(a)}catch(d){a=this.pattern,console.warn("RegExp error in "+this.declaredClass+": "+this.pattern)}this._partialre="^(?:"+a+")$"}return b},postMixInProperties:function(){this.inherited(arguments);this.messages=h.getLocalization("dijit.form","validate",this.lang);this._setConstraintsAttr(this.constraints)},_setDisabledAttr:function(c){this.inherited(arguments);this._refreshState()},_setRequiredAttr:function(c){this._set("required",c);this.focusNode.setAttribute("aria-required",
c);this._refreshState()},_setMessageAttr:function(c){this._set("message",c);this.displayMessage(c)},reset:function(){this._maskValidSubsetError=!0;this.inherited(arguments)},_onBlur:function(){this.displayMessage("");this.inherited(arguments)}})})},"dijit/form/TextBox":function(){define("dojo/_base/declare dojo/dom-construct dojo/dom-style dojo/_base/kernel dojo/_base/lang dojo/on dojo/sniff ./_FormValueWidget ./_TextBoxMixin dojo/text!./templates/TextBox.html ../main".split(" "),function(k,l,h,g,
f,d,e,c,b,a,m){c=k("dijit.form.TextBox"+(e("dojo-bidi")?"_NoBidi":""),[c,b],{templateString:a,_singleNodeTemplate:'\x3cinput class\x3d"dijit dijitReset dijitLeft dijitInputField" data-dojo-attach-point\x3d"textbox,focusNode" autocomplete\x3d"off" type\x3d"${type}" ${!nameAttrSetting} /\x3e',_buttonInputDisabled:e("ie")?"disabled":"",baseClass:"dijitTextBox",postMixInProperties:function(){var a=this.type.toLowerCase();if(this.templateString&&"input"==this.templateString.toLowerCase()||("hidden"==a||
"file"==a)&&this.templateString==this.constructor.prototype.templateString)this.templateString=this._singleNodeTemplate;this.inherited(arguments)},postCreate:function(){this.inherited(arguments);9>e("ie")&&this.defer(function(){try{var a=h.getComputedStyle(this.domNode);if(a){var b=a.fontFamily;if(b){var c=this.domNode.getElementsByTagName("INPUT");if(c)for(a=0;a<c.length;a++)c[a].style.fontFamily=b}}}catch(d){}})},_setPlaceHolderAttr:function(a){this._set("placeHolder",a);this._phspan||(this._attachPoints.push("_phspan"),
this._phspan=l.create("span",{className:"dijitPlaceHolder dijitInputField"},this.textbox,"after"),this.own(d(this._phspan,"mousedown",function(a){a.preventDefault()}),d(this._phspan,"touchend, pointerup, MSPointerUp",f.hitch(this,function(){this.focus()}))));this._phspan.innerHTML="";this._phspan.appendChild(this._phspan.ownerDocument.createTextNode(a));this._updatePlaceHolder()},_onInput:function(a){this.inherited(arguments);this._updatePlaceHolder()},_updatePlaceHolder:function(){this._phspan&&
(this._phspan.style.display=this.placeHolder&&!this.textbox.value?"":"none")},_setValueAttr:function(a,b,c){this.inherited(arguments);this._updatePlaceHolder()},getDisplayedValue:function(){g.deprecated(this.declaredClass+"::getDisplayedValue() is deprecated. Use get('displayedValue') instead.","","2.0");return this.get("displayedValue")},setDisplayedValue:function(a){g.deprecated(this.declaredClass+"::setDisplayedValue() is deprecated. Use set('displayedValue', ...) instead.","","2.0");this.set("displayedValue",
a)},_onBlur:function(a){this.disabled||(this.inherited(arguments),this._updatePlaceHolder(),e("mozilla")&&this.selectOnClick&&(this.textbox.selectionStart=this.textbox.selectionEnd=void 0))},_onFocus:function(a){!this.disabled&&!this.readOnly&&(this.inherited(arguments),this._updatePlaceHolder())}});9>e("ie")&&(c.prototype._isTextSelected=function(){var a=this.ownerDocument.selection.createRange();return a.parentElement()==this.textbox&&0<a.text.length},m._setSelectionRange=b._setSelectionRange=function(a,
b,c){a.createTextRange&&(a=a.createTextRange(),a.collapse(!0),a.moveStart("character",-99999),a.moveStart("character",b),a.moveEnd("character",c-b),a.select())});e("dojo-bidi")&&(c=k("dijit.form.TextBox",c,{_setPlaceHolderAttr:function(a){this.inherited(arguments);this.applyTextDir(this._phspan)}}));return c})},"dijit/form/_FormValueWidget":function(){define(["dojo/_base/declare","dojo/sniff","./_FormWidget","./_FormValueMixin"],function(k,l,h,g){return k("dijit.form._FormValueWidget",[h,g],{_layoutHackIE7:function(){if(7==
l("ie"))for(var f=this.domNode,d=f.parentNode,e=f.firstChild||f,c=e.style.filter,b=this;d&&0==d.clientHeight;)(function(){var a=b.connect(d,"onscroll",function(){b.disconnect(a);e.style.filter=(new Date).getMilliseconds();b.defer(function(){e.style.filter=c})})})(),d=d.parentNode}})})},"dijit/form/_FormWidget":function(){define("dojo/_base/declare dojo/sniff dojo/_base/kernel dojo/ready ../_Widget ../_CssStateMixin ../_TemplatedMixin ./_FormWidgetMixin".split(" "),function(k,l,h,g,f,d,e,c){l("dijit-legacy-requires")&&
g(0,function(){require(["dijit/form/_FormValueWidget"])});return k("dijit.form._FormWidget",[f,e,d,c],{setDisabled:function(b){h.deprecated("setDisabled("+b+") is deprecated. Use set('disabled',"+b+") instead.","","2.0");this.set("disabled",b)},setValue:function(b){h.deprecated("dijit.form._FormWidget:setValue("+b+") is deprecated.  Use set('value',"+b+") instead.","","2.0");this.set("value",b)},getValue:function(){h.deprecated(this.declaredClass+"::getValue() is deprecated. Use get('value') instead.",
"","2.0");return this.get("value")},postMixInProperties:function(){this.nameAttrSetting=this.name&&!l("msapp")?'name\x3d"'+this.name.replace(/"/g,"\x26quot;")+'"':"";this.inherited(arguments)},_setTypeAttr:null})})},"dijit/form/_FormWidgetMixin":function(){define("dojo/_base/array dojo/_base/declare dojo/dom-attr dojo/dom-style dojo/_base/lang dojo/mouse dojo/on dojo/sniff dojo/window ../a11y".split(" "),function(k,l,h,g,f,d,e,c,b,a){return l("dijit.form._FormWidgetMixin",null,{name:"",alt:"",value:"",
type:"text","aria-label":"focusNode",tabIndex:"0",_setTabIndexAttr:"focusNode",disabled:!1,intermediateChanges:!1,scrollOnFocus:!0,_setIdAttr:"focusNode",_setDisabledAttr:function(b){this._set("disabled",b);/^(button|input|select|textarea|optgroup|option|fieldset)$/i.test(this.focusNode.tagName)?h.set(this.focusNode,"disabled",b):this.focusNode.setAttribute("aria-disabled",b?"true":"false");this.valueNode&&h.set(this.valueNode,"disabled",b);b?(this._set("hovering",!1),this._set("active",!1),b="tabIndex"in
this.attributeMap?this.attributeMap.tabIndex:"_setTabIndexAttr"in this?this._setTabIndexAttr:"focusNode",k.forEach(f.isArray(b)?b:[b],function(b){b=this[b];c("webkit")||a.hasDefaultTabStop(b)?b.setAttribute("tabIndex","-1"):b.removeAttribute("tabIndex")},this)):""!=this.tabIndex&&this.set("tabIndex",this.tabIndex)},_onFocus:function(a){if("mouse"==a&&this.isFocusable())var d=this.own(e(this.focusNode,"focus",function(){h.remove();d.remove()}))[0],g=c("pointer-events")?"pointerup":c("MSPointer")?"MSPointerUp":
c("touch-events")?"touchend, mouseup":"mouseup",h=this.own(e(this.ownerDocumentBody,g,f.hitch(this,function(a){h.remove();d.remove();this.focused&&("touchend"==a.type?this.defer("focus"):this.focus())})))[0];this.scrollOnFocus&&this.defer(function(){b.scrollIntoView(this.domNode)});this.inherited(arguments)},isFocusable:function(){return!this.disabled&&this.focusNode&&"none"!=g.get(this.domNode,"display")},focus:function(){if(!this.disabled&&this.focusNode.focus)try{this.focusNode.focus()}catch(a){}},
compare:function(a,b){return"number"==typeof a&&"number"==typeof b?isNaN(a)&&isNaN(b)?0:a-b:a>b?1:a<b?-1:0},onChange:function(){},_onChangeActive:!1,_handleOnChange:function(a,b){if(void 0==this._lastValueReported&&(null===b||!this._onChangeActive))this._resetValue=this._lastValueReported=a;this._pendingOnChange=this._pendingOnChange||typeof a!=typeof this._lastValueReported||0!=this.compare(a,this._lastValueReported);if((this.intermediateChanges||b||void 0===b)&&this._pendingOnChange)this._lastValueReported=
a,this._pendingOnChange=!1,this._onChangeActive&&(this._onChangeHandle&&this._onChangeHandle.remove(),this._onChangeHandle=this.defer(function(){this._onChangeHandle=null;this.onChange(a)}))},create:function(){this.inherited(arguments);this._onChangeActive=!0},destroy:function(){this._onChangeHandle&&(this._onChangeHandle.remove(),this.onChange(this._lastValueReported));this.inherited(arguments)}})})},"dijit/form/_FormValueMixin":function(){define("dojo/_base/declare dojo/dom-attr dojo/keys dojo/_base/lang dojo/on dojo/sniff ./_FormWidgetMixin".split(" "),
function(k,l,h,g,f,d,e){return k("dijit.form._FormValueMixin",e,{readOnly:!1,_setReadOnlyAttr:function(c){l.set(this.focusNode,"readOnly",c);this._set("readOnly",c)},postCreate:function(){this.inherited(arguments);void 0===this._resetValue&&(this._lastValueReported=this._resetValue=this.value)},_setValueAttr:function(c,b){this._handleOnChange(c,b)},_handleOnChange:function(c,b){this._set("value",c);this.inherited(arguments)},undo:function(){this._setValueAttr(this._lastValueReported,!1)},reset:function(){this._hasBeenBlurred=
!1;this._setValueAttr(this._resetValue,!0)}})})},"dijit/form/_TextBoxMixin":function(){define("dojo/_base/array dojo/_base/declare dojo/dom dojo/sniff dojo/keys dojo/_base/lang dojo/on ../main".split(" "),function(k,l,h,g,f,d,e,c){var b=l("dijit.form._TextBoxMixin"+(g("dojo-bidi")?"_NoBidi":""),null,{trim:!1,uppercase:!1,lowercase:!1,propercase:!1,maxLength:"",selectOnClick:!1,placeHolder:"",_getValueAttr:function(){return this.parse(this.get("displayedValue"),this.constraints)},_setValueAttr:function(a,
b,c){var d;void 0!==a&&(d=this.filter(a),"string"!=typeof c&&(c=null!==d&&("number"!=typeof d||!isNaN(d))?this.filter(this.format(d,this.constraints)):""));if(null!=c&&("number"!=typeof c||!isNaN(c))&&this.textbox.value!=c)this.textbox.value=c,this._set("displayedValue",this.get("displayedValue"));this.inherited(arguments,[d,b])},displayedValue:"",_getDisplayedValueAttr:function(){return this.filter(this.textbox.value)},_setDisplayedValueAttr:function(a){null==a?a="":"string"!=typeof a&&(a=String(a));
this.textbox.value=a;this._setValueAttr(this.get("value"),void 0);this._set("displayedValue",this.get("displayedValue"))},format:function(a){return null==a?"":a.toString?a.toString():a},parse:function(a){return a},_refreshState:function(){},onInput:function(){},_onInput:function(a){this._lastInputEventValue=this.textbox.value;this._processInput(this._lastInputProducingEvent||a);delete this._lastInputProducingEvent;this.intermediateChanges&&this._handleOnChange(this.get("value"),!1)},_processInput:function(){this._refreshState();
this._set("displayedValue",this.get("displayedValue"))},postCreate:function(){this.textbox.setAttribute("value",this.textbox.value);this.inherited(arguments);this.own(e(this.textbox,"keydown, keypress, paste, cut, compositionend",d.hitch(this,function(a){var b;if("keydown"==a.type&&229!=a.keyCode){b=a.keyCode;switch(b){case f.SHIFT:case f.ALT:case f.CTRL:case f.META:case f.CAPS_LOCK:case f.NUM_LOCK:case f.SCROLL_LOCK:return}if(!a.ctrlKey&&!a.metaKey&&!a.altKey){switch(b){case f.NUMPAD_0:case f.NUMPAD_1:case f.NUMPAD_2:case f.NUMPAD_3:case f.NUMPAD_4:case f.NUMPAD_5:case f.NUMPAD_6:case f.NUMPAD_7:case f.NUMPAD_8:case f.NUMPAD_9:case f.NUMPAD_MULTIPLY:case f.NUMPAD_PLUS:case f.NUMPAD_ENTER:case f.NUMPAD_MINUS:case f.NUMPAD_PERIOD:case f.NUMPAD_DIVIDE:return}if(65<=
b&&90>=b||48<=b&&57>=b||b==f.SPACE)return;b=!1;for(var c in f)if(f[c]===a.keyCode){b=!0;break}if(!b)return}}(b=32<=a.charCode?String.fromCharCode(a.charCode):a.charCode)||(b=65<=a.keyCode&&90>=a.keyCode||48<=a.keyCode&&57>=a.keyCode||a.keyCode==f.SPACE?String.fromCharCode(a.keyCode):a.keyCode);b||(b=229);if("keypress"==a.type){if("string"!=typeof b)return;if("a"<=b&&"z">=b||"A"<=b&&"Z">=b||"0"<=b&&"9">=b||" "===b)if(a.ctrlKey||a.metaKey||a.altKey)return}var h={faux:!0},s;for(s in a)/^(layer[XY]|returnValue|keyLocation)$/.test(s)||
(c=a[s],"function"!=typeof c&&"undefined"!=typeof c&&(h[s]=c));d.mixin(h,{charOrCode:b,_wasConsumed:!1,preventDefault:function(){h._wasConsumed=!0;a.preventDefault()},stopPropagation:function(){a.stopPropagation()}});this._lastInputProducingEvent=h;!1===this.onInput(h)&&(h.preventDefault(),h.stopPropagation());if(!h._wasConsumed&&9>=g("ie"))switch(a.keyCode){case f.TAB:case f.ESCAPE:case f.DOWN_ARROW:case f.UP_ARROW:case f.LEFT_ARROW:case f.RIGHT_ARROW:break;default:if(a.keyCode==f.ENTER&&"textarea"!=
this.textbox.tagName.toLowerCase())break;this.defer(function(){this.textbox.value!==this._lastInputEventValue&&e.emit(this.textbox,"input",{bubbles:!0})})}})),e(this.textbox,"input",d.hitch(this,"_onInput")),e(this.domNode,"keypress",function(a){a.stopPropagation()}))},_blankValue:"",filter:function(a){if(null===a)return this._blankValue;if("string"!=typeof a)return a;this.trim&&(a=d.trim(a));this.uppercase&&(a=a.toUpperCase());this.lowercase&&(a=a.toLowerCase());this.propercase&&(a=a.replace(/[^\s]+/g,
function(a){return a.substring(0,1).toUpperCase()+a.substring(1)}));return a},_setBlurValue:function(){this._setValueAttr(this.get("value"),!0)},_onBlur:function(a){this.disabled||(this._setBlurValue(),this.inherited(arguments))},_isTextSelected:function(){return this.textbox.selectionStart!=this.textbox.selectionEnd},_onFocus:function(a){!this.disabled&&!this.readOnly&&(this.selectOnClick&&"mouse"==a&&(this._selectOnClickHandle=e.once(this.domNode,"mouseup, touchend",d.hitch(this,function(a){this._isTextSelected()||
b.selectInputText(this.textbox)})),this.own(this._selectOnClickHandle),this.defer(function(){this._selectOnClickHandle&&(this._selectOnClickHandle.remove(),this._selectOnClickHandle=null)},500)),this.inherited(arguments),this._refreshState())},reset:function(){this.textbox.value="";this.inherited(arguments)}});g("dojo-bidi")&&(b=l("dijit.form._TextBoxMixin",b,{_setValueAttr:function(){this.inherited(arguments);this.applyTextDir(this.focusNode)},_setDisplayedValueAttr:function(){this.inherited(arguments);
this.applyTextDir(this.focusNode)},_onInput:function(){this.applyTextDir(this.focusNode);this.inherited(arguments)}}));b._setSelectionRange=c._setSelectionRange=function(a,b,c){a.setSelectionRange&&a.setSelectionRange(b,c)};b.selectInputText=c.selectInputText=function(a,c,d){a=h.byId(a);isNaN(c)&&(c=0);isNaN(d)&&(d=a.value?a.value.length:0);try{a.focus(),b._setSelectionRange(a,c,d)}catch(e){}};return b})},"dijit/Tooltip":function(){define("dojo/_base/array dojo/_base/declare dojo/_base/fx dojo/dom dojo/dom-class dojo/dom-geometry dojo/dom-style dojo/_base/lang dojo/mouse dojo/on dojo/sniff ./_base/manager ./place ./_Widget ./_TemplatedMixin ./BackgroundIframe dojo/text!./templates/Tooltip.html ./main".split(" "),
function(k,l,h,g,f,d,e,c,b,a,m,n,q,s,r,p,t,u){var v=l("dijit._MasterTooltip",[s,r],{duration:n.defaultDuration,templateString:t,postCreate:function(){this.ownerDocumentBody.appendChild(this.domNode);this.bgIframe=new p(this.domNode);this.fadeIn=h.fadeIn({node:this.domNode,duration:this.duration,onEnd:c.hitch(this,"_onShow")});this.fadeOut=h.fadeOut({node:this.domNode,duration:this.duration,onEnd:c.hitch(this,"_onHide")})},show:function(a,b,d,f,m){if(!this.aroundNode||!(this.aroundNode===b&&this.containerNode.innerHTML==
a))if("playing"==this.fadeOut.status())this._onDeck=arguments;else{this.containerNode.innerHTML=a;m&&this.set("textDir",m);this.containerNode.align=f?"right":"left";var n=q.around(this.domNode,b,d&&d.length?d:x.defaultPosition,!f,c.hitch(this,"orient")),g=n.aroundNodePos;"M"==n.corner.charAt(0)&&"M"==n.aroundCorner.charAt(0)?(this.connectorNode.style.top=g.y+(g.h-this.connectorNode.offsetHeight>>1)-n.y+"px",this.connectorNode.style.left=""):"M"==n.corner.charAt(1)&&"M"==n.aroundCorner.charAt(1)?this.connectorNode.style.left=
g.x+(g.w-this.connectorNode.offsetWidth>>1)-n.x+"px":(this.connectorNode.style.left="",this.connectorNode.style.top="");e.set(this.domNode,"opacity",0);this.fadeIn.play();this.isShowingNow=!0;this.aroundNode=b}},orient:function(a,b,c,e,f){this.connectorNode.style.top="";var n=e.h;e=e.w;a.className="dijitTooltip "+{"MR-ML":"dijitTooltipRight","ML-MR":"dijitTooltipLeft","TM-BM":"dijitTooltipAbove","BM-TM":"dijitTooltipBelow","BL-TL":"dijitTooltipBelow dijitTooltipABLeft","TL-BL":"dijitTooltipAbove dijitTooltipABLeft",
"BR-TR":"dijitTooltipBelow dijitTooltipABRight","TR-BR":"dijitTooltipAbove dijitTooltipABRight","BR-BL":"dijitTooltipRight","BL-BR":"dijitTooltipLeft"}[b+"-"+c];this.domNode.style.width="auto";var g=d.position(this.domNode);if(m("ie")||m("trident"))g.w+=2;var h=Math.min(Math.max(e,1),g.w);d.setMarginBox(this.domNode,{w:h});"B"==c.charAt(0)&&"B"==b.charAt(0)?(a=d.position(a),b=this.connectorNode.offsetHeight,a.h>n?(this.connectorNode.style.top=n-(f.h+b>>1)+"px",this.connectorNode.style.bottom=""):
(this.connectorNode.style.bottom=Math.min(Math.max(f.h/2-b/2,0),a.h-b)+"px",this.connectorNode.style.top="")):(this.connectorNode.style.top="",this.connectorNode.style.bottom="");return Math.max(0,g.w-e)},_onShow:function(){m("ie")&&(this.domNode.style.filter="")},hide:function(a){this._onDeck&&this._onDeck[1]==a?this._onDeck=null:this.aroundNode===a&&(this.fadeIn.stop(),this.isShowingNow=!1,this.aroundNode=null,this.fadeOut.play())},_onHide:function(){this.domNode.style.cssText="";this.containerNode.innerHTML=
"";this._onDeck&&(this.show.apply(this,this._onDeck),this._onDeck=null)}});m("dojo-bidi")&&v.extend({_setAutoTextDir:function(a){this.applyTextDir(a);k.forEach(a.children,function(a){this._setAutoTextDir(a)},this)},_setTextDirAttr:function(a){this._set("textDir",a);"auto"==a?this._setAutoTextDir(this.containerNode):this.containerNode.dir=this.textDir}});u.showTooltip=function(a,b,c,d,e){c&&(c=k.map(c,function(a){return{after:"after-centered",before:"before-centered"}[a]||a}));x._masterTT||(u._masterTT=
x._masterTT=new v);return x._masterTT.show(a,b,c,d,e)};u.hideTooltip=function(a){return x._masterTT&&x._masterTT.hide(a)};var x=l("dijit.Tooltip",s,{label:"",showDelay:400,connectId:[],position:[],selector:"",_setConnectIdAttr:function(d){k.forEach(this._connections||[],function(a){k.forEach(a,function(a){a.remove()})},this);this._connectIds=k.filter(c.isArrayLike(d)?d:d?[d]:[],function(a){return g.byId(a,this.ownerDocument)},this);this._connections=k.map(this._connectIds,function(d){d=g.byId(d,this.ownerDocument);
var e=this.selector,f=e?function(b){return a.selector(e,b)}:function(a){return a},m=this;return[a(d,f(b.enter),function(){m._onHover(this)}),a(d,f("focusin"),function(){m._onHover(this)}),a(d,f(b.leave),c.hitch(m,"_onUnHover")),a(d,f("focusout"),c.hitch(m,"_onUnHover"))]},this);this._set("connectId",d)},addTarget:function(a){a=a.id||a;-1==k.indexOf(this._connectIds,a)&&this.set("connectId",this._connectIds.concat(a))},removeTarget:function(a){a=k.indexOf(this._connectIds,a.id||a);0<=a&&(this._connectIds.splice(a,
1),this.set("connectId",this._connectIds))},buildRendering:function(){this.inherited(arguments);f.add(this.domNode,"dijitTooltipData")},startup:function(){this.inherited(arguments);var a=this.connectId;k.forEach(c.isArrayLike(a)?a:[a],this.addTarget,this)},getContent:function(a){return this.label||this.domNode.innerHTML},_onHover:function(a){this._showTimer||(this._showTimer=this.defer(function(){this.open(a)},this.showDelay))},_onUnHover:function(){this._showTimer&&(this._showTimer.remove(),delete this._showTimer);
this.close()},open:function(a){this._showTimer&&(this._showTimer.remove(),delete this._showTimer);var b=this.getContent(a);b&&(x.show(b,a,this.position,!this.isLeftToRight(),this.textDir),this._connectNode=a,this.onShow(a,this.position))},close:function(){this._connectNode&&(x.hide(this._connectNode),delete this._connectNode,this.onHide());this._showTimer&&(this._showTimer.remove(),delete this._showTimer)},onShow:function(){},onHide:function(){},destroy:function(){this.close();k.forEach(this._connections||
[],function(a){k.forEach(a,function(a){a.remove()})},this);this.inherited(arguments)}});x._MasterTooltip=v;x.show=u.showTooltip;x.hide=u.hideTooltip;x.defaultPosition=["after-centered","before-centered"];return x})},"dijit/place":function(){define("dojo/_base/array dojo/dom-geometry dojo/dom-style dojo/_base/kernel dojo/_base/window ./Viewport ./main".split(" "),function(k,l,h,g,f,d,e){function c(a,b,c,e){var g=d.getEffectiveBox(a.ownerDocument);(!a.parentNode||"body"!=String(a.parentNode.tagName).toLowerCase())&&
f.body(a.ownerDocument).appendChild(a);var r=null;k.some(b,function(b){var d=b.corner,f=b.pos,m=0,h={w:{L:g.l+g.w-f.x,R:f.x-g.l,M:g.w}[d.charAt(1)],h:{T:g.t+g.h-f.y,B:f.y-g.t,M:g.h}[d.charAt(0)]},p=a.style;p.left=p.right="auto";c&&(m=c(a,b.aroundCorner,d,h,e),m="undefined"==typeof m?0:m);var k=a.style,t=k.display,C=k.visibility;"none"==k.display&&(k.visibility="hidden",k.display="");p=l.position(a);k.display=t;k.visibility=C;t={L:f.x,R:f.x-p.w,M:Math.max(g.l,Math.min(g.l+g.w,f.x+(p.w>>1))-p.w)}[d.charAt(1)];
C={T:f.y,B:f.y-p.h,M:Math.max(g.t,Math.min(g.t+g.h,f.y+(p.h>>1))-p.h)}[d.charAt(0)];f=Math.max(g.l,t);k=Math.max(g.t,C);t=Math.min(g.l+g.w,t+p.w);C=Math.min(g.t+g.h,C+p.h);t-=f;C-=k;m+=p.w-t+(p.h-C);if(null==r||m<r.overflow)r={corner:d,aroundCorner:b.aroundCorner,x:f,y:k,w:t,h:C,overflow:m,spaceAvailable:h};return!m});r.overflow&&c&&c(a,r.aroundCorner,r.corner,r.spaceAvailable,e);b=r.y;var p=r.x,t=f.body(a.ownerDocument);/relative|absolute/.test(h.get(t,"position"))&&(b-=h.get(t,"marginTop"),p-=h.get(t,
"marginLeft"));t=a.style;t.top=b+"px";t.left=p+"px";t.right="auto";return r}var b={TL:"BR",TR:"BL",BL:"TR",BR:"TL"};return e.place={at:function(a,d,e,f,g){e=k.map(e,function(a){var c={corner:a,aroundCorner:b[a],pos:{x:d.x,y:d.y}};f&&(c.pos.x+="L"==a.charAt(1)?f.x:-f.x,c.pos.y+="T"==a.charAt(0)?f.y:-f.y);return c});return c(a,e,g)},around:function(a,b,d,e,f){function r(a,b){C.push({aroundCorner:a,corner:b,pos:{x:{L:y,R:y+A,M:y+(A>>1)}[a.charAt(1)],y:{T:z,B:z+D,M:z+(D>>1)}[a.charAt(0)]}})}var p;if("string"==
typeof b||"offsetWidth"in b||"ownerSVGElement"in b){if(p=l.position(b,!0),/^(above|below)/.test(d[0])){var t=l.getBorderExtents(b),u=b.firstChild?l.getBorderExtents(b.firstChild):{t:0,l:0,b:0,r:0},v=l.getBorderExtents(a),x=a.firstChild?l.getBorderExtents(a.firstChild):{t:0,l:0,b:0,r:0};p.y+=Math.min(t.t+u.t,v.t+x.t);p.h-=Math.min(t.t+u.t,v.t+x.t)+Math.min(t.b+u.b,v.b+x.b)}}else p=b;if(b.parentNode){t="absolute"==h.getComputedStyle(b).position;for(b=b.parentNode;b&&1==b.nodeType&&"BODY"!=b.nodeName;){u=
l.position(b,!0);v=h.getComputedStyle(b);/relative|absolute/.test(v.position)&&(t=!1);if(!t&&/hidden|auto|scroll/.test(v.overflow)){var x=Math.min(p.y+p.h,u.y+u.h),w=Math.min(p.x+p.w,u.x+u.w);p.x=Math.max(p.x,u.x);p.y=Math.max(p.y,u.y);p.h=x-p.y;p.w=w-p.x}"absolute"==v.position&&(t=!0);b=b.parentNode}}var y=p.x,z=p.y,A="w"in p?p.w:p.w=p.width,D="h"in p?p.h:(g.deprecated("place.around: dijit/place.__Rectangle: { x:"+y+", y:"+z+", height:"+p.height+", width:"+A+" } has been deprecated.  Please use { x:"+
y+", y:"+z+", h:"+p.height+", w:"+A+" }","","2.0"),p.h=p.height),C=[];k.forEach(d,function(a){var b=e;switch(a){case "above-centered":r("TM","BM");break;case "below-centered":r("BM","TM");break;case "after-centered":b=!b;case "before-centered":r(b?"ML":"MR",b?"MR":"ML");break;case "after":b=!b;case "before":r(b?"TL":"TR",b?"TR":"TL");r(b?"BL":"BR",b?"BR":"BL");break;case "below-alt":b=!b;case "below":r(b?"BL":"BR",b?"TL":"TR");r(b?"BR":"BL",b?"TR":"TL");break;case "above-alt":b=!b;case "above":r(b?
"TL":"TR",b?"BL":"BR");r(b?"TR":"TL",b?"BR":"BL");break;default:r(a.aroundCorner,a.corner)}});a=c(a,C,f,{w:A,h:D});a.aroundNodePos=p;return a}}})},"dijit/form/ComboBoxMixin":function(){define("dojo/_base/declare dojo/Deferred dojo/_base/kernel dojo/_base/lang dojo/store/util/QueryResults ./_AutoCompleterMixin ./_ComboBoxMenu ../_HasDropDown dojo/text!./templates/DropDownBox.html".split(" "),function(k,l,h,g,f,d,e,c,b){return k("dijit.form.ComboBoxMixin",[c,d],{dropDownClass:e,hasDownArrow:!0,templateString:b,
baseClass:"dijitTextBox dijitComboBox",cssStateNodes:{_buttonNode:"dijitDownArrowButton"},_setHasDownArrowAttr:function(a){this._set("hasDownArrow",a);this._buttonNode.style.display=a?"":"none"},_showResultList:function(){this.displayMessage("");this.inherited(arguments)},_setStoreAttr:function(a){a.get||g.mixin(a,{_oldAPI:!0,get:function(a){var b=new l;this.fetchItemByIdentity({identity:a,onItem:function(a){b.resolve(a)},onError:function(a){b.reject(a)}});return b.promise},query:function(a,b){var c=
new l(function(){d.abort&&d.abort()});c.total=new l;var d=this.fetch(g.mixin({query:a,onBegin:function(a){c.total.resolve(a)},onComplete:function(a){c.resolve(a)},onError:function(a){c.reject(a)}},b));return f(c)}});this._set("store",a)},postMixInProperties:function(){var a=this.params.store||this.store;a&&this._setStoreAttr(a);this.inherited(arguments);if(!this.params.store&&!this.store._oldAPI){var b=this.declaredClass;g.mixin(this.store,{getValue:function(a,c){h.deprecated(b+".store.getValue(item, attr) is deprecated for builtin store.  Use item.attr directly",
"","2.0");return a[c]},getLabel:function(a){h.deprecated(b+".store.getLabel(item) is deprecated for builtin store.  Use item.label directly","","2.0");return a.name},fetch:function(a){h.deprecated(b+".store.fetch() is deprecated for builtin store.","Use store.query()","2.0");require(["dojo/data/ObjectStore"],g.hitch(this,function(b){(new b({objectStore:this})).fetch(a)}))}})}}})})},"dojo/store/util/QueryResults":function(){define(["../../_base/array","../../_base/lang","../../when"],function(k,l,
h){var g=function(f){function d(c){f[c]=function(){var b=arguments,a=h(f,function(a){Array.prototype.unshift.call(b,a);return g(k[c].apply(k,b))});if("forEach"!==c||e)return a}}if(!f)return f;var e=!!f.then;e&&(f=l.delegate(f));d("forEach");d("filter");d("map");null==f.total&&(f.total=h(f,function(c){return c.length}));return f};l.setObject("dojo.store.util.QueryResults",g);return g})},"dijit/form/_AutoCompleterMixin":function(){define("dojo/aspect dojo/_base/declare dojo/dom-attr dojo/keys dojo/_base/lang dojo/query dojo/regexp dojo/sniff ./DataList ./_TextBoxMixin ./_SearchMixin".split(" "),
function(k,l,h,g,f,d,e,c,b,a,m){l=l("dijit.form._AutoCompleterMixin",m,{item:null,autoComplete:!0,highlightMatch:"first",labelAttr:"",labelType:"text",maxHeight:-1,_stopClickEvents:!1,_getCaretPos:function(a){var b=0;if("number"==typeof a.selectionStart)b=a.selectionStart;else if(c("ie")){var d=a.ownerDocument.selection.createRange().duplicate();a=a.createTextRange();d.move("character",0);a.move("character",0);try{a.setEndPoint("EndToEnd",d),b=String(a.text).replace(/\r/g,"").length}catch(e){}}return b},
_setCaretPos:function(b,c){c=parseInt(c);a.selectInputText(b,c,c)},_setDisabledAttr:function(a){this.inherited(arguments);this.domNode.setAttribute("aria-disabled",a?"true":"false")},_onKey:function(a){if(!(32<=a.charCode)){var b=a.charCode||a.keyCode;if(!(b==g.ALT||b==g.CTRL||b==g.META||b==g.SHIFT)){var c=this.dropDown,d=null;this._abortQuery();this.inherited(arguments);if(!a.altKey&&!a.ctrlKey&&!a.metaKey)switch(this._opened&&(d=c.getHighlightedOption()),b){case g.PAGE_DOWN:case g.DOWN_ARROW:case g.PAGE_UP:case g.UP_ARROW:this._opened&&
this._announceOption(d);a.stopPropagation();a.preventDefault();break;case g.ENTER:if(d){if(d==c.nextButton){this._nextSearch(1);a.stopPropagation();a.preventDefault();break}else if(d==c.previousButton){this._nextSearch(-1);a.stopPropagation();a.preventDefault();break}a.stopPropagation();a.preventDefault()}else this._setBlurValue(),this._setCaretPos(this.focusNode,this.focusNode.value.length);case g.TAB:b=this.get("displayedValue");if(c&&(b==c._messages.previousMessage||b==c._messages.nextMessage))break;
d&&this._selectOption(d);case g.ESCAPE:this._opened&&(this._lastQuery=null,this.closeDropDown())}}}},_autoCompleteText:function(b){var c=this.focusNode;a.selectInputText(c,c.value.length);var d=this.ignoreCase?"toLowerCase":"substr";0==b[d](0).indexOf(this.focusNode.value[d](0))?(d=this.autoComplete?this._getCaretPos(c):c.value.length,d+1>c.value.length&&(c.value=b,a.selectInputText(c,d))):(c.value=b,a.selectInputText(c))},_openResultList:function(a,b,c){var d=this.dropDown.getHighlightedOption();
this.dropDown.clearResultList();!a.length&&0==c.start?this.closeDropDown():(this._nextSearch=this.dropDown.onPage=f.hitch(this,function(b){a.nextPage(-1!==b);this.focus()}),this.dropDown.createOptions(a,c,f.hitch(this,"_getMenuLabelFromItem")),this._showResultList(),"direction"in c?(c.direction?this.dropDown.highlightFirstOption():c.direction||this.dropDown.highlightLastOption(),d&&this._announceOption(this.dropDown.getHighlightedOption())):this.autoComplete&&(!this._prev_key_backspace&&!/^[*]+$/.test(b[this.searchAttr].toString()))&&
this._announceOption(this.dropDown.containerNode.firstChild.nextSibling))},_showResultList:function(){this.closeDropDown(!0);this.openDropDown();this.domNode.setAttribute("aria-expanded","true")},loadDropDown:function(){this._startSearchAll()},isLoaded:function(){return!1},closeDropDown:function(){this._abortQuery();this._opened&&(this.inherited(arguments),this.domNode.setAttribute("aria-expanded","false"))},_setBlurValue:function(){var a=this.get("displayedValue"),b=this.dropDown;b&&(a==b._messages.previousMessage||
a==b._messages.nextMessage)?this._setValueAttr(this._lastValueReported,!0):"undefined"==typeof this.item?(this.item=null,this.set("displayedValue",a)):(this.value!=this._lastValueReported&&this._handleOnChange(this.value,!0),this._refreshState());this.focusNode.removeAttribute("aria-activedescendant")},_setItemAttr:function(a,b,c){var d="";a&&(c||(c=this.store._oldAPI?this.store.getValue(a,this.searchAttr):a[this.searchAttr]),d=this._getValueField()!=this.searchAttr?this.store.getIdentity(a):c);this.set("value",
d,b,c,a)},_announceOption:function(a){if(a){var b;if(a==this.dropDown.nextButton||a==this.dropDown.previousButton)b=a.innerHTML,this.item=void 0,this.value="";else{var c=this.dropDown.items[a.getAttribute("item")];b=(this.store._oldAPI?this.store.getValue(c,this.searchAttr):c[this.searchAttr]).toString();this.set("item",c,!1,b)}this.focusNode.value=this.focusNode.value.substring(0,this._lastInput.length);this.focusNode.setAttribute("aria-activedescendant",h.get(a,"id"));this._autoCompleteText(b)}},
_selectOption:function(a){this.closeDropDown();a&&this._announceOption(a);this._setCaretPos(this.focusNode,this.focusNode.value.length);this._handleOnChange(this.value,!0);this.focusNode.removeAttribute("aria-activedescendant")},_startSearchAll:function(){this._startSearch("")},_startSearchFromInput:function(){this.item=void 0;this.inherited(arguments)},_startSearch:function(a){if(!this.dropDown){var b=this.id+"_popup";this.dropDown=new (f.isString(this.dropDownClass)?f.getObject(this.dropDownClass,
!1):this.dropDownClass)({onChange:f.hitch(this,this._selectOption),id:b,dir:this.dir,textDir:this.textDir})}this._lastInput=a;this.inherited(arguments)},_getValueField:function(){return this.searchAttr},postMixInProperties:function(){this.inherited(arguments);if(!this.store&&(this.store=new b({},this.srcNodeRef),!("value"in this.params))){var a=this.item=this.store.fetchSelectedItem();if(a){var c=this._getValueField();this.value=this.store._oldAPI?this.store.getValue(a,c):a[c]}}},postCreate:function(){var a=
d('label[for\x3d"'+this.id+'"]');a.length&&(a[0].id||(a[0].id=this.id+"_label"),this.domNode.setAttribute("aria-labelledby",a[0].id));this.inherited(arguments);k.after(this,"onSearch",f.hitch(this,"_openResultList"),!0)},_getMenuLabelFromItem:function(a){a=this.labelFunc(a,this.store);var b=this.labelType;"none"!=this.highlightMatch&&("text"==this.labelType&&this._lastInput)&&(a=this.doHighlight(a,this._lastInput),b="html");return{html:"html"==b,label:a}},doHighlight:function(a,b){var c=(this.ignoreCase?
"i":"")+("all"==this.highlightMatch?"g":""),d=this.queryExpr.indexOf("${0}");b=e.escapeString(b);return this._escapeHtml(a.replace(RegExp((0==d?"^":"")+"("+b+")"+(d==this.queryExpr.length-4?"$":""),c),"\uffff$1\uffff")).replace(/\uFFFF([^\uFFFF]+)\uFFFF/g,'\x3cspan class\x3d"dijitComboBoxHighlightMatch"\x3e$1\x3c/span\x3e')},_escapeHtml:function(a){return a=String(a).replace(/&/gm,"\x26amp;").replace(/</gm,"\x26lt;").replace(/>/gm,"\x26gt;").replace(/"/gm,"\x26quot;")},reset:function(){this.item=
null;this.inherited(arguments)},labelFunc:function(a,b){return(b._oldAPI?b.getValue(a,this.labelAttr||this.searchAttr):a[this.labelAttr||this.searchAttr]).toString()},_setValueAttr:function(a,b,c,d){this._set("item",d||null);null==a&&(a="");this.inherited(arguments)}});c("dojo-bidi")&&l.extend({_setTextDirAttr:function(a){this.inherited(arguments);this.dropDown&&this.dropDown._set("textDir",a)}});return l})},"dijit/form/DataList":function(){define("dojo/_base/declare dojo/dom dojo/_base/lang dojo/query dojo/store/Memory ../registry".split(" "),
function(k,l,h,g,f,d){function e(c){return{id:c.value,value:c.value,name:h.trim(c.innerText||c.textContent||"")}}return k("dijit.form.DataList",f,{constructor:function(c,b){this.domNode=l.byId(b);h.mixin(this,c);this.id&&d.add(this);this.domNode.style.display="none";this.inherited(arguments,[{data:g("option",this.domNode).map(e)}])},destroy:function(){d.remove(this.id)},fetchSelectedItem:function(){var c=g("\x3e option[selected]",this.domNode)[0]||g("\x3e option",this.domNode)[0];return c&&e(c)}})})},
"dojo/store/Memory":function(){define(["../_base/declare","./util/QueryResults","./util/SimpleQueryEngine"],function(k,l,h){return k("dojo.store.Memory",null,{constructor:function(g){for(var f in g)this[f]=g[f];this.setData(this.data||[])},data:null,idProperty:"id",index:null,queryEngine:h,get:function(g){return this.data[this.index[g]]},getIdentity:function(g){return g[this.idProperty]},put:function(g,f){var d=this.data,e=this.index,c=this.idProperty,c=g[c]=f&&"id"in f?f.id:c in g?g[c]:Math.random();
if(c in e){if(f&&!1===f.overwrite)throw Error("Object already exists");d[e[c]]=g}else e[c]=d.push(g)-1;return c},add:function(g,f){(f=f||{}).overwrite=!1;return this.put(g,f)},remove:function(g){var f=this.index,d=this.data;if(g in f)return d.splice(f[g],1),this.setData(d),!0},query:function(g,f){return l(this.queryEngine(g,f)(this.data))},setData:function(g){g.items?(this.idProperty=g.identifier||this.idProperty,g=this.data=g.items):this.data=g;this.index={};for(var f=0,d=g.length;f<d;f++)this.index[g[f][this.idProperty]]=
f}})})},"dojo/store/util/SimpleQueryEngine":function(){define(["../../_base/array"],function(k){return function(l,h){function g(d){d=k.filter(d,l);var e=h&&h.sort;e&&d.sort("function"==typeof e?e:function(b,a){for(var c,d=0;c=e[d];d++){var f=b[c.attribute],g=a[c.attribute],f=null!=f?f.valueOf():f,g=null!=g?g.valueOf():g;if(f!=g)return!!c.descending==(null==f||f>g)?-1:1}return 0});if(h&&(h.start||h.count)){var c=d.length;d=d.slice(h.start||0,(h.start||0)+(h.count||Infinity));d.total=c}return d}switch(typeof l){default:throw Error("Can not query with a "+
typeof l);case "object":case "undefined":var f=l;l=function(d){for(var e in f){var c=f[e];if(c&&c.test){if(!c.test(d[e],d))return!1}else if(c!=d[e])return!1}return!0};break;case "string":if(!this[l])throw Error("No filter function "+l+" was found in store");l=this[l];case "function":}g.matches=l;return g}})},"dijit/form/_SearchMixin":function(){define("dojo/_base/declare dojo/keys dojo/_base/lang dojo/query dojo/string dojo/when ../registry".split(" "),function(k,l,h,g,f,d,e){return k("dijit.form._SearchMixin",
null,{pageSize:Infinity,store:null,fetchProperties:{},query:{},list:"",_setListAttr:function(c){this._set("list",c)},searchDelay:200,searchAttr:"name",queryExpr:"${0}*",ignoreCase:!0,_patternToRegExp:function(c){return RegExp("^"+c.replace(/(\\.)|(\*)|(\?)|\W/g,function(b,a,c,d){return c?".*":d?".":a?a:"\\"+b})+"$",this.ignoreCase?"mi":"m")},_abortQuery:function(){this.searchTimer&&(this.searchTimer=this.searchTimer.remove());this._queryDeferHandle&&(this._queryDeferHandle=this._queryDeferHandle.remove());
this._fetchHandle&&(this._fetchHandle.abort&&(this._cancelingQuery=!0,this._fetchHandle.abort(),this._cancelingQuery=!1),this._fetchHandle.cancel&&(this._cancelingQuery=!0,this._fetchHandle.cancel(),this._cancelingQuery=!1),this._fetchHandle=null)},_processInput:function(c){if(!this.disabled&&!this.readOnly){c=c.charOrCode;var b=!1;this._prev_key_backspace=!1;switch(c){case l.DELETE:case l.BACKSPACE:b=this._maskValidSubsetError=this._prev_key_backspace=!0;break;default:b="string"==typeof c||229==
c}if(b)if(this.store)this.searchTimer=this.defer("_startSearchFromInput",1);else this.onSearch()}},onSearch:function(){},_startSearchFromInput:function(){this._startSearch(this.focusNode.value)},_startSearch:function(c){this._abortQuery();var b=this,a=h.clone(this.query),e={start:0,count:this.pageSize,queryOptions:{ignoreCase:this.ignoreCase,deep:!0}},n=f.substitute(this.queryExpr,[c.replace(/([\\\*\?])/g,"\\$1")]),g,s=function(){var c=b._fetchHandle=b.store.query(a,e);!b.disabled&&!(b.readOnly||
g!==b._lastQuery)&&d(c,function(f){b._fetchHandle=null;!b.disabled&&(!b.readOnly&&g===b._lastQuery)&&d(c.total,function(c){f.total=c;var d=b.pageSize;if(isNaN(d)||d>f.total)d=f.total;f.nextPage=function(c){e.direction=c=!1!==c;e.count=d;c?(e.start+=f.length,e.start>=f.total&&(e.count=0)):(e.start-=d,0>e.start&&(e.count=Math.max(d+e.start,0),e.start=0));0>=e.count?(f.length=0,b.onSearch(f,a,e)):s()};b.onSearch(f,a,e)})},function(a){b._fetchHandle=null;b._cancelingQuery||console.error(b.declaredClass+
" "+a.toString())})};h.mixin(e,this.fetchProperties);this.store._oldAPI?g=n:(g=this._patternToRegExp(n),g.toString=function(){return n});this._lastQuery=a[this.searchAttr]=g;this._queryDeferHandle=this.defer(s,this.searchDelay)},constructor:function(){this.query={};this.fetchProperties={}},postMixInProperties:function(){if(!this.store){var c=this.list;c&&(this.store=e.byId(c))}this.inherited(arguments)}})})},"dijit/form/_ComboBoxMenu":function(){define("dojo/_base/declare dojo/dom-class dojo/dom-style dojo/keys ../_WidgetBase ../_TemplatedMixin ./_ComboBoxMenuMixin ./_ListMouseMixin".split(" "),
function(k,l,h,g,f,d,e,c){return k("dijit.form._ComboBoxMenu",[f,d,c,e],{templateString:"\x3cdiv class\x3d'dijitReset dijitMenu' data-dojo-attach-point\x3d'containerNode' style\x3d'overflow: auto; overflow-x: hidden;' role\x3d'listbox'\x3e\x3cdiv class\x3d'dijitMenuItem dijitMenuPreviousButton' data-dojo-attach-point\x3d'previousButton' role\x3d'option'\x3e\x3c/div\x3e\x3cdiv class\x3d'dijitMenuItem dijitMenuNextButton' data-dojo-attach-point\x3d'nextButton' role\x3d'option'\x3e\x3c/div\x3e\x3c/div\x3e",
baseClass:"dijitComboBoxMenu",postCreate:function(){this.inherited(arguments);this.isLeftToRight()||(l.add(this.previousButton,"dijitMenuItemRtl"),l.add(this.nextButton,"dijitMenuItemRtl"));this.containerNode.setAttribute("role","listbox")},_createMenuItem:function(){var b=this.ownerDocument.createElement("div");b.className="dijitReset dijitMenuItem"+(this.isLeftToRight()?"":" dijitMenuItemRtl");b.setAttribute("role","option");return b},onHover:function(b){l.add(b,"dijitMenuItemHover")},onUnhover:function(b){l.remove(b,
"dijitMenuItemHover")},onSelect:function(b){l.add(b,"dijitMenuItemSelected")},onDeselect:function(b){l.remove(b,"dijitMenuItemSelected")},_page:function(b){var a=0,c=this.domNode.scrollTop,d=h.get(this.domNode,"height");for(this.getHighlightedOption()||this.selectNextNode();a<d;){var e=this.getHighlightedOption();if(b){if(!e.previousSibling||"none"==e.previousSibling.style.display)break;this.selectPreviousNode()}else{if(!e.nextSibling||"none"==e.nextSibling.style.display)break;this.selectNextNode()}e=
this.domNode.scrollTop;a+=(e-c)*(b?-1:1);c=e}},handleKey:function(b){switch(b.keyCode){case g.DOWN_ARROW:return this.selectNextNode(),!1;case g.PAGE_DOWN:return this._page(!1),!1;case g.UP_ARROW:return this.selectPreviousNode(),!1;case g.PAGE_UP:return this._page(!0),!1;default:return!0}}})})},"dijit/form/_ComboBoxMenuMixin":function(){define("dojo/_base/array dojo/_base/declare dojo/dom-attr dojo/has dojo/i18n dojo/i18n!./nls/ComboBox".split(" "),function(k,l,h,g,f){var d=l("dijit.form._ComboBoxMenuMixin"+
(g("dojo-bidi")?"_NoBidi":""),null,{_messages:null,postMixInProperties:function(){this.inherited(arguments);this._messages=f.getLocalization("dijit.form","ComboBox",this.lang)},buildRendering:function(){this.inherited(arguments);this.previousButton.innerHTML=this._messages.previousMessage;this.nextButton.innerHTML=this._messages.nextMessage},_setValueAttr:function(d){this._set("value",d);this.onChange(d)},onClick:function(d){if(d==this.previousButton)this._setSelectedAttr(null),this.onPage(-1);else if(d==
this.nextButton)this._setSelectedAttr(null),this.onPage(1);else this.onChange(d)},onChange:function(){},onPage:function(){},onClose:function(){this._setSelectedAttr(null)},_createOption:function(d,c){var b=this._createMenuItem(),a=c(d);a.html?b.innerHTML=a.label:b.appendChild(b.ownerDocument.createTextNode(a.label));""==b.innerHTML&&(b.innerHTML="\x26#160;");return b},createOptions:function(d,c,b){this.items=d;this.previousButton.style.display=0==c.start?"none":"";h.set(this.previousButton,"id",this.id+
"_prev");k.forEach(d,function(a,c){var d=this._createOption(a,b);d.setAttribute("item",c);h.set(d,"id",this.id+c);this.nextButton.parentNode.insertBefore(d,this.nextButton)},this);var a=!1;d.total&&!d.total.then&&-1!=d.total?c.start+c.count<d.total?a=!0:c.start+c.count>d.total&&c.count==d.length&&(a=!0):c.count==d.length&&(a=!0);this.nextButton.style.display=a?"":"none";h.set(this.nextButton,"id",this.id+"_next")},clearResultList:function(){for(var d=this.containerNode;2<d.childNodes.length;)d.removeChild(d.childNodes[d.childNodes.length-
2]);this._setSelectedAttr(null)},highlightFirstOption:function(){this.selectFirstNode()},highlightLastOption:function(){this.selectLastNode()},selectFirstNode:function(){this.inherited(arguments);this.getHighlightedOption()==this.previousButton&&this.selectNextNode()},selectLastNode:function(){this.inherited(arguments);this.getHighlightedOption()==this.nextButton&&this.selectPreviousNode()},getHighlightedOption:function(){return this.selected}});g("dojo-bidi")&&(d=l("dijit.form._ComboBoxMenuMixin",
d,{_createOption:function(){var d=this.inherited(arguments);this.applyTextDir(d);return d}}));return d})},"dijit/form/_ListMouseMixin":function(){define(["dojo/_base/declare","dojo/on","dojo/touch","./_ListBase"],function(k,l,h,g){return k("dijit.form._ListMouseMixin",g,{postCreate:function(){this.inherited(arguments);this.domNode.dojoClick=!0;this._listConnect("click","_onClick");this._listConnect("mousedown","_onMouseDown");this._listConnect("mouseup","_onMouseUp");this._listConnect("mouseover",
"_onMouseOver");this._listConnect("mouseout","_onMouseOut")},_onClick:function(f,d){this._setSelectedAttr(d,!1);this._deferredClick&&this._deferredClick.remove();this._deferredClick=this.defer(function(){this._deferredClick=null;this.onClick(d)})},_onMouseDown:function(f,d){this._hoveredNode&&(this.onUnhover(this._hoveredNode),this._hoveredNode=null);this._isDragging=!0;this._setSelectedAttr(d,!1)},_onMouseUp:function(f,d){this._isDragging=!1;var e=this.selected,c=this._hoveredNode;e&&d==e?this.defer(function(){this._onClick(f,
e)}):c&&this.defer(function(){this._onClick(f,c)})},_onMouseOut:function(f,d){this._hoveredNode&&(this.onUnhover(this._hoveredNode),this._hoveredNode=null);this._isDragging&&(this._cancelDrag=(new Date).getTime()+1E3)},_onMouseOver:function(f,d){this._cancelDrag&&((new Date).getTime()>this._cancelDrag&&(this._isDragging=!1),this._cancelDrag=null);this._hoveredNode=d;this.onHover(d);this._isDragging&&this._setSelectedAttr(d,!1)}})})},"dijit/form/_ListBase":function(){define(["dojo/_base/declare","dojo/on",
"dojo/window"],function(k,l,h){return k("dijit.form._ListBase",null,{selected:null,_listConnect:function(g,f){var d=this;return d.own(l(d.containerNode,l.selector(function(d,c,b){return d.parentNode==b},g),function(e){d[f](e,this)}))},selectFirstNode:function(){for(var g=this.containerNode.firstChild;g&&"none"==g.style.display;)g=g.nextSibling;this._setSelectedAttr(g,!0)},selectLastNode:function(){for(var g=this.containerNode.lastChild;g&&"none"==g.style.display;)g=g.previousSibling;this._setSelectedAttr(g,
!0)},selectNextNode:function(){var g=this.selected;if(g){for(g=g.nextSibling;g&&"none"==g.style.display;)g=g.nextSibling;g?this._setSelectedAttr(g,!0):this.selectFirstNode()}else this.selectFirstNode()},selectPreviousNode:function(){var g=this.selected;if(g){for(g=g.previousSibling;g&&"none"==g.style.display;)g=g.previousSibling;g?this._setSelectedAttr(g,!0):this.selectLastNode()}else this.selectLastNode()},_setSelectedAttr:function(g,f){if(this.selected!=g){var d=this.selected;if(d)this.onDeselect(d);
g&&(f&&h.scrollIntoView(g),this.onSelect(g));this._set("selected",g)}else if(g)this.onSelect(g)}})})},"dijit/_HasDropDown":function(){define("dojo/_base/declare dojo/_base/Deferred dojo/dom dojo/dom-attr dojo/dom-class dojo/dom-geometry dojo/dom-style dojo/has dojo/keys dojo/_base/lang dojo/on dojo/touch ./registry ./focus ./popup ./_FocusMixin".split(" "),function(k,l,h,g,f,d,e,c,b,a,m,n,q,s,r,p){return k("dijit._HasDropDown",p,{_buttonNode:null,_arrowWrapperNode:null,_popupStateNode:null,_aroundNode:null,
dropDown:null,autoWidth:!0,forceWidth:!1,maxHeight:-1,dropDownPosition:["below","above"],_stopClickEvents:!0,_onDropDownMouseDown:function(b){!this.disabled&&!this.readOnly&&("MSPointerDown"!=b.type&&"pointerdown"!=b.type&&b.preventDefault(),this.own(m.once(this.ownerDocument,n.release,a.hitch(this,"_onDropDownMouseUp"))),this.toggleDropDown())},_onDropDownMouseUp:function(a){var b=this.dropDown,c=!1;if(a&&this._opened){var e=d.position(this._buttonNode,!0);if(!(a.pageX>=e.x&&a.pageX<=e.x+e.w)||!(a.pageY>=
e.y&&a.pageY<=e.y+e.h)){for(e=a.target;e&&!c;)f.contains(e,"dijitPopup")?c=!0:e=e.parentNode;if(c){e=a.target;if(b.onItemClick){for(var m;e&&!(m=q.byNode(e));)e=e.parentNode;if(m&&m.onClick&&m.getParent)m.getParent().onItemClick(m,a)}return}}}if(this._opened){if(b.focus&&(!1!==b.autoFocus||"mouseup"==a.type&&!this.hovering))this._focusDropDownTimer=this.defer(function(){b.focus();delete this._focusDropDownTimer})}else this.focus&&this.defer("focus")},_onDropDownClick:function(a){this._stopClickEvents&&
(a.stopPropagation(),a.preventDefault())},buildRendering:function(){this.inherited(arguments);this._buttonNode=this._buttonNode||this.focusNode||this.domNode;this._popupStateNode=this._popupStateNode||this.focusNode||this._buttonNode;var a={after:this.isLeftToRight()?"Right":"Left",before:this.isLeftToRight()?"Left":"Right",above:"Up",below:"Down",left:"Left",right:"Right"}[this.dropDownPosition[0]]||this.dropDownPosition[0]||"Down";f.add(this._arrowWrapperNode||this._buttonNode,"dijit"+a+"ArrowButton")},
postCreate:function(){this.inherited(arguments);var b=this.focusNode||this.domNode;this.own(m(this._buttonNode,n.press,a.hitch(this,"_onDropDownMouseDown")),m(this._buttonNode,"click",a.hitch(this,"_onDropDownClick")),m(b,"keydown",a.hitch(this,"_onKey")),m(b,"keyup",a.hitch(this,"_onKeyUp")))},destroy:function(){this.dropDown&&(this.dropDown._destroyed||this.dropDown.destroyRecursive(),delete this.dropDown);this.inherited(arguments)},_onKey:function(a){if(!this.disabled&&!this.readOnly){var c=this.dropDown,
d=a.target;if(c&&(this._opened&&c.handleKey)&&!1===c.handleKey(a))a.stopPropagation(),a.preventDefault();else if(c&&this._opened&&a.keyCode==b.ESCAPE)this.closeDropDown(),a.stopPropagation(),a.preventDefault();else if(!this._opened&&(a.keyCode==b.DOWN_ARROW||(a.keyCode==b.ENTER||a.keyCode==b.SPACE&&(!this._searchTimer||a.ctrlKey||a.altKey||a.metaKey))&&("input"!==(d.tagName||"").toLowerCase()||d.type&&"text"!==d.type.toLowerCase())))this._toggleOnKeyUp=!0,a.stopPropagation(),a.preventDefault()}},
_onKeyUp:function(){if(this._toggleOnKeyUp){delete this._toggleOnKeyUp;this.toggleDropDown();var b=this.dropDown;b&&b.focus&&this.defer(a.hitch(b,"focus"),1)}},_onBlur:function(){this.closeDropDown(!1);this.inherited(arguments)},isLoaded:function(){return!0},loadDropDown:function(a){a()},loadAndOpenDropDown:function(){var b=new l,c=a.hitch(this,function(){this.openDropDown();b.resolve(this.dropDown)});this.isLoaded()?c():this.loadDropDown(c);return b},toggleDropDown:function(){!this.disabled&&!this.readOnly&&
(this._opened?this.closeDropDown(!0):this.loadAndOpenDropDown())},openDropDown:function(){var b=this.dropDown,c=b.domNode,e=this._aroundNode||this.domNode,m=this,n=r.open({parent:this,popup:b,around:e,orient:this.dropDownPosition,maxHeight:this.maxHeight,onExecute:function(){m.closeDropDown(!0)},onCancel:function(){m.closeDropDown(!0)},onClose:function(){g.set(m._popupStateNode,"popupActive",!1);f.remove(m._popupStateNode,"dijitHasDropDownOpen");m._set("_opened",!1)}});if(this.forceWidth||this.autoWidth&&
e.offsetWidth>b._popupWrapper.offsetWidth){var e=e.offsetWidth-b._popupWrapper.offsetWidth,h={w:b.domNode.offsetWidth+e};this._origStyle=c.style.cssText;a.isFunction(b.resize)?b.resize(h):d.setMarginBox(c,h);"R"==n.corner[1]&&(b._popupWrapper.style.left=b._popupWrapper.style.left.replace("px","")-e+"px")}g.set(this._popupStateNode,"popupActive","true");f.add(this._popupStateNode,"dijitHasDropDownOpen");this._set("_opened",!0);this._popupStateNode.setAttribute("aria-expanded","true");this._popupStateNode.setAttribute("aria-owns",
b.id);"presentation"!==c.getAttribute("role")&&!c.getAttribute("aria-labelledby")&&c.setAttribute("aria-labelledby",this.id);return n},closeDropDown:function(a){this._focusDropDownTimer&&(this._focusDropDownTimer.remove(),delete this._focusDropDownTimer);this._opened&&(this._popupStateNode.setAttribute("aria-expanded","false"),a&&this.focus(),r.close(this.dropDown),this._opened=!1);this._origStyle&&(this.dropDown.domNode.style.cssText=this._origStyle,delete this._origStyle)}})})},"dijit/popup":function(){define("dojo/_base/array dojo/aspect dojo/_base/declare dojo/dom dojo/dom-attr dojo/dom-construct dojo/dom-geometry dojo/dom-style dojo/has dojo/keys dojo/_base/lang dojo/on ./place ./BackgroundIframe ./Viewport ./main".split(" "),
function(k,l,h,g,f,d,e,c,b,a,m,n,q,s,r,p){function t(){this._popupWrapper&&(d.destroy(this._popupWrapper),delete this._popupWrapper)}h=h(null,{_stack:[],_beginZIndex:1E3,_idGen:1,_repositionAll:function(){if(this._firstAroundNode){var a=this._firstAroundPosition,b=e.position(this._firstAroundNode,!0),c=b.x-a.x,a=b.y-a.y;if(c||a){this._firstAroundPosition=b;for(b=0;b<this._stack.length;b++){var d=this._stack[b].wrapper.style;d.top=parseInt(d.top,10)+a+"px";"auto"==d.right?d.left=parseInt(d.left,10)+
c+"px":d.right=parseInt(d.right,10)-c+"px"}}this._aroundMoveListener=setTimeout(m.hitch(this,"_repositionAll"),c||a?10:50)}},_createWrapper:function(a){var b=a._popupWrapper,c=a.domNode;b||(b=d.create("div",{"class":"dijitPopup",style:{display:"none"},role:"region","aria-label":a["aria-label"]||a.label||a.name||a.id},a.ownerDocumentBody),b.appendChild(c),c=c.style,c.display="",c.visibility="",c.position="",c.top="0px",a._popupWrapper=b,l.after(a,"destroy",t,!0));return b},moveOffScreen:function(a){var b=
this._createWrapper(a);a=e.isBodyLtr(a.ownerDocument);var d={visibility:"hidden",top:"-9999px",display:""};d[a?"left":"right"]="-9999px";d[a?"right":"left"]="auto";c.set(b,d);return b},hide:function(a){var b=this._createWrapper(a);c.set(b,{display:"none",height:"auto",overflowY:"visible",border:""});a=a.domNode;"_originalStyle"in a&&(a.style.cssText=a._originalStyle)},getTopPopup:function(){for(var a=this._stack,b=a.length-1;0<b&&a[b].parent===a[b-1].widget;b--);return a[b]},open:function(d){for(var h=
this._stack,p=d.popup,k=p.domNode,y=d.orient||["below","below-alt","above","above-alt"],l=d.parent?d.parent.isLeftToRight():e.isBodyLtr(p.ownerDocument),t=d.around,D=d.around&&d.around.id?d.around.id+"_dropdown":"popup_"+this._idGen++;h.length&&(!d.parent||!g.isDescendant(d.parent.domNode,h[h.length-1].widget.domNode));)this.close(h[h.length-1].widget);var C=this.moveOffScreen(p);p.startup&&!p._started&&p.startup();var B,I=e.position(k);if("maxHeight"in d&&-1!=d.maxHeight)B=d.maxHeight||Infinity;
else{B=r.getEffectiveBox(this.ownerDocument);var M=t?e.position(t,!1):{y:d.y-(d.padding||0),h:2*(d.padding||0)};B=Math.floor(Math.max(M.y,B.h-(M.y+M.h)))}I.h>B&&(I=c.getComputedStyle(k),c.set(C,{overflowY:"scroll",height:B+"px",border:I.borderLeftWidth+" "+I.borderLeftStyle+" "+I.borderLeftColor}),k._originalStyle=k.style.cssText,k.style.border="none");f.set(C,{id:D,style:{zIndex:this._beginZIndex+h.length},"class":"dijitPopup "+(p.baseClass||p["class"]||"").split(" ")[0]+"Popup",dijitPopupParent:d.parent?
d.parent.id:""});0==h.length&&t&&(this._firstAroundNode=t,this._firstAroundPosition=e.position(t,!0),this._aroundMoveListener=setTimeout(m.hitch(this,"_repositionAll"),50));b("config-bgIframe")&&!p.bgIframe&&(p.bgIframe=new s(C));D=p.orient?m.hitch(p,"orient"):null;y=t?q.around(C,t,y,l,D):q.at(C,d,"R"==y?["TR","BR","TL","BL"]:["TL","BL","TR","BR"],d.padding,D);C.style.visibility="visible";k.style.visibility="visible";k=[];k.push(n(C,"keydown",m.hitch(this,function(b){if(b.keyCode==a.ESCAPE&&d.onCancel)b.stopPropagation(),
b.preventDefault(),d.onCancel();else if(b.keyCode==a.TAB&&(b.stopPropagation(),b.preventDefault(),(b=this.getTopPopup())&&b.onCancel))b.onCancel()})));p.onCancel&&d.onCancel&&k.push(p.on("cancel",d.onCancel));k.push(p.on(p.onExecute?"execute":"change",m.hitch(this,function(){var a=this.getTopPopup();if(a&&a.onExecute)a.onExecute()})));h.push({widget:p,wrapper:C,parent:d.parent,onExecute:d.onExecute,onCancel:d.onCancel,onClose:d.onClose,handlers:k});if(p.onOpen)p.onOpen(y);return y},close:function(a){for(var b=
this._stack;a&&k.some(b,function(b){return b.widget==a})||!a&&b.length;){var c=b.pop(),d=c.widget,e=c.onClose;if(d.onClose)d.onClose();for(var f;f=c.handlers.pop();)f.remove();d&&d.domNode&&this.hide(d);e&&e()}0==b.length&&this._aroundMoveListener&&(clearTimeout(this._aroundMoveListener),this._firstAroundNode=this._firstAroundPosition=this._aroundMoveListener=null)}});return p.popup=new h})},"dijit/form/Button":function(){define("require dojo/_base/declare dojo/dom-class dojo/has dojo/_base/kernel dojo/_base/lang dojo/ready ./_FormWidget ./_ButtonMixin dojo/text!./templates/Button.html".split(" "),
function(k,l,h,g,f,d,e,c,b,a){g("dijit-legacy-requires")&&e(0,function(){k(["dijit/form/DropDownButton","dijit/form/ComboButton","dijit/form/ToggleButton"])});e=l("dijit.form.Button"+(g("dojo-bidi")?"_NoBidi":""),[c,b],{showLabel:!0,iconClass:"dijitNoIcon",_setIconClassAttr:{node:"iconNode",type:"class"},baseClass:"dijitButton",templateString:a,_setValueAttr:"valueNode",_setNameAttr:function(a){this.valueNode&&this.valueNode.setAttribute("name",a)},_fillContent:function(a){if(a&&(!this.params||!("label"in
this.params)))if(a=d.trim(a.innerHTML))this.label=a},_setShowLabelAttr:function(a){this.containerNode&&h.toggle(this.containerNode,"dijitDisplayNone",!a);this._set("showLabel",a)},setLabel:function(a){f.deprecated("dijit.form.Button.setLabel() is deprecated.  Use set('label', ...) instead.","","2.0");this.set("label",a)},_setLabelAttr:function(a){this.inherited(arguments);!this.showLabel&&!("title"in this.params)&&(this.titleNode.title=d.trim(this.containerNode.innerText||this.containerNode.textContent||
""))}});g("dojo-bidi")&&(e=l("dijit.form.Button",e,{_setLabelAttr:function(a){this.inherited(arguments);this.titleNode.title&&this.applyTextDir(this.titleNode,this.titleNode.title)},_setTextDirAttr:function(a){this._created&&this.textDir!=a&&(this._set("textDir",a),this._setLabelAttr(this.label))}}));return e})},"dijit/form/_ButtonMixin":function(){define(["dojo/_base/declare","dojo/dom","dojo/has","../registry"],function(k,l,h,g){var f=k("dijit.form._ButtonMixin"+(h("dojo-bidi")?"_NoBidi":""),null,
{label:"",type:"button",__onClick:function(d){d.stopPropagation();d.preventDefault();this.disabled||this.valueNode.click(d);return!1},_onClick:function(d){if(this.disabled)return d.stopPropagation(),d.preventDefault(),!1;!1===this.onClick(d)&&d.preventDefault();var e=d.defaultPrevented;if(!e&&"submit"==this.type&&!(this.valueNode||this.focusNode).form)for(var c=this.domNode;c.parentNode;c=c.parentNode){var b=g.byNode(c);if(b&&"function"==typeof b._onSubmit){b._onSubmit(d);d.preventDefault();e=!0;
break}}return!e},postCreate:function(){this.inherited(arguments);l.setSelectable(this.focusNode,!1)},onClick:function(){return!0},_setLabelAttr:function(d){this._set("label",d);(this.containerNode||this.focusNode).innerHTML=d}});h("dojo-bidi")&&(f=k("dijit.form._ButtonMixin",f,{_setLabelAttr:function(){this.inherited(arguments);this.applyTextDir(this.containerNode||this.focusNode)}}));return f})},"dijit/form/Select":function(){define("dojo/_base/array dojo/_base/declare dojo/dom-attr dojo/dom-class dojo/dom-geometry dojo/i18n dojo/_base/lang dojo/on dojo/sniff ./_FormSelectWidget ../_HasDropDown ../DropDownMenu ../MenuItem ../MenuSeparator ../Tooltip ../_KeyNavMixin ../registry dojo/text!./templates/Select.html dojo/i18n!./nls/validate".split(" "),
function(k,l,h,g,f,d,e,c,b,a,m,n,q,s,r,p,t,u){function v(a){return function(b){this._isLoaded?this.inherited(a,arguments):this.loadDropDown(e.hitch(this,a,b))}}var x=l("dijit.form._SelectMenu",n,{autoFocus:!0,buildRendering:function(){this.inherited(arguments);this.domNode.setAttribute("role","listbox")},postCreate:function(){this.inherited(arguments);this.own(c(this.domNode,"selectstart",function(a){a.preventDefault();a.stopPropagation()}))},focus:function(){var a=!1,b=this.parentWidget.value;e.isArray(b)&&
(b=b[b.length-1]);b&&k.forEach(this.parentWidget._getChildren(),function(c){c.option&&b===c.option.value&&(a=!0,this.focusChild(c,!1))},this);a||this.inherited(arguments)}});f=l("dijit.form.Select"+(b("dojo-bidi")?"_NoBidi":""),[a,m,p],{baseClass:"dijitSelect dijitValidationTextBox",templateString:u,_buttonInputDisabled:b("ie")?"disabled":"",required:!1,state:"",message:"",tooltipPosition:[],emptyLabel:"\x26#160;",_isLoaded:!1,_childrenLoaded:!1,_fillContent:function(){this.inherited(arguments);if(this.options.length&&
!this.value&&this.srcNodeRef){var a=this.srcNodeRef.selectedIndex||0;this._set("value",this.options[0<=a?a:0].value)}this.dropDown=new x({id:this.id+"_menu",parentWidget:this});g.add(this.dropDown.domNode,this.baseClass.replace(/\s+|$/g,"Menu "))},_getMenuItemForOption:function(a){if(!a.value&&!a.label)return new s({ownerDocument:this.ownerDocument});var b=e.hitch(this,"_setValueAttr",a);a=new q({option:a,label:a.label||this.emptyLabel,onClick:b,ownerDocument:this.ownerDocument,dir:this.dir,textDir:this.textDir,
disabled:a.disabled||!1});a.focusNode.setAttribute("role","option");return a},_addOptionItem:function(a){this.dropDown&&this.dropDown.addChild(this._getMenuItemForOption(a))},_getChildren:function(){return!this.dropDown?[]:this.dropDown.getChildren()},focus:function(){if(!this.disabled&&this.focusNode.focus)try{this.focusNode.focus()}catch(a){}},focusChild:function(a){a&&this.set("value",a.option)},_getFirst:function(){var a=this._getChildren();return a.length?a[0]:null},_getLast:function(){var a=
this._getChildren();return a.length?a[a.length-1]:null},childSelector:function(a){return(a=t.byNode(a))&&a.getParent()==this.dropDown},onKeyboardSearch:function(a,b,c,d){a&&this.focusChild(a)},_loadChildren:function(a){if(!0===a)if(this.dropDown&&(delete this.dropDown.focusedChild,this.focusedChild=null),this.options.length)this.inherited(arguments);else{k.forEach(this._getChildren(),function(a){a.destroyRecursive()});var b=new q({ownerDocument:this.ownerDocument,label:this.emptyLabel});this.dropDown.addChild(b)}else this._updateSelection();
this._isLoaded=!1;this._childrenLoaded=!0;this._loadingStore||this._setValueAttr(this.value,!1)},_refreshState:function(){this._started&&this.validate(this.focused)},startup:function(){this.inherited(arguments);this._refreshState()},_setValueAttr:function(a){this.inherited(arguments);h.set(this.valueNode,"value",this.get("value"));this._refreshState()},_setNameAttr:"valueNode",_setDisabledAttr:function(a){this.inherited(arguments);this._refreshState()},_setRequiredAttr:function(a){this._set("required",
a);this.focusNode.setAttribute("aria-required",a);this._refreshState()},_setOptionsAttr:function(a){this._isLoaded=!1;this._set("options",a)},_setDisplay:function(a){a=a||this.emptyLabel;this.containerNode.innerHTML='\x3cspan role\x3d"option" aria-selected\x3d"true" class\x3d"dijitReset dijitInline '+this.baseClass.replace(/\s+|$/g,"Label ")+'"\x3e'+a+"\x3c/span\x3e"},validate:function(a){a=this.disabled||this.isValid(a);this._set("state",a?"":this._hasBeenBlurred?"Error":"Incomplete");this.focusNode.setAttribute("aria-invalid",
a?"false":"true");var b=a?"":this._missingMsg;b&&this.focused&&this._hasBeenBlurred?r.show(b,this.domNode,this.tooltipPosition,!this.isLeftToRight()):r.hide(this.domNode);this._set("message",b);return a},isValid:function(){return!this.required||0===this.value||!/^\s*$/.test(this.value||"")},reset:function(){this.inherited(arguments);r.hide(this.domNode);this._refreshState()},postMixInProperties:function(){this.inherited(arguments);this._missingMsg=d.getLocalization("dijit.form","validate",this.lang).missingMessage},
postCreate:function(){this.inherited(arguments);this.own(c(this.domNode,"selectstart",function(a){a.preventDefault();a.stopPropagation()}));this.domNode.setAttribute("aria-expanded","false")},_setStyleAttr:function(a){this.inherited(arguments);g.toggle(this.domNode,this.baseClass.replace(/\s+|$/g,"FixedWidth "),!!this.domNode.style.width)},isLoaded:function(){return this._isLoaded},loadDropDown:function(a){this._loadChildren(!0);this._isLoaded=!0;a()},destroy:function(a){this.dropDown&&!this.dropDown._destroyed&&
(this.dropDown.destroyRecursive(a),delete this.dropDown);this.inherited(arguments)},_onFocus:function(){this.validate(!0)},_onBlur:function(){r.hide(this.domNode);this.inherited(arguments);this.validate(!1)}});b("dojo-bidi")&&(f=l("dijit.form.Select",f,{_setDisplay:function(a){this.inherited(arguments);this.applyTextDir(this.containerNode)}}));f._Menu=x;f.prototype._onContainerKeydown=v("_onContainerKeydown");f.prototype._onContainerKeypress=v("_onContainerKeypress");return f})},"dijit/form/_FormSelectWidget":function(){define("dojo/_base/array dojo/_base/Deferred dojo/aspect dojo/data/util/sorter dojo/_base/declare dojo/dom dojo/dom-class dojo/_base/kernel dojo/_base/lang dojo/query dojo/when dojo/store/util/QueryResults ./_FormValueWidget".split(" "),
function(k,l,h,g,f,d,e,c,b,a,m,n,q){return f("dijit.form._FormSelectWidget",q,{multiple:!1,options:null,store:null,query:null,queryOptions:null,labelAttr:"",onFetch:null,sortByLabel:!0,loadChildrenOnOpen:!1,onLoadDeferred:null,getOptions:function(a){var c=this.options||[];if(null==a)return c;if(b.isArrayLike(a))return k.map(a,"return this.getOptions(item);",this);b.isString(a)&&(a={value:a});b.isObject(a)&&(k.some(c,function(b,c){for(var d in a)if(!(d in b)||b[d]!=a[d])return!1;a=c;return!0})||(a=
-1));return 0<=a&&a<c.length?c[a]:null},addOption:function(a){k.forEach(b.isArrayLike(a)?a:[a],function(a){a&&b.isObject(a)&&this.options.push(a)},this);this._loadChildren()},removeOption:function(a){a=this.getOptions(b.isArrayLike(a)?a:[a]);k.forEach(a,function(a){a&&(this.options=k.filter(this.options,function(b){return b.value!==a.value||b.label!==a.label}),this._removeOptionItem(a))},this);this._loadChildren()},updateOption:function(a){k.forEach(b.isArrayLike(a)?a:[a],function(a){var b=this.getOptions({value:a.value}),
c;if(b)for(c in a)b[c]=a[c]},this);this._loadChildren()},setStore:function(a,c,d){var e=this.store;d=d||{};if(e!==a){for(var f;f=this._notifyConnections.pop();)f.remove();a.get||(b.mixin(a,{_oldAPI:!0,get:function(a){var b=new l;this.fetchItemByIdentity({identity:a,onItem:function(a){b.resolve(a)},onError:function(a){b.reject(a)}});return b.promise},query:function(a,c){var d=new l(function(){e.abort&&e.abort()});d.total=new l;var e=this.fetch(b.mixin({query:a,onBegin:function(a){d.total.resolve(a)},
onComplete:function(a){d.resolve(a)},onError:function(a){d.reject(a)}},c));return new n(d)}}),a.getFeatures()["dojo.data.api.Notification"]&&(this._notifyConnections=[h.after(a,"onNew",b.hitch(this,"_onNewItem"),!0),h.after(a,"onDelete",b.hitch(this,"_onDeleteItem"),!0),h.after(a,"onSet",b.hitch(this,"_onSetItem"),!0)]));this._set("store",a)}this.options&&this.options.length&&this.removeOption(this.options);this._queryRes&&this._queryRes.close&&this._queryRes.close();this._observeHandle&&this._observeHandle.remove&&
(this._observeHandle.remove(),this._observeHandle=null);d.query&&(this._set("query",d.query),this._set("queryOptions",d.queryOptions));a&&(this._loadingStore=!0,this.onLoadDeferred=new l,this._queryRes=a.query(this.query,this.queryOptions),m(this._queryRes,b.hitch(this,function(e){if(this.sortByLabel&&!d.sort&&e.length)if(a.getValue)e.sort(g.createSortFunction([{attribute:a.getLabelAttributes(e[0])[0]}],a));else{var f=this.labelAttr;e.sort(function(a,b){return a[f]>b[f]?1:b[f]>a[f]?-1:0})}d.onFetch&&
(e=d.onFetch.call(this,e,d));k.forEach(e,function(a){this._addOptionForItem(a)},this);this._queryRes.observe&&(this._observeHandle=this._queryRes.observe(b.hitch(this,function(a,b,c){b==c?this._onSetItem(a):(-1!=b&&this._onDeleteItem(a),-1!=c&&this._onNewItem(a))}),!0));this._loadingStore=!1;this.set("value","_pendingValue"in this?this._pendingValue:c);delete this._pendingValue;this.loadChildrenOnOpen?this._pseudoLoadChildren(e):this._loadChildren();this.onLoadDeferred.resolve(!0);this.onSetStore()}),
function(a){console.error("dijit.form.Select: "+a.toString());this.onLoadDeferred.reject(a)}));return e},_setValueAttr:function(a,c){this._onChangeActive||(c=null);if(this._loadingStore)this._pendingValue=a;else if(null!=a){a=b.isArrayLike(a)?k.map(a,function(a){return b.isObject(a)?a:{value:a}}):b.isObject(a)?[a]:[{value:a}];a=k.filter(this.getOptions(a),function(a){return a&&a.value});var d=this.getOptions()||[];if(!this.multiple&&(!a[0]||!a[0].value)&&d.length)a[0]=d[0];k.forEach(d,function(b){b.selected=
k.some(a,function(a){return a.value===b.value})});d=k.map(a,function(a){return a.value});if(!("undefined"==typeof d||"undefined"==typeof d[0])){var e=k.map(a,function(a){return a.label});this._setDisplay(this.multiple?e:e[0]);this.inherited(arguments,[this.multiple?d:d[0],c]);this._updateSelection()}}},_getDisplayedValueAttr:function(){var a=k.map([].concat(this.get("selectedOptions")),function(a){return a&&"label"in a?a.label:a?a.value:null},this);return this.multiple?a:a[0]},_setDisplayedValueAttr:function(a){this.set("value",
this.getOptions("string"==typeof a?{label:a}:a))},_loadChildren:function(){this._loadingStore||(k.forEach(this._getChildren(),function(a){a.destroyRecursive()}),k.forEach(this.options,this._addOptionItem,this),this._updateSelection())},_updateSelection:function(){this.focusedChild=null;this._set("value",this._getValueFromOpts());var a=[].concat(this.value);if(a&&a[0]){var b=this;k.forEach(this._getChildren(),function(c){var d=k.some(a,function(a){return c.option&&a===c.option.value});d&&!b.multiple&&
(b.focusedChild=c);e.toggle(c.domNode,this.baseClass.replace(/\s+|$/g,"SelectedOption "),d);c.domNode.setAttribute("aria-selected",d?"true":"false")},this)}},_getValueFromOpts:function(){var a=this.getOptions()||[];if(!this.multiple&&a.length){var b=k.filter(a,function(a){return a.selected})[0];if(b&&b.value)return b.value;a[0].selected=!0;return a[0].value}return this.multiple?k.map(k.filter(a,function(a){return a.selected}),function(a){return a.value})||[]:""},_onNewItem:function(a,b){(!b||!b.parent)&&
this._addOptionForItem(a)},_onDeleteItem:function(a){this.removeOption({value:this.store.getIdentity(a)})},_onSetItem:function(a){this.updateOption(this._getOptionObjForItem(a))},_getOptionObjForItem:function(a){var b=this.store,c=this.labelAttr&&this.labelAttr in a?a[this.labelAttr]:b.getLabel(a);return{value:c?b.getIdentity(a):null,label:c,item:a}},_addOptionForItem:function(a){var b=this.store;b.isItemLoaded&&!b.isItemLoaded(a)?b.loadItem({item:a,onItem:function(a){this._addOptionForItem(a)},scope:this}):
(a=this._getOptionObjForItem(a),this.addOption(a))},constructor:function(a){this._oValue=(a||{}).value||null;this._notifyConnections=[]},buildRendering:function(){this.inherited(arguments);d.setSelectable(this.focusNode,!1)},_fillContent:function(){this.options||(this.options=this.srcNodeRef?a("\x3e *",this.srcNodeRef).map(function(a){return"separator"===a.getAttribute("type")?{value:"",label:"",selected:!1,disabled:!1}:{value:a.getAttribute("data-"+c._scopeName+"-value")||a.getAttribute("value"),
label:String(a.innerHTML),selected:a.getAttribute("selected")||!1,disabled:a.getAttribute("disabled")||!1}},this):[]);this.value?this.multiple&&"string"==typeof this.value&&this._set("value",this.value.split(",")):this._set("value",this._getValueFromOpts())},postCreate:function(){this.inherited(arguments);h.after(this,"onChange",b.hitch(this,"_updateSelection"));var a=this.store;if(a&&(a.getIdentity||a.getFeatures()["dojo.data.api.Identity"]))this.store=null,this.setStore(a,this._oValue)},startup:function(){this._loadChildren();
this.inherited(arguments)},destroy:function(){for(var a;a=this._notifyConnections.pop();)a.remove();this._queryRes&&this._queryRes.close&&this._queryRes.close();this._observeHandle&&this._observeHandle.remove&&(this._observeHandle.remove(),this._observeHandle=null);this.inherited(arguments)},_addOptionItem:function(){},_removeOptionItem:function(){},_setDisplay:function(){},_getChildren:function(){return[]},_getSelectedOptionsAttr:function(){return this.getOptions({selected:!0})},_pseudoLoadChildren:function(){},
onSetStore:function(){}})})},"dojo/data/util/sorter":function(){define(["../../_base/lang"],function(k){var l={};k.setObject("dojo.data.util.sorter",l);l.basicComparator=function(h,g){var f=-1;null===h&&(h=void 0);null===g&&(g=void 0);if(h==g)f=0;else if(h>g||null==h)f=1;return f};l.createSortFunction=function(h,g){function f(a,b,c,d){return function(e,f){var m=d.getValue(e,a),n=d.getValue(f,a);return b*c(m,n)}}for(var d=[],e,c=g.comparatorMap,b=l.basicComparator,a=0;a<h.length;a++){e=h[a];var m=
e.attribute;if(m){e=e.descending?-1:1;var n=b;c&&("string"!==typeof m&&"toString"in m&&(m=m.toString()),n=c[m]||b);d.push(f(m,e,n,g))}}return function(a,b){for(var c=0;c<d.length;){var e=d[c++](a,b);if(0!==e)return e}return 0}};return l})},"dijit/DropDownMenu":function(){define(["dojo/_base/declare","dojo/keys","dojo/text!./templates/Menu.html","./_OnDijitClickMixin","./_MenuBase"],function(k,l,h,g,f){return k("dijit.DropDownMenu",[f,g],{templateString:h,baseClass:"dijitMenu",_onUpArrow:function(){this.focusPrev()},
_onDownArrow:function(){this.focusNext()},_onRightArrow:function(d){this._moveToPopup(d);d.stopPropagation();d.preventDefault()},_onLeftArrow:function(d){if(this.parentMenu)if(this.parentMenu._isMenuBar)this.parentMenu.focusPrev();else this.onCancel(!1);else d.stopPropagation(),d.preventDefault()}})})},"dijit/_MenuBase":function(){define("dojo/_base/array dojo/_base/declare dojo/dom dojo/dom-attr dojo/dom-class dojo/_base/lang dojo/mouse dojo/on dojo/window ./a11yclick ./registry ./_Widget ./_CssStateMixin ./_KeyNavContainer ./_TemplatedMixin".split(" "),
function(k,l,h,g,f,d,e,c,b,a,m,n,q,s,r){return l("dijit._MenuBase",[n,r,s,q],{selected:null,_setSelectedAttr:function(a){this.selected!=a&&(this.selected&&(this.selected._setSelected(!1),this._onChildDeselect(this.selected)),a&&a._setSelected(!0),this._set("selected",a))},activated:!1,_setActivatedAttr:function(a){f.toggle(this.domNode,"dijitMenuActive",a);f.toggle(this.domNode,"dijitMenuPassive",!a);this._set("activated",a)},parentMenu:null,popupDelay:500,passivePopupDelay:Infinity,autoFocus:!1,
childSelector:function(a){var b=m.byNode(a);return a.parentNode==this.containerNode&&b&&b.focus},postCreate:function(){var b=this,f="string"==typeof this.childSelector?this.childSelector:d.hitch(this,"childSelector");this.own(c(this.containerNode,c.selector(f,e.enter),function(){b.onItemHover(m.byNode(this))}),c(this.containerNode,c.selector(f,e.leave),function(){b.onItemUnhover(m.byNode(this))}),c(this.containerNode,c.selector(f,a),function(a){b.onItemClick(m.byNode(this),a);a.stopPropagation();
a.preventDefault()}));this.inherited(arguments)},onKeyboardSearch:function(a,b,c,d){this.inherited(arguments);if(a&&(-1==d||a.popup&&1==d))this.onItemClick(a,b)},_keyboardSearchCompare:function(a,b){return a.shortcutKey?b==a.shortcutKey.toLowerCase()?-1:0:this.inherited(arguments)?1:0},onExecute:function(){},onCancel:function(){},_moveToPopup:function(a){if(this.focusedChild&&this.focusedChild.popup&&!this.focusedChild.disabled)this.onItemClick(this.focusedChild,a);else(a=this._getTopMenu())&&a._isMenuBar&&
a.focusNext()},_onPopupHover:function(){this.set("selected",this.currentPopupItem);this._stopPendingCloseTimer()},onItemHover:function(a){this.activated?(this.set("selected",a),a.popup&&(!a.disabled&&!this.hover_timer)&&(this.hover_timer=this.defer(function(){this._openItemPopup(a)},this.popupDelay))):Infinity>this.passivePopupDelay&&(this.passive_hover_timer&&this.passive_hover_timer.remove(),this.passive_hover_timer=this.defer(function(){this.onItemClick(a,{type:"click"})},this.passivePopupDelay));
this._hoveredChild=a;a._set("hovering",!0)},_onChildDeselect:function(a){this._stopPopupTimer();this.currentPopupItem==a&&(this._stopPendingCloseTimer(),this._pendingClose_timer=this.defer(function(){this.currentPopupItem=this._pendingClose_timer=null;a._closePopup()},this.popupDelay))},onItemUnhover:function(a){this._hoveredChild==a&&(this._hoveredChild=null);this.passive_hover_timer&&(this.passive_hover_timer.remove(),this.passive_hover_timer=null);a._set("hovering",!1)},_stopPopupTimer:function(){this.hover_timer&&
(this.hover_timer=this.hover_timer.remove())},_stopPendingCloseTimer:function(){this._pendingClose_timer&&(this._pendingClose_timer=this._pendingClose_timer.remove())},_getTopMenu:function(){for(var a=this;a.parentMenu;a=a.parentMenu);return a},onItemClick:function(a,b){this.passive_hover_timer&&this.passive_hover_timer.remove();this.focusChild(a);if(a.disabled)return!1;if(a.popup){this.set("selected",a);this.set("activated",!0);var c=/^key/.test(b._origType||b.type)||0==b.clientX&&0==b.clientY;this._openItemPopup(a,
c)}else this.onExecute(),a._onClick?a._onClick(b):a.onClick(b)},_openItemPopup:function(a,b){if(a!=this.currentPopupItem){this.currentPopupItem&&(this._stopPendingCloseTimer(),this.currentPopupItem._closePopup());this._stopPopupTimer();var e=a.popup;e.parentMenu=this;this.own(this._mouseoverHandle=c.once(e.domNode,"mouseover",d.hitch(this,"_onPopupHover")));var f=this;a._openPopup({parent:this,orient:this._orient||["after","before"],onCancel:function(){b&&f.focusChild(a);f._cleanUp()},onExecute:d.hitch(this,
"_cleanUp",!0),onClose:function(){f._mouseoverHandle&&(f._mouseoverHandle.remove(),delete f._mouseoverHandle)}},b);this.currentPopupItem=a}},onOpen:function(){this.isShowingNow=!0;this.set("activated",!0)},onClose:function(){this.set("activated",!1);this.set("selected",null);this.isShowingNow=!1;this.parentMenu=null},_closeChild:function(){this._stopPopupTimer();this.currentPopupItem&&(this.focused&&(g.set(this.selected.focusNode,"tabIndex",this.tabIndex),this.selected.focusNode.focus()),this.currentPopupItem._closePopup(),
this.currentPopupItem=null)},_onItemFocus:function(a){if(this._hoveredChild&&this._hoveredChild!=a)this.onItemUnhover(this._hoveredChild);this.set("selected",a)},_onBlur:function(){this._cleanUp(!0);this.inherited(arguments)},_cleanUp:function(a){this._closeChild();"undefined"==typeof this.isShowingNow&&this.set("activated",!1);a&&this.set("selected",null)}})})},"dijit/_KeyNavContainer":function(){define("dojo/_base/array dojo/_base/declare dojo/dom-attr dojo/_base/kernel dojo/keys dojo/_base/lang ./registry ./_Container ./_FocusMixin ./_KeyNavMixin".split(" "),
function(k,l,h,g,f,d,e,c,b,a){return l("dijit._KeyNavContainer",[b,a,c],{connectKeyNavHandlers:function(a,b){var c=this._keyNavCodes={},e=d.hitch(this,"focusPrev"),g=d.hitch(this,"focusNext");k.forEach(a,function(a){c[a]=e});k.forEach(b,function(a){c[a]=g});c[f.HOME]=d.hitch(this,"focusFirstChild");c[f.END]=d.hitch(this,"focusLastChild")},startupKeyNavChildren:function(){g.deprecated("startupKeyNavChildren() call no longer needed","","2.0")},startup:function(){this.inherited(arguments);k.forEach(this.getChildren(),
d.hitch(this,"_startupChild"))},addChild:function(a,b){this.inherited(arguments);this._startupChild(a)},_startupChild:function(a){a.set("tabIndex","-1")},_getFirst:function(){var a=this.getChildren();return a.length?a[0]:null},_getLast:function(){var a=this.getChildren();return a.length?a[a.length-1]:null},focusNext:function(){this.focusChild(this._getNextFocusableChild(this.focusedChild,1))},focusPrev:function(){this.focusChild(this._getNextFocusableChild(this.focusedChild,-1),!0)},childSelector:function(a){return(a=
e.byNode(a))&&a.getParent()==this}})})},"dijit/_KeyNavMixin":function(){define("dojo/_base/array dojo/_base/declare dojo/dom-attr dojo/keys dojo/_base/lang dojo/on dijit/registry dijit/_FocusMixin".split(" "),function(k,l,h,g,f,d,e,c){return l("dijit._KeyNavMixin",c,{tabIndex:"0",childSelector:null,postCreate:function(){this.inherited(arguments);h.set(this.domNode,"tabIndex",this.tabIndex);if(!this._keyNavCodes){var b=this._keyNavCodes={};b[g.HOME]=f.hitch(this,"focusFirstChild");b[g.END]=f.hitch(this,
"focusLastChild");b[this.isLeftToRight()?g.LEFT_ARROW:g.RIGHT_ARROW]=f.hitch(this,"_onLeftArrow");b[this.isLeftToRight()?g.RIGHT_ARROW:g.LEFT_ARROW]=f.hitch(this,"_onRightArrow");b[g.UP_ARROW]=f.hitch(this,"_onUpArrow");b[g.DOWN_ARROW]=f.hitch(this,"_onDownArrow")}var a=this,b="string"==typeof this.childSelector?this.childSelector:f.hitch(this,"childSelector");this.own(d(this.domNode,"keypress",f.hitch(this,"_onContainerKeypress")),d(this.domNode,"keydown",f.hitch(this,"_onContainerKeydown")),d(this.domNode,
"focus",f.hitch(this,"_onContainerFocus")),d(this.containerNode,d.selector(b,"focusin"),function(b){a._onChildFocus(e.getEnclosingWidget(this),b)}))},_onLeftArrow:function(){},_onRightArrow:function(){},_onUpArrow:function(){},_onDownArrow:function(){},focus:function(){this.focusFirstChild()},_getFirstFocusableChild:function(){return this._getNextFocusableChild(null,1)},_getLastFocusableChild:function(){return this._getNextFocusableChild(null,-1)},focusFirstChild:function(){this.focusChild(this._getFirstFocusableChild())},
focusLastChild:function(){this.focusChild(this._getLastFocusableChild())},focusChild:function(b,a){b&&(this.focusedChild&&b!==this.focusedChild&&this._onChildBlur(this.focusedChild),b.set("tabIndex",this.tabIndex),b.focus(a?"end":"start"))},_onContainerFocus:function(b){b.target!==this.domNode||this.focusedChild||this.focus()},_onFocus:function(){h.set(this.domNode,"tabIndex","-1");this.inherited(arguments)},_onBlur:function(b){h.set(this.domNode,"tabIndex",this.tabIndex);this.focusedChild&&(this.focusedChild.set("tabIndex",
"-1"),this.lastFocusedChild=this.focusedChild,this._set("focusedChild",null));this.inherited(arguments)},_onChildFocus:function(b){b&&b!=this.focusedChild&&(this.focusedChild&&!this.focusedChild._destroyed&&this.focusedChild.set("tabIndex","-1"),b.set("tabIndex",this.tabIndex),this.lastFocused=b,this._set("focusedChild",b))},_searchString:"",multiCharSearchDuration:1E3,onKeyboardSearch:function(b,a,c,d){b&&this.focusChild(b)},_keyboardSearchCompare:function(b,a){var c=b.domNode,c=(b.label||(c.focusNode?
c.focusNode.label:"")||c.innerText||c.textContent||"").replace(/^\s+/,"").substr(0,a.length).toLowerCase();return a.length&&c==a?-1:0},_onContainerKeydown:function(b){var a=this._keyNavCodes[b.keyCode];a?(a(b,this.focusedChild),b.stopPropagation(),b.preventDefault(),this._searchString=""):b.keyCode==g.SPACE&&(this._searchTimer&&!b.ctrlKey&&!b.altKey&&!b.metaKey)&&(b.stopImmediatePropagation(),b.preventDefault(),this._keyboardSearch(b," "))},_onContainerKeypress:function(b){b.charCode<=g.SPACE||(b.ctrlKey||
b.altKey||b.metaKey)||(b.preventDefault(),b.stopPropagation(),this._keyboardSearch(b,String.fromCharCode(b.charCode).toLowerCase()))},_keyboardSearch:function(b,a){var c=null,d,e=0;f.hitch(this,function(){this._searchTimer&&this._searchTimer.remove();this._searchString+=a;var b=/^(.)\1*$/.test(this._searchString)?1:this._searchString.length;d=this._searchString.substr(0,b);this._searchTimer=this.defer(function(){this._searchTimer=null;this._searchString=""},this.multiCharSearchDuration);var f=this.focusedChild||
null;if(1==b||!f)if(f=this._getNextFocusableChild(f,1),!f)return;b=f;do{var g=this._keyboardSearchCompare(f,d);g&&0==e++&&(c=f);if(-1==g){e=-1;break}f=this._getNextFocusableChild(f,1)}while(f&&f!=b)})();this.onKeyboardSearch(c,b,d,e)},_onChildBlur:function(){},_getNextFocusableChild:function(b,a){var c=b;do{if(b)b=this._getNext(b,a);else if(b=this[0<a?"_getFirst":"_getLast"](),!b)break;if(null!=b&&b!=c&&b.isFocusable())return b}while(b!=c);return null},_getFirst:function(){return null},_getLast:function(){return null},
_getNext:function(b,a){if(b)for(b=b.domNode;b;)if((b=b[0>a?"previousSibling":"nextSibling"])&&"getAttribute"in b){var c=e.byNode(b);if(c)return c}return null}})})},"dijit/MenuItem":function(){define("dojo/_base/declare dojo/dom dojo/dom-attr dojo/dom-class dojo/_base/kernel dojo/sniff dojo/_base/lang ./_Widget ./_TemplatedMixin ./_Contained ./_CssStateMixin dojo/text!./templates/MenuItem.html".split(" "),function(k,l,h,g,f,d,e,c,b,a,m,n){e=k("dijit.MenuItem"+(d("dojo-bidi")?"_NoBidi":""),[c,b,a,m],
{templateString:n,baseClass:"dijitMenuItem",label:"",_setLabelAttr:function(a){this._set("label",a);var b="",c;c=a.search(/{\S}/);if(0<=c){var b=a.charAt(c+1),d=a.substr(0,c);a=a.substr(c+3);c=d+b+a;a=d+'\x3cspan class\x3d"dijitMenuItemShortcutKey"\x3e'+b+"\x3c/span\x3e"+a}else c=a;this.domNode.setAttribute("aria-label",c+" "+this.accelKey);this.containerNode.innerHTML=a;this._set("shortcutKey",b)},iconClass:"dijitNoIcon",_setIconClassAttr:{node:"iconNode",type:"class"},accelKey:"",disabled:!1,_fillContent:function(a){a&&
!("label"in this.params)&&this._set("label",a.innerHTML)},buildRendering:function(){this.inherited(arguments);h.set(this.containerNode,"id",this.id+"_text");this.accelKeyNode&&h.set(this.accelKeyNode,"id",this.id+"_accel");l.setSelectable(this.domNode,!1)},onClick:function(){},focus:function(){try{8==d("ie")&&this.containerNode.focus(),this.focusNode.focus()}catch(a){}},_onFocus:function(){this.getParent()._onItemFocus(this);this.inherited(arguments)},_setSelected:function(a){g.toggle(this.domNode,
"dijitMenuItemSelected",a)},setLabel:function(a){f.deprecated("dijit.MenuItem.setLabel() is deprecated.  Use set('label', ...) instead.","","2.0");this.set("label",a)},setDisabled:function(a){f.deprecated("dijit.Menu.setDisabled() is deprecated.  Use set('disabled', bool) instead.","","2.0");this.set("disabled",a)},_setDisabledAttr:function(a){this.focusNode.setAttribute("aria-disabled",a?"true":"false");this._set("disabled",a)},_setAccelKeyAttr:function(a){this.accelKeyNode&&(this.accelKeyNode.style.display=
a?"":"none",this.accelKeyNode.innerHTML=a,h.set(this.containerNode,"colSpan",a?"1":"2"));this._set("accelKey",a)}});d("dojo-bidi")&&(e=k("dijit.MenuItem",e,{_setLabelAttr:function(a){this.inherited(arguments);"auto"===this.textDir&&this.applyTextDir(this.textDirNode)}}));return e})},"dijit/MenuSeparator":function(){define("dojo/_base/declare dojo/dom ./_WidgetBase ./_TemplatedMixin ./_Contained dojo/text!./templates/MenuSeparator.html".split(" "),function(k,l,h,g,f,d){return k("dijit.MenuSeparator",
[h,g,f],{templateString:d,buildRendering:function(){this.inherited(arguments);l.setSelectable(this.domNode,!1)},isFocusable:function(){return!1}})})},"dijit/form/ToggleButton":function(){define(["dojo/_base/declare","dojo/_base/kernel","./Button","./_ToggleButtonMixin"],function(k,l,h,g){return k("dijit.form.ToggleButton",[h,g],{baseClass:"dijitToggleButton",setChecked:function(f){l.deprecated("setChecked("+f+") is deprecated. Use set('checked',"+f+") instead.","","2.0");this.set("checked",f)}})})},
"dijit/form/_ToggleButtonMixin":function(){define(["dojo/_base/declare","dojo/dom-attr"],function(k,l){return k("dijit.form._ToggleButtonMixin",null,{checked:!1,_aria_attr:"aria-pressed",_onClick:function(h){var g=this.checked;this._set("checked",!g);var f=this.inherited(arguments);this.set("checked",f?this.checked:g);return f},_setCheckedAttr:function(h,g){this._set("checked",h);var f=this.focusNode||this.domNode;this._created&&l.get(f,"checked")!=!!h&&l.set(f,"checked",!!h);f.setAttribute(this._aria_attr,
String(h));this._handleOnChange(h,g)},postCreate:function(){this.inherited(arguments);var h=this.focusNode||this.domNode;this.checked&&h.setAttribute("checked","checked");void 0===this._resetValue&&(this._lastValueReported=this._resetValue=this.checked)},reset:function(){this._hasBeenBlurred=!1;this.set("checked",this.params.checked||!1)}})})},"dijit/form/DropDownButton":function(){define("dojo/_base/declare dojo/_base/lang dojo/query ../registry ../popup ./Button ../_Container ../_HasDropDown dojo/text!./templates/DropDownButton.html".split(" "),
function(k,l,h,g,f,d,e,c,b){return k("dijit.form.DropDownButton",[d,e,c],{baseClass:"dijitDropDownButton",templateString:b,_fillContent:function(){if(this.srcNodeRef){var a=h("*",this.srcNodeRef);this.inherited(arguments,[a[0]]);this.dropDownContainer=this.srcNodeRef}},startup:function(){if(!this._started){if(!this.dropDown&&this.dropDownContainer){var a=h("[widgetId]",this.dropDownContainer)[0];a&&(this.dropDown=g.byNode(a));delete this.dropDownContainer}this.dropDown&&f.hide(this.dropDown);this.inherited(arguments)}},
isLoaded:function(){var a=this.dropDown;return!!a&&(!a.href||a.isLoaded)},loadDropDown:function(a){var b=this.dropDown,c=b.on("load",l.hitch(this,function(){c.remove();a()}));b.refresh()},isFocusable:function(){return this.inherited(arguments)&&!this._mouseDown}})})},"dijit/CheckedMenuItem":function(){define(["dojo/_base/declare","dojo/dom-class","./MenuItem","dojo/text!./templates/CheckedMenuItem.html","./hccss"],function(k,l,h,g){return k("dijit.CheckedMenuItem",h,{baseClass:"dijitMenuItem dijitCheckedMenuItem",
templateString:g,checked:!1,_setCheckedAttr:function(f){this.domNode.setAttribute("aria-checked",f?"true":"false");this._set("checked",f)},iconClass:"",role:"menuitemcheckbox",checkedChar:"\x26#10003;",onChange:function(){},_onClick:function(f){this.disabled||(this.set("checked",!this.checked),this.onChange(this.checked));this.onClick(f)}})})},"dojox/form/TriStateCheckBox":function(){define("dojo/_base/kernel dojo/_base/declare dojo/_base/array dojo/_base/lang dojo/_base/event dojo/query dojo/dom-attr dojo/text!./resources/TriStateCheckBox.html dijit/form/Button dijit/form/_ToggleButtonMixin dojo/NodeList-dom".split(" "),
function(k,l,h,g,f,d,e,c,b,a){return l("dojox.form.TriStateCheckBox",[b,a],{templateString:c,baseClass:"dojoxTriStateCheckBox",type:"checkbox",states:"",_stateLabels:null,stateValue:null,_currentState:0,_stateType:"False",readOnly:!1,checked:"",_aria_attr:"aria-checked",constructor:function(){this.states=[!1,"mixed",!0];this.checked=!1;this._stateLabels={False:"\x26#9633;",True:"\x26#8730;",Mixed:"\x26#9632;"};this.stateValues={False:!1,True:"on",Mixed:"mixed"}},_fillContent:function(a){},postCreate:function(){e.set(this.stateLabelNode,
"innerHTML",this._stateLabels[this._stateType]);this.inherited(arguments)},startup:function(){this.set("checked",this.params.checked||this.states[this._currentState]);e.set(this.stateLabelNode,"innerHTML",this._stateLabels[this._stateType]);this.inherited(arguments)},_setIconClassAttr:null,_setCheckedAttr:function(a,b){var c=h.indexOf(this.states,a);0<=c?(this._currentState=c,this._stateType=this._getStateType(a),e.set(this.focusNode,"value",this.stateValues[this._stateType]),e.set(this.stateLabelNode,
"innerHTML",this._stateLabels[this._stateType]),this.inherited(arguments)):console.warn("Invalid state!")},setChecked:function(a){k.deprecated("setChecked("+a+") is deprecated. Use set('checked',"+a+") instead.","","2.0");this.set("checked",a)},_setStatesAttr:function(a){if(g.isArray(a))this._set("states",a);else if(g.isString(a)){var b={"true":!0,"false":!1,mixed:"mixed"};a=a.split(/\s*,\s*/);for(var c=0;c<a.length;c++)a[c]=void 0!==b[a[c]]?b[a[c]]:!1;this._set("states",a)}},_setReadOnlyAttr:function(a){this._set("readOnly",
a);e.set(this.focusNode,"readOnly",a)},_setValueAttr:function(a,b){"string"==typeof a&&0>h.indexOf(this.states,a)&&(""==a&&(a="on"),this.stateValues.True=a,a=!0);this._created&&(this._currentState=h.indexOf(this.states,a),this.set("checked",a,b),e.set(this.focusNode,"value",this.stateValues[this._stateType]))},_setValuesAttr:function(a){this.stateValues.True=a[0]?a[0]:this.stateValues.True;this.stateValues.Mixed=a[1]?a[1]:this.stateValues.Mixed},_getValueAttr:function(){return this.stateValues[this._stateType]},
reset:function(){this._hasBeenBlurred=!1;this.set("states",this.params.states||[!1,"mixed",!0]);this.stateValues=this.params.stateValues||{False:!1,True:"on",Mixed:"mixed"};this.set("values",this.params.values||[]);this.set("checked",this.params.checked||this.states[0])},_onFocus:function(){this.id&&d("label[for\x3d'"+this.id+"']").addClass("dijitFocusedLabel");this.inherited(arguments)},_onBlur:function(){this.id&&d("label[for\x3d'"+this.id+"']").removeClass("dijitFocusedLabel");this.mouseFocus=
!1;this.inherited(arguments)},_onClick:function(a){if(this.readOnly||this.disabled)return f.stop(a),!1;this.click();return this.onClick(a)},click:function(){this._currentState>=this.states.length-1?this._currentState=0:-1==this._currentState?this.fixState():this._currentState++;var a=this._currentState;this.set("checked",this.states[this._currentState]);this._currentState=a;e.set(this.stateLabelNode,"innerHTML",this._stateLabels[this._stateType])},fixState:function(){this._currentState=this.states.length-
1},_getStateType:function(a){return a?"mixed"==a?"Mixed":"True":"False"},_onMouseDown:function(){this.mouseFocus=!0}})})},"dojo/NodeList-dom":function(){define("./_base/kernel ./query ./_base/array ./_base/lang ./dom-class ./dom-construct ./dom-geometry ./dom-attr ./dom-style".split(" "),function(k,l,h,g,f,d,e,c,b){function a(a){return function(b,c,d){return 2==arguments.length?a["string"==typeof c?"get":"set"](b,c):a.set(b,c,d)}}var m=function(a){return 1==a.length&&"string"==typeof a[0]},n=function(a){var b=
a.parentNode;b&&b.removeChild(a)},q=l.NodeList,s=q._adaptWithCondition,r=q._adaptAsForEach,p=q._adaptAsMap;g.extend(q,{_normalize:function(a,b){var c=!0===a.parse;if("string"==typeof a.template){var e=a.templateFunc||k.string&&k.string.substitute;a=e?e(a.template,a):a}e=typeof a;"string"==e||"number"==e?(a=d.toDom(a,b&&b.ownerDocument),a=11==a.nodeType?g._toArray(a.childNodes):[a]):g.isArrayLike(a)?g.isArray(a)||(a=g._toArray(a)):a=[a];c&&(a._runParse=!0);return a},_cloneNode:function(a){return a.cloneNode(!0)},
_place:function(a,b,c,e){if(!(1!=b.nodeType&&"only"==c))for(var f,m=a.length,n=m-1;0<=n;n--){var g=e?this._cloneNode(a[n]):a[n];if(a._runParse&&k.parser&&k.parser.parse){f||(f=b.ownerDocument.createElement("div"));f.appendChild(g);k.parser.parse(f);for(g=f.firstChild;f.firstChild;)f.removeChild(f.firstChild)}n==m-1?d.place(g,b,c):b.parentNode.insertBefore(g,b);b=g}},position:p(e.position),attr:s(a(c),m),style:s(a(b),m),addClass:r(f.add),removeClass:r(f.remove),toggleClass:r(f.toggle),replaceClass:r(f.replace),
empty:r(d.empty),removeAttr:r(c.remove),marginBox:p(e.getMarginBox),place:function(a,b){var c=l(a)[0];return this.forEach(function(a){d.place(a,c,b)})},orphan:function(a){return(a?l._filterResult(this,a):this).forEach(n)},adopt:function(a,b){return l(a).place(this[0],b)._stash(this)},query:function(a){if(!a)return this;var b=new q;this.map(function(c){l(a,c).forEach(function(a){void 0!==a&&b.push(a)})});return b._stash(this)},filter:function(a){var b=arguments,c=this,d=0;if("string"==typeof a){c=
l._filterResult(this,b[0]);if(1==b.length)return c._stash(this);d=1}return this._wrap(h.filter(c,b[d],b[d+1]),this)},addContent:function(a,b){a=this._normalize(a,this[0]);for(var c=0,e;e=this[c];c++)a.length?this._place(a,e,b,0<c):d.empty(e);return this}});return q})},"JBrowse/Util":function(){define(["dojo/_base/array","dojo/_base/lang","dojo/Deferred","dojox/lang/functional/object","dojox/lang/functional/fold"],function(k,l,h){var g;return g={dojof:dojox.lang.functional,is_ie:0<=navigator.appVersion.indexOf("MSIE"),
is_ie6:0<=navigator.appVersion.indexOf("MSIE 6"),addCommas:function(f){var d=(f+"").split(".");f=d[0];for(var d=1<d.length?"."+d[1]:"",e=/(\d+)(\d{3})/;e.test(f);)f=f.replace(e,"$1,$2");return f+d},commifyNumber:function(){return this.addCommas.apply(this,arguments)},escapeHTML:function(f){return f.replace(/&/g,"\x26amp;").replace(/</g,"\x26lt;").replace(/>/g,"\x26gt;")},fastDeclare:function(f,d){var e=f.constructor,c=function(){e.apply(this,arguments)};dojo.mixin(c.prototype,f);return c},isRightButton:function(f){f||
(f=window.event);return f.which?3==f.which:f.button?2==f.button:!1},getViewportWidth:function(){var f=0;document.documentElement&&document.documentElement.clientWidth?f=document.documentElement.clientWidth:document.body&&document.body.clientWidth?f=document.body.clientWidth:window.innerWidth&&(f=window.innerWidth-18);return f},getViewportHeight:function(){var f=0;document.documentElement&&document.documentElement.clientHeight?f=document.documentElement.clientHeight:document.body&&document.body.clientHeight?
f=document.body.clientHeight:window.innerHeight&&(f=window.innerHeight-18);return f},findNearest:function(f,d){for(var e=0,c=Math.abs(d-f[0]),b=1;b<f.length;b++)Math.abs(d-f[b])<c&&(e=b,c=Math.abs(d-f[b]));return e},fillTemplate:function(f,d){return f.replace(/\{([\w\s\.]+)\}/g,function(e,c){var b=l.getObject(c,!1,d);return void 0!==(b=d[c])?"function"==typeof b?b(c):b:d.callback&&(b=d.callback.call(this,c),void 0!==b)?b:e})},maybeLoad:function(f,d,e,c){d.state?"loaded"==d.state?e(d.data):"error"==
d.state?c():"loading"==d.state&&(d.successCallbacks.push(e),c&&d.errorCallbacks.push(c)):(d.state="loading",d.successCallbacks=[e],d.errorCallbacks=[c],f=dojo.clone(f),f.load=function(b){d.state="loaded";d.data=b;for(var a=d.successCallbacks,c=0;c<a.length;c++)a[c](b)},f.error=function(b){console.error(""+b);d.state="error";b=d.errorCallbacks;for(var a=0;a<b.length;a++)b[a]()},dojo.xhrGet(f))},deepUpdate:function(f,d){for(var e in d)if(e in f&&"object"==typeof d[e]&&"object"==typeof f[e])g.deepUpdate(f[e],
d[e]);else if("undefined"==typeof f[e]||"undefined"!=typeof d[e])f[e]=d[e];return f},humanReadableNumber:function(f){f=parseInt(f);var d="";1E12<=f?(f/=1E12,d="T"):1E9<=f?(f/=1E9,d="G"):1E6<=f?(f/=1E6,d="M"):1E3<=f&&(f/=1E3,d="K");return(f.toFixed(2)+" "+d).replace(/0+ /," ").replace(/\. /," ")},resolved:function(f){var d=new h;d.resolve(f);return d},resolveUrl:function(f,d){if(this.isElectron()&&"/"==d[0]||d.match(/\w+:\/\//))return d;if("/"==d.charAt(0))return f=f.match(/.*\/\/[^\/]*/),(f?f[0]:
"")+d;f=f.replace(/\?.*$/,"");f=f.substring(0,f.length-f.match(/[^\/]*$/)[0].length);if("."==d)return f;for(;f&&"../"==d.substring(0,3);)f=f.substring(0,f.length-f.match(/[^\/]*\/$/)[0].length),d=d.substring(3);return f+d},loadJS:function(f){var d=new h;require(f,function(){for(var e=Array.prototype.slice.call(arguments),c=0;c<e.length;c++)if(!{object:!0,"function":!0}[typeof e[c]]){d.reject("could not load "+f[c]+": "+e[c]);return}d.resolve(e)});return d},isElectron:function(){var f=window.process;
return!(!f||!f.versions||!f.versions.electron)},parseLocString:function(f){if("string"!=typeof f)return null;f=dojo.trim(f);var d=(f.match(/\(([^\)]+)\)$/)||[])[1],e=function(a){a=(a+"").replace(/\D/g,"");a=parseInt(a,10);return"number"==typeof a&&!isNaN(a)?a:null},c={},b;-1!=f.indexOf(":")&&(b=f.split(":",2),c.ref=dojo.trim(b[0]),f=b[1]);if(b=f.match(/^\s*([\d,]+)\s*\.\.+\s*([\d,]+)/))c.start=e(b[1])-1,c.end=e(b[2]),c.start>c.end&&(f=c.start+1,c.start=c.end-1,c.end=f);else if(b=f.match(/^\s*([\d,]+)\b/))c.end=
c.start=e(b[1])-1;else return null;d&&(c.extra=d);return c},basename:function(f,d){if(f&&f.match){var e=f.match(/[\/\\]([^\/\\]+)[\/\/\/]*$/);if((e=e?e[1]||void 0:f)&&d)d instanceof Array||(d=[d]),d=k.map(d,function(c){return c.replace(/([\.\?\+])/g,"\\$1")}),e=e.replace(RegExp(d.join("|")+"$","i"),"");return e}},assembleLocString:function(f){var d="",e={start:"number",end:"number",ref:"string",strand:"number"},c={},b;for(b in e)if(e[b]==typeof f[b]&&("number"!=e[b]||!isNaN(f[b])))c[b]=f[b];if("ref"in
c&&(d+=c.ref,c.start||c.end))d+=":";"start"in c&&(d+=(Math.round(c.start)+1).toFixed(0).toLocaleString(),"end"in c&&(d+=".."));"end"in c&&(d+=Math.round(c.end).toFixed(0).toLocaleString());"strand"in c&&(d+={1:" (+ strand)","-1":" (- strand)","0":" (no strand)"}[c.strand||""]||"");"extra"in f&&(d+=f.extra);return d},complement:function(){var f=/[ACGT]/gi,d={S:"S",w:"w",T:"A",r:"y",a:"t",N:"N",K:"M",x:"x",d:"h",Y:"R",V:"B",y:"r",M:"K",h:"d",k:"m",C:"G",g:"c",t:"a",A:"T",n:"n",W:"W",X:"X",m:"k",v:"b",
B:"V",s:"s",H:"D",c:"g",D:"H",b:"v",R:"Y",G:"C"},e=String.fromCharCode(160),c=function(b){return d[b]||e};return function(b){return b.replace(f,c)}}(),revcom:function(f){return g.complement(f).split("").reverse().join("")},assembleLocStringWithLength:function(f){return g.assembleLocString(f)+" ("+g.humanReadableNumber(f.length||f.end-f.start+1)+"b)"},matchRefSeqName:function(f,d){for(var e in d)if(d.hasOwnProperty(e)){var c=f.toUpperCase(),b=e.toUpperCase();if(c==b||"CHR"+c==b||c=="CHR"+b)return d[e]}return null},
debugHandler:function(f,d){return function(){var e=arguments;window.setTimeout(function(){var c=d;"string"==typeof c&&(c=f[c]);c.apply(f,e)},1)}},ucFirst:function(f){return"string"!=typeof f?void 0:f.charAt(0).toUpperCase()+f.slice(1)},uniq:function(f,d){d=d||function(b){return""+b};var e=[],c={};dojo.forEach(f,function(b){var a=d(b);c[d(b)]||e.push(b);c[a]=!0});return e},replacePath:function(f){return f.replace(/^(\w):/,"file:///$1:").replace(/\\/g,"/")},unReplacePath:function(f){return f.replace(/^file:\/\/\//,
"")},removeAttribute:function(f,d){try{delete f[d]}catch(e){f.removeAttribute&&f.removeAttribute(d)}},getResolution:function(f,d){var e;e="auto"==d?(window.devicePixelRatio||1)/(f.webkitBackingStorePixelRatio||f.mozBackingStorePixelRatio||f.msBackingStorePixelRatio||f.oBackingStorePixelRatio||f.backingStorePixelRatio||1):"disabled"==d?1:d;return 1<=e?e:1}}});Array.prototype.map||(Array.prototype.map=function(k,l){if(void 0===this||null===this)throw new TypeError;var h=Object(this),g=h.length>>>0;
if("function"!==typeof k)throw new TypeError;for(var f=Array(g),d=0;d<g;d++)d in h&&(f[d]=k.call(l,h[d],d,h));return f});Array.prototype.indexOf||(Array.prototype.indexOf=function(k){if(void 0===this||null===this)throw new TypeError;var l=Object(this),h=l.length>>>0;if(0===h)return-1;var g=0;0<arguments.length&&(g=Number(arguments[1]),g!==g?g=0:0!==g&&(g!==1/0&&g!==-(1/0))&&(g=(0<g||-1)*Math.floor(Math.abs(g))));if(g>=h)return-1;for(g=0<=g?g:Math.max(h-Math.abs(g),0);g<h;g++)if(g in l&&l[g]===k)return g;
return-1})},"dojox/lang/functional/object":function(){define(["dojo/_base/kernel","dojo/_base/lang","./lambda"],function(k,l,h){var g={};l.mixin(h,{keys:function(f){var d=[],e;for(e in f)e in g||d.push(e);return d},values:function(f){var d=[],e;for(e in f)e in g||d.push(f[e]);return d},filterIn:function(f,d,e){e=e||k.global;d=h.lambda(d);var c={},b,a;for(a in f)a in g||(b=f[a],d.call(e,b,a,f)&&(c[a]=b));return c},forIn:function(f,d,e){e=e||k.global;d=h.lambda(d);for(var c in f)c in g||d.call(e,f[c],
c,f);return e},mapIn:function(f,d,e){e=e||k.global;d=h.lambda(d);var c={},b;for(b in f)b in g||(c[b]=d.call(e,f[b],b,f));return c}});return h})},"dojox/lang/functional/lambda":function(){define(["../..","dojo/_base/lang","dojo/_base/array"],function(k,l,h){var g=l.getObject("lang.functional",!0,k),f={},d=1<"ab".split(/a*/).length?String.prototype.split:function(b){var a=this.split.call(this,b);(b=b.exec(this))&&0==b.index&&a.unshift("");return a},e=function(b){var a=[],c=d.call(b,/\s*->\s*/m);if(1<
c.length)for(;c.length;)b=c.pop(),a=c.pop().split(/\s*,\s*|\s+/m),c.length&&c.push("(function("+a.join(", ")+"){ return ("+b+"); })");else if(b.match(/\b_\b/))a=["_"];else{var c=b.match(/^\s*(?:[+*\/%&|\^\.=<>]|!=)/m),e=b.match(/[+\-*\/%&|\^\.=<>!]\s*$/m);if(c||e)c&&(a.push("$1"),b="$1"+b),e&&(a.push("$2"),b+="$2");else{var c=b.replace(/(?:\b[A-Z]|\.[a-zA-Z_$])[a-zA-Z_$\d]*|[a-zA-Z_$][a-zA-Z_$\d]*:|this|true|false|null|undefined|typeof|instanceof|in|delete|new|void|arguments|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|escape|eval|isFinite|isNaN|parseFloat|parseInt|unescape|dojo|dijit|dojox|window|document|'(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"/g,
"").match(/([a-z_$][a-z_$\d]*)/gi)||[],f={};h.forEach(c,function(b){f.hasOwnProperty(b)||(a.push(b),f[b]=1)})}}return{args:a,body:b}},c=function(b){return b.length?function(){var a=b.length-1,c=g.lambda(b[a]).apply(this,arguments);for(--a;0<=a;--a)c=g.lambda(b[a]).call(this,c);return c}:function(a){return a}};l.mixin(g,{rawLambda:function(b){return e(b)},buildLambda:function(b){b=e(b);return"function("+b.args.join(",")+"){return ("+b.body+");}"},lambda:function(b){if("function"==typeof b)return b;
if(b instanceof Array)return c(b);if(f.hasOwnProperty(b))return f[b];var a=e(b);return f[b]=new Function(a.args,"return ("+a.body+");")},clearLambdaCache:function(){f={}}});return g})},"dojox/main":function(){define(["dojo/_base/kernel"],function(k){return k.dojox})},"dojox/lang/functional/fold":function(){define(["dojo/_base/lang","dojo/_base/array","dojo/_base/kernel","./lambda"],function(k,l,h,g){var f={};k.mixin(g,{foldl:function(d,e,c,b){"string"==typeof d&&(d=d.split(""));b=b||h.global;e=g.lambda(e);
var a,m;if(k.isArray(d)){a=0;for(m=d.length;a<m;c=e.call(b,c,d[a],a,d),++a);}else if("function"==typeof d.hasNext&&"function"==typeof d.next)for(a=0;d.hasNext();c=e.call(b,c,d.next(),a++,d));else for(a in d)a in f||(c=e.call(b,c,d[a],a,d));return c},foldl1:function(d,e,c){"string"==typeof d&&(d=d.split(""));c=c||h.global;e=g.lambda(e);var b,a,m;if(k.isArray(d)){b=d[0];a=1;for(m=d.length;a<m;b=e.call(c,b,d[a],a,d),++a);}else if("function"==typeof d.hasNext&&"function"==typeof d.next){if(d.hasNext()){b=
d.next();for(a=1;d.hasNext();b=e.call(c,b,d.next(),a++,d));}}else for(a in m=!0,d)a in f||(m?(b=d[a],m=!1):b=e.call(c,b,d[a],a,d));return b},foldr:function(d,e,c,b){"string"==typeof d&&(d=d.split(""));b=b||h.global;e=g.lambda(e);for(var a=d.length;0<a;--a,c=e.call(b,c,d[a],a,d));return c},foldr1:function(d,e,c){"string"==typeof d&&(d=d.split(""));c=c||h.global;e=g.lambda(e);for(var b=d.length,a=d[b-1],b=b-1;0<b;--b,a=e.call(c,a,d[b],b,d));return a},reduce:function(d,e,c){return 3>arguments.length?
g.foldl1(d,e):g.foldl(d,e,c)},reduceRight:function(d,e,c){return 3>arguments.length?g.foldr1(d,e):g.foldr(d,e,c)},unfold:function(d,e,c,b,a){a=a||h.global;e=g.lambda(e);c=g.lambda(c);d=g.lambda(d);for(var f=[];!d.call(a,b);f.push(e.call(a,b)),b=c.call(a,b));return f}})})},"JBrowse/Store/LazyTrie":function(){define(["dojo/_base/declare","JBrowse/Util"],function(k,l){return k("JBrowse.Store.LazyTrie",null,{constructor:function(h,g){this.rootURL=h;this.chunkTempl=g;var f=this;dojo.xhrGet({url:h,handleAs:"json",
load:function(d){d&&(f.root=d,f.extra=d[0],f.deferred&&(f.deferred.callee.apply(f,f.deferred),delete f.deferred))}})},chunkUrl:function(h){h=this.chunkTempl.replace("{Chunk}",h);return l.resolveUrl(this.rootURL,h)},pathToPrefix:function(h){var g=this.root,f="",d=0;a:for(;d<h.length;d++){switch(typeof g[h[d]][0]){case "string":f+=g[h[d]][0];break;case "number":f+=g[h[d]][1];break a}g=g[h[d]]}return f},valuesFromPrefix:function(h,g){var f=this;this.findNode(h,function(d,e){g(f.valuesFromNode(e))},function(){g([])})},
mappingsFromPrefix:function(h,g){var f=this;this.findNode(h,function(d,e){g(f.mappingsFromNode(d,e))},function(){g([])})},mappingsFromNode:function(h,g){var f=[];null!==g[1]&&f.push([h,g[1]]);for(var d=2;d<g.length;d++)"string"==typeof g[d][0]&&(f=f.concat(this.mappingsFromNode(h+g[d][0],g[d])));return f},valuesFromNode:function(h){var g=[];null!==h[1]&&g.push(h[1]);for(var f=2;f<h.length;f++)g=g.concat(this.valuesFromNode(h[f]));return g},exactMatch:function(h,g,f){this.findNode(h,function(d,e){d.toLowerCase()==
h.toLowerCase()&&e[1]&&g(e[1])},f||function(){})},findNode:function(h,g,f){var d=this;this.findPath(h,function(e){for(var c=d.root,b=0;b<e.length;b++)c=c[e[b]];e=d.pathToPrefix(e);g(e,c)},f||function(){})},findPath:function(h,g,f){f=f||function(){};if(this.root){h=h.toLowerCase();for(var d=this.root,e=0,c,b=[];;){c=this.binarySearch(d,h.charAt(e));if(0>c){f();break}b.push(c);if("number"==typeof d[c][0]){var a=this;dojo.xhrGet({url:this.chunkUrl(this.pathToPrefix(b)),handleAs:"json",load:function(b){d[c]=
b;a.findPath(h,g)}});break}d=d[c];if(h.substr(e,d[0].length)!=d[0].substr(0,Math.min(d[0].length,h.length-e))){f();break}e+=d[0].length;if(e>=h.length){g(b);break}}}else this.deferred=arguments},binarySearch:function(h,g){for(var f=2,d=h.length-1,e,c;f<=d;){e=f+d>>>1;switch(typeof h[e][0]){case "string":c=h[e][0].charAt(0);break;case "number":c=h[e][1].charAt(0)}if(c<g)f=e+1;else if(c>g)d=e-1;else return e}return-(f+1)}})})},"JBrowse/Store/Names/LazyTrieDojoData":function(){define(["dojo/_base/declare",
"dojo/_base/array","JBrowse/Util","JBrowse/Model/Location"],function(k,l,h,g){return k(null,{constructor:function(f){if(!f.namesTrie)throw"must provide a namesTrie argument";this.namesTrie=f.namesTrie;this.resultLimit=f.resultLimit||15;this.tooManyMatchesMessage=f.tooManyMatchesMessage||"(too many matches to display)";var d=this.stopPrefixes={};f.stopPrefixes&&dojo.forEach("string"==typeof f.stopPrefixes?[f.stopPrefixes]:f.stopPrefixes,function(e){for(;e.length;)d[e]=!0,e=e.substr(0,e.length-1)});
this.nodeText=function(d){this.nodeText="number"==typeof d[1][0][0]?function(c){return c[0]}:function(c){return c[1][0][0]};return this.nodeText(d)}},getFeatures:function(){return{"dojo.data.api.Read":!0,"dojo.data.api.Identity":!0}},fetch:function(f){var d=Math.min(this.resultLimit,Math.max(0,f.count||Infinity)),e=f.scope||dojo.global,c=!1;f.abort=function(){var a=f.abort||function(){};return function(){c=!0;a.call(e,f)}}.call(this);f.store||(f.store=this);f.onBegin&&f.onBegin.call(e,0,f);var b=
(f.query.name||"").toString().replace(/\*$/,"");this.stopPrefixes[b]?f.onComplete&&f.onComplete.call(e,[],f):this.namesTrie.mappingsFromPrefix(b,dojo.hitch(this,function(a){var b=[];if(!c){var n=a[0]&&a[0][1]&&a[0][1][0]&&"string"==typeof a[0][1][0][0];dojo.some(a,function(a){if(d--){var c=this.nodeText(a);l.forEach(a[1],function(a){a=new g({ref:a[n?3:2],start:parseInt(a[n?4:3]),end:parseInt(a[n?5:4]),tracks:[this.namesTrie.extra[a[n?1:0]]],objectName:c});b.push({name:c,location:a})},this)}return 0>
d},this);0>d&&b.push({name:this.tooManyMatchesMessage,hitLimit:!0});f.sort&&b.sort(dojo.data.util.sorter.createSortFunction(f.sort,this));!c&&f.onItem&&dojo.forEach(b,function(a){c||f.onItem.call(e,a,f)});!c&&f.onComplete&&f.onComplete.call(e,b,f)}}));return f},getValue:function(f,d,e){f=f[d];return"undefined"==typeof f?e:f},getValues:function(f,d){var e=[f[d]];return"undefined"==typeof e[0]?[]:e},getAttributes:function(f){return h.dojof.keys(f)},hasAttribute:function(f,d){return f.hasOwnProperty(d)},
containsValue:function(f,d,e){return f[d]==e},isItem:function(f){return"object"==typeof f&&"string"==typeof f.label},isItemLoaded:function(){return!0},loadItem:function(f){},close:function(){},getLabel:function(f){return this.getValue(f,"name",void 0)},getLabelAttributes:function(f){return["name"]},getIdentity:function(f){return this.getLabel(f)}})})},"JBrowse/Model/Location":function(){define(["dojo/_base/array","JBrowse/Util"],function(k,l){return l.fastDeclare({constructor:function(h){if(h){"string"==
typeof h&&(h=l.parseLocString(h));h.location&&this._populate(h.location);if(h.feature){var g=h.feature;this._populate({start:g.get("start"),end:g.get("end"),ref:g.get("seq_id")||(h.tracks?h.tracks[0].browser.refSeq.name:void 0),strand:g.get("strand"),objectName:g.get("name")||g.get("id")})}this._populate(h)}},_populate:function(h){k.forEach("ref start end strand tracks objectName".split(" "),function(g){g in h&&(this[g]=h[g])},this)},toString:function(){var h=l.assembleLocString(this);return this.objectName?
h+" ("+this.objectName+")":h},fromString:function(h){h=l.parseLocString(h);h.objectName=h.extra;delete h.extra;this._populate(h)},localeCompare:function(h){return this.toString().localeCompare(h.toString())}})})},"dojo/store/DataStore":function(){define("../_base/lang ../_base/declare ../Deferred ../_base/array ./util/QueryResults ./util/SimpleQueryEngine".split(" "),function(k,l,h,g,f,d){return l("dojo.store.DataStore",null,{target:"",constructor:function(d){k.mixin(this,d);if(!("idProperty"in d)){var c;
try{c=this.store.getIdentityAttributes()}catch(b){}this.idProperty=(k.isArray(c)?c[0]:c)||this.idProperty}d=this.store.getFeatures();d["dojo.data.api.Read"]||(this.get=null);d["dojo.data.api.Identity"]||(this.getIdentity=null);d["dojo.data.api.Write"]||(this.put=this.add=null)},idProperty:"id",store:null,queryEngine:d,_objectConverter:function(d){function c(d){for(var e={},f=b.getAttributes(d),g=0;g<f.length;g++){var h=f[g],p=b.getValues(d,h);if(1<p.length){for(h=0;h<p.length;h++){var k=p[h];"object"==
typeof k&&b.isItem(k)&&(p[h]=c(k))}k=p}else k=b.getValue(d,h),"object"==typeof k&&b.isItem(k)&&(k=c(k));e[f[g]]=k}!(a in e)&&b.getIdentity&&(e[a]=b.getIdentity(d));return e}var b=this.store,a=this.idProperty;return function(a){return d(c(a))}},get:function(d,c){var b,a,f=new h;this.store.fetchItemByIdentity({identity:d,onItem:this._objectConverter(function(a){f.resolve(b=a)}),onError:function(b){f.reject(a=b)}});if(b)return b;if(a)throw a;return f.promise},put:function(d,c){var b=c&&"undefined"!=
typeof c.id||this.getIdentity(d),a=this.store,f=this.idProperty;"undefined"==typeof b?(a.newItem(d),a.save()):a.fetchItemByIdentity({identity:b,onItem:function(b){if(b)for(var c in d)c!=f&&a.getValue(b,c)!=d[c]&&a.setValue(b,c,d[c]);else a.newItem(d);a.save()}})},remove:function(d){var c=this.store;this.store.fetchItemByIdentity({identity:d,onItem:function(b){c.deleteItem(b);c.save()}})},query:function(d,c){var b,a=new h(function(){b.abort&&b.abort()});a.total=new h;var m=this._objectConverter(function(a){return a});
b=this.store.fetch(k.mixin({query:d,onBegin:function(b){a.total.resolve(b)},onComplete:function(b){a.resolve(g.map(b,m))},onError:function(b){a.reject(b)}},c));return f(a)},getIdentity:function(d){return d[this.idProperty]}})})},"JBrowse/FeatureFiltererMixin":function(){define(["dojo/_base/declare","dojo/_base/array"],function(k,l){var h=0;return k(null,{filterFeature:function(g){return!0},_featureFilterChain:[],addFeatureFilter:function(g,f){f=this._getFeatureFilterName(f);this._featureFilterChain.push({name:f,
filter:g});this._buildFeatureFilter();return f},_getFeatureFilterName:function(g){return void 0===g?"featureFilter_"+ ++h:g},removeFeatureFilter:function(g){for(var f=[],d=0;d<this._featureFilterChain.length;d++)this._featureFilterChain[d].name!==g&&f.push(this._featureFilterChain[d]);this._featureFilterChain=f;this._buildFeatureFilter()},_buildFeatureFilter:function(){var g=this._featureFilterChain.slice();if(g.length)if(1==g.length){var f=g[0].filter;this.filterFeature=function(d){return f.call(this,
d)&&this.featureFilterParentComponent.filterFeature(d)}}else this.filterFeature=function(d){for(var e=0;e<g.length;e++)if(!g[e].filter.call(this,d))return!1;return!this.featureFilterParentComponent.filterFeature(d)?!1:!0};else this.filterFeature=function(d){return this.featureFilterParentComponent.filterFeature(d)}},featureFilterParentComponent:{filterFeature:function(){return!0}},setFeatureFilter:function(g,f){this._featureFilterChain=[];this.addFeatureFilter(g,f)},clearFeatureFilter:function(){this._featureFilterChain=
[];this._buildFeatureFilter()},setFeatureFilterParentComponent:function(g){this.featureFilterParentComponent=g;this._buildFeatureFilter()}})})},"JBrowse/GenomeView":function(){define("dojo/_base/declare dojo/_base/array dojo/dom-construct JBrowse/Util JBrowse/has dojo/dnd/move dojo/dnd/Source dijit/focus JBrowse/Component JBrowse/FeatureFiltererMixin JBrowse/View/Track/LocationScale JBrowse/View/Track/GridLines JBrowse/BehaviorManager JBrowse/View/Animation/Zoomer JBrowse/View/Animation/Slider JBrowse/View/InfoDialog".split(" "),
function(k,l,h,g,f,d,e,c,b,a,m,n,q,s,r,p){var t=g.dojof,u=k(d.constrainedMoveable,{constructor:function(a,b){this.constraints=function(){var a=dojo.marginBox(this.node.parentNode);a.t=0;return a}}});return k([b,a],{constructor:function(a){var b=a.elem,c=a.stripeWidth,d=a.refSeq,f=a.zoomLevel;this.browser=a.browser;this.setFeatureFilterParentComponent(this.browser);this.focusTrack=null;this.elem=b;this.posHeight=this.calculatePositionLabelHeight(b);this.topSpace=1.5*this.posHeight;this.maxPxPerBp=
this.config.maxPxPerBp;this.ref=d;this.pxPerBp=f;this.stripeWidth=c;this.scrollContainer=dojo.create("div",{id:"container",style:{position:"absolute",left:"0px",top:"0px"}},b);this._renderVerticalScrollBar();this.zoomContainer=document.createElement("div");this.zoomContainer.id="zoomContainer";this.zoomContainer.style.cssText="position: absolute; left: 0px; top: 0px; height: 100%;";this.scrollContainer.appendChild(this.zoomContainer);this.outerTrackContainer=document.createElement("div");this.outerTrackContainer.className=
"trackContainer outerTrackContainer";this.outerTrackContainer.style.cssText="height: 100%;";this.zoomContainer.appendChild(this.outerTrackContainer);this.trackContainer=document.createElement("div");this.trackContainer.className="trackContainer innerTrackContainer draggable";this.trackContainer.style.cssText="height: 100%;";this.outerTrackContainer.appendChild(this.trackContainer);this.regularStripe=c;this.overview=this.browser.overviewDiv;this.overviewBox=dojo.marginBox(this.overview);this.tracks=
[];this.uiTracks=[];this.trackIndices={};this.sizeInit();this.offset=0;this.maxLeft=this.bpToPx(this.ref.end+1)-this.getWidth();this.minLeft=this.bpToPx(this.ref.start);this.drawMargin=0.2;this.slideTimeMultiple=0.8;this.trackHeights=[];this.trackTops=[];this.waitElems=dojo.filter([dojo.byId("moveLeft"),dojo.byId("moveRight"),dojo.byId("zoomIn"),dojo.byId("zoomOut"),dojo.byId("bigZoomIn"),dojo.byId("bigZoomOut"),document.body,b],function(a){return a});this.prevCursors=[];this.locationThumb=document.createElement("div");
this.locationThumb.className="locationThumb";this.overview.appendChild(this.locationThumb);this.locationThumbMover=new u(this.locationThumb,{area:"content",within:!0});this.x=this.elem.scrollLeft;this.y=0;a=document.createElement("div");a.className="track static_track rubberBandAvailable";a.style.height=this.posHeight+"px";a.id="static_track";this.scaleTrackDiv=a;this.staticTrack=new m({label:"static_track",labelClass:"pos-label",posHeight:this.posHeight,browser:this.browser,refSeq:this.ref});this.staticTrack.setViewInfo(this,
function(a){},this.stripeCount,this.scaleTrackDiv,this.stripePercent,this.stripeWidth,this.pxPerBp,this.config.trackPadding);this.zoomContainer.appendChild(this.scaleTrackDiv);this.waitElems.push(this.scaleTrackDiv);a=document.createElement("div");a.className="track";a.style.cssText="top: 0px; height: 100%;";a.id="gridtrack";b=new n({browser:this.browser,refSeq:this.ref});b.setViewInfo(this,function(a){},this.stripeCount,a,this.stripePercent,this.stripeWidth,this.pxPerBp,this.config.trackPadding);
this.trackContainer.appendChild(a);this.uiTracks=[this.staticTrack,b];this.trackDndWidget=new e(this.trackContainer,{accept:["track"],withHandles:!0,creator:dojo.hitch(this,function(a,b){return{data:a,type:["track"],node:"avatar"==b?dojo.create("div",{innerHTML:a.key||a.label,className:"track-label dragging"}):this.renderTrack(a)}})});this.browser.subscribe("/dnd/drop",dojo.hitch(this,function(a,b,c,d){this.updateTrackList();d.node===this.trackContainer&&(a=dojo.filter(dojo.map(b,function(a){return a.track&&
a.track.config}),function(a){return a}),this.browser.publish("/jbrowse/v1/v/tracks/show",a))}));this.browser.subscribe("/jbrowse/v1/c/tracks/show",dojo.hitch(this,"showTracks"));this.browser.subscribe("/jbrowse/v1/c/tracks/hide",dojo.hitch(this,"hideTracks"));this.browser.subscribe("/jbrowse/v1/c/tracks/replace",dojo.hitch(this,"replaceTracks"));this.browser.subscribe("/jbrowse/v1/c/tracks/delete",dojo.hitch(this,"hideTracks"));this.browser.subscribe("/jbrowse/v1/c/tracks/pin",dojo.hitch(this,"pinTracks"));
this.browser.subscribe("/jbrowse/v1/c/tracks/unpin",dojo.hitch(this,"unpinTracks"));dojo.forEach(this.uiTracks,function(a){a.showRange(0,this.stripeCount-1,Math.round(this.pxToBp(this.offset)),Math.round(this.stripeWidth/this.pxPerBp),this.pxPerBp)},this);this.addOverviewTrack(new m({label:"overview_loc_track",labelClass:"overview-pos",posHeight:this.overviewPosHeight,browser:this.browser,refSeq:this.ref}));this.showFine();this.showCoarse();this.behaviorManager=new q({context:this,behaviors:this._behaviors()});
this.behaviorManager.initialize()},_defaultConfig:function(){return{maxPxPerBp:20,trackPadding:20}},visibleRegion:function(){return{ref:this.ref.name,start:this.minVisible(),end:this.maxVisible()}},visibleRegionLocString:function(){return g.assembleLocString(this.visibleRegion())},_renderVerticalScrollBar:function(){var a=dojo.create("div",{className:"vertical_scrollbar",style:{position:"fixed",right:"0px",bottom:"0px",height:"100%",width:"10px",zIndex:1E3}},this.elem),b=dojo.create("div",{className:"vertical_position_marker",
style:{position:"absolute",height:"100%"}},a);this.verticalScrollBar={container:a,positionMarker:b,width:a.offsetWidth}},_updateVerticalScrollBar:function(a){if("number"==typeof a.height){var b=this.staticTrack?-this.staticTrack.div.offsetHeight:0;this.verticalScrollBar.container.style.height=a.height+b-(this.pinUnderlay?this.pinUnderlay.offsetHeight+b:0)+"px";b=100*(a.height/(this.containerHeight||1));this.verticalScrollBar.positionMarker.style.height=0.5<b?b+"%":"1px";0.98<a.height/(this.containerHeight||
1)?(this.verticalScrollBar.container.style.display="none",this.verticalScrollBar.visible=!1):(this.verticalScrollBar.container.style.display="block",this.verticalScrollBar.visible=!0)}if("number"==typeof a.y||"number"==typeof a.height)this.verticalScrollBar.positionMarker.style.top=(100*((a.y||this.getY()||0)/(this.containerHeight||1))||0)+"%"},verticalScrollBarVisibleWidth:function(){return this.verticalScrollBar.visible&&this.verticalScrollBar.width||0},visibleTracks:function(){return this.tracks},
visibleTrackNames:function(){return dojo.map(this.visibleTracks(),function(a){return a.name})},keySlideX:function(a){this.setX(this.getX()+a);var b=this;this._keySlideTimeout||(this._keySlideTimeout=window.setTimeout(function(){b.afterSlide();delete b._keySlideTimeout},300))},_behaviors:function(){return{always:{apply_on_init:!0,apply:function(){var a=[];a.push(dojo.connect(this.overview,"mousedown",dojo.hitch(this,"startRubberZoom",dojo.hitch(this,"overview_absXtoBp"),this.overview,this.overview)));
var b="onwheel"in document.createElement("div")?"wheel":void 0!==document.onmousewheel?"mousewheel":"DOMMouseScroll";a.push(dojo.connect(this.scrollContainer,b,this,"wheelScroll",!1),dojo.connect(this.verticalScrollBar.container,"onclick",this,"scrollBarClickScroll",!1),dojo.connect(this.scaleTrackDiv,"mousedown",dojo.hitch(this,"startRubberZoom",dojo.hitch(this,"absXtoBp"),this.scrollContainer,this.scaleTrackDiv)),dojo.connect(this.outerTrackContainer,"dblclick",this,"doubleClickZoom"),dojo.connect(this.locationThumbMover,
"onMoveStop",this,"thumbMoved"),dojo.connect(this.overview,"onclick",this,"overviewClicked"),dojo.connect(this.scaleTrackDiv,"onclick",this,"scaleClicked"),dojo.connect(this.scaleTrackDiv,"mouseover",this,"scaleMouseOver"),dojo.connect(this.scaleTrackDiv,"mouseout",this,"scaleMouseOut"),dojo.connect(this.scaleTrackDiv,"mousemove",this,"scaleMouseMove"),dojo.connect(document.body,"onkeyup",this,function(a){a.keyCode==dojo.keys.SHIFT&&this.behaviorManager.swapBehaviors("shiftMouse","normalMouse")}),
dojo.connect(document.body,"onkeydown",this,function(a){a.keyCode==dojo.keys.SHIFT&&this.behaviorManager.swapBehaviors("normalMouse","shiftMouse")}),dojo.connect(document.body,"onkeypress",this,function(a){if(!c.curNode)if(a.keyCode==dojo.keys.LEFT_ARROW||a.keyCode==dojo.keys.RIGHT_ARROW){var b=a.keyCode==dojo.keys.LEFT_ARROW?-40:40;a.shiftKey&&(b*=5);this.keySlideX(b)}else if(a.keyCode==dojo.keys.DOWN_ARROW||a.keyCode==dojo.keys.UP_ARROW)if(a.shiftKey)this[a.keyCode==dojo.keys.UP_ARROW?"zoomIn":
"zoomOut"](a,0.5,a.altKey?2:1);else b=a.keyCode==dojo.keys.UP_ARROW?-40:40,this.setY(this.getY()+b)}),dojo.connect(this.scrollContainer,"onclick",this,function(a){c.curNode&&c.curNode.blur()}));return a}},normalMouse:{apply_on_init:!0,apply:function(){return[dojo.connect(this.outerTrackContainer,"mousedown",this,"startMouseDragScroll"),dojo.connect(this.verticalScrollBar.container,"mousedown",this,"startVerticalMouseDragScroll")]}},highlightingMouse:{apply:function(){dojo.removeClass(this.trackContainer,
"draggable");dojo.addClass(this.trackContainer,"highlightingAvailable");return[dojo.connect(this.outerTrackContainer,"mousedown",dojo.hitch(this,"startMouseHighlight",dojo.hitch(this,"absXtoBp"),this.scrollContainer,this.scaleTrackDiv)),dojo.connect(this.outerTrackContainer,"mouseover",this,"maybeDrawVerticalPositionLine"),dojo.connect(this.outerTrackContainer,"mousemove",this,"maybeDrawVerticalPositionLine")]},remove:function(a,b){dojo.forEach(b,dojo.disconnect,dojo);dojo.removeClass(this.trackContainer,
"highlightingAvailable");dojo.addClass(this.trackContainer,"draggable")}},shiftMouse:{apply:function(){if(!dojo.hasClass(this.trackContainer,"highlightingAvailable"))return dojo.removeClass(this.trackContainer,"draggable"),dojo.addClass(this.trackContainer,"rubberBandAvailable"),[dojo.connect(this.outerTrackContainer,"mousedown",dojo.hitch(this,"startRubberZoom",dojo.hitch(this,"absXtoBp"),this.scrollContainer,this.scaleTrackDiv)),dojo.connect(this.outerTrackContainer,"onclick",this,"scaleClicked"),
dojo.connect(this.outerTrackContainer,"mouseover",this,"maybeDrawVerticalPositionLine"),dojo.connect(this.outerTrackContainer,"mousemove",this,"maybeDrawVerticalPositionLine")]},remove:function(a,b){this.clearBasePairLabels();this.clearVerticalPositionLine();dojo.forEach(b,dojo.disconnect,dojo);dojo.removeClass(this.trackContainer,"rubberBandAvailable");dojo.addClass(this.trackContainer,"draggable")}},mouseDragScrolling:{apply:function(){return[dojo.connect(document.body,"mouseup",this,"dragEnd"),
dojo.connect(document.body,"mousemove",this,"dragMove"),dojo.connect(document.body,"mouseout",this,"checkDragOut")]}},verticalMouseDragScrolling:{apply:function(){return[dojo.connect(document.body,"mouseup",this,"dragEnd"),dojo.connect(document.body,"mousemove",this,"verticalDragMove"),dojo.connect(document.body,"mouseout",this,"checkDragOut")]}},mouseRubberBanding:{apply:function(){return[dojo.connect(document.body,"mouseup",this,"rubberExecute"),dojo.connect(document.body,"mousemove",this,"rubberMove"),
dojo.connect(document.body,"mouseout",this,"rubberCancel"),dojo.connect(window,"onkeydown",this,function(a){a.keyCode!==dojo.keys.SHIFT&&this.rubberCancel(a)})]}}}},calculatePositionLabelHeight:function(a){var b=document.createElement("div");b.className="pos-label";b.style.visibility="hidden";b.appendChild(document.createTextNode("42"));a.appendChild(b);var c=b.clientHeight;a.removeChild(b);return c},scrollBarClickScroll:function(a){a||(a=window.event);var b=parseInt(this.verticalScrollBar.container.style.height,
10),c=parseInt(this.verticalScrollBar.positionMarker.style.height,10),d=this.trackContainer.clientHeight,b=this.getY()*(d/b);b>a.clientY?this.setY(this.getY()-300):b+c<a.clientY&&this.setY(this.getY()+300);this.wheelScrollTimeout&&window.clearTimeout(this.wheelScrollTimeout);this.wheelScrollTimeout=window.setTimeout(dojo.hitch(this,function(){this.showVisibleBlocks(!0);this.wheelScrollTimeout=null},100));dojo.stopEvent(a)},wheelScroll:function(a){a||(a=window.event);var b=0,c=0;"wheelDeltaX"in a?
(b=a.wheelDeltaX/2,c=a.wheelDeltaY/2):"deltaX"in a?(b=-1!==navigator.userAgent.indexOf("OS X 10.9")?-5:-40,b=Math.abs(a.deltaY)>Math.abs(2*a.deltaX)?0:a.deltaX*b,c=-10*a.deltaY):a.wheelDelta?(c=a.wheelDelta/2,window.opera&&(c=-c)):a.detail&&(c=100*-a.detail);b=Math.round(2*b);c=Math.round(c);b&&this.keySlideX(-b);c&&this.setY(this.getY()-c);this.wheelScrollTimeout&&window.clearTimeout(this.wheelScrollTimeout);this.wheelScrollTimeout=window.setTimeout(dojo.hitch(this,function(){this.showVisibleBlocks(!0);
this.wheelScrollTimeout=null},100));dojo.stopEvent(a)},getX:function(){return this.x||0},getY:function(){return this.y||0},getHeight:function(){return this.elemBox.h},getWidth:function(){return this.elemBox.w},clampX:function(a){return Math.round(Math.max(Math.min(this.maxLeft-this.offset,a||0),this.minLeft-this.offset))},clampY:function(a){return Math.round(Math.min(Math.max(0,a||0),this.containerHeight-this.getHeight()))},rawSetX:function(a){this.x=this.elem.scrollLeft=a},setX:function(a){a=this.clampX(a);
this.rawSetX(a);this.updateStaticElements({x:a});this.showFine();return a},rawSetY:function(a){this.y=a;this.layoutTracks()},setY:function(a){a=this.clampY(a);this.rawSetY(a);this.updateStaticElements({y:a});return a},rawSetPosition:function(a){this.rawSetX(a.x);this.rawSetY(a.y);return a},setPosition:function(a){var b=this.clampX(a.x);a=this.clampY(a.y);this.updateStaticElements({x:b,y:a});this.rawSetX(b);this.rawSetY(a);this.showFine()},getPosition:function(){return{x:this.x,y:this.y}},zoomCallback:function(){this.zoomUpdate()},
afterSlide:function(){this.showCoarse();this.scrollUpdate();this.showVisibleBlocks(!0)},suppressDoubleClick:function(a){this._noDoubleClick&&window.clearTimeout(this._noDoubleClick);var b=this;this._noDoubleClick=window.setTimeout(function(){delete b._noDoubleClick},a||100)},doubleClickZoom:function(a){if(!this._noDoubleClick&&!this.dragging&&!("animation"in this)){this.scaleClickedTimeout&&window.clearTimeout(this.scaleClickedTimeout);var b=(a.pageX-dojo.position(this.elem,!0).x)/this.getWidth();
a.shiftKey?this.zoomOut(a,b,2):this.zoomIn(a,b,2);dojo.stopEvent(a)}},_beforeMouseDrag:function(a){if(this.animation){if(this.animation instanceof s)return dojo.stopEvent(a),0;this.animation.stop()}if(g.isRightButton(a))return 0;dojo.stopEvent(a);return 1},startMouseDragScroll:function(a){this._beforeMouseDrag(a)&&(this.behaviorManager.applyBehaviors("mouseDragScrolling"),this.dragStartPos={x:a.clientX,y:a.clientY},this.winStartPos=this.getPosition())},startVerticalMouseDragScroll:function(a){this._beforeMouseDrag(a)&&
(this.behaviorManager.applyBehaviors("verticalMouseDragScrolling"),this.dragStartPos={x:a.clientX,y:a.clientY},this.winStartPos=this.getPosition())},startMouseHighlight:function(a,b,c,d){this._beforeMouseDrag(d)&&(this.behaviorManager.applyBehaviors("mouseRubberBanding"),this.rubberbanding={absFunc:a,container:b,scaleDiv:c,message:"Highlight region",start:{x:d.clientX,y:d.clientY},execute:function(a,b){this.browser.setHighlightAndRedraw({ref:this.ref.name,start:a,end:b})}},this.winStartPos=this.getPosition())},
startRubberZoom:function(a,b,c,d){this._beforeMouseDrag(d)&&(this.behaviorManager.applyBehaviors("mouseRubberBanding"),this.rubberbanding={absFunc:a,container:b,scaleDiv:c,message:"Zoom to region",start:{x:d.clientX,y:d.clientY},execute:function(a,b){this.setLocation(this.ref,a,b)}},this.winStartPos=this.getPosition(),this.clearVerticalPositionLine(),this.clearBasePairLabels())},_rubberStop:function(a){this.behaviorManager.removeBehaviors("mouseRubberBanding");this.hideRubberHighlight();this.clearBasePairLabels();
a&&dojo.stopEvent(a);delete this.rubberbanding},rubberCancel:function(a){var b=document.body.parentNode,c=document.body;(!a||!a.relatedTarget&&!a.toElement||b===(a.relatedTarget||a.toElement)||c===(a.relatedTarget||a.toElement))&&this._rubberStop(a)},rubberMove:function(a){this.setRubberHighlight(this.rubberbanding.start,{x:a.clientX,y:a.clientY})},rubberExecute:function(a){var b=this.rubberbanding.start,c=a.clientX,d=Math.floor(this.rubberbanding.absFunc(Math.min(b.x,c))),e=Math.ceil(this.rubberbanding.absFunc(Math.max(b.x,
c))),f=this.rubberbanding.execute;this._rubberStop(a);3>Math.abs(b.x-c)||f.call(this,d,e)},setRubberHighlight:function(a,b){var c=this.rubberbanding.container,d=dojo.position(c,!0),e;if(!(e=this.rubberHighlight)){e=this.rubberHighlight=document.createElement("div");e.className="rubber-highlight";e.style.position="absolute";e.style.zIndex=20;var f=document.createElement("div");f.appendChild(document.createTextNode(this.rubberbanding.message));e.appendChild(f);f.style.position="relative";f.style.top=
50-d.y+"px";c.appendChild(e)}e.style.visibility="visible";e.style.left=Math.min(a.x,b.x)-d.x+"px";e.style.width=Math.abs(b.x-a.x)+"px";this.drawBasePairLabel({name:"rubberLeft",xToBp:this.rubberbanding.absFunc,scaleDiv:this.rubberbanding.scaleDiv,offset:0,x:Math.min(a.x,b.x),parent:c,className:"rubber"});this.drawBasePairLabel({name:"rubberRight",xToBp:this.rubberbanding.absFunc,scaleDiv:this.rubberbanding.scaleDiv,offset:0,x:Math.max(a.x,b.x)+1,parent:c,className:"rubber"});this.clearVerticalPositionLine()},
dragEnd:function(a){this.behaviorManager.removeBehaviors("mouseDragScrolling","verticalMouseDragScrolling");dojo.stopEvent(a);this.showCoarse();this.scrollUpdate();this.showVisibleBlocks(!0);window.setTimeout(dojo.hitch(this,function(){this.dragging=!1}),100)},checkDragOut:function(a){var b=document.body.parentNode,c=document.body;(!a.relatedTarget&&!a.toElement||b===(a.relatedTarget||a.toElement)||c===(a.relatedTarget||a.toElement))&&this.dragEnd(a)},dragMove:function(a){this.dragging=!0;this.setPosition({x:this.winStartPos.x-
(a.clientX-this.dragStartPos.x),y:this.winStartPos.y-(a.clientY-this.dragStartPos.y)});dojo.stopEvent(a)},verticalDragMove:function(a){this.dragging=!0;var b=parseInt(this.verticalScrollBar.container.style.height,10);this.setPosition({x:this.winStartPos.x,y:this.winStartPos.y+(a.clientY-this.dragStartPos.y)*(this.trackContainer.clientHeight/b)});dojo.stopEvent(a)},hideRubberHighlight:function(a,b){this.rubberHighlight&&(this.rubberHighlight.parentNode.removeChild(this.rubberHighlight),delete this.rubberHighlight)},
slide:function(a){this.animation&&this.animation.stop();this.trimVertical();new r(this,this.afterSlide,Math.abs(a)*this.getWidth()*this.slideTimeMultiple+200,a*this.getWidth())},setLocation:function(a,b,c){function d(a){a.div&&a.div.parentNode&&a.div.parentNode.removeChild(a.div)}void 0===b&&(b=this.minVisible());void 0===c&&(c=this.maxVisible());"string"==typeof a&&(a=this.browser.getRefSeq(a));a||(a=this.ref);if(b<a.start||b>a.end)b=a.start;if(c<a.start||c>a.end)c=a.end;if(this.ref!==a){var e=this;
this.ref=a;this._unsetPosBeforeZoom();l.forEach(this.tracks,d);this.tracks=[];this.trackIndices={};this.trackHeights=[];this.trackTops=[];l.forEach(this.uiTracks,function(a){a.refSeq=e.ref;a.clear()});this.overviewTrackIterate(d);this.addOverviewTrack(new m({label:"overview_loc_track",labelClass:"overview-pos",posHeight:this.overviewPosHeight,browser:this.browser,refSeq:this.ref}));this.sizeInit();this.setY(0);this.behaviorManager.initialize()}this.pxPerBp=Math.min(this.getWidth()/(c-b),this.maxPxPerBp);
this.curZoom=g.findNearest(this.zoomLevels,this.pxPerBp);0.2>Math.abs(this.pxPerBp-this.zoomLevels[this.zoomLevels.length-1])&&(this.pxPerBp=this.zoomLevels[this.zoomLevels.length-1]);this.stripeWidth=this.stripeWidthForZoom(this.curZoom)/this.zoomLevels[this.curZoom]*this.pxPerBp;this.instantZoomUpdate();this.centerAtBase((b+c)/2,!0)},stripeWidthForZoom:function(a){return this.zoomLevels.length-1==a?this.regularStripe/10*this.maxPxPerBp:0==a?this.minZoomStripe:this.regularStripe},instantZoomUpdate:function(){this.scrollContainer.style.width=
this.stripeCount*this.stripeWidth+"px";this.zoomContainer.style.width=this.stripeCount*this.stripeWidth+"px";this.maxOffset=this.bpToPx(this.ref.end)-this.stripeCount*this.stripeWidth;this.maxLeft=this.bpToPx(this.ref.end+1)-this.getWidth();this.minLeft=this.bpToPx(this.ref.start)},centerAtBase:function(a,b){a=Math.min(Math.max(a,this.ref.start),this.ref.end);if(b){var c=this.bpToPx(a);this.offset=Math.floor((c-this.stripeCount*this.stripeWidth/2)/this.stripeWidth)*this.stripeWidth;this.setX(c-this.offset-
this.getWidth()/2);this.trackIterate(function(a){a.clear()});this.showVisibleBlocks(!0);this.showCoarse()}else{var c=this.pxToBp(this.x+this.offset),d=this.getWidth()/this.pxPerBp/2,e=c+d;a>=c-d&&a<=c+d+d+d?(this.animation&&this.animation.stop(),c=(e-a)*this.pxPerBp,this.trimVertical(),new r(this,this.afterSlide,Math.abs(c)*this.slideTimeMultiple+200,c)):this.centerAtBase(a,!0)}},minVisible:function(){var a=this.pxToBp(this.x+this.offset);return a<this.pxToBp(1)?0:Math.round(a)},maxVisible:function(){var a=
this.pxToBp(this.x+this.offset+this.getWidth()),b=this.pxToBp(this.verticalScrollBarVisibleWidth());return a>this.ref.end-this.pxToBp(1)?this.ref.end-b:Math.round(a)-b},showFine:function(){this.onFineMove(this.minVisible(),this.maxVisible())},showCoarse:function(){this.onCoarseMove(this.minVisible(),this.maxVisible())},onFineMove:function(a,b){this.updateLocationThumb()},onCoarseMove:function(a,b){this.updateLocationThumb()},onResize:function(){this.sizeInit();this.showVisibleBlocks();this.showFine();
this.showCoarse()},overviewClicked:function(a){this.centerAtBase(this.overview_absXtoBp(a.clientX))},scaleMouseOver:function(a){this.rubberbanding||this.drawVerticalPositionLine(this.scaleTrackDiv,a)},scaleMouseMove:function(a){this.rubberbanding||this.drawVerticalPositionLine(this.scaleTrackDiv,a)},scaleMouseOut:function(a){this.clearVerticalPositionLine();this.clearBasePairLabels()},maybeDrawVerticalPositionLine:function(a){this.rubberbanding||this.drawVerticalPositionLine(this.scaleTrackDiv,a)},
drawVerticalPositionLine:function(a,b){var c=b.pageX+2;this.verticalPositionLine||(this.verticalPositionLine=dojo.create("div",{className:"trackVerticalPositionIndicatorMain"},this.staticTrack.div));var d=this.verticalPositionLine;d.style.display="block";d.style.left=c+"px";var e=dojo.position(this.scaleTrackDiv);d.style.top=e.y+"px";this.drawBasePairLabel({name:"single",offset:0,x:c,parent:a,scaleDiv:a})},drawBasePairLabel:function(a){var b=a.name||0,c=a.offset||0,d=a.x;this.basePairLabels=this.basePairLabels||
{};if(!this.basePairLabels[b]){var e=dojo.position(a.scaleDiv||this.scaleTrackDiv);this.basePairLabels[b]=dojo.create("div",{className:"basePairLabel"+(a.className?" "+a.className:""),style:{top:e.y+e.h-3+"px"}},document.body)}b=this.basePairLabels[b];"object"==typeof d&&(d=d.clientX);b.style.display="block";a=a.xToBp||dojo.hitch(this,"absXtoBp");b.innerHTML=g.addCommas(Math.floor(a(d))+1);b.style.left=window.innerWidth-d>8+b.offsetWidth?d+c+"px":d+1-c-b.offsetWidth+"px"},clearVerticalPositionLine:function(){this.verticalPositionLine&&
(this.verticalPositionLine.style.display="none")},clearBasePairLabels:function(){for(var a in this.basePairLabels){var b=this.basePairLabels[a];b.parentNode&&b.parentNode.removeChild(b)}this.basePairLabels={}},overview_absXtoBp:function(a){var b=dojo.position(this.overview);return(a-b.x)/b.w*(this.ref.end-this.ref.start)+this.ref.start},scaleClicked:function(a){var b=this.absXtoBp(a.clientX);this.scaleClickedTimeout=window.setTimeout(dojo.hitch(this,function(){this.centerAtBase(b)},100))},thumbMoved:function(a){a=
parseInt(this.locationThumb.style.left);var b=parseInt(this.locationThumb.style.width);this.centerAtBase((a+b/2)/this.overviewBox.w*(this.ref.end-this.ref.start)+this.ref.start)},updateLocationThumb:function(){var a=this.minVisible(),b=this.maxVisible(),c=this.ref.end-this.ref.start,a=Math.round((a-this.ref.start)/c*this.overviewBox.w+this.overviewBox.l),b=Math.round((b-this.ref.start)/c*this.overviewBox.w+this.overviewBox.l);this.locationThumb.style.cssText="height: "+(this.overviewBox.h-4)+"px; left: "+
a+"px; width: "+(b-a)+"px;z-index: 20"},checkY:function(a){return Math.min(0>a?0:a,this.containerHeight-this.getHeight())},updateStaticElements:function(a){this.trackIterate(function(b){b.updateStaticElements(a)},this);this._updateVerticalScrollBar(a)},showWait:function(){for(var a=[],b=0;b<this.waitElems.length;b++)a[b]=this.waitElems[b].style.cursor,this.waitElems[b].style.cursor="wait";this.prevCursors.push(a)},showDone:function(){for(var a=this.prevCursors.pop(),b=0;b<this.waitElems.length;b++)this.waitElems[b].style.cursor=
a[b]},pxToBp:function(a){return a/this.pxPerBp},absXtoBp:function(a){return this.pxToBp(this.getPosition().x+this.offset-dojo.position(this.elem,!0).x+a)-1},bpToPx:function(a){return a*this.pxPerBp},sizeInit:function(){this.overviewBox=dojo.marginBox(this.overview);this.elemBox={h:this.elem.offsetHeight,w:this.elem.offsetWidth};var a=[2E-6,5E-6,1E-5,2E-5,5E-5,1E-4,2E-4,5E-4,0.001,0.002,0.005,0.01,0.02,0.05,0.1,0.2,0.5,1,2,5,10,20];this.zoomLevels=[];for(var b=0;b<a.length;b++){var c=a[b];if(c<this.maxPxPerBp)this.zoomLevels.push(c);
else break}for(this.zoomLevels.push(this.maxPxPerBp);(this.ref.end-this.ref.start)*this.zoomLevels[0]<this.getWidth();)this.zoomLevels.shift();this.zoomLevels.unshift(this.getWidth()/(this.ref.end-this.ref.start));this.minZoomStripe=this.regularStripe*(this.zoomLevels[0]/this.zoomLevels[1]);for(this.curZoom=0;this.pxPerBp>this.zoomLevels[this.curZoom];)this.curZoom++;this.maxLeft=this.bpToPx(this.ref.end+1)-this.getWidth();delete this.stripePercent;a=[20,10,5,4,2,1];for(b=0;b<a.length;b++)if(100/
a[b]*0.7*this.regularStripe>3*this.getWidth()+this.regularStripe){this.stripePercent=a[b];break}this.stripePercent||(console.warn("stripeWidth too small: "+this.stripeWidth+", "+this.getWidth()),this.stripePercent=1);(b=this.stripeCount)&&this.getX();this.stripeCount=Math.round(100/this.stripePercent);this.scrollContainer.style.width=this.stripeCount*this.stripeWidth+"px";this.zoomContainer.style.width=this.stripeCount*this.stripeWidth+"px";var d;b&&b!=this.stripeCount&&(d=Math.floor((b-this.stripeCount)/
2),b=d*this.stripeWidth,a=this.getX()-b,this.offset+=b,this.updateStaticElements({x:a}),this.rawSetX(a));this.trackIterate(function(a,b){a.sizeInit(b.stripeCount,b.stripePercent,d)});b=this.trackHeights&&this.trackHeights.length?Math.max(t.reduce(this.trackHeights,"+")+this.config.trackPadding*this.trackHeights.length,this.getHeight()):this.getHeight();this.scrollContainer.style.height=b+"px";this.containerHeight=b;b=this.ref.end-this.ref.start;if(0>b)throw Error("reference sequence "+this.ref.name+
" has an invalid start coordinate, it is greater than its end coordinate.");c=document.createElement("div");c.className="overview-pos";c.appendChild(document.createTextNode(g.addCommas(this.ref.end)));c.style.visibility="hidden";this.overview.appendChild(c);a=1.2*c.clientWidth;this.overviewPosHeight=1.2*c.clientHeight;this.overview.removeChild(c);for(c=1;30>c;c++){this.overviewStripeBases=(Math.pow(c%3,2)+1)*Math.pow(10,Math.floor(c/3));this.overviewStripes=Math.ceil(b/this.overviewStripeBases);if(this.overviewBox.w/
this.overviewStripes>a)break;if(2>this.overviewStripes)break}var e=100/(b/this.overviewStripeBases);this.overviewTrackIterate(function(a,b){a.clear();a.sizeInit(b.overviewStripes,e);a.showRange(0,b.overviewStripes-1,b.ref.start-1,b.overviewStripeBases,b.overviewBox.w/(b.ref.end-b.ref.start))});this.updateOverviewHeight();this.updateScroll()},updateScroll:function(){var a={height:this.getHeight()};0<this.getY()&&this.containerHeight-this.getY()<a.height&&(a.y=this.setY(Math.max(0,this.containerHeight-
a.height)));this.updateStaticElements(a)},overviewTrackIterate:function(a){var b=this.overview.firstChild;do b&&b.track&&a.call(this,b.track,this);while(b&&(b=b.nextSibling))},updateOverviewHeight:function(a,b){var c=0;this.overviewTrackIterate(function(a,b){c+=a.height;a.div.style.height=a.height+"px"});this.overview.style.height=c+"px";this.overviewBox=dojo.marginBox(this.overview)},addOverviewTrack:function(a){var b=100/((this.ref.end-this.ref.start)/this.overviewStripeBases),c=document.createElement("div");
c.className="track";c.style.height=this.overviewBox.h+"px";c.id="overviewtrack_"+a.name;c.track=a;var d=this;a.setViewInfo(this,function(a){d.updateOverviewHeight()},this.overviewStripes,c,b,this.overviewStripeBases,this.pxPerBp,this.config.trackPadding);this.overview.appendChild(c);this.updateOverviewHeight();return c},trimVertical:function(a){void 0===a&&(a=this.getY());for(var b,c=this.topSpace,d=a+this.getHeight(),e=0;e<this.tracks.length;e++)this.tracks[e].shown&&(b=c+this.trackHeights[e],b>
a&&c<d||this.tracks[e].hideAll(),c=b+this.config.trackPadding)},redrawTracks:function(){this.trackIterate(function(a){a.hideAll()});this.showVisibleBlocks(!1)},hideRegion:function(a){this.overviewTrackIterate(function(b){b.hideRegion(a)});this.trackIterate(function(b){b.hideRegion(a)})},redrawRegion:function(a){this.hideRegion(a);this.showVisibleBlocks(!1)},zoomIn:function(a,b,c){if(!this.animation&&(this._unsetPosBeforeZoom(),void 0===b&&(b=0.5),void 0===c&&(c=1),c=Math.min(c,this.zoomLevels.length-
1-this.curZoom),!(0==c&&this.pxPerBp==this.zoomLevels[this.curZoom]))){this.showWait();var d=this.getPosition();this.trimVertical(d.y);a=this.zoomLevels[this.curZoom+c]/this.pxPerBp;var e=this.pxToBp(d.x+this.offset+b*this.getWidth());this.curZoom+=c;this.pxPerBp=this.zoomLevels[this.curZoom];this.maxLeft=this.bpToPx(this.ref.end+1)-this.getWidth();for(c=0;c<this.tracks.length;c++)this.tracks[c].startZoom(this.pxPerBp,e-b*this.getWidth()/this.pxPerBp,e+(1-b)*this.getWidth()/this.pxPerBp);new s(a,
this,function(){this.zoomUpdate(b,e)},700,b)}},zoomToBaseLevel:function(a,b){if(!this.animation){var c=this.zoomLevels.length-1;if(this.curZoom!==c){this._setPosBeforeZoom(this.minVisible(),this.maxVisible(),this.curZoom);this.showWait();this.trimVertical();var d=this.zoomLevels[c]/this.pxPerBp;this.curZoom=c;this.pxPerBp=this.zoomLevels[c];this.maxLeft=this.pxPerBp*this.ref.end-this.getWidth();for(c=0;c<this.tracks.length;c++)this.tracks[c].startZoom(this.pxPerBp,b-0.5*this.getWidth()/this.pxPerBp,
b+0.5*this.getWidth()/this.pxPerBp);new s(d,this,function(){this.zoomUpdate(0.5,b)},700,0.5)}}},zoomOut:function(a,b,c){if(!this.animation&&(this._unsetPosBeforeZoom(),void 0===c&&(c=1),c=Math.min(c,this.curZoom),0!=c)){this.showWait();var d=this.getPosition();this.trimVertical(d.y);void 0===b&&(b=0.5);a=this.zoomLevels[this.curZoom-c]/this.pxPerBp;var e=this.bpToPx(this.ref.end)-(this.offset+d.x+this.getWidth());b=Math.max(b,1-e*a/(1-a)/this.getWidth());e=d.x+this.offset-this.bpToPx(this.ref.start);
b=Math.min(b,e*a/(1-a)/this.getWidth());var f=this.pxToBp(d.x+this.offset+b*this.getWidth());this.curZoom-=c;this.pxPerBp=this.zoomLevels[this.curZoom];for(c=0;c<this.tracks.length;c++)this.tracks[c].startZoom(this.pxPerBp,f-b*this.getWidth()/this.pxPerBp,f+(1-b)*this.getWidth()/this.pxPerBp);this.minLeft=this.pxPerBp*this.ref.start;new s(a,this,function(){this.zoomUpdate(b,f)},700,b)}},zoomBackOut:function(a){if(!this.animation&&this.isZoomedToBase()){var b=this.posBeforeZoom.min,c=this.posBeforeZoom.max,
d=this.posBeforeZoom.zoomIndex;this.posBeforeZoom=void 0;this.showWait();a=this.zoomLevels[d]/this.pxPerBp;var e=(b+c)/2;this.curZoom=d;this.pxPerBp=this.zoomLevels[d];for(d=0;d<this.tracks.length;d++)this.tracks[d].startZoom(this.pxPerBp,e-0.5*this.getWidth()/this.pxPerBp,e+0.5*this.getWidth()/this.pxPerBp);this.minLeft=this.pxPerBp*this.ref.start;var f=this;new s(a,this,function(){f.setLocation(f.ref,b,c);f.zoomUpdate(0.5,e)},700,0.5)}},isZoomedToBase:function(){return void 0!==this.posBeforeZoom},
_setPosBeforeZoom:function(a,b,c){this.posBeforeZoom={min:a,max:b,zoomIndex:c}},_unsetPosBeforeZoom:function(){this.posBeforeZoom=void 0},zoomUpdate:function(a,b){var c=this.elem.clientWidth,d=this.bpToPx(b)-a*c+c/2;this.stripeWidth=this.stripeWidthForZoom(this.curZoom);this.scrollContainer.style.width=this.stripeCount*this.stripeWidth+"px";this.zoomContainer.style.width=this.stripeCount*this.stripeWidth+"px";this.offset=(Math.round(d/this.stripeWidth)-this.stripeCount/2|0)*this.stripeWidth;this.maxOffset=
this.bpToPx(this.ref.end+1)-this.stripeCount*this.stripeWidth;this.maxLeft=this.bpToPx(this.ref.end+1)-this.getWidth();this.minLeft=this.bpToPx(this.ref.start);this.zoomContainer.style.left="0px";this.setX(d-this.offset-c/2);dojo.forEach(this.uiTracks,function(a){a.clear()});this.trackIterate(function(a){a.endZoom(this.pxPerBp,Math.round(this.stripeWidth/this.pxPerBp))});this.showVisibleBlocks(!0);this.showDone();this.showCoarse()},scrollUpdate:function(){var a=this.getX(),b=this.stripeCount*this.stripeWidth,
c=this.getWidth(),d=(b/2-(c/2+a))/this.stripeWidth|0;0!=d&&(Math.abs(d),b=this.offset-d*this.stripeWidth,this.offset!=b&&(this.offset=b,this.trackIterate(function(a){a.moveBlocks(d)}),a+=d*this.stripeWidth,this.updateStaticElements({x:a}),this.rawSetX(a)))},trackHeightUpdate:function(a,b){var c=this.getY();if(a in this.trackIndices){var d=this.trackIndices[a];1>Math.abs(b-this.trackHeights[d])||(this.trackTops[d]+this.trackHeights[d]-c<this.getHeight()/2&&0<c&&this.setY(c+(b-this.trackHeights[d])),
this.trackHeights[d]=b,this.tracks[d].div.style.height=b+this.config.trackPadding+"px",this.layoutTracks(),this.setY(this.getY()),this.updateStaticElements({height:this.getHeight()}))}},showVisibleBlocks:function(a,b,c,d){void 0===b&&(b=this.getPosition());void 0===c&&(c=b.x-this.drawMargin*this.getWidth());void 0===d&&(d=b.x+(1+this.drawMargin)*this.getWidth());var e=Math.max(0,c/this.stripeWidth|0),f=Math.min(this.stripeCount-1,d/this.stripeWidth|0),m=Math.round(this.stripeWidth/this.pxPerBp),g=
Math.round(this.pxToBp(e*this.stripeWidth+this.offset)),g=g-1,n=Math.round(this.pxToBp(this.offset)),h=Math.round(this.pxToBp(this.offset+this.stripeCount*this.stripeWidth));this.overviewTrackIterate(function(a,b){a.showRange(0,b.overviewStripes-1,b.ref.start-1,b.overviewStripeBases,b.overviewBox.w/(b.ref.end-b.ref.start))});this.trackIterate(function(a,b){a.showRange(e,f,g,m,b.pxPerBp,n,h)});this.updateStaticElements({height:this.getHeight(),width:this.getWidth(),x:this.getX(),y:this.getY()});this.browser.publish("/jbrowse/v1/n/tracks/redraw")},
showTracks:function(a){a=dojo.filter(a,function(a){return 0==this._getTracks([a.label]).length},this);if(a.length){this.trackDndWidget.insertNodes(!1,a);this.updateTrackList();var b=this;window.setTimeout(function(){b.setY(Infinity)},300)}},replaceTracks:function(a){l.forEach(a,function(a){var b,c;l.forEach(this.trackDndWidget.parent.children,function(d){if(!c){var e=d.track;e&&e.config.label==a.label?(c=1,this.trackDndWidget.delItem(d.id),d&&d.parentNode&&d.parentNode.removeChild(d)):b=d}},this);
this.updateTrackList();this.trackDndWidget.insertNodes(!1,[a],!1,b)},this);a.length&&this.updateTrackList()},hideTracks:function(a){a=dojo.filter(a,function(a){return 0!=this._getTracks([a.label]).length},this);a.length&&(dojo.forEach(a,function(a){this.trackDndWidget.forInItems(function(b,c,d){a.label===b.data.label&&(this.trackDndWidget.delItem(c),(b=dojo.byId(c))&&b.parentNode&&b.parentNode.removeChild(b))},this)},this),this.updateTrackList())},pinTracks:function(a){a=this._getTracks(a);l.forEach(a,
function(a){a.setPinned(!0)});this.updateTrackList();return l.map(a,function(a){return a.name})},unpinTracks:function(a){a=this._getTracks(a);l.forEach(a,function(a){a.setPinned(!1)});this.updateTrackList();return l.map(a,function(a){return a.name})},_getTracks:function(a){var b=[],c={count:a.length};dojo.forEach(a,function(a){c[a]=1});dojo.some(this.tracks,function(a){c[a.name]&&(b.push(a),c.count--);return!c.count},this);return b},renderTrack:function(a){var b=this;if(!a)return null;var c;if(dojo.some(this.tracks,
function(b){return b.name==a.label?(c=b,!0):!1}))return c.div;var d=a.label,e=dojo.create("div",{className:["track",("track_"+a.type).replace(/[^A-Za-z_0-9]/g,"_").toLowerCase(),("track_"+d).replace(/[^A-Za-z_0-9]/g,"_").toLowerCase()].join(" "),id:"track_"+d});e.trackName=d;var f,m,g=dojo.hitch(this,function(){var c=new f({refSeq:this.ref,config:a,changeCallback:dojo.hitch(this,"showVisibleBlocks",!0),trackPadding:this.config.trackPadding,store:m,browser:this.browser});"function"==typeof m.setTrack&&
m.setTrack(c);e.track=c;dojo.connect(e,"onclick",function(a){b.setTrackFocus(c,1)});var g=dojo.hitch(this,"trackHeightUpdate",d);c.setViewInfo(this,g,this.stripeCount,e,this.stripePercent,this.stripeWidth,this.pxPerBp,this.config.trackPadding);c.updateStaticElements({x:this.getX(),y:this.getY(),height:this.getHeight(),width:this.getWidth()});this.updateTrackList()});a.store||console.warn("configuration for track "+a.label+" has no store set",a);this.browser.getStore(a.store,function(a){m=a;f&&m&&
g()});require([a.type],function(a){(f=a)&&m&&g()});return e},setTrackFocus:function(a,b){if(1===b){if(null!==this.focusTrack){if(this.focusTrack==a)return;this.browser.publish("/jbrowse/v1/n/tracks/unfocus",this.focusTrack);this.focusTrack=null}this.focusTrack=a;this.browser.publish("/jbrowse/v1/n/tracks/focus",a)}0===b&&null!==this.focusTrack&&(this.browser.publish("/jbrowse/v1/n/tracks/unfocus",this.focusTrack),this.focusTrack=null)},trackIterate:function(a){var b;for(b=0;b<this.uiTracks.length;b++)a.call(this,
this.uiTracks[b],this);for(b=0;b<this.tracks.length;b++)a.call(this,this.tracks[b],this)},updateTrackList:function(){var a=[],b=dojo.toJson(this.trackIndices||{}),c=this.trackContainer.firstChild;do c.track&&a.push(c.track);while(c=c.nextSibling);a=l.map(a,function(a,b){return[a,b]});a=a.sort(function(a,b){var c=a[0].isPinned()?1:0;return(b[0].isPinned()?1:0)-c||a[1]-b[1]});a=l.map(a,function(a){return a[0]});a[0]&&a[0].isPinned()?(this.pinUnderlay||(this.pinUnderlay=h.create("div",{className:"pin_underlay",
style:"top: "+this.topSpace},this.trackContainer)),this.pinGridlinesTrack||(c=h.create("div",{className:"track",style:"top: 0px; height: 100%"},this.pinUnderlay),this.pinGridlinesTrack=new n({browser:this.browser,refSeq:this.ref}),this.pinGridlinesTrack.setViewInfo(this,function(){},this.stripeCount,c,this.stripePercent,this.stripeWidth,this.pxPerBp,this.config.trackPadding),this.uiTracks.push(this.pinGridlinesTrack))):this.pinUnderlay&&(h.destroy(this.pinUnderlay),delete this.pinUnderlay,this.uiTracks=
l.filter(this.uiTracks,function(a){return a!==this.pinGridlinesTrack},this),delete this.pinGridlinesTrack);c=this.tracks;this.tracks=a;for(var d={},e=Array(this.tracks.length),f=0;f<a.length;f++)d[a[f].name]=f,e[f]=a[f].name in this.trackIndices?this.trackHeights[this.trackIndices[a[f].name]]:0,this.trackIndices[a[f].name]=f;this.trackIndices=d;this.trackHeights=e;l.forEach(c||[],function(a){a.name in d||(g.removeAttribute(a.div,"track"),a.destroy())},this);this.layoutTracks();this.updateScroll();
if(b!=dojo.toJson(this.trackIndices||{}))this.browser.publish("/jbrowse/v1/n/tracks/visibleChanged",[this.visibleTrackNames()]),this.showVisibleBlocks()},layoutTracks:function(){var a=this.topSpace,b=0,c=0,d=!1;l.forEach(this.tracks,function(e,f){b=this.trackTops[f]=a;e.isPinned()?(e.div.style.top=a+"px",d=!0):(e.div.style.top=a-this.y+(d?15:0)+"px",d=!1);e.shown&&(a+=this.trackHeights[f]+this.config.trackPadding,e.isPinned()&&(c=a))},this);c&&this.pinUnderlay&&(this.pinUnderlay.style.height=c+"px");
this.containerHeight=Math.max(a||0,Math.min(this.getY(),b)+this.getHeight());this.scrollContainer.style.height=this.containerHeight+"px"}})})},"dojo/dnd/move":function(){define("../_base/declare ../dom-geometry ../dom-style ./common ./Mover ./Moveable".split(" "),function(k,l,h,g,f,d){g=k("dojo.dnd.move.constrainedMoveable",d,{constraints:function(){},within:!1,constructor:function(d,c){c||(c={});this.constraints=c.constraints;this.within=c.within},onFirstMove:function(d){var c=this.constraintBox=
this.constraints.call(this,d);c.r=c.l+c.w;c.b=c.t+c.h;this.within&&(d=l.getMarginSize(d.node),c.r-=d.w,c.b-=d.h)},onMove:function(d,c){var b=this.constraintBox,a=d.node.style;this.onMoving(d,c);c.l=c.l<b.l?b.l:b.r<c.l?b.r:c.l;c.t=c.t<b.t?b.t:b.b<c.t?b.b:c.t;a.left=c.l+"px";a.top=c.t+"px";this.onMoved(d,c)}});f=k("dojo.dnd.move.boxConstrainedMoveable",g,{box:{},constructor:function(d,c){var b=c&&c.box;this.constraints=function(){return b}}});k=k("dojo.dnd.move.parentConstrainedMoveable",g,{area:"content",
constructor:function(d,c){var b=c&&c.area;this.constraints=function(){var a=this.node.parentNode,c=h.getComputedStyle(a),d=l.getMarginBox(a,c);if("margin"==b)return d;var e=l.getMarginExtents(a,c);d.l+=e.l;d.t+=e.t;d.w-=e.w;d.h-=e.h;if("border"==b)return d;e=l.getBorderExtents(a,c);d.l+=e.l;d.t+=e.t;d.w-=e.w;d.h-=e.h;if("padding"==b)return d;e=l.getPadExtents(a,c);d.l+=e.l;d.t+=e.t;d.w-=e.w;d.h-=e.h;return d}}});return{constrainedMoveable:g,boxConstrainedMoveable:f,parentConstrainedMoveable:k}})},
"dojo/dnd/Source":function(){define("../_base/array ../_base/declare ../_base/kernel ../_base/lang ../dom-class ../dom-geometry ../mouse ../ready ../topic ./common ./Selector ./Manager".split(" "),function(k,l,h,g,f,d,e,c,b,a,m,n){h.isAsync||c(0,function(){require(["dojo/dnd/AutoSource","dojo/dnd/Target"])});var q=l("dojo.dnd.Source",m,{isSource:!0,horizontal:!1,copyOnly:!1,selfCopy:!1,selfAccept:!0,skipForm:!1,withHandles:!1,autoSync:!1,delay:0,accept:["text"],generateText:!0,constructor:function(a,
c){g.mixin(this,g.mixin({},c));var d=this.accept;if(d.length){this.accept={};for(var e=0;e<d.length;++e)this.accept[d[e]]=1}this.mouseDown=this.isDragging=!1;this.targetBox=this.targetAnchor=null;this.before=!0;this._lastY=this._lastX=0;this.sourceState="";this.isSource&&f.add(this.node,"dojoDndSource");this.targetState="";this.accept&&f.add(this.node,"dojoDndTarget");this.horizontal&&f.add(this.node,"dojoDndHorizontal");this.topics=[b.subscribe("/dnd/source/over",g.hitch(this,"onDndSourceOver")),
b.subscribe("/dnd/start",g.hitch(this,"onDndStart")),b.subscribe("/dnd/drop",g.hitch(this,"onDndDrop")),b.subscribe("/dnd/cancel",g.hitch(this,"onDndCancel"))]},checkAcceptance:function(a,b){if(this==a)return!this.copyOnly||this.selfAccept;for(var c=0;c<b.length;++c){for(var d=a.getItem(b[c].id).type,e=!1,f=0;f<d.length;++f)if(d[f]in this.accept){e=!0;break}if(!e)return!1}return!0},copyState:function(a,b){if(a)return!0;2>arguments.length&&(b=this==n.manager().target);if(b){if(this.copyOnly)return this.selfCopy}else return this.copyOnly;
return!1},destroy:function(){q.superclass.destroy.call(this);k.forEach(this.topics,function(a){a.remove()});this.targetAnchor=null},onMouseMove:function(b){if(!(this.isDragging&&"Disabled"==this.targetState)){q.superclass.onMouseMove.call(this,b);var c=n.manager();if(!this.isDragging&&this.mouseDown&&this.isSource&&(Math.abs(b.pageX-this._lastX)>this.delay||Math.abs(b.pageY-this._lastY)>this.delay)){var e=this.getSelectedNodes();e.length&&c.startDrag(this,e,this.copyState(a.getCopyKeyState(b),!0))}if(this.isDragging){e=
!1;if(this.current){if(!this.targetBox||this.targetAnchor!=this.current)this.targetBox=d.position(this.current,!0);e=this.horizontal?b.pageX-this.targetBox.x<this.targetBox.w/2==d.isBodyLtr(this.current.ownerDocument):b.pageY-this.targetBox.y<this.targetBox.h/2}if(this.current!=this.targetAnchor||e!=this.before)this._markTargetAnchor(e),c.canDrop(!this.current||c.source!=this||!(this.current.id in this.selection))}}},onMouseDown:function(b){if(!this.mouseDown&&this._legalMouseDown(b)&&(!this.skipForm||
!a.isFormElement(b)))this.mouseDown=!0,this._lastX=b.pageX,this._lastY=b.pageY,q.superclass.onMouseDown.call(this,b)},onMouseUp:function(a){this.mouseDown&&(this.mouseDown=!1,q.superclass.onMouseUp.call(this,a))},onDndSourceOver:function(a){this!==a?(this.mouseDown=!1,this.targetAnchor&&this._unmarkTargetAnchor()):this.isDragging&&(a=n.manager(),a.canDrop("Disabled"!=this.targetState&&(!this.current||a.source!=this||!(this.current.id in this.selection))))},onDndStart:function(a,b,c){this.autoSync&&
this.sync();this.isSource&&this._changeState("Source",this==a?c?"Copied":"Moved":"");b=this.accept&&this.checkAcceptance(a,b);this._changeState("Target",b?"":"Disabled");this==a&&n.manager().overSource(this);this.isDragging=!0},onDndDrop:function(a,b,c,d){if(this==d)this.onDrop(a,b,c);this.onDndCancel()},onDndCancel:function(){this.targetAnchor&&(this._unmarkTargetAnchor(),this.targetAnchor=null);this.before=!0;this.mouseDown=this.isDragging=!1;this._changeState("Source","");this._changeState("Target",
"")},onDrop:function(a,b,c){if(this!=a)this.onDropExternal(a,b,c);else this.onDropInternal(b,c)},onDropExternal:function(b,c,d){var e=this._normalizedCreator;this._normalizedCreator=this.creator?function(a,c){return e.call(this,b.getItem(a.id).data,c)}:d?function(c){var d=b.getItem(c.id);c=c.cloneNode(!0);c.id=a.getUniqueId();return{node:c,data:d.data,type:d.type}}:function(a){var c=b.getItem(a.id);b.delItem(a.id);return{node:a,data:c.data,type:c.type}};this.selectNone();!d&&!this.creator&&b.selectNone();
this.insertNodes(!0,c,this.before,this.current);!d&&this.creator&&b.deleteSelectedNodes();this._normalizedCreator=e},onDropInternal:function(b,c){var d=this._normalizedCreator;if(!(this.current&&this.current.id in this.selection)){if(c)this._normalizedCreator=this.creator?function(a,b){return d.call(this,this.getItem(a.id).data,b)}:function(b){var c=this.getItem(b.id);b=b.cloneNode(!0);b.id=a.getUniqueId();return{node:b,data:c.data,type:c.type}};else{if(!this.current)return;this._normalizedCreator=
function(a){var b=this.getItem(a.id);return{node:a,data:b.data,type:b.type}}}this._removeSelection();this.insertNodes(!0,b,this.before,this.current);this._normalizedCreator=d}},onDraggingOver:function(){},onDraggingOut:function(){},onOverEvent:function(){q.superclass.onOverEvent.call(this);n.manager().overSource(this);if(this.isDragging&&"Disabled"!=this.targetState)this.onDraggingOver()},onOutEvent:function(){q.superclass.onOutEvent.call(this);n.manager().outSource(this);if(this.isDragging&&"Disabled"!=
this.targetState)this.onDraggingOut()},_markTargetAnchor:function(a){this.current==this.targetAnchor&&this.before==a||(this.targetAnchor&&this._removeItemClass(this.targetAnchor,this.before?"Before":"After"),this.targetAnchor=this.current,this.targetBox=null,this.before=a,this.targetAnchor&&this._addItemClass(this.targetAnchor,this.before?"Before":"After"))},_unmarkTargetAnchor:function(){this.targetAnchor&&(this._removeItemClass(this.targetAnchor,this.before?"Before":"After"),this.targetBox=this.targetAnchor=
null,this.before=!0)},_markDndStatus:function(a){this._changeState("Source",a?"Copied":"Moved")},_legalMouseDown:function(a){if("touchstart"!=a.type&&!e.isLeft(a))return!1;if(!this.withHandles)return!0;for(a=a.target;a&&a!==this.node;a=a.parentNode){if(f.contains(a,"dojoDndHandle"))return!0;if(f.contains(a,"dojoDndItem")||f.contains(a,"dojoDndIgnore"))break}return!1}});return q})},"dojo/dnd/Selector":function(){define("../_base/array ../_base/declare ../_base/kernel ../_base/lang ../dom ../dom-construct ../mouse ../_base/NodeList ../on ../touch ./common ./Container".split(" "),
function(k,l,h,g,f,d,e,c,b,a,m,n){var q=l("dojo.dnd.Selector",n,{constructor:function(c,d){d||(d={});this.singular=d.singular;this.autoSync=d.autoSync;this.selection={};this.anchor=null;this.simpleSelection=!1;this.events.push(b(this.node,a.press,g.hitch(this,"onMouseDown")),b(this.node,a.release,g.hitch(this,"onMouseUp")))},singular:!1,getSelectedNodes:function(){var a=new c,b=m._empty,d;for(d in this.selection)d in b||a.push(f.byId(d));return a},selectNone:function(){return this._removeSelection()._removeAnchor()},
selectAll:function(){this.forInItems(function(a,b){this._addItemClass(f.byId(b),"Selected");this.selection[b]=1},this);return this._removeAnchor()},deleteSelectedNodes:function(){var a=m._empty,b;for(b in this.selection)if(!(b in a)){var c=f.byId(b);this.delItem(b);d.destroy(c)}this.anchor=null;this.selection={};return this},forInSelectedItems:function(a,b){b=b||h.global;var c=this.selection,d=m._empty,e;for(e in c)e in d||a.call(b,this.getItem(e),e,this)},sync:function(){q.superclass.sync.call(this);
this.anchor&&!this.getItem(this.anchor.id)&&(this.anchor=null);var a=[],b=m._empty,c;for(c in this.selection)c in b||this.getItem(c)||a.push(c);k.forEach(a,function(a){delete this.selection[a]},this);return this},insertNodes:function(a,b,c,d){var e=this._normalizedCreator;this._normalizedCreator=function(b,c){var d=e.call(this,b,c);a?(this.anchor?this.anchor!=d.node&&(this._removeItemClass(d.node,"Anchor"),this._addItemClass(d.node,"Selected")):(this.anchor=d.node,this._removeItemClass(d.node,"Selected"),
this._addItemClass(this.anchor,"Anchor")),this.selection[d.node.id]=1):(this._removeItemClass(d.node,"Selected"),this._removeItemClass(d.node,"Anchor"));return d};q.superclass.insertNodes.call(this,b,c,d);this._normalizedCreator=e;return this},destroy:function(){q.superclass.destroy.call(this);this.selection=this.anchor=null},onMouseDown:function(a){this.autoSync&&this.sync();if(this.current)if(!this.singular&&!m.getCopyKeyState(a)&&!a.shiftKey&&this.current.id in this.selection)this.simpleSelection=
!0,e.isLeft(a)&&(a.stopPropagation(),a.preventDefault());else{if(!this.singular&&a.shiftKey){m.getCopyKeyState(a)||this._removeSelection();var b=this.getAllNodes();if(b.length&&(this.anchor||(this.anchor=b[0],this._addItemClass(this.anchor,"Anchor")),this.selection[this.anchor.id]=1,this.anchor!=this.current)){for(var c=0,d;c<b.length&&!(d=b[c],d==this.anchor||d==this.current);++c);for(++c;c<b.length;++c){d=b[c];if(d==this.anchor||d==this.current)break;this._addItemClass(d,"Selected");this.selection[d.id]=
1}this._addItemClass(this.current,"Selected");this.selection[this.current.id]=1}}else this.singular?this.anchor==this.current?m.getCopyKeyState(a)&&this.selectNone():(this.selectNone(),this.anchor=this.current,this._addItemClass(this.anchor,"Anchor"),this.selection[this.current.id]=1):m.getCopyKeyState(a)?this.anchor==this.current?(delete this.selection[this.anchor.id],this._removeAnchor()):this.current.id in this.selection?(this._removeItemClass(this.current,"Selected"),delete this.selection[this.current.id]):
(this.anchor&&(this._removeItemClass(this.anchor,"Anchor"),this._addItemClass(this.anchor,"Selected")),this.anchor=this.current,this._addItemClass(this.current,"Anchor"),this.selection[this.current.id]=1):this.current.id in this.selection||(this.selectNone(),this.anchor=this.current,this._addItemClass(this.current,"Anchor"),this.selection[this.current.id]=1);a.stopPropagation();a.preventDefault()}},onMouseUp:function(){this.simpleSelection&&(this.simpleSelection=!1,this.selectNone(),this.current&&
(this.anchor=this.current,this._addItemClass(this.anchor,"Anchor"),this.selection[this.current.id]=1))},onMouseMove:function(){this.simpleSelection=!1},onOverEvent:function(){this.onmousemoveEvent=b(this.node,a.move,g.hitch(this,"onMouseMove"))},onOutEvent:function(){this.onmousemoveEvent&&(this.onmousemoveEvent.remove(),delete this.onmousemoveEvent)},_removeSelection:function(){var a=m._empty,b;for(b in this.selection)if(!(b in a)){var c=f.byId(b);c&&this._removeItemClass(c,"Selected")}this.selection=
{};return this},_removeAnchor:function(){this.anchor&&(this._removeItemClass(this.anchor,"Anchor"),this.anchor=null);return this}});return q})},"dojo/_base/NodeList":function(){define(["./kernel","../query","./array","./html","../NodeList-dom"],function(k,l,h){l=l.NodeList;var g=l.prototype;g.connect=l._adaptAsForEach(function(){return k.connect.apply(this,arguments)});g.coords=l._adaptAsMap(k.coords);l.events="blur focus change click error keydown keypress keyup load mousedown mouseenter mouseleave mousemove mouseout mouseover mouseup submit".split(" ");
h.forEach(l.events,function(f){var d="on"+f;g[d]=function(e,c){return this.connect(d,e,c)}});return k.NodeList=l})},"dojo/_base/html":function(){define("./kernel ../dom ../dom-style ../dom-attr ../dom-prop ../dom-class ../dom-construct ../dom-geometry".split(" "),function(k,l,h,g,f,d,e,c){k.byId=l.byId;k.isDescendant=l.isDescendant;k.setSelectable=l.setSelectable;k.getAttr=g.get;k.setAttr=g.set;k.hasAttr=g.has;k.removeAttr=g.remove;k.getNodeProp=g.getNodeProp;k.attr=function(b,a,c){return 2==arguments.length?
g["string"==typeof a?"get":"set"](b,a):g.set(b,a,c)};k.hasClass=d.contains;k.addClass=d.add;k.removeClass=d.remove;k.toggleClass=d.toggle;k.replaceClass=d.replace;k._toDom=k.toDom=e.toDom;k.place=e.place;k.create=e.create;k.empty=function(b){e.empty(b)};k._destroyElement=k.destroy=function(b){e.destroy(b)};k._getPadExtents=k.getPadExtents=c.getPadExtents;k._getBorderExtents=k.getBorderExtents=c.getBorderExtents;k._getPadBorderExtents=k.getPadBorderExtents=c.getPadBorderExtents;k._getMarginExtents=
k.getMarginExtents=c.getMarginExtents;k._getMarginSize=k.getMarginSize=c.getMarginSize;k._getMarginBox=k.getMarginBox=c.getMarginBox;k.setMarginBox=c.setMarginBox;k._getContentBox=k.getContentBox=c.getContentBox;k.setContentSize=c.setContentSize;k._isBodyLtr=k.isBodyLtr=c.isBodyLtr;k._docScroll=k.docScroll=c.docScroll;k._getIeDocumentElementOffset=k.getIeDocumentElementOffset=c.getIeDocumentElementOffset;k._fixIeBiDiScrollLeft=k.fixIeBiDiScrollLeft=c.fixIeBiDiScrollLeft;k.position=c.position;k.marginBox=
function(b,a){return a?c.setMarginBox(b,a):c.getMarginBox(b)};k.contentBox=function(b,a){return a?c.setContentSize(b,a):c.getContentBox(b)};k.coords=function(b,a){k.deprecated("dojo.coords()","Use dojo.position() or dojo.marginBox().");b=l.byId(b);var d=h.getComputedStyle(b),d=c.getMarginBox(b,d),e=c.position(b,a);d.x=e.x;d.y=e.y;return d};k.getProp=f.get;k.setProp=f.set;k.prop=function(b,a,c){return 2==arguments.length?f["string"==typeof a?"get":"set"](b,a):f.set(b,a,c)};k.getStyle=h.get;k.setStyle=
h.set;k.getComputedStyle=h.getComputedStyle;k.__toPixelValue=k.toPixelValue=h.toPixelValue;k.style=function(b,a,c){switch(arguments.length){case 1:return h.get(b);case 2:return h["string"==typeof a?"get":"set"](b,a)}return h.set(b,a,c)};return k})},"dojo/dnd/Container":function(){define("../_base/array ../_base/declare ../_base/kernel ../_base/lang ../_base/window ../dom ../dom-class ../dom-construct ../Evented ../has ../on ../query ../touch ./common".split(" "),function(k,l,h,g,f,d,e,c,b,a,m,n,q,
s){l=l("dojo.dnd.Container",b,{skipForm:!1,allowNested:!1,constructor:function(a,b){this.node=d.byId(a);b||(b={});this.creator=b.creator||null;this.skipForm=b.skipForm;this.parent=b.dropParent&&d.byId(b.dropParent);this.map={};this.current=null;this.containerState="";e.add(this.node,"dojoDndContainer");(!b||!b._skipStartup)&&this.startup();this.events=[m(this.node,q.over,g.hitch(this,"onMouseOver")),m(this.node,q.out,g.hitch(this,"onMouseOut")),m(this.node,"dragstart",g.hitch(this,"onSelectStart")),
m(this.node,"selectstart",g.hitch(this,"onSelectStart"))]},creator:function(){},getItem:function(a){return this.map[a]},setItem:function(a,b){this.map[a]=b},delItem:function(a){delete this.map[a]},forInItems:function(a,b){b=b||h.global;var c=this.map,d=s._empty,e;for(e in c)e in d||a.call(b,c[e],e,this);return b},clearItems:function(){this.map={}},getAllNodes:function(){return n((this.allowNested?"":"\x3e ")+".dojoDndItem",this.parent)},sync:function(){var a={};this.getAllNodes().forEach(function(b){if(b.id){var c=
this.getItem(b.id);if(c){a[b.id]=c;return}}else b.id=s.getUniqueId();var c=b.getAttribute("dndType"),d=b.getAttribute("dndData");a[b.id]={data:d||b.innerHTML,type:c?c.split(/\s*,\s*/):["text"]}},this);this.map=a;return this},insertNodes:function(a,b,c){this.parent.firstChild?b?c||(c=this.parent.firstChild):c&&(c=c.nextSibling):c=null;var d;if(c)for(b=0;b<a.length;++b)d=this._normalizedCreator(a[b]),this.setItem(d.node.id,{data:d.data,type:d.type}),c.parentNode.insertBefore(d.node,c);else for(b=0;b<
a.length;++b)d=this._normalizedCreator(a[b]),this.setItem(d.node.id,{data:d.data,type:d.type}),this.parent.appendChild(d.node);return this},destroy:function(){k.forEach(this.events,function(a){a.remove()});this.clearItems();this.node=this.parent=this.current=null},markupFactory:function(a,b,c){a._skipStartup=!0;return new c(b,a)},startup:function(){if(!this.parent&&(this.parent=this.node,"table"==this.parent.tagName.toLowerCase())){var a=this.parent.getElementsByTagName("tbody");a&&a.length&&(this.parent=
a[0])}this.defaultCreator=s._defaultCreator(this.parent);this.sync()},onMouseOver:function(a){for(var b=a.relatedTarget;b&&b!=this.node;)try{b=b.parentNode}catch(c){b=null}b||(this._changeState("Container","Over"),this.onOverEvent());b=this._getChildByEvent(a);this.current!=b&&(this.current&&this._removeItemClass(this.current,"Over"),b&&this._addItemClass(b,"Over"),this.current=b)},onMouseOut:function(a){for(a=a.relatedTarget;a;){if(a==this.node)return;try{a=a.parentNode}catch(b){a=null}}this.current&&
(this._removeItemClass(this.current,"Over"),this.current=null);this._changeState("Container","");this.onOutEvent()},onSelectStart:function(a){if(!this.skipForm||!s.isFormElement(a))a.stopPropagation(),a.preventDefault()},onOverEvent:function(){},onOutEvent:function(){},_changeState:function(a,b){var c="dojoDnd"+a,d=a.toLowerCase()+"State";e.replace(this.node,c+b,c+this[d]);this[d]=b},_addItemClass:function(a,b){e.add(a,"dojoDndItem"+b)},_removeItemClass:function(a,b){e.remove(a,"dojoDndItem"+b)},
_getChildByEvent:function(a){if(a=a.target)for(var b=a.parentNode;b;a=b,b=a.parentNode)if((b==this.parent||this.allowNested)&&e.contains(a,"dojoDndItem"))return a;return null},_normalizedCreator:function(a,b){var c=(this.creator||this.defaultCreator).call(this,a,b);g.isArray(c.type)||(c.type=["text"]);c.node.id||(c.node.id=s.getUniqueId());e.add(c.node,"dojoDndItem");return c}});s._createNode=function(a){return!a?s._createSpan:function(b){return c.create(a,{innerHTML:b})}};s._createTrTd=function(a){var b=
c.create("tr");c.create("td",{innerHTML:a},b);return b};s._createSpan=function(a){return c.create("span",{innerHTML:a})};s._defaultCreatorNodes={ul:"li",ol:"li",div:"div",p:"div"};s._defaultCreator=function(a){a=a.tagName.toLowerCase();var b="tbody"==a||"thead"==a?s._createTrTd:s._createNode(s._defaultCreatorNodes[a]);return function(a,c){var d=a&&g.isObject(a),e,f;d&&a.tagName&&a.nodeType&&a.getAttribute?(e=a.getAttribute("dndData")||a.innerHTML,d=(d=a.getAttribute("dndType"))?d.split(/\s*,\s*/):
["text"],f=a):(e=d&&a.data?a.data:a,d=d&&a.type?a.type:["text"],f=("avatar"==c?s._createSpan:b)(String(e)));f.id||(f.id=s.getUniqueId());return{node:f,data:e,type:d}}};return l})},"dojo/dnd/Manager":function(){define("../_base/array ../_base/declare ../_base/lang ../_base/window ../dom-class ../Evented ../has ../keys ../on ../topic ../touch ./common ./autoscroll ./Avatar".split(" "),function(k,l,h,g,f,d,e,c,b,a,m,n,q,s){var r=l("dojo.dnd.Manager",[d],{constructor:function(){this.source=this.avatar=
null;this.nodes=[];this.copy=!0;this.target=null;this.canDropFlag=!1;this.events=[]},OFFSET_X:e("touch")?0:16,OFFSET_Y:e("touch")?-64:16,overSource:function(b){this.avatar&&(this.target=b&&"Disabled"!=b.targetState?b:null,this.canDropFlag=Boolean(this.target),this.avatar.update());a.publish("/dnd/source/over",b)},outSource:function(b){this.avatar?this.target==b&&(this.target=null,this.canDropFlag=!1,this.avatar.update(),a.publish("/dnd/source/over",null)):a.publish("/dnd/source/over",null)},startDrag:function(c,
d,e){function n(a){a.preventDefault();a.stopPropagation()}q.autoScrollStart(g.doc);this.source=c;this.nodes=d;this.copy=Boolean(e);this.avatar=this.makeAvatar();g.body().appendChild(this.avatar.node);a.publish("/dnd/start",c,d,this.copy);this.events=[b(g.doc,m.move,h.hitch(this,"onMouseMove")),b(g.doc,m.release,h.hitch(this,"onMouseUp")),b(g.doc,"keydown",h.hitch(this,"onKeyDown")),b(g.doc,"keyup",h.hitch(this,"onKeyUp")),b(g.doc,"dragstart",n),b(g.body(),"selectstart",n)];f.add(g.body(),"dojoDnd"+
(e?"Copy":"Move"))},canDrop:function(a){a=Boolean(this.target&&a);this.canDropFlag!=a&&(this.canDropFlag=a,this.avatar.update())},stopDrag:function(){f.remove(g.body(),["dojoDndCopy","dojoDndMove"]);k.forEach(this.events,function(a){a.remove()});this.events=[];this.avatar.destroy();this.source=this.target=this.avatar=null;this.nodes=[]},makeAvatar:function(){return new s(this)},updateAvatar:function(){this.avatar.update()},onMouseMove:function(a){var b=this.avatar;b&&(q.autoScrollNodes(a),b=b.node.style,
b.left=a.pageX+this.OFFSET_X+"px",b.top=a.pageY+this.OFFSET_Y+"px",b=Boolean(this.source.copyState(n.getCopyKeyState(a))),this.copy!=b&&this._setCopyStatus(b));e("touch")&&a.preventDefault()},onMouseUp:function(b){if(this.avatar){if(this.target&&this.canDropFlag){var c=Boolean(this.source.copyState(n.getCopyKeyState(b)));a.publish("/dnd/drop/before",this.source,this.nodes,c,this.target,b);a.publish("/dnd/drop",this.source,this.nodes,c,this.target,b)}else a.publish("/dnd/cancel");this.stopDrag()}},
onKeyDown:function(b){if(this.avatar)switch(b.keyCode){case c.CTRL:b=Boolean(this.source.copyState(!0));this.copy!=b&&this._setCopyStatus(b);break;case c.ESCAPE:a.publish("/dnd/cancel"),this.stopDrag()}},onKeyUp:function(a){this.avatar&&a.keyCode==c.CTRL&&(a=Boolean(this.source.copyState(!1)),this.copy!=a&&this._setCopyStatus(a))},_setCopyStatus:function(a){this.copy=a;this.source._markDndStatus(this.copy);this.updateAvatar();f.replace(g.body(),"dojoDnd"+(this.copy?"Copy":"Move"),"dojoDnd"+(this.copy?
"Move":"Copy"))}});n._manager=null;r.manager=n.manager=function(){n._manager||(n._manager=new r);return n._manager};return r})},"dojo/dnd/Avatar":function(){define("../_base/declare ../_base/window ../dom ../dom-attr ../dom-class ../dom-construct ../hccss ../query".split(" "),function(k,l,h,g,f,d,e,c){return k("dojo.dnd.Avatar",null,{constructor:function(b){this.manager=b;this.construct()},construct:function(){var b=d.create("table",{"class":"dojoDndAvatar",style:{position:"absolute",zIndex:"1999",
margin:"0px"}}),a=this.manager.source,c,f=d.create("tbody",null,b),h=d.create("tr",null,f),k=d.create("td",null,h),r=Math.min(5,this.manager.nodes.length),l=0;e("highcontrast")&&d.create("span",{id:"a11yIcon",innerHTML:this.manager.copy?"+":"\x3c"},k);d.create("span",{innerHTML:a.generateText?this._generateText():""},k);for(g.set(h,{"class":"dojoDndAvatarHeader",style:{opacity:0.9}});l<r;++l)a.creator?c=a._normalizedCreator(a.getItem(this.manager.nodes[l].id).data,"avatar").node:(c=this.manager.nodes[l].cloneNode(!0),
"tr"==c.tagName.toLowerCase()&&(h=d.create("table"),d.create("tbody",null,h).appendChild(c),c=h)),c.id="",h=d.create("tr",null,f),k=d.create("td",null,h),k.appendChild(c),g.set(h,{"class":"dojoDndAvatarItem",style:{opacity:(9-l)/10}});this.node=b},destroy:function(){d.destroy(this.node);this.node=!1},update:function(){f.toggle(this.node,"dojoDndAvatarCanDrop",this.manager.canDropFlag);if(e("highcontrast")){var b=h.byId("a11yIcon"),a="+";this.manager.canDropFlag&&!this.manager.copy?a="\x3c ":!this.manager.canDropFlag&&
!this.manager.copy?a="o":this.manager.canDropFlag||(a="x");b.innerHTML=a}c("tr.dojoDndAvatarHeader td span"+(e("highcontrast")?" span":""),this.node).forEach(function(a){a.innerHTML=this.manager.source.generateText?this._generateText():""},this)},_generateText:function(){return this.manager.nodes.length.toString()}})})},"JBrowse/Component":function(){define(["dojo/_base/declare","dojo/_base/lang","JBrowse/Util"],function(k,l,h){return k(null,{constructor:function(g){g=g||{};this._finalizeConfig(g.config);
this.browser=g.browser;if(!this.browser)throw"a reference to the main browser is required by this constructor";this.compiledConfig={}},_finalizeConfig:function(g){this.config=this._mergeConfigs(dojo.clone(this._defaultConfig()),g||{})},_defaultConfig:function(){return{baseUrl:"/"}},resolveUrl:function(g,f){f=f||{};return h.resolveUrl(this.getConf("baseUrl",[]),this.fillTemplate(g,f))},_mergeConfigs:function(g,f){if(null===f)return null;null===g&&(g={});for(var d in f)if(d in g&&"object"==typeof f[d]&&
"object"==typeof g[d])g[d]=this._mergeConfigs(g[d],f[d]);else if("undefined"==typeof g[d]||"undefined"!=typeof f[d])g[d]=f[d];return g},_compileConfigurationPath:function(g){var f=this.config;for("string"==typeof g&&(g=g.split("."));g.length&&f;)f=f[g.shift()];return g.length?function(){return null}:"function"==typeof f?f:function(){return f}},getConf:function(g,f){var d=this.compiledConfig[g];d||(d=this.compiledConfig[g]=this._compileConfigurationPath(g));return f?d.apply(this,f):d.call(this)},fillTemplate:function(g,
f){if("string"!=typeof g||-1==g.indexOf("{"))return g;var d={refseq:(this.refSeq||{}).name||(this.ref||{}).name||this.ref||""};d.refSeq=d.refseq;d.refSeq&&(d.refSeqNum=(/\d+/.exec(d.refSeq)||[])[0]||"");d.refSeqNum&&(d.refSeqNumNoLeadingZeroes=(/^0*(\d+)/.exec(d.refSeqNum)||[])[1]||"");f&&l.mixin(d,f);return h.fillTemplate(g,d)}})})},"JBrowse/View/Track/LocationScale":function(){define(["dojo/_base/declare","dojo/dom-construct","JBrowse/View/Track/BlockBased","JBrowse/Util"],function(k,l,h,g){return k(h,
{constructor:function(f){this.loaded=!0;this.labelClass=f.labelClass;this.posHeight=f.posHeight;this.height=Math.round(1.2*f.posHeight)},makeTrackLabel:function(){},makeTrackMenu:function(){},fillBlock:function(f){var d=f.blockIndex,e=f.block,c=f.leftBase,b=f.scale,a=this.chooseLabel(f),c=(c+1-a)*b/10,b=document.createElement("div"),a=g.addCommas(a);b.className=this.labelClass;b.style.left="-"+Number(a.length)/1.7+c+"ex";b.appendChild(document.createTextNode(a));e.domNode.appendChild(b);(e=this.browser.getHighlight())&&
e.ref==this.refSeq.name&&this.renderRegionHighlight(f,e);(e=this.browser.getBookmarks())&&this.renderRegionBookmark(f,e,this.refSeq.name,!0);this.heightUpdate(Math.round(1.2*this.posHeight),d);f.finishCallback()},chooseLabel:function(f){var d=f.leftBase+1;f=f.scale;for(var e=1E6;0<e;e/=10)if(3>=d%e*f)return d-d%e;return d}})})},"JBrowse/View/Track/BlockBased":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/json dojo/aspect dojo/dom-construct dojo/dom-geometry dojo/dom-class dojo/dom-style dojo/query dojo/on dojo/when dijit/Destroyable JBrowse/View/InfoDialog dijit/Dialog dijit/Menu dijit/PopupMenuItem dijit/MenuItem dijit/CheckedMenuItem dijit/MenuSeparator JBrowse/Util JBrowse/Component JBrowse/FeatureFiltererMixin JBrowse/Errors JBrowse/Model/Location JBrowse/View/TrackConfigEditor JBrowse/View/ConfirmDialog JBrowse/View/Track/BlockBased/Block JBrowse/View/DetailsMixin".split(" "),
function(k,l,h,g,f,d,e,c,b,a,m,n,q,s,r,p,t,u,v,x,w,y,z,A,D,C,B,I,M){return k([y,M,z,q],{constructor:function(a){a=a||{};this.refSeq=a.refSeq;this.name=a.label||this.config.label;this.key=a.key||this.config.key||this.name;this._changedCallback=a.changeCallback||function(){};this.height=0;this.shown=!0;this.empty=!1;this.browser=a.browser;this.setFeatureFilterParentComponent(this.browser.view);this.store=a.store;l.mixin(this.config.style,this.getUserStyles())},updateUserStyles:function(a){l.mixin(this.config.style,
a);var b=g.parse(this.browser.cookie("track-style-"+this.name)||"{}");l.mixin(b,a);this.browser.cookie("track-style-"+this.name,b);this.redraw()},getUserStyles:function(){return g.parse(this.browser.cookie("track-style-"+this.name)||"{}")},_defaultConfig:function(){return{maxFeatureSizeForUnderlyingRefSeq:25E4}},heightUpdate:function(b,c){this.shown?(void 0!==c&&(this.blockHeights[c]=b),this.height=Math.max(this.height,b),this.inShowRange||(this.heightUpdateCallback(Math.max(this.labelHeight,this.height)),
a(".height_overflow_message",this.div).style("top",this.height-16+"px"))):this.heightUpdateCallback(0)},setViewInfo:function(a,b,c,d,e,f,m){this.genomeView=a;this.heightUpdateCallback=b;this.div=d;this.widthPct=e;this.widthPx=f;this.leftBlank=document.createElement("div");this.leftBlank.className="blank-block";this.rightBlank=document.createElement("div");this.rightBlank.className="blank-block";this.div.appendChild(this.rightBlank);this.div.appendChild(this.leftBlank);this.sizeInit(c,e);this.labelHTML=
"";this.labelHeight=0;this.config.pinned&&this.setPinned(!0);this.label||this.makeTrackLabel();this.setLabel(this.key)},makeTrackLabel:function(){var a=dojo.create("div",{className:"track-label dojoDndHandle",id:"label_"+this.name,style:{position:"absolute"}},this.div);this.label=a;if((this.config.style||{}).trackLabelCss)a.style.cssText+=";"+this.config.style.trackLabelCss;var b=dojo.create("div",{className:"track-close-button"},a);this.own(m(b,"click",dojo.hitch(this,function(a){this.browser.view.suppressDoubleClick(100);
this.browser.publish("/jbrowse/v1/v/tracks/hide",[this.config]);a.stopPropagation()})));dojo.create("span",{className:"track-label-text"},a);a=dojo.create("div",{className:"track-menu-button"},a);dojo.create("div",{},a);this.labelMenuButton=a;this.makeTrackMenu()},hide:function(){this.shown&&(this.div.style.display="none",this.shown=!1)},show:function(){this.shown||(this.div.style.display="block",this.shown=!0)},initBlocks:function(){this.blocks=Array(this.numBlocks);this.blockHeights=Array(this.numBlocks);
for(var a=0;a<this.numBlocks;a++)this.blockHeights[a]=0;this.lastAttached=this.firstAttached=null;this._adjustBlanks()},clear:function(){if(this.blocks)for(var a=0;a<this.numBlocks;a++)this._hideBlock(a);this.initBlocks();this.makeTrackMenu()},setLabel:function(b){void 0===this.label||this.labelHTML==b||(this.labelHTML=b,a(".track-label-text",this.label).forEach(function(a){a.innerHTML=b}),this.labelHeight=this.label.offsetHeight)},transfer:function(){},startZoom:function(a,b,c){},endZoom:function(a,
b){},showRange:function(a,b,c,d,e,f,m){if(this.fatalError)this.showFatalError(this.fatalError);else if(void 0!==this.blocks&&this.blocks.length){0==this.labelHeight&&this.label&&(this.labelHeight=this.label.offsetHeight);this.inShowRange=!0;this.height=this.labelHeight;var g=null==this.firstAttached?b+1:this.firstAttached,n=null==this.lastAttached?a-1:this.lastAttached,h,k;for(h=n;h>=a;h--)k=c+d*(h-a),this._showBlock(h,k,k+d,e,f,m);for(h=n+1;h<=b;h++)k=c+d*(h-a),this._showBlock(h,k,k+d,e,f,m);c=this.blocks[a];
for(h=g;h<a;h++)this.transfer(this.blocks[h],c,e,f,m),this.cleanupBlock(this.blocks[h]),this._hideBlock(h);c=this.blocks[b];for(h=n;h>b;h--)this.transfer(this.blocks[h],c,e,f,m),this.cleanupBlock(this.blocks[h]),this._hideBlock(h);this.firstAttached=a;this.lastAttached=b;this._adjustBlanks();this.inShowRange=!1;this.heightUpdate(this.height);this.updateStaticElements(this.genomeView.getPosition())}},cleanupBlock:function(a){a&&a.destroy()},destroy:function(){h.forEach(this.blocks||[],function(a){this.cleanupBlock(a)},
this);delete this.blocks;delete this.div;this.inherited(arguments)},_hideBlock:function(a){this.blocks[a]&&(this.div.removeChild(this.blocks[a].domNode),this.cleanupBlock(this.blocks[a]),this.blocks[a]=void 0,this.blockHeights[a]=0)},_adjustBlanks:function(){null===this.firstAttached||null===this.lastAttached?(this.leftBlank.style.left="0px",this.leftBlank.style.width="50%",this.rightBlank.style.left="50%",this.rightBlank.style.width="50%"):(this.leftBlank.style.width=this.firstAttached*this.widthPct+
"%",this.rightBlank.style.left=(this.lastAttached+1)*this.widthPct+"%",this.rightBlank.style.width=(this.numBlocks-this.lastAttached-1)*this.widthPct+"%")},hideAll:function(){if(null!=this.firstAttached){for(var a=this.firstAttached;a<=this.lastAttached;a++)this._hideBlock(a);this.lastAttached=this.firstAttached=null;this._adjustBlanks()}},hideRegion:function(a){if(null!=this.firstAttached){for(var b=this.firstAttached;b<=this.lastAttached;b++)this.blocks[b]&&(a.ref==this.refSeq.name&&!(this.blocks[b].leftBase>
a.end||this.blocks[b].rightBase<a.start))&&this._hideBlock(b);this._adjustBlanks()}},changed:function(){this.hideAll();this._changedCallback&&this._changedCallback()},_makeLoadingMessage:function(){var a=dojo.create("div",{className:"loading",innerHTML:'\x3cdiv class\x3d"text"\x3eLoading\x3c/span\x3e',title:"Loading data...",style:{visibility:"hidden"}});window.setTimeout(function(){a.style.visibility="visible"},200);return a},showFatalError:function(b){a(".block",this.div).concat(a(".blank-block",
this.div)).concat(a(".error",this.div)).orphan();this.blocks=[];this.blockHeights=[];this.fatalErrorMessageElement=this._renderErrorMessage(b||this.fatalError,this.div);this.heightUpdate(e.position(this.fatalErrorMessageElement).h);this.updateStaticElements(this.genomeView.getPosition())},_handleError:function(a,b){var c=dojo.mixin({},a);dojo.mixin(c,b);var d="object"==typeof a;d&&a instanceof A.TimeOut&&c.block?this.fillBlockTimeout(c.blockIndex,c.block,a):d&&a instanceof A.DataOverflow?c.block?
this.fillTooManyFeaturesMessage(c.blockIndex,c.block,b.scale,a):h.forEach(this.blocks,function(c,d){c&&this.fillTooManyFeaturesMessage(d,c,b.scale,a)},this):(console.error(a.stack||""+a,a),this.fatalError=a,this.showFatalError(a))},fillBlockError:function(a,b,c){c=c||this.fatalError||this.error;d.empty(b.domNode);b=this._renderErrorMessage(c,b.domNode);this.heightUpdate(dojo.position(b).h,a)},_renderErrorMessage:function(a,b){return d.create("div",{className:"error",innerHTML:'\x3ch2\x3eError\x3c/h2\x3e\x3cdiv class\x3d"text"\x3eAn error was encountered when displaying this track.\x3c/div\x3e'+
(a?'\x3cdiv class\x3d"codecaption"\x3eDiagnostic message\x3c/div\x3e\x3ccode\x3e'+a+"\x3c/code\x3e":""),title:"An error occurred"},b)},fillTooManyFeaturesMessage:function(a,b,c,d){d=(d&&d.message||"Too much data to show").replace(/\.$/,"");this.fillMessage(a,b,d+(c>=this.browser.view.maxPxPerBp?"":"; zoom in to see detail")+".")},redraw:function(){this.clear();this.genomeView.showVisibleBlocks(!0)},markBlockHeightOverflow:function(a){a.heightOverflowed||(a.heightOverflowed=!0,c.add(a.domNode,"height_overflow"),
d.create("div",{className:"height_overflow_message",innerHTML:"Max height reached",style:{top:this.height-16+"px",height:"16px"}},a.domNode))},_showBlock:function(a,b,c,d,e,f){if(this.empty||this.fatalError)this.heightUpdate(this.labelHeight);else if(this.blocks[a])this.heightUpdate(this.blockHeights[a],a);else{var m=new I({startBase:b,endBase:c,scale:d,node:{className:"block",style:{left:a*this.widthPct+"%",width:this.widthPct+"%"}}});this.blocks[a]=m;this.div.appendChild(m.domNode);if(this.fatalError)this.fillBlockError(a,
m);else{var g=this._makeLoadingMessage();m.domNode.appendChild(g);var n=function(){m&&g.parentNode&&m.domNode.removeChild(g)};a={blockIndex:a,block:m,leftBlock:this.blocks[a-1],rightBlock:this.blocks[a+1],leftBase:b,rightBase:c,scale:d,stripeWidth:this.widthPx,containerStart:e,containerEnd:f,finishCallback:n};try{this.fillBlock(a)}catch(h){this._handleError(h,a),n()}}}},moveBlocks:function(a){var b=Array(this.numBlocks),c=Array(this.numBlocks),d;for(d=0;d<this.numBlocks;d++)c[d]=0;var e;0>this.lastAttached+
a||this.firstAttached+a>=this.numBlocks?this.lastAttached=this.firstAttached=null:(this.firstAttached=Math.max(0,Math.min(this.numBlocks-1,this.firstAttached+a)),this.lastAttached=Math.max(0,Math.min(this.numBlocks-1,this.lastAttached+a)),e=0>a?this.blocks[this.firstAttached-a]:this.blocks[this.lastAttached-a]);for(d=0;d<this.blocks.length;d++){var f=d+a;0>f||f>=this.numBlocks?(e&&this.blocks[d]&&this.transfer(this.blocks[d],e),this._hideBlock(d)):(b[f]=this.blocks[d],b[f]&&(b[f].domNode.style.left=
f*this.widthPct+"%"),c[f]=this.blockHeights[d])}this.blocks=b;this.blockHeights=c;this._adjustBlanks()},sizeInit:function(a,b,c){this.numBlocks=a;this.widthPct=b;c&&this.moveBlocks(-c);if(this.blocks&&0<this.blocks.length){var d=this.blocks[a-1];for(c=a;c<this.blocks.length;c++)d&&this.blocks[c]&&this.transfer(this.blocks[c],d),this._hideBlock(c);c=this.blocks.length;this.blocks.length=a;for(this.blockHeights.length=a;c<a;c++)this.blocks[c]=void 0,this.blockHeights[c]=0;this.lastAttached=Math.min(this.lastAttached,
a-1);this.firstAttached>this.lastAttached&&(this.lastAttached=this.firstAttached=null);if(this.blocks.length!=a)throw Error("block number mismatch: should be "+a+"; blocks.length: "+this.blocks.length);for(c=0;c<a;c++)this.blocks[c]&&(this.blocks[c].domNode.style.left=c*b+"%",this.blocks[c].domNode.style.width=b+"%")}else this.initBlocks();this.makeTrackMenu()},fillMessage:function(a,c,f,m){d.empty(c.domNode);c=dojo.create("div",{className:m||"message",innerHTML:f},c.domNode);this.heightUpdate(e.getMarginBox(c,
b.getComputedStyle(c)).h,a)},updateStaticElements:function(a){this.window_info=dojo.mixin(this.window_info||{},a);this.fatalErrorMessageElement&&(this.fatalErrorMessageElement.style.width=0.6*this.window_info.width+"px","x"in a&&(this.fatalErrorMessageElement.style.left=a.x+0.2*this.window_info.width+"px"));this.label&&"x"in a&&(this.label.style.left=a.x+"px")},_renderContextMenu:function(a,b,c){c||(c=new p,this.own(c));for(var d in a){var e=a[d];try{if(e.children){var f=new p;c.addChild(f);c.addChild(new t({popup:f,
label:e.label}));this._renderContextMenu(e.children,b,f)}else{var m=dojo.clone(e);if(m.action||m.url||m.href)m.onClick=this._makeClickHandler(e,b);m.label&&!m.onClick&&(m.disabled=!0);c.addChild(new ({"dijit/MenuItem":u,"dijit/CheckedMenuItem":v,"dijit/MenuSeparator":x}[e.type]||u)(m))}}catch(g){console.error("failed to render menu item: "+g)}}return c},_makeClickHandler:function(a,b){var c=this;if("function"==typeof a)a={action:a};else{if("undefined"==typeof a)return console.error("Undefined click specification, cannot make click handler"),
function(){};"defaultDialog"==a.action&&(a.action="contentDialog",a.content=dojo.hitch(this,"defaultFeatureDetail"))}var d=function(d){if(!c.genomeView.dragging){var e=b||this,f=c._processMenuSpec(dojo.clone(a),e),m=f.url||f.href;f.url=m;dojo.clone(f.style||{});f.action=f.action||(m?"iframeDialog":f.content?"contentDialog":!1);f.title=f.title||f.label;"string"==typeof f.action?(f.action={iframedialog:"iframeDialog",iframe:"iframeDialog",contentdialog:"contentDialog",content:"contentDialog",baredialog:"bareDialog",
bare:"bareDialog",xhrdialog:"xhrDialog",xhr:"xhrDialog",newwindow:"newWindow",_blank:"newWindow",thiswindow:"navigateTo",navigateto:"navigateTo"}[(""+f.action).toLowerCase()],"newWindow"==f.action?window.open(m,"_blank"):"navigateTo"==f.action?window.location=m:f.action in{iframeDialog:1,contentDialog:1,xhrDialog:1,bareDialog:1}&&c._openDialog(f,d,e)):"function"==typeof f.action&&f.action.call(e,d)}};a.label&&(d.label=a.label);return d},_trackDetailsContent:function(a){var b=d.create("div",{className:"detail"}),
c=l.hitch(this,"renderDetailField",b);c("Name",this.key||this.name);var e=l.clone(this.getMetadata());l.mixin(e,a);delete e.key;delete e.label;"object"==typeof e.conf&&delete e.conf;a=[];for(var f in e)a.push(f);h.forEach(a,function(a){c(w.ucFirst(a),e[a])});return b},getMetadata:function(){return(this.browser&&this.browser.trackMetaDataStore?this.browser.trackMetaDataStore.getItem(this.name):this.config.metadata?this.config.metadata:{})||{}},setPinned:function(a){this.config.pinned=!!a;this.config.pinned?
c.add(this.div,"pinned"):c.remove(this.div,"pinned");return this.config.pinned},isPinned:function(){return!!this.config.pinned},_trackMenuOptions:function(){var a=this;return[{label:"About this track",title:"About track: "+(this.key||this.name),iconClass:"jbrowseIconHelp",action:"contentDialog",content:dojo.hitch(this,"_trackDetailsContent")},{label:"Pin to top",type:"dijit/CheckedMenuItem",title:"make this track always visible at the top of the view",checked:a.isPinned(),onClick:function(){a.browser.publish("/jbrowse/v1/v/tracks/"+
(this.checked?"pin":"unpin"),[a.name])}},{label:"Edit config",title:"edit this track's configuration",iconClass:"dijitIconConfigure",action:function(){(new C(a.config)).show(function(b){a.browser.publish("/jbrowse/v1/v/tracks/replace",[b.conf])})}},{label:"Delete track",title:"delete this track",iconClass:"dijitIconDelete",action:function(){(new B({title:"Delete track?",message:"Really delete this track?"})).show(function(b){b&&a.browser.publish("/jbrowse/v1/v/tracks/delete",[a.config])})}}]},_processMenuSpec:function(a,
b){for(var c in a)a.hasOwnProperty(c)&&(a[c]="object"==typeof a[c]?this._processMenuSpec(a[c],b):this.template(b.feature,this._evalConf(b,a[c],c)));return a},_evalConf:function(a,b,c){var d={action:1,click:1,content:1};return"function"==typeof b&&!d[c]?b.apply(a,a.callbackArgs||[]):b},getConfForFeature:function(a,b){return this.getConf(a,[b,a,null,null,this])},isFeatureHighlighted:function(a,b){var c=this.browser.getHighlight();return c&&c.objectName&&c.objectName==b&&c.ref==this.refSeq.name&&!(a.get("start")>
c.end||a.get("end")<c.start)},_openDialog:function(a,b,c){function d(a,b){"function"==typeof b.then?b.then(function(b){a.set("content",b)}):a.set("content",b)}c=c||{};b=a.action;b=b.replace(/Dialog/,"");var m=c.feature&&(c.feature.get("name")||c.feature.get("id")),m={"class":"popup-dialog popup-dialog-"+b,title:a.title||a.label||(m?m+" details":"Details"),style:dojo.clone(a.style||{})};a.dialog&&k.safeMixin(m,a.dialog);var g;if("xhr"==b||"content"==b)"xhr"==b&&(m.href=a.url),g=new s(m),c.dialog=g,
"content"==b&&d(g,this._evalConf(c,a.content,null)),w.removeAttribute(c,"dialog");else if("bare"==b)g=new r(m),c.dialog=g,d(g,this._evalConf(c,a.content,null)),w.removeAttribute(c,"dialog");else if("iframe"==b){c=function(){var a=e.position(this.browser.container);return{h:Math.round(0.8*a.h),w:Math.round(0.8*a.w)}}.call(this);g=new r(m);var n=dojo.create("iframe",{tabindex:"0",width:c.w,height:c.h,style:{border:"none"},src:a.url});g.set("content",n);dojo.create("a",{href:a.url,target:"_blank",className:"dialog-new-window",
title:"open in new window",onclick:dojo.hitch(g,"hide"),innerHTML:a.url},g.titleBar);a=function(){var a=e.position(g.containerNode),b=a.w,a=a.h-e.position(g.titleBar).h;n.width=b;n.height=a};f.after(g,"layout",a);f.after(g,"show",a)}f.after(g,"hide",function(){setTimeout(function(){g.destroyRecursive()},500)});g.show()},template:function(a,b){if("string"!=typeof b||!a)return b;if(b)return b.replace(/\{([^}]+)\}/g,function(b,c){var d=a?a.get(c.toLowerCase()):void 0;return void 0!==d?d:""})},makeTrackMenu:function(){var a=
this;n(this._trackMenuOptions()).then(function(b){b&&(b.length&&a.label&&a.labelMenuButton)&&(a.trackMenu&&a.trackMenu.destroyRecursive(),b=a._renderContextMenu(b,{menuButton:a.labelMenuButton,track:a,browser:a.browser,refSeq:a.refSeq}),b.startup(),b.set("leftClickToOpen",!0),b.bindDomNode(a.labelMenuButton),b.set("leftClickToOpen",!1),b.bindDomNode(a.label),a.trackMenu=b,a.own(a.trackMenu))})},fillBlockTimeout:function(a,b){d.empty(b.domNode);c.add(b.domNode,"timed_out");this.fillMessage(a,b,"This region took too long to display, possibly because it contains too much data. Try zooming in to show a smaller region.")},
renderRegionBookmark:function(a,b,c){var d=this;b.then?b.then(function(b){h.forEach(b.features,function(b){if(b.ref==this.refSeq.name){var d=new D(b.refseq+":"+b.start+".."+b.end);this.renderRegionHighlight(a,d,b.color,c?b.label:null,c?b.rlabel:null)}},d)},function(a){}):h.forEach(b.features,function(b){if(b.ref==this.refSeq.name){var d=new D(b.refseq+":"+b.start+".."+b.end);this.renderRegionHighlight(a,d,b.color,c?b.label:null,c?b.rlabel:null)}},this)},renderRegionHighlight:function(a,b,c,e,f){if(!(b.start>
a.rightBase||b.end<a.leftBase)){var m=a.rightBase-a.leftBase,g=b.start;b=b.end;var n=a.leftBase-g;0<n&&(g+=n);var h=b-a.rightBase;0<h&&(b-=h);var k=100*(b-g)/m,g=100*(g-a.leftBase)/m;b=d.create("div",{className:(c?"global_highlight_mod":"global_highlight")+(0>=n?" left":"")+(0>=h?" right":""),style:{left:g+"%",width:k+"%",height:"100%",background:c}},a.block.domNode);this.postRenderHighlight(b);if(e){if(0>=n)var q=d.create("div",{className:"horizontaltext",style:{background:"white",zIndex:1E3,left:g+
"%"},innerHTML:e},a.block.domNode);0>=h&&d.create("div",{className:"horizontaltext",style:{background:"white",zIndex:1E3,left:g+k+"%"},innerHTML:f},a.block.domNode);q.style.left="calc("+g+"% - "+(q.clientWidth+1+"px")+")"}}},postRenderHighlight:function(a){}})})},"JBrowse/View/InfoDialog":function(){define("dojo/_base/declare dojo/_base/array dijit/focus JBrowse/View/Dialog/WithActionBar dojo/on dijit/form/Button".split(" "),function(k,l,h,g,f,d){return k(g,{refocus:!1,autofocus:!1,_fillActionBar:function(e){(new d({className:"OK",
label:"OK",onClick:dojo.hitch(this,"hide")})).placeAt(e)},show:function(){this.inherited(arguments);var d=this;this._extraEvents=[];var c=((dijit||{})._underlay||{}).domNode;c&&this._extraEvents.push(f(c,"click",dojo.hitch(this,"hideIfVisible")));this._extraEvents.push(f(document.body,"keydown",function(b){0<=[dojo.keys.ESCAPE,dojo.keys.ENTER].indexOf(b.keyCode)&&d.hideIfVisible()}));h.focus(this.closeButtonNode)},hideIfVisible:function(){this.get("open")&&this.hide()},hide:function(){this.inherited(arguments);
l.forEach(this._extraEvents,function(d){d.remove()})}})})},"JBrowse/View/Dialog/WithActionBar":function(){define(["dojo/_base/declare","dojo/dom-geometry","dijit/Dialog"],function(k,l,h){return k(h,{constructor:function(){dojo.connect(this,"onLoad",this,"_addActionBar")},_addActionBar:function(){this.containerNode&&!this.actionBar&&(this.actionBar=dojo.create("div",{className:"infoDialogActionBar dijitDialogPaneActionBar"}),this._fillActionBar(this.actionBar),this.containerNode.appendChild(this.actionBar))},
_fillActionBar:function(g){},show:function(g){this._addActionBar();this.inherited(arguments);var f=l.position(this.titleBar);this.domNode.style.width=f.w+"px"}})})},"dijit/Menu":function(){define("require dojo/_base/array dojo/_base/declare dojo/dom dojo/dom-attr dojo/dom-geometry dojo/dom-style dojo/keys dojo/_base/lang dojo/on dojo/sniff dojo/_base/window dojo/window ./popup ./DropDownMenu dojo/ready".split(" "),function(k,l,h,g,f,d,e,c,b,a,m,n,q,s,r,p){m("dijit-legacy-requires")&&p(0,function(){k(["dijit/MenuItem",
"dijit/PopupMenuItem","dijit/CheckedMenuItem","dijit/MenuSeparator"])});return h("dijit.Menu",r,{constructor:function(){this._bindings=[]},targetNodeIds:[],selector:"",contextMenuForWindow:!1,leftClickToOpen:!1,refocus:!0,postCreate:function(){this.contextMenuForWindow?this.bindDomNode(this.ownerDocumentBody):l.forEach(this.targetNodeIds,this.bindDomNode,this);this.inherited(arguments)},_iframeContentWindow:function(a){return q.get(this._iframeContentDocument(a))||this._iframeContentDocument(a).__parent__||
a.name&&document.frames[a.name]||null},_iframeContentDocument:function(a){return a.contentDocument||a.contentWindow&&a.contentWindow.document||a.name&&document.frames[a.name]&&document.frames[a.name].document||null},bindDomNode:function(d){d=g.byId(d,this.ownerDocument);var e;if("iframe"==d.tagName.toLowerCase()){var m=d;e=this._iframeContentWindow(m);e=n.body(e.document)}else e=d==n.body(this.ownerDocument)?this.ownerDocument.documentElement:d;var h={node:d,iframe:m};f.set(d,"_dijitMenu"+this.id,
this._bindings.push(h));var k=b.hitch(this,function(b){var d=this.selector,e=d?function(b){return a.selector(d,b)}:function(a){return a},f=this;return[a(b,e(this.leftClickToOpen?"click":"contextmenu"),function(a){a.stopPropagation();a.preventDefault();(new Date).getTime()<this._lastKeyDown+500||f._scheduleOpen(this,m,{x:a.pageX,y:a.pageY},a.target)}),a(b,e("keydown"),function(a){if(93==a.keyCode||a.shiftKey&&a.keyCode==c.F10||this.leftClickToOpen&&a.keyCode==c.SPACE)a.stopPropagation(),a.preventDefault(),
f._scheduleOpen(this,m,null,a.target),this._lastKeyDown=(new Date).getTime()})]});h.connects=e?k(e):[];m&&(h.onloadHandler=b.hitch(this,function(){var a=this._iframeContentWindow(m),a=n.body(a.document);h.connects=k(a)}),m.addEventListener?m.addEventListener("load",h.onloadHandler,!1):m.attachEvent("onload",h.onloadHandler))},unBindDomNode:function(a){var b;try{b=g.byId(a,this.ownerDocument)}catch(c){return}a="_dijitMenu"+this.id;if(b&&f.has(b,a)){for(var d=f.get(b,a)-1,e=this._bindings[d],m;m=e.connects.pop();)m.remove();
(m=e.iframe)&&(m.removeEventListener?m.removeEventListener("load",e.onloadHandler,!1):m.detachEvent("onload",e.onloadHandler));f.remove(b,a);delete this._bindings[d]}},_scheduleOpen:function(a,b,c,d){this._openTimer||(this._openTimer=this.defer(function(){delete this._openTimer;this._openMyself({target:d,delegatedTarget:a,iframe:b,coords:c})},1))},_openMyself:function(a){function b(){l.refocus&&p&&p.focus();s.close(l)}var c=a.target,f=a.iframe,n=a.coords,h=!n;this.currentTarget=a.delegatedTarget;
if(n){if(f){a=d.position(f,!0);var c=this._iframeContentWindow(f),c=d.docScroll(c.document),k=e.getComputedStyle(f),q=e.toPixelValue,r=(m("ie")&&m("quirks")?0:q(f,k.paddingLeft))+(m("ie")&&m("quirks")?q(f,k.borderLeftWidth):0),f=(m("ie")&&m("quirks")?0:q(f,k.paddingTop))+(m("ie")&&m("quirks")?q(f,k.borderTopWidth):0);n.x+=a.x+r-c.x;n.y+=a.y+f-c.y}}else n=d.position(c,!0),n.x+=10,n.y+=10;var l=this,f=this._focusManager.get("prevNode");a=this._focusManager.get("curNode");var p=!a||g.isDescendant(a,
this.domNode)?f:a;s.open({popup:this,x:n.x,y:n.y,onExecute:b,onCancel:b,orient:this.isLeftToRight()?"L":"R"});this.focus();h||this.defer(function(){this._cleanUp(!0)});this._onBlur=function(){this.inherited("_onBlur",arguments);s.close(this)}},destroy:function(){l.forEach(this._bindings,function(a){a&&this.unBindDomNode(a.node)},this);this.inherited(arguments)}})})},"dijit/PopupMenuItem":function(){define("dojo/_base/declare dojo/dom-style dojo/_base/lang dojo/query ./popup ./registry ./MenuItem ./hccss".split(" "),
function(k,l,h,g,f,d,e){return k("dijit.PopupMenuItem",e,{_fillContent:function(){if(this.srcNodeRef){var c=g("*",this.srcNodeRef);this.inherited(arguments,[c[0]]);this.dropDownContainer=this.srcNodeRef}},_openPopup:function(c,b){var a=this.popup;f.open(h.delegate(c,{popup:this.popup,around:this.domNode}));b&&a.focus&&a.focus()},_closePopup:function(){f.close(this.popup);this.popup.parentMenu=null},startup:function(){if(!this._started){this.inherited(arguments);if(!this.popup){var c=g("[widgetId]",
this.dropDownContainer)[0];this.popup=d.byNode(c)}this.ownerDocumentBody.appendChild(this.popup.domNode);this.popup.domNode.setAttribute("aria-labelledby",this.containerNode.id);this.popup.startup();this.popup.domNode.style.display="none";this.arrowWrapper&&l.set(this.arrowWrapper,"visibility","");this.focusNode.setAttribute("aria-haspopup","true")}},destroyDescendants:function(c){this.popup&&(this.popup._destroyed||this.popup.destroyRecursive(c),delete this.popup);this.inherited(arguments)}})})},
"JBrowse/Errors":function(){define(["dojo/_base/declare"],function(k){var l=k(Error,{constructor:function(g){"object"==typeof g?g instanceof Error?(this._originalError=g,this.message=""+g,this.stack=g.stack):dojo.mixin(this,g):"string"==typeof g&&(this.message=g);this.message||(this.message=this._defaultMessage)}}),h={};h.Fatal=k(l,{_defaultMessage:"Unknown fatal error."});h.TimeOut=k(l,{_defaultMessage:"Data took too long to fetch."});h.DataOverflow=k(l,{_defaultMessage:"Too much data to show."});
return h})},"JBrowse/View/TrackConfigEditor":function(){define("dojo/_base/declare dojo/aspect dojo/json dojo/on dojo/dom-construct dijit/Dialog dijit/form/Button".split(" "),function(k,l,h,g,f,d,e){return k(null,{constructor:function(c){this.trackConfig=c},_makeActionBar:function(c,b){var a=f.create("div",{className:"dijitDialogPaneActionBar"});(new e({iconClass:"dijitIconDelete",label:"Cancel",onClick:dojo.hitch(this,function(){b&&b();this.dialog.hide()})})).placeAt(a);this.applyButton=new e({iconClass:"dijitIconEdit",
label:"Apply",onClick:dojo.hitch(this,function(){this.newConfig?c&&c({conf:this.newConfig}):b&&b();this.dialog.hide()})});this.applyButton.placeAt(a);return{domNode:a}},show:function(c,b){var a=this.dialog=new d({title:"Edit track configuration",className:"trackConfigEditor"}),e=[this._makeEditControls().domNode,this._makeActionBar(c,b).domNode];a.set("content",e);a.show();l.after(a,"hide",dojo.hitch(this,function(){setTimeout(function(){a.destroyRecursive()},500)}))},_makeEditControls:function(){var c=
dojo.hitch(this,function(){this.newConfig=this._parseNewConfig(d.value)}),b=f.create("div",{className:"editControls"}),a=this._stringifyConfig(this.trackConfig),d=f.create("textarea",{rows:Math.min((a||"").match(/\n/g).length+4,20),cols:70,value:a,spellcheck:!1,onchange:c},b),e="",g=this,h=function(){g.dialog.get("open")&&(d.value!=e&&(c(),e=d.value),window.setTimeout(h,700))};window.setTimeout(h,700);this.errorReportArea=f.create("div",{className:"errors"},b);return{domNode:b}},_stringifyConfig:function(c){c=
dojo.mixin({},c);delete c.store;c.style||(c.style={});c.metadata||(c.metadata={});return h.stringify(c,void 0,2)},_reportError:function(c){this.errorReportArea.innerHTML='\x3cdiv class\x3d"error"\x3e'+c+"\x3c/div\x3e";this.applyButton.set("disabled",!0)},_clearErrors:function(){f.empty(this.errorReportArea);this.applyButton.set("disabled",!1)},_parseNewConfig:function(c){var b;try{b=h.parse(c,!0),this._clearErrors()}catch(a){this._reportError(a)}b&&(b.store=this.trackConfig.store);return b}})})},
"JBrowse/View/ConfirmDialog":function(){define(["dojo/_base/declare","dijit/focus","JBrowse/View/Dialog/WithActionBar","dojo/on","dijit/form/Button"],function(k,l,h,g,f){return k(h,{autofocus:!1,constructor:function(d){this.message=d.message||"Do you really want to do this?";this.confirmLabel=d.confirmLabel||"Yes";this.denyLabel=d.denyLabel||"No"},_fillActionBar:function(d){var e=this;(new f({className:"yes",label:this.confirmLabel,onClick:function(){e.callback(!0);e.hide()}})).placeAt(d);(new f({className:"no",
label:this.denyLabel,onClick:function(){e.callback(!1);e.hide()}})).placeAt(d)},show:function(d){this.callback=d||function(){};this.set("content",this.message);this.inherited(arguments);l.focus(this.closeButtonNode)}})})},"JBrowse/View/Track/BlockBased/Block":function(){define(["dojo/_base/declare","dijit/Destroyable","JBrowse/Util"],function(k,l,h){return k(l,{constructor:function(g){dojo.mixin(this,g);g=this.node||{};delete this.node;this.domNode=dojo.create("div",g);this.domNode.block=this},containsBp:function(g){return this.startBase<=
g&&this.endBase>=g},bpToX:function(g){return(g-this.startBase)*this.scale},toString:function(){return this.startBase+".."+this.endBase},destroy:function(){this.domNode&&h.removeAttribute(this.domNode,"block");this.inherited(arguments)}})})},"JBrowse/View/DetailsMixin":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/query dojo/dom-construct dojo/dom-class dojo/store/Memory dgrid/OnDemandGrid dgrid/extensions/DijitRegistry JBrowse/Util".split(" "),function(k,l,h,g,f,d,e,
c,b,a){var m=k([c,b]);return k(null,{renderDetailField:function(b,c,d,e,m){if(null===d||void 0===d)return"";var h;if(h=this["fmtDetail"+a.ucFirst(c)+"Field"])return h.apply(this,arguments);m=m||c.replace(/\W/g,"_").toLowerCase();var k=c;if((h=this.config["fmtDetailField_"+c])&&e){if(k=h(c,e),!k)return""}else if((h=this.config["fmtMetaField_"+c])&&!e)if(k=h(c),!k)return"";var v;"object"==typeof d&&(!l.isArray(d)&&"values"in d)&&(v=(d.meta||{}).description,l.isArray(v)&&(v=v.join(", ")),d=d.values);
if((h=this.config["fmtDetailDescription_"+c])&&e)v=h(v);else if((h=this.config["fmtMetaDescription_"+c])&&!e)v=h(v);h=f.create("div",{className:"field_container",innerHTML:'\x3ch2 class\x3d"field '+m+'"'+(v?' title\x3d"'+v+'"':"")+"\x3e"+k+"\x3c/h2\x3e"},b);v=f.create("div",{className:"value_container "+m},h);v=this.renderDetailValue(v,c,d,e,m);"number"==typeof v&&4<v&&(g("h2",h)[0].innerHTML=k+" ("+v+")");return h},renderDetailValue:function(b,c,e,m,g){var k=this;!l.isArray(e)&&e.values&&(e=e.values);
var u;if(u=this["fmtDetail"+a.ucFirst(c)+"Value"])return u.apply(this,arguments);if((u=this.config["fmtDetailValue_"+c])&&m)(e=u(e,m))||(e=""),1==e.length&&(e=e[0]);else if((u=this.config["fmtMetaValue_"+c])&&!m)e=u(e),1==e.length&&(e=e[0]);u=typeof e;"function"==typeof e.toHTML&&(e=e.toHTML());if("boolean"==u)e=e?"yes":"no";else{if("undefined"==u||null===e)return 0;if(l.isArray(e))return u=h.map(e,function(a){return this.renderDetailValue(b,c,a,m,g)},this),1<u.length&&d.add(b,"multi_value"),10<u.length&&
d.add(b,"big"),u.length;if("object"==u){var v=a.dojof.keys(e).sort();u=v.length;if(5<u)return this.renderDetailValueGrid(b,c,m,function(){if(!v.length)return null;var a=v.shift(),b=e[a],a={id:a};if("object"==typeof b)for(var c in b)a[c]=k._valToString(b[c]);else a.value=b;return a},{descriptions:function(){if(!v.length)return{};var a=e[v[0]],b={},c;for(c in a)b[c]=a[c].meta&&a[c].meta.description||null;return b}()}),u;h.forEach(v,function(a){return this.renderDetailField(b,a,e[a],m,g)},this);return v.length}}f.create("div",
{className:"value "+g,innerHTML:e},b);return 1},renderDetailValueGrid:function(b,c,d,f,g){function h(a,b,c,e){k.renderDetailValue(c,"",b,d,"")}var k=this;c=[];for(var l=g.descriptions||{},x=g.renderCell||{};g=f();)c.push(g);if(!c.length)return document.createElement("span");var w=[],y;for(y in c[0])(function(b){var c={label:{id:"Name"}[b]||a.ucFirst(b),field:b,renderCell:x[b]||h,renderHeaderCell:function(a){l[b]&&(a.title=l[b]);a.appendChild(document.createTextNode(c.label||c.field))}};w.push(c)})(y);
b.style.overflow="hidden";b.style.width="90%";new m({columns:w,store:new e({data:c})},b);return b},_valToString:function(a){return l.isArray(a)?h.map(a,l.hitch(this,"_valToString")).join(" "):"object"==typeof a?"values"in a?this._valToString(a.values):JSON.stringify(a):""+a}})})},"dgrid/OnDemandGrid":function(){define(["dojo/_base/declare","./Grid","./OnDemandList"],function(k,l,h){return k([l,h],{})})},"dgrid/Grid":function(){define("dojo/_base/kernel dojo/_base/declare dojo/on dojo/has put-selector/put ./List ./util/misc dojo/_base/sniff".split(" "),
function(k,l,h,g,f,d,e){function c(a,b){b&&b.nodeType&&a.appendChild(b)}function b(a,b,c,d){if(this.formatter){d=this.formatter;var e=this.grid.formatterScope;c.innerHTML="string"===typeof d&&e?e[d](b,a):this.formatter(b,a)}else null!=b&&c.appendChild(document.createTextNode(b))}var a=8>g("ie")&&!g("quirks");l=l(d,{columns:null,cellNavigation:!0,tabableHeader:!0,showHeader:!0,column:function(a){return"object"!=typeof a?this.columns[a]:this.cell(a).column},listType:"grid",cell:function(a,b){if(a.column&&
a.element)return a;a.target&&a.target.nodeType&&(a=a.target);var c;if(a.nodeType){do{if(this._rowIdToObject[a.id])break;var d=a.columnId;if(d){b=d;c=a;break}a=a.parentNode}while(a&&a!=this.domNode)}if(!c&&"undefined"!=typeof b){var e=this.row(a);if(d=e&&e.element)for(var d=d.getElementsByTagName("td"),f=0;f<d.length;f++)if(d[f].columnId==b){c=d[f];break}}if(null!=a)return{row:e||this.row(a),column:b&&this.column(b),element:c}},createRowCells:function(b,c,d,h){var k=f("table.dgrid-row-table[role\x3dpresentation]"),
l=9>g("ie")||g("quirks")?f(k,"tbody"):k,t,u,v,x,w,y,z,A,D,C;d=d||this.subRows;u=0;for(v=d.length;u<v;u++){y=d[u];t=f(l,"tr");y.className&&f(t,"."+y.className);x=0;for(w=y.length;x<w;x++){z=y[x];A=z.id;D=z.field?".field-"+e.escapeCssIdentifier(z.field,"-"):"";(C="function"===typeof z.className?z.className(h):z.className)&&(D+="."+C);D=f(b+(".dgrid-cell.dgrid-cell-padding"+(A?".dgrid-column-"+e.escapeCssIdentifier(A,"-"):"")+D.replace(/ +/g,"."))+"[role\x3d"+("th"===b?"columnheader":"gridcell")+"]");
D.columnId=A;a?(A=f(D,"!dgrid-cell-padding div.dgrid-cell-padding"),D.contents=A):A=D;if(C=z.colSpan)D.colSpan=C;if(C=z.rowSpan)D.rowSpan=C;c(A,z);t.appendChild(D)}}return k},left:function(a,b){a.element||(a=this.cell(a));return this.cell(this._move(a,-(b||1),"dgrid-cell"))},right:function(a,b){a.element||(a=this.cell(a));return this.cell(this._move(a,b||1,"dgrid-cell"))},renderRow:function(a,d){var e=this.createRowCells("td",function(e,f){var g=a;f.get?g=f.get(a):"field"in f&&"_item"!=f.field&&(g=
g[f.field]);f.renderCell?c(e,f.renderCell(a,g,e,d)):b.call(f,a,g,e,d)},d&&d.subRows,a);return f("div[role\x3drow]\x3e",e)},renderHeader:function(){var b=this,d=this.headerNode,e=d.childNodes.length;for(d.setAttribute("role","row");e--;)f(d.childNodes[e],"!");e=this.createRowCells("th",function(b,d){var e=d.headerNode=b;a&&(b=b.parentNode);var f=d.field;f&&(b.field=f);if(d.renderHeaderCell)c(e,d.renderHeaderCell(e));else if("label"in d||d.field)e.appendChild(document.createTextNode("label"in d?d.label:
d.field));!1!==d.sortable&&(f&&"_item"!=f)&&(b.sortable=!0,b.className+=" dgrid-sortable")},this.subRows&&this.subRows.headerRows);this._rowIdToObject[e.id=this.id+"-header"]=this.columns;d.appendChild(e);this._sortListener&&this._sortListener.remove();this._sortListener=h(e,"click,keydown",function(a){if("click"==a.type||32==a.keyCode||!g("opera")&&13==a.keyCode){var c=a.target,e,f,k;do if(c.sortable){k=[{attribute:e=c.field||c.columnId,descending:(f=b._sort[0])&&f.attribute==e&&!f.descending}];
e={bubbles:!0,cancelable:!0,grid:b,parentType:a.type,sort:k};h.emit(a.target,"dgrid-sort",e)&&(b._sortNode=c,b.set("sort",k));break}while((c=c.parentNode)&&c!=d)}})},resize:function(){var a=this.headerNode.firstChild,b=this.contentNode,c;this.inherited(arguments);if(!g("ie")||7<g("ie")&&!g("quirks"))if(b.style.width="",b&&a&&(c=a.offsetWidth)!=b.offsetWidth)b.style.width=c+"px"},destroy:function(){this._destroyColumns();this._sortListener&&this._sortListener.remove();this.inherited(arguments)},_setSort:function(a,
b){this.inherited(arguments);this.updateSortArrow(this._sort)},_findSortArrowParent:function(a){var b=this.columns,c;for(c in b){var d=b[c];if(d.field==a)return d.headerNode}},updateSortArrow:function(a,b){this._lastSortedArrow&&(f(this._lastSortedArrow,"\x3c!dgrid-sort-up!dgrid-sort-down"),f(this._lastSortedArrow,"!"),delete this._lastSortedArrow);b&&(this._sort=a);if(a[0]){var c=a[0].attribute,d=a[0].descending,c=this._sortNode||this._findSortArrowParent(c),e;delete this._sortNode;c&&(c=c.contents||
c,e=this._lastSortedArrow=f("div.dgrid-sort-arrow.ui-icon[role\x3dpresentation]"),e.innerHTML="\x26nbsp;",c.insertBefore(e,c.firstChild),f(c,d?".dgrid-sort-down":".dgrid-sort-up"),this.resize())}},styleColumn:function(a,b){return this.addCssRule("#"+e.escapeCssIdentifier(this.domNode.id)+" .dgrid-column-"+e.escapeCssIdentifier(a,"-"),b)},_configColumns:function(a,b){var c=[],d=b instanceof Array;e.each(b,function(e,f){"string"==typeof e&&(b[f]=e={label:e});!d&&!e.field&&(e.field=f);f=e.id=e.id||(isNaN(f)?
f:a+f);this._configColumn&&(this._configColumn(e,f,b,a),f=e.id);d&&(this.columns[f]=e);e.grid=this;"function"===typeof e.init&&e.init();c.push(e)},this);return d?b:c},_destroyColumns:function(){var a=this.subRows,b=a&&a.length,c,d,e,f;this.cleanup();for(c=0;c<b;c++){d=0;for(f=a[c].length;d<f;d++)e=a[c][d],"function"===typeof e.destroy&&e.destroy()}},configStructure:function(){var a=this.subRows,b=this._columns=this.columns;this.columns=!b||b instanceof Array?{}:b;if(a)for(b=0;b<a.length;b++)a[b]=
this._configColumns(b+"-",a[b]);else this.subRows=[this._configColumns("",b)]},_getColumns:function(){return this._columns||this.columns},_setColumns:function(a){this._destroyColumns();this.subRows=null;this.columns=a;this._updateColumns()},_setSubRows:function(a){this._destroyColumns();this.subRows=a;this._updateColumns()},setColumns:function(a){k.deprecated("setColumns(...)",'use set("columns", ...) instead',"dgrid 0.4");this.set("columns",a)},setSubRows:function(a){k.deprecated("setSubRows(...)",
'use set("subRows", ...) instead',"dgrid 0.4");this.set("subRows",a)},_updateColumns:function(){this.configStructure();this.renderHeader();this.refresh();this._lastCollection&&this.renderArray(this._lastCollection);this._started&&(this._sort&&this._sort.length?this.updateSortArrow(this._sort):this.resize())}});l.appendIfNode=c;l.defaultRenderCell=b;return l})},"put-selector/put":function(){(function(k){var l,h=/[-+,> ]/;k([],l=function(g,f){function d(f){function n(){t&&(p&&t!=p)&&(p==f&&(k||(k=h.test(w)&&
g.createDocumentFragment()))?k:p).insertBefore(t,r||null)}for(var k,l,r,p,t,u=arguments,v=u[0],x=0;x<u.length;x++){var w=u[x];if("object"==typeof w){l=!1;if(w instanceof Array){t=g.createDocumentFragment();for(var y=0;y<w.length;y++)t.appendChild(d(w[y]));w=t}if(w.nodeType)t=w,n(),p=w,r=0;else for(y in w)t[y]=w[y]}else if(l)l=!1,t.appendChild(g.createTextNode(w));else{1>x&&(f=null);l=!0;if(v=w.replace(e,function(e,h,k,l,q,y){h&&(n(),"-"==h||"+"==h?(p=(r=t||p).parentNode,t=null,"+"==h&&(r=r.nextSibling)):
("\x3c"==h?p=t=(t||p).parentNode:(","==h?p=f:t&&(p=t),t=null),r=0),t&&(p=t));if((e=!k&&l)||!t&&(k||q))"$"==e?(e=u[++x],p.appendChild(g.createTextNode(e))):(e=e||d.defaultTag,(h=a&&u[x+1]&&u[x+1].name)&&(e="\x3c"+e+' name\x3d"'+h+'"\x3e'),t=b&&~(c=e.indexOf("|"))?g.createElementNS(b[e.slice(0,c)],e.slice(c+1)):g.createElement(e));if(k)if("$"==l&&(l=u[++x]),"#"==k)t.id=l;else if(h=(e=t.className)&&(" "+e+" ").replace(" "+l+" "," "),"."==k)t.className=e?(h+l).substring(1):l;else if("!"==w){var s;a?d("div",
t,"\x3c").innerHTML="":(s=t.parentNode)&&s.removeChild(t)}else h=h.substring(1,h.length-1),h!=e&&(t.className=h);q&&("$"==y&&(y=u[++x]),"style"==q?t.style.cssText=y:(k="!"==q.charAt(0)?(q=q.substring(1))&&"removeAttribute":"setAttribute",y=""===y?q:y,b&&~(c=q.indexOf("|"))?t[k+"NS"](b[q.slice(0,c)],q.slice(c+1),y):t[k](q,y)));return""}))throw new SyntaxError("Unexpected char "+v+" in "+w);n();p=v=t||p}}f&&k&&f.appendChild(k);return v}h=f||h;var e=/(?:\s*([-+ ,<>]))?\s*(\.|!\.?|#)?([-\w\u00A0-\uFFFF%$|]+)?(?:\[([^\]=]+)=?['"]?([^\]'"]*)['"]?\])?/g,
c,b=!1;g=g||document;var a="object"==typeof g.createElement;d.addNamespace=function(a,c){g.createElementNS?(b||(b={}))[a]=c:g.namespaces.add(a,c)};d.defaultTag="div";d.forDocument=l;return d})})(function(k,l,h){h=h||l;"function"===typeof define?define([],function(){return h()}):"undefined"==typeof window?require("./node-html")(module,h):put=h()})},"dgrid/List":function(){define("dojo/_base/kernel dojo/_base/declare dojo/dom dojo/on dojo/has ./util/misc dojo/has!touch?./TouchScroll xstyle/has-class put-selector/put dojo/_base/sniff xstyle/css!./css/dgrid.css".split(" "),
function(k,l,h,g,f,d,e,c,b){function a(a,c){b(document.body,a,".dgrid-scrollbar-measure");var d=a["offset"+c]-a["client"+c];a.className="";document.body.removeChild(a);return d}function m(a){var c=a?"."+a.replace(u,"."):"";this._class&&(c="!"+this._class.replace(u,"!")+c);b(this.domNode,c);this._class=a}function n(){return this._class}function q(){return{x:this.bodyNode.scrollLeft,y:this.bodyNode.scrollTop}}function s(a){"undefined"!==typeof a.x&&(this.bodyNode.scrollLeft=a.x);"undefined"!==typeof a.y&&
(this.bodyNode.scrollTop=a.y)}c("mozilla","opera","webkit","ie","ie-6","ie-6-7","quirks","no-quirks","touch");var r,p;f.add("dom-scrollbar-width",function(b,c,d){return a(d,"Width")});f.add("dom-scrollbar-height",function(b,c,d){return a(d,"Height")});f.add("dom-rtl-scrollbar-left",function(a,c,d){a=b("div");b(document.body,d,".dgrid-scrollbar-measure[dir\x3drtl]");b(d,a);c=!!f("ie")||!!f("trident")||a.offsetLeft>=f("dom-scrollbar-width");d.className="";document.body.removeChild(d);b(a,"!");d.removeAttribute("dir");
return c});var t=0,u=/ +/g,v=7>f("ie")&&!f("quirks")?function(){var a,b,c;if(this._started&&(a=document.documentElement,b=a.clientWidth,a=a.clientHeight,c=this._prevWinDims||[],c[0]!==b||c[1]!==a))this.resize(),this._prevWinDims=[b,a]}:function(){this._started&&this.resize()};return l(f("touch")?e:null,{tabableHeader:!1,showHeader:!1,showFooter:!1,maintainOddEven:!0,cleanAddedRules:!0,useTouchScroll:null,addUiClasses:!0,shouldObserveStore:!0,cleanEmptyObservers:!0,highlightDuration:250,postscript:function(a,
b){var c=this;(this._Row=function(a,b,c){this.id=a;this.data=b;this.element=c}).prototype.remove=function(){c.removeRow(this.element)};b&&(this.srcNodeRef=b=b.nodeType?b:document.getElementById(b));this.create(a,b)},listType:"list",create:function(a,c){var d=this.domNode=c||b("div"),e;a?(this.params=a,l.safeMixin(this,a),e=a["class"]||a.className||d.className,this._sort=a.sort||[],delete this.sort):this._sort=[];this.observers=[];this._numObservers=0;this._listeners=[];this._rowIdToObject={};this.postMixInProperties&&
this.postMixInProperties();this.id=d.id=d.id||this.id||"dgrid_"+t++;null===this.useTouchScroll&&(this.useTouchScroll=!f("dom-scrollbar-width"));this.buildRendering();e&&m.call(this,e);this.postCreate();delete this.srcNodeRef;this.domNode.offsetHeight&&this.startup()},buildRendering:function(){var a=this.domNode,c=this.addUiClasses,e=this,m,h,n,k;k=this.isRTL="rtl"==(document.body.dir||document.documentElement.dir||document.body.style.direction).toLowerCase();a.className="";b(a,"[role\x3dgrid].dgrid.dgrid-"+
this.listType+(c?".ui-widget":""));m=this.headerNode=b(a,"div.dgrid-header.dgrid-header-row"+(c?".ui-widget-header":"")+(this.showHeader?"":".dgrid-header-hidden"));(f("quirks")||8>f("ie"))&&b(a,"div.dgrid-spacer");h=this.bodyNode=b(a,"div.dgrid-scroller");f("ff")&&(h.tabIndex=-1);this.headerScrollNode=b(a,"div.dgrid-header.dgrid-header-scroll.dgrid-scrollbar-width"+(c?".ui-widget-header":""));n=this.footerNode=b("div.dgrid-footer"+(this.showFooter?"":".dgrid-footer-hidden"));b(a,n);k&&(a.className+=
" dgrid-rtl"+(f("dom-rtl-scrollbar-left")?" dgrid-rtl-swap":""));g(h,"scroll",function(b){e.showHeader&&(m.scrollLeft=b.scrollLeft||h.scrollLeft);b.stopPropagation();g.emit(a,"scroll",{scrollTarget:h})});this.configStructure();this.renderHeader();this.contentNode=this.touchNode=b(this.bodyNode,"div.dgrid-content"+(c?".ui-widget-content":""));this._listeners.push(this._resizeHandle=g(window,"resize",d.throttleDelayed(v,this)))},postCreate:f("touch")?function(){this.useTouchScroll&&this.inherited(arguments)}:
function(){},startup:function(){this._started||(this.inherited(arguments),this._started=!0,this.resize(),this.set("sort",this._sort))},configStructure:function(){},resize:function(){var a=this.bodyNode,b=this.headerNode,c=this.footerNode,e=b.offsetHeight,m=this.showFooter?c.offsetHeight:0,g=f("quirks")||7>f("ie");this.headerScrollNode.style.height=a.style.marginTop=e+"px";a.style.marginBottom=m+"px";g&&(a.style.height="",a.style.height=Math.max(this.domNode.offsetHeight-e-m,0)+"px",m&&(c.style.bottom=
"1px",setTimeout(function(){c.style.bottom=""},0)));r||(r=f("dom-scrollbar-width"),p=f("dom-scrollbar-height"),f("ie")&&(r++,p++),d.addCssRule(".dgrid-scrollbar-width","width: "+r+"px"),d.addCssRule(".dgrid-scrollbar-height","height: "+p+"px"),17!=r&&!g&&(d.addCssRule(".dgrid-header-row","right: "+r+"px"),d.addCssRule(".dgrid-rtl-swap .dgrid-header-row","left: "+r+"px")));g&&(b.style.width=a.clientWidth+"px",setTimeout(function(){b.scrollLeft=a.scrollLeft},0))},addCssRule:function(a,b){var c=d.addCssRule(a,
b);this.cleanAddedRules&&this._listeners.push(c);return c},on:function(a,b){var c=g(this.domNode,a,b);f("dom-addeventlistener")||this._listeners.push(c);return c},cleanup:function(){var a=this.observers,b;for(b in this._rowIdToObject)if(this._rowIdToObject[b]!=this.columns){var c=document.getElementById(b);c&&this.removeRow(c,!0)}for(b=0;b<a.length;b++)(c=a[b])&&c.cancel();this.observers=[];this._numObservers=0;this.preload=null},destroy:function(){if(this._listeners){for(var a=this._listeners.length;a--;)this._listeners[a].remove();
delete this._listeners}this._started=!1;this.cleanup();b(this.domNode,"!");this.useTouchScroll&&this.inherited(arguments)},refresh:function(){this.cleanup();this._rowIdToObject={};this._autoId=0;this.contentNode.innerHTML="";this.scrollTo({x:0,y:0})},newRow:function(a,c,d,e,f){if(c){var m=this.insertRow(a,c,d,e,f);b(m,".dgrid-highlight"+(this.addUiClasses?".ui-state-highlight":""));setTimeout(function(){b(m,"!dgrid-highlight!ui-state-highlight")},this.highlightDuration);return m}},adjustRowIndices:function(a){var c=
a.rowIndex;if(-1<c){do-1<a.rowIndex&&(this.maintainOddEven&&-1<(a.className+" ").indexOf("dgrid-row ")&&b(a,"."+(1==c%2?"dgrid-row-odd":"dgrid-row-even")+"!"+(0==c%2?"dgrid-row-odd":"dgrid-row-even")),a.rowIndex=c++);while((a=a.nextSibling)&&a.rowIndex!=c)}},renderArray:function(a,b,c){function d(){var b=arguments;if(-1<r)for(var f=0;f<b.length;f++){var m=b[f],h=l[m?0:l.length-1];if(h=h&&e(h)){var n=h[m?"previousSibling":"nextSibling"];n&&(n=g.row(n));n&&n.element!=h&&(m=m?"unshift":"push",a[m](n.data),
l[m](n.element),c.count++)}}}function e(a){return!h.isDescendant(a,g.domNode)&&document.getElementById(a.id)?g.row(a.id.slice(g.id.length+5)).element:a}function f(a){t=g.insertRow(a,p,null,n++,c);t.observerIndex=r;return t}function m(a){u=a.slice(0);(q=b?b.parentNode:g.contentNode)&&q.parentNode&&(q!==g.contentNode||a.length)?(q.insertBefore(p,b||null),(t=a[a.length-1])&&g.adjustRowIndices(t)):k[r]&&g.cleanEmptyObservers&&"undefined"!==typeof r&&(k[r].cancel(),k[r]=0,g._numObservers--);l=a;s&&(s.rows=
l)}c=c||{};var g=this,n=c.start||0,k=this.observers,l,q,r;b||(this._lastCollection=a);if(a.observe&&this.shouldObserveStore){g._numObservers++;var s=a.observe(function(f,m,h){var n,k,s;-1<m&&l[m]&&(n=l.splice(m,1)[0],n.parentNode==q&&((k=n.nextSibling)&&m!=h&&k.rowIndex--,g.removeRow(n)),c.count--,g._processScroll&&g._processScroll());if(-1<h){if(l.length)if(0===h)s=(s=l[h])&&e(s);else{if(s=l[h-1])s=e(s),s=(s.connected||s).nextSibling}else s=g._getFirstRowSibling&&g._getFirstRowSibling(q);n&&(s&&
n.id===s.id)&&(s=(s.connected||s).nextSibling);s&&!s.parentNode&&(s=document.getElementById(s.id));n=b&&b.parentNode||s&&s.parentNode||g.contentNode;if(n=g.newRow(f,n,s,c.start+h,c))if(n.observerIndex=r,l.splice(h,0,n),!k||h<m)k=n.previousSibling,k=!k||k.rowIndex+1==n.rowIndex||0==n.rowIndex?n:k;c.count++}0===m?d(1,1):m===a.length-(-1===h?0:1)&&d(0,0);m!=h&&k&&g.adjustRowIndices(k);g._onNotification(l,f,m,h)},!0);r=k.push(s)-1}var p=document.createDocumentFragment(),t,u;if(a.map){if(l=a.map(f,console.error),
l.then)return a.then(function(b){a=b;return l.then(function(a){m(a);d(1,1,0,0);return u})})}else{l=[];for(var v=0,U=a.length;v<U;v++)l[v]=f(a[v])}m(l);d(1,1,0,0);return u},_onNotification:function(a,b,c,d){},renderHeader:function(){},_autoId:0,insertRow:function(a,b,c,d,e){var f=e.parentId,f=this.id+"-row-"+(f?f+"-":"")+(this.store&&this.store.getIdentity?this.store.getIdentity(a):this._autoId++),m=document.getElementById(f),g=m&&m.previousSibling;m&&(m===c&&(c=(c.connected||c).nextSibling),this.removeRow(m));
m=this.renderRow(a,e);m.className=(m.className||"")+" dgrid-row "+(1==d%2?"dgrid-row-odd":"dgrid-row-even")+(this.addUiClasses?" ui-state-default":"");this._rowIdToObject[m.id=f]=a;b.insertBefore(m,c||null);g&&this.adjustRowIndices(g);m.rowIndex=d;return m},renderRow:function(a,c){return b("div",""+a)},removeRow:function(a,c){a=a.element||a;delete this._rowIdToObject[a.id];c||b(a,"!")},row:function(a){var b;if(a instanceof this._Row)return a;a.target&&a.target.nodeType&&(a=a.target);if(a.nodeType){do{var c=
a.id;if(b=this._rowIdToObject[c])return new this._Row(c.substring(this.id.length+5),b,a);a=a.parentNode}while(a&&a!=this.domNode)}else return"object"==typeof a?b=this.store.getIdentity(a):(b=a,a=this._rowIdToObject[this.id+"-row-"+b]),new this._Row(b,a,document.getElementById(this.id+"-row-"+b))},cell:function(a){return{row:this.row(a)}},_move:function(a,b,c,d){var e,f;f=e=a.element;b=b||1;do if(a=e[0>b?"previousSibling":"nextSibling"]){do if((e=a)&&-1<(e.className+" ").indexOf(c+" ")){f=e;b+=0>b?
1:-1;break}while(a=(!d||!e.hidden)&&e[0>b?"lastChild":"firstChild"])}else if(e=e.parentNode,!e||e===this.bodyNode||e===this.headerNode)break;while(b);return f},up:function(a,b,c){a.element||(a=this.row(a));return this.row(this._move(a,-(b||1),"dgrid-row",c))},down:function(a,b,c){a.element||(a=this.row(a));return this.row(this._move(a,b||1,"dgrid-row",c))},scrollTo:f("touch")?function(a){return this.useTouchScroll?this.inherited(arguments):s.call(this,a)}:s,getScrollPosition:f("touch")?function(){return this.useTouchScroll?
this.inherited(arguments):q.call(this)}:q,get:function(a){var b="_get"+a.charAt(0).toUpperCase()+a.slice(1);return"function"===typeof this[b]?this[b].apply(this,[].slice.call(arguments,1)):this[a]},set:function(a,b){if("object"===typeof a)for(var c in a)this.set(c,a[c]);else c="_set"+a.charAt(0).toUpperCase()+a.slice(1),"function"===typeof this[c]?this[c].apply(this,[].slice.call(arguments,1)):this[a]=b;return this},_getClass:n,_setClass:m,_getClassName:n,_setClassName:m,_setSort:function(a,b){this._sort=
"string"!=typeof a?a:[{attribute:a,descending:b}];this.refresh();this._lastCollection&&(a.length&&("string"!=typeof a&&(b=a[0].descending,a=a[0].attribute),this._lastCollection.sort(function(c,d){var e=c[a],f=d[a];void 0===e&&(e="");void 0===f&&(f="");return e==f?0:e>f==!b?1:-1})),this.renderArray(this._lastCollection))},sort:function(a,b){k.deprecated("sort(...)",'use set("sort", ...) instead',"dgrid 0.4");this.set("sort",a,b)},_getSort:function(){return this._sort},_setShowHeader:function(a){var c=
this.headerNode;this.showHeader=a;b(c,(a?"!":".")+"dgrid-header-hidden");this.renderHeader();this.resize();a&&(c.scrollLeft=this.getScrollPosition().x)},setShowHeader:function(a){k.deprecated("setShowHeader(...)",'use set("showHeader", ...) instead',"dgrid 0.4");this.set("showHeader",a)},_setShowFooter:function(a){this.showFooter=a;b(this.footerNode,(a?"!":".")+"dgrid-footer-hidden");this.resize()}})})},"dgrid/util/misc":function(){define(["dojo/has","put-selector/put"],function(k,l){k.add("dom-contains",
function(b,a,c){return!!c.contains});var h=[],g,f,d,e=/([^A-Za-z0-9_\u00A0-\uFFFF-])/g,c={defaultDelay:15,throttle:function(b,a,d){var e=!1;d=d||c.defaultDelay;return function(){e||(e=!0,b.apply(a,arguments),setTimeout(function(){e=!1},d))}},throttleDelayed:function(b,a,d){var e=!1;d=d||c.defaultDelay;return function(){if(!e){e=!0;var c=arguments;setTimeout(function(){e=!1;b.apply(a,c)},d)}}},debounce:function(b,a,d){var e;d=d||c.defaultDelay;return function(){e&&(clearTimeout(e),e=null);var c=arguments;
e=setTimeout(function(){b.apply(a,c)},d)}},each:function(b,a,c){var d,e;if(b)if("number"===typeof b.length){d=0;for(e=b.length;d<e;d++)a.call(c,b[d],d,b)}else for(d in b)a.call(c,b[d],d,b)},contains:function(b,a){return k("dom-contains")?b.contains(a):b.compareDocumentPosition(a)&8},addCssRule:function(b,a){g||(g=l(document.getElementsByTagName("head")[0],"style"),g=g.sheet||g.styleSheet,f=g.deleteRule?"deleteRule":"removeRule",d=g.cssRules?"cssRules":"rules");var c=h.length;h[c]=(g.cssRules||g.rules).length;
g.addRule?g.addRule(b,a):g.insertRule(b+"{"+a+"}",h[c]);return{get:function(a){return g[d][h[c]].style[a]},set:function(a,b){"undefined"!==typeof h[c]&&(g[d][h[c]].style[a]=b)},remove:function(){var a=h[c],b,d;if(void 0!==a){g[f](a);h[c]=void 0;b=c+1;for(d=h.length;b<d;b++)h[b]>a&&h[b]--}}}},escapeCssIdentifier:function(b,a){return"string"===typeof b?b.replace(e,a||"\\$1"):b}};return c})},"xstyle/has-class":function(){define(["dojo/has"],function(k){var l={};return function(){for(var h,g=arguments,
f=0;f<g.length;f++)if(h=g[f],!l[h]){l[h]=!0;var d=h.match(/^(no-)?(.+?)((-[\d\.]+)(-[\d\.]+)?)?$/),e=k(d[2]),c=-d[4];if((0<c?c<=e&&(-d[5]||c)>=e:!!e)==!d[1])document.documentElement.className+=" has-"+h}}})},"xstyle/css":function(){define(["require"],function(k){function l(h,g,f){var d=document.documentElement;h=d.insertBefore(document.createElement(h),d.firstChild);h.id=g;g=(h.currentStyle||getComputedStyle(h,null)||{})[f];d.removeChild(h);return g}return{load:function(h,g,f,d){function e(a){var b=
l("x-parse",null,"content"),c=a&&(a.sheet||a.styleSheet);b&&"none"!=b&&"normal"!=b?g([eval(b)],function(b){a?b.process(a,f):(b.processAll(),f(c))}):f(c)}var c=g.toUrl(h),b;c.match(/!$/)&&(b={wait:!1},c=c.slice(0,-1));var a=g.cache&&g.cache["url:"+c];if(a)a.xCss&&(a=a.cssText),k(["./core/load-css"],function(b){e(b.insertCss(a))});else{if("none"==l("div",h.replace(/\//g,"-").replace(/\..*/,"")+"-loaded","display"))return e();k(["./core/load-css"],function(a){a(c,e,b)})}}}})},"dgrid/OnDemandList":function(){define("./List ./_StoreMixin dojo/_base/declare dojo/_base/lang dojo/_base/Deferred dojo/dom dojo/on ./util/misc put-selector/put".split(" "),
function(k,l,h,g,f,d,e,c,b){return h([k,l],{minRowsPerPage:25,maxRowsPerPage:250,maxEmptySpace:Infinity,bufferRows:10,farOffRemoval:2E3,queryRowsOverlap:0,pagingMethod:"debounce",pagingDelay:c.defaultDelay,keepScrollPosition:!1,rowHeight:22,postCreate:function(){this.inherited(arguments);var a=this;e(this.bodyNode,"scroll",c[this.pagingMethod](function(b){a._processScroll(b)},null,this.pagingDelay))},destroy:function(){this.inherited(arguments);this._refreshTimeout&&clearTimeout(this._refreshTimeout)},
renderQuery:function(a,c){function d(a){b(x,"!");if(a)throw e._refreshDeferred&&(e._refreshDeferred.reject(a),delete e._refreshDeferred),a;}var e=this,h=c&&c.container||this.contentNode,k={query:a,count:0,options:c},l,t=this.preload,u,v={node:b(h,"div.dgrid-preload",{rowIndex:0}),count:0,query:a,next:k,options:c};v.node.style.height="0";k.node=l=b(h,"div.dgrid-preload");k.previous=v;l.rowIndex=this.minRowsPerPage;t?((k.next=t.next)&&l.offsetTop>=t.node.offsetTop?k.previous=t:(k.next=t,k.previous=
t.previous),k.previous.next=k,k.next.previous=k):this.preload=k;var x=b(l,"-div.dgrid-loading");b(x,"div.dgrid-below").innerHTML=this.loadingMessage;c=g.mixin(this.get("queryOptions"),c,{start:0,count:this.minRowsPerPage},"level"in a?{queryLevel:a.level}:null);this._trackError(function(){return u=a(c)});if("undefined"===typeof u)d();else return f.when(e.renderArray(u,l,c),function(a){return f.when("undefined"===typeof u.total?u.length:u.total,function(d){var f=a.length,g=l.parentNode,h=e.noDataNode;
b(x,"!");"queryLevel"in c||(e._total=d);0===d&&g&&(h&&(b(h,"!"),delete e.noDataNode),e.noDataNode=h=b("div.dgrid-no-data"),g.insertBefore(h,e._getFirstRowSibling(g)),h.innerHTML=e.noDataMessage);for(h=g=0;h<f;h++)g+=e._calcRowHeight(a[h]);f&&g&&(e.rowHeight=g/f);d-=f;k.count=d;l.rowIndex=f;d?l.style.height=Math.min(d*e.rowHeight,e.maxEmptySpace)+"px":(l.style.display="none",c.count++);e._previousScrollPosition&&(e.scrollTo(e._previousScrollPosition),delete e._previousScrollPosition);e._processScroll();
e._refreshDeferred&&(e._refreshDeferred.resolve(u),delete e._refreshDeferred);return a},d)},d),u},refresh:function(a){var b=this,c=a&&a.keepScrollPosition,d;"undefined"===typeof c&&(c=this.keepScrollPosition);c&&(this._previousScrollPosition=this.getScrollPosition());this.inherited(arguments);if(this.store)return c=this._refreshDeferred=new f,d=b.renderQuery(function(a){return b.store.query(b.query,a)}),"undefined"===typeof d&&c.reject(),c.then(function(a){b._refreshTimeout=setTimeout(function(){e.emit(b.domNode,
"dgrid-refresh-complete",{bubbles:!0,cancelable:!1,grid:b,results:a});b._refreshTimeout=null},0);delete b._refreshDeferred;return a},function(a){delete b._refreshDeferred;throw a;})},resize:function(){this.inherited(arguments);this._processScroll()},_getFirstRowSibling:function(a){return a.lastChild},_calcRowHeight:function(a){var b=a.nextSibling;return b&&!/\bdgrid-preload\b/.test(b.className)?b.offsetTop-a.offsetTop:a.offsetHeight},lastScrollTop:0,_processScroll:function(a){function c(a,e,f,m){var g=
h.farOffRemoval,k=a.node;if(e>2*g){for(var l,q=k[f],r=0,p=0,y=[];l=q;){var z=h._calcRowHeight(l);if(r+z+g>e||0>q.className.indexOf("dgrid-row")&&0>q.className.indexOf("dgrid-loading"))break;q=l[f];r+=z;p+=l.count||1;h.removeRow(l,!0);y.push(l)}a.count+=p;m?(k.rowIndex-=p,d(a)):k.style.height=k.offsetHeight+r+"px";var t=b("div",y);setTimeout(function(){b(t,"!")},1)}}function d(a,b){a.node.style.height=Math.min(a.count*h.rowHeight,b?Infinity:h.maxEmptySpace)+"px"}function e(a,b){do a=b?a.next:a.previous;
while(a&&!a.node.offsetWidth);return a}var h=this,k=h.bodyNode;a=a&&a.scrollTop||this.getScrollPosition().y;var k=k.offsetHeight+a,l,t,u=h.preload,v=h.lastScrollTop,x=h.bufferRows*h.rowHeight,w=x-h.rowHeight,y,z,A,D=!0;for(h.lastScrollTop=a;u&&!u.node.offsetWidth;)u=u.previous;for(;u&&u!=l;){l=h.preload;h.preload=u;t=u.node;var C=t.offsetTop;if(k+1+w<C)u=e(u,D=!1);else if(a-1-w>C+t.offsetHeight)u=e(u,D=!0);else{var B=((t.rowIndex?a-x:k)-C)/h.rowHeight,C=(k-a+2*x)/h.rowHeight,I=Math.max(Math.min((a-
v)*h.rowHeight,h.maxRowsPerPage/2),h.maxRowsPerPage/-2),C=C+Math.min(Math.abs(I),10);0==t.rowIndex&&(B-=C);B=Math.max(B,0);10>B&&(0<B&&C+B<h.maxRowsPerPage)&&(C+=Math.max(0,B),B=0);C=Math.min(Math.max(C,h.minRowsPerPage),h.maxRowsPerPage,u.count);if(0==C)u=e(u,D);else{var C=Math.ceil(C),B=Math.min(Math.floor(B),u.count-C),M=g.mixin(h.get("queryOptions"),u.options);u.count-=C;var K=t,G,F=h.queryRowsOverlap;if(I=(0<t.rowIndex||t.offsetTop>a)&&u){var L=u.previous;L&&(c(L,a-(L.node.offsetTop+L.node.offsetHeight),
"nextSibling"),0<B&&L.node==t.previousSibling?(B=Math.min(u.count,B),u.previous.count+=B,d(u.previous,!0),t.rowIndex+=B,F=0):C+=B,u.count-=B);M.start=t.rowIndex-F;M.count=Math.min(C+F,h.maxRowsPerPage);t.rowIndex=M.start+M.count}else u.next&&(c(u.next,u.next.node.offsetTop-k,"previousSibling",!0),K=t.nextSibling,K==u.next.node?(u.next.count+=u.count-B,u.next.node.rowIndex=B+C,d(u.next),u.count=B,F=0):G=!0),M.start=u.count,M.count=Math.min(C+F,h.maxRowsPerPage);G&&(K&&K.offsetWidth)&&(G=K.offsetTop);
d(u);"level"in u.query&&(M.queryLevel=u.query.level);if("queryLevel"in M||!(M.start>h._total||0>M.count)){t=b(K,"-div.dgrid-loading[style\x3dheight:"+C*h.rowHeight+"px]");b(t,"div.dgrid-"+(I?"below":"above")).innerHTML=h.loadingMessage;t.count=C;var E=u.query(M);if(void 0===h._trackError(function(){return E})){b(t,"!");return}(function(a,c,e,m){A=f.when(h.renderArray(m,a,M),function(g){z=m;K=a.nextSibling;b(a,"!");if(e&&K&&K.offsetWidth){var k=h.getScrollPosition();h.scrollTo({x:k.x,y:k.y+K.offsetTop-
e,preserveMomentum:!0})}f.when(m.total||m.length,function(a){"queryLevel"in M||(h._total=a);c&&(c.count=a-c.node.rowIndex,0===c.count&&M.count++,d(c))});h._processScroll();return g},function(c){b(a,"!");throw c;})}).call(this,t,I,G,E);u=u.previous}}}}if(A&&(y=this._refreshDeferred))delete this._refreshDeferred,f.when(A,function(){y.resolve(z)})},removeRow:function(a,b){if(a){var c=a.previousSibling,e=a.nextSibling,c=c&&(null!=c.observerIndex?c.observerIndex:c.previousObserverIndex),f=e&&(null!=e.observerIndex?
e.observerIndex:e.nextObserverIndex),e=a.observerIndex;a.observerIndex=void 0;b&&(a.nextObserverIndex=f,a.previousObserverIndex=c);if(this.cleanEmptyObservers&&(-1<e&&e!==c&&e!==f)&&(c=this.observers,f=c[e])){if(!b)for(var g=f.rows,h=0;h<g.length;h++)if(g[h]!=a&&d.isDescendant(g[h],this.domNode))return this.inherited(arguments);f.cancel();this._numObservers--;c[e]=0}}this.inherited(arguments)}})})},"dgrid/_StoreMixin":function(){define("dojo/_base/kernel dojo/_base/declare dojo/_base/lang dojo/_base/Deferred dojo/on dojo/aspect put-selector/put".split(" "),
function(k,l,h,g,f,d,e){function c(a){return a}function b(a){if("object"!==typeof a)a=Error(a);else if("cancel"===a.dojoType)return;a.grid=this;f.emit(this.domNode,"dgrid-error",{grid:this,error:a,cancelable:!0,bubbles:!0})&&console.error(a)}return l(null,{store:null,query:null,queryOptions:null,getBeforePut:!0,noDataMessage:"",loadingMessage:"",constructor:function(){this.query={};this.queryOptions={};this.dirty={};this._updating={};this._columnsWithSet={};d.before(this,"configStructure",h.hitch(this,
function(){this._columnsWithSet={}}))},postCreate:function(){this.inherited(arguments);this.store&&this._updateNotifyHandle(this.store)},destroy:function(){this.inherited(arguments);this._notifyHandle&&this._notifyHandle.remove()},_configColumn:function(a){a.set&&(this._columnsWithSet[a.field]=a);this.inherited(arguments)},_updateNotifyHandle:function(a){this._notifyHandle&&(this._notifyHandle.remove(),delete this._notifyHandle);a&&("function"===typeof a.notify&&this.shouldObserveStore)&&(this._notifyHandle=
d.after(a,"notify",h.hitch(this,"_onNotify"),!0),a=this.get("sort"),(!a||!a.length)&&console.warn("Observable store detected, but no sort order specified. You may experience quirks when adding/updating items.  These can be resolved by setting a sort order on the list or grid."))},_setStore:function(a,b,c){this._updateNotifyHandle(a);this.store=a;this.dirty={};this.set("query",b,c)},_setQuery:function(a,b){var c=b&&b.sort;this.query=void 0!==a?a:this.query;this.queryOptions=b||this.queryOptions;this._started&&
(c?this.set("sort",c):this.refresh())},setStore:function(a,b,c){k.deprecated("setStore(...)",'use set("store", ...) instead',"dgrid 0.4");this.set("store",a,b,c)},setQuery:function(a,b){k.deprecated("setQuery(...)",'use set("query", ...) instead',"dgrid 0.4");this.set("query",a,b)},_getQueryOptions:function(){var a=h.delegate(this.queryOptions,{});if("function"===typeof this._sort||this._sort.length)a.sort=this._sort;return a},_getQuery:function(){var a=this.query;return"object"==typeof a&&null!=
a?h.delegate(a,{}):a},_setSort:function(a,b){this.store&&(this._lastCollection=null);this.inherited(arguments)},_onNotify:function(a,b){this.inherited(arguments);a&&1>this._numObservers&&this.refresh({keepScrollPosition:!0})},refresh:function(){var a=this.inherited(arguments);this.store||(this.noDataNode=e(this.contentNode,"div.dgrid-no-data"),this.noDataNode.innerHTML=this.noDataMessage);return a},renderArray:function(){var a=this,b=this.inherited(arguments);this.store||g.when(b,function(b){b.length&&
a.noDataNode&&e(a.noDataNode,"!")});return b},insertRow:function(a,b,c,d,e){var f=this.store,g=this.dirty,f=f&&f.getIdentity(a),k;f in g&&!(f in this._updating)&&(k=g[f]);k&&(a=h.delegate(a,k));return this.inherited(arguments)},updateDirty:function(a,b,c){var d=this.dirty,e=d[a];e||(e=d[a]={});e[b]=c},setDirty:function(a,b,c){k.deprecated("setDirty(...)","use updateDirty() instead","dgrid 0.4");this.updateDirty(a,b,c)},save:function(){function a(a,e){return function(f){var h=b._columnsWithSet,k=b._updating,
l,r;if("function"===typeof f.set)f.set(e);else for(l in e)f[l]=e[l];for(l in h)r=h[l].set(f),void 0!==r&&(f[l]=r);k[a]=!0;return g.when(c.put(f),function(){delete d[a];delete k[a]})}}var b=this,c=this.store,d=this.dirty,e=new g,f=e.promise,h=function(a){var d;return b.getBeforePut||!(d=b.row(a).data)?function(){return c.get(a)}:function(){return d}},k;for(k in d)var l=a(k,d[k]),f=f.then(h(k)).then(l);e.resolve();return f},revert:function(){this.dirty={};this.refresh()},_trackError:function(a){var d;
"string"==typeof a&&(a=h.hitch(this,a));try{d=a()}catch(e){b.call(this,e)}return g.when(d,c,h.hitch(this,b))},newRow:function(){var a=this.inherited(arguments);this.noDataNode&&(e(this.noDataNode,"!"),delete this.noDataNode);return a},removeRow:function(a,b){var c={element:a};!b&&(this.noDataMessage&&this.up(c).element===a&&this.down(c).element===a)&&(this.noDataNode=e(this.contentNode,"div.dgrid-no-data"),this.noDataNode.innerHTML=this.noDataMessage);return this.inherited(arguments)}})})},"dgrid/extensions/DijitRegistry":function(){define(["dojo/_base/declare",
"dojo/dom-geometry","dijit/registry"],function(k,l,h){return k(null,{minSize:0,maxSize:Infinity,layoutPriority:0,showTitle:!0,buildRendering:function(){h.add(this);this.inherited(arguments);this.domNode.setAttribute("widgetId",this.id)},startup:function(){if(!this._started){this.inherited(arguments);var g=h.getEnclosingWidget(this.domNode.parentNode);g&&g.isLayoutContainer&&this._resizeHandle.remove()}},destroyRecursive:function(){this.destroy()},destroy:function(){this.inherited(arguments);h.remove(this.id)},
getChildren:function(){return[]},isLeftToRight:function(){return!this.isRTL},resize:function(g){g&&l.setMarginBox(this.domNode,g);this.inherited(arguments)},_set:function(g,f){this[g]=f},watch:function(){},getParent:function(){return h.getEnclosingWidget(this.domNode.parentNode)}})})},"JBrowse/View/Track/GridLines":function(){define(["dojo/_base/declare","dojo/dom-construct","JBrowse/View/Track/BlockBased"],function(k,l,h){return dojo.declare(h,{constructor:function(g){this.loaded=!0;this.name="gridlines"},
makeTrackLabel:function(){},makeTrackMenu:function(){},fillBlock:function(g){this.renderGridlines(g.block,g.leftBase,g.rightBase);var f=this.browser.getHighlight();f&&f.ref==this.refSeq.name&&this.renderRegionHighlight(g,f);(f=this.browser.getBookmarks())&&this.renderRegionBookmark(g,f);g.finishCallback();this.heightUpdate(100,g.blockIndex)},renderGridlines:function(g,f,d){f=d-f;f=!(f%20)?20:!(f%10)?10:!(f%5)?5:!(f%2)?2:5;d=function(b,a){var c=document.createElement("div");c.style.cssText="left: "+
a+"%; width: 0px";c.className="gridline "+b;return c};for(var e=0;e<f;e++){var c=100/f*e;g.domNode.appendChild(d(0==c||20==f&&10==e?"gridline_major":"gridline_minor",c))}}})})},"JBrowse/BehaviorManager":function(){define([],function(){function k(k){this.context=k.context;this.behaviors=k.behaviors}k.prototype.initialize=function(){this.removeAll();for(var k in this.behaviors)this.behaviors[k].apply_on_init&&this.applyBehaviors(k)};k.prototype.applyBehaviors=function(){dojo.forEach(arguments,function(k){k=
this._get(k);k.applied||(k.handles=k.handles||[],k.handles=k.apply.call(this.context||this,this,k.handles),k.applied=!0)},this)};k.prototype._get=function(k){k=this.behaviors[k];if(!k)throw"no behavior registed with name ''name";return k};k.prototype.swapBehaviors=function(k,h){this.removeBehaviors(k);this.applyBehaviors(h)};k.prototype.removeBehaviors=function(){dojo.forEach(arguments,function(k){k=this._get(k);k.applied&&((k.remove||function(h,g){dojo.forEach(g,dojo.disconnect,dojo)}).call(this.context||
this,this,k.handles),k.applied=!1)},this)};k.prototype.removeAll=function(){for(var k in this.behaviors)this.removeBehaviors(k)};return k})},"JBrowse/View/Animation/Zoomer":function(){define(["JBrowse/View/Animation"],function(k){function l(h,g,f,d,e){k.call(this,g,f,d);this.toZoom=g.zoomContainer;this.initialWidth=f=this.toZoom.clientWidth;this.width0=f*Math.min(1,h);this.distance=f*Math.max(1,h)-this.width0;this.zoomingIn=1<h;this.center=(g.getX()+g.elem.clientWidth*e)/g.scrollContainer.clientWidth;
this.initialX=this.subject.getX();this.initialLeft=parseInt(this.toZoom.style.left)}l.prototype=new k;l.prototype.step=function(h){h=this.zoomingIn?h:1-h;h=h*h*this.distance+this.width0;var g=this.center*this.initialWidth-this.center*h;this.toZoom.style.width=h+"px";this.toZoom.style.left=this.initialLeft+g+"px";this.subject.updateStaticElements&&this.subject.updateStaticElements({x:this.initialX-g})};return l})},"JBrowse/View/Animation":function(){define([],function(){function k(k,h,g){if(void 0!==
k){"animation"in k&&k.animation.stop();this.index=0;this.time=g;this.subject=k;this.callback=h;var f=this;this.animFunction=function(){f.animate()};this.animID=setTimeout(this.animFunction,33);this.frames=0;k.animation=this}}k.prototype.animate=function(){if(this.finished)this.stop();else{var k=33,h=0;"startTime"in this?(h=(new Date).getTime()-this.startTime,k=Math.max(33,h/this.frames)):this.startTime=(new Date).getTime();h<this.time?(this.step(h/this.time),this.frames++):(this.step(1),this.finished=
!0);this.animID=setTimeout(this.animFunction,k)}};k.prototype.stop=function(){clearTimeout(this.animID);delete this.subject.animation;this.callback.call(this.subject,this)};return k})},"JBrowse/View/Animation/Slider":function(){define(["JBrowse/View/Animation"],function(k){function l(h,g,f,d){k.call(this,h,g,f);this.slideStart=h.getX();this.slideDistance=d}l.prototype=new k;l.prototype.step=function(h){h=this.slideStart-this.slideDistance*(-0.5*Math.cos(h*Math.PI)+0.5)|0;h=Math.max(Math.min(this.subject.maxLeft-
this.subject.offset,h),this.subject.minLeft-this.subject.offset);this.subject.setX(h)};return l})},"JBrowse/TouchScreenSupport":function(){define([],function(){var k,l,h;return h={CompareObjPos:function(g,f){for(var d=0,e=0,c=f.pageY,b=0;b<g.length&&!(d=e++,h.findPos(g[b]).top>c);b++);return d},checkAvatarPosition:function(g){var f=document.getElementById("tracksAvail"),d=document.getElementById("container");return g.pageX<f.offsetLeft+f.offsetWidth?f:d},removeTouchEvents:function(){k=null},touchSimulated:function(g){if(1>=
g.touches.length){var f=g.changedTouches[0],d="",e=document.getElementsByClassName("dojoDndAvatar"),c={},b=h.checkAvatarPosition(f),a=b.getElementsByClassName("dojoDndItem"),d={},m=document.createEvent("MouseEvent"),n=document.createEvent("MouseEvent");switch(g.type){case "touchstart":k=f.pageX;d="mousedown";break;case "touchmove":g.preventDefault();d="mousemove";break;default:return}m.initMouseEvent(d,!0,!0,window,1,f.pageX,f.pageY,f.clientX,f.clientY,!1,!1,!1,!1,0,null);n.initMouseEvent("mouseover",
!0,!0,window,1,f.pageX,f.pageY,f.clientX,f.clientY,!1,!1,!1,!1,0,null);switch(g.type){case "touchstart":f.target.dispatchEvent(m);f.target.dispatchEvent(n);l=b;break;case "touchmove":if(0<e.length){0<a.length&&(d=h.CompareObjPos(a,f),c=a[d]);try{if(l!=b){var q=document.createEvent("MouseEvent");q.initMouseEvent("mouseout",!0,!0,window,1,f.pageX,f.pageY,f.clientX,f.clientY,!1,!1,!1,!1,0,null);l.dispatchEvent(q)}c.dispatchEvent(n);c.dispatchEvent(m)}catch(s){b.dispatchEvent(n),b.dispatchEvent(m)}}}}else h.removeTouchEvents()},
touchEnd:function(g){var f=g.changedTouches[0],d=document.getElementsByClassName("dojoDndAvatar"),e={},c=h.checkAvatarPosition(f),b=c.getElementsByClassName("dojoDndItem"),a={},m=document.createEvent("MouseEvent"),n=document.createEvent("MouseEvent");k!==f.pageX&&g.preventDefault();h.findPos(f.target);m.initMouseEvent("mouseup",!0,!0,window,1,f.pageX,f.pageY,f.clientX,f.clientY,!1,!1,!1,!1,0,null);n.initMouseEvent("mouseover",!0,!0,window,1,f.pageX,f.pageY,f.clientX,f.clientY,!1,!1,!1,!1,0,null);
if(0<d.length){0<b.length&&(a=h.CompareObjPos(b,f),e=b[a]);try{e.dispatchEvent(n),e.dispatchEvent(m)}catch(l){f.target.dispatchEvent(n),c.dispatchEvent(n)}}else f.target.dispatchEvent(m),f.target.dispatchEvent(n);h.removeTouchEvents()},touchHandle:function(g){dojo.query(".dojoDndItemAnchor").connect("touchstart",h.touchSimulated);dojo.query(".dojoDndItemAnchor").connect("touchmove",h.touchSimulated);dojo.query(".dojoDndItemAnchor").connect("touchend",h.touchEnd);dojo.query(".dojoDndItemAnchor").connect("click",
function(){void 0});if(1>=g.touches.length){var f=g.changedTouches[0],d="";switch(g.type){case "touchstart":k=f.pageX;d="mousedown";break;case "touchmove":g.preventDefault();d="mousemove";break;case "touchend":k!==f.pageX&&g.preventDefault();d="mouseup";break;default:return}g=document.createEvent("MouseEvent");g.initMouseEvent(d,!0,!0,window,1,f.screenX,f.screenY,f.clientX,f.clientY,!1,!1,!1,!1,0,null);f.target.dispatchEvent(g)}else h.removeTouchEvents()},touchinit:function(){dojo.query(".dojoDndItem").connect("touchstart",
h.touchSimulated);dojo.query(".dojoDndItem").connect("touchmove",h.touchSimulated);dojo.query(".dojoDndItem").connect("touchend",h.touchEnd);dojo.query(".locationThumb").connect("touchstart",h.touchHandle);dojo.query(".locationThumb").connect("touchmove",h.touchHandle);dojo.query(".locationThumb").connect("touchend",h.touchHandle);dojo.query(".dojoDndItem").connect("click",function(){void 0});dojo.query(".dojoDndTarget").connect("touchstart",h.touchHandle);dojo.query(".dojoDndTarget").connect("touchmove",
h.touchHandle);dojo.query(".dojoDndTarget").connect("touchend",h.touchHandle);dojo.query(".dijitSplitter").connect("touchstart",h.touchHandle);dojo.query(".dijitSplitter").connect("touchmove",h.touchHandle);dojo.query(".dijitSplitter").connect("touchend",h.touchHandle)},loadTouch:function(){h.touchinit();document.documentElement.style.webkitTouchCallout="none"},findPos:function(g){var f=0,d={};if(g.offsetParent){do f+=g.offsetTop;while(g=g.offsetParent)}d.top=f;return d}}})},"JBrowse/ConfigManager":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/Deferred dojo/promise/all JBrowse/Util JBrowse/ConfigAdaptor/AdaptorUtil".split(" "),
function(k,l,h,g,f,d,e){return k(null,{constructor:function(c){this.bootConfig=l.clone(c.bootConfig||{});this.defaults=l.clone(c.defaults||{});this.browser=c.browser;this.skipValidation=c.skipValidation;this.bootConfig=this._regularizeIncludes([this.bootConfig])[0];var b=this;this._getConfigAdaptor(this.bootConfig).then(function(a){b.bootConfig=a.regularizeTrackConfigs(b.bootConfig)})},getFinalConfig:function(){return this.finalConfig||(this.finalConfig=function(){var c=this,b=this._applyDefaults(l.clone(this.bootConfig),
this.defaults);return this._loadIncludes(this._fillTemplates(b,b)).then(function(a){a=c._mergeConfigs(a,c.bootConfig);c._fillTemplates(a,a);a=e.evalHooks(a);c.skipValidation||c._validateConfig(a);return a})}.call(this))},_getConfigAdaptor:function(c,b){var a="JBrowse/ConfigAdaptor/"+c.format;"version"in c&&(a+="_v"+c.version);a.replace(/\W/g,"");return d.loadJS([a]).then(function(a){return new a[0](c)})},_fillTemplates:function(c,b){var a={},e=typeof c;if(l.isArray(c))for(a=0;a<c.length;a++)c[a]=
this._fillTemplates(c[a],b);else if("object"==e)for(var f in c)c.hasOwnProperty(f)&&!a[f]&&(c[f]=this._fillTemplates(c[f],b));else if("string"==e)return d.fillTemplate(c,b);return c},_loadIncludes:function(c){function b(c,d){var e=c.sourceUrl||c.baseUrl,g=a._mergeConfigs(l.clone(d),c),k=a._fillTemplates(a._regularizeIncludes(c.include||[]),g);delete c.include;k=h.map(k,function(c){return a._loadInclude(c,e).then(function(a){return b(a,g)})});return f(k).then(function(b){h.forEach(b,function(b){c=
a._mergeConfigs(c,b)});return c})}var a=this;c=l.clone(c);return b(c,{})},_loadInclude:function(c,b){return this._getConfigAdaptor(c).then(function(a){if(!a)throw Error("Could not load config "+c.url+", no configuration adaptor found for config format "+c.format+" version "+c.version);return a.load({config:c,baseUrl:b})}).then(null,function(a){try{if(404==a.response.status)return{}}catch(b){}throw a;})},_regularizeIncludes:function(c){if(!c)return[];"object"!=typeof c&&(c=[c]);c=h.filter(c,function(b){return b});
return h.map(c,function(b){"string"==typeof b&&(b={url:b});"format"in b||(b.format=/\.conf$/.test(b.url)?"conf":"JB_json");"JB_json"==b.format&&!("version"in b)&&(b.version=1);return b})},_applyDefaults:function(c,b){return d.deepUpdate(dojo.clone(b),c)},_validateConfig:function(c){c.tracks||(c.tracks=[]);c.baseUrl||this._fatalError("Must provide a \x3ccode\x3ebaseUrl\x3c/code\x3e in configuration");if(this.hasFatalErrors)throw"Errors in configuration, cannot start.";},_fatalError:function(c){this.hasFatalErrors=
!0;this.browser.fatalError(c)},_noRecursiveMerge:function(c){return"datasets"==c},_mergeConfigs:function(c,b){if(null===b)return null;null===c&&(c={});for(var a in b)if("tracks"==a&&a in c)c[a]=this._mergeTrackConfigs(c[a]||[],b[a]||[]);else if(!this._noRecursiveMerge(a)&&a in c&&"object"==typeof b[a]&&"object"==typeof c[a])c[a]=d.deepUpdate(c[a],b[a]);else if("undefined"==typeof c[a]||"undefined"!=typeof b[a])c[a]=b[a];return c},_mergeTrackConfigs:function(c,b){if(!b.length)return c;var a={};h.forEach(c,
function(b,c){b.index=c;a[b.label]=b});h.forEach(b,function(b){var d=a[b.label];d?this._mergeConfigs(d,b):c.push(b)},this);return c}})})},"JBrowse/ConfigAdaptor/AdaptorUtil":function(){define(["dojox/lang/functional/object","dojox/lang/functional/fold"],function(){return{evalHooks:function(k){for(var l in k)if("object"==typeof k[l])k[l]=this.evalHooks(k[l]);else if("string"==typeof k[l]){var h=k[l];/^\s*function\s*\(/.test(h)&&(k[l]=this.evalHook(h))}return k},evalHook:function(k){if("string"!=typeof k)return k;
try{eval("arguments[0]\x3d"+k+";")}catch(l){console.error(l+" parsing config callback '"+k+"'")}return k}}})},"JBrowse/View/FileDialog":function(){define("dojo/_base/declare dojo/_base/array dojo/aspect dojo/on dijit/focus dijit/form/Button dijit/form/RadioButton dojo/dom-construct dijit/Dialog dojox/form/Uploader ./FileDialog/TrackList/BAMDriver ./FileDialog/TrackList/BigWigDriver ./FileDialog/TrackList/GFF3Driver ./FileDialog/TrackList/GTFDriver ./FileDialog/TrackList/VCFTabixDriver ./FileDialog/TrackList/BEDTabixDriver ./FileDialog/TrackList/GFF3TabixDriver ./FileDialog/TrackList/BEDDriver ./FileDialog/ResourceList ./FileDialog/TrackList JBrowse/Util".split(" "),
function(k,l,h,g,f,d,e,c,b,a,m,n,q,s,r,p,t,u,v,x,w){return k(null,{constructor:function(a){this.browser=a.browser;this.config=dojo.clone(a.config||{});this.browserSupports={dnd:"draggable"in document.createElement("span")};this._fileTypeDrivers=[new m,new n,new q,new s,new r,new p,new t,new u]},addFileTypeDriver:function(a){this._fileTypeDrivers.unshift(a)},getFileTypeDrivers:function(){return this._fileTypeDrivers.slice()},_makeActionBar:function(a,b){var f=c.create("div",{className:"dijitDialogPaneActionBar"}),
m=this.trackDispositionChoice=[new e({id:"openImmediately",value:"openImmediately",checked:!0}),new e({id:"addToTrackList",value:"addToTrackList"})],g=c.create("div",{className:"aux"},f);m[0].placeAt(g);c.create("label",{"for":"openImmediately",innerHTML:"Open immediately"},g);m[1].placeAt(g);c.create("label",{"for":"addToTrackList",innerHTML:"Add to tracks"},g);(new d({iconClass:"dijitIconDelete",label:"Cancel",onClick:dojo.hitch(this,function(){b&&b();this.dialog.hide()})})).placeAt(f);(new d({iconClass:"dijitIconFolderOpen",
label:"Open",onClick:dojo.hitch(this,function(){a&&a({trackConfs:this.trackList.getTrackConfigurations(),trackDisposition:this.trackDispositionChoice[0].checked?this.trackDispositionChoice[0].value:this.trackDispositionChoice[1].checked?this.trackDispositionChoice[1].value:void 0});this.dialog.hide()})})).placeAt(f);return{domNode:f}},show:function(a){var d=this.dialog=new b({title:"Open files",className:"fileDialog"}),e=this._makeLocalFilesControl(),m=this._makeRemoteURLsControl(),n=this._makeResourceListControl(),
k=this._makeTrackListControl(),q=this._makeActionBar(a.openCallback,a.cancelCallback);w.isElectron()?g(e.uploader,"click",function(){var a=electronRequire("electron").remote.dialog.showOpenDialog({properties:["openFile","multiSelections"]});a&&(a=l.map(a,function(a){return w.replacePath(a)}),n.addURLs(a))}):dojo.connect(e.uploader,"onChange",function(){n.addLocalFiles(e.uploader._files)});dojo.connect(m,"onChange",function(a){n.clearURLs();n.addURLs(a)});dojo.connect(n,"onChange",function(a){k.update(a)});
a=[c.create("div",{className:"intro",innerHTML:a.introMsg||"Add any combination of data files and URLs, and JBrowse will automatically suggest tracks to display their contents."}),function(a,b){var d=c.create("div",a);l.forEach(b,dojo.hitch(d,"appendChild"));return d}({className:"resourceControls"},[e.domNode,m.domNode]),n.domNode,k.domNode,q.domNode];d.set("content",a);d.show();h.after(d,"hide",dojo.hitch(this,function(){f.curNode&&f.curNode.blur();setTimeout(function(){d.destroyRecursive()},500)}))},
_makeLocalFilesControl:function(){var a=c.create("div",{className:"localFilesControl"});c.create("h3",{innerHTML:"Local files"},a);var b=c.create("div",{className:"dragArea"},a),d;w.isElectron()?d=c.create("input",{type:"button",value:"Select files...",id:"openFile"},b):(d=new dojox.form.Uploader({multiple:!0}),d.placeAt(b),this.browserSupports.dnd&&(d.addDropTarget(this.dialog.domNode),c.create("div",{className:"dragMessage",innerHTML:"Select or drag files here."},b)));c.create("div",{className:"connector",
innerHTML:"\x26nbsp;"},a);return{domNode:a,uploader:d}},_makeRemoteURLsControl:function(){var a=c.create("div",{className:"remoteURLsControl"});c.create("h3",{innerHTML:"Remote URLs - \x3csmaller\x3eone per line\x3c/smaller\x3e"},a);var b={domNode:a,onChange:function(a){}};b.input=c.create("textarea",{className:"urlInput",placeHolder:"http://paste.urls.here/example.bam",cols:25,rows:5,spellcheck:!1},a);var d="",e=function(){if(b.input.value.replace(/\s+/g,",")!=d){var a=dojo.trim(b.input.value),a=
a.length?a.split(/\s+/):[];b.onChange(a);d=b.input.value.replace(/\s+/g,",")}window.setTimeout(e,900)};window.setTimeout(e,900);c.create("div",{className:"connector",innerHTML:"\x26nbsp;"},a);return b},_makeResourceListControl:function(){return new v({dialog:this})},_makeTrackListControl:function(){var a=new x({browser:this.browser,fileDialog:this});return this.trackList=a}})})},"dijit/form/RadioButton":function(){define(["dojo/_base/declare","./CheckBox","./_RadioButtonMixin"],function(k,l,h){return k("dijit.form.RadioButton",
[l,h],{baseClass:"dijitRadio"})})},"dijit/form/CheckBox":function(){define("require dojo/_base/declare dojo/dom-attr dojo/has dojo/query dojo/ready ./ToggleButton ./_CheckBoxMixin dojo/text!./templates/CheckBox.html dojo/NodeList-dom ../a11yclick".split(" "),function(k,l,h,g,f,d,e,c,b){g("dijit-legacy-requires")&&d(0,function(){k(["dijit/form/RadioButton"])});return l("dijit.form.CheckBox",[e,c],{templateString:b,baseClass:"dijitCheckBox",_setValueAttr:function(a,b){"string"==typeof a&&(this.inherited(arguments),
a=!0);this._created&&this.set("checked",a,b)},_getValueAttr:function(){return this.checked&&this._get("value")},_setIconClassAttr:null,_setNameAttr:"focusNode",postMixInProperties:function(){this.inherited(arguments);this.checkedAttrSetting=""},_fillContent:function(){},_onFocus:function(){this.id&&f("label[for\x3d'"+this.id+"']").addClass("dijitFocusedLabel");this.inherited(arguments)},_onBlur:function(){this.id&&f("label[for\x3d'"+this.id+"']").removeClass("dijitFocusedLabel");this.inherited(arguments)}})})},
"dijit/form/_CheckBoxMixin":function(){define(["dojo/_base/declare","dojo/dom-attr"],function(k,l){return k("dijit.form._CheckBoxMixin",null,{type:"checkbox",value:"on",readOnly:!1,_aria_attr:"aria-checked",_setReadOnlyAttr:function(h){this._set("readOnly",h);l.set(this.focusNode,"readOnly",h)},_setLabelAttr:void 0,_getSubmitValue:function(h){return null==h||""===h?"on":h},_setValueAttr:function(h){h=this._getSubmitValue(h);this._set("value",h);l.set(this.focusNode,"value",h)},reset:function(){this.inherited(arguments);
this._set("value",this._getSubmitValue(this.params.value));l.set(this.focusNode,"value",this.value)},_onClick:function(h){return this.readOnly?(h.stopPropagation(),h.preventDefault(),!1):this.inherited(arguments)}})})},"dijit/form/_RadioButtonMixin":function(){define("dojo/_base/array dojo/_base/declare dojo/dom-attr dojo/_base/lang dojo/query ../registry".split(" "),function(k,l,h,g,f,d){return l("dijit.form._RadioButtonMixin",null,{type:"radio",_getRelatedWidgets:function(){var e=[];f("input[type\x3dradio]",
this.focusNode.form||this.ownerDocument).forEach(g.hitch(this,function(c){c.name==this.name&&c.form==this.focusNode.form&&(c=d.getEnclosingWidget(c))&&e.push(c)}));return e},_setCheckedAttr:function(d){this.inherited(arguments);this._created&&d&&k.forEach(this._getRelatedWidgets(),g.hitch(this,function(c){c!=this&&c.checked&&c.set("checked",!1)}))},_getSubmitValue:function(d){return null==d?"on":d},_onClick:function(d){return this.checked||this.disabled?(d.stopPropagation(),d.preventDefault(),!1):
this.readOnly?(d.stopPropagation(),d.preventDefault(),k.forEach(this._getRelatedWidgets(),g.hitch(this,function(c){h.set(this.focusNode||this.domNode,"checked",c.checked)})),!1):this.inherited(arguments)}})})},"dojox/form/Uploader":function(){define("dojo/_base/kernel dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/_base/connect dojo/_base/window dojo/dom-style dojo/dom-class dojo/dom-geometry dojo/dom-attr dojo/dom-construct dojo/dom-form dijit dijit/form/Button ./uploader/_Base ./uploader/_HTML5 ./uploader/_IFrame ./uploader/_Flash dojo/i18n!./nls/Uploader dojo/text!./resources/Uploader.html".split(" "),
function(k,l,h,g,f,d,e,c,b,a,m,n,q,s,r,p,t,u,v,x){return l("dojox.form.Uploader",[r,s,p,t,u],{uploadOnSelect:!1,tabIndex:0,multiple:!1,label:v.label,url:"",name:"uploadedfile",flashFieldName:"",force:"",uploadType:"",showInput:"",focusedClass:"dijitButtonHover",_nameIndex:0,templateString:x,baseClass:"dijitUploader "+s.prototype.baseClass,postMixInProperties:function(){this._inputs=[];this._cons=[];this.force=this.force.toLowerCase();this.supports("multiple")?this.uploadType="form"===this.force?"form":
"html5":this.uploadType="flash"===this.force?"flash":"iframe";this.inherited(arguments)},buildRendering:function(){this.inherited(arguments);e.set(this.domNode,{overflow:"hidden",position:"relative"});this._buildDisplay();a.set(this.titleNode,"tabIndex",-1)},_buildDisplay:function(){this.showInput&&(this.displayInput=m.create("input",{"class":"dijitUploadDisplayInput",tabIndex:-1,autocomplete:"off",role:"presentation"},this.containerNode,this.showInput),this._attachPoints.push("displayInput"),this.connect(this,
"onChange",function(a){for(var b=0,c,d=[];c=a[b++];)c&&c.name&&d.push(c.name);this.displayInput.value=d.join(", ")}),this.connect(this,"reset",function(){this.displayInput.value=""}))},startup:function(){this._buildInitialized||(this._buildInitialized=!0,this._getButtonStyle(this.domNode),this._setButtonStyle(),this.inherited(arguments))},onChange:function(a){},onBegin:function(a){},onProgress:function(a){},onComplete:function(a){this.reset()},onCancel:function(){},onAbort:function(){},onError:function(a){},
upload:function(a){a=a||{};a.uploadType=this.uploadType;this.inherited(arguments)},submit:function(a){a=a?a.tagName?a:this.getForm():this.getForm();a=n.toObject(a);a.uploadType=this.uploadType;this.upload(a)},reset:function(){delete this._files;this._disconnectButton();g.forEach(this._inputs,m.destroy);this._inputs=[];this._nameIndex=0;this._createInput()},getFileList:function(){var a=[];this.supports("multiple")?g.forEach(this._files,function(b,c){a.push({index:c,name:b.name,size:b.size,type:b.type})},
this):g.forEach(this._inputs,function(b,c){b.value&&a.push({index:c,name:b.value.substring(b.value.lastIndexOf("\\")+1),size:0,type:b.value.substring(b.value.lastIndexOf(".")+1)})},this);return a},_getValueAttr:function(){return this.getFileList()},_setValueAttr:function(a){console.error("Uploader value is read only")},_setDisabledAttr:function(a){this.disabled!=a&&this.inputNode&&(this.inherited(arguments),e.set(this.inputNode,"display",a?"none":""))},_getButtonStyle:function(a){this.btnSize={w:e.get(a,
"width"),h:e.get(a,"height")}},_setButtonStyle:function(){this.inputNodeFontSize=Math.max(2,Math.max(Math.ceil(this.btnSize.w/60),Math.ceil(this.btnSize.h/15)));this._createInput()},_getFileFieldName:function(){return this.supports("multiple")&&this.multiple?this.name+"s[]":this.name+(this.multiple?this._nameIndex:"")},_createInput:function(){this._inputs.length&&(e.set(this.inputNode,{top:"500px"}),this._disconnectButton(),this._nameIndex++);var b=this._getFileFieldName();this.focusNode=this.inputNode=
m.create("input",{type:"file",name:b,"aria-labelledby":this.id+"_label"},this.domNode,"first");this.supports("multiple")&&this.multiple&&a.set(this.inputNode,"multiple",!0);this._inputs.push(this.inputNode);e.set(this.inputNode,{position:"absolute",fontSize:this.inputNodeFontSize+"em",top:"-3px",right:"-3px",opacity:0});this._connectButton()},_connectButton:function(){this._cons.push(f.connect(this.inputNode,"change",this,function(a){this._files=this.inputNode.files;this.onChange(this.getFileList(a));
!this.supports("multiple")&&this.multiple&&this._createInput()}));-1<this.tabIndex&&(this.inputNode.tabIndex=this.tabIndex,this._cons.push(f.connect(this.inputNode,"focus",this,function(){c.add(this.domNode,this.focusedClass)})),this._cons.push(f.connect(this.inputNode,"blur",this,function(){c.remove(this.domNode,this.focusedClass)})))},_disconnectButton:function(){g.forEach(this._cons,f.disconnect);this._cons.splice(0,this._cons.length)}})})},"dojox/form/uploader/_Base":function(){define("dojo/dom-form dojo/dom-style dojo/dom-construct dojo/dom-attr dojo/has dojo/_base/declare dojo/_base/event dijit/_Widget dijit/_TemplatedMixin dijit/_WidgetsInTemplateMixin".split(" "),
function(k,l,h,g,f,d,e,c,b,a){f.add("FormData",function(){return!!window.FormData});f.add("xhr-sendAsBinary",function(){var a=window.XMLHttpRequest&&new window.XMLHttpRequest;return a&&!!a.sendAsBinary});f.add("file-multiple",function(){return!!{"true":1,"false":1}[g.get(document.createElement("input",{type:"file"}),"multiple")]});return d("dojox.form.uploader._Base",[c,b,a],{getForm:function(){if(!this.form)for(var a=this.domNode;a&&a.tagName&&a!==document.body;){if("form"==a.tagName.toLowerCase()){this.form=
a;break}a=a.parentNode}return this.form},getUrl:function(){this.uploadUrl&&(this.url=this.uploadUrl);if(this.url)return this.url;this.getForm()&&(this.url=this.form.action);return this.url},connectForm:function(){this.url=this.getUrl();!this._fcon&&this.getForm()&&(this._fcon=!0,this.connect(this.form,"onsubmit",function(a){e.stop(a);this.submit(this.form)}))},supports:function(a){switch(a){case "multiple":if("flash"==this.force||"iframe"==this.force)break;return f("file-multiple");case "FormData":return f(a);
case "sendAsBinary":return f("xhr-sendAsBinary")}return!1},getMimeType:function(){return"application/octet-stream"},getFileType:function(a){return a.substring(a.lastIndexOf(".")+1).toUpperCase()},convertBytes:function(a){var b=Math.round(1E5*(a/1024))/1E5,c=Math.round(1E5*(a/1048576))/1E5,d=Math.round(1E5*(a/1073741824))/1E5,e=a;1<b&&(e=b.toFixed(1)+" kb");1<c&&(e=c.toFixed(1)+" mb");1<d&&(e=d.toFixed(1)+" gb");return{kb:b,mb:c,gb:d,bytes:a,value:e}}})})},"dijit/_WidgetsInTemplateMixin":function(){define(["dojo/_base/array",
"dojo/aspect","dojo/_base/declare","dojo/_base/lang","dojo/parser"],function(k,l,h,g,f){return h("dijit._WidgetsInTemplateMixin",null,{_earlyTemplatedStartup:!1,widgetsInTemplate:!0,contextRequire:null,_beforeFillContent:function(){if(this.widgetsInTemplate){var d=this.domNode;this.containerNode&&!this.searchContainerNode&&(this.containerNode.stopParser=!0);f.parse(d,{noStart:!this._earlyTemplatedStartup,template:!0,inherited:{dir:this.dir,lang:this.lang,textDir:this.textDir},propsThis:this,contextRequire:this.contextRequire,
scope:"dojo"}).then(g.hitch(this,function(d){this._startupWidgets=d;for(var c=0;c<d.length;c++)this._processTemplateNode(d[c],function(b,a){return b[a]},function(b,a,c){return a in b?b.connect(b,a,c):b.on(a,c,!0)});this.containerNode&&this.containerNode.stopParser&&delete this.containerNode.stopParser}));if(!this._startupWidgets)throw Error(this.declaredClass+": parser returned unfilled promise (probably waiting for module auto-load), unsupported by _WidgetsInTemplateMixin.   Must pre-load all supporting widgets before instantiation.");
}},_processTemplateNode:function(d,e,c){return e(d,"dojoType")||e(d,"data-dojo-type")?!0:this.inherited(arguments)},startup:function(){k.forEach(this._startupWidgets,function(d){d&&(!d._started&&d.startup)&&d.startup()});this._startupWidgets=null;this.inherited(arguments)}})})},"dojox/form/uploader/_HTML5":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/_base/array","dojo"],function(k,l,h,g){return k("dojox.form.uploader._HTML5",[],{errMsg:"Error uploading files. Try checking permissions",
uploadType:"html5",postMixInProperties:function(){this.inherited(arguments)},postCreate:function(){this.connectForm();this.inherited(arguments);this.uploadOnSelect&&this.connect(this,"onChange",function(f){this.upload(f[0])})},_drop:function(f){g.stopEvent(f);this._files=f.dataTransfer.files;this.onChange(this.getFileList())},upload:function(f){this.onBegin(this.getFileList());this.uploadWithFormData(f)},addDropTarget:function(f,d){d||(this.connect(f,"dragenter",g.stopEvent),this.connect(f,"dragover",
g.stopEvent),this.connect(f,"dragleave",g.stopEvent));this.connect(f,"drop","_drop")},uploadWithFormData:function(f){if(this.getUrl()){var d=new FormData,e=this._getFileFieldName();h.forEach(this._files,function(b,a){d.append(e,b)},this);if(f){f.uploadType=this.uploadType;for(var c in f)d.append(c,f[c])}this.createXhr().send(d)}else console.error("No upload url found.",this)},_xhrProgress:function(f){if(f.lengthComputable){var d={bytesLoaded:f.loaded,bytesTotal:f.total,type:f.type,timeStamp:f.timeStamp};
"load"==f.type?(d.percent="100%",d.decimal=1):(d.decimal=f.loaded/f.total,d.percent=Math.ceil(100*(f.loaded/f.total))+"%");this.onProgress(d)}},createXhr:function(){var f=new XMLHttpRequest,d;f.upload.addEventListener("progress",l.hitch(this,"_xhrProgress"),!1);f.addEventListener("load",l.hitch(this,"_xhrProgress"),!1);f.addEventListener("error",l.hitch(this,function(e){this.onError(e);clearInterval(d)}),!1);f.addEventListener("abort",l.hitch(this,function(e){this.onAbort(e);clearInterval(d)}),!1);
f.onreadystatechange=l.hitch(this,function(){if(4===f.readyState){clearInterval(d);try{this.onComplete(JSON.parse(f.responseText.replace(/^\{\}&&/,"")))}catch(e){console.error("Error parsing server result:",e),console.error(f.responseText),this.onError("Error parsing server result:",e)}}});f.open("POST",this.getUrl());f.setRequestHeader("Accept","application/json");d=setInterval(l.hitch(this,function(){}),250);return f}})})},"dojo/main":function(){define("./_base/kernel ./has require ./sniff ./_base/lang ./_base/array ./_base/config ./ready ./_base/declare ./_base/connect ./_base/Deferred ./_base/json ./_base/Color ./has!dojo-firebug?./_firebug/firebug ./_base/browser require".split(" "),
function(k,l,h,g,f,d,e,c){e.isDebug&&h(["./_firebug/firebug"]);var b=e.require;b&&(b=d.map(f.isArray(b)?b:[b],function(a){return a.replace(/\./g,"/")}),k.isAsync?h(b):c(1,function(){h(b)}));return k})},"dojo/_base/browser":function(){require.has&&require.has.add("config-selectorEngine","acme");define("../ready ./kernel ./connect ./unload ./window ./event ./html ./NodeList ../query ./xhr ./fx".split(" "),function(k){return k})},"dojo/_base/unload":function(){define(["./kernel","./lang","../on"],function(k,
l,h){var g=window,f={addOnWindowUnload:function(d,e){k.windowUnloaded||h(g,"unload",k.windowUnloaded=function(){});h(g,"unload",l.hitch(d,e))},addOnUnload:function(d,e){h(g,"beforeunload",l.hitch(d,e))}};k.addOnWindowUnload=f.addOnWindowUnload;k.addOnUnload=f.addOnUnload;return f})},"dojox/form/uploader/_IFrame":function(){define("dojo/query dojo/dom-construct dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/dom-form dojo/request/iframe".split(" "),function(k,l,h,g,f,d,e){return h("dojox.form.uploader._IFrame",
[],{postMixInProperties:function(){this.inherited(arguments);"iframe"===this.uploadType&&(this.uploadType="iframe",this.upload=this.uploadIFrame)},uploadIFrame:function(c){var b={},a;this.getForm();var d=this.getUrl(),g=this;c=c||{};c.uploadType=this.uploadType;a=l.place('\x3cform enctype\x3d"multipart/form-data" method\x3d"post"\x3e\x3c/form\x3e',this.domNode);f.forEach(this._inputs,function(c,d){""!==c.value&&(a.appendChild(c),b[c.name]=c.value)},this);if(c)for(nm in c)void 0===b[nm]&&l.create("input",
{name:nm,value:c[nm],type:"hidden"},a);e.post(d,{form:a,handleAs:"json",content:c}).then(function(b){l.destroy(a);if(b.ERROR||b.error)g.onError(b);else g.onComplete(b)},function(b){console.error("error parsing server result",b);l.destroy(a);g.onError(b)})}})})},"dojo/request/iframe":function(){define("module require ./watch ./util ./handlers ../_base/lang ../io-query ../query ../has ../dom ../dom-construct ../_base/window ../NodeList-dom".split(" "),function(k,l,h,g,f,d,e,c,b,a,m,n){function q(a){return!this.isFulfilled()}
function s(a){return!!this._finished}function r(a,b){if(!b)try{var e=a.options,m=t.doc(t._frame),g=e.handleAs;if("html"!==g){if("xml"===g)if("html"===m.documentElement.tagName.toLowerCase()){c("a",m.documentElement).orphan();var h=m.documentElement.innerText||m.documentElement.textContent,h=h.replace(/>\s+</g,"\x3e\x3c");a.text=d.trim(h)}else a.data=m;else a.text=m.getElementsByTagName("textarea")[0].value;f(a)}else a.data=m}catch(n){b=n}b?this.reject(b):this._finished?this.resolve(a):this.reject(Error("Invalid dojo/request/iframe request state"))}
function p(a){this._callNext()}function t(a,b,c){var d=g.parseArgs(a,g.deepCreate(x,b),!0);a=d.url;b=d.options;if("GET"!==b.method&&"POST"!==b.method)throw Error(b.method+" not supported by dojo/request/iframe");t._frame||(t._frame=t.create(t._iframeName,v+"();"));a=g.deferred(d,null,q,s,r,p);a._callNext=function(){this._calledNext||(this._calledNext=!0,t._currentDfd=null,t._fireNextRequest())};a._legacy=c;t._dfdQueue.push(a);t._fireNextRequest();h(a);return c?a:a.promise}var u=k.id.replace(/[\/\.\-]/g,
"_"),v=u+"_onload";n.global[v]||(n.global[v]=function(){var b=t._currentDfd;if(b){var c=a.byId(b.response.options.form)||b._tmpForm;if(c){for(var d=b._contentToClean,e=0;e<d.length;e++)for(var f=d[e],g=0;g<c.childNodes.length;g++){var h=c.childNodes[g];if(h.name===f){m.destroy(h);break}}b._originalAction&&c.setAttribute("action",b._originalAction);b._originalMethod&&(c.setAttribute("method",b._originalMethod),c.method=b._originalMethod);b._originalTarget&&(c.setAttribute("target",b._originalTarget),
c.target=b._originalTarget)}b._tmpForm&&(m.destroy(b._tmpForm),delete b._tmpForm);b._finished=!0}else t._fireNextRequest()});var x={method:"POST"};t.create=function(a,c,d){if(n.global[a])return n.global[a];if(n.global.frames[a])return n.global.frames[a];d||(b("config-useXDomain")&&!b("config-dojoBlankHtmlUrl")&&console.warn("dojo/request/iframe: When using cross-domain Dojo builds, please save dojo/resources/blank.html to your domain and set dojoConfig.dojoBlankHtmlUrl to the path on your domain to blank.html"),
d=b("config-dojoBlankHtmlUrl")||l.toUrl("dojo/resources/blank.html"));c=m.place('\x3ciframe id\x3d"'+a+'" name\x3d"'+a+'" src\x3d"'+d+'" onload\x3d"'+c+'" style\x3d"position: absolute; left: 1px; top: 1px; height: 1px; width: 1px; visibility: hidden"\x3e',n.body());return n.global[a]=c};t.doc=function(a){if(a.contentDocument)return a.contentDocument;var b=a.name;if(b){var c=n.doc.getElementsByTagName("iframe");if(a.document&&c[b].contentWindow&&c[b].contentWindow.document)return c[b].contentWindow.document;
if(n.doc.frames[b]&&n.doc.frames[b].document)return n.doc.frames[b].document}return null};t.setSrc=function(a,b,c){a=n.global.frames[a.name];a.contentWindow&&(a=a.contentWindow);try{c?a.location.replace(b):a.location=b}catch(d){}};t._iframeName=u+"_IoIframe";t._notifyStart=function(){};t._dfdQueue=[];t._currentDfd=null;t._fireNextRequest=function(){var b;try{if(!t._currentDfd&&t._dfdQueue.length){do b=t._currentDfd=t._dfdQueue.shift();while(b&&(b.canceled||b.isCanceled&&b.isCanceled())&&t._dfdQueue.length);
if(!b||b.canceled||b.isCanceled&&b.isCanceled())t._currentDfd=null;else{var c=b.response,f=c.options,h=b._contentToClean=[],k=a.byId(f.form),l=g.notify,r=f.data||null,q;!b._legacy&&"POST"===f.method&&!k?k=b._tmpForm=m.create("form",{name:u+"_form",style:{position:"absolute",top:"-1000px",left:"-1000px"}},n.body()):"GET"===f.method&&(k&&-1<c.url.indexOf("?"))&&(q=c.url.slice(c.url.indexOf("?")+1),r=d.mixin(e.queryToObject(q),r));if(k){if(!b._legacy){var p=k;do p=p.parentNode;while(p&&p!==n.doc.documentElement);
p||(k.style.position="absolute",k.style.left="-1000px",k.style.top="-1000px",n.body().appendChild(k));k.name||(k.name=u+"_form")}if(r){var p=function(a,b){m.create("input",{type:"hidden",name:a,value:b},k);h.push(a)},s;for(s in r){var v=r[s];if(d.isArray(v)&&1<v.length)for(q=0;q<v.length;q++)p(s,v[q]);else k[s]?k[s].value=v:p(s,v)}}var x=k.getAttributeNode("action"),L=k.getAttributeNode("method"),E=k.getAttributeNode("target");c.url&&(b._originalAction=x?x.value:null,x?x.value=c.url:k.setAttribute("action",
c.url));if(b._legacy){if(!L||!L.value)L?L.value=f.method:k.setAttribute("method",f.method)}else b._originalMethod=L?L.value:null,L?L.value=f.method:k.setAttribute("method",f.method);b._originalTarget=E?E.value:null;E?E.value=t._iframeName:k.setAttribute("target",t._iframeName);k.target=t._iframeName;l&&l.emit("send",c,b.promise.cancel);t._notifyStart(c);k.submit()}else f="",c.options.data&&(f=c.options.data,"string"!==typeof f&&(f=e.objectToQuery(f))),p=c.url+(-1<c.url.indexOf("?")?"\x26":"?")+f,
l&&l.emit("send",c,b.promise.cancel),t._notifyStart(c),t.setSrc(t._frame,p,!0)}}}catch(N){b.reject(N)}};g.addCommonMethods(t,["GET","POST"]);return t})},"dojox/form/uploader/_Flash":function(){define("dojo/dom-form dojo/dom-style dojo/dom-construct dojo/dom-attr dojo/_base/declare dojo/_base/config dojo/_base/connect dojo/_base/lang dojo/_base/array dojox/embed/Flash".split(" "),function(k,l,h,g,f,d,e,c,b,a){return f("dojox.form.uploader._Flash",[],{swfPath:d.uploaderPath||require.toUrl("dojox/form/resources/uploader.swf"),
preventCache:!0,skipServerCheck:!0,serverTimeout:2E3,isDebug:!1,devMode:!1,deferredUploading:0,postMixInProperties:function(){"flash"===this.uploadType&&(this._files=[],this._fileMap={},this._createInput=this._createFlashUploader,this.getFileList=this.getFlashFileList,this.reset=this.flashReset,this.upload=this.uploadFlash,this.fieldname="flashUploadFiles");this.inherited(arguments)},onReady:function(a){},onLoad:function(a){},onFileChange:function(a){},onFileProgress:function(a){},getFlashFileList:function(){return this._files},
flashReset:function(){this.flashMovie.reset();this._files=[];this._fileMap={}},uploadFlash:function(a){this.onBegin(this.getFileList());a=a||{};a.returnType="F";a.uploadType=this.uploadType;this.flashMovie.doUpload(a)},_change:function(a){this._files=this._files.concat(a);b.forEach(a,function(a){a.bytesLoaded=0;a.bytesTotal=a.size;this._fileMap[a.name+"_"+a.size]=a},this);this.onChange(this._files);this.onFileChange(a)},_complete:function(a){this._getCustomEvent().type="load";this.onComplete(a)},
_progress:function(a){this._fileMap[a.name+"_"+a.bytesTotal].bytesLoaded=a.bytesLoaded;var b=this._getCustomEvent();this.onFileProgress(a);this.onProgress(b)},_error:function(a){this.onError(a)},_onFlashBlur:function(a){},_getCustomEvent:function(){var a={bytesLoaded:0,bytesTotal:0,type:"progress",timeStamp:(new Date).getTime()},b;for(b in this._fileMap)a.bytesTotal+=this._fileMap[b].bytesTotal,a.bytesLoaded+=this._fileMap[b].bytesLoaded;a.decimal=a.bytesLoaded/a.bytesTotal;a.percent=Math.ceil(100*
(a.bytesLoaded/a.bytesTotal))+"%";return a},_connectFlash:function(){this._subs=[];this._cons=[];var a=c.hitch(this,function(a,b){this._subs.push(e.subscribe(this.id+a,this,b))});a("/filesSelected","_change");a("/filesUploaded","_complete");a("/filesProgress","_progress");a("/filesError","_error");a("/filesCanceled","onCancel");a("/stageBlur","_onFlashBlur");this.connect(this.domNode,"focus",function(){this.flashMovie.focus();this.flashMovie.doFocus()});0<=this.tabIndex&&g.set(this.domNode,"tabIndex",
this.tabIndex)},_createFlashUploader:function(){var b=this.btnSize.w,d=this.btnSize.h;if(b){var e=this.getUrl();if(e){if(0>e.toLowerCase().indexOf("http")&&0!=e.indexOf("/")){var f=window.location.href.split("/");f.pop();f=f.join("/")+"/";e=f+e}}else console.warn("Warning: no uploadUrl provided.");this.inputNode=h.create("div",{className:"dojoxFlashNode"},this.domNode,"first");l.set(this.inputNode,{position:"absolute",top:"-2px",width:b+"px",height:d+"px",opacity:0});b={expressInstall:!0,path:(this.swfPath.uri||
this.swfPath)+(this.preventCache?"?cb_"+(new Date).getTime():""),width:b,height:d,allowScriptAccess:"always",allowNetworking:"all",vars:{uploadDataFieldName:this.flashFieldName||this.name+"Flash",uploadUrl:e,uploadOnSelect:this.uploadOnSelect,deferredUploading:this.deferredUploading||0,selectMultipleFiles:this.multiple,id:this.id,isDebug:this.isDebug,noReturnCheck:this.skipServerCheck,serverTimeout:this.serverTimeout},params:{scale:"noscale",wmode:"opaque",allowScriptAccess:"always",allowNetworking:"all"}};
this.flashObject=new a(b,this.inputNode);this.flashObject.onError=c.hitch(function(a){console.error("Flash Error: "+a)});this.flashObject.onReady=c.hitch(this,function(){this.onReady(this)});this.flashObject.onLoad=c.hitch(this,function(a){this.flashMovie=a;this.flashReady=!0;this.onLoad(this)});this._connectFlash()}else setTimeout(dojo.hitch(this,function(){this._getButtonStyle(this.domNode);this._createFlashUploader()}),200)}})})},"dojox/embed/Flash":function(){define("dojo/_base/lang dojo/_base/unload dojo/_base/array dojo/query dojo/has dojo/dom dojo/on dojo/window".split(" "),
function(k,l,h,g,f,d,e,c){function b(a){return String(a).replace(/&/g,"\x26amp;").replace(/</g,"\x26lt;").replace(/"/g,"\x26quot;").replace(/'/g,"\x26apos;")}function a(a){a=k.delegate(r,a);if(!("path"in a))return console.error("dojox.embed.Flash(ctor):: no path reference to a Flash movie was provided."),null;"id"in a||(a.id=q+s++);return a}var m,n,q="dojox-embed-flash-",s=0,r={expressInstall:!1,width:320,height:240,swLiveConnect:"true",allowScriptAccess:"sameDomain",allowNetworking:"all",style:null,
redirect:null};f("ie")?(m=function(c){c=a(c);if(!c)return null;var d,e=c.path;if(c.vars){var f=[];for(d in c.vars)f.push(encodeURIComponent(d)+"\x3d"+encodeURIComponent(c.vars[d]));c.params.FlashVars=f.join("\x26");delete c.vars}e='\x3cobject id\x3d"'+b(String(c.id))+'" classid\x3d"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width\x3d"'+b(String(c.width))+'" height\x3d"'+b(String(c.height))+'"'+(c.style?' style\x3d"'+b(String(c.style))+'"':"")+'\x3e\x3cparam name\x3d"movie" value\x3d"'+b(String(e))+
'" /\x3e';if(c.params)for(d in c.params)e+='\x3cparam name\x3d"'+b(d)+'" value\x3d"'+b(String(c.params[d]))+'" /\x3e';return{id:c.id,markup:e+"\x3c/object\x3e"}},n=function(){for(var a=10,b=null;!b&&7<a;)try{b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+a--)}catch(c){}return b?(a=b.GetVariable("$version").split(" ")[1].split(","),{major:null!=a[0]?parseInt(a[0]):0,minor:null!=a[1]?parseInt(a[1]):0,rev:null!=a[2]?parseInt(a[2]):0}):{major:0,minor:0,rev:0}}(),l.addOnWindowUnload(function(){console.warn("***************UNLOAD");
var a=function(){};g("object").reverse().style("display","none").forEach(function(b){for(var c in b)if("FlashVars"!=c&&"function"==typeof b[c])try{b[c]=a}catch(d){}})})):(m=function(c){c=a(c);if(!c)return null;var d,e=c.path;if(c.vars){var f=[];for(d in c.vars)f.push(encodeURIComponent(d)+"\x3d"+encodeURIComponent(c.vars[d]));c.params.flashVars=f.join("\x26");delete c.vars}e='\x3cembed type\x3d"application/x-shockwave-flash" src\x3d"'+b(String(e))+'" id\x3d"'+b(String(c.id))+'" width\x3d"'+b(String(c.width))+
'" height\x3d"'+b(String(c.height))+'"'+(c.style?' style\x3d"'+b(String(c.style))+'" ':"")+'pluginspage\x3d"'+window.location.protocol+'//www.adobe.com/go/getflashplayer" ';if(c.params)for(d in c.params)e+=" "+b(d)+'\x3d"'+b(String(c.params[d]))+'"';return{id:c.id,markup:e+" /\x3e"}},n=function(){var a=navigator.plugins["Shockwave Flash"];return a&&a.description?(a=a.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."),{major:null!=a[0]?parseInt(a[0]):0,minor:null!=
a[1]?parseInt(a[1]):0,rev:null!=a[2]?parseInt(a[2]):0}):{major:0,minor:0,rev:0}}());var p=function(a,b){if(-1<location.href.toLowerCase().indexOf("file://"))throw Error("dojox.embed.Flash can't be run directly from a file. To instatiate the required SWF correctly it must be run from a server, like localHost.");this.available=n.major;this.minimumVersion=a.minimumVersion||9;this.domNode=this.movie=this.id=null;b&&(b=d.byId(b));setTimeout(k.hitch(this,function(){if(a.expressInstall||this.available&&
this.available>=this.minimumVersion)if(a&&b)this.init(a,b);else this.onError("embed.Flash was not provided with the proper arguments.");else if(this.available)this.onError("Flash version detected: "+this.available+" is out of date. Minimum required: "+this.minimumVersion);else this.onError("Flash is not installed.")}),100)};k.extend(p,{onReady:function(a){},onLoad:function(a){},onError:function(a){},_onload:function(){clearInterval(this._poller);delete this._poller;delete this._pollCount;delete this._pollMax;
this.onLoad(this.movie)},init:function(a,b){this.destroy();b=d.byId(b||this.domNode);if(!b)throw Error("dojox.embed.Flash: no domNode reference has been passed.");var c=0;this._poller=null;this._pollCount=0;this._pollMax=15;this.pollTime=100;p.initialized&&(this.id=p.place(a,b),this.domNode=b,setTimeout(k.hitch(this,function(){this.movie=this.byId(this.id,a.doc);this.onReady(this.movie);this._poller=setInterval(k.hitch(this,function(){try{c=this.movie.PercentLoaded()}catch(a){console.warn("this.movie.PercentLoaded() failed",
a,this.movie)}if(100==c)this._onload();else if(0==c&&this._pollCount++>this._pollMax)throw clearInterval(this._poller),Error("Building SWF failed.");}),this.pollTime)}),1))},_destroy:function(){try{this.domNode.removeChild(this.movie)}catch(a){}this.id=this.movie=this.domNode=null},destroy:function(){if(this.movie){var a=k.delegate({id:!0,movie:!0,domNode:!0,onReady:!0,onLoad:!0}),b;for(b in this)a[b]||delete this[b];this._poller?e(this,"Load",this,"_destroy"):this._destroy()}},byId:function(a,b){b=
b||document;return b.embeds[a]?b.embeds[a]:b[a]?b[a]:window[a]?window[a]:document[a]?document[a]:null}});k.mixin(p,{minSupported:8,available:n.major,supported:n.major>=n.required,minimumRequired:n.required,version:n,initialized:!1,onInitialize:function(){p.initialized=!0},__ie_markup__:function(a){return m(a)},proxy:function(a,b){h.forEach(b instanceof Array?b:[b],function(a){this[a]=k.hitch(this,function(){return function(){return eval(this.movie.CallFunction('\x3cinvoke name\x3d"'+a+'" returntype\x3d"javascript"\x3e\x3carguments\x3e'+
h.map(arguments,function(a){return __flash__toXML(a)}).join("")+"\x3c/arguments\x3e\x3c/invoke\x3e"))}.apply(this,arguments||[])})},a)}});p.place=function(a,b){var e=m(a);b=d.byId(b);b||(b=c.doc.createElement("div"),b.id=e.id+"-container",c.body().appendChild(b));return e?(b.innerHTML=e.markup,e.id):null};p.onInitialize();k.setObject("dojox.embed.Flash",p);return p})},"JBrowse/View/FileDialog/TrackList/BAMDriver":function(){define(["dojo/_base/declare","./_IndexedFileDriver"],function(k,l){return k(l,
{name:"BAM",storeType:"JBrowse/Store/SeqFeature/BAM",fileExtension:"bam",fileConfKey:"bam",fileUrlConfKey:"urlTemplate",indexExtension:"bam.bai",indexConfKey:"bai",indexUrlConfKey:"baiUrlTemplate"})})},"JBrowse/View/FileDialog/TrackList/_IndexedFileDriver":function(){define(["dojo/_base/declare","JBrowse/Util","JBrowse/Model/FileBlob","JBrowse/Model/XHRBlob"],function(k,l,h,g){var f=0;return k(null,{tryResource:function(d,e){if(e.type==this.fileExtension){var c=l.basename(e.file?e.file.name:e.url?
e.url:"");if(!c)return!1;for(var b in d){var a=d[b];if(l.basename(a[this.indexConfKey]?a[this.indexConfKey].url||a[this.indexConfKey].blob.name:a[this.indexUrlConfKey],"."+this.indexExtension)==c)return a[this.fileConfKey]=this._makeBlob(e),!0}c=l.basename(c,"."+this.fileExtension);for(b in d)if(a=d[b],l.basename(a[this.indexConfKey]?a[this.indexConfKey].url||a[this.indexConfKey].blob.name:a[this.indexUrlConfKey],"."+this.indexExtension)==c)return a[this.fileConfKey]=this._makeBlob(e),!0;b=this.name+
"_"+c+"_"+f++;d[b]={type:this.storeType,name:b,fileBasename:c};d[b][this.fileConfKey]=this._makeBlob(e);return!0}if(e.type==this.indexExtension){c=l.basename(e.file?e.file.name:e.url?e.url:"","."+this.indexExtension);if(!c)return!1;for(b in d)if(a=d[b],l.basename(a[this.fileConfKey]?a[this.fileConfKey].url||a[this.fileConfKey].blob.name:a[this.fileUrlConfKey])==c)return a[this.indexConfKey]=this._makeBlob(e),!0;for(b in d)if(a=d[b],l.basename(a[this.fileConfKey]?a[this.fileConfKey].url||a[this.fileConfKey].blob.name:
a[this.fileUrlConfKey],"."+this.fileExtension)==c)return a[this.indexConfKey]=this._makeBlob(e),!0;b=this.name+"_"+l.basename(c,"."+this.fileExtension)+"_"+f++;d[b]={name:b,type:this.storeType};d[b][this.indexConfKey]=this._makeBlob(e);return!0}return!1},finalizeConfiguration:function(d){var e={},c=0,b={},a=0,f;for(f in d){var g=d[f];if((g.bai||g[this.indexUrlConfKey])&&!g.bam&&!g[this.fileUrlConfKey])c++,e[f]=g;else if((g.bam||g[this.fileUrlConfKey])&&!g.bai&&!g[this.indexUrlConfKey])a++,b[f]=g}if(1==
a&&1==c)for(var h in e)for(var k in b)e[h][this.indexUrlConfKey]&&(b[k][this.indexUrlConfKey]=e[h][this.indexUrlConfKey]),e[h].bai&&(b[k].bai=e[h].bai),delete d[h];for(h in e)delete d[h];for(k in b)d[k][this.fileUrlConfKey]||delete d[k]},_makeBlob:function(d){d=d.file?new h(d.file):d.url?new g(d.url):null;if(!d)throw"unknown resource type";return d},confIsValid:function(d){return(d[this.fileConfKey]||d[this.fileUrlConfKey])&&(d[this.indexConfKey]||d[this.indexUrlConfKey]||d[this.fileUrlConfKey])}})})},
"JBrowse/Model/FileBlob":function(){define(["dojo/_base/declare","dojo/_base/array","dojo/has","JBrowse/Util/TextIterator"],function(k,l,h,g){var f=k(null,{constructor:function(d){this.blob=d;this.totalSize=this.size=d.size},slice:function(d,e){var c=this.blob.mozSlice||this.blob.slice||this.blob.webkitSlice;return new f(e?c.call(this.blob,d,d+e):c.call(this.blob,d))},fetchLines:function(d,e,c){this.fetch(function(b){b=new Uint8Array(b);b=new g.FromBytes({bytes:b,returnPartialRecord:!this.end});for(var a;a=
b.getline();)d(a);e()},c)},readLines:function(d,e,c,b,a){var f=0!=d;this.slice(d,e).fetchLines(function(){f||c();f=!1},b,a)},read:function(d,e,c,b){this.slice(d,e).fetch(c,b)},fetch:function(d,e){var c=this,b=new FileReader;b.onloadend=function(a){d(c._stringToBuffer(b.result))};b.readAsBinaryString(this.blob)},_stringToBuffer:function(d){if(!d||!h("typed-arrays"))return null;for(var e=new Uint8Array(d.length),c=0;c<e.length;c++)e[c]=d.charCodeAt(c);return e.buffer}});return f})},"JBrowse/Util/TextIterator":function(){define([],
function(){var k=function(k){this.bytes=k.bytes;this.offset=k.offset||0;this.length=k.length||this.bytes.length;this._recordSeparator=(k.inputRecordSeparator||"\n").charCodeAt(0);this.returnPartialRecord=k.returnPartialRecord};k.prototype.getOffset=function(){return this.offset};k.prototype.getline=function(){for(var k=this.bytes,h=this.offset,g=[];h<this.length;){var f=k[h],d,e;if(128>f){if(g.push(String.fromCharCode(f)),h++,f==this._recordSeparator)return this.offset=h,g.join("")}else 191<f&&224>
f?(d=k[h+1],g.push(String.fromCharCode((f&31)<<6|d&63)),h+=2):(d=k[h+1],e=k[h+2],g.push(String.fromCharCode((f&15)<<12|(d&63)<<6|e&63)),h+=3)}this.offset=h;return this.returnPartialRecord?g.join(""):null};return{FromBytes:k}})},"JBrowse/Model/XHRBlob":function(){define(["dojo/_base/declare","JBrowse/Model/FileBlob","JBrowse/Store/RemoteBinaryFile"],function(k,l,h){var g=new h({name:"XHRBlob",maxSize:1E8}),f=k(l,{constructor:function(d,e,c,b){b||("object"===typeof e?(b=e,e=void 0):b={});this.url=d;
this.start=e||0;c&&(this.end=c);this.opts=b},slice:function(d,e){var c=this.start,b=this.end,c=c&&d?c+d:d||c;return new f(this.url,c,e&&c?c+e-1:b||e-1,this.opts)},fetch:function(d,e){g.get({url:this.url,start:this.start,end:this.end,success:d,failure:e})},read:function(d,e,c,b){d=this.start+d;g.get({url:this.url,start:d,end:d+e,success:c,failure:b})}});return f})},"JBrowse/Store/RemoteBinaryFile":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array JBrowse/has JBrowse/Util JBrowse/Store/LRUCache jszlib/arrayCopy".split(" "),
function(k,l,h,g,f,d,e){var c=f.fastDeclare({constructor:function(b){l.mixin(this,b)},toString:function(){return this.url+" (bytes "+this.start+".."+this.end+")"},toUniqueString:function(){return this.url+" (bytes "+this.start+".."+this.end+")"}});return k(null,{constructor:function(b){this.name=b.name;this._arrayCopyCount=this._fetchCount=0;this.minChunkSize="minChunkSize"in b?b.minChunkSize:32768;this.chunkCache=new d({name:b.name+" chunk cache",fillCallback:dojo.hitch(this,"_fetch"),maxSize:b.maxSize||
1E7});this.totalSizes={}},_escapeRegExp:function(b){return b.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$\x26")},_relevantExistingChunks:function(b,a,c){if(!c)return[];a=a||0;b=this.chunkCache.query(RegExp("^"+this._escapeRegExp(b+" (bytes")));h.forEach(b,function(a){a.size&&(a.key.start||(a.key.start=0),a.key.end||(a.key.end=a.key.start+(a.size||a.value.byteLength)))});b=b.sort(function(a,b){return a.key.start-b.key.start||b.key.end-b.key.start-(a.key.end-a.key.start)});return h.filter(b,function(b){return!(b.key.start>
c||b.key.end<a)},this)},_fetchChunks:function(b,a,d,e,f){a=a||0;"number"!=typeof d&&this.totalSizes[b]?d=this.totalSizes[b]-1:d>=this.totalSizes[b]&&(d=this.totalSizes[b]-1);var g=this._relevantExistingChunks(b,a,d);this._log("existing",g);var k=[];if("number"!=typeof d)k.push({key:new c({url:b,start:0,end:void 0})});else for(;a<=d;a=k[k.length-1].key.end+1)g[0]&&g[0].key.start<=a?k.push(g.shift()):k.push({key:new c({url:b,start:a,end:g[0]?g[0].key.start-1:d})});h.forEach(k,function(a){a.value||(a=
a.key,a.start=Math.floor(a.start/this.minChunkSize)*this.minChunkSize,a.end&&(a.end=Math.ceil((a.end+1)/this.minChunkSize)*this.minChunkSize-1))},this);var k=this._optimizeGoldenPath(k),l=h.filter(k,function(a){return!a.value});this._log("needed",l);if(l.length){var t=0;h.forEach(l,function(a){this.chunkCache.get(a.key,function(b,c){a.value=b;c?f(c):++t==l.length&&e(k)})},this)}else e(k)},_optimizeGoldenPath:function(b){for(var a=[b[0]],c=1;c<b.length;c++){var d=b[c],e=a[a.length-1];d.value?d.key.end>
e.key.end&&a.push(d):e.value?a.push(d):e.key.end=d.key.end}return a},_fetch:function(b,a,c,d){this._log("fetch",b.url,b.start,b.end);this._fetchCount++;c=c||1;var e=new XMLHttpRequest,h,k=b.url;g("safari")&&b.end&&(k=k+(-1<k.indexOf("?")?"\x26":"?")+"safari_range\x3d"+b.start+"-"+b.end);e.open("GET",k,!0);e.overrideMimeType&&e.overrideMimeType("text/plain; charset\x3dx-user-defined");b.end&&(e.setRequestHeader("Range","bytes\x3d"+b.start+"-"+b.end),h=b.end-b.start+1);e.responseType="arraybuffer";
var l=function(c){c&&(b.start||(b.start=0),b.end||(b.end=b.start+c.byteLength));var d=/no-cache/.test(e.getResponseHeader("Cache-Control"))||/no-cache/.test(e.getResponseHeader("Pragma"));a(c,null,{nocache:d})};e.onreadystatechange=dojo.hitch(this,function(){if(4==e.readyState)if(f.isElectron()||200==e.status||206==e.status){this.totalSizes[b.url]=function(){var a=e.getResponseHeader("Content-Range");if(a)return(a=a.match(/\/(\d+)$/))?parseInt(a[1]):void 0}();var g=e.response||e.mozResponseArrayBuffer||
function(){try{var f=e.responseText;h&&h!=f.length&&(!d||f.length!=d)?3==c?a(null,this._errorString(e,k)):this._fetch(b,a,c+1,f.length):l(this._stringToBuffer(e.responseText))}catch(g){console.error(""+g,g.stack,g),l(new ArrayBuffer)}}.call(this);g&&l(g)}else if(3==c)a(null,this._errorString(e,k));else return this._fetch(b,a,c+1);return null});e.send("")},_errorString:function(b,a){return b.status?b.status+" ("+b.statusText+") when attempting to fetch "+a:"Unable to fetch "+a},get:function(b){if(g("typed-arrays")){this._log("get",
b.url,b.start,b.end);var a=b.start||0,c=b.end;if(a&&!c)throw"cannot specify a fetch start without a fetch end";if(0>a)throw"start cannot be negative!";if(0>c)throw"end cannot be negative!";if(!b.success)throw Error("success callback required");if(!b.failure)throw Error("failure callback required");this._fetchChunks(b.url,a,c,dojo.hitch(this,function(d){var e=this.totalSizes[b.url];this._assembleChunks(a,c,function(a){"number"==typeof e&&(a.fileSize=e);try{b.success.call(this,a)}catch(c){console.error(""+
c,c.stack,c),b.failure&&b.failure(c)}},b.failure,d)}),b.failure)}else(b.failure||function(a){console.error(a)})("This web browser lacks support for JavaScript typed arrays.")},_assembleChunks:function(b,a,c,d,f){this._log("golden path",f);var k;if(g("typed-arrays")){if(1==f.length&&f[0].key.start==b&&(!a||f[0].key.end==a))k=f[0].value;else{d=Math.max.apply(Math,h.map(f,function(a){return a.key.start+((a.value||{}).byteLength||0)-1}));a&&(d=Math.min(d,a));var l=d-b+1;k=new Uint8Array(l);var p=0;h.forEach(f,
function(a){if(a.value&&a.value.byteLength){var c=new Uint8Array(a.value);a=b+p-a.key.start;0>a&&this._error("chunking error");var d=Math.min(c.byteLength-a,l-p);this._log("arrayCopy",c,a,k,p,d);e(c,a,k,p,d);this._arrayCopyCount++;p+=d}},this);k=k.buffer}c(k)}else d("Web browser does not support typed arrays")},_stringToBuffer:function(b){if(!b||"function"!=typeof Uint8Array)return null;for(var a=new Uint8Array(b.length),c=0;c<a.length;c++)a[c]=b.charCodeAt(c);return a.buffer},_log:function(){},_warn:function(){console.warn.apply(console,
arguments)},_error:function(){console.error.apply(console,arguments);throw"file error";}})})},"JBrowse/Store/LRUCache":function(){define(["dojo/_base/declare","dojo/_base/array","JBrowse/Util","JBrowse/Digest/Crc32"],function(k,l,h,g){return k(null,{constructor:function(f){this.fill=f.fillCallback;this.maxSize=f.maxSize||1E6;this.verbose=f.verbose;this.name=f.name||"LRUcache";this._size=f.sizeFunction||this._size;this._keyString=f.keyFunction||this._keyString;this.size=this.itemCount=0;this._cacheByKey=
{};this._cacheNewest=this._cacheOldest=null;this._inProgressFills={}},get:function(f,d){var e=this._keyString(f),c=this._cacheByKey[e];c?(this._log("hit",e),this.touchRecord(c),window.setTimeout(function(){d(c.value)},1)):(this._log("miss",e),this._attemptFill(f,e,d))},query:function(f){var d=[],e=this._cacheByKey,c;for(c in e)f.test(c)&&e.hasOwnProperty(c)&&d.push(e[c]);return d},forEach:function(f,d){d||(d=this);for(var e=0,c=this._cacheNewest;c;c=c.next)f.call(d,c,e++)},some:function(f,d){d||(d=
this);for(var e=0,c=this._cacheNewest;c;c=c.next)if(f.call(d,c,e++))return!0;return!1},touch:function(f){this.touchRecord(this._cacheByKey[this._keyString(f)])},touchRecord:function(f){f&&this._cacheNewest!==f&&(this._llRemove(f),this._llPush(f))},_llRemove:function(f){f.prev&&(f.prev.next=f.next);f.next&&(f.next.prev=f.prev);this._cacheNewest===f&&(this._cacheNewest=f.prev);this._cacheOldest===f&&(this._cacheOldest=f.next);f.prev=null;f.next=null},_llPush:function(f){this._cacheNewest&&(this._cacheNewest.next=
f,f.prev=this._cacheNewest);this._cacheNewest=f;this._cacheOldest||(this._cacheOldest=f)},_attemptFill:function(f,d,e){if(this.fill){var c=this._inProgressFills[d]=this._inProgressFills[d]||{callbacks:[],running:!1};c.callbacks.push(e);c.running||(c.running=!0,this.fill(f,dojo.hitch(this,function(a,b,c,d,e,f){delete this._inProgressFills[a];c.running=!1;if(d&&(!f||!f.nocache))this._log("fill",a),this.set(b,d);l.forEach(c.callbacks,function(a){try{a.call(this,d,e)}catch(b){console.error(""+b,b.stack,
b)}},this)},d,f,c)))}else try{e(void 0)}catch(b){console.error(b)}},set:function(f,d){var e=this._keyString(f);if(!this._cacheByKey[e]){var c={value:d,key:f,keyString:e,size:this._size(d)};c.size>this.maxSize?this._warn("cannot fit",e,"("+h.addCommas(c.size)+" \x3e "+h.addCommas(this.maxSize)+")"):(this._log("set",e,c,this.size),this._prune(c.size),this._cacheByKey[e]=c,this._llPush(c),this.size+=c.size,this.itemCount++)}},_keyString:function(f){return"object"==typeof f&&"function"==typeof f.toUniqueString?
f.toUniqueString():g.objectFingerprint(f)},_size:function(f){var d=typeof f,e=0;if("object"==d&&null!==d){d=typeof f.size;if("number"==d)return d;if("function"==d)return f.size();if(f.byteLength)return f.byteLength;for(var c in f)f.hasOwnProperty(c)&&(e+=this._size(f[c]));return e}return"string"==d?f.length:1},_prune:function(f){for(;this.size+(f||0)>this.maxSize;){var d=this._cacheOldest;if(d)this._log("evict",d),this._llRemove(d),delete this._cacheByKey[d.keyString],delete d.next,delete d.prev,
this.itemCount--,this.size-=d.size;else{this._error("eviction error",this.size,f,this);break}}},_log:function(){this.verbose&&console.log.apply(console,arguments)},_warn:function(){console.warn.apply(console,arguments)},_error:function(){console.error.apply(console,arguments)}})})},"JBrowse/Digest/Crc32":function(){define([],function(){var k={crc32Table:"00000000 77073096 EE0E612C 990951BA 076DC419 706AF48F E963A535 9E6495A3 0EDB8832 79DCB8A4 E0D5E91E 97D2D988 09B64C2B 7EB17CBD E7B82D07 90BF1D91 1DB71064 6AB020F2 F3B97148 84BE41DE 1ADAD47D 6DDDE4EB F4D4B551 83D385C7 136C9856 646BA8C0 FD62F97A 8A65C9EC 14015C4F 63066CD9 FA0F3D63 8D080DF5 3B6E20C8 4C69105E D56041E4 A2677172 3C03E4D1 4B04D447 D20D85FD A50AB56B 35B5A8FA 42B2986C DBBBC9D6 ACBCF940 32D86CE3 45DF5C75 DCD60DCF ABD13D59 26D930AC 51DE003A C8D75180 BFD06116 21B4F4B5 56B3C423 CFBA9599 B8BDA50F 2802B89E 5F058808 C60CD9B2 B10BE924 2F6F7C87 58684C11 C1611DAB B6662D3D 76DC4190 01DB7106 98D220BC EFD5102A 71B18589 06B6B51F 9FBFE4A5 E8B8D433 7807C9A2 0F00F934 9609A88E E10E9818 7F6A0DBB 086D3D2D 91646C97 E6635C01 6B6B51F4 1C6C6162 856530D8 F262004E 6C0695ED 1B01A57B 8208F4C1 F50FC457 65B0D9C6 12B7E950 8BBEB8EA FCB9887C 62DD1DDF 15DA2D49 8CD37CF3 FBD44C65 4DB26158 3AB551CE A3BC0074 D4BB30E2 4ADFA541 3DD895D7 A4D1C46D D3D6F4FB 4369E96A 346ED9FC AD678846 DA60B8D0 44042D73 33031DE5 AA0A4C5F DD0D7CC9 5005713C 270241AA BE0B1010 C90C2086 5768B525 206F85B3 B966D409 CE61E49F 5EDEF90E 29D9C998 B0D09822 C7D7A8B4 59B33D17 2EB40D81 B7BD5C3B C0BA6CAD EDB88320 9ABFB3B6 03B6E20C 74B1D29A EAD54739 9DD277AF 04DB2615 73DC1683 E3630B12 94643B84 0D6D6A3E 7A6A5AA8 E40ECF0B 9309FF9D 0A00AE27 7D079EB1 F00F9344 8708A3D2 1E01F268 6906C2FE F762575D 806567CB 196C3671 6E6B06E7 FED41B76 89D32BE0 10DA7A5A 67DD4ACC F9B9DF6F 8EBEEFF9 17B7BE43 60B08ED5 D6D6A3E8 A1D1937E 38D8C2C4 4FDFF252 D1BB67F1 A6BC5767 3FB506DD 48B2364B D80D2BDA AF0A1B4C 36034AF6 41047A60 DF60EFC3 A867DF55 316E8EEF 4669BE79 CB61B38C BC66831A 256FD2A0 5268E236 CC0C7795 BB0B4703 220216B9 5505262F C5BA3BBE B2BD0B28 2BB45A92 5CB36A04 C2D7FFA7 B5D0CF31 2CD99E8B 5BDEAE1D 9B64C2B0 EC63F226 756AA39C 026D930A 9C0906A9 EB0E363F 72076785 05005713 95BF4A82 E2B87A14 7BB12BAE 0CB61B38 92D28E9B E5D5BE0D 7CDCEFB7 0BDBDF21 86D3D2D4 F1D4E242 68DDB3F8 1FDA836E 81BE16CD F6B9265B 6FB077E1 18B74777 88085AE6 FF0F6A70 66063BCA 11010B5C 8F659EFF F862AE69 616BFFD3 166CCF45 A00AE278 D70DD2EE 4E048354 3903B3C2 A7672661 D06016F7 4969474D 3E6E77DB AED16A4A D9D65ADC 40DF0B66 37D83BF0 A9BCAE53 DEBB9EC5 47B2CF7F 30B5FFE9 BDBDF21C CABAC28A 53B39330 24B4A3A6 BAD03605 CDD70693 54DE5729 23D967BF B3667A2E C4614AB8 5D681B02 2A6F2B94 B40BBE37 C30C8EA1 5A05DF1B 2D02EF8D",
stringToBytes:function(k){for(var h,g,f=[],d=0;d<k.length;d++){h=k.charCodeAt(d);g=[];do g.push(h&255),h>>=8;while(h);f=f.concat(g.reverse())}return f},crc32:function(l,h){var g=k.stringToBytes(l);h==window.undefined&&(h=0);var f=0,f=0,d=k.crc32Table;h^=-1;for(var e=0,c=g.length;e<c;e++)f=(h^g[e])&255,f="0x"+d.substr(9*f,8),h=h>>>8^f;h^=-1;0>h&&(h+=4294967296);return h},objectFingerprint:function(l){var h=0;if("object"==typeof l)for(var g in l)h=k.crc32(""+k.objectFingerprint(g),h),h=k.crc32(""+k.objectFingerprint(l[g]),
h);else h=k.crc32(""+l,h);return h}};return k})},"jszlib/arrayCopy":function(){define([],function(){try{new Uint8Array(1)}catch(k){}return function(k,h,g,f,d){if(0!=d){if(k){if(!g)throw"Undef dest";}else throw"Undef src";if(0==h&&d==k.length)g.set(k,f);else if(k.subarray)k=k.subarray(h,h+d),g.set(k,f);else if(1==k.BYTES_PER_ELEMENT&&100<d)k=new Uint8Array(k.buffer,k.byteOffset+h,d),g.set(k,f);else for(var e=0;e<d;++e)g[f+e]=k[h+e]}}})},"JBrowse/View/FileDialog/TrackList/BigWigDriver":function(){define(["dojo/_base/declare",
"JBrowse/Util","JBrowse/Model/FileBlob","JBrowse/Model/XHRBlob"],function(k,l,h,g){var f=0;return k(null,{storeType:"JBrowse/Store/SeqFeature/BigWig",tryResource:function(d,e){if("bigwig"==e.type){var c=l.basename(e.file?e.file.name:e.url?e.url:"",[".bw",".bigwig"]);if(!c)return!1;var b="BigWig_"+c+"_"+f++;d[b]={fileBasename:c,type:this.storeType,blob:this._makeBlob(e),name:b};return!0}return!1},finalizeConfiguration:function(d){},_makeBlob:function(d){d=d.file?new h(d.file):d.url?new g(d.url):null;
if(!d)throw"unknown resource type";return d},confIsValid:function(d){return d.blob||d.urlTemplate}})})},"JBrowse/View/FileDialog/TrackList/GFF3Driver":function(){define(["dojo/_base/declare","JBrowse/Util","JBrowse/Model/FileBlob","JBrowse/Model/XHRBlob"],function(k,l,h,g){var f=0;return k(null,{storeType:"JBrowse/Store/SeqFeature/GFF3",tryResource:function(d,e){if("gff3"==e.type){var c=l.basename(e.file?e.file.name:e.url?e.url:"",[".gff3",".gff"]);if(!c)return!1;var b="GFF3_"+c+"_"+f++;d[b]={type:this.storeType,
fileBasename:c,blob:this._makeBlob(e),name:b};return!0}return!1},finalizeConfiguration:function(d){},_makeBlob:function(d){d=d.file?new h(d.file):d.url?new g(d.url):null;if(!d)throw"unknown resource type";return d},confIsValid:function(d){return d.blob||d.urlTemplate}})})},"JBrowse/View/FileDialog/TrackList/GTFDriver":function(){define(["dojo/_base/declare","JBrowse/Util","JBrowse/Model/FileBlob","JBrowse/Model/XHRBlob"],function(k,l,h,g){var f=0;return k(null,{storeType:"JBrowse/Store/SeqFeature/GTF",
tryResource:function(d,e){if("gtf"==e.type){var c=l.basename(e.file?e.file.name:e.url?e.url:"");if(!c)return!1;c="GTF_"+c+"_"+f++;d[c]={type:this.storeType,blob:this._makeBlob(e),name:c};return!0}return!1},finalizeConfiguration:function(d){},_makeBlob:function(d){d=d.file?new h(d.file):d.url?new g(d.url):null;if(!d)throw"unknown resource type";return d},confIsValid:function(d){return d.blob||d.urlTemplate}})})},"JBrowse/View/FileDialog/TrackList/VCFTabixDriver":function(){define(["dojo/_base/declare",
"./_IndexedFileDriver"],function(k,l){return k(l,{name:"VCF+Tabix",storeType:"JBrowse/Store/SeqFeature/VCFTabix",fileExtension:"vcf.gz",fileConfKey:"file",fileUrlConfKey:"urlTemplate",indexExtension:"vcf.gz.tbi",indexConfKey:"tbi",indexUrlConfKey:"tbiUrlTemplate"})})},"JBrowse/View/FileDialog/TrackList/BEDTabixDriver":function(){define(["dojo/_base/declare","./_IndexedFileDriver"],function(k,l){return k(l,{name:"BED+Tabix",storeType:"JBrowse/Store/SeqFeature/BEDTabix",fileExtension:"bed.gz",fileConfKey:"file",
fileUrlConfKey:"urlTemplate",indexExtension:"bed.gz.tbi",indexConfKey:"tbi",indexUrlConfKey:"tbiUrlTemplate"})})},"JBrowse/View/FileDialog/TrackList/GFF3TabixDriver":function(){define(["dojo/_base/declare","./_IndexedFileDriver"],function(k,l){return k(l,{name:"GFF3+Tabix",storeType:"JBrowse/Store/SeqFeature/GFF3Tabix",fileExtension:"gff3.gz",fileConfKey:"file",fileUrlConfKey:"urlTemplate",indexExtension:"gff3.gz.tbi",indexConfKey:"tbi",indexUrlConfKey:"tbiUrlTemplate"})})},"JBrowse/View/FileDialog/TrackList/BEDDriver":function(){define(["dojo/_base/declare",
"JBrowse/Util","JBrowse/Model/FileBlob","JBrowse/Model/XHRBlob"],function(k,l,h,g){var f=0;return k(null,{storeType:"JBrowse/Store/SeqFeature/BED",tryResource:function(d,e){if("bed"==e.type){var c=l.basename(e.file?e.file.name:e.url?e.url:"",[".bed"]);if(!c)return!1;var b="BED_"+c+"_"+f++;d[b]={type:this.storeType,fileBasename:c,blob:this._makeBlob(e),name:b};return!0}return!1},finalizeConfiguration:function(d){},_makeBlob:function(d){d=d.file?new h(d.file):d.url?new g(d.url):null;if(!d)throw"unknown resource type";
return d},confIsValid:function(d){return d.blob||d.urlTemplate}})})},"JBrowse/View/FileDialog/ResourceList":function(){define(["dojo/_base/declare","dojo/_base/array","dojo/dom-construct","dijit/form/Select"],function(k,l,h,g){return k(null,{constructor:function(f){this.dialog=f.dialog;this.domNode=h.create("div",{className:"resourceList"});this._updateView()},clearLocalFiles:function(){this._resources=l.filter(this._resources||[],function(f){return!f.file});this._notifyChange()},_notifyChange:function(){this.onChange(l.map(this._resources||
[],function(f){var d={};f.file&&(d.file=f.file);f.url&&(d.url=f.url);d.type=f.type.get("value");return d}))},_addResources:function(f){var d={};f=(this._resources||[]).concat(f);this._resources=l.filter(f.reverse(),function(e){e=e.file&&e.file.name||e.url;return d[e]?!1:d[e]=!0}).reverse();this._updateView();this._notifyChange()},addLocalFiles:function(f){this._addResources(l.map(f,function(d){return{file:d}}))},clearURLs:function(){this._resources=l.filter(this._resources||[],function(f){return!f.url});
this._notifyChange()},addURLs:function(f){this._addResources(l.map(f,function(d){return{url:d}}))},onChange:function(){},_updateView:function(){var f=this.domNode;h.empty(f);h.create("h3",{innerHTML:"Files and URLs"},f);if((this._resources||[]).length){var d=h.create("table",{},f);l.forEach(this._resources,function(e,c){var b=this,a=h.create("tr",{},d),f=e.url||e.file.name,k=new g({options:[{label:'\x3cspan class\x3d"ghosted"\x3efile type?\x3c/span\x3e',value:null},{label:"GFF3",value:"gff3"},{label:"GTF",
value:"gtf"},{label:"BigWig",value:"bigwig"},{label:"BAM",value:"bam"},{label:"BAM index",value:"bam.bai"},{label:"FASTA",value:"fasta"},{label:"2bit",value:"2bit"},{label:"FASTA index",value:"fai"},{label:"VCF+bgzip",value:"vcf.gz"},{label:"BED+bgzip",value:"bed.gz"},{label:"BED",value:"bed"},{label:"GFF3+bgzip",value:"gff3.gz"},{label:"Tabix index",value:"vcf.gz.tbi"},{label:"Tabix index",value:"gff3.gz.tbi"},{label:"Tabix index",value:"bed.gz.tbi"}],value:this.guessType(f),onChange:function(){b._rememberedTypes=
b._rememberedTypes||{};b._rememberedTypes[f]=this.get("value");b._notifyChange()}});k.placeAt(dojo.create("td",{width:"4%"},a));e.type=k;dojo.create("td",{width:"1%",innerHTML:'\x3cdiv class\x3d"'+(e.file?"dijitIconFile":"jbrowseIconLink")+'"\x3e\x3c/div\x3e'},a);dojo.create("td",{innerHTML:f},a);dojo.create("td",{width:"1%",innerHTML:'\x3cdiv class\x3d"dijitIconDelete"\x3e\x3c/div\x3e',onclick:function(a){a.preventDefault&&a.preventDefault();b.deleteResource(e)}},a)},this)}else h.create("div",{className:"emptyMessage",
innerHTML:"Add files and URLs using the controls above."},f);h.create("div",{className:"connector",innerHTML:"\x26nbsp;"},f)},deleteResource:function(f){this._resources=l.filter(this._resources||[],function(d){return d!==f});this._updateView();this._notifyChange()},guessType:function(f){return(this._rememberedTypes||{})[f]||(/\.bam$/i.test(f)?"bam":/\.bam.bai$/i.test(f)?"bam.bai":/\.gff3?$/i.test(f)?"gff3":/\.gtf?$/i.test(f)?"gtf":/\.(bw|bigwig)$/i.test(f)?"bigwig":/\.(fa|fasta)$/i.test(f)?"fasta":
/\.2bit$/i.test(f)?"2bit":/\.fai$/i.test(f)?"fai":/\.vcf\.gz$/i.test(f)?"vcf.gz":/\.bed\.gz$/i.test(f)?"bed.gz":/\.bed$/i.test(f)?"bed":/\.gff3?\.gz$/i.test(f)?"gff3.gz":/\.gff3?\.gz.tbi$/i.test(f)?"gff3.gz.tbi":/\.vcf.gz.tbi$/i.test(f)?"vcf.gz.tbi":/\.bed.gz.tbi$/i.test(f)?"bed.gz.tbi":null)}})})},"JBrowse/View/FileDialog/TrackList":function(){define("dojo/_base/declare dojo/_base/array dojo/dom-construct JBrowse/Util dijit/form/TextBox dijit/form/Select dijit/form/Button JBrowse/View/TrackConfigEditor".split(" "),
function(k,l,h,g,f,d,e,c){return k(null,{constructor:function(b){this.browser=b.browser;this.fileDialog=b.fileDialog;this.domNode=h.create("div",{className:"trackList",innerHTML:"track list!"});this._updateDisplay()},getTrackConfigurations:function(){return g.dojof.values(this.trackConfs||{})},update:function(b){this.storeConfs={};this.trackConfs={};this._makeStoreConfs(b);this._makeTrackConfs();this._updateDisplay()},_makeStoreConfs:function(b){this.storeConfs=this.storeConfs||{};for(var a=this.fileDialog.getFileTypeDrivers(),
c=0;b.length&&b.length!=c;)b=l.filter(b,function(b){return!l.some(a,function(a){return a.tryResource(this.storeConfs,b)},this)},this),c=b.length;l.forEach(a,function(a){a.finalizeConfiguration(this.storeConfs)},this);b.length&&console.warn("Not all resources could be assigned to tracks.  Unused resources:",b)},_makeTrackConfs:function(){var b=this.browser.getTrackTypes().trackTypeDefaults,a={},c;for(c in this.storeConfs)if(this.storeConfs[c].fileBasename){var d=this.storeConfs[c].fileBasename.replace(/\.(coverage|density|histograms?)$/,
"");d!=this.storeConfs[c].fileBasename&&(a[d]={store:this.storeConfs[c],name:c,used:!1})}for(c in this.storeConfs){var d=this.storeConfs[c],e=b[d.type]||"JBrowse/View/Track/CanvasFeatures";this.trackConfs=this.trackConfs||{};this.trackConfs[c]={store:this.storeConfs[c],label:c,key:c.replace(/_\d+$/,"").replace(/_/g," "),type:e,category:"Local tracks",autoscale:"local"};if(d=a[d.fileBasename])this.trackConfs[c].histograms={store:d.store,description:d.store.fileBasename},d.used=!0}for(c in a)a[c].used&&
delete this.trackConfs[a[c].name]},_delete:function(b){delete (this.trackConfs||{})[b];this._updateDisplay()},_updateDisplay:function(){var b=this;h.empty(this.domNode);h.create("h3",{innerHTML:"New Tracks"},this.domNode);if(g.dojof.keys(this.trackConfs||{}).length){var a=h.create("table",{innerHTML:'\x3ctr class\x3d"head"\x3e\x3cth\x3eName\x3c/th\x3e\x3cth\x3eDisplay\x3c/th\x3e\x3cth\x3e\x3c/th\x3e\x3c/tr\x3e'},this.domNode),m=this.browser.getTrackTypes(),k;for(k in this.trackConfs){var q=this.trackConfs[k],
s=h.create("tr",{},a);(new f({value:q.key,onChange:function(){q.key=this.get("value")}})).placeAt(h.create("td",{className:"name"},s));(new d({options:l.map(m.knownTrackTypes,function(a){return{label:m.trackTypeLabels[a]||a.replace("JBrowse/View/Track/","").replace(/\//g," "),value:a}}),value:q.type,onChange:function(){q.type=this.get("value")}})).placeAt(h.create("td",{className:"type"},s));(new e({className:"edit",title:"edit configuration",innerHTML:"Edit Configuration",onClick:function(a){return function(){(new c(a)).show(function(c){dojo.mixin(a,
c.conf);b._updateDisplay()})}}(q)})).placeAt(h.create("td",{className:"edit"},s));dojo.create("td",{width:"1%",innerHTML:'\x3cdiv class\x3d"dijitIconDelete"\x3e\x3c/div\x3e',onclick:function(a){a.preventDefault&&a.preventDefault();b._delete(k)}},s);h.create("td",{className:"type"},s)}}else h.create("div",{className:"emptyMessage",innerHTML:"None"},this.domNode)}})})},"JBrowse/View/FastaFileDialog":function(){define("dojo/_base/declare dijit/form/Button dijit/form/RadioButton dojo/dom-construct dojo/query JBrowse/View/FileDialog ./FileDialog/TrackList/IndexedFASTADriver ./FileDialog/TrackList/TwoBitDriver".split(" "),
function(k,l,h,g,f,d,e,c){return k(d,{constructor:function(b){this.inherited(arguments);this._fileTypeDrivers=[new e,new c];return this},show:function(b){b.introMsg="Select a FASTA file (.fa), indexed FASTA (.fa and .fai), or twobit (.2bit) file";this.inherited(arguments);this.dialog.set("title","Open sequence file")},_makeActionBar:function(b,a){var c=g.create("div",{className:"dijitDialogPaneActionBar"}),d=this.refSeqOrderChoice=[new h({id:"sortAlpha",value:"sortAlpha",checked:!0}),new h({id:"sortLength",
value:"sortLength"}),new h({id:"noSort",value:"noSort"})],e=g.create("div",{className:"aux"},c);d[0].placeAt(e);g.create("label",{"for":"sortAlpha",innerHTML:"Sort refseqs by name"},e);d[1].placeAt(e);g.create("label",{"for":"sortLength",innerHTML:"Sort refseqs by length"},e);d[2].placeAt(e);g.create("label",{"for":"noSort",innerHTML:"Use order from file"},e);(new l({iconClass:"dijitIconDelete",label:"Cancel",onClick:dojo.hitch(this,function(){a&&a();this.dialog.hide()})})).placeAt(c);(new l({iconClass:"dijitIconFolderOpen",
label:"Open",onClick:dojo.hitch(this,function(){b&&b({trackConfs:this.trackList.getTrackConfigurations(),refSeqOrder:this.refSeqOrderChoice[0].checked?"alphabetic descending":this.refSeqOrderChoice[1].checked?"length descending":void 0});this.dialog.hide()})})).placeAt(c);return{domNode:c}}})})},"JBrowse/View/FileDialog/TrackList/IndexedFASTADriver":function(){define(["dojo/_base/declare","./_IndexedFileDriver"],function(k,l){return k(l,{name:"FASTA",storeType:"JBrowse/Store/SeqFeature/IndexedFasta",
fileExtension:"fasta",fileConfKey:"fasta",fileUrlConfKey:"urlTemplate",indexExtension:"fai",indexConfKey:"fai",indexUrlConfKey:"faiUrlTemplate",tryResource:function(h,g){this.inherited(arguments)},finalizeConfiguration:function(h){this.inherited(arguments);for(var g in h){var f=h[g];!f.fai&&!f.blob&&(f.type="JBrowse/Store/SeqFeature/UnindexedFasta")}}})})},"JBrowse/View/FileDialog/TrackList/TwoBitDriver":function(){define(["dojo/_base/declare","JBrowse/Util","JBrowse/Model/FileBlob","JBrowse/Model/XHRBlob"],
function(k,l,h,g){var f=0;return k(null,{storeType:"JBrowse/Store/SeqFeature/TwoBit",tryResource:function(d,e){if("2bit"==e.type){var c=l.basename(e.file?e.file.name:e.url?e.url:"",[".2bit"]);if(!c)return!1;var b="TwoBit_"+c+"_"+f++;d[b]={fileBasename:c,type:this.storeType,blob:this._makeBlob(e),name:b};return!0}return!1},finalizeConfiguration:function(d){},_makeBlob:function(d){d=d.file?new h(d.file):d.url?new g(d.url):null;if(!d)throw"unknown resource type";return d},confIsValid:function(d){return d.blob||
d.urlTemplate}})})},"JBrowse/Store/SeqFeature/IndexedFasta":function(){define("dojo/_base/declare dojo/_base/lang dojo/request dojo/promise/all dojo/Deferred JBrowse/Store/SeqFeature JBrowse/Util JBrowse/Digest/Crc32 JBrowse/Model/XHRBlob JBrowse/Store/DeferredFeaturesMixin ./IndexedFasta/File".split(" "),function(k,l,h,g,f,d,e,c,b,a,m){return k([d,a],{constructor:function(a){var c=a.fasta||new b(this.resolveUrl(a.urlTemplate||"data.fasta"));a=a.fai||new b(this.resolveUrl(a.faiUrlTemplate||(a.urlTemplate?
a.urlTemplate+".fai":"data.fasta.fai")));this.index={};this.fasta=new m({store:this,data:c,fai:a});this.fasta.init({success:l.hitch(this,function(){this._deferred.features.resolve({success:!0})}),failure:l.hitch(this,"_failAllDeferred")})},_getFeatures:function(a,b,c,d){this.fasta.fetch(this.refSeq.name,a.start,a.end,b,c,d)},getRefSeqs:function(a,b){var c=this;this._deferred.features.then(function(){var b=Object.keys(c.fasta.store.index).map(function(a){return c.fasta.store.index[a]});a(b)},b)},saveStore:function(){return{urlTemplate:(this.config.file||
this.config.blob).url}}})})},"JBrowse/Store/SeqFeature":function(){define(["dojo/_base/declare","dojo/_base/lang","JBrowse/Store","JBrowse/Store/LRUCache"],function(k,l,h,g){return k(h,{constructor:function(f){this.globalStats={};this.storeTimeout=f.storeTimeout||500},_evalConf:function(f,d){return"function"==typeof f?f.call(this,this):f},getGlobalStats:function(f,d){f(this.globalStats||{})},getRegionStats:function(f,d,e){return this._getRegionStats.apply(this,arguments)},_getRegionStats:function(f,
d,e){var c=this;(c._regionStatsCache=c._regionStatsCache||new g({name:"regionStatsCache",maxSize:1E3,sizeFunction:function(b){return 1},fillCallback:function(b,a){var d={scoreMax:-Infinity,scoreMin:Infinity,scoreSum:0,scoreSumSquares:0,basesCovered:b.end-b.start,featureCount:0};c.getFeatures(b,function(a){a=a.get("score")||0;d.scoreMax=Math.max(a,d.scoreMax);d.scoreMin=Math.min(a,d.scoreMin);d.scoreSum+=a;d.scoreSumSquares+=a*a;d.featureCount++},function(){d.scoreMean=d.featureCount?d.scoreSum/d.featureCount:
0;d.scoreStdDev=c._calcStdFromSums(d.scoreSum,d.scoreSumSquares,d.featureCount);d.featureDensity=d.featureCount/d.basesCovered;a(d)},function(b){a(null,b)})}})).get(f,function(b,a){a?e(a):d(b)})},_calcStdFromSums:function(f,d,e){if(0==e)return 0;f=d-f*f/e;1<e&&(f/=e-1);return 0>f?0:Math.sqrt(f)},getFeatures:function(f,d,e,c){e()},getReferenceSequence:function(f,d,e){for(var c=f.end-f.start,b="";b.length<c;)b+=" ";this.getFeatures(l.mixin({reference_sequences_only:!0},f),function(a){var c=a.get("residues")||
a.get("seq");if(c){var d=b;a=a.get("start")-f.start;var e=0;0>a&&(e=-a,a=0);var g=Math.min(d.length-a,c.length-e);b=d.substr(0,a)+c.substr(e,g)+d.substr(a+g)}},function(){d(b)},e)},saveStore:function(){}})})},"JBrowse/Store":function(){define(["dojo/_base/declare","JBrowse/Component"],function(k,l){var h=0;return k(l,{namePrefix:"store-",constructor:function(g){this.refSeq=dojo.clone(g.refSeq);this.name=g.name||this.namePrefix+ ++h;this.changeCallback=g.changeCallback||function(){}},notifyChanged:function(g){this.changeCallback&&
this.changeCallback(g)},_failAllDeferred:function(g){var f=this._deferred||{},d;for(d in f)f.hasOwnProperty(d)&&f[d].reject(g)}})})},"JBrowse/Store/DeferredFeaturesMixin":function(){define(["dojo/_base/declare","dojo/Deferred"],function(k,l){return k(null,{constructor:function(h){this._deferFeatures()},_deferFeatures:function(){this._deferred||(this._deferred={});this._deferred.features=new l},getFeatures:function(h,g,f,d){this._deferred.features.then(dojo.hitch(this,"_getFeatures",h,g,f,d),d)}})})},
"JBrowse/Store/SeqFeature/IndexedFasta/File":function(){define("dojo/_base/declare dojo/_base/array JBrowse/has JBrowse/Util JBrowse/Errors JBrowse/Model/SimpleFeature".split(" "),function(k,l,h,g,f,d){return k(null,{constructor:function(d){this.store=d.store;this.data=d.data;this.fai=d.fai;this.chunkSizeLimit=d.chunkSizeLimit||5E5},init:function(d){var c=d.success||function(){};d=d.failure||function(b){console.error(b,b.stack)};this._readFAI(dojo.hitch(this,function(){c()}),d)},_readFAI:function(d,
c){this.fai.fetch(dojo.hitch(this,function(b){if(b){var a="";b=new Uint8Array(b);for(var f=b.length,g=0;g<f;g++)a+=String.fromCharCode(b[g]);a.split(/\r?\n/).forEach(dojo.hitch(this,function(a){a=a.split("\t");""!=a[0]&&(this.store.index[a[0]]={name:a[0],length:+a[1],start:0,end:+a[1],offset:+a[2],linelen:+a[3],linebytelen:+a[4]})}));d()}else c("No data read from FASTA index (FAI) file")}),c)},fetch:function(e,c,b,a,f,g){g=g||function(a){console.error(a)};var h=e;this.store.browser.compareReferenceNames(e,
h)||(h=e);e=this.store.index[h];var k=Math.max(0,c);c=this._fai_offset(e,k);e=this._fai_offset(e,b)-c;this.data.read(c,e,function(c){var e="";c=new Uint8Array(c);for(var g=c.length,n=0;n<g;n++)e+=String.fromCharCode(c[n]);e=e.replace(/\s+/g,"");a(new d({data:{start:k,end:b,residues:e,seq_id:h,name:h}}));f()},function(a){g(a)})},_fai_offset:function(d,c){return d.offset+d.linebytelen*Math.floor(c/d.linelen)+c%d.linelen}})})},"JBrowse/Model/SimpleFeature":function(){define(["JBrowse/Util"],function(k){var l=
0,h=k.fastDeclare({constructor:function(g){g=g||{};this.data=g.data||{};this._parent=g.parent;this._uniqueID=g.id||this.data.uniqueID||(this._parent?this._parent.id()+"_"+l++:"SimpleFeature_"+l++);if(g=this.data.subfeatures)for(var f=0;f<g.length;f++)"function"!=typeof g[f].get&&(g[f]=new h({data:g[f],parent:this}))},get:function(g){return this.data[g]},set:function(g,f){this.data[g]=f},tags:function(){var g=[],f=this.data,d;for(d in f)f.hasOwnProperty(d)&&g.push(d);return g},id:function(g){g&&(this._uniqueID=
g);return this._uniqueID},parent:function(){return this._parent},children:function(){return this.get("subfeatures")}});return h})},"JBrowse/Store/SeqFeature/UnindexedFasta":function(){define("dojo/_base/declare dojo/_base/lang dojo/request dojo/promise/all dojo/Deferred JBrowse/Store/SeqFeature JBrowse/Util JBrowse/Digest/Crc32 JBrowse/Model/XHRBlob JBrowse/Store/DeferredFeaturesMixin ./UnindexedFasta/File".split(" "),function(k,l,h,g,f,d,e,c,b,a,m){return k([d,a],{constructor:function(a){a=a.fasta||
a.blob||new b(this.resolveUrl(a.urlTemplate||"data.fasta"));this.index={};this.fasta=new m({store:this,data:a});this.fasta.init({success:l.hitch(this,function(){this._deferred.features.resolve({success:!0})}),failure:l.hitch(this,"_failAllDeferred")})},_getFeatures:function(a,b,c,d){this.fasta.fetch(this.refSeq.name,a.start,a.end,b,c,d)},getRefSeqs:function(a,b){var c=this;this._deferred.features.then(function(){a(c.fasta.refseqs)},b)},saveStore:function(){return{urlTemplate:(this.config.file||this.config.blob).url}}})})},
"JBrowse/Store/SeqFeature/UnindexedFasta/File":function(){define("dojo/_base/declare dojo/_base/array dojo/Deferred JBrowse/has JBrowse/Util JBrowse/Errors JBrowse/Model/SimpleFeature".split(" "),function(k,l,h,g,f,d,e){return k(null,{constructor:function(c){this.store=c.store;this.data=c.data;this.features={};this.refseqs=[]},init:function(c){var b=this,a=c.success||function(){};this.parseFile(this.data,function(c){l.forEach(c,function(a){b.features[a.name]={seq_id:a.name,name:a.name,start:0,end:a.seq.length,
seq:a.seq};b.refseqs.push({name:a.name,start:0,end:a.seq.length,length:a.seq.length})});a()},c.failure||function(a){console.error(a,a.stack)})},fetch:function(c,b,a,d,f,g){b=c;this.store.browser.compareReferenceNames(c,b)||(b=c);d(new e({data:{start:this.features[b].start,end:this.features[b].end,residues:this.features[b].seq,seq_id:b,name:b}}));f()},parseFile:function(c,b,a){this.data.fetch(dojo.hitch(this,function(d){var e="";d=new Uint8Array(d);for(var f=d.length,g=0;g<f;g++)e+=String.fromCharCode(d[g]);
!e||!e.length?a("Could not read file: "+c.name):(e=this.parseString(e),e.length?b(e):a("File contained no (FASTA) sequences"))}),a)},parseString:function(c){var b=[],a=function(a){"name"in a&&a.seq.length&&b.push(a)},d={seq:""};c=c.match(/^.*((\r\n|\n|\r)|$)/gm);for(var e=0;e<c.length;e++){var f;if(f=/^>(\S*)/.exec(c[e]))a(d),d={seq:""},f[1].length&&(d.name=f[1]);else if(f=/^\s*(\S+)\s*$/.exec(c[e]))d.seq+=f[1]}a(d);return b}})})},"JBrowse/Store/SeqFeature/TwoBit":function(){define("dojo/_base/declare dojo/_base/array dojo/_base/lang dojo/Deferred dojo/promise/all JBrowse/has JBrowse/Model/XHRBlob JBrowse/Store/SeqFeature JBrowse/Store/DeferredFeaturesMixin ./TwoBit/File".split(" "),
function(k,l,h,g,f,d,e,c,b,a){return k([c,b],{constructor:function(b){b=b.blob||new e(this.resolveUrl(b.urlTemplate||"data.2bit"));this.twoBit=new a({data:b,store:this});ArrayBuffer.prototype.slice||(ArrayBuffer.prototype.slice=function(a,b){void 0===a&&(a=0);void 0===b&&(b=this.byteLength);a=Math.floor(a);b=Math.floor(b);0>a&&(a+=this.byteLength);0>b&&(b+=this.byteLength);a=Math.min(Math.max(0,a),this.byteLength);b=Math.min(Math.max(0,b),this.byteLength);if(0>=b-a)return new ArrayBuffer(0);var c=
new ArrayBuffer(b-a),d=new Uint8Array(c),e=new Uint8Array(this,a,b-a);d.set(e);return c});d("typed-arrays")?this.twoBit.init({success:h.hitch(this,function(){this._deferred.features.resolve({success:!0})}),failure:h.hitch(this,"_failAllDeferred")}):this._failAllDeferred("This web browser lacks support for JavaScript typed arrays.")},hasRefSeq:function(a,b,c){var d=this;this._deferred.features.then(function(){b(a in d.twoBit.chrToIndex)},c)},getRefSeqs:function(a,b){var c=this;this._deferred.features.then(function(){var d=
Object.keys(c.twoBit.chrToIndex),d=l.map(d,function(a){var b=new g;c.twoBit._readSequenceHeader(a,function(c){b.resolve({name:a,length:c.dnaSize,end:c.dnaSize,start:0})},function(a){b.reject(a)});return b});f(d).then(function(b){a(b)},function(a){b(a)})},b)},_getFeatures:function(a,b,c,d){this.twoBit.fetch(a,b,c,d)},saveStore:function(){return{urlTemplate:(this.config.file||this.config.blob).url}}})})},"JBrowse/Store/SeqFeature/TwoBit/File":function(){define("dojo/_base/declare dojo/_base/array dojo/_base/lang JBrowse/Model/XHRBlob JBrowse/Util dojo/Deferred dojo/when dojo/promise/all".split(" "),
function(k,l,h,g,f,d,e,c){var b=f.fastDeclare({constructor:function(a){this.start=a.start;this.end=a.end;this.seq=a.seq;this.seq_id=a.seq_id},get:function(a){return this[a]},tags:function(){return["seq_id","start","end","seq"]}}),a=[26,65,39,67];return k(null,{constructor:function(a){this.numSeqs=0;this.byteSwapped=!1;this.data=a.data;this.store=a.store;this.maxChunkSize=a.maxChunkSize||5E6;this.chunkCache={};this.headers={};this.seqChunkSize=a.seqChunkSize||5E3;this.seqHeader=[]},init:function(a){var b=
a.success||function(){},c=a.failure||function(a){console.error(a)};this._read2bitHeader(dojo.hitch(this,function(){this._read2bitIndex(b,c)}),c)},_read2bitHeader:function(b,c){this.data.read(0,15,dojo.hitch(this,function(d){var e=this._toByteArray(d,0,4);this._arrayEquals(e,a)||(this._arrayEquals(this.byteSwap(e),a)?this.byteSwapped=!0:c("Not a 2bit file"),this.numSeqs=this._toInteger(d,8,12),b())}),c)},_read2bitIndex:function(a,b){this.chrToIndex={};this.offset=[];0==this.numSeqs?a():this.data.read(16,
261*this.numSeqs,dojo.hitch(this,function(b){for(var c=0,d=0;d<this.numSeqs;d++){var e=this._toInteger(b,c,c+1);c++;var f=this._toString(b,c,c+e);this.chunkCache[f]=[];this.chrToIndex[f]=d;c+=e;this.offset[d]=this._toInteger(b,c,c+4);c+=4}a()}),b)},_arrayEquals:function(a,b){if(a.length!=b.length)return!1;for(var c in a)if(a[c]!=b[c])return!1;return!0},_toString:function(a,b,c){a=this._toByteArray(a,b,c);b="";if("number"==typeof a)return String.fromCharCode(a);for(var d in a)b+=String.fromCharCode(a[d]);
return b},_toInteger:function(a,b,c){a=this._toByteArray(a,b,c);this.byteSwapped&&(a=this.byteSwap(a));for(c=b=0;c<a.length;c++)b+=a[c]<<8*(a.length-1-c);return b},byteSwap:function(a){return a.length&&1<a.length?a.reverse():a},_toByteArray:function(a,b,c){a=void 0!==b&&void 0!==c?a.slice(b,c):void 0!==b?a.slice(b):a;a=new Uint8Array(a);b=[];for(c=0;c<a.length;c++)b.push(a[c]);return b},fetch:function(a,b,c,d){d=d||function(a){console.error(a)};var e=a.ref;if(!(e in this.chrToIndex)&&c)c();else{var f=
{query:a,seqFunc:dojo.hitch(this,"_fetchSequence"),callback:b,endCallback:c,errorCallback:d},g=this.headers[e];g?g.loaded?this._fetchSequence(a,g,b,c,d):g.error?d(g.error):g.callbacks.push(f):(this.headers[e]={loaded:!1,callbacks:[f]},this._readSequenceHeader(e,dojo.hitch(this,function(a,b){h.mixin(a,b);a.loaded=!0;l.forEach(a.callbacks,function(a){a.seqFunc(a.query,b,a.callback,a.endCallback,a.errorCallback)});delete a.callbacks},this.headers[e]),dojo.hitch(this,function(a,b){a.error=b;l.forEach(a.callbacks,
function(a){a.errorCallback(b)});delete a.callbacks},this.headers[e])))}},_readSequenceHeader:function(a,b,f){var g=this.chrToIndex[a];if(this.seqHeader[g])b(this.seqHeader[g]);else{var h=this.offset[g];this.data.read(h,7,dojo.hitch(this,function(a){var m=h,k=this._toInteger(a,0,4);a=this._toInteger(a,4,8);var m=m+8,l=new d;a?this.data.read(m,8*a-1,dojo.hitch(this,function(a){l.resolve(a,!0)}),f):l=[];var m=m+8*a,x=new d;this.data.read(m,4,dojo.hitch(this,function(a){var b=this._toInteger(a,0,4);
m+=4;b?this.data.read(m,8*b-1,dojo.hitch(this,function(a){m+=8*b;x.resolve(a,!0)}),f):x.resolve([],!0)}),f);e(c([l,x]),dojo.hitch(this,function(a){m+=4;a={dnaSize:k,nBlockData:a[0],maskData:a[1],dnaStart:m,dnaEnd:this.offset[g+1]};this.seqHeader[g]=a;b(a)}))}),f)}},_toBases:function(a){var b=["T","C","A","G"],c=a>>4&15;a&=15;return[c>>2&3,c&3,a>>2&3,a&3].map(function(a){return b[a]})},_toBaseString:function(a){var b="",c;for(c in a)b+=this._toBases(a[c]).join("");return b},_applyNBlocks:function(a,
b,c,d){for(var e in d){var f=Math.max(0,d[e].start-b),g=d[e].size+Math.min(0,d[e].start-b),g=Math.max(0,Math.min(g,c-Math.max(d[e].start,b)));a=[a.slice(0,f),this._nBlock(g),a.slice(f+g)].join("")}return a},_applyMasks:function(a,b,c,d){for(var e in d){var f=Math.max(0,d[e].start-b),g=d[e].size+Math.min(0,d[e].start-b),g=Math.max(0,Math.min(g,c-d[e].start));a=[a.slice(0,f),a.slice(f,f+g).toLowerCase(),a.slice(f+g)].join("")}return a},_nBlock:function(a){return Array(a+1).join("N")},_getApplicable:function(a,
b,c){var d=[],e=this._findApplicable(a,b,c);if(e){d.push(e);for(var f=e.index+1;f<a.byteLength/8;){var g=4*f,h=g+a.byteLength/2,g=this._toInteger(a,g,g+4),h=this._toInteger(a,h,h+4);if(g<=c)d.push({start:g,size:h}),f++;else break}for(f=e.index-1;0<=f;)if(g=4*f,h=g+a.byteLength/2,g=this._toInteger(a,g,g+4),h=this._toInteger(a,h,h+4),g+h>b)d.unshift({start:g,size:h}),f--;else break}return d},_findApplicable:function(a,b,c,d,e){void 0===e&&(e=(a.byteLength||0)/8-1);void 0===d&&(d=0);if(!(d>e)){var f=
Math.floor((d+e)/2),g=4*f,h=g+a.byteLength/2,g=this._toInteger(a,g,g+4),h=this._toInteger(a,h,h+4);return g+h>b&&g<=c?{start:g,size:h,index:f}:g>c?this._findApplicable(a,b,c,d,f-1):this._findApplicable(a,b,c,f+1,e)}},_fetchSequence:function(a,c,d,e,f){var g="number"==typeof a.start?a.start:parseInt(a.start),h="number"==typeof a.end?a.end:parseInt(a.end),g=Math.max(0,g),k=a.seqChunkSize||this.refSeq&&this.refSeq.name==a.ref&&this.refSeq.seqChunkSize||this.seqChunkSize,v=Math.floor(Math.max(0,g)/k),
x=Math.floor((h-1)/k),w=this.store.browser.regularizeReferenceName(a.ref);d=function(){var c=[],f=x-v+1,g=d;return function(d,h,k,n){c[n]=k;0==--f&&(g(new b({seq_id:a.ref,start:d,end:h,seq:c.join("")})),e&&e())}}();var y={start:g,end:h,success:d,error:f};this.chunkCache[w]||(this.chunkCache[w]=[]);for(var w=this.chunkCache[w],z=v;z<=x;z++){var A=w[z];if(A)A.loaded?d(g,h,A.sequence.substring(g-z*k,h-z*k),z):A.error?f(A.error):A.callbacks.push(y);else{w[z]={loaded:!1,num:z,callbacks:[y]};var D=z*k,
C=Math.min(c.dnaSize,(z+1)*k),B=this._getApplicable(c.nBlockData,D,C),I=this._getApplicable(c.maskData,D,C),A=c.dnaStart+Math.floor(D/4),M=D%4,K=c.dnaStart+Math.ceil(C/4),G=M+(C-D),K=K-A-1;0<=K&&this.data.read(A,K,dojo.hitch(this,function(a,b){var c=this._toByteArray(b),d=this._toBaseString(c),d=d.slice(M,G),d=this._applyNBlocks(d,D,C,B),d=this._applyMasks(d,D,C,I);a.sequence=d;a.loaded=!0;l.forEach(a.callbacks,function(b){b.success(b.start,b.end,d.substring(b.start-a.num*k,b.end-a.num*k),a.num)});
delete a.callbacks},w[z]),dojo.hitch(this,function(a,b){a.error=b;l.forEach(a.callbacks,function(a){a.error(b)});delete a.callbacks}),w[z])}}}})})},"JBrowse/View/LocationChoiceDialog":function(){define("dojo/_base/declare dojo/dom-construct dojo/aspect dijit/Dialog dijit/form/Button dijit/focus JBrowse/View/LocationList".split(" "),function(k,l,h,g,f,d,e){return k(null,{constructor:function(c){this.browser=c.browser;this.config=dojo.clone(c.config||{});this.locationChoices=c.locationChoices||[];this.title=
c.title||"Choose location";this.prompt=c.prompt;this.goCallback=c.goCallback;this.showCallback=c.showCallback},show:function(){var c=this.dialog=new g({title:this.title,className:"locationChoiceDialog",style:{width:"70%"}}),b=l.create("div",{});this.prompt&&l.create("div",{className:"prompt",innerHTML:this.prompt},b);var a=this.browser;this.locationListView=new e({browser:a,locations:this.locationChoices,buttons:[{className:"show",innerHTML:"Show",onClick:this.showCallback||function(b){a.showRegionAfterSearch(b)}},
{className:"go",innerHTML:"Go",onClick:this.goCallback||function(b){c.hide();a.showRegionAfterSearch(b)}}]},l.create("div",{className:"locationList",style:{maxHeight:0.5*this.browser.container.offsetHeight+"px"}},b));this.actionBar=dojo.create("div",{className:"infoDialogActionBar dijitDialogPaneActionBar"});(new f({iconClass:"dijitIconDelete",label:"Cancel",onClick:dojo.hitch(c,"hide")})).placeAt(this.actionBar);c.set("content",[b,this.actionBar]);c.show();h.after(c,"hide",dojo.hitch(this,function(){d.curNode&&
d.curNode.blur();setTimeout(function(){c.destroyRecursive()},500)}))}})})},"JBrowse/View/LocationList":function(){define("dojo/_base/declare dojo/_base/array dojo/dom-construct dijit/form/Button JBrowse/Util dojo/store/Memory dgrid/OnDemandGrid dgrid/extensions/DijitRegistry".split(" "),function(k,l,h,g,f,d,e,c){var b=k([e,c]);return k(null,{constructor:function(a,c){this.browser=a.browser;var e=l.map(a.locations||[],function(a){return{locstring:f.assembleLocString(a),location:a,label:a.label||a.objectName,
description:a.description,score:a.score,tracks:l.map(l.filter(a.tracks||[],function(a){return a}),function(a){return a.key||a.name||a.label||a}).join(", ")}}),k=[];l.some(e,function(a){return a.label})&&k.unshift({label:"Name",field:"label"});l.some(e,function(a){return a.description})&&k.unshift({label:"Description",field:"description"});l.some(e,function(a){return a.score})&&k.unshift({label:"Score",field:"score"});k.push({label:"Location",field:"locstring"});e.length&&e[0].tracks&&k.push({label:"Track",
field:"tracks"});a.buttons&&k.push({label:"",className:"goButtonColumn",renderCell:function(b,c,d,e){var f=h.create("div");l.forEach(a.buttons,function(a){var h=dojo.mixin({},a);h.onClick=function(){a.onClick(b.location,c,d,e)};(new g(h)).placeAt(f)});return f}});this.grid=new b({columns:k,store:new d({data:e})},c)}})})},"JBrowse/View/Dialog/SetHighlight":function(){define("dojo/_base/declare dojo/dom-construct dijit/focus dijit/form/TextBox JBrowse/View/Dialog/WithActionBar dojo/on dijit/form/Button JBrowse/Model/Location".split(" "),
function(k,l,h,g,f,d,e,c){return k(f,{autofocus:!1,title:"Set highlight",constructor:function(b){this.browser=b.browser;this.setCallback=b.setCallback||function(){};this.cancelCallback=b.cancelCallback||function(){}},_fillActionBar:function(b){var a=this;(new e({iconClass:"dijitIconDelete",label:"Cancel",onClick:function(){a.cancelCallback&&a.cancelCallback();a.hide()}})).placeAt(b);(new e({iconClass:"dijitIconFilter",label:"Highlight",onClick:function(){a.setCallback&&a.setCallback(a.getLocation());
a.hide()}})).placeAt(b)},show:function(b){dojo.addClass(this.domNode,"setHighlightDialog");var a=this.browser.view.visibleRegionLocString();a&&(a+=" (current view)");this.highlightInput=new g({id:"newhighlight_locstring",value:(this.browser.getHighlight()||"").toString()||a||"",placeHolder:a||"ctgA:1234..5678"});this.set("content",[l.create("label",{"for":"newhighlight_locstring",innerHTML:"Location"}),this.highlightInput.domNode]);this.inherited(arguments)},getLocation:function(){return new c(this.highlightInput.get("value"))},
hide:function(){this.inherited(arguments);window.setTimeout(dojo.hitch(this,"destroyRecursive"),500)}})})},"JBrowse/View/Dialog/Preferences":function(){define("dojo/_base/declare dojo/_base/array dojo/dom-construct dijit/focus dijit/form/TextBox JBrowse/View/Dialog/WithActionBar dojo/on dijit/form/Button JBrowse/Model/Location JBrowse/Util".split(" "),function(k,l,h,g,f,d,e,c,b,a){return k(d,{autofocus:!1,title:"Open plugin",constructor:function(a){this.browser=a.browser;this.setCallback=a.setCallback||
function(){};this.cancelCallback=a.cancelCallback||function(){};this.plugins=[]},_fillActionBar:function(a){var b=this;(new c({iconClass:"dijitIconDelete",label:"Cancel",onClick:function(){b.cancelCallback&&b.cancelCallback();b.hide()}})).placeAt(a);(new c({iconClass:"dijitIconFolderOpen",label:"Open",onClick:function(){b.setCallback&&b.setCallback(b.plugins);b.hide()}})).placeAt(a)},show:function(b){dojo.addClass(this.domNode,"fileDialog");var c=h.create("div",{className:"localFilesControl",style:{width:"100%"}}),
d=h.create("div",{className:"dragArea"},c),f;a.isElectron()?f=h.create("input",{type:"button",value:"Select files...",id:"openFile"},d):(f=new dojox.form.Uploader({multiple:!0}),f.placeAt(d),this.browserSupports.dnd&&(f.addDropTarget(this.domNode),h.create("div",{className:"dragMessage",innerHTML:"Select or drag files here."},d)));var g=this;e(f,"click",function(){var b=electronRequire("electron").remote.dialog.showOpenDialog({properties:["openDirectory"]});b&&(b=l.map(b,function(b){return a.replacePath(b)}),
g.plugins.push(b[0]),dojo.byId("plugins_list").innerHTML+=b+"\x3cbr/\x3e")});c=[h.create("div",{className:"intro",innerHTML:"Select plugin directories to load. Note: The name of the directory will also be used as the name of the plugin, which is sometimes important for the plugin loader"}),function(a,b){var c=h.create("div",a);l.forEach(b,dojo.hitch(c,"appendChild"));return c}({className:"resourceControls",style:{width:"100%"}},[c]),h.create("div",{className:"files",id:"plugins_list",innerHTML:"Plugins:\x3cbr/\x3e"})];
this.set("content",c);this.inherited(arguments)},hide:function(){this.inherited(arguments);window.setTimeout(dojo.hitch(this,"destroyRecursive"),500)}})})},"JBrowse/View/Dialog/OpenDirectory":function(){define("dojo/_base/declare dojo/_base/array dojo/dom-construct dijit/focus dijit/form/TextBox JBrowse/View/Dialog/WithActionBar dojo/on dijit/form/Button JBrowse/Model/Location JBrowse/Util".split(" "),function(k,l,h,g,f,d,e,c,b,a){return k(d,{autofocus:!1,title:"Open directory",constructor:function(a){this.browser=
a.browser;this.setCallback=a.setCallback||function(){};this.cancelCallback=a.cancelCallback||function(){};this.datadir=""},_fillActionBar:function(a){var b=this;(new c({iconClass:"dijitIconDelete",label:"Cancel",onClick:function(){b.cancelCallback&&b.cancelCallback();b.hide()}})).placeAt(a);(new c({iconClass:"dijitIconFolderOpen",label:"Open",onClick:function(){b.setCallback&&b.setCallback(b.datadir);b.hide()}})).placeAt(a)},show:function(a){dojo.addClass(this.domNode,"fileDialog");var b=this._makeRemoteURLsControl(),
c=this._makeLocalFileControl(),d=h.create("div",{className:"intro",innerHTML:'Select a data directory to load, either from a "track hub" on the web, or from a local folder on your filesystem'}),b=[c.domNode,b.domNode],c=h.create("div",{className:"resourceControls"});l.forEach(b,dojo.hitch(c,"appendChild"));d=[d,c,h.create("div",{className:"files",id:"data_dir",innerHTML:'\x3cb\x3eResult\x3c/b\x3e:\x3cbr/\x3e\x3cdiv id\x3d"data_dir_list"\x3e\x3c/div\x3e'})];this.set("content",d);this.inherited(arguments)},
_makeRemoteURLsControl:function(){var a=h.create("div",{className:"remoteURLsControl"}),b=this;h.create("h3",{innerHTML:"Remote URLs - \x3csmaller\x3eone per line\x3c/smaller\x3e"},a);var c={domNode:a,onChange:function(a){}};c.input=h.create("textarea",{className:"urlInput",placeHolder:"http://jbrowse.org/data_hub",cols:25,rows:5,spellcheck:!1},a);e(c.input,"change",function(a){dojo.byId("data_dir_list").innerHTML=c.input.value;b.datadir=c.input.value});var d=function(){c.input.value!=b.datadir&&
!b.localopened&&(dojo.byId("data_dir_list").innerHTML=c.input.value,b.datadir=c.input.value);window.setTimeout(d,900)};window.setTimeout(d,900);return c},_makeLocalFileControl:function(){var b=h.create("div",{className:"localFilesControl",style:{width:"50%"}});h.create("h3",{innerHTML:"Local data directories"},b);var c=h.create("div",{className:"dragArea"},b),d;a.isElectron()?d=h.create("input",{type:"button",value:"Select directory...",id:"openFile"},c):(d=new dojox.form.Uploader({multiple:!0}),
d.placeAt(c),this.browserSupports.dnd&&(d.addDropTarget(this.domNode),h.create("div",{className:"dragMessage",innerHTML:"Select or drag files here."},c)));var f=this;e(d,"click",function(){var b=electronRequire("electron").remote.dialog.showOpenDialog({properties:["openDirectory"]});b&&(b=l.map(b,function(b){return a.replacePath(b)}),f.datadir=b[0],f.localopened=!0,dojo.byId("data_dir_list").innerHTML=b[0])});return{domNode:b}},hide:function(){this.inherited(arguments);window.setTimeout(dojo.hitch(this,
"destroyRecursive"),500)}})})},"JBrowse/View/Dialog/SetTrackHeight":function(){define("dojo/_base/declare dojo/dom-construct dijit/focus dijit/form/NumberSpinner JBrowse/View/Dialog/WithActionBar dojo/on dijit/form/Button JBrowse/Model/Location".split(" "),function(k,l,h,g,f,d,e,c){return k(f,{title:"Set new track height",constructor:function(b){this.height=b.height||100;this.browser=b.browser;this.setCallback=b.setCallback||function(){};this.cancelCallback=b.cancelCallback||function(){};this.heightConstraints=
{min:10,max:750}},_fillActionBar:function(b){(new e({label:"OK",onClick:dojo.hitch(this,function(){var a=parseInt(this.heightSpinner.getValue());if(!isNaN(a)&&!(a<this.heightConstraints.min||a>this.heightConstraints.max))this.setCallback&&this.setCallback(a),this.hide()})})).placeAt(b);(new e({label:"Cancel",onClick:dojo.hitch(this,function(){this.cancelCallback&&this.cancelCallback();this.hide()})})).placeAt(b)},show:function(b){dojo.addClass(this.domNode,"setTrackHeightDialog");this.heightSpinner=
new g({value:this.height,smallDelta:10,constraints:this.heightConstraints});this.set("content",[l.create("label",{"for":"newhighlight_locstring",innerHTML:""}),this.heightSpinner.domNode,l.create("span",{innerHTML:" pixels"})]);this.inherited(arguments)},hide:function(){this.inherited(arguments);window.setTimeout(dojo.hitch(this,"destroyRecursive"),500)}})})},"dijit/form/NumberSpinner":function(){define(["dojo/_base/declare","dojo/keys","./_Spinner","./NumberTextBox"],function(k,l,h,g){return k("dijit.form.NumberSpinner",
[h,g.Mixin],{baseClass:"dijitTextBox dijitSpinner dijitNumberTextBox",adjust:function(f,d){var e=this.constraints,c=isNaN(f),b=!isNaN(e.max),a=!isNaN(e.min);c&&0!=d&&(f=0<d?a?e.min:b?e.max:0:b?this.constraints.max:a?e.min:0);var g=f+d;if(c||isNaN(g))return f;b&&g>e.max&&(g=e.max);a&&g<e.min&&(g=e.min);return g},_onKeyDown:function(f){if(!this.disabled&&!this.readOnly&&(f.keyCode==l.HOME||f.keyCode==l.END)&&!f.ctrlKey&&(!f.altKey&&!f.metaKey)&&"undefined"!=typeof this.get("value")){var d=this.constraints[f.keyCode==
l.HOME?"min":"max"];"number"==typeof d&&this._setValueAttr(d,!1);f.stopPropagation();f.preventDefault()}}})})},"dijit/form/_Spinner":function(){define("dojo/_base/declare dojo/keys dojo/_base/lang dojo/sniff dojo/mouse dojo/on ../typematic ./RangeBoundTextBox dojo/text!./templates/Spinner.html ./_TextBoxMixin".split(" "),function(k,l,h,g,f,d,e,c,b,a){return k("dijit.form._Spinner",c,{defaultTimeout:500,minimumTimeout:10,timeoutChangeRate:0.9,smallDelta:1,largeDelta:10,templateString:b,baseClass:"dijitTextBox dijitSpinner",
cssStateNodes:{upArrowNode:"dijitUpArrowButton",downArrowNode:"dijitDownArrowButton"},adjust:function(a){return a},_arrowPressed:function(b,c,d){!this.disabled&&!this.readOnly&&(this._setValueAttr(this.adjust(this.get("value"),c*d),!1),a.selectInputText(this.textbox,this.textbox.value.length))},_arrowReleased:function(){this._wheelTimer=null},_typematicCallback:function(a,b,c){var d=this.smallDelta;b==this.textbox&&(b=c.keyCode,d=b==l.PAGE_UP||b==l.PAGE_DOWN?this.largeDelta:this.smallDelta,b=b==l.UP_ARROW||
b==l.PAGE_UP?this.upArrowNode:this.downArrowNode);-1==a?this._arrowReleased(b):this._arrowPressed(b,b==this.upArrowNode?1:-1,d)},_wheelTimer:null,_mouseWheeled:function(a){if(this.focused){a.stopPropagation();a.preventDefault();var b=a.wheelDelta/120;Math.floor(b)!=b&&(b=0<a.wheelDelta?1:-1);a=a.detail?-1*a.detail:b;if(0!==a){var c=this[0<a?"upArrowNode":"downArrowNode"];this._arrowPressed(c,a,this.smallDelta);this._wheelTimer&&this._wheelTimer.remove();this._wheelTimer=this.defer(function(){this._arrowReleased(c)},
50)}}},_setConstraintsAttr:function(a){this.inherited(arguments);this.focusNode&&(void 0!==this.constraints.min?this.focusNode.setAttribute("aria-valuemin",this.constraints.min):this.focusNode.removeAttribute("aria-valuemin"),void 0!==this.constraints.max?this.focusNode.setAttribute("aria-valuemax",this.constraints.max):this.focusNode.removeAttribute("aria-valuemax"))},_setValueAttr:function(a,b){this.focusNode.setAttribute("aria-valuenow",a);this.inherited(arguments)},postCreate:function(){this.inherited(arguments);
this.own(d(this.domNode,f.wheel,h.hitch(this,"_mouseWheeled")),e.addListener(this.upArrowNode,this.textbox,{keyCode:l.UP_ARROW,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1},this,"_typematicCallback",this.timeoutChangeRate,this.defaultTimeout,this.minimumTimeout),e.addListener(this.downArrowNode,this.textbox,{keyCode:l.DOWN_ARROW,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1},this,"_typematicCallback",this.timeoutChangeRate,this.defaultTimeout,this.minimumTimeout),e.addListener(this.upArrowNode,this.textbox,
{keyCode:l.PAGE_UP,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1},this,"_typematicCallback",this.timeoutChangeRate,this.defaultTimeout,this.minimumTimeout),e.addListener(this.downArrowNode,this.textbox,{keyCode:l.PAGE_DOWN,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1},this,"_typematicCallback",this.timeoutChangeRate,this.defaultTimeout,this.minimumTimeout))}})})},"dijit/typematic":function(){define("dojo/_base/array dojo/_base/connect dojo/_base/lang dojo/on dojo/sniff ./main".split(" "),function(k,
l,h,g,f,d){var e=d.typematic={_fireEventAndReload:function(){this._timer=null;this._callback(++this._count,this._node,this._evt);this._currentTimeout=Math.max(0>this._currentTimeout?this._initialDelay:1<this._subsequentDelay?this._subsequentDelay:Math.round(this._currentTimeout*this._subsequentDelay),this._minDelay);this._timer=setTimeout(h.hitch(this,"_fireEventAndReload"),this._currentTimeout)},trigger:function(c,b,a,d,e,f,g,k){if(e!=this._obj){this.stop();this._initialDelay=g||500;this._subsequentDelay=
f||0.9;this._minDelay=k||10;this._obj=e;this._node=a;this._count=this._currentTimeout=-1;this._callback=h.hitch(b,d);this._evt={faux:!0};for(var l in c)"layerX"!=l&&"layerY"!=l&&(b=c[l],"function"!=typeof b&&"undefined"!=typeof b&&(this._evt[l]=b));this._fireEventAndReload()}},stop:function(){this._timer&&(clearTimeout(this._timer),this._timer=null);this._obj&&(this._callback(-1,this._node,this._evt),this._obj=null)},addKeyListener:function(c,b,a,d,f,q,s){var r="keyCode"in b?"keyCode":"charCode"in
b?"charCode":"charOrCode",p=[g(c,"keyCode"in b?"keydown":"charCode"in b?"keypress":l._keypress,h.hitch(this,function(g){g[r]==b[r]&&(void 0===b.ctrlKey||b.ctrlKey==g.ctrlKey)&&(void 0===b.altKey||b.altKey==g.altKey)&&(void 0===b.metaKey||b.metaKey==(g.metaKey||!1))&&(void 0===b.shiftKey||b.shiftKey==g.shiftKey)?(g.stopPropagation(),g.preventDefault(),e.trigger(g,a,c,d,b,f,q,s)):e._obj==b&&e.stop()})),g(c,"keyup",h.hitch(this,function(){e._obj==b&&e.stop()}))];return{remove:function(){k.forEach(p,
function(a){a.remove()})}}},addMouseListener:function(c,b,a,d,n,l){var s=[g(c,"mousedown",h.hitch(this,function(f){f.preventDefault();e.trigger(f,b,c,a,c,d,n,l)})),g(c,"mouseup",h.hitch(this,function(a){this._obj&&a.preventDefault();e.stop()})),g(c,"mouseout",h.hitch(this,function(a){this._obj&&a.preventDefault();e.stop()})),g(c,"dblclick",h.hitch(this,function(g){g.preventDefault();9>f("ie")&&(e.trigger(g,b,c,a,c,d,n,l),setTimeout(h.hitch(this,e.stop),50))}))];return{remove:function(){k.forEach(s,
function(a){a.remove()})}}},addListener:function(c,b,a,d,e,f,g,h){var l=[this.addKeyListener(b,a,d,e,f,g,h),this.addMouseListener(c,d,e,f,g,h)];return{remove:function(){k.forEach(l,function(a){a.remove()})}}}};return e})},"dijit/form/RangeBoundTextBox":function(){define(["dojo/_base/declare","dojo/i18n","./MappedTextBox"],function(k,l,h){return k("dijit.form.RangeBoundTextBox",h,{rangeMessage:"",rangeCheck:function(g,f){return("min"in f?0<=this.compare(g,f.min):!0)&&("max"in f?0>=this.compare(g,f.max):
!0)},isInRange:function(){return this.rangeCheck(this.get("value"),this.constraints)},_isDefinitelyOutOfRange:function(){var g=this.get("value");if(null==g)return!1;var f=!1;"min"in this.constraints&&(f=this.constraints.min,f=0>this.compare(g,"number"==typeof f&&0<=f&&0!=g?0:f));!f&&"max"in this.constraints&&(f=this.constraints.max,f=0<this.compare(g,"number"!=typeof f||0<f?f:0));return f},_isValidSubset:function(){return this.inherited(arguments)&&!this._isDefinitelyOutOfRange()},isValid:function(g){return this.inherited(arguments)&&
(this._isEmpty(this.textbox.value)&&!this.required||this.isInRange(g))},getErrorMessage:function(g){var f=this.get("value");return null!=f&&""!==f&&("number"!=typeof f||!isNaN(f))&&!this.isInRange(g)?this.rangeMessage:this.inherited(arguments)},postMixInProperties:function(){this.inherited(arguments);this.rangeMessage||(this.messages=l.getLocalization("dijit.form","validate",this.lang),this.rangeMessage=this.messages.rangeMessage)}})})},"dijit/form/MappedTextBox":function(){define(["dojo/_base/declare",
"dojo/sniff","dojo/dom-construct","./ValidationTextBox"],function(k,l,h,g){return k("dijit.form.MappedTextBox",g,{postMixInProperties:function(){this.inherited(arguments);this.nameAttrSetting=""},_setNameAttr:"valueNode",serialize:function(f){return f.toString?f.toString():""},toString:function(){var f=this.filter(this.get("value"));return null!=f?"string"==typeof f?f:this.serialize(f,this.constraints):""},validate:function(){this.valueNode.value=this.toString();return this.inherited(arguments)},
buildRendering:function(){this.inherited(arguments);this.valueNode=h.place("\x3cinput type\x3d'hidden'"+(this.name&&!l("msapp")?' name\x3d"'+this.name.replace(/"/g,"\x26quot;")+'"':"")+"/\x3e",this.textbox,"after")},reset:function(){this.valueNode.value="";this.inherited(arguments)}})})},"dijit/form/NumberTextBox":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/number","./RangeBoundTextBox"],function(k,l,h,g){var f=k("dijit.form.NumberTextBoxMixin",null,{pattern:function(d){return"("+
(this.focused&&this.editOptions?this._regExpGenerator(l.delegate(d,this.editOptions))+"|":"")+this._regExpGenerator(d)+")"},value:NaN,editOptions:{pattern:"#.######"},_formatter:h.format,_regExpGenerator:h.regexp,postMixInProperties:function(){this.inherited(arguments);this._set("type","text")},_setConstraintsAttr:function(d){var e="number"==typeof d.places?d.places:0;e&&e++;"number"!=typeof d.max&&(d.max=9*Math.pow(10,15-e));"number"!=typeof d.min&&(d.min=-9*Math.pow(10,15-e));this.inherited(arguments,
[d]);this.focusNode&&(this.focusNode.value&&!isNaN(this.value))&&this.set("value",this.value)},_onFocus:function(){if(!this.disabled&&!this.readOnly){var d=this.get("value");"number"==typeof d&&!isNaN(d)&&(d=this.format(d,this.constraints),void 0!==d&&(this.textbox.value=d));this.inherited(arguments)}},format:function(d,e){var c=String(d);if("number"!=typeof d)return c;if(isNaN(d))return"";if(!("rangeCheck"in this&&this.rangeCheck(d,e))&&!1!==e.exponent&&/\de[-+]?\d/i.test(c))return c;this.editOptions&&
this.focused&&(e=l.mixin({},e,this.editOptions));return this._formatter(d,e)},_parser:h.parse,parse:function(d,e){var c=this._parser(d,l.mixin({},e,this.editOptions&&this.focused?this.editOptions:{}));this.editOptions&&(this.focused&&isNaN(c))&&(c=this._parser(d,e));return c},_getDisplayedValueAttr:function(){var d=this.inherited(arguments);return isNaN(d)?this.textbox.value:d},filter:function(d){return null==d||""===d?NaN:this.inherited(arguments)},serialize:function(d,e){return"number"!=typeof d||
isNaN(d)?"":this.inherited(arguments)},_setBlurValue:function(){var d=l.hitch(l.delegate(this,{focused:!0}),"get")("value");this._setValueAttr(d,!0)},_setValueAttr:function(d,e,c){if(void 0!==d&&void 0===c)if(c=String(d),"number"==typeof d)if(isNaN(d))c="";else{if("rangeCheck"in this&&this.rangeCheck(d,this.constraints)||!1===this.constraints.exponent||!/\de[-+]?\d/i.test(c))c=void 0}else d?d=void 0:(c="",d=NaN);this.inherited(arguments,[d,e,c])},_getValueAttr:function(){var d=this.inherited(arguments);
if(isNaN(d)&&""!==this.textbox.value){if(!1!==this.constraints.exponent&&/\de[-+]?\d/i.test(this.textbox.value)&&RegExp("^"+h._realNumberRegexp(l.delegate(this.constraints))+"$").test(this.textbox.value))return d=Number(this.textbox.value),isNaN(d)?void 0:d}else return d},isValid:function(d){if(!this.focused||this._isEmpty(this.textbox.value))return this.inherited(arguments);var e=this.get("value");return!isNaN(e)&&this.rangeCheck(e,this.constraints)?!1!==this.constraints.exponent&&/\de[-+]?\d/i.test(this.textbox.value)?
!0:this.inherited(arguments):!1}});k=k("dijit.form.NumberTextBox",[g,f],{baseClass:"dijitTextBox dijitNumberTextBox"});k.Mixin=f;return k})},"dojo/number":function(){define(["./_base/lang","./i18n","./i18n!./cldr/nls/number","./string","./regexp"],function(k,l,h,g,f){var d={};k.setObject("dojo.number",d);d.format=function(c,b){b=k.mixin({},b||{});var a=l.normalizeLocale(b.locale),a=l.getLocalization("dojo.cldr","number",a);b.customs=a;a=b.pattern||a[(b.type||"decimal")+"Format"];return isNaN(c)||
Infinity==Math.abs(c)?null:d._applyPattern(c,a,b)};d._numberPatternRE=/[#0,]*[#0](?:\.0*#*)?/;d._applyPattern=function(c,b,a){a=a||{};var e=a.customs.group,f=a.customs.decimal;b=b.split(";");var g=b[0];b=b[0>c?1:0]||"-"+g;if(-1!=b.indexOf("%"))c*=100;else if(-1!=b.indexOf("\u2030"))c*=1E3;else if(-1!=b.indexOf("\u00a4"))e=a.customs.currencyGroup||e,f=a.customs.currencyDecimal||f,b=b.replace(/([\s\xa0]*)(\u00a4{1,3})([\s\xa0]*)/,function(b,c,d,e){b=a[["symbol","currency","displayName"][d.length-1]]||
a.currency||"";return!b?"":c+b+e});else if(-1!=b.indexOf("E"))throw Error("exponential notation not supported");var h=d._numberPatternRE,g=g.match(h);if(!g)throw Error("unable to find a number expression in pattern: "+b);!1===a.fractional&&(a.places=0);return b.replace(h,d._formatAbsolute(c,g[0],{decimal:f,group:e,places:a.places,round:a.round}))};d.round=function(c,b,a){a=10/(a||10);return(a*+c).toFixed(b)/a};if(0==(0.9).toFixed()){var e=d.round;d.round=function(c,b,a){var d=Math.pow(10,-b||0),f=
Math.abs(c);if(!c||f>=d)d=0;else if(f/=d,0.5>f||0.95<=f)d=0;return e(c,b,a)+(0<c?d:-d)}}d._formatAbsolute=function(c,b,a){a=a||{};!0===a.places&&(a.places=0);Infinity===a.places&&(a.places=6);b=b.split(".");var e="string"==typeof a.places&&a.places.indexOf(","),f=a.places;e?f=a.places.substring(e+1):0<=f||(f=(b[1]||[]).length);0>a.round||(c=d.round(c,f,a.round));c=String(Math.abs(c)).split(".");var h=c[1]||"";b[1]||a.places?(e&&(a.places=a.places.substring(0,e)),e=void 0!==a.places?a.places:b[1]&&
b[1].lastIndexOf("0")+1,e>h.length&&(c[1]=g.pad(h,e,"0",!0)),f<h.length&&(c[1]=h.substr(0,f))):c[1]&&c.pop();f=b[0].replace(",","");e=f.indexOf("0");-1!=e&&(e=f.length-e,e>c[0].length&&(c[0]=g.pad(c[0],e)),-1==f.indexOf("#")&&(c[0]=c[0].substr(c[0].length-e)));var f=b[0].lastIndexOf(","),k,l;-1!=f&&(k=b[0].length-f-1,b=b[0].substr(0,f),f=b.lastIndexOf(","),-1!=f&&(l=b.length-f-1));b=[];for(f=c[0];f;)e=f.length-k,b.push(0<e?f.substr(e):f),f=0<e?f.slice(0,e):"",l&&(k=l,delete l);c[0]=b.reverse().join(a.group||
",");return c.join(a.decimal||".")};d.regexp=function(c){return d._parseInfo(c).regexp};d._parseInfo=function(c){c=c||{};var b=l.normalizeLocale(c.locale),b=l.getLocalization("dojo.cldr","number",b),a=c.pattern||b[(c.type||"decimal")+"Format"],e=b.group,g=b.decimal,h=1;if(-1!=a.indexOf("%"))h/=100;else if(-1!=a.indexOf("\u2030"))h/=1E3;else{var k=-1!=a.indexOf("\u00a4");k&&(e=b.currencyGroup||e,g=b.currencyDecimal||g)}b=a.split(";");1==b.length&&b.push("-"+b[0]);b=f.buildGroupRE(b,function(a){a="(?:"+
f.escapeString(a,".")+")";return a.replace(d._numberPatternRE,function(a){var b={signed:!1,separator:c.strict?e:[e,""],fractional:c.fractional,decimal:g,exponent:!1};a=a.split(".");var f=c.places;1==a.length&&1!=h&&(a[1]="###");1==a.length||0===f?b.fractional=!1:(void 0===f&&(f=c.pattern?a[1].lastIndexOf("0")+1:Infinity),f&&void 0==c.fractional&&(b.fractional=!0),!c.places&&f<a[1].length&&(f+=","+a[1].length),b.places=f);a=a[0].split(",");1<a.length&&(b.groupSize=a.pop().length,1<a.length&&(b.groupSize2=
a.pop().length));return"("+d._realNumberRegexp(b)+")"})},!0);k&&(b=b.replace(/([\s\xa0]*)(\u00a4{1,3})([\s\xa0]*)/g,function(a,b,d,e){a=f.escapeString(c[["symbol","currency","displayName"][d.length-1]]||c.currency||"");if(!a)return"";b=b?"[\\s\\xa0]":"";e=e?"[\\s\\xa0]":"";return!c.strict?(b&&(b+="*"),e&&(e+="*"),"(?:"+b+a+e+")?"):b+a+e}));return{regexp:b.replace(/[\xa0 ]/g,"[\\s\\xa0]"),group:e,decimal:g,factor:h}};d.parse=function(c,b){var a=d._parseInfo(b),e=RegExp("^"+a.regexp+"$").exec(c);if(!e)return NaN;
var f=e[1];if(!e[1]){if(!e[2])return NaN;f=e[2];a.factor*=-1}f=f.replace(RegExp("["+a.group+"\\s\\xa0]","g"),"").replace(a.decimal,".");return f*a.factor};d._realNumberRegexp=function(c){c=c||{};"places"in c||(c.places=Infinity);"string"!=typeof c.decimal&&(c.decimal=".");if(!("fractional"in c)||/^0/.test(c.places))c.fractional=[!0,!1];"exponent"in c||(c.exponent=[!0,!1]);"eSigned"in c||(c.eSigned=[!0,!1]);var b=d._integerRegexp(c),a=f.buildGroupRE(c.fractional,function(a){var b="";a&&0!==c.places&&
(b="\\"+c.decimal,b=Infinity==c.places?"(?:"+b+"\\d+)?":b+("\\d{"+c.places+"}"));return b},!0),e=f.buildGroupRE(c.exponent,function(a){return a?"([eE]"+d._integerRegexp({signed:c.eSigned})+")":""}),b=b+a;a&&(b="(?:(?:"+b+")|(?:"+a+"))");return b+e};d._integerRegexp=function(c){c=c||{};"signed"in c||(c.signed=[!0,!1]);"separator"in c?"groupSize"in c||(c.groupSize=3):c.separator="";var b=f.buildGroupRE(c.signed,function(a){return a?"[-+]":""},!0),a=f.buildGroupRE(c.separator,function(a){if(!a)return"(?:\\d+)";
a=f.escapeString(a);" "==a?a="\\s":"\u00a0"==a&&(a="\\s\\xa0");var b=c.groupSize,d=c.groupSize2;return d?(a="(?:0|[1-9]\\d{0,"+(d-1)+"}(?:["+a+"]\\d{"+d+"})*["+a+"]\\d{"+b+"})",0<b-d?"(?:"+a+"|(?:0|[1-9]\\d{0,"+(b-1)+"}))":a):"(?:0|[1-9]\\d{0,"+(b-1)+"}(?:["+a+"]\\d{"+b+"})*)"},!0);return b+a};return d})},"JBrowse/View/Dialog/QuickHelp":function(){define(["dojo/_base/declare","JBrowse/View/InfoDialog"],function(k,l){return k(l,{title:"JBrowse Help",constructor:function(h){this.browser=h.browser;this.defaultContent=
this._makeDefaultContent();!h.content&&!h.href&&(this.content=this.defaultContent)},_makeDefaultContent:function(){return'\x3cdiv class\x3d"help_dialog"\x3e\x3cdiv class\x3d"main" style\x3d"float: left; width: 49%;"\x3e\x3cdl\x3e\x3cdt\x3eMoving\x3c/dt\x3e\x3cdd\x3e\x3cul\x3e    \x3cli\x3eMove the view by clicking and dragging in the track area, or by clicking \x3cimg class\x3d"icon nav" id\x3d"moveLeftSmall" src\x3d"'+this.browser.resolveUrl("img/Empty.png")+'"\x3e  or \x3cimg class\x3d"icon nav" id\x3d"moveRightSmall" src\x3d"'+
this.browser.resolveUrl("img/Empty.png")+'"\x3e in the navigation bar, or by pressing the left and right arrow keys.\x3c/li\x3e    \x3cli\x3eCenter the view at a point by clicking on either the track scale bar or overview bar, or by shift-clicking in the track area.\x3c/li\x3e\x3c/ul\x3e\x3c/dd\x3e\x3cdt\x3eZooming\x3c/dt\x3e\x3cdd\x3e\x3cul\x3e    \x3cli\x3eZoom in and out by clicking \x3cimg class\x3d"icon nav" id\x3d"zoomInSmall" src\x3d"'+this.browser.resolveUrl("img/Empty.png")+'"\x3e or \x3cimg class\x3d"icon nav" id\x3d"zoomOutSmall" src\x3d"'+
this.browser.resolveUrl("img/Empty.png")+'"\x3e in the navigation bar, or by pressing the up and down arrow keys while holding down "shift".\x3c/li\x3e    \x3cli\x3eSelect a region and zoom to it ("rubber-band" zoom) by clicking and dragging in the overview or track scale bar, or shift-clicking and dragging in the track area.\x3c/li\x3e    \x3c/ul\x3e\x3c/dd\x3e\x3cdt\x3eShowing Tracks\x3c/dt\x3e\x3cdd\x3e\x3cul\x3e\x3cli\x3eTurn a track on by dragging its track label from the "Available Tracks" area into the genome area, or double-clicking it.\x3c/li\x3e        \x3cli\x3eTurn a track off by dragging its track label from the genome area back into the "Available Tracks" area.\x3c/li\x3e    \x3c/ul\x3e\x3c/dd\x3e\x3c/dl\x3e\x3c/div\x3e\x3cdiv class\x3d"main" style\x3d"float: right; width: 49%;"\x3e\x3cdl\x3e\x3cdt\x3eSearching\x3c/dt\x3e\x3cdd\x3e\x3cul\x3e    \x3cli\x3eJump to a feature or reference sequence by typing its name in the location box and pressing Enter.\x3c/li\x3e    \x3cli\x3eJump to a specific region by typing the region into the location box as: \x3cspan class\x3d"example"\x3eref:start..end\x3c/span\x3e.\x3c/li\x3e    \x3c/ul\x3e\x3c/dd\x3e\x3cdt\x3eExample Searches\x3c/dt\x3e\x3cdd\x3e    \x3cdl class\x3d"searchexample"\x3e        \x3cdt\x3euc0031k.2\x3c/dt\x3e\x3cdd\x3esearches for the feature named \x3cspan class\x3d"example"\x3euc0031k.2\x3c/span\x3e.\x3c/dd\x3e        \x3cdt\x3echr4\x3c/dt\x3e\x3cdd\x3ejumps to chromosome 4\x3c/dd\x3e        \x3cdt\x3echr4:79,500,000..80,000,000\x3c/dt\x3e\x3cdd\x3ejumps the region on chromosome 4 between 79.5Mb and 80Mb.\x3c/dd\x3e        \x3cdt\x3e5678\x3c/dt\x3e\x3cdd\x3ecenters the display at base 5,678 on the current sequence\x3c/dd\x3e    \x3c/dl\x3e\x3c/dd\x3e\x3cdt\x3eJBrowse Documentation\x3c/dt\x3e\x3cdd\x3e\x3cul\x3e\x3cli\x3e\x3ca target\x3d"_blank" href\x3d"docs/tutorial/"\x3eQuick-start tutorial\x3c/a\x3e\x3c/li\x3e        \x3cli\x3e\x3ca target\x3d"_blank" href\x3d"http://gmod.org/wiki/JBrowse"\x3eJBrowse Configuration Guide\x3c/a\x3e\x3c/li\x3e        \x3cli\x3e\x3ca target\x3d"_blank" href\x3d"docs/config.html"\x3e\x3ctt\x3ebiodb-to-json.pl\x3c/tt\x3e reference\x3c/a\x3e\x3c/li\x3e        \x3cli\x3e\x3ca target\x3d"_blank" href\x3d"docs/featureglyphs.html"\x3eHTMLFeatures class reference\x3c/a\x3e\x3c/li\x3e    \x3c/ul\x3e\x3c/dd\x3e\x3c/dl\x3e\x3c/div\x3e\x3c/div\x3e'}})})},
"JBrowse/View/StandaloneDatasetList":function(){define(["dojo/_base/declare","dijit/_WidgetBase"],function(k,l){return k(l,{baseClass:"jbrowseStandaloneDatasetSelector",buildRendering:function(){this.inherited(arguments);var h=this.domNode;h.appendChild(document.createElement("h2")).innerHTML="Available Datasets";this.containerNode=h.appendChild(document.createElement("ul"));var g=this.get("datasets"),h=h.appendChild(document.createElement("ul")),f;for(f in g)if(!/^_/.test(f)){var d=g[f],e=document.createElement("li"),
c=document.createElement("a");c.setAttribute("href",d.url);c.innerHTML=d.name;e.appendChild(c);h.appendChild(e)}}})})},"lazyload/lazyload":function(){define([],function(){return function(k){function l(a,b){var c=k.createElement(a),d;for(d in b)b.hasOwnProperty(d)&&c.setAttribute(d,b[d]);return c}function h(b){var c=a[b],d,e;c&&(d=c.callback,e=c.urls,e.shift(),m=0,e.length||(d&&d.call(c.context,c.obj),a[b]=null,n[b].length&&f(b)))}function g(){var a=navigator.userAgent;c={async:!0===k.createElement("script").async};
(c.webkit=/AppleWebKit\//.test(a))||(c.ie=/MSIE/.test(a))||(c.opera=/Opera/.test(a))||(c.gecko=/Gecko\//.test(a))||(c.unknown=!0)}function f(f,m,p,q,u){var v=function(){h(f)},x="css"===f,w=[],y,z,A,D;c||g();if(m)if(m="string"===typeof m?[m]:m.concat(),x||c.async||c.gecko||c.opera)n[f].push({urls:m,callback:p,obj:q,context:u});else{y=0;for(z=m.length;y<z;++y)n[f].push({urls:[m[y]],callback:y===z-1?p:null,obj:q,context:u})}if(!a[f]&&(D=a[f]=n[f].shift())){b||(b=k.head||k.getElementsByTagName("head")[0]);
m=D.urls;y=0;for(z=m.length;y<z;++y)p=m[y],x?A=c.gecko?l("style"):l("link",{href:p,rel:"stylesheet"}):(A=l("script",{src:p}),A.async=!1),A.className="lazyload",A.setAttribute("charset","utf-8"),c.ie&&!x?A.onreadystatechange=function(){/loaded|complete/.test(A.readyState)&&(A.onreadystatechange=null,v())}:x&&(c.gecko||c.webkit)?c.webkit?(D.urls[y]=A.href,e()):(A.innerHTML='@import "'+p+'";',d(A)):A.onload=A.onerror=v,w.push(A);y=0;for(z=w.length;y<z;++y)b.appendChild(w[y])}}function d(a){var b;try{b=
!!a.sheet.cssRules}catch(c){m+=1;200>m?setTimeout(function(){d(a)},50):b&&h("css");return}h("css")}function e(){var b=a.css,c;if(b){for(c=q.length;0<=--c;)if(q[c].href===b.urls[0]){h("css");break}m+=1;b&&(200>m?setTimeout(e,50):h("css"))}}var c,b,a={},m=0,n={css:[],js:[]},q=k.styleSheets;return{css:function(a,b,c,d){f("css",a,b,c,d)},js:function(a,b,c,d){f("js",a,b,c,d)}}}(this.document)})},"JBrowse/ConfigAdaptor/JB_json_v1":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/_base/json dojo/request JBrowse/Util JBrowse/Digest/Crc32".split(" "),
function(k,l,h,g,f,d,e){var c=d.dojof;return k("JBrowse.ConfigAdaptor.JB_json_v1",null,{constructor:function(){},load:function(b){var a=this;if(b.config.url){var c=d.resolveUrl(b.baseUrl||window.location.href,b.config.url);return f(c,{handleAs:"text",headers:{"X-Requested-With":null}}).then(function(d){d=a.parse_conf(d,b)||{};d.sourceUrl=c;return d=a.regularize_conf(d,b)})}if(b.config.data)return d.resolved(this.regularize_conf(b.config.data,b))},parse_conf:function(b,a){try{return g.fromJson(b)}catch(c){throw c+
" when parsing "+(a.config.url||"configuration")+".";}},regularize_conf:function(b,a){if(b.tracks&&!l.isArray(b.tracks))if(b.tracks.label)b.tracks=[b.tracks];else{var e=[],f;for(f in b.tracks)"label"in b.tracks[f]||(b.tracks[f].label=f),e.push(b.tracks[f]);b.tracks=e}var g=b.trackMetadata;if(g&&g.sources){if(g.sources.url||"string"==typeof g.sources)g.sources=[g.sources];if(!l.isArray(g.sources)){var e=[],k;for(k in g.sources)"name"in g.sources||(g.sources[k].name=k),e.push(g.sources[k]);g.sources=
e}h.forEach(g.sources,function(a,b){if("string"==typeof a){g.sources[b]={url:a};var c=a.match(/\.(\w+)$/);c&&(g.sources[b].type=c[1].toLowerCase())}})}b.sourceUrl=b.sourceUrl||a.config.url;b.baseUrl=b.baseUrl||d.resolveUrl(b.sourceUrl,".");b.baseUrl.length&&!/\/$/.test(b.baseUrl)&&(b.baseUrl+="/");b.sourceUrl&&(k=[].concat(b.tracks||[]).concat(c.values(b.stores||{})),b.names&&k.push(b.names),h.forEach(k,function(a){a.baseUrl||(a.baseUrl=b.baseUrl||"/")},this),b.refSeqs&&"string"==typeof b.refSeqs&&
(b.refSeqs=d.resolveUrl(b.sourceUrl,b.refSeqs)),b.nameUrl&&(b.nameUrl=d.resolveUrl(b.sourceUrl,b.nameUrl)));return b=this.regularizeTrackConfigs(b)},regularizeTrackConfigs:function(b){b.stores=b.stores||{};h.forEach(b.tracks||[],function(a){if(a.config){var c=a.config;delete a.config;for(var d in c)!(d in a)&&c.hasOwnProperty(d)&&(a[d]=c[d])}a.store||(c=this._regularizeClass("JBrowse/View/Track",{FeatureTrack:"JBrowse/View/Track/HTMLFeatures",ImageTrack:"JBrowse/View/Track/FixedImage","ImageTrack.Wiggle":"JBrowse/View/Track/FixedImage/Wiggle",
SequenceTrack:"JBrowse/View/Track/Sequence"}[a.type]||a.type),a.type=c,this._synthesizeTrackStoreConfig(b,a),a.histograms&&(a.histograms.baseUrl||(a.histograms.baseUrl=a.baseUrl),this._synthesizeTrackStoreConfig(b,a.histograms)))},this);return b},_synthesizeTrackStoreConfig:function(b,a){var c=a.urlTemplate;if(c=this._regularizeClass("JBrowse/Store",a.storeClass?a.storeClass:/\/FixedImage/.test(a.type)?"JBrowse/Store/TiledImage/Fixed"+(0==a.backendVersion?"_v0":""):/\.jsonz?$/i.test(c)?"JBrowse/Store/SeqFeature/NCList"+
(0==a.backendVersion?"_v0":""):/\.bam$/i.test(c)?"JBrowse/Store/SeqFeature/BAM":/\.(bw|bigwig)$/i.test(c)?"JBrowse/Store/SeqFeature/BigWig":/\/Sequence$/.test(a.type)?"JBrowse/Store/Sequence/StaticChunked":null)){var d=l.mixin({},a);l.mixin(d,{type:c});d.name=("JBrowse/Store/Sequence/StaticChunked"==c||a.useAsRefSeqStore)&&!b.stores.refseqs?"refseqs":"store"+e.objectFingerprint(d);b.stores[d.name]=d;a.store=d.name}else console.warn("Unable to determine an appropriate data store to use with track '"+
a.label+"', please explicitly specify a storeClass in the configuration.")},_regularizeClass:function(b,a){if(!a)return null;/\//.test(a)||(a=b+"/"+a);return a=a.replace(/^\//)}})})},"JBrowse/View/TrackList/Hierarchical":function(){define("dojo/_base/declare dojo/_base/array dojo/_base/lang dojo/dom-construct dojo/query dojo/on dojo/json dijit/TitlePane dijit/layout/ContentPane JBrowse/Util ./_TextFilterMixin".split(" "),function(k,l,h,g,f,d,e,c,b,a,m){return k("JBrowse.View.TrackList.Hierarchical",
[b,m],{region:"left",splitter:!0,style:"width: 25%",id:"hierarchicalTrackPane",baseClass:"jbrowseHierarchicalTrackSelector",categoryFacet:"category",constructor:function(a){this.categories={};this.config=h.mixin({sortHierarchical:!0},a);this._loadState()},postCreate:function(){this.placeAt(this.browser.container);this.browser.subscribe("/jbrowse/v1/c/tracks/show",h.hitch(this,"setTracksActive"));this.browser.subscribe("/jbrowse/v1/c/tracks/hide",h.hitch(this,"setTracksInactive"));this.browser.subscribe("/jbrowse/v1/c/tracks/new",
h.hitch(this,"addTracks"));this.browser.subscribe("/jbrowse/v1/c/tracks/replace",h.hitch(this,"replaceTracks"));this.browser.subscribe("/jbrowse/v1/c/tracks/delete",h.hitch(this,"deleteTracks"))},buildRendering:function(){this.inherited(arguments);var a=new b({className:"header"});this.addChild(a);g.create("h2",{className:"title",innerHTML:"Available Tracks"},a.containerNode);this._makeTextFilterNodes(g.create("div",{className:"textfilterContainer"},a.containerNode));this._updateTextFilterControl()},
startup:function(){this.inherited(arguments);var a=[],c=this,d=this.get("categoryFacet"),e;this.config.sortHierarchical&&(e=[{attribute:d.toLowerCase()},{attribute:"key"},{attribute:"label"}]);for(var d=(this.get("collapsedCategories")||"").split(","),f=0;f<d.length;f++)h.setObject("collapsed."+d[f],!0,this.state);this._saveState();this.get("trackMetaData").fetch({onItem:function(b){b.conf&&a.push(b)},onComplete:function(){c.categories.Uncategorized={pane:(new b({className:"uncategorized"})).placeAt(c.containerNode),
tracks:{},categories:{}};c.addTracks(a,!0);c.categories.Uncategorized.pane.containerNode.children.length||(c.categories.Uncategorized.pane.domNode.style.display="none")},sort:e})},addTracks:function(b,e){this.pane=this;var f=this;l.forEach(b,function(b){function k(a,b,d){var g=b.shift();d=d.concat(g);var m=d.join("/"),l=a.categories[g]||(a.categories[g]=function(){var b=h.getObject("collapsed."+m,!1,f.state),b=new c({title:'\x3cspan class\x3d"categoryName"\x3e'+g+'\x3c/span\x3e \x3cspan class\x3d"trackCount"\x3e0\x3c/span\x3e',
open:!b});b.watch("open",function(a,b,c){h.setObject("collapsed."+m,!c,f.state);f._saveState()});a.pane.addChild(b,e?void 0:1);return{parent:a,pane:b,categories:{},tracks:{}}}.call(f));return b.length?k(l,b,d):l}var m=b.conf||b,l=this.get("categoryFacet"),l=(m.metadata&&m.metadata[l]||m[l]||b[l]||"Uncategorized").split(/\s*\/\s*/),l=k(this,l,[]);l.pane.domNode.style.display="block";b=g.create("label",{className:"tracklist-label shown",title:a.escapeHTML(m.shortDescription||b.shortDescription||(1===
m.description?void 0:m.description)||b.description||m.Description||b.Description||m.metadata&&(m.metadata.shortDescription||m.metadata.description||m.metadata.Description)||b.key||m.key||m.label)},l.pane.containerNode);var n={type:"checkbox",className:"check"};"function"===typeof f.extendCheckbox&&(n=f.extendCheckbox(n,m));var n=g.create("input",n,b),x=m.label,w;this.own(w=d(n,"click",function(){f.itemClick(this,m)}));g.create("span",{className:"key",innerHTML:m.key||m.label},b);l.tracks[x]={checkbox:n,
checkListener:w,labelNode:b};this._updateTitles(l)},this)},itemClick:function(a,b){this.browser.publish("/jbrowse/v1/v/tracks/"+(a.checked?"show":"hide"),[b])},_loadState:function(){this.state={};try{this.state=e.parse(localStorage.getItem("JBrowse-Hierarchical-Track-Selector")||"{}")}catch(a){}return this.state},_saveState:function(a){try{localStorage.setItem("JBrowse-Hierarchical-Track-Selector",e.stringify(this.state))}catch(b){}},_updateAllTitles:function(a){a=a||this;for(var b in a.categories)this._updateTitle(a.categories[b]),
this._updateAllTitles(a.categories[b])},_updateTitle:function(a){a.pane.set("title",a.pane.get("title").replace(/>\s*\d+\s*</,"\x3e"+f("label.shown",a.pane.containerNode).length+"\x3c"))},_updateTitles:function(a){this._updateTitle(a);a.parent&&this._updateTitles(a.parent)},_findTrack:function(a,b,c){c=c||this;for(var d in c.categories){var e=c.categories[d];if(e.tracks[a])return b(e.tracks[a],e),!0;if(this._findTrack(a,b,e))return!0}return!1},replaceTracks:function(a){},setTracksActive:function(a){l.forEach(a,
function(a){this._findTrack(a.label,function(a,b){a.checkbox.checked=!0})},this)},deleteTracks:function(a){l.forEach(a,function(a){this._findTrack(a.label,function(b,c){b.labelNode.parentNode.removeChild(b.labelNode);b.checkListener.remove();delete c.tracks[a.label]})},this)},setTracksInactive:function(a){l.forEach(a,function(a){this._findTrack(a.label,function(a,b){a.checkbox.checked=!1})},this)},_textFilter:function(){this.inherited(arguments);this._updateAllTitles()},show:function(){},hide:function(){},
toggle:function(){}})})},"dijit/TitlePane":function(){define("dojo/_base/array dojo/_base/declare dojo/dom dojo/dom-attr dojo/dom-class dojo/dom-geometry dojo/fx dojo/has dojo/_base/kernel dojo/keys ./_CssStateMixin ./_TemplatedMixin ./layout/ContentPane dojo/text!./templates/TitlePane.html ./_base/manager ./a11yclick".split(" "),function(k,l,h,g,f,d,e,c,b,a,m,n,q,s,r){l=l("dijit.TitlePane",[q,n,m],{title:"",_setTitleAttr:{node:"titleNode",type:"innerHTML"},open:!0,toggleable:!0,tabIndex:"0",duration:r.defaultDuration,
baseClass:"dijitTitlePane",templateString:s,doLayout:!1,_setTooltipAttr:{node:"focusNode",type:"attribute",attribute:"title"},buildRendering:function(){this.inherited(arguments);h.setSelectable(this.titleNode,!1)},postCreate:function(){this.inherited(arguments);this.toggleable&&this._trackMouseState(this.titleBarNode,this.baseClass+"Title");var a=this.hideNode,b=this.wipeNode;this._wipeIn=e.wipeIn({node:b,duration:this.duration,beforeBegin:function(){a.style.display=""}});this._wipeOut=e.wipeOut({node:b,
duration:this.duration,onEnd:function(){a.style.display="none"}})},_setOpenAttr:function(a,b){k.forEach([this._wipeIn,this._wipeOut],function(a){a&&"playing"==a.status()&&a.stop()});b?this[a?"_wipeIn":"_wipeOut"].play():this.hideNode.style.display=this.wipeNode.style.display=a?"":"none";if(this._started)if(a)this._onShow();else this.onHide();this.containerNode.setAttribute("aria-hidden",a?"false":"true");this.focusNode.setAttribute("aria-pressed",a?"true":"false");this._set("open",a);this._setCss()},
_setToggleableAttr:function(a){this.focusNode.setAttribute("role",a?"button":"heading");a?(this.focusNode.setAttribute("aria-controls",this.id+"_pane"),this.focusNode.setAttribute("tabIndex",this.tabIndex),this.focusNode.setAttribute("aria-pressed",this.open)):(g.remove(this.focusNode,"aria-controls"),g.remove(this.focusNode,"tabIndex"),g.remove(this.focusNode,"aria-pressed"));this._set("toggleable",a);this._setCss()},_setContentAttr:function(a){!this.open||!this._wipeOut||"playing"==this._wipeOut.status()?
this.inherited(arguments):(this._wipeIn&&"playing"==this._wipeIn.status()&&this._wipeIn.stop(),d.setMarginBox(this.wipeNode,{h:d.getMarginBox(this.wipeNode).h}),this.inherited(arguments),this._wipeIn?this._wipeIn.play():this.hideNode.style.display="")},toggle:function(){this._setOpenAttr(!this.open,!0)},_setCss:function(){var a=this.titleBarNode||this.focusNode,b=this._titleBarClass;this._titleBarClass=this.baseClass+"Title"+(this.toggleable?"":"Fixed")+(this.open?"Open":"Closed");f.replace(a,this._titleBarClass,
b||"");f.replace(a,this._titleBarClass.replace("TitlePaneTitle",""),(b||"").replace("TitlePaneTitle",""));this.arrowNodeInner.innerHTML=this.open?"-":"+"},_onTitleKey:function(b){b.keyCode==a.DOWN_ARROW&&this.open&&(this.containerNode.focus(),b.preventDefault())},_onTitleClick:function(){this.toggleable&&this.toggle()},setTitle:function(a){b.deprecated("dijit.TitlePane.setTitle() is deprecated.  Use set('title', ...) instead.","","2.0");this.set("title",a)}});c("dojo-bidi")&&l.extend({_setTitleAttr:function(a){this._set("title",
a);this.titleNode.innerHTML=a;this.applyTextDir(this.titleNode)},_setTooltipAttr:function(a){this._set("tooltip",a);this.textDir&&(a=this.enforceTextDirWithUcc(null,a));g.set(this.focusNode,"title",a)},_setTextDirAttr:function(a){this._created&&this.textDir!=a&&(this._set("textDir",a),this.set("title",this.title),this.set("tooltip",this.tooltip))}});return l})},"dojo/fx":function(){define("./_base/lang ./Evented ./_base/kernel ./_base/array ./aspect ./_base/fx ./dom ./dom-style ./dom-geometry ./ready require".split(" "),
function(k,l,h,g,f,d,e,c,b,a,m){h.isAsync||a(0,function(){m(["./fx/Toggler"])});h=h.fx={};a={_fire:function(a,b){this[a]&&this[a].apply(this,b||[]);return this}};var n=function(a){this._index=-1;this._animations=a||[];this._current=this._onAnimateCtx=this._onEndCtx=null;this.duration=0;g.forEach(this._animations,function(a){a&&("undefined"!=typeof a.duration&&(this.duration+=a.duration),a.delay&&(this.duration+=a.delay))},this)};n.prototype=new l;k.extend(n,{_onAnimate:function(){this._fire("onAnimate",
arguments)},_onEnd:function(){this._onAnimateCtx.remove();this._onEndCtx.remove();this._onAnimateCtx=this._onEndCtx=null;this._index+1==this._animations.length?this._fire("onEnd"):(this._current=this._animations[++this._index],this._onAnimateCtx=f.after(this._current,"onAnimate",k.hitch(this,"_onAnimate"),!0),this._onEndCtx=f.after(this._current,"onEnd",k.hitch(this,"_onEnd"),!0),this._current.play(0,!0))},play:function(a,b){this._current||(this._current=this._animations[this._index=0]);if(!b&&"playing"==
this._current.status())return this;var c=f.after(this._current,"beforeBegin",k.hitch(this,function(){this._fire("beforeBegin")}),!0),d=f.after(this._current,"onBegin",k.hitch(this,function(a){this._fire("onBegin",arguments)}),!0),e=f.after(this._current,"onPlay",k.hitch(this,function(a){this._fire("onPlay",arguments);c.remove();d.remove();e.remove()}));this._onAnimateCtx&&this._onAnimateCtx.remove();this._onAnimateCtx=f.after(this._current,"onAnimate",k.hitch(this,"_onAnimate"),!0);this._onEndCtx&&
this._onEndCtx.remove();this._onEndCtx=f.after(this._current,"onEnd",k.hitch(this,"_onEnd"),!0);this._current.play.apply(this._current,arguments);return this},pause:function(){if(this._current){var a=f.after(this._current,"onPause",k.hitch(this,function(b){this._fire("onPause",arguments);a.remove()}),!0);this._current.pause()}return this},gotoPercent:function(a,b){this.pause();var c=this.duration*a;this._current=null;g.some(this._animations,function(a){if(a.duration<=c)return this._current=a,!0;c-=
a.duration;return!1});this._current&&this._current.gotoPercent(c/this._current.duration,b);return this},stop:function(a){if(this._current){if(a){for(;this._index+1<this._animations.length;++this._index)this._animations[this._index].stop(!0);this._current=this._animations[this._index]}var b=f.after(this._current,"onStop",k.hitch(this,function(a){this._fire("onStop",arguments);b.remove()}),!0);this._current.stop()}return this},status:function(){return this._current?this._current.status():"stopped"},
destroy:function(){this._onAnimateCtx&&this._onAnimateCtx.remove();this._onEndCtx&&this._onEndCtx.remove()}});k.extend(n,a);h.chain=function(a){return new n(a)};var q=function(a){this._animations=a||[];this._connects=[];this.duration=this._finished=0;g.forEach(a,function(a){var b=a.duration;a.delay&&(b+=a.delay);this.duration<b&&(this.duration=b);this._connects.push(f.after(a,"onEnd",k.hitch(this,"_onEnd"),!0))},this);this._pseudoAnimation=new d.Animation({curve:[0,1],duration:this.duration});var b=
this;g.forEach("beforeBegin onBegin onPlay onAnimate onPause onStop onEnd".split(" "),function(a){b._connects.push(f.after(b._pseudoAnimation,a,function(){b._fire(a,arguments)},!0))})};k.extend(q,{_doAction:function(a,b){g.forEach(this._animations,function(c){c[a].apply(c,b)});return this},_onEnd:function(){++this._finished>this._animations.length&&this._fire("onEnd")},_call:function(a,b){var c=this._pseudoAnimation;c[a].apply(c,b)},play:function(a,b){this._finished=0;this._doAction("play",arguments);
this._call("play",arguments);return this},pause:function(){this._doAction("pause",arguments);this._call("pause",arguments);return this},gotoPercent:function(a,b){var c=this.duration*a;g.forEach(this._animations,function(a){a.gotoPercent(a.duration<c?1:c/a.duration,b)});this._call("gotoPercent",arguments);return this},stop:function(a){this._doAction("stop",arguments);this._call("stop",arguments);return this},status:function(){return this._pseudoAnimation.status()},destroy:function(){g.forEach(this._connects,
function(a){a.remove()})}});k.extend(q,a);h.combine=function(a){return new q(a)};h.wipeIn=function(a){var b=a.node=e.byId(a.node),g=b.style,h;a=d.animateProperty(k.mixin({properties:{height:{start:function(){h=g.overflow;g.overflow="hidden";if("hidden"==g.visibility||"none"==g.display)return g.height="1px",g.display="",g.visibility="",1;var a=c.get(b,"height");return Math.max(a,1)},end:function(){return b.scrollHeight}}}},a));var m=function(){g.height="auto";g.overflow=h};f.after(a,"onStop",m,!0);
f.after(a,"onEnd",m,!0);return a};h.wipeOut=function(a){var b=(a.node=e.byId(a.node)).style,c;a=d.animateProperty(k.mixin({properties:{height:{end:1}}},a));f.after(a,"beforeBegin",function(){c=b.overflow;b.overflow="hidden";b.display=""},!0);var g=function(){b.overflow=c;b.height="auto";b.display="none"};f.after(a,"onStop",g,!0);f.after(a,"onEnd",g,!0);return a};h.slideTo=function(a){var g=null,h=null,m=function(a){return function(){var d=c.getComputedStyle(a),e=d.position;g="absolute"==e?a.offsetTop:
parseInt(d.top)||0;h="absolute"==e?a.offsetLeft:parseInt(d.left)||0;"absolute"!=e&&"relative"!=e&&(d=b.position(a,!0),g=d.y,h=d.x,a.style.position="absolute",a.style.top=g+"px",a.style.left=h+"px")}}(a.node=e.byId(a.node));m();a=d.animateProperty(k.mixin({properties:{top:a.top||0,left:a.left||0}},a));f.after(a,"beforeBegin",m,!0);return a};return h})},"JBrowse/View/TrackList/_TextFilterMixin":function(){define("dojo/_base/declare dojo/_base/lang dojo/dom-construct dojo/dom-class dojo/keys dojo/query".split(" "),
function(k,l,h,g,f,d){return k(null,{_makeTextFilterNodes:function(d){this.textFilterDiv=h.create("div",{className:"textfilter",style:{position:"relative",overflow:"hidden"}},d);this.textFilterInput=h.create("input",{type:"text",placeholder:"filter tracks",onkeypress:l.hitch(this,function(c){c.keyCode==f.ESCAPE&&(this.textFilterInput.value="");this.textFilterTimeout&&window.clearTimeout(this.textFilterTimeout);this.textFilterTimeout=window.setTimeout(l.hitch(this,function(){this._updateTextFilterControl();
this._textFilter(this.textFilterInput.value)}),500);this._updateTextFilterControl();c.stopPropagation()})},this.textFilterDiv);this.textFilterClearButton=h.create("div",{className:"jbrowseIconCancel",onclick:l.hitch(this,function(){this._clearTextFilterControl();this._textFilter(this.textFilterInput.value)})},this.textFilterDiv)},_clearTextFilterControl:function(){this.textFilterInput.value="";this._updateTextFilterControl()},_updateTextFilterControl:function(){this.textFilterInput.value.length?g.remove(this.textFilterDiv,
"dijitDisabled"):g.add(this.textFilterDiv,"dijitDisabled")},_textFilter:function(e){e&&/\S/.test(e)?(e=e.toLowerCase(),d(".tracklist-label",this.containerNode).forEach(function(c,b){-1!=c.innerHTML.toLowerCase().indexOf(e)?(g.remove(c,"collapsed"),g.add(c,"shown")):(g.add(c,"collapsed"),g.remove(c,"shown"))})):d(".tracklist-label",this.containerNode).removeClass("collapsed").addClass("shown")}})})},"JBrowse/Store/Sequence/StaticChunked":function(){define(["JBrowse/Store/SeqFeature/SequenceChunks"],
function(k){return k})},"JBrowse/Store/SeqFeature/SequenceChunks":function(){define("dojo/_base/declare dojo/_base/lang dojo/request dojo/promise/all dojo/Deferred JBrowse/Store/SeqFeature JBrowse/Util JBrowse/Model/SimpleFeature JBrowse/Digest/Crc32".split(" "),function(k,l,h,g,f,d,e,c,b){return k(d,{constructor:function(a){this.chunkCache={};this.compress=a.compress;this.urlTemplate=a.urlTemplate;if(!this.urlTemplate)throw"no urlTemplate provided, cannot open sequence store";this.baseUrl=a.baseUrl;
this.seqChunkSize=a.seqChunkSize},getFeatures:function(a,c,d,e){e=e||function(a){console.error(a)};var h=a.ref;this.browser.compareReferenceNames(this.refSeq.name,h)||(h=this.refSeq.name);var k=h==this.refSeq.name&&this.refSeq.seqChunkSize||this.seqChunkSize||(this.compress?8E4:2E4),p=this.resolveUrl(this.urlTemplate,{refseq:h,refseq_dirpath:function(){for(var a=b.crc32(h).toString(16).toLowerCase().replace("-","n");8>a.length;)a="0"+a;for(var c=[],d=0;d<a.length;d+=3)c.push(a.substring(d,d+3));return c.join("/")}}),
t=Math.floor(Math.max(0,a.start)/k);a=Math.floor((a.end-1)/k);for(var u,v=[];t<=a;t++)(function(a){var b=this,d=new f;this._fetchChunk(p,a).then(l.hitch(d,"resolve"),function(a){404==a.response.status?d.resolve(""):d.reject(a)});d.then(function(d){u||c(b._makeFeature(h,a,k,d))},function(a){u||e(u=a)});v.push(d)}).call(this,t);g(v).then(d)},_fetchChunk:function(a,b){return h.get(a+b+".txt"+(this.compress?"z":""),{handleAs:"text",headers:{"X-Requested-With":null}})},_makeFeature:function(a,b,d,e){return new c({data:{start:b*
d,end:b*d+e.length,residues:e,seq_id:a,name:a}})}})})},"JBrowse/Store/SeqFeature/NCList":function(){define("dojo/_base/declare dojo/_base/lang dojo/Deferred dojo/request/xhr JBrowse/Store/SeqFeature JBrowse/Store/DeferredFeaturesMixin JBrowse/Store/DeferredStatsMixin JBrowse/Util JBrowse/Model/ArrayRepr JBrowse/Store/NCList JBrowse/Store/LazyArray".split(" "),function(k,l,h,g,f,d,e,c,b,a,m){var n=function(){return this._uniqueID},q=function(){return this._parent},s=function(){return this.get("subfeatures")};
return k(f,{constructor:function(a){this.args=a;this.baseUrl=a.baseUrl;this.urlTemplates={root:a.urlTemplate};this._deferred={}},makeNCList:function(){return new a},loadNCList:function(a,b,c){a.nclist.importExisting(b.intervals.nclist,a.attrs,c,b.intervals.urlTemplate,b.intervals.lazyClass)},getDataRoot:function(a){if(!this._deferred.root||this.curRefName!=a){this._deferred.root=new h;this.curRefName=a;var b={nclist:this.makeNCList()},d=this.resolveUrl(this._evalConf(this.urlTemplates.root),{refseq:a}),
e=this;g.get(d,{handleAs:"json",failOk:!0}).then(function(a,c){e._handleTrackInfo(b,a,d)},function(a){c.isElectron()||404==a.response.status?e._handleTrackInfo(b,{},d):200!=a.response.status?e._failAllDeferred("Server returned an HTTP "+a.response.status+" error"):e._failAllDeferred(a)})}return this._deferred.root},_handleTrackInfo:function(a,c,d){a.stats={featureCount:c.featureCount||0,featureDensity:(c.featureCount||0)/this.refSeq.length};this.empty=!c.featureCount;c.intervals&&(a.attrs=new b(c.intervals.classes),
this.loadNCList(a,c,d));if((c=c.histograms)&&c.meta){for(var e=0;e<c.meta.length;e++)c.meta[e].lazyArray=new m(c.meta[e].arrayParams,d);a._histograms=c}this._deferred.root.resolve(a)},getGlobalStats:function(a,b){return(this._deferred.root||this.getDataRoot(this.browser.refSeq.name)).then(function(b){a(b.stats)},b)},getRegionStats:function(a,b,c){this.getDataRoot(a.ref).then(function(a){b(a.stats)},c)},getRegionFeatureDensities:function(a,b,c){this.getDataRoot(a.ref).then(function(c){var d,e;if(a.numBins)d=
a.numBins,e=(a.end-a.start)/d;else if(a.basesPerBin)e=a.basesPerBin,d=Math.ceil((a.end-a.start)/e);else throw Error("numBins or basesPerBin arg required for getRegionFeatureDensities");for(var f=function(a,b){for(var c=0;c<b.length;c++)if(b[c].basesPerBin>=a)return b[c]}(e,c._histograms.stats||[]),g=c._histograms.meta[0],h=0;h<c._histograms.meta.length;h++)e>=c._histograms.meta[h].basesPerBin&&(g=c._histograms.meta[h]);var k=e/g.basesPerBin;if(0.9<k&&1E-4>Math.abs(k-Math.round(k))){var m=Math.floor(a.start/
g.basesPerBin),k=Math.round(k),l=[];for(c=0;c<d;c++)l[c]=0;g.lazyArray.range(m,m+k*d,function(a,b){l[Math.floor((a-m)/k)]+=b},function(){b({bins:l,stats:f})})}else c.nclist.histogram.call(c.nclist,a.start,a.end,d,function(a){b({bins:a,stats:f})})},c)},getFeatures:function(a,b,c,d){if(this.empty)c();else{var e=this;this.getDataRoot(a.ref).then(function(f){e._getFeatures(f,a,b,c,d)},d)}},_getFeatures:function(a,b,c,d,e){var f=this,g=b.start;b=b.end;var h=a.attrs.accessors();a.nclist.iterate.call(a.nclist,
g,b,function(a,b){if(!a.decorated){var d=b.join(",");f._decorate_feature(h,a,d)}return c(a)},d,e)},_decorate_feature:function(a,b,c,d){b.get=a.get;b.tags=a.tags;b._uniqueID=c;b.id=n;b._parent=d;b.parent=q;b.children=s;dojo.forEach(b.get("subfeatures"),function(d,e){this._decorate_feature(a,d,c+"-"+e,b)},this);b.decorated=!0}})})},"JBrowse/Store/DeferredStatsMixin":function(){define(["dojo/_base/declare","dojo/Deferred","JBrowse/Util"],function(k,l,h){return k(null,{constructor:function(g){this._deferGlobalStats()},
_deferGlobalStats:function(){this._deferred||(this._deferred={});this._deferred.stats=new l},getGlobalStats:function(g,f){this._deferred.stats.then(dojo.hitch(this,"_getGlobalStats",g,f),f)},_getGlobalStats:function(g,f){g(this.globalStats||{})},getRegionStats:function(g,f,d){this._deferred.stats.then(dojo.hitch(this,"_getRegionStats",g,f,d),d)}})})},"JBrowse/Model/ArrayRepr":function(){define([],function(){function k(k){this.classes=k;this.fields=[];for(var h=0;h<k.length;h++){this.fields[h]={};
for(var g=0;g<k[h].attributes.length;g++)this.fields[h][k[h].attributes[g]]=g+1;void 0===k[h].proto&&(k[h].proto={});void 0===k[h].isArrayAttr&&(k[h].isArrayAttr={})}}k.prototype.attrIndices=function(k){return this.classes.map(function(h){return h.attributes.indexOf(k)+1||h.attributes.indexOf(k.toLowerCase())+1||void 0})};k.prototype.get=function(k,h){if(h in this.fields[k[0]])return k[this.fields[k[0]][h]];var g=h.toLowerCase();if(g in this.fields[k[0]])return k[this.fields[k[0]][g]];g=this.classes[k[0]].attributes.length+
1;if(g>=k.length||!(h in k[g])){if(h in this.classes[k[0]].proto)return this.classes[k[0]].proto[h]}else return k[g][h]};k.prototype.set=function(k,h,g){if(h in this.fields[k[0]])k[this.fields[k[0]][h]]=g;else{var f=h.toLowerCase();f in this.fields[k[0]]?k[this.fields[k[0]][f]]=g:(f=this.classes[k[0]].attributes.length+1,f>=k.length&&(k[f]={}),k[f][h]=g)}};k.prototype.makeSetter=function(k){var h=this;return function(g,f){h.set(g,k,f)}};k.prototype.makeGetter=function(k){var h=this;return function(g){return h.get(g,
k)}};k.prototype.makeFastSetter=function(k){var h=this.attrIndices(k);return function(g,f){void 0!==h[g[0]]&&(g[h[g[0]]]=f)}};k.prototype.makeFastGetter=function(k){var h=this.attrIndices(k);return function(g){if(void 0!==h[g[0]])return g[h[g[0]]]}};k.prototype.construct=function(k,h,g){k=Array(k.classes[g].length);for(var f in h)this.set(k,f,h[f]);return k};k.prototype.accessors=function(){return this._accessors=this._accessors||this._makeAccessors()};k.prototype._makeAccessors=function(){var k=
{},h,g={get:function(d){if(d=this.get.field_accessors[d])return d.call(this)},set:function(d,e){var c=this.set.field_accessors[d];if(c)return c.call(this,e)},tags:function(){return h[this[0]]||[]}};g.get.field_accessors={};g.set.field_accessors={};dojo.forEach(this.classes,function(d,e){dojo.forEach(d.attributes||[],function(c,b){k[c]=k[c]||[];k[c][e]=b+1;c=c.toLowerCase();k[c]=k[c]||[];k[c][e]=b+1})});h=dojo.map(this.classes,function(d){return d.attributes});for(var f in k)k.hasOwnProperty(f)&&(g.get.field_accessors[f]=
function(){var d=k[f];return!d?function(){}:function(){return this[d[this[0]]]}}(),g.set.field_accessors[f]=function(){var d=k[f];return!d?function(){}:function(e){return this[d[this[0]]]=e}}());return g};return k})},"JBrowse/Store/NCList":function(){define(["dojo/request","dojo/promise/all","dojo/Deferred","JBrowse/Util"],function(k,l,h,g){function f(){this.topList=[]}f.prototype.importExisting=function(d,e,c,b,a){this.topList=d;this.attrs=e;this.start=e.makeFastGetter("Start");this.end=e.makeFastGetter("End");
this.lazyClass=a;this.baseURL=c;this.lazyUrlTemplate=b;this.lazyChunks={}};f.prototype.fill=function(d,e){if(0==d.length)this.topList=[];else{this.attrs=e;this.start=e.makeFastGetter("Start");this.end=e.makeFastGetter("End");var c=e.makeSetter("Sublist"),b=this.start,a=this.end;d.sort(function(c,d){return b(c)!=b(d)?b(c)-b(d):a(d)-a(c)});var f=[],g=[];this.topList=g;g.push(d[0]);if(1!=d.length)for(var h,k,l=1,p=d.length;l<p;l++)if(h=d[l],a(h)<a(d[l-1]))f.push(g),g=Array(h),c(d[l-1],g);else for(;;)if(0==
f.length){g.push(h);break}else if(k=f[f.length-1],a(k[k.length-1])>a(h)){g.push(h);break}else g=f.pop()}};f.prototype.binarySearch=function(d,e,c){for(var b=-1,a=d.length,f;1<a-b;)f=b+a>>>1,c(d[f])>=e?a=f:b=f;return c===this.end?a:b};f.prototype.iterHelper=function(d,e,c,b,a,f,n,q){for(var s=d.length,r=this.binarySearch(d,e,f),p=this.attrs.makeGetter("Chunk"),t=this.attrs.makeGetter("Sublist"),u=[];r<s&&0<=r&&a*n(d[r])<a*c;){d[r][0]==this.lazyClass?function(){var l=this,q=p(d[r]);q in this.lazyChunks||
(this.lazyChunks[q]={});var y=new h;u.push(y.promise);k.get(g.resolveUrl(this.baseURL,this.lazyUrlTemplate.replace(/\{Chunk\}/ig,q)),{handleAs:"json"}).then(function(d){return l.iterHelper(d,e,c,b,a,f,n,[q]).then(function(){y.resolve()})},function(a){if(404!=a.response.status)throw Error(a);y.resolve()})}.call(this):b(d[r],q.concat(r));var v=t(d[r]);v&&u.push(this.iterHelper(v,e,c,b,a,f,n,q.concat(r)));r+=a}return l(u)};f.prototype.iterate=function(d,e,c,b){var a=d>e?this.start:this.end,f=d>e?this.end:
this.start;0<this.topList.length&&this.iterHelper(this.topList,d,e,c,d>e?-1:1,a,f,[0]).then(b)};f.prototype.histogram=function(d,e,c,b){for(var a=Array(c),f=(e-d)/c,g=this.start,h=this.end,k=0;k<c;k++)a[k]=0;this.iterate(d,e,function(b){var e=Math.max(0,(g(b)-d)/f|0);for(b=Math.min(c,(h(b)-d)/f|0);e<=b;e++)a[e]++},function(){b(a)})};return f})},"JBrowse/Store/LazyArray":function(){define(["JBrowse/Util","JBrowse/Finisher","dojo/_base/xhr"],function(k,l,h){h=function(g,f){this.urlTemplate=g.urlTemplate;
this.chunkSize=g.chunkSize;this.length=g.length;this.baseUrl=void 0===f?"":f;this.chunks=[];this.toProcess={}};h.prototype.index=function(g,f,d){this.range(g,g,f,void 0,d)};h.prototype.range=function(g,f,d,e,c){g=Math.max(0,g);f=Math.min(f,this.length-1);var b=Math.floor(g/this.chunkSize),a=Math.floor(f/this.chunkSize);void 0===e&&(e=function(){});var h=new l(e);for(e=b;e<=a;e++)this.chunks[e]?this._processChunk(g,f,e,d,c):(b={start:g,end:f,callback:d,param:c,finish:h},h.inc(),this.toProcess[e]?this.toProcess[e].push(b):
(this.toProcess[e]=[b],b=this.urlTemplate.replace(/\{Chunk\}/gi,e),dojo.xhrGet({url:this.baseUrl?k.resolveUrl(this.baseUrl,b):b,handleAs:"json",load:this._makeLoadFun(e),error:function(){h.dec()}})));h.finish()};h.prototype._makeLoadFun=function(g){var f=this;return function(d){f.chunks[g]=d;d=f.toProcess[g];delete f.toProcess[g];for(var e=0;e<d.length;e++)f._processChunk(d[e].start,d[e].end,g,d[e].callback,d[e].param),d[e].finish.dec()}};h.prototype._processChunk=function(g,f,d,e,c){var b=d*this.chunkSize;
f-=b;g=Math.max(0,g-b);for(f=Math.min(f,this.chunkSize-1);g<=f;g++)e(g+b,this.chunks[d][g],c)};return h})},"JBrowse/Finisher":function(){define(["dojo/_base/declare"],function(k){return k(null,{constructor:function(k){this.fun=k;this.count=0;this.finished=!1},inc:function(){this.count++},dec:function(){this.count--;this.finish()},finish:function(){0>=this.count&&!this.finished&&(this.fun(),this.finished=!0)}})})},"JBrowse/Store/TiledImage/Fixed":function(){define(["dojo/_base/declare","dojo/_base/Deferred",
"JBrowse/Store","JBrowse/Store/DeferredStatsMixin","JBrowse/Util"],function(k,l,h,g,f){return k([h,g],{constructor:function(d){this.tileToImage={};this.zoomCache={};this.baseUrl=d.baseUrl;this.url=this.resolveUrl(d.urlTemplate);this._deferred.images=new l;dojo.xhrGet({url:this.url,handleAs:"json",failOk:!0,load:dojo.hitch(this,function(d){this.loadSuccess(d)}),error:dojo.hitch(this,"_failAllDeferred")})},loadSuccess:function(d){this.globalStats=d.stats||{};"scoreMin"in this.globalStats||(this.globalStats.scoreMin=
this.globalStats.global_min);"scoreMax"in this.globalStats||(this.globalStats.scoreMax=this.globalStats.global_max);this.tileWidth=d.tileWidth;this.align=d.align;this.zoomLevels=d.zoomLevels;this._deferred.stats.resolve({success:!0});this._deferred.images.resolve({success:!0})},_getZoom:function(d){var e=this.zoomCache[d];if(e)return e;for(var e=this.zoomLevels[0],c=this.tileWidth/d,b=1;b<this.zoomLevels.length;b++)Math.abs(this.zoomLevels[b].basesPerTile-c)<Math.abs(e.basesPerTile-c)&&(e=this.zoomLevels[b]);
return this.zoomCache[d]=e},getImages:function(d,e,c){var b=this;this._deferred.images.then(function(a){a.success?b._getImages(d,e,c):(b.error=a.error,c(a.error||a))},c)},_getImages:function(d,e,c){var b=d.start;c=d.end;d=this._getZoom(d.scale||1);var a=Math.max(b/d.basesPerTile,0)|0;c=c/d.basesPerTile|0;for(var b=[],f=a;f<=c;f++)a=document.createElement("img"),dojo.connect(a,"onerror",this.handleImageError),a.src=this._imageSource(d,f),a.startBase=f*d.basesPerTile,a.baseWidth=d.basesPerTile,a.tileNum=
f,b.push(a);e(b)},_imageSource:function(d,e){return f.resolveUrl(this.url,d.urlPrefix+e+".png")}})})},"JBrowse/Store/Names/Hash":function(){define("dojo/_base/declare dojo/_base/array dojo/store/util/QueryResults JBrowse/Util JBrowse/Store/Hash JBrowse/Model/Location".split(" "),function(k,l,h,g,f,d){return k(f,{constructor:function(d){this.tooManyMatchesMessage=d.tooManyMatchesMessage||"(too many matches to display)";var c=this.stopPrefixes={};d.stopPrefixes&&dojo.forEach("string"==typeof d.stopPrefixes?
[d.stopPrefixes]:d.stopPrefixes,function(b){for(;b.length;)c[b]=!0,b=b.substr(0,b.length-1)})},_nameRecordToItem:function(e){if(e.hitLimit)return{name:this.tooManyMatchesMessage,hitLimit:!0};var c={};if("object"==typeof e){c.name=e[0];var b=this._findTrackConfig(((this.meta||{}).track_names||{})[e[1]]);c.location=new d({ref:e[3],start:parseInt(e[4]),end:parseInt(e[5]),tracks:[b],objectName:e[0]})}else c.name=e;return c},_findTrackConfig:function(d){if(!d)return null;var c=null;l.some(this.browser.config.tracks,
function(b){return b.label==d?(c=b,!0):!1});return c},_makeResults:function(d){d=l.map(d,dojo.hitch(this,"_nameRecordToItem")).sort(function(a,b){return a.name.localeCompare(b.name)||a.location.localeCompare(b.location)});var c,b;d=l.filter(d,function(a){if(a.hitLimit)return b=a,b.label||(b.label=b.name||"too many matches"),!1;if(c&&c.name==a.name)return c.label=c.name+' \x3cspan class\x3d"multipleLocations"\x3emultiple locations\x3c/span\x3e',c.multipleLocations?c.multipleLocations.push(a.location):
(c.multipleLocations=[c.location,a.location],delete c.location),!1;c=a;c.label=c.name+(c.location?' \x3cspan class\x3d"locString"\x3e'+c.location+"\x3c/span\x3e":"");return!0});b&&d.push(b);return h(d)},query:function(d,c){var b=this,a=(d.name||"").toString();this.meta.lowercase_keys&&(a=a.toLowerCase());var f=/\*$/;return f.test(a)?(a=a.replace(f,""),this._getEntry(a).then(function(a){a=a||{};return b._makeResults((a.exact||[]).concat(a.prefix||[]))})):this._getEntry(a).then(function(a){return b._makeResults((a||
{}).exact||[])})},get:function(d){this.meta.lowercase_keys&&(d=d.toLowerCase());return this._getEntry(d).then(function(c){return(c=(c.exact||[])[0])?this._nameRecordToItem(c):null})},_getEntry:function(d){return this._getBucket(d).then(function(c){return c[d]})}})})},"JBrowse/Store/Hash":function(){define("dojo/_base/declare dojo/_base/array dojo/store/JsonRest dojo/store/util/QueryResults JBrowse/Digest/Crc32 JBrowse/Util".split(" "),function(k,l,h,g,f,d){return k(null,{constructor:function(d){var c=
/\/$/.test(d.url)?d.url:d.url+"/";this.bucketStore=new h({target:c});this.meta={};this.browser=d.browser;this.ready=this._readMeta()},_readMeta:function(){var d=this;return this.bucketStore.get("meta.json").then(function(c){dojo.mixin(d.meta,c||{});d.meta.hash_hex_characters=Math.ceil(d.meta.hash_bits/4)})},query:function(d,c){return this.get((d.name||"").toString()).then(function(b){return g((b||{}).exact||[])})},get:function(d){return this._getBucket(d).then(function(c){return c[d]})},_getBucket:function(e){var c=
this;return this.ready.then(function(){var b=c._hash(e);return c.bucketStore.get(c._hexToDirPath(b)).then(function(a){return a},function(a){if(d.isElectron()||404==a.status)return{}})})},_hexToDirPath:function(d){for(;8>d.length;)d="0"+d;d=d.substr(8-this.meta.hash_hex_characters);for(var c=[],b=0;b<d.length;b+=3)c.push(d.substring(b,b+3));return c.join("/")+".json"+(this.meta.compress?"z":"")},_hash:function(d){return f.objectFingerprint(d).toString(16).toLowerCase().replace("-","n")},getIdentity:function(d){return d.id}})})},
"dojo/store/JsonRest":function(){define(["../_base/xhr","../_base/lang","../json","../_base/declare","./util/QueryResults"],function(k,l,h,g,f){return g("dojo.store.JsonRest",null,{constructor:function(d){this.headers={};g.safeMixin(this,d)},headers:{},target:"",idProperty:"id",ascendingPrefix:"+",descendingPrefix:"-",get:function(d,e){e=e||{};var c=l.mixin({Accept:this.accepts},this.headers,e.headers||e);return k("GET",{url:this.target+d,handleAs:"json",headers:c})},accepts:"application/javascript, application/json",
getIdentity:function(d){return d[this.idProperty]},put:function(d,e){e=e||{};var c="id"in e?e.id:this.getIdentity(d),b="undefined"!=typeof c;return k(b&&!e.incremental?"PUT":"POST",{url:b?this.target+c:this.target,postData:h.stringify(d),handleAs:"json",headers:l.mixin({"Content-Type":"application/json",Accept:this.accepts,"If-Match":!0===e.overwrite?"*":null,"If-None-Match":!1===e.overwrite?"*":null},this.headers,e.headers)})},add:function(d,e){e=e||{};e.overwrite=!1;return this.put(d,e)},remove:function(d,
e){e=e||{};return k("DELETE",{url:this.target+d,headers:l.mixin({},this.headers,e.headers)})},query:function(d,e){e=e||{};var c=l.mixin({Accept:this.accepts},this.headers,e.headers);if(0<=e.start||0<=e.count)c.Range=c["X-Range"]="items\x3d"+(e.start||"0")+"-"+("count"in e&&Infinity!=e.count?e.count+(e.start||0)-1:"");var b=-1<this.target.indexOf("?");d&&"object"==typeof d&&(d=(d=k.objectToQuery(d))?(b?"\x26":"?")+d:"");if(e&&e.sort){var a=this.sortParam;d+=(d||b?"\x26":"?")+(a?a+"\x3d":"sort(");for(b=
0;b<e.sort.length;b++){var g=e.sort[b];d+=(0<b?",":"")+(g.descending?this.descendingPrefix:this.ascendingPrefix)+encodeURIComponent(g.attribute)}a||(d+=")")}var h=k("GET",{url:this.target+(d||""),handleAs:"json",headers:c});h.total=h.then(function(){var a=h.ioArgs.xhr.getResponseHeader("Content-Range");return a&&(a=a.match(/\/(.*)/))&&+a[1]});return f(h)}})})},"JBrowse/Store/Names/REST":function(){define("dojo/_base/declare dojo/_base/array dojo/store/util/QueryResults dojo/request/xhr dojo/io-query JBrowse/Store/Hash".split(" "),
function(k,l,h,g,f,d){return k(null,{constructor:function(d){this.url=d.url},query:function(d,c){var b="equals",a=""+d.name;/\*$/.test(a)&&(a=a.replace(/\*$/,""),b="startswith");var k={};k[b]=a;return g(this.url+"?"+f.objectToQuery(k),{handleAs:"json"}).then(function(a){for(var b=0;b<a.length;b++){var c=a[b];c.label=c.name+(c.location?'\x3cspan class\x3d"locString"\x3e'+c.location.ref+":"+c.location.start+".."+c.location.end+" ("+c.name+")\x3c/span\x3e":"")}return h(a)},function(a){return h([])})},
get:function(d){return this.query(d,void 0)},getIdentity:function(d){return d.id}})})},"JBrowse/View/Track/Sequence":function(){define("dojo/_base/declare dojo/_base/array dojo/_base/lang dojo/dom-construct dojo/dom-class dojo/query JBrowse/View/Track/BlockBased JBrowse/View/Track/_ExportMixin JBrowse/CodonTable JBrowse/Util".split(" "),function(k,l,h,g,f,d,e,c,b,a){return k([e,c,b],{constructor:function(a){this._charMeasurements={};this._codonTable=this.generateCodonTable(h.mixin(this.defaultCodonTable,
this.config.codonTable));this._codonStarts=this.config.codonStarts||this.defaultStarts;this._codonStops=this.config.codonStops||this.defaultStops},_defaultConfig:function(){return{maxExportSpan:5E5,showForwardStrand:!0,showReverseStrand:!0,showTranslation:!0,showColor:!0,seqType:"dna",proteinColorScheme:"taylor"}},_exportFormats:function(){return[{name:"FASTA",label:"FASTA",fileExt:"fasta"}]},endZoom:function(a,b){this.clear()},setViewInfo:function(a,b,c,d,e,f,g){this.inherited(arguments);this.show()},
nbsp:String.fromCharCode(160),fillBlock:function(a){var b=a.blockIndex,c=a.block,d=a.scale,e=a.leftBase-2,f=a.rightBase+2,h=this,k=dojo.create("div",{className:"sequence_blur",innerHTML:'\x3cspan class\x3d"loading"\x3eLoading\x3c/span\x3e'},c.domNode);this.heightUpdate(k.offsetHeight+2*k.offsetTop,b);1.3<=d?this.store.getReferenceSequence({ref:this.refSeq.name,start:e,end:f},function(e){""==e.trim()?k.innerHTML='\x3cspan class\x3d"zoom"\x3eNo sequence available\x3c/span\x3e':(g.empty(c.domNode),h._fillSequenceBlock(c,
b,d,e));a.finishCallback()},function(){a.finishCallback()}):(k.innerHTML='\x3cspan class\x3d"zoom"\x3eZoom in to see sequence\x3c/span\x3e',a.finishCallback())},_fillSequenceBlock:function(b,c,d,e){e=e.replace(/\s/g,this.nbsp);var h=b.startBase,k=b.endBase,t=e.substring(2,e.length-2),u=t.length,v=e.substring(0,e.length-2-(e.length-2)%3);e=e.substring(2);if(this.config.showForwardStrand&&this.config.showTranslation){for(var x=[],w=0;3>w;w++){var y=h+w,y=(y%3+3)%3,z=this._renderTranslation(e,w,h,k,
u,d);x[y]=z;f.add(z,"frame"+y)}for(w=2;0<=w;w--)b.domNode.appendChild(x[w])}e=this.getCharacterMeasurements("sequence");e=d>e.w+4;var A;if(this.config.showReverseStrand||this.config.showForwardStrand)A=g.create("table",{className:"sequence"+(e?" big":"")+(this.config.showColor?"":" nocolor"),style:{width:"100%"}},b.domNode);this.config.showForwardStrand&&A.appendChild(this._renderSeqTr(h,k,t,d));if(this.config.showReverseStrand&&(t=this._renderSeqTr(h,k,a.complement(t),d),t.className="revcom",A.appendChild(t),
this.config.showTranslation)){x=[];for(w=0;3>w;w++)y=h+1-w,y=(y%3+3)%3,z=this._renderTranslation(v,w,h,k,u,d,!0),x[y]=z,f.add(z,"frame"+y);for(w=0;3>w;w++)b.domNode.appendChild(x[w])}var D=0;l.forEach(b.domNode.childNodes,function(a){D+=a.clientHeight||a.offsetHeight});this.heightUpdate(D,c)},_renderTranslation:function(b,c,d,e,f,h,k){b=k?a.revcom(b):b;d=b.slice(c,b.length-(b.length-c)%3);b="";for(e=0;e<d.length;e+=3){var l=d.slice(e,e+3);b+=this._codonTable[l]||this.nbsp}b=k?b.split("").reverse().join(""):
b;d=k?d.split("").reverse().join(""):d;e=this.getCharacterMeasurements("aminoAcid");var v=h>e.w+4;f=100/(f/3);var l=g.create("div",{className:"translatedSequence"}),x=g.create("table",{className:"translatedSequence offset"+c+(v?" big":""),style:{width:f*b.length+"%"}},l),v=g.create("tr",{},x);x.style.left=(k?100-f*(b.length+c/3):f*c/3)+"%";f=100/b.length+"%";if(c=h>=e.w)x.className+=" big";for(e=0;e<b.length;e++)h=document.createElement("td"),x=d.slice(3*e,3*e+3),x=k?x.split("").reverse().join(""):
x,h.className="aminoAcid aminoAcid_"+b.charAt(e).toLowerCase(),-1!=this._codonStarts.indexOf(x.toUpperCase())&&(h.className="aminoAcid aminoAcid_start"),-1!=this._codonStops.indexOf(x.toUpperCase())&&(h.className="aminoAcid aminoAcid_stop"),h.style.width=f,c&&(h.innerHTML=b.charAt(e)),v.appendChild(h);return l},_renderSeqTr:function(a,b,c,d){var e=this.getCharacterMeasurements("sequence"),f=document.createElement("tr");a=100/(b-a)+"%";d=d>=e.w;e="base";"protein"===this.config.seqType&&(e+=" aaScheme_"+
this.config.proteinColorScheme);for(b=0;b<c.length;b++){var g=document.createElement("td");g.className=e+" base_"+c.charAt(b).toLowerCase();g.style.width=a;d&&(g.innerHTML=c.charAt(b));f.appendChild(g)}return f},startZoom:function(){d(".base",this.div).empty()},getCharacterMeasurements:function(a){return this._charMeasurements[a]||(this._charMeasurements[a]=this._measureSequenceCharacterSize(this.div,a))},_measureSequenceCharacterSize:function(a,b){var c=document.createElement("td");c.className=b;
c.style.visibility="hidden";c.appendChild(document.createTextNode("12345678901234567890123456789012345678901234567890"));a.appendChild(c);var d={w:c.clientWidth/50+1,h:c.clientHeight};a.removeChild(c);return d},_trackMenuOptions:function(){var a=this,b=this.inherited(arguments);b.push({type:"dijit/MenuSeparator"});b.push.apply(b,[{label:"Show forward strand",type:"dijit/CheckedMenuItem",checked:!!this.config.showForwardStrand,onClick:function(b){a.config.showForwardStrand=this.checked;a.changed()}},
{label:"Show reverse strand",type:"dijit/CheckedMenuItem",checked:!!this.config.showReverseStrand,onClick:function(b){a.config.showReverseStrand=this.checked;a.changed()}},{label:"Show translation",type:"dijit/CheckedMenuItem",checked:!!this.config.showTranslation,onClick:function(b){a.config.showTranslation=this.checked;a.changed()}},{label:"Show color",type:"dijit/CheckedMenuItem",checked:!!this.config.showColor,onClick:function(b){a.config.showColor=this.checked;a.changed()}}]);return b}})})},
"JBrowse/View/Track/_ExportMixin":function(){define("dojo/_base/declare dojo/_base/array dojo/_base/lang dojo/aspect dojo/on JBrowse/has dojo/window dojo/dom-construct JBrowse/Util dijit/form/TextBox dijit/form/Button dijit/form/RadioButton dijit/Dialog FileSaver/FileSaver".split(" "),function(k,l,h,g,f,d,e,c,b,a,m,n,q,s){return k(null,{_canSaveFiles:function(){return d("save-generated-files")&&!this.config.noExportFiles},_canExport:function(){if(this.config.noExport)return!1;var a=this.browser.getHighlight(),
b=this.browser.view.visibleRegion(),c={ref:this.refSeq.name,start:this.refSeq.start,end:this.refSeq.end};this._canExportRegion(b);this._canExportRegion(c);return a&&this._canExportRegion(a)||this._canExportRegion(b)||this._canExportRegion(c)},_possibleExportRegions:function(){var a=dojo.clone(this.browser.view.visibleRegion());a.description="Visible region";a.name="visible";var a=[a,{ref:this.refSeq.name,start:this.refSeq.start,end:this.refSeq.end,description:"Whole reference sequence",name:"wholeref"}],
b=this.browser.getHighlight();b&&a.unshift(h.mixin(h.clone(b),{description:"Highlighted region",name:"highlight"}));return a},_exportDialogContent:function(){var a=this.track._possibleExportRegions();l.forEach(a,function(a){a.length=Math.round(a.end-a.start+1);a.canExport=this._canExportRegion(a)},this.track);var d=dojo.hitch(this.track,function(){var a=this._readRadio(e.elements.region),b=s[this._readRadio(e.elements.format)];e.elements.filename.value=((this.key||this.label)+"-"+a).replace(/[^ .a-zA-Z0-9_-]/g,
"-")+"."+b}),e=c.create("form",{onSubmit:function(){return!1}}),g=c.create("fieldset",{className:"region"},e);c.create("legend",{innerHTML:"Region to save"},g);var k=0;l.forEach(a,function(a){var e=b.assembleLocString(a),h=new n({name:"region",id:"region_"+a.name,value:e,checked:a.canExport&&!k++?"checked":""});g.appendChild(h.domNode);e=c.create("label",{"for":h.id,innerHTML:a.description+' - \x3cspan class\x3d"locString"\x3e'+e+"\x3c/span\x3e ("+b.humanReadableNumber(a.length)+(a.canExport?"b":
"b, too large")+")"},g);a.canExport||(h.domNode.disabled="disabled",e.className="ghosted");f(h,"click",d);c.create("br",{},g)});var q=c.create("fieldset",{className:"format"},e);c.create("legend",{innerHTML:"Format"},q);var k=0,s={};l.forEach(this.track._exportFormats(),function(a){a.name||(a={name:a,label:a});a.fileExt||(a.fileExt=a.name||a);s[a.name]=a.fileExt;var b=new n({name:"format",id:"format"+a.name,value:a.name,checked:k++?"":"checked"});q.appendChild(b.domNode);c.create("label",{"for":b.id,
innerHTML:a.label},q);f(b,"click",d);c.create("br",{},q)},this);var y=c.create("fieldset",{className:"filename"},e);c.create("legend",{innerHTML:"Filename"},y);c.create("input",{type:"text",name:"filename",style:{width:"100%"}},y);d();var y=c.create("div",{className:"dijitDialogPaneActionBar"}),z=this.dialog;(new m({iconClass:"dijitIconDelete",onClick:dojo.hitch(z,"hide"),label:"Cancel"})).placeAt(y);(new m({iconClass:"dijitIconTask",label:"View",disabled:!l.some(a,function(a){return a.canExport}),
onClick:h.partial(this.track._exportViewButtonClicked,this.track,e,z)})).placeAt(y);if(this.track._canSaveFiles())var A=(new m({iconClass:"dijitIconSave",label:"Save",disabled:!l.some(a,function(a){return a.canExport}),onClick:dojo.hitch(this.track,function(){var a=this._readRadio(e.elements.format),b=this._readRadio(e.elements.region),c=e.elements.filename.value.replace(/[^ .a-zA-Z0-9_-]/g,"-");A.set("disabled",!0);A.set("iconClass","jbrowseIconBusy");this.exportRegion(b,a,dojo.hitch(this,function(b){z.hide();
this._fileDownload({format:a,data:b,filename:c})}))})})).placeAt(y);return[e,y]},_exportViewButtonClicked:function(d,f,h){this.set("disabled",!0);this.set("iconClass","jbrowseIconBusy");var k=d._readRadio(f.elements.region),l=d._readRadio(f.elements.format),n=f.elements.filename.value.replace(/[^ .a-zA-Z0-9_-]/g,"-");d.exportRegion(k,l,function(f){h.hide();var y=c.create("textarea",{rows:Math.round(0.5*(e.getBox().h/12)),wrap:"off",cols:80,style:"maxWidth: 90em; overflow: scroll; overflow-y: scroll; overflow-x: scroll; overflow:-moz-scrollbars-vertical;",
readonly:!0});y.value=f;var z=c.create("div",{className:"dijitDialogPaneActionBar"}),p=new q({className:"export-view-dialog",title:l+' export - \x3cspan class\x3d"locString"\x3e'+k+"\x3c/span\x3e ("+b.humanReadableNumber(f.length)+"bytes)",content:[y,z]});(new m({iconClass:"dijitIconDelete",label:"Close",onClick:dojo.hitch(p,"hide")})).placeAt(z);if(d._canSaveFiles()){z=c.create("div",{className:"save"},z);(new m({iconClass:"dijitIconSave",label:"Save",onClick:function(){var a=s.get("value").replace(/[^ .a-zA-Z0-9_-]/g,
"-");p.hide();d._fileDownload({format:l,data:f,filename:a})}})).placeAt(z);var s=(new a({value:n,style:"width: 24em"})).placeAt(z)}g.after(p,"hide",function(){y.parentNode.removeChild(y);y=null;setTimeout(function(){p.destroyRecursive()},500)});p.show()})},_fileDownload:function(a){s(new Blob([a.data],{type:a.format?"application/x-"+a.format.toLowerCase():"text/plain"}),a.filename)},_readRadio:function(a){if(a.length)for(var b=0;b<a.length;b++)if(a[b].checked)return a[b].value;return a.value},exportRegion:function(a,
c,d){"string"==typeof a&&(a=b.parseLocString(a));a.ref!=this.refSeq.name?console.error("cannot export data for ref seq "+a.ref+", exporting is currently only supported for the currently-visible reference sequence"):require([c.match(/\//)?c:"JBrowse/View/Export/"+c],dojo.hitch(this,function(b){(new b({refSeq:this.refSeq,track:this,store:this.store})).exportRegion(a,d)}))},_trackMenuOptions:function(){var a=this.inherited(arguments);this.config.noExport||a.push({label:"Save track data",iconClass:"dijitIconSave",
disabled:!this._canExport(),action:"bareDialog",content:this._exportDialogContent,dialog:{id:"exportDialog",className:"export-dialog"}});return a},_canExportRegion:function(a){if(!a)return!1;if("number"==typeof this.config.maxExportSpan||"string"==typeof this.config.maxExportSpan)return a.end-a.start+1<=this.config.maxExportSpan;var b={};this.store.getGlobalStats(function(a){b=a},function(a){});return b.featureDensity?b.featureDensity*(a.end-a.start)<=(this.config.maxExportFeatures||5E4):!0}})})},
"FileSaver/FileSaver":function(){define([],function(){var k=k||navigator.msSaveBlob&&navigator.msSaveBlob.bind(navigator)||function(k){var h=k.document,g=k.URL||k.webkitURL||k,f;try{f=h.createElementNS("http://www.w3.org/1999/xhtml","a")}catch(d){f=h.createElement("a")}var e="download"in f,c=function(a){var b=h.createEvent("MouseEvents");b.initMouseEvent("click",!0,!1,k,0,0,0,0,0,!1,!1,!1,!1,0,null);a.dispatchEvent(b)},b=k.webkitRequestFileSystem,a=k.requestFileSystem||b||k.mozRequestFileSystem,m=
function(a){(k.setImmediate||k.setTimeout)(function(){throw a;},0)},n=0,q=[],s=function(a,b,c){b=[].concat(b);for(var d=b.length;d--;){var e=a["on"+b[d]];if("function"===typeof e)try{e.call(a,c||a)}catch(f){m(f)}}},r=function(d,g){var h=this,m=d.type,y=!1,z,p,r=function(){var a=(k.URL||k.webkitURL||k).createObjectURL(d);q.push(a);return a},t=function(){s(h,["writestart","progress","write","writeend"])},B=function(){if(y||!z)z=r(d);p?p.location.href=z:window.open(z,"_blank");h.readyState=h.DONE;t()},
I=function(a){return function(){if(h.readyState!==h.DONE)return a.apply(this,arguments)}},M={create:!0,exclusive:!1},K;h.readyState=h.INIT;g||(g="download");if(e)z=r(d),f.href=z,f.download=g,c(f),h.readyState=h.DONE,t();else{k.chrome&&(m&&"application/octet-stream"!==m)&&(K=d.slice||d.webkitSlice,d=K.call(d,0,d.size,"application/octet-stream"),y=!0);b&&"download"!==g&&(g+=".download");if("application/octet-stream"===m||b)p=k;a?(n+=d.size,a(k.TEMPORARY,n,I(function(a){a.root.getDirectory("saved",M,
I(function(a){var b=function(){a.getFile(g,M,I(function(a){a.createWriter(I(function(b){b.onwriteend=function(b){p.location.href=a.toURL();q.push(a);h.readyState=h.DONE;s(h,"writeend",b)};b.onerror=function(){var a=b.error;a.code!==a.ABORT_ERR&&B()};["writestart","progress","write","abort"].forEach(function(a){b["on"+a]=h["on"+a]});b.write(d);h.abort=function(){b.abort();h.readyState=h.DONE};h.readyState=h.WRITING}),B)}),B)};a.getFile(g,{create:!1},I(function(a){a.remove();b()}),I(function(a){a.code===
a.NOT_FOUND_ERR?b():B()}))}),B)}),B)):B()}},p=r.prototype;p.abort=function(){this.readyState=this.DONE;s(this,"abort")};p.readyState=p.INIT=0;p.WRITING=1;p.DONE=2;p.error=p.onwritestart=p.onprogress=p.onwrite=p.onabort=p.onerror=p.onwriteend=null;try{k.addEventListener("unload",function(){for(var a=q.length;a--;){var b=q[a];"string"===typeof b?g.revokeObjectURL(b):b.remove()}q.length=0},!1)}catch(t){console.warn("FileSaver.js probably will not work")}return function(a,b){return new r(a,b)}}(self);
return k})},"JBrowse/CodonTable":function(){define(["dojo/_base/declare"],function(k){return k(null,{defaultStarts:["ATG"],defaultStops:["TAA","TAG","TGA"],defaultCodonTable:{TCA:"S",TCC:"S",TCG:"S",TCT:"S",TTC:"F",TTT:"F",TTA:"L",TTG:"L",TAC:"Y",TAT:"Y",TAA:"*",TAG:"*",TGC:"C",TGT:"C",TGA:"*",TGG:"W",CTA:"L",CTC:"L",CTG:"L",CTT:"L",CCA:"P",CCC:"P",CCG:"P",CCT:"P",CAC:"H",CAT:"H",CAA:"Q",CAG:"Q",CGA:"R",CGC:"R",CGG:"R",CGT:"R",ATA:"I",ATC:"I",ATT:"I",ATG:"M",ACA:"T",ACC:"T",ACG:"T",ACT:"T",AAC:"N",
AAT:"N",AAA:"K",AAG:"K",AGC:"S",AGT:"S",AGA:"R",AGG:"R",GTA:"V",GTC:"V",GTG:"V",GTT:"V",GCA:"A",GCC:"A",GCG:"A",GCT:"A",GAC:"D",GAT:"D",GAA:"E",GAG:"E",GGA:"G",GGC:"G",GGG:"G",GGT:"G"},generateCodonTable:function(k){var h={},g;for(g in k)if(k.hasOwnProperty(g)){for(var f=k[g],d=[],e=0;3>e;e++){var c=g.charAt(e);d[e]=[];d[e][0]=c.toUpperCase();d[e][1]=c.toLowerCase()}for(e=0;2>e;e++)for(var c=d[0][e],b=0;2>b;b++)for(var a=d[1][b],m=0;2>m;m++)h[c+a+d[2][m]]=f}return h}})})},"JBrowse/View/Track/HTMLFeatures":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/dom-construct dojo/dom-geometry dojo/on dojo/query JBrowse/has dijit/Dialog dijit/form/Select dijit/form/RadioButton dijit/form/Button JBrowse/View/Track/BlockBased JBrowse/View/Track/_YScaleMixin JBrowse/View/Track/_ExportMixin JBrowse/View/Track/_FeatureDetailMixin JBrowse/View/Track/_TrackDetailsStatsMixin JBrowse/Util JBrowse/View/GranularRectLayout JBrowse/Model/Location".split(" "),
function(k,l,h,g,f,d,e,c,b,a,m,n,q,s,r,p,t,u,v,x){return k([q,s,r,p,t],{constructor:function(a){this.numBins=l.getObject("histogram.binsPerBlock",!1,this.config)||25;this.padding=this.defaultPadding=5;this.glyphHeightPad=1;this.levelHeightPad=2;this.minFeatWidth=this.labelPad=1;this.trackPadding=a.trackPadding;this.heightCache={};this.showLabels=this.config.style.showLabels;this._setupEventHandlers();"function"===typeof this.extendedInit&&this.extendedInit()},_defaultConfig:function(){return u.deepUpdate(l.clone(this.inherited(arguments)),
{maxFeatureScreenDensity:0.5,maxHeight:1E3,style:{arrowheadClass:"arrowhead",className:"feature2",_defaultHistScale:4,_defaultLabelScale:30,_defaultDescriptionScale:120,minSubfeatureWidth:6,maxDescriptionLength:70,showLabels:!0,label:"name,id",description:"note, description",centerChildrenVertically:!0},hooks:{create:function(a,b){return document.createElement("div")}},events:{},menuTemplate:[{label:"View details",title:"{type} {name}",action:"contentDialog",iconClass:"dijitIconTask",content:dojo.hitch(this,
"defaultFeatureDetail")},{label:function(){return"Highlight this "+(this.feature&&this.feature.get("type")?this.feature.get("type"):"feature")},action:function(){var a=new x({feature:this.feature,tracks:[this.track]});this.track.browser.setHighlightAndRedraw(a)},iconClass:"dijitIconFilter"}]})},wrapHandler:function(a){var b=this;return function(c){c=c||window.event;if(!c.shiftKey){var d=c.currentTarget||c.srcElement;d.feature||(d=d.parentElement);d.feature&&a(b,d,d.feature,c)}}},fillHistograms:function(a){var b=
a.blockIndex,c=a.block,d=a.stripeWidth,e=Math.abs(a.rightBase-a.leftBase),f=e/this.numBins,g=this;this.store.getRegionFeatureDensities({ref:this.refSeq.name,start:a.leftBase,end:a.rightBase,basesPerBin:f},function(a){if("histograms"==g._fillType){for(var h=a.bins,k=0,m=0;m<g.numBins;m++)"number"==typeof h[m]&&isFinite(h[m])&&(k=Math.max(k,h[m]));for(var m=a.stats?0.01>a.stats.mean/a.stats.max:!1,l=a.stats?100/(m?Math.log(a.stats.max):a.stats.max):2,l={basesPerBin:f,pxPerCount:l,logScale:m,stats:a.stats},
n,m=0;m<g.numBins;m++)"number"==typeof h[m]&&isFinite(h[m])&&(n=document.createElement("div"),n.className="hist feature-hist "+g.config.style.className+"-hist",n.style.cssText="left: "+100*(m/g.numBins)+"%; height: "+l.pxPerCount*(l.logScale?Math.log(h[m]):h[m])+"px;bottom: "+g.trackPadding+"px;width: "+(100/g.numBins-100/d)+"%;"+(g.config.style.histCss?g.config.style.histCss:""),n.setAttribute("value",h[m]),u.is_ie6&&n.appendChild(document.createComment()),c.domNode.appendChild(n));g.heightUpdate(l.pxPerCount*
(l.logScale?Math.log(k):k),b);g.makeHistogramYScale(e,l,a)}},dojo.hitch(this,"fillBlockError",b,c));a.finishCallback()},endZoom:function(a,b){this.clear()},updateStaticElements:function(a){this.inherited(arguments);this.updateYScaleFromViewDimensions(a);this.updateFeatureLabelPositions(a);this.updateFeatureArrowPositions(a)},updateFeatureArrowPositions:function(a){if("x"in a){a=this.browser.view.minVisible();for(var b=this.browser.view.maxVisible(),c=this.blocks,d=0;d<c.length;d++){var e=c[d];if(e)for(var f=
e.domNode.childNodes,g=0;g<f.length;g++){var h=f[g];if(h.feature){var k=h.feature,m=h._containerStart,l=h._containerEnd,n=k.get("strand");if(n){var q=k.get("start"),k=k.get("end"),m=Math.max(q,m),l=Math.min(k,l);if(0>n&&k>a)for(var k="minus-"+this.config.style.arrowheadClass,n=h.childNodes,p=0;p<n.length;p++)h=n[p],"string"===typeof h.className&&(h&&h.className&&0<=h.className.indexOf(k))&&(h.style.left=(q<a?e.bpToX(a)-e.bpToX(m):-this.minusArrowWidth)+"px");else if(0<n&&q<b){q="plus-"+this.config.style.arrowheadClass;
n=h.childNodes;for(p=0;p<n.length;p++)h=n[p],"string"===typeof h.className&&(h&&h.className&&0<=h.className.indexOf(q))&&(h.style.right=(k>b?e.bpToX(l)-e.bpToX(b-2):-this.plusArrowWidth)+"px")}}}}}}},updateFeatureLabelPositions:function(a){var b=this.browser._showLabels;"x"in a&&h.forEach(this.blocks,function(a,c){if(a&&this.label){var d=100*(this.label.offsetLeft+(b?this.label.offsetWidth:0)-a.domNode.offsetLeft)/a.domNode.offsetWidth+2;if(d){var e=a.endBase-a.startBase;h.forEach(a.domNode.childNodes,
function(b){if(b.label){var c=b.label,f=b.feature;b=parseInt(f.get("start"));b=100*(b-a.startBase)/e;f=parseInt(f.get("end"));f=100*((f-a.startBase)/e-c.offsetWidth/a.domNode.offsetWidth);c.style.left=Math.max(b,Math.min(d,f))+"%"}},this)}}},this)},fillBlock:function(a){var b=a.blockIndex,c=a.block,d=a.leftBase,e=a.rightBase,f=a.scale;this.store.getGlobalStats(dojo.hitch(this,function(g){var h=g.featureDensity,k=this.config.style.histScale||h*this.config.style._defaultHistScale,h=this.config.style.featureScale||
h/this.config.maxFeatureScreenDensity,m=Math.abs(d-e);this._updatedLabelForBlockSize!=m&&(this.store.getRegionFeatureDensities&&f<k?this.setLabel(this.key+' \x3cspan class\x3d"feature-density"\x3eper '+u.addCommas(Math.round(m/this.numBins))+" bp\x3c/span\x3e"):this.setLabel(this.key),this._updatedLabelForBlockSize=m);this.store.getRegionFeatureDensities&&f<k?(this._fillType="histograms",this.fillHistograms(a)):f<h?(this.fillTooManyFeaturesMessage(b,c,f),a.finishCallback()):(this.removeYScale(),this._fillType=
"features",this.fillFeatures(dojo.mixin({stats:g},a)))}),dojo.hitch(this,"fillBlockError",b,c))},makeHistogramYScale:function(a,b,c){if(b.logScale)console.error("Log histogram scale axis labels not yet implemented.");else if(c=this.height/b.pxPerCount,c=b.logScale?Math.log(c):c,!this.yscale||!this.yscale_params||!(this.yscale_params.maxval==c&&this.yscale_params.height==this.height&&this.yscale_params.blockbp==a))this.removeYScale(),this.makeYScale({min:0,max:c}),this.yscale_params={height:this.height,
blockbp:a,maxval:c}},destroy:function(){this._clearLayout();this.inherited(arguments)},cleanupBlock:function(a){if(a&&(this.layout&&this.layout.discardRange(a.startBase,a.endBase),a.featureNodes))for(var b in a.featureNodes){var c=a.featureNodes[b];h.forEach(["track","feature","callbackArgs","_labelScale","_descriptionScale"],function(a){u.removeAttribute(c,a)});"label"in c&&(h.forEach(["track","feature","callbackArgs"],function(a){u.removeAttribute(c.label,a)}),u.removeAttribute(c,"label"))}this.inherited(arguments)},
transfer:function(a,b,c,d,e){if(a&&b)for(var f=b.startBase,g=b.endBase,h,k=a.startBase<b.startBase?a.rightOverlaps:a.leftOverlaps,k=k||[],m=0;m<k.length;m++)if((h=a.featureNodes[k[m]])&&(h.label&&h.label.parentNode)&&h.label.parentNode.removeChild(h.label),h&&h.feature&&h.layoutEnd>f&&h.feature.get("start")<g){h.parentNode.removeChild(h);delete a.featureNodes[k[m]];var l=this.addFeatureToBlock(h.feature,k[m],b,c,h._labelScale,h._descriptionScale,d,e);h.booleanCovs&&this._maskTransfer(l,h,d,e)}},_maskTransfer:function(a,
b,c,d){for(var f=[];a.firstChild;)f.push(a.firstChild),a.removeChild(a.firstChild);var g=a.featureEdges.s,h=a.featureEdges.e,k;for(k in b.booleanCovs)if(b.booleanCovs.hasOwnProperty(k)){var f=b.booleanCovs[k].span.s,m=b.booleanCovs[k].span.e;m<c||f>d||(b.booleanCovs[k].style.left=100*(f-g)/(h-g)+"%",b.booleanCovs[k].style.width=100*(m-f)/(h-g)+"%",a.appendChild(b.booleanCovs[k]))}e(".basicSubfeature",b).forEach(function(b,e,f){e=b.subfeatureEdges.s;f=b.subfeatureEdges.e;f<c||e>d||(b.style.left=100*
(e-g)/(h-g)+"%",b.style.width=100*(f-e)/(h-g)+"%",a.appendChild(b))});this.config.style.arrowheadClass&&(k=this.config.style.arrowheadClass,e(".minus-"+k+", .plus-"+k,b).forEach(function(b,c,d){a.appendChild(b)}));a.className="basic";a.oldClassName=b.oldClassName;a.booleanCovs=b.booleanCovs},fillFeatures:function(a){var b=a.blockIndex,c=a.block,d=a.leftBase,e=a.rightBase,f=a.scale,g=a.stats,h=a.containerStart,k=a.containerEnd,m=a.finishCallback;this.scale=f;c.featureNodes={};this.haveMeasurements||
(this.measureStyles(),this.haveMeasurements=!0);var l=this.config.style.labelScale||g.featureDensity*this.config.style._defaultLabelScale,n=this.config.style.descriptionScale||g.featureDensity*this.config.style._defaultDescriptionScale,q=this;a=dojo.hitch(this,function(a){var b=a.id();if(!this._featureIsRendered(b)&&this.filterFeature(a)){var d=1;"function"===typeof this.renderFilter&&(d=this.renderFilter(a));1===d&&this.addFeatureToBlock(a,b,c,f,l,n,h,k)}});this.store.getFeatures({ref:this.refSeq.name,
start:d,end:e},a,function(a){q.heightUpdate(q._getLayout(f).getTotalHeight(),b);if(a&&a.maskingSpans){var c=[];c[0]={start:d};var g=0,h;for(h in a.maskingSpans)a.maskingSpans.hasOwnProperty(h)&&(h=a.maskingSpans[h],c[g].end=h.start,g++,c[g]={start:h.end});c[g].end=e;c[g].end<=c[g].start&&c.splice(g,1);c[0].end<=c[0].start&&c.splice(0,1);q.maskBySpans(c,a.maskingSpans)}m()},function(a){console.error(a,a.stack);q.fillBlockError(b,c,a);m()})},addFeatureToBlock:function(a,b,c,d,e,f,g,h){a=this.renderFeature(a,
b,c,d,e,f,g,h);if(!a)return null;c.domNode.appendChild(a);this.config.style.centerChildrenVertically&&this._centerChildrenVertically(a);return a},fillBlockTimeout:function(a,b){this.inherited(arguments);b.featureNodes={}},_featureIsRendered:function(a){for(var b=this.blocks,c=0;c<b.length;c++)if(b[c]&&b[c].featureNodes&&b[c].featureNodes[a])return!0;return!1},maskBySpans:function(a,b){var c=this.blocks,d;for(d in c)if(c.hasOwnProperty(d)&&c[d]){var e=c[d],f=function(a,b,c,d){a=Math.max(a,c);b=Math.min(b,
d);return a<b?{s:a,e:b}:!1},g=function(a,b,c,d,e){var f=dojo.create("div"),g=c.featureEdges?c.featureEdges.s:c.subfeatureEdges.s;c=c.featureEdges?c.featureEdges.e:c.subfeatureEdges.e;f.span={s:a,e:b};f.className=d?l.className==e?l.oldClassName+" Boolean-transparent":l.className+" Boolean-transparent":l.className==e?l.oldClassName:l.className;f.booleanDiv=!0;f.style.left=100*(a-g)/(c-g)+"%";f.style.top="0px";f.style.width=100*(b-a)/(c-g)+"%";return f},h=function(a,b,c,d,e,k){k=k||!1;for(var m in c.childNodes)if(c.childNodes[m]&&
c.childNodes[m].booleanDiv){var l=c.childNodes[m].span.s,n=c.childNodes[m].span.e;if(l<=a&&n>=b){k=!0;break}var y;y=a;var q=b;y=f(y,q,l,n)?{s:Math.min(y,l),e:Math.max(q,n)}:!1;if(y){k=g(y.s,y.e,c,d,e);q=c.booleanCovs.indexOf(c.childNodes[m]);c.removeChild(c.childNodes[m]);c.booleanCovs.splice(q,1);c.appendChild(k);c.booleanCovs.push(k);k=!0;h(y.s,y.e,c,d,e,!0);break}}k||(k=g(a,b,c,d,e),c.appendChild(k),c.booleanCovs.push(k))},k=function(a,b,c,d,e,g){c.booleanCovs||(c.booleanCovs=[]);for(var k in e)if(e.hasOwnProperty(k)){var m=
f(a,b,e[k].start,e[k].end);m&&h(m.s,m.e,c,!1,g)}for(k in d)d.hasOwnProperty(k)&&(m=f(a,b,d[k].start,d[k].end))&&h(m.s,m.e,c,!0,g);c.oldClassName=c.className==g?c.oldClassName:c.className;c.className=g},m;for(m in e.featureNodes)if(e.featureNodes.hasOwnProperty(m)){var l=e.featureNodes[m];if(l.feature)n=l.feature.get("start"),q=l.feature.get("end"),k(n,q,l,b,a,"basic");else{var n=l.subfeatureEdges.s,q=l.subfeatureEdges.e;k(n,q,l,b,a,"basicSubfeature")}}}},measureStyles:function(){var a=document.createElement("div");
a.className="feature-label";a.style.height="auto";a.style.visibility="hidden";a.appendChild(document.createTextNode("1234567890"));document.body.appendChild(a);this.labelHeight=a.clientHeight;this.labelWidth=a.clientWidth/10;document.body.removeChild(a);var b,a=document.createElement("div");a.className="feature "+this.config.style.className+" plus-"+this.config.style.className+" plus-"+this.config.style.className+"1";this.config.style.featureCss&&(a.style.cssText=this.config.style.featureCss);a.style.visibility=
"hidden";u.is_ie6&&a.appendChild(document.createComment("foo"));document.body.appendChild(a);b=f.getMarginBox(a);this.glyphHeight=Math.round(b.h);this.padding=this.defaultPadding+b.w;document.body.removeChild(a);this.config.style.arrowheadClass&&(a=document.createElement("div"),a.className="plus-"+this.config.style.arrowheadClass,u.is_ie6&&a.appendChild(document.createComment("foo")),document.body.appendChild(a),b=f.position(a),this.plusArrowWidth=b.w,this.plusArrowHeight=b.h,a.className="minus-"+
this.config.style.arrowheadClass,b=f.position(a),this.minusArrowWidth=b.w,this.minusArrowHeight=b.h,document.body.removeChild(a))},hideAll:function(){this._clearLayout();return this.inherited(arguments)},getFeatDiv:function(a){a=this.getId(a);if(!a)return null;for(var b=0;b<this.blocks.length;b++){var c=this.blocks[b];if(c&&c.featureNodes&&(c=c.featureNodes[a]))return c}return null},getId:function(a){return a.id()},renderFeature:function(a,b,c,d,e,f,g,h){var k=a.get("end"),m=a.get("start");"string"==
typeof k&&(k=parseInt(k));"string"==typeof m&&(m=parseInt(m));var n=m,q=k;if(this.config.style.arrowheadClass)switch(a.get("strand")){case 1:case "+":q+=this.plusArrowWidth/d;break;case -1:case "-":n-=this.minusArrowWidth/d}var p=this.glyphHeight+this.glyphHeightPad,r=this.getFeatureLabel(a),s=d>f&&this.getFeatureDescription(a);s&&s.length>this.config.style.maxDescriptionLength&&(s=s.substr(0,this.config.style.maxDescriptionLength+1).replace(/(\s+\S+|\s*)$/,"")+String.fromCharCode(8230));this.showLabels&&
(d>=e&&r)&&(q=Math.max(q,n+(""+r).length*this.labelWidth/d),p+=this.labelHeight+this.labelPad);this.showLabels&&s&&(q=Math.max(q,n+(""+s).length*this.labelWidth/d),p+=this.labelHeight+this.labelPad);var q=q+Math.max(1,this.padding/d),t=this._getLayout(d).addRect(b,n,q,p);if(null===t)return this.markBlockHeightOverflow(c),null;p=this.config.hooks.create(this,a);this._connectFeatDivHandlers(p);p.track=this;p.feature=a;p.layoutEnd=q;p.featureEdges={s:Math.max(p.feature.get("start"),g),e:Math.min(p.feature.get("end"),
h)};p.callbackArgs=[this,p.feature,p];p._labelScale=e;p._descriptionScale=f;c.featureNodes[b]=p;"function"===typeof this.featureHook1&&this.featureHook1(a,p);n<c.startBase&&(c.leftOverlaps||(c.leftOverlaps=[]),c.leftOverlaps.push(b));q>c.endBase&&(c.rightOverlaps||(c.rightOverlaps=[]),c.rightOverlaps.push(b));dojo.addClass(p,"feature");f=this.config.style.className;"{type}"==f&&(f=a.get("type"));b=a.get("strand");switch(b){case 1:case "+":dojo.addClass(p,"plus-"+f);break;case -1:case "-":dojo.addClass(p,
"minus-"+f);break;default:dojo.addClass(p,f)}q=a.get("phase");null!==q&&void 0!==q&&dojo.addClass(p,f+"_phase"+q);(f=this.isFeatureHighlighted(a,r))&&dojo.addClass(p,"highlighted");var m=Math.max(m,g),k=Math.min(k,h),u=c.endBase-c.startBase,q=Math.max(this.minFeatWidth,100*((k-m)/u));p.style.cssText="left:"+100*(m-c.startBase)/u+"%;top:"+t+"px; width:"+q+"%;"+(this.config.style.featureCss?this.config.style.featureCss:"");p._containerStart=g;p._containerEnd=h;if(this.config.style.arrowheadClass)switch(g=
document.createElement("div"),b){case 1:case "+":g.className="plus-"+this.config.style.arrowheadClass;g.style.cssText="right: "+-this.plusArrowWidth+"px";p.appendChild(g);break;case -1:case "-":g.className="minus-"+this.config.style.arrowheadClass,g.style.cssText="left: "+-this.minusArrowWidth+"px",p.appendChild(g)}g=l.mixin({track:this,feature:a,callbackArgs:[this,a]});p.title&&(p.title=this.template(a,this._evalConf(g,p.title,"label")));if((r||s)&&this.showLabels&&d>=e)d=dojo.create("div",{className:"feature-label"+
(f?" highlighted":""),innerHTML:(r?'\x3cdiv class\x3d"feature-name"\x3e'+r+"\x3c/div\x3e":"")+(s?' \x3cdiv class\x3d"feature-description"\x3e'+s+"\x3c/div\x3e":""),style:{top:t+this.glyphHeight+2+"px",left:100*(n-c.startBase)/u+"%"}},c.domNode),this._connectFeatDivHandlers(d),p.title&&(d.title=p.title),p.label=d,d.feature=a,d.track=this,d.callbackArgs=[this,p.feature,p];q>this.config.style.minSubfeatureWidth&&this.handleSubFeatures(a,p,m,k,c);this.config.menuTemplate&&window.setTimeout(dojo.hitch(this,
"_connectMenus",p),50+150*Math.random());"function"==typeof this.config.hooks.modify&&this.config.hooks.modify(this,a,p);return p},handleSubFeatures:function(a,b,c,d,e){var f=a.get("subfeatures");if(f)for(var g=0;g<f.length;g++)this.renderSubfeature(a,b,f[g],c,d,e)},_getHeight:function(a){if(this.config.disableHeightCache)return a.offsetHeight||0;var b=this.heightCache[a.className];if(b)return b;b=a.offsetHeight||0;return this.heightCache[a.className]=b},_centerChildrenVertically:function(a){if(0<
a.childNodes.length)for(var b=this._getHeight(a),c=0;c<a.childNodes.length;c++){var d=a.childNodes[c];if(d.style){var e=this._getHeight(d);dojo.style(d,{marginTop:"0",top:(b-e)/2+"px"});0<d.childNodes.length&&this._centerChildrenVertically(d)}}},_connectFeatDivHandlers:function(a){for(var b in this.eventHandlers)this.own(d(a,b,this.eventHandlers[b]));this.eventHandlers.click&&this.eventHandlers.click.label&&a.setAttribute("title",this.eventHandlers.click.label)},_connectMenus:function(a){var b=l.hitch(this,
"_refreshMenu",a);this.own(d(a,"mouseover",b));a.label&&this.own(d(a.label,"mouseover",b))},_refreshMenu:function(a){a.contextMenu||(a.contextMenu=this._makeFeatureContextMenu(a,this.config.menuTemplate));a.contextMenuTimeout&&window.clearTimeout(a.contextMenuTimeout);a.contextMenuTimeout=window.setTimeout(function(){a.contextMenu&&(a.contextMenu.destroyRecursive(),u.removeAttribute(a,"contextMenu"));u.removeAttribute(a,"contextMenuTimeout")},3E4)},_makeFeatureContextMenu:function(a,b){b=this._processMenuSpec(dojo.clone(b),
a);var c=this._renderContextMenu(b,a);c.startup();c.bindDomNode(a);a.label&&c.bindDomNode(a.label);return c},renderSubfeature:function(a,b,c,d,e,f){a=c.get("start");var g=c.get("end"),h=e-d,k=c.get("type"),m;if(this.config.style.subfeatureClasses)if(m=this.config.style.subfeatureClasses[k],void 0===m)m=k;else{if(null===m)return null}else m=k;if("hidden"==m)return null;k=document.createElement("div");k.subfeatureEdges={s:a,e:g};dojo.addClass(k,"subfeature");if(m)switch(c.get("strand")){case 1:case "+":dojo.addClass(k,
"plus-"+m);break;case -1:case "-":dojo.addClass(k,"minus-"+m);break;default:dojo.addClass(k,m)}m=!1;"undefined"!==typeof this.config.truncateFeatures&&!0===this.config.truncateFeatures&&(m=!0);if(m&&(g<=d||a>=e))return null;u.is_ie6&&k.appendChild(document.createComment());k.style.cssText="left: "+100*((a-d)/h)+"%;width: "+100*((g-a)/h)+"%;";b.appendChild(k);return f.featureNodes[c.id()]=k},_getLayout:function(a){this.haveMeasurements||(this.measureStyles(),this.haveMeasurements=!0);if((!this.layout||
this.layout.pitchX!=4/a)&&a)this.layout=new v({pitchX:4/a,pitchY:this.config.layoutPitchY||this.glyphHeight+this.glyphHeightPad,maxHeight:this.getConf("maxHeight")});return this.layout},_clearLayout:function(){delete this.layout},clear:function(){delete this.layout;this.inherited(arguments)},changed:function(){this._clearLayout();this.inherited(arguments)},_exportFormats:function(){return[{name:"GFF3",label:"GFF3",fileExt:"gff3"},{name:"BED",label:"BED",fileExt:"bed"},{name:"SequinTable",label:"Sequin Table",
fileExt:"sqn"}]},_trackMenuOptions:function(){var a=this.inherited(arguments),b=this;a.push.apply(a,[{type:"dijit/MenuSeparator"},{label:"Show labels",type:"dijit/CheckedMenuItem",checked:!!("showLabels"in this?this.showLabels:this.config.style.showLabels),onClick:function(a){b.showLabels=this.checked;b.changed()}}]);return a}})})},"JBrowse/View/Track/_YScaleMixin":function(){define(["dojo/_base/declare","dojo/query","JBrowse/View/Ruler"],function(k,l,h){return k(null,{makeYScale:function(g){g=g||
{};var f="number"==typeof g.min?g.min:this.minDisplayed,d="number"==typeof g.max?g.max:this.maxDisplayed;this.yscale&&this.yscale.parentNode.removeChild(this.yscale);var e=dojo.create("div",{className:"ruler vertical_ruler",style:{height:this.height+"px",width:"10px",position:"absolute",zIndex:17}},this.div);this.yscale=e;this.window_info&&"x"in this.window_info&&("yScalePosition"in this.config?"right"==this.config.yScalePosition?this.yscale.style.left=this.window_info.x+(this.window_info.width-1||
0)+"px":"left"==this.config.yScalePosition?this.yscale.style.left=this.window_info.x+10+1+"px":"center"==this.config.yScalePosition&&(this.yscale.style.left=this.window_info.x+(this.window_info.width||0)/2+"px"):this.yscale.style.left=this.window_info.x+(this.window_info.width||0)/2+"px");dojo.style(e,"top"==this.config.align?{bottom:0}:{top:0});g=new h({min:f,max:d,direction:"up",leftBottom:!("yScalePosition"in this.config&&"left"==this.config.yScalePosition),fixBounds:g.fixBounds||!1});g.render_to(e);
this.ruler=g},removeYScale:function(){this.yscale?(this.yscale&&(this.yscale.parentNode.removeChild(this.yscale),delete this.yscale),delete this.yscale_params):l(".ruler",this.div).orphan()},updateYScaleFromViewDimensions:function(g){if(("number"==typeof g.x||"number"==typeof g.width)&&this.yscale)"yScalePosition"in this.config?"right"==this.config.yScalePosition?this.yscale.style.left=this.window_info.x+(this.window_info.width-1||0)+"px":"left"==this.config.yScalePosition?this.yscale.style.left=
this.window_info.x+10+"px":"center"==this.config.yScalePosition&&(this.yscale.style.left=this.window_info.x+(this.window_info.width||0)/2+"px"):this.yscale.style.left=this.window_info.x+(this.window_info.width||0)/2+"px"}})})},"JBrowse/View/Ruler":function(){define("dojo/query dojox/charting/Chart dojox/charting/axis2d/Default dojox/charting/plot2d/Bubble dojo/NodeList-dom dojo/number".split(" "),function(k,l){function h(g){dojo.mixin(this,g)}h.prototype.render_to=function(g){"string"==typeof g&&
(g=dojo.byId(g));var f=dojo.position(g);Math.log(this.max+1);Math.log(10);f=dojo.create("div",{style:{position:"absolute",left:"-9px",bottom:"-9px",width:"10px",height:f.h+18+"px"}},g);try{var d=new l(f,{fill:"transparent"});d.addAxis("y",{vertical:!0,fill:"transparent",min:this.min,max:this.max,fixLower:this.fixBounds?"major":"none",fixUpper:this.fixBounds?"major":"none",leftBottom:this.leftBottom});d.addPlot("default",{type:"Bubble",fill:"transparent"});d.render();k("svg rect",d.domNode).orphan();
this.scaler=d.axes.y.scaler}catch(e){console.error(e+""),console.error("Failed to draw Ruler with SVG, your browser may not support the necessary technology."),g.removeChild(f)}};return h})},"dojox/charting/Chart":function(){define("../main dojo/_base/lang dojo/_base/array dojo/_base/declare dojo/dom-style dojo/dom dojo/dom-geometry dojo/dom-construct dojo/_base/Color dojo/sniff ./Element ./SimpleTheme ./Series ./axis2d/common dojox/gfx/shape dojox/gfx dojo/has!dojo-bidi?./bidi/Chart dojox/lang/functional dojox/lang/functional/fold dojox/lang/functional/reversed".split(" "),
function(k,l,h,g,f,d,e,c,b,a,m,n,q,s,r,p,t,u){function v(a,b){a&&b&&(a.min=Math.min(a.min,b.min),a.max=Math.max(a.max,b.max));return a||b}function x(a,b){var c={},d={};h.forEach(a,function(a){var b=c[a.name]=a.getSeriesStats();a.hAxis&&(d[a.hAxis]=v(d[a.hAxis],{min:b.hmin,max:b.hmax}));a.vAxis&&(d[a.vAxis]=v(d[a.vAxis],{min:b.vmin,max:b.vmax}))});h.forEach(a,function(a){var e=c[a.name];if(a.hAxis){var f=d[a.hAxis];e.hmin=f.min;e.hmax=f.max}a.vAxis&&(f=d[a.vAxis],e.vmin=f.min,e.vmax=f.max);a.initializeScalers(b,
e)})}var w=l.getObject("charting",!0,k),y=u.lambda("item.clear()"),z=u.lambda("item.purgeGroup()"),A=u.lambda("item.destroy()"),D=u.lambda("item.dirty \x3d false"),C=u.lambda("item.dirty \x3d true"),B=u.lambda("item.name");k=g(a("dojo-bidi")?"dojox.charting.NonBidiChart":"dojox.charting.Chart",null,{constructor:function(a,b){b||(b={});this.margins=b.margins?b.margins:{l:10,t:10,r:10,b:10};this.stroke=b.stroke;this.fill=b.fill;this.delayInMs=b.delayInMs||200;this.title=b.title;this.titleGap=b.titleGap;
this.titlePos=b.titlePos;this.titleFont=b.titleFont;this.titleFontColor=b.titleFontColor;this.chartTitle=null;this.htmlLabels=!0;"htmlLabels"in b&&(this.htmlLabels=b.htmlLabels);this.theme=null;this.axes={};this.stack=[];this.plots={};this.series=[];this.runs={};this.dirty=!0;this.node=d.byId(a);var c=e.getMarginBox(a);this.surface=p.createSurface(this.node,c.w||400,c.h||300);-1==this.surface.declaredClass.indexOf("vml")&&(this._nativeClip=!0)},destroy:function(){h.forEach(this.series,A);h.forEach(this.stack,
A);u.forIn(this.axes,A);this.surface.destroy();this.chartTitle&&this.chartTitle.tagName&&c.destroy(this.chartTitle)},getCoords:function(){var a=this.node,b=f.getComputedStyle(a),b=e.getMarginBox(a,b),a=e.position(a,!0);b.x=a.x;b.y=a.y;return b},setTheme:function(a){this.theme=a.clone();this.dirty=!0;return this},addAxis:function(a,b){var c;c=b&&b.type||"Default";if("string"==typeof c){if(!w.axis2d||!w.axis2d[c])throw Error("Can't find axis: "+c+" - Check require() dependencies.");c=new w.axis2d[c](this,
b)}else c=new c(this,b);c.name=a;c.dirty=!0;a in this.axes&&this.axes[a].destroy();this.axes[a]=c;this.dirty=!0;return this},getAxis:function(a){return this.axes[a]},removeAxis:function(a){a in this.axes&&(this.axes[a].destroy(),delete this.axes[a],this.dirty=!0);return this},addPlot:function(a,b){var c;c=b&&b.type||"Default";if("string"==typeof c){if(!w.plot2d||!w.plot2d[c])throw Error("Can't find plot: "+c+" - didn't you forget to dojo.require() it?");c=new w.plot2d[c](this,b)}else c=new c(this,
b);c.name=a;c.dirty=!0;a in this.plots?(this.stack[this.plots[a]].destroy(),this.stack[this.plots[a]]=c):(this.plots[a]=this.stack.length,this.stack.push(c));this.dirty=!0;return this},getPlot:function(a){return this.stack[this.plots[a]]},removePlot:function(a){if(a in this.plots){var b=this.plots[a];delete this.plots[a];this.stack[b].destroy();this.stack.splice(b,1);u.forIn(this.plots,function(a,c,d){a>b&&(d[c]=a-1)});var c=h.filter(this.series,function(b){return b.plot!=a});c.length<this.series.length&&
(h.forEach(this.series,function(b){b.plot==a&&b.destroy()}),this.runs={},h.forEach(c,function(a,b){this.runs[a.plot]=b},this),this.series=c);this.dirty=!0}return this},getPlotOrder:function(){return u.map(this.stack,B)},setPlotOrder:function(a){var b={},c=u.filter(a,function(a){if(!(a in this.plots)||a in b)return!1;b[a]=1;return!0},this);c.length<this.stack.length&&u.forEach(this.stack,function(a){a=a.name;a in b||c.push(a)});a=u.map(c,function(a){return this.stack[this.plots[a]]},this);u.forEach(a,
function(a,b){this.plots[a.name]=b},this);this.stack=a;this.dirty=!0;return this},movePlotToFront:function(a){if(a in this.plots){var b=this.plots[a];if(b){var c=this.getPlotOrder();c.splice(b,1);c.unshift(a);return this.setPlotOrder(c)}}return this},movePlotToBack:function(a){if(a in this.plots){var b=this.plots[a];if(b<this.stack.length-1){var c=this.getPlotOrder();c.splice(b,1);c.push(a);return this.setPlotOrder(c)}}return this},addSeries:function(a,b,c){b=new q(this,b,c);b.name=a;a in this.runs?
(this.series[this.runs[a]].destroy(),this.series[this.runs[a]]=b):(this.runs[a]=this.series.length,this.series.push(b));this.dirty=!0;!("ymin"in b)&&"min"in b&&(b.ymin=b.min);!("ymax"in b)&&"max"in b&&(b.ymax=b.max);return this},getSeries:function(a){return this.series[this.runs[a]]},removeSeries:function(a){if(a in this.runs){var b=this.runs[a];delete this.runs[a];this.series[b].destroy();this.series.splice(b,1);u.forIn(this.runs,function(a,c,d){a>b&&(d[c]=a-1)});this.dirty=!0}return this},updateSeries:function(a,
b,c){a in this.runs&&(a=this.series[this.runs[a]],a.update(b),c?this.dirty=!0:(this._invalidateDependentPlots(a.plot,!1),this._invalidateDependentPlots(a.plot,!0)));return this},getSeriesOrder:function(a){return u.map(u.filter(this.series,function(b){return b.plot==a}),B)},setSeriesOrder:function(a){var b,c={},d=u.filter(a,function(a){if(!(a in this.runs)||a in c)return!1;var d=this.series[this.runs[a]];if(b){if(d.plot!=b)return!1}else b=d.plot;c[a]=1;return!0},this);u.forEach(this.series,function(a){var e=
a.name;!(e in c)&&a.plot==b&&d.push(e)});this.series=u.map(d,function(a){return this.series[this.runs[a]]},this).concat(u.filter(this.series,function(a){return a.plot!=b}));u.forEach(this.series,function(a,b){this.runs[a.name]=b},this);this.dirty=!0;return this},moveSeriesToFront:function(a){if(a in this.runs){var b=this.runs[a],c=this.getSeriesOrder(this.series[b].plot);if(a!=c[0])return c.splice(b,1),c.unshift(a),this.setSeriesOrder(c)}return this},moveSeriesToBack:function(a){if(a in this.runs){var b=
this.runs[a],c=this.getSeriesOrder(this.series[b].plot);if(a!=c[c.length-1])return c.splice(b,1),c.push(a),this.setSeriesOrder(c)}return this},resize:function(a,b){switch(arguments.length){case 1:e.setMarginBox(this.node,a);break;case 2:e.setMarginBox(this.node,{w:a,h:b})}var c=e.getMarginBox(this.node),d=this.surface.getDimensions();return d.width!=c.w||d.height!=c.h?(this.surface.setDimensions(c.w,c.h),this.dirty=!0,this.render()):this},getGeometry:function(){var a={};u.forIn(this.axes,function(b){b.initialized()&&
(a[b.name]={name:b.name,vertical:b.vertical,scaler:b.scaler,ticks:b.ticks})});return a},setAxisWindow:function(a,b,c,d){var e=this.axes[a];e&&(e.setWindow(b,c),h.forEach(this.stack,function(b){if(b.hAxis==a||b.vAxis==a)b.zoom=d}));return this},setWindow:function(a,b,c,d,e){"plotArea"in this||this.calculateGeometry();u.forIn(this.axes,function(e){var f,g;f=e.getScaler().bounds;g=f.span/(f.upper-f.lower);e.vertical?(f=b,g=d/g/f):(f=a,g=c/g/f);e.setWindow(f,g)});h.forEach(this.stack,function(a){a.zoom=
e});return this},zoomIn:function(a,b,c){var d=this.axes[a];if(d){var d=d.getScaler().bounds,e=Math.min(b[0],b[1]),f=Math.max(b[0],b[1]),e=b[0]<d.lower?d.lower:e,f=b[1]>d.upper?d.upper:f;this.setAxisWindow(a,(d.upper-d.lower)/(f-e),e-d.lower);c?this.delayedRender():this.render()}},calculateGeometry:function(){if(this.dirty)return this.fullGeometry();var a=h.filter(this.stack,function(a){return a.dirty||a.hAxis&&this.axes[a.hAxis].dirty||a.vAxis&&this.axes[a.vAxis].dirty},this);x(a,this.plotArea);return this},
fullGeometry:function(){this._makeDirty();h.forEach(this.stack,y);this.theme||this.setTheme(new n);h.forEach(this.series,function(a){if(!(a.plot in this.plots)){if(!w.plot2d||!w.plot2d.Default)throw Error("Can't find plot: Default - didn't you forget to dojo.require() it?");var b=new w.plot2d.Default(this,{});b.name=a.plot;this.plots[a.plot]=this.stack.length;this.stack.push(b)}this.stack[this.plots[a.plot]].addSeries(a)},this);h.forEach(this.stack,function(a){a.assignAxes&&a.assignAxes(this.axes)},
this);var b=this.dim=this.surface.getDimensions();b.width=p.normalizedLength(b.width);b.height=p.normalizedLength(b.height);u.forIn(this.axes,y);x(this.stack,b);var c=this.offsets={l:0,r:0,t:0,b:0},d=this;u.forIn(this.axes,function(b){a("dojo-bidi")&&d._resetLeftBottom(b);u.forIn(b.getOffsets(),function(a,b){c[b]=Math.max(a,c[b])})});if(this.title){this.titleGap=0==this.titleGap?0:this.titleGap||this.theme.chart.titleGap||20;this.titlePos=this.titlePos||this.theme.chart.titlePos||"top";this.titleFont=
this.titleFont||this.theme.chart.titleFont;this.titleFontColor=this.titleFontColor||this.theme.chart.titleFontColor||"black";var e=p.normalizedLength(p.splitFontString(this.titleFont).size);c["top"==this.titlePos?"t":"b"]+=e+this.titleGap}u.forIn(this.margins,function(a,b){c[b]+=a});this.plotArea={width:b.width-c.l-c.r,height:b.height-c.t-c.b};u.forIn(this.axes,y);x(this.stack,this.plotArea);return this},render:function(){this._delayedRenderHandle&&(clearTimeout(this._delayedRenderHandle),this._delayedRenderHandle=
null);this.theme&&this.theme.clear();if(this.dirty)return this.fullRender();this.calculateGeometry();u.forEachRev(this.stack,function(a){a.render(this.dim,this.offsets)},this);u.forIn(this.axes,function(a){a.render(this.dim,this.offsets)},this);this._makeClean();return this},fullRender:function(){this.fullGeometry();var b=this.offsets,d=this.dim,e=Math.max(0,d.width-b.l-b.r),f=Math.max(0,d.height-b.t-b.b);h.forEach(this.series,z);u.forIn(this.axes,z);h.forEach(this.stack,z);var g=this.surface.children;
if(r.dispose)for(var k=0;k<g.length;++k)r.dispose(g[k]);this.chartTitle&&this.chartTitle.tagName&&c.destroy(this.chartTitle);this.surface.clear();this.chartTitle=null;this._renderChartBackground(d,b);this._renderPlotBackground(d,b,e,f);u.foldr(this.stack,function(a,c){return c.render(d,b),0},0);this._nativeClip||this._renderChartBackground(d,b);this.title&&(e="canvas"==p.renderer&&this.htmlLabels||!a("ie")&&!a("opera")&&this.htmlLabels?"html":"gfx",f=p.normalizedLength(p.splitFontString(this.titleFont).size),
this.chartTitle=s.createText[e](this,this.surface,d.width/2,"top"==this.titlePos?f+this.margins.t:d.height-this.margins.b,"middle",this.title,this.titleFont,this.titleFontColor));u.forIn(this.axes,function(a){a.render(d,b)});this._makeClean();return this},_renderChartBackground:function(a,c){var d=this.theme,e,g=void 0!==this.fill?this.fill:d.chart&&d.chart.fill,d=void 0!==this.stroke?this.stroke:d.chart&&d.chart.stroke;if("inherit"==g){e=this.node;for(g=new b(f.get(e,"backgroundColor"));0==g.a&&
e!=document.documentElement;)g=new b(f.get(e,"backgroundColor")),e=e.parentNode}g&&(this._nativeClip?(g=m.prototype._shapeFill(m.prototype._plotFill(g,a),{x:0,y:0,width:a.width+1,height:a.height+1}),this.surface.createRect({width:a.width+1,height:a.height+1}).setFill(g)):(g=m.prototype._plotFill(g,a,c),c.l&&(e={x:0,y:0,width:c.l,height:a.height+1},this.surface.createRect(e).setFill(m.prototype._shapeFill(g,e))),c.r&&(e={x:a.width-c.r,y:0,width:c.r+1,height:a.height+2},this.surface.createRect(e).setFill(m.prototype._shapeFill(g,
e))),c.t&&(e={x:0,y:0,width:a.width+1,height:c.t},this.surface.createRect(e).setFill(m.prototype._shapeFill(g,e))),c.b&&(e={x:0,y:a.height-c.b,width:a.width+1,height:c.b+2},this.surface.createRect(e).setFill(m.prototype._shapeFill(g,e)))));d&&this.surface.createRect({width:a.width-1,height:a.height-1}).setStroke(d)},_renderPlotBackground:function(a,b,c,d){var e=this.theme,f=e.plotarea&&e.plotarea.fill,e=e.plotarea&&e.plotarea.stroke,g={x:b.l-1,y:b.t-1,width:c+2,height:d+2};f&&(f=m.prototype._shapeFill(m.prototype._plotFill(f,
a,b),g),this.surface.createRect(g).setFill(f));e&&this.surface.createRect({x:b.l,y:b.t,width:c+1,height:d+1}).setStroke(e)},delayedRender:function(){this._delayedRenderHandle||(this._delayedRenderHandle=setTimeout(l.hitch(this,function(){this.render()}),this.delayInMs));return this},connectToPlot:function(a,b,c){return a in this.plots?this.stack[this.plots[a]].connect(b,c):null},fireEvent:function(a,b,c){if(a in this.runs){var d=this.series[this.runs[a]].plot;d in this.plots&&(d=this.stack[this.plots[d]])&&
d.fireEvent(a,b,c)}return this},_makeClean:function(){h.forEach(this.axes,D);h.forEach(this.stack,D);h.forEach(this.series,D);this.dirty=!1},_makeDirty:function(){h.forEach(this.axes,C);h.forEach(this.stack,C);h.forEach(this.series,C);this.dirty=!0},_invalidateDependentPlots:function(a,b){if(a in this.plots){var c=this.stack[this.plots[a]],d,e=b?"vAxis":"hAxis";if(c[e]){if((d=this.axes[c[e]])&&d.dependOnData())d.dirty=!0,h.forEach(this.stack,function(a){a[e]&&a[e]==c[e]&&(a.dirty=!0)})}else c.dirty=
!0}},setDir:function(a){return this},_resetLeftBottom:function(a){},formatTruncatedLabel:function(a,b,c){}});return a("dojo-bidi")?g("dojox.charting.Chart",[k,t]):k})},"dojox/charting/Element":function(){define(["dojo/_base/array","dojo/dom-construct","dojo/_base/declare","dojox/gfx","dojox/gfx/shape"],function(k,l,h,g,f){return h("dojox.charting.Element",null,{chart:null,group:null,htmlElements:null,dirty:!0,constructor:function(d){this.chart=d;this.group=null;this.htmlElements=[];this.dirty=!0;
this.trailingSymbol="...";this._events=[]},purgeGroup:function(){this.destroyHtmlElements();if(this.group){this.getGroup().removeShape();var d=this.getGroup().children;if(f.dispose)for(var e=0;e<d.length;++e)f.dispose(d[e],!0);this.getGroup().rawNode&&l.empty(this.getGroup().rawNode);this.getGroup().clear();f.dispose&&f.dispose(this.getGroup(),!0);this.getGroup()!=this.group&&(this.group.rawNode&&l.empty(this.group.rawNode),this.group.clear(),f.dispose&&f.dispose(this.group,!0));this.group=null}this.dirty=
!0;this._events.length&&(k.forEach(this._events,function(c){c.shape.disconnect(c.handle)}),this._events=[]);return this},cleanGroup:function(d){this.destroyHtmlElements();d||(d=this.chart.surface);if(this.group){var e;d=this.getGroup().children;if(f.dispose)for(var c=0;c<d.length;++c)f.dispose(d[c],!0);this.getGroup().rawNode&&(e=this.getGroup().bgNode,l.empty(this.getGroup().rawNode));this.getGroup().clear();e&&this.getGroup().rawNode.appendChild(e)}else this.group=d.createGroup();this.dirty=!0;
return this},getGroup:function(){return this.group},destroyHtmlElements:function(){this.htmlElements.length&&(k.forEach(this.htmlElements,l.destroy),this.htmlElements=[])},destroy:function(){this.purgeGroup()},getTextWidth:function(d,e){return g._base._getTextBox(d,{font:e}).w||0},getTextWithLimitLength:function(d,e,c,b){if(!d||0>=d.length)return{text:"",truncated:b||!1};if(!c||0>=c)return{text:d,truncated:b||!1};var a=d.substring(0,1)+this.trailingSymbol,f=this.getTextWidth(a,e);if(c<=f)return{text:a,
truncated:!0};if(this.getTextWidth(d,e)<=c)return{text:d,truncated:b||!1};b=0;for(a=d.length;b<a;){if(2>=a-b){for(;this.getTextWidth(d.substring(0,b)+this.trailingSymbol,e)>c;)b-=1;return{text:d.substring(0,b)+this.trailingSymbol,truncated:!0}}f=b+Math.round(0.618*(a-b));this.getTextWidth(d.substring(0,f),e)<c?b=f:a=f}},getTextWithLimitCharCount:function(d,e,c,b){return!d||0>=d.length?{text:"",truncated:b||!1}:!c||0>=c||d.length<=c?{text:d,truncated:b||!1}:{text:d.substring(0,c)+this.trailingSymbol,
truncated:!0}},_plotFill:function(d,e,c){if(!d||!d.type||!d.space)return d;var b=d.space,a;switch(d.type){case "linear":if("plot"===b||"shapeX"===b||"shapeY"===b){d=g.makeParameters(g.defaultLinearGradient,d);d.space=b;if("plot"===b||"shapeX"===b)a=e.height-c.t-c.b,d.y1=c.t+a*d.y1/100,d.y2=c.t+a*d.y2/100;if("plot"===b||"shapeY"===b)a=e.width-c.l-c.r,d.x1=c.l+a*d.x1/100,d.x2=c.l+a*d.x2/100}break;case "radial":"plot"===b&&(d=g.makeParameters(g.defaultRadialGradient,d),d.space=b,b=e.width-c.l-c.r,e=
e.height-c.t-c.b,d.cx=c.l+b*d.cx/100,d.cy=c.t+e*d.cy/100,d.r=d.r*Math.sqrt(b*b+e*e)/200);break;case "pattern":if("plot"===b||"shapeX"===b||"shapeY"===b){d=g.makeParameters(g.defaultPattern,d);d.space=b;if("plot"===b||"shapeX"===b)a=e.height-c.t-c.b,d.y=c.t+a*d.y/100,d.height=a*d.height/100;if("plot"===b||"shapeY"===b)a=e.width-c.l-c.r,d.x=c.l+a*d.x/100,d.width=a*d.width/100}}return d},_shapeFill:function(d,e){if(!d||!d.space)return d;var c=d.space,b;switch(d.type){case "linear":if("shape"===c||"shapeX"===
c||"shapeY"===c){d=g.makeParameters(g.defaultLinearGradient,d);d.space=c;if("shape"===c||"shapeX"===c)b=e.width,d.x1=e.x+b*d.x1/100,d.x2=e.x+b*d.x2/100;if("shape"===c||"shapeY"===c)b=e.height,d.y1=e.y+b*d.y1/100,d.y2=e.y+b*d.y2/100}break;case "radial":"shape"===c&&(d=g.makeParameters(g.defaultRadialGradient,d),d.space=c,d.cx=e.x+e.width/2,d.cy=e.y+e.height/2,d.r=d.r*e.width/200);break;case "pattern":if("shape"===c||"shapeX"===c||"shapeY"===c){d=g.makeParameters(g.defaultPattern,d);d.space=c;if("shape"===
c||"shapeX"===c)b=e.width,d.x=e.x+b*d.x/100,d.width=b*d.width/100;if("shape"===c||"shapeY"===c)b=e.height,d.y=e.y+b*d.y/100,d.height=b*d.height/100}}return d},_pseudoRadialFill:function(d,e,c,b,a){if(!d||"radial"!==d.type||"shape"!==d.space)return d;var f=d.space;d=g.makeParameters(g.defaultRadialGradient,d);d.space=f;if(4>arguments.length)return d.cx=e.x,d.cy=e.y,d.r=d.r*c/100,d;f=5>arguments.length?b:(a+b)/2;return{type:"linear",x1:e.x,y1:e.y,x2:e.x+d.r*c*Math.cos(f)/100,y2:e.y+d.r*c*Math.sin(f)/
100,colors:d.colors}}})})},"dojox/gfx":function(){define(["dojo/_base/lang","./gfx/_base","./gfx/renderer!"],function(k,l,h){l.switchTo(h);return l})},"dojox/gfx/_base":function(){define("dojo/_base/kernel dojo/_base/lang dojo/_base/Color dojo/_base/sniff dojo/_base/window dojo/_base/array dojo/dom dojo/dom-construct dojo/dom-geometry".split(" "),function(k,l,h,g,f,d,e,c,b){var a=l.getObject("dojox.gfx",!0),m=a._base={};a._hasClass=function(a,b){var c=a.getAttribute("className");return c&&0<=(" "+
c+" ").indexOf(" "+b+" ")};a._addClass=function(a,b){var c=a.getAttribute("className")||"";if(!c||0>(" "+c+" ").indexOf(" "+b+" "))a.setAttribute("className",c+(c?" ":"")+b)};a._removeClass=function(a,b){var c=a.getAttribute("className");c&&a.setAttribute("className",c.replace(RegExp("(^|\\s+)"+b+"(\\s+|$)"),"$1$2"))};m._getFontMeasurements=function(){var a={"1em":0,"1ex":0,"100%":0,"12pt":0,"16px":0,"xx-small":0,"x-small":0,small:0,medium:0,large:0,"x-large":0,"xx-large":0},b,d;g("ie")&&(d=f.doc.documentElement.style.fontSize||
"",d||(f.doc.documentElement.style.fontSize="100%"));var e=c.create("div",{style:{position:"absolute",left:"0",top:"-100px",width:"30px",height:"1000em",borderWidth:"0",margin:"0",padding:"0",outline:"none",lineHeight:"1",overflow:"hidden"}},f.body());for(b in a)e.style.fontSize=b,a[b]=16*Math.round(12*e.offsetHeight/16)/12/1E3;g("ie")&&(f.doc.documentElement.style.fontSize=d);f.body().removeChild(e);return a};var n=null;m._getCachedFontMeasurements=function(a){if(a||!n)n=m._getFontMeasurements();
return n};var q=null,s={};m._getTextBox=function(a,d,e){var g,h,k=arguments.length,m;q||(q=c.create("div",{style:{position:"absolute",top:"-10000px",left:"0",visibility:"hidden"}},f.body()));g=q;g.className="";h=g.style;h.borderWidth="0";h.margin="0";h.padding="0";h.outline="0";if(1<k&&d)for(m in d)m in s||(h[m]=d[m]);2<k&&e&&(g.className=e);g.innerHTML=a;g.getBoundingClientRect?(h=g.getBoundingClientRect(),h={l:h.left,t:h.top,w:h.width||h.right-h.left,h:h.height||h.bottom-h.top}):h=b.getMarginBox(g);
g.innerHTML="";return h};m._computeTextLocation=function(a,b,c,d){var e={};switch(a.align){case "end":e.x=a.x-b;break;case "middle":e.x=a.x-b/2;break;default:e.x=a.x}e.y=a.y-c*(d?0.75:1);return e};m._computeTextBoundingBox=function(b){if(!a._base._isRendered(b))return{x:0,y:0,width:0,height:0};var c;c=b.getShape();var d=b.getFont()||a.defaultFont;b=b.getTextWidth();d=a.normalizedLength(d.size);c=m._computeTextLocation(c,b,d,!0);return{x:c.x,y:c.y,width:b,height:d}};m._isRendered=function(a){for(a=
a.parent;a&&a.getParent;)a=a.parent;return null!==a};var r=0;m._getUniqueId=function(){var a;do a=k._scopeName+"xUnique"+ ++r;while(e.byId(a));return a};m._fixMsTouchAction=function(a){a=a.rawNode;"undefined"!=typeof a.style.msTouchAction&&(a.style.msTouchAction="none")};l.mixin(a,{defaultPath:{type:"path",path:""},defaultPolyline:{type:"polyline",points:[]},defaultRect:{type:"rect",x:0,y:0,width:100,height:100,r:0},defaultEllipse:{type:"ellipse",cx:0,cy:0,rx:200,ry:100},defaultCircle:{type:"circle",
cx:0,cy:0,r:100},defaultLine:{type:"line",x1:0,y1:0,x2:100,y2:100},defaultImage:{type:"image",x:0,y:0,width:0,height:0,src:""},defaultText:{type:"text",x:0,y:0,text:"",align:"start",decoration:"none",rotated:!1,kerning:!0},defaultTextPath:{type:"textpath",text:"",align:"start",decoration:"none",rotated:!1,kerning:!0},defaultStroke:{type:"stroke",color:"black",style:"solid",width:1,cap:"butt",join:4},defaultLinearGradient:{type:"linear",x1:0,y1:0,x2:100,y2:100,colors:[{offset:0,color:"black"},{offset:1,
color:"white"}]},defaultRadialGradient:{type:"radial",cx:0,cy:0,r:100,colors:[{offset:0,color:"black"},{offset:1,color:"white"}]},defaultPattern:{type:"pattern",x:0,y:0,width:0,height:0,src:""},defaultFont:{type:"font",style:"normal",variant:"normal",weight:"normal",size:"10pt",family:"serif"},getDefault:function(){var b={};return function(c){var d=b[c];if(d)return new d;d=b[c]=new Function;d.prototype=a["default"+c];return new d}}(),normalizeColor:function(a){return a instanceof h?a:new h(a)},normalizeParameters:function(a,
b){var c;if(b){var d={};for(c in a)c in b&&!(c in d)&&(a[c]=b[c])}return a},makeParameters:function(a,b){var c=null;if(!b)return l.delegate(a);var d={};for(c in a)c in d||(d[c]=l.clone(c in b?b[c]:a[c]));return d},formatNumber:function(a,b){var c=a.toString();if(0<=c.indexOf("e"))c=a.toFixed(4);else{var d=c.indexOf(".");0<=d&&5<c.length-d&&(c=a.toFixed(4))}return 0>a?c:b?" "+c:c},makeFontString:function(a){return a.style+" "+a.variant+" "+a.weight+" "+a.size+" "+a.family},splitFontString:function(b){var c=
a.getDefault("Font");b=b.split(/\s+/);if(!(5>b.length)){c.style=b[0];c.variant=b[1];c.weight=b[2];var d=b[3].indexOf("/");c.size=0>d?b[3]:b[3].substring(0,d);var e=4;0>d&&("/"==b[4]?e=6:"/"==b[4].charAt(0)&&(e=5));e<b.length&&(c.family=b.slice(e).join(" "))}return c},cm_in_pt:72/2.54,mm_in_pt:7.2/2.54,px_in_pt:function(){return a._base._getCachedFontMeasurements()["12pt"]/12},pt2px:function(b){return b*a.px_in_pt()},px2pt:function(b){return b/a.px_in_pt()},normalizedLength:function(b){if(0===b.length)return 0;
if(2<b.length){var c=a.px_in_pt(),d=parseFloat(b);switch(b.slice(-2)){case "px":return d;case "pt":return d*c;case "in":return 72*d*c;case "pc":return 12*d*c;case "mm":return d*a.mm_in_pt*c;case "cm":return d*a.cm_in_pt*c}}return parseFloat(b)},pathVmlRegExp:/([A-Za-z]+)|(\d+(\.\d+)?)|(\.\d+)|(-\d+(\.\d+)?)|(-\.\d+)/g,pathSvgRegExp:/([A-DF-Za-df-z])|([-+]?\d*[.]?\d+(?:[eE][-+]?\d+)?)/g,equalSources:function(a,b){return a&&b&&a===b},switchTo:function(b){var c="string"==typeof b?a[b]:b;c&&(d.forEach("Group Rect Ellipse Circle Line Polyline Image Text Path TextPath Surface createSurface fixTarget".split(" "),
function(b){a[b]=c[b]}),"string"==typeof b?a.renderer=b:d.some(["svg","vml","canvas","canvasWithEvents","silverlight"],function(b){return a.renderer=a[b]&&a[b].Surface===a.Surface?b:null}))}});return a})},"dojox/gfx/renderer":function(){define(["./_base","dojo/_base/lang","dojo/_base/sniff","dojo/_base/window","dojo/_base/config"],function(k,l,h,g,f){var d=null;h.add("vml",function(d,c,b){b.innerHTML='\x3cv:shape adj\x3d"1"/\x3e';d="adj"in b.firstChild;b.innerHTML="";return d});return{load:function(e,
c,b){function a(){c(["dojox/gfx/"+m],function(a){k.renderer=m;d=a;b(a)})}if(d&&"force"!=e)b(d);else{var m=f.forceGfxRenderer;e=!m&&(l.isString(f.gfxRenderer)?f.gfxRenderer:"svg,vml,canvas,silverlight").split(",");for(var n,q;!m&&e.length;)switch(e.shift()){case "svg":"SVGAngle"in g.global&&(m="svg");break;case "vml":h("vml")&&(m="vml");break;case "silverlight":try{h("ie")?(n=new ActiveXObject("AgControl.AgControl"))&&n.IsVersionSupported("1.0")&&(q=!0):navigator.plugins["Silverlight Plug-In"]&&(q=
!0)}catch(s){q=!1}finally{n=null}q&&(m="silverlight");break;case "canvas":g.global.CanvasRenderingContext2D&&(m="canvas")}"canvas"===m&&!1!==f.canvasEvents&&(m="canvasWithEvents");"svg"==m&&"undefined"!=typeof window.svgweb?window.svgweb.addOnLoad(a):a()}}}})},"dojox/gfx/shape":function(){define("./_base dojo/_base/lang dojo/_base/declare dojo/_base/kernel dojo/_base/sniff dojo/on dojo/_base/array dojo/dom-construct dojo/_base/Color ./matrix".split(" "),function(k,l,h,g,f,d,e,c,b,a){var m=k.shape=
{};m.Shape=h("dojox.gfx.shape.Shape",null,{constructor:function(){this.parentMatrix=this.parent=this.bbox=this.strokeStyle=this.fillStyle=this.matrix=this.shape=this.rawNode=null;if(f("gfxRegistry")){var a=m.register(this);this.getUID=function(){return a}}},destroy:function(){f("gfxRegistry")&&m.dispose(this);this.rawNode&&"__gfxObject__"in this.rawNode&&(this.rawNode.__gfxObject__=null);this.rawNode=null},getNode:function(){return this.rawNode},getShape:function(){return this.shape},getTransform:function(){return this.matrix},
getFill:function(){return this.fillStyle},getStroke:function(){return this.strokeStyle},getParent:function(){return this.parent},getBoundingBox:function(){return this.bbox},getTransformedBoundingBox:function(){var b=this.getBoundingBox();if(!b)return null;var c=this._getRealMatrix();return[a.multiplyPoint(c,b.x,b.y),a.multiplyPoint(c,b.x+b.width,b.y),a.multiplyPoint(c,b.x+b.width,b.y+b.height),a.multiplyPoint(c,b.x,b.y+b.height)]},getEventSource:function(){return this.rawNode},setClip:function(a){this.clip=
a},getClip:function(){return this.clip},setShape:function(a){this.shape=k.makeParameters(this.shape,a);this.bbox=null;return this},setFill:function(a){if(!a)return this.fillStyle=null,this;var b=null;if("object"==typeof a&&"type"in a)switch(a.type){case "linear":b=k.makeParameters(k.defaultLinearGradient,a);break;case "radial":b=k.makeParameters(k.defaultRadialGradient,a);break;case "pattern":b=k.makeParameters(k.defaultPattern,a)}else b=k.normalizeColor(a);this.fillStyle=b;return this},setStroke:function(a){if(!a)return this.strokeStyle=
null,this;if("string"==typeof a||l.isArray(a)||a instanceof b)a={color:a};a=this.strokeStyle=k.makeParameters(k.defaultStroke,a);a.color=k.normalizeColor(a.color);return this},setTransform:function(b){this.matrix=a.clone(b?a.normalize(b):a.identity);return this._applyTransform()},_applyTransform:function(){return this},moveToFront:function(){var a=this.getParent();a&&(a._moveChildToFront(this),this._moveToFront());return this},moveToBack:function(){var a=this.getParent();a&&(a._moveChildToBack(this),
this._moveToBack());return this},_moveToFront:function(){},_moveToBack:function(){},applyRightTransform:function(a){return a?this.setTransform([this.matrix,a]):this},applyLeftTransform:function(a){return a?this.setTransform([a,this.matrix]):this},applyTransform:function(a){return a?this.setTransform([this.matrix,a]):this},removeShape:function(a){this.parent&&this.parent.remove(this,a);return this},_setParent:function(a,b){this.parent=a;return this._updateParentMatrix(b)},_updateParentMatrix:function(b){this.parentMatrix=
b?a.clone(b):null;return this._applyTransform()},_getRealMatrix:function(){for(var b=this.matrix,c=this.parent;c;)c.matrix&&(b=a.multiply(c.matrix,b)),c=c.parent;return b}});m._eventsProcessing={on:function(a,b){return d(this.getEventSource(),a,m.fixCallback(this,k.fixTarget,b))},connect:function(a,b,c){"on"==a.substring(0,2)&&(a=a.substring(2));return this.on(a,c?l.hitch(b,c):b)},disconnect:function(a){return a.remove()}};m.fixCallback=function(a,b,c,d){d||(d=c,c=null);if(l.isString(d)){c=c||g.global;
if(!c[d])throw['dojox.gfx.shape.fixCallback: scope["',d,'"] is null (scope\x3d"',c,'")'].join("");return function(e){return b(e,a)?c[d].apply(c,arguments||[]):void 0}}return!c?function(e){return b(e,a)?d.apply(c,arguments):void 0}:function(e){return b(e,a)?d.apply(c,arguments||[]):void 0}};l.extend(m.Shape,m._eventsProcessing);m.Container={_init:function(){this.children=[];this._batch=0},openBatch:function(){return this},closeBatch:function(){return this},add:function(a){var b=a.getParent();b&&b.remove(a,
!0);this.children.push(a);return a._setParent(this,this._getRealMatrix())},remove:function(a,b){for(var c=0;c<this.children.length;++c)if(this.children[c]==a){b||(a.parent=null,a.parentMatrix=null);this.children.splice(c,1);break}return this},clear:function(a){for(var b,c=0;c<this.children.length;++c)b=this.children[c],b.parent=null,b.parentMatrix=null,a&&b.destroy();this.children=[];return this},getBoundingBox:function(){if(this.children){var b=null;e.forEach(this.children,function(c){var d=c.getBoundingBox();
d&&((c=c.getTransform())&&(d=a.multiplyRectangle(c,d)),b?(b.x=Math.min(b.x,d.x),b.y=Math.min(b.y,d.y),b.endX=Math.max(b.endX,d.x+d.width),b.endY=Math.max(b.endY,d.y+d.height)):b={x:d.x,y:d.y,endX:d.x+d.width,endY:d.y+d.height})});b&&(b.width=b.endX-b.x,b.height=b.endY-b.y);return b}return null},_moveChildToFront:function(a){for(var b=0;b<this.children.length;++b)if(this.children[b]==a){this.children.splice(b,1);this.children.push(a);break}return this},_moveChildToBack:function(a){for(var b=0;b<this.children.length;++b)if(this.children[b]==
a){this.children.splice(b,1);this.children.unshift(a);break}return this}};m.Surface=h("dojox.gfx.shape.Surface",null,{constructor:function(){this._parent=this.rawNode=null;this._nodes=[];this._events=[]},destroy:function(){e.forEach(this._nodes,c.destroy);this._nodes=[];e.forEach(this._events,function(a){a&&a.remove()});this._events=[];this.rawNode=null;if(f("ie"))for(;this._parent.lastChild;)c.destroy(this._parent.lastChild);else this._parent.innerHTML="";this._parent=null},getEventSource:function(){return this.rawNode},
_getRealMatrix:function(){return null},isLoaded:!0,onLoad:function(a){},whenLoaded:function(a,b){var c=l.hitch(a,b);if(this.isLoaded)c(this);else d.once(this,"load",function(a){c(a)})}});l.extend(m.Surface,m._eventsProcessing);m.Rect=h("dojox.gfx.shape.Rect",m.Shape,{constructor:function(a){this.shape=k.getDefault("Rect");this.rawNode=a},getBoundingBox:function(){return this.shape}});m.Ellipse=h("dojox.gfx.shape.Ellipse",m.Shape,{constructor:function(a){this.shape=k.getDefault("Ellipse");this.rawNode=
a},getBoundingBox:function(){if(!this.bbox){var a=this.shape;this.bbox={x:a.cx-a.rx,y:a.cy-a.ry,width:2*a.rx,height:2*a.ry}}return this.bbox}});m.Circle=h("dojox.gfx.shape.Circle",m.Shape,{constructor:function(a){this.shape=k.getDefault("Circle");this.rawNode=a},getBoundingBox:function(){if(!this.bbox){var a=this.shape;this.bbox={x:a.cx-a.r,y:a.cy-a.r,width:2*a.r,height:2*a.r}}return this.bbox}});m.Line=h("dojox.gfx.shape.Line",m.Shape,{constructor:function(a){this.shape=k.getDefault("Line");this.rawNode=
a},getBoundingBox:function(){if(!this.bbox){var a=this.shape;this.bbox={x:Math.min(a.x1,a.x2),y:Math.min(a.y1,a.y2),width:Math.abs(a.x2-a.x1),height:Math.abs(a.y2-a.y1)}}return this.bbox}});m.Polyline=h("dojox.gfx.shape.Polyline",m.Shape,{constructor:function(a){this.shape=k.getDefault("Polyline");this.rawNode=a},setShape:function(a,b){a&&a instanceof Array?(this.inherited(arguments,[{points:a}]),b&&this.shape.points.length&&this.shape.points.push(this.shape.points[0])):this.inherited(arguments,[a]);
return this},_normalizePoints:function(){var a=this.shape.points,b=a&&a.length;if(b&&"number"==typeof a[0]){for(var c=[],d=0;d<b;d+=2)c.push({x:a[d],y:a[d+1]});this.shape.points=c}},getBoundingBox:function(){if(!this.bbox&&this.shape.points.length){for(var a=this.shape.points,b=a.length,c=a[0],d=c.x,e=c.y,f=c.x,g=c.y,h=1;h<b;++h)c=a[h],d>c.x&&(d=c.x),f<c.x&&(f=c.x),e>c.y&&(e=c.y),g<c.y&&(g=c.y);this.bbox={x:d,y:e,width:f-d,height:g-e}}return this.bbox}});m.Image=h("dojox.gfx.shape.Image",m.Shape,
{constructor:function(a){this.shape=k.getDefault("Image");this.rawNode=a},getBoundingBox:function(){return this.shape},setStroke:function(){return this},setFill:function(){return this}});m.Text=h(m.Shape,{constructor:function(a){this.fontStyle=null;this.shape=k.getDefault("Text");this.rawNode=a},getFont:function(){return this.fontStyle},setFont:function(a){this.fontStyle="string"==typeof a?k.splitFontString(a):k.makeParameters(k.defaultFont,a);this._setFont();return this},getBoundingBox:function(){var a=
null;this.getShape().text&&(a=k._base._computeTextBoundingBox(this));return a}});m.Creator={createShape:function(a){switch(a.type){case k.defaultPath.type:return this.createPath(a);case k.defaultRect.type:return this.createRect(a);case k.defaultCircle.type:return this.createCircle(a);case k.defaultEllipse.type:return this.createEllipse(a);case k.defaultLine.type:return this.createLine(a);case k.defaultPolyline.type:return this.createPolyline(a);case k.defaultImage.type:return this.createImage(a);
case k.defaultText.type:return this.createText(a);case k.defaultTextPath.type:return this.createTextPath(a)}return null},createGroup:function(){return this.createObject(k.Group)},createRect:function(a){return this.createObject(k.Rect,a)},createEllipse:function(a){return this.createObject(k.Ellipse,a)},createCircle:function(a){return this.createObject(k.Circle,a)},createLine:function(a){return this.createObject(k.Line,a)},createPolyline:function(a){return this.createObject(k.Polyline,a)},createImage:function(a){return this.createObject(k.Image,
a)},createText:function(a){return this.createObject(k.Text,a)},createPath:function(a){return this.createObject(k.Path,a)},createTextPath:function(a){return this.createObject(k.TextPath,{}).setText(a)},createObject:function(a,b){return null}};return m})},"dojox/gfx/matrix":function(){define(["./_base","dojo/_base/lang"],function(k,l){var h=k.matrix={},g={};h._degToRad=function(f){return g[f]||(g[f]=Math.PI*f/180)};h._radToDeg=function(f){return 180*(f/Math.PI)};h.Matrix2D=function(f){if(f)if("number"==
typeof f)this.xx=this.yy=f;else if(f instanceof Array){if(0<f.length){for(var d=h.normalize(f[0]),e=1;e<f.length;++e){var c=d,b=h.normalize(f[e]),d=new h.Matrix2D;d.xx=c.xx*b.xx+c.xy*b.yx;d.xy=c.xx*b.xy+c.xy*b.yy;d.yx=c.yx*b.xx+c.yy*b.yx;d.yy=c.yx*b.xy+c.yy*b.yy;d.dx=c.xx*b.dx+c.xy*b.dy+c.dx;d.dy=c.yx*b.dx+c.yy*b.dy+c.dy}l.mixin(this,d)}}else l.mixin(this,f)};l.extend(h.Matrix2D,{xx:1,xy:0,yx:0,yy:1,dx:0,dy:0});l.mixin(h,{identity:new h.Matrix2D,flipX:new h.Matrix2D({xx:-1}),flipY:new h.Matrix2D({yy:-1}),
flipXY:new h.Matrix2D({xx:-1,yy:-1}),translate:function(f,d){return 1<arguments.length?new h.Matrix2D({dx:f,dy:d}):new h.Matrix2D({dx:f.x,dy:f.y})},scale:function(f,d){return 1<arguments.length?new h.Matrix2D({xx:f,yy:d}):"number"==typeof f?new h.Matrix2D({xx:f,yy:f}):new h.Matrix2D({xx:f.x,yy:f.y})},rotate:function(f){var d=Math.cos(f);f=Math.sin(f);return new h.Matrix2D({xx:d,xy:-f,yx:f,yy:d})},rotateg:function(f){return h.rotate(h._degToRad(f))},skewX:function(f){return new h.Matrix2D({xy:Math.tan(f)})},
skewXg:function(f){return h.skewX(h._degToRad(f))},skewY:function(f){return new h.Matrix2D({yx:Math.tan(f)})},skewYg:function(f){return h.skewY(h._degToRad(f))},reflect:function(f,d){1==arguments.length&&(d=f.y,f=f.x);var e=f*f,c=d*d,b=e+c,a=2*f*d/b;return new h.Matrix2D({xx:2*e/b-1,xy:a,yx:a,yy:2*c/b-1})},project:function(f,d){1==arguments.length&&(d=f.y,f=f.x);var e=f*f,c=d*d,b=e+c,a=f*d/b;return new h.Matrix2D({xx:e/b,xy:a,yx:a,yy:c/b})},normalize:function(f){return f instanceof h.Matrix2D?f:new h.Matrix2D(f)},
isIdentity:function(f){return 1==f.xx&&0==f.xy&&0==f.yx&&1==f.yy&&0==f.dx&&0==f.dy},clone:function(f){var d=new h.Matrix2D,e;for(e in f)"number"==typeof f[e]&&("number"==typeof d[e]&&d[e]!=f[e])&&(d[e]=f[e]);return d},invert:function(f){f=h.normalize(f);var d=f.xx*f.yy-f.xy*f.yx;return f=new h.Matrix2D({xx:f.yy/d,xy:-f.xy/d,yx:-f.yx/d,yy:f.xx/d,dx:(f.xy*f.dy-f.yy*f.dx)/d,dy:(f.yx*f.dx-f.xx*f.dy)/d})},_multiplyPoint:function(f,d,e){return{x:f.xx*d+f.xy*e+f.dx,y:f.yx*d+f.yy*e+f.dy}},multiplyPoint:function(f,
d,e){f=h.normalize(f);return"number"==typeof d&&"number"==typeof e?h._multiplyPoint(f,d,e):h._multiplyPoint(f,d.x,d.y)},multiplyRectangle:function(f,d){var e=h.normalize(f);d=d||{x:0,y:0,width:0,height:0};if(h.isIdentity(e))return{x:d.x,y:d.y,width:d.width,height:d.height};var c=h.multiplyPoint(e,d.x,d.y),b=h.multiplyPoint(e,d.x,d.y+d.height),a=h.multiplyPoint(e,d.x+d.width,d.y),g=h.multiplyPoint(e,d.x+d.width,d.y+d.height),e=Math.min(c.x,b.x,a.x,g.x),k=Math.min(c.y,b.y,a.y,g.y),l=Math.max(c.x,b.x,
a.x,g.x),c=Math.max(c.y,b.y,a.y,g.y);return{x:e,y:k,width:l-e,height:c-k}},multiply:function(f){for(var d=h.normalize(f),e=1;e<arguments.length;++e){var c=d,b=h.normalize(arguments[e]),d=new h.Matrix2D;d.xx=c.xx*b.xx+c.xy*b.yx;d.xy=c.xx*b.xy+c.xy*b.yy;d.yx=c.yx*b.xx+c.yy*b.yx;d.yy=c.yx*b.xy+c.yy*b.yy;d.dx=c.xx*b.dx+c.xy*b.dy+c.dx;d.dy=c.yx*b.dx+c.yy*b.dy+c.dy}return d},_sandwich:function(f,d,e){return h.multiply(h.translate(d,e),f,h.translate(-d,-e))},scaleAt:function(f,d,e,c){switch(arguments.length){case 4:return h._sandwich(h.scale(f,
d),e,c);case 3:return"number"==typeof e?h._sandwich(h.scale(f),d,e):h._sandwich(h.scale(f,d),e.x,e.y)}return h._sandwich(h.scale(f),d.x,d.y)},rotateAt:function(f,d,e){return 2<arguments.length?h._sandwich(h.rotate(f),d,e):h._sandwich(h.rotate(f),d.x,d.y)},rotategAt:function(f,d,e){return 2<arguments.length?h._sandwich(h.rotateg(f),d,e):h._sandwich(h.rotateg(f),d.x,d.y)},skewXAt:function(f,d,e){return 2<arguments.length?h._sandwich(h.skewX(f),d,e):h._sandwich(h.skewX(f),d.x,d.y)},skewXgAt:function(f,
d,e){return 2<arguments.length?h._sandwich(h.skewXg(f),d,e):h._sandwich(h.skewXg(f),d.x,d.y)},skewYAt:function(f,d,e){return 2<arguments.length?h._sandwich(h.skewY(f),d,e):h._sandwich(h.skewY(f),d.x,d.y)},skewYgAt:function(f,d,e){return 2<arguments.length?h._sandwich(h.skewYg(f),d,e):h._sandwich(h.skewYg(f),d.x,d.y)}});k.Matrix2D=h.Matrix2D;return h})},"dojox/charting/SimpleTheme":function(){define("dojo/_base/lang dojo/_base/array dojo/_base/declare dojo/_base/Color dojox/lang/utils dojox/gfx/gradutils".split(" "),
function(k,l,h,g,f,d){var e=h("dojox.charting.SimpleTheme",null,{shapeSpaces:{shape:1,shapeX:1,shapeY:1},constructor:function(c){c=c||{};var b=e.defaultTheme;l.forEach("chart plotarea axis grid series marker indicator".split(" "),function(a){this[a]=k.delegate(b[a],c[a])},this);c.seriesThemes&&c.seriesThemes.length?(this.colors=null,this.seriesThemes=c.seriesThemes.slice(0)):(this.seriesThemes=null,this.colors=(c.colors||e.defaultColors).slice(0));this.markerThemes=null;c.markerThemes&&c.markerThemes.length&&
(this.markerThemes=c.markerThemes.slice(0));this.markers=c.markers?k.clone(c.markers):k.delegate(e.defaultMarkers);this.noGradConv=c.noGradConv;this.noRadialConv=c.noRadialConv;c.reverseFills&&this.reverseFills();this._current=0;this._buildMarkerArray()},clone:function(){var c=new this.constructor({chart:this.chart,plotarea:this.plotarea,axis:this.axis,grid:this.grid,series:this.series,marker:this.marker,colors:this.colors,markers:this.markers,indicator:this.indicator,seriesThemes:this.seriesThemes,
markerThemes:this.markerThemes,noGradConv:this.noGradConv,noRadialConv:this.noRadialConv});l.forEach("clone clear next skip addMixin post getTick".split(" "),function(b){this.hasOwnProperty(b)&&(c[b]=this[b])},this);return c},clear:function(){this._current=0},next:function(c,b,a){var d=f.merge,e;if(this.colors){e=k.delegate(this.series);var d=k.delegate(this.marker),h=new g(this.colors[this._current%this.colors.length]),l;e.stroke&&e.stroke.color?(e.stroke=k.delegate(e.stroke),l=new g(e.stroke.color),
e.stroke.color=new g(h),e.stroke.color.a=l.a):e.stroke={color:h};d.stroke&&d.stroke.color?(d.stroke=k.delegate(d.stroke),l=new g(d.stroke.color),d.stroke.color=new g(h),d.stroke.color.a=l.a):d.stroke={color:h};!e.fill||e.fill.type?e.fill=h:(l=new g(e.fill),e.fill=new g(h),e.fill.a=l.a);!d.fill||d.fill.type?d.fill=h:(l=new g(d.fill),d.fill=new g(h),d.fill.a=l.a)}else e=this.seriesThemes?d(this.series,this.seriesThemes[this._current%this.seriesThemes.length]):this.series,d=this.markerThemes?d(this.marker,
this.markerThemes[this._current%this.markerThemes.length]):e;e={series:e,marker:d,symbol:d&&d.symbol||this._markers[this._current%this._markers.length]};++this._current;b&&(e=this.addMixin(e,c,b));a&&(e=this.post(e,c));return e},skip:function(){++this._current},addMixin:function(c,b,a,d){if(k.isArray(a))l.forEach(a,function(a){c=this.addMixin(c,b,a)},this);else{var e={};"color"in a&&("line"==b||"area"==b?(k.setObject("series.stroke.color",a.color,e),k.setObject("marker.stroke.color",a.color,e)):k.setObject("series.fill",
a.color,e));l.forEach("stroke outline shadow fill filter font fontColor labelWiring".split(" "),function(b){var c="marker"+b.charAt(0).toUpperCase()+b.substr(1),d=c in a;b in a&&(k.setObject("series."+b,a[b],e),d||k.setObject("marker."+b,a[b],e));d&&k.setObject("marker."+b,a[c],e)});"marker"in a&&(e.symbol=a.marker,e.symbol=a.marker);c=f.merge(c,e)}d&&(c=this.post(c,b));return c},post:function(c,b){var a=c.series.fill,d;if(!this.noGradConv&&this.shapeSpaces[a.space]&&"linear"==a.type){if("bar"==b)d=
{x1:a.y1,y1:a.x1,x2:a.y2,y2:a.x2};else if(!this.noRadialConv&&"shape"==a.space&&("slice"==b||"circle"==b))d={type:"radial",cx:0,cy:0,r:100};if(d)return f.merge(c,{series:{fill:d}})}return c},getTick:function(c,b){var a=this.axis.tick,d=c+"Tick",e=f.merge;a?this.axis[d]&&(a=e(a,this.axis[d])):a=this.axis[d];b&&(a?b[d]&&(a=e(a,b[d])):a=b[d]);return a},inspectObjects:function(c){l.forEach("chart plotarea axis grid series marker indicator".split(" "),function(b){c(this[b])},this);this.seriesThemes&&l.forEach(this.seriesThemes,
c);this.markerThemes&&l.forEach(this.markerThemes,c)},reverseFills:function(){this.inspectObjects(function(c){c&&c.fill&&(c.fill=d.reverse(c.fill))})},addMarker:function(c,b){this.markers[c]=b;this._buildMarkerArray()},setMarkers:function(c){this.markers=c;this._buildMarkerArray()},_buildMarkerArray:function(){this._markers=[];for(var c in this.markers)this._markers.push(this.markers[c])}});k.mixin(e,{defaultMarkers:{CIRCLE:"m-3,0 c0,-4 6,-4 6,0 m-6,0 c0,4 6,4 6,0",SQUARE:"m-3,-3 l0,6 6,0 0,-6 z",
DIAMOND:"m0,-3 l3,3 -3,3 -3,-3 z",CROSS:"m0,-3 l0,6 m-3,-3 l6,0",X:"m-3,-3 l6,6 m0,-6 l-6,6",TRIANGLE:"m-3,3 l3,-6 3,6 z",TRIANGLE_INVERTED:"m-3,-3 l3,6 3,-6 z"},defaultColors:["#54544c","#858e94","#6e767a","#948585","#474747"],defaultTheme:{chart:{stroke:null,fill:"white",pageStyle:null,titleGap:20,titlePos:"top",titleFont:"normal normal bold 14pt Tahoma",titleFontColor:"#333"},plotarea:{stroke:null,fill:"white"},axis:{stroke:{color:"#333",width:1},tick:{color:"#666",position:"center",font:"normal normal normal 7pt Tahoma",
fontColor:"#333",labelGap:4},majorTick:{width:1,length:6},minorTick:{width:0.8,length:3},microTick:{width:0.5,length:1},title:{gap:15,font:"normal normal normal 11pt Tahoma",fontColor:"#333",orientation:"axis"}},series:{stroke:{width:1.5,color:"#333"},outline:{width:0.1,color:"#ccc"},shadow:null,fill:"#ccc",font:"normal normal normal 8pt Tahoma",fontColor:"#000",labelWiring:{width:1,color:"#ccc"}},marker:{stroke:{width:1.5,color:"#333"},outline:{width:0.1,color:"#ccc"},shadow:null,fill:"#ccc",font:"normal normal normal 8pt Tahoma",
fontColor:"#000"},indicator:{lineStroke:{width:1.5,color:"#333"},lineOutline:{width:0.1,color:"#ccc"},lineShadow:null,lineFill:null,stroke:{width:1.5,color:"#333"},outline:{width:0.1,color:"#ccc"},shadow:null,fill:"#ccc",radius:3,font:"normal normal normal 10pt Tahoma",fontColor:"#000",markerFill:"#ccc",markerSymbol:"m-3,0 c0,-4 6,-4 6,0 m-6,0 c0,4 6,4 6,0",markerStroke:{width:1.5,color:"#333"},markerOutline:{width:0.1,color:"#ccc"},markerShadow:null}}});return e})},"dojox/lang/utils":function(){define(["..",
"dojo/_base/lang"],function(k,l){var h=l.getObject("lang.utils",!0,k),g={},f=Object.prototype.toString,d=function(d){if(d)switch(f.call(d)){case "[object Array]":return d.slice(0);case "[object Object]":return l.delegate(d)}return d};l.mixin(h,{coerceType:function(d,c){switch(typeof d){case "number":return Number(eval("("+c+")"));case "string":return String(c);case "boolean":return Boolean(eval("("+c+")"))}return eval("("+c+")")},updateWithObject:function(e,c,b){if(!c)return e;for(var a in e)if(a in
c&&!(a in g)){var f=e[a];f&&"object"==typeof f?h.updateWithObject(f,c[a],b):e[a]=b?h.coerceType(f,c[a]):d(c[a])}return e},updateWithPattern:function(e,c,b,a){if(!c||!b)return e;for(var f in b)f in c&&!(f in g)&&(e[f]=a?h.coerceType(b[f],c[f]):d(c[f]));return e},merge:function(d,c){if(c){var b=f.call(d),a=f.call(c),g,k;switch(a){case "[object Array]":if(a==b){b=Array(Math.max(d.length,c.length));g=0;for(a=b.length;g<a;++g)b[g]=h.merge(d[g],c[g]);return b}return c.slice(0);case "[object Object]":if(a==
b&&d){b=l.delegate(d);for(g in c)g in d?(a=d[g],k=c[g],k!==a&&(b[g]=h.merge(a,k))):b[g]=l.clone(c[g]);return b}return l.clone(c)}}return c}});return h})},"dojox/gfx/gradutils":function(){define(["./_base","dojo/_base/lang","./matrix","dojo/_base/Color"],function(k,l,h,g){function f(d,e){if(0>=d)return e[0].color;var c=e.length;if(1<=d)return e[c-1].color;for(var b=0;b<c;++b){var a=e[b];if(a.offset>=d)return b?(c=e[b-1],g.blendColors(new g(c.color),new g(a.color),(d-c.offset)/(a.offset-c.offset))):
a.color}return e[c-1].color}k=k.gradutils={};k.getColor=function(d,e){var c;if(d){switch(d.type){case "linear":c=Math.atan2(d.y2-d.y1,d.x2-d.x1);c=h.rotate(-c);var b=h.project(d.x2-d.x1,d.y2-d.y1),a=h.multiplyPoint(b,e),k=h.multiplyPoint(b,d.x1,d.y1),b=h.multiplyPoint(b,d.x2,d.y2),b=h.multiplyPoint(c,b.x-k.x,b.y-k.y).x;c=h.multiplyPoint(c,a.x-k.x,a.y-k.y).x/b;break;case "radial":c=e.x-d.cx,a=e.y-d.cy,c=Math.sqrt(c*c+a*a)/d.r}return f(c,d.colors)}return new g(d||[0,0,0,0])};k.reverse=function(d){if(d)switch(d.type){case "linear":case "radial":if(d=
l.delegate(d),d.colors){for(var e=d.colors,c=e.length,b=0,a,f=d.colors=Array(e.length);b<c;++b)a=e[b],f[b]={offset:1-a.offset,color:a.color};f.sort(function(a,b){return a.offset-b.offset})}}return d};return k})},"dojox/charting/Series":function(){define(["dojo/_base/lang","dojo/_base/declare","./Element"],function(k,l,h){return l("dojox.charting.Series",h,{constructor:function(g,f,d){k.mixin(this,d);"string"!=typeof this.plot&&(this.plot="default");this.update(f)},clear:function(){this.dyn={}},update:function(g){k.isArray(g)?
this.data=g:(this.source=g,this.data=this.source.data,this.source.setSeriesObject&&this.source.setSeriesObject(this));this.dirty=!0;this.clear()}})})},"dojox/charting/axis2d/common":function(){define(["dojo/_base/lang","dojo/_base/window","dojo/dom-geometry","dojox/gfx","dojo/has"],function(k,l,h,g,f){var d=k.getObject("dojox.charting.axis2d.common",!0),e=function(c){c.marginLeft="0px";c.marginTop="0px";c.marginRight="0px";c.marginBottom="0px";c.paddingLeft="0px";c.paddingTop="0px";c.paddingRight=
"0px";c.paddingBottom="0px";c.borderLeftWidth="0px";c.borderTopWidth="0px";c.borderRightWidth="0px";c.borderBottomWidth="0px"};return k.mixin(d,{createText:{gfx:function(c,b,a,d,e,f,g,h){return b.createText({x:a,y:d,text:f,align:e}).setFont(g).setFill(h)},html:function(c,b,a,d,k,q,s,r,p){b=l.doc.createElement("div");var t=b.style,u;c.getTextDir&&(b.dir=c.getTextDir(q));e(t);t.font=s;b.innerHTML=String(q).replace(/\s/g,"\x26nbsp;");t.color=r;t.position="absolute";t.left="-10000px";l.body().appendChild(b);
var v=g.normalizedLength(g.splitFontString(s).size);p||(b.getBoundingClientRect?(u=b.getBoundingClientRect(),u=u.width||u.right-u.left):u=h.getMarginBox(b).w);"rtl"==b.dir&&(a+=p?p:u);l.body().removeChild(b);t.position="relative";if(p)switch(t.width=p+"px",k){case "middle":t.textAlign="center";t.left=a-p/2+"px";break;case "end":t.textAlign="right";t.left=a-p+"px";break;default:t.left=a+"px",t.textAlign="left"}else switch(k){case "middle":t.left=Math.floor(a-u/2)+"px";break;case "end":t.left=Math.floor(a-
u)+"px";break;default:t.left=Math.floor(a)+"px"}t.top=Math.floor(d-v)+"px";t.whiteSpace="nowrap";p=l.doc.createElement("div");t=p.style;e(t);t.width="0px";t.height="0px";p.appendChild(b);c.node.insertBefore(p,c.node.firstChild);f("dojo-bidi")&&c.htmlElementsRegistry.push([p,a,d,k,q,s,r]);return p}}})})},"dojox/lang/functional":function(){define(["./functional/lambda","./functional/array","./functional/object"],function(k){return k})},"dojox/lang/functional/array":function(){define(["dojo/_base/kernel",
"dojo/_base/lang","dojo/_base/array","./lambda"],function(k,l,h,g){var f={};l.mixin(g,{filter:function(d,e,c){"string"==typeof d&&(d=d.split(""));c=c||k.global;e=g.lambda(e);var b=[],a,h,n;if(l.isArray(d)){h=0;for(n=d.length;h<n;++h)a=d[h],e.call(c,a,h,d)&&b.push(a)}else if("function"==typeof d.hasNext&&"function"==typeof d.next)for(h=0;d.hasNext();)a=d.next(),e.call(c,a,h++,d)&&b.push(a);else for(h in d)h in f||(a=d[h],e.call(c,a,h,d)&&b.push(a));return b},forEach:function(d,e,c){"string"==typeof d&&
(d=d.split(""));c=c||k.global;e=g.lambda(e);var b,a;if(l.isArray(d)){b=0;for(a=d.length;b<a;e.call(c,d[b],b,d),++b);}else if("function"==typeof d.hasNext&&"function"==typeof d.next)for(b=0;d.hasNext();e.call(c,d.next(),b++,d));else for(b in d)b in f||e.call(c,d[b],b,d);return c},map:function(d,e,c){"string"==typeof d&&(d=d.split(""));c=c||k.global;e=g.lambda(e);var b,a,h;if(l.isArray(d)){b=Array(a=d.length);for(h=0;h<a;b[h]=e.call(c,d[h],h,d),++h);}else if("function"==typeof d.hasNext&&"function"==
typeof d.next){b=[];for(h=0;d.hasNext();b.push(e.call(c,d.next(),h++,d)));}else for(h in b=[],d)h in f||b.push(e.call(c,d[h],h,d));return b},every:function(d,e,c){"string"==typeof d&&(d=d.split(""));c=c||k.global;e=g.lambda(e);var b,a;if(l.isArray(d)){b=0;for(a=d.length;b<a;++b)if(!e.call(c,d[b],b,d))return!1}else if("function"==typeof d.hasNext&&"function"==typeof d.next)for(b=0;d.hasNext();){if(!e.call(c,d.next(),b++,d))return!1}else for(b in d)if(!(b in f)&&!e.call(c,d[b],b,d))return!1;return!0},
some:function(d,e,c){"string"==typeof d&&(d=d.split(""));c=c||k.global;e=g.lambda(e);var b,a;if(l.isArray(d)){b=0;for(a=d.length;b<a;++b)if(e.call(c,d[b],b,d))return!0}else if("function"==typeof d.hasNext&&"function"==typeof d.next)for(b=0;d.hasNext();){if(e.call(c,d.next(),b++,d))return!0}else for(b in d)if(!(b in f)&&e.call(c,d[b],b,d))return!0;return!1}});return g})},"dojox/lang/functional/reversed":function(){define(["dojo/_base/lang","dojo/_base/kernel","./lambda"],function(k,l,h){k.mixin(h,
{filterRev:function(g,f,d){"string"==typeof g&&(g=g.split(""));d=d||l.global;f=h.lambda(f);for(var e=[],c,b=g.length-1;0<=b;--b)c=g[b],f.call(d,c,b,g)&&e.push(c);return e},forEachRev:function(g,f,d){"string"==typeof g&&(g=g.split(""));d=d||l.global;f=h.lambda(f);for(var e=g.length-1;0<=e;f.call(d,g[e],e,g),--e);},mapRev:function(g,f,d){"string"==typeof g&&(g=g.split(""));d=d||l.global;f=h.lambda(f);for(var e=g.length,c=Array(e),e=e-1,b=0;0<=e;c[b++]=f.call(d,g[e],e,g),--e);return c},everyRev:function(g,
f,d){"string"==typeof g&&(g=g.split(""));d=d||l.global;f=h.lambda(f);for(var e=g.length-1;0<=e;--e)if(!f.call(d,g[e],e,g))return!1;return!0},someRev:function(g,f,d){"string"==typeof g&&(g=g.split(""));d=d||l.global;f=h.lambda(f);for(var e=g.length-1;0<=e;--e)if(f.call(d,g[e],e,g))return!0;return!1}});return h})},"dojox/charting/axis2d/Default":function(){define("dojo/_base/lang dojo/_base/array dojo/sniff dojo/_base/declare dojo/_base/connect dojo/dom-geometry ./Invisible ../scaler/linear ./common dojox/gfx dojox/lang/utils dojox/lang/functional dojo/has!dojo-bidi?../bidi/axis2d/Default".split(" "),
function(k,l,h,g,f,d,e,c,b,a,m,n,q){e=g(h("dojo-bidi")?"dojox.charting.axis2d.NonBidiDefault":"dojox.charting.axis2d.Default",e,{defaultParams:{vertical:!1,fixUpper:"none",fixLower:"none",natural:!1,leftBottom:!0,includeZero:!1,fixed:!0,majorLabels:!0,minorTicks:!0,minorLabels:!0,microTicks:!1,rotation:0,htmlLabels:!0,enableCache:!1,dropLabels:!0,labelSizeChange:!1},optionalParams:{min:0,max:1,from:0,to:1,majorTickStep:4,minorTickStep:2,microTickStep:1,labels:[],labelFunc:null,maxLabelSize:0,maxLabelCharCount:0,
trailingSymbol:null,stroke:{},majorTick:{},minorTick:{},microTick:{},tick:{},font:"",fontColor:"",title:"",titleGap:0,titleFont:"",titleFontColor:"",titleOrientation:""},constructor:function(a,b){this.opt=k.clone(this.defaultParams);m.updateWithObject(this.opt,b);m.updateWithPattern(this.opt,b,this.optionalParams);this.opt.enableCache&&(this._textFreePool=[],this._lineFreePool=[],this._textUsePool=[],this._lineUsePool=[]);this._invalidMaxLabelSize=!0},setWindow:function(a,b){a!=this.scale&&(this._invalidMaxLabelSize=
!0);return this.inherited(arguments)},_groupLabelWidth:function(b,c,d){if(!b.length)return 0;50<b.length&&(b.length=50);k.isObject(b[0])&&(b=n.map(b,function(a){return a.text}));d&&(b=n.map(b,function(a){return 0==k.trim(a).length?"":a.substring(0,d)+this.trailingSymbol},this));b=b.join("\x3cbr\x3e");return a._base._getTextBox(b,{font:c}).w||0},_getMaxLabelSize:function(a,b,d,e,f,g){if(null==this._maxLabelSize&&6==arguments.length){var h=this.opt;this.scaler.minMinorStep=this._prevMinMinorStep=0;
var m=k.clone(h);delete m.to;delete m.from;var n=c.buildScaler(a,b,d,m,h.to-h.from);n.minMinorStep=0;this._majorStart=n.major.start;h=c.buildTicks(n,h);if(g&&h){var q=n=0,A=function(a){a.label&&this.push(a.label)},D=[];this.opt.majorLabels&&(l.forEach(h.major,A,D),n=this._groupLabelWidth(D,f,m.maxLabelCharCount),m.maxLabelSize&&(n=Math.min(m.maxLabelSize,n)));D=[];this.opt.dropLabels&&this.opt.minorLabels&&(l.forEach(h.minor,A,D),q=this._groupLabelWidth(D,f,m.maxLabelCharCount),m.maxLabelSize&&(q=
Math.min(m.maxLabelSize,q)));this._maxLabelSize={majLabelW:n,minLabelW:q,majLabelH:g,minLabelH:g}}else this._maxLabelSize=null}return this._maxLabelSize},calculate:function(b,d,e){this.inherited(arguments);this.scaler.minMinorStep=this._prevMinMinorStep;if((this._invalidMaxLabelSize||e!=this._oldSpan)&&Infinity!=b&&-Infinity!=d){this._invalidMaxLabelSize=!1;this.opt.labelSizeChange&&(this._maxLabelSize=null);this._oldSpan=e;var f=this.opt,g=this.chart.theme.axis,h=f.rotation%360,k=this.chart.theme.axis.tick.labelGap,
m=f.font||g.majorTick&&g.majorTick.font||g.tick&&g.tick.font,g=m?a.normalizedLength(a.splitFontString(m).size):0,m=this._getMaxLabelSize(b,d,e,h,m,g);"number"!=typeof k&&(k=4);if(m&&f.dropLabels){var f=Math.abs(Math.cos(h*Math.PI/180)),l=Math.abs(Math.sin(h*Math.PI/180));0>h&&(h+=360);switch(h){case 0:case 180:this.vertical?h=g:(h=m.majLabelW,g=m.minLabelW);break;case 90:case 270:this.vertical?(h=m.majLabelW,g=m.minLabelW):h=g;break;default:var h=this.vertical?Math.min(m.majLabelW,g/f):Math.min(m.majLabelW,
g/l),n=Math.sqrt(m.minLabelW*m.minLabelW+g*g),g=Math.min(n,this.vertical?g*f+m.minLabelW*l:m.minLabelW*f+g*l)}this.scaler.minMinorStep=this._prevMinMinorStep=Math.max(h,g)+k;this._skipInterval=this.scaler.minMinorStep<=this.scaler.minor.tick*this.scaler.bounds.scale?0:Math.floor((h+k)/(this.scaler.major.tick*this.scaler.bounds.scale))}else this._skipInterval=0}this.ticks=c.buildTicks(this.scaler,this.opt);return this},getOffsets:function(){var b={l:0,r:0,t:0,b:0};if(!this.scaler)return b;var c=this.opt,
d=this.chart.theme.axis,e=this.chart.theme.axis.tick.labelGap,f=c.titleFont||d.title&&d.title.font,d=0==c.titleGap?0:c.titleGap||d.title&&d.title.gap,g=this.chart.theme.getTick("major",c),h=this.chart.theme.getTick("minor",c),f=f?a.normalizedLength(a.splitFontString(f).size):0,k=c.rotation%360,m=c.leftBottom,l=Math.abs(Math.cos(k*Math.PI/180)),n=Math.abs(Math.sin(k*Math.PI/180));this.trailingSymbol=void 0===c.trailingSymbol||null===c.trailingSymbol?this.trailingSymbol:c.trailingSymbol;"number"!=typeof e&&
(e=4);0>k&&(k+=360);var q=this._getMaxLabelSize();if(q){var C=Math.ceil(Math.max(q.majLabelW,q.minLabelW))+1,B=Math.ceil(Math.max(q.majLabelH,q.minLabelH))+1;if(this.vertical)switch(q=m?"l":"r",k){case 0:case 180:b[q]=C;b.t=b.b=B/2;break;case 90:case 270:b[q]=B;b.t=b.b=C/2;break;default:45>=k||180<k&&225>=k?(b[q]=B*n/2+C*l,b[m?"t":"b"]=B*l/2+C*n,b[m?"b":"t"]=B*l/2):315<k||180>k&&135<k?(b[q]=B*n/2+C*l,b[m?"b":"t"]=B*l/2+C*n,b[m?"t":"b"]=B*l/2):90>k||180<k&&270>k?(b[q]=B*n+C*l,b[m?"t":"b"]=B*l+C*n):
(b[q]=B*n+C*l,b[m?"b":"t"]=B*l+C*n)}else switch(q=m?"b":"t",k){case 0:case 180:b[q]=B;b.l=b.r=C/2;break;case 90:case 270:b[q]=C;b.l=b.r=B/2;break;default:45<=k&&90>=k||225<=k&&270>=k?(b[q]=B*l/2+C*n,b[m?"r":"l"]=B*n/2+C*l,b[m?"l":"r"]=B*n/2):90<=k&&135>=k||270<=k&&315>=k?(b[q]=B*l/2+C*n,b[m?"l":"r"]=B*n/2+C*l,b[m?"r":"l"]=B*n/2):45>k||180<k&&225>k?(b[q]=B*l+C*n,b[m?"r":"l"]=B*n+C*l):(b[q]=B*l+C*n,b[m?"l":"r"]=B*n+C*l)}b[q]+=e+Math.max(0<g.length?g.length:0,0<h.length?h.length:0)+(c.title?f+d:0)}return b},
cleanGroup:function(a){this.opt.enableCache&&this.group&&(this._lineFreePool=this._lineFreePool.concat(this._lineUsePool),this._lineUsePool=[],this._textFreePool=this._textFreePool.concat(this._textUsePool),this._textUsePool=[]);this.inherited(arguments)},createText:function(a,c,d,e,f,g,h,k,m){if(!this.opt.enableCache||"html"==a)return b.createText[a](this.chart,c,d,e,f,g,h,k,m);0<this._textFreePool.length?(a=this._textFreePool.pop(),a.setShape({x:d,y:e,text:g,align:f}),c.add(a)):a=b.createText[a](this.chart,
c,d,e,f,g,h,k);this._textUsePool.push(a);return a},createLine:function(a,b){var c;this.opt.enableCache&&0<this._lineFreePool.length?(c=this._lineFreePool.pop(),c.setShape(b),a.add(c)):c=a.createLine(b);this.opt.enableCache&&this._lineUsePool.push(c);return c},render:function(d,e){var f,g,k,m,n,q,y,z,A,D,C,B,I,M,K=this._isRtl();if(!this.dirty||!this.scaler)return this;var G=this.opt;A=this.chart.theme.axis;var F=G.leftBottom,L=G.rotation%360,E=0,N,J,E=this.chart.theme.axis.tick.labelGap,V=G.font||
A.majorTick&&A.majorTick.font||A.tick&&A.tick.font,U=G.titleFont||A.title&&A.title.font,R=G.fontColor||A.majorTick&&A.majorTick.fontColor||A.tick&&A.tick.fontColor||"black",T=G.titleFontColor||A.title&&A.title.fontColor||"black";n=0==G.titleGap?0:G.titleGap||A.title&&A.title.gap||15;var H=G.titleOrientation||A.title&&A.title.orientation||"axis",S=this.chart.theme.getTick("major",G),O=this.chart.theme.getTick("minor",G),Q=this.chart.theme.getTick("micro",G),W="stroke"in G?G.stroke:A.stroke,P=V?a.normalizedLength(a.splitFontString(V).size):
0;q=Math.abs(Math.cos(L*Math.PI/180));N=Math.abs(Math.sin(L*Math.PI/180));var ba=U?a.normalizedLength(a.splitFontString(U).size):0;"number"!=typeof E&&(E=4);0>L&&(L+=360);var Z=this._getMaxLabelSize(),Z=Z&&Z.majLabelW;if(this.vertical){I=d.height-e.b;M=void 0;C=e.t;B=void 0;A=(d.height-e.b+e.t)/2;D=void 0;N=P*N+(Z||0)*q+E+Math.max(0<S.length?S.length:0,0<O.length?O.length:0)+ba+n;y=0;z=-1;g=f=0;n=1;q=0;k=E;m=0;switch(L){case 0:J="end";g=0.4*P;break;case 90:J="middle";f=-P;break;case 180:J="start";
g=0.4*-P;break;case 270:J="middle";break;default:45>L?(J="end",g=0.4*P):90>L?(J="end",g=0.4*P):135>L?J="start":225>L?(J="start",g=0.4*-P):270>L?(J="start",f=F?0:0.4*P):315>L?(J="end",f=F?0:0.4*P):(J="end",g=0.4*P)}if(F)M=B=e.l,E=H&&"away"==H?90:270,D=e.l-N+(270==E?ba:0),n=-1,k=-k;else switch(M=B=d.width-e.r,E=H&&"axis"==H?90:270,D=d.width-e.r+N-(270==E?0:ba),J){case "start":J="end";break;case "end":J="start";break;case "middle":f+=P}}else{M=e.l;I=void 0;B=d.width-e.r;C=void 0;D=(d.width-e.r+e.l)/
2;A=void 0;N=P*q+(Z||0)*N+E+Math.max(0<S.length?S.length:0,0<O.length?O.length:0)+ba+n;y=K?-1:1;n=g=f=z=0;q=1;k=0;m=E;switch(L){case 0:J="middle";g=P;break;case 90:J="start";f=0.4*-P;break;case 180:J="middle";break;case 270:J="end";f=0.4*P;break;default:45>L?(J="start",g=F?P:0):135>L?(J="start",f=0.4*-P):180>L?(J="start",g=F?0:-P):225>L?(J="end",g=F?0:-P):315>L?(J="end",g=F?0.4*P:0):(J="end",g=F?P:0)}if(F)I=C=d.height-e.b,E=H&&"axis"==H?180:0,A=d.height-e.b+N-(E?ba:0);else switch(I=C=e.t,E=H&&"away"==
H?180:0,A=e.t-N+(E?0:ba),q=-1,m=-m,J){case "start":J="end";break;case "end":J="start";break;case "middle":g-=P}}this.cleanGroup();var ca=this.group,F=this.scaler,H=this.ticks,da=c.getTransformerFromModel(this.scaler),$=(!G.title||!E)&&!L&&this.opt.htmlLabels&&!h("ie")&&!h("opera")?"html":"gfx",X=n*S.length,aa=q*S.length,Y=this._skipInterval;ca.createLine({x1:M,y1:I,x2:B,y2:C}).setStroke(W);G.title&&(U=b.createText[$](this.chart,ca,D,A,"middle",G.title,U,T),"html"==$?this.htmlElements.push(U):U.setTransform(a.matrix.rotategAt(E,
D,A)));if(null==H)return this.dirty=!1,this;var fa=0<H.major.length?(H.major[0].value-this._majorStart)/F.major.tick:0,ga=this.opt.majorLabels;l.forEach(H.major,function(b,c){var d=da(b.value),e=(K?B:M)+y*d,h=I+z*d;c+=fa;this.createLine(ca,{x1:e,y1:h,x2:e+X,y2:h+aa}).setStroke(S);if(b.label&&(!Y||0==(c-(1+Y))%(1+Y))){var l=G.maxLabelCharCount?this.getTextWithLimitCharCount(b.label,V,G.maxLabelCharCount):{text:b.label,truncated:!1},l=G.maxLabelSize?this.getTextWithLimitLength(l.text,V,G.maxLabelSize,
l.truncated):l,d=this.createText($,ca,e+(0<S.length?X:0)+k+(L?0:f),h+(0<S.length?aa:0)+m+(L?0:g),J,l.text,V,R);l.truncated&&this.chart.formatTruncatedLabel(d,b.label,$);l.truncated&&this.labelTooltip(d,this.chart,b.label,l.text,V,$);"html"==$?this.htmlElements.push(d):L&&d.setTransform([{dx:f,dy:g},a.matrix.rotategAt(L,e+(0<S.length?X:0)+k,h+(0<S.length?aa:0)+m)])}},this);X=n*O.length;aa=q*O.length;ga=this.opt.minorLabels&&F.minMinorStep<=F.minor.tick*F.bounds.scale;l.forEach(H.minor,function(b){var c=
da(b.value),d=(K?B:M)+y*c,e=I+z*c;this.createLine(ca,{x1:d,y1:e,x2:d+X,y2:e+aa}).setStroke(O);if(ga&&b.label){var h=G.maxLabelCharCount?this.getTextWithLimitCharCount(b.label,V,G.maxLabelCharCount):{text:b.label,truncated:!1},h=G.maxLabelSize?this.getTextWithLimitLength(h.text,V,G.maxLabelSize,h.truncated):h,c=this.createText($,ca,d+(0<O.length?X:0)+k+(L?0:f),e+(0<O.length?aa:0)+m+(L?0:g),J,h.text,V,R);h.truncated&&this.chart.formatTruncatedLabel(c,b.label,$);h.truncated&&this.labelTooltip(c,this.chart,
b.label,h.text,V,$);"html"==$?this.htmlElements.push(c):L&&c.setTransform([{dx:f,dy:g},a.matrix.rotategAt(L,d+(0<O.length?X:0)+k,e+(0<O.length?aa:0)+m)])}},this);X=n*Q.length;aa=q*Q.length;l.forEach(H.micro,function(a){var b=da(a.value);a=M+y*b;b=I+z*b;this.createLine(ca,{x1:a,y1:b,x2:a+X,y2:b+aa}).setStroke(Q)},this);this.dirty=!1;return this},labelTooltip:function(b,c,e,g,h,m){var l=["dijit/Tooltip"],n={type:"rect"},y=["above","below"];g=a._base._getTextBox(g,{font:h}).w||0;h=h?a.normalizedLength(a.splitFontString(h).size):
0;"html"==m?(k.mixin(n,d.position(b.firstChild,!0)),n.width=Math.ceil(g),n.height=Math.ceil(h),this._events.push({shape:dojo,handle:f.connect(b.firstChild,"onmouseover",this,function(a){require(l,function(a){a.show(e,n,y)})})}),this._events.push({shape:dojo,handle:f.connect(b.firstChild,"onmouseout",this,function(a){require(l,function(a){a.hide(n)})})})):(m=b.getShape(),c=c.getCoords(),n=k.mixin(n,{x:m.x-g/2,y:m.y}),n.x+=c.x,n.y+=c.y,n.x=Math.round(n.x),n.y=Math.round(n.y),n.width=Math.ceil(g),n.height=
Math.ceil(h),this._events.push({shape:b,handle:b.connect("onmouseenter",this,function(a){require(l,function(a){a.show(e,n,y)})})}),this._events.push({shape:b,handle:b.connect("onmouseleave",this,function(a){require(l,function(a){a.hide(n)})})}))},_isRtl:function(){return!1}});return h("dojo-bidi")?g("dojox.charting.axis2d.Default",[e,q]):e})},"dojox/charting/axis2d/Invisible":function(){define(["dojo/_base/lang","dojo/_base/declare","./Base","../scaler/linear","dojox/lang/utils"],function(k,l,h,g,
f){return l("dojox.charting.axis2d.Invisible",h,{defaultParams:{vertical:!1,fixUpper:"none",fixLower:"none",natural:!1,leftBottom:!0,includeZero:!1,fixed:!0},optionalParams:{min:0,max:1,from:0,to:1,majorTickStep:4,minorTickStep:2,microTickStep:1},constructor:function(d,e){this.opt=k.clone(this.defaultParams);f.updateWithObject(this.opt,e);f.updateWithPattern(this.opt,e,this.optionalParams)},dependOnData:function(){return!("min"in this.opt)||!("max"in this.opt)},clear:function(){delete this.scaler;
delete this.ticks;this.dirty=!0;return this},initialized:function(){return"scaler"in this&&!(this.dirty&&this.dependOnData())},setWindow:function(d,e){this.scale=d;this.offset=e;return this.clear()},getWindowScale:function(){return"scale"in this?this.scale:1},getWindowOffset:function(){return"offset"in this?this.offset:0},calculate:function(d,e,c){if(this.initialized())return this;var b=this.opt;this.labels=b.labels;this.scaler=g.buildScaler(d,e,c,b);var a=this.scaler.bounds;"scale"in this&&(b.from=
a.lower+this.offset,b.to=(a.upper-a.lower)/this.scale+b.from,!isFinite(b.from)||isNaN(b.from)||!isFinite(b.to)||isNaN(b.to)||b.to-b.from>=a.upper-a.lower?(delete b.from,delete b.to,delete this.scale,delete this.offset):(b.from<a.lower?(b.to+=a.lower-b.from,b.from=a.lower):b.to>a.upper&&(b.from+=a.upper-b.to,b.to=a.upper),this.offset=b.from-a.lower),this.scaler=g.buildScaler(d,e,c,b),1==this.scale&&0==this.offset&&(delete this.scale,delete this.offset));return this},getScaler:function(){return this.scaler},
getTicks:function(){return this.ticks}})})},"dojox/charting/axis2d/Base":function(){define(["dojo/_base/declare","../Element"],function(k,l){return k("dojox.charting.axis2d.Base",l,{constructor:function(h,g){this.vertical=g&&g.vertical;this.opt={};this.opt.min=g&&g.min;this.opt.max=g&&g.max},clear:function(){return this},initialized:function(){return!1},calculate:function(h,g,f){return this},getScaler:function(){return null},getTicks:function(){return null},getOffsets:function(){return{l:0,r:0,t:0,
b:0}},render:function(h,g){this.dirty=!1;return this}})})},"dojox/charting/scaler/linear":function(){define(["dojo/_base/lang","./common"],function(k,l){function h(d,c){d=d.toLowerCase();for(var b=c.length-1;0<=b;--b)if(d===c[b])return!0;return!1}var g=k.getObject("dojox.charting.scaler.linear",!0),f=l.getNumericLabel,d=function(d,c,b,a,f,l,q){b=k.delegate(b);a||("major"==b.fixUpper&&(b.fixUpper="minor"),"major"==b.fixLower&&(b.fixLower="minor"));f||("minor"==b.fixUpper&&(b.fixUpper="micro"),"minor"==
b.fixLower&&(b.fixLower="micro"));l||("micro"==b.fixUpper&&(b.fixUpper="none"),"micro"==b.fixLower&&(b.fixLower="none"));var s=h(b.fixLower,["major"])?Math.floor(b.min/a)*a:h(b.fixLower,["minor"])?Math.floor(b.min/f)*f:h(b.fixLower,["micro"])?Math.floor(b.min/l)*l:b.min,r=h(b.fixUpper,["major"])?Math.ceil(b.max/a)*a:h(b.fixUpper,["minor"])?Math.ceil(b.max/f)*f:h(b.fixUpper,["micro"])?Math.ceil(b.max/l)*l:b.max;b.useMin&&(d=s);b.useMax&&(c=r);var p=!a||b.useMin&&h(b.fixLower,["major"])?d:Math.ceil(d/
a)*a,t=!f||b.useMin&&h(b.fixLower,["major","minor"])?d:Math.ceil(d/f)*f,u=!l||b.useMin&&h(b.fixLower,["major","minor","micro"])?d:Math.ceil(d/l)*l,v=!a?0:(b.useMax&&h(b.fixUpper,["major"])?Math.round((c-p)/a):Math.floor((c-p)/a))+1,x=!f?0:(b.useMax&&h(b.fixUpper,["major","minor"])?Math.round((c-t)/f):Math.floor((c-t)/f))+1;b=!l?0:(b.useMax&&h(b.fixUpper,["major","minor","micro"])?Math.round((c-u)/l):Math.floor((c-u)/l))+1;var w=f?Math.round(a/f):0,y=l?Math.round(f/l):0,z=a?Math.floor(Math.log(a)/
Math.LN10):0,A=f?Math.floor(Math.log(f)/Math.LN10):0,D=q/(c-d);isFinite(D)||(D=1);return{bounds:{lower:s,upper:r,from:d,to:c,scale:D,span:q},major:{tick:a,start:p,count:v,prec:z},minor:{tick:f,start:t,count:x,prec:A},micro:{tick:l,start:u,count:b,prec:0},minorPerMajor:w,microPerMinor:y,scaler:g}};return k.mixin(g,{buildScaler:function(e,c,b,a,f,g){var h={fixUpper:"none",fixLower:"none",natural:!1};a&&("fixUpper"in a&&(h.fixUpper=String(a.fixUpper)),"fixLower"in a&&(h.fixLower=String(a.fixLower)),
"natural"in a&&(h.natural=Boolean(a.natural)));g=!g||3>g?3:g;"min"in a&&(e=a.min);"max"in a&&(c=a.max);a.includeZero&&(0<e&&(e=0),0>c&&(c=0));h.min=e;h.useMin=!0;h.max=c;h.useMax=!0;"from"in a&&(e=a.from,h.useMin=!1);"to"in a&&(c=a.to,h.useMax=!1);if(c<=e)return d(e,c,h,0,0,0,b);f||(f=c-e);f=Math.floor(Math.log(f)/Math.LN10);f=a&&"majorTickStep"in a?a.majorTickStep:Math.pow(10,f);var k=0,l=0,p;if(a&&"minorTickStep"in a)k=a.minorTickStep;else{do{k=f/10;if(!h.natural||0.9<k)if(p=d(e,c,h,f,k,0,b),p.bounds.scale*
p.minor.tick>g)break;k=f/5;if(!h.natural||0.9<k)if(p=d(e,c,h,f,k,0,b),p.bounds.scale*p.minor.tick>g)break;k=f/2;if(!h.natural||0.9<k)if(p=d(e,c,h,f,k,0,b),p.bounds.scale*p.minor.tick>g)break;return d(e,c,h,f,0,0,b)}while(0)}if(a&&"microTickStep"in a)l=a.microTickStep,p=d(e,c,h,f,k,l,b);else{do{l=k/10;if(!h.natural||0.9<l)if(p=d(e,c,h,f,k,l,b),3<p.bounds.scale*p.micro.tick)break;l=k/5;if(!h.natural||0.9<l)if(p=d(e,c,h,f,k,l,b),3<p.bounds.scale*p.micro.tick)break;l=k/2;if(!h.natural||0.9<l)if(p=d(e,
c,h,f,k,l,b),3<p.bounds.scale*p.micro.tick)break;l=0}while(0)}return l?p:d(e,c,h,f,k,0,b)},buildTicks:function(d,c){var b,a,g,h=d.major.start,k=d.minor.start,l=d.micro.start;if(c.microTicks&&d.micro.tick)b=d.micro.tick,a=l;else if(c.minorTicks&&d.minor.tick)b=d.minor.tick,a=k;else if(d.major.tick)b=d.major.tick,a=h;else return null;var r=1/d.bounds.scale;if(d.bounds.to<=d.bounds.from||isNaN(r)||!isFinite(r)||0>=b||isNaN(b)||!isFinite(b))return null;for(var p=[],t=[],u=[];a<=d.bounds.to+r;)Math.abs(h-
a)<b/2?(g={value:h},c.majorLabels&&(g.label=f(h,d.major.prec,c)),p.push(g),h+=d.major.tick,k+=d.minor.tick):Math.abs(k-a)<b/2?(c.minorTicks&&(g={value:k},c.minorLabels&&d.minMinorStep<=d.minor.tick*d.bounds.scale&&(g.label=f(k,d.minor.prec,c)),t.push(g)),k+=d.minor.tick):c.microTicks&&u.push({value:l}),l+=d.micro.tick,a+=b;return{major:p,minor:t,micro:u}},getTransformerFromModel:function(d){var c=d.bounds.from,b=d.bounds.scale;return function(a){return(a-c)*b}},getTransformerFromPlot:function(d){var c=
d.bounds.from,b=d.bounds.scale;return function(a){return a/b+c}}})})},"dojox/charting/scaler/common":function(){define(["dojo/_base/lang"],function(k){var l=function(f,d){return Math.abs(f-d)<=1E-6*(Math.abs(f)+Math.abs(d))},h=k.getObject("dojox.charting.scaler.common",!0),g={};return k.mixin(h,{doIfLoaded:function(f,d,e){if(void 0==g[f])try{g[f]=require(f)}catch(c){g[f]=null}return g[f]?d(g[f]):e()},getNumericLabel:function(f,d,e){var c="";h.doIfLoaded("dojo/number",function(a){c=(e.fixed?a.format(f,
{places:0>d?-d:0}):a.format(f))||""},function(){c=e.fixed?f.toFixed(0>d?-d:0):f.toString()});if(e.labelFunc){var b=e.labelFunc(c,f,d);if(b)return b}if(e.labels){for(var b=e.labels,a=0,g=b.length;a<g;){var k=Math.floor((a+g)/2);b[k].value<f?a=k+1:g=k}if(a<b.length&&l(b[a].value,f))return b[a].text;--a;if(0<=a&&a<b.length&&l(b[a].value,f))return b[a].text;a+=2;if(a<b.length&&l(b[a].value,f))return b[a].text}return c}})})},"dojox/charting/plot2d/Bubble":function(){define("dojo/_base/lang dojo/_base/declare dojo/_base/array dojo/has ./CartesianBase ./_PlotEvents ./common dojox/lang/functional dojox/lang/functional/reversed dojox/lang/utils dojox/gfx/fx".split(" "),
function(k,l,h,g,f,d,e,c,b,a,m){var n=b.lambda("item.purgeGroup()");return l("dojox.charting.plot2d.Bubble",[f,d],{defaultParams:{animate:null},optionalParams:{stroke:{},outline:{},shadow:{},fill:{},filter:{},styleFunc:null,font:"",fontColor:"",labelFunc:null},constructor:function(b,c){this.opt=k.clone(k.mixin(this.opt,this.defaultParams));a.updateWithObject(this.opt,c);a.updateWithPattern(this.opt,c,this.optionalParams);this.opt.labelFunc||(this.opt.labelFunc=function(a,b,c){return this._getLabel(a.size,
b,c)});this.animate=this.opt.animate},render:function(a,b){var d;if(this.zoom&&!this.isDataDirty())return this.performZoom(a,b);this.resetEvents();if(this.dirty=this.isDirty())h.forEach(this.series,n),this._eventSeries={},this.cleanGroup(),d=this.getGroup(),c.forEachRev(this.series,function(a){a.cleanGroup(d)});for(var f=this.chart.theme,k=this._hScaler.scaler.getTransformerFromModel(this._hScaler),m=this._vScaler.scaler.getTransformerFromModel(this._vScaler),l=this.events(),x=this.series.length-
1;0<=x;--x){var w=this.series[x];if(!this.dirty&&!w.dirty)f.skip(),this._reconnectEvents(w.name);else if(w.cleanGroup(),w.data.length)if("number"==typeof w.data[0])console.warn("dojox.charting.plot2d.Bubble: the data in the following series cannot be rendered as a bubble chart; ",w);else{d=w.group;var y=f.next("circle",[this.opt,w]),z=h.map(w.data,function(c){return c?{x:k(c.x)+b.l,y:a.height-b.b-m(c.y),radius:this._vScaler.bounds.scale*(c.size/2)}:null},this),A=null,D=null,C=null,B=this.opt.styleFunc,
I=function(a){return B?f.addMixin(y,"circle",[a,B(a)],!0):f.addMixin(y,"circle",a,!0)};y.series.shadow&&(C=h.map(z,function(c,e){if(null!==c){var f=I(w.data[e]).series.shadow,f=d.createCircle({cx:c.x+f.dx,cy:c.y+f.dy,r:c.radius}).setStroke(f).setFill(f.color);this.animate&&this._animateBubble(f,a.height-b.b,c.radius);return f}return null},this),C.length&&(w.dyn.shadow=C[C.length-1].getStroke()));y.series.outline&&(D=h.map(z,function(c,f){if(null!==c){var g=I(w.data[f]),g=e.makeStroke(g.series.outline);
g.width=2*g.width+y.series.stroke.width;g=d.createCircle({cx:c.x,cy:c.y,r:c.radius}).setStroke(g);this.animate&&this._animateBubble(g,a.height-b.b,c.radius);return g}return null},this),D.length&&(w.dyn.outline=D[D.length-1].getStroke()));A=h.map(z,function(c,e){if(null!==c){var f=I(w.data[e]),g={x:c.x-c.radius,y:c.y-c.radius,width:2*c.radius,height:2*c.radius},h=this._plotFill(f.series.fill,a,b),h=this._shapeFill(h,g),h=d.createCircle({cx:c.x,cy:c.y,r:c.radius}).setFill(h).setStroke(f.series.stroke);
h.setFilter&&f.series.filter&&h.setFilter(f.series.filter);this.animate&&this._animateBubble(h,a.height-b.b,c.radius);this.createLabel(d,w.data[e],g,f);return h}return null},this);A.length&&(w.dyn.fill=A[A.length-1].getFill(),w.dyn.stroke=A[A.length-1].getStroke());if(l){var M=Array(A.length);h.forEach(A,function(a,b){if(null!==a){var c={element:"circle",index:b,run:w,shape:a,outline:D&&D[b]||null,shadow:C&&C[b]||null,x:w.data[b].x,y:w.data[b].y,r:w.data[b].size/2,cx:z[b].x,cy:z[b].y,cr:z[b].radius};
this._connectEvents(c);M[b]=c}},this);this._eventSeries[w.name]=M}else delete this._eventSeries[w.name];w.dirty=!1}else w.dirty=!1,f.skip()}this.dirty=!1;g("dojo-bidi")&&this._checkOrientation(this.group,a,b);return this},_animateBubble:function(a,b,c){m.animateTransform(k.delegate({shape:a,duration:1200,transform:[{name:"translate",start:[0,b],end:[0,0]},{name:"scale",start:[0,1/c],end:[1,1]},{name:"original"}]},this.animate)).play()}})})},"dojox/charting/plot2d/CartesianBase":function(){define("dojo/_base/lang dojo/_base/declare dojo/_base/connect dojo/has ./Base ../scaler/primitive dojox/gfx dojox/gfx/fx dojox/lang/utils".split(" "),
function(k,l,h,g,f,d,e,c,b){return l("dojox.charting.plot2d.CartesianBase",f,{baseParams:{hAxis:"x",vAxis:"y",labels:!1,labelOffset:10,fixed:!0,precision:1,labelStyle:"inside",htmlLabels:!0,omitLabels:!0,labelFunc:null},constructor:function(a,c){this.axes=["hAxis","vAxis"];this.zoom=null;this.zoomQueue=[];this.lastWindow={vscale:1,hscale:1,xoffset:0,yoffset:0};this.hAxis=c&&c.hAxis||"x";this.vAxis=c&&c.vAxis||"y";this.series=[];this.opt=k.clone(this.baseParams);b.updateWithObject(this.opt,c)},clear:function(){this.inherited(arguments);
this._vAxis=this._hAxis=null;return this},cleanGroup:function(a,b){this.inherited(arguments);if(!b&&this.chart._nativeClip){var c=this.chart.offsets,d=this.chart.dim,e=Math.max(0,d.width-c.l-c.r),d=Math.max(0,d.height-c.t-c.b);this.group.setClip({x:c.l,y:c.t,width:e,height:d});this._clippedGroup||(this._clippedGroup=this.group.createGroup())}},purgeGroup:function(){this.inherited(arguments);this._clippedGroup=null},getGroup:function(){return this._clippedGroup||this.group},setAxis:function(a){a&&
(this[a.vertical?"_vAxis":"_hAxis"]=a);return this},toPage:function(a){var b=this._hAxis,c=this._vAxis,d=b.getScaler(),e=c.getScaler(),f=d.scaler.getTransformerFromModel(d),g=e.scaler.getTransformerFromModel(e),h=this.chart.getCoords(),k=this.chart.offsets,l=this.chart.dim,d=function(a){var d={};d.x=f(a[b.name])+h.x+k.l;d.y=h.y+l.height-k.b-g(a[c.name]);return d};return a?d(a):d},toData:function(a){var b=this._hAxis,c=this._vAxis,d=b.getScaler(),e=c.getScaler(),f=d.scaler.getTransformerFromPlot(d),
g=e.scaler.getTransformerFromPlot(e),h=this.chart.getCoords(),k=this.chart.offsets,l=this.chart.dim,d=function(a){var d={};d[b.name]=f(a.x-h.x-k.l);d[c.name]=g(h.y+l.height-a.y-k.b);return d};return a?d(a):d},isDirty:function(){return this.dirty||this._hAxis&&this._hAxis.dirty||this._vAxis&&this._vAxis.dirty},createLabel:function(a,b,c,d){if(this.opt.labels){var f,g=this.opt.labelFunc?this.opt.labelFunc.apply(this,[b,this.opt.fixed,this.opt.precision]):this._getLabel(isNaN(b.y)?b:b.y);if("inside"==
this.opt.labelStyle){var h=e._base._getTextBox(g,{font:d.series.font});b=c.x+c.width/2;f=c.y+c.height/2+h.h/4;if(h.w>c.width||h.h>c.height)return}else b=c.x+c.width/2,f=c.y-this.opt.labelOffset;this.renderLabel(a,b,f,g,d,"inside"==this.opt.labelStyle)}},performZoom:function(a,b){var d=this._vAxis.scale||1,e=this._hAxis.scale||1,f=a.height-b.b,g=this._hScaler.bounds,g=(g.from-g.lower)*g.scale,l=this._vScaler.bounds,l=(l.from-l.lower)*l.scale,t=d/this.lastWindow.vscale,u=e/this.lastWindow.hscale,v=
(this.lastWindow.xoffset-g)/(1==this.lastWindow.hscale?e:this.lastWindow.hscale),x=(l-this.lastWindow.yoffset)/(1==this.lastWindow.vscale?d:this.lastWindow.vscale),w=this.getGroup(),f=c.animateTransform(k.delegate({shape:w,duration:1200,transform:[{name:"translate",start:[0,0],end:[b.l*(1-u),f*(1-t)]},{name:"scale",start:[1,1],end:[u,t]},{name:"original"},{name:"translate",start:[0,0],end:[v,x]}]},this.zoom));k.mixin(this.lastWindow,{vscale:d,hscale:e,xoffset:g,yoffset:l});this.zoomQueue.push(f);
h.connect(f,"onEnd",this,function(){this.zoom=null;this.zoomQueue.shift();0<this.zoomQueue.length&&this.zoomQueue[0].play()});1==this.zoomQueue.length&&this.zoomQueue[0].play();return this},initializeScalers:function(a,b){this._hAxis?(this._hAxis.initialized()||this._hAxis.calculate(b.hmin,b.hmax,a.width),this._hScaler=this._hAxis.getScaler()):this._hScaler=d.buildScaler(b.hmin,b.hmax,a.width);this._vAxis?(this._vAxis.initialized()||this._vAxis.calculate(b.vmin,b.vmax,a.height),this._vScaler=this._vAxis.getScaler()):
this._vScaler=d.buildScaler(b.vmin,b.vmax,a.height);return this}})})},"dojox/charting/plot2d/Base":function(){define("dojo/_base/declare dojo/_base/array dojox/gfx ../Element ./common ../axis2d/common dojo/has".split(" "),function(k,l,h,g,f,d,e){k=k("dojox.charting.plot2d.Base",g,{constructor:function(c,b){b&&b.tooltipFunc&&(this.tooltipFunc=b.tooltipFunc)},clear:function(){this.series=[];this.dirty=!0;return this},setAxis:function(c){return this},assignAxes:function(c){l.forEach(this.axes,function(b){this[b]&&
this.setAxis(c[this[b]])},this)},addSeries:function(c){this.series.push(c);return this},getSeriesStats:function(){return f.collectSimpleStats(this.series)},calculateAxes:function(c){this.initializeScalers(c,this.getSeriesStats());return this},initializeScalers:function(){return this},isDataDirty:function(){return l.some(this.series,function(c){return c.dirty})},render:function(c,b){return this},renderLabel:function(c,b,a,e,f,g,k){c=d.createText[this.opt.htmlLabels&&"vml"!=h.renderer?"html":"gfx"](this.chart,
c,b,a,k?k:"middle",e,f.series.font,f.series.fontColor);g&&(this.opt.htmlLabels&&"vml"!=h.renderer?c.style.pointerEvents="none":c.rawNode&&(c.rawNode.style.pointerEvents="none"));this.opt.htmlLabels&&"vml"!=h.renderer&&this.htmlElements.push(c);return c},getRequiredColors:function(){return this.series.length},_getLabel:function(c){return f.getLabel(c,this.opt.fixed,this.opt.precision)}});e("dojo-bidi")&&k.extend({_checkOrientation:function(c,b,a){this.chart.applyMirroring(this.group,b,a)}});return k})},
"dojox/charting/plot2d/common":function(){define("dojo/_base/lang dojo/_base/array dojo/_base/Color dojox/gfx dojox/lang/functional ../scaler/common".split(" "),function(k,l,h,g,f,d){var e=k.getObject("dojox.charting.plot2d.common",!0);return k.mixin(e,{doIfLoaded:d.doIfLoaded,makeStroke:function(c){if(!c)return c;if("string"==typeof c||c instanceof h)c={color:c};return g.makeParameters(g.defaultStroke,c)},augmentColor:function(c,b){var a=new h(c),d=new h(b);d.a=a.a;return d},augmentStroke:function(c,
b){var a=e.makeStroke(c);a&&(a.color=e.augmentColor(a.color,b));return a},augmentFill:function(c,b){new h(b);return"string"==typeof c||c instanceof h?e.augmentColor(c,b):c},defaultStats:{vmin:Number.POSITIVE_INFINITY,vmax:Number.NEGATIVE_INFINITY,hmin:Number.POSITIVE_INFINITY,hmax:Number.NEGATIVE_INFINITY},collectSimpleStats:function(c){for(var b=k.delegate(e.defaultStats),a=0;a<c.length;++a)for(var d=c[a],f=0;f<d.data.length;f++)if(null!==d.data[f]){if("number"==typeof d.data[f]){var f=b.vmin,g=
b.vmax;(!("ymin"in d)||!("ymax"in d))&&l.forEach(d.data,function(a,c){if(null!==a){var d=c+1,e=a;isNaN(e)&&(e=0);b.hmin=Math.min(b.hmin,d);b.hmax=Math.max(b.hmax,d);b.vmin=Math.min(b.vmin,e);b.vmax=Math.max(b.vmax,e)}})}else{var h=b.hmin,r=b.hmax,f=b.vmin,g=b.vmax;(!("xmin"in d)||!("xmax"in d)||!("ymin"in d)||!("ymax"in d))&&l.forEach(d.data,function(a,c){if(null!==a){var d="x"in a?a.x:c+1,e=a.y;isNaN(d)&&(d=0);isNaN(e)&&(e=0);b.hmin=Math.min(b.hmin,d);b.hmax=Math.max(b.hmax,d);b.vmin=Math.min(b.vmin,
e);b.vmax=Math.max(b.vmax,e)}});"xmin"in d&&(b.hmin=Math.min(h,d.xmin));"xmax"in d&&(b.hmax=Math.max(r,d.xmax))}"ymin"in d&&(b.vmin=Math.min(f,d.ymin));"ymax"in d&&(b.vmax=Math.max(g,d.ymax));break}return b},calculateBarSize:function(c,b,a){a||(a=1);var d=b.gap,d=(c-2*d)/a;"minBarSize"in b&&(d=Math.max(d,b.minBarSize));"maxBarSize"in b&&(d=Math.min(d,b.maxBarSize));d=Math.max(d,1);return{size:d,gap:(c-d*a)/2}},collectStackedStats:function(c){var b=k.clone(e.defaultStats);if(c.length){b.hmin=Math.min(b.hmin,
1);b.hmax=f.foldl(c,"seed, run -\x3e Math.max(seed, run.data.length)",b.hmax);for(var a=0;a<b.hmax;++a){var d=c[0].data[a],d=d&&("number"==typeof d?d:d.y);isNaN(d)&&(d=0);b.vmin=Math.min(b.vmin,d);for(var g=1;g<c.length;++g){var h=c[g].data[a],h=h&&("number"==typeof h?h:h.y);isNaN(h)&&(h=0);d+=h}b.vmax=Math.max(b.vmax,d)}}return b},curve:function(c,b){var a=c.slice(0);"x"==b&&(a[a.length]=a[0]);return l.map(a,function(c,d){if(0==d)return"M"+c.x+","+c.y;if(isNaN(b)){if("X"==b||"x"==b||"S"==b){var e,
f=a[d-1],g=a[d],h,k,l,v=1/6;1==d?(e="x"==b?a[a.length-2]:f,v=1/3):e=a[d-2];d==a.length-1?(h="x"==b?a[1]:g,v=1/3):h=a[d+1];k=Math.sqrt((g.x-f.x)*(g.x-f.x)+(g.y-f.y)*(g.y-f.y));l=Math.sqrt((g.x-e.x)*(g.x-e.x)+(g.y-e.y)*(g.y-e.y));var x=Math.sqrt((h.x-f.x)*(h.x-f.x)+(h.y-f.y)*(h.y-f.y)),w=l*v,v=x*v;w>k/2&&v>k/2?(w=k/2,v=k/2):w>k/2?(w=k/2,v=k/2*x/l):v>k/2&&(v=k/2,w=k/2*l/x);"S"==b&&(e==f&&(w=0),g==h&&(v=0));k=f.x+w*(g.x-e.x)/l;e=f.y+w*(g.y-e.y)/l;l=g.x-v*(h.x-f.x)/x;f=g.y-v*(h.y-f.y)/x}}else return g=
c.x-a[d-1].x,"C"+(c.x-(b-1)*(g/b))+","+a[d-1].y+" "+(c.x-g/b)+","+c.y+" "+c.x+","+c.y;return"C"+(k+","+e+" "+l+","+f+" "+g.x+","+g.y)}).join(" ")},getLabel:function(c,b,a){return d.doIfLoaded("dojo/number",function(d){return(b?d.format(c,{places:a}):d.format(c))||""},function(){return b?c.toFixed(a):c.toString()})}})})},"dojox/charting/scaler/primitive":function(){define(["dojo/_base/lang"],function(k){var l=k.getObject("dojox.charting.scaler.primitive",!0);return k.mixin(l,{buildScaler:function(h,
g,f,d){h==g&&(h-=0.5,g+=0.5);return{bounds:{lower:h,upper:g,from:h,to:g,scale:f/(g-h),span:f},scaler:l}},buildTicks:function(h,g){return{major:[],minor:[],micro:[]}},getTransformerFromModel:function(h){var g=h.bounds.from,f=h.bounds.scale;return function(d){return(d-g)*f}},getTransformerFromPlot:function(h){var g=h.bounds.from,f=h.bounds.scale;return function(d){return d/f+g}}})})},"dojox/gfx/fx":function(){define("dojo/_base/lang ./_base ./matrix dojo/_base/Color dojo/_base/array dojo/_base/fx dojo/_base/connect dojo/sniff".split(" "),
function(k,l,h,g,f,d,e,c){function b(a,b){this.start=a;this.end=b}function a(a,b,c){this.start=a;this.end=b;this.units=c}function m(a,b){this.start=a;this.end=b;this.temp=new g}function n(a){this.values=a;this.length=a.length}function q(a,b){this.values=a;this.def=b?b:{}}function s(a,b){this.stack=a;this.original=b}function r(a,b,c,d){if(a.values)return new n(a.values);var e,f;f=a.start?l.normalizeColor(a.start):e=b?c?b[c]:b:d;a.end?a=l.normalizeColor(a.end):(e||(e=b?c?b[c]:b:d),a=e);return new m(f,
a)}var p=l.fx={};b.prototype.getValue=function(a){return(this.end-this.start)*a+this.start};a.prototype.getValue=function(a){return(this.end-this.start)*a+this.start+this.units};m.prototype.getValue=function(a){return g.blendColors(this.start,this.end,a,this.temp)};n.prototype.getValue=function(a){return this.values[Math.min(Math.floor(a*this.length),this.length-1)]};q.prototype.getValue=function(a){var b=k.clone(this.def),c;for(c in this.values)b[c]=this.values[c].getValue(a);return b};s.prototype.getValue=
function(a){var b=[];f.forEach(this.stack,function(c){if(c instanceof h.Matrix2D)b.push(c);else if("original"==c.name&&this.original)b.push(this.original);else if("matrix"==c.name){if(c.start instanceof h.Matrix2D&&c.end instanceof h.Matrix2D){var d=new h.Matrix2D,e;for(e in c.start)d[e]=(c.end[e]-c.start[e])*a+c.start[e];b.push(d)}}else c.name in h&&(d=h[c.name],"function"!=typeof d?b.push(d):(e=f.map(c.start,function(b,d){return(c.end[d]-b)*a+b}),d=d.apply(h,e),d instanceof h.Matrix2D&&b.push(d)))},
this);return b};var t=new g(0,0,0,0);p.animateStroke=function(a){a.easing||(a.easing=d._defaultEasing);var c=new d.Animation(a),f=a.shape,g;e.connect(c,"beforeBegin",c,function(){g=f.getStroke();var c=a.color,d={},e;c&&(d.color=r(c,g,"color",t));if((c=a.style)&&c.values)d.style=new n(c.values);if(c=a.width){var h=c;h.values?e=new n(h.values):(c=h.start?h.start:e=g?g.width:1,h.end?e=h.end:"number"!=typeof e&&(e=g?g.width:1),e=new b(c,e));d.width=e}if((c=a.cap)&&c.values)d.cap=new n(c.values);if(c=
a.join)c.values?d.join=new n(c.values):(e=c.start?c.start:g&&g.join||0,c=c.end?c.end:g&&g.join||0,"number"==typeof e&&"number"==typeof c&&(d.join=new b(e,c)));this.curve=new q(d,g)});e.connect(c,"onAnimate",f,"setStroke");return c};p.animateFill=function(a){a.easing||(a.easing=d._defaultEasing);var b=new d.Animation(a),c=a.shape,f;e.connect(b,"beforeBegin",b,function(){f=c.getFill();var b=a.color;b&&(this.curve=r(b,f,"",t))});e.connect(b,"onAnimate",c,"setFill");return b};p.animateFont=function(b){b.easing||
(b.easing=d._defaultEasing);var c=new d.Animation(b),f=b.shape,g;e.connect(c,"beforeBegin",c,function(){g=f.getFont();var c=b.style,d={},e,h;c&&c.values&&(d.style=new n(c.values));if((c=b.variant)&&c.values)d.variant=new n(c.values);if((c=b.weight)&&c.values)d.weight=new n(c.values);if((c=b.family)&&c.values)d.family=new n(c.values);if((c=b.size)&&c.units)e=parseFloat(c.start?c.start:f.font&&f.font.size||"0"),h=parseFloat(c.end?c.end:f.font&&f.font.size||"0"),d.size=new a(e,h,c.units);this.curve=
new q(d,g)});e.connect(c,"onAnimate",f,"setFont");return c};p.animateTransform=function(a){a.easing||(a.easing=d._defaultEasing);var b=new d.Animation(a),g=a.shape,h;e.connect(b,"beforeBegin",b,function(){h=g.getTransform();this.curve=new s(a.transform,h)});e.connect(b,"onAnimate",g,"setTransform");if("svg"===l.renderer&&(9<=c("ie")||c("ff")))var k=[e.connect(b,"onBegin",b,function(){for(var a=g.getParent();a&&a.getParent;)a=a.getParent();a&&(g.__svgContainer=a.rawNode.parentNode,g.__svgRoot=a.rawNode,
g.__svgRoot&&g.__svgRoot.getAttribute&&(g.__svgWidth=parseInt(g.__svgRoot.getAttribute("width"),10),isNaN(g.__svgWidth)&&delete g.__svgWidth))}),e.connect(b,"onAnimate",b,function(){try{if(g.__svgContainer){var a=g.__svgContainer.style.visibility;g.__svgContainer.style.visibility="visible";g.__svgContainer.style.visibility=a;var b=g.__svgWidth;if(!isNaN(b))try{g.__svgRoot.setAttribute("width",b-5E-6),g.__svgRoot.setAttribute("width",b)}catch(c){}}}catch(d){}}),e.connect(b,"onEnd",b,function(){f.forEach(k,
e.disconnect);if(g.__svgContainer){var a=g.__svgContainer;if(null==a.getAttribute("__gotVis")){a.setAttribute("__gotVis",!0);var b=g.__svgContainer.style.visibility,c=g.__svgRoot,d=g.__svgWidth;a.style.visibility="visible";setTimeout(function(){try{a.style.visibility=b;a.removeAttribute("__gotVis");a=null;try{isNaN(d)||(c.setAttribute("width",d-5E-6),c.setAttribute("width",d))}catch(e){}}catch(f){}},100)}}delete g.__svgContainer;delete g.__svgRoot;delete g.__svgWidth})];return b};return p})},"dojox/charting/plot2d/_PlotEvents":function(){define(["dojo/_base/lang",
"dojo/_base/array","dojo/_base/declare","dojo/_base/connect"],function(k,l,h,g){return h("dojox.charting.plot2d._PlotEvents",null,{constructor:function(){this._shapeEvents=[];this._eventSeries={}},destroy:function(){this.resetEvents();this.inherited(arguments)},plotEvent:function(f){},raiseEvent:function(f){this.plotEvent(f);var d=k.delegate(f);d.originalEvent=f.type;d.originalPlot=f.plot;d.type="onindirect";l.forEach(this.chart.stack,function(e){e!==this&&e.plotEvent&&(d.plot=e,e.plotEvent(d))},
this)},connect:function(f,d){this.dirty=!0;return g.connect(this,"plotEvent",f,d)},events:function(){return!!this.plotEvent.after},resetEvents:function(){this._shapeEvents.length&&(l.forEach(this._shapeEvents,function(f){f.shape.disconnect(f.handle)}),this._shapeEvents=[]);this.raiseEvent({type:"onplotreset",plot:this})},_connectSingleEvent:function(f,d){this._shapeEvents.push({shape:f.eventMask,handle:f.eventMask.connect(d,this,function(e){f.type=d;f.event=e;this.raiseEvent(f);f.event=null})})},
_connectEvents:function(f){f&&(f.chart=this.chart,f.plot=this,f.hAxis=this.hAxis||null,f.vAxis=this.vAxis||null,f.eventMask=f.eventMask||f.shape,this._connectSingleEvent(f,"onmouseover"),this._connectSingleEvent(f,"onmouseout"),this._connectSingleEvent(f,"onclick"))},_reconnectEvents:function(f){(f=this._eventSeries[f])&&l.forEach(f,this._connectEvents,this)},fireEvent:function(f,d,e,c){if((f=this._eventSeries[f])&&f.length&&e<f.length)e=f[e],e.type=d,e.event=c||null,this.raiseEvent(e),e.event=null}})})},
"JBrowse/View/Track/_FeatureDetailMixin":function(){define("dojo/_base/declare dojo/_base/array dojo/_base/lang dojo/aspect dojo/on dojo/dom-construct JBrowse/Util JBrowse/View/FASTA JBrowse/View/_FeatureDescriptionMixin".split(" "),function(k,l,h,g,f,d,e,c,b){return k(b,{constructor:function(){"function"==typeof this.destroy&&g.before(this,"destroy",function(){delete this.eventHandlers})},_setupEventHandlers:function(){var a=dojo.clone(this.config.events||{});a.click||(a.click=(this.config.style||
{}).linkTemplate?{action:"newWindow",url:this.config.style.linkTemplate}:{action:"contentDialog",title:"{type} {name}",content:dojo.hitch(this,"defaultFeatureDetail")});var a=dojo.clone(a),b;for(b in this.config){var c=b.replace(/^on(?=[A-Z])/,"");c!=b&&(a[c.toLowerCase()]=this.config[b])}for(b in a)"string"==typeof a[b]&&(a[b]={url:a[b]});this.eventHandlers=a;this.eventHandlers.click=this._makeClickHandler(this.eventHandlers.click)},defaultFeatureDetail:function(a,b,c,d,e){d=d||dojo.create("div",
{className:"detail feature-detail feature-detail-"+a.name.replace(/\s+/g,"_").toLowerCase(),innerHTML:""});this._renderCoreDetails(a,b,c,d);this._renderAdditionalTagsDetail(a,b,c,d);this._renderUnderlyingReferenceSequence(a,b,c,d);this._renderSubfeaturesDetail(a,b,c,d,e||1);"function"===typeof this.extendedRender&&this.extendedRender(a,b,c,d);return d},_renderCoreDetails:function(a,b,c,d){a=dojo.create("div",{className:"core"},d);c=dojo.hitch(this,"renderDetailField",a);a.innerHTML+='\x3ch2 class\x3d"sectiontitle"\x3ePrimary Data\x3c/h2\x3e';
c("Name",this.getFeatureLabel(b),b);c("Type",b.get("type"),b);c("Score",b.get("score"),b);c("Description",this.getFeatureDescription(b),b);c("Position",e.assembleLocString({start:b.get("start"),end:b.get("end"),ref:this.refSeq.name,strand:b.get("strand")}),b);c("Length",e.addCommas(b.get("end")-b.get("start"))+" bp",b)},_renderSubfeaturesDetail:function(a,b,c,e,g){var h=this,k=b.get("subfeatures");if(k&&k.length)if(null==a.config.subfeatureDetailLevel||g<a.config.subfeatureDetailLevel)this._subfeaturesDetail(a,
k,e,b,g+1);else if(g>=a.config.subfeatureDetailLevel){var l=d.create("button",{innerHTML:"Load subfeatures..."},e);f(l,"click",function(){h._subfeaturesDetail(a,k,e,b,g+1);dojo.destroy(l)})}},_isReservedTag:function(a){return{name:1,start:1,end:1,strand:1,note:1,subfeatures:1,type:1,score:1}[a.toLowerCase()]},_renderAdditionalTagsDetail:function(a,b,c,e){a=l.filter(b.tags(),function(a){return!this._isReservedTag(a)},this);a.length&&(d.create("div",{className:"additional",innerHTML:'\x3ch2 class\x3d"sectiontitle"\x3eAttributes\x3c/h2\x3e'},
e),l.forEach(a.sort(),function(a){this.renderDetailField(e,a,b.get(a),b)},this))},_renderUnderlyingReferenceSequence:function(a,b,d,f){d=dojo.create("div",{className:"field_container feature_sequence"},f);dojo.create("h2",{className:"field feature_sequence",innerHTML:"Region sequence",title:"reference sequence underlying this "+(b.get("type")||"feature")},d);var g="feature_sequence"+this._uniqID(),h=dojo.create("div",{id:g,innerHTML:'\x3cdiv style\x3d"height: 12em"\x3eLoading...\x3c/div\x3e',className:"value feature_sequence"},
d);d=this.config.maxFeatureSizeForUnderlyingRefSeq;d<b.get("end")-b.get("start")?h.innerHTML="Not displaying underlying reference sequence, feature is longer than maximum of "+e.humanReadableNumber(d)+"bp":a.browser.getStore("refseqs",dojo.hitch(this,function(a){h=dojo.byId(g)||h;a?a.getReferenceSequence({ref:this.refSeq.name,start:b.get("start"),end:b.get("end")},dojo.hitch(this,function(a){h=dojo.byId(g)||h;h.innerHTML="";(new c({track:this,width:62,htmlMaxRows:10})).renderHTML({ref:this.refSeq.name,
start:b.get("start"),end:b.get("end"),strand:b.get("strand"),type:b.get("type")},-1==b.get("strand")?e.revcom(a):a,h)}),function(){},dojo.hitch(this,function(){h=dojo.byId(g)||h;h.innerHTML='\x3cspan class\x3d"ghosted"\x3ereference sequence not available\x3c/span\x3e'})):h.innerHTML='\x3cspan class\x3d"ghosted"\x3ereference sequence not available\x3c/span\x3e'}))},_uniqID:function(){this._idCounter=this._idCounter||0;return this._idCounter++},_subfeaturesDetail:function(a,b,c,d,e){c=dojo.create("div",
{className:"field_container subfeatures"},c);dojo.create("h2",{className:"field subfeatures",innerHTML:"Subfeatures"},c);var f=dojo.create("div",{className:"value subfeatures"},c);l.forEach(b||[],function(b){this.defaultFeatureDetail(a,b,null,dojo.create("div",{className:"detail feature-detail subfeature-detail feature-detail-"+a.name+" subfeature-detail-"+a.name,innerHTML:""},f),e)},this)}})})},"JBrowse/View/FASTA":function(){define("dojo/_base/declare dojo/dom-construct dijit/Toolbar dijit/form/Button JBrowse/Util JBrowse/has".split(" "),
function(k,l,h,g,f,d){return k(null,{constructor:function(d){"undefined"===typeof d?this.width=78:(this.width=d.width||78,this.htmlMaxRows=d.htmlMaxRows||15,this.canSaveFiles=(this.track=d.track)&&d.track._canSaveFiles&&d.track._canSaveFiles(),"function"===typeof this.initData&&this.initData(d))},renderHTML:function(e,c,b){var a=this,k=this.renderText(e,c),n=k.match(/\n/g).length+1;b=l.create("div",{className:"fastaView"},b);if(this.canSaveFiles){var q=(new h).placeAt(b),a=this;"function"===typeof a.addButtons&&
a.addButtons(e,c,q);q.addChild(new g({iconClass:"dijitIconSave",label:"FASTA",title:"save as FASTA",disabled:!d("save-generated-files"),onClick:function(){a.track._fileDownload({format:"FASTA",filename:f.assembleLocString(e)+".fasta",data:k})}}))}var s=0;l.create("textarea",{className:"fasta",cols:this.width,rows:Math.min(n,this.htmlMaxRows),readonly:!0},b).innerHTML=k.replace(/\n/g,function(){return s++?"":"\n"});return b},renderText:function(d,c){return"\x3e"+d.ref+" "+f.assembleLocString(d)+(d.type?
" class\x3d"+d.type:"")+" length\x3d"+(d.end-d.start)+"\n"+this._wrap(c,this.width)},_wrap:function(d,c){c=c||this.width;return d.replace(RegExp("(.{"+c+"})","g"),"$1\n")}})})},"dijit/Toolbar":function(){define("require dojo/_base/declare dojo/has dojo/keys dojo/ready ./_Widget ./_KeyNavContainer ./_TemplatedMixin".split(" "),function(k,l,h,g,f,d,e,c){h("dijit-legacy-requires")&&f(0,function(){k(["dijit/ToolbarSeparator"])});return l("dijit.Toolbar",[d,c,e],{templateString:'\x3cdiv class\x3d"dijit" role\x3d"toolbar" tabIndex\x3d"${tabIndex}" data-dojo-attach-point\x3d"containerNode"\x3e\x3c/div\x3e',
baseClass:"dijitToolbar",_onLeftArrow:function(){this.focusPrev()},_onRightArrow:function(){this.focusNext()}})})},"JBrowse/View/_FeatureDescriptionMixin":function(){define(["dojo/_base/declare","dojo/_base/lang"],function(k,l){return k(null,{getFeatureLabel:function(h){return this._getFeatureDescriptiveThing("label","name,id",h)},getFeatureDescription:function(h){return this._getFeatureDescriptiveThing("description","note,description",h)},_getFeatureDescriptiveThing:function(h,g,f){var d=this.config.style[h]||
this.config[h];if(!d)return null;if("function"==typeof d)return d.call(this,f);this.descriptionFields||(this.descriptionFields={});var e;if(!(e=this.descriptionFields[h]))d?(l.isArray(d)?d=d.join(","):"string"!=typeof d&&(console.warn("invalid `description` setting ("+d+') for "'+(this.name||this.track.name)+'" track, falling back to "note,description"'),d=g),d=d.toLowerCase().split(/\s*\,\s*/)):d=[],e=this.descriptionFields[h]=d;h=e;for(g=0;g<h.length;g++)if(d=f.get(h[g]))return d;return null}})})},
"JBrowse/View/Track/_TrackDetailsStatsMixin":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/Deferred"],function(k,l,h){return k(null,{_trackDetailsContent:function(){var g=this,f=new h,d=arguments;this.store.getGlobalStats(function(e){f.resolve(g.inherited(d,[{"Stats (current reference sequence)":e}]))},l.hitch(f,"reject"));return f}})})},"JBrowse/View/GranularRectLayout":function(){define(["dojo/_base/declare"],function(k){return k(null,{constructor:function(k){this.pitchX=k.pitchX||
10;this.pitchY=k.pitchY||10;this.displayMode=k.displayMode;"compact"==this.displayMode&&(this.pitchY=Math.round(this.pitchY/4)||1,this.pitchX=Math.round(this.pitchX/4)||1);this.bitmap=[];this.rectangles={};this.maxHeight=Math.ceil((k.maxHeight||Infinity)/this.pitchY);this.pTotalHeight=0},addRect:function(k,h,g,f,d){if(k in this.rectangles){k=this.rectangles[k];if(null===k.top)return null;this._addRectToBitmap(k,d);return k.top*this.pitchY}h=Math.floor(h/this.pitchX);g=Math.floor(g/this.pitchX);f=
Math.ceil(f/this.pitchY);h={id:k,l:h,r:g,mX:Math.floor((h+g)/2),h:f};d&&(h.data=d);g=this.maxHeight-f;for(var e=0;e<=g&&this._collides(h,e);e++);if(e>g)return h.top=e=null,this.rectangles[k]=h,this.pTotalHeight=Math.max(this.pTotalHeight||0,e+f),null;h.top=e;this._addRectToBitmap(h,d);this.rectangles[k]=h;this.pTotalHeight=Math.max(this.pTotalHeight||0,e+f);return e*this.pitchY},_collides:function(k,h){if("collapsed"==this.displayMode)return!1;var g=this.bitmap,f=g[h];if(f&&(f[k.l]||f[k.r]||f[k.mX]))return!0;
for(var f=h+k.h,d=h;d<f;d++){var e=g[d];if(e){if(e.allFilled)return!0;if(e.length>k.l)for(var c=k.l;c<=k.r;c++)if(e[c])return!0}}return!1},_autovivify:function(k,h){var g;if(!(g=k[h]))g=[],k[h]=g;return g},_addRectToBitmap:function(k,h){if(null!==k.top){h=h||!0;var g=this.bitmap,f=this._autovivify,d=k.top+k.h;if(2E4<k.r-k.l)for(var e=k.top;e<d;e++)f(g,e).allFilled=h;else for(e=k.top;e<d;e++)for(var c=f(g,e),b=k.l;b<=k.r;b++)c[b]=h}},discardRange:function(k,h){for(var g=Math.floor(k/this.pitchX),f=
Math.floor(h/this.pitchX),d=this.bitmap,e=0;e<d.length;++e){var c=d[e];if(c)for(var b=g;b<=f;++b)delete c[b]}},hasSeen:function(k){return!!this.rectangles[k]},getByCoord:function(k,h){var g=this.bitmap[Math.floor(h/this.pitchY)];if(g){var f;if(!(f=g.allFilled))f=g[Math.floor(k/this.pitchX)];return f}},getByID:function(k){if(k=this.rectangles[k])return k.data||!0},cleanup:function(){},getTotalHeight:function(){return this.pTotalHeight*this.pitchY}})})},"JBrowse/View/Track/FixedImage/Wiggle":function(){define(["dojo/_base/declare",
"JBrowse/View/Track/FixedImage","JBrowse/View/Track/_YScaleMixin"],function(k,l,h){return k([l,h],{constructor:function(){},updateStaticElements:function(g){this.inherited(arguments);this.updateYScaleFromViewDimensions(g)},makeImageLoadHandler:function(g,f,d,e){return this.inherited(arguments,[g,f,d,dojo.hitch(this,function(){this.makeWiggleYScale();e&&e()})])},makeWiggleYScale:function(){var g=this;this.store.getGlobalStats(function(f){g.yscale||g.makeYScale({min:f.scoreMin,max:f.scoreMax})})}})})},
"JBrowse/View/Track/FixedImage":function(){define(["dojo/_base/declare","JBrowse/has","JBrowse/View/Track/BlockBased"],function(k,l,h){return k(h,{constructor:function(g){this.trackPadding=g.trackPadding||0},handleImageError:function(g){(g.currentTarget||g.srcElement).style.display="none";dojo.stopEvent(g)},makeImageLoadHandler:function(g,f,d,e){var c=dojo.hitch(this,function(){this.imageHeight=g.height;g.style.height=g.height+"px";g.style.width=100*(g.baseWidth/d)+"%";this.heightUpdate(g.height,
f);e&&e();return!0});return l("ie")?function(){window.setTimeout(c,250)}:c},fillBlock:function(g){var f=g.blockIndex,d=g.block,e=g.leftBase,c=g.rightBase,b=g.finishCallback||function(){},a=c-e;this.store.getImages({scale:g.scale,start:e,end:c},dojo.hitch(this,function(c){dojo.forEach(c,function(b){b.className="image-track";if(!b.parentNode||!b.parentNode.parentNode){b.style.position="absolute";b.style.left=100*((b.startBase-e)/a)+"%";switch(this.config.align){case "top":b.style.top="0px";break;default:b.style.bottom=
this.trackPadding+"px"}d.domNode.appendChild(b)}var c=this.makeImageLoadHandler(b,f,a);b.complete?c():b.onload=c},this);b()}),dojo.hitch(this,function(a){404==a.status?b():this.fillBlockError(f,d,a);b()}))},startZoom:function(g,f,d){},endZoom:function(g,f){this.clear()},clear:function(){this.inherited(arguments)},transfer:function(g,f,d,e,c){if(g&&f){g=g.domNode.childNodes;d=f.startBase;e=f.endBase;for(var b=0;b<g.length;b++)c=g[b],"startBase"in c&&(c.startBase<e&&c.startBase+c.baseWidth>d)&&(c.style.left=
100*((c.startBase-d)/(e-d))+"%",f.domNode.appendChild(c))}}})})},"JBrowse/View/Track/Wiggle":function(){define(["JBrowse/View/Track/Wiggle/XYPlot"],function(k){return k})},"JBrowse/View/Track/Wiggle/XYPlot":function(){define("dojo/_base/declare dojo/_base/array dojo/_base/Color dojo/on JBrowse/View/Track/WiggleBase JBrowse/View/Track/_YScaleMixin JBrowse/Util ./_Scale".split(" "),function(k,l,h,g,f,d,e,c){return k([f,d],{_defaultConfig:function(){return e.deepUpdate(dojo.clone(this.inherited(arguments)),
{style:{pos_color:"blue",neg_color:"red",origin_color:"#888",variance_band_color:"rgba(0,0,0,0.3)"}})},_trackMenuOptions:function(){var b=this,a=this.inherited(arguments)||[];a.push({label:"No fill",type:"dijit/CheckedMenuItem",checked:!0==this.config.noFill,onClick:function(a){b.config.noFill=this.checked?!0:!1;b.browser.publish("/jbrowse/v1/v/tracks/replace",[b.config])}});return a},_getScaling:function(b,a,d){this._getScalingStats(b,dojo.hitch(this,function(b){if(!this.lastScaling||!this.lastScaling.sameStats(b)||
this.trackHeightChanged)b=new c(this.config,b),0.005>Math.abs(b.min/b.max)&&(b.min=0),this.makeYScale({fixBounds:!0,min:b.min,max:b.max}),b.min=this.ruler.scaler.bounds.lower,b.max=this.ruler.scaler.bounds.upper,b.range=b.max-b.min,this.lastScaling=b,this.trackHeightChanged=!1;a(this.lastScaling)}),d)},updateStaticElements:function(b){this.inherited(arguments);this.updateYScaleFromViewDimensions(b)},_drawFeatures:function(b,a,c,d,f,g,h){var k=this,l=f.getContext("2d"),u=f.height,v=e.getResolution(l,
this.browser.config.highResolutionMode),x=dojo.hitch(this,function(a){return u*(1-h.normalize(a))/v}),w=x(h.origin),y=this.config.disable_clip_markers;dojo.forEach(g,function(a,b){if(a){var c=x(a.score),d=a.feat;if(0<=c){var e=this.getConfForFeature("style.bg_color",d);e&&(l.fillStyle=e,k._fillRectMod(l,b,0,1,u))}if(c<=u||c>w)if(c<=w)l.fillStyle=this.getConfForFeature("style.pos_color",d),e=w-c+1,!0==this.getConfForFeature("noFill",d)&&(e=1),k._fillRectMod(l,b,c,1,e),!y&&0>c&&(l.fillStyle=this.getConfForFeature("style.clip_marker_color",
d)||this.getConfForFeature("style.neg_color",d),k._fillRectMod(l,b,0,1,3));else{l.fillStyle=this.getConfForFeature("style.neg_color",d);var f=w,e=c-w;!0==this.getConfForFeature("noFill",d)&&(f=c-1,e=1);k._fillRectMod(l,b,f,1,e);!y&&c>=u&&(l.fillStyle=this.getConfForFeature("style.clip_marker_color",d)||this.getConfForFeature("style.pos_color",d),k._fillRectMod(l,b,u-3,1,3))}}},this)},_maskBySpans:function(b,a,c,d,e,f,g,h){var k=e.getContext("2d"),l=e.height,v;for(v in h)if(h.hasOwnProperty(v)){var x=
Math.ceil((h[v].end-h[v].start)*b),w=Math.round((h[v].start-a)*b);k.clearRect(w,0,x,l)}k.globalAlpha=this.config.style.masked_transparancy||0.2;this.config.style.masked_transparancy=k.globalAlpha;this._drawFeatures(b,a,c,d,e,f,g)},_postDraw:function(b,a,c,d,f,g,k,p){var t=f.getContext("2d"),u=f.height,v=e.getResolution(t,this.browser.config.highResolutionMode),x=dojo.hitch(this,function(a){return u*(1-p.normalize(a))/v}),w=this;if(this.config.variance_band){var y="object"==typeof this.config.variance_band?
l.map(this.config.variance_band,function(a){return parseFloat(a)}).sort().reverse():[2,1];this.getGlobalStats(dojo.hitch(this,function(a){if("scoreMean"in a&&"scoreStdDev"in a){var b=function(b,c,d){t.fillStyle=c;c=x(a.scoreMean+b);var e=x(a.scoreMean-b)-c,e=Math.max(1,e);w._fillRectMod(t,0,c,f.width,e);t.font="12px sans-serif";0<b?(t.fillText("+"+d,2,c),t.fillText("-"+d,2,c+e)):t.fillText(d,2,c)},c=new h(this.config.style.variance_band_color),d=new h(this.config.style.variance_band_color);d.a/=y.length;
l.forEach(y,function(e,f){b(e*a.scoreStdDev,h.blendColors(d,c,(f+1)/y.length).toCss(!0),e+"\u03c3")});b(0,"rgba(255,255,0,0.7)","mean")}}))}b=this.config.style.origin_color;"string"==typeof b&&!{none:1,off:1,no:1,zero:1}[b]&&(a=x(p.origin),t.fillStyle=b,t.fillRect(0,a,f.width,1))}})})},"JBrowse/View/Track/WiggleBase":function(){define("dojo/_base/declare dojo/_base/array dojo/_base/lang dojo/_base/event dojo/dom-construct dojo/on dojo/mouse JBrowse/View/Track/BlockBased JBrowse/View/Track/_ExportMixin JBrowse/View/Track/_TrackDetailsStatsMixin JBrowse/View/Dialog/SetTrackHeight JBrowse/Util JBrowse/has ./Wiggle/_Scale".split(" "),
function(k,l,h,g,f,d,e,c,b,a,m,n,q,s){return k([c,b,a],{constructor:function(a){this.trackPadding=a.trackPadding||0;"style"in this.config||(this.config.style={});this.store=a.store;this._setupEventHandlers()},_defaultConfig:function(){return{maxExportSpan:5E5,autoscale:"global",logScaleOption:!0}},_setupEventHandlers:function(){var a=dojo.clone(this.config.events||{});if(!a.click&&(this.config.style||{}).linkTemplate)a.click={action:"newWindow",url:this.config.style.linkTemplate};var a=dojo.clone(a),
b;for(b in this.config){var c=b.replace(/^on(?=[A-Z])/,"");c!=b&&(a[c.toLowerCase()]=this.config[b])}for(b in a)"string"==typeof a[b]&&(a[b]={url:a[b]});this.eventHandlers=a;this.eventHandlers.click&&(this.eventHandlers.click=this._makeClickHandler(this.eventHandlers.click))},_getScaling:function(a,b,c){this._getScalingStats(a,dojo.hitch(this,function(a){if(!this.lastScaling||!this.lastScaling.sameStats(a))try{this.lastScaling=new s(this.config,a),b(this.lastScaling)}catch(d){c(d)}else b(this.lastScaling)}),
c)},_getScalingStats:function(a,b,c){if(s.prototype.needStats(this.config))return"local"==this.config.autoscale?(a=h.mixin({scale:a.scale},this.browser.view.visibleRegion()),a.start=Math.ceil(a.start),a.end=Math.floor(a.end),this.getRegionStats.call(this,a,b,c)):this.getGlobalStats.call(this,b,c);b(null);return null},getFeatures:function(a,b,c){this.store.getFeatures.apply(this.store,arguments)},getGlobalStats:function(a,b){this.store.getGlobalStats(a,b)},getRegionStats:function(a,b,c){this.store.getRegionStats(a,
b,c)},_canvasWidth:function(a){return Math.ceil((a.endBase-a.startBase)*a.scale)},_canvasHeight:function(){return parseInt((this.config.style||{}).height)||100},_getBlockFeatures:function(a){var b=this,c=a.block,d=a.leftBase,e=a.rightBase,f=a.scale,g=a.finishCallback||function(){},h=this._canvasWidth(a.block),k=[];this.getFeatures({ref:this.refSeq.name,basesPerSpan:1/f,scale:f,start:d,end:e+1},function(a){b.filterFeature(a)&&k.push(a)},dojo.hitch(this,function(a){if(c.domNode&&c.domNode.parentNode){var b=
l.map(k,function(a){return this._featureRect(f,d,h,a)},this);c.features=k;c.featureRects=b;c.pixelScores=this._calculatePixelScores(this._canvasWidth(c),k,b);a&&a.maskingSpans&&(c.maskingSpans=a.maskingSpans);g()}}),dojo.hitch(this,function(b){console.error(b.stack||""+b,b);this._handleError(b,a)}))},renderBlock:function(a){var b=a.block;if(this.scaling.compare(b.scaling)&&b.pixelScores){b.scaling=this.scaling;f.empty(b.domNode);try{dojo.create("canvas").getContext("2d").fillStyle="red"}catch(c){this.fatalError=
"This browser does not support HTML canvas elements.";this.fillBlockError(a.blockIndex,b,this.fatalError);return}var d=b.features,e=b.featureRects,g=this.scaling,h=this._canvasHeight(),h=dojo.create("canvas",{height:h,width:this._canvasWidth(b),style:{cursor:"default",height:h+"px",width:q("inaccurate-html-width")?"":"100%","min-width":q("inaccurate-html-width")?"100%":"","max-width":q("inaccurate-html-width")?"102%":""},innerHTML:"Your web browser cannot display this type of track.",className:"canvas-track"},
b.domNode),k=h.getContext("2d"),l=n.getResolution(k,this.browser.config.highResolutionMode);if("disabled"!=this.browser.config.highResolutionMode&&1<=l){var m=h.height;h.width=Math.round(h.width*l);h.height=Math.round(m*l);h.style.height=m+"px";k.scale(l,l)}h.startBase=b.startBase;b.canvas=h;k=this._calculatePixelScores(h.width,d,e);this._draw(b.scale,b.startBase,b.endBase,b,h,d,e,g,k,b.maskingSpans);this.heightUpdate(h.height/l,a.blockIndex);if(!h.parentNode||!h.parentNode.parentNode)switch(a=b.endBase-
b.startBase,h.style.position="absolute",h.style.left=100*((h.startBase-b.startBase)/a)+"%",this.config.align){case "top":h.style.top="0px";break;default:h.style.bottom=this.trackPadding+"px"}}},fillBlock:function(a){var b=this;this.heightUpdate(this._canvasHeight(),a.blockIndex);var c=a.finishCallback||function(){};a.finishCallback=function(){b.updateGraphs(a,c)};this._getBlockFeatures(a)},updateGraphs:function(a,b){var c=this;this._getScaling(a,function(a){c.scaling=a;l.forEach(c.blocks,function(a,
b){a&&a.domNode.parentNode&&c.renderBlock({block:a,blockIndex:b})});b()},function(b){c._handleError(b,a)})},_draw:function(a,b,c,d,e,f,g,h,k,l){this._preDraw(a,b,c,d,e,f,g,h);this._drawFeatures(a,b,c,d,e,k,h);l&&this._maskBySpans(a,b,c,d,e,k,h,l);this._postDraw(a,b,c,d,e,f,g,h)},startZoom:function(a,b,c){},endZoom:function(a,b){this.clear()},_featureRect:function(a,b,c,d){a={w:Math.ceil((d.get("end")-d.get("start"))*a),l:Math.round((d.get("start")-b)*a)};0>a.l&&(a.w+=a.l,a.l=0);a.w=Math.min(c-a.l,
a.w);a.r=a.w+a.l;return a},_preDraw:function(a){},_drawFeatures:function(a,b,c,d,e,f,g){},_maskBySpans:function(a,b,c,d,e){},_postDraw:function(){},_calculatePixelScores:function(a,b,c){var d=this.config.scoreType,e=Array(a);if(!d||"maxScore"==d){dojo.forEach(b,function(a,b){for(var f=a.source,g=c[b],h=g.r,k=a.get(d)||a.get("score"),g=Math.round(g.l);g<h;g++)e[g]&&e[g].lastUsedStore==f?e[g].score=Math.max(e[g].score,k):e[g]?(e[g].score+=k,e[g].lastUsedStore=f):e[g]={score:k,lastUsedStore:f,feat:a}},
this);for(a=0;a<e.length;a++)e[a]&&delete e[a].lastUsedStore}else if("avgScore"==d){dojo.forEach(b,function(a,b){for(var d=a.source,f=c[b],g=f.r,h=a.get("score"),f=Math.round(f.l);f<g;f++)e[f]&&d in e[f].scores?e[f].scores[d].push(h):(e[f]||(e[f]={scores:{},feat:a}),e[f].scores[d]=[h])},this);for(a=0;a<e.length;a++)if(e[a]){e[a].score=0;for(var f in e[a].scores){var g=0,h=e[a].scores[f].length;for(b=0;b<h;b++)g+=e[a].scores[f][b];e[a].score+=g/h}delete e[a].scores}}return e},setViewInfo:function(){this.inherited(arguments);
this._makeScoreDisplay()},_makeScoreDisplay:function(){var a=this.browser.view,b=this;this._mouseoverEvent||(this._mouseoverEvent=this.own(d(this.div,"mousemove",function(c){c=g.fix(c);var d=a.absXtoBp(c.clientX);b.mouseover(d,c)}))[0]);this._mouseoutEvent||(this._mouseoutEvent=this.own(d(this.div,e.leave,function(a){b.mouseover(void 0)}))[0]);b.eventHandlers.click&&!this._mouseClickEvent&&(this._mouseClickEvent=this.own(d(this.div,"click",b.eventHandlers.click))[0]);this.scoreDisplay||(this.scoreDisplay=
{flag:dojo.create("div",{className:"wiggleValueDisplay",style:{position:"fixed",display:"none",zIndex:15}},this.div),pole:dojo.create("div",{className:"wigglePositionIndicator",style:{position:"fixed",display:"none",zIndex:15}},this.div)})},mouseover:function(a,b){if(void 0===a)this.scoreDisplay.flag.style.display="none",this.scoreDisplay.pole.style.display="none";else{var c;l.some(this.blocks,function(b){return b&&b.startBase<=a&&b.endBase>=a?(c=b,!0):!1});if(c&&c.canvas&&c.pixelScores&&b){var d=
c.pixelScores,e=dojo.position(c.canvas);this._showPixelValue(this.scoreDisplay.flag,d[Math.round(b.pageX-e.x)])&&(this.scoreDisplay.flag.style.display="block",this.scoreDisplay.pole.style.display="block",this.scoreDisplay.flag.style.left=b.clientX+"px",this.scoreDisplay.flag.style.top=e.y+"px",this.scoreDisplay.pole.style.left=b.clientX+"px",this.scoreDisplay.pole.style.height=e.h+"px")}}},_showPixelValue:function(a,b){return"number"==typeof b?(a.innerHTML=parseFloat(b.toPrecision(6)),!0):b&&"number"==
typeof b.score?(a.innerHTML=parseFloat(b.score.toPrecision(6)),!0):!1},_exportFormats:function(){return[{name:"bedGraph",label:"bedGraph",fileExt:"bedgraph"},{name:"Wiggle",label:"Wiggle",fileExt:"wig"},{name:"GFF3",label:"GFF3",fileExt:"gff3"}]},_trackMenuOptions:function(){var a=this,b=this.inherited(arguments)||[];b.push({label:"Change height",iconClass:"jbrowseIconVerticalResize",action:function(){(new m({height:a._canvasHeight(),setCallback:function(b){a.trackHeightChanged=!0;a.updateUserStyles({height:b})}})).show()}});
this.config.logScaleOption&&b.push({label:"Log scale",type:"dijit/CheckedMenuItem",checked:"log"==this.config.scale,onClick:function(b){a.config.scale=this.checked?"log":"linear";a.browser.publish("/jbrowse/v1/v/tracks/replace",[a.config])}});return b},_fillRectMod:function(a,b,c,d,e){var f=window.devicePixelRatio||1,g=d;"disabled"!=this.browser.config.highResolutionMode&&0<f-Math.floor(f)&&(g=d+0.3);a.fillRect(b,c,g,e)}})})},"JBrowse/View/Track/Wiggle/_Scale":function(){define(["dojo/_base/lang",
"JBrowse/Util","JBrowse/Digest/Crc32"],function(k,l,h){return l.fastDeclare({needStats:function(g){return!("min_score"in g&&"max_score"in g&&"z_score"!=g.bicolor_pivot&&"mean"!=g.bicolor_pivot&&"z_score"!=g.scale)},constructor:function(g,f){var d=this.needStats(g);if(d&&!f)throw"No stats object provided, cannot calculate scale";d&&f.scoreMin==f.scoreMax&&(f=k.mixin({},f),0>f.scoreMin?f.scoreMax=0:f.scoreMin=0);if("z_score"==g.autoscale&&!g.scale||"z_score"==g.scale&&!g.autoscale)g.scale="z_score",
g.autoscale="z_score";var e=parseFloat(g.z_score_bound)||4,c="min_score"in g?parseFloat(g.min_score):function(){switch(g.autoscale){case "z_score":return Math.max(-e,(f.scoreMin-f.scoreMean)/f.scoreStdDev);case "global":case "local":return f.scoreMin;default:return Math.max(f.scoreMin,f.scoreMean-e*f.scoreStdDev)}}(),b="max_score"in g?parseFloat(g.max_score):function(){switch(g.autoscale){case "z_score":return Math.min(e,(f.scoreMax-f.scoreMean)/f.scoreStdDev);case "global":case "local":return f.scoreMax;
default:return Math.min(f.scoreMax,f.scoreMean+e*f.scoreStdDev)}}();if("number"!=typeof c||isNaN(c))c=0;if("number"!=typeof b||isNaN(b))b=c+10;var a=parseFloat(g.data_offset)||0;"log"==g.scale?(b=this.log(b+a),c=this.log(c+a)):(b+=a,c+=a);var l="bicolor_pivot"in g?"mean"==g.bicolor_pivot?f.scoreMean||0:"zero"==g.bicolor_pivot?0:parseFloat(g.bicolor_pivot):"z_score"==g.scale?f.scoreMean||0:"log"==g.scale?1:0;k.mixin(this,{offset:a,min:c,max:b,range:b-c,origin:l,_statsFingerprint:h.objectFingerprint(f)});
d&&(this.scoreMean=f.scoreMean,this.scoreStdDev=f.scoreStdDev);this.normalize=function(a){switch(a.scale){case "z_score":return function(a){return(a+this.offset-this.scoreMean)/this.scoreStdDev-this.min/this.range};case "log":return function(a){return(this.log(a+this.offset)-this.min)/this.range};default:return function(a){return(a+this.offset-this.min)/this.range}}}(g)},log:function(g){return g?Math.log(Math.abs(g))*(0>g?-1:1):0},compare:function(g){return!g?1:this.offset-g.offset||this.min-g.min||
this.max-g.max||this.range-g.range||this.origin-g.origin},sameStats:function(g){return this._statsFingerprint==h.objectFingerprint(g)}})})},"JBrowse/View/Track/Wiggle/Density":function(){define(["dojo/_base/declare","dojo/_base/array","dojo/_base/Color","JBrowse/View/Track/WiggleBase","JBrowse/Util"],function(k,l,h,g,f){return k(g,{_defaultConfig:function(){return f.deepUpdate(dojo.clone(this.inherited(arguments)),{maxExportSpan:5E5,style:{height:31,pos_color:"#00f",neg_color:"#f00",bg_color:"rgba(230,230,230,0.6)",
clip_marker_color:"black"}})},_drawFeatures:function(d,e,c,b,a,f,g){var k=this,l=a.getContext("2d"),r=a.height,p="function"==typeof this.config.style.color?this.config.style.color:function(){var a=k.config.disable_clip_markers,b=g.normalize(g.origin);return function(c,d){var e=c.feat;return a||1>=d&&0<=d?h.blendColors(new h(k.getConfForFeature("style.bg_color",e)),new h(k.getConfForFeature(d>=b?"style.pos_color":"style.neg_color",e)),Math.abs(d-b)).toString():1<d?k.getConfForFeature("style.pos_color",
e):k.getConfForFeature("style.neg_color",e)}}();dojo.forEach(f,function(a,b){if(a){var c=a.feat,d=g.normalize(a.score);l.fillStyle=""+p(a,d);k._fillRectMod(l,b,0,1,r);1<d?(l.fillStyle=k.getConfForFeature("style.clip_marker_color",c)||"red",k._fillRectMod(l,b,0,1,3)):0>d&&(l.fillStyle=k.getConfForFeature("style.clip_marker_color",c)||"red",k._fillRectMod(l,b,r-3,1,3))}})},_maskBySpans:function(d,e,c,b,a,f,g,h){var k=a.getContext("2d"),l=a.height;k.fillStyle=this.config.style.mask_color||"rgba(128,128,128,0.6)";
this.config.style.mask_color=k.fillStyle;for(var p in h)h.hasOwnProperty(p)&&(c=Math.ceil((h[p].end-h[p].start)*d),b=Math.round((h[p].start-e)*d),k.fillRect(b,0,c,l),k.clearRect(b,0,c,l/3),k.clearRect(b,2/3*l,c,l/3));dojo.forEach(f,function(a,b){a||k.clearRect(b,0,1,l)})},_postDraw:function(){}})})},"JBrowse/View/Track/Alignments":function(){define("dojo/_base/declare dojo/_base/array dojo/promise/all JBrowse/Util JBrowse/View/Track/HTMLFeatures JBrowse/View/Track/_AlignmentsMixin".split(" "),function(k,
l,h,g,f,d){return k([f,d],{_defaultConfig:function(){return g.deepUpdate(dojo.clone(this.inherited(arguments)),{maxFeatureScreenDensity:1.5,layoutPitchY:4,hideDuplicateReads:!0,hideQCFailingReads:!0,hideSecondary:!0,hideSupplementary:!0,hideMissingMatepairs:!1,hideUnmapped:!0,hideForwardStrand:!1,hideReverseStrand:!1,style:{_defaultLabelScale:50,className:"alignment",arrowheadClass:"arrowhead",centerChildrenVertically:!0,showMismatches:!0,showSubfeatures:!1,showLabels:!1}})},renderFeature:function(d,
c,b,a,f,g,h,k){var l=this.inherited(arguments);if(!l)return null;var p=Math.max(d.get("start"),h),t=Math.min(d.get("end"),k);this.config.style.showMismatches&&this._drawMismatches(d,l,a,p,t);d.get("multi_segment_template")&&!d.get("multi_segment_all_aligned")&&(l.className+=" missing_mate");return l},handleSubFeatures:function(d,c,b,a,f){this.config.style.showSubfeatures&&this.inherited(arguments)},_drawMismatches:function(d,c,b,a,f){var g=f-a;if(1<g*b){var h=this._getMismatches(d),k=this.getCharacterMeasurements(),
r=b>=k.w;l.forEach(h,function(h){var k=d.get("start")+h.start,l=k+h.length;if(!(l<=a||k>=f)){var q=h.base,s=Math.max(k,a),l=Math.min(l,f),w=l-s,y=dojo.create("span",{className:h.type+" base_"+q.toLowerCase(),style:{position:"absolute",left:100*(s-a)/g+"%",width:1<b*w?100*w/g+"%":"1px"}},c);r||(y.title=q);if(r&&20>=h.length)for(var z=0;z<h.length;z++){var A=k+z;A>=s&&A<=l&&dojo.create("span",{className:"base base_"+q.toLowerCase(),style:{position:"absolute",width:b+"px",left:100*((A-s)/w)+"%"},innerHTML:q},
y)}}},this)}},getCharacterMeasurements:function(){this._measurements||(this._measurements=this._measureSequenceCharacterSize(this.div));return this._measurements},_measureSequenceCharacterSize:function(d){var c=dojo.create("div",{innerHTML:'\x3cspan class\x3d"base mismatch"\x3eA\x3c/span\x3e\x3cspan class\x3d"base mismatch"\x3eC\x3c/span\x3e\x3cspan class\x3d"base mismatch"\x3eT\x3c/span\x3e\x3cspan class\x3d"base mismatch"\x3eG\x3c/span\x3e\x3cspan class\x3d"base mismatch"\x3eN\x3c/span\x3e',style:{visibility:"hidden",
position:"absolute",left:"0px"}},d),b={w:c.clientWidth/5,h:c.clientHeight};d.removeChild(c);return b},_trackMenuOptions:function(){return h([this.inherited(arguments),this._alignmentsFilterTrackMenuOptions()]).then(function(d){var c=d.shift();d.unshift({type:"dijit/MenuSeparator"});return c.concat.apply(c,d)})}})})},"JBrowse/View/Track/_AlignmentsMixin":function(){define("dojo/_base/declare dojo/_base/array dojo/_base/lang dojo/when JBrowse/Util JBrowse/Store/SeqFeature/_MismatchesMixin JBrowse/View/Track/_NamedFeatureFiltersMixin".split(" "),
function(k,l,h,g,f,d,e){return k([d,e],{defaultFeatureDetail:function(c,b,a){var d=dojo.create("div",{className:"detail feature-detail feature-detail-"+c.name.replace(/\s+/g,"_").toLowerCase(),innerHTML:""}),e=dojo.hitch(this,function(a,b,c){a=f.ucFirst(a.replace(/_/g," "));return this.renderDetailField(d,a,b,c)});e("Name",b.get("name"),b);e("Type",b.get("type"),b);e("Score",b.get("score"),b);e("Description",b.get("note"),b);e("Position",f.assembleLocString({start:b.get("start"),end:b.get("end"),
ref:this.refSeq.name})+({1:" (+)","-1":" (-)","0":" (no strand)"}[b.get("strand")]||""),b);b.get("seq")&&e("Sequence and Quality",this._renderSeqQual(b),b);var g=l.filter(b.tags(),function(a){return!{name:1,score:1,start:1,end:1,strand:1,note:1,subfeatures:1,type:1}[a.toLowerCase()]}).sort();dojo.forEach(g,function(a){e(a,b.get(a),b)});(this.config.renderAlignment||this.config.renderPrettyAlignment)&&this._renderTable(d,c,b,a);return d},_renderSeqQual:function(c){var b=c.get("seq");c=c.get("qual")||
"";if(!b)return"";c=c.split(/\s+/);for(var a="",d=0;d<b.length;d++)a+='\x3cdiv class\x3d"basePosition" title\x3d"position '+(d+1)+'"\x3e\x3cspan class\x3d"seq"\x3e'+b[d]+"\x3c/span\x3e",c[d]&&(a+='\x3cspan class\x3d"qual"\x3e'+c[d]+"\x3c/span\x3e"),a+="\x3c/div\x3e";return'\x3cdiv class\x3d"baseQuality"\x3e'+a+"\x3c/div\x3e"},_getStyleSheets:function(c){var b=[];l.forEach(c,function(a){b.push(a);l.forEach(a.cssRules||a.rules,function(a){a.styleSheet&&b.push.apply(b,this._getStyleSheets([a.styleSheet]))},
this)},this);return b},colorForBase:function(c){this._baseStyles=this._baseStyles||function(){var b={};try{var a=this._getStyleSheets(document.styleSheets);l.forEach(a,function(a){(a=a.rules||a.cssRules)&&l.forEach(a,function(a){var c=/^\.base_([^\s_]+)$/.exec(a.selectorText);if(c&&c[1]){var d=c[1];if((c=/\#[0-9a-f]{3,6}|(?:rgb|hsl)a?\([^\)]*\)/gi.exec(a.cssText))&&c[0])b[d.toLowerCase()]=c[0],b[d.toUpperCase()]=c[0]}})})}catch(c){}return b}.call(this);return this._baseStyles[c]||"#999"},_getNamedFeatureFilters:function(){return h.mixin({},
this.inherited(arguments),{hideDuplicateReads:{desc:"Hide PCR/Optical duplicate reads",func:function(c){return!c.get("duplicate")}},hideQCFailingReads:{desc:"Hide reads failing vendor QC",func:function(c){return!c.get("qc_failed")}},hideSecondary:{desc:"Hide secondary alignments",func:function(c){return!c.get("secondary_alignment")}},hideSupplementary:{desc:"Hide supplementary alignments",func:function(c){return!c.get("supplementary_alignment")}},hideMissingMatepairs:{desc:"Hide reads with missing mate pairs",
func:function(c){return!(c.get("multi_segment_template")&&!c.get("multi_segment_all_aligned"))}},hideUnmapped:{desc:"Hide unmapped reads",func:function(c){return!c.get("unmapped")}},hideForwardStrand:{desc:"Hide reads aligned to the forward strand",func:function(c){return 1!=c.get("strand")}},hideReverseStrand:{desc:"Hide reads aligned to the reverse strand",func:function(c){return-1!=c.get("strand")}}})},_alignmentsFilterTrackMenuOptions:function(){var c=this;return g(this._getNamedFeatureFilters()).then(function(b){return c._makeFeatureFilterTrackMenuItems("hideDuplicateReads hideQCFailingReads hideMissingMatepairs hideSecondary hideSupplementary hideUnmapped SEPARATOR hideForwardStrand hideReverseStrand".split(" "),
b)})},_renderTable:function(c,b,a,d){if(a.get(this.config.mdAttribute||"md")){var e=b._getMismatches(a),f=a.get("seq"),g=a.get("start");d=b=a="";var h=0,k=0,l=0;e.sort(function(a,b){return a.start-b.start});for(var u=0;l<f.length;u++){for(var v=!1,x=[],w=h;w<e.length;w++){var y=e[w];k==y.start&&x.push(y)}x.sort(function(a,b){return"insertion"==a.type?-1:"deletion"==a.type?1:"mismatch"==a.type?1:"skip"==a.type?1:0});for(w=0;w<x.length;w++)if(y=x[w],h++,"softclip"==y.type){for(v=0;v<y.cliplen;v++)a+=
f[l+v],b+=" ",d+=".";l+=y.cliplen;v=!0}else if("insertion"==y.type){for(v=0;v<+y.base;v++)a+=f[l+v],b+=" ",d+="-";l+=+y.base;v=!0}else if("deletion"==y.type){for(v=0;v<y.length;v++)a+="-",b+=" ",d+=(y.seq||{})[v]||".";k+=y.length;v=!0}else if("skip"==y.type){for(v=0;v<Math.min(y.length,1E4);v++)a+=".",b+=" ",d+="N";k+=y.length;v=!0}else"mismatch"==y.type&&(a+=y.base,b+=" ",d+=y.altbase,l++,k++,v=!0);v||(a+=f[l],b+="|",d+=f[l],k++,l++)}if(this.config.renderPrettyAlignment){f=h=k=l="";x=0;e=e.length&&
"softclip"==e[0].type?g-e[0].cliplen:g;g=this.config.renderAlignmentWidth||50;for(u=0;u<a.length;u+=g)f=a.substring(u,u+g),h=b.substring(u,u+g),k=d.substring(u,u+g),y=e.toString().replace(/./g," "),v=f.length-(f.match(/[-N\.]/g)||[]).length,w=k.length-(k.match(/[-]/g)||[]).length,l+="Query    "+this.pad(y,x,!0)+": "+f+" "+(x+v)+"\x3cbr\x3e",l+="         "+y+"  "+h+"   \x3cbr\x3e",l+="Ref:     "+e+": "+k+" "+(e+w)+"  \x3cbr\x3e\x3cbr\x3e",x+=v,e+=w;dojo.create("div",{className:"renderTable",innerHTML:'\x3ch2 class\x3d"sectiontitle"\x3eMatches\x3c/h2\x3e\x3cdiv style\x3d"font-family: Courier; white-space: pre;"\x3e'+
l+"\x3c/div\x3e"},c)}else this.config.renderAlignment&&dojo.create("div",{className:"renderTable",innerHTML:'\x3ch2 class\x3d"sectiontitle"\x3eMatches\x3c/h2\x3e\x3cdiv style\x3d"font-family: Courier; white-space: pre;"\x3eQuery: '+a+"   \x3cbr\x3e       "+b+"   \x3cbr\x3eRef:   "+d+"   \x3c/div\x3e"},c);return{val1:a,val2:b,val3:d}}dojo.create("div",{className:"renderTable",innerHTML:'\x3ch2 class\x3d"sectiontitle"\x3eMatches\x3c/h2\x3e\x3cdiv style\x3d"font-family: Courier; white-space: pre;"\x3eNo MD tag present\x3c/div\x3e'},
c)},pad:function(c,b,a){return"undefined"===typeof b?c:a?(c+b).slice(-c.length):(b+c).substring(0,c.length)}})})},"JBrowse/Store/SeqFeature/_MismatchesMixin":function(){define(["dojo/_base/declare","dojo/_base/array"],function(k,l){return k(null,{constructor:function(){this.cigarAttributeName=(this.config.cigarAttribute||"cigar").toLowerCase();this.mdAttributeName=(this.config.mdAttribute||"md").toLowerCase()},_getSkipsAndDeletions:function(h){var g=h.get(this.cigarAttributeName);return g?this._cigarToSkipsAndDeletions(h,
this._parseCigar(g)):[]},_getMismatches:function(h){var g=[];if(this.config.cacheMismatches&&h.mismatches)return h.mismatches;var f=h.get(this.cigarAttributeName),d;f&&(d=this._parseCigar(f),g.push.apply(g,this._cigarToMismatches(h,d)));if(f=h.get(this.mdAttributeName))this.config.renderAlignment&&(g=l.filter(g,function(c){return!("deletion"==c.type||"mismatch"==c.type)})),g.push.apply(g,this._mdToMismatches(h,f,d,g));var e={},g=l.filter(g,function(c){c=c.type+","+c.start+","+c.length;var b=e[c];
e[c]=!0;return!b});this.config.cacheMismatches&&(h.mismatches=g);return g},_parseCigar:function(h){return l.map(h.toUpperCase().match(/\d+\D/g),function(g){return[g.match(/\D/)[0],parseInt(g)]})},_cigarToMismatches:function(h,g){var f=0,d=[];l.forEach(g,function(e){var c=e[0];e=e[1];"I"==c?d.push({start:f,type:"insertion",base:""+e,length:1}):"D"==c?d.push({start:f,type:"deletion",base:"*",length:e}):"N"==c?d.push({start:f,type:"skip",base:"N",length:e}):"X"==c?d.push({start:f,type:"mismatch",base:"X",
length:e}):"H"==c?d.push({start:f,type:"hardclip",base:"H"+e,length:1}):"S"==c&&d.push({start:f,type:"softclip",base:"S"+e,cliplen:e,length:1});"I"!=c&&("S"!=c&&"H"!=c)&&(f+=e)});return d},_cigarToSkipsAndDeletions:function(h,g){var f=0,d=[];l.forEach(g,function(e){var c=e[0];e=e[1];"D"==c?d.push({start:f,type:"deletion",base:"*",length:e}):"N"==c&&d.push({start:f,type:"skip",base:"N",length:e});"I"!=c&&("S"!=c&&"H"!=c)&&(f+=e)});return d},_mdToMismatches:function(h,g,f,d){function e(a,b){for(var c=
0,d=0,e=0;e<b.length&&d<=a;e++){var f=b[e][0],g=b[e][1];"S"==f||"I"==f?c+=g:("D"==f||"P"==f||(c+=g),d+=g)}return c-(d-a)}function c(){l.forEach(d||[],function(b){"skip"==b.type&&a.start>=b.start&&(a.start+=b.length)});b.push(a);a={start:a.start+a.length,length:0,base:"",type:"mismatch"}}var b=[],a={start:0,base:"",length:0,type:"mismatch"},k=h.get("seq");l.forEach(g.match(/(\d+|\^[a-z]+|[a-z])/ig),function(b){if(b.match(/^\d/))a.start+=parseInt(b);else if(b.match(/^\^/))a.length=b.length-1,a.base=
"*",a.type="deletion",a.seq=b.substring(1),c();else if(b.match(/^[a-z]/i))for(var d=0;d<b.length;d++)a.length=1,a.base=k?k.substr(f?e(a.start,f):a.start,1):"X",a.altbase=b,c()});return b}})})},"JBrowse/View/Track/_NamedFeatureFiltersMixin":function(){define(["dojo/_base/declare","dojo/_base/array","dojo/when"],function(k,l,h){return k(null,{constructor:function(){this._initializeConfiguredFeatureFilters()},_initializeConfiguredFeatureFilters:function(){var g=this;return h(this._getNamedFeatureFilters()).then(function(f){for(var d in f)g.config[d]?
g.addFeatureFilter(f[d].func,d):g.removeFeatureFilter(d)})},_toggleFeatureFilter:function(g,f){void 0===f&&(f=!this.config[g]);if(!!f!==!!this.config[g]){this.config[g]=f;var d=this;h(this._getNamedFeatureFilters(),function(e){f?d.addFeatureFilter(e[g].func,g):d.removeFeatureFilter(g);d.changed()})}},_getNamedFeatureFilters:function(){return{}},_makeFeatureFilterTrackMenuItems:function(g,f){var d=this;return h(f||this._getNamedFeatureFilters()).then(function(e){return l.map(g,function(c){return d._makeFeatureFilterTrackMenuItem(c,
e[c])})})},_makeFeatureFilterTrackMenuItem:function(g,f){var d=this;return"SEPARATOR"==g?{type:"dijit/MenuSeparator"}:{label:f.desc,title:f.title,type:"dijit/CheckedMenuItem",checked:!!d.config[g],onClick:function(e){d._toggleFeatureFilter(g,this.checked)}}}})})},"JBrowse/View/Track/Alignments2":function(){define("dojo/_base/declare dojo/_base/array dojo/promise/all JBrowse/Util JBrowse/View/Track/CanvasFeatures JBrowse/View/Track/_AlignmentsMixin".split(" "),function(k,l,h,g,f,d){return k([f,d],
{_defaultConfig:function(){var d=g.deepUpdate(dojo.clone(this.inherited(arguments)),{glyph:"JBrowse/View/FeatureGlyph/Alignment",maxFeatureGlyphExpansion:0,maxFeatureScreenDensity:6,hideDuplicateReads:!0,hideQCFailingReads:!0,hideSecondary:!0,hideSupplementary:!0,hideUnmapped:!0,hideMissingMatepairs:!1,hideForwardStrand:!1,hideReverseStrand:!1,useXS:!1,useReverseTemplate:!1,useXSOption:!0,useReverseTemplateOption:!0,histograms:{description:"coverage depth",binsPerBlock:200},style:{showLabels:!1}});
d.menuTemplate.push({iconClass:"dijitIconUndo",url:function(c,b){return c.browser.makeCurrentViewURL({loc:c._nextSegmentViewLoc(b,0.8),highlight:b.get("next_segment_position"),tracklist:0})},action:"iframeDialog",title:"Open {next_segment_position} in a popup",disabled:function(c,b){return!b.get("next_segment_position")},label:"Quick-view mate/next location"},{iconClass:"dijitIconUndo",url:function(c,b){return c.browser.makeCurrentViewURL({loc:c._nextSegmentViewLoc(b),highlight:b.get("next_segment_position")})},
action:"newWindow",title:"Open {next_segment_position} in a new tab",disabled:function(c,b){return!b.get("next_segment_position")},label:"Open mate/next location in new tab"});return d},_nextSegmentViewLoc:function(d,c){var b=d.get("next_segment_position");if(b){var a=b.split(":"),b=a[0],a=parseInt(a[1]),f=this.browser.view.visibleRegion(),f=Math.round((f.end-f.start+1)*(c||1));return g.assembleLocString({start:Math.round(a-f/2),end:Math.round(a+f/2),ref:b})}},_trackMenuOptions:function(){var d=this,
c=[];this.config.useReverseTemplateOption&&c.push({label:"Use reversed template",type:"dijit/CheckedMenuItem",checked:this.config.useReverseTemplate,onClick:function(b){d.config.useReverseTemplate=this.get("checked");d.browser.publish("/jbrowse/v1/v/tracks/replace",[d.config])}});this.config.useXSOption&&c.push({label:"Use XS",type:"dijit/CheckedMenuItem",checked:this.config.useXS,onClick:function(b){d.config.useXS=this.get("checked");d.browser.publish("/jbrowse/v1/v/tracks/replace",[d.config])}});
return h([this.inherited(arguments),this._alignmentsFilterTrackMenuOptions(),c]).then(function(b){var a=b.shift();b.unshift({type:"dijit/MenuSeparator"});return a.concat.apply(a,b)})}})})},"JBrowse/View/Track/CanvasFeatures":function(){define("dojo/_base/declare dojo/_base/array dojo/_base/lang dojo/_base/event dojo/mouse dojo/dom-construct dojo/Deferred dojo/on JBrowse/has JBrowse/Util JBrowse/View/GranularRectLayout JBrowse/View/Track/BlockBased JBrowse/View/Track/_ExportMixin JBrowse/Errors JBrowse/View/Track/_FeatureDetailMixin JBrowse/View/Track/_FeatureContextMenusMixin JBrowse/View/Track/_YScaleMixin JBrowse/Model/Location JBrowse/Model/SimpleFeature".split(" "),
function(k,l,h,g,f,d,e,c,b,a,m,n,q,s,r,p,t,u,v){var x=k(null,{constructor:function(a){this.dims={h:a.h,w:a.w};this.byID={}},getByID:function(a){return this.byID[a]},addAll:function(a){var b=this.byID;l.forEach(a,function(a){a&&(b[a.f.id()]=a)},this)},getAll:function(){var a=[],b;for(b in this.byID)a.push(this.byID[b]);return a}});return k([n,r,q,p,t],{constructor:function(a){this.glyphsLoaded={};this.glyphsBeingLoaded={};this.regionStats={};this.showLabels=this.config.style.showLabels;this.showTooltips=
this.config.style.showTooltips;this.displayMode=this.config.displayMode;if(a=this.browser.cookie("track-"+this.name))this.displayMode=a;this._setupEventHandlers()},_defaultConfig:function(){return a.deepUpdate(h.clone(this.inherited(arguments)),{maxFeatureScreenDensity:0.5,glyph:h.hitch(this,"guessGlyphType"),maxFeatureGlyphExpansion:500,maxHeight:600,histograms:{description:"feature density",min:0,height:100,color:"goldenrod",clip_marker_color:"red"},style:{_defaultHistScale:4,_defaultLabelScale:30,
_defaultDescriptionScale:120,showLabels:!0,showTooltips:!0,label:"name,id",description:"note, description"},displayMode:"normal",events:{contextmenu:function(a,b,c,d,e){e=g.fix(e);b&&b.contextMenu&&b.contextMenu._openMyself({target:c.featureCanvas,coords:{x:e.pageX,y:e.pageY}});g.stop(e)}},menuTemplate:[{label:"View details",title:"{type} {name}",action:"contentDialog",iconClass:"dijitIconTask",content:dojo.hitch(this,"defaultFeatureDetail")},{label:function(){return"Zoom to this "+(this.feature.get("type")||
"feature")},action:function(){var a=this.track.refSeq,b=Math.round(10/this.viewInfo.scale),c=Math.max(a.start,this.feature.get("start")-b),b=Math.min(a.end,this.feature.get("end")+b);this.track.genomeView.setLocation(a,c,b)},iconClass:"dijitIconConnector"},{label:function(){return"Highlight this "+(this.feature.get("type")||"feature")},action:function(){var a=new u({feature:this.feature,tracks:[this.track]});this.track.browser.setHighlightAndRedraw(a)},iconClass:"dijitIconFilter"}]})},setViewInfo:function(a,
b,c,e,f,g,h){this.inherited(arguments);this.staticCanvas=d.create("canvas",{style:{height:"100%",cursor:"default",position:"absolute",zIndex:15}},e);this.staticCanvas.height=this.staticCanvas.offsetHeight;this._makeLabelTooltip()},guessGlyphType:function(a){return"JBrowse/View/FeatureGlyph/"+({gene:"Gene",mRNA:"ProcessedTranscript",transcript:"ProcessedTranscript"}[a.get("type")]||"Box")},fillBlock:function(a){var c=a.blockIndex,d=a.block,e=a.scale;if(b("canvas")){var f=h.hitch(this,function(b){b=
h.mixin({stats:b,displayMode:this.displayMode,showFeatures:e>=(this.config.style.featureScale||(b.featureDensity||0)/this.config.maxFeatureScreenDensity),showLabels:this.showLabels&&"normal"==this.displayMode&&e>=(this.config.style.labelScale||(b.featureDensity||0)*this.config.style._defaultLabelScale),showDescriptions:this.showLabels&&"normal"==this.displayMode&&e>=(this.config.style.descriptionScale||(b.featureDensity||0)*this.config.style._defaultDescriptionScale)},a);b.showFeatures?(this.setLabel(this.key),
this.removeYScale(),this.fillFeatures(b)):this.config.histograms.store||this.store.getRegionFeatureDensities?this.fillHistograms(b):(this.setLabel(this.key),this.fillTooManyFeaturesMessage(c,d,e),a.finishCallback())});this.store.getGlobalStats(f,dojo.hitch(this,function(b){this._handleError(b,a);a.finishCallback(b)}))}else this.fatalError="This browser does not support HTML canvas elements.",this.fillBlockError(c,d,this.fatalError)},_handleError:function(a,b){"object"==typeof a&&a instanceof s.DataOverflow&&
(this.config.histograms.store||this.store.getRegionFeatureDensities)?this.fillHistograms(b):this.inherited(arguments)},_getLayout:function(a){if(!this.layout||this._layoutpitchX!=4/a){var b=this.getConf("layoutPitchY")||4;this.layout=new m({pitchX:4/a,pitchY:b,maxHeight:this.getConf("maxHeight"),displayMode:this.displayMode});this._layoutpitchX=4/a}return this.layout},_clearLayout:function(){delete this.layout},hideAll:function(){this._clearLayout();return this.inherited(arguments)},getGlyph:function(a,
b,c,d){var e=this.getConfForFeature("glyph",b),f;if(f=this.glyphsLoaded[e])c(f);else if(a=this.glyphsBeingLoaded[e])a.push(c);else{var g=this;this.glyphsBeingLoaded[e]=[c];require([e],function(a){f=g.glyphsLoaded[e]=new a({track:g,config:g.config,browser:g.browser});l.forEach(g.glyphsBeingLoaded[e],function(a){a(f)});delete g.glyphsBeingLoaded[e]})}},fillHistograms:function(a){this.config.histograms.description?this.setLabel(this.key+' \x3cspan class\x3d"feature-density"\x3e('+this.config.histograms.description+
")\x3c/span\x3e"):this.setLabel(this.key);var b=this.config.histograms.binsPerBlock||25,b=Math.abs(a.rightBase-a.leftBase)/b,c={ref:this.refSeq.name,start:a.leftBase,end:a.rightBase,basesPerSpan:b,basesPerBin:b};if(!this.config.histograms.store&&this.store.getRegionFeatureDensities)this.store.getRegionFeatureDensities(c,h.hitch(this,"_drawHistograms",a));else{var d=this,e={features:[],stats:{}},f=h.hitch(this,"_handleError");this.browser.getStore(this.config.histograms.store,function(b){b.getGlobalStats(function(g){e.stats.max=
g.scoreMax;b.getFeatures(c,function(a){e.features.push(a)},function(){d._drawHistograms(a,e);a.finishCallback()},f)},f)})}},_drawHistograms:function(b,c){var e="max"in this.config.histograms?this.config.histograms.max:c.stats.max;if(void 0===e)console.warn("no stats.max in hist data, not drawing histogram for block "+b.blockIndex);else{var f;if((f=c.features)||c.bins&&(f=this._histBinsToFeatures(b,c))){var g=b.block,h=this.config.histograms.height,k=b.scale,l=b.leftBase,m=this.config.histograms.min;
d.empty(g.domNode);var n=g.featureCanvas=d.create("canvas",{height:h,width:g.domNode.offsetWidth+1,style:{cursor:"default",height:h+"px",position:"absolute"},innerHTML:"Your web browser cannot display this type of track.",className:"canvas-track canvas-track-histograms"},g.domNode);this.heightUpdate(h,b.blockIndex);var g=n.getContext("2d"),q=a.getResolution(g,this.browser.config.highResolutionMode);if("disabled"!=this.browser.config.highResolutionMode&&1<=q){var p=n.width,r=n.height;n.width=p*q;n.height=
r*q;n.style.width=p+"px";n.style.height=r+"px";g.scale(q,q)}g.fillStyle=this.config.histograms.color;for(n=0;n<f.length;n++)r=f[n],q=r.get("score")/e*h,p=Math.ceil((r.get("end")-r.get("start"))*k),r=Math.round((r.get("start")-l)*k),g.fillRect(r,h-q,p,q),q>h&&(g.fillStyle=this.config.histograms.clip_marker_color,g.fillRect(r,0,p,3),g.fillStyle=this.config.histograms.color);this.makeHistogramYScale(h,m,e)}}},_histBinsToFeatures:function(a,b){var c=parseFloat(b.stats.basesPerBin),d=a.leftBase;return l.map(b.bins,
function(a,b){return new v({data:{start:d+b*c,end:d+(b+1)*c,score:a}})})},makeHistogramYScale:function(a,b,c){if(!this.yscale_params||!(this.yscale_params.height==a&&this.yscale_params.max==c&&this.yscale_params.min==b))this.yscale_params={height:a,min:b,max:c},this.makeYScale({min:b,max:c})},fillFeatures:function(b){var c=this,f=b.blockIndex,g=b.block,h=g.domNode.offsetWidth,k=b.scale,l=b.leftBase,m=b.rightBase,n=b.finishCallback,q=[],p=0,r=new e,s=!1,t=dojo.hitch(c,function(a){this._handleError(a,
b);n(a)}),u=this._getLayout(k),k=Math.round(this.config.maxFeatureGlyphExpansion/k),l={ref:this.refSeq.name,start:Math.max(0,l-k),end:m+k};this.store.getFeatures(l,function(a){if(!c.destroyed&&c.filterFeature(a)){q.push(null);p++;var d=q.length-1;c.getGlyph(b,a,function(c){c=c.layoutFeature(b,u,a);null===c?g.maxHeightExceeded=!0:c.l>=h||0>c.l+c.w||(q[d]=c);!--p&&s&&r.resolve()},t)}},function(){c.destroyed||(s=!0,!p&&!r.isFulfilled()&&r.resolve(),r.then(function(){var e=u.getTotalHeight(),h=g.featureCanvas=
d.create("canvas",{height:e,width:g.domNode.offsetWidth+1,style:{cursor:"default",height:e+"px",position:"absolute"},innerHTML:"Your web browser cannot display this type of track.",className:"canvas-track"},g.domNode),k=h.getContext("2d"),l=a.getResolution(k,c.browser.config.highResolutionMode);if("disabled"!=c.browser.config.highResolutionMode&&1<=l){var m=h.width,p=h.height;h.width=m*l;h.height=p*l;h.style.width=m+"px";h.style.height=p+"px";k.scale(l,l)}g.maxHeightExceeded&&c.markBlockHeightOverflow(g);
c.heightUpdate(e,f);c.renderFeatures(b,q);c.renderClickMap(b,q);n()}))},t)},startZoom:function(){this.inherited(arguments);l.forEach(this.blocks,function(a){try{a.featureCanvas.style.width="100%"}catch(b){}})},endZoom:function(){l.forEach(this.blocks,function(a){try{delete a.featureCanvas.style.width}catch(b){}});this.clear();this.inherited(arguments)},renderClickMap:function(a,b){var c=a.block,d=new x({h:c.featureCanvas.height,w:c.featureCanvas.width});c.fRectIndex=d;d.addAll(b);!c.featureCanvas||
!c.featureCanvas.getContext("2d")?console.warn("No 2d context available from canvas"):(this._attachMouseOverEvents(),this._connectEventHandlers(c),this.updateStaticElements({x:this.browser.view.getX()}))},_attachMouseOverEvents:function(){var a=this.browser.view,b=this;"collapsed"==this.displayMode?(this._mouseoverEvent&&(this._mouseoverEvent.remove(),delete this._mouseoverEvent),this._mouseoutEvent&&(this._mouseoutEvent.remove(),delete this._mouseoutEvent)):(this._mouseoverEvent||(this._mouseoverEvent=
this.own(c(this.staticCanvas,"mousemove",function(c){c=g.fix(c);var d=a.absXtoBp(c.clientX),d=b.layout.getByCoord(d,void 0===c.offsetY?c.layerY:c.offsetY);b.mouseoverFeature(d,c)}))[0]),this._mouseoutEvent||(this._mouseoutEvent=this.own(c(this.staticCanvas,"mouseout",function(a){b.mouseoverFeature(void 0)}))[0]))},_makeLabelTooltip:function(){if(this.showTooltips&&!this.labelTooltip){var a=this.labelTooltip=d.create("div",{className:"featureTooltip",style:{position:"fixed",display:"none",zIndex:19}},
document.body);d.create("span",{className:"tooltipLabel",style:{display:"block"}},a);d.create("span",{className:"tooltipDescription",style:{display:"block"}},a)}},_connectEventHandlers:function(a){for(var b in this.eventHandlers)(function(b,d){var e=this;a.own(c(this.staticCanvas,b,function(b){b=g.fix(b);var c=e.browser.view.absXtoBp(b.clientX);if(a.containsBp(c)&&(c=e.layout.getByCoord(c,void 0===b.offsetY?b.layerY:b.offsetY))){var f=a.fRectIndex.getByID(c.id());d.call({track:e,feature:c,fRect:f,
block:a,callbackArgs:[e,c,f]},c,f,a,e,b)}}))}).call(this,b,this.eventHandlers[b])},getRenderingContext:function(a){if(!a.block||!a.block.featureCanvas)return null;try{return a.block.featureCanvas.getContext("2d")}catch(b){return console.error(b,b.stack),null}},renderFeatures:function(a,b){var c=this.getRenderingContext(a);if(c){var d=this;l.forEach(b,function(a){a&&d.renderFeature(c,a)})}},mouseoverFeature:function(a,b){if(this.lastMouseover!=a){if(b)var c=this.browser.view.absXtoBp(b.clientX);this.labelTooltip&&
(this.labelTooltip.style.display="none");l.forEach(this.blocks,function(d,e){if(d){var f=this.getRenderingContext({block:d,leftBase:d.startBase,scale:d.scale});if(f){if(this.lastMouseover&&d.fRectIndex){var g=d.fRectIndex.getByID(this.lastMouseover.id());g&&this.renderFeature(f,g)}d.tooltipTimeout&&window.clearTimeout(d.tooltipTimeout);if(a){var k=d.fRectIndex&&d.fRectIndex.getByID(a.id());k&&(d.containsBp(c)&&(g=dojo.hitch(this,function(){if(this.labelTooltip){var c=k.label||k.glyph.makeFeatureLabel(a),
d=k.description||k.glyph.makeFeatureDescriptionLabel(a);if(c||d){this.ignoreTooltipTimeout||(this.labelTooltip.style.left=b.clientX+"px",this.labelTooltip.style.top=b.clientY+15+"px");this.ignoreTooltipTimeout=!0;this.labelTooltip.style.display="block";var e=this.labelTooltip.childNodes[0],f=this.labelTooltip.childNodes[1];this.config.onClick&&this.config.onClick.label?(d=h.mixin({track:this,feature:a,callbackArgs:[this,a]}),e.style.display="block",e.style.font=c.font,e.style.color=c.fill,e.innerHTML=
this.template(a,this._evalConf(d,this.config.onClick.label,"label"))):(c?(e.style.display="block",e.style.font=c.font,e.style.color=c.fill,e.innerHTML=c.text):(e.style.display="none",e.innerHTML="(no label)"),d?(f.style.display="block",f.style.font=d.font,f.style.color=d.fill,f.innerHTML=d.text):(f.style.display="none",f.innerHTML="(no description)"))}}}),this.ignoreTooltipTimeout?g():d.tooltipTimeout=window.setTimeout(g,600)),k.glyph.mouseoverFeature(f,k),this._refreshContextMenu(k))}else d.tooltipTimeout=
window.setTimeout(dojo.hitch(this,function(){this.ignoreTooltipTimeout=!1}),200)}}},this);this.lastMouseover=a}},cleanupBlock:function(a){this.inherited(arguments);a&&this.layout&&this.layout.discardRange(a.startBase,a.endBase)},renderFeature:function(a,b){b.glyph.renderFeature(a,b)},_trackMenuOptions:function(){var a=this.inherited(arguments),b=this;this.displayModeMenuItems=["normal","compact","collapsed"].map(function(a){return{label:a,type:"dijit/CheckedMenuItem",title:"Render this track in "+
a+" mode",checked:b.displayMode==a,onClick:function(){b.displayMode=a;b._clearLayout();b.hideAll();b.genomeView.showVisibleBlocks(!0);b.makeTrackMenu();b.browser.cookie("track-"+b.name,b.displayMode)}}});dojo.hitch(this,function(){for(var a in this.displayModeMenuItems)this.displayModeMenuItems[a].checked=this.displayMode==this.displayModeMenuItems[a].label});a.push.apply(a,[{type:"dijit/MenuSeparator"},{label:"Display mode",iconClass:"dijitIconPackage",title:"Make features take up more or less space",
children:this.displayModeMenuItems},{label:"Show labels",type:"dijit/CheckedMenuItem",checked:!!("showLabels"in this?this.showLabels:this.config.style.showLabels),onClick:function(a){b.showLabels=this.checked;b.changed()}}]);return a},_exportFormats:function(){return[{name:"GFF3",label:"GFF3",fileExt:"gff3"},{name:"BED",label:"BED",fileExt:"bed"},{name:"SequinTable",label:"Sequin Table",fileExt:"sqn"}]},updateStaticElements:function(a){this.inherited(arguments);this.updateYScaleFromViewDimensions(a);
if(a.hasOwnProperty("x")){var b=this.staticCanvas.getContext("2d");this.staticCanvas.width=this.browser.view.elem.clientWidth;this.staticCanvas.style.left=a.x+"px";b.clearRect(0,0,this.staticCanvas.width,this.staticCanvas.height);var c=this.browser.view.minVisible(),d=this.browser.view.maxVisible(),e={minVisible:c,maxVisible:d,bpToPx:dojo.hitch(this.browser.view,"bpToPx"),lWidth:this.label.offsetWidth};l.forEach(this.blocks,function(a){if(a&&a.fRectIndex){a=a.fRectIndex.byID;for(var c in a){var d=
a[c];d.glyph.updateStaticElements(b,d,e)}}},this)}},heightUpdate:function(a,b){this.inherited(arguments);this.staticCanvas&&(this.staticCanvas.height=this.staticCanvas.offsetHeight)},destroy:function(){this.destroyed=!0;d.destroy(this.staticCanvas);delete this.staticCanvas;delete this.layout;delete this.glyphsLoaded;this.inherited(arguments)}})})},"JBrowse/View/FeatureGlyph":function(){define(["dojo/_base/declare","dojo/_base/array","dojo/aspect","JBrowse/Component"],function(k,l,h,g){return k(g,
{constructor:function(f){this.track=f.track;this.booleanAlpha=0.17;h.before(this,"renderFeature",function(d,e){if(e.m){var c=Math.floor(e.l),b=Math.ceil(e.w+e.l)-c;e.m.sort(function(a,b){return a.l-b.l});var a=e.m[0];if(a.l<=c){var f=e.m[0].l,g;for(g in e.m){a=e.m[g];if(a.l>f)break;f=a.l+a.w}f>=c+b&&(d.globalAlpha=this.booleanAlpha,e.noMask=!0)}}},!0);h.after(this,"renderFeature",function(d,e){e.m&&!e.noMask?this.maskBySpans(d,e):e.noMask&&(delete e.noMask,d.globalAlpha=1)},!0)},getStyle:function(f,
d){return this.getConfForFeature("style."+d,f)},getConfForFeature:function(f,d){return this.getConf(f,[d,f,this,this.track])},mouseoverFeature:function(f,d){this.renderFeature(f,d);f.fillStyle=this.getStyle(d.f,"mouseovercolor");f.fillRect(d.rect.l,d.t,d.rect.w,d.rect.h)},_getFeatureRectangle:function(f,d){var e=f.block,c={l:e.bpToX(d.get("start")),h:this._getFeatureHeight(f,d),viewInfo:f,f:d,glyph:this};c.w=e.bpToX(d.get("end"))-c.l;this._addMasksToRect(f,d,c)},_addMasksToRect:function(f,d,e){var c=
f.block;d.masks&&(e.m=[],l.forEach(d.masks,function(b){var a={l:c.bpToX(b.start)};a.w=c.bpToX(b.end)-a.l;e.m.push(a)}));return e},layoutFeature:function(f,d,e){var c=this._getFeatureRectangle(f,e),b=f.scale,a=f.leftBase;f=c.l/b+a;b=(c.l+c.w)/b+a;c.t=d.addRect(e.id(),f,b,c.h,e);if(null===c.t)return null;c.f=e;return c},renderFeature:function(f,d){},maskBySpans:function(f,d){var e=this,c=dojo.create("canvas",{height:f.canvas.height,width:f.canvas.width}),b=c.getContext("2d"),a=Math.floor(d.l),g=Math.ceil(d.w+
d.l)-a;l.forEach(d.m,function(h){try{h.l<a&&(h.w+=h.l-a,h.l=a),h.w>g&&(h.w=g),0>h.l&&(h.w+=h.l,h.l=0),h.l+h.w>a+g&&(h.w=g+a-h.l),h.l+h.w>f.canvas.width&&(h.w=f.canvas.width-h.l),b.drawImage(f.canvas,h.l,d.t,h.w,d.h,h.l,d.t,h.w,d.h),f.globalAlpha=e.booleanAlpha,f.clearRect(h.l,d.t,h.w,d.h),f.drawImage(c,h.l,d.t,h.w,d.h,h.l,d.t,h.w,d.h),f.globalAlpha=1}catch(k){}})},_getFeatureHeight:function(f,d){return this.getStyle(d,"height")},updateStaticElements:function(f,d,e){}})})},"JBrowse/View/FeatureGlyph/Box":function(){define("dojo/_base/declare dojo/_base/array dojo/_base/lang JBrowse/Util/FastPromise JBrowse/View/FeatureGlyph ./_FeatureLabelMixin".split(" "),
function(k,l,h,g,f,d){return k([f,d],{constructor:function(){this._embeddedImagePromises={}},_defaultConfig:function(){return this._mergeConfigs(this.inherited(arguments),{style:{maxDescriptionLength:70,color:"goldenrod",mouseovercolor:"rgba(0,0,0,0.3)",borderColor:null,borderWidth:0.5,height:11,marginBottom:2,strandArrow:!0,label:"name, id",textFont:"normal 12px Univers,Helvetica,Arial,sans-serif",textColor:"black",text2Color:"blue",text2Font:"normal 12px Univers,Helvetica,Arial,sans-serif",description:"note, description"}})},
_getFeatureHeight:function(d,c){var b=this.getStyle(c,"height");"compact"==d.displayMode&&(b=Math.round(0.45*b));if(this.getStyle(c,"strandArrow")){var a=c.get("strand");1==a?b=Math.max(this._embeddedImages.plusArrow.height,b):-1==a&&(b=Math.max(this._embeddedImages.minusArrow.height,b))}return b},_getFeatureRectangle:function(d,c){var b=d.block,a={l:b.bpToX(c.get("start")),h:this._getFeatureHeight(d,c),viewInfo:d,f:c,glyph:this};a.w=b.bpToX(c.get("end"))-a.l;a.rect={l:a.l,h:a.h,w:Math.max(a.w,2),
t:0};a.w=a.rect.w;"compact"!=d.displayMode&&(a.h+=this.getStyle(c,"marginBottom")||0);this.getStyle(c,"strandArrow")&&(-1==(a.strandArrow=c.get("strand"))?(b=this._embeddedImages.minusArrow,a.w+=b.width,a.l-=b.width):(b=this._embeddedImages.plusArrow,a.w+=b.width));if("collapsed"==d.displayMode)return a;this._expandRectangleWithLabels(d,c,a);this._addMasksToRect(d,c,a);return a},layoutFeature:function(d,c,b){var a=this.inherited(arguments);if(!a)return a;a.rect.t=a.t;return a},_expandRectangleWithLabels:function(d,
c,b){if(d.showLabels){var a=this.makeFeatureLabel(c,b);a&&(b.h+=a.h,b.w=Math.max(a.w,b.w),b.label=a,a.yOffset=b.rect.h+a.h)}if(d.showDescriptions&&(d=this.makeFeatureDescriptionLabel(c,b)))b.description=d,b.h+=d.h,b.w=Math.max(d.w,b.w),d.yOffset=b.h-(this.getStyle(c,"marginBottom")||0)},_embeddedImages:{plusArrow:{data:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAFCAYAAACXU8ZrAAAATUlEQVQIW2NkwATGQKFYIG4A4g8gacb///+7AWlBmNq+vj6V4uLiJiD/FRBXA/F8xu7u7kcVFRWyMEVATQz//v0Dcf9CxaYRZxIxbgIARiAhmifVe8UAAAAASUVORK5CYII\x3d",
width:9,height:5},minusArrow:{data:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAFCAYAAACXU8ZrAAAASklEQVQIW2NkQAABILMBiBcD8VkkcQZGIAeEE4G4FYjFent764qKiu4gKXoPUjAJiLOggsxMTEwMjIwgYQjo6Oh4TLRJME043QQA+W8UD/sdk9IAAAAASUVORK5CYII\x3d",width:9,height:5}},getEmbeddedImage:function(d){return this._embeddedImagePromises[d]||function(){var c=new g,b=this._embeddedImages[d];if(b){var a=new Image;a.onload=function(){c.resolve(this)};a.src=b.data}else c.resolve(null);return this._embeddedImagePromises[d]=
c}.call(this)},renderFeature:function(d,c){"collapsed"!=this.track.displayMode&&d.clearRect(Math.floor(c.l),c.t,Math.ceil(c.w-Math.floor(c.l)+c.l),c.h);this.renderBox(d,c.viewInfo,c.f,c.t,c.rect.h,c.f);this.renderLabel(d,c);this.renderDescription(d,c);this.renderArrowhead(d,c)},renderBox:function(d,c,b,a,f,g,k){g=c.block.bpToX(b.get("start"));var l=c.block.bpToX(b.get("end"))-g;k=k||h.hitch(this,"getStyle");if(c=this._getFeatureHeight(c,b)){c!=f&&(a+=Math.round((f-c)/2));(f=k(b,"color"))?(d.fillStyle=
f,d.fillRect(g,a,Math.max(1,l),c)):d.clearRect(g,a,Math.max(1,l),c);var r;if((f=k(b,"borderColor"))&&(r=k(b,"borderWidth")))3<l?(d.lineWidth=r,d.strokeStyle=f,d.strokeRect(g+r/2,a+r/2,l-r,c-r)):(d.globalAlpha=2*r/l,d.fillStyle=f,d.fillRect(g,a,Math.max(1,l),c),d.globalAlpha=1)}},renderLabel:function(d,c){c.label&&(d.font=c.label.font,d.fillStyle=c.label.fill,d.textBaseline=c.label.baseline,d.fillText(c.label.text,c.l+(c.label.xOffset||0),c.t+(c.label.yOffset||0)))},renderDescription:function(d,c){c.description&&
(d.font=c.description.font,d.fillStyle=c.description.fill,d.textBaseline=c.description.baseline,d.fillText(c.description.text,c.l+(c.description.xOffset||0),c.t+(c.description.yOffset||0)))},renderArrowhead:function(d,c){c.strandArrow&&(1==c.strandArrow&&c.rect.l+c.rect.w<=d.canvas.width?this.getEmbeddedImage("plusArrow").then(function(b){d.imageSmoothingEnabled=!1;d.drawImage(b,c.rect.l+c.rect.w,c.t+(c.rect.h-b.height)/2)}):-1==c.strandArrow&&0<=c.rect.l&&this.getEmbeddedImage("minusArrow").then(function(b){d.imageSmoothingEnabled=
!1;d.drawImage(b,c.rect.l-9,c.t+(c.rect.h-b.height)/2)}))},updateStaticElements:function(d,c,b){var a=b.minVisible,f=b.maxVisible,g=c.viewInfo.block;if(g.containsBp(a)||g.containsBp(f)){var h=b.bpToPx,g=c.f;b=g.get("start");g=g.get("end");c.strandArrow&&(1==c.strandArrow&&g>=f&&b<=f?this.getEmbeddedImage("plusArrow").then(function(b){d.imageSmoothingEnabled=!1;d.drawImage(b,h(f)-h(a)-9,c.t+(c.rect.h-b.height)/2)}):-1==c.strandArrow&&(b<=a&&g>=a)&&this.getEmbeddedImage("minusArrow").then(function(a){d.imageSmoothingEnabled=
!1;d.drawImage(a,0,c.t+(c.rect.h-a.height)/2)}));var k=c.label?c.label.w:0,l=c.description?c.description.w:0;h(g);Math.max(k,l);h(a);h(b);h(a)}}})})},"JBrowse/Util/FastPromise":function(){define([],function(){var k=function(){this.callbacks=[]};k.prototype.then=function(k){"value"in this?k(this.value):this.callbacks.push(k)};k.prototype.resolve=function(k){this.value=k;k=this.callbacks;delete this.callbacks;for(var h=0;h<k.length;h++)k[h](this.value)};return k})},"JBrowse/View/FeatureGlyph/_FeatureLabelMixin":function(){define(["dojo/_base/declare",
"dojo/_base/lang","JBrowse/View/_FeatureDescriptionMixin"],function(k,l,h){var g={};return k(h,{makeFeatureLabel:function(f,d){var e=this.getFeatureLabel(f);if(!e)return null;var e=""+e,c=this.getStyle(f,"textFont"),e=d?this.makeBottomOrTopLabel(e,c,d):this.makePopupLabel(e,c);e.fill=this.getStyle(f,"textColor");return e},makeFeatureDescriptionLabel:function(f,d){var e=this.getFeatureDescription(f);if(!e)return null;var e=""+e,c=this.getStyle(f,"text2Font"),e=d?this.makeBottomOrTopLabel(e,c,d):this.makePopupLabel(e,
c);e.fill=this.getStyle(f,"text2Color");return e},makeSideLabel:function(f,d,e){if(!f)return null;e=this.measureFont(d);var c=Math.round((f.length*e.w-this.track.getConf("maxFeatureGlyphExpansion"))/e.w);0<c&&(f=f.slice(0,f.length-c-1)+"\u2026");return{text:f,font:d,baseline:"middle",w:e.w*f.length,h:e.h}},makeBottomOrTopLabel:function(f,d,e){if(!f)return null;var c=this.measureFont(d);e=Math.round((f.length*c.w-e.w-this.track.getConf("maxFeatureGlyphExpansion"))/c.w);0<e&&(f=f.slice(0,f.length-e-
1)+"\u2026");return{text:f,font:d,baseline:"bottom",w:c.w*f.length,h:c.h}},makePopupLabel:function(f,d){if(!f)return null;var e=this.measureFont(d);return{text:f,font:d,w:e.w*f.length,h:e.h}},measureFont:function(f){var d;if(!(d=g[f]))d=document.createElement("canvas").getContext("2d"),d.font=f,d=d.measureText("MMMMMMMMMMMMXXXXXXXXXX1234567890-.CGCC12345"),d={h:d.height||parseInt(f.match(/(\d+)px/)[1]),w:d.width/43},d=g[f]=d;return d}})})},"JBrowse/View/FeatureGlyph/Segments":function(){define(["dojo/_base/declare",
"dojo/_base/lang","dojo/_base/array","JBrowse/View/FeatureGlyph/Box"],function(k,l,h,g){return k(g,{_defaultConfig:function(){return this._mergeConfigs(this.inherited(arguments),{style:{connectorColor:"#333",connectorThickness:1,borderColor:"rgba( 0, 0, 0, 0.3 )"},subParts:function(){return!0}})},renderFeature:function(f,d){"collapsed"!=this.track.displayMode&&f.clearRect(Math.floor(d.l),d.t,Math.ceil(d.w),d.h);this.renderConnector(f,d);this.renderSegments(f,d);this.renderLabel(f,d);this.renderDescription(f,
d);this.renderArrowhead(f,d)},renderConnector:function(f,d){var e=this.getStyle(d.f,"connectorColor");e&&(f.fillStyle=e,e=this.getStyle(d.f,"connectorThickness"),f.fillRect(d.rect.l,Math.round(d.rect.t+(d.rect.h-e)/2),d.rect.w,e))},renderSegments:function(f,d){function e(c,e){return"height"==e?b._getFeatureHeight(d.viewInfo,c):b.getStyle(c,e)||b.getStyle(a,e)}var c=this._getSubparts(d.f);if(c.length)for(var b=this,a=d.f,g=0;g<c.length;++g)this.renderBox(f,d.viewInfo,c[g],d.t,d.rect.h,d.f,e)},_getSubparts:function(f){f=
f.children();if(!f)return[];for(var d=[],e=0;e<f.length;e++)this._filterSubpart(f[e])&&d.push(f[e]);return d},_filterSubpart:function(f){return(this._subpartsFilter||(this._subpartsFilter=this._makeSubpartsFilter()))(f)},_makeSubpartsFilter:function(f){var d=this.getConf("subParts");"string"==typeof d&&(d=d.split(/\s*,\s*/));return"object"==typeof d?(d=l.isArray(d)?function(){var e={};h.forEach(d,function(c){e[c.toLowerCase()]=!0});return e}.call(this):function(){var e={},c;for(c in d)e[c.toLowerCase()]=
d[c];return e}.call(this),function(e){return d[(e.get("type")||"").toLowerCase()]}):d=function(){return!0}}})})},"JBrowse/View/FeatureGlyph/Gene":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/_base/array","JBrowse/View/FeatureGlyph/Box","JBrowse/View/FeatureGlyph/ProcessedTranscript"],function(k,l,h,g,f){return k(g,{_defaultConfig:function(){return this._mergeConfigs(this.inherited(arguments),{transcriptType:"mRNA",style:{transcriptLabelFont:"normal 10px Univers,Helvetica,Arial,sans-serif",
transcriptLabelColor:"black",textFont:"bold 12px Univers,Helvetica,Arial,sans-serif"},labelTranscripts:!0,marginBottom:0})},_boxGlyph:function(){return this.__boxGlyph||(this.__boxGlyph=new g({track:this.track,browser:this.browser,config:this.config}))},_ptGlyph:function(){return this.__ptGlyph||(this.__ptGlyph=new f({track:this.track,browser:this.browser,config:this.config}))},_getFeatureRectangle:function(d,e){var c=l.mixin({},d);c.showDescriptions=c.showLabels=!1;var b=e.children(),a=1,f={l:0,
h:0,r:0,w:0,subRects:[],viewInfo:d,f:e,glyph:this};if(b&&b.length){b.sort(function(a,b){return(a.get("name")||a.get("id")||"").localeCompare(b.get("name")||b.get("id")||"")});f.l=Infinity;f.r=-Infinity;for(var g=this.getConfForFeature("transcriptType",e),h=0;h<b.length;h++){var k=(b[h].get("type")==g?this._ptGlyph():this._boxGlyph())._getFeatureRectangle(c,b[h]),a=h==b.length-1?0:1;k.t=k.rect.t=f.h&&"collapsed"!=d.displayMode?f.h+a:0;if(d.showLabels&&this.getConfForFeature("labelTranscripts",b[h])){var r=
this.makeSideLabel(this.getFeatureLabel(b[h]),this.getStyle(b[h],"transcriptLabelFont"),k);r&&(r.fill=this.getStyle(b[h],"transcriptLabelColor"),k.label=r,k.l-=r.w,k.w+=r.w,r.h>k.h&&(k.h=r.h),r.yOffset=Math.floor(k.h/2),r.xOffset=0)}f.subRects.push(k);f.r=Math.max(f.r,k.l+k.w-1);f.l=Math.min(f.l,k.l);f.h=k.t+k.h+a}}f.w=Math.max(f.r-f.l+1,2);delete f.r;f.rect={l:f.l,h:f.h,w:f.w};"compact"!=d.displayMode&&(f.h+=this.getStyle(e,"marginBottom")||0);if("collapsed"==d.displayMode)return f;this._expandRectangleWithLabels(d,
e,f);this._addMasksToRect(d,e,f);return f},layoutFeature:function(d,e,c){var b=this.inherited(arguments);b&&h.forEach(b.subRects,function(a){a.t+=b.t;a.rect.t+=b.t});return b},renderFeature:function(d,e){"collapsed"!=e.viewInfo.displayMode&&d.clearRect(Math.floor(e.l),e.t,Math.ceil(e.w-Math.floor(e.l)+e.l),e.h);for(var c=e.subRects,b=0;b<c.length;b++)c[b].glyph.renderFeature(d,c[b]);this.renderLabel(d,e);this.renderDescription(d,e)},updateStaticElements:function(d,e,c){this.inherited(arguments);for(var b=
e.subRects,a=0;a<b.length;a++)b[a].glyph.updateStaticElements(d,b[a],c)}})})},"JBrowse/View/FeatureGlyph/ProcessedTranscript":function(){define(["dojo/_base/declare","dojo/_base/array","dojox/color/Palette","JBrowse/Model/SimpleFeature","JBrowse/View/FeatureGlyph/Segments"],function(k,l,h,g,f){return k(f,{_defaultConfig:function(){return this._mergeConfigs(this.inherited(arguments),{style:{utrColor:function(d,e,c,b){return c._utrColor(c.getStyle(d.parent(),"color")).toString()}},subParts:"CDS, UTR, five_prime_UTR, three_prime_UTR",
impliedUTRs:!1,inferCdsParts:!1})},_getSubparts:function(d){var e=d.children();if(!e)return[];e&&this.config.inferCdsParts&&(e=this._makeCDSs(d,e));e&&this.config.impliedUTRs&&(e=this._makeUTRs(d,e));d=[];for(var c=0;c<e.length;c++)this._filterSubpart(e[c])&&d.push(e[c]);return d},_makeCDSs:function(d,e){var c=Infinity,b=-Infinity,a,f,h=[],k=[];for(a=0;a<e.length;a++)if(f=e[a].get("type"),/^cds/i.test(f)){if(/:CDS:/i.test(e[a].get("name")))return e;h.push(a);c>e[a].get("start")&&(c=e[a].get("start"));
b<e[a].get("end")&&(b=e[a].get("end"))}else/exon/i.test(f)&&k.push(e[a]);h.sort(function(a,b){return b-a});for(a=h.length-1;0<=a;a--)e.splice(h[a],1);if(!k.length||!(Infinity>c&&-Infinity<b))return e;k.sort(function(a,b){return a.get("start")-b.get("start")});f=d.get("strand");var h=Infinity,l=-Infinity;for(a=0;a<k.length;a++){var r=k[a].get("start"),p=k[a].get("end");c>=r&&b<=p?(h=c,l=b):c>=r&&c<p?(h=c,l=p):b>r&&b<=p?(h=r,l=b):r<b&&p>c&&(h=r,l=p);e.splice(a,0,new g({parent:d,data:{start:h,end:l,
strand:f,type:"CDS",name:d.get("uniqueID")+":CDS:"+a}}))}e.sort(function(a,b){return a.get("start")-b.get("start")});return e},_makeUTRs:function(d,e){var c=Infinity,b=-Infinity,a,f,h,k,l=[];for(a=0;a<e.length;a++)k=e[a].get("type"),/^cds/i.test(k)?(c>e[a].get("start")&&(c=e[a].get("start")),b<e[a].get("end")&&(b=e[a].get("end"))):/exon/i.test(k)?l.push(e[a]):this._isUTR(e[a])&&(f=e[a].get("start")==d.get("start"),h=e[a].get("end")==d.get("end"));if(!l.length||!(Infinity>c&&-Infinity<b))return e;
l.sort(function(a,b){return a.get("start")-b.get("start")});k=d.get("strand");var r;if(!f)for(a=0;a<l.length;a++){f=l[a].get("start");if(f>=c)break;r=c>l[a].get("end")?l[a].get("end"):c;e.unshift(new g({parent:d,data:{start:f,end:r,strand:k,type:0<=k?"five_prime_UTR":"three_prime_UTR"}}))}if(!h)for(a=l.length-1;0<=a;a--){r=l[a].get("end");if(r<=b)break;f=b<l[a].get("start")?l[a].get("start"):b;e.push(new g({parent:d,data:{start:f,end:r,strand:k,type:0<=k?"three_prime_UTR":"five_prime_UTR"}}))}return e},
_utrColor:function(d){return(this._palette||(this._palette=h.generate(d,"splitComplementary"))).colors[1]},_isUTR:function(d){return/(\bUTR|_UTR|untranslated[_\s]region)\b/.test(d.get("type")||"")},getStyle:function(d,e){return"color"==e&&this._isUTR(d)?this.getStyle(d,"utrColor"):this.inherited(arguments)},_getFeatureHeight:function(d,e){var c=this.inherited(arguments);return this._isUTR(e)?0.65*c:c}})})},"dojox/color/Palette":function(){define(["dojo/_base/lang","dojo/_base/array","./_base"],function(k,
l,h){function g(b,a,c){var d=new h.Palette;d.colors=[];l.forEach(b.colors,function(b){var e="dg"==a?b.g+c:b.g,f="db"==a?b.b+c:b.b,g="da"==a?b.a+c:b.a;d.colors.push(new h.Color({r:Math.min(255,Math.max(0,"dr"==a?b.r+c:b.r)),g:Math.min(255,Math.max(0,e)),b:Math.min(255,Math.max(0,f)),a:Math.min(1,Math.max(0,g))}))});return d}function f(b,a,c){var d=new h.Palette;d.colors=[];l.forEach(b.colors,function(b){b=b.toCmy();var e="dm"==a?b.m+c:b.m,f="dy"==a?b.y+c:b.y;d.colors.push(h.fromCmy(Math.min(100,Math.max(0,
"dc"==a?b.c+c:b.c)),Math.min(100,Math.max(0,e)),Math.min(100,Math.max(0,f))))});return d}function d(b,a,c){var d=new h.Palette;d.colors=[];l.forEach(b.colors,function(b){b=b.toCmyk();var e="dm"==a?b.m+c:b.m,f="dy"==a?b.y+c:b.y,g="dk"==a?b.b+c:b.b;d.colors.push(h.fromCmyk(Math.min(100,Math.max(0,"dc"==a?b.c+c:b.c)),Math.min(100,Math.max(0,e)),Math.min(100,Math.max(0,f)),Math.min(100,Math.max(0,g))))});return d}function e(b,a,c){var d=new h.Palette;d.colors=[];l.forEach(b.colors,function(b){b=b.toHsl();
var e="dl"==a?b.l+c:b.l;d.colors.push(h.fromHsl(("dh"==a?b.h+c:b.h)%360,Math.min(100,Math.max(0,"ds"==a?b.s+c:b.s)),Math.min(100,Math.max(0,e))))});return d}function c(b,a,c){var d=new h.Palette;d.colors=[];l.forEach(b.colors,function(b){b=b.toHsv();var e="dv"==a?b.v+c:b.v;d.colors.push(h.fromHsv(("dh"==a?b.h+c:b.h)%360,Math.min(100,Math.max(0,"ds"==a?b.s+c:b.s)),Math.min(100,Math.max(0,e))))});return d}h.Palette=function(b){this.colors=[];b instanceof h.Palette?this.colors=b.colors.slice(0):b instanceof
h.Color?this.colors=[null,null,b,null,null]:k.isArray(b)?this.colors=l.map(b.slice(0),function(a){return k.isString(a)?new h.Color(a):a}):k.isString(b)&&(this.colors=[null,null,new h.Color(b),null,null])};k.extend(h.Palette,{transform:function(b){var a=g;if(b.use){var h=b.use.toLowerCase();0==h.indexOf("hs")?a="l"==h.charAt(2)?e:c:0==h.indexOf("cmy")&&(a="k"==h.charAt(3)?d:f)}else if("dc"in b||"dm"in b||"dy"in b)a="dk"in b?d:f;else if("dh"in b||"ds"in b)a="dv"in b?c:e;var h=this,k;for(k in b)"use"!=
k&&(h=a(h,k,b[k]));return h},clone:function(){return new h.Palette(this)}});k.mixin(h.Palette,{generators:{analogous:function(b){var a=b.high||60,c=b.low||18;b=(k.isString(b.base)?new h.Color(b.base):b.base).toHsv();var a=[(b.h+c+360)%360,(b.h+Math.round(c/2)+360)%360,b.h,(b.h-Math.round(a/2)+360)%360,(b.h-a+360)%360],c=Math.max(10,95>=b.s?b.s+5:100-(b.s-95)),d=1<b.s?b.s-1:21-b.s,e=92<=b.v?b.v-9:Math.max(b.v+9,20),f=90>=b.v?Math.max(b.v+5,20):95+Math.ceil((b.v-90)/2),g=[c,d,b.s,c,c],p=[e,f,b.v,e,
f];return new h.Palette(l.map(a,function(a,b){return h.fromHsv(a,g[b],p[b])}))},monochromatic:function(b){b=k.isString(b.base)?new h.Color(b.base):b.base;var a=b.toHsv(),c=9<a.s-30?a.s-30:a.s+30,d=a.s,e=20<a.v-20?a.v-20:a.v+60,f=20<a.v-50?a.v-50:a.v+30;return new h.Palette([h.fromHsv(a.h,c,100-0.8*(100-a.v)),h.fromHsv(a.h,d,f),b,h.fromHsv(a.h,c,f),h.fromHsv(a.h,d,e)])},triadic:function(b){b=k.isString(b.base)?new h.Color(b.base):b.base;var a=b.toHsv(),c=(a.h-157+360)%360,d=90<a.s?a.s-10:a.s+10,e=
95<a.s?a.s-5:a.s+5,f=20<a.v-20?a.v-20:a.v+20,g=20<a.v-30?a.v-30:a.v+30,l=70<a.v-30?a.v-30:a.v+30;return new h.Palette([h.fromHsv((a.h+57+360)%360,20<a.s?a.s-10:a.s+10,a.v),h.fromHsv(a.h,d,g),b,h.fromHsv(c,d,f),h.fromHsv(c,e,l)])},complementary:function(b){b=k.isString(b.base)?new h.Color(b.base):b.base;var a=b.toHsv(),c=360>2*a.h+137?2*a.h+137:Math.floor(a.h/2)-137,d=Math.max(a.s-10,0),e=100-0.9*(100-a.s),f=Math.min(100,a.s+20),g=Math.min(100,a.v+30),l=20<a.v?a.v-30:a.v+30;return new h.Palette([h.fromHsv(a.h,
d,g),h.fromHsv(a.h,e,l),b,h.fromHsv(c,f,l),h.fromHsv(c,a.s,a.v)])},splitComplementary:function(b){var a=k.isString(b.base)?new h.Color(b.base):b.base,c=b.da||30;b=a.toHsv();var d=360>2*b.h+137?2*b.h+137:Math.floor(b.h/2)-137,e=(d-c+360)%360,c=(d+c)%360,d=Math.max(b.s-10,0),f=100-0.9*(100-b.s),g=Math.min(100,b.s+20),l=Math.min(100,b.v+30),t=20<b.v?b.v-30:b.v+30;return new h.Palette([h.fromHsv(e,d,l),h.fromHsv(e,f,t),a,h.fromHsv(c,g,t),h.fromHsv(c,b.s,b.v)])},compound:function(b){b=k.isString(b.base)?
new h.Color(b.base):b.base;var a=b.toHsv(),c=360>2*a.h+18?2*a.h+18:Math.floor(a.h/2)-18,d=360>2*a.h+120?2*a.h+120:Math.floor(a.h/2)-120,e=360>2*a.h+99?2*a.h+99:Math.floor(a.h/2)-99,f=10<a.s-40?a.s-40:a.s+40,g=80<a.s-10?a.s-10:a.s+10,l=10<a.s-25?a.s-25:a.s+25,t=10<a.v-40?a.v-40:a.v+40,u=80<a.v-20?a.v-20:a.v+20,a=Math.max(a.v,20);return new h.Palette([h.fromHsv(c,f,t),h.fromHsv(c,g,u),b,h.fromHsv(d,l,a),h.fromHsv(e,g,u)])},shades:function(b){b=k.isString(b.base)?new h.Color(b.base):b.base;var a=b.toHsv(),
c=100==a.s&&0==a.v?0:a.s,d=20<a.v-50?a.v-50:a.v+30,e=20<=a.v-25?a.v-25:a.v+55,f=20<=a.v-75?a.v-75:a.v+5,g=Math.max(a.v-10,20);return new h.Palette([new h.fromHsv(a.h,c,d),new h.fromHsv(a.h,c,e),b,new h.fromHsv(a.h,c,f),new h.fromHsv(a.h,c,g)])}},generate:function(b,a){if(k.isFunction(a))return a({base:b});if(h.Palette.generators[a])return h.Palette.generators[a]({base:b});throw Error("dojox.color.Palette.generate: the specified generator ('"+a+"') does not exist.");}});return h.Palette})},"dojox/color/_base":function(){define(["../main",
"dojo/_base/lang","dojo/_base/Color","dojo/colors"],function(k,l,h,g){k=l.getObject("color",!0,k);k.Color=h;k.blend=h.blendColors;k.fromRgb=h.fromRgb;k.fromHex=h.fromHex;k.fromArray=h.fromArray;k.fromString=h.fromString;k.greyscale=g.makeGrey;l.mixin(k,{fromCmy:function(f,d,e){l.isArray(f)?(d=f[1],e=f[2],f=f[0]):l.isObject(f)&&(d=f.m,e=f.y,f=f.c);d=1-d/100;e=1-e/100;return new h({r:Math.round(255*(1-f/100)),g:Math.round(255*d),b:Math.round(255*e)})},fromCmyk:function(f,d,e,c){l.isArray(f)?(d=f[1],
e=f[2],c=f[3],f=f[0]):l.isObject(f)&&(d=f.m,e=f.y,c=f.b,f=f.c);d/=100;e/=100;c/=100;f=1-Math.min(1,f/100*(1-c)+c);d=1-Math.min(1,d*(1-c)+c);e=1-Math.min(1,e*(1-c)+c);return new h({r:Math.round(255*f),g:Math.round(255*d),b:Math.round(255*e)})},fromHsl:function(f,d,e){l.isArray(f)?(d=f[1],e=f[2],f=f[0]):l.isObject(f)&&(d=f.s,e=f.l,f=f.h);d/=100;for(e/=100;0>f;)f+=360;for(;360<=f;)f-=360;var c,b;120>f?(c=(120-f)/60,b=f/60,f=0):240>f?(c=0,b=(240-f)/60,f=(f-120)/60):(c=(f-240)/60,b=0,f=(360-f)/60);c=2*
d*Math.min(c,1)+(1-d);b=2*d*Math.min(b,1)+(1-d);f=2*d*Math.min(f,1)+(1-d);0.5>e?(c*=e,b*=e,f*=e):(c=(1-e)*c+2*e-1,b=(1-e)*b+2*e-1,f=(1-e)*f+2*e-1);return new h({r:Math.round(255*c),g:Math.round(255*b),b:Math.round(255*f)})}});k.fromHsv=function(f,d,e){l.isArray(f)?(d=f[1],e=f[2],f=f[0]):l.isObject(f)&&(d=f.s,e=f.v,f=f.h);360==f&&(f=0);d/=100;e/=100;var c,b,a;if(0==d)b=a=c=e;else{var g=f/60;f=Math.floor(g);var k=g-f,g=e*(1-d),q=e*(1-d*k);d=e*(1-d*(1-k));switch(f){case 0:c=e;b=d;a=g;break;case 1:c=
q;b=e;a=g;break;case 2:c=g;b=e;a=d;break;case 3:c=g;b=q;a=e;break;case 4:c=d;b=g;a=e;break;case 5:c=e,b=g,a=q}}return new h({r:Math.round(255*c),g:Math.round(255*b),b:Math.round(255*a)})};l.extend(h,{toCmy:function(){var f=1-this.g/255,d=1-this.b/255;return{c:Math.round(100*(1-this.r/255)),m:Math.round(100*f),y:Math.round(100*d)}},toCmyk:function(){var f,d,e,c=this.r/255;f=this.g/255;d=this.b/255;e=Math.min(1-c,1-f,1-d);f=(1-f-e)/(1-e);d=(1-d-e)/(1-e);return{c:Math.round(100*((1-c-e)/(1-e))),m:Math.round(100*
f),y:Math.round(100*d),b:Math.round(100*e)}},toHsl:function(){var f=this.r/255,d=this.g/255,e=this.b/255,c=Math.min(f,e,d),b=Math.max(f,d,e),a=b-c,g=0,h=0,c=(c+b)/2;0<c&&1>c&&(h=a/(0.5>c?2*c:2-2*c));0<a&&(b==f&&b!=d&&(g+=(d-e)/a),b==d&&b!=e&&(g+=2+(e-f)/a),b==e&&b!=f&&(g+=4+(f-d)/a),g*=60);return{h:g,s:Math.round(100*h),l:Math.round(100*c)}},toHsv:function(){var f=this.r/255,d=this.g/255,e=this.b/255,c=Math.min(f,e,d),b=Math.max(f,d,e),c=b-c,a=null,g=0==b?0:c/b;0==g?a=0:(a=f==b?60*(d-e)/c:d==b?120+
60*(e-f)/c:240+60*(f-d)/c,0>a&&(a+=360));return{h:a,s:Math.round(100*g),v:Math.round(100*b)}}});return k})},"dojo/colors":function(){define(["./_base/kernel","./_base/lang","./_base/Color","./_base/array"],function(k,l,h,g){var f={};l.setObject("dojo.colors",f);var d=function(c,b,a){0>a&&++a;1<a&&--a;var d=6*a;return 1>d?c+(b-c)*d:1>2*a?b:2>3*a?c+6*(b-c)*(2/3-a):c};k.colorFromRgb=h.fromRgb=function(c,b){var a=c.toLowerCase().match(/^(rgba?|hsla?)\(([\s\.\-,%0-9]+)\)/);if(a){var e=a[2].split(/\s*,\s*/),
f=e.length,a=a[1];if("rgb"==a&&3==f||"rgba"==a&&4==f)return a=e[0],"%"==a.charAt(a.length-1)?(a=g.map(e,function(a){return 2.56*parseFloat(a)}),4==f&&(a[3]=e[3]),h.fromArray(a,b)):h.fromArray(e,b);if("hsl"==a&&3==f||"hsla"==a&&4==f){var a=(parseFloat(e[0])%360+360)%360/360,k=parseFloat(e[1])/100,l=parseFloat(e[2])/100,k=0.5>=l?l*(k+1):l+k-l*k,l=2*l-k,a=[256*d(l,k,a+1/3),256*d(l,k,a),256*d(l,k,a-1/3),1];4==f&&(a[3]=e[3]);return h.fromArray(a,b)}}return null};var e=function(c,b,a){c=Number(c);return isNaN(c)?
a:c<b?b:c>a?a:c};h.prototype.sanitize=function(){this.r=Math.round(e(this.r,0,255));this.g=Math.round(e(this.g,0,255));this.b=Math.round(e(this.b,0,255));this.a=e(this.a,0,1);return this};f.makeGrey=h.makeGrey=function(c,b){return h.fromArray([c,c,c,b])};l.mixin(h.named,{aliceblue:[240,248,255],antiquewhite:[250,235,215],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],blanchedalmond:[255,235,205],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],
cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],
darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,
92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,
153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],oldlace:[253,
245,230],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,
82,45],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],whitesmoke:[245,245,245],yellowgreen:[154,205,50]});return h})},"JBrowse/View/FeatureGlyph/Alignment":function(){define(["dojo/_base/declare","dojo/_base/array","JBrowse/View/FeatureGlyph/Box","JBrowse/Store/SeqFeature/_MismatchesMixin"],
function(k,l,h,g){return k([h,g],{constructor:function(){this.config.style.showMismatches||(this._drawMismatches=function(){})},_defaultConfig:function(){return this._mergeConfigs(dojo.clone(this.inherited(arguments)),{style:{color:function(f,d,e,c){d=f.get("strand");if(1!=Math.abs(d)&&"+"!=d&&"-"!=d)return c.colorForBase("reference");if(c.config.useXS)return(d={"-":"color_rev_strand","+":"color_fwd_strand"}[f._get("xs")])||(d="color_nostrand"),e.getStyle(f,d);if(f.get("multi_segment_template")){var b=
f.get("multi_segment_first");return f.get("multi_segment_all_correctly_aligned")?b||!c.config.useReverseTemplate?1==d||"+"==d?e.getStyle(f,"color_fwd_strand"):e.getStyle(f,"color_rev_strand"):1==d||"+"==d?e.getStyle(f,"color_rev_strand"):e.getStyle(f,"color_fwd_strand"):f.get("multi_segment_next_segment_unmapped")?b||!c.config.useReverseTemplate?1==d||"+"==d?e.getStyle(f,"color_fwd_missing_mate"):e.getStyle(f,"color_rev_missing_mate"):1==d||"+"==d?e.getStyle(f,"color_rev_missing_mate"):e.getStyle(f,
"color_fwd_missing_mate"):f.get("seq_id")==f.get("next_seq_id")?b||!c.config.useReverseTemplate?1==d||"+"==d?e.getStyle(f,"color_fwd_strand_not_proper"):e.getStyle(f,"color_rev_strand_not_proper"):1==d||"+"==d?e.getStyle(f,"color_rev_strand_not_proper"):e.getStyle(f,"color_fwd_strand_not_proper"):1==d||"+"==d?e.getStyle(f,"color_fwd_diff_chr"):e.getStyle(f,"color_rev_diff_chr")}return 1==d||"+"==d?e.getStyle(f,"color_fwd_strand"):e.getStyle(f,"color_rev_strand")},color_fwd_strand_not_proper:"#ECC8C8",
color_rev_strand_not_proper:"#BEBED8",color_fwd_strand:"#EC8B8B",color_rev_strand:"#8F8FD8",color_fwd_missing_mate:"#D11919",color_rev_missing_mate:"#1919D1",color_fwd_diff_chr:"#000000",color_rev_diff_chr:"#969696",color_nostrand:"#999999",border_color:null,strandArrow:!1,height:7,marginBottom:1,showMismatches:!0,mismatchFont:"bold 10px Courier New,monospace"}})},renderFeature:function(f,d){this.inherited(arguments);2<d.w&&(0.2<d.viewInfo.scale?this._drawMismatches(f,d,this._getMismatches(d.f)):
this._drawMismatches(f,d,this._getSkipsAndDeletions(d.f)))},_drawMismatches:function(f,d,e){var c=d.f,b=d.viewInfo.block,a=this.getCharacterMeasurements(f);f.textBaseline="middle";l.forEach(e,function(e){var g=c.get("start")+e.start,h=g+e.length,k=(d.rect||{}).h||d.h,g=b.bpToX(g),l=d.rect.t,h=Math.max(b.bpToX(h)-g,1);"mismatch"==e.type||"deletion"==e.type?(f.fillStyle=this.track.colorForBase("deletion"==e.type?"deletion":e.base),f.fillRect(g,l,h,k),h>=a.w&&k>=a.h-3&&(f.font=this.config.style.mismatchFont,
f.fillStyle="deletion"==e.type?"white":"black",f.fillText(e.base,g+(h-a.w)/2+1,l+k/2))):"insertion"==e.type?(f.fillStyle="purple",f.fillRect(g-1,l+1,2,k-2),f.fillRect(g-2,l,4,1),f.fillRect(g-2,l+k-1,4,1),h>=a.w&&k>=a.h-3&&(f.font=this.config.style.mismatchFont,f.fillText("("+e.base+")",g+2,l+k/2))):"hardclip"==e.type||"softclip"==e.type?(f.fillStyle="hardclip"==e.type?"red":"blue",f.fillRect(g-1,l+1,2,k-2),f.fillRect(g-2,l,4,1),f.fillRect(g-2,l+k-1,4,1),h>=a.w&&k>=a.h-3&&(f.font=this.config.style.mismatchFont,
f.fillText("("+e.base+")",g+2,l+k/2))):"skip"==e.type&&(f.clearRect(g,l,h,k),f.fillStyle="#333",f.fillRect(g,l+(k-2)/2,h,2))},this);f.textBaseline="alphabetic"},getCharacterMeasurements:function(f){if(!(f=this.charSize)){var d;try{d=(this.config.style.mismatchFont.match(/(\d+)px/i)||[])[1]}catch(e){}d=d||Infinity;f={w:d,h:d}}return this.charSize=f}})})},"JBrowse/View/Track/FeatureCoverage":function(){define(["dojo/_base/declare","dojo/_base/array","JBrowse/View/Track/Wiggle/XYPlot","JBrowse/Util",
"JBrowse/Store/SeqFeature/Coverage"],function(k,l,h,g,f){return k(h,{constructor:function(d){this.store=new f({store:this.store,browser:this.browser})},_defaultConfig:function(){return g.deepUpdate(dojo.clone(this.inherited(arguments)),{autoscale:"local"})}})})},"JBrowse/Store/SeqFeature/Coverage":function(){define(["dojo/_base/declare","JBrowse/Store/SeqFeature","JBrowse/Util","JBrowse/Model/CoverageFeature"],function(k,l,h,g){return k(l,{constructor:function(f){this.store=f.store},getGlobalStats:function(f,
d){f({})},getFeatures:function(f,d,e,c){var b=f.start,a=f.end-b,h=Math.ceil(1/(f.scale||("basesPerSpan"in f?1/f.basesPerSpan:10))),k=Array(Math.ceil(a/h)),l=function(a,c){var d=(a-b-1)/h,e=Math.floor(d);return{bin:e,overlap:c?1-(d-e):d-e}};this.store.getFeatures(f,function(a){var b=l(a.get("start"),!1);a=l(a.get("end"),!0);b.bin==a.bin?k[b.bin]=(k[b.bin]||0)+a.overlap+b.overlap-1:(k[b.bin]=(k[b.bin]||0)+b.overlap,k[a.bin]=(k[a.bin]||0)+a.overlap);for(b=b.bin+1;b<=a.bin-1;b++)k[b]=(k[b]||0)+1},function(){for(var a=
0;a<k.length;a++){var c=b+h*a;d(new g({start:c,end:c+h,score:k[a]||0}))}e()},c)}})})},"JBrowse/Model/CoverageFeature":function(){define(["JBrowse/Util"],function(k){return k.fastDeclare({get:function(k){return this[k]},tags:function(){return["start","end","score"]},score:0,constructor:function(k){this.start=k.start;this.end=k.end;this.score=k.score}})})},"JBrowse/View/Track/SNPCoverage":function(){define("dojo/_base/declare dojo/_base/array dojo/promise/all JBrowse/View/Track/Wiggle/XYPlot JBrowse/Util JBrowse/View/Track/_AlignmentsMixin JBrowse/Store/SeqFeature/SNPCoverage".split(" "),
function(k,l,h,g,f,d,e){return k([g,d],{constructor:function(){delete this.config.bicolor_pivot;delete this.config.scale;delete this.config.align;var c=this;this.store=new e({store:this.store,config:{mismatchScale:this.config.mismatchScale},browser:this.browser,filter:function(b){return c.filterFeature(b)}})},_defaultConfig:function(){return f.deepUpdate(dojo.clone(this.inherited(arguments)),{autoscale:"local",min_score:0,mismatchScale:0.1,hideDuplicateReads:!0,logScaleOption:!1,hideQCFailingReads:!0,
hideSecondary:!0,hideSupplementary:!0,hideMissingMatepairs:!1,hideUnmapped:!0})},_drawFeatures:function(c,b,a,d,e,g,h,k){var l=this,t=e.getContext("2d"),u=e.height,v=f.getResolution(t,this.browser.config.highResolutionMode),x=dojo.hitch(this,function(a){return u*(1-k.normalize(a))/v}),w=x(k.origin),y=dojo.create("canvas",{height:20,width:e.width,style:{cursor:"default",width:"100%",height:"20px"},innerHTML:"Your web browser cannot display this type of track.",className:"SNP-indicator-track"},d.domNode),
z=y.getContext("2d"),v=f.getResolution(z,this.browser.config.highResolutionMode);"disabled"!=this.browser.config.highResolutionMode&&1!=v&&(c=y.height,y.width*=v,y.height=c*v,y.style.height=c+"px",z.scale(v,v));var A=this.config.style.neg_color,D=this.config.style.clip_marker_color,C=this.config.style.bg_color,B=this.config.disable_clip_markers,I=function(a,b,c,d){b<=u&&(t.fillStyle=l.colorForBase(a),b<=w?(l._fillRectMod(t,d.l,b,d.w,c),!B&&0>b&&(t.fillStyle=D||A,l._fillRectMod(t,d.l,0,d.w,2))):(l._fillRectMod(t,
d.l,w,d.w,c),!B&&b>=u&&(t.fillStyle=D||l.colorForBase(a),l._fillRectMod(t,d.l,u-3,d.w,2))))};dojo.forEach(g,function(a,b){var c=h[b],d=a.get("score");C&&(t.fillStyle=C,l._fillRectMod(t,c.l,0,c.w,u));I("reference",x(d.total()),w-x(d.get("reference"))+1,c)});dojo.forEach(g,function(a,b){var c=h[b],d=a.get("score"),e=d.total();d.forEach(function(a,b){!{reference:!0,skip:!0,deletion:!0}[b]&&a>0.5*e&&(z.save(),"disabled"!=l.browser.config.highResolutionMode&&z.scale(v,1),z.beginPath(),z.arc(c.l+0.5*c.w,
0.4*y.height/v,0.2*y.height/v,1.75*Math.PI,1.25*Math.PI,!1),z.lineTo(c.l+0.5*c.w,0),z.closePath(),z.fillStyle=l.colorForBase(b),z.fill(),z.lineWidth=1,z.strokeStyle="black",z.stroke(),"disabled"!=l.browser.config.highResolutionMode&&z.restore())});e-=d.get("reference");d.forEach(function(a,b){"reference"!=b&&(I(b,x(e),w-x(a)+1,c),e-=a)})},this)},_draw:function(c,b,a,d,e,f,g,h,k,l){this._preDraw(c,b,a,d,e,f,g,h);this._drawFeatures(c,b,a,d,e,f,g,h);l&&this._maskBySpans(c,b,e,l);this._postDraw(c,b,a,
d,e,f,g,h)},_maskBySpans:function(c,b,a,d){var e=a.getContext("2d"),f=a.height,g=this.config.style.masked_transparancy||0.17;this.config.style.masked_transparancy=g;var h=dojo.create("canvas",{height:f,width:a.width}),k=h.getContext("2d"),l;for(l in d)if(d.hasOwnProperty(l)){var u=Math.round((d[l].end-d[l].start)*c),v=Math.round((d[l].start-b)*c);v+u>=a.width&&(u=a.width-v);0!=u&&(k.drawImage(a,v,0,u,f,v,0,u,f),e.globalAlpha=g,e.clearRect(v,0,u,f),e.drawImage(h,v,0,u,f,v,0,u,f),e.globalAlpha=1)}},
_showPixelValue:function(c,b){function a(a){return parseFloat(a).toPrecision(6).replace(/0+$/,"").replace(/\.$/,"")}function d(a){a=Math.round(100*(a/e));return"number"==typeof a&&!isNaN(a)?a+"%":""}if(!b||!b.score)return!1;b=b.score;if(b.snpsCounted){var e=b.total(),f="\x3ctable\x3e";b.forEach(function(b,c){var e="";b.forEach&&(e=[],b.forEach(function(b,c){e.push(a(b)+" "+c)}),(e=e.join(", "))&&(e="("+e+")"));c={"*":"del",reference:"Ref",skip:"Skip/intron"}[c]||c;f+="\x3ctr\x3e\x3ctd\x3e"+c+'\x3c/td\x3e\x3ctd class\x3d"count"\x3e'+
a(b)+'\x3c/td\x3e\x3ctd class\x3d"pct"\x3e'+d(b)+'\x3c/td\x3e\x3ctd class\x3d"subdist"\x3e'+e+"\x3c/td\x3e\x3c/tr\x3e"});f+='\x3ctr class\x3d"total"\x3e\x3ctd\x3eTotal\x3c/td\x3e\x3ctd class\x3d"count"\x3e'+a(e)+'\x3c/td\x3e\x3ctd class\x3d"pct"\x3e\x26nbsp;\x3c/td\x3e\x3ctd class\x3d"subdist"\x3e\x26nbsp;\x3c/td\x3e\x3c/tr\x3e';c.innerHTML=f+"\x3c/table\x3e"}else c.innerHTML='\x3ctable\x3e\x3ctr\x3e\x3ctd\x3eTotal\x3c/td\x3e\x3ctd class\x3d"count"\x3e'+a(b)+"\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e";
return!0},_trackMenuOptions:function(){return h([this.inherited(arguments),this._alignmentsFilterTrackMenuOptions()]).then(function(c){var b=c.shift();c.unshift({type:"dijit/MenuSeparator"});return b.concat.apply(b,c)})}})})},"JBrowse/Store/SeqFeature/SNPCoverage":function(){define("dojo/_base/declare dojo/_base/array JBrowse/Util JBrowse/Store/SeqFeature JBrowse/Model/NestedFrequencyTable JBrowse/Model/CoverageFeature ./_MismatchesMixin".split(" "),function(k,l,h,g,f,d,e){return k([g,e],{constructor:function(c){this.store=
c.store;this.filter=c.filter||function(){return!0}},getGlobalStats:function(c,b){c({})},_defaultConfig:function(){return h.deepUpdate(dojo.clone(this.inherited(arguments)),{mismatchScale:0.1})},getFeatures:function(c,b,a,e){function g(a,b,c){a=(a-k)/t;b=(b-1-k)/t;var d=Math.floor(a),e=Math.floor(b);if(!(d>=u||0>e))if(0>d&&(a=d=0),e>=u&&(e=u-1,b=u),d==e)c(d,b-a);else{c(d,d+1-a);for(a=d+1;a<e;a++)c(a,1);c(e,b-e)}}for(var h=this,k=c.start,l=c.end,p=c.scale||c.basesPerSpan&&1/c.basesPerSpan||10,t=function(){var a=
1/p;return a<=1/h.config.mismatchScale?1:Math.ceil(a)}(),u=Math.ceil((l-k)/t),v=Array(u),x=0;x<u;x++)v[x]=new f,1==t&&(v[x].snpsCounted=!0);h.store.getFeatures(c,function(a){if(h.filter(a)){var b={"-1":"-",1:"+"}[""+a.get("strand")]||"unstranded";g(a.get("start"),a.get("end"),function(a,c){v[a].getNested("reference").increment(b,c)});if(1==t)for(var c=h._getMismatches(a),d=0;d<c.length;d++){var e=c[d];g(a.get("start")+e.start,a.get("start")+e.start+e.length,function(a,c){var d=v[a];d.getNested("reference").decrement(b,
c);var f=e.base;"insertion"==e.type?f="ins "+f:"skip"==e.type&&(f="skip");d.getNested(f).increment(b,c)})}}},function(e){var f=function(){for(var c=0;c<v.length;c++){var f=k+t*c;b(new d({start:f,end:f+t,score:v[c]}))}a(e)};if(1==t){var g;h.browser.getStore("refseqs",function(a){a?a.getFeatures(c,function(a){g=a.get("seq")},function(){if(g)for(var a=k;a<=l;a++){var b=Math.floor((a-k)/t);v[b].refBase=g[b]}f()},f):f()})}else f()},e)},saveStore:function(){return{urlTemplate:this.config.bam.url,baiUrlTemplate:this.config.bai.url}}})})},
"JBrowse/Model/NestedFrequencyTable":function(){define(["JBrowse/Util"],function(k){var l=k.fastDeclare({constructor:function(h){this._categories={};h&&dojo.mixin(this._categories,h)},total:function(){var h=0,g;for(g in this._categories)var f=this._categories[g],h=h+(f.total?f.total():f);return h},decrement:function(h,g){g||(g=1);h=h?h.toString():"default";return this._categories[h]?this._categories[h]=Math.max(0,this._categories[h]-g):0},increment:function(h,g){g||(g=1);h=h?h.toString():"default";
return this._categories[h]=(this._categories[h]||0)+g},get:function(h){return this._categories[h]||0},getNested:function(h){"string"==typeof h&&(h=h.split("/"));if(!h.length)return this;var g=h[0].toString(),f=this._categories[g];if(!f||!f._categories)f=this._categories[g]=new l(f?{"default":f+0}:{});return 1<h.length?f.getNested(h.slice(1)):f},categories:function(){return k.dojof.keys(this._categories)},toString:function(){return this.total().toPrecision(6).toString().replace(/\.?0+$/,"")},valueOf:function(){return this.total()},
forEach:function(h,g){var f=this._categories;if(g)for(var d in f)h.call(g,f[d],d);else for(d in f)h(f[d],d)}});return l})},"JBrowse/Store/TrackMetaData":function(){define(["dojo/_base/declare","dojo/_base/array","dojo/data/util/simpleFetch","JBrowse/Util","JBrowse/Digest/Crc32"],function(k,l,h,g,f){var d=g.dojof;k=k(null,{_noDataValue:"(no data)",constructor:function(d){var c=["conf"];this._filterFacet=function(){var a=d.indexFacets||function(){return!0};"string"==typeof a&&(a=[a]);if(dojo.isArray(a))var b=
a,a=function(a){return dojo.some(b,function(b){return a==b.toLowerCase()})};var f=this.getIdentityAttributes();return function(b){return dojo.some(f,function(a){return a==b})||a(b)&&!dojo.some(c,function(a){return a==b})}}.call(this);dojo.isArray(d.onReady)?this.onReadyFuncs=dojo.clone(d.onReady):this.onReadyFuncs=d.onReady?[d.onReady]:[];this._indexItems({store:this,items:dojo.map(d.trackConfigs,dojo.hitch(this,"_trackConfigToItem"))});var b=0;d.metadataStores=dojo.filter(d.metadataStores,function(a){return a});
if(!d.metadataStores||!d.metadataStores.length)this._finishLoad();else{var a=dojo.hitch(this,function(){++b==d.metadataStores.length&&this._finishLoad()});dojo.forEach(d.metadataStores,function(b){b.fetch({scope:this,onComplete:dojo.hitch(this,function(c){this._indexItems({store:b,items:c,supplementalOnly:!0});a()}),onError:function(b){console.error(b,b.stack);a()}})},this)}d.browser.subscribe("/jbrowse/v1/c/tracks/new",dojo.hitch(this,"addTracks"));d.browser.subscribe("/jbrowse/v1/c/tracks/replace",
dojo.hitch(this,function(a){this.deleteTracks(a,"no events");this.addTracks(a,"no events")}));d.browser.subscribe("/jbrowse/v1/c/tracks/delete",dojo.hitch(this,"deleteTracks"))},_trackConfigToItem:function(d){var c=dojo.clone(d.metadata||{});c.label=d.label;c.key=d.key;c.conf=d;c["track type"]=d.type;d.category&&(c.category=d.category);return c},comparatorMap:{category:function(d,c){for(var b=(d||"Uncategorized").split(/\s*\/\s*/),a=(c||"Uncategorized").split(/\s*\/\s*/),f,g;(f=b.shift())&&(g=a.shift());)if(f=
f.localeCompare(g))return f;return 0}},addTracks:function(d,c){d.length&&(delete this.previousQueryFingerprint,delete this.previousResults);l.forEach(d,function(b){this._indexItems({store:this,items:[this._trackConfigToItem(b)]});var a=b.label,d=this.fetchItemByIdentity(a);if(d){if(!c)this.onNew(d)}else console.error("failed to add "+a+" track to track metadata store",b)},this)},deleteTracks:function(d,c){d.length&&(delete this.previousQueryFingerprint,delete this.previousResults);l.forEach(d,function(b){if(b=
this.fetchItemByIdentity(b.label))if(b.DELETED=!0,!c)this.onDelete(b)},this)},_finishLoad:function(){this.facets.sort();dojo.forEach(d.values(this.facetIndexes.byName),function(c){c.avgBucketSize=c.itemCount/c.bucketCount});this.facetIndexes.facetRank=dojo.clone(this.facets).sort(dojo.hitch(this,function(c,b){return this.facetIndexes.byName[c].avgBucketSize-this.facetIndexes.byName[b].avgBucketSize}));var e=dojo.hitch(this,"_itemSortFunc");dojo.forEach(d.values(this.facetIndexes.byName),function(c){dojo.forEach(d.values(c.byValue),
function(b){var a=[],c={};l.forEach(b.items,function(b){var d=this.getIdentity(b);c[d]||(c[d]=!0,a.push(b))},this);b.items=a.sort(e)},this)},this);this.ready=!0;this._onReady()},_itemSortFunc:function(d,c){var b=this.getIdentity(d),a=this.getIdentity(c);return b==a?0:b>a?1:b<a?-1:0},_indexItems:function(e){var c=e.store,b=e.items,a={},b=dojo.map(b,function(b){var d=c.getAttributes(b),e={};dojo.forEach(d,function(d){if(d){var f=d.toLowerCase();a[f]=!0;e[f]=c.getValue(b,d)}});return e},this);this.identIndex=
this.identIndex||{};b=function(){var a={};return dojo.map(b,function(b){var c=this.getIdentity(b),d=this.identIndex[c];d&&d.DELETED&&delete d.DELETED;if(a[c]||e.supplementalOnly&&!d)return null;a[c]=!0;return this.identIndex[c]=dojo.mixin(d||{},b)},this)}.call(this);b=dojo.filter(b,function(a){return a});d.keys(a);var f=this._addFacets(d.keys(a)),g=l.filter(this.facets,function(b){return b in a});this.facetIndexes=this.facetIndexes||{itemCount:0,bucketCount:0,byName:{}};dojo.forEach(f,function(a){this.facetIndexes.byName[a]||
(this.facetIndexes.bucketCount++,this.facetIndexes.byName[a]={itemCount:0,bucketCount:0,byValue:{}})},this);if(g.length){var h={};dojo.forEach(g,function(a){h[a]={}});dojo.forEach(b,function(a){this.facetIndexes.itemCount++;dojo.forEach(g,function(b){var c=this.getValue(a,b,void 0);"undefined"!=typeof c&&(h[b][this.getIdentity(a)]=1,this._indexItem(b,c,a))},this)},this);dojo.forEach(g,function(a){dojo.forEach(d.values(this.identIndex),function(b){h[a][this.getIdentity(b)]||this._indexItem(a,this._noDataValue,
b)},this)},this)}},_indexItem:function(d,c,b){d=this.facetIndexes.byName[d];var a=d.byValue[c];a||(a=d.byValue[c]={itemCount:0,items:[]},d.bucketCount++);a.itemCount++;d.itemCount++;a.items.push(b)},_addFacets:function(d){var c=this.facets||[],b={};this.facets=dojo.filter(c.concat(d),function(a){var c=this._filterFacet(a)&&!b[a];b[a]=!0;return c},this);return this.facets.slice(c.length)},getCount:function(){return this._fetchCount},getFacetCounts:function(d){var c=this._fetchFacetCounts[d]||this._fetchFacetCounts.__other__;
return c?c[d]:void 0},getFacetNames:function(d){return this.facets},getFacetValues:function(e){e=this.facetIndexes.byName[e];return!e?[]:d.keys(e.byValue)},getFacetStats:function(d){var c=this.facetIndexes.byName[d];if(!c)return{};var b={};dojo.forEach(["itemCount","bucketCount","avgBucketSize"],function(a){b[a]=c[a]});return b},getValue:function(d,c,b){d=d[c];return"undefined"==typeof d?b:d},getValues:function(d,c){var b=[d[c]];return"undefined"==typeof b[0]?[]:b},getAttributes:function(e){return d.keys(e)},
hasAttribute:function(d,c){return d.hasOwnProperty(c)},containsValue:function(d,c,b){return d[c]==b},isItem:function(d){return"object"==typeof d&&"string"==typeof d.label},isItemLoaded:function(){return this.ready},loadItem:function(d){},getItem:function(d){return this.ready?this.identIndex[d]:null},_fetchItems:function(e,c,b){if(this.ready){var a=dojo.clone(e.query||{});dojo.forEach(d.keys(a),function(b){dojo.isArray(a[b])||(a[b]=[a[b]])},this);b=f.objectFingerprint(a);b==this.previousQueryFingerprint?
b=this.previousResults:(this.previousQueryFingerprint=b,this.previousResults=b=this._doQuery(a));c(b,e);this.onFetchSuccess()}else this.onReady(dojo.hitch(this,"_fetchItems",e,c,b))},_doQuery:function(e){var c=this._compileTextFilter(e.text);delete e.text;var b=[],a=[];c&&(a.push(this._filterDeleted(l.filter(d.values(this.identIndex),c)).sort(dojo.hitch(this,"_itemSortFunc"))),a[0].facetName="Contains text");a.push.apply(a,dojo.map(d.keys(e),function(a){var b=e[a],c=[];if(!this.facetIndexes.byName[a])throw console.error("No facet defined with name '"+
a+"'."),"No facet defined with name '"+a+"', faceted search failed.";dojo.forEach(b,function(b){c.push.apply(c,this._filterDeleted((this.facetIndexes.byName[a].byValue[b]||{}).items||[]))},this);c.facetName=a;c.sort(dojo.hitch(this,"_itemSortFunc"));return c},this));dojo.forEach(a,function(a){a.myOffset=0;a.topItem=function(){return this[this.myOffset]};a.shift=function(){this.myOffset++}});var f={};if(a.length){var g=0;for(dojo.forEach(a,function(a){g+=a.length});g;){var h={},k=[],r,p;dojo.forEach(a,
function(a,b){r=(p=a.topItem())?this.getIdentity(p):"(at end of set)";h[r]?h[r].push(a):(h[r]=[a],k.push(r))},this);1==k.length?b.push(p):(k.sort(),"(at end of set)"==k[0]?(r=k[1],c=0):(r=k[0],c=1),r="(at end of set)"==k[0]?k[1]:k[0],2==k.length&&h[r].length==a.length-1&&(c=h[k[c]][0],this._countItem(f,h[r][0].topItem(),c.facetName)));dojo.forEach(h[r],function(a){a.shift();g--})}}else b=this._filterDeleted(d.values(this.identIndex));dojo.forEach(d.keys(f).concat(["__other__"]),function(a){dojo.forEach(b,
function(b){this._countItem(f,b,a)},this)},this);1==a.length&&dojo.forEach(d.values(this.identIndex),function(b){this._countItem(f,b,a[0].facetName)},this);this._fetchFacetCounts=f;this._fetchCount=b.length;return b},_countItem:function(d,c,b){var a=d[b];a||(a=d[b]={});dojo.forEach("__other__"==b?this.facets:[b],function(b){var d=this.getValue(c,b,this._noDataValue),e=a[b];e||(e=a[b]={},e[d]=0);e[d]=(e[d]||0)+1},this)},onReady:function(d,c){d=d||dojo.global;c=dojo.hitch(d,c);this.ready?c():this.onReadyFuncs.push(c)},
_onReady:function(){dojo.forEach(this.onReadyFuncs||[],function(d){d.call()})},onFetchSuccess:function(){},onNew:function(d){},onDelete:function(d){},onSet:function(d,c,b,a){},_filterDeleted:function(d){return l.filter(d,function(c){return!c.DELETED})},_compileTextFilter:function(d){if(void 0===d)return null;for(var c=/\s*["']([^"']+)["']\s*/g,b=/(\S+)/g,a=function(){var a=c.exec(d)||b.exec(d);if(a){var a=a[1],f=Math.max(c.lastIndex,b.lastIndex);b.lastIndex=c.lastIndex=f}return a},f=[],g;g=a();)g=
dojo.regexp.escapeString(g,"*?").replace(/\*/g,".+").replace(/ /g,"\\s+").replace(/\?/g,"."),f.push(RegExp(g,"i"));return dojo.hitch(this,function(a){return dojo.some(this.facets,function(b){var c=this.getValue(a,b);return l.every(f,function(a){return a.test(c)})},this)})},getFeatures:function(){return{"dojo.data.api.Read":!0,"dojo.data.api.Identity":!0,"dojo.data.api.Notification":!0}},close:function(){},getLabel:function(d){return this.getValue(d,"key",void 0)},getLabelAttributes:function(d){return["key"]},
getIdentityAttributes:function(){return["label"]},getIdentity:function(d){return this.getValue(d,"label",void 0)},fetchItemByIdentity:function(d){return this.identIndex[d]}});dojo.extend(k,h);return k})},"dojo/data/util/simpleFetch":function(){define(["../../_base/lang","../../_base/kernel","./sorter"],function(k,l,h){var g={};k.setObject("dojo.data.util.simpleFetch",g);g.errorHandler=function(f,d){d.onError&&d.onError.call(d.scope||l.global,f,d)};g.fetchHandler=function(f,d){var e=d.abort||null,
c=!1,b=d.start?d.start:0,a=d.count&&Infinity!==d.count?b+d.count:f.length;d.abort=function(){c=!0;e&&e.call(d)};var g=d.scope||l.global;d.store||(d.store=this);d.onBegin&&d.onBegin.call(g,f.length,d);d.sort&&f.sort(h.createSortFunction(d.sort,this));if(d.onItem)for(var k=b;k<f.length&&k<a;++k){var q=f[k];c||d.onItem.call(g,q,d)}d.onComplete&&!c&&(k=null,d.onItem||(k=f.slice(b,a)),d.onComplete.call(g,k,d))};g.fetch=function(f){f=f||{};f.store||(f.store=this);this._fetchItems(f,k.hitch(this,"fetchHandler"),
k.hitch(this,"errorHandler"));return f};return g})},"xstyle/core/load-css":function(){define([],function(){function k(d){if(g.createStyleSheet){var e=g.createStyleSheet();e.cssText=d;return e.owningElement}e=g.createElement("style");e.setAttribute("type","text/css");e.appendChild(g.createTextNode(d));f.insertBefore(e,f.firstChild);return e}function l(d,e,c){var b=h[d];if(b)return a=k(b),e(a);var a=g.createElement("link");a.type="text/css";a.rel="stylesheet";a.href=d;var l=!c||!1!==c.wait;c=(c=navigator.userAgent.match(/AppleWebKit\/(\d+\.?\d*)/))&&
+c[1];if(null===a.onload&&!(536>c))a.onload=function(){a.onload=null;a.onerror=null;l&&e(a)},a.onerror=function(){console.error("Error loading stylesheet "+d);l&&e(a)};else if(l)var n=setInterval(function(){a.style&&(clearInterval(n),e(a))},15);(f||g.getElementsByTagName("head")[0]).appendChild(a);l||e(a)}var h="undefined"==typeof _css_cache?{}:_css_cache,g=document,f=g.head;l.insertCss=k;return l})},"dojox/gfx/svg":function(){define("dojo/_base/lang dojo/_base/sniff dojo/_base/window dojo/dom dojo/_base/declare dojo/_base/array dojo/dom-geometry dojo/dom-attr dojo/_base/Color ./_base ./shape ./path".split(" "),
function(k,l,h,g,f,d,e,c,b,a,m,n){function q(a,b){return h.doc.createElementNS?h.doc.createElementNS(a,b):h.doc.createElement(b)}function s(a){return r.useSvgWeb?h.doc.createTextNode(a,!0):h.doc.createTextNode(a)}var r=a.svg={};r.useSvgWeb="undefined"!=typeof window.svgweb;var p=navigator.userAgent,t=l("ios"),u=l("android"),v=l("chrome")||u&&4<=u?"auto":"optimizeLegibility";r.xmlns={xlink:"http://www.w3.org/1999/xlink",svg:"http://www.w3.org/2000/svg"};r.getRef=function(a){return!a||"none"==a?null:
a.match(/^url\(#.+\)$/)?g.byId(a.slice(5,-1)):a.match(/^#dojoUnique\d+$/)?g.byId(a.slice(1)):null};r.dasharray={solid:"none",shortdash:[4,1],shortdot:[1,1],shortdashdot:[4,1,1,1],shortdashdotdot:[4,1,1,1,1,1],dot:[1,3],dash:[4,3],longdash:[8,3],dashdot:[4,3,1,3],longdashdot:[8,3,1,3],longdashdotdot:[8,3,1,3,1,3]};var x=0;r.Shape=f("dojox.gfx.svg.Shape",m.Shape,{destroy:function(){if(this.fillStyle&&"type"in this.fillStyle){var a=this.rawNode.getAttribute("fill");(a=r.getRef(a))&&a.parentNode.removeChild(a)}if(this.clip&&
(a=this.rawNode.getAttribute("clip-path")))(a=g.byId(a.match(/gfx_clip[\d]+/)[0]))&&a.parentNode.removeChild(a);m.Shape.prototype.destroy.apply(this,arguments)},setFill:function(b){if(!b)return this.fillStyle=null,this.rawNode.setAttribute("fill","none"),this.rawNode.setAttribute("fill-opacity",0),this;var c,e=function(a){this.setAttribute(a,c[a].toFixed(8))};if("object"==typeof b&&"type"in b){switch(b.type){case "linear":c=a.makeParameters(a.defaultLinearGradient,b);b=this._setFillObject(c,"linearGradient");
d.forEach(["x1","y1","x2","y2"],e,b);break;case "radial":c=a.makeParameters(a.defaultRadialGradient,b);b=this._setFillObject(c,"radialGradient");d.forEach(["cx","cy","r"],e,b);break;case "pattern":c=a.makeParameters(a.defaultPattern,b),b=this._setFillObject(c,"pattern"),d.forEach(["x","y","width","height"],e,b)}this.fillStyle=c;return this}this.fillStyle=c=a.normalizeColor(b);this.rawNode.setAttribute("fill",c.toCss());this.rawNode.setAttribute("fill-opacity",c.a);this.rawNode.setAttribute("fill-rule",
"evenodd");return this},setStroke:function(c){var d=this.rawNode;if(!c)return this.strokeStyle=null,d.setAttribute("stroke","none"),d.setAttribute("stroke-opacity",0),this;if("string"==typeof c||k.isArray(c)||c instanceof b)c={color:c};c=this.strokeStyle=a.makeParameters(a.defaultStroke,c);c.color=a.normalizeColor(c.color);if(c){d.setAttribute("stroke",c.color.toCss());d.setAttribute("stroke-opacity",c.color.a);d.setAttribute("stroke-width",c.width);d.setAttribute("stroke-linecap",c.cap);"number"==
typeof c.join?(d.setAttribute("stroke-linejoin","miter"),d.setAttribute("stroke-miterlimit",c.join)):d.setAttribute("stroke-linejoin",c.join);var e=c.style.toLowerCase();e in r.dasharray&&(e=r.dasharray[e]);if(e instanceof Array){var e=k._toArray(e),f;for(f=0;f<e.length;++f)e[f]*=c.width;if("butt"!=c.cap){for(f=0;f<e.length;f+=2)e[f]-=c.width,1>e[f]&&(e[f]=1);for(f=1;f<e.length;f+=2)e[f]+=c.width}e=e.join(",")}d.setAttribute("stroke-dasharray",e);d.setAttribute("dojoGfxStrokeStyle",c.style)}return this},
_getParentSurface:function(){for(var b=this.parent;b&&!(b instanceof a.Surface);b=b.parent);return b},_setFillObject:function(b,c){var d=r.xmlns.svg;this.fillStyle=b;var e=this._getParentSurface().defNode,f=this.rawNode.getAttribute("fill");if(f=r.getRef(f))if(f.tagName.toLowerCase()!=c.toLowerCase()){var g=f.id;f.parentNode.removeChild(f);f=q(d,c);f.setAttribute("id",g);e.appendChild(f)}else for(;f.childNodes.length;)f.removeChild(f.lastChild);else f=q(d,c),f.setAttribute("id",a._base._getUniqueId()),
e.appendChild(f);if("pattern"==c)f.setAttribute("patternUnits","userSpaceOnUse"),d=q(d,"image"),d.setAttribute("x",0),d.setAttribute("y",0),d.setAttribute("width",b.width.toFixed(8)),d.setAttribute("height",b.height.toFixed(8)),d.setAttributeNS?d.setAttributeNS(r.xmlns.xlink,"xlink:href",b.src):d.setAttribute("xlink:href",b.src),f.appendChild(d);else{f.setAttribute("gradientUnits","userSpaceOnUse");for(e=0;e<b.colors.length;++e){var g=b.colors[e],h=q(d,"stop"),k=g.color=a.normalizeColor(g.color);
h.setAttribute("offset",g.offset.toFixed(8));h.setAttribute("stop-color",k.toCss());h.setAttribute("stop-opacity",k.a);f.appendChild(h)}}this.rawNode.setAttribute("fill","url(#"+f.getAttribute("id")+")");this.rawNode.removeAttribute("fill-opacity");this.rawNode.setAttribute("fill-rule","evenodd");return f},_applyTransform:function(){if(this.matrix){var a=this.matrix;this.rawNode.setAttribute("transform","matrix("+a.xx.toFixed(8)+","+a.yx.toFixed(8)+","+a.xy.toFixed(8)+","+a.yy.toFixed(8)+","+a.dx.toFixed(8)+
","+a.dy.toFixed(8)+")")}else this.rawNode.removeAttribute("transform");return this},setRawNode:function(a){a=this.rawNode=a;"image"!=this.shape.type&&a.setAttribute("fill","none");a.setAttribute("fill-opacity",0);a.setAttribute("stroke","none");a.setAttribute("stroke-opacity",0);a.setAttribute("stroke-width",1);a.setAttribute("stroke-linecap","butt");a.setAttribute("stroke-linejoin","miter");a.setAttribute("stroke-miterlimit",4);a.__gfxObject__=this},setShape:function(b){this.shape=a.makeParameters(this.shape,
b);for(var c in this.shape)"type"!=c&&this.rawNode.setAttribute(c,this.shape[c]);this.bbox=null;return this},_moveToFront:function(){this.rawNode.parentNode.appendChild(this.rawNode);return this},_moveToBack:function(){this.rawNode.parentNode.insertBefore(this.rawNode,this.rawNode.parentNode.firstChild);return this},setClip:function(a){this.inherited(arguments);var b=a?"width"in a?"rect":"cx"in a?"ellipse":"points"in a?"polyline":"d"in a?"path":null:null;if(a&&!b)return this;"polyline"===b&&(a=k.clone(a),
a.points=a.points.join(","));var d,e=c.get(this.rawNode,"clip-path");e&&(d=g.byId(e.match(/gfx_clip[\d]+/)[0]))&&d.removeChild(d.childNodes[0]);a?(d?(b=q(r.xmlns.svg,b),d.appendChild(b)):(e="gfx_clip"+ ++x,this.rawNode.setAttribute("clip-path","url(#"+e+")"),d=q(r.xmlns.svg,"clipPath"),b=q(r.xmlns.svg,b),d.appendChild(b),this.rawNode.parentNode.appendChild(d),c.set(d,"id",e)),c.set(b,a)):(this.rawNode.removeAttribute("clip-path"),d&&d.parentNode.removeChild(d));return this},_removeClipNode:function(){var a,
b=c.get(this.rawNode,"clip-path");b&&(a=g.byId(b.match(/gfx_clip[\d]+/)[0]))&&a.parentNode.removeChild(a);return a}});r.Group=f("dojox.gfx.svg.Group",r.Shape,{constructor:function(){m.Container._init.call(this)},setRawNode:function(a){this.rawNode=a;this.rawNode.__gfxObject__=this},destroy:function(){this.clear(!0);r.Shape.prototype.destroy.apply(this,arguments)}});r.Group.nodeType="g";r.Rect=f("dojox.gfx.svg.Rect",[r.Shape,m.Rect],{setShape:function(b){this.shape=a.makeParameters(this.shape,b);this.bbox=
null;for(var c in this.shape)"type"!=c&&"r"!=c&&this.rawNode.setAttribute(c,this.shape[c]);null!=this.shape.r&&(this.rawNode.setAttribute("ry",this.shape.r),this.rawNode.setAttribute("rx",this.shape.r));return this}});r.Rect.nodeType="rect";r.Ellipse=f("dojox.gfx.svg.Ellipse",[r.Shape,m.Ellipse],{});r.Ellipse.nodeType="ellipse";r.Circle=f("dojox.gfx.svg.Circle",[r.Shape,m.Circle],{});r.Circle.nodeType="circle";r.Line=f("dojox.gfx.svg.Line",[r.Shape,m.Line],{});r.Line.nodeType="line";r.Polyline=f("dojox.gfx.svg.Polyline",
[r.Shape,m.Polyline],{setShape:function(b,c){b&&b instanceof Array?(this.shape=a.makeParameters(this.shape,{points:b}),c&&this.shape.points.length&&this.shape.points.push(this.shape.points[0])):this.shape=a.makeParameters(this.shape,b);this.bbox=null;this._normalizePoints();for(var d=[],e=this.shape.points,f=0;f<e.length;++f)d.push(e[f].x.toFixed(8),e[f].y.toFixed(8));this.rawNode.setAttribute("points",d.join(" "));return this}});r.Polyline.nodeType="polyline";r.Image=f("dojox.gfx.svg.Image",[r.Shape,
m.Image],{setShape:function(b){this.shape=a.makeParameters(this.shape,b);this.bbox=null;b=this.rawNode;for(var c in this.shape)"type"!=c&&"src"!=c&&b.setAttribute(c,this.shape[c]);b.setAttribute("preserveAspectRatio","none");b.setAttributeNS?b.setAttributeNS(r.xmlns.xlink,"xlink:href",this.shape.src):b.setAttribute("xlink:href",this.shape.src);b.__gfxObject__=this;return this}});r.Image.nodeType="image";r.Text=f("dojox.gfx.svg.Text",[r.Shape,m.Text],{setShape:function(b){this.shape=a.makeParameters(this.shape,
b);this.bbox=null;b=this.rawNode;var c=this.shape;b.setAttribute("x",c.x);b.setAttribute("y",c.y);b.setAttribute("text-anchor",c.align);b.setAttribute("text-decoration",c.decoration);b.setAttribute("rotate",c.rotated?90:0);b.setAttribute("kerning",c.kerning?"auto":0);b.setAttribute("text-rendering",v);b.firstChild?b.firstChild.nodeValue=c.text:b.appendChild(s(c.text));return this},getTextWidth:function(){var a=this.rawNode,b=a.parentNode,a=a.cloneNode(!0);a.style.visibility="hidden";var c=0,d=a.firstChild.nodeValue;
b.appendChild(a);if(""!=d)for(;!c;)c=a.getBBox?parseInt(a.getBBox().width):68;b.removeChild(a);return c},getBoundingBox:function(){var a=null;if(this.getShape().text)try{a=this.rawNode.getBBox()}catch(b){a={x:0,y:0,width:0,height:0}}return a}});r.Text.nodeType="text";r.Path=f("dojox.gfx.svg.Path",[r.Shape,n.Path],{_updateWithSegment:function(a){this.inherited(arguments);"string"==typeof this.shape.path&&this.rawNode.setAttribute("d",this.shape.path)},setShape:function(a){this.inherited(arguments);
this.shape.path?this.rawNode.setAttribute("d",this.shape.path):this.rawNode.removeAttribute("d");return this}});r.Path.nodeType="path";r.TextPath=f("dojox.gfx.svg.TextPath",[r.Shape,n.TextPath],{_updateWithSegment:function(a){this.inherited(arguments);this._setTextPath()},setShape:function(a){this.inherited(arguments);this._setTextPath();return this},_setTextPath:function(){if("string"==typeof this.shape.path){var b=this.rawNode;if(!b.firstChild){var c=q(r.xmlns.svg,"textPath"),d=s("");c.appendChild(d);
b.appendChild(c)}c=(c=b.firstChild.getAttributeNS(r.xmlns.xlink,"href"))&&r.getRef(c);if(!c&&(d=this._getParentSurface())){var d=d.defNode,c=q(r.xmlns.svg,"path"),e=a._base._getUniqueId();c.setAttribute("id",e);d.appendChild(c);b.firstChild.setAttributeNS?b.firstChild.setAttributeNS(r.xmlns.xlink,"xlink:href","#"+e):b.firstChild.setAttribute("xlink:href","#"+e)}c&&c.setAttribute("d",this.shape.path)}},_setText:function(){var a=this.rawNode;if(!a.firstChild){var b=q(r.xmlns.svg,"textPath"),c=s("");
b.appendChild(c);a.appendChild(b)}a=a.firstChild;b=this.text;a.setAttribute("alignment-baseline","middle");switch(b.align){case "middle":a.setAttribute("text-anchor","middle");a.setAttribute("startOffset","50%");break;case "end":a.setAttribute("text-anchor","end");a.setAttribute("startOffset","100%");break;default:a.setAttribute("text-anchor","start"),a.setAttribute("startOffset","0%")}a.setAttribute("baseline-shift","0.5ex");a.setAttribute("text-decoration",b.decoration);a.setAttribute("rotate",
b.rotated?90:0);a.setAttribute("kerning",b.kerning?"auto":0);a.firstChild.data=b.text}});r.TextPath.nodeType="text";var w=534<function(){var a=/WebKit\/(\d*)/.exec(p);return a?a[1]:0}();r.Surface=f("dojox.gfx.svg.Surface",m.Surface,{constructor:function(){m.Container._init.call(this)},destroy:function(){m.Container.clear.call(this,!0);this.defNode=null;this.inherited(arguments)},setDimensions:function(a,b){if(!this.rawNode)return this;this.rawNode.setAttribute("width",a);this.rawNode.setAttribute("height",
b);w&&(this.rawNode.style.width=a,this.rawNode.style.height=b);return this},getDimensions:function(){return this.rawNode?{width:a.normalizedLength(this.rawNode.getAttribute("width")),height:a.normalizedLength(this.rawNode.getAttribute("height"))}:null}});r.createSurface=function(b,c,d){var e=new r.Surface;e.rawNode=q(r.xmlns.svg,"svg");e.rawNode.setAttribute("overflow","hidden");c&&e.rawNode.setAttribute("width",c);d&&e.rawNode.setAttribute("height",d);c=q(r.xmlns.svg,"defs");e.rawNode.appendChild(c);
e.defNode=c;e._parent=g.byId(b);e._parent.appendChild(e.rawNode);a._base._fixMsTouchAction(e);return e};l={_setFont:function(){var a=this.fontStyle;this.rawNode.setAttribute("font-style",a.style);this.rawNode.setAttribute("font-variant",a.variant);this.rawNode.setAttribute("font-weight",a.weight);this.rawNode.setAttribute("font-size",a.size);this.rawNode.setAttribute("font-family",a.family)}};var y=m.Container;f={openBatch:function(){if(!this._batch){var a;a=r.useSvgWeb?h.doc.createDocumentFragment(!0):
h.doc.createDocumentFragment();this.fragment=a}++this._batch;return this},closeBatch:function(){this._batch=0<this._batch?--this._batch:0;this.fragment&&!this._batch&&(this.rawNode.appendChild(this.fragment),delete this.fragment);return this},add:function(a){this!=a.getParent()&&(this.fragment?this.fragment.appendChild(a.rawNode):this.rawNode.appendChild(a.rawNode),y.add.apply(this,arguments),a.setClip(a.clip));return this},remove:function(a,b){this==a.getParent()&&(this.rawNode==a.rawNode.parentNode&&
this.rawNode.removeChild(a.rawNode),this.fragment&&this.fragment==a.rawNode.parentNode&&this.fragment.removeChild(a.rawNode),a._removeClipNode(),y.remove.apply(this,arguments));return this},clear:function(){for(var a=this.rawNode;a.lastChild;)a.removeChild(a.lastChild);var b=this.defNode;if(b){for(;b.lastChild;)b.removeChild(b.lastChild);a.appendChild(b)}return y.clear.apply(this,arguments)},getBoundingBox:y.getBoundingBox,_moveChildToFront:y._moveChildToFront,_moveChildToBack:y._moveChildToBack};
n={createObject:function(a,b){if(!this.rawNode)return null;var c=new a,d=q(r.xmlns.svg,a.nodeType);c.setRawNode(d);c.setShape(b);this.add(c);return c}};k.extend(r.Text,l);k.extend(r.TextPath,l);k.extend(r.Group,f);k.extend(r.Group,m.Creator);k.extend(r.Group,n);k.extend(r.Surface,f);k.extend(r.Surface,m.Creator);k.extend(r.Surface,n);r.fixTarget=function(a,b){a.gfxTarget||(a.gfxTarget=t&&a.target.wholeText?a.target.parentElement.__gfxObject__:a.target.__gfxObject__);return!0};r.useSvgWeb&&(r.createSurface=
function(b,c,d){var f=new r.Surface;if(!c||!d){var h=e.position(b);c=c||h.w;d=d||h.h}b=g.byId(b);var h=b.id?b.id+"_svgweb":a._base._getUniqueId(),k=q(r.xmlns.svg,"svg");k.id=h;k.setAttribute("width",c);k.setAttribute("height",d);svgweb.appendChild(k,b);k.addEventListener("SVGLoad",function(){f.rawNode=this;f.isLoaded=!0;var a=q(r.xmlns.svg,"defs");f.rawNode.appendChild(a);f.defNode=a;if(f.onLoad)f.onLoad(f)},!1);f.isLoaded=!1;return f},r.Surface.extend({destroy:function(){var a=this.rawNode;svgweb.removeChild(a,
a.parentNode)}}),l={connect:function(a,b,c){"on"===a.substring(0,2)&&(a=a.substring(2));c=2==arguments.length?b:k.hitch(b,c);this.getEventSource().addEventListener(a,c,!1);return[this,a,c]},disconnect:function(a){this.getEventSource().removeEventListener(a[1],a[2],!1);delete a[0]}},k.extend(r.Shape,l),k.extend(r.Surface,l));return r})},"dojox/gfx/path":function(){define(["./_base","dojo/_base/lang","dojo/_base/declare","./matrix","./shape"],function(k,l,h,g,f){f=h("dojox.gfx.path.Path",f.Shape,{constructor:function(d){this.shape=
l.clone(k.defaultPath);this.segments=[];this.tbbox=null;this.absolute=!0;this.last={};this.rawNode=d;this.segmented=!1},setAbsoluteMode:function(d){this._confirmSegmented();this.absolute="string"==typeof d?"absolute"==d:d;return this},getAbsoluteMode:function(){this._confirmSegmented();return this.absolute},getBoundingBox:function(){this._confirmSegmented();return this.bbox&&"l"in this.bbox?{x:this.bbox.l,y:this.bbox.t,width:this.bbox.r-this.bbox.l,height:this.bbox.b-this.bbox.t}:null},_getRealBBox:function(){this._confirmSegmented();
if(this.tbbox)return this.tbbox;var d=this.bbox,e=this._getRealMatrix();this.bbox=null;for(var c=0,b=this.segments.length;c<b;++c)this._updateWithSegment(this.segments[c],e);e=this.bbox;this.bbox=d;return this.tbbox=e?[{x:e.l,y:e.t},{x:e.r,y:e.t},{x:e.r,y:e.b},{x:e.l,y:e.b}]:null},getLastPosition:function(){this._confirmSegmented();return"x"in this.last?this.last:null},_applyTransform:function(){this.tbbox=null;return this.inherited(arguments)},_updateBBox:function(d,e,c){c&&(e=g.multiplyPoint(c,
d,e),d=e.x,e=e.y);this.bbox&&"l"in this.bbox?(this.bbox.l>d&&(this.bbox.l=d),this.bbox.r<d&&(this.bbox.r=d),this.bbox.t>e&&(this.bbox.t=e),this.bbox.b<e&&(this.bbox.b=e)):this.bbox={l:d,b:e,r:d,t:e}},_updateWithSegment:function(d,e){var c=d.args,b=c.length,a;switch(d.action){case "M":case "L":case "C":case "S":case "Q":case "T":for(a=0;a<b;a+=2)this._updateBBox(c[a],c[a+1],e);this.last.x=c[b-2];this.last.y=c[b-1];this.absolute=!0;break;case "H":for(a=0;a<b;++a)this._updateBBox(c[a],this.last.y,e);
this.last.x=c[b-1];this.absolute=!0;break;case "V":for(a=0;a<b;++a)this._updateBBox(this.last.x,c[a],e);this.last.y=c[b-1];this.absolute=!0;break;case "m":a=0;"x"in this.last||(this._updateBBox(this.last.x=c[0],this.last.y=c[1],e),a=2);for(;a<b;a+=2)this._updateBBox(this.last.x+=c[a],this.last.y+=c[a+1],e);this.absolute=!1;break;case "l":case "t":for(a=0;a<b;a+=2)this._updateBBox(this.last.x+=c[a],this.last.y+=c[a+1],e);this.absolute=!1;break;case "h":for(a=0;a<b;++a)this._updateBBox(this.last.x+=
c[a],this.last.y,e);this.absolute=!1;break;case "v":for(a=0;a<b;++a)this._updateBBox(this.last.x,this.last.y+=c[a],e);this.absolute=!1;break;case "c":for(a=0;a<b;a+=6)this._updateBBox(this.last.x+c[a],this.last.y+c[a+1],e),this._updateBBox(this.last.x+c[a+2],this.last.y+c[a+3],e),this._updateBBox(this.last.x+=c[a+4],this.last.y+=c[a+5],e);this.absolute=!1;break;case "s":case "q":for(a=0;a<b;a+=4)this._updateBBox(this.last.x+c[a],this.last.y+c[a+1],e),this._updateBBox(this.last.x+=c[a+2],this.last.y+=
c[a+3],e);this.absolute=!1;break;case "A":for(a=0;a<b;a+=7)this._updateBBox(c[a+5],c[a+6],e);this.last.x=c[b-2];this.last.y=c[b-1];this.absolute=!0;break;case "a":for(a=0;a<b;a+=7)this._updateBBox(this.last.x+=c[a+5],this.last.y+=c[a+6],e);this.absolute=!1}var f=[d.action];for(a=0;a<b;++a)f.push(k.formatNumber(c[a],!0));if("string"==typeof this.shape.path)this.shape.path+=f.join("");else{a=0;for(b=f.length;a<b;++a)this.shape.path.push(f[a])}},_validSegments:{m:2,l:2,h:1,v:1,c:6,s:4,q:4,t:2,a:7,z:0},
_pushSegment:function(d,e){this.tbbox=null;var c=this._validSegments[d.toLowerCase()];"number"==typeof c&&(c?e.length>=c&&(c={action:d,args:e.slice(0,e.length-e.length%c)},this.segments.push(c),this._updateWithSegment(c)):(c={action:d,args:[]},this.segments.push(c),this._updateWithSegment(c)))},_collectArgs:function(d,e){for(var c=0;c<e.length;++c){var b=e[c];"boolean"==typeof b?d.push(b?1:0):"number"==typeof b?d.push(b):b instanceof Array?this._collectArgs(d,b):"x"in b&&"y"in b&&d.push(b.x,b.y)}},
moveTo:function(){this._confirmSegmented();var d=[];this._collectArgs(d,arguments);this._pushSegment(this.absolute?"M":"m",d);return this},lineTo:function(){this._confirmSegmented();var d=[];this._collectArgs(d,arguments);this._pushSegment(this.absolute?"L":"l",d);return this},hLineTo:function(){this._confirmSegmented();var d=[];this._collectArgs(d,arguments);this._pushSegment(this.absolute?"H":"h",d);return this},vLineTo:function(){this._confirmSegmented();var d=[];this._collectArgs(d,arguments);
this._pushSegment(this.absolute?"V":"v",d);return this},curveTo:function(){this._confirmSegmented();var d=[];this._collectArgs(d,arguments);this._pushSegment(this.absolute?"C":"c",d);return this},smoothCurveTo:function(){this._confirmSegmented();var d=[];this._collectArgs(d,arguments);this._pushSegment(this.absolute?"S":"s",d);return this},qCurveTo:function(){this._confirmSegmented();var d=[];this._collectArgs(d,arguments);this._pushSegment(this.absolute?"Q":"q",d);return this},qSmoothCurveTo:function(){this._confirmSegmented();
var d=[];this._collectArgs(d,arguments);this._pushSegment(this.absolute?"T":"t",d);return this},arcTo:function(){this._confirmSegmented();var d=[];this._collectArgs(d,arguments);this._pushSegment(this.absolute?"A":"a",d);return this},closePath:function(){this._confirmSegmented();this._pushSegment("Z",[]);return this},_confirmSegmented:function(){if(!this.segmented){var d=this.shape.path;this.shape.path=[];this._setPath(d);this.shape.path=this.shape.path.join("");this.segmented=!0}},_setPath:function(d){d=
l.isArray(d)?d:d.match(k.pathSvgRegExp);this.segments=[];this.absolute=!0;this.bbox={};this.last={};if(d){for(var e="",c=[],b=d.length,a=0;a<b;++a){var f=d[a],g=parseFloat(f);isNaN(g)?(e&&this._pushSegment(e,c),c=[],e=f):c.push(g)}this._pushSegment(e,c)}},setShape:function(d){this.inherited(arguments,["string"==typeof d?{path:d}:d]);this.segmented=!1;this.segments=[];k.lazyPathSegmentation||this._confirmSegmented();return this},_2PI:2*Math.PI});h=h("dojox.gfx.path.TextPath",f,{constructor:function(d){"text"in
this||(this.text=l.clone(k.defaultTextPath));"fontStyle"in this||(this.fontStyle=l.clone(k.defaultFont))},getText:function(){return this.text},setText:function(d){this.text=k.makeParameters(this.text,"string"==typeof d?{text:d}:d);this._setText();return this},getFont:function(){return this.fontStyle},setFont:function(d){this.fontStyle="string"==typeof d?k.splitFontString(d):k.makeParameters(k.defaultFont,d);this._setFont();return this}});return k.path={Path:f,TextPath:h}})},"dojox/data/CsvStore":function(){define("dojo/_base/lang dojo/_base/declare dojo/_base/xhr dojo/_base/kernel dojo/data/util/filter dojo/data/util/simpleFetch".split(" "),
function(k,l,h,g,f,d){l=l("dojox.data.CsvStore",null,{constructor:function(d){this._attributes=[];this._attributeIndexes={};this._dataArray=[];this._arrayOfAllItems=[];this._loadFinished=!1;d.url&&(this.url=d.url);this._csvData=d.data;d.label?this.label=d.label:""===this.label&&(this.label=void 0);this._storeProp="_csvStore";this._idProp="_csvId";this._features={"dojo.data.api.Read":!0,"dojo.data.api.Identity":!0};this._loadInProgress=!1;this._queuedFetches=[];this.identifier=d.identifier;""===this.identifier?
delete this.identifier:this._idMap={};"separator"in d&&(this.separator=d.separator);"urlPreventCache"in d&&(this.urlPreventCache=d.urlPreventCache?!0:!1)},url:"",label:"",identifier:"",separator:",",urlPreventCache:!1,_assertIsItem:function(d){if(!this.isItem(d))throw Error(this.declaredClass+": a function was passed an item argument that was not an item");},_getIndex:function(d){d=this.getIdentity(d);this.identifier&&(d=this._idMap[d]);return d},getValue:function(d,c,b){this._assertIsItem(d);var a=
b;if("string"===typeof c)c=this._attributeIndexes[c],null!=c&&(a=this._dataArray[this._getIndex(d)][c]||b);else throw Error(this.declaredClass+": a function was passed an attribute argument that was not a string");return a},getValues:function(d,c){var b=this.getValue(d,c);return b?[b]:[]},getAttributes:function(d){this._assertIsItem(d);var c=[];d=this._dataArray[this._getIndex(d)];for(var b=0;b<d.length;b++)""!==d[b]&&c.push(this._attributes[b]);return c},hasAttribute:function(d,c){this._assertIsItem(d);
if("string"===typeof c){var b=this._attributeIndexes[c],a=this._dataArray[this._getIndex(d)];return"undefined"!==typeof b&&b<a.length&&""!==a[b]}throw Error(this.declaredClass+": a function was passed an attribute argument that was not a string");},containsValue:function(d,c,b){var a=void 0;"string"===typeof b&&(a=f.patternToRegExp(b,!1));return this._containsValue(d,c,b,a)},_containsValue:function(d,c,b,a){d=this.getValues(d,c);for(c=0;c<d.length;++c){var f=d[c];if("string"===typeof f&&a)return null!==
f.match(a);if(b===f)return!0}return!1},isItem:function(d){if(d&&d[this._storeProp]===this)if(d=d[this._idProp],this.identifier){if(this._dataArray[this._idMap[d]])return!0}else if(0<=d&&d<this._dataArray.length)return!0;return!1},isItemLoaded:function(d){return this.isItem(d)},loadItem:function(d){},getFeatures:function(){return this._features},getLabel:function(d){if(this.label&&this.isItem(d))return this.getValue(d,this.label)},getLabelAttributes:function(d){return this.label?[this.label]:null},
_fetchItems:function(d,c,b){var a=this,g=function(b,d){var e=null;if(b.query){var g,h,e=[],k=b.queryOptions?b.queryOptions.ignoreCase:!1,l={};for(g in b.query)h=b.query[g],"string"===typeof h&&(l[g]=f.patternToRegExp(h,k));for(k=0;k<d.length;++k){var m=!0,n=d[k];for(g in b.query)h=b.query[g],a._containsValue(n,g,h,l[g])||(m=!1);m&&e.push(n)}}else e=d.slice(0,d.length);c(e,b)};if(this._loadFinished)g(d,this._arrayOfAllItems);else if(""!==this.url)if(this._loadInProgress)this._queuedFetches.push({args:d,
filter:g});else{this._loadInProgress=!0;var k=h.get({url:a.url,handleAs:"text",preventCache:a.urlPreventCache});k.addCallback(function(c){try{a._processData(c),g(d,a._arrayOfAllItems),a._handleQueuedFetches()}catch(f){b(f,d)}});k.addErrback(function(c){a._loadInProgress=!1;if(b)b(c,d);else throw c;});var l=null;d.abort&&(l=d.abort);d.abort=function(){k&&-1===k.fired&&k.cancel();l&&l.call(d)}}else if(this._csvData)try{this._processData(this._csvData),this._csvData=null,g(d,this._arrayOfAllItems)}catch(s){b(s,
d)}else{var r=Error(this.declaredClass+": No CSV source data was provided as either URL or String data input.");if(b)b(r,d);else throw r;}},close:function(d){},_getArrayOfArraysFromCsvFileContents:function(d){if(k.isString(d)){var c=RegExp("^\\s+","g"),b=RegExp("\\s+$","g"),a=RegExp('""',"g"),f=[],g=this._splitLines(d);for(d=0;d<g.length;++d){var h=g[d];if(0<h.length){for(var h=h.split(this.separator),l=0;l<h.length;){var r=h[l].replace(c,""),p=r.replace(b,""),t=p.charAt(0),u=p.charAt(p.length-1),
v=p.charAt(p.length-2),x=p.charAt(p.length-3);if(2===p.length&&'""'==p)h[l]="";else if('"'==t&&('"'!=u||'"'==u&&'"'==v&&'"'!=x)){if(l+1===h.length)return;h[l]=r+this.separator+h[l+1];h.splice(l+1,1)}else'"'==t&&'"'==u&&(p=p.slice(1,p.length-1),p=p.replace(a,'"')),h[l]=p,l+=1}f.push(h)}}this._attributes=f.shift();for(d=0;d<this._attributes.length;d++)this._attributeIndexes[this._attributes[d]]=d;this._dataArray=f}},_splitLines:function(d){var c=[],b,a="",f=!1;for(b=0;b<d.length;b++){var g=d.charAt(b);
switch(g){case '"':f=!f;a+=g;break;case "\r":f?a+=g:(c.push(a),a="",b<d.length-1&&"\n"==d.charAt(b+1)&&b++);break;case "\n":f?a+=g:(c.push(a),a="");break;default:a+=g}}""!==a&&c.push(a);return c},_processData:function(d){this._getArrayOfArraysFromCsvFileContents(d);this._arrayOfAllItems=[];if(this.identifier&&void 0===this._attributeIndexes[this.identifier])throw Error(this.declaredClass+": Identity specified is not a column header in the data set.");for(d=0;d<this._dataArray.length;d++){var c=d;
this.identifier&&(c=this._dataArray[d][this._attributeIndexes[this.identifier]],this._idMap[c]=d);this._arrayOfAllItems.push(this._createItemFromIdentity(c))}this._loadFinished=!0;this._loadInProgress=!1},_createItemFromIdentity:function(d){var c={};c[this._storeProp]=this;c[this._idProp]=d;return c},getIdentity:function(d){return this.isItem(d)?d[this._idProp]:null},fetchItemByIdentity:function(d){var c,b=d.scope?d.scope:g.global;if(this._loadFinished)c=this._createItemFromIdentity(d.identity),this.isItem(c)||
(c=null),d.onItem&&d.onItem.call(b,c);else{var a=this;if(""!==this.url)this._loadInProgress?this._queuedFetches.push({args:d}):(this._loadInProgress=!0,c=h.get({url:a.url,handleAs:"text"}),c.addCallback(function(c){try{a._processData(c);var f=a._createItemFromIdentity(d.identity);a.isItem(f)||(f=null);d.onItem&&d.onItem.call(b,f);a._handleQueuedFetches()}catch(g){d.onError&&d.onError.call(b,g)}}),c.addErrback(function(a){this._loadInProgress=!1;d.onError&&d.onError.call(b,a)}));else if(this._csvData)try{a._processData(a._csvData),
a._csvData=null,c=a._createItemFromIdentity(d.identity),a.isItem(c)||(c=null),d.onItem&&d.onItem.call(b,c)}catch(f){d.onError&&d.onError.call(b,f)}}},getIdentityAttributes:function(d){return this.identifier?[this.identifier]:null},_handleQueuedFetches:function(){if(0<this._queuedFetches.length){for(var d=0;d<this._queuedFetches.length;d++){var c=this._queuedFetches[d],b=c.filter,a=c.args;b?b(a,this._arrayOfAllItems):this.fetchItemByIdentity(c.args)}this._queuedFetches=[]}}});k.extend(l,d);return l})},
"dojo/data/util/filter":function(){define(["../../_base/lang"],function(k){var l={};k.setObject("dojo.data.util.filter",l);l.patternToRegExp=function(h,g){for(var f="^",d=null,e=0;e<h.length;e++)switch(d=h.charAt(e),d){case "\\":f+=d;e++;f+=h.charAt(e);break;case "*":f+=".*";break;case "?":f+=".";break;case "$":case "^":case "/":case "+":case ".":case "|":case "(":case ")":case "{":case "}":case "[":case "]":f+="\\";default:f+=d}f+="$";return g?RegExp(f,"mi"):RegExp(f,"m")};return l})},"jszlib/main":function(){define(["jszlib/inflate"],
function(k){return{inflate:k}})},"jszlib/inflate":function(){define(["./arrayCopy"],function(k){function l(){}function h(){this.was=[0]}function g(a,b,e){this.hufts=new Int32Array(3*c);this.window=new Uint8Array(e);this.end=e;this.checkfn=b;this.mode=m;this.reset(a,null);this.index=this.table=this.left=0;this.blens=null;this.bb=new Int32Array(1);this.tb=new Int32Array(1);this.codes=new f;this.check=this.write=this.read=this.bitb=this.bitk=this.last=0;this.inftree=new d}function f(){}function d(){}
function e(a,b,c,d){if(null==b)return 1;var e=a&65535;a=a>>16&65535;for(var f;0<d;){f=d<w?d:w;for(d-=f;16<=f;)e+=b[c++]&255,a+=e,e+=b[c++]&255,a+=e,e+=b[c++]&255,a+=e,e+=b[c++]&255,a+=e,e+=b[c++]&255,a+=e,e+=b[c++]&255,a+=e,e+=b[c++]&255,a+=e,e+=b[c++]&255,a+=e,e+=b[c++]&255,a+=e,e+=b[c++]&255,a+=e,e+=b[c++]&255,a+=e,e+=b[c++]&255,a+=e,e+=b[c++]&255,a+=e,e+=b[c++]&255,a+=e,e+=b[c++]&255,a+=e,e+=b[c++]&255,a+=e,f-=16;if(0!=f){do e+=b[c++]&255,a+=e;while(0!=--f)}e%=x;a%=x}return a<<16|e}var c=1440,
b=["Z_OK: stream correct","Z_STREAM_END: end of stream","Z_NEED_DICT: stream not yet complete"];b[-1]="Z_ERRNO";b[-2]="Z_STREAM_ERROR";b[-3]="Z_DATA_ERROR";b[-4]="Z_MEM_ERROR";b[-5]="Z_BUF_ERROR: premature end of buffer";b[-6]="Z_VERSION_ERROR";var a=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],m=0,n=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,
0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,
106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,
0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,
75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,
0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,
8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,
0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,
15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],q=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],s=[3,4,5,6,7,8,9,10,11,13,15,17,19,
23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],r=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],p=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],t=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];l.prototype.inflateInit=function(a,b){a||(a=15);b&&(b=!1);this.istate=new h;return this.istate.inflateInit(this,b?-a:a)};l.prototype.inflate=function(a){return null==this.istate?-2:this.istate.inflate(this,
a)};l.prototype.inflateEnd=function(){if(null==this.istate)return-2;var a=istate.inflateEnd(this);this.istate=null;return a};l.prototype.inflateSync=function(){return istate.inflateSync(this)};l.prototype.inflateSetDictionary=function(a,b){return istate.inflateSetDictionary(this,a,b)};h.prototype.inflateReset=function(a){if(null==a||null==a.istate)return-2;a.total_in=a.total_out=0;a.msg=null;a.istate.mode=0!=a.istate.nowrap?7:0;a.istate.blocks.reset(a,null);return 0};h.prototype.inflateEnd=function(a){null!=
this.blocks&&this.blocks.free(a);this.blocks=null;return 0};h.prototype.inflateInit=function(a,b){this.blocks=a.msg=null;0>b&&(b=-b);if(8>b||15<b)return this.inflateEnd(a),-2;this.wbits=b;a.istate.blocks=new g(a,0!=a.istate.nowrap?null:this,1<<b);this.inflateReset(a);return 0};h.prototype.inflate=function(a,b){var c,d;if(null==a||null==a.istate||null==a.next_in)return-2;b=4==b?-5:0;for(c=-5;;)switch(a.istate.mode){case 0:if(0==a.avail_in)return c;c=b;a.avail_in--;a.total_in++;if(8!=((a.istate.method=
a.next_in[a.next_in_index++])&15)){a.istate.mode=13;a.msg="unknown compression method";a.istate.marker=5;break}if((a.istate.method>>4)+8>a.istate.wbits){a.istate.mode=13;a.msg="invalid window size";a.istate.marker=5;break}a.istate.mode=1;case 1:if(0==a.avail_in)return c;c=b;a.avail_in--;a.total_in++;d=a.next_in[a.next_in_index++]&255;if(0!=((a.istate.method<<8)+d)%31){a.istate.mode=13;a.msg="incorrect header check";a.istate.marker=5;break}if(0==(d&32)){a.istate.mode=7;break}a.istate.mode=2;case 2:if(0==
a.avail_in)return c;c=b;a.avail_in--;a.total_in++;a.istate.need=(a.next_in[a.next_in_index++]&255)<<24&4278190080;a.istate.mode=3;case 3:if(0==a.avail_in)return c;c=b;a.avail_in--;a.total_in++;a.istate.need+=(a.next_in[a.next_in_index++]&255)<<16&16711680;a.istate.mode=4;case 4:if(0==a.avail_in)return c;c=b;a.avail_in--;a.total_in++;a.istate.need+=(a.next_in[a.next_in_index++]&255)<<8&65280;a.istate.mode=5;case 5:if(0==a.avail_in)return c;a.avail_in--;a.total_in++;a.istate.need+=a.next_in[a.next_in_index++]&
255;a.adler=a.istate.need;a.istate.mode=6;return 2;case 6:return a.istate.mode=13,a.msg="need dictionary",a.istate.marker=0,-2;case 7:c=a.istate.blocks.proc(a,c);if(-3==c){a.istate.mode=13;a.istate.marker=0;break}0==c&&(c=b);if(1!=c)return c;c=b;a.istate.blocks.reset(a,a.istate.was);if(0!=a.istate.nowrap){a.istate.mode=12;break}a.istate.mode=8;case 8:if(0==a.avail_in)return c;c=b;a.avail_in--;a.total_in++;a.istate.need=(a.next_in[a.next_in_index++]&255)<<24&4278190080;a.istate.mode=9;case 9:if(0==
a.avail_in)return c;c=b;a.avail_in--;a.total_in++;a.istate.need+=(a.next_in[a.next_in_index++]&255)<<16&16711680;a.istate.mode=10;case 10:if(0==a.avail_in)return c;c=b;a.avail_in--;a.total_in++;a.istate.need+=(a.next_in[a.next_in_index++]&255)<<8&65280;a.istate.mode=11;case 11:if(0==a.avail_in)return c;c=b;a.avail_in--;a.total_in++;a.istate.need+=a.next_in[a.next_in_index++]&255;if(a.istate.was[0]!=a.istate.need){a.istate.mode=13;a.msg="incorrect data check";a.istate.marker=5;break}a.istate.mode=
12;case 12:return 1;case 13:return-3;default:return-2}};h.prototype.inflateSetDictionary=function(a,b,c){var d=0,f=c;if(null==a||null==a.istate||6!=a.istate.mode)return-2;if(e(1,b,0,c)!=a.adler)return-3;a.adler=e(0,null,0,0);f>=1<<a.istate.wbits&&(f=(1<<a.istate.wbits)-1,d=c-f);a.istate.blocks.set_dictionary(b,d,f);a.istate.mode=7;return 0};var u=[0,0,255,255];h.prototype.inflateSync=function(a){var b,c,d;if(null==a||null==a.istate)return-2;13!=a.istate.mode&&(a.istate.mode=13,a.istate.marker=0);
if(0==(b=a.avail_in))return-5;c=a.next_in_index;for(d=a.istate.marker;0!=b&&4>d;)a.next_in[c]==u[d]?d++:d=0!=a.next_in[c]?0:4-d,c++,b--;a.total_in+=c-a.next_in_index;a.next_in_index=c;a.avail_in=b;a.istate.marker=d;if(4!=d)return-3;b=a.total_in;c=a.total_out;this.inflateReset(a);a.total_in=b;a.total_out=c;a.istate.mode=7;return 0};h.prototype.inflateSyncPoint=function(a){return null==a||null==a.istate||null==a.istate.blocks?-2:a.istate.blocks.sync_point()};var v=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,
13,2,14,1,15];g.prototype.reset=function(a,b){b&&(b[0]=this.check);6==this.mode&&this.codes.free(a);this.mode=m;this.read=this.write=this.bitb=this.bitk=0;this.checkfn&&(this.check=e(0,null,0,0),a.adler=this.check)};g.prototype.proc=function(b,c){var d,e,f,g,h,l,p;g=b.next_in_index;h=b.avail_in;e=this.bitb;f=this.bitk;l=this.write;for(p=l<this.read?this.read-l-1:this.end-l;;)switch(this.mode){case m:for(;3>f;){if(0!=h)c=0;else return this.bitb=e,this.bitk=f,b.avail_in=h,b.total_in+=g-b.next_in_index,
b.next_in_index=g,this.write=l,this.inflate_flush(b,c);h--;e|=(b.next_in[g++]&255)<<f;f+=8}d=e&7;this.last=d&1;switch(d>>>1){case 0:e>>>=3;f-=3;d=f&7;e>>>=d;f-=d;this.mode=1;break;case 1:var r=new Int32Array(1),s=new Int32Array(1),t=[],u=[];d=s;var x=t,w=u;r[0]=9;d[0]=5;x[0]=n;w[0]=q;this.codes.init(r[0],s[0],t[0],0,u[0],0,b);e>>>=3;f-=3;this.mode=6;break;case 2:e>>>=3;f-=3;this.mode=3;break;case 3:return e>>>=3,f-=3,this.mode=13,b.msg="invalid block type",c=-3,this.bitb=e,this.bitk=f,b.avail_in=
h,b.total_in+=g-b.next_in_index,b.next_in_index=g,this.write=l,this.inflate_flush(b,c)}break;case 1:for(;32>f;){if(0!=h)c=0;else return this.bitb=e,this.bitk=f,b.avail_in=h,b.total_in+=g-b.next_in_index,b.next_in_index=g,this.write=l,this.inflate_flush(b,c);h--;e|=(b.next_in[g++]&255)<<f;f+=8}if((~e>>>16&65535)!=(e&65535))return this.mode=13,b.msg="invalid stored block lengths",c=-3,this.bitb=e,this.bitk=f,b.avail_in=h,b.total_in+=g-b.next_in_index,b.next_in_index=g,this.write=l,this.inflate_flush(b,
c);this.left=e&65535;e=f=0;this.mode=0!=this.left?2:0!=this.last?7:m;break;case 2:if(0==h||0==p&&(l==end&&0!=read&&(l=0,p=l<this.read?this.read-l-1:this.end-l),0==p&&(this.write=l,c=this.inflate_flush(b,c),l=this.write,p=l<this.read?this.read-l-1:this.end-l,l==this.end&&0!=this.read&&(l=0,p=l<this.read?this.read-l-1:this.end-l),0==p)))return this.bitb=e,this.bitk=f,b.avail_in=h,b.total_in+=g-b.next_in_index,b.next_in_index=g,this.write=l,this.inflate_flush(b,c);c=0;d=this.left;d>h&&(d=h);d>p&&(d=
p);k(b.next_in,g,this.window,l,d);g+=d;h-=d;l+=d;p-=d;if(0!=(this.left-=d))break;this.mode=0!=this.last?7:m;break;case 3:for(;14>f;){if(0!=h)c=0;else return this.bitb=e,this.bitk=f,b.avail_in=h,b.total_in+=g-b.next_in_index,b.next_in_index=g,this.write=l,this.inflate_flush(b,c);h--;e|=(b.next_in[g++]&255)<<f;f+=8}this.table=d=e&16383;if(29<(d&31)||29<(d>>5&31))return this.mode=9,b.msg="too many length or distance symbols",c=-3,this.bitb=e,this.bitk=f,b.avail_in=h,b.total_in+=g-b.next_in_index,b.next_in_index=
g,this.write=l,this.inflate_flush(b,c);d=258+(d&31)+(d>>5&31);if(null==this.blens||this.blens.length<d)this.blens=new Int32Array(d);else for(p=0;p<d;p++)this.blens[p]=0;e>>>=14;f-=14;this.index=0;this.mode=4;case 4:for(;this.index<4+(this.table>>>10);){for(;3>f;){if(0!=h)c=0;else return this.bitb=e,this.bitk=f,b.avail_in=h,b.total_in+=g-b.next_in_index,b.next_in_index=g,this.write=l,this.inflate_flush(b,c);h--;e|=(b.next_in[g++]&255)<<f;f+=8}this.blens[v[this.index++]]=e&7;e>>>=3;f-=3}for(;19>this.index;)this.blens[v[this.index++]]=
0;this.bb[0]=7;d=this.inftree.inflate_trees_bits(this.blens,this.bb,this.tb,this.hufts,b);if(0!=d)return c=d,-3==c&&(this.blens=null,this.mode=9),this.bitb=e,this.bitk=f,b.avail_in=h,b.total_in+=g-b.next_in_index,b.next_in_index=g,this.write=l,this.inflate_flush(b,c);this.index=0;this.mode=5;case 5:for(;;){d=this.table;if(!(this.index<258+(d&31)+(d>>5&31)))break;for(d=this.bb[0];f<d;){if(0!=h)c=0;else return this.bitb=e,this.bitk=f,b.avail_in=h,b.total_in+=g-b.next_in_index,b.next_in_index=g,this.write=
l,this.inflate_flush(b,c);h--;e|=(b.next_in[g++]&255)<<f;f+=8}d=this.hufts[3*(this.tb[0]+(e&a[d]))+1];s=this.hufts[3*(this.tb[0]+(e&a[d]))+2];if(16>s)e>>>=d,f-=d,this.blens[this.index++]=s;else{p=18==s?7:s-14;for(r=18==s?11:3;f<d+p;){if(0!=h)c=0;else return this.bitb=e,this.bitk=f,b.avail_in=h,b.total_in+=g-b.next_in_index,b.next_in_index=g,this.write=l,this.inflate_flush(b,c);h--;e|=(b.next_in[g++]&255)<<f;f+=8}e>>>=d;f-=d;r+=e&a[p];e>>>=p;f-=p;p=this.index;d=this.table;if(p+r>258+(d&31)+(d>>5&31)||
16==s&&1>p)return this.blens=null,this.mode=9,b.msg="invalid bit length repeat",c=-3,this.bitb=e,this.bitk=f,b.avail_in=h,b.total_in+=g-b.next_in_index,b.next_in_index=g,this.write=l,this.inflate_flush(b,c);s=16==s?this.blens[p-1]:0;do this.blens[p++]=s;while(0!=--r);this.index=p}}this.tb[0]=-1;r=new Int32Array(1);s=new Int32Array(1);t=new Int32Array(1);u=new Int32Array(1);r[0]=9;s[0]=6;d=this.table;d=this.inftree.inflate_trees_dynamic(257+(d&31),1+(d>>5&31),this.blens,r,s,t,u,this.hufts,b);if(0!=
d)return-3==d&&(this.blens=null,this.mode=13),c=d,this.bitb=e,this.bitk=f,b.avail_in=h,b.total_in+=g-b.next_in_index,b.next_in_index=g,this.write=l,this.inflate_flush(b,c);this.codes.init(r[0],s[0],this.hufts,t[0],this.hufts,u[0],b);this.mode=6;case 6:this.bitb=e;this.bitk=f;b.avail_in=h;b.total_in+=g-b.next_in_index;b.next_in_index=g;this.write=l;if(1!=(c=this.codes.proc(this,b,c)))return this.inflate_flush(b,c);c=0;this.codes.free(b);g=b.next_in_index;h=b.avail_in;e=this.bitb;f=this.bitk;l=this.write;
p=l<this.read?this.read-l-1:this.end-l;if(0==this.last){this.mode=m;break}this.mode=7;case 7:this.write=l;c=this.inflate_flush(b,c);l=this.write;if(this.read!=this.write)return this.bitb=e,this.bitk=f,b.avail_in=h,b.total_in+=g-b.next_in_index,b.next_in_index=g,this.write=l,this.inflate_flush(b,c);this.mode=12;case 8:return c=1,this.bitb=e,this.bitk=f,b.avail_in=h,b.total_in+=g-b.next_in_index,b.next_in_index=g,this.write=l,this.inflate_flush(b,c);case 9:return c=-3,this.bitb=e,this.bitk=f,b.avail_in=
h,b.total_in+=g-b.next_in_index,b.next_in_index=g,this.write=l,this.inflate_flush(b,c);default:return c=-2,this.bitb=e,this.bitk=f,b.avail_in=h,b.total_in+=g-b.next_in_index,b.next_in_index=g,this.write=l,this.inflate_flush(b,c)}};g.prototype.free=function(a){this.reset(a,null);this.hufts=this.window=null};g.prototype.set_dictionary=function(a,b,c){k(a,b,this.window,0,c);this.read=this.write=c};g.prototype.sync_point=function(){return 1==this.mode};g.prototype.inflate_flush=function(a,b){var c,d,
f;d=a.next_out_index;f=this.read;c=(f<=this.write?this.write:this.end)-f;c>a.avail_out&&(c=a.avail_out);0!=c&&-5==b&&(b=0);a.avail_out-=c;a.total_out+=c;null!=this.checkfn&&(this.check=e(this.check,this.window,f,c),a.adler=this.check);k(this.window,f,a.next_out,d,c);d+=c;f+=c;f==this.end&&(f=0,this.write==this.end&&(this.write=0),c=this.write-f,c>a.avail_out&&(c=a.avail_out),0!=c&&-5==b&&(b=0),a.avail_out-=c,a.total_out+=c,null!=this.checkfn&&(this.check=e(this.check,this.window,f,c),a.adler=this.check),
k(this.window,f,a.next_out,d,c),d+=c,f+=c);a.next_out_index=d;this.read=f;return b};f.prototype.init=function(a,b,c,d,e,f,g){this.mode=0;this.lbits=a;this.dbits=b;this.ltree=c;this.ltree_index=d;this.dtree=e;this.dtree_index=f;this.tree=null};f.prototype.proc=function(b,c,d){var e,f,g=0,h=0,k=0,l,m,n,k=c.next_in_index;l=c.avail_in;g=b.bitb;h=b.bitk;m=b.write;for(n=m<b.read?b.read-m-1:b.end-m;;)switch(this.mode){case 0:if(258<=n&&10<=l&&(b.bitb=g,b.bitk=h,c.avail_in=l,c.total_in+=k-c.next_in_index,
c.next_in_index=k,b.write=m,d=this.inflate_fast(this.lbits,this.dbits,this.ltree,this.ltree_index,this.dtree,this.dtree_index,b,c),k=c.next_in_index,l=c.avail_in,g=b.bitb,h=b.bitk,m=b.write,n=m<b.read?b.read-m-1:b.end-m,0!=d)){this.mode=1==d?7:9;break}this.need=this.lbits;this.tree=this.ltree;this.tree_index=this.ltree_index;this.mode=1;case 1:for(e=this.need;h<e;){if(0!=l)d=0;else return b.bitb=g,b.bitk=h,c.avail_in=l,c.total_in+=k-c.next_in_index,c.next_in_index=k,b.write=m,b.inflate_flush(c,d);
l--;g|=(c.next_in[k++]&255)<<h;h+=8}e=3*(this.tree_index+(g&a[e]));g>>>=this.tree[e+1];h-=this.tree[e+1];f=this.tree[e];if(0==f){this.lit=this.tree[e+2];this.mode=6;break}if(0!=(f&16)){this.get=f&15;this.len=this.tree[e+2];this.mode=2;break}if(0==(f&64)){this.need=f;this.tree_index=e/3+this.tree[e+2];break}if(0!=(f&32)){this.mode=7;break}this.mode=9;c.msg="invalid literal/length code";d=-3;b.bitb=g;b.bitk=h;c.avail_in=l;c.total_in+=k-c.next_in_index;c.next_in_index=k;b.write=m;return b.inflate_flush(c,
d);case 2:for(e=this.get;h<e;){if(0!=l)d=0;else return b.bitb=g,b.bitk=h,c.avail_in=l,c.total_in+=k-c.next_in_index,c.next_in_index=k,b.write=m,b.inflate_flush(c,d);l--;g|=(c.next_in[k++]&255)<<h;h+=8}this.len+=g&a[e];g>>=e;h-=e;this.need=this.dbits;this.tree=this.dtree;this.tree_index=this.dtree_index;this.mode=3;case 3:for(e=this.need;h<e;){if(0!=l)d=0;else return b.bitb=g,b.bitk=h,c.avail_in=l,c.total_in+=k-c.next_in_index,c.next_in_index=k,b.write=m,b.inflate_flush(c,d);l--;g|=(c.next_in[k++]&
255)<<h;h+=8}e=3*(this.tree_index+(g&a[e]));g>>=this.tree[e+1];h-=this.tree[e+1];f=this.tree[e];if(0!=(f&16)){this.get=f&15;this.dist=this.tree[e+2];this.mode=4;break}if(0==(f&64)){this.need=f;this.tree_index=e/3+this.tree[e+2];break}this.mode=9;c.msg="invalid distance code";d=-3;b.bitb=g;b.bitk=h;c.avail_in=l;c.total_in+=k-c.next_in_index;c.next_in_index=k;b.write=m;return b.inflate_flush(c,d);case 4:for(e=this.get;h<e;){if(0!=l)d=0;else return b.bitb=g,b.bitk=h,c.avail_in=l,c.total_in+=k-c.next_in_index,
c.next_in_index=k,b.write=m,b.inflate_flush(c,d);l--;g|=(c.next_in[k++]&255)<<h;h+=8}this.dist+=g&a[e];g>>=e;h-=e;this.mode=5;case 5:for(e=m-this.dist;0>e;)e+=b.end;for(;0!=this.len;){if(0==n&&(m==b.end&&0!=b.read&&(m=0,n=m<b.read?b.read-m-1:b.end-m),0==n&&(b.write=m,d=b.inflate_flush(c,d),m=b.write,n=m<b.read?b.read-m-1:b.end-m,m==b.end&&0!=b.read&&(m=0,n=m<b.read?b.read-m-1:b.end-m),0==n)))return b.bitb=g,b.bitk=h,c.avail_in=l,c.total_in+=k-c.next_in_index,c.next_in_index=k,b.write=m,b.inflate_flush(c,
d);b.window[m++]=b.window[e++];n--;e==b.end&&(e=0);this.len--}this.mode=0;break;case 6:if(0==n&&(m==b.end&&0!=b.read&&(m=0,n=m<b.read?b.read-m-1:b.end-m),0==n&&(b.write=m,d=b.inflate_flush(c,d),m=b.write,n=m<b.read?b.read-m-1:b.end-m,m==b.end&&0!=b.read&&(m=0,n=m<b.read?b.read-m-1:b.end-m),0==n)))return b.bitb=g,b.bitk=h,c.avail_in=l,c.total_in+=k-c.next_in_index,c.next_in_index=k,b.write=m,b.inflate_flush(c,d);d=0;b.window[m++]=this.lit;n--;this.mode=0;break;case 7:7<h&&(h-=8,l++,k--);b.write=m;
d=b.inflate_flush(c,d);m=b.write;if(b.read!=b.write)return b.bitb=g,b.bitk=h,c.avail_in=l,c.total_in+=k-c.next_in_index,c.next_in_index=k,b.write=m,b.inflate_flush(c,d);this.mode=8;case 8:return d=1,b.bitb=g,b.bitk=h,c.avail_in=l,c.total_in+=k-c.next_in_index,c.next_in_index=k,b.write=m,b.inflate_flush(c,d);case 9:return d=-3,b.bitb=g,b.bitk=h,c.avail_in=l,c.total_in+=k-c.next_in_index,c.next_in_index=k,b.write=m,b.inflate_flush(c,d);default:return d=-2,b.bitb=g,b.bitk=h,c.avail_in=l,c.total_in+=
k-c.next_in_index,c.next_in_index=k,b.write=m,b.inflate_flush(c,d)}};f.prototype.free=function(a){};f.prototype.inflate_fast=function(b,c,d,e,f,g,h,l){var m,n,p,q,r,s,t,u,v,x,w,H;s=l.next_in_index;t=l.avail_in;q=h.bitb;r=h.bitk;u=h.write;v=u<h.read?h.read-u-1:h.end-u;b=a[b];x=a[c];do{for(;20>r;)t--,q|=(l.next_in[s++]&255)<<r,r+=8;m=q&b;n=d;p=e;H=3*(p+m);if(0==(c=n[H]))q>>=n[H+1],r-=n[H+1],h.window[u++]=n[H+2],v--;else{do{q>>=n[H+1];r-=n[H+1];if(0!=(c&16)){c&=15;w=n[H+2]+(q&a[c]);q>>=c;for(r-=c;15>
r;)t--,q|=(l.next_in[s++]&255)<<r,r+=8;m=q&x;n=f;p=g;H=3*(p+m);c=n[H];do if(q>>=n[H+1],r-=n[H+1],0!=(c&16)){for(c&=15;r<c;)t--,q|=(l.next_in[s++]&255)<<r,r+=8;m=n[H+2]+(q&a[c]);q>>=c;r-=c;v-=w;if(u>=m)m=u-m,h.window[u++]=h.window[m++],h.window[u++]=h.window[m++],w-=2;else{m=u-m;do m+=h.end;while(0>m);c=h.end-m;if(w>c){w-=c;if(0<u-m&&c>u-m){do h.window[u++]=h.window[m++];while(0!=--c)}else k(h.window,m,h.window,u,c),u+=c;m=0}}do h.window[u++]=h.window[m++];while(0!=--w);break}else if(0==(c&64))m+=
n[H+2],m+=q&a[c],H=3*(p+m),c=n[H];else return l.msg="invalid distance code",w=l.avail_in-t,w=r>>3<w?r>>3:w,t+=w,s-=w,r-=w<<3,h.bitb=q,h.bitk=r,l.avail_in=t,l.total_in+=s-l.next_in_index,l.next_in_index=s,h.write=u,-3;while(1);break}if(0==(c&64)){if(m+=n[H+2],m+=q&a[c],H=3*(p+m),0==(c=n[H])){q>>=n[H+1];r-=n[H+1];h.window[u++]=n[H+2];v--;break}}else{if(0!=(c&32))return w=l.avail_in-t,w=r>>3<w?r>>3:w,t+=w,s-=w,r-=w<<3,h.bitb=q,h.bitk=r,l.avail_in=t,l.total_in+=s-l.next_in_index,l.next_in_index=s,h.write=
u,1;l.msg="invalid literal/length code";w=l.avail_in-t;w=r>>3<w?r>>3:w;t+=w;s-=w;r-=w<<3;h.bitb=q;h.bitk=r;l.avail_in=t;l.total_in+=s-l.next_in_index;l.next_in_index=s;h.write=u;return-3}}while(1)}}while(258<=v&&10<=t);w=l.avail_in-t;w=r>>3<w?r>>3:w;s-=w;h.bitb=q;h.bitk=r-(w<<3);l.avail_in=t+w;l.total_in+=s-l.next_in_index;l.next_in_index=s;h.write=u;return 0};d.prototype.huft_build=function(a,b,d,e,f,g,h,l,m,n,p){var r,q,s,t,u,v,w,x,H;v=0;q=d;do this.c[a[b+v]]++,v++,q--;while(0!=q);if(this.c[0]==
d)return h[0]=-1,l[0]=0;u=l[0];for(s=1;15>=s&&0==this.c[s];s++);t=s;u<s&&(u=s);for(q=15;0!=q&&0==this.c[q];q--);n=q;u>q&&(u=q);l[0]=u;for(l=1<<s;s<q;s++,l<<=1)if(0>(l-=this.c[s]))return-3;if(0>(l-=this.c[q]))return-3;this.c[q]+=l;this.x[1]=s=0;v=1;for(w=2;0!=--q;)this.x[w]=s+=this.c[v],w++,v++;v=q=0;do{if(0!=(s=a[b+v]))this.v[this.x[s]++]=q;v++}while(++q<d);d=this.x[n];v=this.x[0]=q=0;b=-1;x=-u;for(H=w=this.u[0]=0;t<=n;t++)for(a=this.c[t];0!=a--;){for(;t>x+u;){b++;x+=u;H=n-x;H=H>u?u:H;if((r=1<<(s=
t-x))>a+1)if(r-=a+1,w=t,s<H)for(;++s<H&&!((r<<=1)<=this.c[++w]);)r-=this.c[w];H=1<<s;if(this.hn[0]+H>c)return-3;this.u[b]=w=this.hn[0];this.hn[0]+=H;0!=b?(this.x[b]=q,this.r[0]=s,this.r[1]=u,s=q>>>x-u,this.r[2]=w-this.u[b-1]-s,k(this.r,0,m,3*(this.u[b-1]+s),3)):h[0]=w}this.r[1]=t-x;v>=d?this.r[0]=192:p[v]<e?(this.r[0]=256>this.v[v]?0:96,this.r[2]=this.v[v++]):(this.r[0]=g[this.v[v]-e]+16+64,this.r[2]=f[this.v[v++]-e]);r=1<<t-x;for(s=q>>>x;s<H;s+=r)k(this.r,0,m,3*(w+s),3);for(s=1<<t-1;0!=(q&s);s>>>=
1)q^=s;q^=s;for(s=(1<<x)-1;(q&s)!=this.x[b];)b--,x-=u,s=(1<<x)-1}return 0!=l&&1!=n?-5:0};d.prototype.inflate_trees_bits=function(a,b,c,d,e){this.initWorkArea(19);this.hn[0]=0;a=this.huft_build(a,0,19,19,null,null,c,b,d,this.hn,this.v);if(-3==a)e.msg="oversubscribed dynamic bit lengths tree";else if(-5==a||0==b[0])e.msg="incomplete dynamic bit lengths tree",a=-3;return a};d.prototype.inflate_trees_dynamic=function(a,b,c,d,e,f,g,h,k){this.initWorkArea(288);this.hn[0]=0;f=this.huft_build(c,0,a,257,s,
r,f,d,h,this.hn,this.v);if(0!=f||0==d[0])return-3==f?k.msg="oversubscribed literal/length tree":-4!=f&&(k.msg="incomplete literal/length tree",f=-3),f;this.initWorkArea(288);f=this.huft_build(c,a,b,0,p,t,g,e,h,this.hn,this.v);return 0!=f||0==e[0]&&257<a?(-3==f?k.msg="oversubscribed distance tree":-5==f?(k.msg="incomplete distance tree",f=-3):-4!=f&&(k.msg="empty distance tree with lengths",f=-3),f):0};d.prototype.initWorkArea=function(a){var b;null==this.hn&&(this.hn=new Int32Array(1),this.v=new Int32Array(a),
this.c=new Int32Array(16),this.r=new Int32Array(3),this.u=new Int32Array(15),this.x=new Int32Array(16));this.v.length<a&&(this.v=new Int32Array(a));for(b=0;b<a;b++)this.v[b]=0;for(b=0;16>b;b++)this.c[b]=0;for(b=0;3>b;b++)this.r[b]=0;k(this.c,0,this.u,0,15);k(this.c,0,this.x,0,16)};var x=65521,w=5552;return function(a,c,d,e){a=c?new Uint8Array(a,c,d):new Uint8Array(a);d=new l;d.inflateInit(15,!0);d.next_in=a;d.next_in_index=0;d.avail_in=a.length;a=[];for(var f=0;;){var g=new Uint8Array(32E3);d.next_out=
g;d.next_out_index=0;d.avail_out=g.length;var h=d.inflate(0);if(0!=h&&1!=h)throw a=d.msg?"object"==typeof d.msg?d.msg:"string"==typeof d.msg?Error(d.msg):Error('Unknown error in inflate: msg\x3d"'+d.msg+'", status\x3d"'+b[h]||h+'"'):Error('Inflate error, status\x3d"'+b[h]||h+'")'),a.statusCode=h,a.statusString=b[h],a;if(0!=d.avail_out){var m=new Uint8Array(g.length-d.avail_out);k(g,0,m,0,g.length-d.avail_out);g=m}a.push(g);f+=g.length;if(1==h)break}e&&(e[0]=(c||0)+d.next_in_index);if(1==a.length)return a[0].buffer;
c=new Uint8Array(f);for(d=e=0;d<a.length;++d)h=a[d],k(h,0,c,e,h.length),e+=h.length;return c.buffer}})},"dgrid/TouchScroll":function(){define("dojo/_base/declare dojo/on ./util/touch ./util/has-css3 put-selector/put xstyle/css!./css/TouchScroll.css".split(" "),function(k,l,h,g,f){function d(a,b,c,d){d=a.touchNode;var e=p[a.id],f,g,h;if("object"!==typeof b)h=b,b=c,c=g=!0;else{c="x"in b;g="y"in b;if(!c||!g)f=a.getScrollPosition();h=c?b.x:f.x;b=g?b.y:f.y}d.style[B]=I+-h+"px,"+-b+"px"+M;e&&(c&&a._scrollbarXNode)&&
(a._scrollbarXNode.style[B]=I+h*e.parentWidth/e.scrollWidth+"px,0"+M);e&&(g&&a._scrollbarYNode)&&(a._scrollbarYNode.style[B]=I+"0,"+b*e.parentHeight/e.scrollHeight+"px"+M);l.emit(a.touchNode.parentNode,"scroll",{scrollLeft:h,scrollTop:b})}function e(a){return p[a.id]?w.exec(window.getComputedStyle(a.touchNode)[B]):x.exec(a.touchNode.style[B])}function c(a){var b=this.widget,b=[this.node,b._scrollbarXNode,b._scrollbarYNode],c=b.length;this.timer&&(clearTimeout(this.timer),this.timer=null);for(this.transitionHandler&&
this.transitionHandler.remove();c--;)b[c]&&(b[c].style[C+"Duration"]="0");(!a||!a.preserveScrollbars)&&f(this.node.parentNode,".touchscroll-fadeout");delete this.resetEffects}function b(a){var b=a.widget,c=b.touchNode,d=b.id,f=0,g=0,k;if(h.countCurrentTouches(a,c)===b.touchesToScroll){if(k=e(b))f=+k[1],g=+k[2];if(k=p[d])k.resetEffects&&k.resetEffects({preserveScrollbars:!0}),c.style[B]=I+f+"px,"+g+"px"+M,t[d]=k;a=a.targetTouches[0];k=p[d]={widget:b,node:c,startX:f-a.pageX,startY:g-a.pageY,lastX:f,
lastY:g,pageX:a.pageX,pageY:a.pageY,tickFunc:function(){var a=p[d],b,c;a&&(b=a.node,(c=x.exec(b.style[B]))?(b=+c[1],c=+c[2],a.velX=b-a.lastX,a.velY=c-a.lastY,a.lastX=b,a.lastY=c):a.lastX=a.lastY=0,a.timer=setTimeout(a.tickFunc,s))}};k.timer=setTimeout(k.tickFunc,s)}}function a(a){var b=a.widget,c=b.id,e=b.touchesToScroll,g=p[c],k,l;if(!g||(k=h.countCurrentTouches(a,b.touchNode))!==e)k>e&&b.cancelTouchScroll();else{k=a.targetTouches;e=k[0];if(!g.scrollbarsShown&&(t[c]||Math.abs(e.pageX-g.pageX)>b.scrollThreshold||
Math.abs(e.pageY-g.pageY)>b.scrollThreshold)){var c=b.touchNode,m=c.parentNode,n=m.offsetWidth-v,q=m.offsetHeight-v,r=g.scrollWidth=c.scrollWidth,s=g.scrollHeight=c.scrollHeight,u=g.parentWidth=m.offsetWidth,w=g.parentHeight=m.offsetHeight;r>u?(b._scrollbarXNode||(l=f(m,"div.touchscroll-x")),l=b._scrollbarXNode=b._scrollbarXNode||f(l,"div.touchscroll-bar"),l.style.width=n*n/r+"px",l.style.left=c.offsetLeft+"px",f(m,".touchscroll-scrollable-x"),g.scrollableX=!0):f(m,"!touchscroll-scrollable-x");s>
w?(b._scrollbarYNode||(l=f(m,"div.touchscroll-y")),l=b._scrollbarYNode=b._scrollbarYNode||f(l,"div.touchscroll-bar"),l.style.height=q*q/s+"px",l.style.top=c.offsetTop+"px",f(m,".touchscroll-scrollable-y"),g.scrollableY=!0):f(m,"!touchscroll-scrollable-y");f(m,"!touchscroll-fadeout");g.scrollbarsShown=!0;for(l=k.length;l--;)k[l].touchScrolled=!0}if(g.scrollbarsShown&&(g.scrollableX||g.scrollableY))a.preventDefault(),a=g.scrollableX?g.startX+e.pageX:0,e=g.scrollableY?g.startY+e.pageY:0,l=g.scrollableX?
-(g.scrollWidth-g.parentWidth):0,g=g.scrollableY?-(g.scrollHeight-g.parentHeight):0,0<a?a/=2:a<l&&(a=l-(l-a)/2),0<e?e/=2:e<g&&(e=g-(g-e)/2),d(b,-a,-e)}}function m(a){var b=a.widget,c=b.id;p[c]&&h.countCurrentTouches(a,b.touchNode)==b.touchesToScroll-1&&q(c)}function n(a,b,c){function d(){delete e.transitionHandler;e.resetEffects();delete p[a]}var e=p[a],f=e.widget,g=e.node,h=e.scrollableX?Math.max(Math.min(0,b),-(e.scrollWidth-e.parentWidth)):b,k=e.scrollableY?Math.max(Math.min(0,c),-(e.scrollHeight-
e.parentHeight)):c;delete e.timer;h!=b||k!=c?(e.transitionHandler=l.once(g,z,d),g.style[C+"Duration"]=f.bounceDuration+"ms",g.style[B]=I+h+"px,"+k+"px"+M,h!=b&&e.scrollableX&&(g=e.widget._scrollbarXNode,g.style[C+"Duration"]=f.bounceDuration+"ms",g.style[B]=b>h?I+"0,0"+M:I+(g.parentNode.offsetWidth-g.offsetWidth)+"px,0"+M),k!=c&&e.scrollableY&&(g=e.widget._scrollbarYNode,g.style[C+"Duration"]=f.bounceDuration+"ms",g.style[B]=c>k?I+"0,0"+M:I+"0,"+(g.parentNode.offsetHeight-g.offsetHeight)+"px"+M)):
d()}function q(a){var b=p[a],e=t[a],f,g;delete t[a];b.timer&&clearTimeout(b.timer);b.resetEffects=c;(f=x.exec(b.node.style[B]))?(g=+f[1],f=+f[2]):g=f=0;if(!b.velX&&!b.velY||(0<=g||g<=-(b.scrollWidth-b.parentWidth))&&(0<=f||f<=-(b.scrollHeight-b.parentHeight)))n(a,g,f);else{if(e&&(e.velX||e.velY)&&(0>=b.velX&&0>=e.velX||0<=b.velX&&0<=e.velX)&&(0>=b.velY&&0>=e.velY||0<=b.velY&&0<=e.velY))b.velX=1.15*(b.velX+e.velX),b.velY=1.15*(b.velY+e.velY);b.lastX=g;b.lastY=f;b.calcFunc=function(){var b=p[a],c,e,
f,g,h,k;if(b)if(c=b.widget,h=c.glideDecel(b.velX),k=c.glideDecel(b.velY),Math.abs(h)>=u||Math.abs(k)>=u){f=b.lastX+h;g=b.lastY+k;if(0<f||f<-(b.scrollWidth-b.parentWidth))for(e=6;e--;)h=c.glideDecel(h);if(0<g||g<-(b.scrollHeight-b.parentHeight))for(e=6;e--;)k=c.glideDecel(k);d(c,-f,-g);b.lastX=f;b.lastY=g;b.velX=h;b.velY=k;b.timer=setTimeout(b.calcFunc,r)}else n(a,b.lastX,b.lastY)};b.timer=setTimeout(b.calcFunc,r)}}var s=50,r=30,p={},t={},u=1,v=8,x=/^translate(?:3d)?\((-?\d+)(?:\.\d*)?(?:px)?, (-?\d+)/,
w=/^matrix\(1, 0, 0, 1, (-?\d+)(?:\.\d*)?(?:px)?, (-?\d+)/,y=g("css-transitions"),z=g("transitionend"),A=g("css-transforms");g=g("css-transforms3d");var D,C,B,I,M;g?(I="translate3d(",M=",0)"):A&&(I="translate(",M=")");if(!y||!I)return console.warn("CSS3 features unavailable for touch scroll effects."),function(){};B=g||A;B=!0===B?"transform":B+"Transform";C=!0===y?"transition":y+"Transition";D=!0===A?"":"-"+A.toLowerCase()+"-";return k(null,{touchesToScroll:1,touchNode:null,scrollThreshold:10,bounceDuration:300,
postCreate:function(){this._initTouch();this.inherited(arguments)},_initTouch:function(){function c(){f.cancelTouchScroll()}function d(a){return function(b){b.widget=f;b.cancelTouchScroll=c;a.call(this,b)}}var e=this.touchNode=this.touchNode||this.containerNode,f=this,g;!e||!e.parentNode?console.warn("TouchScroll requires a nested node upon which to operate."):(g=e.parentNode,g.style.overflow="hidden",e.style[C+"Property"]=D+"transform",e.style[C+"TimingFunction"]="cubic-bezier(0.33, 0.66, 0.66, 1)",
this._touchScrollListeners=[l(g,"touchstart",d(b)),l(g,"touchmove",d(a)),l(g,"touchend,touchcancel",d(m))])},destroy:function(){for(var a=this._touchScrollListeners.length;a--;)this._touchScrollListeners[a].remove();delete p[this.id];this.inherited(arguments)},scrollTo:function(a){var b=p[this.id],c=this.touchNode,e=c.parentNode;!a.preserveMomentum&&(b&&b.resetEffects)&&b.resetEffects();a.x&&(a.x=Math.max(0,Math.min(a.x,c.scrollWidth-e.offsetWidth)));a.y&&(a.y=Math.max(0,Math.min(a.y,c.scrollHeight-
e.offsetHeight)));d(this,a)},getScrollPosition:function(){var a=e(this);return a?{x:-a[1],y:-a[2]}:{x:0,y:0}},cancelTouchScroll:function(){var a=p[this.id];a&&(a.resetEffects?a.resetEffects():(a.timer&&clearTimeout(a.timer),f(a.node.parentNode,".touchscroll-fadeout")),delete p[this.id])},glideDecel:function(a){return 0.9*a}})})},"dgrid/util/touch":function(){define(["dojo/on","dojo/query"],function(k,l){function h(f,d,e,c){if(!(1<e.targetTouches.length)){var b=e.changedTouches[0],a=b.screenX,h=b.screenY;
c&&e.preventDefault();var l=k(f,"touchend",function(b){var e=b.changedTouches[0];b.targetTouches.length||(Math.abs(e.screenX-a)<g.tapRadius&&Math.abs(e.screenY-h)<g.tapRadius&&(c&&b.preventDefault(),d.call(this,b)),l.remove())})}}var g={tapRadius:10,dbltapTime:250,selector:function(f,d,e){return function(c,b){var a=d.bubble;a?d=a:!1!==e&&(e=!0);return k(c,d,function(a){var d=a.target;3==d.nodeType&&(d=d.parentNode);for(;!l.matches(d,f,c);)if(d==c||!e||!(d=d.parentNode))return;return b.call(d,a)})}},
countCurrentTouches:function(f,d){if(!("touches"in f))return-1;var e,c,b;for(c=e=0;b=f.touches[e];++e)d.contains(b.target)&&++c;return c},tap:function(f,d){return k(f,"touchstart",function(e){h(f,d,e)})},dbltap:function(f,d){var e,c;return k(f,"touchstart",function(b){e?h(f,function(a){if(e){var b=a.changedTouches[0];Math.abs(b.screenX-e.screenX)<g.tapRadius&&Math.abs(b.screenY-e.screenY)<g.tapRadius&&(c&&clearTimeout(c),e=c=null,d.call(this,a))}},b,!0):h(f,function(a){e=a.changedTouches[0];c=setTimeout(function(){e=
c=null},g.dbltapTime)},b)})}};return g})},"dgrid/util/has-css3":function(){define(["dojo/has"],function(k){function l(g,f){var d=g.style,e;if(f in d)return!0;f=f.slice(0,1).toUpperCase()+f.slice(1);for(e=h.length;e--;)if(h[e]+f in d)return h[e];return!1}var h=["ms","O","Moz","Webkit"];k.add("css-transitions",function(g,f,d){return l(d,"transitionProperty")});k.add("css-transforms",function(g,f,d){return l(d,"transform")});k.add("css-transforms3d",function(g,f,d){return l(d,"perspective")});k.add("transitionend",
function(){var g=k("css-transitions");return!g?!1:!0===g?"transitionend":{ms:"MSTransitionEnd",O:"oTransitionEnd",Moz:"transitionend",Webkit:"webkitTransitionEnd"}[g]});return k})},"url:dijit/templates/Dialog.html":'\x3cdiv class\x3d"dijitDialog" role\x3d"dialog" aria-labelledby\x3d"${id}_title"\x3e\n\t\x3cdiv data-dojo-attach-point\x3d"titleBar" class\x3d"dijitDialogTitleBar"\x3e\n\t\t\x3cspan data-dojo-attach-point\x3d"titleNode" class\x3d"dijitDialogTitle" id\x3d"${id}_title"\n\t\t\t\trole\x3d"heading" level\x3d"1"\x3e\x3c/span\x3e\n\t\t\x3cspan data-dojo-attach-point\x3d"closeButtonNode" class\x3d"dijitDialogCloseIcon" data-dojo-attach-event\x3d"ondijitclick: onCancel" title\x3d"${buttonCancel}" role\x3d"button" tabindex\x3d"0"\x3e\n\t\t\t\x3cspan data-dojo-attach-point\x3d"closeText" class\x3d"closeText" title\x3d"${buttonCancel}"\x3ex\x3c/span\x3e\n\t\t\x3c/span\x3e\n\t\x3c/div\x3e\n\t\x3cdiv data-dojo-attach-point\x3d"containerNode" class\x3d"dijitDialogPaneContent"\x3e\x3c/div\x3e\n\x3c/div\x3e\n',
"url:dijit/form/templates/TextBox.html":'\x3cdiv class\x3d"dijit dijitReset dijitInline dijitLeft" id\x3d"widget_${id}" role\x3d"presentation"\n\t\x3e\x3cdiv class\x3d"dijitReset dijitInputField dijitInputContainer"\n\t\t\x3e\x3cinput class\x3d"dijitReset dijitInputInner" data-dojo-attach-point\x3d\'textbox,focusNode\' autocomplete\x3d"off"\n\t\t\t${!nameAttrSetting} type\x3d\'${type}\'\n\t/\x3e\x3c/div\n\x3e\x3c/div\x3e\n',"url:dijit/templates/Tooltip.html":'\x3cdiv class\x3d"dijitTooltip dijitTooltipLeft" id\x3d"dojoTooltip"\n\t\x3e\x3cdiv class\x3d"dijitTooltipConnector" data-dojo-attach-point\x3d"connectorNode"\x3e\x3c/div\n\t\x3e\x3cdiv class\x3d"dijitTooltipContainer dijitTooltipContents" data-dojo-attach-point\x3d"containerNode" role\x3d\'alert\'\x3e\x3c/div\n\x3e\x3c/div\x3e\n',
"url:dijit/form/templates/ValidationTextBox.html":'\x3cdiv class\x3d"dijit dijitReset dijitInline dijitLeft"\n\tid\x3d"widget_${id}" role\x3d"presentation"\n\t\x3e\x3cdiv class\x3d\'dijitReset dijitValidationContainer\'\n\t\t\x3e\x3cinput class\x3d"dijitReset dijitInputField dijitValidationIcon dijitValidationInner" value\x3d"\x26#935; " type\x3d"text" tabIndex\x3d"-1" readonly\x3d"readonly" role\x3d"presentation"\n\t/\x3e\x3c/div\n\t\x3e\x3cdiv class\x3d"dijitReset dijitInputField dijitInputContainer"\n\t\t\x3e\x3cinput class\x3d"dijitReset dijitInputInner" data-dojo-attach-point\x3d\'textbox,focusNode\' autocomplete\x3d"off"\n\t\t\t${!nameAttrSetting} type\x3d\'${type}\'\n\t/\x3e\x3c/div\n\x3e\x3c/div\x3e\n',
"url:dijit/form/templates/DropDownBox.html":'\x3cdiv class\x3d"dijit dijitReset dijitInline dijitLeft"\n\tid\x3d"widget_${id}"\n\trole\x3d"combobox"\n\taria-haspopup\x3d"true"\n\tdata-dojo-attach-point\x3d"_popupStateNode"\n\t\x3e\x3cdiv class\x3d\'dijitReset dijitRight dijitButtonNode dijitArrowButton dijitDownArrowButton dijitArrowButtonContainer\'\n\t\tdata-dojo-attach-point\x3d"_buttonNode" role\x3d"presentation"\n\t\t\x3e\x3cinput class\x3d"dijitReset dijitInputField dijitArrowButtonInner" value\x3d"\x26#9660; " type\x3d"text" tabIndex\x3d"-1" readonly\x3d"readonly" role\x3d"button presentation" aria-hidden\x3d"true"\n\t\t\t${_buttonInputDisabled}\n\t/\x3e\x3c/div\n\t\x3e\x3cdiv class\x3d\'dijitReset dijitValidationContainer\'\n\t\t\x3e\x3cinput class\x3d"dijitReset dijitInputField dijitValidationIcon dijitValidationInner" value\x3d"\x26#935; " type\x3d"text" tabIndex\x3d"-1" readonly\x3d"readonly" role\x3d"presentation"\n\t/\x3e\x3c/div\n\t\x3e\x3cdiv class\x3d"dijitReset dijitInputField dijitInputContainer"\n\t\t\x3e\x3cinput class\x3d\'dijitReset dijitInputInner\' ${!nameAttrSetting} type\x3d"text" autocomplete\x3d"off"\n\t\t\tdata-dojo-attach-point\x3d"textbox,focusNode" role\x3d"textbox"\n\t/\x3e\x3c/div\n\x3e\x3c/div\x3e\n',
"url:dijit/form/templates/Button.html":'\x3cspan class\x3d"dijit dijitReset dijitInline" role\x3d"presentation"\n\t\x3e\x3cspan class\x3d"dijitReset dijitInline dijitButtonNode"\n\t\tdata-dojo-attach-event\x3d"ondijitclick:__onClick" role\x3d"presentation"\n\t\t\x3e\x3cspan class\x3d"dijitReset dijitStretch dijitButtonContents"\n\t\t\tdata-dojo-attach-point\x3d"titleNode,focusNode"\n\t\t\trole\x3d"button" aria-labelledby\x3d"${id}_label"\n\t\t\t\x3e\x3cspan class\x3d"dijitReset dijitInline dijitIcon" data-dojo-attach-point\x3d"iconNode"\x3e\x3c/span\n\t\t\t\x3e\x3cspan class\x3d"dijitReset dijitToggleButtonIconChar"\x3e\x26#x25CF;\x3c/span\n\t\t\t\x3e\x3cspan class\x3d"dijitReset dijitInline dijitButtonText"\n\t\t\t\tid\x3d"${id}_label"\n\t\t\t\tdata-dojo-attach-point\x3d"containerNode"\n\t\t\t\x3e\x3c/span\n\t\t\x3e\x3c/span\n\t\x3e\x3c/span\n\t\x3e\x3cinput ${!nameAttrSetting} type\x3d"${type}" value\x3d"${value}" class\x3d"dijitOffScreen"\n\t\tdata-dojo-attach-event\x3d"onclick:_onClick"\n\t\ttabIndex\x3d"-1" aria-hidden\x3d"true" data-dojo-attach-point\x3d"valueNode"\n/\x3e\x3c/span\x3e\n',
"url:dijit/templates/Menu.html":'\x3ctable class\x3d"dijit dijitMenu dijitMenuPassive dijitReset dijitMenuTable" role\x3d"menu" tabIndex\x3d"${tabIndex}"\n\t   cellspacing\x3d"0"\x3e\n\t\x3ctbody class\x3d"dijitReset" data-dojo-attach-point\x3d"containerNode"\x3e\x3c/tbody\x3e\n\x3c/table\x3e\n',"url:dijit/templates/MenuItem.html":'\x3ctr class\x3d"dijitReset dijitMenuItem" data-dojo-attach-point\x3d"focusNode" role\x3d"menuitem" tabIndex\x3d"-1"\x3e\n\t\x3ctd class\x3d"dijitReset dijitMenuItemIconCell" role\x3d"presentation"\x3e\n\t\t\x3cspan role\x3d"presentation" class\x3d"dijitInline dijitIcon dijitMenuItemIcon" data-dojo-attach-point\x3d"iconNode"\x3e\x3c/span\x3e\n\t\x3c/td\x3e\n\t\x3ctd class\x3d"dijitReset dijitMenuItemLabel" colspan\x3d"2" data-dojo-attach-point\x3d"containerNode,textDirNode"\n\t\trole\x3d"presentation"\x3e\x3c/td\x3e\n\t\x3ctd class\x3d"dijitReset dijitMenuItemAccelKey" style\x3d"display: none" data-dojo-attach-point\x3d"accelKeyNode"\x3e\x3c/td\x3e\n\t\x3ctd class\x3d"dijitReset dijitMenuArrowCell" role\x3d"presentation"\x3e\n\t\t\x3cspan data-dojo-attach-point\x3d"arrowWrapper" style\x3d"visibility: hidden"\x3e\n\t\t\t\x3cspan class\x3d"dijitInline dijitIcon dijitMenuExpand"\x3e\x3c/span\x3e\n\t\t\t\x3cspan class\x3d"dijitMenuExpandA11y"\x3e+\x3c/span\x3e\n\t\t\x3c/span\x3e\n\t\x3c/td\x3e\n\x3c/tr\x3e\n',
"url:dijit/templates/MenuSeparator.html":'\x3ctr class\x3d"dijitMenuSeparator" role\x3d"separator"\x3e\n\t\x3ctd class\x3d"dijitMenuSeparatorIconCell"\x3e\n\t\t\x3cdiv class\x3d"dijitMenuSeparatorTop"\x3e\x3c/div\x3e\n\t\t\x3cdiv class\x3d"dijitMenuSeparatorBottom"\x3e\x3c/div\x3e\n\t\x3c/td\x3e\n\t\x3ctd colspan\x3d"3" class\x3d"dijitMenuSeparatorLabelCell"\x3e\n\t\t\x3cdiv class\x3d"dijitMenuSeparatorTop dijitMenuSeparatorLabel"\x3e\x3c/div\x3e\n\t\t\x3cdiv class\x3d"dijitMenuSeparatorBottom"\x3e\x3c/div\x3e\n\t\x3c/td\x3e\n\x3c/tr\x3e\n',
"url:dijit/form/templates/Select.html":'\x3ctable class\x3d"dijit dijitReset dijitInline dijitLeft"\n\tdata-dojo-attach-point\x3d"_buttonNode,tableNode,focusNode,_popupStateNode" cellspacing\x3d\'0\' cellpadding\x3d\'0\'\n\trole\x3d"listbox" aria-haspopup\x3d"true"\n\t\x3e\x3ctbody role\x3d"presentation"\x3e\x3ctr role\x3d"presentation"\n\t\t\x3e\x3ctd class\x3d"dijitReset dijitStretch dijitButtonContents" role\x3d"presentation"\n\t\t\t\x3e\x3cdiv class\x3d"dijitReset dijitInputField dijitButtonText"  data-dojo-attach-point\x3d"containerNode,textDirNode" role\x3d"presentation"\x3e\x3c/div\n\t\t\t\x3e\x3cdiv class\x3d"dijitReset dijitValidationContainer"\n\t\t\t\t\x3e\x3cinput class\x3d"dijitReset dijitInputField dijitValidationIcon dijitValidationInner" value\x3d"\x26#935; " type\x3d"text" tabIndex\x3d"-1" readonly\x3d"readonly" role\x3d"presentation"\n\t\t\t/\x3e\x3c/div\n\t\t\t\x3e\x3cinput type\x3d"hidden" ${!nameAttrSetting} data-dojo-attach-point\x3d"valueNode" value\x3d"${value}" aria-hidden\x3d"true"\n\t\t/\x3e\x3c/td\n\t\t\x3e\x3ctd class\x3d"dijitReset dijitRight dijitButtonNode dijitArrowButton dijitDownArrowButton dijitArrowButtonContainer"\n\t\t\tdata-dojo-attach-point\x3d"titleNode" role\x3d"presentation"\n\t\t\t\x3e\x3cinput class\x3d"dijitReset dijitInputField dijitArrowButtonInner" value\x3d"\x26#9660; " type\x3d"text" tabIndex\x3d"-1" readonly\x3d"readonly" role\x3d"presentation"\n\t\t\t\t${_buttonInputDisabled}\n\t\t/\x3e\x3c/td\n\t\x3e\x3c/tr\x3e\x3c/tbody\n\x3e\x3c/table\x3e\n',
"url:dijit/form/templates/DropDownButton.html":'\x3cspan class\x3d"dijit dijitReset dijitInline"\n\t\x3e\x3cspan class\x3d\'dijitReset dijitInline dijitButtonNode\'\n\t\tdata-dojo-attach-event\x3d"ondijitclick:__onClick" data-dojo-attach-point\x3d"_buttonNode"\n\t\t\x3e\x3cspan class\x3d"dijitReset dijitStretch dijitButtonContents"\n\t\t\tdata-dojo-attach-point\x3d"focusNode,titleNode,_arrowWrapperNode,_popupStateNode"\n\t\t\trole\x3d"button" aria-haspopup\x3d"true" aria-labelledby\x3d"${id}_label"\n\t\t\t\x3e\x3cspan class\x3d"dijitReset dijitInline dijitIcon"\n\t\t\t\tdata-dojo-attach-point\x3d"iconNode"\n\t\t\t\x3e\x3c/span\n\t\t\t\x3e\x3cspan class\x3d"dijitReset dijitInline dijitButtonText"\n\t\t\t\tdata-dojo-attach-point\x3d"containerNode"\n\t\t\t\tid\x3d"${id}_label"\n\t\t\t\x3e\x3c/span\n\t\t\t\x3e\x3cspan class\x3d"dijitReset dijitInline dijitArrowButtonInner"\x3e\x3c/span\n\t\t\t\x3e\x3cspan class\x3d"dijitReset dijitInline dijitArrowButtonChar"\x3e\x26#9660;\x3c/span\n\t\t\x3e\x3c/span\n\t\x3e\x3c/span\n\t\x3e\x3cinput ${!nameAttrSetting} type\x3d"${type}" value\x3d"${value}" class\x3d"dijitOffScreen" tabIndex\x3d"-1"\n\t\tdata-dojo-attach-event\x3d"onclick:_onClick" data-dojo-attach-point\x3d"valueNode" aria-hidden\x3d"true"\n/\x3e\x3c/span\x3e\n',
"url:dijit/templates/CheckedMenuItem.html":'\x3ctr class\x3d"dijitReset dijitMenuItem" data-dojo-attach-point\x3d"focusNode" role\x3d"${role}" tabIndex\x3d"-1" aria-checked\x3d"${checked}"\x3e\n\t\x3ctd class\x3d"dijitReset dijitMenuItemIconCell" role\x3d"presentation"\x3e\n\t\t\x3cspan class\x3d"dijitInline dijitIcon dijitMenuItemIcon dijitCheckedMenuItemIcon" data-dojo-attach-point\x3d"iconNode"\x3e\x3c/span\x3e\n\t\t\x3cspan class\x3d"dijitMenuItemIconChar dijitCheckedMenuItemIconChar"\x3e${checkedChar}\x3c/span\x3e\n\t\x3c/td\x3e\n\t\x3ctd class\x3d"dijitReset dijitMenuItemLabel" colspan\x3d"2" data-dojo-attach-point\x3d"containerNode,labelNode,textDirNode"\x3e\x3c/td\x3e\n\t\x3ctd class\x3d"dijitReset dijitMenuItemAccelKey" style\x3d"display: none" data-dojo-attach-point\x3d"accelKeyNode"\x3e\x3c/td\x3e\n\t\x3ctd class\x3d"dijitReset dijitMenuArrowCell" role\x3d"presentation"\x3e\x26#160;\x3c/td\x3e\n\x3c/tr\x3e\n',
"url:dojox/form/resources/TriStateCheckBox.html":'\x3cdiv class\x3d"dijit dijitReset dijitInline" role\x3d"presentation"\n\t\x3e\x3cdiv class\x3d"dojoxTriStateCheckBoxInner" dojoAttachPoint\x3d"stateLabelNode"\x3e\x3c/div\n\t\x3e\x3cinput ${!nameAttrSetting} type\x3d"${type}" role\x3d"${type}" dojoAttachPoint\x3d"focusNode"\n\tclass\x3d"dijitReset dojoxTriStateCheckBoxInput" dojoAttachEvent\x3d"onclick:_onClick"\n/\x3e\x3c/div\x3e\n',"url:dijit/form/templates/CheckBox.html":'\x3cdiv class\x3d"dijit dijitReset dijitInline" role\x3d"presentation"\n\t\x3e\x3cinput\n\t \t${!nameAttrSetting} type\x3d"${type}" role\x3d"${type}" aria-checked\x3d"false" ${checkedAttrSetting}\n\t\tclass\x3d"dijitReset dijitCheckBoxInput"\n\t\tdata-dojo-attach-point\x3d"focusNode"\n\t \tdata-dojo-attach-event\x3d"ondijitclick:_onClick"\n/\x3e\x3c/div\x3e\n',
"url:dojox/form/resources/Uploader.html":'\x3cspan class\x3d"dijit dijitReset dijitInline"\n\t\x3e\x3cspan class\x3d"dijitReset dijitInline dijitButtonNode"\n\t\tdata-dojo-attach-event\x3d"ondijitclick:_onClick"\n\t\t\x3e\x3cspan class\x3d"dijitReset dijitStretch dijitButtonContents"\n\t\t\tdata-dojo-attach-point\x3d"titleNode,focusNode"\n\t\t\trole\x3d"button" aria-labelledby\x3d"${id}_label"\n\t\t\t\x3e\x3cspan class\x3d"dijitReset dijitInline dijitIcon" data-dojo-attach-point\x3d"iconNode"\x3e\x3c/span\n\t\t\t\x3e\x3cspan class\x3d"dijitReset dijitToggleButtonIconChar"\x3e\x26#x25CF;\x3c/span\n\t\t\t\x3e\x3cspan class\x3d"dijitReset dijitInline dijitButtonText"\n\t\t\t\tid\x3d"${id}_label"\n\t\t\t\tdata-dojo-attach-point\x3d"containerNode"\n\t\t\t\x3e\x3c/span\n\t\t\x3e\x3c/span\n\t\x3e\x3c/span\n\t\x3e \n\t\x3cinput ${!nameAttrSetting} type\x3d"${type}" value\x3d"${value}" class\x3d"dijitOffScreen" tabIndex\x3d"-1" data-dojo-attach-point\x3d"valueNode" /\x3e\n\x3c/span\x3e\n',
"url:dijit/form/templates/Spinner.html":'\x3cdiv class\x3d"dijit dijitReset dijitInline dijitLeft"\n\tid\x3d"widget_${id}" role\x3d"presentation"\n\t\x3e\x3cdiv class\x3d"dijitReset dijitButtonNode dijitSpinnerButtonContainer"\n\t\t\x3e\x3cinput class\x3d"dijitReset dijitInputField dijitSpinnerButtonInner" type\x3d"text" tabIndex\x3d"-1" readonly\x3d"readonly" role\x3d"presentation"\n\t\t/\x3e\x3cdiv class\x3d"dijitReset dijitLeft dijitButtonNode dijitArrowButton dijitUpArrowButton"\n\t\t\tdata-dojo-attach-point\x3d"upArrowNode"\n\t\t\t\x3e\x3cdiv class\x3d"dijitArrowButtonInner"\n\t\t\t\t\x3e\x3cinput class\x3d"dijitReset dijitInputField" value\x3d"\x26#9650; " type\x3d"text" tabIndex\x3d"-1" readonly\x3d"readonly" role\x3d"presentation"\n\t\t\t\t\t${_buttonInputDisabled}\n\t\t\t/\x3e\x3c/div\n\t\t\x3e\x3c/div\n\t\t\x3e\x3cdiv class\x3d"dijitReset dijitLeft dijitButtonNode dijitArrowButton dijitDownArrowButton"\n\t\t\tdata-dojo-attach-point\x3d"downArrowNode"\n\t\t\t\x3e\x3cdiv class\x3d"dijitArrowButtonInner"\n\t\t\t\t\x3e\x3cinput class\x3d"dijitReset dijitInputField" value\x3d"\x26#9660; " type\x3d"text" tabIndex\x3d"-1" readonly\x3d"readonly" role\x3d"presentation"\n\t\t\t\t\t${_buttonInputDisabled}\n\t\t\t/\x3e\x3c/div\n\t\t\x3e\x3c/div\n\t\x3e\x3c/div\n\t\x3e\x3cdiv class\x3d\'dijitReset dijitValidationContainer\'\n\t\t\x3e\x3cinput class\x3d"dijitReset dijitInputField dijitValidationIcon dijitValidationInner" value\x3d"\x26#935; " type\x3d"text" tabIndex\x3d"-1" readonly\x3d"readonly" role\x3d"presentation"\n\t/\x3e\x3c/div\n\t\x3e\x3cdiv class\x3d"dijitReset dijitInputField dijitInputContainer"\n\t\t\x3e\x3cinput class\x3d\'dijitReset dijitInputInner\' data-dojo-attach-point\x3d"textbox,focusNode" type\x3d"${type}" data-dojo-attach-event\x3d"onkeydown:_onKeyDown"\n\t\t\trole\x3d"spinbutton" autocomplete\x3d"off" ${!nameAttrSetting}\n\t/\x3e\x3c/div\n\x3e\x3c/div\x3e\n',
"url:JBrowse/package.json":'{\n    "name": "JBrowse",\n    "version": "1.12.3",\n    "copyright":"\u00a9 2007-2017 The Evolutionary Software Foundation",\n    "main": "main",\n    "dependencies": {\n        "dojo": "current",\n        "dijit": "current",\n        "dojox": "current",\n        "util": "current"\n    },\n    "description": "A modern client-side genome browser.",\n    "licenses": [\n        {\n            "type": "LGPL-2.1",\n            "url": "https://raw.github.com/GMOD/jbrowse/master/LICENSE"\n        }\n    ],\n    "bugs": "https://github.com/gmod/jbrowse/issues",\n    "keywords": ["JavaScript", "JBrowse", "Genome Browser", "Genomics", "Bioinformatics"],\n    "homepage": "http://jbrowse.org",\n    "dojoBuild": "JBrowse.profile.js"\n}\n',
"url:dijit/templates/TitlePane.html":'\x3cdiv\x3e\n\t\x3cdiv data-dojo-attach-event\x3d"ondijitclick:_onTitleClick, onkeydown:_onTitleKey"\n\t\t\tclass\x3d"dijitTitlePaneTitle" data-dojo-attach-point\x3d"titleBarNode" id\x3d"${id}_titleBarNode"\x3e\n\t\t\x3cdiv class\x3d"dijitTitlePaneTitleFocus" data-dojo-attach-point\x3d"focusNode"\x3e\n\t\t\t\x3cspan data-dojo-attach-point\x3d"arrowNode" class\x3d"dijitInline dijitArrowNode" role\x3d"presentation"\x3e\x3c/span\n\t\t\t\x3e\x3cspan data-dojo-attach-point\x3d"arrowNodeInner" class\x3d"dijitArrowNodeInner"\x3e\x3c/span\n\t\t\t\x3e\x3cspan data-dojo-attach-point\x3d"titleNode" class\x3d"dijitTitlePaneTextNode"\x3e\x3c/span\x3e\n\t\t\x3c/div\x3e\n\t\x3c/div\x3e\n\t\x3cdiv class\x3d"dijitTitlePaneContentOuter" data-dojo-attach-point\x3d"hideNode" role\x3d"presentation"\x3e\n\t\t\x3cdiv class\x3d"dijitReset" data-dojo-attach-point\x3d"wipeNode" role\x3d"presentation"\x3e\n\t\t\t\x3cdiv class\x3d"dijitTitlePaneContentInner" data-dojo-attach-point\x3d"containerNode" role\x3d"region" id\x3d"${id}_pane" aria-labelledby\x3d"${id}_titleBarNode"\x3e\n\t\t\t\t\x3c!-- nested divs because wipeIn()/wipeOut() doesn\'t work right on node w/padding etc.  Put padding on inner div. --\x3e\n\t\t\t\x3c/div\x3e\n\t\t\x3c/div\x3e\n\t\x3c/div\x3e\n\x3c/div\x3e\n',
"*now":function(k){k(['dojo/i18n!*preload*dojo/nls/dojo*["ar","ca","cs","da","de","el","en-gb","en-us","es-es","fi-fi","fr-fr","he-il","hu","it-it","ja-jp","ko-kr","nl-nl","nb","pl","pt-br","pt-pt","ru","sk","sl","sv","th","tr","zh-tw","zh-cn","ROOT"]'])}}});(function(){var k=this.require;k({cache:{}});!k.async&&k(["dojo"]);k.boot&&k.apply(null,k.boot)})();
//# sourceMappingURL=dojo.js.map