/*! pileup v0.6.2 | (c) 2015 HammerLab | Apache-2.0 licensed */
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.pileup=t()}}(function(){var t;return function e(t,n,r){function i(a,s){if(!n[a]){if(!t[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(o)return o(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var l=n[a]={exports:{}};t[a][0].call(l.exports,function(e){var n=t[a][1][e];return i(n?n:e)},l,l.exports,e,t,n,r)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a<r.length;a++)i(r[a]);return i}({1:[function(e,n,r){!function(n,i){if("function"==typeof t&&t.amd)t(["underscore","jquery","exports"],function(t,e,r){n.Backbone=i(n,r,t,e)});else if("undefined"!=typeof r){var o=e("underscore");i(n,r,o)}else n.Backbone=i(n,{},n._,n.jQuery||n.Zepto||n.ender||n.$)}(this,function(t,e,n,r){var i=t.Backbone,o=[],a=(o.push,o.slice);o.splice,e.VERSION="1.1.2",e.$=r,e.noConflict=function(){return t.Backbone=i,this},e.emulateHTTP=!1,e.emulateJSON=!1;var s=e.Events={on:function(t,e,n){if(!c(this,"on",t,[e,n])||!e)return this;this._events||(this._events={});var r=this._events[t]||(this._events[t]=[]);return r.push({callback:e,context:n,ctx:n||this}),this},once:function(t,e,r){if(!c(this,"once",t,[e,r])||!e)return this;var i=this,o=n.once(function(){i.off(t,o),e.apply(this,arguments)});return o._callback=e,this.on(t,o,r)},off:function(t,e,r){var i,o,a,s,u,l,f,p;if(!this._events||!c(this,"off",t,[e,r]))return this;if(!t&&!e&&!r)return this._events=void 0,this;for(s=t?[t]:n.keys(this._events),u=0,l=s.length;l>u;u++)if(t=s[u],a=this._events[t]){if(this._events[t]=i=[],e||r)for(f=0,p=a.length;p>f;f++)o=a[f],(e&&e!==o.callback&&e!==o.callback._callback||r&&r!==o.context)&&i.push(o);i.length||delete this._events[t]}return this},trigger:function(t){if(!this._events)return this;var e=a.call(arguments,1);if(!c(this,"trigger",t,e))return this;var n=this._events[t],r=this._events.all;return n&&l(n,e),r&&l(r,arguments),this},stopListening:function(t,e,r){var i=this._listeningTo;if(!i)return this;var o=!e&&!r;r||"object"!=typeof e||(r=this),t&&((i={})[t._listenId]=t);for(var a in i)t=i[a],t.off(e,r,this),(o||n.isEmpty(t._events))&&delete this._listeningTo[a];return this}},u=/\s+/,c=function(t,e,n,r){if(!n)return!0;if("object"==typeof n){for(var i in n)t[e].apply(t,[i,n[i]].concat(r));return!1}if(u.test(n)){for(var o=n.split(u),a=0,s=o.length;s>a;a++)t[e].apply(t,[o[a]].concat(r));return!1}return!0},l=function(t,e){var n,r=-1,i=t.length,o=e[0],a=e[1],s=e[2];switch(e.length){case 0:for(;++r<i;)(n=t[r]).callback.call(n.ctx);return;case 1:for(;++r<i;)(n=t[r]).callback.call(n.ctx,o);return;case 2:for(;++r<i;)(n=t[r]).callback.call(n.ctx,o,a);return;case 3:for(;++r<i;)(n=t[r]).callback.call(n.ctx,o,a,s);return;default:for(;++r<i;)(n=t[r]).callback.apply(n.ctx,e);return}},f={listenTo:"on",listenToOnce:"once"};n.each(f,function(t,e){s[e]=function(e,r,i){var o=this._listeningTo||(this._listeningTo={}),a=e._listenId||(e._listenId=n.uniqueId("l"));return o[a]=e,i||"object"!=typeof r||(i=this),e[t](r,i,this),this}}),s.bind=s.on,s.unbind=s.off,n.extend(e,s);var p=e.Model=function(t,e){var r=t||{};e||(e={}),this.cid=n.uniqueId("c"),this.attributes={},e.collection&&(this.collection=e.collection),e.parse&&(r=this.parse(r,e)||{}),r=n.defaults({},r,n.result(this,"defaults")),this.set(r,e),this.changed={},this.initialize.apply(this,arguments)};n.extend(p.prototype,s,{changed:null,validationError:null,idAttribute:"id",initialize:function(){},toJSON:function(t){return n.clone(this.attributes)},sync:function(){return e.sync.apply(this,arguments)},get:function(t){return this.attributes[t]},escape:function(t){return n.escape(this.get(t))},has:function(t){return null!=this.get(t)},set:function(t,e,r){var i,o,a,s,u,c,l,f;if(null==t)return this;if("object"==typeof t?(o=t,r=e):(o={})[t]=e,r||(r={}),!this._validate(o,r))return!1;a=r.unset,u=r.silent,s=[],c=this._changing,this._changing=!0,c||(this._previousAttributes=n.clone(this.attributes),this.changed={}),f=this.attributes,l=this._previousAttributes,this.idAttribute in o&&(this.id=o[this.idAttribute]);for(i in o)e=o[i],n.isEqual(f[i],e)||s.push(i),n.isEqual(l[i],e)?delete this.changed[i]:this.changed[i]=e,a?delete f[i]:f[i]=e;if(!u){s.length&&(this._pending=r);for(var p=0,h=s.length;h>p;p++)this.trigger("change:"+s[p],this,f[s[p]],r)}if(c)return this;if(!u)for(;this._pending;)r=this._pending,this._pending=!1,this.trigger("change",this,r);return this._pending=!1,this._changing=!1,this},unset:function(t,e){return this.set(t,void 0,n.extend({},e,{unset:!0}))},clear:function(t){var e={};for(var r in this.attributes)e[r]=void 0;return this.set(e,n.extend({},t,{unset:!0}))},hasChanged:function(t){return null==t?!n.isEmpty(this.changed):n.has(this.changed,t)},changedAttributes:function(t){if(!t)return this.hasChanged()?n.clone(this.changed):!1;var e,r=!1,i=this._changing?this._previousAttributes:this.attributes;for(var o in t)n.isEqual(i[o],e=t[o])||((r||(r={}))[o]=e);return r},previous:function(t){return null!=t&&this._previousAttributes?this._previousAttributes[t]:null},previousAttributes:function(){return n.clone(this._previousAttributes)},fetch:function(t){t=t?n.clone(t):{},void 0===t.parse&&(t.parse=!0);var e=this,r=t.success;return t.success=function(n){return e.set(e.parse(n,t),t)?(r&&r(e,n,t),void e.trigger("sync",e,n,t)):!1},L(this,t),this.sync("read",this,t)},save:function(t,e,r){var i,o,a,s=this.attributes;if(null==t||"object"==typeof t?(i=t,r=e):(i={})[t]=e,r=n.extend({validate:!0},r),i&&!r.wait){if(!this.set(i,r))return!1}else if(!this._validate(i,r))return!1;i&&r.wait&&(this.attributes=n.extend({},s,i)),void 0===r.parse&&(r.parse=!0);var u=this,c=r.success;return r.success=function(t){u.attributes=s;var e=u.parse(t,r);return r.wait&&(e=n.extend(i||{},e)),n.isObject(e)&&!u.set(e,r)?!1:(c&&c(u,t,r),void u.trigger("sync",u,t,r))},L(this,r),o=this.isNew()?"create":r.patch?"patch":"update","patch"===o&&(r.attrs=i),a=this.sync(o,this,r),i&&r.wait&&(this.attributes=s),a},destroy:function(t){t=t?n.clone(t):{};var e=this,r=t.success,i=function(){e.trigger("destroy",e,e.collection,t)};if(t.success=function(n){(t.wait||e.isNew())&&i(),r&&r(e,n,t),e.isNew()||e.trigger("sync",e,n,t)},this.isNew())return t.success(),!1;L(this,t);var o=this.sync("delete",this,t);return t.wait||i(),o},url:function(){var t=n.result(this,"urlRoot")||n.result(this.collection,"url")||j();return this.isNew()?t:t.replace(/([^\/])$/,"$1/")+encodeURIComponent(this.id)},parse:function(t,e){return t},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return!this.has(this.idAttribute)},isValid:function(t){return this._validate({},n.extend(t||{},{validate:!0}))},_validate:function(t,e){if(!e.validate||!this.validate)return!0;t=n.extend({},this.attributes,t);var r=this.validationError=this.validate(t,e)||null;return r?(this.trigger("invalid",this,r,n.extend(e,{validationError:r})),!1):!0}});var h=["keys","values","pairs","invert","pick","omit"];n.each(h,function(t){p.prototype[t]=function(){var e=a.call(arguments);return e.unshift(this.attributes),n[t].apply(n,e)}});var d=e.Collection=function(t,e){e||(e={}),e.model&&(this.model=e.model),void 0!==e.comparator&&(this.comparator=e.comparator),this._reset(),this.initialize.apply(this,arguments),t&&this.reset(t,n.extend({silent:!0},e))},v={add:!0,remove:!0,merge:!0},g={add:!0,remove:!1};n.extend(d.prototype,s,{model:p,initialize:function(){},toJSON:function(t){return this.map(function(e){return e.toJSON(t)})},sync:function(){return e.sync.apply(this,arguments)},add:function(t,e){return this.set(t,n.extend({merge:!1},e,g))},remove:function(t,e){var r=!n.isArray(t);t=r?[t]:n.clone(t),e||(e={});var i,o,a,s;for(i=0,o=t.length;o>i;i++)s=t[i]=this.get(t[i]),s&&(delete this._byId[s.id],delete this._byId[s.cid],a=this.indexOf(s),this.models.splice(a,1),this.length--,e.silent||(e.index=a,s.trigger("remove",s,this,e)),this._removeReference(s,e));return r?t[0]:t},set:function(t,e){e=n.defaults({},e,v),e.parse&&(t=this.parse(t,e));var r=!n.isArray(t);t=r?t?[t]:[]:n.clone(t);var i,o,a,s,u,c,l,f=e.at,h=this.model,d=this.comparator&&null==f&&e.sort!==!1,g=n.isString(this.comparator)?this.comparator:null,m=[],y=[],b={},w=e.add,_=e.merge,E=e.remove,C=!d&&w&&E?[]:!1;for(i=0,o=t.length;o>i;i++){if(u=t[i]||{},a=u instanceof p?s=u:u[h.prototype.idAttribute||"id"],c=this.get(a))E&&(b[c.cid]=!0),_&&(u=u===s?s.attributes:u,e.parse&&(u=c.parse(u,e)),c.set(u,e),d&&!l&&c.hasChanged(g)&&(l=!0)),t[i]=c;else if(w){if(s=t[i]=this._prepareModel(u,e),!s)continue;m.push(s),this._addReference(s,e)}s=c||s,!C||!s.isNew()&&b[s.id]||C.push(s),b[s.id]=!0}if(E){for(i=0,o=this.length;o>i;++i)b[(s=this.models[i]).cid]||y.push(s);y.length&&this.remove(y,e)}if(m.length||C&&C.length)if(d&&(l=!0),this.length+=m.length,null!=f)for(i=0,o=m.length;o>i;i++)this.models.splice(f+i,0,m[i]);else{C&&(this.models.length=0);var R=C||m;for(i=0,o=R.length;o>i;i++)this.models.push(R[i])}if(l&&this.sort({silent:!0}),!e.silent){for(i=0,o=m.length;o>i;i++)(s=m[i]).trigger("add",s,this,e);(l||C&&C.length)&&this.trigger("sort",this,e)}return r?t[0]:t},reset:function(t,e){e||(e={});for(var r=0,i=this.models.length;i>r;r++)this._removeReference(this.models[r],e);return e.previousModels=this.models,this._reset(),t=this.add(t,n.extend({silent:!0},e)),e.silent||this.trigger("reset",this,e),t},push:function(t,e){return this.add(t,n.extend({at:this.length},e))},pop:function(t){var e=this.at(this.length-1);return this.remove(e,t),e},unshift:function(t,e){return this.add(t,n.extend({at:0},e))},shift:function(t){var e=this.at(0);return this.remove(e,t),e},slice:function(){return a.apply(this.models,arguments)},get:function(t){return null==t?void 0:this._byId[t]||this._byId[t.id]||this._byId[t.cid]},at:function(t){return this.models[t]},where:function(t,e){return n.isEmpty(t)?e?void 0:[]:this[e?"find":"filter"](function(e){for(var n in t)if(t[n]!==e.get(n))return!1;return!0})},findWhere:function(t){return this.where(t,!0)},sort:function(t){if(!this.comparator)throw new Error("Cannot sort a set without a comparator");return t||(t={}),n.isString(this.comparator)||1===this.comparator.length?this.models=this.sortBy(this.comparator,this):this.models.sort(n.bind(this.comparator,this)),t.silent||this.trigger("sort",this,t),this},pluck:function(t){return n.invoke(this.models,"get",t)},fetch:function(t){t=t?n.clone(t):{},void 0===t.parse&&(t.parse=!0);var e=t.success,r=this;return t.success=function(n){var i=t.reset?"reset":"set";r[i](n,t),e&&e(r,n,t),r.trigger("sync",r,n,t)},L(this,t),this.sync("read",this,t)},create:function(t,e){if(e=e?n.clone(e):{},!(t=this._prepareModel(t,e)))return!1;e.wait||this.add(t,e);var r=this,i=e.success;return e.success=function(t,n){e.wait&&r.add(t,e),i&&i(t,n,e)},t.save(null,e),t},parse:function(t,e){return t},clone:function(){return new this.constructor(this.models)},_reset:function(){this.length=0,this.models=[],this._byId={}},_prepareModel:function(t,e){if(t instanceof p)return t;e=e?n.clone(e):{},e.collection=this;var r=new this.model(t,e);return r.validationError?(this.trigger("invalid",this,r.validationError,e),!1):r},_addReference:function(t,e){this._byId[t.cid]=t,null!=t.id&&(this._byId[t.id]=t),t.collection||(t.collection=this),t.on("all",this._onModelEvent,this)},_removeReference:function(t,e){this===t.collection&&delete t.collection,t.off("all",this._onModelEvent,this)},_onModelEvent:function(t,e,n,r){("add"!==t&&"remove"!==t||n===this)&&("destroy"===t&&this.remove(e,r),e&&t==="change:"+e.idAttribute&&(delete this._byId[e.previous(e.idAttribute)],null!=e.id&&(this._byId[e.id]=e)),this.trigger.apply(this,arguments))}});var m=["forEach","each","map","collect","reduce","foldl","inject","reduceRight","foldr","find","detect","filter","select","reject","every","all","some","any","include","contains","invoke","max","min","toArray","size","first","head","take","initial","rest","tail","drop","last","without","difference","indexOf","shuffle","lastIndexOf","isEmpty","chain","sample"];n.each(m,function(t){d.prototype[t]=function(){var e=a.call(arguments);return e.unshift(this.models),n[t].apply(n,e)}});var y=["groupBy","countBy","sortBy","indexBy"];n.each(y,function(t){d.prototype[t]=function(e,r){var i=n.isFunction(e)?e:function(t){return t.get(e)};return n[t](this.models,i,r)}});var b=e.View=function(t){this.cid=n.uniqueId("view"),t||(t={}),n.extend(this,n.pick(t,_)),this._ensureElement(),this.initialize.apply(this,arguments),this.delegateEvents()},w=/^(\S+)\s*(.*)$/,_=["model","collection","el","id","attributes","className","tagName","events"];n.extend(b.prototype,s,{tagName:"div",$:function(t){return this.$el.find(t)},initialize:function(){},render:function(){return this},remove:function(){return this.$el.remove(),this.stopListening(),this},setElement:function(t,n){return this.$el&&this.undelegateEvents(),this.$el=t instanceof e.$?t:e.$(t),this.el=this.$el[0],n!==!1&&this.delegateEvents(),this},delegateEvents:function(t){if(!t&&!(t=n.result(this,"events")))return this;this.undelegateEvents();for(var e in t){var r=t[e];if(n.isFunction(r)||(r=this[t[e]]),r){var i=e.match(w),o=i[1],a=i[2];r=n.bind(r,this),o+=".delegateEvents"+this.cid,""===a?this.$el.on(o,r):this.$el.on(o,a,r)}}return this},undelegateEvents:function(){return this.$el.off(".delegateEvents"+this.cid),this},_ensureElement:function(){if(this.el)this.setElement(n.result(this,"el"),!1);else{var t=n.extend({},n.result(this,"attributes"));this.id&&(t.id=n.result(this,"id")),this.className&&(t["class"]=n.result(this,"className"));var r=e.$("<"+n.result(this,"tagName")+">").attr(t);this.setElement(r,!1)}}}),e.sync=function(t,r,i){var o=C[t];n.defaults(i||(i={}),{emulateHTTP:e.emulateHTTP,emulateJSON:e.emulateJSON});var a={type:o,dataType:"json"};if(i.url||(a.url=n.result(r,"url")||j()),null!=i.data||!r||"create"!==t&&"update"!==t&&"patch"!==t||(a.contentType="application/json",a.data=JSON.stringify(i.attrs||r.toJSON(i))),i.emulateJSON&&(a.contentType="application/x-www-form-urlencoded",a.data=a.data?{model:a.data}:{}),i.emulateHTTP&&("PUT"===o||"DELETE"===o||"PATCH"===o)){a.type="POST",i.emulateJSON&&(a.data._method=o);var s=i.beforeSend;i.beforeSend=function(t){return t.setRequestHeader("X-HTTP-Method-Override",o),s?s.apply(this,arguments):void 0}}"GET"===a.type||i.emulateJSON||(a.processData=!1),"PATCH"===a.type&&E&&(a.xhr=function(){return new ActiveXObject("Microsoft.XMLHTTP")});var u=i.xhr=e.ajax(n.extend(a,i));return r.trigger("request",r,u,i),u};var E=!("undefined"==typeof window||!window.ActiveXObject||window.XMLHttpRequest&&(new XMLHttpRequest).dispatchEvent),C={create:"POST",update:"PUT",patch:"PATCH","delete":"DELETE",read:"GET"};e.ajax=function(){return e.$.ajax.apply(e.$,arguments)};var R=e.Router=function(t){t||(t={}),t.routes&&(this.routes=t.routes),this._bindRoutes(),this.initialize.apply(this,arguments)},k=/\((.*?)\)/g,O=/(\(\?)?:\w+/g,S=/\*\w+/g,T=/[\-{}\[\]+?.,\\\^$|#\s]/g;n.extend(R.prototype,s,{initialize:function(){},route:function(t,r,i){n.isRegExp(t)||(t=this._routeToRegExp(t)),n.isFunction(r)&&(i=r,r=""),i||(i=this[r]);var o=this;return e.history.route(t,function(n){var a=o._extractParameters(t,n);o.execute(i,a),o.trigger.apply(o,["route:"+r].concat(a)),o.trigger("route",r,a),e.history.trigger("route",o,r,a)}),this},execute:function(t,e){t&&t.apply(this,e)},navigate:function(t,n){return e.history.navigate(t,n),this},_bindRoutes:function(){if(this.routes){this.routes=n.result(this,"routes");for(var t,e=n.keys(this.routes);null!=(t=e.pop());)this.route(t,this.routes[t])}},_routeToRegExp:function(t){return t=t.replace(T,"\\$&").replace(k,"(?:$1)?").replace(O,function(t,e){return e?t:"([^/?]+)"}).replace(S,"([^?]*?)"),new RegExp("^"+t+"(?:\\?([\\s\\S]*))?$")},_extractParameters:function(t,e){var r=t.exec(e).slice(1);return n.map(r,function(t,e){return e===r.length-1?t||null:t?decodeURIComponent(t):null})}});var x=e.History=function(){this.handlers=[],n.bindAll(this,"checkUrl"),"undefined"!=typeof window&&(this.location=window.location,this.history=window.history)},I=/^[#\/]|\s+$/g,M=/^\/+|\/+$/g,P=/msie [\w.]+/,A=/\/$/,N=/#.*$/;x.started=!1,n.extend(x.prototype,s,{interval:50,atRoot:function(){return this.location.pathname.replace(/[^\/]$/,"$&/")===this.root},getHash:function(t){var e=(t||this).location.href.match(/#(.*)$/);return e?e[1]:""},getFragment:function(t,e){if(null==t)if(this._hasPushState||!this._wantsHashChange||e){t=decodeURI(this.location.pathname+this.location.search);var n=this.root.replace(A,"");t.indexOf(n)||(t=t.slice(n.length))}else t=this.getHash();return t.replace(I,"")},start:function(t){if(x.started)throw new Error("Backbone.history has already been started");x.started=!0,this.options=n.extend({root:"/"},this.options,t),this.root=this.options.root,this._wantsHashChange=this.options.hashChange!==!1,this._wantsPushState=!!this.options.pushState,this._hasPushState=!!(this.options.pushState&&this.history&&this.history.pushState);var r=this.getFragment(),i=document.documentMode,o=P.exec(navigator.userAgent.toLowerCase())&&(!i||7>=i);if(this.root=("/"+this.root+"/").replace(M,"/"),o&&this._wantsHashChange){var a=e.$('<iframe src="javascript:0" tabindex="-1">');this.iframe=a.hide().appendTo("body")[0].contentWindow,this.navigate(r)}this._hasPushState?e.$(window).on("popstate",this.checkUrl):this._wantsHashChange&&"onhashchange"in window&&!o?e.$(window).on("hashchange",this.checkUrl):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),this.fragment=r;var s=this.location;if(this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot())return this.fragment=this.getFragment(null,!0),this.location.replace(this.root+"#"+this.fragment),!0;this._hasPushState&&this.atRoot()&&s.hash&&(this.fragment=this.getHash().replace(I,""),this.history.replaceState({},document.title,this.root+this.fragment))}return this.options.silent?void 0:this.loadUrl()},stop:function(){e.$(window).off("popstate",this.checkUrl).off("hashchange",this.checkUrl),this._checkUrlInterval&&clearInterval(this._checkUrlInterval),x.started=!1},route:function(t,e){this.handlers.unshift({route:t,callback:e})},checkUrl:function(t){var e=this.getFragment();return e===this.fragment&&this.iframe&&(e=this.getFragment(this.getHash(this.iframe))),e===this.fragment?!1:(this.iframe&&this.navigate(e),void this.loadUrl())},loadUrl:function(t){return t=this.fragment=this.getFragment(t),n.any(this.handlers,function(e){return e.route.test(t)?(e.callback(t),!0):void 0})},navigate:function(t,e){if(!x.started)return!1;e&&e!==!0||(e={trigger:!!e});var n=this.root+(t=this.getFragment(t||""));if(t=t.replace(N,""),this.fragment!==t){if(this.fragment=t,""===t&&"/"!==n&&(n=n.slice(0,-1)),this._hasPushState)this.history[e.replace?"replaceState":"pushState"]({},document.title,n);else{if(!this._wantsHashChange)return this.location.assign(n);this._updateHash(this.location,t,e.replace),this.iframe&&t!==this.getFragment(this.getHash(this.iframe))&&(e.replace||this.iframe.document.open().close(),this._updateHash(this.iframe.location,t,e.replace))}return e.trigger?this.loadUrl(t):void 0}},_updateHash:function(t,e,n){if(n){var r=t.href.replace(/(javascript:|#).*$/,"");t.replace(r+"#"+e)}else t.hash="#"+e}}),e.history=new x;var D=function(t,e){var r,i=this;r=t&&n.has(t,"constructor")?t.constructor:function(){return i.apply(this,arguments)},n.extend(r,i,e);var o=function(){this.constructor=r};return o.prototype=i.prototype,r.prototype=new o,t&&n.extend(r.prototype,t),r.__super__=i.prototype,r};p.extend=d.extend=R.extend=b.extend=x.extend=D;var j=function(){throw new Error('A "url" property or function must be specified')},L=function(t,e){var n=e.error;e.error=function(r){n&&n(t,r,e),t.trigger("error",t,r,e)}};return e})},{underscore:177}],2:[function(t,e,n){(function(e){function r(){function t(){}try{var e=new Uint8Array(1);return e.foo=function(){return 42},e.constructor=t,42===e.foo()&&e.constructor===t&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(n){return!1}}function i(){return o.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function o(t){return this instanceof o?(this.length=0,this.parent=void 0,"number"==typeof t?a(this,t):"string"==typeof t?s(this,t,arguments.length>1?arguments[1]:"utf8"):u(this,t)):arguments.length>1?new o(t,arguments[1]):new o(t)}function a(t,e){if(t=v(t,0>e?0:0|g(e)),!o.TYPED_ARRAY_SUPPORT)for(var n=0;e>n;n++)t[n]=0;return t}function s(t,e,n){("string"!=typeof n||""===n)&&(n="utf8");var r=0|y(e,n);return t=v(t,r),t.write(e,n),t}function u(t,e){if(o.isBuffer(e))return c(t,e);if(Z(e))return l(t,e);if(null==e)throw new TypeError("must start with number, buffer, array or string");if("undefined"!=typeof ArrayBuffer){if(e.buffer instanceof ArrayBuffer)return f(t,e);if(e instanceof ArrayBuffer)return p(t,e)}return e.length?h(t,e):d(t,e)}function c(t,e){var n=0|g(e.length);return t=v(t,n),e.copy(t,0,0,n),t}function l(t,e){var n=0|g(e.length);t=v(t,n);for(var r=0;n>r;r+=1)t[r]=255&e[r];return t}function f(t,e){var n=0|g(e.length);t=v(t,n);for(var r=0;n>r;r+=1)t[r]=255&e[r];return t}function p(t,e){return o.TYPED_ARRAY_SUPPORT?(e.byteLength,t=o._augment(new Uint8Array(e))):t=f(t,new Uint8Array(e)),t}function h(t,e){var n=0|g(e.length);t=v(t,n);for(var r=0;n>r;r+=1)t[r]=255&e[r];return t}function d(t,e){var n,r=0;"Buffer"===e.type&&Z(e.data)&&(n=e.data,r=0|g(n.length)),t=v(t,r);for(var i=0;r>i;i+=1)t[i]=255&n[i];return t}function v(t,e){o.TYPED_ARRAY_SUPPORT?(t=o._augment(new Uint8Array(e)),t.__proto__=o.prototype):(t.length=e,t._isBuffer=!0);var n=0!==e&&e<=o.poolSize>>>1;return n&&(t.parent=$),t}function g(t){if(t>=i())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i().toString(16)+" bytes");return 0|t}function m(t,e){if(!(this instanceof m))return new m(t,e);var n=new o(t,e);return delete n.parent,n}function y(t,e){"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"binary":case"raw":case"raws":return n;case"utf8":case"utf-8":return z(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return W(t).length;default:if(r)return z(t).length;e=(""+e).toLowerCase(),r=!0}}function b(t,e,n){var r=!1;if(e=0|e,n=void 0===n||n===1/0?this.length:0|n,t||(t="utf8"),0>e&&(e=0),n>this.length&&(n=this.length),e>=n)return"";for(;;)switch(t){case"hex":return M(this,e,n);case"utf8":case"utf-8":return S(this,e,n);case"ascii":return x(this,e,n);case"binary":return I(this,e,n);case"base64":return O(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function w(t,e,n,r){n=Number(n)||0;var i=t.length-n;r?(r=Number(r),r>i&&(r=i)):r=i;var o=e.length;if(o%2!==0)throw new Error("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;r>a;a++){var s=parseInt(e.substr(2*a,2),16);if(isNaN(s))throw new Error("Invalid hex string");t[n+a]=s}return a}function _(t,e,n,r){return K(z(e,t.length-n),t,n,r)}function E(t,e,n,r){return K(q(e),t,n,r)}function C(t,e,n,r){return E(t,e,n,r)}function R(t,e,n,r){return K(W(e),t,n,r)}function k(t,e,n,r){return K(G(e,t.length-n),t,n,r)}function O(t,e,n){return 0===e&&n===t.length?Y.fromByteArray(t):Y.fromByteArray(t.slice(e,n))}function S(t,e,n){n=Math.min(t.length,n);for(var r=[],i=e;n>i;){var o=t[i],a=null,s=o>239?4:o>223?3:o>191?2:1;if(n>=i+s){var u,c,l,f;switch(s){case 1:128>o&&(a=o);break;case 2:u=t[i+1],128===(192&u)&&(f=(31&o)<<6|63&u,f>127&&(a=f));break;case 3:u=t[i+1],c=t[i+2],128===(192&u)&&128===(192&c)&&(f=(15&o)<<12|(63&u)<<6|63&c,f>2047&&(55296>f||f>57343)&&(a=f));break;case 4:u=t[i+1],c=t[i+2],l=t[i+3],128===(192&u)&&128===(192&c)&&128===(192&l)&&(f=(15&o)<<18|(63&u)<<12|(63&c)<<6|63&l,f>65535&&1114112>f&&(a=f))}}null===a?(a=65533,s=1):a>65535&&(a-=65536,r.push(a>>>10&1023|55296),a=56320|1023&a),r.push(a),i+=s}return T(r)}function T(t){var e=t.length;if(Q>=e)return String.fromCharCode.apply(String,t);for(var n="",r=0;e>r;)n+=String.fromCharCode.apply(String,t.slice(r,r+=Q));return n}function x(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;n>i;i++)r+=String.fromCharCode(127&t[i]);return r}function I(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;n>i;i++)r+=String.fromCharCode(t[i]);return r}function M(t,e,n){var r=t.length;(!e||0>e)&&(e=0),(!n||0>n||n>r)&&(n=r);for(var i="",o=e;n>o;o++)i+=H(t[o]);return i}function P(t,e,n){for(var r=t.slice(e,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function A(t,e,n){if(t%1!==0||0>t)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function N(t,e,n,r,i,a){if(!o.isBuffer(t))throw new TypeError("buffer must be a Buffer instance");if(e>i||a>e)throw new RangeError("value is out of bounds");if(n+r>t.length)throw new RangeError("index out of range")}function D(t,e,n,r){0>e&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-n,2);o>i;i++)t[n+i]=(e&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function j(t,e,n,r){0>e&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-n,4);o>i;i++)t[n+i]=e>>>8*(r?i:3-i)&255}function L(t,e,n,r,i,o){if(e>i||o>e)throw new RangeError("value is out of bounds");if(n+r>t.length)throw new RangeError("index out of range");if(0>n)throw new RangeError("index out of range")}function B(t,e,n,r,i){return i||L(t,e,n,4,3.4028234663852886e38,-3.4028234663852886e38),X.write(t,e,n,r,23,4),n+4}function U(t,e,n,r,i){return i||L(t,e,n,8,1.7976931348623157e308,-1.7976931348623157e308),X.write(t,e,n,r,52,8),n+8}function F(t){if(t=V(t).replace(tt,""),t.length<2)return"";for(;t.length%4!==0;)t+="=";return t}function V(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function H(t){return 16>t?"0"+t.toString(16):t.toString(16)}function z(t,e){e=e||1/0;for(var n,r=t.length,i=null,o=[],a=0;r>a;a++){if(n=t.charCodeAt(a),n>55295&&57344>n){if(!i){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(e-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(56320>n){(e-=3)>-1&&o.push(239,191,189),i=n;continue}n=i-55296<<10|n-56320|65536}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,128>n){if((e-=1)<0)break;o.push(n)}else if(2048>n){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(65536>n){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(1114112>n))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function q(t){for(var e=[],n=0;n<t.length;n++)e.push(255&t.charCodeAt(n));return e}function G(t,e){for(var n,r,i,o=[],a=0;a<t.length&&!((e-=2)<0);a++)n=t.charCodeAt(a),r=n>>8,i=n%256,o.push(i),o.push(r);return o}function W(t){return Y.toByteArray(F(t))}function K(t,e,n,r){for(var i=0;r>i&&!(i+n>=e.length||i>=t.length);i++)e[i+n]=t[i];return i}var Y=t("base64-js"),X=t("ieee754"),Z=t("is-array");n.Buffer=o,n.SlowBuffer=m,n.INSPECT_MAX_BYTES=50,o.poolSize=8192;var $={};o.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:r(),o.TYPED_ARRAY_SUPPORT&&(o.prototype.__proto__=Uint8Array.prototype,o.__proto__=Uint8Array),o.isBuffer=function(t){return!(null==t||!t._isBuffer)},o.compare=function(t,e){if(!o.isBuffer(t)||!o.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,r=e.length,i=0,a=Math.min(n,r);a>i&&t[i]===e[i];)++i;return i!==a&&(n=t[i],r=e[i]),r>n?-1:n>r?1:0},o.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.concat=function(t,e){if(!Z(t))throw new TypeError("list argument must be an Array of Buffers.");if(0===t.length)return new o(0);var n;if(void 0===e)for(e=0,n=0;n<t.length;n++)e+=t[n].length;var r=new o(e),i=0;for(n=0;n<t.length;n++){var a=t[n];a.copy(r,i),i+=a.length}return r},o.byteLength=y,o.prototype.length=void 0,o.prototype.parent=void 0,o.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?S(this,0,t):b.apply(this,arguments)},o.prototype.equals=function(t){if(!o.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:0===o.compare(this,t)},o.prototype.inspect=function(){var t="",e=n.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,e).match(/.{2}/g).join(" "),this.length>e&&(t+=" ... ")),"<Buffer "+t+">"},o.prototype.compare=function(t){if(!o.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t?0:o.compare(this,t)},o.prototype.indexOf=function(t,e){function n(t,e,n){for(var r=-1,i=0;n+i<t.length;i++)if(t[n+i]===e[-1===r?0:i-r]){if(-1===r&&(r=i),i-r+1===e.length)return n+r}else r=-1;return-1}if(e>2147483647?e=2147483647:-2147483648>e&&(e=-2147483648),e>>=0,0===this.length)return-1;if(e>=this.length)return-1;if(0>e&&(e=Math.max(this.length+e,0)),"string"==typeof t)return 0===t.length?-1:String.prototype.indexOf.call(this,t,e);if(o.isBuffer(t))return n(this,t,e);if("number"==typeof t)return o.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,t,e):n(this,[t],e);throw new TypeError("val must be string, number or Buffer")},o.prototype.get=function(t){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(t)},o.prototype.set=function(t,e){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(t,e)},o.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)r=e,n=this.length,e=0;else if(isFinite(e))e=0|e,isFinite(n)?(n=0|n,void 0===r&&(r="utf8")):(r=n,n=void 0);else{var i=r;r=e,e=0|n,n=i}var o=this.length-e;if((void 0===n||n>o)&&(n=o),t.length>0&&(0>n||0>e)||e>this.length)throw new RangeError("attempt to write outside buffer bounds");r||(r="utf8");for(var a=!1;;)switch(r){case"hex":return w(this,t,e,n);case"utf8":case"utf-8":return _(this,t,e,n);case"ascii":return E(this,t,e,n);case"binary":return C(this,t,e,n);case"base64":return R(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,t,e,n);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Q=4096;o.prototype.slice=function(t,e){var n=this.length;t=~~t,e=void 0===e?n:~~e,0>t?(t+=n,0>t&&(t=0)):t>n&&(t=n),0>e?(e+=n,0>e&&(e=0)):e>n&&(e=n),t>e&&(e=t);var r;if(o.TYPED_ARRAY_SUPPORT)r=o._augment(this.subarray(t,e));else{var i=e-t;r=new o(i,void 0);for(var a=0;i>a;a++)r[a]=this[a+t]}return r.length&&(r.parent=this.parent||this),r},o.prototype.readUIntLE=function(t,e,n){t=0|t,e=0|e,n||A(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return r},o.prototype.readUIntBE=function(t,e,n){t=0|t,e=0|e,n||A(t,e,this.length);for(var r=this[t+--e],i=1;e>0&&(i*=256);)r+=this[t+--e]*i;return r},o.prototype.readUInt8=function(t,e){return e||A(t,1,this.length),this[t]},o.prototype.readUInt16LE=function(t,e){return e||A(t,2,this.length),this[t]|this[t+1]<<8},o.prototype.readUInt16BE=function(t,e){return e||A(t,2,this.length),this[t]<<8|this[t+1]},o.prototype.readUInt32LE=function(t,e){return e||A(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},o.prototype.readUInt32BE=function(t,e){return e||A(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},o.prototype.readIntLE=function(t,e,n){t=0|t,e=0|e,n||A(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return i*=128,r>=i&&(r-=Math.pow(2,8*e)),r},o.prototype.readIntBE=function(t,e,n){t=0|t,e=0|e,n||A(t,e,this.length);for(var r=e,i=1,o=this[t+--r];r>0&&(i*=256);)o+=this[t+--r]*i;
return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},o.prototype.readInt8=function(t,e){return e||A(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},o.prototype.readInt16LE=function(t,e){e||A(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},o.prototype.readInt16BE=function(t,e){e||A(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},o.prototype.readInt32LE=function(t,e){return e||A(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},o.prototype.readInt32BE=function(t,e){return e||A(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},o.prototype.readFloatLE=function(t,e){return e||A(t,4,this.length),X.read(this,t,!0,23,4)},o.prototype.readFloatBE=function(t,e){return e||A(t,4,this.length),X.read(this,t,!1,23,4)},o.prototype.readDoubleLE=function(t,e){return e||A(t,8,this.length),X.read(this,t,!0,52,8)},o.prototype.readDoubleBE=function(t,e){return e||A(t,8,this.length),X.read(this,t,!1,52,8)},o.prototype.writeUIntLE=function(t,e,n,r){t=+t,e=0|e,n=0|n,r||N(this,t,e,n,Math.pow(2,8*n),0);var i=1,o=0;for(this[e]=255&t;++o<n&&(i*=256);)this[e+o]=t/i&255;return e+n},o.prototype.writeUIntBE=function(t,e,n,r){t=+t,e=0|e,n=0|n,r||N(this,t,e,n,Math.pow(2,8*n),0);var i=n-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+n},o.prototype.writeUInt8=function(t,e,n){return t=+t,e=0|e,n||N(this,t,e,1,255,0),o.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},o.prototype.writeUInt16LE=function(t,e,n){return t=+t,e=0|e,n||N(this,t,e,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):D(this,t,e,!0),e+2},o.prototype.writeUInt16BE=function(t,e,n){return t=+t,e=0|e,n||N(this,t,e,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):D(this,t,e,!1),e+2},o.prototype.writeUInt32LE=function(t,e,n){return t=+t,e=0|e,n||N(this,t,e,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):j(this,t,e,!0),e+4},o.prototype.writeUInt32BE=function(t,e,n){return t=+t,e=0|e,n||N(this,t,e,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):j(this,t,e,!1),e+4},o.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e=0|e,!r){var i=Math.pow(2,8*n-1);N(this,t,e,n,i-1,-i)}var o=0,a=1,s=0>t?1:0;for(this[e]=255&t;++o<n&&(a*=256);)this[e+o]=(t/a>>0)-s&255;return e+n},o.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e=0|e,!r){var i=Math.pow(2,8*n-1);N(this,t,e,n,i-1,-i)}var o=n-1,a=1,s=0>t?1:0;for(this[e+o]=255&t;--o>=0&&(a*=256);)this[e+o]=(t/a>>0)-s&255;return e+n},o.prototype.writeInt8=function(t,e,n){return t=+t,e=0|e,n||N(this,t,e,1,127,-128),o.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),0>t&&(t=255+t+1),this[e]=255&t,e+1},o.prototype.writeInt16LE=function(t,e,n){return t=+t,e=0|e,n||N(this,t,e,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):D(this,t,e,!0),e+2},o.prototype.writeInt16BE=function(t,e,n){return t=+t,e=0|e,n||N(this,t,e,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):D(this,t,e,!1),e+2},o.prototype.writeInt32LE=function(t,e,n){return t=+t,e=0|e,n||N(this,t,e,4,2147483647,-2147483648),o.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):j(this,t,e,!0),e+4},o.prototype.writeInt32BE=function(t,e,n){return t=+t,e=0|e,n||N(this,t,e,4,2147483647,-2147483648),0>t&&(t=4294967295+t+1),o.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):j(this,t,e,!1),e+4},o.prototype.writeFloatLE=function(t,e,n){return B(this,t,e,!0,n)},o.prototype.writeFloatBE=function(t,e,n){return B(this,t,e,!1,n)},o.prototype.writeDoubleLE=function(t,e,n){return U(this,t,e,!0,n)},o.prototype.writeDoubleBE=function(t,e,n){return U(this,t,e,!1,n)},o.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&n>r&&(r=n),r===n)return 0;if(0===t.length||0===this.length)return 0;if(0>e)throw new RangeError("targetStart out of bounds");if(0>n||n>=this.length)throw new RangeError("sourceStart out of bounds");if(0>r)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-n&&(r=t.length-e+n);var i,a=r-n;if(this===t&&e>n&&r>e)for(i=a-1;i>=0;i--)t[i+e]=this[i+n];else if(1e3>a||!o.TYPED_ARRAY_SUPPORT)for(i=0;a>i;i++)t[i+e]=this[i+n];else t._set(this.subarray(n,n+a),e);return a},o.prototype.fill=function(t,e,n){if(t||(t=0),e||(e=0),n||(n=this.length),e>n)throw new RangeError("end < start");if(n!==e&&0!==this.length){if(0>e||e>=this.length)throw new RangeError("start out of bounds");if(0>n||n>this.length)throw new RangeError("end out of bounds");var r;if("number"==typeof t)for(r=e;n>r;r++)this[r]=t;else{var i=z(t.toString()),o=i.length;for(r=e;n>r;r++)this[r]=i[r%o]}return this}},o.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(o.TYPED_ARRAY_SUPPORT)return new o(this).buffer;for(var t=new Uint8Array(this.length),e=0,n=t.length;n>e;e+=1)t[e]=this[e];return t.buffer}throw new TypeError("Buffer.toArrayBuffer not supported in this browser")};var J=o.prototype;o._augment=function(t){return t.constructor=o,t._isBuffer=!0,t._set=t.set,t.get=J.get,t.set=J.set,t.write=J.write,t.toString=J.toString,t.toLocaleString=J.toString,t.toJSON=J.toJSON,t.equals=J.equals,t.compare=J.compare,t.indexOf=J.indexOf,t.copy=J.copy,t.slice=J.slice,t.readUIntLE=J.readUIntLE,t.readUIntBE=J.readUIntBE,t.readUInt8=J.readUInt8,t.readUInt16LE=J.readUInt16LE,t.readUInt16BE=J.readUInt16BE,t.readUInt32LE=J.readUInt32LE,t.readUInt32BE=J.readUInt32BE,t.readIntLE=J.readIntLE,t.readIntBE=J.readIntBE,t.readInt8=J.readInt8,t.readInt16LE=J.readInt16LE,t.readInt16BE=J.readInt16BE,t.readInt32LE=J.readInt32LE,t.readInt32BE=J.readInt32BE,t.readFloatLE=J.readFloatLE,t.readFloatBE=J.readFloatBE,t.readDoubleLE=J.readDoubleLE,t.readDoubleBE=J.readDoubleBE,t.writeUInt8=J.writeUInt8,t.writeUIntLE=J.writeUIntLE,t.writeUIntBE=J.writeUIntBE,t.writeUInt16LE=J.writeUInt16LE,t.writeUInt16BE=J.writeUInt16BE,t.writeUInt32LE=J.writeUInt32LE,t.writeUInt32BE=J.writeUInt32BE,t.writeIntLE=J.writeIntLE,t.writeIntBE=J.writeIntBE,t.writeInt8=J.writeInt8,t.writeInt16LE=J.writeInt16LE,t.writeInt16BE=J.writeInt16BE,t.writeInt32LE=J.writeInt32LE,t.writeInt32BE=J.writeInt32BE,t.writeFloatLE=J.writeFloatLE,t.writeFloatBE=J.writeFloatBE,t.writeDoubleLE=J.writeDoubleLE,t.writeDoubleBE=J.writeDoubleBE,t.fill=J.fill,t.inspect=J.inspect,t.toArrayBuffer=J.toArrayBuffer,t};var tt=/[^+\/0-9A-Za-z-_]/g}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"base64-js":3,ieee754:4,"is-array":5}],3:[function(t,e,n){var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(t){"use strict";function e(t){var e=t.charCodeAt(0);return e===a||e===f?62:e===s||e===p?63:u>e?-1:u+10>e?e-u+26+26:l+26>e?e-l:c+26>e?e-c+26:void 0}function n(t){function n(t){c[f++]=t}var r,i,a,s,u,c;if(t.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var l=t.length;u="="===t.charAt(l-2)?2:"="===t.charAt(l-1)?1:0,c=new o(3*t.length/4-u),a=u>0?t.length-4:t.length;var f=0;for(r=0,i=0;a>r;r+=4,i+=3)s=e(t.charAt(r))<<18|e(t.charAt(r+1))<<12|e(t.charAt(r+2))<<6|e(t.charAt(r+3)),n((16711680&s)>>16),n((65280&s)>>8),n(255&s);return 2===u?(s=e(t.charAt(r))<<2|e(t.charAt(r+1))>>4,n(255&s)):1===u&&(s=e(t.charAt(r))<<10|e(t.charAt(r+1))<<4|e(t.charAt(r+2))>>2,n(s>>8&255),n(255&s)),c}function i(t){function e(t){return r.charAt(t)}function n(t){return e(t>>18&63)+e(t>>12&63)+e(t>>6&63)+e(63&t)}var i,o,a,s=t.length%3,u="";for(i=0,a=t.length-s;a>i;i+=3)o=(t[i]<<16)+(t[i+1]<<8)+t[i+2],u+=n(o);switch(s){case 1:o=t[t.length-1],u+=e(o>>2),u+=e(o<<4&63),u+="==";break;case 2:o=(t[t.length-2]<<8)+t[t.length-1],u+=e(o>>10),u+=e(o>>4&63),u+=e(o<<2&63),u+="="}return u}var o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="+".charCodeAt(0),s="/".charCodeAt(0),u="0".charCodeAt(0),c="a".charCodeAt(0),l="A".charCodeAt(0),f="-".charCodeAt(0),p="_".charCodeAt(0);t.toByteArray=n,t.fromByteArray=i}("undefined"==typeof n?this.base64js={}:n)},{}],4:[function(t,e,n){n.read=function(t,e,n,r,i){var o,a,s=8*i-r-1,u=(1<<s)-1,c=u>>1,l=-7,f=n?i-1:0,p=n?-1:1,h=t[e+f];for(f+=p,o=h&(1<<-l)-1,h>>=-l,l+=s;l>0;o=256*o+t[e+f],f+=p,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=r;l>0;a=256*a+t[e+f],f+=p,l-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:(h?-1:1)*(1/0);a+=Math.pow(2,r),o-=c}return(h?-1:1)*a*Math.pow(2,o-r)},n.write=function(t,e,n,r,i,o){var a,s,u,c=8*o-i-1,l=(1<<c)-1,f=l>>1,p=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:o-1,d=r?1:-1,v=0>e||0===e&&0>1/e?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=l):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),e+=a+f>=1?p/u:p*Math.pow(2,1-f),e*u>=2&&(a++,u/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(e*u-1)*Math.pow(2,i),a+=f):(s=e*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;t[n+h]=255&s,h+=d,s/=256,i-=8);for(a=a<<i|s,c+=i;c>0;t[n+h]=255&a,h+=d,a/=256,c-=8);t[n+h-d]|=128*v}},{}],5:[function(t,e,n){var r=Array.isArray,i=Object.prototype.toString;e.exports=r||function(t){return!!t&&"[object Array]"==i.call(t)}},{}],6:[function(t,e,n){function r(){l=!1,s.length?c=s.concat(c):f=-1,c.length&&i()}function i(){if(!l){var t=setTimeout(r);l=!0;for(var e=c.length;e;){for(s=c,c=[];++f<e;)s&&s[f].run();f=-1,e=c.length}s=null,l=!1,clearTimeout(t)}}function o(t,e){this.fun=t,this.array=e}function a(){}var s,u=e.exports={},c=[],l=!1,f=-1;u.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];c.push(new o(t,e)),1!==c.length||l||setTimeout(i,0)},o.prototype.run=function(){this.fun.apply(null,this.array)},u.title="browser",u.browser=!0,u.env={},u.argv=[],u.version="",u.versions={},u.on=a,u.addListener=a,u.once=a,u.off=a,u.removeListener=a,u.removeAllListeners=a,u.emit=a,u.binding=function(t){throw new Error("process.binding is not supported")},u.cwd=function(){return"/"},u.chdir=function(t){throw new Error("process.chdir is not supported")},u.umask=function(){return 0}},{}],7:[function(t,e,n){!function(){"use strict";function t(t,e,n){n=n||!1;for(var r in e)!function(r){"function"==typeof e[r]?n||(t[r]=e[r].bind(e)):Object.defineProperty(t,r,{get:function(){return e[r]},set:function(t){e[r]=t}})}(r)}function n(e){t(this,e),this.pushObject=this.popObject=this.reset=function(){}}function r(t){if(t instanceof HTMLCanvasElement)return r(t.getContext("2d"));var e=t;if(l)return l(e);for(var i=0;i<r.cache.length;i++){var o=r.cache[i];if(o[0]==e)return o[1]}var a=new n(e);return r.cache.push([e,a]),a}function i(e){t(this,e,!0);var n=[];this.calls=n;for(var r in e)(function(t){"function"==typeof e[t]&&(this[t]=function(){var r=Array.prototype.slice.call(arguments);return n.push([t].concat(r)),e[t].apply(e,arguments)})}).bind(this)(r);this.pushObject=function(t){n.push(["pushObject",t])},this.popObject=function(){n.push(["popObject"])},this.reset=function(){this.calls=n=[]};var a=this.drawImage;this.drawImage=function(t){var r=i.recorderForCanvas(t);r?(e.drawImage.apply(e,arguments),n=n.concat(o(r.calls,arguments)),this.calls=n):a.apply(e,arguments)}}function o(t,e){var n,r,i=e[0],o=0,u=0,c=i.width,l=i.height,h=i.width,d=i.height;3==e.length?(n=e[1],r=e[2]):5==e.length?(n=e[1],r=e[2],h=e[3],d=e[4]):9==e.length&&(o=e[1],u=e[2],c=e[3],l=e[4],n=e[5],r=e[6],h=e[7],d=e[8]);var v=a(o,o+c,n,n+h),g=s(o,o+c,n,n+h),m=a(u,u+l,r,r+d),y=s(u,u+l,r,r+d),b=function(t){var e=t.slice(),n=e[0];if(n in f){var r=f[n];"number"==typeof r&&(r=[r]),r.forEach(function(t){e[1+t]=g(e[1+t]),e[2+t]=y(e[2+t])})}if(n in p){var i=p[n];"number"==typeof i&&(i=[i]),i.forEach(function(t){e[1+t]*=v,e[2+t]*=m})}return e};return t.map(b)}function a(t,e,n,r){return(r-n)/(e-t)}function s(t,e,n,r){var i=a(t,e,n,r);return function(e){return n+i*(e-t)}}function u(t,e){if(t)return i.recorderForSelector(t,e);if(i.recorders){if(0==i.recorders.length)throw"Called a RecordingContext method, but no canvases are being recorded.";if(i.recorders.length>1)throw"Called a RecordingContext method while multiple canvases were being recorded. Specify one using a div and selector.";return i.recorders[0][1]}throw"You must call RecordingContext.recordAll() before using other RecordingContext static methods"}function c(e,n,r){function i(){a.hits.unshift(Array.prototype.slice.call(o)),a.hit=a.hits[0]}t(this,e);var o=[];this.hits=[],this.hit=null;var a=this;this.pushObject=function(t){o.unshift(t)},this.popObject=function(){o.shift()},this.reset=function(){this.hits=[],this.hit=null},this.clearRect=function(t,e,n,r){},this.fillRect=function(t,e,o,a){n>=t&&t+o>=n&&r>=e&&e+a>=r&&i()},this.strokeRect=function(t,e,n,r){},this.fill=function(t){e.isPointInPath(n,r)&&i()},this.stroke=function(){e.isPointInStroke(n,r)&&i()},this.fillText=function(t,e,n,r){},this.strokeText=function(t,e,n,r){}}var l=null;r.cache=[];var f={clearRect:0,fillRect:0,strokeRect:0,fillText:1,strokeText:1,moveTo:0,lineTo:0,bezierCurveTo:[0,2,4],quadraticCurveTo:[0,2],rect:0},p={clearRect:2,fillRect:2,strokeRect:2,rect:2};i.prototype.drawnObjectsWith=function(t){return t||(t=function(){return!0}),this.callsOf("pushObject").filter(function(e){return t(e[1])}).map(function(t){return t[1]})},i.prototype.drawnObjects=i.prototype.drawnObjectsWith,i.prototype.callsOf=function(t){return this.calls.filter(function(e){return e[0]==t})},i.recordAll=function(){if(null!=l)throw"You forgot to call RecordingContext.reset()";i.recorders=[],l=function(t){var e=i.recorderForCanvas(t.canvas);return e?e:(e=new i(t),i.recorders.push([t.canvas,e]),e)}},i.reset=function(){if(!l)throw"Called RecordingContext.reset() before RecordingContext.recordAll()";l=null,i.recorders=null},i.recorderForCanvas=function(t){var e=i.recorders;if(null==e)throw"You must call RecordingContext.recordAll() before using other RecordingContext static methods";for(var n=0;n<e.length;n++){var r=e[n];if(r[0]==t)return r[1]}return null},i.recorderForSelector=function(t,e){var n=t.querySelector(e+" canvas")||t.querySelector(e);if(!n)throw"Unable to find a canvas matching "+e;if(!(n instanceof HTMLCanvasElement))throw"Selector "+e+" neither matches nor contains a canvas";return i.recorderForCanvas(n)},i.drawnObjectsWith=function(t,e,n){("function"==typeof t||0==arguments.length)&&(n=t,t=null);var r=u(t,e);return n=n||function(){return!0},r?r.drawnObjectsWith(n):[]},i.drawnObjects=i.drawnObjectsWith,i.callsOf=function(t,e,n){"string"==typeof t&&(n=t,t=null);var r=u(t,e);return r?r.callsOf(n):[]};var h={DataContext:n,RecordingContext:i,ClickTrackingContext:c,getDataContext:r};"undefined"!=typeof e?e.exports=h:window.dataCanvas=h}()},{}],8:[function(e,n,r){!function(i){var o=this;"object"==typeof r?n.exports=i(o,e("jdataview")):"function"==typeof t&&t.amd?t(["jdataview"],function(t){return i(o,t)}):o.jBinary=i(o,o.jDataView)}(function(t,e){"use strict";function n(t,e){return e&&t instanceof e}function r(t){for(var e=1,n=arguments.length;n>e;++e){var r=arguments[e];for(var i in r)void 0!==r[i]&&(t[i]=r[i])}return t}function i(t){return arguments[0]=p(t),r.apply(null,arguments)}function o(t,e,r){return n(r,Function)?r.call(t,e.contexts[0]):r}function a(t){return function(){var e=arguments,r=e.length-1,i=t.length-1,o=e[r];if(e.length=i+1,!n(o,Function)){var a=this;return new f(function(n,r){e[i]=function(t,e){return t?r(t):n(e)},t.apply(a,e)})}e[r]=void 0,e[i]=o,t.apply(this,e)}}function s(t,r){return n(t,s)?t.as(r):(n(t,e)||(t=new e(t,void 0,void 0,r?r["jBinary.littleEndian"]:void 0)),n(this,s)?(this.view=t,this.view.seek(0),this.contexts=[],this.as(r,!0)):new s(t,r))}function u(t){return i(u.prototype,t)}function c(t){return i(c.prototype,t,{createProperty:function(){var e=(t.createProperty||c.prototype.createProperty).apply(this,arguments);return e.getBaseType&&(e.baseType=e.binary.getType(e.getBaseType(e.binary.contexts[0]))),e}})}var l=t.document;"atob"in t&&"btoa"in t||!function(){function e(t){var e,n,i,o,a,s;for(i=t.length,n=0,e="";i>n;){if(o=255&t.charCodeAt(n++),n==i){e+=r.charAt(o>>2),e+=r.charAt((3&o)<<4),e+="==";break}if(a=t.charCodeAt(n++),n==i){e+=r.charAt(o>>2),e+=r.charAt((3&o)<<4|(240&a)>>4),e+=r.charAt((15&a)<<2),e+="=";break}s=t.charCodeAt(n++),e+=r.charAt(o>>2),e+=r.charAt((3&o)<<4|(240&a)>>4),e+=r.charAt((15&a)<<2|(192&s)>>6),e+=r.charAt(63&s)}return e}function n(t){var e,n,r,o,a,s,u;for(s=t.length,a=0,u="";s>a;){do e=i[255&t.charCodeAt(a++)];while(s>a&&-1==e);if(-1==e)break;do n=i[255&t.charCodeAt(a++)];while(s>a&&-1==n);if(-1==n)break;u+=String.fromCharCode(e<<2|(48&n)>>4);do{if(r=255&t.charCodeAt(a++),61==r)return u;r=i[r]}while(s>a&&-1==r);if(-1==r)break;u+=String.fromCharCode((15&n)<<4|(60&r)>>2);do{if(o=255&t.charCodeAt(a++),61==o)return u;o=i[o]}while(s>a&&-1==o);if(-1==o)break;u+=String.fromCharCode((3&r)<<6|o)}return u}var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,-1,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,-1,-1,-1,-1,-1];t.btoa||(t.btoa=e),t.atob||(t.atob=n)}();var f=t.Promise||function(t){this.then=t},p=Object.create;p||(p=function(t){var e=function(){};return e.prototype=t,new e});var h=s.prototype,d=h.typeSet={};h.toValue=function(t){return o(this,this,t)},h._named=function(t,e,n){return t.displayName=e+" @ "+(void 0!==n?n:this.view.tell()),t};var v=Object.defineProperty;if(v)try{v({},"x",{})}catch(g){v=void 0}else v=function(t,e,n,r){r&&(t[e]=n.value)};var m="jBinary.Cache",y=0;if(h._getCached=function(t,e,n){if(t.hasOwnProperty(this.cacheKey))return t[this.cacheKey];var r=e.call(this,t);return v(t,this.cacheKey,{value:r},n),r},h.getContext=function(t){switch(typeof t){case"undefined":t=0;case"number":return this.contexts[t];case"string":return this.getContext(function(e){return t in e});case"function":for(var e=0,n=this.contexts.length;n>e;e++){var r=this.contexts[e];if(t.call(this,r))return r}}},h.inContext=function(t,e){this.contexts.unshift(t);var n=e.call(this);return this.contexts.shift(),n},u.prototype={inherit:function(t,e){function n(t,e){var n=o[t];n&&(r||(r=i(o)),e.call(r,n),r[t]=null)}var r,o=this;return n("params",function(e){for(var n=0,r=e.length;r>n;n++)this[e[n]]=t[n]}),n("setParams",function(e){e.apply(this,t)}),n("typeParams",function(t){for(var n=0,r=t.length;r>n;n++){var i=t[n],o=this[i];o&&(this[i]=e(o))}}),n("resolve",function(t){t.call(this,e)}),r||o},createProperty:function(t){return i(this,{binary:t,view:t.view})},toValue:function(t,e){return e!==!1&&"string"==typeof t?this.binary.getContext(t)[t]:o(this,this.binary,t)}},s.Type=u,c.prototype=i(u.prototype,{setParams:function(){this.baseType&&(this.typeParams=["baseType"].concat(this.typeParams||[]))},baseRead:function(){return this.binary.read(this.baseType)},baseWrite:function(t){return this.binary.write(this.baseType,t)}}),r(c.prototype,{read:c.prototype.baseRead,write:c.prototype.baseWrite}),s.Template=c,h.as=function(t,e){var n=e?this:i(this);return t=t||d,n.typeSet=t===d||d.isPrototypeOf(t)?t:i(d,t),n.cacheKey=m,n.cacheKey=n._getCached(t,function(){return m+"."+ ++y},!0),n},h.seek=function(t,e){if(t=this.toValue(t),void 0!==e){var n=this.view.tell();this.view.seek(t);var r=e.call(this);return this.view.seek(n),r}return this.view.seek(t)},h.tell=function(){return this.view.tell()},h.skip=function(t,e){return this.seek(this.tell()+this.toValue(t),e)},h.slice=function(t,e,n){return new s(this.view.slice(t,e,n),this.typeSet)},h._getType=function(t,e){switch(typeof t){case"string":if(!(t in this.typeSet))throw new ReferenceError("Unknown type: "+t);return this._getType(this.typeSet[t],e);case"number":return this._getType(d.bitfield,[t]);case"object":if(n(t,u)){var r=this;return t.inherit(e||[],function(t){return r.getType(t)})}return n(t,Array)?this._getCached(t,function(t){return this.getType(t[0],t.slice(1))},!0):this._getCached(t,function(t){return this.getType(d.object,[t])},!1)}},h.getType=function(t,e){var r=this._getType(t,e);return r&&!n(t,u)&&(r.name="object"==typeof t?n(t,Array)?t[0]+"("+t.slice(1).join(", ")+")":"object":String(t)),r},h._action=function(t,e,n){if(void 0!==t){t=this.getType(t);var r=this._named(function(){return n.call(this,t.createProperty(this),this.contexts[0])},"["+t.name+"]",e);return void 0!==e?this.seek(e,r):r.call(this)}},h.read=function(t,e){return this._action(t,e,function(t,e){return t.read(e)})},h.readAll=function(){return this.read("jBinary.all",0)},h.write=function(t,e,n){return this._action(t,n,function(t,n){var r=this.tell();return t.write(e,n),this.tell()-r})},h.writeAll=function(t){return this.write("jBinary.all",t,0)},function(t,e){for(var n=0,r=e.length;r>n;n++){var o=e[n];d[o.toLowerCase()]=i(t,{dataType:o})}}(u({params:["littleEndian"],read:function(){return this.view["get"+this.dataType](void 0,this.littleEndian)},write:function(t){this.view["write"+this.dataType](t,this.littleEndian)}}),["Uint8","Uint16","Uint32","Uint64","Int8","Int16","Int32","Int64","Float32","Float64","Char"]),r(d,{"byte":d.uint8,"float":d.float32,"double":d.float64}),d.array=c({params:["baseType","length"],read:function(){var t=this.toValue(this.length);if(this.baseType===d.uint8)return this.view.getBytes(t,void 0,!0,!0);var e;if(void 0!==t){e=new Array(t);for(var n=0;t>n;n++)e[n]=this.baseRead()}else{var r=this.view.byteLength;for(e=[];this.binary.tell()<r;)e.push(this.baseRead())}return e},write:function(t){if(this.baseType===d.uint8)return this.view.writeBytes(t);for(var e=0,n=t.length;n>e;e++)this.baseWrite(t[e])}}),d.binary=c({params:["length","typeSet"],read:function(){var t=this.binary.tell(),e=this.binary.skip(this.toValue(this.length)),n=this.view.slice(t,e);return new s(n,this.typeSet)},write:function(t){this.binary.write("blob",t.read("blob",0))}}),d.bitfield=u({params:["bitSize"],read:function(){return this.view.getUnsigned(this.bitSize)},write:function(t){this.view.writeUnsigned(t,this.bitSize)}}),d.blob=u({params:["length"],read:function(){return this.view.getBytes(this.toValue(this.length))},write:function(t){this.view.writeBytes(t,!0)}}),d["const"]=c({params:["baseType","value","strict"],read:function(){var t=this.baseRead();if(this.strict&&t!==this.value){if(n(this.strict,Function))return this.strict(t);throw new TypeError("Unexpected value ("+t+" !== "+this.value+").")}return t},write:function(t){this.baseWrite(this.strict||void 0===t?this.value:t)}}),d["enum"]=c({params:["baseType","matches"],setParams:function(t,e){this.backMatches={};for(var n in e)this.backMatches[e[n]]=n},read:function(){var t=this.baseRead();return t in this.matches?this.matches[t]:t},write:function(t){this.baseWrite(t in this.backMatches?this.backMatches[t]:t)}}),d.extend=u({setParams:function(){this.parts=arguments},resolve:function(t){for(var e=this.parts,n=e.length,r=new Array(n),i=0;n>i;i++)r[i]=t(e[i]);this.parts=r},read:function(){var t=this.parts,e=this.binary.read(t[0]);return this.binary.inContext(e,function(){for(var n=1,i=t.length;i>n;n++)r(e,this.read(t[n]))}),e},write:function(t){var e=this.parts;this.binary.inContext(t,function(){for(var n=0,r=e.length;r>n;n++)this.write(e[n],t)})}}),d["if"]=c({params:["condition","trueType","falseType"],typeParams:["trueType","falseType"],getBaseType:function(){return this.toValue(this.condition)?this.trueType:this.falseType}}),d.if_not=d.ifNot=c({setParams:function(t,e,n){this.baseType=["if",t,n,e]}}),d.lazy=c({marker:"jBinary.Lazy",params:["innerType","length"],getBaseType:function(){return["binary",this.length,this.binary.typeSet]},read:function(){var t=function(e){return 0===arguments.length?"value"in t?t.value:t.value=t.binary.read(t.innerType):r(t,{wasChanged:!0,value:e}).value};return t[this.marker]=!0,r(t,{binary:r(this.baseRead(),{contexts:this.binary.contexts.slice()}),innerType:this.innerType})},write:function(t){t.wasChanged||!t[this.marker]?this.binary.write(this.innerType,t()):this.baseWrite(t.binary)}}),d.object=u({params:["structure","proto"],resolve:function(t){var e={};for(var r in this.structure)e[r]=n(this.structure[r],Function)?this.structure[r]:t(this.structure[r]);this.structure=e},read:function(){var t=this,e=this.structure,r=this.proto?i(this.proto):{};return this.binary.inContext(r,function(){for(var i in e)this._named(function(){var o=n(e[i],Function)?e[i].call(t,r):this.read(e[i]);void 0!==o&&(r[i]=o)},i).call(this)}),r},write:function(t){var e=this,r=this.structure;this.binary.inContext(t,function(){for(var i in r)this._named(function(){n(r[i],Function)?t[i]=r[i].call(e,t):this.write(r[i],t[i])},i).call(this)})}}),d.skip=u({params:["length"],read:function(){this.view.skip(this.toValue(this.length))},write:function(){this.read()}}),d.string=c({params:["length","encoding"],read:function(){return this.view.getString(this.toValue(this.length),void 0,this.encoding)},write:function(t){this.view.writeString(t,this.encoding)}}),d.string0=u({params:["length","encoding"],read:function(){var t=this.view,e=this.length;if(void 0===e){var n,r=t.tell(),i=0;for(e=t.byteLength-r;e>i&&(n=t.getUint8());)i++;var o=t.getString(i,r,this.encoding);return e>i&&t.skip(1),o}return t.getString(e,void 0,this.encoding).replace(/\0.*$/,"")},write:function(t){var e=this.view,n=void 0===this.length?1:this.length-t.length;e.writeString(t,void 0,this.encoding),n>0&&(e.writeUint8(0),e.skip(n-1))}}),s.loadData=a(function(e,r){var i;if(n(e,t.Blob)){var o;if("FileReader"in t)o=new FileReader,o.onload=o.onerror=function(){r(this.error,this.result)},o.readAsArrayBuffer(e);else{o=new FileReaderSync;var a,s;try{s=o.readAsArrayBuffer(e)}catch(u){a=u}finally{r(a,s)}}}else if("string"!=typeof e)r(new TypeError("Unsupported source type."));else if(i=e.match(/^data:(.+?)(;base64)?,(.*)$/))try{var c=i[2],l=i[3];r(null,(c?atob:decodeURIComponent)(l))}catch(u){r(u)}else if("XMLHttpRequest"in t){var f=new XMLHttpRequest;f.open("GET",e,!0),"responseType"in f?f.responseType="arraybuffer":"overrideMimeType"in f?f.overrideMimeType("text/plain; charset=x-user-defined"):f.setRequestHeader("Accept-Charset","x-user-defined"),"onload"in f||(f.onreadystatechange=function(){4===this.readyState&&this.onload()});var p=function(t){r(new Error(t))};f.onload=function(){return 0!==this.status&&200!==this.status?p("HTTP Error #"+this.status+": "+this.statusText):("response"in this||(this.response=new VBArray(this.responseBody).toArray()),void r(null,this.response))},f.onerror=function(){p("Network error.")},f.send(null)}else r(new TypeError("Unsupported source type."))}),s.load=a(function(t,e,n){var r=s.loadData(t);s.load.getTypeSet(t,e,function(t){r.then(function(e){n(null,new s(e,t))},n)})}),s.load.getTypeSet=function(t,e,n){n(e)},h._toURI="URL"in t&&"createObjectURL"in URL?function(t){var e=this.seek(0,function(){return this.view.getBytes()});return URL.createObjectURL(new Blob([e],{type:t}))}:function(t){var e=this.seek(0,function(){return this.view.getString(void 0,void 0,"binary")});return"data:"+t+";base64,"+btoa(e)},h._mimeType=function(t){return t||this.typeSet["jBinary.mimeType"]||"application/octet-stream"},h.toURI=function(t){return this._toURI(this._mimeType(t))},l){var b=s.downloader=l.createElement("a");b.style.display="none"}return h.saveAs=a(function(t,e,n){"string"==typeof t?("msSaveBlob"in navigator?navigator.msSaveBlob(new Blob([this.read("blob",0)],{type:this._mimeType(e)}),t):l?(b.parentNode||l.body.appendChild(b),b.href=this.toURI(e),b.download=t,b.click(),b.href=b.download=""):n(new TypeError("Saving from Web Worker is not supported.")),n()):n(new TypeError("Unsupported storage type."))}),s})},{jdataview:9}],9:[function(t,e,n){(function(t){!function(t){var n=this;e.exports=t(n)}(function(e){"use strict";function n(t,e){return"object"!=typeof t||null===t?!1:t.constructor===e||Object.prototype.toString.call(t)==="[object "+e.name+"]"}function r(t,e){return!e&&n(t,Array)?t:Array.prototype.slice.call(t)}function i(t,e){return void 0!==t?t:e}function o(e,r,a,s){if(o.is(e)){var u=e.slice(r,r+a);return u._littleEndian=i(s,u._littleEndian),u}if(!o.is(this))return new o(e,r,a,s);if(this.buffer=e=o.wrapBuffer(e),this._isArrayBuffer=l.ArrayBuffer&&n(e,ArrayBuffer),this._isPixelData=!1,this._isDataView=l.DataView&&this._isArrayBuffer,this._isNodeBuffer=l.NodeBuffer&&n(e,t),!this._isNodeBuffer&&!this._isArrayBuffer&&!n(e,Array))throw new TypeError("jDataView buffer has an incompatible type");this._littleEndian=!!s;var c="byteLength"in e?e.byteLength:e.length;this.byteOffset=r=i(r,0),this.byteLength=a=i(a,c-r),this._offset=this._bitOffset=0,this._isDataView?this._view=new DataView(e,r,a):this._checkBounds(r,a,c),this._engineAction=this._isDataView?this._dataViewAction:this._isNodeBuffer?this._nodeBufferAction:this._isArrayBuffer?this._arrayBufferAction:this._arrayAction}function a(e){if(l.NodeBuffer)return new t(e,"binary");for(var n=l.ArrayBuffer?Uint8Array:Array,r=new n(e.length),i=0,o=e.length;o>i;i++)r[i]=255&e.charCodeAt(i);return r}function s(t){return t>=0&&31>t?1<<t:s[t]||(s[t]=Math.pow(2,t))}function u(t,e){this.lo=t,this.hi=e}function c(){u.apply(this,arguments)}var l={NodeBuffer:"Buffer"in e,DataView:"DataView"in e,ArrayBuffer:"ArrayBuffer"in e,PixelData:!1},f=e.TextEncoder,p=e.TextDecoder;l.NodeBuffer&&!function(t){try{t.writeFloatLE(1/0,0)}catch(e){l.NodeBuffer=!1}}(new t(4));var h={Int8:1,Int16:2,Int32:4,Uint8:1,Uint16:2,Uint32:4,Float32:4,Float64:8};o.wrapBuffer=function(e){switch(typeof e){case"number":if(l.NodeBuffer)e=new t(e),e.fill(0);else if(l.ArrayBuffer)e=new Uint8Array(e).buffer;else{e=new Array(e);for(var i=0;i<e.length;i++)e[i]=0}return e;case"string":e=a(e);default:return"length"in e&&!(l.NodeBuffer&&n(e,t)||l.ArrayBuffer&&n(e,ArrayBuffer))&&(l.NodeBuffer?e=new t(e):l.ArrayBuffer?n(e,ArrayBuffer)||(e=new Uint8Array(e).buffer,n(e,ArrayBuffer)||(e=new Uint8Array(r(e,!0)).buffer)):e=r(e)),e}},o.is=function(t){return t&&t.jDataView},o.from=function(){return new o(arguments)},o.Uint64=u,u.prototype={valueOf:function(){return this.lo+s(32)*this.hi},toString:function(){return Number.prototype.toString.apply(this.valueOf(),arguments)}},u.fromNumber=function(t){var e=Math.floor(t/s(32)),n=t-e*s(32);return new u(n,e)},o.Int64=c,c.prototype="create"in Object?Object.create(u.prototype):new u,c.prototype.valueOf=function(){return this.hi<s(31)?u.prototype.valueOf.apply(this,arguments):-(s(32)-this.lo+s(32)*(s(32)-1-this.hi))},c.fromNumber=function(t){var e,n;if(t>=0){var r=u.fromNumber(t);e=r.lo,n=r.hi}else n=Math.floor(t/s(32)),e=t-n*s(32),n+=s(32);return new c(e,n)};var d=o.prototype={compatibility:l,jDataView:!0,_checkBounds:function(t,e,n){if("number"!=typeof t)throw new TypeError("Offset is not a number.");if("number"!=typeof e)throw new TypeError("Size is not a number.");if(0>e)throw new RangeError("Length is negative.");if(0>t||t+e>i(n,this.byteLength))throw new RangeError("Offsets are out of bounds.")},_action:function(t,e,n,r,o){return this._engineAction(t,e,i(n,this._offset),i(r,this._littleEndian),o)},_dataViewAction:function(t,e,n,r,i){return this._offset=n+h[t],e?this._view["get"+t](n,r):this._view["set"+t](n,i,r)},_arrayBufferAction:function(t,n,r,o,a){var s,u=h[t],c=e[t+"Array"];if(o=i(o,this._littleEndian),1===u||(this.byteOffset+r)%u===0&&o)return s=new c(this.buffer,this.byteOffset+r,1),this._offset=r+u,n?s[0]:s[0]=a;var l=new Uint8Array(n?this.getBytes(u,r,o,!0):u);return s=new c(l.buffer,0,1),n?s[0]:(s[0]=a,void this._setBytes(r,l,o))},_arrayAction:function(t,e,n,r,i){return e?this["_get"+t](n,r):this["_set"+t](n,i,r)},_getBytes:function(t,e,n){n=i(n,this._littleEndian),e=i(e,this._offset),t=i(t,this.byteLength-e),this._checkBounds(e,t),e+=this.byteOffset,this._offset=e-this.byteOffset+t;var o=this._isArrayBuffer?new Uint8Array(this.buffer,e,t):(this.buffer.slice||Array.prototype.slice).call(this.buffer,e,e+t);
return n||1>=t?o:r(o).reverse()},getBytes:function(t,e,n,o){var a=this._getBytes(t,e,i(n,!0));return o?r(a):a},_setBytes:function(e,n,o){var a=n.length;if(0!==a){if(o=i(o,this._littleEndian),e=i(e,this._offset),this._checkBounds(e,a),!o&&a>1&&(n=r(n,!0).reverse()),e+=this.byteOffset,this._isArrayBuffer)new Uint8Array(this.buffer,e,a).set(n);else if(this._isNodeBuffer)new t(n).copy(this.buffer,e);else for(var s=0;a>s;s++)this.buffer[e+s]=n[s];this._offset=e-this.byteOffset+a}},setBytes:function(t,e,n){this._setBytes(t,e,i(n,!0))},getString:function(t,e,n){if(this._isNodeBuffer)return e=i(e,this._offset),t=i(t,this.byteLength-e),this._checkBounds(e,t),this._offset=e+t,this.buffer.toString(n||"binary",this.byteOffset+e,this.byteOffset+this._offset);var r=this._getBytes(t,e,!0);if(n="utf8"===n?"utf-8":n||"binary",p&&"binary"!==n)return new p(n).decode(this._isArrayBuffer?r:new Uint8Array(r));var o="";t=r.length;for(var a=0;t>a;a++)o+=String.fromCharCode(r[a]);return"utf-8"===n&&(o=decodeURIComponent(escape(o))),o},setString:function(t,e,n){if(this._isNodeBuffer)return t=i(t,this._offset),this._checkBounds(t,e.length),void(this._offset=t+this.buffer.write(e,this.byteOffset+t,n||"binary"));n="utf8"===n?"utf-8":n||"binary";var r;f&&"binary"!==n?r=new f(n).encode(e):("utf-8"===n&&(e=unescape(encodeURIComponent(e))),r=a(e)),this._setBytes(t,r,!0)},getChar:function(t){return this.getString(1,t)},setChar:function(t,e){this.setString(t,e)},tell:function(){return this._offset},seek:function(t){return this._checkBounds(t,0),this._offset=t},skip:function(t){return this.seek(this._offset+t)},slice:function(t,e,n){function r(t,e){return 0>t?t+e:t}return t=r(t,this.byteLength),e=r(i(e,this.byteLength),this.byteLength),n?new o(this.getBytes(e-t,t,!0,!0),void 0,void 0,this._littleEndian):new o(this.buffer,this.byteOffset+t,e-t,this._littleEndian)},alignBy:function(t){return this._bitOffset=0,1!==i(t,1)?this.skip(t-(this._offset%t||t)):this._offset},_getFloat64:function(t,e){var n=this._getBytes(8,t,e),r=1-2*(n[7]>>7),i=((n[7]<<1&255)<<3|n[6]>>4)-1023,o=(15&n[6])*s(48)+n[5]*s(40)+n[4]*s(32)+n[3]*s(24)+n[2]*s(16)+n[1]*s(8)+n[0];return 1024===i?0!==o?NaN:1/0*r:-1023===i?r*o*s(-1074):r*(1+o*s(-52))*s(i)},_getFloat32:function(t,e){var n=this._getBytes(4,t,e),r=1-2*(n[3]>>7),i=(n[3]<<1&255|n[2]>>7)-127,o=(127&n[2])<<16|n[1]<<8|n[0];return 128===i?0!==o?NaN:1/0*r:-127===i?r*o*s(-149):r*(1+o*s(-23))*s(i)},_get64:function(t,e,n){n=i(n,this._littleEndian),e=i(e,this._offset);for(var r=n?[0,4]:[4,0],o=0;2>o;o++)r[o]=this.getUint32(e+r[o],n);return this._offset=e+8,new t(r[0],r[1])},getInt64:function(t,e){return this._get64(c,t,e)},getUint64:function(t,e){return this._get64(u,t,e)},_getInt32:function(t,e){var n=this._getBytes(4,t,e);return n[3]<<24|n[2]<<16|n[1]<<8|n[0]},_getUint32:function(t,e){return this._getInt32(t,e)>>>0},_getInt16:function(t,e){return this._getUint16(t,e)<<16>>16},_getUint16:function(t,e){var n=this._getBytes(2,t,e);return n[1]<<8|n[0]},_getInt8:function(t){return this._getUint8(t)<<24>>24},_getUint8:function(t){return this._getBytes(1,t)[0]},_getBitRangeData:function(t,e){var n=(i(e,this._offset)<<3)+this._bitOffset,r=n+t,o=n>>>3,a=r+7>>>3,s=this._getBytes(a-o,o,!0),u=0;(this._bitOffset=7&r)&&(this._bitOffset-=8);for(var c=0,l=s.length;l>c;c++)u=u<<8|s[c];return{start:o,bytes:s,wideValue:u}},getSigned:function(t,e){var n=32-t;return this.getUnsigned(t,e)<<n>>n},getUnsigned:function(t,e){var n=this._getBitRangeData(t,e).wideValue>>>-this._bitOffset;return 32>t?n&~(-1<<t):n},_setBinaryFloat:function(t,e,n,r,i){var o,a,u=0>e?1:0,c=~(-1<<r-1),l=1-c;0>e&&(e=-e),0===e?(o=0,a=0):isNaN(e)?(o=2*c+1,a=1):1/0===e?(o=2*c+1,a=0):(o=Math.floor(Math.log(e)/Math.LN2),o>=l&&c>=o?(a=Math.floor((e*s(-o)-1)*s(n)),o+=c):(a=Math.floor(e/s(l-n)),o=0));for(var f=[];n>=8;)f.push(a%256),a=Math.floor(a/256),n-=8;for(o=o<<n|a,r+=n;r>=8;)f.push(255&o),o>>>=8,r-=8;f.push(u<<r|o),this._setBytes(t,f,i)},_setFloat32:function(t,e,n){this._setBinaryFloat(t,e,23,8,n)},_setFloat64:function(t,e,n){this._setBinaryFloat(t,e,52,11,n)},_set64:function(t,e,n,r){"object"!=typeof n&&(n=t.fromNumber(n)),r=i(r,this._littleEndian),e=i(e,this._offset);var o=r?{lo:0,hi:4}:{lo:4,hi:0};for(var a in o)this.setUint32(e+o[a],n[a],r);this._offset=e+8},setInt64:function(t,e,n){this._set64(c,t,e,n)},setUint64:function(t,e,n){this._set64(u,t,e,n)},_setUint32:function(t,e,n){this._setBytes(t,[255&e,e>>>8&255,e>>>16&255,e>>>24],n)},_setUint16:function(t,e,n){this._setBytes(t,[255&e,e>>>8&255],n)},_setUint8:function(t,e){this._setBytes(t,[255&e])},setUnsigned:function(t,e,n){var r=this._getBitRangeData(n,t),i=r.wideValue,o=r.bytes;i&=~(~(-1<<n)<<-this._bitOffset),i|=(32>n?e&~(-1<<n):e)<<-this._bitOffset;for(var a=o.length-1;a>=0;a--)o[a]=255&i,i>>>=8;this._setBytes(r.start,o,!0)}},v={Int8:"Int8",Int16:"Int16",Int32:"Int32",Uint8:"UInt8",Uint16:"UInt16",Uint32:"UInt32",Float32:"Float",Float64:"Double"};d._nodeBufferAction=function(t,e,n,r,i){this._offset=n+h[t];var o=v[t]+("Int8"===t||"Uint8"===t?"":r?"LE":"BE");return n+=this.byteOffset,e?this.buffer["read"+o](n):this.buffer["write"+o](i,n)};for(var g in h)!function(t){d["get"+t]=function(e,n){return this._action(t,!0,e,n)},d["set"+t]=function(e,n,r){this._action(t,!1,e,r,n)}}(g);d._setInt32=d._setUint32,d._setInt16=d._setUint16,d._setInt8=d._setUint8,d.setSigned=d.setUnsigned;for(var m in d)"set"===m.slice(0,3)&&!function(t){d["write"+t]=function(){Array.prototype.unshift.call(arguments,void 0),this["set"+t].apply(this,arguments)}}(m.slice(3));return o})}).call(this,t("buffer").Buffer)},{buffer:2}],10:[function(t,e,n){"use strict";function r(t,e){var n=new h(e);if(n.push(t,!0),n.err)throw n.msg;return n.result}function i(t,e){return e=e||{},e.raw=!0,r(t,e)}var o=t("./zlib/inflate.js"),a=t("./utils/common"),s=t("./utils/strings"),u=t("./zlib/constants"),c=t("./zlib/messages"),l=t("./zlib/zstream"),f=t("./zlib/gzheader"),p=Object.prototype.toString,h=function(t){this.options=a.assign({chunkSize:16384,windowBits:0,to:""},t||{});var e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&0===(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var n=o.inflateInit2(this.strm,e.windowBits);if(n!==u.Z_OK)throw new Error(c[n]);this.header=new f,o.inflateGetHeader(this.strm,this.header)};h.prototype.push=function(t,e){var n,r,i,c,l,f=this.strm,h=this.options.chunkSize,d=!1;if(this.ended)return!1;r=e===~~e?e:e===!0?u.Z_FINISH:u.Z_NO_FLUSH,"string"==typeof t?f.input=s.binstring2buf(t):"[object ArrayBuffer]"===p.call(t)?f.input=new Uint8Array(t):f.input=t,f.next_in=0,f.avail_in=f.input.length;do{if(0===f.avail_out&&(f.output=new a.Buf8(h),f.next_out=0,f.avail_out=h),n=o.inflate(f,u.Z_NO_FLUSH),n===u.Z_BUF_ERROR&&d===!0&&(n=u.Z_OK,d=!1),n!==u.Z_STREAM_END&&n!==u.Z_OK)return this.onEnd(n),this.ended=!0,!1;f.next_out&&(0===f.avail_out||n===u.Z_STREAM_END||0===f.avail_in&&(r===u.Z_FINISH||r===u.Z_SYNC_FLUSH))&&("string"===this.options.to?(i=s.utf8border(f.output,f.next_out),c=f.next_out-i,l=s.buf2string(f.output,i),f.next_out=c,f.avail_out=h-c,c&&a.arraySet(f.output,f.output,i,c,0),this.onData(l)):this.onData(a.shrinkBuf(f.output,f.next_out))),0===f.avail_in&&0===f.avail_out&&(d=!0)}while((f.avail_in>0||0===f.avail_out)&&n!==u.Z_STREAM_END);return n===u.Z_STREAM_END&&(r=u.Z_FINISH),r===u.Z_FINISH?(n=o.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===u.Z_OK):r===u.Z_SYNC_FLUSH?(this.onEnd(u.Z_OK),f.avail_out=0,!0):!0},h.prototype.onData=function(t){this.chunks.push(t)},h.prototype.onEnd=function(t){t===u.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=a.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},n.Inflate=h,n.inflate=r,n.inflateRaw=i,n.ungzip=r},{"./utils/common":11,"./utils/strings":12,"./zlib/constants":14,"./zlib/gzheader":16,"./zlib/inflate.js":18,"./zlib/messages":20,"./zlib/zstream":21}],11:[function(t,e,n){"use strict";var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;n.assign=function(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var n=e.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(var r in n)n.hasOwnProperty(r)&&(t[r]=n[r])}}return t},n.shrinkBuf=function(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)};var i={arraySet:function(t,e,n,r,i){if(e.subarray&&t.subarray)return void t.set(e.subarray(n,n+r),i);for(var o=0;r>o;o++)t[i+o]=e[n+o]},flattenChunks:function(t){var e,n,r,i,o,a;for(r=0,e=0,n=t.length;n>e;e++)r+=t[e].length;for(a=new Uint8Array(r),i=0,e=0,n=t.length;n>e;e++)o=t[e],a.set(o,i),i+=o.length;return a}},o={arraySet:function(t,e,n,r,i){for(var o=0;r>o;o++)t[i+o]=e[n+o]},flattenChunks:function(t){return[].concat.apply([],t)}};n.setTyped=function(t){t?(n.Buf8=Uint8Array,n.Buf16=Uint16Array,n.Buf32=Int32Array,n.assign(n,i)):(n.Buf8=Array,n.Buf16=Array,n.Buf32=Array,n.assign(n,o))},n.setTyped(r)},{}],12:[function(t,e,n){"use strict";function r(t,e){if(65537>e&&(t.subarray&&a||!t.subarray&&o))return String.fromCharCode.apply(null,i.shrinkBuf(t,e));for(var n="",r=0;e>r;r++)n+=String.fromCharCode(t[r]);return n}var i=t("./common"),o=!0,a=!0;try{String.fromCharCode.apply(null,[0])}catch(s){o=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(s){a=!1}for(var u=new i.Buf8(256),c=0;256>c;c++)u[c]=c>=252?6:c>=248?5:c>=240?4:c>=224?3:c>=192?2:1;u[254]=u[254]=1,n.string2buf=function(t){var e,n,r,o,a,s=t.length,u=0;for(o=0;s>o;o++)n=t.charCodeAt(o),55296===(64512&n)&&s>o+1&&(r=t.charCodeAt(o+1),56320===(64512&r)&&(n=65536+(n-55296<<10)+(r-56320),o++)),u+=128>n?1:2048>n?2:65536>n?3:4;for(e=new i.Buf8(u),a=0,o=0;u>a;o++)n=t.charCodeAt(o),55296===(64512&n)&&s>o+1&&(r=t.charCodeAt(o+1),56320===(64512&r)&&(n=65536+(n-55296<<10)+(r-56320),o++)),128>n?e[a++]=n:2048>n?(e[a++]=192|n>>>6,e[a++]=128|63&n):65536>n?(e[a++]=224|n>>>12,e[a++]=128|n>>>6&63,e[a++]=128|63&n):(e[a++]=240|n>>>18,e[a++]=128|n>>>12&63,e[a++]=128|n>>>6&63,e[a++]=128|63&n);return e},n.buf2binstring=function(t){return r(t,t.length)},n.binstring2buf=function(t){for(var e=new i.Buf8(t.length),n=0,r=e.length;r>n;n++)e[n]=t.charCodeAt(n);return e},n.buf2string=function(t,e){var n,i,o,a,s=e||t.length,c=new Array(2*s);for(i=0,n=0;s>n;)if(o=t[n++],128>o)c[i++]=o;else if(a=u[o],a>4)c[i++]=65533,n+=a-1;else{for(o&=2===a?31:3===a?15:7;a>1&&s>n;)o=o<<6|63&t[n++],a--;a>1?c[i++]=65533:65536>o?c[i++]=o:(o-=65536,c[i++]=55296|o>>10&1023,c[i++]=56320|1023&o)}return r(c,i)},n.utf8border=function(t,e){var n;for(e=e||t.length,e>t.length&&(e=t.length),n=e-1;n>=0&&128===(192&t[n]);)n--;return 0>n?e:0===n?e:n+u[t[n]]>e?n:e}},{"./common":11}],13:[function(t,e,n){"use strict";function r(t,e,n,r){for(var i=65535&t|0,o=t>>>16&65535|0,a=0;0!==n;){a=n>2e3?2e3:n,n-=a;do i=i+e[r++]|0,o=o+i|0;while(--a);i%=65521,o%=65521}return i|o<<16|0}e.exports=r},{}],14:[function(t,e,n){e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],15:[function(t,e,n){"use strict";function r(){for(var t,e=[],n=0;256>n;n++){t=n;for(var r=0;8>r;r++)t=1&t?3988292384^t>>>1:t>>>1;e[n]=t}return e}function i(t,e,n,r){var i=o,a=r+n;t=-1^t;for(var s=r;a>s;s++)t=t>>>8^i[255&(t^e[s])];return-1^t}var o=r();e.exports=i},{}],16:[function(t,e,n){"use strict";function r(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}e.exports=r},{}],17:[function(t,e,n){"use strict";var r=30,i=12;e.exports=function(t,e){var n,o,a,s,u,c,l,f,p,h,d,v,g,m,y,b,w,_,E,C,R,k,O,S,T;n=t.state,o=t.next_in,S=t.input,a=o+(t.avail_in-5),s=t.next_out,T=t.output,u=s-(e-t.avail_out),c=s+(t.avail_out-257),l=n.dmax,f=n.wsize,p=n.whave,h=n.wnext,d=n.window,v=n.hold,g=n.bits,m=n.lencode,y=n.distcode,b=(1<<n.lenbits)-1,w=(1<<n.distbits)-1;t:do{15>g&&(v+=S[o++]<<g,g+=8,v+=S[o++]<<g,g+=8),_=m[v&b];e:for(;;){if(E=_>>>24,v>>>=E,g-=E,E=_>>>16&255,0===E)T[s++]=65535&_;else{if(!(16&E)){if(0===(64&E)){_=m[(65535&_)+(v&(1<<E)-1)];continue e}if(32&E){n.mode=i;break t}t.msg="invalid literal/length code",n.mode=r;break t}C=65535&_,E&=15,E&&(E>g&&(v+=S[o++]<<g,g+=8),C+=v&(1<<E)-1,v>>>=E,g-=E),15>g&&(v+=S[o++]<<g,g+=8,v+=S[o++]<<g,g+=8),_=y[v&w];n:for(;;){if(E=_>>>24,v>>>=E,g-=E,E=_>>>16&255,!(16&E)){if(0===(64&E)){_=y[(65535&_)+(v&(1<<E)-1)];continue n}t.msg="invalid distance code",n.mode=r;break t}if(R=65535&_,E&=15,E>g&&(v+=S[o++]<<g,g+=8,E>g&&(v+=S[o++]<<g,g+=8)),R+=v&(1<<E)-1,R>l){t.msg="invalid distance too far back",n.mode=r;break t}if(v>>>=E,g-=E,E=s-u,R>E){if(E=R-E,E>p&&n.sane){t.msg="invalid distance too far back",n.mode=r;break t}if(k=0,O=d,0===h){if(k+=f-E,C>E){C-=E;do T[s++]=d[k++];while(--E);k=s-R,O=T}}else if(E>h){if(k+=f+h-E,E-=h,C>E){C-=E;do T[s++]=d[k++];while(--E);if(k=0,C>h){E=h,C-=E;do T[s++]=d[k++];while(--E);k=s-R,O=T}}}else if(k+=h-E,C>E){C-=E;do T[s++]=d[k++];while(--E);k=s-R,O=T}for(;C>2;)T[s++]=O[k++],T[s++]=O[k++],T[s++]=O[k++],C-=3;C&&(T[s++]=O[k++],C>1&&(T[s++]=O[k++]))}else{k=s-R;do T[s++]=T[k++],T[s++]=T[k++],T[s++]=T[k++],C-=3;while(C>2);C&&(T[s++]=T[k++],C>1&&(T[s++]=T[k++]))}break}}break}}while(a>o&&c>s);C=g>>3,o-=C,g-=C<<3,v&=(1<<g)-1,t.next_in=o,t.next_out=s,t.avail_in=a>o?5+(a-o):5-(o-a),t.avail_out=c>s?257+(c-s):257-(s-c),n.hold=v,n.bits=g}},{}],18:[function(t,e,n){"use strict";function r(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function i(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new m.Buf16(320),this.work=new m.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function o(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=j,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new m.Buf32(dt),e.distcode=e.distdyn=new m.Buf32(vt),e.sane=1,e.back=-1,T):M}function a(t){var e;return t&&t.state?(e=t.state,e.wsize=0,e.whave=0,e.wnext=0,o(t)):M}function s(t,e){var n,r;return t&&t.state?(r=t.state,0>e?(n=0,e=-e):(n=(e>>4)+1,48>e&&(e&=15)),e&&(8>e||e>15)?M:(null!==r.window&&r.wbits!==e&&(r.window=null),r.wrap=n,r.wbits=e,a(t))):M}function u(t,e){var n,r;return t?(r=new i,t.state=r,r.window=null,n=s(t,e),n!==T&&(t.state=null),n):M}function c(t){return u(t,mt)}function l(t){if(yt){var e;for(v=new m.Buf32(512),g=new m.Buf32(32),e=0;144>e;)t.lens[e++]=8;for(;256>e;)t.lens[e++]=9;for(;280>e;)t.lens[e++]=7;for(;288>e;)t.lens[e++]=8;for(_(C,t.lens,0,288,v,0,t.work,{bits:9}),e=0;32>e;)t.lens[e++]=5;_(R,t.lens,0,32,g,0,t.work,{bits:5}),yt=!1}t.lencode=v,t.lenbits=9,t.distcode=g,t.distbits=5}function f(t,e,n,r){var i,o=t.state;return null===o.window&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new m.Buf8(o.wsize)),r>=o.wsize?(m.arraySet(o.window,e,n-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):(i=o.wsize-o.wnext,i>r&&(i=r),m.arraySet(o.window,e,n-r,i,o.wnext),r-=i,r?(m.arraySet(o.window,e,n-r,r,0),o.wnext=r,o.whave=o.wsize):(o.wnext+=i,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=i))),0}function p(t,e){var n,i,o,a,s,u,c,p,h,d,v,g,dt,vt,gt,mt,yt,bt,wt,_t,Et,Ct,Rt,kt,Ot=0,St=new m.Buf8(4),Tt=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!t||!t.state||!t.output||!t.input&&0!==t.avail_in)return M;n=t.state,n.mode===K&&(n.mode=Y),s=t.next_out,o=t.output,c=t.avail_out,a=t.next_in,i=t.input,u=t.avail_in,p=n.hold,h=n.bits,d=u,v=c,Ct=T;t:for(;;)switch(n.mode){case j:if(0===n.wrap){n.mode=Y;break}for(;16>h;){if(0===u)break t;u--,p+=i[a++]<<h,h+=8}if(2&n.wrap&&35615===p){n.check=0,St[0]=255&p,St[1]=p>>>8&255,n.check=b(n.check,St,2,0),p=0,h=0,n.mode=L;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&p)<<8)+(p>>8))%31){t.msg="incorrect header check",n.mode=ft;break}if((15&p)!==D){t.msg="unknown compression method",n.mode=ft;break}if(p>>>=4,h-=4,Et=(15&p)+8,0===n.wbits)n.wbits=Et;else if(Et>n.wbits){t.msg="invalid window size",n.mode=ft;break}n.dmax=1<<Et,t.adler=n.check=1,n.mode=512&p?G:K,p=0,h=0;break;case L:for(;16>h;){if(0===u)break t;u--,p+=i[a++]<<h,h+=8}if(n.flags=p,(255&n.flags)!==D){t.msg="unknown compression method",n.mode=ft;break}if(57344&n.flags){t.msg="unknown header flags set",n.mode=ft;break}n.head&&(n.head.text=p>>8&1),512&n.flags&&(St[0]=255&p,St[1]=p>>>8&255,n.check=b(n.check,St,2,0)),p=0,h=0,n.mode=B;case B:for(;32>h;){if(0===u)break t;u--,p+=i[a++]<<h,h+=8}n.head&&(n.head.time=p),512&n.flags&&(St[0]=255&p,St[1]=p>>>8&255,St[2]=p>>>16&255,St[3]=p>>>24&255,n.check=b(n.check,St,4,0)),p=0,h=0,n.mode=U;case U:for(;16>h;){if(0===u)break t;u--,p+=i[a++]<<h,h+=8}n.head&&(n.head.xflags=255&p,n.head.os=p>>8),512&n.flags&&(St[0]=255&p,St[1]=p>>>8&255,n.check=b(n.check,St,2,0)),p=0,h=0,n.mode=F;case F:if(1024&n.flags){for(;16>h;){if(0===u)break t;u--,p+=i[a++]<<h,h+=8}n.length=p,n.head&&(n.head.extra_len=p),512&n.flags&&(St[0]=255&p,St[1]=p>>>8&255,n.check=b(n.check,St,2,0)),p=0,h=0}else n.head&&(n.head.extra=null);n.mode=V;case V:if(1024&n.flags&&(g=n.length,g>u&&(g=u),g&&(n.head&&(Et=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),m.arraySet(n.head.extra,i,a,g,Et)),512&n.flags&&(n.check=b(n.check,i,g,a)),u-=g,a+=g,n.length-=g),n.length))break t;n.length=0,n.mode=H;case H:if(2048&n.flags){if(0===u)break t;g=0;do Et=i[a+g++],n.head&&Et&&n.length<65536&&(n.head.name+=String.fromCharCode(Et));while(Et&&u>g);if(512&n.flags&&(n.check=b(n.check,i,g,a)),u-=g,a+=g,Et)break t}else n.head&&(n.head.name=null);n.length=0,n.mode=z;case z:if(4096&n.flags){if(0===u)break t;g=0;do Et=i[a+g++],n.head&&Et&&n.length<65536&&(n.head.comment+=String.fromCharCode(Et));while(Et&&u>g);if(512&n.flags&&(n.check=b(n.check,i,g,a)),u-=g,a+=g,Et)break t}else n.head&&(n.head.comment=null);n.mode=q;case q:if(512&n.flags){for(;16>h;){if(0===u)break t;u--,p+=i[a++]<<h,h+=8}if(p!==(65535&n.check)){t.msg="header crc mismatch",n.mode=ft;break}p=0,h=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),t.adler=n.check=0,n.mode=K;break;case G:for(;32>h;){if(0===u)break t;u--,p+=i[a++]<<h,h+=8}t.adler=n.check=r(p),p=0,h=0,n.mode=W;case W:if(0===n.havedict)return t.next_out=s,t.avail_out=c,t.next_in=a,t.avail_in=u,n.hold=p,n.bits=h,I;t.adler=n.check=1,n.mode=K;case K:if(e===O||e===S)break t;case Y:if(n.last){p>>>=7&h,h-=7&h,n.mode=ut;break}for(;3>h;){if(0===u)break t;u--,p+=i[a++]<<h,h+=8}switch(n.last=1&p,p>>>=1,h-=1,3&p){case 0:n.mode=X;break;case 1:if(l(n),n.mode=et,e===S){p>>>=2,h-=2;break t}break;case 2:n.mode=Q;break;case 3:t.msg="invalid block type",n.mode=ft}p>>>=2,h-=2;break;case X:for(p>>>=7&h,h-=7&h;32>h;){if(0===u)break t;u--,p+=i[a++]<<h,h+=8}if((65535&p)!==(p>>>16^65535)){t.msg="invalid stored block lengths",n.mode=ft;break}if(n.length=65535&p,p=0,h=0,n.mode=Z,e===S)break t;case Z:n.mode=$;case $:if(g=n.length){if(g>u&&(g=u),g>c&&(g=c),0===g)break t;m.arraySet(o,i,a,g,s),u-=g,a+=g,c-=g,s+=g,n.length-=g;break}n.mode=K;break;case Q:for(;14>h;){if(0===u)break t;u--,p+=i[a++]<<h,h+=8}if(n.nlen=(31&p)+257,p>>>=5,h-=5,n.ndist=(31&p)+1,p>>>=5,h-=5,n.ncode=(15&p)+4,p>>>=4,h-=4,n.nlen>286||n.ndist>30){t.msg="too many length or distance symbols",n.mode=ft;break}n.have=0,n.mode=J;case J:for(;n.have<n.ncode;){for(;3>h;){if(0===u)break t;u--,p+=i[a++]<<h,h+=8}n.lens[Tt[n.have++]]=7&p,p>>>=3,h-=3}for(;n.have<19;)n.lens[Tt[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,Rt={bits:n.lenbits},Ct=_(E,n.lens,0,19,n.lencode,0,n.work,Rt),n.lenbits=Rt.bits,Ct){t.msg="invalid code lengths set",n.mode=ft;break}n.have=0,n.mode=tt;case tt:for(;n.have<n.nlen+n.ndist;){for(;Ot=n.lencode[p&(1<<n.lenbits)-1],gt=Ot>>>24,mt=Ot>>>16&255,yt=65535&Ot,!(h>=gt);){if(0===u)break t;u--,p+=i[a++]<<h,h+=8}if(16>yt)p>>>=gt,h-=gt,n.lens[n.have++]=yt;else{if(16===yt){for(kt=gt+2;kt>h;){if(0===u)break t;u--,p+=i[a++]<<h,h+=8}if(p>>>=gt,h-=gt,0===n.have){t.msg="invalid bit length repeat",n.mode=ft;break}Et=n.lens[n.have-1],g=3+(3&p),p>>>=2,h-=2}else if(17===yt){for(kt=gt+3;kt>h;){if(0===u)break t;u--,p+=i[a++]<<h,h+=8}p>>>=gt,h-=gt,Et=0,g=3+(7&p),p>>>=3,h-=3}else{for(kt=gt+7;kt>h;){if(0===u)break t;u--,p+=i[a++]<<h,h+=8}p>>>=gt,h-=gt,Et=0,g=11+(127&p),p>>>=7,h-=7}if(n.have+g>n.nlen+n.ndist){t.msg="invalid bit length repeat",n.mode=ft;break}for(;g--;)n.lens[n.have++]=Et}}if(n.mode===ft)break;if(0===n.lens[256]){t.msg="invalid code -- missing end-of-block",n.mode=ft;break}if(n.lenbits=9,Rt={bits:n.lenbits},Ct=_(C,n.lens,0,n.nlen,n.lencode,0,n.work,Rt),n.lenbits=Rt.bits,Ct){t.msg="invalid literal/lengths set",n.mode=ft;break}if(n.distbits=6,n.distcode=n.distdyn,Rt={bits:n.distbits},Ct=_(R,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,Rt),n.distbits=Rt.bits,Ct){t.msg="invalid distances set",n.mode=ft;break}if(n.mode=et,e===S)break t;case et:n.mode=nt;case nt:if(u>=6&&c>=258){t.next_out=s,t.avail_out=c,t.next_in=a,t.avail_in=u,n.hold=p,n.bits=h,w(t,v),s=t.next_out,o=t.output,c=t.avail_out,a=t.next_in,i=t.input,u=t.avail_in,p=n.hold,h=n.bits,n.mode===K&&(n.back=-1);break}for(n.back=0;Ot=n.lencode[p&(1<<n.lenbits)-1],gt=Ot>>>24,mt=Ot>>>16&255,yt=65535&Ot,!(h>=gt);){if(0===u)break t;u--,p+=i[a++]<<h,h+=8}if(mt&&0===(240&mt)){for(bt=gt,wt=mt,_t=yt;Ot=n.lencode[_t+((p&(1<<bt+wt)-1)>>bt)],gt=Ot>>>24,mt=Ot>>>16&255,yt=65535&Ot,!(h>=bt+gt);){if(0===u)break t;u--,p+=i[a++]<<h,h+=8}p>>>=bt,h-=bt,n.back+=bt}if(p>>>=gt,h-=gt,n.back+=gt,n.length=yt,0===mt){n.mode=st;break}if(32&mt){n.back=-1,n.mode=K;break}if(64&mt){t.msg="invalid literal/length code",n.mode=ft;break}n.extra=15&mt,n.mode=rt;case rt:if(n.extra){for(kt=n.extra;kt>h;){if(0===u)break t;u--,p+=i[a++]<<h,h+=8}n.length+=p&(1<<n.extra)-1,p>>>=n.extra,h-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=it;case it:for(;Ot=n.distcode[p&(1<<n.distbits)-1],gt=Ot>>>24,mt=Ot>>>16&255,yt=65535&Ot,!(h>=gt);){if(0===u)break t;u--,p+=i[a++]<<h,h+=8}if(0===(240&mt)){for(bt=gt,wt=mt,_t=yt;Ot=n.distcode[_t+((p&(1<<bt+wt)-1)>>bt)],gt=Ot>>>24,mt=Ot>>>16&255,yt=65535&Ot,!(h>=bt+gt);){if(0===u)break t;u--,p+=i[a++]<<h,h+=8}p>>>=bt,h-=bt,n.back+=bt}if(p>>>=gt,h-=gt,n.back+=gt,64&mt){t.msg="invalid distance code",n.mode=ft;break}n.offset=yt,n.extra=15&mt,n.mode=ot;case ot:if(n.extra){for(kt=n.extra;kt>h;){if(0===u)break t;u--,p+=i[a++]<<h,h+=8}n.offset+=p&(1<<n.extra)-1,p>>>=n.extra,h-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){t.msg="invalid distance too far back",n.mode=ft;break}n.mode=at;case at:if(0===c)break t;if(g=v-c,n.offset>g){if(g=n.offset-g,g>n.whave&&n.sane){t.msg="invalid distance too far back",n.mode=ft;break}g>n.wnext?(g-=n.wnext,dt=n.wsize-g):dt=n.wnext-g,g>n.length&&(g=n.length),vt=n.window}else vt=o,dt=s-n.offset,g=n.length;g>c&&(g=c),c-=g,n.length-=g;do o[s++]=vt[dt++];while(--g);0===n.length&&(n.mode=nt);break;case st:if(0===c)break t;o[s++]=n.length,c--,n.mode=nt;break;case ut:if(n.wrap){for(;32>h;){if(0===u)break t;u--,p|=i[a++]<<h,h+=8}if(v-=c,t.total_out+=v,n.total+=v,v&&(t.adler=n.check=n.flags?b(n.check,o,v,s-v):y(n.check,o,v,s-v)),v=c,(n.flags?p:r(p))!==n.check){t.msg="incorrect data check",n.mode=ft;break}p=0,h=0}n.mode=ct;case ct:if(n.wrap&&n.flags){for(;32>h;){if(0===u)break t;u--,p+=i[a++]<<h,h+=8}if(p!==(4294967295&n.total)){t.msg="incorrect length check",n.mode=ft;break}p=0,h=0}n.mode=lt;case lt:Ct=x;break t;case ft:Ct=P;break t;case pt:return A;case ht:default:return M}return t.next_out=s,t.avail_out=c,t.next_in=a,t.avail_in=u,n.hold=p,n.bits=h,(n.wsize||v!==t.avail_out&&n.mode<ft&&(n.mode<ut||e!==k))&&f(t,t.output,t.next_out,v-t.avail_out)?(n.mode=pt,A):(d-=t.avail_in,v-=t.avail_out,t.total_in+=d,t.total_out+=v,n.total+=v,n.wrap&&v&&(t.adler=n.check=n.flags?b(n.check,o,v,t.next_out-v):y(n.check,o,v,t.next_out-v)),t.data_type=n.bits+(n.last?64:0)+(n.mode===K?128:0)+(n.mode===et||n.mode===Z?256:0),(0===d&&0===v||e===k)&&Ct===T&&(Ct=N),Ct)}function h(t){if(!t||!t.state)return M;var e=t.state;return e.window&&(e.window=null),t.state=null,T}function d(t,e){var n;return t&&t.state?(n=t.state,0===(2&n.wrap)?M:(n.head=e,e.done=!1,T)):M}var v,g,m=t("../utils/common"),y=t("./adler32"),b=t("./crc32"),w=t("./inffast"),_=t("./inftrees"),E=0,C=1,R=2,k=4,O=5,S=6,T=0,x=1,I=2,M=-2,P=-3,A=-4,N=-5,D=8,j=1,L=2,B=3,U=4,F=5,V=6,H=7,z=8,q=9,G=10,W=11,K=12,Y=13,X=14,Z=15,$=16,Q=17,J=18,tt=19,et=20,nt=21,rt=22,it=23,ot=24,at=25,st=26,ut=27,ct=28,lt=29,ft=30,pt=31,ht=32,dt=852,vt=592,gt=15,mt=gt,yt=!0;n.inflateReset=a,n.inflateReset2=s,n.inflateResetKeep=o,n.inflateInit=c,n.inflateInit2=u,n.inflate=p,n.inflateEnd=h,n.inflateGetHeader=d,n.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":11,"./adler32":13,"./crc32":15,"./inffast":17,"./inftrees":19}],19:[function(t,e,n){"use strict";var r=t("../utils/common"),i=15,o=852,a=592,s=0,u=1,c=2,l=[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],f=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],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,0,0],h=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];e.exports=function(t,e,n,d,v,g,m,y){var b,w,_,E,C,R,k,O,S,T=y.bits,x=0,I=0,M=0,P=0,A=0,N=0,D=0,j=0,L=0,B=0,U=null,F=0,V=new r.Buf16(i+1),H=new r.Buf16(i+1),z=null,q=0;for(x=0;i>=x;x++)V[x]=0;for(I=0;d>I;I++)V[e[n+I]]++;for(A=T,P=i;P>=1&&0===V[P];P--);if(A>P&&(A=P),0===P)return v[g++]=20971520,v[g++]=20971520,y.bits=1,0;for(M=1;P>M&&0===V[M];M++);for(M>A&&(A=M),j=1,x=1;i>=x;x++)if(j<<=1,j-=V[x],0>j)return-1;if(j>0&&(t===s||1!==P))return-1;for(H[1]=0,x=1;i>x;x++)H[x+1]=H[x]+V[x];for(I=0;d>I;I++)0!==e[n+I]&&(m[H[e[n+I]]++]=I);if(t===s?(U=z=m,R=19):t===u?(U=l,F-=257,z=f,q-=257,R=256):(U=p,z=h,R=-1),B=0,I=0,x=M,C=g,N=A,D=0,_=-1,L=1<<A,E=L-1,t===u&&L>o||t===c&&L>a)return 1;for(var G=0;;){G++,k=x-D,m[I]<R?(O=0,S=m[I]):m[I]>R?(O=z[q+m[I]],S=U[F+m[I]]):(O=96,S=0),b=1<<x-D,w=1<<N,M=w;do w-=b,v[C+(B>>D)+w]=k<<24|O<<16|S|0;while(0!==w);for(b=1<<x-1;B&b;)b>>=1;if(0!==b?(B&=b-1,B+=b):B=0,I++,0===--V[x]){if(x===P)break;x=e[n+m[I]]}if(x>A&&(B&E)!==_){for(0===D&&(D=A),C+=M,N=x-D,j=1<<N;P>N+D&&(j-=V[N+D],!(0>=j));)N++,j<<=1;if(L+=1<<N,t===u&&L>o||t===c&&L>a)return 1;_=B&E,v[_]=A<<24|N<<16|C-g|0}}return 0!==B&&(v[C+B]=x-D<<24|64<<16|0),y.bits=A,0}},{"../utils/common":11}],20:[function(t,e,n){"use strict";e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],21:[function(t,e,n){"use strict";function r(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}e.exports=r},{}],22:[function(e,n,r){(function(e){!function(e){"use strict";if("function"==typeof bootstrap)bootstrap("promise",e);else if("object"==typeof r&&"object"==typeof n)n.exports=e();else if("function"==typeof t&&t.amd)t(e);else if("undefined"!=typeof ses){if(!ses.ok())return;ses.makeQ=e}else{if("undefined"==typeof window&&"undefined"==typeof self)throw new Error("This environment was not anticipated by Q. Please file a bug.");var i="undefined"!=typeof window?window:self,o=i.Q;i.Q=e(),i.Q.noConflict=function(){return i.Q=o,this}}}(function(){"use strict";function t(t){return function(){return X.apply(t,arguments)}}function n(t){return t===Object(t)}function r(t){return"[object StopIteration]"===rt(t)||t instanceof G}function i(t,e){if(H&&e.stack&&"object"==typeof t&&null!==t&&t.stack&&-1===t.stack.indexOf(it)){for(var n=[],r=e;r;r=r.source)r.stack&&n.unshift(r.stack);n.unshift(t.stack);var i=n.join("\n"+it+"\n");t.stack=o(i)}}function o(t){for(var e=t.split("\n"),n=[],r=0;r<e.length;++r){var i=e[r];u(i)||a(i)||!i||n.push(i)}return n.join("\n")}function a(t){return-1!==t.indexOf("(module.js:")||-1!==t.indexOf("(node.js:")}function s(t){var e=/at .+ \((.+):(\d+):(?:\d+)\)$/.exec(t);if(e)return[e[1],Number(e[2])];var n=/at ([^ ]+):(\d+):(?:\d+)$/.exec(t);if(n)return[n[1],Number(n[2])];var r=/.*@(.+):(\d+)$/.exec(t);return r?[r[1],Number(r[2])]:void 0}function u(t){var e=s(t);if(!e)return!1;var n=e[0],r=e[1];return n===q&&r>=W&&ct>=r}function c(){if(H)try{throw new Error}catch(t){var e=t.stack.split("\n"),n=e[0].indexOf("@")>0?e[1]:e[2],r=s(n);if(!r)return;return q=r[0],r[1]}}function l(t,e,n){return function(){return"undefined"!=typeof console&&"function"==typeof console.warn&&console.warn(e+" is deprecated, use "+n+" instead.",new Error("").stack),t.apply(t,arguments)}}function f(t){return t instanceof v?t:b(t)?T(t):S(t)}function p(){function t(t){e=t,o.source=t,$(n,function(e,n){f.nextTick(function(){t.promiseDispatch.apply(t,n)})},void 0),n=void 0,r=void 0}var e,n=[],r=[],i=tt(p.prototype),o=tt(v.prototype);if(o.promiseDispatch=function(t,i,o){var a=Z(arguments);n?(n.push(a),"when"===i&&o[1]&&r.push(o[1])):f.nextTick(function(){e.promiseDispatch.apply(e,a)})},o.valueOf=function(){if(n)return o;var t=m(e);return y(t)&&(e=t),t},o.inspect=function(){return e?e.inspect():{state:"pending"}},f.longStackSupport&&H)try{throw new Error}catch(a){o.stack=a.stack.substring(a.stack.indexOf("\n")+1)}return i.promise=o,i.resolve=function(n){e||t(f(n))},i.fulfill=function(n){e||t(S(n))},i.reject=function(n){e||t(O(n))},i.notify=function(t){e||$(r,function(e,n){f.nextTick(function(){n(t)})},void 0)},i}function h(t){if("function"!=typeof t)throw new TypeError("resolver must be a function.");var e=p();try{t(e.resolve,e.reject,e.notify)}catch(n){e.reject(n)}return e.promise}function d(t){return h(function(e,n){for(var r=0,i=t.length;i>r;r++)f(t[r]).then(e,n)})}function v(t,e,n){void 0===e&&(e=function(t){return O(new Error("Promise does not support operation: "+t))}),void 0===n&&(n=function(){return{state:"unknown"}});var r=tt(v.prototype);if(r.promiseDispatch=function(n,i,o){var a;try{a=t[i]?t[i].apply(r,o):e.call(r,i,o)}catch(s){a=O(s)}n&&n(a)},r.inspect=n,n){var i=n();"rejected"===i.state&&(r.exception=i.reason),r.valueOf=function(){var t=n();return"pending"===t.state||"rejected"===t.state?r:t.value}}return r}function g(t,e,n,r){return f(t).then(e,n,r)}function m(t){if(y(t)){var e=t.inspect();if("fulfilled"===e.state)return e.value}return t}function y(t){return t instanceof v}function b(t){return n(t)&&"function"==typeof t.then}function w(t){return y(t)&&"pending"===t.inspect().state}function _(t){return!y(t)||"fulfilled"===t.inspect().state}function E(t){return y(t)&&"rejected"===t.inspect().state}function C(){ot.length=0,at.length=0,ut||(ut=!0)}function R(t,n){ut&&("object"==typeof e&&"function"==typeof e.emit&&f.nextTick.runAfter(function(){-1!==Q(at,t)&&(e.emit("unhandledRejection",n,t),st.push(t))}),at.push(t),n&&"undefined"!=typeof n.stack?ot.push(n.stack):ot.push("(no stack) "+n))}function k(t){if(ut){var n=Q(at,t);-1!==n&&("object"==typeof e&&"function"==typeof e.emit&&f.nextTick.runAfter(function(){var r=Q(st,t);-1!==r&&(e.emit("rejectionHandled",ot[n],t),st.splice(r,1))}),at.splice(n,1),ot.splice(n,1))}}function O(t){var e=v({when:function(e){return e&&k(this),e?e(t):this}},function(){return this},function(){return{state:"rejected",reason:t}});return R(e,t),e}function S(t){return v({when:function(){return t},
get:function(e){return t[e]},set:function(e,n){t[e]=n},"delete":function(e){delete t[e]},post:function(e,n){return null===e||void 0===e?t.apply(void 0,n):t[e].apply(t,n)},apply:function(e,n){return t.apply(e,n)},keys:function(){return nt(t)}},void 0,function(){return{state:"fulfilled",value:t}})}function T(t){var e=p();return f.nextTick(function(){try{t.then(e.resolve,e.reject,e.notify)}catch(n){e.reject(n)}}),e.promise}function x(t){return v({isDef:function(){}},function(e,n){return D(t,e,n)},function(){return f(t).inspect()})}function I(t,e,n){return f(t).spread(e,n)}function M(t){return function(){function e(t,e){var a;if("undefined"==typeof StopIteration){try{a=n[t](e)}catch(s){return O(s)}return a.done?f(a.value):g(a.value,i,o)}try{a=n[t](e)}catch(s){return r(s)?f(s.value):O(s)}return g(a,i,o)}var n=t.apply(this,arguments),i=e.bind(e,"next"),o=e.bind(e,"throw");return i()}}function P(t){f.done(f.async(t)())}function A(t){throw new G(t)}function N(t){return function(){return I([this,j(arguments)],function(e,n){return t.apply(e,n)})}}function D(t,e,n){return f(t).dispatch(e,n)}function j(t){return g(t,function(t){var e=0,n=p();return $(t,function(r,i,o){var a;y(i)&&"fulfilled"===(a=i.inspect()).state?t[o]=a.value:(++e,g(i,function(r){t[o]=r,0===--e&&n.resolve(t)},n.reject,function(t){n.notify({index:o,value:t})}))},void 0),0===e&&n.resolve(t),n.promise})}function L(t){if(0===t.length)return f.resolve();var e=f.defer(),n=0;return $(t,function(r,i,o){function a(t){e.resolve(t)}function s(){n--,0===n&&e.reject(new Error("Can't get fulfillment value from any promise, all promises were rejected."))}function u(t){e.notify({index:o,value:t})}var c=t[o];n++,g(c,a,s,u)},void 0),e.promise}function B(t){return g(t,function(t){return t=J(t,f),g(j(J(t,function(t){return g(t,K,K)})),function(){return t})})}function U(t){return f(t).allSettled()}function F(t,e){return f(t).then(void 0,void 0,e)}function V(t,e){return f(t).nodeify(e)}var H=!1;try{throw new Error}catch(z){H=!!z.stack}var q,G,W=c(),K=function(){},Y=function(){function t(){for(var t,e;r.next;)r=r.next,t=r.task,r.task=void 0,e=r.domain,e&&(r.domain=void 0,e.enter()),n(t,e);for(;u.length;)t=u.pop(),n(t);o=!1}function n(e,n){try{e()}catch(r){if(s)throw n&&n.exit(),setTimeout(t,0),n&&n.enter(),r;setTimeout(function(){throw r},0)}n&&n.exit()}var r={task:void 0,next:null},i=r,o=!1,a=void 0,s=!1,u=[];if(Y=function(t){i=i.next={task:t,domain:s&&e.domain,next:null},o||(o=!0,a())},"object"==typeof e&&"[object process]"===e.toString()&&e.nextTick)s=!0,a=function(){e.nextTick(t)};else if("function"==typeof setImmediate)a="undefined"!=typeof window?setImmediate.bind(window,t):function(){setImmediate(t)};else if("undefined"!=typeof MessageChannel){var c=new MessageChannel;c.port1.onmessage=function(){a=l,c.port1.onmessage=t,t()};var l=function(){c.port2.postMessage(0)};a=function(){setTimeout(t,0),l()}}else a=function(){setTimeout(t,0)};return Y.runAfter=function(t){u.push(t),o||(o=!0,a())},Y}(),X=Function.call,Z=t(Array.prototype.slice),$=t(Array.prototype.reduce||function(t,e){var n=0,r=this.length;if(1===arguments.length)for(;;){if(n in this){e=this[n++];break}if(++n>=r)throw new TypeError}for(;r>n;n++)n in this&&(e=t(e,this[n],n));return e}),Q=t(Array.prototype.indexOf||function(t){for(var e=0;e<this.length;e++)if(this[e]===t)return e;return-1}),J=t(Array.prototype.map||function(t,e){var n=this,r=[];return $(n,function(i,o,a){r.push(t.call(e,o,a,n))},void 0),r}),tt=Object.create||function(t){function e(){}return e.prototype=t,new e},et=t(Object.prototype.hasOwnProperty),nt=Object.keys||function(t){var e=[];for(var n in t)et(t,n)&&e.push(n);return e},rt=t(Object.prototype.toString);G="undefined"!=typeof ReturnValue?ReturnValue:function(t){this.value=t};var it="From previous event:";f.resolve=f,f.nextTick=Y,f.longStackSupport=!1,"object"==typeof e&&e&&e.env&&e.env.Q_DEBUG&&(f.longStackSupport=!0),f.defer=p,p.prototype.makeNodeResolver=function(){var t=this;return function(e,n){e?t.reject(e):arguments.length>2?t.resolve(Z(arguments,1)):t.resolve(n)}},f.Promise=h,f.promise=h,h.race=d,h.all=j,h.reject=O,h.resolve=f,f.passByCopy=function(t){return t},v.prototype.passByCopy=function(){return this},f.join=function(t,e){return f(t).join(e)},v.prototype.join=function(t){return f([this,t]).spread(function(t,e){if(t===e)return t;throw new Error("Can't join: not the same: "+t+" "+e)})},f.race=d,v.prototype.race=function(){return this.then(f.race)},f.makePromise=v,v.prototype.toString=function(){return"[object Promise]"},v.prototype.then=function(t,e,n){function r(e){try{return"function"==typeof t?t(e):e}catch(n){return O(n)}}function o(t){if("function"==typeof e){i(t,s);try{return e(t)}catch(n){return O(n)}}return O(t)}function a(t){return"function"==typeof n?n(t):t}var s=this,u=p(),c=!1;return f.nextTick(function(){s.promiseDispatch(function(t){c||(c=!0,u.resolve(r(t)))},"when",[function(t){c||(c=!0,u.resolve(o(t)))}])}),s.promiseDispatch(void 0,"when",[void 0,function(t){var e,n=!1;try{e=a(t)}catch(r){if(n=!0,!f.onerror)throw r;f.onerror(r)}n||u.notify(e)}]),u.promise},f.tap=function(t,e){return f(t).tap(e)},v.prototype.tap=function(t){return t=f(t),this.then(function(e){return t.fcall(e).thenResolve(e)})},f.when=g,v.prototype.thenResolve=function(t){return this.then(function(){return t})},f.thenResolve=function(t,e){return f(t).thenResolve(e)},v.prototype.thenReject=function(t){return this.then(function(){throw t})},f.thenReject=function(t,e){return f(t).thenReject(e)},f.nearer=m,f.isPromise=y,f.isPromiseAlike=b,f.isPending=w,v.prototype.isPending=function(){return"pending"===this.inspect().state},f.isFulfilled=_,v.prototype.isFulfilled=function(){return"fulfilled"===this.inspect().state},f.isRejected=E,v.prototype.isRejected=function(){return"rejected"===this.inspect().state};var ot=[],at=[],st=[],ut=!0;f.resetUnhandledRejections=C,f.getUnhandledReasons=function(){return ot.slice()},f.stopUnhandledRejectionTracking=function(){C(),ut=!1},C(),f.reject=O,f.fulfill=S,f.master=x,f.spread=I,v.prototype.spread=function(t,e){return this.all().then(function(e){return t.apply(void 0,e)},e)},f.async=M,f.spawn=P,f["return"]=A,f.promised=N,f.dispatch=D,v.prototype.dispatch=function(t,e){var n=this,r=p();return f.nextTick(function(){n.promiseDispatch(r.resolve,t,e)}),r.promise},f.get=function(t,e){return f(t).dispatch("get",[e])},v.prototype.get=function(t){return this.dispatch("get",[t])},f.set=function(t,e,n){return f(t).dispatch("set",[e,n])},v.prototype.set=function(t,e){return this.dispatch("set",[t,e])},f.del=f["delete"]=function(t,e){return f(t).dispatch("delete",[e])},v.prototype.del=v.prototype["delete"]=function(t){return this.dispatch("delete",[t])},f.mapply=f.post=function(t,e,n){return f(t).dispatch("post",[e,n])},v.prototype.mapply=v.prototype.post=function(t,e){return this.dispatch("post",[t,e])},f.send=f.mcall=f.invoke=function(t,e){return f(t).dispatch("post",[e,Z(arguments,2)])},v.prototype.send=v.prototype.mcall=v.prototype.invoke=function(t){return this.dispatch("post",[t,Z(arguments,1)])},f.fapply=function(t,e){return f(t).dispatch("apply",[void 0,e])},v.prototype.fapply=function(t){return this.dispatch("apply",[void 0,t])},f["try"]=f.fcall=function(t){return f(t).dispatch("apply",[void 0,Z(arguments,1)])},v.prototype.fcall=function(){return this.dispatch("apply",[void 0,Z(arguments)])},f.fbind=function(t){var e=f(t),n=Z(arguments,1);return function(){return e.dispatch("apply",[this,n.concat(Z(arguments))])}},v.prototype.fbind=function(){var t=this,e=Z(arguments);return function(){return t.dispatch("apply",[this,e.concat(Z(arguments))])}},f.keys=function(t){return f(t).dispatch("keys",[])},v.prototype.keys=function(){return this.dispatch("keys",[])},f.all=j,v.prototype.all=function(){return j(this)},f.any=L,v.prototype.any=function(){return L(this)},f.allResolved=l(B,"allResolved","allSettled"),v.prototype.allResolved=function(){return B(this)},f.allSettled=U,v.prototype.allSettled=function(){return this.then(function(t){return j(J(t,function(t){function e(){return t.inspect()}return t=f(t),t.then(e,e)}))})},f.fail=f["catch"]=function(t,e){return f(t).then(void 0,e)},v.prototype.fail=v.prototype["catch"]=function(t){return this.then(void 0,t)},f.progress=F,v.prototype.progress=function(t){return this.then(void 0,void 0,t)},f.fin=f["finally"]=function(t,e){return f(t)["finally"](e)},v.prototype.fin=v.prototype["finally"]=function(t){return t=f(t),this.then(function(e){return t.fcall().then(function(){return e})},function(e){return t.fcall().then(function(){throw e})})},f.done=function(t,e,n,r){return f(t).done(e,n,r)},v.prototype.done=function(t,n,r){var o=function(t){f.nextTick(function(){if(i(t,a),!f.onerror)throw t;f.onerror(t)})},a=t||n||r?this.then(t,n,r):this;"object"==typeof e&&e&&e.domain&&(o=e.domain.bind(o)),a.then(void 0,o)},f.timeout=function(t,e,n){return f(t).timeout(e,n)},v.prototype.timeout=function(t,e){var n=p(),r=setTimeout(function(){e&&"string"!=typeof e||(e=new Error(e||"Timed out after "+t+" ms"),e.code="ETIMEDOUT"),n.reject(e)},t);return this.then(function(t){clearTimeout(r),n.resolve(t)},function(t){clearTimeout(r),n.reject(t)},n.notify),n.promise},f.delay=function(t,e){return void 0===e&&(e=t,t=void 0),f(t).delay(e)},v.prototype.delay=function(t){return this.then(function(e){var n=p();return setTimeout(function(){n.resolve(e)},t),n.promise})},f.nfapply=function(t,e){return f(t).nfapply(e)},v.prototype.nfapply=function(t){var e=p(),n=Z(t);return n.push(e.makeNodeResolver()),this.fapply(n).fail(e.reject),e.promise},f.nfcall=function(t){var e=Z(arguments,1);return f(t).nfapply(e)},v.prototype.nfcall=function(){var t=Z(arguments),e=p();return t.push(e.makeNodeResolver()),this.fapply(t).fail(e.reject),e.promise},f.nfbind=f.denodeify=function(t){var e=Z(arguments,1);return function(){var n=e.concat(Z(arguments)),r=p();return n.push(r.makeNodeResolver()),f(t).fapply(n).fail(r.reject),r.promise}},v.prototype.nfbind=v.prototype.denodeify=function(){var t=Z(arguments);return t.unshift(this),f.denodeify.apply(void 0,t)},f.nbind=function(t,e){var n=Z(arguments,2);return function(){function r(){return t.apply(e,arguments)}var i=n.concat(Z(arguments)),o=p();return i.push(o.makeNodeResolver()),f(r).fapply(i).fail(o.reject),o.promise}},v.prototype.nbind=function(){var t=Z(arguments,0);return t.unshift(this),f.nbind.apply(void 0,t)},f.nmapply=f.npost=function(t,e,n){return f(t).npost(e,n)},v.prototype.nmapply=v.prototype.npost=function(t,e){var n=Z(e||[]),r=p();return n.push(r.makeNodeResolver()),this.dispatch("post",[t,n]).fail(r.reject),r.promise},f.nsend=f.nmcall=f.ninvoke=function(t,e){var n=Z(arguments,2),r=p();return n.push(r.makeNodeResolver()),f(t).dispatch("post",[e,n]).fail(r.reject),r.promise},v.prototype.nsend=v.prototype.nmcall=v.prototype.ninvoke=function(t){var e=Z(arguments,1),n=p();return e.push(n.makeNodeResolver()),this.dispatch("post",[t,e]).fail(n.reject),n.promise},f.nodeify=V,v.prototype.nodeify=function(t){return t?void this.then(function(e){f.nextTick(function(){t(null,e)})},function(e){f.nextTick(function(){t(e)})}):this},f.noConflict=function(){throw new Error("Q.noConflict only works when Q is used as a global")};var ct=c();return f})}).call(this,e("_process"))},{_process:6}],23:[function(t,e,n){"use strict";e.exports=t("react/lib/ReactDOM")},{"react/lib/ReactDOM":58}],24:[function(t,e,n){"use strict";var r=t("./ReactMount"),i=t("./findDOMNode"),o=t("fbjs/lib/focusNode"),a={componentDidMount:function(){this.props.autoFocus&&o(i(this))}},s={Mixin:a,focusDOMComponent:function(){o(r.getNode(this._rootNodeID))}};e.exports=s},{"./ReactMount":86,"./findDOMNode":129,"fbjs/lib/focusNode":159}],25:[function(t,e,n){"use strict";function r(){var t=window.opera;return"object"==typeof t&&"function"==typeof t.version&&parseInt(t.version(),10)<=12}function i(t){return(t.ctrlKey||t.altKey||t.metaKey)&&!(t.ctrlKey&&t.altKey)}function o(t){switch(t){case T.topCompositionStart:return x.compositionStart;case T.topCompositionEnd:return x.compositionEnd;case T.topCompositionUpdate:return x.compositionUpdate}}function a(t,e){return t===T.topKeyDown&&e.keyCode===_}function s(t,e){switch(t){case T.topKeyUp:return-1!==w.indexOf(e.keyCode);case T.topKeyDown:return e.keyCode!==_;case T.topKeyPress:case T.topMouseDown:case T.topBlur:return!0;default:return!1}}function u(t){var e=t.detail;return"object"==typeof e&&"data"in e?e.data:null}function c(t,e,n,r,i){var c,l;if(E?c=o(t):M?s(t,r)&&(c=x.compositionEnd):a(t,r)&&(c=x.compositionStart),!c)return null;k&&(M||c!==x.compositionStart?c===x.compositionEnd&&M&&(l=M.getData()):M=g.getPooled(e));var f=m.getPooled(c,n,r,i);if(l)f.data=l;else{var p=u(r);null!==p&&(f.data=p)}return d.accumulateTwoPhaseDispatches(f),f}function l(t,e){switch(t){case T.topCompositionEnd:return u(e);case T.topKeyPress:var n=e.which;return n!==O?null:(I=!0,S);case T.topTextInput:var r=e.data;return r===S&&I?null:r;default:return null}}function f(t,e){if(M){if(t===T.topCompositionEnd||s(t,e)){var n=M.getData();return g.release(M),M=null,n}return null}switch(t){case T.topPaste:return null;case T.topKeyPress:return e.which&&!i(e)?String.fromCharCode(e.which):null;case T.topCompositionEnd:return k?null:e.data;default:return null}}function p(t,e,n,r,i){var o;if(o=R?l(t,r):f(t,r),!o)return null;var a=y.getPooled(x.beforeInput,n,r,i);return a.data=o,d.accumulateTwoPhaseDispatches(a),a}var h=t("./EventConstants"),d=t("./EventPropagators"),v=t("fbjs/lib/ExecutionEnvironment"),g=t("./FallbackCompositionState"),m=t("./SyntheticCompositionEvent"),y=t("./SyntheticInputEvent"),b=t("fbjs/lib/keyOf"),w=[9,13,27,32],_=229,E=v.canUseDOM&&"CompositionEvent"in window,C=null;v.canUseDOM&&"documentMode"in document&&(C=document.documentMode);var R=v.canUseDOM&&"TextEvent"in window&&!C&&!r(),k=v.canUseDOM&&(!E||C&&C>8&&11>=C),O=32,S=String.fromCharCode(O),T=h.topLevelTypes,x={beforeInput:{phasedRegistrationNames:{bubbled:b({onBeforeInput:null}),captured:b({onBeforeInputCapture:null})},dependencies:[T.topCompositionEnd,T.topKeyPress,T.topTextInput,T.topPaste]},compositionEnd:{phasedRegistrationNames:{bubbled:b({onCompositionEnd:null}),captured:b({onCompositionEndCapture:null})},dependencies:[T.topBlur,T.topCompositionEnd,T.topKeyDown,T.topKeyPress,T.topKeyUp,T.topMouseDown]},compositionStart:{phasedRegistrationNames:{bubbled:b({onCompositionStart:null}),captured:b({onCompositionStartCapture:null})},dependencies:[T.topBlur,T.topCompositionStart,T.topKeyDown,T.topKeyPress,T.topKeyUp,T.topMouseDown]},compositionUpdate:{phasedRegistrationNames:{bubbled:b({onCompositionUpdate:null}),captured:b({onCompositionUpdateCapture:null})},dependencies:[T.topBlur,T.topCompositionUpdate,T.topKeyDown,T.topKeyPress,T.topKeyUp,T.topMouseDown]}},I=!1,M=null,P={eventTypes:x,extractEvents:function(t,e,n,r,i){return[c(t,e,n,r,i),p(t,e,n,r,i)]}};e.exports=P},{"./EventConstants":37,"./EventPropagators":41,"./FallbackCompositionState":42,"./SyntheticCompositionEvent":111,"./SyntheticInputEvent":115,"fbjs/lib/ExecutionEnvironment":151,"fbjs/lib/keyOf":169}],26:[function(t,e,n){"use strict";function r(t,e){return t+e.charAt(0).toUpperCase()+e.substring(1)}var i={animationIterationCount:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,stopOpacity:!0,strokeDashoffset:!0,strokeOpacity:!0,strokeWidth:!0},o=["Webkit","ms","Moz","O"];Object.keys(i).forEach(function(t){o.forEach(function(e){i[r(e,t)]=i[t]})});var a={background:{backgroundAttachment:!0,backgroundColor:!0,backgroundImage:!0,backgroundPositionX:!0,backgroundPositionY:!0,backgroundRepeat:!0},backgroundPosition:{backgroundPositionX:!0,backgroundPositionY:!0},border:{borderWidth:!0,borderStyle:!0,borderColor:!0},borderBottom:{borderBottomWidth:!0,borderBottomStyle:!0,borderBottomColor:!0},borderLeft:{borderLeftWidth:!0,borderLeftStyle:!0,borderLeftColor:!0},borderRight:{borderRightWidth:!0,borderRightStyle:!0,borderRightColor:!0},borderTop:{borderTopWidth:!0,borderTopStyle:!0,borderTopColor:!0},font:{fontStyle:!0,fontVariant:!0,fontWeight:!0,fontSize:!0,lineHeight:!0,fontFamily:!0},outline:{outlineWidth:!0,outlineStyle:!0,outlineColor:!0}},s={isUnitlessNumber:i,shorthandPropertyExpansions:a};e.exports=s},{}],27:[function(t,e,n){"use strict";var r=t("./CSSProperty"),i=t("fbjs/lib/ExecutionEnvironment"),o=t("./ReactPerf"),a=(t("fbjs/lib/camelizeStyleName"),t("./dangerousStyleValue")),s=t("fbjs/lib/hyphenateStyleName"),u=t("fbjs/lib/memoizeStringOnly"),c=(t("fbjs/lib/warning"),u(function(t){return s(t)})),l=!1,f="cssFloat";if(i.canUseDOM){var p=document.createElement("div").style;try{p.font=""}catch(h){l=!0}void 0===document.documentElement.style.cssFloat&&(f="styleFloat")}var d={createMarkupForStyles:function(t){var e="";for(var n in t)if(t.hasOwnProperty(n)){var r=t[n];null!=r&&(e+=c(n)+":",e+=a(n,r)+";")}return e||null},setValueForStyles:function(t,e){var n=t.style;for(var i in e)if(e.hasOwnProperty(i)){var o=a(i,e[i]);if("float"===i&&(i=f),o)n[i]=o;else{var s=l&&r.shorthandPropertyExpansions[i];if(s)for(var u in s)n[u]="";else n[i]=""}}}};o.measureMethods(d,"CSSPropertyOperations",{setValueForStyles:"setValueForStyles"}),e.exports=d},{"./CSSProperty":26,"./ReactPerf":92,"./dangerousStyleValue":126,"fbjs/lib/ExecutionEnvironment":151,"fbjs/lib/camelizeStyleName":153,"fbjs/lib/hyphenateStyleName":164,"fbjs/lib/memoizeStringOnly":171,"fbjs/lib/warning":174}],28:[function(t,e,n){"use strict";function r(){this._callbacks=null,this._contexts=null}var i=t("./PooledClass"),o=t("./Object.assign"),a=t("fbjs/lib/invariant");o(r.prototype,{enqueue:function(t,e){this._callbacks=this._callbacks||[],this._contexts=this._contexts||[],this._callbacks.push(t),this._contexts.push(e)},notifyAll:function(){var t=this._callbacks,e=this._contexts;if(t){t.length!==e.length?a(!1):void 0,this._callbacks=null,this._contexts=null;for(var n=0;n<t.length;n++)t[n].call(e[n]);t.length=0,e.length=0}},reset:function(){this._callbacks=null,this._contexts=null},destructor:function(){this.reset()}}),i.addPoolingTo(r),e.exports=r},{"./Object.assign":45,"./PooledClass":46,"fbjs/lib/invariant":165}],29:[function(t,e,n){"use strict";function r(t){var e=t.nodeName&&t.nodeName.toLowerCase();return"select"===e||"input"===e&&"file"===t.type}function i(t){var e=C.getPooled(x.change,M,t,R(t));w.accumulateTwoPhaseDispatches(e),E.batchedUpdates(o,e)}function o(t){b.enqueueEvents(t),b.processEventQueue(!1)}function a(t,e){I=t,M=e,I.attachEvent("onchange",i)}function s(){I&&(I.detachEvent("onchange",i),I=null,M=null)}function u(t,e,n){return t===T.topChange?n:void 0}function c(t,e,n){t===T.topFocus?(s(),a(e,n)):t===T.topBlur&&s()}function l(t,e){I=t,M=e,P=t.value,A=Object.getOwnPropertyDescriptor(t.constructor.prototype,"value"),Object.defineProperty(I,"value",j),I.attachEvent("onpropertychange",p)}function f(){I&&(delete I.value,I.detachEvent("onpropertychange",p),I=null,M=null,P=null,A=null)}function p(t){if("value"===t.propertyName){var e=t.srcElement.value;e!==P&&(P=e,i(t))}}function h(t,e,n){return t===T.topInput?n:void 0}function d(t,e,n){t===T.topFocus?(f(),l(e,n)):t===T.topBlur&&f()}function v(t,e,n){return t!==T.topSelectionChange&&t!==T.topKeyUp&&t!==T.topKeyDown||!I||I.value===P?void 0:(P=I.value,M)}function g(t){return t.nodeName&&"input"===t.nodeName.toLowerCase()&&("checkbox"===t.type||"radio"===t.type)}function m(t,e,n){return t===T.topClick?n:void 0}var y=t("./EventConstants"),b=t("./EventPluginHub"),w=t("./EventPropagators"),_=t("fbjs/lib/ExecutionEnvironment"),E=t("./ReactUpdates"),C=t("./SyntheticEvent"),R=t("./getEventTarget"),k=t("./isEventSupported"),O=t("./isTextInputElement"),S=t("fbjs/lib/keyOf"),T=y.topLevelTypes,x={change:{phasedRegistrationNames:{bubbled:S({onChange:null}),captured:S({onChangeCapture:null})},dependencies:[T.topBlur,T.topChange,T.topClick,T.topFocus,T.topInput,T.topKeyDown,T.topKeyUp,T.topSelectionChange]}},I=null,M=null,P=null,A=null,N=!1;_.canUseDOM&&(N=k("change")&&(!("documentMode"in document)||document.documentMode>8));var D=!1;_.canUseDOM&&(D=k("input")&&(!("documentMode"in document)||document.documentMode>9));var j={get:function(){return A.get.call(this)},set:function(t){P=""+t,A.set.call(this,t)}},L={eventTypes:x,extractEvents:function(t,e,n,i,o){var a,s;if(r(e)?N?a=u:s=c:O(e)?D?a=h:(a=v,s=d):g(e)&&(a=m),a){var l=a(t,e,n);if(l){var f=C.getPooled(x.change,l,i,o);return f.type="change",w.accumulateTwoPhaseDispatches(f),f}}s&&s(t,e,n)}};e.exports=L},{"./EventConstants":37,"./EventPluginHub":38,"./EventPropagators":41,"./ReactUpdates":104,"./SyntheticEvent":113,"./getEventTarget":135,"./isEventSupported":140,"./isTextInputElement":141,"fbjs/lib/ExecutionEnvironment":151,"fbjs/lib/keyOf":169}],30:[function(t,e,n){"use strict";var r=0,i={createReactRootIndex:function(){return r++}};e.exports=i},{}],31:[function(t,e,n){"use strict";function r(t,e,n){var r=n>=t.childNodes.length?null:t.childNodes.item(n);t.insertBefore(e,r)}var i=t("./Danger"),o=t("./ReactMultiChildUpdateTypes"),a=t("./ReactPerf"),s=t("./setInnerHTML"),u=t("./setTextContent"),c=t("fbjs/lib/invariant"),l={dangerouslyReplaceNodeWithMarkup:i.dangerouslyReplaceNodeWithMarkup,updateTextContent:u,processUpdates:function(t,e){for(var n,a=null,l=null,f=0;f<t.length;f++)if(n=t[f],n.type===o.MOVE_EXISTING||n.type===o.REMOVE_NODE){var p=n.fromIndex,h=n.parentNode.childNodes[p],d=n.parentID;h?void 0:c(!1),a=a||{},a[d]=a[d]||[],a[d][p]=h,l=l||[],l.push(h)}var v;if(v=e.length&&"string"==typeof e[0]?i.dangerouslyRenderMarkup(e):e,l)for(var g=0;g<l.length;g++)l[g].parentNode.removeChild(l[g]);for(var m=0;m<t.length;m++)switch(n=t[m],n.type){case o.INSERT_MARKUP:r(n.parentNode,v[n.markupIndex],n.toIndex);break;case o.MOVE_EXISTING:r(n.parentNode,a[n.parentID][n.fromIndex],n.toIndex);break;case o.SET_MARKUP:s(n.parentNode,n.content);break;case o.TEXT_CONTENT:u(n.parentNode,n.content);break;case o.REMOVE_NODE:}}};a.measureMethods(l,"DOMChildrenOperations",{updateTextContent:"updateTextContent"}),e.exports=l},{"./Danger":34,"./ReactMultiChildUpdateTypes":88,"./ReactPerf":92,"./setInnerHTML":145,"./setTextContent":146,"fbjs/lib/invariant":165}],32:[function(t,e,n){"use strict";function r(t,e){return(t&e)===e}var i=t("fbjs/lib/invariant"),o={MUST_USE_ATTRIBUTE:1,MUST_USE_PROPERTY:2,HAS_SIDE_EFFECTS:4,HAS_BOOLEAN_VALUE:8,HAS_NUMERIC_VALUE:16,HAS_POSITIVE_NUMERIC_VALUE:48,HAS_OVERLOADED_BOOLEAN_VALUE:64,injectDOMPropertyConfig:function(t){var e=o,n=t.Properties||{},a=t.DOMAttributeNamespaces||{},u=t.DOMAttributeNames||{},c=t.DOMPropertyNames||{},l=t.DOMMutationMethods||{};t.isCustomAttribute&&s._isCustomAttributeFunctions.push(t.isCustomAttribute);for(var f in n){s.properties.hasOwnProperty(f)?i(!1):void 0;var p=f.toLowerCase(),h=n[f],d={attributeName:p,attributeNamespace:null,propertyName:f,mutationMethod:null,mustUseAttribute:r(h,e.MUST_USE_ATTRIBUTE),mustUseProperty:r(h,e.MUST_USE_PROPERTY),hasSideEffects:r(h,e.HAS_SIDE_EFFECTS),hasBooleanValue:r(h,e.HAS_BOOLEAN_VALUE),hasNumericValue:r(h,e.HAS_NUMERIC_VALUE),hasPositiveNumericValue:r(h,e.HAS_POSITIVE_NUMERIC_VALUE),hasOverloadedBooleanValue:r(h,e.HAS_OVERLOADED_BOOLEAN_VALUE)};if(d.mustUseAttribute&&d.mustUseProperty?i(!1):void 0,!d.mustUseProperty&&d.hasSideEffects?i(!1):void 0,d.hasBooleanValue+d.hasNumericValue+d.hasOverloadedBooleanValue<=1?void 0:i(!1),u.hasOwnProperty(f)){var v=u[f];d.attributeName=v}a.hasOwnProperty(f)&&(d.attributeNamespace=a[f]),c.hasOwnProperty(f)&&(d.propertyName=c[f]),l.hasOwnProperty(f)&&(d.mutationMethod=l[f]),s.properties[f]=d}}},a={},s={ID_ATTRIBUTE_NAME:"data-reactid",properties:{},getPossibleStandardName:null,_isCustomAttributeFunctions:[],isCustomAttribute:function(t){for(var e=0;e<s._isCustomAttributeFunctions.length;e++){var n=s._isCustomAttributeFunctions[e];if(n(t))return!0}return!1},getDefaultValueForProperty:function(t,e){var n,r=a[t];return r||(a[t]=r={}),e in r||(n=document.createElement(t),r[e]=n[e]),r[e]},injection:o};e.exports=s},{"fbjs/lib/invariant":165}],33:[function(t,e,n){"use strict";function r(t){return l.hasOwnProperty(t)?!0:c.hasOwnProperty(t)?!1:u.test(t)?(l[t]=!0,!0):(c[t]=!0,!1)}function i(t,e){return null==e||t.hasBooleanValue&&!e||t.hasNumericValue&&isNaN(e)||t.hasPositiveNumericValue&&1>e||t.hasOverloadedBooleanValue&&e===!1}var o=t("./DOMProperty"),a=t("./ReactPerf"),s=t("./quoteAttributeValueForBrowser"),u=(t("fbjs/lib/warning"),/^[a-zA-Z_][\w\.\-]*$/),c={},l={},f={createMarkupForID:function(t){return o.ID_ATTRIBUTE_NAME+"="+s(t)},setAttributeForID:function(t,e){t.setAttribute(o.ID_ATTRIBUTE_NAME,e)},createMarkupForProperty:function(t,e){var n=o.properties.hasOwnProperty(t)?o.properties[t]:null;if(n){if(i(n,e))return"";var r=n.attributeName;return n.hasBooleanValue||n.hasOverloadedBooleanValue&&e===!0?r+'=""':r+"="+s(e)}return o.isCustomAttribute(t)?null==e?"":t+"="+s(e):null},createMarkupForCustomAttribute:function(t,e){return r(t)&&null!=e?t+"="+s(e):""},setValueForProperty:function(t,e,n){var r=o.properties.hasOwnProperty(e)?o.properties[e]:null;if(r){var a=r.mutationMethod;if(a)a(t,n);else if(i(r,n))this.deleteValueForProperty(t,e);else if(r.mustUseAttribute){var s=r.attributeName,u=r.attributeNamespace;u?t.setAttributeNS(u,s,""+n):r.hasBooleanValue||r.hasOverloadedBooleanValue&&n===!0?t.setAttribute(s,""):t.setAttribute(s,""+n)}else{var c=r.propertyName;r.hasSideEffects&&""+t[c]==""+n||(t[c]=n)}}else o.isCustomAttribute(e)&&f.setValueForAttribute(t,e,n)},setValueForAttribute:function(t,e,n){r(e)&&(null==n?t.removeAttribute(e):t.setAttribute(e,""+n))},deleteValueForProperty:function(t,e){var n=o.properties.hasOwnProperty(e)?o.properties[e]:null;if(n){var r=n.mutationMethod;if(r)r(t,void 0);else if(n.mustUseAttribute)t.removeAttribute(n.attributeName);else{var i=n.propertyName,a=o.getDefaultValueForProperty(t.nodeName,i);n.hasSideEffects&&""+t[i]===a||(t[i]=a)}}else o.isCustomAttribute(e)&&t.removeAttribute(e)}};a.measureMethods(f,"DOMPropertyOperations",{setValueForProperty:"setValueForProperty",setValueForAttribute:"setValueForAttribute",deleteValueForProperty:"deleteValueForProperty"}),e.exports=f},{"./DOMProperty":32,"./ReactPerf":92,"./quoteAttributeValueForBrowser":143,"fbjs/lib/warning":174}],34:[function(t,e,n){"use strict";function r(t){return t.substring(1,t.indexOf(" "))}var i=t("fbjs/lib/ExecutionEnvironment"),o=t("fbjs/lib/createNodesFromMarkup"),a=t("fbjs/lib/emptyFunction"),s=t("fbjs/lib/getMarkupWrap"),u=t("fbjs/lib/invariant"),c=/^(<[^ \/>]+)/,l="data-danger-index",f={dangerouslyRenderMarkup:function(t){i.canUseDOM?void 0:u(!1);for(var e,n={},f=0;f<t.length;f++)t[f]?void 0:u(!1),e=r(t[f]),e=s(e)?e:"*",n[e]=n[e]||[],n[e][f]=t[f];var p=[],h=0;for(e in n)if(n.hasOwnProperty(e)){var d,v=n[e];for(d in v)if(v.hasOwnProperty(d)){var g=v[d];v[d]=g.replace(c,"$1 "+l+'="'+d+'" ')}for(var m=o(v.join(""),a),y=0;y<m.length;++y){var b=m[y];b.hasAttribute&&b.hasAttribute(l)&&(d=+b.getAttribute(l),b.removeAttribute(l),p.hasOwnProperty(d)?u(!1):void 0,p[d]=b,h+=1)}}return h!==p.length?u(!1):void 0,p.length!==t.length?u(!1):void 0,p},dangerouslyReplaceNodeWithMarkup:function(t,e){i.canUseDOM?void 0:u(!1),e?void 0:u(!1),"html"===t.tagName.toLowerCase()?u(!1):void 0;var n;n="string"==typeof e?o(e,a)[0]:e,t.parentNode.replaceChild(n,t)}};e.exports=f},{"fbjs/lib/ExecutionEnvironment":151,"fbjs/lib/createNodesFromMarkup":156,"fbjs/lib/emptyFunction":157,"fbjs/lib/getMarkupWrap":161,"fbjs/lib/invariant":165}],35:[function(t,e,n){"use strict";var r=t("fbjs/lib/keyOf"),i=[r({ResponderEventPlugin:null}),r({SimpleEventPlugin:null}),r({TapEventPlugin:null}),r({EnterLeaveEventPlugin:null}),r({ChangeEventPlugin:null}),r({SelectEventPlugin:null}),r({BeforeInputEventPlugin:null})];e.exports=i},{"fbjs/lib/keyOf":169}],36:[function(t,e,n){"use strict";var r=t("./EventConstants"),i=t("./EventPropagators"),o=t("./SyntheticMouseEvent"),a=t("./ReactMount"),s=t("fbjs/lib/keyOf"),u=r.topLevelTypes,c=a.getFirstReactDOM,l={mouseEnter:{registrationName:s({onMouseEnter:null}),dependencies:[u.topMouseOut,u.topMouseOver]},mouseLeave:{registrationName:s({onMouseLeave:null}),dependencies:[u.topMouseOut,u.topMouseOver]}},f=[null,null],p={eventTypes:l,extractEvents:function(t,e,n,r,s){if(t===u.topMouseOver&&(r.relatedTarget||r.fromElement))return null;if(t!==u.topMouseOut&&t!==u.topMouseOver)return null;var p;if(e.window===e)p=e;else{var h=e.ownerDocument;p=h?h.defaultView||h.parentWindow:window}var d,v,g="",m="";if(t===u.topMouseOut?(d=e,g=n,v=c(r.relatedTarget||r.toElement),v?m=a.getID(v):v=p,v=v||p):(d=p,v=e,m=n),d===v)return null;var y=o.getPooled(l.mouseLeave,g,r,s);y.type="mouseleave",y.target=d,y.relatedTarget=v;var b=o.getPooled(l.mouseEnter,m,r,s);return b.type="mouseenter",b.target=v,b.relatedTarget=d,i.accumulateEnterLeaveDispatches(y,b,g,m),f[0]=y,f[1]=b,f}};e.exports=p},{"./EventConstants":37,"./EventPropagators":41,"./ReactMount":86,"./SyntheticMouseEvent":117,"fbjs/lib/keyOf":169}],37:[function(t,e,n){"use strict";var r=t("fbjs/lib/keyMirror"),i=r({bubbled:null,captured:null}),o=r({topAbort:null,topBlur:null,topCanPlay:null,topCanPlayThrough:null,topChange:null,topClick:null,topCompositionEnd:null,topCompositionStart:null,topCompositionUpdate:null,topContextMenu:null,topCopy:null,topCut:null,topDoubleClick:null,topDrag:null,topDragEnd:null,topDragEnter:null,topDragExit:null,topDragLeave:null,topDragOver:null,topDragStart:null,topDrop:null,topDurationChange:null,topEmptied:null,topEncrypted:null,topEnded:null,topError:null,topFocus:null,topInput:null,topKeyDown:null,topKeyPress:null,topKeyUp:null,topLoad:null,topLoadedData:null,topLoadedMetadata:null,topLoadStart:null,topMouseDown:null,topMouseMove:null,topMouseOut:null,topMouseOver:null,topMouseUp:null,topPaste:null,topPause:null,topPlay:null,topPlaying:null,topProgress:null,topRateChange:null,topReset:null,topScroll:null,topSeeked:null,topSeeking:null,topSelectionChange:null,topStalled:null,topSubmit:null,topSuspend:null,topTextInput:null,topTimeUpdate:null,topTouchCancel:null,topTouchEnd:null,topTouchMove:null,topTouchStart:null,topVolumeChange:null,topWaiting:null,topWheel:null}),a={topLevelTypes:o,PropagationPhases:i};e.exports=a},{"fbjs/lib/keyMirror":168}],38:[function(t,e,n){"use strict";var r=t("./EventPluginRegistry"),i=t("./EventPluginUtils"),o=t("./ReactErrorUtils"),a=t("./accumulateInto"),s=t("./forEachAccumulated"),u=t("fbjs/lib/invariant"),c=(t("fbjs/lib/warning"),{}),l=null,f=function(t,e){t&&(i.executeDispatchesInOrder(t,e),t.isPersistent()||t.constructor.release(t))},p=function(t){return f(t,!0)},h=function(t){return f(t,!1)},d=null,v={injection:{injectMount:i.injection.injectMount,injectInstanceHandle:function(t){d=t},getInstanceHandle:function(){return d},injectEventPluginOrder:r.injectEventPluginOrder,injectEventPluginsByName:r.injectEventPluginsByName},eventNameDispatchConfigs:r.eventNameDispatchConfigs,registrationNameModules:r.registrationNameModules,putListener:function(t,e,n){"function"!=typeof n?u(!1):void 0;var i=c[e]||(c[e]={});i[t]=n;var o=r.registrationNameModules[e];o&&o.didPutListener&&o.didPutListener(t,e,n)},getListener:function(t,e){var n=c[e];return n&&n[t]},deleteListener:function(t,e){var n=r.registrationNameModules[e];n&&n.willDeleteListener&&n.willDeleteListener(t,e);var i=c[e];i&&delete i[t]},deleteAllListeners:function(t){for(var e in c)if(c[e][t]){var n=r.registrationNameModules[e];n&&n.willDeleteListener&&n.willDeleteListener(t,e),delete c[e][t]}},extractEvents:function(t,e,n,i,o){for(var s,u=r.plugins,c=0;c<u.length;c++){var l=u[c];if(l){var f=l.extractEvents(t,e,n,i,o);f&&(s=a(s,f))}}return s},enqueueEvents:function(t){t&&(l=a(l,t))},processEventQueue:function(t){var e=l;l=null,t?s(e,p):s(e,h),l?u(!1):void 0,o.rethrowCaughtError()},__purge:function(){c={}},__getListenerBank:function(){return c}};e.exports=v},{"./EventPluginRegistry":39,"./EventPluginUtils":40,"./ReactErrorUtils":77,
"./accumulateInto":123,"./forEachAccumulated":131,"fbjs/lib/invariant":165,"fbjs/lib/warning":174}],39:[function(t,e,n){"use strict";function r(){if(s)for(var t in u){var e=u[t],n=s.indexOf(t);if(n>-1?void 0:a(!1),!c.plugins[n]){e.extractEvents?void 0:a(!1),c.plugins[n]=e;var r=e.eventTypes;for(var o in r)i(r[o],e,o)?void 0:a(!1)}}}function i(t,e,n){c.eventNameDispatchConfigs.hasOwnProperty(n)?a(!1):void 0,c.eventNameDispatchConfigs[n]=t;var r=t.phasedRegistrationNames;if(r){for(var i in r)if(r.hasOwnProperty(i)){var s=r[i];o(s,e,n)}return!0}return t.registrationName?(o(t.registrationName,e,n),!0):!1}function o(t,e,n){c.registrationNameModules[t]?a(!1):void 0,c.registrationNameModules[t]=e,c.registrationNameDependencies[t]=e.eventTypes[n].dependencies}var a=t("fbjs/lib/invariant"),s=null,u={},c={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},injectEventPluginOrder:function(t){s?a(!1):void 0,s=Array.prototype.slice.call(t),r()},injectEventPluginsByName:function(t){var e=!1;for(var n in t)if(t.hasOwnProperty(n)){var i=t[n];u.hasOwnProperty(n)&&u[n]===i||(u[n]?a(!1):void 0,u[n]=i,e=!0)}e&&r()},getPluginModuleForEvent:function(t){var e=t.dispatchConfig;if(e.registrationName)return c.registrationNameModules[e.registrationName]||null;for(var n in e.phasedRegistrationNames)if(e.phasedRegistrationNames.hasOwnProperty(n)){var r=c.registrationNameModules[e.phasedRegistrationNames[n]];if(r)return r}return null},_resetEventPlugins:function(){s=null;for(var t in u)u.hasOwnProperty(t)&&delete u[t];c.plugins.length=0;var e=c.eventNameDispatchConfigs;for(var n in e)e.hasOwnProperty(n)&&delete e[n];var r=c.registrationNameModules;for(var i in r)r.hasOwnProperty(i)&&delete r[i]}};e.exports=c},{"fbjs/lib/invariant":165}],40:[function(t,e,n){"use strict";function r(t){return t===g.topMouseUp||t===g.topTouchEnd||t===g.topTouchCancel}function i(t){return t===g.topMouseMove||t===g.topTouchMove}function o(t){return t===g.topMouseDown||t===g.topTouchStart}function a(t,e,n,r){var i=t.type||"unknown-event";t.currentTarget=v.Mount.getNode(r),e?h.invokeGuardedCallbackWithCatch(i,n,t,r):h.invokeGuardedCallback(i,n,t,r),t.currentTarget=null}function s(t,e){var n=t._dispatchListeners,r=t._dispatchIDs;if(Array.isArray(n))for(var i=0;i<n.length&&!t.isPropagationStopped();i++)a(t,e,n[i],r[i]);else n&&a(t,e,n,r);t._dispatchListeners=null,t._dispatchIDs=null}function u(t){var e=t._dispatchListeners,n=t._dispatchIDs;if(Array.isArray(e)){for(var r=0;r<e.length&&!t.isPropagationStopped();r++)if(e[r](t,n[r]))return n[r]}else if(e&&e(t,n))return n;return null}function c(t){var e=u(t);return t._dispatchIDs=null,t._dispatchListeners=null,e}function l(t){var e=t._dispatchListeners,n=t._dispatchIDs;Array.isArray(e)?d(!1):void 0;var r=e?e(t,n):null;return t._dispatchListeners=null,t._dispatchIDs=null,r}function f(t){return!!t._dispatchListeners}var p=t("./EventConstants"),h=t("./ReactErrorUtils"),d=t("fbjs/lib/invariant"),v=(t("fbjs/lib/warning"),{Mount:null,injectMount:function(t){v.Mount=t}}),g=p.topLevelTypes,m={isEndish:r,isMoveish:i,isStartish:o,executeDirectDispatch:l,executeDispatchesInOrder:s,executeDispatchesInOrderStopAtTrue:c,hasDispatches:f,getNode:function(t){return v.Mount.getNode(t)},getID:function(t){return v.Mount.getID(t)},injection:v};e.exports=m},{"./EventConstants":37,"./ReactErrorUtils":77,"fbjs/lib/invariant":165,"fbjs/lib/warning":174}],41:[function(t,e,n){"use strict";function r(t,e,n){var r=e.dispatchConfig.phasedRegistrationNames[n];return y(t,r)}function i(t,e,n){var i=e?m.bubbled:m.captured,o=r(t,n,i);o&&(n._dispatchListeners=v(n._dispatchListeners,o),n._dispatchIDs=v(n._dispatchIDs,t))}function o(t){t&&t.dispatchConfig.phasedRegistrationNames&&d.injection.getInstanceHandle().traverseTwoPhase(t.dispatchMarker,i,t)}function a(t){t&&t.dispatchConfig.phasedRegistrationNames&&d.injection.getInstanceHandle().traverseTwoPhaseSkipTarget(t.dispatchMarker,i,t)}function s(t,e,n){if(n&&n.dispatchConfig.registrationName){var r=n.dispatchConfig.registrationName,i=y(t,r);i&&(n._dispatchListeners=v(n._dispatchListeners,i),n._dispatchIDs=v(n._dispatchIDs,t))}}function u(t){t&&t.dispatchConfig.registrationName&&s(t.dispatchMarker,null,t)}function c(t){g(t,o)}function l(t){g(t,a)}function f(t,e,n,r){d.injection.getInstanceHandle().traverseEnterLeave(n,r,s,t,e)}function p(t){g(t,u)}var h=t("./EventConstants"),d=t("./EventPluginHub"),v=(t("fbjs/lib/warning"),t("./accumulateInto")),g=t("./forEachAccumulated"),m=h.PropagationPhases,y=d.getListener,b={accumulateTwoPhaseDispatches:c,accumulateTwoPhaseDispatchesSkipTarget:l,accumulateDirectDispatches:p,accumulateEnterLeaveDispatches:f};e.exports=b},{"./EventConstants":37,"./EventPluginHub":38,"./accumulateInto":123,"./forEachAccumulated":131,"fbjs/lib/warning":174}],42:[function(t,e,n){"use strict";function r(t){this._root=t,this._startText=this.getText(),this._fallbackText=null}var i=t("./PooledClass"),o=t("./Object.assign"),a=t("./getTextContentAccessor");o(r.prototype,{destructor:function(){this._root=null,this._startText=null,this._fallbackText=null},getText:function(){return"value"in this._root?this._root.value:this._root[a()]},getData:function(){if(this._fallbackText)return this._fallbackText;var t,e,n=this._startText,r=n.length,i=this.getText(),o=i.length;for(t=0;r>t&&n[t]===i[t];t++);var a=r-t;for(e=1;a>=e&&n[r-e]===i[o-e];e++);var s=e>1?1-e:void 0;return this._fallbackText=i.slice(t,s),this._fallbackText}}),i.addPoolingTo(r),e.exports=r},{"./Object.assign":45,"./PooledClass":46,"./getTextContentAccessor":138}],43:[function(t,e,n){"use strict";var r,i=t("./DOMProperty"),o=t("fbjs/lib/ExecutionEnvironment"),a=i.injection.MUST_USE_ATTRIBUTE,s=i.injection.MUST_USE_PROPERTY,u=i.injection.HAS_BOOLEAN_VALUE,c=i.injection.HAS_SIDE_EFFECTS,l=i.injection.HAS_NUMERIC_VALUE,f=i.injection.HAS_POSITIVE_NUMERIC_VALUE,p=i.injection.HAS_OVERLOADED_BOOLEAN_VALUE;if(o.canUseDOM){var h=document.implementation;r=h&&h.hasFeature&&h.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")}var d={isCustomAttribute:RegExp.prototype.test.bind(/^(data|aria)-[a-z_][a-z\d_.\-]*$/),Properties:{accept:null,acceptCharset:null,accessKey:null,action:null,allowFullScreen:a|u,allowTransparency:a,alt:null,async:u,autoComplete:null,autoPlay:u,capture:a|u,cellPadding:null,cellSpacing:null,charSet:a,challenge:a,checked:s|u,classID:a,className:r?a:s,cols:a|f,colSpan:null,content:null,contentEditable:null,contextMenu:a,controls:s|u,coords:null,crossOrigin:null,data:null,dateTime:a,"default":u,defer:u,dir:null,disabled:a|u,download:p,draggable:null,encType:null,form:a,formAction:a,formEncType:a,formMethod:a,formNoValidate:u,formTarget:a,frameBorder:a,headers:null,height:a,hidden:a|u,high:null,href:null,hrefLang:null,htmlFor:null,httpEquiv:null,icon:null,id:s,inputMode:a,integrity:null,is:a,keyParams:a,keyType:a,kind:null,label:null,lang:null,list:a,loop:s|u,low:null,manifest:a,marginHeight:null,marginWidth:null,max:null,maxLength:a,media:a,mediaGroup:null,method:null,min:null,minLength:a,multiple:s|u,muted:s|u,name:null,noValidate:u,open:u,optimum:null,pattern:null,placeholder:null,poster:null,preload:null,radioGroup:null,readOnly:s|u,rel:null,required:u,role:a,rows:a|f,rowSpan:null,sandbox:null,scope:null,scoped:u,scrolling:null,seamless:a|u,selected:s|u,shape:null,size:a|f,sizes:a,span:f,spellCheck:null,src:null,srcDoc:s,srcLang:null,srcSet:a,start:l,step:null,style:null,summary:null,tabIndex:null,target:null,title:null,type:null,useMap:null,value:s|c,width:a,wmode:a,wrap:null,about:a,datatype:a,inlist:a,prefix:a,property:a,resource:a,"typeof":a,vocab:a,autoCapitalize:null,autoCorrect:null,autoSave:null,color:null,itemProp:a,itemScope:a|u,itemType:a,itemID:a,itemRef:a,results:null,security:a,unselectable:a},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},DOMPropertyNames:{autoCapitalize:"autocapitalize",autoComplete:"autocomplete",autoCorrect:"autocorrect",autoFocus:"autofocus",autoPlay:"autoplay",autoSave:"autosave",encType:"encoding",hrefLang:"hreflang",radioGroup:"radiogroup",spellCheck:"spellcheck",srcDoc:"srcdoc",srcSet:"srcset"}};e.exports=d},{"./DOMProperty":32,"fbjs/lib/ExecutionEnvironment":151}],44:[function(t,e,n){"use strict";function r(t){null!=t.checkedLink&&null!=t.valueLink?c(!1):void 0}function i(t){r(t),null!=t.value||null!=t.onChange?c(!1):void 0}function o(t){r(t),null!=t.checked||null!=t.onChange?c(!1):void 0}function a(t){if(t){var e=t.getName();if(e)return" Check the render method of `"+e+"`."}return""}var s=t("./ReactPropTypes"),u=t("./ReactPropTypeLocations"),c=t("fbjs/lib/invariant"),l=(t("fbjs/lib/warning"),{button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0}),f={value:function(t,e,n){return!t[e]||l[t.type]||t.onChange||t.readOnly||t.disabled?null:new Error("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.")},checked:function(t,e,n){return!t[e]||t.onChange||t.readOnly||t.disabled?null:new Error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")},onChange:s.func},p={},h={checkPropTypes:function(t,e,n){for(var r in f){if(f.hasOwnProperty(r))var i=f[r](e,r,t,u.prop);i instanceof Error&&!(i.message in p)&&(p[i.message]=!0,a(n))}},getValue:function(t){return t.valueLink?(i(t),t.valueLink.value):t.value},getChecked:function(t){return t.checkedLink?(o(t),t.checkedLink.value):t.checked},executeOnChange:function(t,e){return t.valueLink?(i(t),t.valueLink.requestChange(e.target.value)):t.checkedLink?(o(t),t.checkedLink.requestChange(e.target.checked)):t.onChange?t.onChange.call(void 0,e):void 0}};e.exports=h},{"./ReactPropTypeLocations":94,"./ReactPropTypes":95,"fbjs/lib/invariant":165,"fbjs/lib/warning":174}],45:[function(t,e,n){"use strict";function r(t,e){if(null==t)throw new TypeError("Object.assign target cannot be null or undefined");for(var n=Object(t),r=Object.prototype.hasOwnProperty,i=1;i<arguments.length;i++){var o=arguments[i];if(null!=o){var a=Object(o);for(var s in a)r.call(a,s)&&(n[s]=a[s])}}return n}e.exports=r},{}],46:[function(t,e,n){"use strict";var r=t("fbjs/lib/invariant"),i=function(t){var e=this;if(e.instancePool.length){var n=e.instancePool.pop();return e.call(n,t),n}return new e(t)},o=function(t,e){var n=this;if(n.instancePool.length){var r=n.instancePool.pop();return n.call(r,t,e),r}return new n(t,e)},a=function(t,e,n){var r=this;if(r.instancePool.length){var i=r.instancePool.pop();return r.call(i,t,e,n),i}return new r(t,e,n)},s=function(t,e,n,r){var i=this;if(i.instancePool.length){var o=i.instancePool.pop();return i.call(o,t,e,n,r),o}return new i(t,e,n,r)},u=function(t,e,n,r,i){var o=this;if(o.instancePool.length){var a=o.instancePool.pop();return o.call(a,t,e,n,r,i),a}return new o(t,e,n,r,i)},c=function(t){var e=this;t instanceof e?void 0:r(!1),t.destructor(),e.instancePool.length<e.poolSize&&e.instancePool.push(t)},l=10,f=i,p=function(t,e){var n=t;return n.instancePool=[],n.getPooled=e||f,n.poolSize||(n.poolSize=l),n.release=c,n},h={addPoolingTo:p,oneArgumentPooler:i,twoArgumentPooler:o,threeArgumentPooler:a,fourArgumentPooler:s,fiveArgumentPooler:u};e.exports=h},{"fbjs/lib/invariant":165}],47:[function(t,e,n){"use strict";var r=t("./ReactDOM"),i=t("./ReactDOMServer"),o=t("./ReactIsomorphic"),a=t("./Object.assign"),s=t("./deprecated"),u={};a(u,o),a(u,{findDOMNode:s("findDOMNode","ReactDOM","react-dom",r,r.findDOMNode),render:s("render","ReactDOM","react-dom",r,r.render),unmountComponentAtNode:s("unmountComponentAtNode","ReactDOM","react-dom",r,r.unmountComponentAtNode),renderToString:s("renderToString","ReactDOMServer","react-dom/server",i,i.renderToString),renderToStaticMarkup:s("renderToStaticMarkup","ReactDOMServer","react-dom/server",i,i.renderToStaticMarkup)}),u.__SECRET_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=r,e.exports=u},{"./Object.assign":45,"./ReactDOM":58,"./ReactDOMServer":68,"./ReactIsomorphic":84,"./deprecated":127}],48:[function(t,e,n){"use strict";var r=(t("./ReactInstanceMap"),t("./findDOMNode")),i=(t("fbjs/lib/warning"),"_getDOMNodeDidWarn"),o={getDOMNode:function(){return this.constructor[i]=!0,r(this)}};e.exports=o},{"./ReactInstanceMap":83,"./findDOMNode":129,"fbjs/lib/warning":174}],49:[function(t,e,n){"use strict";function r(t){return Object.prototype.hasOwnProperty.call(t,g)||(t[g]=d++,p[t[g]]={}),p[t[g]]}var i=t("./EventConstants"),o=t("./EventPluginHub"),a=t("./EventPluginRegistry"),s=t("./ReactEventEmitterMixin"),u=t("./ReactPerf"),c=t("./ViewportMetrics"),l=t("./Object.assign"),f=t("./isEventSupported"),p={},h=!1,d=0,v={topAbort:"abort",topBlur:"blur",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topChange:"change",topClick:"click",topCompositionEnd:"compositionend",topCompositionStart:"compositionstart",topCompositionUpdate:"compositionupdate",topContextMenu:"contextmenu",topCopy:"copy",topCut:"cut",topDoubleClick:"dblclick",topDrag:"drag",topDragEnd:"dragend",topDragEnter:"dragenter",topDragExit:"dragexit",topDragLeave:"dragleave",topDragOver:"dragover",topDragStart:"dragstart",topDrop:"drop",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topFocus:"focus",topInput:"input",topKeyDown:"keydown",topKeyPress:"keypress",topKeyUp:"keyup",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topMouseDown:"mousedown",topMouseMove:"mousemove",topMouseOut:"mouseout",topMouseOver:"mouseover",topMouseUp:"mouseup",topPaste:"paste",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topScroll:"scroll",topSeeked:"seeked",topSeeking:"seeking",topSelectionChange:"selectionchange",topStalled:"stalled",topSuspend:"suspend",topTextInput:"textInput",topTimeUpdate:"timeupdate",topTouchCancel:"touchcancel",topTouchEnd:"touchend",topTouchMove:"touchmove",topTouchStart:"touchstart",topVolumeChange:"volumechange",topWaiting:"waiting",topWheel:"wheel"},g="_reactListenersID"+String(Math.random()).slice(2),m=l({},s,{ReactEventListener:null,injection:{injectReactEventListener:function(t){t.setHandleTopLevel(m.handleTopLevel),m.ReactEventListener=t}},setEnabled:function(t){m.ReactEventListener&&m.ReactEventListener.setEnabled(t)},isEnabled:function(){return!(!m.ReactEventListener||!m.ReactEventListener.isEnabled())},listenTo:function(t,e){for(var n=e,o=r(n),s=a.registrationNameDependencies[t],u=i.topLevelTypes,c=0;c<s.length;c++){var l=s[c];o.hasOwnProperty(l)&&o[l]||(l===u.topWheel?f("wheel")?m.ReactEventListener.trapBubbledEvent(u.topWheel,"wheel",n):f("mousewheel")?m.ReactEventListener.trapBubbledEvent(u.topWheel,"mousewheel",n):m.ReactEventListener.trapBubbledEvent(u.topWheel,"DOMMouseScroll",n):l===u.topScroll?f("scroll",!0)?m.ReactEventListener.trapCapturedEvent(u.topScroll,"scroll",n):m.ReactEventListener.trapBubbledEvent(u.topScroll,"scroll",m.ReactEventListener.WINDOW_HANDLE):l===u.topFocus||l===u.topBlur?(f("focus",!0)?(m.ReactEventListener.trapCapturedEvent(u.topFocus,"focus",n),m.ReactEventListener.trapCapturedEvent(u.topBlur,"blur",n)):f("focusin")&&(m.ReactEventListener.trapBubbledEvent(u.topFocus,"focusin",n),m.ReactEventListener.trapBubbledEvent(u.topBlur,"focusout",n)),o[u.topBlur]=!0,o[u.topFocus]=!0):v.hasOwnProperty(l)&&m.ReactEventListener.trapBubbledEvent(l,v[l],n),o[l]=!0)}},trapBubbledEvent:function(t,e,n){return m.ReactEventListener.trapBubbledEvent(t,e,n)},trapCapturedEvent:function(t,e,n){return m.ReactEventListener.trapCapturedEvent(t,e,n)},ensureScrollValueMonitoring:function(){if(!h){var t=c.refreshScrollValues;m.ReactEventListener.monitorScrollValue(t),h=!0}},eventNameDispatchConfigs:o.eventNameDispatchConfigs,registrationNameModules:o.registrationNameModules,putListener:o.putListener,getListener:o.getListener,deleteListener:o.deleteListener,deleteAllListeners:o.deleteAllListeners});u.measureMethods(m,"ReactBrowserEventEmitter",{putListener:"putListener",deleteListener:"deleteListener"}),e.exports=m},{"./EventConstants":37,"./EventPluginHub":38,"./EventPluginRegistry":39,"./Object.assign":45,"./ReactEventEmitterMixin":78,"./ReactPerf":92,"./ViewportMetrics":122,"./isEventSupported":140}],50:[function(t,e,n){"use strict";function r(t,e,n){var r=void 0===t[n];null!=e&&r&&(t[n]=o(e,null))}var i=t("./ReactReconciler"),o=t("./instantiateReactComponent"),a=t("./shouldUpdateReactComponent"),s=t("./traverseAllChildren"),u=(t("fbjs/lib/warning"),{instantiateChildren:function(t,e,n){if(null==t)return null;var i={};return s(t,r,i),i},updateChildren:function(t,e,n,r){if(!e&&!t)return null;var s;for(s in e)if(e.hasOwnProperty(s)){var u=t&&t[s],c=u&&u._currentElement,l=e[s];if(null!=u&&a(c,l))i.receiveComponent(u,l,n,r),e[s]=u;else{u&&i.unmountComponent(u,s);var f=o(l,null);e[s]=f}}for(s in t)!t.hasOwnProperty(s)||e&&e.hasOwnProperty(s)||i.unmountComponent(t[s]);return e},unmountChildren:function(t){for(var e in t)if(t.hasOwnProperty(e)){var n=t[e];i.unmountComponent(n)}}});e.exports=u},{"./ReactReconciler":97,"./instantiateReactComponent":139,"./shouldUpdateReactComponent":147,"./traverseAllChildren":148,"fbjs/lib/warning":174}],51:[function(t,e,n){"use strict";function r(t){return(""+t).replace(w,"//")}function i(t,e){this.func=t,this.context=e,this.count=0}function o(t,e,n){var r=t.func,i=t.context;r.call(i,e,t.count++)}function a(t,e,n){if(null==t)return t;var r=i.getPooled(e,n);m(t,o,r),i.release(r)}function s(t,e,n,r){this.result=t,this.keyPrefix=e,this.func=n,this.context=r,this.count=0}function u(t,e,n){var i=t.result,o=t.keyPrefix,a=t.func,s=t.context,u=a.call(s,e,t.count++);Array.isArray(u)?c(u,i,n,g.thatReturnsArgument):null!=u&&(v.isValidElement(u)&&(u=v.cloneAndReplaceKey(u,o+(u!==e?r(u.key||"")+"/":"")+n)),i.push(u))}function c(t,e,n,i,o){var a="";null!=n&&(a=r(n)+"/");var c=s.getPooled(e,a,i,o);m(t,u,c),s.release(c)}function l(t,e,n){if(null==t)return t;var r=[];return c(t,r,null,e,n),r}function f(t,e,n){return null}function p(t,e){return m(t,f,null)}function h(t){var e=[];return c(t,e,null,g.thatReturnsArgument),e}var d=t("./PooledClass"),v=t("./ReactElement"),g=t("fbjs/lib/emptyFunction"),m=t("./traverseAllChildren"),y=d.twoArgumentPooler,b=d.fourArgumentPooler,w=/\/(?!\/)/g;i.prototype.destructor=function(){this.func=null,this.context=null,this.count=0},d.addPoolingTo(i,y),s.prototype.destructor=function(){this.result=null,this.keyPrefix=null,this.func=null,this.context=null,this.count=0},d.addPoolingTo(s,b);var _={forEach:a,map:l,mapIntoWithKeyPrefixInternal:c,count:p,toArray:h};e.exports=_},{"./PooledClass":46,"./ReactElement":73,"./traverseAllChildren":148,"fbjs/lib/emptyFunction":157}],52:[function(t,e,n){"use strict";function r(t,e){var n=E.hasOwnProperty(e)?E[e]:null;R.hasOwnProperty(e)&&(n!==w.OVERRIDE_BASE?g(!1):void 0),t.hasOwnProperty(e)&&(n!==w.DEFINE_MANY&&n!==w.DEFINE_MANY_MERGED?g(!1):void 0)}function i(t,e){if(e){"function"==typeof e?g(!1):void 0,p.isValidElement(e)?g(!1):void 0;var n=t.prototype;e.hasOwnProperty(b)&&C.mixins(t,e.mixins);for(var i in e)if(e.hasOwnProperty(i)&&i!==b){var o=e[i];if(r(n,i),C.hasOwnProperty(i))C[i](t,o);else{var a=E.hasOwnProperty(i),c=n.hasOwnProperty(i),l="function"==typeof o,f=l&&!a&&!c&&e.autobind!==!1;if(f)n.__reactAutoBindMap||(n.__reactAutoBindMap={}),n.__reactAutoBindMap[i]=o,n[i]=o;else if(c){var h=E[i];!a||h!==w.DEFINE_MANY_MERGED&&h!==w.DEFINE_MANY?g(!1):void 0,h===w.DEFINE_MANY_MERGED?n[i]=s(n[i],o):h===w.DEFINE_MANY&&(n[i]=u(n[i],o))}else n[i]=o}}}}function o(t,e){if(e)for(var n in e){var r=e[n];if(e.hasOwnProperty(n)){var i=n in C;i?g(!1):void 0;var o=n in t;o?g(!1):void 0,t[n]=r}}}function a(t,e){t&&e&&"object"==typeof t&&"object"==typeof e?void 0:g(!1);for(var n in e)e.hasOwnProperty(n)&&(void 0!==t[n]?g(!1):void 0,t[n]=e[n]);return t}function s(t,e){return function(){var n=t.apply(this,arguments),r=e.apply(this,arguments);if(null==n)return r;if(null==r)return n;var i={};return a(i,n),a(i,r),i}}function u(t,e){return function(){t.apply(this,arguments),e.apply(this,arguments)}}function c(t,e){var n=e.bind(t);return n}function l(t){for(var e in t.__reactAutoBindMap)if(t.__reactAutoBindMap.hasOwnProperty(e)){var n=t.__reactAutoBindMap[e];t[e]=c(t,n)}}var f=t("./ReactComponent"),p=t("./ReactElement"),h=(t("./ReactPropTypeLocations"),t("./ReactPropTypeLocationNames"),t("./ReactNoopUpdateQueue")),d=t("./Object.assign"),v=t("fbjs/lib/emptyObject"),g=t("fbjs/lib/invariant"),m=t("fbjs/lib/keyMirror"),y=t("fbjs/lib/keyOf"),b=(t("fbjs/lib/warning"),y({mixins:null})),w=m({DEFINE_ONCE:null,DEFINE_MANY:null,OVERRIDE_BASE:null,DEFINE_MANY_MERGED:null}),_=[],E={mixins:w.DEFINE_MANY,statics:w.DEFINE_MANY,propTypes:w.DEFINE_MANY,contextTypes:w.DEFINE_MANY,childContextTypes:w.DEFINE_MANY,getDefaultProps:w.DEFINE_MANY_MERGED,getInitialState:w.DEFINE_MANY_MERGED,getChildContext:w.DEFINE_MANY_MERGED,render:w.DEFINE_ONCE,componentWillMount:w.DEFINE_MANY,componentDidMount:w.DEFINE_MANY,componentWillReceiveProps:w.DEFINE_MANY,shouldComponentUpdate:w.DEFINE_ONCE,componentWillUpdate:w.DEFINE_MANY,componentDidUpdate:w.DEFINE_MANY,componentWillUnmount:w.DEFINE_MANY,updateComponent:w.OVERRIDE_BASE},C={displayName:function(t,e){t.displayName=e},mixins:function(t,e){if(e)for(var n=0;n<e.length;n++)i(t,e[n])},childContextTypes:function(t,e){t.childContextTypes=d({},t.childContextTypes,e)},contextTypes:function(t,e){t.contextTypes=d({},t.contextTypes,e)},getDefaultProps:function(t,e){t.getDefaultProps?t.getDefaultProps=s(t.getDefaultProps,e):t.getDefaultProps=e},propTypes:function(t,e){t.propTypes=d({},t.propTypes,e)},statics:function(t,e){o(t,e)},autobind:function(){}},R={replaceState:function(t,e){this.updater.enqueueReplaceState(this,t),e&&this.updater.enqueueCallback(this,e)},isMounted:function(){return this.updater.isMounted(this)},setProps:function(t,e){this.updater.enqueueSetProps(this,t),e&&this.updater.enqueueCallback(this,e)},replaceProps:function(t,e){this.updater.enqueueReplaceProps(this,t),e&&this.updater.enqueueCallback(this,e)}},k=function(){};d(k.prototype,f.prototype,R);var O={createClass:function(t){var e=function(t,e,n){this.__reactAutoBindMap&&l(this),this.props=t,this.context=e,this.refs=v,this.updater=n||h,this.state=null;var r=this.getInitialState?this.getInitialState():null;"object"!=typeof r||Array.isArray(r)?g(!1):void 0,this.state=r};e.prototype=new k,e.prototype.constructor=e,_.forEach(i.bind(null,e)),i(e,t),e.getDefaultProps&&(e.defaultProps=e.getDefaultProps()),e.prototype.render?void 0:g(!1);for(var n in E)e.prototype[n]||(e.prototype[n]=null);return e},injection:{injectMixin:function(t){_.push(t)}}};e.exports=O},{"./Object.assign":45,"./ReactComponent":53,"./ReactElement":73,"./ReactNoopUpdateQueue":90,"./ReactPropTypeLocationNames":93,"./ReactPropTypeLocations":94,"fbjs/lib/emptyObject":158,"fbjs/lib/invariant":165,"fbjs/lib/keyMirror":168,"fbjs/lib/keyOf":169,"fbjs/lib/warning":174}],53:[function(t,e,n){"use strict";function r(t,e,n){this.props=t,this.context=e,this.refs=o,this.updater=n||i}var i=t("./ReactNoopUpdateQueue"),o=(t("./canDefineProperty"),t("fbjs/lib/emptyObject")),a=t("fbjs/lib/invariant");t("fbjs/lib/warning");r.prototype.isReactComponent={},r.prototype.setState=function(t,e){"object"!=typeof t&&"function"!=typeof t&&null!=t?a(!1):void 0,this.updater.enqueueSetState(this,t),e&&this.updater.enqueueCallback(this,e)},r.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this),t&&this.updater.enqueueCallback(this,t)};e.exports=r},{"./ReactNoopUpdateQueue":90,"./canDefineProperty":125,"fbjs/lib/emptyObject":158,"fbjs/lib/invariant":165,"fbjs/lib/warning":174}],54:[function(t,e,n){"use strict";var r=t("./ReactDOMIDOperations"),i=t("./ReactMount"),o={processChildrenUpdates:r.dangerouslyProcessChildrenUpdates,replaceNodeWithMarkupByID:r.dangerouslyReplaceNodeWithMarkupByID,unmountIDFromEnvironment:function(t){i.purgeID(t)}};e.exports=o},{"./ReactDOMIDOperations":63,"./ReactMount":86}],55:[function(t,e,n){"use strict";var r=t("fbjs/lib/invariant"),i=!1,o={unmountIDFromEnvironment:null,replaceNodeWithMarkupByID:null,processChildrenUpdates:null,injection:{injectEnvironment:function(t){i?r(!1):void 0,o.unmountIDFromEnvironment=t.unmountIDFromEnvironment,o.replaceNodeWithMarkupByID=t.replaceNodeWithMarkupByID,o.processChildrenUpdates=t.processChildrenUpdates,i=!0}}};e.exports=o},{"fbjs/lib/invariant":165}],56:[function(t,e,n){"use strict";function r(t){var e=t._currentElement._owner||null;if(e){var n=e.getName();if(n)return" Check the render method of `"+n+"`."}return""}function i(t){}var o=t("./ReactComponentEnvironment"),a=t("./ReactCurrentOwner"),s=t("./ReactElement"),u=t("./ReactInstanceMap"),c=t("./ReactPerf"),l=t("./ReactPropTypeLocations"),f=(t("./ReactPropTypeLocationNames"),t("./ReactReconciler")),p=t("./ReactUpdateQueue"),h=t("./Object.assign"),d=t("fbjs/lib/emptyObject"),v=t("fbjs/lib/invariant"),g=t("./shouldUpdateReactComponent");t("fbjs/lib/warning");i.prototype.render=function(){var t=u.get(this)._currentElement.type;return t(this.props,this.context,this.updater)};var m=1,y={construct:function(t){this._currentElement=t,this._rootNodeID=null,this._instance=null,this._pendingElement=null,this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1,this._renderedComponent=null,this._context=null,this._mountOrder=0,this._topLevelWrapper=null,this._pendingCallbacks=null},mountComponent:function(t,e,n){this._context=n,this._mountOrder=m++,this._rootNodeID=t;var r,o,a=this._processProps(this._currentElement.props),c=this._processContext(n),l=this._currentElement.type,h="prototype"in l;h&&(r=new l(a,c,p)),(!h||null===r||r===!1||s.isValidElement(r))&&(o=r,r=new i(l)),r.props=a,r.context=c,r.refs=d,r.updater=p,this._instance=r,u.set(r,this);var g=r.state;void 0===g&&(r.state=g=null),"object"!=typeof g||Array.isArray(g)?v(!1):void 0,this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1,r.componentWillMount&&(r.componentWillMount(),this._pendingStateQueue&&(r.state=this._processPendingState(r.props,r.context))),void 0===o&&(o=this._renderValidatedComponent()),this._renderedComponent=this._instantiateReactComponent(o);var y=f.mountComponent(this._renderedComponent,t,e,this._processChildContext(n));return r.componentDidMount&&e.getReactMountReady().enqueue(r.componentDidMount,r),y},unmountComponent:function(){var t=this._instance;t.componentWillUnmount&&t.componentWillUnmount(),f.unmountComponent(this._renderedComponent),this._renderedComponent=null,this._instance=null,this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1,this._pendingCallbacks=null,this._pendingElement=null,this._context=null,this._rootNodeID=null,this._topLevelWrapper=null,u.remove(t)},_maskContext:function(t){var e=null,n=this._currentElement.type,r=n.contextTypes;if(!r)return d;e={};for(var i in r)e[i]=t[i];return e},_processContext:function(t){var e=this._maskContext(t);return e},_processChildContext:function(t){var e=this._currentElement.type,n=this._instance,r=n.getChildContext&&n.getChildContext();if(r){"object"!=typeof e.childContextTypes?v(!1):void 0;for(var i in r)i in e.childContextTypes?void 0:v(!1);return h({},t,r)}return t},_processProps:function(t){return t},_checkPropTypes:function(t,e,n){var i=this.getName();for(var o in t)if(t.hasOwnProperty(o)){var a;try{"function"!=typeof t[o]?v(!1):void 0,a=t[o](e,o,i,n)}catch(s){a=s}a instanceof Error&&(r(this),n===l.prop)}},receiveComponent:function(t,e,n){var r=this._currentElement,i=this._context;this._pendingElement=null,this.updateComponent(e,r,t,i,n)},performUpdateIfNecessary:function(t){null!=this._pendingElement&&f.receiveComponent(this,this._pendingElement||this._currentElement,t,this._context),(null!==this._pendingStateQueue||this._pendingForceUpdate)&&this.updateComponent(t,this._currentElement,this._currentElement,this._context,this._context)},updateComponent:function(t,e,n,r,i){var o,a=this._instance,s=this._context===i?a.context:this._processContext(i);e===n?o=n.props:(o=this._processProps(n.props),a.componentWillReceiveProps&&a.componentWillReceiveProps(o,s));var u=this._processPendingState(o,s),c=this._pendingForceUpdate||!a.shouldComponentUpdate||a.shouldComponentUpdate(o,u,s);c?(this._pendingForceUpdate=!1,this._performComponentUpdate(n,o,u,s,t,i)):(this._currentElement=n,this._context=i,a.props=o,a.state=u,a.context=s)},_processPendingState:function(t,e){var n=this._instance,r=this._pendingStateQueue,i=this._pendingReplaceState;if(this._pendingReplaceState=!1,this._pendingStateQueue=null,!r)return n.state;if(i&&1===r.length)return r[0];for(var o=h({},i?r[0]:n.state),a=i?1:0;a<r.length;a++){var s=r[a];h(o,"function"==typeof s?s.call(n,o,t,e):s)}return o},_performComponentUpdate:function(t,e,n,r,i,o){var a,s,u,c=this._instance,l=Boolean(c.componentDidUpdate);l&&(a=c.props,s=c.state,u=c.context),c.componentWillUpdate&&c.componentWillUpdate(e,n,r),this._currentElement=t,this._context=o,c.props=e,c.state=n,c.context=r,this._updateRenderedComponent(i,o),l&&i.getReactMountReady().enqueue(c.componentDidUpdate.bind(c,a,s,u),c)},_updateRenderedComponent:function(t,e){var n=this._renderedComponent,r=n._currentElement,i=this._renderValidatedComponent();if(g(r,i))f.receiveComponent(n,i,t,this._processChildContext(e));else{var o=this._rootNodeID,a=n._rootNodeID;f.unmountComponent(n),this._renderedComponent=this._instantiateReactComponent(i);var s=f.mountComponent(this._renderedComponent,o,t,this._processChildContext(e));this._replaceNodeWithMarkupByID(a,s)}},_replaceNodeWithMarkupByID:function(t,e){o.replaceNodeWithMarkupByID(t,e)},_renderValidatedComponentWithoutOwnerOrContext:function(){var t=this._instance,e=t.render();return e},_renderValidatedComponent:function(){var t;a.current=this;try{t=this._renderValidatedComponentWithoutOwnerOrContext()}finally{a.current=null}return null===t||t===!1||s.isValidElement(t)?void 0:v(!1),t},attachRef:function(t,e){var n=this.getPublicInstance();null==n?v(!1):void 0;var r=e.getPublicInstance(),i=n.refs===d?n.refs={}:n.refs;i[t]=r},detachRef:function(t){var e=this.getPublicInstance().refs;delete e[t]},getName:function(){var t=this._currentElement.type,e=this._instance&&this._instance.constructor;return t.displayName||e&&e.displayName||t.name||e&&e.name||null},getPublicInstance:function(){var t=this._instance;return t instanceof i?null:t},_instantiateReactComponent:null};c.measureMethods(y,"ReactCompositeComponent",{mountComponent:"mountComponent",updateComponent:"updateComponent",_renderValidatedComponent:"_renderValidatedComponent"});var b={Mixin:y};e.exports=b},{"./Object.assign":45,"./ReactComponentEnvironment":55,"./ReactCurrentOwner":57,"./ReactElement":73,"./ReactInstanceMap":83,"./ReactPerf":92,"./ReactPropTypeLocationNames":93,"./ReactPropTypeLocations":94,"./ReactReconciler":97,"./ReactUpdateQueue":103,"./shouldUpdateReactComponent":147,"fbjs/lib/emptyObject":158,"fbjs/lib/invariant":165,"fbjs/lib/warning":174}],57:[function(t,e,n){"use strict";var r={current:null};e.exports=r},{}],58:[function(t,e,n){"use strict";var r=t("./ReactCurrentOwner"),i=t("./ReactDOMTextComponent"),o=t("./ReactDefaultInjection"),a=t("./ReactInstanceHandles"),s=t("./ReactMount"),u=t("./ReactPerf"),c=t("./ReactReconciler"),l=t("./ReactUpdates"),f=t("./ReactVersion"),p=t("./findDOMNode"),h=t("./renderSubtreeIntoContainer");t("fbjs/lib/warning");o.inject();var d=u.measure("React","render",s.render),v={findDOMNode:p,render:d,unmountComponentAtNode:s.unmountComponentAtNode,version:f,unstable_batchedUpdates:l.batchedUpdates,unstable_renderSubtreeIntoContainer:h};"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject&&__REACT_DEVTOOLS_GLOBAL_HOOK__.inject({
CurrentOwner:r,InstanceHandles:a,Mount:s,Reconciler:c,TextComponent:i});e.exports=v},{"./ReactCurrentOwner":57,"./ReactDOMTextComponent":69,"./ReactDefaultInjection":72,"./ReactInstanceHandles":82,"./ReactMount":86,"./ReactPerf":92,"./ReactReconciler":97,"./ReactUpdates":104,"./ReactVersion":105,"./findDOMNode":129,"./renderSubtreeIntoContainer":144,"fbjs/lib/warning":174}],59:[function(t,e,n){"use strict";var r={onClick:!0,onDoubleClick:!0,onMouseDown:!0,onMouseMove:!0,onMouseUp:!0,onClickCapture:!0,onDoubleClickCapture:!0,onMouseDownCapture:!0,onMouseMoveCapture:!0,onMouseUpCapture:!0},i={getNativeProps:function(t,e,n){if(!e.disabled)return e;var i={};for(var o in e)e.hasOwnProperty(o)&&!r[o]&&(i[o]=e[o]);return i}};e.exports=i},{}],60:[function(t,e,n){"use strict";function r(){return this}function i(){var t=this._reactInternalComponent;return!!t}function o(){}function a(t,e){var n=this._reactInternalComponent;n&&(P.enqueueSetPropsInternal(n,t),e&&P.enqueueCallbackInternal(n,e))}function s(t,e){var n=this._reactInternalComponent;n&&(P.enqueueReplacePropsInternal(n,t),e&&P.enqueueCallbackInternal(n,e))}function u(t,e){e&&(null!=e.dangerouslySetInnerHTML&&(null!=e.children?j(!1):void 0,"object"==typeof e.dangerouslySetInnerHTML&&W in e.dangerouslySetInnerHTML?void 0:j(!1)),null!=e.style&&"object"!=typeof e.style?j(!1):void 0)}function c(t,e,n,r){var i=x.findReactContainerForID(t);if(i){var o=i.nodeType===K?i.ownerDocument:i;V(e,o)}r.getReactMountReady().enqueue(l,{id:t,registrationName:e,listener:n})}function l(){var t=this;E.putListener(t.id,t.registrationName,t.listener)}function f(){var t=this;t._rootNodeID?void 0:j(!1);var e=x.getNode(t._rootNodeID);switch(e?void 0:j(!1),t._tag){case"iframe":t._wrapperState.listeners=[E.trapBubbledEvent(_.topLevelTypes.topLoad,"load",e)];break;case"video":case"audio":t._wrapperState.listeners=[];for(var n in Y)Y.hasOwnProperty(n)&&t._wrapperState.listeners.push(E.trapBubbledEvent(_.topLevelTypes[n],Y[n],e));break;case"img":t._wrapperState.listeners=[E.trapBubbledEvent(_.topLevelTypes.topError,"error",e),E.trapBubbledEvent(_.topLevelTypes.topLoad,"load",e)];break;case"form":t._wrapperState.listeners=[E.trapBubbledEvent(_.topLevelTypes.topReset,"reset",e),E.trapBubbledEvent(_.topLevelTypes.topSubmit,"submit",e)]}}function p(){k.mountReadyWrapper(this)}function h(){S.postUpdateWrapper(this)}function d(t){J.call(Q,t)||($.test(t)?void 0:j(!1),Q[t]=!0)}function v(t,e){return t.indexOf("-")>=0||null!=e.is}function g(t){d(t),this._tag=t.toLowerCase(),this._renderedChildren=null,this._previousStyle=null,this._previousStyleCopy=null,this._rootNodeID=null,this._wrapperState=null,this._topLevelWrapper=null,this._nodeWithLegacyProperties=null}var m=t("./AutoFocusUtils"),y=t("./CSSPropertyOperations"),b=t("./DOMProperty"),w=t("./DOMPropertyOperations"),_=t("./EventConstants"),E=t("./ReactBrowserEventEmitter"),C=t("./ReactComponentBrowserEnvironment"),R=t("./ReactDOMButton"),k=t("./ReactDOMInput"),O=t("./ReactDOMOption"),S=t("./ReactDOMSelect"),T=t("./ReactDOMTextarea"),x=t("./ReactMount"),I=t("./ReactMultiChild"),M=t("./ReactPerf"),P=t("./ReactUpdateQueue"),A=t("./Object.assign"),N=t("./canDefineProperty"),D=t("./escapeTextContentForBrowser"),j=t("fbjs/lib/invariant"),L=(t("./isEventSupported"),t("fbjs/lib/keyOf")),B=t("./setInnerHTML"),U=t("./setTextContent"),F=(t("fbjs/lib/shallowEqual"),t("./validateDOMNesting"),t("fbjs/lib/warning"),E.deleteListener),V=E.listenTo,H=E.registrationNameModules,z={string:!0,number:!0},q=L({children:null}),G=L({style:null}),W=L({__html:null}),K=1,Y={topAbort:"abort",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topSeeked:"seeked",topSeeking:"seeking",topStalled:"stalled",topSuspend:"suspend",topTimeUpdate:"timeupdate",topVolumeChange:"volumechange",topWaiting:"waiting"},X={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},Z={listing:!0,pre:!0,textarea:!0},$=(A({menuitem:!0},X),/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/),Q={},J={}.hasOwnProperty;g.displayName="ReactDOMComponent",g.Mixin={construct:function(t){this._currentElement=t},mountComponent:function(t,e,n){this._rootNodeID=t;var r=this._currentElement.props;switch(this._tag){case"iframe":case"img":case"form":case"video":case"audio":this._wrapperState={listeners:null},e.getReactMountReady().enqueue(f,this);break;case"button":r=R.getNativeProps(this,r,n);break;case"input":k.mountWrapper(this,r,n),r=k.getNativeProps(this,r,n);break;case"option":O.mountWrapper(this,r,n),r=O.getNativeProps(this,r,n);break;case"select":S.mountWrapper(this,r,n),r=S.getNativeProps(this,r,n),n=S.processChildContext(this,r,n);break;case"textarea":T.mountWrapper(this,r,n),r=T.getNativeProps(this,r,n)}u(this,r);var i;if(e.useCreateElement){var o=n[x.ownerDocumentContextKey],a=o.createElement(this._currentElement.type);w.setAttributeForID(a,this._rootNodeID),x.getID(a),this._updateDOMProperties({},r,e,a),this._createInitialChildren(e,r,n,a),i=a}else{var s=this._createOpenTagMarkupAndPutListeners(e,r),c=this._createContentMarkup(e,r,n);i=!c&&X[this._tag]?s+"/>":s+">"+c+"</"+this._currentElement.type+">"}switch(this._tag){case"input":e.getReactMountReady().enqueue(p,this);case"button":case"select":case"textarea":r.autoFocus&&e.getReactMountReady().enqueue(m.focusDOMComponent,this)}return i},_createOpenTagMarkupAndPutListeners:function(t,e){var n="<"+this._currentElement.type;for(var r in e)if(e.hasOwnProperty(r)){var i=e[r];if(null!=i)if(H.hasOwnProperty(r))i&&c(this._rootNodeID,r,i,t);else{r===G&&(i&&(i=this._previousStyleCopy=A({},e.style)),i=y.createMarkupForStyles(i));var o=null;null!=this._tag&&v(this._tag,e)?r!==q&&(o=w.createMarkupForCustomAttribute(r,i)):o=w.createMarkupForProperty(r,i),o&&(n+=" "+o)}}if(t.renderToStaticMarkup)return n;var a=w.createMarkupForID(this._rootNodeID);return n+" "+a},_createContentMarkup:function(t,e,n){var r="",i=e.dangerouslySetInnerHTML;if(null!=i)null!=i.__html&&(r=i.__html);else{var o=z[typeof e.children]?e.children:null,a=null!=o?null:e.children;if(null!=o)r=D(o);else if(null!=a){var s=this.mountChildren(a,t,n);r=s.join("")}}return Z[this._tag]&&"\n"===r.charAt(0)?"\n"+r:r},_createInitialChildren:function(t,e,n,r){var i=e.dangerouslySetInnerHTML;if(null!=i)null!=i.__html&&B(r,i.__html);else{var o=z[typeof e.children]?e.children:null,a=null!=o?null:e.children;if(null!=o)U(r,o);else if(null!=a)for(var s=this.mountChildren(a,t,n),u=0;u<s.length;u++)r.appendChild(s[u])}},receiveComponent:function(t,e,n){var r=this._currentElement;this._currentElement=t,this.updateComponent(e,r,t,n)},updateComponent:function(t,e,n,r){var i=e.props,o=this._currentElement.props;switch(this._tag){case"button":i=R.getNativeProps(this,i),o=R.getNativeProps(this,o);break;case"input":k.updateWrapper(this),i=k.getNativeProps(this,i),o=k.getNativeProps(this,o);break;case"option":i=O.getNativeProps(this,i),o=O.getNativeProps(this,o);break;case"select":i=S.getNativeProps(this,i),o=S.getNativeProps(this,o);break;case"textarea":T.updateWrapper(this),i=T.getNativeProps(this,i),o=T.getNativeProps(this,o)}u(this,o),this._updateDOMProperties(i,o,t,null),this._updateDOMChildren(i,o,t,r),!N&&this._nodeWithLegacyProperties&&(this._nodeWithLegacyProperties.props=o),"select"===this._tag&&t.getReactMountReady().enqueue(h,this)},_updateDOMProperties:function(t,e,n,r){var i,o,a;for(i in t)if(!e.hasOwnProperty(i)&&t.hasOwnProperty(i))if(i===G){var s=this._previousStyleCopy;for(o in s)s.hasOwnProperty(o)&&(a=a||{},a[o]="");this._previousStyleCopy=null}else H.hasOwnProperty(i)?t[i]&&F(this._rootNodeID,i):(b.properties[i]||b.isCustomAttribute(i))&&(r||(r=x.getNode(this._rootNodeID)),w.deleteValueForProperty(r,i));for(i in e){var u=e[i],l=i===G?this._previousStyleCopy:t[i];if(e.hasOwnProperty(i)&&u!==l)if(i===G)if(u?u=this._previousStyleCopy=A({},u):this._previousStyleCopy=null,l){for(o in l)!l.hasOwnProperty(o)||u&&u.hasOwnProperty(o)||(a=a||{},a[o]="");for(o in u)u.hasOwnProperty(o)&&l[o]!==u[o]&&(a=a||{},a[o]=u[o])}else a=u;else H.hasOwnProperty(i)?u?c(this._rootNodeID,i,u,n):l&&F(this._rootNodeID,i):v(this._tag,e)?(r||(r=x.getNode(this._rootNodeID)),i===q&&(u=null),w.setValueForAttribute(r,i,u)):(b.properties[i]||b.isCustomAttribute(i))&&(r||(r=x.getNode(this._rootNodeID)),null!=u?w.setValueForProperty(r,i,u):w.deleteValueForProperty(r,i))}a&&(r||(r=x.getNode(this._rootNodeID)),y.setValueForStyles(r,a))},_updateDOMChildren:function(t,e,n,r){var i=z[typeof t.children]?t.children:null,o=z[typeof e.children]?e.children:null,a=t.dangerouslySetInnerHTML&&t.dangerouslySetInnerHTML.__html,s=e.dangerouslySetInnerHTML&&e.dangerouslySetInnerHTML.__html,u=null!=i?null:t.children,c=null!=o?null:e.children,l=null!=i||null!=a,f=null!=o||null!=s;null!=u&&null==c?this.updateChildren(null,n,r):l&&!f&&this.updateTextContent(""),null!=o?i!==o&&this.updateTextContent(""+o):null!=s?a!==s&&this.updateMarkup(""+s):null!=c&&this.updateChildren(c,n,r)},unmountComponent:function(){switch(this._tag){case"iframe":case"img":case"form":case"video":case"audio":var t=this._wrapperState.listeners;if(t)for(var e=0;e<t.length;e++)t[e].remove();break;case"input":k.unmountWrapper(this);break;case"html":case"head":case"body":j(!1)}if(this.unmountChildren(),E.deleteAllListeners(this._rootNodeID),C.unmountIDFromEnvironment(this._rootNodeID),this._rootNodeID=null,this._wrapperState=null,this._nodeWithLegacyProperties){var n=this._nodeWithLegacyProperties;n._reactInternalComponent=null,this._nodeWithLegacyProperties=null}},getPublicInstance:function(){if(!this._nodeWithLegacyProperties){var t=x.getNode(this._rootNodeID);t._reactInternalComponent=this,t.getDOMNode=r,t.isMounted=i,t.setState=o,t.replaceState=o,t.forceUpdate=o,t.setProps=a,t.replaceProps=s,t.props=this._currentElement.props,this._nodeWithLegacyProperties=t}return this._nodeWithLegacyProperties}},M.measureMethods(g,"ReactDOMComponent",{mountComponent:"mountComponent",updateComponent:"updateComponent"}),A(g.prototype,g.Mixin,I.Mixin),e.exports=g},{"./AutoFocusUtils":24,"./CSSPropertyOperations":27,"./DOMProperty":32,"./DOMPropertyOperations":33,"./EventConstants":37,"./Object.assign":45,"./ReactBrowserEventEmitter":49,"./ReactComponentBrowserEnvironment":54,"./ReactDOMButton":59,"./ReactDOMInput":64,"./ReactDOMOption":65,"./ReactDOMSelect":66,"./ReactDOMTextarea":70,"./ReactMount":86,"./ReactMultiChild":87,"./ReactPerf":92,"./ReactUpdateQueue":103,"./canDefineProperty":125,"./escapeTextContentForBrowser":128,"./isEventSupported":140,"./setInnerHTML":145,"./setTextContent":146,"./validateDOMNesting":149,"fbjs/lib/invariant":165,"fbjs/lib/keyOf":169,"fbjs/lib/shallowEqual":172,"fbjs/lib/warning":174}],61:[function(t,e,n){"use strict";function r(t){return i.createFactory(t)}var i=t("./ReactElement"),o=(t("./ReactElementValidator"),t("fbjs/lib/mapObject")),a=o({a:"a",abbr:"abbr",address:"address",area:"area",article:"article",aside:"aside",audio:"audio",b:"b",base:"base",bdi:"bdi",bdo:"bdo",big:"big",blockquote:"blockquote",body:"body",br:"br",button:"button",canvas:"canvas",caption:"caption",cite:"cite",code:"code",col:"col",colgroup:"colgroup",data:"data",datalist:"datalist",dd:"dd",del:"del",details:"details",dfn:"dfn",dialog:"dialog",div:"div",dl:"dl",dt:"dt",em:"em",embed:"embed",fieldset:"fieldset",figcaption:"figcaption",figure:"figure",footer:"footer",form:"form",h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",head:"head",header:"header",hgroup:"hgroup",hr:"hr",html:"html",i:"i",iframe:"iframe",img:"img",input:"input",ins:"ins",kbd:"kbd",keygen:"keygen",label:"label",legend:"legend",li:"li",link:"link",main:"main",map:"map",mark:"mark",menu:"menu",menuitem:"menuitem",meta:"meta",meter:"meter",nav:"nav",noscript:"noscript",object:"object",ol:"ol",optgroup:"optgroup",option:"option",output:"output",p:"p",param:"param",picture:"picture",pre:"pre",progress:"progress",q:"q",rp:"rp",rt:"rt",ruby:"ruby",s:"s",samp:"samp",script:"script",section:"section",select:"select",small:"small",source:"source",span:"span",strong:"strong",style:"style",sub:"sub",summary:"summary",sup:"sup",table:"table",tbody:"tbody",td:"td",textarea:"textarea",tfoot:"tfoot",th:"th",thead:"thead",time:"time",title:"title",tr:"tr",track:"track",u:"u",ul:"ul","var":"var",video:"video",wbr:"wbr",circle:"circle",clipPath:"clipPath",defs:"defs",ellipse:"ellipse",g:"g",image:"image",line:"line",linearGradient:"linearGradient",mask:"mask",path:"path",pattern:"pattern",polygon:"polygon",polyline:"polyline",radialGradient:"radialGradient",rect:"rect",stop:"stop",svg:"svg",text:"text",tspan:"tspan"},r);e.exports=a},{"./ReactElement":73,"./ReactElementValidator":74,"fbjs/lib/mapObject":170}],62:[function(t,e,n){"use strict";var r={useCreateElement:!1};e.exports=r},{}],63:[function(t,e,n){"use strict";var r=t("./DOMChildrenOperations"),i=t("./DOMPropertyOperations"),o=t("./ReactMount"),a=t("./ReactPerf"),s=t("fbjs/lib/invariant"),u={dangerouslySetInnerHTML:"`dangerouslySetInnerHTML` must be set using `updateInnerHTMLByID()`.",style:"`style` must be set using `updateStylesByID()`."},c={updatePropertyByID:function(t,e,n){var r=o.getNode(t);u.hasOwnProperty(e)?s(!1):void 0,null!=n?i.setValueForProperty(r,e,n):i.deleteValueForProperty(r,e)},dangerouslyReplaceNodeWithMarkupByID:function(t,e){var n=o.getNode(t);r.dangerouslyReplaceNodeWithMarkup(n,e)},dangerouslyProcessChildrenUpdates:function(t,e){for(var n=0;n<t.length;n++)t[n].parentNode=o.getNode(t[n].parentID);r.processUpdates(t,e)}};a.measureMethods(c,"ReactDOMIDOperations",{dangerouslyReplaceNodeWithMarkupByID:"dangerouslyReplaceNodeWithMarkupByID",dangerouslyProcessChildrenUpdates:"dangerouslyProcessChildrenUpdates"}),e.exports=c},{"./DOMChildrenOperations":31,"./DOMPropertyOperations":33,"./ReactMount":86,"./ReactPerf":92,"fbjs/lib/invariant":165}],64:[function(t,e,n){"use strict";function r(){this._rootNodeID&&p.updateWrapper(this)}function i(t){var e=this._currentElement.props,n=a.executeOnChange(e,t);u.asap(r,this);var i=e.name;if("radio"===e.type&&null!=i){for(var o=s.getNode(this._rootNodeID),c=o;c.parentNode;)c=c.parentNode;for(var p=c.querySelectorAll("input[name="+JSON.stringify(""+i)+'][type="radio"]'),h=0;h<p.length;h++){var d=p[h];if(d!==o&&d.form===o.form){var v=s.getID(d);v?void 0:l(!1);var g=f[v];g?void 0:l(!1),u.asap(r,g)}}}return n}var o=t("./ReactDOMIDOperations"),a=t("./LinkedValueUtils"),s=t("./ReactMount"),u=t("./ReactUpdates"),c=t("./Object.assign"),l=t("fbjs/lib/invariant"),f={},p={getNativeProps:function(t,e,n){var r=a.getValue(e),i=a.getChecked(e),o=c({},e,{defaultChecked:void 0,defaultValue:void 0,value:null!=r?r:t._wrapperState.initialValue,checked:null!=i?i:t._wrapperState.initialChecked,onChange:t._wrapperState.onChange});return o},mountWrapper:function(t,e){var n=e.defaultValue;t._wrapperState={initialChecked:e.defaultChecked||!1,initialValue:null!=n?n:null,onChange:i.bind(t)}},mountReadyWrapper:function(t){f[t._rootNodeID]=t},unmountWrapper:function(t){delete f[t._rootNodeID]},updateWrapper:function(t){var e=t._currentElement.props,n=e.checked;null!=n&&o.updatePropertyByID(t._rootNodeID,"checked",n||!1);var r=a.getValue(e);null!=r&&o.updatePropertyByID(t._rootNodeID,"value",""+r)}};e.exports=p},{"./LinkedValueUtils":44,"./Object.assign":45,"./ReactDOMIDOperations":63,"./ReactMount":86,"./ReactUpdates":104,"fbjs/lib/invariant":165}],65:[function(t,e,n){"use strict";var r=t("./ReactChildren"),i=t("./ReactDOMSelect"),o=t("./Object.assign"),a=(t("fbjs/lib/warning"),i.valueContextKey),s={mountWrapper:function(t,e,n){var r=n[a],i=null;if(null!=r)if(i=!1,Array.isArray(r)){for(var o=0;o<r.length;o++)if(""+r[o]==""+e.value){i=!0;break}}else i=""+r==""+e.value;t._wrapperState={selected:i}},getNativeProps:function(t,e,n){var i=o({selected:void 0,children:void 0},e);null!=t._wrapperState.selected&&(i.selected=t._wrapperState.selected);var a="";return r.forEach(e.children,function(t){null!=t&&("string"==typeof t||"number"==typeof t)&&(a+=t)}),i.children=a,i}};e.exports=s},{"./Object.assign":45,"./ReactChildren":51,"./ReactDOMSelect":66,"fbjs/lib/warning":174}],66:[function(t,e,n){"use strict";function r(){if(this._rootNodeID&&this._wrapperState.pendingUpdate){this._wrapperState.pendingUpdate=!1;var t=this._currentElement.props,e=a.getValue(t);null!=e&&i(this,t,e)}}function i(t,e,n){var r,i,o=s.getNode(t._rootNodeID).options;if(e){for(r={},i=0;i<n.length;i++)r[""+n[i]]=!0;for(i=0;i<o.length;i++){var a=r.hasOwnProperty(o[i].value);o[i].selected!==a&&(o[i].selected=a)}}else{for(r=""+n,i=0;i<o.length;i++)if(o[i].value===r)return void(o[i].selected=!0);o.length&&(o[0].selected=!0)}}function o(t){var e=this._currentElement.props,n=a.executeOnChange(e,t);return this._wrapperState.pendingUpdate=!0,u.asap(r,this),n}var a=t("./LinkedValueUtils"),s=t("./ReactMount"),u=t("./ReactUpdates"),c=t("./Object.assign"),l=(t("fbjs/lib/warning"),"__ReactDOMSelect_value$"+Math.random().toString(36).slice(2)),f={valueContextKey:l,getNativeProps:function(t,e,n){return c({},e,{onChange:t._wrapperState.onChange,value:void 0})},mountWrapper:function(t,e){var n=a.getValue(e);t._wrapperState={pendingUpdate:!1,initialValue:null!=n?n:e.defaultValue,onChange:o.bind(t),wasMultiple:Boolean(e.multiple)}},processChildContext:function(t,e,n){var r=c({},n);return r[l]=t._wrapperState.initialValue,r},postUpdateWrapper:function(t){var e=t._currentElement.props;t._wrapperState.initialValue=void 0;var n=t._wrapperState.wasMultiple;t._wrapperState.wasMultiple=Boolean(e.multiple);var r=a.getValue(e);null!=r?(t._wrapperState.pendingUpdate=!1,i(t,Boolean(e.multiple),r)):n!==Boolean(e.multiple)&&(null!=e.defaultValue?i(t,Boolean(e.multiple),e.defaultValue):i(t,Boolean(e.multiple),e.multiple?[]:""))}};e.exports=f},{"./LinkedValueUtils":44,"./Object.assign":45,"./ReactMount":86,"./ReactUpdates":104,"fbjs/lib/warning":174}],67:[function(t,e,n){"use strict";function r(t,e,n,r){return t===n&&e===r}function i(t){var e=document.selection,n=e.createRange(),r=n.text.length,i=n.duplicate();i.moveToElementText(t),i.setEndPoint("EndToStart",n);var o=i.text.length,a=o+r;return{start:o,end:a}}function o(t){var e=window.getSelection&&window.getSelection();if(!e||0===e.rangeCount)return null;var n=e.anchorNode,i=e.anchorOffset,o=e.focusNode,a=e.focusOffset,s=e.getRangeAt(0);try{s.startContainer.nodeType,s.endContainer.nodeType}catch(u){return null}var c=r(e.anchorNode,e.anchorOffset,e.focusNode,e.focusOffset),l=c?0:s.toString().length,f=s.cloneRange();f.selectNodeContents(t),f.setEnd(s.startContainer,s.startOffset);var p=r(f.startContainer,f.startOffset,f.endContainer,f.endOffset),h=p?0:f.toString().length,d=h+l,v=document.createRange();v.setStart(n,i),v.setEnd(o,a);var g=v.collapsed;return{start:g?d:h,end:g?h:d}}function a(t,e){var n,r,i=document.selection.createRange().duplicate();"undefined"==typeof e.end?(n=e.start,r=n):e.start>e.end?(n=e.end,r=e.start):(n=e.start,r=e.end),i.moveToElementText(t),i.moveStart("character",n),i.setEndPoint("EndToStart",i),i.moveEnd("character",r-n),i.select()}function s(t,e){if(window.getSelection){var n=window.getSelection(),r=t[l()].length,i=Math.min(e.start,r),o="undefined"==typeof e.end?i:Math.min(e.end,r);if(!n.extend&&i>o){var a=o;o=i,i=a}var s=c(t,i),u=c(t,o);if(s&&u){var f=document.createRange();f.setStart(s.node,s.offset),n.removeAllRanges(),i>o?(n.addRange(f),n.extend(u.node,u.offset)):(f.setEnd(u.node,u.offset),n.addRange(f))}}}var u=t("fbjs/lib/ExecutionEnvironment"),c=t("./getNodeForCharacterOffset"),l=t("./getTextContentAccessor"),f=u.canUseDOM&&"selection"in document&&!("getSelection"in window),p={getOffsets:f?i:o,setOffsets:f?a:s};e.exports=p},{"./getNodeForCharacterOffset":137,"./getTextContentAccessor":138,"fbjs/lib/ExecutionEnvironment":151}],68:[function(t,e,n){"use strict";var r=t("./ReactDefaultInjection"),i=t("./ReactServerRendering"),o=t("./ReactVersion");r.inject();var a={renderToString:i.renderToString,renderToStaticMarkup:i.renderToStaticMarkup,version:o};e.exports=a},{"./ReactDefaultInjection":72,"./ReactServerRendering":101,"./ReactVersion":105}],69:[function(t,e,n){"use strict";var r=t("./DOMChildrenOperations"),i=t("./DOMPropertyOperations"),o=t("./ReactComponentBrowserEnvironment"),a=t("./ReactMount"),s=t("./Object.assign"),u=t("./escapeTextContentForBrowser"),c=t("./setTextContent"),l=(t("./validateDOMNesting"),function(t){});s(l.prototype,{construct:function(t){this._currentElement=t,this._stringText=""+t,this._rootNodeID=null,this._mountIndex=0},mountComponent:function(t,e,n){if(this._rootNodeID=t,e.useCreateElement){var r=n[a.ownerDocumentContextKey],o=r.createElement("span");return i.setAttributeForID(o,t),a.getID(o),c(o,this._stringText),o}var s=u(this._stringText);return e.renderToStaticMarkup?s:"<span "+i.createMarkupForID(t)+">"+s+"</span>"},receiveComponent:function(t,e){if(t!==this._currentElement){this._currentElement=t;var n=""+t;if(n!==this._stringText){this._stringText=n;var i=a.getNode(this._rootNodeID);r.updateTextContent(i,n)}}},unmountComponent:function(){o.unmountIDFromEnvironment(this._rootNodeID)}}),e.exports=l},{"./DOMChildrenOperations":31,"./DOMPropertyOperations":33,"./Object.assign":45,"./ReactComponentBrowserEnvironment":54,"./ReactMount":86,"./escapeTextContentForBrowser":128,"./setTextContent":146,"./validateDOMNesting":149}],70:[function(t,e,n){"use strict";function r(){this._rootNodeID&&l.updateWrapper(this)}function i(t){var e=this._currentElement.props,n=o.executeOnChange(e,t);return s.asap(r,this),n}var o=t("./LinkedValueUtils"),a=t("./ReactDOMIDOperations"),s=t("./ReactUpdates"),u=t("./Object.assign"),c=t("fbjs/lib/invariant"),l=(t("fbjs/lib/warning"),{getNativeProps:function(t,e,n){null!=e.dangerouslySetInnerHTML?c(!1):void 0;var r=u({},e,{defaultValue:void 0,value:void 0,children:t._wrapperState.initialValue,onChange:t._wrapperState.onChange});return r},mountWrapper:function(t,e){var n=e.defaultValue,r=e.children;null!=r&&(null!=n?c(!1):void 0,Array.isArray(r)&&(r.length<=1?void 0:c(!1),r=r[0]),n=""+r),null==n&&(n="");var a=o.getValue(e);t._wrapperState={initialValue:""+(null!=a?a:n),onChange:i.bind(t)}},updateWrapper:function(t){var e=t._currentElement.props,n=o.getValue(e);null!=n&&a.updatePropertyByID(t._rootNodeID,"value",""+n)}});e.exports=l},{"./LinkedValueUtils":44,"./Object.assign":45,"./ReactDOMIDOperations":63,"./ReactUpdates":104,"fbjs/lib/invariant":165,"fbjs/lib/warning":174}],71:[function(t,e,n){"use strict";function r(){this.reinitializeTransaction()}var i=t("./ReactUpdates"),o=t("./Transaction"),a=t("./Object.assign"),s=t("fbjs/lib/emptyFunction"),u={initialize:s,close:function(){p.isBatchingUpdates=!1}},c={initialize:s,close:i.flushBatchedUpdates.bind(i)},l=[c,u];a(r.prototype,o.Mixin,{getTransactionWrappers:function(){return l}});var f=new r,p={isBatchingUpdates:!1,batchedUpdates:function(t,e,n,r,i,o){var a=p.isBatchingUpdates;p.isBatchingUpdates=!0,a?t(e,n,r,i,o):f.perform(t,null,e,n,r,i,o)}};e.exports=p},{"./Object.assign":45,"./ReactUpdates":104,"./Transaction":121,"fbjs/lib/emptyFunction":157}],72:[function(t,e,n){"use strict";function r(){k||(k=!0,m.EventEmitter.injectReactEventListener(g),m.EventPluginHub.injectEventPluginOrder(s),m.EventPluginHub.injectInstanceHandle(y),m.EventPluginHub.injectMount(b),m.EventPluginHub.injectEventPluginsByName({SimpleEventPlugin:C,EnterLeaveEventPlugin:u,ChangeEventPlugin:o,SelectEventPlugin:_,BeforeInputEventPlugin:i}),m.NativeComponent.injectGenericComponentClass(d),m.NativeComponent.injectTextComponentClass(v),m.Class.injectMixin(f),m.DOMProperty.injectDOMPropertyConfig(l),m.DOMProperty.injectDOMPropertyConfig(R),m.EmptyComponent.injectEmptyComponent("noscript"),m.Updates.injectReconcileTransaction(w),m.Updates.injectBatchingStrategy(h),m.RootIndex.injectCreateReactRootIndex(c.canUseDOM?a.createReactRootIndex:E.createReactRootIndex),m.Component.injectEnvironment(p))}var i=t("./BeforeInputEventPlugin"),o=t("./ChangeEventPlugin"),a=t("./ClientReactRootIndex"),s=t("./DefaultEventPluginOrder"),u=t("./EnterLeaveEventPlugin"),c=t("fbjs/lib/ExecutionEnvironment"),l=t("./HTMLDOMPropertyConfig"),f=t("./ReactBrowserComponentMixin"),p=t("./ReactComponentBrowserEnvironment"),h=t("./ReactDefaultBatchingStrategy"),d=t("./ReactDOMComponent"),v=t("./ReactDOMTextComponent"),g=t("./ReactEventListener"),m=t("./ReactInjection"),y=t("./ReactInstanceHandles"),b=t("./ReactMount"),w=t("./ReactReconcileTransaction"),_=t("./SelectEventPlugin"),E=t("./ServerReactRootIndex"),C=t("./SimpleEventPlugin"),R=t("./SVGDOMPropertyConfig"),k=!1;e.exports={inject:r}},{"./BeforeInputEventPlugin":25,"./ChangeEventPlugin":29,"./ClientReactRootIndex":30,"./DefaultEventPluginOrder":35,"./EnterLeaveEventPlugin":36,"./HTMLDOMPropertyConfig":43,"./ReactBrowserComponentMixin":48,"./ReactComponentBrowserEnvironment":54,"./ReactDOMComponent":60,"./ReactDOMTextComponent":69,"./ReactDefaultBatchingStrategy":71,"./ReactEventListener":79,"./ReactInjection":80,"./ReactInstanceHandles":82,"./ReactMount":86,"./ReactReconcileTransaction":96,"./SVGDOMPropertyConfig":106,"./SelectEventPlugin":107,"./ServerReactRootIndex":108,"./SimpleEventPlugin":109,"fbjs/lib/ExecutionEnvironment":151}],73:[function(t,e,n){"use strict";var r=t("./ReactCurrentOwner"),i=t("./Object.assign"),o=(t("./canDefineProperty"),"function"==typeof Symbol&&Symbol["for"]&&Symbol["for"]("react.element")||60103),a={key:!0,ref:!0,__self:!0,__source:!0},s=function(t,e,n,r,i,a,s){var u={$$typeof:o,type:t,key:e,ref:n,props:s,_owner:a};return u};s.createElement=function(t,e,n){var i,o={},u=null,c=null,l=null,f=null;if(null!=e){c=void 0===e.ref?null:e.ref,u=void 0===e.key?null:""+e.key,l=void 0===e.__self?null:e.__self,f=void 0===e.__source?null:e.__source;for(i in e)e.hasOwnProperty(i)&&!a.hasOwnProperty(i)&&(o[i]=e[i])}var p=arguments.length-2;if(1===p)o.children=n;else if(p>1){for(var h=Array(p),d=0;p>d;d++)h[d]=arguments[d+2];o.children=h}if(t&&t.defaultProps){var v=t.defaultProps;for(i in v)"undefined"==typeof o[i]&&(o[i]=v[i])}return s(t,u,c,l,f,r.current,o)},s.createFactory=function(t){var e=s.createElement.bind(null,t);return e.type=t,e},s.cloneAndReplaceKey=function(t,e){var n=s(t.type,e,t.ref,t._self,t._source,t._owner,t.props);return n},s.cloneAndReplaceProps=function(t,e){var n=s(t.type,t.key,t.ref,t._self,t._source,t._owner,e);return n},s.cloneElement=function(t,e,n){var o,u=i({},t.props),c=t.key,l=t.ref,f=t._self,p=t._source,h=t._owner;if(null!=e){void 0!==e.ref&&(l=e.ref,h=r.current),void 0!==e.key&&(c=""+e.key);for(o in e)e.hasOwnProperty(o)&&!a.hasOwnProperty(o)&&(u[o]=e[o])}var d=arguments.length-2;if(1===d)u.children=n;else if(d>1){for(var v=Array(d),g=0;d>g;g++)v[g]=arguments[g+2];u.children=v}return s(t.type,c,l,f,p,h,u)},s.isValidElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===o},e.exports=s},{"./Object.assign":45,"./ReactCurrentOwner":57,"./canDefineProperty":125}],74:[function(t,e,n){"use strict";function r(){if(f.current){var t=f.current.getName();if(t)return" Check the render method of `"+t+"`."}return""}function i(t,e){t._store&&!t._store.validated&&null==t.key&&(t._store.validated=!0,o("uniqueKey",t,e))}function o(t,e,n){var i=r();if(!i){var o="string"==typeof n?n:n.displayName||n.name;o&&(i=" Check the top-level render call using <"+o+">.")}var a=d[t]||(d[t]={});if(a[i])return null;a[i]=!0;var s={parentOrOwner:i,url:" See https://fb.me/react-warning-keys for more information.",childOwner:null};return e&&e._owner&&e._owner!==f.current&&(s.childOwner=" It was passed a child from "+e._owner.getName()+"."),s}function a(t,e){if("object"==typeof t)if(Array.isArray(t))for(var n=0;n<t.length;n++){var r=t[n];c.isValidElement(r)&&i(r,e)}else if(c.isValidElement(t))t._store&&(t._store.validated=!0);else if(t){var o=p(t);if(o&&o!==t.entries)for(var a,s=o.call(t);!(a=s.next()).done;)c.isValidElement(a.value)&&i(a.value,e)}}function s(t,e,n,i){for(var o in e)if(e.hasOwnProperty(o)){var a;try{"function"!=typeof e[o]?h(!1):void 0,a=e[o](n,o,t,i)}catch(s){a=s}a instanceof Error&&!(a.message in v)&&(v[a.message]=!0,r())}}function u(t){var e=t.type;if("function"==typeof e){var n=e.displayName||e.name;e.propTypes&&s(n,e.propTypes,t.props,l.prop),"function"==typeof e.getDefaultProps}}var c=t("./ReactElement"),l=t("./ReactPropTypeLocations"),f=(t("./ReactPropTypeLocationNames"),t("./ReactCurrentOwner")),p=(t("./canDefineProperty"),t("./getIteratorFn")),h=t("fbjs/lib/invariant"),d=(t("fbjs/lib/warning"),{}),v={},g={createElement:function(t,e,n){var r="string"==typeof t||"function"==typeof t,i=c.createElement.apply(this,arguments);if(null==i)return i;if(r)for(var o=2;o<arguments.length;o++)a(arguments[o],t);return u(i),i},createFactory:function(t){var e=g.createElement.bind(null,t);return e.type=t,e},cloneElement:function(t,e,n){for(var r=c.cloneElement.apply(this,arguments),i=2;i<arguments.length;i++)a(arguments[i],r.type);return u(r),r}};e.exports=g},{"./ReactCurrentOwner":57,"./ReactElement":73,"./ReactPropTypeLocationNames":93,"./ReactPropTypeLocations":94,"./canDefineProperty":125,"./getIteratorFn":136,"fbjs/lib/invariant":165,"fbjs/lib/warning":174}],75:[function(t,e,n){"use strict";var r,i=t("./ReactElement"),o=t("./ReactEmptyComponentRegistry"),a=t("./ReactReconciler"),s=t("./Object.assign"),u={injectEmptyComponent:function(t){r=i.createElement(t)}},c=function(t){this._currentElement=null,this._rootNodeID=null,this._renderedComponent=t(r)};s(c.prototype,{construct:function(t){},mountComponent:function(t,e,n){return o.registerNullComponentID(t),this._rootNodeID=t,a.mountComponent(this._renderedComponent,t,e,n)},receiveComponent:function(){},unmountComponent:function(t,e,n){a.unmountComponent(this._renderedComponent),o.deregisterNullComponentID(this._rootNodeID),this._rootNodeID=null,this._renderedComponent=null}}),c.injection=u,e.exports=c},{"./Object.assign":45,"./ReactElement":73,"./ReactEmptyComponentRegistry":76,"./ReactReconciler":97}],76:[function(t,e,n){"use strict";function r(t){return!!a[t]}function i(t){a[t]=!0}function o(t){delete a[t]}var a={},s={isNullComponentID:r,registerNullComponentID:i,deregisterNullComponentID:o};e.exports=s},{}],77:[function(t,e,n){"use strict";function r(t,e,n,r){try{return e(n,r)}catch(o){return void(null===i&&(i=o))}}var i=null,o={invokeGuardedCallback:r,invokeGuardedCallbackWithCatch:r,rethrowCaughtError:function(){if(i){var t=i;throw i=null,t}}};e.exports=o},{}],78:[function(t,e,n){"use strict";function r(t){i.enqueueEvents(t),i.processEventQueue(!1)}var i=t("./EventPluginHub"),o={handleTopLevel:function(t,e,n,o,a){var s=i.extractEvents(t,e,n,o,a);r(s)}};e.exports=o},{"./EventPluginHub":38}],79:[function(t,e,n){"use strict";function r(t){var e=p.getID(t),n=f.getReactRootIDFromNodeID(e),r=p.findReactContainerForID(n),i=p.getFirstReactDOM(r);return i}function i(t,e){this.topLevelType=t,this.nativeEvent=e,this.ancestors=[]}function o(t){a(t)}function a(t){for(var e=p.getFirstReactDOM(v(t.nativeEvent))||window,n=e;n;)t.ancestors.push(n),n=r(n);for(var i=0;i<t.ancestors.length;i++){e=t.ancestors[i];var o=p.getID(e)||"";m._handleTopLevel(t.topLevelType,e,o,t.nativeEvent,v(t.nativeEvent))}}function s(t){var e=g(window);t(e)}var u=t("fbjs/lib/EventListener"),c=t("fbjs/lib/ExecutionEnvironment"),l=t("./PooledClass"),f=t("./ReactInstanceHandles"),p=t("./ReactMount"),h=t("./ReactUpdates"),d=t("./Object.assign"),v=t("./getEventTarget"),g=t("fbjs/lib/getUnboundedScrollPosition");d(i.prototype,{destructor:function(){this.topLevelType=null,this.nativeEvent=null,this.ancestors.length=0}}),l.addPoolingTo(i,l.twoArgumentPooler);var m={_enabled:!0,_handleTopLevel:null,WINDOW_HANDLE:c.canUseDOM?window:null,setHandleTopLevel:function(t){m._handleTopLevel=t},setEnabled:function(t){m._enabled=!!t},isEnabled:function(){return m._enabled},
trapBubbledEvent:function(t,e,n){var r=n;return r?u.listen(r,e,m.dispatchEvent.bind(null,t)):null},trapCapturedEvent:function(t,e,n){var r=n;return r?u.capture(r,e,m.dispatchEvent.bind(null,t)):null},monitorScrollValue:function(t){var e=s.bind(null,t);u.listen(window,"scroll",e)},dispatchEvent:function(t,e){if(m._enabled){var n=i.getPooled(t,e);try{h.batchedUpdates(o,n)}finally{i.release(n)}}}};e.exports=m},{"./Object.assign":45,"./PooledClass":46,"./ReactInstanceHandles":82,"./ReactMount":86,"./ReactUpdates":104,"./getEventTarget":135,"fbjs/lib/EventListener":150,"fbjs/lib/ExecutionEnvironment":151,"fbjs/lib/getUnboundedScrollPosition":162}],80:[function(t,e,n){"use strict";var r=t("./DOMProperty"),i=t("./EventPluginHub"),o=t("./ReactComponentEnvironment"),a=t("./ReactClass"),s=t("./ReactEmptyComponent"),u=t("./ReactBrowserEventEmitter"),c=t("./ReactNativeComponent"),l=t("./ReactPerf"),f=t("./ReactRootIndex"),p=t("./ReactUpdates"),h={Component:o.injection,Class:a.injection,DOMProperty:r.injection,EmptyComponent:s.injection,EventPluginHub:i.injection,EventEmitter:u.injection,NativeComponent:c.injection,Perf:l.injection,RootIndex:f.injection,Updates:p.injection};e.exports=h},{"./DOMProperty":32,"./EventPluginHub":38,"./ReactBrowserEventEmitter":49,"./ReactClass":52,"./ReactComponentEnvironment":55,"./ReactEmptyComponent":75,"./ReactNativeComponent":89,"./ReactPerf":92,"./ReactRootIndex":99,"./ReactUpdates":104}],81:[function(t,e,n){"use strict";function r(t){return o(document.documentElement,t)}var i=t("./ReactDOMSelection"),o=t("fbjs/lib/containsNode"),a=t("fbjs/lib/focusNode"),s=t("fbjs/lib/getActiveElement"),u={hasSelectionCapabilities:function(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&("input"===e&&"text"===t.type||"textarea"===e||"true"===t.contentEditable)},getSelectionInformation:function(){var t=s();return{focusedElem:t,selectionRange:u.hasSelectionCapabilities(t)?u.getSelection(t):null}},restoreSelection:function(t){var e=s(),n=t.focusedElem,i=t.selectionRange;e!==n&&r(n)&&(u.hasSelectionCapabilities(n)&&u.setSelection(n,i),a(n))},getSelection:function(t){var e;if("selectionStart"in t)e={start:t.selectionStart,end:t.selectionEnd};else if(document.selection&&t.nodeName&&"input"===t.nodeName.toLowerCase()){var n=document.selection.createRange();n.parentElement()===t&&(e={start:-n.moveStart("character",-t.value.length),end:-n.moveEnd("character",-t.value.length)})}else e=i.getOffsets(t);return e||{start:0,end:0}},setSelection:function(t,e){var n=e.start,r=e.end;if("undefined"==typeof r&&(r=n),"selectionStart"in t)t.selectionStart=n,t.selectionEnd=Math.min(r,t.value.length);else if(document.selection&&t.nodeName&&"input"===t.nodeName.toLowerCase()){var o=t.createTextRange();o.collapse(!0),o.moveStart("character",n),o.moveEnd("character",r-n),o.select()}else i.setOffsets(t,e)}};e.exports=u},{"./ReactDOMSelection":67,"fbjs/lib/containsNode":154,"fbjs/lib/focusNode":159,"fbjs/lib/getActiveElement":160}],82:[function(t,e,n){"use strict";function r(t){return h+t.toString(36)}function i(t,e){return t.charAt(e)===h||e===t.length}function o(t){return""===t||t.charAt(0)===h&&t.charAt(t.length-1)!==h}function a(t,e){return 0===e.indexOf(t)&&i(e,t.length)}function s(t){return t?t.substr(0,t.lastIndexOf(h)):""}function u(t,e){if(o(t)&&o(e)?void 0:p(!1),a(t,e)?void 0:p(!1),t===e)return t;var n,r=t.length+d;for(n=r;n<e.length&&!i(e,n);n++);return e.substr(0,n)}function c(t,e){var n=Math.min(t.length,e.length);if(0===n)return"";for(var r=0,a=0;n>=a;a++)if(i(t,a)&&i(e,a))r=a;else if(t.charAt(a)!==e.charAt(a))break;var s=t.substr(0,r);return o(s)?void 0:p(!1),s}function l(t,e,n,r,i,o){t=t||"",e=e||"",t===e?p(!1):void 0;var c=a(e,t);c||a(t,e)?void 0:p(!1);for(var l=0,f=c?s:u,h=t;;h=f(h,e)){var d;if(i&&h===t||o&&h===e||(d=n(h,c,r)),d===!1||h===e)break;l++<v?void 0:p(!1)}}var f=t("./ReactRootIndex"),p=t("fbjs/lib/invariant"),h=".",d=h.length,v=1e4,g={createReactRootID:function(){return r(f.createReactRootIndex())},createReactID:function(t,e){return t+e},getReactRootIDFromNodeID:function(t){if(t&&t.charAt(0)===h&&t.length>1){var e=t.indexOf(h,1);return e>-1?t.substr(0,e):t}return null},traverseEnterLeave:function(t,e,n,r,i){var o=c(t,e);o!==t&&l(t,o,n,r,!1,!0),o!==e&&l(o,e,n,i,!0,!1)},traverseTwoPhase:function(t,e,n){t&&(l("",t,e,n,!0,!1),l(t,"",e,n,!1,!0))},traverseTwoPhaseSkipTarget:function(t,e,n){t&&(l("",t,e,n,!0,!0),l(t,"",e,n,!0,!0))},traverseAncestors:function(t,e,n){l("",t,e,n,!0,!1)},getFirstCommonAncestorID:c,_getNextDescendantID:u,isAncestorIDOf:a,SEPARATOR:h};e.exports=g},{"./ReactRootIndex":99,"fbjs/lib/invariant":165}],83:[function(t,e,n){"use strict";var r={remove:function(t){t._reactInternalInstance=void 0},get:function(t){return t._reactInternalInstance},has:function(t){return void 0!==t._reactInternalInstance},set:function(t,e){t._reactInternalInstance=e}};e.exports=r},{}],84:[function(t,e,n){"use strict";var r=t("./ReactChildren"),i=t("./ReactComponent"),o=t("./ReactClass"),a=t("./ReactDOMFactories"),s=t("./ReactElement"),u=(t("./ReactElementValidator"),t("./ReactPropTypes")),c=t("./ReactVersion"),l=t("./Object.assign"),f=t("./onlyChild"),p=s.createElement,h=s.createFactory,d=s.cloneElement,v={Children:{map:r.map,forEach:r.forEach,count:r.count,toArray:r.toArray,only:f},Component:i,createElement:p,cloneElement:d,isValidElement:s.isValidElement,PropTypes:u,createClass:o.createClass,createFactory:h,createMixin:function(t){return t},DOM:a,version:c,__spread:l};e.exports=v},{"./Object.assign":45,"./ReactChildren":51,"./ReactClass":52,"./ReactComponent":53,"./ReactDOMFactories":61,"./ReactElement":73,"./ReactElementValidator":74,"./ReactPropTypes":95,"./ReactVersion":105,"./onlyChild":142}],85:[function(t,e,n){"use strict";var r=t("./adler32"),i=/\/?>/,o={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(t){var e=r(t);return t.replace(i," "+o.CHECKSUM_ATTR_NAME+'="'+e+'"$&')},canReuseMarkup:function(t,e){var n=e.getAttribute(o.CHECKSUM_ATTR_NAME);n=n&&parseInt(n,10);var i=r(t);return i===n}};e.exports=o},{"./adler32":124}],86:[function(t,e,n){"use strict";function r(t,e){for(var n=Math.min(t.length,e.length),r=0;n>r;r++)if(t.charAt(r)!==e.charAt(r))return r;return t.length===e.length?-1:n}function i(t){return t?t.nodeType===H?t.documentElement:t.firstChild:null}function o(t){var e=i(t);return e&&Z.getID(e)}function a(t){var e=s(t);if(e)if(F.hasOwnProperty(e)){var n=F[e];n!==t&&(f(n,e)?j(!1):void 0,F[e]=t)}else F[e]=t;return e}function s(t){return t&&t.getAttribute&&t.getAttribute(U)||""}function u(t,e){var n=s(t);n!==e&&delete F[n],t.setAttribute(U,e),F[e]=t}function c(t){return F.hasOwnProperty(t)&&f(F[t],t)||(F[t]=Z.findReactNodeByID(t)),F[t]}function l(t){var e=O.get(t)._rootNodeID;return R.isNullComponentID(e)?null:(F.hasOwnProperty(e)&&f(F[e],e)||(F[e]=Z.findReactNodeByID(e)),F[e])}function f(t,e){if(t){s(t)!==e?j(!1):void 0;var n=Z.findReactContainerForID(e);if(n&&N(n,t))return!0}return!1}function p(t){delete F[t]}function h(t){var e=F[t];return e&&f(e,t)?void(Y=e):!1}function d(t){Y=null,k.traverseAncestors(t,h);var e=Y;return Y=null,e}function v(t,e,n,r,i,o){E.useCreateElement&&(o=P({},o),n.nodeType===H?o[q]=n:o[q]=n.ownerDocument);var a=x.mountComponent(t,e,r,o);t._renderedComponent._topLevelWrapper=t,Z._mountImageIntoNode(a,n,i,r)}function g(t,e,n,r,i){var o=M.ReactReconcileTransaction.getPooled(r);o.perform(v,null,t,e,n,o,r,i),M.ReactReconcileTransaction.release(o)}function m(t,e){for(x.unmountComponent(t),e.nodeType===H&&(e=e.documentElement);e.lastChild;)e.removeChild(e.lastChild)}function y(t){var e=o(t);return e?e!==k.getReactRootIDFromNodeID(e):!1}function b(t){for(;t&&t.parentNode!==t;t=t.parentNode)if(1===t.nodeType){var e=s(t);if(e){var n,r=k.getReactRootIDFromNodeID(e),i=t;do if(n=s(i),i=i.parentNode,null==i)return null;while(n!==r);if(i===W[r])return t}}return null}var w=t("./DOMProperty"),_=t("./ReactBrowserEventEmitter"),E=(t("./ReactCurrentOwner"),t("./ReactDOMFeatureFlags")),C=t("./ReactElement"),R=t("./ReactEmptyComponentRegistry"),k=t("./ReactInstanceHandles"),O=t("./ReactInstanceMap"),S=t("./ReactMarkupChecksum"),T=t("./ReactPerf"),x=t("./ReactReconciler"),I=t("./ReactUpdateQueue"),M=t("./ReactUpdates"),P=t("./Object.assign"),A=t("fbjs/lib/emptyObject"),N=t("fbjs/lib/containsNode"),D=t("./instantiateReactComponent"),j=t("fbjs/lib/invariant"),L=t("./setInnerHTML"),B=t("./shouldUpdateReactComponent"),U=(t("./validateDOMNesting"),t("fbjs/lib/warning"),w.ID_ATTRIBUTE_NAME),F={},V=1,H=9,z=11,q="__ReactMount_ownerDocument$"+Math.random().toString(36).slice(2),G={},W={},K=[],Y=null,X=function(){};X.prototype.isReactComponent={},X.prototype.render=function(){return this.props};var Z={TopLevelWrapper:X,_instancesByReactRootID:G,scrollMonitor:function(t,e){e()},_updateRootComponent:function(t,e,n,r){return Z.scrollMonitor(n,function(){I.enqueueElementInternal(t,e),r&&I.enqueueCallbackInternal(t,r)}),t},_registerComponent:function(t,e){!e||e.nodeType!==V&&e.nodeType!==H&&e.nodeType!==z?j(!1):void 0,_.ensureScrollValueMonitoring();var n=Z.registerContainer(e);return G[n]=t,n},_renderNewRootComponent:function(t,e,n,r){var i=D(t,null),o=Z._registerComponent(i,e);return M.batchedUpdates(g,i,o,e,n,r),i},renderSubtreeIntoContainer:function(t,e,n,r){return null==t||null==t._reactInternalInstance?j(!1):void 0,Z._renderSubtreeIntoContainer(t,e,n,r)},_renderSubtreeIntoContainer:function(t,e,n,r){C.isValidElement(e)?void 0:j(!1);var a=new C(X,null,null,null,null,null,e),u=G[o(n)];if(u){var c=u._currentElement,l=c.props;if(B(l,e)){var f=u._renderedComponent.getPublicInstance(),p=r&&function(){r.call(f)};return Z._updateRootComponent(u,a,n,p),f}Z.unmountComponentAtNode(n)}var h=i(n),d=h&&!!s(h),v=y(n),g=d&&!u&&!v,m=Z._renderNewRootComponent(a,n,g,null!=t?t._reactInternalInstance._processChildContext(t._reactInternalInstance._context):A)._renderedComponent.getPublicInstance();return r&&r.call(m),m},render:function(t,e,n){return Z._renderSubtreeIntoContainer(null,t,e,n)},registerContainer:function(t){var e=o(t);return e&&(e=k.getReactRootIDFromNodeID(e)),e||(e=k.createReactRootID()),W[e]=t,e},unmountComponentAtNode:function(t){!t||t.nodeType!==V&&t.nodeType!==H&&t.nodeType!==z?j(!1):void 0;var e=o(t),n=G[e];if(!n){var r=(y(t),s(t));return r&&r===k.getReactRootIDFromNodeID(r),!1}return M.batchedUpdates(m,n,t),delete G[e],delete W[e],!0},findReactContainerForID:function(t){var e=k.getReactRootIDFromNodeID(t),n=W[e];return n},findReactNodeByID:function(t){var e=Z.findReactContainerForID(t);return Z.findComponentRoot(e,t)},getFirstReactDOM:function(t){return b(t)},findComponentRoot:function(t,e){var n=K,r=0,i=d(e)||t;for(n[0]=i.firstChild,n.length=1;r<n.length;){for(var o,a=n[r++];a;){var s=Z.getID(a);s?e===s?o=a:k.isAncestorIDOf(s,e)&&(n.length=r=0,n.push(a.firstChild)):n.push(a.firstChild),a=a.nextSibling}if(o)return n.length=0,o}n.length=0,j(!1)},_mountImageIntoNode:function(t,e,n,o){if(!e||e.nodeType!==V&&e.nodeType!==H&&e.nodeType!==z?j(!1):void 0,n){var a=i(e);if(S.canReuseMarkup(t,a))return;var s=a.getAttribute(S.CHECKSUM_ATTR_NAME);a.removeAttribute(S.CHECKSUM_ATTR_NAME);var u=a.outerHTML;a.setAttribute(S.CHECKSUM_ATTR_NAME,s);var c=t,l=r(c,u);" (client) "+c.substring(l-20,l+20)+"\n (server) "+u.substring(l-20,l+20),e.nodeType===H?j(!1):void 0}if(e.nodeType===H?j(!1):void 0,o.useCreateElement){for(;e.lastChild;)e.removeChild(e.lastChild);e.appendChild(t)}else L(e,t)},ownerDocumentContextKey:q,getReactRootID:o,getID:a,setID:u,getNode:c,getNodeFromInstance:l,isValid:f,purgeID:p};T.measureMethods(Z,"ReactMount",{_renderNewRootComponent:"_renderNewRootComponent",_mountImageIntoNode:"_mountImageIntoNode"}),e.exports=Z},{"./DOMProperty":32,"./Object.assign":45,"./ReactBrowserEventEmitter":49,"./ReactCurrentOwner":57,"./ReactDOMFeatureFlags":62,"./ReactElement":73,"./ReactEmptyComponentRegistry":76,"./ReactInstanceHandles":82,"./ReactInstanceMap":83,"./ReactMarkupChecksum":85,"./ReactPerf":92,"./ReactReconciler":97,"./ReactUpdateQueue":103,"./ReactUpdates":104,"./instantiateReactComponent":139,"./setInnerHTML":145,"./shouldUpdateReactComponent":147,"./validateDOMNesting":149,"fbjs/lib/containsNode":154,"fbjs/lib/emptyObject":158,"fbjs/lib/invariant":165,"fbjs/lib/warning":174}],87:[function(t,e,n){"use strict";function r(t,e,n){g.push({parentID:t,parentNode:null,type:f.INSERT_MARKUP,markupIndex:m.push(e)-1,content:null,fromIndex:null,toIndex:n})}function i(t,e,n){g.push({parentID:t,parentNode:null,type:f.MOVE_EXISTING,markupIndex:null,content:null,fromIndex:e,toIndex:n})}function o(t,e){g.push({parentID:t,parentNode:null,type:f.REMOVE_NODE,markupIndex:null,content:null,fromIndex:e,toIndex:null})}function a(t,e){g.push({parentID:t,parentNode:null,type:f.SET_MARKUP,markupIndex:null,content:e,fromIndex:null,toIndex:null})}function s(t,e){g.push({parentID:t,parentNode:null,type:f.TEXT_CONTENT,markupIndex:null,content:e,fromIndex:null,toIndex:null})}function u(){g.length&&(l.processChildrenUpdates(g,m),c())}function c(){g.length=0,m.length=0}var l=t("./ReactComponentEnvironment"),f=t("./ReactMultiChildUpdateTypes"),p=(t("./ReactCurrentOwner"),t("./ReactReconciler")),h=t("./ReactChildReconciler"),d=t("./flattenChildren"),v=0,g=[],m=[],y={Mixin:{_reconcilerInstantiateChildren:function(t,e,n){return h.instantiateChildren(t,e,n)},_reconcilerUpdateChildren:function(t,e,n,r){var i;return i=d(e),h.updateChildren(t,i,n,r)},mountChildren:function(t,e,n){var r=this._reconcilerInstantiateChildren(t,e,n);this._renderedChildren=r;var i=[],o=0;for(var a in r)if(r.hasOwnProperty(a)){var s=r[a],u=this._rootNodeID+a,c=p.mountComponent(s,u,e,n);s._mountIndex=o++,i.push(c)}return i},updateTextContent:function(t){v++;var e=!0;try{var n=this._renderedChildren;h.unmountChildren(n);for(var r in n)n.hasOwnProperty(r)&&this._unmountChild(n[r]);this.setTextContent(t),e=!1}finally{v--,v||(e?c():u())}},updateMarkup:function(t){v++;var e=!0;try{var n=this._renderedChildren;h.unmountChildren(n);for(var r in n)n.hasOwnProperty(r)&&this._unmountChildByName(n[r],r);this.setMarkup(t),e=!1}finally{v--,v||(e?c():u())}},updateChildren:function(t,e,n){v++;var r=!0;try{this._updateChildren(t,e,n),r=!1}finally{v--,v||(r?c():u())}},_updateChildren:function(t,e,n){var r=this._renderedChildren,i=this._reconcilerUpdateChildren(r,t,e,n);if(this._renderedChildren=i,i||r){var o,a=0,s=0;for(o in i)if(i.hasOwnProperty(o)){var u=r&&r[o],c=i[o];u===c?(this.moveChild(u,s,a),a=Math.max(u._mountIndex,a),u._mountIndex=s):(u&&(a=Math.max(u._mountIndex,a),this._unmountChild(u)),this._mountChildByNameAtIndex(c,o,s,e,n)),s++}for(o in r)!r.hasOwnProperty(o)||i&&i.hasOwnProperty(o)||this._unmountChild(r[o])}},unmountChildren:function(){var t=this._renderedChildren;h.unmountChildren(t),this._renderedChildren=null},moveChild:function(t,e,n){t._mountIndex<n&&i(this._rootNodeID,t._mountIndex,e)},createChild:function(t,e){r(this._rootNodeID,e,t._mountIndex)},removeChild:function(t){o(this._rootNodeID,t._mountIndex)},setTextContent:function(t){s(this._rootNodeID,t)},setMarkup:function(t){a(this._rootNodeID,t)},_mountChildByNameAtIndex:function(t,e,n,r,i){var o=this._rootNodeID+e,a=p.mountComponent(t,o,r,i);t._mountIndex=n,this.createChild(t,a)},_unmountChild:function(t){this.removeChild(t),t._mountIndex=null}}};e.exports=y},{"./ReactChildReconciler":50,"./ReactComponentEnvironment":55,"./ReactCurrentOwner":57,"./ReactMultiChildUpdateTypes":88,"./ReactReconciler":97,"./flattenChildren":130}],88:[function(t,e,n){"use strict";var r=t("fbjs/lib/keyMirror"),i=r({INSERT_MARKUP:null,MOVE_EXISTING:null,REMOVE_NODE:null,SET_MARKUP:null,TEXT_CONTENT:null});e.exports=i},{"fbjs/lib/keyMirror":168}],89:[function(t,e,n){"use strict";function r(t){if("function"==typeof t.type)return t.type;var e=t.type,n=f[e];return null==n&&(f[e]=n=c(e)),n}function i(t){return l?void 0:u(!1),new l(t.type,t.props)}function o(t){return new p(t)}function a(t){return t instanceof p}var s=t("./Object.assign"),u=t("fbjs/lib/invariant"),c=null,l=null,f={},p=null,h={injectGenericComponentClass:function(t){l=t},injectTextComponentClass:function(t){p=t},injectComponentClasses:function(t){s(f,t)}},d={getComponentClassForElement:r,createInternalComponent:i,createInstanceForText:o,isTextComponent:a,injection:h};e.exports=d},{"./Object.assign":45,"fbjs/lib/invariant":165}],90:[function(t,e,n){"use strict";function r(t,e){}var i=(t("fbjs/lib/warning"),{isMounted:function(t){return!1},enqueueCallback:function(t,e){},enqueueForceUpdate:function(t){r(t,"forceUpdate")},enqueueReplaceState:function(t,e){r(t,"replaceState")},enqueueSetState:function(t,e){r(t,"setState")},enqueueSetProps:function(t,e){r(t,"setProps")},enqueueReplaceProps:function(t,e){r(t,"replaceProps")}});e.exports=i},{"fbjs/lib/warning":174}],91:[function(t,e,n){"use strict";var r=t("fbjs/lib/invariant"),i={isValidOwner:function(t){return!(!t||"function"!=typeof t.attachRef||"function"!=typeof t.detachRef)},addComponentAsRefTo:function(t,e,n){i.isValidOwner(n)?void 0:r(!1),n.attachRef(e,t)},removeComponentAsRefFrom:function(t,e,n){i.isValidOwner(n)?void 0:r(!1),n.getPublicInstance().refs[e]===t.getPublicInstance()&&n.detachRef(e)}};e.exports=i},{"fbjs/lib/invariant":165}],92:[function(t,e,n){"use strict";function r(t,e,n){return n}var i={enableMeasure:!1,storedMeasure:r,measureMethods:function(t,e,n){},measure:function(t,e,n){return n},injection:{injectMeasure:function(t){i.storedMeasure=t}}};e.exports=i},{}],93:[function(t,e,n){"use strict";var r={};e.exports=r},{}],94:[function(t,e,n){"use strict";var r=t("fbjs/lib/keyMirror"),i=r({prop:null,context:null,childContext:null});e.exports=i},{"fbjs/lib/keyMirror":168}],95:[function(t,e,n){"use strict";function r(t){function e(e,n,r,i,o,a){if(i=i||E,a=a||r,null==n[r]){var s=b[o];return e?new Error("Required "+s+" `"+a+"` was not specified in "+("`"+i+"`.")):null}return t(n,r,i,o,a)}var n=e.bind(null,!1);return n.isRequired=e.bind(null,!0),n}function i(t){function e(e,n,r,i,o){var a=e[n],s=v(a);if(s!==t){var u=b[i],c=g(a);return new Error("Invalid "+u+" `"+o+"` of type "+("`"+c+"` supplied to `"+r+"`, expected ")+("`"+t+"`."))}return null}return r(e)}function o(){return r(w.thatReturns(null))}function a(t){function e(e,n,r,i,o){var a=e[n];if(!Array.isArray(a)){var s=b[i],u=v(a);return new Error("Invalid "+s+" `"+o+"` of type "+("`"+u+"` supplied to `"+r+"`, expected an array."))}for(var c=0;c<a.length;c++){var l=t(a,c,r,i,o+"["+c+"]");if(l instanceof Error)return l}return null}return r(e)}function s(){function t(t,e,n,r,i){if(!y.isValidElement(t[e])){var o=b[r];return new Error("Invalid "+o+" `"+i+"` supplied to "+("`"+n+"`, expected a single ReactElement."))}return null}return r(t)}function u(t){function e(e,n,r,i,o){if(!(e[n]instanceof t)){var a=b[i],s=t.name||E,u=m(e[n]);return new Error("Invalid "+a+" `"+o+"` of type "+("`"+u+"` supplied to `"+r+"`, expected ")+("instance of `"+s+"`."))}return null}return r(e)}function c(t){function e(e,n,r,i,o){for(var a=e[n],s=0;s<t.length;s++)if(a===t[s])return null;var u=b[i],c=JSON.stringify(t);return new Error("Invalid "+u+" `"+o+"` of value `"+a+"` "+("supplied to `"+r+"`, expected one of "+c+"."))}return r(Array.isArray(t)?e:function(){return new Error("Invalid argument supplied to oneOf, expected an instance of array.")})}function l(t){function e(e,n,r,i,o){var a=e[n],s=v(a);if("object"!==s){var u=b[i];return new Error("Invalid "+u+" `"+o+"` of type "+("`"+s+"` supplied to `"+r+"`, expected an object."))}for(var c in a)if(a.hasOwnProperty(c)){var l=t(a,c,r,i,o+"."+c);if(l instanceof Error)return l}return null}return r(e)}function f(t){function e(e,n,r,i,o){for(var a=0;a<t.length;a++){var s=t[a];if(null==s(e,n,r,i,o))return null}var u=b[i];return new Error("Invalid "+u+" `"+o+"` supplied to "+("`"+r+"`."))}return r(Array.isArray(t)?e:function(){return new Error("Invalid argument supplied to oneOfType, expected an instance of array.")})}function p(){function t(t,e,n,r,i){if(!d(t[e])){var o=b[r];return new Error("Invalid "+o+" `"+i+"` supplied to "+("`"+n+"`, expected a ReactNode."))}return null}return r(t)}function h(t){function e(e,n,r,i,o){var a=e[n],s=v(a);if("object"!==s){var u=b[i];return new Error("Invalid "+u+" `"+o+"` of type `"+s+"` "+("supplied to `"+r+"`, expected `object`."))}for(var c in t){var l=t[c];if(l){var f=l(a,c,r,i,o+"."+c);if(f)return f}}return null}return r(e)}function d(t){switch(typeof t){case"number":case"string":case"undefined":return!0;case"boolean":return!t;case"object":if(Array.isArray(t))return t.every(d);if(null===t||y.isValidElement(t))return!0;var e=_(t);if(!e)return!1;var n,r=e.call(t);if(e!==t.entries){for(;!(n=r.next()).done;)if(!d(n.value))return!1}else for(;!(n=r.next()).done;){var i=n.value;if(i&&!d(i[1]))return!1}return!0;default:return!1}}function v(t){var e=typeof t;return Array.isArray(t)?"array":t instanceof RegExp?"object":e}function g(t){var e=v(t);if("object"===e){if(t instanceof Date)return"date";if(t instanceof RegExp)return"regexp"}return e}function m(t){return t.constructor&&t.constructor.name?t.constructor.name:"<<anonymous>>"}var y=t("./ReactElement"),b=t("./ReactPropTypeLocationNames"),w=t("fbjs/lib/emptyFunction"),_=t("./getIteratorFn"),E="<<anonymous>>",C={array:i("array"),bool:i("boolean"),func:i("function"),number:i("number"),object:i("object"),string:i("string"),any:o(),arrayOf:a,element:s(),instanceOf:u,node:p(),objectOf:l,oneOf:c,oneOfType:f,shape:h};e.exports=C},{"./ReactElement":73,"./ReactPropTypeLocationNames":93,"./getIteratorFn":136,"fbjs/lib/emptyFunction":157}],96:[function(t,e,n){"use strict";function r(t){this.reinitializeTransaction(),this.renderToStaticMarkup=!1,this.reactMountReady=i.getPooled(null),this.useCreateElement=!t&&s.useCreateElement}var i=t("./CallbackQueue"),o=t("./PooledClass"),a=t("./ReactBrowserEventEmitter"),s=t("./ReactDOMFeatureFlags"),u=t("./ReactInputSelection"),c=t("./Transaction"),l=t("./Object.assign"),f={initialize:u.getSelectionInformation,close:u.restoreSelection},p={initialize:function(){var t=a.isEnabled();return a.setEnabled(!1),t},close:function(t){a.setEnabled(t)}},h={initialize:function(){this.reactMountReady.reset()},close:function(){this.reactMountReady.notifyAll()}},d=[f,p,h],v={getTransactionWrappers:function(){return d},getReactMountReady:function(){return this.reactMountReady},destructor:function(){i.release(this.reactMountReady),this.reactMountReady=null}};l(r.prototype,c.Mixin,v),o.addPoolingTo(r),e.exports=r},{"./CallbackQueue":28,"./Object.assign":45,"./PooledClass":46,"./ReactBrowserEventEmitter":49,"./ReactDOMFeatureFlags":62,"./ReactInputSelection":81,"./Transaction":121}],97:[function(t,e,n){"use strict";function r(){i.attachRefs(this,this._currentElement)}var i=t("./ReactRef"),o={mountComponent:function(t,e,n,i){var o=t.mountComponent(e,n,i);return t._currentElement&&null!=t._currentElement.ref&&n.getReactMountReady().enqueue(r,t),o},unmountComponent:function(t){i.detachRefs(t,t._currentElement),t.unmountComponent()},receiveComponent:function(t,e,n,o){var a=t._currentElement;if(e!==a||o!==t._context){var s=i.shouldUpdateRefs(a,e);s&&i.detachRefs(t,a),t.receiveComponent(e,n,o),s&&t._currentElement&&null!=t._currentElement.ref&&n.getReactMountReady().enqueue(r,t)}},performUpdateIfNecessary:function(t,e){t.performUpdateIfNecessary(e)}};e.exports=o},{"./ReactRef":98}],98:[function(t,e,n){"use strict";function r(t,e,n){"function"==typeof t?t(e.getPublicInstance()):o.addComponentAsRefTo(e,t,n)}function i(t,e,n){"function"==typeof t?t(null):o.removeComponentAsRefFrom(e,t,n)}var o=t("./ReactOwner"),a={};a.attachRefs=function(t,e){if(null!==e&&e!==!1){var n=e.ref;null!=n&&r(n,t,e._owner)}},a.shouldUpdateRefs=function(t,e){var n=null===t||t===!1,r=null===e||e===!1;return n||r||e._owner!==t._owner||e.ref!==t.ref},a.detachRefs=function(t,e){if(null!==e&&e!==!1){var n=e.ref;null!=n&&i(n,t,e._owner)}},e.exports=a},{"./ReactOwner":91}],99:[function(t,e,n){"use strict";var r={injectCreateReactRootIndex:function(t){i.createReactRootIndex=t}},i={createReactRootIndex:null,injection:r};e.exports=i},{}],100:[function(t,e,n){"use strict";var r={isBatchingUpdates:!1,batchedUpdates:function(t){}};e.exports=r},{}],101:[function(t,e,n){"use strict";function r(t){a.isValidElement(t)?void 0:d(!1);var e;try{f.injection.injectBatchingStrategy(c);var n=s.createReactRootID();return e=l.getPooled(!1),e.perform(function(){var r=h(t,null),i=r.mountComponent(n,e,p);return u.addChecksumToMarkup(i)},null)}finally{l.release(e),f.injection.injectBatchingStrategy(o)}}function i(t){a.isValidElement(t)?void 0:d(!1);var e;try{f.injection.injectBatchingStrategy(c);var n=s.createReactRootID();return e=l.getPooled(!0),e.perform(function(){var r=h(t,null);return r.mountComponent(n,e,p)},null)}finally{l.release(e),f.injection.injectBatchingStrategy(o)}}var o=t("./ReactDefaultBatchingStrategy"),a=t("./ReactElement"),s=t("./ReactInstanceHandles"),u=t("./ReactMarkupChecksum"),c=t("./ReactServerBatchingStrategy"),l=t("./ReactServerRenderingTransaction"),f=t("./ReactUpdates"),p=t("fbjs/lib/emptyObject"),h=t("./instantiateReactComponent"),d=t("fbjs/lib/invariant");e.exports={renderToString:r,renderToStaticMarkup:i}},{"./ReactDefaultBatchingStrategy":71,"./ReactElement":73,"./ReactInstanceHandles":82,"./ReactMarkupChecksum":85,"./ReactServerBatchingStrategy":100,"./ReactServerRenderingTransaction":102,"./ReactUpdates":104,"./instantiateReactComponent":139,"fbjs/lib/emptyObject":158,"fbjs/lib/invariant":165}],102:[function(t,e,n){"use strict";function r(t){this.reinitializeTransaction(),this.renderToStaticMarkup=t,this.reactMountReady=o.getPooled(null),this.useCreateElement=!1}var i=t("./PooledClass"),o=t("./CallbackQueue"),a=t("./Transaction"),s=t("./Object.assign"),u=t("fbjs/lib/emptyFunction"),c={initialize:function(){this.reactMountReady.reset()},close:u},l=[c],f={getTransactionWrappers:function(){return l},getReactMountReady:function(){return this.reactMountReady},destructor:function(){o.release(this.reactMountReady),this.reactMountReady=null}};s(r.prototype,a.Mixin,f),i.addPoolingTo(r),e.exports=r},{"./CallbackQueue":28,"./Object.assign":45,"./PooledClass":46,"./Transaction":121,"fbjs/lib/emptyFunction":157}],103:[function(t,e,n){"use strict";function r(t){s.enqueueUpdate(t)}function i(t,e){var n=a.get(t);return n?n:null}var o=(t("./ReactCurrentOwner"),t("./ReactElement")),a=t("./ReactInstanceMap"),s=t("./ReactUpdates"),u=t("./Object.assign"),c=t("fbjs/lib/invariant"),l=(t("fbjs/lib/warning"),{isMounted:function(t){var e=a.get(t);return e?!!e._renderedComponent:!1},enqueueCallback:function(t,e){"function"!=typeof e?c(!1):void 0;var n=i(t);return n?(n._pendingCallbacks?n._pendingCallbacks.push(e):n._pendingCallbacks=[e],void r(n)):null},enqueueCallbackInternal:function(t,e){"function"!=typeof e?c(!1):void 0,t._pendingCallbacks?t._pendingCallbacks.push(e):t._pendingCallbacks=[e],r(t)},enqueueForceUpdate:function(t){var e=i(t,"forceUpdate");e&&(e._pendingForceUpdate=!0,r(e))},enqueueReplaceState:function(t,e){var n=i(t,"replaceState");n&&(n._pendingStateQueue=[e],n._pendingReplaceState=!0,r(n))},enqueueSetState:function(t,e){var n=i(t,"setState");if(n){var o=n._pendingStateQueue||(n._pendingStateQueue=[]);o.push(e),r(n)}},enqueueSetProps:function(t,e){var n=i(t,"setProps");n&&l.enqueueSetPropsInternal(n,e)},enqueueSetPropsInternal:function(t,e){var n=t._topLevelWrapper;n?void 0:c(!1);var i=n._pendingElement||n._currentElement,a=i.props,s=u({},a.props,e);n._pendingElement=o.cloneAndReplaceProps(i,o.cloneAndReplaceProps(a,s)),r(n)},enqueueReplaceProps:function(t,e){var n=i(t,"replaceProps");n&&l.enqueueReplacePropsInternal(n,e)},enqueueReplacePropsInternal:function(t,e){var n=t._topLevelWrapper;n?void 0:c(!1);var i=n._pendingElement||n._currentElement,a=i.props;n._pendingElement=o.cloneAndReplaceProps(i,o.cloneAndReplaceProps(a,e)),r(n)},enqueueElementInternal:function(t,e){t._pendingElement=e,r(t)}});e.exports=l},{"./Object.assign":45,"./ReactCurrentOwner":57,"./ReactElement":73,"./ReactInstanceMap":83,"./ReactUpdates":104,"fbjs/lib/invariant":165,"fbjs/lib/warning":174}],104:[function(t,e,n){"use strict";function r(){O.ReactReconcileTransaction&&w?void 0:g(!1)}function i(){this.reinitializeTransaction(),this.dirtyComponentsLength=null,this.callbackQueue=l.getPooled(),this.reconcileTransaction=O.ReactReconcileTransaction.getPooled(!1)}function o(t,e,n,i,o,a){r(),w.batchedUpdates(t,e,n,i,o,a)}function a(t,e){return t._mountOrder-e._mountOrder}function s(t){var e=t.dirtyComponentsLength;e!==m.length?g(!1):void 0,m.sort(a);for(var n=0;e>n;n++){var r=m[n],i=r._pendingCallbacks;if(r._pendingCallbacks=null,h.performUpdateIfNecessary(r,t.reconcileTransaction),i)for(var o=0;o<i.length;o++)t.callbackQueue.enqueue(i[o],r.getPublicInstance())}}function u(t){return r(),w.isBatchingUpdates?void m.push(t):void w.batchedUpdates(u,t)}function c(t,e){w.isBatchingUpdates?void 0:g(!1),y.enqueue(t,e),b=!0}var l=t("./CallbackQueue"),f=t("./PooledClass"),p=t("./ReactPerf"),h=t("./ReactReconciler"),d=t("./Transaction"),v=t("./Object.assign"),g=t("fbjs/lib/invariant"),m=[],y=l.getPooled(),b=!1,w=null,_={initialize:function(){this.dirtyComponentsLength=m.length},close:function(){this.dirtyComponentsLength!==m.length?(m.splice(0,this.dirtyComponentsLength),R()):m.length=0}},E={initialize:function(){this.callbackQueue.reset()},close:function(){this.callbackQueue.notifyAll()}},C=[_,E];v(i.prototype,d.Mixin,{getTransactionWrappers:function(){return C},destructor:function(){this.dirtyComponentsLength=null,l.release(this.callbackQueue),this.callbackQueue=null,O.ReactReconcileTransaction.release(this.reconcileTransaction),this.reconcileTransaction=null},perform:function(t,e,n){return d.Mixin.perform.call(this,this.reconcileTransaction.perform,this.reconcileTransaction,t,e,n)}}),f.addPoolingTo(i);var R=function(){for(;m.length||b;){if(m.length){var t=i.getPooled();t.perform(s,null,t),i.release(t)}if(b){b=!1;var e=y;y=l.getPooled(),e.notifyAll(),l.release(e)}}};R=p.measure("ReactUpdates","flushBatchedUpdates",R);var k={injectReconcileTransaction:function(t){t?void 0:g(!1),O.ReactReconcileTransaction=t},injectBatchingStrategy:function(t){t?void 0:g(!1),"function"!=typeof t.batchedUpdates?g(!1):void 0,"boolean"!=typeof t.isBatchingUpdates?g(!1):void 0,w=t}},O={ReactReconcileTransaction:null,batchedUpdates:o,enqueueUpdate:u,flushBatchedUpdates:R,injection:k,asap:c};e.exports=O},{"./CallbackQueue":28,"./Object.assign":45,"./PooledClass":46,"./ReactPerf":92,"./ReactReconciler":97,"./Transaction":121,"fbjs/lib/invariant":165}],105:[function(t,e,n){"use strict";e.exports="0.14.2"},{}],106:[function(t,e,n){"use strict";var r=t("./DOMProperty"),i=r.injection.MUST_USE_ATTRIBUTE,o={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},a={Properties:{clipPath:i,cx:i,cy:i,d:i,dx:i,dy:i,fill:i,fillOpacity:i,fontFamily:i,fontSize:i,fx:i,fy:i,gradientTransform:i,gradientUnits:i,markerEnd:i,markerMid:i,markerStart:i,offset:i,opacity:i,patternContentUnits:i,patternUnits:i,points:i,preserveAspectRatio:i,r:i,rx:i,ry:i,spreadMethod:i,stopColor:i,stopOpacity:i,stroke:i,strokeDasharray:i,strokeLinecap:i,strokeOpacity:i,strokeWidth:i,textAnchor:i,transform:i,version:i,viewBox:i,x1:i,x2:i,x:i,xlinkActuate:i,xlinkArcrole:i,xlinkHref:i,xlinkRole:i,xlinkShow:i,xlinkTitle:i,xlinkType:i,xmlBase:i,xmlLang:i,xmlSpace:i,y1:i,y2:i,y:i},DOMAttributeNamespaces:{xlinkActuate:o.xlink,xlinkArcrole:o.xlink,xlinkHref:o.xlink,xlinkRole:o.xlink,xlinkShow:o.xlink,xlinkTitle:o.xlink,xlinkType:o.xlink,xmlBase:o.xml,xmlLang:o.xml,xmlSpace:o.xml},DOMAttributeNames:{clipPath:"clip-path",fillOpacity:"fill-opacity",fontFamily:"font-family",fontSize:"font-size",gradientTransform:"gradientTransform",gradientUnits:"gradientUnits",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",patternContentUnits:"patternContentUnits",patternUnits:"patternUnits",preserveAspectRatio:"preserveAspectRatio",spreadMethod:"spreadMethod",stopColor:"stop-color",stopOpacity:"stop-opacity",strokeDasharray:"stroke-dasharray",
strokeLinecap:"stroke-linecap",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",textAnchor:"text-anchor",viewBox:"viewBox",xlinkActuate:"xlink:actuate",xlinkArcrole:"xlink:arcrole",xlinkHref:"xlink:href",xlinkRole:"xlink:role",xlinkShow:"xlink:show",xlinkTitle:"xlink:title",xlinkType:"xlink:type",xmlBase:"xml:base",xmlLang:"xml:lang",xmlSpace:"xml:space"}};e.exports=a},{"./DOMProperty":32}],107:[function(t,e,n){"use strict";function r(t){if("selectionStart"in t&&u.hasSelectionCapabilities(t))return{start:t.selectionStart,end:t.selectionEnd};if(window.getSelection){var e=window.getSelection();return{anchorNode:e.anchorNode,anchorOffset:e.anchorOffset,focusNode:e.focusNode,focusOffset:e.focusOffset}}if(document.selection){var n=document.selection.createRange();return{parentElement:n.parentElement(),text:n.text,top:n.boundingTop,left:n.boundingLeft}}}function i(t,e){if(w||null==m||m!==l())return null;var n=r(m);if(!b||!h(b,n)){b=n;var i=c.getPooled(g.select,y,t,e);return i.type="select",i.target=m,a.accumulateTwoPhaseDispatches(i),i}return null}var o=t("./EventConstants"),a=t("./EventPropagators"),s=t("fbjs/lib/ExecutionEnvironment"),u=t("./ReactInputSelection"),c=t("./SyntheticEvent"),l=t("fbjs/lib/getActiveElement"),f=t("./isTextInputElement"),p=t("fbjs/lib/keyOf"),h=t("fbjs/lib/shallowEqual"),d=o.topLevelTypes,v=s.canUseDOM&&"documentMode"in document&&document.documentMode<=11,g={select:{phasedRegistrationNames:{bubbled:p({onSelect:null}),captured:p({onSelectCapture:null})},dependencies:[d.topBlur,d.topContextMenu,d.topFocus,d.topKeyDown,d.topMouseDown,d.topMouseUp,d.topSelectionChange]}},m=null,y=null,b=null,w=!1,_=!1,E=p({onSelect:null}),C={eventTypes:g,extractEvents:function(t,e,n,r,o){if(!_)return null;switch(t){case d.topFocus:(f(e)||"true"===e.contentEditable)&&(m=e,y=n,b=null);break;case d.topBlur:m=null,y=null,b=null;break;case d.topMouseDown:w=!0;break;case d.topContextMenu:case d.topMouseUp:return w=!1,i(r,o);case d.topSelectionChange:if(v)break;case d.topKeyDown:case d.topKeyUp:return i(r,o)}return null},didPutListener:function(t,e,n){e===E&&(_=!0)}};e.exports=C},{"./EventConstants":37,"./EventPropagators":41,"./ReactInputSelection":81,"./SyntheticEvent":113,"./isTextInputElement":141,"fbjs/lib/ExecutionEnvironment":151,"fbjs/lib/getActiveElement":160,"fbjs/lib/keyOf":169,"fbjs/lib/shallowEqual":172}],108:[function(t,e,n){"use strict";var r=Math.pow(2,53),i={createReactRootIndex:function(){return Math.ceil(Math.random()*r)}};e.exports=i},{}],109:[function(t,e,n){"use strict";var r=t("./EventConstants"),i=t("fbjs/lib/EventListener"),o=t("./EventPropagators"),a=t("./ReactMount"),s=t("./SyntheticClipboardEvent"),u=t("./SyntheticEvent"),c=t("./SyntheticFocusEvent"),l=t("./SyntheticKeyboardEvent"),f=t("./SyntheticMouseEvent"),p=t("./SyntheticDragEvent"),h=t("./SyntheticTouchEvent"),d=t("./SyntheticUIEvent"),v=t("./SyntheticWheelEvent"),g=t("fbjs/lib/emptyFunction"),m=t("./getEventCharCode"),y=t("fbjs/lib/invariant"),b=t("fbjs/lib/keyOf"),w=r.topLevelTypes,_={abort:{phasedRegistrationNames:{bubbled:b({onAbort:!0}),captured:b({onAbortCapture:!0})}},blur:{phasedRegistrationNames:{bubbled:b({onBlur:!0}),captured:b({onBlurCapture:!0})}},canPlay:{phasedRegistrationNames:{bubbled:b({onCanPlay:!0}),captured:b({onCanPlayCapture:!0})}},canPlayThrough:{phasedRegistrationNames:{bubbled:b({onCanPlayThrough:!0}),captured:b({onCanPlayThroughCapture:!0})}},click:{phasedRegistrationNames:{bubbled:b({onClick:!0}),captured:b({onClickCapture:!0})}},contextMenu:{phasedRegistrationNames:{bubbled:b({onContextMenu:!0}),captured:b({onContextMenuCapture:!0})}},copy:{phasedRegistrationNames:{bubbled:b({onCopy:!0}),captured:b({onCopyCapture:!0})}},cut:{phasedRegistrationNames:{bubbled:b({onCut:!0}),captured:b({onCutCapture:!0})}},doubleClick:{phasedRegistrationNames:{bubbled:b({onDoubleClick:!0}),captured:b({onDoubleClickCapture:!0})}},drag:{phasedRegistrationNames:{bubbled:b({onDrag:!0}),captured:b({onDragCapture:!0})}},dragEnd:{phasedRegistrationNames:{bubbled:b({onDragEnd:!0}),captured:b({onDragEndCapture:!0})}},dragEnter:{phasedRegistrationNames:{bubbled:b({onDragEnter:!0}),captured:b({onDragEnterCapture:!0})}},dragExit:{phasedRegistrationNames:{bubbled:b({onDragExit:!0}),captured:b({onDragExitCapture:!0})}},dragLeave:{phasedRegistrationNames:{bubbled:b({onDragLeave:!0}),captured:b({onDragLeaveCapture:!0})}},dragOver:{phasedRegistrationNames:{bubbled:b({onDragOver:!0}),captured:b({onDragOverCapture:!0})}},dragStart:{phasedRegistrationNames:{bubbled:b({onDragStart:!0}),captured:b({onDragStartCapture:!0})}},drop:{phasedRegistrationNames:{bubbled:b({onDrop:!0}),captured:b({onDropCapture:!0})}},durationChange:{phasedRegistrationNames:{bubbled:b({onDurationChange:!0}),captured:b({onDurationChangeCapture:!0})}},emptied:{phasedRegistrationNames:{bubbled:b({onEmptied:!0}),captured:b({onEmptiedCapture:!0})}},encrypted:{phasedRegistrationNames:{bubbled:b({onEncrypted:!0}),captured:b({onEncryptedCapture:!0})}},ended:{phasedRegistrationNames:{bubbled:b({onEnded:!0}),captured:b({onEndedCapture:!0})}},error:{phasedRegistrationNames:{bubbled:b({onError:!0}),captured:b({onErrorCapture:!0})}},focus:{phasedRegistrationNames:{bubbled:b({onFocus:!0}),captured:b({onFocusCapture:!0})}},input:{phasedRegistrationNames:{bubbled:b({onInput:!0}),captured:b({onInputCapture:!0})}},keyDown:{phasedRegistrationNames:{bubbled:b({onKeyDown:!0}),captured:b({onKeyDownCapture:!0})}},keyPress:{phasedRegistrationNames:{bubbled:b({onKeyPress:!0}),captured:b({onKeyPressCapture:!0})}},keyUp:{phasedRegistrationNames:{bubbled:b({onKeyUp:!0}),captured:b({onKeyUpCapture:!0})}},load:{phasedRegistrationNames:{bubbled:b({onLoad:!0}),captured:b({onLoadCapture:!0})}},loadedData:{phasedRegistrationNames:{bubbled:b({onLoadedData:!0}),captured:b({onLoadedDataCapture:!0})}},loadedMetadata:{phasedRegistrationNames:{bubbled:b({onLoadedMetadata:!0}),captured:b({onLoadedMetadataCapture:!0})}},loadStart:{phasedRegistrationNames:{bubbled:b({onLoadStart:!0}),captured:b({onLoadStartCapture:!0})}},mouseDown:{phasedRegistrationNames:{bubbled:b({onMouseDown:!0}),captured:b({onMouseDownCapture:!0})}},mouseMove:{phasedRegistrationNames:{bubbled:b({onMouseMove:!0}),captured:b({onMouseMoveCapture:!0})}},mouseOut:{phasedRegistrationNames:{bubbled:b({onMouseOut:!0}),captured:b({onMouseOutCapture:!0})}},mouseOver:{phasedRegistrationNames:{bubbled:b({onMouseOver:!0}),captured:b({onMouseOverCapture:!0})}},mouseUp:{phasedRegistrationNames:{bubbled:b({onMouseUp:!0}),captured:b({onMouseUpCapture:!0})}},paste:{phasedRegistrationNames:{bubbled:b({onPaste:!0}),captured:b({onPasteCapture:!0})}},pause:{phasedRegistrationNames:{bubbled:b({onPause:!0}),captured:b({onPauseCapture:!0})}},play:{phasedRegistrationNames:{bubbled:b({onPlay:!0}),captured:b({onPlayCapture:!0})}},playing:{phasedRegistrationNames:{bubbled:b({onPlaying:!0}),captured:b({onPlayingCapture:!0})}},progress:{phasedRegistrationNames:{bubbled:b({onProgress:!0}),captured:b({onProgressCapture:!0})}},rateChange:{phasedRegistrationNames:{bubbled:b({onRateChange:!0}),captured:b({onRateChangeCapture:!0})}},reset:{phasedRegistrationNames:{bubbled:b({onReset:!0}),captured:b({onResetCapture:!0})}},scroll:{phasedRegistrationNames:{bubbled:b({onScroll:!0}),captured:b({onScrollCapture:!0})}},seeked:{phasedRegistrationNames:{bubbled:b({onSeeked:!0}),captured:b({onSeekedCapture:!0})}},seeking:{phasedRegistrationNames:{bubbled:b({onSeeking:!0}),captured:b({onSeekingCapture:!0})}},stalled:{phasedRegistrationNames:{bubbled:b({onStalled:!0}),captured:b({onStalledCapture:!0})}},submit:{phasedRegistrationNames:{bubbled:b({onSubmit:!0}),captured:b({onSubmitCapture:!0})}},suspend:{phasedRegistrationNames:{bubbled:b({onSuspend:!0}),captured:b({onSuspendCapture:!0})}},timeUpdate:{phasedRegistrationNames:{bubbled:b({onTimeUpdate:!0}),captured:b({onTimeUpdateCapture:!0})}},touchCancel:{phasedRegistrationNames:{bubbled:b({onTouchCancel:!0}),captured:b({onTouchCancelCapture:!0})}},touchEnd:{phasedRegistrationNames:{bubbled:b({onTouchEnd:!0}),captured:b({onTouchEndCapture:!0})}},touchMove:{phasedRegistrationNames:{bubbled:b({onTouchMove:!0}),captured:b({onTouchMoveCapture:!0})}},touchStart:{phasedRegistrationNames:{bubbled:b({onTouchStart:!0}),captured:b({onTouchStartCapture:!0})}},volumeChange:{phasedRegistrationNames:{bubbled:b({onVolumeChange:!0}),captured:b({onVolumeChangeCapture:!0})}},waiting:{phasedRegistrationNames:{bubbled:b({onWaiting:!0}),captured:b({onWaitingCapture:!0})}},wheel:{phasedRegistrationNames:{bubbled:b({onWheel:!0}),captured:b({onWheelCapture:!0})}}},E={topAbort:_.abort,topBlur:_.blur,topCanPlay:_.canPlay,topCanPlayThrough:_.canPlayThrough,topClick:_.click,topContextMenu:_.contextMenu,topCopy:_.copy,topCut:_.cut,topDoubleClick:_.doubleClick,topDrag:_.drag,topDragEnd:_.dragEnd,topDragEnter:_.dragEnter,topDragExit:_.dragExit,topDragLeave:_.dragLeave,topDragOver:_.dragOver,topDragStart:_.dragStart,topDrop:_.drop,topDurationChange:_.durationChange,topEmptied:_.emptied,topEncrypted:_.encrypted,topEnded:_.ended,topError:_.error,topFocus:_.focus,topInput:_.input,topKeyDown:_.keyDown,topKeyPress:_.keyPress,topKeyUp:_.keyUp,topLoad:_.load,topLoadedData:_.loadedData,topLoadedMetadata:_.loadedMetadata,topLoadStart:_.loadStart,topMouseDown:_.mouseDown,topMouseMove:_.mouseMove,topMouseOut:_.mouseOut,topMouseOver:_.mouseOver,topMouseUp:_.mouseUp,topPaste:_.paste,topPause:_.pause,topPlay:_.play,topPlaying:_.playing,topProgress:_.progress,topRateChange:_.rateChange,topReset:_.reset,topScroll:_.scroll,topSeeked:_.seeked,topSeeking:_.seeking,topStalled:_.stalled,topSubmit:_.submit,topSuspend:_.suspend,topTimeUpdate:_.timeUpdate,topTouchCancel:_.touchCancel,topTouchEnd:_.touchEnd,topTouchMove:_.touchMove,topTouchStart:_.touchStart,topVolumeChange:_.volumeChange,topWaiting:_.waiting,topWheel:_.wheel};for(var C in E)E[C].dependencies=[C];var R=b({onClick:null}),k={},O={eventTypes:_,extractEvents:function(t,e,n,r,i){var a=E[t];if(!a)return null;var g;switch(t){case w.topAbort:case w.topCanPlay:case w.topCanPlayThrough:case w.topDurationChange:case w.topEmptied:case w.topEncrypted:case w.topEnded:case w.topError:case w.topInput:case w.topLoad:case w.topLoadedData:case w.topLoadedMetadata:case w.topLoadStart:case w.topPause:case w.topPlay:case w.topPlaying:case w.topProgress:case w.topRateChange:case w.topReset:case w.topSeeked:case w.topSeeking:case w.topStalled:case w.topSubmit:case w.topSuspend:case w.topTimeUpdate:case w.topVolumeChange:case w.topWaiting:g=u;break;case w.topKeyPress:if(0===m(r))return null;case w.topKeyDown:case w.topKeyUp:g=l;break;case w.topBlur:case w.topFocus:g=c;break;case w.topClick:if(2===r.button)return null;case w.topContextMenu:case w.topDoubleClick:case w.topMouseDown:case w.topMouseMove:case w.topMouseOut:case w.topMouseOver:case w.topMouseUp:g=f;break;case w.topDrag:case w.topDragEnd:case w.topDragEnter:case w.topDragExit:case w.topDragLeave:case w.topDragOver:case w.topDragStart:case w.topDrop:g=p;break;case w.topTouchCancel:case w.topTouchEnd:case w.topTouchMove:case w.topTouchStart:g=h;break;case w.topScroll:g=d;break;case w.topWheel:g=v;break;case w.topCopy:case w.topCut:case w.topPaste:g=s}g?void 0:y(!1);var b=g.getPooled(a,n,r,i);return o.accumulateTwoPhaseDispatches(b),b},didPutListener:function(t,e,n){if(e===R){var r=a.getNode(t);k[t]||(k[t]=i.listen(r,"click",g))}},willDeleteListener:function(t,e){e===R&&(k[t].remove(),delete k[t])}};e.exports=O},{"./EventConstants":37,"./EventPropagators":41,"./ReactMount":86,"./SyntheticClipboardEvent":110,"./SyntheticDragEvent":112,"./SyntheticEvent":113,"./SyntheticFocusEvent":114,"./SyntheticKeyboardEvent":116,"./SyntheticMouseEvent":117,"./SyntheticTouchEvent":118,"./SyntheticUIEvent":119,"./SyntheticWheelEvent":120,"./getEventCharCode":132,"fbjs/lib/EventListener":150,"fbjs/lib/emptyFunction":157,"fbjs/lib/invariant":165,"fbjs/lib/keyOf":169}],110:[function(t,e,n){"use strict";function r(t,e,n,r){i.call(this,t,e,n,r)}var i=t("./SyntheticEvent"),o={clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}};i.augmentClass(r,o),e.exports=r},{"./SyntheticEvent":113}],111:[function(t,e,n){"use strict";function r(t,e,n,r){i.call(this,t,e,n,r)}var i=t("./SyntheticEvent"),o={data:null};i.augmentClass(r,o),e.exports=r},{"./SyntheticEvent":113}],112:[function(t,e,n){"use strict";function r(t,e,n,r){i.call(this,t,e,n,r)}var i=t("./SyntheticMouseEvent"),o={dataTransfer:null};i.augmentClass(r,o),e.exports=r},{"./SyntheticMouseEvent":117}],113:[function(t,e,n){"use strict";function r(t,e,n,r){this.dispatchConfig=t,this.dispatchMarker=e,this.nativeEvent=n,this.target=r,this.currentTarget=r;var i=this.constructor.Interface;for(var o in i)if(i.hasOwnProperty(o)){var s=i[o];s?this[o]=s(n):this[o]=n[o]}var u=null!=n.defaultPrevented?n.defaultPrevented:n.returnValue===!1;u?this.isDefaultPrevented=a.thatReturnsTrue:this.isDefaultPrevented=a.thatReturnsFalse,this.isPropagationStopped=a.thatReturnsFalse}var i=t("./PooledClass"),o=t("./Object.assign"),a=t("fbjs/lib/emptyFunction"),s=(t("fbjs/lib/warning"),{type:null,currentTarget:a.thatReturnsNull,eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null});o(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var t=this.nativeEvent;t&&(t.preventDefault?t.preventDefault():t.returnValue=!1,this.isDefaultPrevented=a.thatReturnsTrue)},stopPropagation:function(){var t=this.nativeEvent;t&&(t.stopPropagation?t.stopPropagation():t.cancelBubble=!0,this.isPropagationStopped=a.thatReturnsTrue)},persist:function(){this.isPersistent=a.thatReturnsTrue},isPersistent:a.thatReturnsFalse,destructor:function(){var t=this.constructor.Interface;for(var e in t)this[e]=null;this.dispatchConfig=null,this.dispatchMarker=null,this.nativeEvent=null}}),r.Interface=s,r.augmentClass=function(t,e){var n=this,r=Object.create(n.prototype);o(r,t.prototype),t.prototype=r,t.prototype.constructor=t,t.Interface=o({},n.Interface,e),t.augmentClass=n.augmentClass,i.addPoolingTo(t,i.fourArgumentPooler)},i.addPoolingTo(r,i.fourArgumentPooler),e.exports=r},{"./Object.assign":45,"./PooledClass":46,"fbjs/lib/emptyFunction":157,"fbjs/lib/warning":174}],114:[function(t,e,n){"use strict";function r(t,e,n,r){i.call(this,t,e,n,r)}var i=t("./SyntheticUIEvent"),o={relatedTarget:null};i.augmentClass(r,o),e.exports=r},{"./SyntheticUIEvent":119}],115:[function(t,e,n){"use strict";function r(t,e,n,r){i.call(this,t,e,n,r)}var i=t("./SyntheticEvent"),o={data:null};i.augmentClass(r,o),e.exports=r},{"./SyntheticEvent":113}],116:[function(t,e,n){"use strict";function r(t,e,n,r){i.call(this,t,e,n,r)}var i=t("./SyntheticUIEvent"),o=t("./getEventCharCode"),a=t("./getEventKey"),s=t("./getEventModifierState"),u={key:a,location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:s,charCode:function(t){return"keypress"===t.type?o(t):0},keyCode:function(t){return"keydown"===t.type||"keyup"===t.type?t.keyCode:0},which:function(t){return"keypress"===t.type?o(t):"keydown"===t.type||"keyup"===t.type?t.keyCode:0}};i.augmentClass(r,u),e.exports=r},{"./SyntheticUIEvent":119,"./getEventCharCode":132,"./getEventKey":133,"./getEventModifierState":134}],117:[function(t,e,n){"use strict";function r(t,e,n,r){i.call(this,t,e,n,r)}var i=t("./SyntheticUIEvent"),o=t("./ViewportMetrics"),a=t("./getEventModifierState"),s={screenX:null,screenY:null,clientX:null,clientY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:a,button:function(t){var e=t.button;return"which"in t?e:2===e?2:4===e?1:0},buttons:null,relatedTarget:function(t){return t.relatedTarget||(t.fromElement===t.srcElement?t.toElement:t.fromElement)},pageX:function(t){return"pageX"in t?t.pageX:t.clientX+o.currentScrollLeft},pageY:function(t){return"pageY"in t?t.pageY:t.clientY+o.currentScrollTop}};i.augmentClass(r,s),e.exports=r},{"./SyntheticUIEvent":119,"./ViewportMetrics":122,"./getEventModifierState":134}],118:[function(t,e,n){"use strict";function r(t,e,n,r){i.call(this,t,e,n,r)}var i=t("./SyntheticUIEvent"),o=t("./getEventModifierState"),a={touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:o};i.augmentClass(r,a),e.exports=r},{"./SyntheticUIEvent":119,"./getEventModifierState":134}],119:[function(t,e,n){"use strict";function r(t,e,n,r){i.call(this,t,e,n,r)}var i=t("./SyntheticEvent"),o=t("./getEventTarget"),a={view:function(t){if(t.view)return t.view;var e=o(t);if(null!=e&&e.window===e)return e;var n=e.ownerDocument;return n?n.defaultView||n.parentWindow:window},detail:function(t){return t.detail||0}};i.augmentClass(r,a),e.exports=r},{"./SyntheticEvent":113,"./getEventTarget":135}],120:[function(t,e,n){"use strict";function r(t,e,n,r){i.call(this,t,e,n,r)}var i=t("./SyntheticMouseEvent"),o={deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:null,deltaMode:null};i.augmentClass(r,o),e.exports=r},{"./SyntheticMouseEvent":117}],121:[function(t,e,n){"use strict";var r=t("fbjs/lib/invariant"),i={reinitializeTransaction:function(){this.transactionWrappers=this.getTransactionWrappers(),this.wrapperInitData?this.wrapperInitData.length=0:this.wrapperInitData=[],this._isInTransaction=!1},_isInTransaction:!1,getTransactionWrappers:null,isInTransaction:function(){return!!this._isInTransaction},perform:function(t,e,n,i,o,a,s,u){this.isInTransaction()?r(!1):void 0;var c,l;try{this._isInTransaction=!0,c=!0,this.initializeAll(0),l=t.call(e,n,i,o,a,s,u),c=!1}finally{try{if(c)try{this.closeAll(0)}catch(f){}else this.closeAll(0)}finally{this._isInTransaction=!1}}return l},initializeAll:function(t){for(var e=this.transactionWrappers,n=t;n<e.length;n++){var r=e[n];try{this.wrapperInitData[n]=o.OBSERVED_ERROR,this.wrapperInitData[n]=r.initialize?r.initialize.call(this):null}finally{if(this.wrapperInitData[n]===o.OBSERVED_ERROR)try{this.initializeAll(n+1)}catch(i){}}}},closeAll:function(t){this.isInTransaction()?void 0:r(!1);for(var e=this.transactionWrappers,n=t;n<e.length;n++){var i,a=e[n],s=this.wrapperInitData[n];try{i=!0,s!==o.OBSERVED_ERROR&&a.close&&a.close.call(this,s),i=!1}finally{if(i)try{this.closeAll(n+1)}catch(u){}}}this.wrapperInitData.length=0}},o={Mixin:i,OBSERVED_ERROR:{}};e.exports=o},{"fbjs/lib/invariant":165}],122:[function(t,e,n){"use strict";var r={currentScrollLeft:0,currentScrollTop:0,refreshScrollValues:function(t){r.currentScrollLeft=t.x,r.currentScrollTop=t.y}};e.exports=r},{}],123:[function(t,e,n){"use strict";function r(t,e){if(null==e?i(!1):void 0,null==t)return e;var n=Array.isArray(t),r=Array.isArray(e);return n&&r?(t.push.apply(t,e),t):n?(t.push(e),t):r?[t].concat(e):[t,e]}var i=t("fbjs/lib/invariant");e.exports=r},{"fbjs/lib/invariant":165}],124:[function(t,e,n){"use strict";function r(t){for(var e=1,n=0,r=0,o=t.length,a=-4&o;a>r;){for(;r<Math.min(r+4096,a);r+=4)n+=(e+=t.charCodeAt(r))+(e+=t.charCodeAt(r+1))+(e+=t.charCodeAt(r+2))+(e+=t.charCodeAt(r+3));e%=i,n%=i}for(;o>r;r++)n+=e+=t.charCodeAt(r);return e%=i,n%=i,e|n<<16}var i=65521;e.exports=r},{}],125:[function(t,e,n){"use strict";var r=!1;e.exports=r},{}],126:[function(t,e,n){"use strict";function r(t,e){var n=null==e||"boolean"==typeof e||""===e;if(n)return"";var r=isNaN(e);return r||0===e||o.hasOwnProperty(t)&&o[t]?""+e:("string"==typeof e&&(e=e.trim()),e+"px")}var i=t("./CSSProperty"),o=i.isUnitlessNumber;e.exports=r},{"./CSSProperty":26}],127:[function(t,e,n){"use strict";function r(t,e,n,r,i){return i}t("./Object.assign"),t("fbjs/lib/warning");e.exports=r},{"./Object.assign":45,"fbjs/lib/warning":174}],128:[function(t,e,n){"use strict";function r(t){return o[t]}function i(t){return(""+t).replace(a,r)}var o={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},a=/[&><"']/g;e.exports=i},{}],129:[function(t,e,n){"use strict";function r(t){return null==t?null:1===t.nodeType?t:i.has(t)?o.getNodeFromInstance(t):(null!=t.render&&"function"==typeof t.render?a(!1):void 0,void a(!1))}var i=(t("./ReactCurrentOwner"),t("./ReactInstanceMap")),o=t("./ReactMount"),a=t("fbjs/lib/invariant");t("fbjs/lib/warning");e.exports=r},{"./ReactCurrentOwner":57,"./ReactInstanceMap":83,"./ReactMount":86,"fbjs/lib/invariant":165,"fbjs/lib/warning":174}],130:[function(t,e,n){"use strict";function r(t,e,n){var r=t,i=void 0===r[n];i&&null!=e&&(r[n]=e)}function i(t){if(null==t)return t;var e={};return o(t,r,e),e}var o=t("./traverseAllChildren");t("fbjs/lib/warning");e.exports=i},{"./traverseAllChildren":148,"fbjs/lib/warning":174}],131:[function(t,e,n){"use strict";var r=function(t,e,n){Array.isArray(t)?t.forEach(e,n):t&&e.call(n,t)};e.exports=r},{}],132:[function(t,e,n){"use strict";function r(t){var e,n=t.keyCode;return"charCode"in t?(e=t.charCode,0===e&&13===n&&(e=13)):e=n,e>=32||13===e?e:0}e.exports=r},{}],133:[function(t,e,n){"use strict";function r(t){if(t.key){var e=o[t.key]||t.key;if("Unidentified"!==e)return e}if("keypress"===t.type){var n=i(t);return 13===n?"Enter":String.fromCharCode(n)}return"keydown"===t.type||"keyup"===t.type?a[t.keyCode]||"Unidentified":""}var i=t("./getEventCharCode"),o={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},a={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"};e.exports=r},{"./getEventCharCode":132}],134:[function(t,e,n){"use strict";function r(t){var e=this,n=e.nativeEvent;if(n.getModifierState)return n.getModifierState(t);var r=o[t];return r?!!n[r]:!1}function i(t){return r}var o={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};e.exports=i},{}],135:[function(t,e,n){"use strict";function r(t){var e=t.target||t.srcElement||window;return 3===e.nodeType?e.parentNode:e}e.exports=r},{}],136:[function(t,e,n){"use strict";function r(t){var e=t&&(i&&t[i]||t[o]);return"function"==typeof e?e:void 0}var i="function"==typeof Symbol&&Symbol.iterator,o="@@iterator";e.exports=r},{}],137:[function(t,e,n){"use strict";function r(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function i(t){for(;t;){if(t.nextSibling)return t.nextSibling;t=t.parentNode}}function o(t,e){for(var n=r(t),o=0,a=0;n;){if(3===n.nodeType){if(a=o+n.textContent.length,e>=o&&a>=e)return{node:n,offset:e-o};o=a}n=r(i(n))}}e.exports=o},{}],138:[function(t,e,n){"use strict";function r(){return!o&&i.canUseDOM&&(o="textContent"in document.documentElement?"textContent":"innerText"),o}var i=t("fbjs/lib/ExecutionEnvironment"),o=null;e.exports=r},{"fbjs/lib/ExecutionEnvironment":151}],139:[function(t,e,n){"use strict";function r(t){return"function"==typeof t&&"undefined"!=typeof t.prototype&&"function"==typeof t.prototype.mountComponent&&"function"==typeof t.prototype.receiveComponent}function i(t){var e;if(null===t||t===!1)e=new a(i);else if("object"==typeof t){var n=t;!n||"function"!=typeof n.type&&"string"!=typeof n.type?c(!1):void 0,e="string"==typeof n.type?s.createInternalComponent(n):r(n.type)?new n.type(n):new l}else"string"==typeof t||"number"==typeof t?e=s.createInstanceForText(t):c(!1);return e.construct(t),e._mountIndex=0,e._mountImage=null,e}var o=t("./ReactCompositeComponent"),a=t("./ReactEmptyComponent"),s=t("./ReactNativeComponent"),u=t("./Object.assign"),c=t("fbjs/lib/invariant"),l=(t("fbjs/lib/warning"),function(){});u(l.prototype,o.Mixin,{_instantiateReactComponent:i}),e.exports=i},{"./Object.assign":45,"./ReactCompositeComponent":56,"./ReactEmptyComponent":75,"./ReactNativeComponent":89,"fbjs/lib/invariant":165,"fbjs/lib/warning":174}],140:[function(t,e,n){"use strict";function r(t,e){if(!o.canUseDOM||e&&!("addEventListener"in document))return!1;var n="on"+t,r=n in document;if(!r){var a=document.createElement("div");a.setAttribute(n,"return;"),r="function"==typeof a[n]}return!r&&i&&"wheel"===t&&(r=document.implementation.hasFeature("Events.wheel","3.0")),r}var i,o=t("fbjs/lib/ExecutionEnvironment");o.canUseDOM&&(i=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0),e.exports=r},{"fbjs/lib/ExecutionEnvironment":151}],141:[function(t,e,n){"use strict";function r(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&("input"===e&&i[t.type]||"textarea"===e)}var i={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};e.exports=r},{}],142:[function(t,e,n){"use strict";function r(t){return i.isValidElement(t)?void 0:o(!1),t}var i=t("./ReactElement"),o=t("fbjs/lib/invariant");e.exports=r},{"./ReactElement":73,"fbjs/lib/invariant":165}],143:[function(t,e,n){"use strict";function r(t){return'"'+i(t)+'"'}var i=t("./escapeTextContentForBrowser");e.exports=r},{"./escapeTextContentForBrowser":128}],144:[function(t,e,n){"use strict";var r=t("./ReactMount");e.exports=r.renderSubtreeIntoContainer},{"./ReactMount":86}],145:[function(t,e,n){"use strict";var r=t("fbjs/lib/ExecutionEnvironment"),i=/^[ \r\n\t\f]/,o=/<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/,a=function(t,e){t.innerHTML=e};if("undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction&&(a=function(t,e){MSApp.execUnsafeLocalFunction(function(){t.innerHTML=e})}),r.canUseDOM){var s=document.createElement("div");s.innerHTML=" ",""===s.innerHTML&&(a=function(t,e){if(t.parentNode&&t.parentNode.replaceChild(t,t),i.test(e)||"<"===e[0]&&o.test(e)){t.innerHTML=String.fromCharCode(65279)+e;var n=t.firstChild;1===n.data.length?t.removeChild(n):n.deleteData(0,1)}else t.innerHTML=e})}e.exports=a},{"fbjs/lib/ExecutionEnvironment":151}],146:[function(t,e,n){"use strict";var r=t("fbjs/lib/ExecutionEnvironment"),i=t("./escapeTextContentForBrowser"),o=t("./setInnerHTML"),a=function(t,e){t.textContent=e};r.canUseDOM&&("textContent"in document.documentElement||(a=function(t,e){o(t,i(e))})),e.exports=a},{"./escapeTextContentForBrowser":128,"./setInnerHTML":145,"fbjs/lib/ExecutionEnvironment":151}],147:[function(t,e,n){"use strict";function r(t,e){var n=null===t||t===!1,r=null===e||e===!1;if(n||r)return n===r;var i=typeof t,o=typeof e;return"string"===i||"number"===i?"string"===o||"number"===o:"object"===o&&t.type===e.type&&t.key===e.key}e.exports=r},{}],148:[function(t,e,n){"use strict";function r(t){return v[t]}function i(t,e){return t&&null!=t.key?a(t.key):e.toString(36)}function o(t){return(""+t).replace(g,r)}function a(t){return"$"+o(t)}function s(t,e,n,r){var o=typeof t;if(("undefined"===o||"boolean"===o)&&(t=null),null===t||"string"===o||"number"===o||c.isValidElement(t))return n(r,t,""===e?h+i(t,0):e),1;var u,l,v=0,g=""===e?h:e+d;if(Array.isArray(t))for(var m=0;m<t.length;m++)u=t[m],l=g+i(u,m),v+=s(u,l,n,r);else{var y=f(t);if(y){var b,w=y.call(t);if(y!==t.entries)for(var _=0;!(b=w.next()).done;)u=b.value,l=g+i(u,_++),v+=s(u,l,n,r);else for(;!(b=w.next()).done;){var E=b.value;E&&(u=E[1],l=g+a(E[0])+d+i(u,0),v+=s(u,l,n,r))}}else"object"===o&&(String(t),p(!1))}return v}function u(t,e,n){return null==t?0:s(t,"",e,n)}var c=(t("./ReactCurrentOwner"),t("./ReactElement")),l=t("./ReactInstanceHandles"),f=t("./getIteratorFn"),p=t("fbjs/lib/invariant"),h=(t("fbjs/lib/warning"),l.SEPARATOR),d=":",v={"=":"=0",".":"=1",":":"=2"},g=/[=.:]/g;e.exports=u},{"./ReactCurrentOwner":57,"./ReactElement":73,"./ReactInstanceHandles":82,"./getIteratorFn":136,"fbjs/lib/invariant":165,"fbjs/lib/warning":174}],149:[function(t,e,n){"use strict";var r=(t("./Object.assign"),t("fbjs/lib/emptyFunction")),i=(t("fbjs/lib/warning"),r);e.exports=i},{"./Object.assign":45,"fbjs/lib/emptyFunction":157,"fbjs/lib/warning":174}],150:[function(t,e,n){"use strict";var r=t("./emptyFunction"),i={listen:function(t,e,n){return t.addEventListener?(t.addEventListener(e,n,!1),{remove:function(){t.removeEventListener(e,n,!1)}}):t.attachEvent?(t.attachEvent("on"+e,n),{remove:function(){t.detachEvent("on"+e,n)}}):void 0},capture:function(t,e,n){return t.addEventListener?(t.addEventListener(e,n,!0),{remove:function(){t.removeEventListener(e,n,!0)}}):{remove:r}},registerDefault:function(){}};e.exports=i},{"./emptyFunction":157}],151:[function(t,e,n){"use strict";var r=!("undefined"==typeof window||!window.document||!window.document.createElement),i={canUseDOM:r,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen,isInWorker:!r};e.exports=i},{}],152:[function(t,e,n){"use strict";function r(t){return t.replace(i,function(t,e){return e.toUpperCase()})}var i=/-(.)/g;e.exports=r},{}],153:[function(t,e,n){"use strict";function r(t){return i(t.replace(o,"ms-"))}var i=t("./camelize"),o=/^-ms-/;e.exports=r},{"./camelize":152}],154:[function(t,e,n){"use strict";function r(t,e){var n=!0;t:for(;n;){var r=t,o=e;if(n=!1,r&&o){if(r===o)return!0;if(i(r))return!1;if(i(o)){t=r,e=o.parentNode,n=!0;continue t}return r.contains?r.contains(o):r.compareDocumentPosition?!!(16&r.compareDocumentPosition(o)):!1}return!1}}var i=t("./isTextNode");e.exports=r},{"./isTextNode":167}],155:[function(t,e,n){"use strict";function r(t){return!!t&&("object"==typeof t||"function"==typeof t)&&"length"in t&&!("setInterval"in t)&&"number"!=typeof t.nodeType&&(Array.isArray(t)||"callee"in t||"item"in t)}function i(t){return r(t)?Array.isArray(t)?t.slice():o(t):[t]}var o=t("./toArray");e.exports=i},{"./toArray":173}],156:[function(t,e,n){"use strict";function r(t){var e=t.match(l);return e&&e[1].toLowerCase()}function i(t,e){var n=c;c?void 0:u(!1);var i=r(t),o=i&&s(i);if(o){n.innerHTML=o[1]+t+o[2];for(var l=o[0];l--;)n=n.lastChild}else n.innerHTML=t;var f=n.getElementsByTagName("script");f.length&&(e?void 0:u(!1),a(f).forEach(e));for(var p=a(n.childNodes);n.lastChild;)n.removeChild(n.lastChild);return p}var o=t("./ExecutionEnvironment"),a=t("./createArrayFromMixed"),s=t("./getMarkupWrap"),u=t("./invariant"),c=o.canUseDOM?document.createElement("div"):null,l=/^\s*<(\w+)/;e.exports=i},{"./ExecutionEnvironment":151,"./createArrayFromMixed":155,"./getMarkupWrap":161,"./invariant":165}],157:[function(t,e,n){"use strict";function r(t){return function(){return t}}function i(){}i.thatReturns=r,i.thatReturnsFalse=r(!1),i.thatReturnsTrue=r(!0),i.thatReturnsNull=r(null),i.thatReturnsThis=function(){return this},i.thatReturnsArgument=function(t){return t},e.exports=i},{}],158:[function(t,e,n){"use strict";var r={};e.exports=r},{}],159:[function(t,e,n){"use strict";function r(t){try{t.focus()}catch(e){}}e.exports=r},{}],160:[function(t,e,n){"use strict";function r(){if("undefined"==typeof document)return null;try{return document.activeElement||document.body}catch(t){return document.body}}e.exports=r},{}],161:[function(t,e,n){"use strict";function r(t){return a?void 0:o(!1),p.hasOwnProperty(t)||(t="*"),s.hasOwnProperty(t)||("*"===t?a.innerHTML="<link />":a.innerHTML="<"+t+"></"+t+">",s[t]=!a.firstChild),s[t]?p[t]:null}var i=t("./ExecutionEnvironment"),o=t("./invariant"),a=i.canUseDOM?document.createElement("div"):null,s={},u=[1,'<select multiple="true">',"</select>"],c=[1,"<table>","</table>"],l=[3,"<table><tbody><tr>","</tr></tbody></table>"],f=[1,'<svg xmlns="http://www.w3.org/2000/svg">',"</svg>"],p={"*":[1,"?<div>","</div>"],area:[1,"<map>","</map>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],legend:[1,"<fieldset>","</fieldset>"],param:[1,"<object>","</object>"],tr:[2,"<table><tbody>","</tbody></table>"],optgroup:u,option:u,caption:c,colgroup:c,tbody:c,tfoot:c,thead:c,td:l,th:l},h=["circle","clipPath","defs","ellipse","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","text","tspan"];
h.forEach(function(t){p[t]=f,s[t]=!0}),e.exports=r},{"./ExecutionEnvironment":151,"./invariant":165}],162:[function(t,e,n){"use strict";function r(t){return t===window?{x:window.pageXOffset||document.documentElement.scrollLeft,y:window.pageYOffset||document.documentElement.scrollTop}:{x:t.scrollLeft,y:t.scrollTop}}e.exports=r},{}],163:[function(t,e,n){"use strict";function r(t){return t.replace(i,"-$1").toLowerCase()}var i=/([A-Z])/g;e.exports=r},{}],164:[function(t,e,n){"use strict";function r(t){return i(t).replace(o,"-ms-")}var i=t("./hyphenate"),o=/^ms-/;e.exports=r},{"./hyphenate":163}],165:[function(t,e,n){"use strict";var r=function(t,e,n,r,i,o,a,s){if(!t){var u;if(void 0===e)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,i,o,a,s],l=0;u=new Error("Invariant Violation: "+e.replace(/%s/g,function(){return c[l++]}))}throw u.framesToPop=1,u}};e.exports=r},{}],166:[function(t,e,n){"use strict";function r(t){return!(!t||!("function"==typeof Node?t instanceof Node:"object"==typeof t&&"number"==typeof t.nodeType&&"string"==typeof t.nodeName))}e.exports=r},{}],167:[function(t,e,n){"use strict";function r(t){return i(t)&&3==t.nodeType}var i=t("./isNode");e.exports=r},{"./isNode":166}],168:[function(t,e,n){"use strict";var r=t("./invariant"),i=function(t){var e,n={};t instanceof Object&&!Array.isArray(t)?void 0:r(!1);for(e in t)t.hasOwnProperty(e)&&(n[e]=e);return n};e.exports=i},{"./invariant":165}],169:[function(t,e,n){"use strict";var r=function(t){var e;for(e in t)if(t.hasOwnProperty(e))return e;return null};e.exports=r},{}],170:[function(t,e,n){"use strict";function r(t,e,n){if(!t)return null;var r={};for(var o in t)i.call(t,o)&&(r[o]=e.call(n,t[o],o,t));return r}var i=Object.prototype.hasOwnProperty;e.exports=r},{}],171:[function(t,e,n){"use strict";function r(t){var e={};return function(n){return e.hasOwnProperty(n)||(e[n]=t.call(this,n)),e[n]}}e.exports=r},{}],172:[function(t,e,n){"use strict";function r(t,e){if(t===e)return!0;if("object"!=typeof t||null===t||"object"!=typeof e||null===e)return!1;var n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(var o=i.bind(e),a=0;a<n.length;a++)if(!o(n[a])||t[n[a]]!==e[n[a]])return!1;return!0}var i=Object.prototype.hasOwnProperty;e.exports=r},{}],173:[function(t,e,n){"use strict";function r(t){var e=t.length;if(Array.isArray(t)||"object"!=typeof t&&"function"!=typeof t?i(!1):void 0,"number"!=typeof e?i(!1):void 0,0===e||e-1 in t?void 0:i(!1),t.hasOwnProperty)try{return Array.prototype.slice.call(t)}catch(n){}for(var r=Array(e),o=0;e>o;o++)r[o]=t[o];return r}var i=t("./invariant");e.exports=r},{"./invariant":165}],174:[function(t,e,n){"use strict";var r=t("./emptyFunction"),i=r;e.exports=i},{"./emptyFunction":157}],175:[function(t,e,n){"use strict";e.exports=t("./lib/React")},{"./lib/React":47}],176:[function(t,e,n){function r(t,e,n){var r=Array.isArray(t),s=Array.isArray(e);if(r!==s)return!1;var u=typeof t,c=typeof e;return u!==c?!1:a(u)?n?n(t,e):t===e:r?i(t,e,n):o(t,e,n)}function i(t,e,n){var r=t.length;if(r!==e.length)return!1;if(n){for(var i=0;r>i;i++)if(!n(t[i],e[i]))return!1}else for(var i=0;r>i;i++)if(t[i]!==e[i])return!1;return!0}function o(t,e,n){var r=0,i=0;if(n)for(var o in t){if(t.hasOwnProperty(o)&&!n(t[o],e[o]))return!1;r++}else for(var o in t){if(t.hasOwnProperty(o)&&t[o]!==e[o])return!1;r++}for(var o in e)e.hasOwnProperty(o)&&i++;return r===i}function a(t){return"function"!==t&&"object"!==t}e.exports=r},{}],177:[function(e,n,r){(function(){function e(t){function e(e,n,r,i,o,a){for(;o>=0&&a>o;o+=t){var s=i?i[o]:o;r=n(r,e[s],s,e)}return r}return function(n,r,i,o){r=E(r,o,4);var a=!x(n)&&_.keys(n),s=(a||n).length,u=t>0?0:s-1;return arguments.length<3&&(i=n[a?a[u]:u],u+=t),e(n,r,i,a,u,s)}}function i(t){return function(e,n,r){n=C(n,r);for(var i=T(e),o=t>0?0:i-1;o>=0&&i>o;o+=t)if(n(e[o],o,e))return o;return-1}}function o(t,e,n){return function(r,i,o){var a=0,s=T(r);if("number"==typeof o)t>0?a=o>=0?o:Math.max(o+s,a):s=o>=0?Math.min(o+1,s):o+s+1;else if(n&&o&&s)return o=n(r,i),r[o]===i?o:-1;if(i!==i)return o=e(h.call(r,a,s),_.isNaN),o>=0?o+a:-1;for(o=t>0?a:s-1;o>=0&&s>o;o+=t)if(r[o]===i)return o;return-1}}function a(t,e){var n=N.length,r=t.constructor,i=_.isFunction(r)&&r.prototype||l,o="constructor";for(_.has(t,o)&&!_.contains(e,o)&&e.push(o);n--;)o=N[n],o in t&&t[o]!==i[o]&&!_.contains(e,o)&&e.push(o)}var s=this,u=s._,c=Array.prototype,l=Object.prototype,f=Function.prototype,p=c.push,h=c.slice,d=l.toString,v=l.hasOwnProperty,g=Array.isArray,m=Object.keys,y=f.bind,b=Object.create,w=function(){},_=function(t){return t instanceof _?t:this instanceof _?void(this._wrapped=t):new _(t)};"undefined"!=typeof r?("undefined"!=typeof n&&n.exports&&(r=n.exports=_),r._=_):s._=_,_.VERSION="1.8.3";var E=function(t,e,n){if(void 0===e)return t;switch(null==n?3:n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)};case 4:return function(n,r,i,o){return t.call(e,n,r,i,o)}}return function(){return t.apply(e,arguments)}},C=function(t,e,n){return null==t?_.identity:_.isFunction(t)?E(t,e,n):_.isObject(t)?_.matcher(t):_.property(t)};_.iteratee=function(t,e){return C(t,e,1/0)};var R=function(t,e){return function(n){var r=arguments.length;if(2>r||null==n)return n;for(var i=1;r>i;i++)for(var o=arguments[i],a=t(o),s=a.length,u=0;s>u;u++){var c=a[u];e&&void 0!==n[c]||(n[c]=o[c])}return n}},k=function(t){if(!_.isObject(t))return{};if(b)return b(t);w.prototype=t;var e=new w;return w.prototype=null,e},O=function(t){return function(e){return null==e?void 0:e[t]}},S=Math.pow(2,53)-1,T=O("length"),x=function(t){var e=T(t);return"number"==typeof e&&e>=0&&S>=e};_.each=_.forEach=function(t,e,n){e=E(e,n);var r,i;if(x(t))for(r=0,i=t.length;i>r;r++)e(t[r],r,t);else{var o=_.keys(t);for(r=0,i=o.length;i>r;r++)e(t[o[r]],o[r],t)}return t},_.map=_.collect=function(t,e,n){e=C(e,n);for(var r=!x(t)&&_.keys(t),i=(r||t).length,o=Array(i),a=0;i>a;a++){var s=r?r[a]:a;o[a]=e(t[s],s,t)}return o},_.reduce=_.foldl=_.inject=e(1),_.reduceRight=_.foldr=e(-1),_.find=_.detect=function(t,e,n){var r;return r=x(t)?_.findIndex(t,e,n):_.findKey(t,e,n),void 0!==r&&-1!==r?t[r]:void 0},_.filter=_.select=function(t,e,n){var r=[];return e=C(e,n),_.each(t,function(t,n,i){e(t,n,i)&&r.push(t)}),r},_.reject=function(t,e,n){return _.filter(t,_.negate(C(e)),n)},_.every=_.all=function(t,e,n){e=C(e,n);for(var r=!x(t)&&_.keys(t),i=(r||t).length,o=0;i>o;o++){var a=r?r[o]:o;if(!e(t[a],a,t))return!1}return!0},_.some=_.any=function(t,e,n){e=C(e,n);for(var r=!x(t)&&_.keys(t),i=(r||t).length,o=0;i>o;o++){var a=r?r[o]:o;if(e(t[a],a,t))return!0}return!1},_.contains=_.includes=_.include=function(t,e,n,r){return x(t)||(t=_.values(t)),("number"!=typeof n||r)&&(n=0),_.indexOf(t,e,n)>=0},_.invoke=function(t,e){var n=h.call(arguments,2),r=_.isFunction(e);return _.map(t,function(t){var i=r?e:t[e];return null==i?i:i.apply(t,n)})},_.pluck=function(t,e){return _.map(t,_.property(e))},_.where=function(t,e){return _.filter(t,_.matcher(e))},_.findWhere=function(t,e){return _.find(t,_.matcher(e))},_.max=function(t,e,n){var r,i,o=-(1/0),a=-(1/0);if(null==e&&null!=t){t=x(t)?t:_.values(t);for(var s=0,u=t.length;u>s;s++)r=t[s],r>o&&(o=r)}else e=C(e,n),_.each(t,function(t,n,r){i=e(t,n,r),(i>a||i===-(1/0)&&o===-(1/0))&&(o=t,a=i)});return o},_.min=function(t,e,n){var r,i,o=1/0,a=1/0;if(null==e&&null!=t){t=x(t)?t:_.values(t);for(var s=0,u=t.length;u>s;s++)r=t[s],o>r&&(o=r)}else e=C(e,n),_.each(t,function(t,n,r){i=e(t,n,r),(a>i||i===1/0&&o===1/0)&&(o=t,a=i)});return o},_.shuffle=function(t){for(var e,n=x(t)?t:_.values(t),r=n.length,i=Array(r),o=0;r>o;o++)e=_.random(0,o),e!==o&&(i[o]=i[e]),i[e]=n[o];return i},_.sample=function(t,e,n){return null==e||n?(x(t)||(t=_.values(t)),t[_.random(t.length-1)]):_.shuffle(t).slice(0,Math.max(0,e))},_.sortBy=function(t,e,n){return e=C(e,n),_.pluck(_.map(t,function(t,n,r){return{value:t,index:n,criteria:e(t,n,r)}}).sort(function(t,e){var n=t.criteria,r=e.criteria;if(n!==r){if(n>r||void 0===n)return 1;if(r>n||void 0===r)return-1}return t.index-e.index}),"value")};var I=function(t){return function(e,n,r){var i={};return n=C(n,r),_.each(e,function(r,o){var a=n(r,o,e);t(i,r,a)}),i}};_.groupBy=I(function(t,e,n){_.has(t,n)?t[n].push(e):t[n]=[e]}),_.indexBy=I(function(t,e,n){t[n]=e}),_.countBy=I(function(t,e,n){_.has(t,n)?t[n]++:t[n]=1}),_.toArray=function(t){return t?_.isArray(t)?h.call(t):x(t)?_.map(t,_.identity):_.values(t):[]},_.size=function(t){return null==t?0:x(t)?t.length:_.keys(t).length},_.partition=function(t,e,n){e=C(e,n);var r=[],i=[];return _.each(t,function(t,n,o){(e(t,n,o)?r:i).push(t)}),[r,i]},_.first=_.head=_.take=function(t,e,n){return null==t?void 0:null==e||n?t[0]:_.initial(t,t.length-e)},_.initial=function(t,e,n){return h.call(t,0,Math.max(0,t.length-(null==e||n?1:e)))},_.last=function(t,e,n){return null==t?void 0:null==e||n?t[t.length-1]:_.rest(t,Math.max(0,t.length-e))},_.rest=_.tail=_.drop=function(t,e,n){return h.call(t,null==e||n?1:e)},_.compact=function(t){return _.filter(t,_.identity)};var M=function(t,e,n,r){for(var i=[],o=0,a=r||0,s=T(t);s>a;a++){var u=t[a];if(x(u)&&(_.isArray(u)||_.isArguments(u))){e||(u=M(u,e,n));var c=0,l=u.length;for(i.length+=l;l>c;)i[o++]=u[c++]}else n||(i[o++]=u)}return i};_.flatten=function(t,e){return M(t,e,!1)},_.without=function(t){return _.difference(t,h.call(arguments,1))},_.uniq=_.unique=function(t,e,n,r){_.isBoolean(e)||(r=n,n=e,e=!1),null!=n&&(n=C(n,r));for(var i=[],o=[],a=0,s=T(t);s>a;a++){var u=t[a],c=n?n(u,a,t):u;e?(a&&o===c||i.push(u),o=c):n?_.contains(o,c)||(o.push(c),i.push(u)):_.contains(i,u)||i.push(u)}return i},_.union=function(){return _.uniq(M(arguments,!0,!0))},_.intersection=function(t){for(var e=[],n=arguments.length,r=0,i=T(t);i>r;r++){var o=t[r];if(!_.contains(e,o)){for(var a=1;n>a&&_.contains(arguments[a],o);a++);a===n&&e.push(o)}}return e},_.difference=function(t){var e=M(arguments,!0,!0,1);return _.filter(t,function(t){return!_.contains(e,t)})},_.zip=function(){return _.unzip(arguments)},_.unzip=function(t){for(var e=t&&_.max(t,T).length||0,n=Array(e),r=0;e>r;r++)n[r]=_.pluck(t,r);return n},_.object=function(t,e){for(var n={},r=0,i=T(t);i>r;r++)e?n[t[r]]=e[r]:n[t[r][0]]=t[r][1];return n},_.findIndex=i(1),_.findLastIndex=i(-1),_.sortedIndex=function(t,e,n,r){n=C(n,r,1);for(var i=n(e),o=0,a=T(t);a>o;){var s=Math.floor((o+a)/2);n(t[s])<i?o=s+1:a=s}return o},_.indexOf=o(1,_.findIndex,_.sortedIndex),_.lastIndexOf=o(-1,_.findLastIndex),_.range=function(t,e,n){null==e&&(e=t||0,t=0),n=n||1;for(var r=Math.max(Math.ceil((e-t)/n),0),i=Array(r),o=0;r>o;o++,t+=n)i[o]=t;return i};var P=function(t,e,n,r,i){if(!(r instanceof e))return t.apply(n,i);var o=k(t.prototype),a=t.apply(o,i);return _.isObject(a)?a:o};_.bind=function(t,e){if(y&&t.bind===y)return y.apply(t,h.call(arguments,1));if(!_.isFunction(t))throw new TypeError("Bind must be called on a function");var n=h.call(arguments,2),r=function(){return P(t,r,e,this,n.concat(h.call(arguments)))};return r},_.partial=function(t){var e=h.call(arguments,1),n=function(){for(var r=0,i=e.length,o=Array(i),a=0;i>a;a++)o[a]=e[a]===_?arguments[r++]:e[a];for(;r<arguments.length;)o.push(arguments[r++]);return P(t,n,this,this,o)};return n},_.bindAll=function(t){var e,n,r=arguments.length;if(1>=r)throw new Error("bindAll must be passed function names");for(e=1;r>e;e++)n=arguments[e],t[n]=_.bind(t[n],t);return t},_.memoize=function(t,e){var n=function(r){var i=n.cache,o=""+(e?e.apply(this,arguments):r);return _.has(i,o)||(i[o]=t.apply(this,arguments)),i[o]};return n.cache={},n},_.delay=function(t,e){var n=h.call(arguments,2);return setTimeout(function(){return t.apply(null,n)},e)},_.defer=_.partial(_.delay,_,1),_.throttle=function(t,e,n){var r,i,o,a=null,s=0;n||(n={});var u=function(){s=n.leading===!1?0:_.now(),a=null,o=t.apply(r,i),a||(r=i=null)};return function(){var c=_.now();s||n.leading!==!1||(s=c);var l=e-(c-s);return r=this,i=arguments,0>=l||l>e?(a&&(clearTimeout(a),a=null),s=c,o=t.apply(r,i),a||(r=i=null)):a||n.trailing===!1||(a=setTimeout(u,l)),o}},_.debounce=function(t,e,n){var r,i,o,a,s,u=function(){var c=_.now()-a;e>c&&c>=0?r=setTimeout(u,e-c):(r=null,n||(s=t.apply(o,i),r||(o=i=null)))};return function(){o=this,i=arguments,a=_.now();var c=n&&!r;return r||(r=setTimeout(u,e)),c&&(s=t.apply(o,i),o=i=null),s}},_.wrap=function(t,e){return _.partial(e,t)},_.negate=function(t){return function(){return!t.apply(this,arguments)}},_.compose=function(){var t=arguments,e=t.length-1;return function(){for(var n=e,r=t[e].apply(this,arguments);n--;)r=t[n].call(this,r);return r}},_.after=function(t,e){return function(){return--t<1?e.apply(this,arguments):void 0}},_.before=function(t,e){var n;return function(){return--t>0&&(n=e.apply(this,arguments)),1>=t&&(e=null),n}},_.once=_.partial(_.before,2);var A=!{toString:null}.propertyIsEnumerable("toString"),N=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];_.keys=function(t){if(!_.isObject(t))return[];if(m)return m(t);var e=[];for(var n in t)_.has(t,n)&&e.push(n);return A&&a(t,e),e},_.allKeys=function(t){if(!_.isObject(t))return[];var e=[];for(var n in t)e.push(n);return A&&a(t,e),e},_.values=function(t){for(var e=_.keys(t),n=e.length,r=Array(n),i=0;n>i;i++)r[i]=t[e[i]];return r},_.mapObject=function(t,e,n){e=C(e,n);for(var r,i=_.keys(t),o=i.length,a={},s=0;o>s;s++)r=i[s],a[r]=e(t[r],r,t);return a},_.pairs=function(t){for(var e=_.keys(t),n=e.length,r=Array(n),i=0;n>i;i++)r[i]=[e[i],t[e[i]]];return r},_.invert=function(t){for(var e={},n=_.keys(t),r=0,i=n.length;i>r;r++)e[t[n[r]]]=n[r];return e},_.functions=_.methods=function(t){var e=[];for(var n in t)_.isFunction(t[n])&&e.push(n);return e.sort()},_.extend=R(_.allKeys),_.extendOwn=_.assign=R(_.keys),_.findKey=function(t,e,n){e=C(e,n);for(var r,i=_.keys(t),o=0,a=i.length;a>o;o++)if(r=i[o],e(t[r],r,t))return r},_.pick=function(t,e,n){var r,i,o={},a=t;if(null==a)return o;_.isFunction(e)?(i=_.allKeys(a),r=E(e,n)):(i=M(arguments,!1,!1,1),r=function(t,e,n){return e in n},a=Object(a));for(var s=0,u=i.length;u>s;s++){var c=i[s],l=a[c];r(l,c,a)&&(o[c]=l)}return o},_.omit=function(t,e,n){if(_.isFunction(e))e=_.negate(e);else{var r=_.map(M(arguments,!1,!1,1),String);e=function(t,e){return!_.contains(r,e)}}return _.pick(t,e,n)},_.defaults=R(_.allKeys,!0),_.create=function(t,e){var n=k(t);return e&&_.extendOwn(n,e),n},_.clone=function(t){return _.isObject(t)?_.isArray(t)?t.slice():_.extend({},t):t},_.tap=function(t,e){return e(t),t},_.isMatch=function(t,e){var n=_.keys(e),r=n.length;if(null==t)return!r;for(var i=Object(t),o=0;r>o;o++){var a=n[o];if(e[a]!==i[a]||!(a in i))return!1}return!0};var D=function(t,e,n,r){if(t===e)return 0!==t||1/t===1/e;if(null==t||null==e)return t===e;t instanceof _&&(t=t._wrapped),e instanceof _&&(e=e._wrapped);var i=d.call(t);if(i!==d.call(e))return!1;switch(i){case"[object RegExp]":case"[object String]":return""+t==""+e;case"[object Number]":return+t!==+t?+e!==+e:0===+t?1/+t===1/e:+t===+e;case"[object Date]":case"[object Boolean]":return+t===+e}var o="[object Array]"===i;if(!o){if("object"!=typeof t||"object"!=typeof e)return!1;var a=t.constructor,s=e.constructor;if(a!==s&&!(_.isFunction(a)&&a instanceof a&&_.isFunction(s)&&s instanceof s)&&"constructor"in t&&"constructor"in e)return!1}n=n||[],r=r||[];for(var u=n.length;u--;)if(n[u]===t)return r[u]===e;if(n.push(t),r.push(e),o){if(u=t.length,u!==e.length)return!1;for(;u--;)if(!D(t[u],e[u],n,r))return!1}else{var c,l=_.keys(t);if(u=l.length,_.keys(e).length!==u)return!1;for(;u--;)if(c=l[u],!_.has(e,c)||!D(t[c],e[c],n,r))return!1}return n.pop(),r.pop(),!0};_.isEqual=function(t,e){return D(t,e)},_.isEmpty=function(t){return null==t?!0:x(t)&&(_.isArray(t)||_.isString(t)||_.isArguments(t))?0===t.length:0===_.keys(t).length},_.isElement=function(t){return!(!t||1!==t.nodeType)},_.isArray=g||function(t){return"[object Array]"===d.call(t)},_.isObject=function(t){var e=typeof t;return"function"===e||"object"===e&&!!t},_.each(["Arguments","Function","String","Number","Date","RegExp","Error"],function(t){_["is"+t]=function(e){return d.call(e)==="[object "+t+"]"}}),_.isArguments(arguments)||(_.isArguments=function(t){return _.has(t,"callee")}),"function"!=typeof/./&&"object"!=typeof Int8Array&&(_.isFunction=function(t){return"function"==typeof t||!1}),_.isFinite=function(t){return isFinite(t)&&!isNaN(parseFloat(t))},_.isNaN=function(t){return _.isNumber(t)&&t!==+t},_.isBoolean=function(t){return t===!0||t===!1||"[object Boolean]"===d.call(t)},_.isNull=function(t){return null===t},_.isUndefined=function(t){return void 0===t},_.has=function(t,e){return null!=t&&v.call(t,e)},_.noConflict=function(){return s._=u,this},_.identity=function(t){return t},_.constant=function(t){return function(){return t}},_.noop=function(){},_.property=O,_.propertyOf=function(t){return null==t?function(){}:function(e){return t[e]}},_.matcher=_.matches=function(t){return t=_.extendOwn({},t),function(e){return _.isMatch(e,t)}},_.times=function(t,e,n){var r=Array(Math.max(0,t));e=E(e,n,1);for(var i=0;t>i;i++)r[i]=e(i);return r},_.random=function(t,e){return null==e&&(e=t,t=0),t+Math.floor(Math.random()*(e-t+1))},_.now=Date.now||function(){return(new Date).getTime()};var j={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},L=_.invert(j),B=function(t){var e=function(e){return t[e]},n="(?:"+_.keys(t).join("|")+")",r=RegExp(n),i=RegExp(n,"g");return function(t){return t=null==t?"":""+t,r.test(t)?t.replace(i,e):t}};_.escape=B(j),_.unescape=B(L),_.result=function(t,e,n){var r=null==t?void 0:t[e];return void 0===r&&(r=n),_.isFunction(r)?r.call(t):r};var U=0;_.uniqueId=function(t){var e=++U+"";return t?t+e:e},_.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var F=/(.)^/,V={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},H=/\\|'|\r|\n|\u2028|\u2029/g,z=function(t){return"\\"+V[t]};_.template=function(t,e,n){!e&&n&&(e=n),e=_.defaults({},e,_.templateSettings);var r=RegExp([(e.escape||F).source,(e.interpolate||F).source,(e.evaluate||F).source].join("|")+"|$","g"),i=0,o="__p+='";t.replace(r,function(e,n,r,a,s){return o+=t.slice(i,s).replace(H,z),i=s+e.length,n?o+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?o+="'+\n((__t=("+r+"))==null?'':__t)+\n'":a&&(o+="';\n"+a+"\n__p+='"),e}),o+="';\n",e.variable||(o="with(obj||{}){\n"+o+"}\n"),o="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+o+"return __p;\n";try{var a=new Function(e.variable||"obj","_",o)}catch(s){throw s.source=o,s}var u=function(t){return a.call(this,t,_)},c=e.variable||"obj";return u.source="function("+c+"){\n"+o+"}",u},_.chain=function(t){var e=_(t);return e._chain=!0,e};var q=function(t,e){return t._chain?_(e).chain():e};_.mixin=function(t){_.each(_.functions(t),function(e){var n=_[e]=t[e];_.prototype[e]=function(){var t=[this._wrapped];return p.apply(t,arguments),q(this,n.apply(_,t))}})},_.mixin(_),_.each(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var e=c[t];_.prototype[t]=function(){var n=this._wrapped;return e.apply(n,arguments),"shift"!==t&&"splice"!==t||0!==n.length||delete n[0],q(this,n)}}),_.each(["concat","join","slice"],function(t){var e=c[t];_.prototype[t]=function(){return q(this,e.apply(this._wrapped,arguments))}}),_.prototype.value=function(){return this._wrapped},_.prototype.valueOf=_.prototype.toJSON=_.prototype.value,_.prototype.toString=function(){return""+this._wrapped},"function"==typeof t&&t.amd&&t("underscore",[],function(){return _})}).call(this)},{}],178:[function(e,n,r){!function(){function e(t){return t&&(t.ownerDocument||t.document||t).documentElement}function r(t){return t&&(t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView)}function i(t){return t}function o(t,e,n){return function(){var r=n.apply(e,arguments);return r===e?t:r}}function a(t,e){if(e in t)return e;e=e.charAt(0).toUpperCase()+e.slice(1);for(var n=0,r=$.length;r>n;++n){var i=$[n]+e;if(i in t)return i}}function s(t,e){for(var n in e)Object.defineProperty(t.prototype,n,{value:e[n],enumerable:!1})}function u(){this._=Object.create(null)}function c(t){return(t+="")===Q||t[0]===J?J+t:t}function l(t){return(t+="")[0]===J?t.slice(1):t}function f(t){return c(t)in this._}function p(t){return(t=c(t))in this._&&delete this._[t]}function h(){var t=[];for(var e in this._)t.push(l(e));return t}function d(){var t=0;for(var e in this._)++t;return t}function v(){for(var t in this._)return!1;return!0}function g(){}function m(){}function y(t){function e(){for(var e,r=n,i=-1,o=r.length;++i<o;)(e=r[i].on)&&e.apply(this,arguments);return t}var n=[],r=new u;return e.on=function(e,i){var o,a=r.get(e);return arguments.length<2?a&&a.on:(a&&(a.on=null,n=n.slice(0,o=n.indexOf(a)).concat(n.slice(o+1)),r.remove(e)),i&&n.push(r.set(e,{on:i})),t)},e}function b(){X.event.preventDefault()}function w(){for(var t,e=X.event;t=e.sourceEvent;)e=t;return e}function _(t){for(var e=new m,n=0,r=arguments.length;++n<r;)e[arguments[n]]=y(e);return e.of=function(n,r){return function(i){try{var o=i.sourceEvent=X.event;i.target=t,X.event=i,e[i.type].apply(n,r)}finally{X.event=o}}},e}function E(t){return rt(t,st),t}function C(t){return"function"==typeof t?t:function(){return it(t,this)}}function R(t){return"function"==typeof t?t:function(){return ot(t,this)}}function k(t,e){function n(){this.removeAttribute(t)}function r(){this.removeAttributeNS(t.space,t.local)}function i(){this.setAttribute(t,e)}function o(){this.setAttributeNS(t.space,t.local,e)}function a(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}function s(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}return t=X.ns.qualify(t),null==e?t.local?r:n:"function"==typeof e?t.local?s:a:t.local?o:i}function O(t){return t.trim().replace(/\s+/g," ")}function S(t){return new RegExp("(?:^|\\s+)"+X.requote(t)+"(?:\\s+|$)","g")}function T(t){return(t+"").trim().split(/^|\s+/)}function x(t,e){function n(){for(var n=-1;++n<i;)t[n](this,e)}function r(){for(var n=-1,r=e.apply(this,arguments);++n<i;)t[n](this,r)}t=T(t).map(I);var i=t.length;return"function"==typeof e?r:n}function I(t){var e=S(t);return function(n,r){if(i=n.classList)return r?i.add(t):i.remove(t);var i=n.getAttribute("class")||"";r?(e.lastIndex=0,e.test(i)||n.setAttribute("class",O(i+" "+t))):n.setAttribute("class",O(i.replace(e," ")))}}function M(t,e,n){function r(){this.style.removeProperty(t)}function i(){this.style.setProperty(t,e,n)}function o(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}return null==e?r:"function"==typeof e?o:i}function P(t,e){function n(){delete this[t]}function r(){this[t]=e}function i(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}return null==e?n:"function"==typeof e?i:r}function A(t){function e(){var e=this.ownerDocument,n=this.namespaceURI;return n?e.createElementNS(n,t):e.createElement(t)}function n(){return this.ownerDocument.createElementNS(t.space,t.local)}return"function"==typeof t?t:(t=X.ns.qualify(t)).local?n:e}function N(){var t=this.parentNode;t&&t.removeChild(this)}function D(){this._=Object.create(null)}function j(t){return{__data__:t}}function L(t){return function(){return at(this,t)}}function B(t,e){return e>t?-1:t>e?1:t>=e?0:NaN}function U(t){return arguments.length||(t=B),function(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}}function F(t,e){for(var n=0,r=t.length;r>n;n++)for(var i,o=t[n],a=0,s=o.length;s>a;a++)(i=o[a])&&e(i,a,n);return t}function V(t){return rt(t,ct),t}function H(t){var e,n;return function(r,i,o){var a,s=t[o].update,u=s.length;for(o!=n&&(n=o,e=0),i>=e&&(e=i+1);!(a=s[e])&&++e<u;);return a}}function z(t,e,n){function r(){var e=this[a];e&&(this.removeEventListener(t,e,e.$),delete this[a])}function i(){var i=u(e,et(arguments));r.call(this),this.addEventListener(t,this[a]=i,i.$=n),i._=e}function o(){var e,n=new RegExp("^__on([^.]+)"+X.requote(t)+"$");for(var r in this)if(e=r.match(n)){var i=this[r];this.removeEventListener(e[1],i,i.$),delete this[r]}}var a="__on"+t,s=t.indexOf("."),u=q;s>0&&(t=t.slice(0,s));var c=lt.get(t);return c&&(t=c,u=G),s?e?i:r:e?g:o}function q(t,e){return function(n){var r=X.event;X.event=n,e[0]=this.__data__;try{t.apply(this,e)}finally{X.event=r}}}function G(t,e){var n=q(t,e);return function(t){var e=this,r=t.relatedTarget;r&&(r===e||8&r.compareDocumentPosition(e))||n.call(e,t)}}function W(t){var n=".dragsuppress-"+ ++pt,i="click"+n,o=X.select(r(t)).on("touchmove"+n,b).on("dragstart"+n,b).on("selectstart"+n,b);if(null==ft&&(ft="onselectstart"in t?!1:a(t.style,"userSelect")),ft){var s=e(t).style,u=s[ft];s[ft]="none"}return function(t){if(o.on(n,null),ft&&(s[ft]=u),t){var e=function(){o.on(i,null)};o.on(i,function(){b(),e()},!0),setTimeout(e,0)}}}function K(t,e){e.changedTouches&&(e=e.changedTouches[0]);var n=t.ownerSVGElement||t;if(n.createSVGPoint){var i=n.createSVGPoint();if(0>ht){var o=r(t);if(o.scrollX||o.scrollY){n=X.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var a=n[0][0].getScreenCTM();ht=!(a.f||a.e),n.remove()}}return ht?(i.x=e.pageX,i.y=e.pageY):(i.x=e.clientX,i.y=e.clientY),i=i.matrixTransform(t.getScreenCTM().inverse()),[i.x,i.y]}var s=t.getBoundingClientRect();return[e.clientX-s.left-t.clientLeft,e.clientY-s.top-t.clientTop]}function Y(){return X.event.changedTouches[0].identifier}var X={version:"3.5.6"},Z=this.document;X.rebind=function(t,e){for(var n,r=1,i=arguments.length;++r<i;)t[n=arguments[r]]=o(t,e,e[n]);return t};var $=["webkit","ms","moz","Moz","o","O"];X.map=function(t,e){var n=new u;if(t instanceof u)t.forEach(function(t,e){n.set(t,e)});else if(Array.isArray(t)){var r,i=-1,o=t.length;if(1===arguments.length)for(;++i<o;)n.set(i,t[i]);else for(;++i<o;)n.set(e.call(t,r=t[i],i),r)}else for(var a in t)n.set(a,t[a]);return n};var Q="__proto__",J="\x00";s(u,{has:f,get:function(t){return this._[c(t)]},set:function(t,e){return this._[c(t)]=e},remove:p,keys:h,values:function(){var t=[];for(var e in this._)t.push(this._[e]);return t},entries:function(){var t=[];for(var e in this._)t.push({key:l(e),value:this._[e]});return t},size:d,empty:v,forEach:function(t){for(var e in this._)t.call(this,l(e),this._[e])}});var tt=[].slice,et=function(t){return tt.call(t)};X.dispatch=function(){for(var t=new m,e=-1,n=arguments.length;++e<n;)t[arguments[e]]=y(t);return t},m.prototype.on=function(t,e){var n=t.indexOf("."),r="";if(n>=0&&(r=t.slice(n+1),t=t.slice(0,n)),t)return arguments.length<2?this[t].on(r):this[t].on(r,e);if(2===arguments.length){if(null==e)for(t in this)this.hasOwnProperty(t)&&this[t].on(r,null);return this}},X.event=null,X.requote=function(t){return t.replace(nt,"\\$&")};var nt=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,rt={}.__proto__?function(t,e){t.__proto__=e}:function(t,e){for(var n in e)t[n]=e[n]},it=function(t,e){return e.querySelector(t)},ot=function(t,e){return e.querySelectorAll(t)},at=function(t,e){var n=t.matches||t[a(t,"matchesSelector")];return(at=function(t,e){return n.call(t,e)})(t,e)};"function"==typeof Sizzle&&(it=function(t,e){return Sizzle(t,e)[0]||null},ot=Sizzle,at=Sizzle.matchesSelector),X.selection=function(){return X.select(Z.documentElement)};var st=X.selection.prototype=[];st.select=function(t){var e,n,r,i,o=[];t=C(t);for(var a=-1,s=this.length;++a<s;){o.push(e=[]),e.parentNode=(r=this[a]).parentNode;for(var u=-1,c=r.length;++u<c;)(i=r[u])?(e.push(n=t.call(i,i.__data__,u,a)),n&&"__data__"in i&&(n.__data__=i.__data__)):e.push(null)}return E(o)},st.selectAll=function(t){var e,n,r=[];t=R(t);for(var i=-1,o=this.length;++i<o;)for(var a=this[i],s=-1,u=a.length;++s<u;)(n=a[s])&&(r.push(e=et(t.call(n,n.__data__,s,i))),e.parentNode=n);return E(r)};var ut={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};X.ns={prefix:ut,qualify:function(t){var e=t.indexOf(":"),n=t;return e>=0&&(n=t.slice(0,e),t=t.slice(e+1)),ut.hasOwnProperty(n)?{space:ut[n],local:t}:t}},st.attr=function(t,e){if(arguments.length<2){if("string"==typeof t){var n=this.node();return t=X.ns.qualify(t),t.local?n.getAttributeNS(t.space,t.local):n.getAttribute(t)}for(e in t)this.each(k(e,t[e]));return this}return this.each(k(t,e))},st.classed=function(t,e){if(arguments.length<2){if("string"==typeof t){var n=this.node(),r=(t=T(t)).length,i=-1;if(e=n.classList){for(;++i<r;)if(!e.contains(t[i]))return!1}else for(e=n.getAttribute("class");++i<r;)if(!S(t[i]).test(e))return!1;return!0}for(e in t)this.each(x(e,t[e]));return this}return this.each(x(t,e))},st.style=function(t,e,n){var i=arguments.length;if(3>i){if("string"!=typeof t){2>i&&(e="");for(n in t)this.each(M(n,t[n],e));return this}if(2>i){var o=this.node();return r(o).getComputedStyle(o,null).getPropertyValue(t)}n=""}return this.each(M(t,e,n))},st.property=function(t,e){if(arguments.length<2){if("string"==typeof t)return this.node()[t];for(e in t)this.each(P(e,t[e]));return this}return this.each(P(t,e))},st.text=function(t){return arguments.length?this.each("function"==typeof t?function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}:null==t?function(){this.textContent=""}:function(){this.textContent=t}):this.node().textContent},st.html=function(t){return arguments.length?this.each("function"==typeof t?function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}:null==t?function(){this.innerHTML=""}:function(){this.innerHTML=t}):this.node().innerHTML},st.append=function(t){return t=A(t),this.select(function(){return this.appendChild(t.apply(this,arguments))})},st.insert=function(t,e){return t=A(t),e=C(e),this.select(function(){return this.insertBefore(t.apply(this,arguments),e.apply(this,arguments)||null)})},st.remove=function(){return this.each(N)},X.set=function(t){var e=new D;if(t)for(var n=0,r=t.length;r>n;++n)e.add(t[n]);return e},s(D,{has:f,add:function(t){return this._[c(t+="")]=!0,t},remove:p,values:h,size:d,empty:v,forEach:function(t){for(var e in this._)t.call(this,l(e))}}),st.data=function(t,e){function n(t,n){var r,i,o,a=t.length,f=n.length,p=Math.min(a,f),h=new Array(f),d=new Array(f),v=new Array(a);if(e){var g,m=new u,y=new Array(a);for(r=-1;++r<a;)m.has(g=e.call(i=t[r],i.__data__,r))?v[r]=i:m.set(g,i),y[r]=g;for(r=-1;++r<f;)(i=m.get(g=e.call(n,o=n[r],r)))?i!==!0&&(h[r]=i,i.__data__=o):d[r]=j(o),m.set(g,!0);for(r=-1;++r<a;)m.get(y[r])!==!0&&(v[r]=t[r])}else{for(r=-1;++r<p;)i=t[r],o=n[r],i?(i.__data__=o,h[r]=i):d[r]=j(o);for(;f>r;++r)d[r]=j(n[r]);for(;a>r;++r)v[r]=t[r]}d.update=h,d.parentNode=h.parentNode=v.parentNode=t.parentNode,s.push(d),c.push(h),l.push(v)}var r,i,o=-1,a=this.length;if(!arguments.length){for(t=new Array(a=(r=this[0]).length);++o<a;)(i=r[o])&&(t[o]=i.__data__);return t}var s=V([]),c=E([]),l=E([]);if("function"==typeof t)for(;++o<a;)n(r=this[o],t.call(r,r.parentNode.__data__,o));else for(;++o<a;)n(r=this[o],t);return c.enter=function(){return s},c.exit=function(){return l},c},st.datum=function(t){return arguments.length?this.property("__data__",t):this.property("__data__")},st.filter=function(t){var e,n,r,i=[];"function"!=typeof t&&(t=L(t));for(var o=0,a=this.length;a>o;o++){i.push(e=[]),e.parentNode=(n=this[o]).parentNode;for(var s=0,u=n.length;u>s;s++)(r=n[s])&&t.call(r,r.__data__,s,o)&&e.push(r)}return E(i)},st.order=function(){for(var t=-1,e=this.length;++t<e;)for(var n,r=this[t],i=r.length-1,o=r[i];--i>=0;)(n=r[i])&&(o&&o!==n.nextSibling&&o.parentNode.insertBefore(n,o),o=n);return this},X.ascending=B,st.sort=function(t){t=U.apply(this,arguments);for(var e=-1,n=this.length;++e<n;)this[e].sort(t);return this.order()},st.each=function(t){return F(this,function(e,n,r){
t.call(e,e.__data__,n,r)})},st.call=function(t){var e=et(arguments);return t.apply(e[0]=this,e),this},st.empty=function(){return!this.node()},st.node=function(){for(var t=0,e=this.length;e>t;t++)for(var n=this[t],r=0,i=n.length;i>r;r++){var o=n[r];if(o)return o}return null},st.size=function(){var t=0;return F(this,function(){++t}),t};var ct=[];X.selection.enter=V,X.selection.enter.prototype=ct,ct.append=st.append,ct.empty=st.empty,ct.node=st.node,ct.call=st.call,ct.size=st.size,ct.select=function(t){for(var e,n,r,i,o,a=[],s=-1,u=this.length;++s<u;){r=(i=this[s]).update,a.push(e=[]),e.parentNode=i.parentNode;for(var c=-1,l=i.length;++c<l;)(o=i[c])?(e.push(r[c]=n=t.call(i.parentNode,o.__data__,c,s)),n.__data__=o.__data__):e.push(null)}return E(a)},ct.insert=function(t,e){return arguments.length<2&&(e=H(this)),st.insert.call(this,t,e)},X.select=function(t){var n;return"string"==typeof t?(n=[it(t,Z)],n.parentNode=Z.documentElement):(n=[t],n.parentNode=e(t)),E([n])},X.selectAll=function(t){var e;return"string"==typeof t?(e=et(ot(t,Z)),e.parentNode=Z.documentElement):(e=t,e.parentNode=null),E([e])},st.on=function(t,e,n){var r=arguments.length;if(3>r){if("string"!=typeof t){2>r&&(e=!1);for(n in t)this.each(z(n,t[n],e));return this}if(2>r)return(r=this.node()["__on"+t])&&r._;n=!1}return this.each(z(t,e,n))};var lt=X.map({mouseenter:"mouseover",mouseleave:"mouseout"});Z&&lt.forEach(function(t){"on"+t in Z&&lt.remove(t)});var ft,pt=0;X.mouse=function(t){return K(t,w())};var ht=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;X.touch=function(t,e,n){if(arguments.length<3&&(n=e,e=w().changedTouches),e)for(var r,i=0,o=e.length;o>i;++i)if((r=e[i]).identifier===n)return K(t,r)},X.behavior={},X.behavior.drag=function(){function t(){this.on("mousedown.drag",a).on("touchstart.drag",s)}function e(t,e,r,i,a){return function(){function s(){var t,n,r=e(p,v);r&&(t=r[0]-b[0],n=r[1]-b[1],d|=t|n,b=r,h({type:"drag",x:r[0]+c[0],y:r[1]+c[1],dx:t,dy:n}))}function u(){e(p,v)&&(m.on(i+g,null).on(a+g,null),y(d&&X.event.target===f),h({type:"dragend"}))}var c,l=this,f=X.event.target,p=l.parentNode,h=n.of(l,arguments),d=0,v=t(),g=".drag"+(null==v?"":"-"+v),m=X.select(r(f)).on(i+g,s).on(a+g,u),y=W(f),b=e(p,v);o?(c=o.apply(l,arguments),c=[c.x-b[0],c.y-b[1]]):c=[0,0],h({type:"dragstart"})}}var n=_(t,"drag","dragstart","dragend"),o=null,a=e(g,X.mouse,r,"mousemove","mouseup"),s=e(Y,X.touch,i,"touchmove","touchend");return t.origin=function(e){return arguments.length?(o=e,t):o},X.rebind(t,n,"on")},"function"==typeof t&&t.amd?t(X):"object"==typeof n&&n.exports&&(n.exports=X),this.d3=X}()},{}],179:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=t("./Interval"),s=r(a),u=t("./utils"),c=function(){function t(e,n,r){i(this,t),this.contig=e,this.interval=new s["default"](n,r)}return o(t,[{key:"start",value:function(){return this.interval.start}},{key:"stop",value:function(){return this.interval.stop}},{key:"length",value:function(){return this.interval.length()}},{key:"intersects",value:function(t){return this.contig===t.contig&&this.interval.intersects(t.interval)}},{key:"chrIntersects",value:function(t){return this.chrOnContig(t.contig)&&this.interval.intersects(t.interval)}},{key:"containsInterval",value:function(t){return this.contig===t.contig&&this.interval.containsInterval(t.interval)}},{key:"isAdjacentTo",value:function(t){return this.contig===t.contig&&(this.start()==1+t.stop()||this.stop()+1==t.start())}},{key:"isCoveredBy",value:function(t){var e=this,n=t.filter(function(t){return t.contig===e.contig}).map(function(t){return t.interval});return this.interval.isCoveredBy(n)}},{key:"containsLocus",value:function(t,e){return this.contig===t&&this.interval.contains(e)}},{key:"chrContainsLocus",value:function(t,e){return this.chrOnContig(t)&&this.interval.contains(e)}},{key:"chrOnContig",value:function(t){return this.contig===t||this.contig==="chr"+t||"chr"+this.contig===t}},{key:"clone",value:function(){return new t(this.contig,this.interval.start,this.interval.stop)}},{key:"complementIntervals",value:function(e){var n=this;return this.interval.complementIntervals((0,u.flatMap)(e,function(t){return t.contig===n.contig?[t.interval]:[]})).map(function(e){return new t(n.contig,e.start,e.stop)})}},{key:"toString",value:function(){return this.contig+":"+this.start()+"-"+this.stop()}},{key:"toGenomeRange",value:function(){if(!("string"==typeof this.contig||this.contig instanceof String))throw"Cannot convert numeric ContigInterval to GenomeRange";return{contig:this.contig,start:this.start(),stop:this.stop()}}}],[{key:"compare",value:function(t,e){return t.contig>e.contig?-1:t.contig<e.contig?1:t.start()-e.start()}},{key:"coalesce",value:function(e){e.sort(t.compare);var n=[];return e.forEach(function(t){if(0===n.length)return void n.push(t);var e=n[n.length-1];t.intersects(e)||t.isAdjacentTo(e)?(e=n[n.length-1]=e.clone(),e.interval.stop=Math.max(t.interval.stop,e.interval.stop)):n.push(t)}),n}},{key:"fromGenomeRange",value:function(e){return new t(e.contig,e.start,e.stop)}}]),t}();e.exports=c},{"./Interval":182,"./utils":209}],180:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=function(t,e,n){for(var r=!0;r;){var i=t,o=e,a=n;r=!1,null===i&&(i=Function.prototype);var s=Object.getOwnPropertyDescriptor(i,o);if(void 0!==s){if("value"in s)return s.value;var u=s.get;return void 0===u?void 0:u.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return void 0;t=c,e=o,n=a,r=!0,s=c=void 0}},u=t("react"),c=r(u),l=t("underscore"),f=r(l),p=t("./utils"),h=r(p),d=t("./Interval"),v=r(d),g=function(t){function e(t){i(this,e),s(Object.getPrototypeOf(e.prototype),"constructor",this).call(this,t)}return o(e,t),a(e,[{key:"makeRange",value:function(){return{contig:this.refs.contig.value,start:Number(this.refs.start.value),stop:Number(this.refs.stop.value)}}},{key:"completeRange",value:function(t){var e=this;if(t=t||{},t.start&&void 0===t.stop&&(t.stop=t.start+20,t.start-=20),t.contig){var n;!function(){var r=t.contig;n=f["default"].find(e.props.contigList,function(t){return h["default"].isChrMatch(r,t)}),n&&(t.contig=n)}()}return f["default"].extend({},this.props.range,t)}},{key:"handleContigChange",value:function(t){this.props.onChange(this.completeRange({contig:this.refs.contig.value}))}},{key:"handleFormSubmit",value:function(t){t.preventDefault();var e=this.completeRange(h["default"].parseRange(this.refs.position.value));this.props.onChange(e)}},{key:"updateRangeUI",value:function(){var t=this.props.range;if(t&&(this.refs.position.value=h["default"].formatInterval(new v["default"](t.start,t.stop)),this.props.contigList)){var e=this.props.contigList.indexOf(t.contig);this.refs.contig.selectedIndex=e}}},{key:"zoomIn",value:function(t){t.preventDefault(),this.zoomByFactor(.5)}},{key:"zoomOut",value:function(t){t.preventDefault(),this.zoomByFactor(2)}},{key:"zoomByFactor",value:function(t){var e=this.props.range;if(e){var n=h["default"].scaleRange(new v["default"](e.start,e.stop),t);this.props.onChange({contig:e.contig,start:n.start,stop:n.stop})}}},{key:"render",value:function(){var t=this.props.contigList?this.props.contigList.map(function(t,e){return c["default"].createElement("option",{key:e},t)}):null;return c["default"].createElement("form",{className:"controls",onSubmit:this.handleFormSubmit.bind(this)},c["default"].createElement("select",{ref:"contig",onChange:this.handleContigChange.bind(this)},t)," ",c["default"].createElement("input",{ref:"position",type:"text"})," ",c["default"].createElement("button",{className:"btn-submit",onClick:this.handleFormSubmit.bind(this)},"Go")," ",c["default"].createElement("div",{className:"zoom-controls"},c["default"].createElement("button",{className:"btn-zoom-out",onClick:this.zoomOut.bind(this)})," ",c["default"].createElement("button",{className:"btn-zoom-in",onClick:this.zoomIn.bind(this)})))}},{key:"componentDidUpdate",value:function(t){f["default"].isEqual(t.range,this.props.range)||this.updateRangeUI()}},{key:"componentDidMount",value:function(){this.updateRangeUI()}}]),e}(c["default"].Component);e.exports=g},{"./Interval":182,"./utils":209,react:175,underscore:177}],181:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=t("./ContigInterval"),s=r(a),u=t("./data/SamRead"),c=r(u),l={ALIGNMENT_MATCH:"M",INSERT:"I",DELETE:"D",SKIP:"N",CLIP_SOFT:"S",CLIP_HARD:"H",PAD:"P",SEQUENCE_MATCH:"=",SEQUENCE_MISMATCH:"X"},f=function(){function t(e){i(this,t),this.alignment=e,this.pos=e.alignment.position.position,this.ref=e.alignment.position.referenceName,this.name=e.fragmentName,this.cigarOps=e.alignment.cigar.map(function(t){var e=t.operation,n=t.operationLength;return{op:l[e],length:n}}),this._interval=new s["default"](this.ref,this.pos,this.pos+this.getReferenceLength()-1)}return o(t,[{key:"getKey",value:function(){return t.keyFromGA4GHResponse(this.alignment)}},{key:"getStrand",value:function(){return this.alignment.alignment.position.reverseStrand?"-":"+"}},{key:"getQualityScores",value:function(){return this.alignment.alignedQuality}},{key:"getSequence",value:function(){return this.alignment.alignedSequence}},{key:"getInterval",value:function(){return this._interval}},{key:"intersects",value:function(t){return t.intersects(this.getInterval())}},{key:"getReferenceLength",value:function(){return c["default"].referenceLengthFromOps(this.cigarOps)}},{key:"getMateProperties",value:function(){var t=this.alignment.nextMatePosition;return t&&{ref:t.referenceName,pos:t.position,strand:t.reverseStrand?"-":"+"}}},{key:"getInferredInsertSize",value:function(){var t=this.getMateProperties();if(t&&t.ref==this.ref){var e=this._interval.start(),n=this._interval.stop(),r=t.pos,i=r+this.getSequence.length();return Math.max(n,i)-Math.min(e,r)}return 0}}],[{key:"keyFromGA4GHResponse",value:function(t){return t.fragmentName+":"+t.readNumber}}]),t}();e.exports=f},{"./ContigInterval":179,"./data/SamRead":189}],182:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function(){function t(e,n){r(this,t),this.start=e,this.stop=n}return i(t,[{key:"length",value:function(){return Math.max(0,this.stop-this.start+1)}},{key:"intersect",value:function(e){return new t(Math.max(this.start,e.start),Math.min(this.stop,e.stop))}},{key:"intersects",value:function(t){return this.start<=t.stop&&t.start<=this.stop}},{key:"contains",value:function(t){return t>=this.start&&t<=this.stop}},{key:"containsInterval",value:function(t){return this.contains(t.start)&&this.contains(t.stop)}},{key:"clone",value:function(){return new t(this.start,this.stop)}},{key:"isCoveredBy",value:function(t){for(var e=this.clone(),n=0;n<t.length;n++){var r=t[n];if(n&&r.start<t[n-1].start)throw"isCoveredBy must be called with sorted ranges";if(r.start>e.start)return!1;if(e.start=r.stop+1,e.length()<=0)return!0}return!1}},{key:"subtract",value:function(e){return this.intersects(e)?this.containsInterval(e)?[new t(this.start,e.start-1),new t(e.stop+1,this.stop)].filter(function(t){return t.length()>0}):e.containsInterval(this)?[]:e.start<this.start?[new t(e.stop+1,this.stop)]:[new t(this.start,e.start-1)]:[this]}},{key:"complementIntervals",value:function(t){var e=[this];return t.forEach(function(t){var n=[];e.forEach(function(e){n=n.concat(e.subtract(t))}),e=n}),e}},{key:"toString",value:function(){return"["+this.start+", "+this.stop+"]"}}],[{key:"intersectAll",value:function(t){if(!t.length)throw new Error("Tried to intersect zero intervals");var e=t[0].clone();return t.slice(1).forEach(function(t){var n=t.start,r=t.stop;e.start=Math.max(n,e.start),e.stop=Math.min(r,e.stop)}),e}},{key:"boundingInterval",value:function(t){if(!t.length)throw new Error("Tried to bound zero intervals");var e=t[0].clone();return t.slice(1).forEach(function(t){var n=t.start,r=t.stop;e.start=Math.min(n,e.start),e.stop=Math.max(r,e.stop)}),e}}]),t}();e.exports=o},{}],183:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=function(t,e,n){for(var r=!0;r;){var i=t,o=e,a=n;r=!1,null===i&&(i=Function.prototype);var s=Object.getOwnPropertyDescriptor(i,o);if(void 0!==s){if("value"in s)return s.value;var u=s.get;return void 0===u?void 0:u.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return void 0;t=c,e=o,n=a,r=!0,s=c=void 0}},u=t("react"),c=r(u),l=function(t){function e(){i(this,e),s(Object.getPrototypeOf(e.prototype),"constructor",this).apply(this,arguments)}return o(e,t),a(e,[{key:"clickHandler",value:function(t,e){e.preventDefault();var n=this.props.items[t];"string"!=typeof n&&this.props.onSelect(n.key)}},{key:"render",value:function(){var t=this,e=function(e){return t.clickHandler.bind(t,e)},n=[];return this.props.header&&n.push(c["default"].createElement("div",{key:"header",className:"menu-header"},this.props.header)),n=n.concat(this.props.items.map(function(t,n){if("string"==typeof t)return c["default"].createElement("div",{key:n,className:"menu-separator"});var r="check"+(t.checked?" checked":"");return c["default"].createElement("div",{key:n,className:"menu-item",onClick:e(n)},c["default"].createElement("span",{className:r}),c["default"].createElement("span",{className:"menu-item-label"},t.label))})),c["default"].createElement("div",{className:"menu"},n)}}]),e}(c["default"].Component);e.exports=l},{react:175}],184:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=function(){function t(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(u){i=!0,o=u}finally{try{!r&&s["return"]&&s["return"]()}finally{if(i)throw o}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=t("q"),u=r(s),c=function(){function t(e){i(this,t),this.url=e,this.fileLength=-1,this.chunks=[],this.numNetworkRequests=0}return a(t,[{key:"getBytes",value:function(t,e){if(0>e)return u["default"].reject("Requested <0 bytes ("+e+") from "+this.url);var n=t+e-1;-1!=this.fileLength&&(n=Math.min(this.fileLength-1,n));var r=this.getFromCache(t,n);return r?u["default"].when(r):this.getFromNetwork(t,n)}},{key:"getAll",value:function(){var t=this;if(-1!=this.fileLength){var e=this.getFromCache(0,this.fileLength-1);if(e)return u["default"].when(e)}var n=new XMLHttpRequest;return n.open("GET",this.url),n.responseType="arraybuffer",this.promiseXHR(n).then(function(e){var n=o(e,1),r=n[0];return t.fileLength=r.byteLength,t.chunks=[{start:0,stop:t.fileLength-1,buffer:r}],r})}},{key:"getAllString",value:function(){var t=new XMLHttpRequest;return t.open("GET",this.url),this.promiseXHR(t).then(function(t){var e=o(t,1),n=e[0];return n})}},{key:"getSize",value:function(){if(-1!=this.fileLength)return u["default"].when(this.fileLength);var t=new XMLHttpRequest;return t.open("HEAD",this.url),this.promiseXHR(t).then(function(){var e=t.getResponseHeader("Content-Length");if(null!==e)return Number(e);throw"Remote resource has unknown length"})}},{key:"getFromCache",value:function(t,e){for(var n=0;n<this.chunks.length;n++){var r=this.chunks[n];if(r.start<=t&&r.stop>=e)return r.buffer.slice(t-r.start,e-r.start+1)}return null}},{key:"getFromNetwork",value:function(t,e){var n=this,r=e-t+1;if(r>5e7)throw"Monster request: Won't fetch "+r+" bytes from "+this.url;var i=new XMLHttpRequest;return i.open("GET",this.url),i.responseType="arraybuffer",i.setRequestHeader("Range","bytes="+t+"-"+e),this.promiseXHR(i).then(function(e){var r=o(e,1),a=r[0],s={start:t,stop:t+a.byteLength-1,buffer:a};n.chunks.push(s);var u=n._getLengthFromContentRange(i);return null!==u&&void 0!==u&&(-1!=n.fileLength&&n.fileLength!=u?console.warn("Size of remote file "+n.url+" changed from "+(n.fileLength+" to "+u)):n.fileLength=u),a})}},{key:"promiseXHR",value:function(t){var e=this.url,n=u["default"].defer();return t.addEventListener("load",function(t){this.status>=400?n.reject("Request for "+e+" failed with status: "+this.status+" "+this.statusText):n.resolve([this.response,t])}),t.addEventListener("error",function(t){n.reject("Request for "+e+" failed with status: "+this.status+" "+this.statusText)}),this.numNetworkRequests++,t.send(),n.promise}},{key:"_getLengthFromContentRange",value:function(t){if(!/Content-Range/i.exec(t.getAllResponseHeaders()))return null;var e=t.getResponseHeader("Content-Range"),n=/\/(\d+)$/.exec(e);return n?Number(n[1]):(console.warn("Received improper Content-Range value for "+(this.url+": "+e)),null)}},{key:"clearCache",value:function(){this.chunks=[]}}]),t}();e.exports=c},{q:22}],185:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=function(t,e,n){for(var r=!0;r;){var i=t,o=e,a=n;r=!1,null===i&&(i=Function.prototype);var s=Object.getOwnPropertyDescriptor(i,o);if(void 0!==s){if("value"in s)return s.value;var u=s.get;return void 0===u?void 0:u.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return void 0;t=c,e=o,n=a,r=!0,s=c=void 0}},u=t("react"),c=r(u),l=t("./Controls"),f=r(l),p=t("./Menu"),h=r(p),d=t("./VisualizationWrapper"),v=r(d),g=function(t){function e(t){i(this,e),s(Object.getPrototypeOf(e.prototype),"constructor",this).call(this,t),this.state={contigList:this.props.referenceSource.contigList(),range:null,settingsMenuKey:null}}return o(e,t),a(e,[{key:"componentDidMount",value:function(){var t=this;this.props.referenceSource.on("contigs",function(){t.setState({contigList:t.props.referenceSource.contigList()})}),this.state.range||this.handleRangeChange(this.props.initialRange),this.setState({contigList:this.props.referenceSource.contigList()})}},{key:"handleRangeChange",value:function(t){var e=this;this.props.referenceSource.normalizeRange(t).then(function(t){e.setState({range:t}),e.props.tracks.forEach(function(e){e.source.rangeChanged(t)})}).done()}},{key:"toggleSettingsMenu",value:function(t,e){this.state.settingsMenuKey==t?this.setState({settingsMenuKey:null}):this.setState({settingsMenuKey:t})}},{key:"handleSelectOption",value:function(t,e){this.setState({settingsMenuKey:null});var n=this.props.tracks[Number(t)].visualization,r=n.options,i=n.component.handleSelectOption(e,r);n.options=i,i!=r&&this.forceUpdate()}},{key:"makeDivForTrack",value:function(t,e){var n=c["default"].createElement(v["default"],{visualization:e.visualization,range:this.state.range,onRangeChange:this.handleRangeChange.bind(this),source:e.source,referenceSource:this.props.referenceSource}),r=e.track.name||"(track name)",i=null,o=null;if(e.visualization.component.getOptionsMenu&&(i=c["default"].createElement("span",{ref:"gear-"+t,className:"gear",onClick:this.toggleSettingsMenu.bind(this,t)},"⚙")),this.state.settingsMenuKey==t){var a=this.refs["gear-"+t],s=a.offsetLeft,u=a.offsetWidth,l=a.offsetTop,f={position:"absolute",left:s+u+"px",top:l+"px"},p=e.visualization.component.getOptionsMenu(e.visualization.options);o=c["default"].createElement("div",{className:"menu-container",style:f},c["default"].createElement(h["default"],{header:r,items:p,onSelect:this.handleSelectOption.bind(this,t)}))}var d=["track",e.visualization.component.displayName||"",e.track.cssClass||""].join(" ");return c["default"].createElement("div",{key:t,className:d},c["default"].createElement("div",{className:"track-label"},c["default"].createElement("span",null,r),c["default"].createElement("br",null),i,o),c["default"].createElement("div",{className:"track-content"},n))}},{key:"render",value:function(){var t=this,e=this.props.tracks.map(function(e,n){return t.makeDivForTrack(""+n,e)});return c["default"].createElement("div",{className:"pileup-root"},c["default"].createElement("div",{className:"track controls"},c["default"].createElement("div",{className:"track-label"}," "),c["default"].createElement("div",{className:"track-content"},c["default"].createElement(f["default"],{contigList:this.state.contigList,range:this.state.range,onChange:this.handleRangeChange.bind(this)}))),e)}}]),e}(c["default"].Component);g.displayName="Root",e.exports=g},{"./Controls":180,"./Menu":183,"./VisualizationWrapper":187,react:175}],186:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=t("underscore"),s=r(a),u=t("./utils"),c=1e3,l=function(){function t(){i(this,t),this.contigMap={}}return o(t,[{key:"setRange",value:function(t,e){if(0!==t.length()){if(t.length()!=e.length)throw"setRange length mismatch";var n=this._getSequences(t.contig);n||(n=this.contigMap[t.contig]={});var r=!0,i=!1,o=void 0;try{for(var a,s=this._chunkForInterval(t.interval)[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var u=a.value,c=u.chunkStart+u.offset-t.start();this._setChunk(n,u,e.slice(c,c+u.length))}}catch(l){i=!0,o=l}finally{try{!r&&s["return"]&&s["return"]()}finally{if(i)throw o}}}}},{key:"getAsString",value:function(t){var e=this._getSequences(t.contig);if(!e)return".".repeat(t.length());var n=this._chunkForInterval(t.interval),r="",i=!0,o=!1,a=void 0;try{for(var s,u=n[Symbol.iterator]();!(i=(s=u.next()).done);i=!0){var c=s.value,l=e[c.chunkStart];r+=l?0===c.offset&&c.length==l.length?l:l.slice(c.offset,c.offset+c.length):".".repeat(c.length)}}catch(f){o=!0,a=f}finally{try{!i&&u["return"]&&u["return"]()}finally{if(o)throw a}}return r}},{key:"getAsObjects",value:function(t){return s["default"].object(s["default"].map(this.getAsString(t),function(e,n){return[t.contig+":"+(t.start()+n),"."==e?null:e]}))}},{key:"_getChunk",value:function(t,e){return t[e]||".".repeat(c)}},{key:"_chunkForInterval",value:function(t){var e=t.start%c,n=t.start-e,r=[{chunkStart:n,offset:e,length:Math.min(c-e,t.length())}];for(n+=c;n<=t.stop;n+=c)r.push({chunkStart:n,offset:0,length:Math.min(c,t.stop-n+1)});return r}},{key:"_setChunk",value:function(t,e,n){if(0===e.offset&&n.length==c)return void(t[e.chunkStart]=n);var r=this._getChunk(t,e.chunkStart);t[e.chunkStart]=r.slice(0,e.offset)+n+r.slice(e.offset+n.length)}},{key:"_getSequences",value:function(t){return this.contigMap[t]||this.contigMap[(0,u.altContigName)(t)]||null}}]),t}();e.exports=l},{"./utils":209,underscore:177}],187:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=function(t,e,n){for(var r=!0;r;){var i=t,o=e,a=n;r=!1,null===i&&(i=Function.prototype);var s=Object.getOwnPropertyDescriptor(i,o);if(void 0!==s){if("value"in s)return s.value;var u=s.get;return void 0===u?void 0:u.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return void 0;t=c,e=o,n=a,r=!0,s=c=void 0}},u=t("react"),c=r(u),l=t("react-dom"),f=r(l),p=t("./viz/d3utils"),h=r(p),d=t("underscore"),v=r(d),g=t("../lib/minid3"),m=r(g),y=function(t){function e(t){i(this,e),s(Object.getPrototypeOf(e.prototype),"constructor",this).call(this,t),this.hasDragBeenInitialized=!1,this.state={width:0,height:0}}return o(e,t),a(e,[{key:"updateSize",value:function(){var t=f["default"].findDOMNode(this).parentNode;this.setState({width:t.offsetWidth,height:t.offsetHeight})}},{key:"componentDidMount",value:function(){var t=this;window.addEventListener("resize",function(){return t.updateSize()}),this.updateSize(),this.props.range&&!this.hasDragBeenInitialized&&this.addDragInterface()}},{key:"componentDidUpdate",value:function(){this.props.range&&!this.hasDragBeenInitialized&&this.addDragInterface()}},{key:"getScale",value:function(){return this.props.range?h["default"].getTrackScale(this.props.range,this.state.width):function(t){return t}}},{key:"addDragInterface",value:function(){function t(){s()}var e=this;this.hasDragBeenInitialized=!0;var n,r,i=f["default"].findDOMNode(this),o=0,a=function(){m["default"].event.sourceEvent.stopPropagation(),o=0,n=v["default"].clone(e.props.range),r=e.getScale()},s=function(){if(r&&n){var t=r.invert(-o),i=Math.round(t),a=r(t)-r(i),s={contig:n.contig,start:i,stop:i+(n.stop-n.start),offsetPx:a};e.props.onRangeChange(s)}},u=function(){o+=m["default"].event.dx,s()},c=m["default"].behavior.drag().on("dragstart",a).on("drag",u).on("dragend",t);m["default"].select(i).call(c).on("click",this.handleClick.bind(this))}},{key:"handleClick",value:function(){m["default"].event.defaultPrevented&&m["default"].event.stopPropagation()}},{key:"render",value:function(){var t=this.props.range,e=this.props.visualization.component;if(!t)return c["default"].createElement(b,{className:e.displayName});var n=c["default"].createElement(e,{range:t,source:this.props.source,referenceSource:this.props.referenceSource,width:this.state.width,height:this.state.height,options:this.props.visualization.options});return c["default"].createElement("div",{className:"drag-wrapper"},n)}}]),e}(c["default"].Component);y.displayName="VisualizationWrapper";var b=function(t){function e(){i(this,e),s(Object.getPrototypeOf(e.prototype),"constructor",this).apply(this,arguments)}return o(e,t),a(e,[{key:"render",value:function(){var t=this.props.className+" empty";return c["default"].createElement("div",{className:t})}}]),e}(c["default"].Component);e.exports=y},{"../lib/minid3":178,"./viz/d3utils":222,react:175,"react-dom":23,underscore:177}],188:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t){return new m["default"](t,x["default"].TYPE_SET).read("Header")}function a(t){return new m["default"](t,x["default"].TYPE_SET).read("CirTree")}function s(t){var e=t.chromosomeTree.nodes.contents;if(!e)throw"Invalid chromosome tree";return v["default"].object(e.map(function(t){var e=t.id,n=t.key;return[n.replace(/\0.*/,""),e]}))}function u(t){var e=[];return v["default"].each(t,function(t,n){e[t]=n}),e}function c(t,e,n){var r=n.offset-e.start,i=r+n.size,o=t.slice(r+2,i),a=b["default"].inflateRaw(new Uint8Array(o)),s=new m["default"](a,x["default"].TYPE_SET);return s.read("BedBlock")}var l=function(){function t(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(u){i=!0,o=u}finally{try{!r&&s["return"]&&s["return"]()}finally{if(i)throw o}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),f=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),p=t("q"),h=r(p),d=t("underscore"),v=r(d),g=t("jbinary"),m=r(g),y=t("pako/lib/inflate"),b=r(y),w=t("../RemoteFile"),_=r(w),E=t("../Interval"),C=r(E),R=t("../ContigInterval"),k=r(R),O=t("../utils"),S=r(O),T=t("./formats/bbi"),x=r(T),I=function(){function t(e,n,r,o){i(this,t),this.remoteFile=e,this.header=n,this.cirTree=r,this.contigMap=o,this.chrIdToContig=u(o)}return f(t,[{key:"getContigId",value:function(t){if(t in this.contigMap)return this.contigMap[t];var e="chr"+t;if(e in this.contigMap)return this.contigMap[e];throw"Invalid contig "+t}},{key:"getChrIdInterval",value:function(t){return new k["default"](this.getContigId(t.contig),t.start(),t.stop())}},{key:"getContigInterval",value:function(t){return new k["default"](this.chrIdToContig[t.contig],t.start(),t.stop())}},{key:"attachContigToBedRows",value:function(t){var e=this;return t.map(function(t){return{contig:e.chrIdToContig[t.chrId],start:t.start,stop:t.stop,rest:t.rest}})}},{key:"findOverlappingBlocks",value:function(t){var e=[],n=[[t.contig,t.start()],[t.contig,t.stop()]],r=function i(t){if(t.contents)t.contents.forEach(i);else{var r=[[t.startChromIx,t.startBase],[t.endChromIx,t.endBase]];
S["default"].tupleRangeOverlaps(r,n)&&e.push(t)}};return r(this.cirTree.blocks),e}},{key:"fetchFeaturesByBlock",value:function(t){var e=this.findOverlappingBlocks(t);if(0===e.length)return h["default"].when([]);var n=C["default"].boundingInterval(e.map(function(t){return new C["default"](+t.offset,t.offset+t.size)}));return this.remoteFile.getBytes(n.start,n.length()).then(function(t){return e.map(function(e){var r=c(t,n,e);if(e.startChromIx!=e.endChromIx)throw"Can't handle blocks which span chromosomes!";return{range:new k["default"](e.startChromIx,e.startBase,e.endBase),rows:r}})})}},{key:"fetchFeatures",value:function(t){var e=this;return this.fetchFeaturesByBlock(t).then(function(n){var r=v["default"].flatten(n.map(function(t){return t.rows}));return r=r.filter(function(e){var n=new k["default"](e.chrId,e.start,e.stop-1);return t.intersects(n)}),e.attachContigToBedRows(r)})}},{key:"getFeaturesInRange",value:function(t){return this.fetchFeatures(this.getChrIdInterval(t))}},{key:"getFeatureBlocksOverlapping",value:function(t){var e=this,n=this.getChrIdInterval(t);return this.fetchFeaturesByBlock(n).then(function(t){return t.map(function(t){return{range:e.getContigInterval(t.range),rows:e.attachContigToBedRows(t.rows)}})})}}]),t}(),M=function(){function t(e){var n=this;i(this,t),this.remoteFile=new _["default"](e),this.header=this.remoteFile.getBytes(0,65536).then(o),this.contigMap=this.header.then(s),this.cirTree=this.header.then(function(t){var e=t.unzoomedIndexOffset,r=t.zoomHeaders[0],i=r?r.dataOffset-e:4096;return n.remoteFile.getBytes(e,i).then(a)}),this.immediate=h["default"].all([this.header,this.cirTree,this.contigMap]).then(function(t){var e=l(t,3),r=e[0],i=e[1],o=e[2],a=o;return new I(n.remoteFile,r,i,a)}),this.immediate.done()}return f(t,[{key:"getFeaturesInRange",value:function(t,e,n){var r=new k["default"](t,e,n);return this.immediate.then(function(t){return t.getFeaturesInRange(r)})}},{key:"getFeatureBlocksOverlapping",value:function(t){return this.immediate.then(function(e){return e.getFeatureBlocksOverlapping(t)})}}]),t}();e.exports=M},{"../ContigInterval":179,"../Interval":182,"../RemoteFile":184,"../utils":209,"./formats/bbi":196,jbinary:8,"pako/lib/inflate":10,q:22,underscore:177}],189:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t){return t?"-":"+"}function a(t){return t.map(function(t){var e=t.op,n=t.length;return n+e}).join("")}function s(t){return 0===t.length?"":d["default"].every(t,function(t){return 255==t})?"*":t.map(function(t){return String.fromCharCode(33+t)}).join("")}var u=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),c=t("jdataview"),l=r(c),f=t("jbinary"),p=r(f),h=t("underscore"),d=r(h),v=t("./formats/bamTypes"),g=r(v),m=t("../ContigInterval"),y=r(m),b=["M","I","D","N","S","H","P","=","X"],w=["=","A","C","M","G","R","S","V","T","W","Y","H","K","D","B","N"],_=function(){function t(e,n,r){i(this,t),this.buffer=e,this.offset=n;var o=this._getJDataView();this.refID=o.getInt32(0),this.ref=r,this.pos=o.getInt32(4),this.l_seq=o.getInt32(16),this.cigarOps=this._getCigarOps(),this.name=this._getName()}return u(t,[{key:"toString",value:function(){var t=this.pos+this.l_seq;return this.ref+":"+(1+this.pos)+"-"+t}},{key:"_getJDataView",value:function(){var t=this.buffer;return new l["default"](t,0,t.byteLength,!0)}},{key:"getKey",value:function(){return this.offset.toString()}},{key:"_getName",value:function(){var t=this._getJDataView(),e=t.getUint8(8);return t.seek(32),t.getString(e-1)}},{key:"getFlag",value:function(){return this._getJDataView().getUint16(14)}},{key:"getInferredInsertSize",value:function(){return this._getJDataView().getUint16(28)}},{key:"getStrand",value:function(){return o(this.getFlag()&g["default"].Flags.READ_STRAND)}},{key:"getFull",value:function(){if(this._full)return this._full;var t=new p["default"](this.buffer,g["default"].TYPE_SET),e=t.read(g["default"].ThickAlignment,0);return this._full=e,e}},{key:"getInterval",value:function(){if(this._interval)return this._interval;var t=new y["default"](this.ref,this.pos,this.pos+this.getReferenceLength()-1);return t}},{key:"intersects",value:function(t){return t.intersects(this.getInterval())}},{key:"_getCigarOps",value:function(){for(var t=this._getJDataView(),e=t.getUint8(8),n=t.getUint16(12),r=32+e,i=new Array(n),o=0;n>o;o++){var a=t.getUint32(r+4*o);i[o]={op:b[15&a],length:a>>4}}return i}},{key:"getQualityScores",value:function(){var t=this._getJDataView(),e=t.getUint8(8),n=t.getUint16(12),r=t.getInt32(16),i=32+e+4*n+Math.ceil(r/2);return t.getBytes(r,i,!0,!0)}},{key:"getCigarString",value:function(){return a(this.getFull().cigar)}},{key:"getQualPhred",value:function(){return s(this.getQualityScores())}},{key:"getSequence",value:function(){if(this._seq)return this._seq;for(var t=this._getJDataView(),e=t.getUint8(8),n=t.getUint16(12),r=t.getInt32(16),i=32+e+4*n,o=new Array(r),a=Math.ceil(r/2),s=0;a>s;s++){var u=t.getUint8(i+s);o[2*s]=w[u>>4],r>2*s+1&&(o[2*s+1]=w[15&u])}var c=o.join("");return this._seq=c,c}},{key:"getReferenceLength",value:function(){return t.referenceLengthFromOps(this.cigarOps)}},{key:"getMateProperties",value:function(){var t=this._getJDataView(),e=t.getUint16(14);if(!(e&g["default"].Flags.READ_PAIRED))return null;var n=t.getInt32(20),r=t.getInt32(24),i=o(e&g["default"].Flags.MATE_STRAND);return{ref:n==this.refID?this.ref:null,pos:r,strand:i}}},{key:"debugString",value:function(){var t=this.getFull();return"Name: "+this.name+"\nFLAG: "+this.getFlag()+"\nPosition: "+this.getInterval()+"\nCIGAR: "+this.getCigarString()+"\nSequence: "+t.seq+"\nQuality:  "+this.getQualPhred()+"\nTags: "+JSON.stringify(t.auxiliary,null,"  ")+"\n    "}}],[{key:"referenceLengthFromOps",value:function(t){var e=0;return t.forEach(function(t){var n=t.op,r=t.length;switch(n){case"M":case"D":case"N":case"=":case"X":e+=r}}),e}}]),t}();e.exports=_},{"../ContigInterval":179,"./formats/bamTypes":195,jbinary:8,jdataview:9,underscore:177}],190:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){var n=new v["default"](t,m["default"].TYPE_SET),r=n.read("SequenceRecord"),i=n.tell()+8*r.maskBlockCount+4;return{numBases:r.dnaSize,unknownBlockStarts:r.nBlockStarts,unknownBlockLengths:r.nBlockSizes,numMaskBlocks:r.maskBlockCount,maskBlockStarts:[],maskBlockLengths:[],dnaOffsetFromHeader:i,offset:e}}function a(t){var e=new v["default"](t,m["default"].TYPE_SET),n=e.read("Header");return{sequenceCount:n.sequenceCount,sequences:n.sequences}}function s(t,e,n){var r=[];r.length=4*t.byteLength;for(var i=-e,o=0;o<t.byteLength;o++)for(var a=t.getUint8(o),s=6;s>=0;s-=2){var u=y[a>>s&3];e>=0&&(r[i]=u),i++}return r.length=n,r}function u(t,e,n){for(var r=e+t.length-1,i=0;i<n.unknownBlockStarts.length;i++){var o=n.unknownBlockStarts[i],a=n.unknownBlockLengths[i],s=o+a-1,u=Math.max(o,e),c=Math.min(s,r);if(!(u>c))for(var l=u;c>=l;l++)t[l-e]="N"}return t}var c=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=t("q"),f=r(l),p=t("underscore"),h=r(p),d=t("jbinary"),v=r(d),g=t("./formats/twoBitTypes"),m=r(g),y=["T","C","A","G"],b=function(){function t(e){i(this,t),this.remoteFile=e;var n=f["default"].defer();this.header=n.promise,this.remoteFile.getBytes(0,16384).then(function(t){var e=a(t);n.resolve(e)}).done()}return c(t,[{key:"getFeaturesInRange",value:function(t,e,n){var r=this;if(e>n)throw"Requested a 2bit range with start > stop ("+e+", "+n+")";return this._getSequenceHeader(t).then(function(t){var i=t.offset+t.dnaOffsetFromHeader,o=Math.floor(i+e/4),a=Math.ceil((n-e+1)/4)+1;return r.remoteFile.getBytes(o,a).then(function(r){var i=new DataView(r);return u(s(i,e%4,n-e+1),e,t).join("")})})}},{key:"getContigList",value:function(){return this.header.then(function(t){return t.sequences.map(function(t){return t.name})})}},{key:"_getSequenceHeader",value:function(t){var e=this;return this.header.then(function(n){var r=h["default"].findWhere(n.sequences,{name:t})||h["default"].findWhere(n.sequences,{name:"chr"+t});if(null===r||void 0===r)throw"Invalid contig: "+t;var i=r;return e.remoteFile.getBytes(i.offset,4095).then(function(t){return o(t,i.offset)})})}}]),t}();e.exports=b},{"./formats/twoBitTypes":198,jbinary:8,q:22,underscore:177}],191:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function(){function t(e,n){r(this,t),this.coffset=e,this.uoffset=n}return i(t,[{key:"toString",value:function(){return this.coffset+":"+this.uoffset}},{key:"isLessThan",value:function(t){return this.coffset<t.coffset||this.coffset==t.coffset&&this.uoffset<t.uoffset}},{key:"isLessThanOrEqual",value:function(t){return this.coffset<=t.coffset||this.coffset==t.coffset&&this.uoffset<=t.uoffset}},{key:"isEqual",value:function(t){return this.coffset==t.coffset&&this.uoffset==t.uoffset}},{key:"compareTo",value:function(t){return this.coffset-t.coffset||this.uoffset-t.uoffset}},{key:"clone",value:function(){return new t(this.coffset,this.uoffset)}}],[{key:"fromBlob",value:function(e,n){n=n||0;var r=e[n]+256*e[n+1],i=e[n+2]+256*e[n+3]+65536*e[n+4]+16777216*e[n+5]+4294967296*e[n+6]+1099511627776*e[n+7];return new t(i,r)}}]),t}();e.exports=o},{}],192:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t){var e=new m["default"](t,0,t.byteLength,!0),n=1/0,r=[];e.getInt32();for(var i=e.getInt32(),o=0;i>o;o++){r.push(e.tell());for(var a=e.getInt32(),s=0;a>s;s++){e.getUint32();var u=e.getInt32();e.skip(16*u)}var c=e.getInt32();if(c){var l=k["default"].fromBlob(e.getBytes(8),0),f=l.coffset+(l.uoffset?65536:0);f&&(n=Math.min(f,n)),e.skip(8*(c-1))}}return r.push(e.tell()),{chunks:b["default"].zip(b["default"].initial(r),b["default"].rest(r)),minBlockIndex:n}}function a(t){return new v["default"](t,C["default"].TYPE_SET).read("ChunksArray")}function s(t){for(var e=new Array(Math.floor(t.length/8)),n=0;n<t.length-7;n+=8)e[n>>3]=k["default"].fromBlob(t,n);return e}function u(t,e){return t.chunk_beg.isLessThanOrEqual(e.chunk_end)&&e.chunk_beg.isLessThanOrEqual(t.chunk_end)}function c(t,e){return t.chunk_beg.isEqual(e.chunk_end)||t.chunk_end.isEqual(e.chunk_beg)}function l(t,e){t.sort(function(t,e){var n=t.chunk_beg.compareTo(e.chunk_beg);return 0===n&&(n=t.chunk_end.compareTo(e.chunk_end)),n});var n=[];return t.forEach(function(t){if(!t.chunk_end.isLessThan(e)){if(0===n.length)return void n.push(t);var r=n[n.length-1];u(r,t)||c(r,t)?r.chunk_end.isLessThan(t.chunk_end)&&(r.chunk_end=t.chunk_end):n.push(t)}}),n}function f(t,e){var n,r=[];for(--e,r.push(0),n=1+(t>>26);1+(e>>26)>=n;++n)r.push(n);for(n=9+(t>>23);9+(e>>23)>=n;++n)r.push(n);for(n=73+(t>>20);73+(e>>20)>=n;++n)r.push(n);for(n=585+(t>>17);585+(e>>17)>=n;++n)r.push(n);for(n=4681+(t>>14);4681+(e>>14)>=n;++n)r.push(n);return r}var p=function(){function t(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(u){i=!0,o=u}finally{try{!r&&s["return"]&&s["return"]()}finally{if(i)throw o}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),h=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),d=t("jbinary"),v=r(d),g=t("jdataview"),m=r(g),y=t("underscore"),b=r(y),w=t("q"),_=r(w),E=t("./formats/bamTypes"),C=r(E),R=t("./VirtualOffset"),k=r(R),O=function(){function t(e,n,r){if(i(this,t),this.buffer=e,this.remoteFile=n,e)this.indexChunks=o(e);else{if(!r)throw"Without index chunks, the entire BAI buffer must be loaded";this.indexChunks=r}this.indexCache=new Array(this.indexChunks.chunks.length),this.intervalsCache=new Array(this.indexChunks.chunks.length)}return h(t,[{key:"getChunksForInterval",value:function(t){var e=this;if(t.contig<0||t.contig>this.indexChunks.chunks.length)return _["default"].reject("Invalid contig "+t.contig);var n=f(t.start(),t.stop()+1);return this.indexForContig(t.contig).then(function(r){var i=b["default"].chain(r.bins).filter(function(t){return n.indexOf(t.bin)>=0}).map(function(t){return a(t.chunks)}).flatten().value(),o=e.getIntervals(r.intervals,t.contig),s=Math.max(0,Math.floor(t.start()/16384)),u=o[s];return i=l(i,u)})}},{key:"indexForContig",value:function(t){var e=this.indexCache[t];if(e)return e;var n=p(this.indexChunks.chunks[t],2),r=n[0],i=n[1];return this.indexCache[t]=this.getSlice(r,i).then(function(t){var e=new v["default"](t,C["default"].TYPE_SET);return e.read("BaiIndex")}),this.indexCache[t]}},{key:"getSlice",value:function(t,e){return this.buffer?_["default"].when(this.buffer.slice(t,e)):this.remoteFile.getBytes(t,e-t+1)}},{key:"getIntervals",value:function(t,e){var n=this.intervalsCache[e];return n?n:(n=s(t),this.intervalsCache[e]=n,n)}}]),t}(),S=function(){function t(e,n){i(this,t),this.remoteFile=e,n?this.immediate=_["default"].when(new O(null,e,n)):this.immediate=e.getAll().then(function(t){return new O(t,e,n)}),this.immediate.done()}return h(t,[{key:"getChunksForInterval",value:function(t){return this.immediate.then(function(e){return e.getChunksForInterval(t)})}},{key:"getHeaderSize",value:function(){return this.immediate.then(function(t){return t.indexChunks.minBlockIndex})}}]),t}();e.exports=S},{"./VirtualOffset":191,"./formats/bamTypes":195,jbinary:8,jdataview:9,q:22,underscore:177}],193:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e,n){var r=new k["default"](t.refID,t.pos,t.pos+t.l_seq-1);return n?e.containsInterval(r):r.intersects(e)}function a(t,e,n,r){var i=t.getInt32(e);if(e+=4,e+i>t.byteLength)return null;var o=t.buffer.slice(e,e+i),a=new x["default"](o,n.clone(),r);return{read:a,readLength:4+i}}function s(t,e,n,r,i,s,u){var c=new h["default"](t,0,t.byteLength,!0),l=!1,f=0;i=i.clone();var p=0;try{for(;f<t.byteLength;){var d=a(c,f,i,e);if(!d)break;var v=d.read,g=d.readLength;f+=g,o(v,n,r)&&u.push(v),i.uoffset+=g;var m=s[p].buffer.byteLength;i.uoffset>=m&&(i.uoffset-=m,i.coffset+=s[p].compressedLength,p++);var y=new k["default"](v.refID,v.pos,v.pos+1);if(y.contig>n.contig||y.contig==n.contig&&y.start()>n.stop()){l=!0;break}}}catch(b){if(!(b instanceof RangeError))throw b}return{shouldAbort:l,nextOffset:i}}function u(t,e,n,r,i){function o(i){if(0===i.length)return void c.resolve(u);var l=i[0],f=l.chunk_beg.coffset,p=l.chunk_end.coffset,h=Math.min(I,p+65536-f);t.getBytes(f,h).then(function(h){a++,c.notify({numRequests:a});var d={filename:t.url,initialOffset:f},g=_["default"].inflateConcatenatedGzip(h,p-f,d),m=g[g.length-1],y=f+m.offset-1,b=null;g.length>1&&p>y&&(b={chunk_beg:new S["default"](y+1,0),chunk_end:l.chunk_end});var w=g.map(function(t){return t.buffer});w[0]=w[0].slice(l.chunk_beg.uoffset);var E=_["default"].concatArrayBuffers(w);if(E.byteLength>0){var C=s(E,e,n,r,l.chunk_beg,g,u),R=C.shouldAbort,k=C.nextOffset;if(R)return void c.resolve(u);b&&(b.chunk_beg=k)}else b=null;o((b?[b]:[]).concat(v["default"].rest(i)))})}var a=0,u=[],c=m["default"].defer();return o(i),c.promise}var c=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=t("jbinary"),f=r(l),p=t("jdataview"),h=r(p),d=t("underscore"),v=r(d),g=t("q"),m=r(g),y=t("./formats/bamTypes"),b=r(y),w=t("../utils"),_=r(w),E=t("./bai"),C=r(E),R=t("../ContigInterval"),k=r(R),O=t("./VirtualOffset"),S=r(O),T=t("./SamRead"),x=r(T),I=131072,M=function(){function t(e,n,r){var o=this;i(this,t),this.remoteFile=e,this.index=n?new C["default"](n,r):null,this.hasIndexChunks=!!r;var a=this.index?this.index.getHeaderSize():m["default"].when(131070);this.header=a.then(function(t){var e=m["default"].defer();return m["default"].when().then(function(){e.notify({status:"Fetching BAM header"})}),_["default"].pipePromise(e,o.remoteFile.getBytes(0,t).then(function(t){var e=_["default"].inflateGzip(t),n=new f["default"](e,b["default"].TYPE_SET);return n.read("BamHeader")})),e.promise}),this.header.done()}return c(t,[{key:"readAll",value:function(){return this.remoteFile.getAll().then(function(t){var e=_["default"].inflateGzip(t),n=new f["default"](e,b["default"].TYPE_SET),r=n.read("BamFile"),i=new S["default"](0,0),o=function(t){return t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength-1)};return r.alignments=r.alignments.map(function(t){var e=new x["default"](o(t.contents),i,"");return-1!=e.refID&&(e.ref=r.header.references[e.refID].name),e}),r})}},{key:"readAtOffset",value:function(t){var e=this;return this.remoteFile.getBytes(t.coffset,I).then(function(n){var r=_["default"].inflateGzip(n),i=new h["default"](r,0,r.byteLength,!0),o=a(i,t.uoffset,t,"");if(o){var s=o.read;return e.header.then(function(t){return s.ref=t.references[s.refID].name,s})}throw"Unable to read alignment at "+t+" in "+e.remoteFile.url})}},{key:"getContigIndex",value:function(t){return this.header.then(function(e){for(var n=0;n<e.references.length;n++){var r=e.references[n].name;if(r==t||r=="chr"+t||"chr"+r==t)return{idx:n,name:r}}throw"Invalid contig name: "+t})}},{key:"getAlignmentsInRange",value:function(t,e){var n=this,r=e||!1;if(!this.index)throw"Range searches are only supported on BAMs with BAI indices.";var i=this.index;return this.getContigIndex(t.contig).then(function(e){var o=e.idx,a=e.name,s=m["default"].defer();m["default"].when().then(function(){s.notify({status:"Fetching BAM index"})});var c=new k["default"](o,t.start(),t.stop());return _["default"].pipePromise(s,i.getChunksForInterval(c).then(function(t){return u(n.remoteFile,a,c,r,t)})),s.promise})}}]),t}();e.exports=M},{"../ContigInterval":179,"../utils":209,"./SamRead":189,"./VirtualOffset":191,"./bai":192,"./formats/bamTypes":195,jbinary:8,jdataview:9,q:22,underscore:177}],194:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(t,e){return c["default"].flatten(t.map(function(t){if(t.containsInterval(e))return[new p(t.start,e.start-1,!1),new p(e.start,e.stop,!0),new p(e.stop+1,t.stop,!1)].filter(function(t){return t.start<=t.stop});var n=e.contains(t.start),r=e.contains(t.stop);return n==r?[new p(t.start,t.stop,n)]:n?[new p(t.start,e.stop,!0),new p(e.stop+1,t.stop,!1)]:[new p(t.start,e.start-1,!1),new p(e.start,t.stop,!0)]}))}var s=function(t,e,n){for(var r=!0;r;){var i=t,o=e,a=n;r=!1,null===i&&(i=Function.prototype);var s=Object.getOwnPropertyDescriptor(i,o);if(void 0!==s){if("value"in s)return s.value;var u=s.get;return void 0===u?void 0:u.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return void 0;t=c,e=o,n=a,r=!0,s=c=void 0}},u=t("underscore"),c=r(u),l=t("../Interval"),f=r(l),p=function(t){function e(t,n,r){i(this,e),s(Object.getPrototypeOf(e.prototype),"constructor",this).call(this,t,n),this.isCoding=r}return o(e,t),e}(f["default"]);e.exports={splitCodingExons:a,CodingInterval:p}},{"../Interval":182,underscore:177}],195:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}var i=t("jbinary"),o=r(i),a=t("underscore"),s=r(a),u=t("../VirtualOffset"),c=r(u),l=t("./helpers"),f=["=","A","C","M","G","R","S","V","T","W","Y","H","K","D","B","N"],p=["M","I","D","N","S","H","P","=","X"],h={refID:"int32",pos:"int32",l_read_name:"uint8",MAPQ:"uint8",bin:"uint16",n_cigar_op:"uint16",FLAG:"uint16",l_seq:"int32",next_refID:"int32",next_pos:"int32",tlen:"int32"},d={READ_PAIRED:1,PROPER_PAIR:2,READ_UNMAPPED:4,MATE_UNMAPPED:8,READ_STRAND:16,MATE_STRAND:32,FIRST_OF_PAIR:64,SECOND_OF_PAIR:128,NOT_PRIMARY_ALIGNMENT:256,READ_FAILS_VENDOR_QUALITY_CHECK:512,DUPLICATE_READ:1024,SUPPLEMENTARY_ALIGNMENT:2048},v=s["default"].extend({},h,{read_name:[l.nullString,"l_read_name"],cigar:["array","CigarOp","n_cigar_op"],seq:["FourBitSequence","l_seq"],qual:["array","uint8","l_seq"],auxiliary:["array",{tag:["string",2],val_type:"char",value:["if",function(t){return"B"==t.val_type},{val_type:"char",num_values:"int32",values:["array","AuxiliaryValue","num_values"]},"AuxiliaryValue"]}]}),g={"jBinary.littleEndian":!0,BamHeader:{_magic:["const",["string",4],"BAM",!0],l_text:"int32",text:["string","l_text"],n_ref:"int32",references:["array",{l_name:"int32",name:[l.nullString,"l_name"],l_ref:"int32"},"n_ref"]},BamAlignment:{block_size:"int32",contents:["blob","block_size"]},AuxiliaryValue:["if",function(t){return"A"==t.val_type},"char",["if",function(t){return"c"==t.val_type},"int8",["if",function(t){return"C"==t.val_type},"uint8",["if",function(t){return"s"==t.val_type},"int16",["if",function(t){return"S"==t.val_type},"uint16",["if",function(t){return"i"==t.val_type},"int32",["if",function(t){return"I"==t.val_type},"uint32",["if",function(t){return"f"==t.val_type},"float32",["if",function(t){return"Z"==t.val_type},"string0",["skip",0]]]]]]]]]],CigarOp:o["default"].Template({baseType:"uint32",read:function(t){var e=this.baseRead();return{length:e>>4,op:p[15&e]}}}),FourBitSequence:o["default"].Template({setParams:function(t){this.lengthField=t;var e=function(e){return Math.floor((+e[t]+1)/2)};this.baseType=["array","uint8",e]},read:function(t){var e=+t[this.lengthField],n=this.baseRead();return n.map(function(t,n){return f[t>>4]+(e>2*n+1?f[15&t]:"")}).join("")}}),BamFile:{header:"BamHeader",alignments:["array","BamAlignment"]},VirtualOffset:o["default"].Template({baseType:"uint64",read:function(){var t=this.baseRead();return new c["default"](65536*t.hi+(t.lo>>>16),65535&t.lo)}}),ChunksArray:["array",{chunk_beg:"VirtualOffset",chunk_end:"VirtualOffset"}],IntervalsArray:["array","VirtualOffset"],BaiIndex:{n_bin:"int32",bins:["array",{bin:"uint32",n_chunk:"int32",chunks:["blob",function(t){return 16*t.n_chunk}]},"n_bin"],n_intv:"int32",intervals:["blob",function(t){return 8*t.n_intv}]},BaiFile:{magic:["const",["string",4],"BAI"],n_ref:"int32",indices:["array","BaiIndex","n_ref"],n_no_coor:l.uint64native}};e.exports={TYPE_SET:g,ThinAlignment:h,ThickAlignment:v,Flags:d}},{"../VirtualOffset":191,"./helpers":197,jbinary:8,underscore:177}],196:[function(t,e,n){"use strict";var r=t("./helpers"),i={"jBinary.littleEndian":!0,Header:{_magic:["const","uint32",2273964779,!0],version:["const","uint16",4,!0],zoomLevels:"uint16",chromosomeTreeOffset:"uint64",unzoomedDataOffset:"uint64",unzoomedIndexOffset:"uint64",fieldCount:"uint16",definedFieldCount:"uint16",autoSqlOffset:"uint64",totalSummaryOffset:"uint64",uncompressBufSize:"uint32",extensionOffset:"uint64",zoomHeaders:["array","ZoomHeader","zoomLevels"],totalSummary:(0,r.typeAtOffset)("TotalSummary","totalSummaryOffset"),chromosomeTree:(0,r.typeAtOffset)("BPlusTree","chromosomeTreeOffset")},TotalSummary:{basesCovered:"uint64",minVal:"float64",maxVal:"float64",sumData:"float64",sumSquared:"float64"},ZoomHeader:{reductionLevel:"uint32",_reserved:"uint32",dataOffset:"uint64",indexOffset:"uint64"},BPlusTree:{magic:["const","uint32",2026540177,!0],blockSize:"uint32",keySize:"uint32",valSize:"uint32",itemCount:"uint64",_reserved2:["skip",4],_reserved3:["skip",4],nodes:"BPlusTreeNode"},BPlusTreeNode:{isLeaf:"uint8",_reserved:"uint8",count:"uint16",contents:["array",["if","isLeaf",{key:["string","keySize"],id:"uint32",size:"uint32"},{key:["string","keySize"],offset:"uint64"}],"count"]},CirTree:{_magic:["const","uint32",610839776,!0],blockSize:"uint32",itemCount:"uint64",startChromIx:"uint32",startBase:"uint32",endChromIx:"uint32",endBase:"uint32",fileSize:"uint64",itemsPerSlot:"uint32",_reserved:["skip",4],blocks:"CirNode"},CirNode:{isLeaf:"uint8",_reserved:"uint8",count:"uint16",contents:["array",["if","isLeaf",{startChromIx:"uint32",startBase:"uint32",endChromIx:"uint32",endBase:"uint32",offset:"uint64",size:"uint64"},{startChromIx:"uint32",startBase:"uint32",endChromIx:"uint32",endBase:"uint32",offset:"uint64"}],"count"]},BedEntry:{chrId:"uint32",start:"uint32",stop:"uint32",rest:"string0"},BedBlock:["array","BedEntry"]};e.exports={TYPE_SET:i}},{"./helpers":197}],197:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){return u["default"].Template({baseType:t,read:function(t){return 0===+t[e]?null:this.binary.read(this.baseType,+t[e])}})}var a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=t("jbinary"),u=r(s),c=u["default"].Type({params:["itemType","lengthField"],resolve:function(t){this.itemType=t(this.itemType)},read:function(t){var e=this.binary.tell(),n=+t[this.lengthField];return this.binary.skip(n),this.binary.slice(e,e+n).read(this.itemType)}}),l=u["default"].Template({setParams:function(t){this.baseType=["binary",t]},read:function(){return this.baseRead().read("string0")}}),f=u["default"].Template({baseType:"uint64",read:function(){var t=this.baseRead(),e=+t;if(0>e||1+e==e)throw new RangeError("Number out of precise floating point range: "+t);return+t}}),p=function(){function t(e,n,r){i(this,t),this.bytesPerItem=n,this.jb=e,this.itemType=r,this.length=this.jb.view.byteLength/this.bytesPerItem}return a(t,[{key:"get",value:function(t){return this.jb.seek(t*this.bytesPerItem),this.jb.read(this.itemType)}},{key:"getAll",value:function(){return this.jb.seek(0),this.jb.read(["array",this.itemType,this.length])}}]),t}(),h=u["default"].Type({params:["itemType","bytesPerItem","numItems"],read:function(){var t=this.toValue(this.numItems),e=this.toValue(this.bytesPerItem);if(void 0===t||void 0===e)throw"bytesPerItem and numItems must be set for lazyArray";var n=this.binary.tell(),r=t*e,i=this.binary.slice(n,n+r);return this.binary.skip(r),new p(i,e,this.itemType)}});e.exports={typeAtOffset:o,sizedBlock:c,nullString:l,uint64native:f,lazyArray:h}},{jbinary:8}],198:[function(t,e,n){"use strict";var r={"jBinary.littleEndian":!0,Header:{magic:["const","uint32",440477507,!0],version:["const","uint32",0,!0],sequenceCount:"uint32",reserved:"uint32",sequences:["array","SequenceHeader","sequenceCount"]},SequenceHeader:{nameSize:"uint8",name:["string","nameSize"],offset:"uint32"},SequenceRecord:{dnaSize:"uint32",nBlockCount:"uint32",nBlockStarts:["array","uint32","nBlockCount"],nBlockSizes:["array","uint32","nBlockCount"],maskBlockCount:"uint32"}};e.exports={TYPE_SET:r}},{}],199:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t){var e=t.indexOf("	"),n=t.indexOf("	",e+1);return{contig:t.slice(0,e),position:Number(t.slice(e+1,n)),line:t}}function o(t){var e=t.split("	");return{contig:e[0],position:Number(e[1]),ref:e[3],alt:e[4],vcfLine:t}}function a(t,e){return t.contig<e.contig?-1:t.contig>e.contig?1:t.position-e.position}function s(t,e,n){for(var r=0,i=t.length;i>r;){var o=Math.floor((r+i)/2),a=n(t[o],e);0>a?r=o+1:i=o}return r}Object.defineProperty(n,"__esModule",{value:!0});var u=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),c=function(){function t(e){r(this,t),this.lines=e,this.contigMap=this.extractContigs()}return u(t,[{key:"extractContigs",value:function(){for(var t=[],e="",n=0;n<this.lines.length;n++){var r=this.lines[n];r.contig!=e&&t.push(r.contig)}var i={};return t.forEach(function(t){"chr"==t.slice(0,3)?i[t.slice(4)]=t:i["chr"+t]=t,i[t]=t}),i}},{key:"getFeaturesInRange",value:function(t){var e=this.lines,n=this.contigMap[t.contig];if(!n)return[];for(var r={contig:n,position:t.start(),line:""},i={contig:n,position:t.stop(),line:""},u=s(e,r,a),c=[],l=u;l<e.length&&!(a(e[l],i)>0);l++)c.push(e[l]);return c.map(function(t){return o(t.line)})}}]),t}(),l=function(){function t(e){r(this,t),this.remoteFile=e,this.immediate=this.remoteFile.getAllString().then(function(t){var e=t.split("\n").filter(function(t){return t.length&&"#"!=t[0]}).map(i);return e}).then(function(t){return t.sort(a),new c(t)}),this.immediate.done()}return u(t,[{key:"getFeaturesInRange",value:function(t){return this.immediate.then(function(e){return e.getFeaturesInRange(t)})}}]),t}();e.exports=l},{}],200:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t){return u["default"].find(t,function(t){return!!t.track.isReference})}function o(t,e){var n="string"==typeof t?document.getElementById(t):t;if(!n)throw new Error("Attempted to create pileup with non-existent element "+t);var r=e.tracks.map(function(t){var e=t.data?t.data:t.viz.component.defaultSource;if(!e)throw new Error("Track '"+t.viz.component.displayName+"' doesn't have a default data source; you must specify one when initializing it.");return{visualization:t.viz,source:e,track:t}}),o=i(r);if(!o)throw new Error("You must include at least one track with type=reference");var a=p["default"].render(l["default"].createElement(F["default"],{referenceSource:o.source,tracks:r,initialRange:e.range}),n);return{setRange:function(t){if(null===a)throw"Cannot call setRange on a destroyed pileup";a.handleRangeChange(t)},getRange:function(){if(null===a)throw"Cannot call setRange on a destroyed pileup";return u["default"].clone(a.state.range)},destroy:function(){if(!r)throw"Cannot call destroy() twice on the same pileup";r.forEach(function(t){var e=t.source;e.off()}),p["default"].unmountComponentAtNode(n),a=null,o=null,r=null}}}function a(t){return function(e){return e=u["default"].extend({},t.defaultOptions,e),{component:t,options:e}}}var s=t("underscore"),u=r(s),c=t("react"),l=r(c),f=t("react-dom"),p=r(f),h=t("./sources/TwoBitDataSource"),d=r(h),v=t("./sources/BigBedDataSource"),g=r(v),m=t("./sources/VcfDataSource"),y=r(m),b=t("./sources/BamDataSource"),w=r(b),_=t("./sources/GA4GHDataSource"),E=r(_),C=t("./sources/EmptySource"),R=r(C),k=t("./viz/CoverageTrack"),O=r(k),S=t("./viz/GenomeTrack"),T=r(S),x=t("./viz/GeneTrack"),I=r(x),M=t("./viz/LocationTrack"),P=r(M),A=t("./viz/PileupTrack"),N=r(A),D=t("./viz/ScaleTrack"),j=r(D),L=t("./viz/VariantTrack"),B=r(L),U=t("./Root"),F=r(U),V={create:o,formats:{bam:w["default"].create,ga4gh:E["default"].create,vcf:y["default"].create,twoBit:d["default"].create,bigBed:g["default"].create,
empty:R["default"].create},viz:{coverage:a(O["default"]),genome:a(T["default"]),genes:a(I["default"]),location:a(P["default"]),scale:a(j["default"]),variants:a(B["default"]),pileup:a(N["default"])},version:"0.6.2"};e.exports=V,"undefined"!=typeof window&&(window.pileup=V)},{"./Root":185,"./sources/BamDataSource":202,"./sources/BigBedDataSource":203,"./sources/EmptySource":204,"./sources/GA4GHDataSource":205,"./sources/TwoBitDataSource":206,"./sources/VcfDataSource":207,"./viz/CoverageTrack":211,"./viz/GeneTrack":213,"./viz/GenomeTrack":214,"./viz/LocationTrack":215,"./viz/PileupTrack":217,"./viz/ScaleTrack":218,"./viz/VariantTrack":220,react:175,"react-dom":23,underscore:177}],201:[function(t,e,n){"use strict";function r(){var t=!1,e=[0,1],n=[0,1],r=function(r){return t&&(r=Math.max(Math.min(r,e[1]),e[0])),(r-e[0])/(e[1]-e[0])*(n[1]-n[0])+n[0]};return r.clamp=function(e){return void 0===e?t:(t=e,this)},r.domain=function(t){return void 0===t?e:(e=t,this)},r.range=function(t){return void 0===t?n:(n=t,this)},r.invert=function(r){if(t)throw"Can't invert a clamped linear scale.";return(r-n[0])/(n[1]-n[0])*(e[1]-e[0])+e[0]},r.nice=function(){var t=10,n=e,r=Math.abs(n[1]-n[0]),i=Math.pow(10,Math.floor(Math.log(r/t)/Math.LN10)),o=t/r*i;.15>=o?i*=10:.35>=o?i*=5:.75>=o&&(i*=2);var a,s={floor:function(t){return Math.floor(t/i)*i},ceil:function(t){return Math.ceil(t/i)*i}},u=0,c=1,l=e[u],f=e[c];return l>f&&(a=u,u=c,c=a,a=l,l=f,f=a),e[u]=s.floor(l),e[c]=s.ceil(f),this},r}e.exports={linear:r}},{}],202:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t){var e=function(t){return t-t%y},n=Math.max(1,e(t.start())),r=e(t.stop()+y-1);return new h["default"](t.contig,n,r)}function o(t){function e(t){var e=t.getKey();a[e]||(a[e]=t)}function n(t){t.references.forEach(function(t){var e=t.name;s[e]=e,s["chr"+e]=e,"chr"==e.slice(0,3)&&(s[e.slice(3)]=e)})}function r(r){var o=u["default"].isEmpty(s)?t.header.then(n):l["default"].when();return l["default"].when().then(function(){o.isPending()&&!t.hasIndexChunks&&p.trigger("networkprogress",{status:"Fetching BAM index -- use index chunks to speed this up"})}).done(),o.then(function(){var n=s[r.contig],o=new h["default"](n,r.start,r.stop);if(o.isCoveredBy(c))return l["default"].when();o=i(o);var a=o.complementIntervals(c);return c.push(o),c=h["default"].coalesce(c),l["default"].all(a.map(function(n){return t.getAlignmentsInRange(n).progress(function(t){p.trigger("networkprogress",t)}).then(function(t){t.forEach(function(t){return e(t)}),p.trigger("networkdone"),p.trigger("newdata",n)})}))})}function o(t){if(!t)return[];if(u["default"].isEmpty(s))return[];var e=new h["default"](s[t.contig],t.start(),t.stop());return u["default"].filter(a,function(t){return t.intersects(e)})}var a={},s={},c=[],p={rangeChanged:function(t){r(t).done()},getAlignmentsInRange:o,on:function(){},once:function(){},off:function(){},trigger:function(){}};return u["default"].extend(p,f.Events),p}function a(t){var e=t.url;if(!e)throw new Error("Missing URL from track data: "+JSON.stringify(t));var n=t.indexUrl;if(!n)throw new Error("Missing indexURL from track data: "+JSON.stringify(t));var r=t.indexChunks?new v["default"](new m["default"](e),new m["default"](n),t.indexChunks):new v["default"](new m["default"](e),new m["default"](n));return o(r)}var s=t("underscore"),u=r(s),c=t("q"),l=r(c),f=t("backbone"),p=t("../ContigInterval"),h=r(p),d=t("../data/bam"),v=r(d),g=t("../RemoteFile"),m=r(g),y=100;e.exports={create:a,createFromBamFile:o}},{"../ContigInterval":179,"../RemoteFile":184,"../data/bam":193,backbone:1,q:22,underscore:177}],203:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t){var e=new d["default"](t.contig,t.start,t.stop),n=t.rest.split("	"),r=n[7].replace(/,*$/,"").split(",").map(Number),i=n[8].replace(/,*$/,"").split(",").map(Number),o=c["default"].zip(i,r).map(function(e){var n=s(e,2),r=n[0],i=n[1];return new g["default"](t.start+r,t.start+r+i)});return{position:e,id:n[0],strand:n[2],codingRegion:new g["default"](Number(n[3]),Number(n[4])),geneId:n[9],name:n[10],exons:o}}function o(t){function e(t){o[t.id]||(o[t.id]=t)}function n(t){if(!t)return[];var e=[];return c["default"].each(o,function(n){t.intersects(n.position)&&e.push(n)}),e}function r(n){var r=new d["default"](n.contig,n.start,n.stop);return r.isCoveredBy(a)?f["default"].when():(a.push(r),a=d["default"].coalesce(a),t.getFeatureBlocksOverlapping(r).then(function(t){t.forEach(function(t){a.push(t.range),a=d["default"].coalesce(a);var n=t.rows.map(i);n.forEach(function(t){return e(t)}),s.trigger("newdata",r)})}))}var o={},a=[],s={rangeChanged:function(t){r(t).done()},getGenesInRange:n,on:function(){},off:function(){},trigger:function(){}};return c["default"].extend(s,p.Events),s}function a(t){var e=t.url;if(!e)throw new Error("Missing URL from track: "+JSON.stringify(t));return o(new y["default"](e))}Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function t(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(u){i=!0,o=u}finally{try{!r&&s["return"]&&s["return"]()}finally{if(i)throw o}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=t("underscore"),c=r(u),l=t("q"),f=r(l),p=t("backbone"),h=t("../ContigInterval"),d=r(h),v=t("../Interval"),g=r(v),m=t("../data/BigBed"),y=r(m);e.exports={create:a,createFromBigBedFile:o}},{"../ContigInterval":179,"../Interval":182,"../data/BigBed":188,backbone:1,q:22,underscore:177}],204:[function(t,e,n){"use strict";var r=function(){return{rangeChanged:function(){},on:function(){},off:function(){},trigger:function(){}}};e.exports={create:r}},{}],205:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t){var e=function(t){return t-t%d},n=Math.max(1,e(t.start())),r=e(t.stop()+d-1);return new l["default"](t.contig,n,r)}function o(t){function e(t){t.alignments.forEach(function(t){var e=p["default"].keyFromGA4GHResponse(t);if(!(e in f)){var n=new p["default"](t);f[e]=n}})}function n(e){var n=t.killChr?e.contig.replace(/^chr/,""):e.contig,r=new l["default"](n,e.start,e.stop);r.isCoveredBy(d)||(r=i(r),d.push(r),d=l["default"].coalesce(d),o(r,null,1))}function r(t){v.trigger("networkfailure",t),v.trigger("networkdone"),console.warn(t)}function o(n,i,a){var s=new XMLHttpRequest;s.open("POST",c),s.responseType="json",s.setRequestHeader("Content-Type","application/json"),s.addEventListener("load",function(t){var i=this.response;this.status>=400?r(this.status+" "+this.statusText+" "+JSON.stringify(i)):i.errorCode?r("Error from GA4GH endpoint: "+JSON.stringify(i)):(e(i),v.trigger("newdata",n),i.nextPageToken?o(n,i.nextPageToken,a+1):v.trigger("networkdone"))}),s.addEventListener("error",function(t){r("Request failed with status: "+this.status)}),v.trigger("networkprogress",{numRequests:a}),s.send(JSON.stringify({pageToken:i,pageSize:h,readGroupIds:[t.readGroupId],referenceName:n.contig,start:n.start(),end:n.stop()}))}function a(e){return e?(t.killChr&&(e=new l["default"](e.contig.replace(/^chr/,""),e.start(),e.stop())),s["default"].filter(f,function(t){return t.intersects(e)})):[]}if("v0.5.1"!=t.endpoint.slice(-6))throw new Error("Only v0.5.1 of the GA4GH API is supported by pileup.js");var c=t.endpoint+"/reads/search",f={},d=[],v={rangeChanged:n,getAlignmentsInRange:a,on:function(){},once:function(){},off:function(){},trigger:function(){}};return s["default"].extend(v,u.Events),v}var a=t("underscore"),s=r(a),u=t("backbone"),c=t("../ContigInterval"),l=r(c),f=t("../GA4GHAlignment"),p=r(f),h=200,d=100;e.exports={create:o}},{"../ContigInterval":179,"../GA4GHAlignment":181,backbone:1,underscore:177}],206:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t){var e=function(t){return t-t%E},n=Math.max(0,e(t.start())),r=e(t.stop()+E-1);return new h["default"](t.contig,n,r)}function o(t){var e=t.url;if(!e)throw new Error("Missing URL from track: "+JSON.stringify(t));return R(new v["default"](new m["default"](e)))}function a(t){return t?void(E=t):E}Object.defineProperty(n,"__esModule",{value:!0});var s=t("q"),u=r(s),c=t("underscore"),l=r(c),f=t("backbone"),p=t("../ContigInterval"),h=r(p),d=t("../data/TwoBit"),v=r(d),g=t("../RemoteFile"),m=r(g),y=t("../SequenceStore"),b=r(y),w=t("../utils"),_=r(w),E=1e4,C=1e5,R=function(t){function e(e){var n=e.length();return n>C?u["default"].when():(console.log("Fetching "+n+" base pairs"),void t.getFeaturesInRange(e.contig,e.start(),e.stop()).then(function(t){t&&(t.length<e.length()&&(e=new h["default"](e.contig,e.start(),e.start()+t.length-1)),c.setRange(e,t))}).then(function(){v.trigger("newdata",e)}).done())}function n(t){if(s.indexOf(t.contig)>=0)return t;var e=_["default"].altContigName(t.contig);return s.indexOf(e)>=0?{contig:e,start:t.start,stop:t.stop}:t}function r(t){return d.then(function(){return n(t)})}function o(t){return c.getAsObjects(h["default"].fromGenomeRange(t))}function a(t){return t?c.getAsString(h["default"].fromGenomeRange(t)):""}var s=[],c=new b["default"],p=[],d=t.getContigList().then(function(t){return s=t,v.trigger("contigs",s),t});d.done();var v={rangeChanged:function(t){r(t).then(function(t){var n=new h["default"](t.contig,t.start,t.stop);if(!n.isCoveredBy(p)){n=i(n);var r=n.complementIntervals(p);p.push(n),p=h["default"].coalesce(p);var o=!0,a=!1,s=void 0;try{for(var u,c=r[Symbol.iterator]();!(o=(u=c.next()).done);o=!0){var l=u.value;e(l)}}catch(f){a=!0,s=f}finally{try{!o&&c["return"]&&c["return"]()}finally{if(a)throw s}}}}).done()},getRange:o,getRangeAsString:a,contigList:function(t){function e(){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}(function(){return s}),normalizeRange:r,on:function(){},once:function(){},off:function(){},trigger:function(){}};return l["default"].extend(v,f.Events),v};e.exports={create:o,createFromTwoBitFile:R,testBasePairsToFetch:a}},{"../ContigInterval":179,"../RemoteFile":184,"../SequenceStore":186,"../data/TwoBit":190,"../utils":209,backbone:1,q:22,underscore:177}],207:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t){var e=function(t){return t-t%w},n=Math.max(1,e(t.start())),r=e(t.stop()+w-1);return new v["default"](t.contig,n,r)}function o(t){return t.contig+":"+t.position}function a(t){function e(t){var e=o(t);a[e]||(a[e]=t)}function n(n){var r=new v["default"](n.contig,n.start,n.stop);return r.isCoveredBy(s)?h["default"].when():(r=i(r),s.push(r),s=v["default"].coalesce(s),t.getFeaturesInRange(r).then(function(t){t.forEach(function(t){return e(t)}),u.trigger("newdata",r)}))}function r(t){return t?f["default"].filter(a,function(e){return t.chrContainsLocus(e.contig,e.position)}):[]}var a={},s=[],u={rangeChanged:function(t){n(t).done()},getFeaturesInRange:r,on:function(){},off:function(){},trigger:function(){}};return f["default"].extend(u,c["default"]),u}function s(t){var e=t.url;if(!e)throw new Error("Missing URL from track: "+JSON.stringify(t));return a(new b["default"](new m["default"](e)))}Object.defineProperty(n,"__esModule",{value:!0});var u=t("backbone"),c=r(u),l=t("underscore"),f=r(l),p=t("q"),h=r(p),d=t("../ContigInterval"),v=r(d),g=t("../RemoteFile"),m=r(g),y=t("../data/vcf"),b=r(y),w=100;e.exports={create:s,createFromVcfFile:a}},{"../ContigInterval":179,"../RemoteFile":184,"../data/vcf":199,backbone:1,q:22,underscore:177}],208:[function(t,e,n){"use strict";e.exports={BASE_COLORS:{A:"#188712",G:"#C45C16",C:"#0600F9",T:"#F70016",U:"#F70016",N:"black"},LOOSE_TEXT_STYLE:"24px 'Helvetica Neue', Helvetica, Arial, sans-serif",TIGHT_TEXT_STYLE:"bold 12px 'Helvetica Neue', Helvetica, Arial, sans-serif",GENE_ARROW_SIZE:4,GENE_COLOR:"blue",GENE_COMPLEMENT_COLOR:"white",GENE_FONT:"'Helvetica Neue', Helvetica, Arial, sans-serif",GENE_FONT_SIZE:16,GENE_TEXT_PADDING:5,ALIGNMENT_COLOR:"#c8c8c8",ALIGNMENT_MINUS_STRAND_COLOR:"rgb(176, 176, 236)",ALIGNMENT_PLUS_STRAND_COLOR:"rgb(236, 176, 176)",DELETE_COLOR:"black",INSERT_COLOR:"rgb(97, 0, 216)",COVERAGE_FONT_STYLE:"bold 9px 'Helvetica Neue', Helvetica, Arial, sans-serif",COVERAGE_FONT_COLOR:"black",COVERAGE_TICK_LENGTH:5,COVERAGE_TEXT_PADDING:3,COVERAGE_TEXT_Y_OFFSET:3,COVERAGE_BIN_COLOR:"#a0a0a0",COVERAGE_MIN_BAR_WIDTH_FOR_GAP:8,SCALE_LINE_PADDING:40,SCALE_FONT_STYLE:"bold 12px 'Helvetica Neue', Helvetica, Arial, sans-serif",SCALE_TEXT_Y_OFFSET:5,SCALE_FONT_COLOR:"black",SCALE_ARROW_SIZE:4,LOC_TEXT_PADDING:5,LOC_TICK_LENGTH:10,LOC_TEXT_Y_OFFSET:5,LOC_FONT_STYLE:"13px 'Helvetica Neue', Helvetica, Arial, sans-serif",LOC_FONT_COLOR:"black",VARIANT_STROKE:"blue",VARIANT_FILL:"#ddd",VARIANT_HEIGHT:14}},{}],209:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(t.length!=e.length)throw new Error("Comparing non-equal length tuples");for(var n=0;n<t.length;n++){if(t[n]>e[n])return!1;if(t[n]<e[n])return!0}return!0}function o(t,e){return i(t[0],e[1])&&i(e[0],t[1])&&i(t[0],t[1])&&i(e[0],e[1])}function a(t){var e=t.map(function(t){return t.byteLength}).reduce(function(t,e){return t+e},0),n=new Uint8Array(e),r=0;return t.forEach(function(t){n.set(new Uint8Array(t),r),r+=t.byteLength}),n.buffer}function s(t,e){var n=new E["default"].Inflate;return n.push(t.slice(e)),{err:n.err,msg:n.msg,buffer:n.result?n.result.buffer:null,total_in:n.strm.total_in}}function u(t,e,n){if(!n)return s(t,e);var r=n.filename+":"+(n.initialOffset+e),i=S[r];return i&&e+i.total_in>t.byteLength?s(t,e):(i||(i=s(t,e)),!i.err&&i.buffer&&(S[r]=i),i)}function c(t,e,n){var r=0,i=[];void 0===e&&(e=t.byteLength);do{var o=u(t,r,n);if(o.err)throw"Gzip error: "+o.msg;o.buffer&&i.push({offset:r,compressedLength:o.total_in,buffer:o.buffer}),r+=o.total_in}while(e>=r&&r<t.byteLength);return i}function l(t){return a(c(t).map(function(t){return t.buffer}))}function f(t){return"chr"==t.slice(0,3)?t.slice(3):"chr"+t}function p(t,e){return t==e||"chr"+t==e||t=="chr"+e}function h(t,e){e.then(t.resolve,t.reject,t.notify)}function d(t,e){var n=t.stop-t.start,r=Math.floor((t.start+t.stop)/2),i=2*Math.round(e*n/2),o=r-i/2,a=r+i/2;return 0>o&&(a-=o,o=0),new O["default"](o,a)}function v(t){var e=/^([^ :]+):([0-9,]+)-([0-9,]+)$/.exec(t);return e?{contig:e[1],start:y(e[2]),stop:y(e[3])}:(e=/^([^ :]+):([0-9,]+)$/.exec(t))?{contig:e[1],start:y(e[2])}:(e=/^([0-9,]+)-([0-9,]+)$/.exec(t))?{start:y(e[1]),stop:y(e[2])}:(e=/^([^ :]+):$/.exec(t)||/^([^0-9][^ :]+)$/.exec(t))?{contig:e[1]}:(e=/^([0-9,]+)$/.exec(t),e?{start:y(e[1])}:null)}function g(t){return m(t.start)+"-"+m(t.stop)}function m(t){return t.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}function y(t){return parseInt(t.replace(/,/g,""),10)}function b(t,e){return R["default"].flatten(t.map(e),!0)}function w(t,e){if(0===t.length)return 0;t.sort(function(t,e){return t-e});var n=(t.length-1)*e/100,r=Math.floor(n),i=Math.ceil(n);return r==i?t[r]:t[r]*(n-r)+t[i]*(i-n)}var _=t("pako/lib/inflate"),E=r(_),C=t("underscore"),R=r(C),k=t("./Interval"),O=r(k),S={};e.exports={tupleLessOrEqual:i,tupleRangeOverlaps:o,concatArrayBuffers:a,inflateConcatenatedGzip:c,inflateGzip:l,altContigName:f,pipePromise:h,scaleRange:d,parseRange:v,formatInterval:g,isChrMatch:p,flatMap:b,computePercentile:w}},{"./Interval":182,"pako/lib/inflate":10,underscore:177}],210:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=t("./pileuputils"),s=t("../utils"),u=r(s),c=function(){function t(e){i(this,t),this.reads={},this.refToCounts={},this.refToMaxCoverage={},this.referenceSource=e}return o(t,[{key:"addAlignment",value:function(t){var e=t.getKey();if(!(e in this.reads)){this.reads[e]=t;var n=(0,a.getOpInfo)(t,this.referenceSource);this.addReadToCoverage(t,n)}}},{key:"updateMismatches",value:function(t){var e=this._canonicalRef(t.contig);this.refToCounts[e]={},this.refToMaxCoverage[e]=0;for(var n in this.reads){var r=this.reads[n];if(r.getInterval().chrOnContig(t.contig)){var i=(0,a.getOpInfo)(r,this.referenceSource);this.addReadToCoverage(r,i)}}}},{key:"addReadToCoverage",value:function(t,e){var n=this._canonicalRef(t.ref);n in this.refToCounts||(this.refToCounts[n]={},this.refToMaxCoverage[n]=0);for(var r=this.refToCounts[n],i=this.refToMaxCoverage[n],o=t.getInterval(),a=o.start(),s=o.stop(),u=a;s>=u;u++){var c=r[u];c||(r[u]=c={count:0}),c.count+=1,c.count>i&&(i=c.count)}var l=!0,f=!1,p=void 0;try{for(var h,d=e.mismatches[Symbol.iterator]();!(l=(h=d.next()).done);l=!0){var v,g=h.value,m=r[g.pos];m.mismatches?v=m.mismatches:(v=m.mismatches={},m.ref=this.referenceSource.getRangeAsString({contig:n,start:g.pos,stop:g.pos}));var c=v[g.basePair]||0;v[g.basePair]=1+c}}catch(y){f=!0,p=y}finally{try{!l&&d["return"]&&d["return"]()}finally{if(f)throw p}}this.refToMaxCoverage[n]=i}},{key:"maxCoverageForRef",value:function(t){return this.refToMaxCoverage[t]||this.refToMaxCoverage[u["default"].altContigName(t)]||0}},{key:"binsForRef",value:function(t){return this.refToCounts[t]||this.refToCounts[u["default"].altContigName(t)]||{}}},{key:"_canonicalRef",value:function(t){if(this.refToCounts[t])return t;var e=u["default"].altContigName(t);return this.refToCounts[e]?e:t}}]),t}();e.exports=c},{"../utils":209,"./pileuputils":223}],211:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(t,e,n,r,i,o){if(!y["default"].isEmpty(i)){var a=e(1)-e(0),s=a>T["default"].COVERAGE_MIN_BAR_WIDTH_FOR_GAP,u=s?1:0,c=function(t,r){var i=Math.round(e(1+t)),o=Math.round(e(2+t))-u,a=Math.round(n(r));return{barX1:i,barX2:o,barY:a}},l={},f=n(0),p=r.start(),h=r.stop(),d=c(p,p in i?i[p].count:0),v=d.barX1;t.fillStyle=T["default"].COVERAGE_BIN_COLOR,t.beginPath(),t.moveTo(v,f);for(var g=p;h>g;g++){var m=i[g];if(m){t.pushObject(m);var b=c(g,m.count),w=b.barX1,_=b.barX2,E=b.barY;t.lineTo(w,E),t.lineTo(_,E),s&&(t.lineTo(_,f),t.lineTo(_+1,f)),M&&!y["default"].isEmpty(m.mismatches)&&(l[g]=m),t.popObject()}}var C=c(h,h in i?i[h].count:0),R=C.barX2;t.lineTo(R,f),t.closePath(),t.fill(),y["default"].each(l,function(e,r){if(e.mismatches){var i=y["default"].clone(e.mismatches);r=Number(r);var a=y["default"].reduce(i,function(t,e){return t+e}),s=y["default"].max(i);s>P&&a>o.vafColorThreshold*e.count&&a<e.count&&e.ref&&(i[e.ref]=e.count-a);var u=c(r,e.count),l=u.barX1,f=u.barX2;t.pushObject(e);var p=0;y["default"].chain(i).map(function(t,e){return{count:t,base:e}}).filter(function(t){var e=t.count;return e>P}).sortBy(function(t){var e=t.count;return-e}).each(function(e){var i=e.count,o=e.base,a={position:1+r,count:i,base:o};t.pushObject(a),t.fillStyle=T["default"].BASE_COLORS[o];var s=n(p);t.fillRect(l,s,Math.max(1,f-l),n(p+i)-s),p+=i,t.popObject()}),t.popObject()}})}}var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),u=function(t,e,n){for(var r=!0;r;){var i=t,o=e,a=n;r=!1,null===i&&(i=Function.prototype);var s=Object.getOwnPropertyDescriptor(i,o);if(void 0!==s){if("value"in s)return s.value;var u=s.get;return void 0===u?void 0:u.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return void 0;t=c,e=o,n=a,r=!0,s=c=void 0}},c=t("react"),l=r(c),f=t("../scale"),p=r(f),h=t("shallow-equals"),d=r(h),v=t("./d3utils"),g=r(v),m=t("underscore"),y=r(m),b=t("data-canvas"),w=r(b),_=t("./canvas-utils"),E=r(_),C=t("./CoverageCache"),R=r(C),k=t("./TiledCanvas"),O=r(k),S=t("../style"),T=r(S),x=t("../ContigInterval"),I=r(x),M=!0,P=1,A=function(t){function e(t,n,r){i(this,e),u(Object.getPrototypeOf(e.prototype),"constructor",this).call(this),this.cache=t,this.height=Math.max(1,n),this.options=r}return o(e,t),s(e,[{key:"heightForRef",value:function(t){return this.height}},{key:"update",value:function(t,e){this.height=Math.max(1,t),this.options=e}},{key:"yScaleForRef",value:function(t){var e=this.cache.maxCoverageForRef(t),n=10;return p["default"].linear().domain([e,0]).range([n,this.height-n]).nice()}},{key:"render",value:function(t,e,n){var r=this.cache.binsForRef(n.contig),i=this.yScaleForRef(n.contig),o=new I["default"](n.contig,n.start()-1,n.stop()+1);a(t,e,i,o,r,this.options)}}]),e}(O["default"]),N=function(t){function e(t){i(this,e),u(Object.getPrototypeOf(e.prototype),"constructor",this).call(this,t)}return o(e,t),s(e,[{key:"render",value:function(){return l["default"].createElement("canvas",{ref:"canvas",onClick:this.handleClick.bind(this)})}},{key:"getScale",value:function(){return g["default"].getTrackScale(this.props.range,this.props.width)}},{key:"componentDidMount",value:function(){var t=this;this.cache=new R["default"](this.props.referenceSource),this.tiles=new A(this.cache,this.props.height,this.props.options),this.props.source.on("newdata",function(e){var n=t.cache.maxCoverageForRef(e.contig);t.props.source.getAlignmentsInRange(e).forEach(function(e){return t.cache.addAlignment(e)});var r=t.cache.maxCoverageForRef(e.contig);n!=r?t.tiles.invalidateAll():t.tiles.invalidateRange(e),t.visualizeCoverage()}),this.props.referenceSource.on("newdata",function(e){t.cache.updateMismatches(e),t.tiles.invalidateRange(e),t.visualizeCoverage()})}},{key:"componentDidUpdate",value:function(t,e){(0,d["default"])(this.props,t)&&(0,d["default"])(this.state,e)||((this.props.height!=t.height||this.props.options!=t.options)&&(this.tiles.update(this.props.height,this.props.options),this.tiles.invalidateAll()),this.visualizeCoverage())}},{key:"getContext",value:function(){var t=this.refs.canvas,e=t.getContext("2d");return e}},{key:"renderTicks",value:function(t,e){var n=e.domain()[0];[0,Math.round(n/2),n].forEach(function(n){t.pushObject({value:n,type:"tick"});var r=Math.round(e(n));t.strokeStyle=T["default"].COVERAGE_FONT_COLOR,E["default"].drawLine(t,0,r,T["default"].COVERAGE_TICK_LENGTH,r),t.popObject();var i=n+"X";t.pushObject({value:n,label:i,type:"label"}),t.font=T["default"].COVERAGE_FONT_STYLE;var o=T["default"].COVERAGE_TICK_LENGTH+T["default"].COVERAGE_TEXT_PADDING,a=r+T["default"].COVERAGE_TEXT_Y_OFFSET;t.strokeStyle="white",t.lineWidth=2,t.strokeText(i,o,a),t.lineWidth=1,t.fillStyle=T["default"].COVERAGE_FONT_COLOR,t.fillText(i,o,a),t.popObject()})}},{key:"visualizeCoverage",value:function(){var t=this.refs.canvas,e=this.props.width,n=this.props.height,r=I["default"].fromGenomeRange(this.props.range);if(0!==e){g["default"].sizeCanvas(t,e,n);var i=w["default"].getDataContext(this.getContext());i.save(),i.reset(),i.clearRect(0,0,i.canvas.width,i.canvas.height);var o=this.tiles.yScaleForRef(r.contig);this.tiles.renderToScreen(i,r,this.getScale()),this.renderTicks(i,o),i.restore()}}},{key:"handleClick",value:function(t){var e=t.nativeEvent,n=e.offsetX,r=I["default"].fromGenomeRange(this.props.range),i=this.getScale(),o=this.cache.binsForRef(r.contig),a=Math.floor(i.invert(n))-1,s=o[a],u=window.alert||console.log;if(s){var c=s.mismatches?y["default"].reduce(s.mismatches,function(t,e){return t+e}):0,l=s.ref||this.props.referenceSource.getRangeAsString({contig:r.contig,start:a,stop:a}),f=y["default"].extend({position:r.contig+":"+(1+a),"read depth":s.count},s.mismatches);f[l]=s.count-c,u(JSON.stringify(f,null,"  "))}}}]),e}(l["default"].Component);N.displayName="coverage",N.defaultOptions={vafColorThreshold:.2},e.exports=N},{"../ContigInterval":179,"../scale":201,"../style":208,"./CoverageCache":210,"./TiledCanvas":219,"./canvas-utils":221,"./d3utils":222,"data-canvas":7,react:175,"shallow-equals":176,underscore:177}],212:[function(t,e,n){"use strict";var r={LOOSE:1,TIGHT:2,BLOCKS:3,HIDDEN:4,getDisplayMode:function(t){return t>=25?r.LOOSE:t>=10?r.TIGHT:t>=1?r.BLOCKS:r.HIDDEN},isText:function(t){return t==r.LOOSE||t==r.TIGHT}};e.exports=r},{}],213:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(t,e,n,r,i){var o=e(1+n.start),a=e(1+n.stop);if(!(a-o<=2*A["default"].GENE_ARROW_SIZE)){var s=(o+a)/2;t.beginPath(),"-"==i?(t.moveTo(s+A["default"].GENE_ARROW_SIZE,r-A["default"].GENE_ARROW_SIZE),t.lineTo(s,r),t.lineTo(s+A["default"].GENE_ARROW_SIZE,r+A["default"].GENE_ARROW_SIZE)):(t.moveTo(s-A["default"].GENE_ARROW_SIZE,r-A["default"].GENE_ARROW_SIZE),t.lineTo(s,r),t.lineTo(s-A["default"].GENE_ARROW_SIZE,r+A["default"].GENE_ARROW_SIZE)),t.stroke()}}function s(t,e,n,r,i){var o=r.position,a=.5*(e(1+o.start())+e(1+o.stop())),s=r.name||r.id,u=t.measureText(s).width,c=new _["default"](a-.5*u,a+.5*u);if(!v["default"].any(i,function(t){return c.intersects(t)})){i.push(c);var l=n+A["default"].GENE_FONT_SIZE+A["default"].GENE_TEXT_PADDING;t.fillText(s,a,l)}}var u=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),c=function(t,e,n){for(var r=!0;r;){var i=t,o=e,a=n;r=!1,null===i&&(i=Function.prototype);var s=Object.getOwnPropertyDescriptor(i,o);if(void 0!==s){if("value"in s)return s.value;var u=s.get;return void 0===u?void 0:u.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return void 0;t=c,e=o,n=a,r=!0,s=c=void 0}},l=t("react"),f=r(l),p=t("react-dom"),h=r(p),d=t("underscore"),v=r(d),g=t("shallow-equals"),m=r(g),y=t("../data/bedtools"),b=r(y),w=t("../Interval"),_=r(w),E=t("./d3utils"),C=r(E),R=t("../scale"),k=r(R),O=t("../ContigInterval"),S=r(O),T=t("./canvas-utils"),x=r(T),I=t("data-canvas"),M=r(I),P=t("../style"),A=r(P),N=function(t){function e(t){i(this,e),c(Object.getPrototypeOf(e.prototype),"constructor",this).call(this,t),this.state={genes:[]}}return o(e,t),u(e,[{key:"render",value:function(){return f["default"].createElement("canvas",null)}},{key:"componentDidMount",value:function(){var t=this;this.props.source.on("newdata",function(){var e=t.props.range,n=new S["default"](e.contig,e.start,e.stop);t.setState({genes:t.props.source.getGenesInRange(n)})}),this.updateVisualization()}},{key:"getScale",value:function(){return C["default"].getTrackScale(this.props.range,this.props.width)}},{key:"componentDidUpdate",value:function(t,e){(0,m["default"])(t,this.props)&&(0,m["default"])(e,this.state)||this.updateVisualization()}},{key:"updateVisualization",value:function(){var t=h["default"].findDOMNode(this),e=this.props,n=e.width,r=e.height,i=this.props.range,o=new S["default"](i.contig,i.start,i.stop);if(0!==n){var u=this.getScale(),c=k["default"].linear().domain([u.invert(0),u.invert(n)]).range([0,n]).clamp(!0);C["default"].sizeCanvas(t,n,r);var l=M["default"].getDataContext(x["default"].getContext(t));l.reset(),l.clearRect(0,0,l.canvas.width,l.canvas.height);var f=Math.round(r/4),p=[];l.font=A["default"].GENE_FONT_SIZE+"px "+A["default"].GENE_FONT,l.textAlign="center",this.state.genes.forEach(function(t){if(t.position.chrIntersects(o)){l.pushObject(t),l.lineWidth=1,l.strokeStyle=A["default"].GENE_COLOR,l.fillStyle=A["default"].GENE_COLOR,x["default"].drawLine(l,c(1+t.position.start()),f+.5,c(1+t.position.stop()),f+.5);var e=b["default"].splitCodingExons(t.exons,t.codingRegion);e.forEach(function(t){l.fillRect(u(1+t.start),f-3*(t.isCoding?2:1),u(t.stop+2)-u(1+t.start),6*(t.isCoding?2:1))});var n=t.position.interval.complementIntervals(t.exons);n.forEach(function(e){a(l,c,e,f+.5,t.strand)}),l.strokeStyle=A["default"].GENE_COMPLEMENT_COLOR,l.lineWidth=2,t.exons.forEach(function(e){a(l,c,e,f+.5,t.strand)}),s(l,c,f,t,p),l.popObject()}})}}}]),e}(f["default"].Component);N.displayName="genes",e.exports=N},{"../ContigInterval":179,"../Interval":182,"../data/bedtools":194,"../scale":201,"../style":208,"./canvas-utils":221,"./d3utils":222,"data-canvas":7,react:175,"react-dom":23,"shallow-equals":176,underscore:177}],214:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(t,e,n,r,i){var o=e(1)-e(0),a=R["default"].getDisplayMode(o),s=R["default"].isText(a);if(a!=R["default"].HIDDEN){t.textAlign="center",a==R["default"].LOOSE?t.font=T["default"].LOOSE_TEXT_STYLE:a==R["default"].TIGHT&&(t.font=T["default"].TIGHT_TEXT_STYLE);for(var u=null,c=r.start(),l=r.stop(),f=c;l>=f;f++){var p=i[f-c];"."!=p&&(t.save(),t.pushObject({pos:f,letter:p}),t.fillStyle=T["default"].BASE_COLORS[p],s?t.fillText(p,e(1.5+f),n-1):o>=T["default"].COVERAGE_MIN_BAR_WIDTH_FOR_GAP?t.fillRect(e(1+f)+.5,0,o-1.5,n):u===p?t.fillRect(e(1+f)-1.5,0,o+1.5,n):t.fillRect(e(1+f)-.5,0,o+1.5,n),t.popObject(),t.restore(),u=p)}}}var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),u=function(t,e,n){for(var r=!0;r;){var i=t,o=e,a=n;r=!1,null===i&&(i=Function.prototype);var s=Object.getOwnPropertyDescriptor(i,o);if(void 0!==s){if("value"in s)return s.value;var u=s.get;return void 0===u?void 0:u.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return void 0;t=c,e=o,n=a,r=!0,s=c=void 0}},c=t("react"),l=r(c),f=t("react-dom"),p=r(f),h=t("shallow-equals"),d=r(h),v=t("./canvas-utils"),g=r(v),m=t("../ContigInterval"),y=r(m),b=t("data-canvas"),w=r(b),_=t("./d3utils"),E=r(_),C=t("./DisplayMode"),R=r(C),k=t("./TiledCanvas"),O=r(k),S=t("../style"),T=r(S),x=function(t){function e(t,n){i(this,e),u(Object.getPrototypeOf(e.prototype),"constructor",this).call(this),this.source=t,this.height=Math.max(1,n)}return o(e,t),s(e,[{key:"render",value:function(t,e,n){var r={contig:n.contig,start:n.start()-1,stop:n.stop()+1},i=this.source.getRangeAsString(r);a(t,e,this.height,y["default"].fromGenomeRange(r),i)}},{key:"heightForRef",value:function(t){return this.height}},{key:"updateHeight",value:function(t){this.height=t}}]),e}(O["default"]),I=function(t){function e(){i(this,e),u(Object.getPrototypeOf(e.prototype),"constructor",this).apply(this,arguments)}return o(e,t),s(e,[{key:"render",value:function(){return l["default"].createElement("canvas",null)}},{key:"componentDidMount",value:function(){var t=this;this.tiles=new x(this.props.source,this.props.height),this.props.source.on("newdata",function(e){t.tiles.invalidateRange(e),t.updateVisualization()}),this.updateVisualization()}},{key:"getScale",value:function(){return E["default"].getTrackScale(this.props.range,this.props.width);
}},{key:"componentDidUpdate",value:function(t,e){(0,d["default"])(t,this.props)&&(0,d["default"])(e,this.state)||(this.props.height!=t.height&&(this.tiles.updateHeight(this.props.height),this.tiles.invalidateAll()),this.updateVisualization())}},{key:"updateVisualization",value:function(){var t=p["default"].findDOMNode(this),e=this.props,n=e.width,r=e.height,i=e.range;if(0!==n){E["default"].sizeCanvas(t,n,r);var o=w["default"].getDataContext(g["default"].getContext(t));o.reset(),o.clearRect(0,0,o.canvas.width,o.canvas.height),this.tiles.renderToScreen(o,y["default"].fromGenomeRange(i),this.getScale())}}}]),e}(l["default"].Component);I.displayName="reference",e.exports=I},{"../ContigInterval":179,"../style":208,"./DisplayMode":212,"./TiledCanvas":219,"./canvas-utils":221,"./d3utils":222,"data-canvas":7,react:175,"react-dom":23,"shallow-equals":176}],215:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=function(t,e,n){for(var r=!0;r;){var i=t,o=e,a=n;r=!1,null===i&&(i=Function.prototype);var s=Object.getOwnPropertyDescriptor(i,o);if(void 0!==s){if("value"in s)return s.value;var u=s.get;return void 0===u?void 0:u.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return void 0;t=c,e=o,n=a,r=!0,s=c=void 0}},u=t("react"),c=r(u),l=t("react-dom"),f=r(l),p=t("../sources/EmptySource"),h=r(p),d=t("./canvas-utils"),v=r(d),g=t("data-canvas"),m=r(g),y=t("../style"),b=r(y),w=t("./d3utils"),_=r(w),E=function(t){function e(t){i(this,e),s(Object.getPrototypeOf(e.prototype),"constructor",this).call(this,t)}return o(e,t),a(e,[{key:"getScale",value:function(){return _["default"].getTrackScale(this.props.range,this.props.width)}},{key:"render",value:function(){return c["default"].createElement("canvas",null)}},{key:"componentDidMount",value:function(){this.updateVisualization()}},{key:"componentDidUpdate",value:function(t,e){this.updateVisualization()}},{key:"updateVisualization",value:function(){var t=f["default"].findDOMNode(this),e=this.props,n=e.range,r=e.width,i=e.height,o=this.getScale();_["default"].sizeCanvas(t,r,i);var a=m["default"].getDataContext(v["default"].getContext(t));a.save(),a.reset(),a.clearRect(0,0,a.canvas.width,a.canvas.height);var s=Math.floor((n.stop+n.start)/2),u=Math.round(o(s+1)),c=Math.round(o(s));v["default"].drawLine(a,c-.5,0,c-.5,i),v["default"].drawLine(a,u-.5,0,u-.5,i);var l=i/2;a.fillStyle=b["default"].LOC_FONT_COLOR,a.font=b["default"].LOC_FONT_STYLE,a.fillText(s.toLocaleString()+" bp",u+b["default"].LOC_TICK_LENGTH+b["default"].LOC_TEXT_PADDING,l+b["default"].LOC_TEXT_Y_OFFSET),v["default"].drawLine(a,u-.5,l-.5,u+b["default"].LOC_TICK_LENGTH-.5,l-.5),a.restore()}}]),e}(c["default"].Component);E.displayName="location",E.defaultSource=h["default"].create(),e.exports=E},{"../sources/EmptySource":204,"../style":208,"./canvas-utils":221,"./d3utils":222,"data-canvas":7,react:175,"react-dom":23}],216:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t){for(var e=!0;e;){var n=t;if(e=!1,1==n.length)return{insert:null,span:n[0]};if(2!=n.length)throw"Called spanAndInsert with "+n.length+" \notin [1, 2]";if(n[0].chrOnContig(n[1].contig)){var r=n[0].interval,i=n[1].interval,o=r.start<i.start?new p["default"](r.stop,i.start):new p["default"](i.stop,r.start),a=p["default"].boundingInterval([r,i]);return{insert:o,span:new l["default"](n[0].contig,a.start,a.stop)}}t=[n[0]],e=!0}}Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=t("underscore"),u=r(s),c=t("../ContigInterval"),l=r(c),f=t("../Interval"),p=r(f),h=t("./pileuputils"),d=t("../utils"),v=r(d),g=.5,m=99.5,y=3e4,b=500,w=function(){function t(e,n){i(this,t),this.groups={},this.refToPileup={},this.referenceSource=e,this.viewAsPairs=n,this._insertStats=null}return a(t,[{key:"groupKey",value:function(t){return this.viewAsPairs?t.name+":"+t.ref:t.getKey()}},{key:"addAlignment",value:function(t){this._insertStats=null;var e=this.groupKey(t),n=t.getInterval();e in this.groups||(this.groups[e]={key:e,row:-1,insert:null,span:n,alignments:[]});var r=this.groups[e];if(!u["default"].find(r.alignments,function(e){return e.read==t})){var i=(0,h.getOpInfo)(t,this.referenceSource),a={read:t,strand:t.getStrand(),refLength:n.length(),ops:i.ops,mismatches:i.mismatches};r.alignments.push(a);var s=null;if(1==r.alignments.length){if(this.viewAsPairs){var c=t.getMateProperties(),f=[n];c&&c.ref&&c.ref==t.ref&&(s=new l["default"](c.ref,c.pos,c.pos+n.length()),f.push(s)),r=u["default"].extend(r,o(f))}else r.span=n;t.ref in this.refToPileup||(this.refToPileup[t.ref]=[]);var p=this.refToPileup[t.ref];r.row=(0,h.addToPileup)(r.span.interval,p)}else if(2==r.alignments.length){s=r.alignments[0].read.getInterval();var d=o([n,s]),v=d.span,g=d.insert;r.insert=g,g&&(r.span=v)}}}},{key:"updateMismatches",value:function(t){for(var e in this.groups){var n=this.groups[e].alignments,r=!0,i=!1,o=void 0;try{for(var a,s=n[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var u=a.value,c=u.read;if(c.getInterval().chrIntersects(t)){var l=(0,h.getOpInfo)(c,this.referenceSource);u.mismatches=l.mismatches}}}catch(f){i=!0,o=f}finally{try{!r&&s["return"]&&s["return"]()}finally{if(i)throw o}}}}},{key:"pileupForRef",value:function(t){if(t in this.refToPileup)return this.refToPileup[t];var e=v["default"].altContigName(t);return e in this.refToPileup?this.refToPileup[e]:[]}},{key:"pileupHeightForRef",value:function(t){var e=this.pileupForRef(t);return e?e.length:0}},{key:"getGroupsOverlapping",value:function(t){return u["default"].filter(this.groups,function(e){return e.span.chrIntersects(t)})}},{key:"anyGroupsOverlapping",value:function(t){for(var e in this.groups){var n=this.groups[e];if(n.span.chrIntersects(t))return!0}return!1}},{key:"sortReadsAt",value:function(t,e){var n=this.pileupForRef(t),r=u["default"].filter(this.groups,function(n){return u["default"].any(n.alignments,function(n){return n.read.getInterval().chrContainsLocus(t,e)})}),i=u["default"].mapObject(u["default"].groupBy(r,function(t){return t.row}),function(t){return u["default"].min(t,function(t){return t.span.start()}).span.start()}),o=u["default"].sortBy(u["default"].range(0,n.length),function(t){return i[t]||1/0}),a=[];o.forEach(function(t,e){a[t]=e});var s=u["default"].range(0,n.length).map(function(t){return n[a[t]]}),c=t in this.refToPileup?t:v["default"].altContigName(t);this.refToPileup[c]=s,u["default"].each(this.groups,function(e){e.span.chrOnContig(t)&&(e.row=a[e.row])})}},{key:"getInsertStats",value:function(){if(this._insertStats)return this._insertStats;var t=u["default"].map(this.groups,function(t){return t.alignments[0].read.getInferredInsertSize()}).filter(function(t){return y>t}),e=t.length>=b?{minOutlierSize:v["default"].computePercentile(t,g),maxOutlierSize:v["default"].computePercentile(t,m)}:{minOutlierSize:0,maxOutlierSize:1/0};return this._insertStats=e,e}}]),t}();e.exports=w},{"../ContigInterval":179,"../Interval":182,"../utils":209,"./pileuputils":223,underscore:177}],217:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(t){return t.op==E.CigarOp.MATCH||t.op==E.CigarOp.DELETE||t.op==E.CigarOp.INSERT}function s(t,e,n,r,i,o){function s(n,r,i,o){var a=e(n+1),s=e(n+r+1),u=i+L,c=Math.min(U,(s-a)/6);t.beginPath(),"R"==o?(t.moveTo(a,i),t.lineTo(s-c,i),t.lineTo(s,(i+u)/2),t.lineTo(s-c,u),t.lineTo(a,u)):(t.moveTo(s,i),t.lineTo(a+c,i),t.lineTo(a,(i+u)/2),t.lineTo(a+c,u),t.lineTo(s,u)),t.fill()}function l(n,r,i){switch(n.op){case E.CigarOp.MATCH:if(n.arrow)s(n.pos,n.length,r,n.arrow);else{var o=e(n.pos+1);t.fillRect(o,r,e(n.pos+n.length+1)-o,L)}break;case E.CigarOp.DELETE:var a=e(n.pos+1),u=e(n.pos+1+n.length),c=r+L/2-.5;t.save(),t.fillStyle=j["default"].DELETE_COLOR,t.fillRect(a,c,u-a,1),t.restore();break;case E.CigarOp.INSERT:t.save(),t.fillStyle=j["default"].INSERT_COLOR;var l=e(n.pos+1)-2,f=r-1,p=r+L+2;t.fillRect(l,f,1,p-f),t.restore()}}function f(e,n){t.pushObject(e),t.save(),i&&(t.fillStyle="+"==e.strand?j["default"].ALIGNMENT_PLUS_STRAND_COLOR:j["default"].ALIGNMENT_MINUS_STRAND_COLOR),e.ops.forEach(function(t){a(t)&&l(t,n,e)}),e.mismatches.forEach(function(t){return h(t,n)}),t.restore(),t.popObject()}function p(n){if(t.save(),r&&n.insert){var i=n.span.length();i<r.minOutlierSize?t.fillStyle="blue":i>r.maxOutlierSize?t.fillStyle="red":t.fillStyle=j["default"].ALIGNMENT_COLOR}else t.fillStyle=j["default"].ALIGNMENT_COLOR;var o=u(n.row);if(t.pushObject(n),n.insert){var a=n.insert,s=e(a.start+1),c=e(a.stop+1);t.fillRect(s,o+L/2-.5,c-s,1)}n.alignments.forEach(function(t){return f(t,o)}),t.popObject(),t.restore()}function h(r,i){n.interval.contains(r.pos)&&(t.pushObject(r),t.save(),t.fillStyle=j["default"].BASE_COLORS[r.basePair],t.globalAlpha=c(r.quality),t.textAlign="center",g?t.fillText(r.basePair,e(1.5+r.pos),i+L-2):t.fillRect(e(1+r.pos),i,d-1,L),t.restore(),t.popObject())}var d=e(1)-e(0),v=O["default"].getDisplayMode(d),g=O["default"].isText(v);t.font=j["default"].TIGHT_TEXT_STYLE,o.forEach(function(t){return p(t)})}function u(t){return t*(L+B)}function c(t){var e=q(t);return e=Math.round(10*e+.5)/10,Math.min(1,e)}var l=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),f=function(t,e,n){for(var r=!0;r;){var i=t,o=e,a=n;r=!1,null===i&&(i=Function.prototype);var s=Object.getOwnPropertyDescriptor(i,o);if(void 0!==s){if("value"in s)return s.value;var u=s.get;return void 0===u?void 0:u.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return void 0;t=c,e=o,n=a,r=!0,s=c=void 0}},p=t("react"),h=r(p),d=t("shallow-equals"),v=r(d),g=t("underscore"),m=r(g),y=t("../scale"),b=r(y),w=t("./d3utils"),_=r(w),E=t("./pileuputils"),C=t("../ContigInterval"),R=r(C),k=t("./DisplayMode"),O=r(k),S=t("./PileupCache"),T=r(S),x=t("./TiledCanvas"),I=r(x),M=t("./canvas-utils"),P=r(M),A=t("data-canvas"),N=r(A),D=t("../style"),j=r(D),L=13,B=2,U=5,F="undefined"!=typeof CanvasRenderingContext2D&&!!CanvasRenderingContext2D.prototype.setLineDash,V=function(t){function e(t,n){i(this,e),f(Object.getPrototypeOf(e.prototype),"constructor",this).call(this),this.cache=t,this.options=n}return o(e,t),l(e,[{key:"update",value:function(t){this.options=t}},{key:"heightForRef",value:function(t){return this.cache.pileupHeightForRef(t)*(L+B)}},{key:"render",value:function(t,e,n){var r=new R["default"](n.contig,n.start()-1,n.stop()+1),i=this.cache.getGroupsOverlapping(r),o=this.options.colorByInsert?this.cache.getInsertStats():null;s(t,e,r,o,this.options.colorByStrand,i)}}]),e}(I["default"]),H=5,z=20,q=b["default"].linear().domain([H,z]).range([.1,.9]).clamp(!0),G=function(t){function e(t){i(this,e),f(Object.getPrototypeOf(e.prototype),"constructor",this).call(this,t),this.state={networkStatus:null}}return o(e,t),l(e,[{key:"render",value:function(){var t={height:"100%"},e=null,n=this.state.networkStatus;if(n){var r=this.formatStatus(n);e=h["default"].createElement("div",{ref:"status",className:"network-status"},h["default"].createElement("div",{className:"network-status-message"},"Loading alignments… (",r,")"))}return h["default"].createElement("div",null,e,h["default"].createElement("div",{ref:"container",style:t},h["default"].createElement("canvas",{ref:"canvas",onClick:this.handleClick.bind(this)})))}},{key:"formatStatus",value:function(t){if(t.numRequests){var e=t.numRequests>1?"s":"";return"issued "+t.numRequests+" request"+e}if(t.status)return t.status;throw"invalid"}},{key:"componentDidMount",value:function(){var t=this;this.cache=new T["default"](this.props.referenceSource,this.props.options.viewAsPairs),this.tiles=new V(this.cache,this.props.options),this.props.source.on("newdata",function(e){t.updateReads(e),t.tiles.invalidateRange(e),t.updateVisualization()}),this.props.referenceSource.on("newdata",function(e){t.cache.updateMismatches(e),t.tiles.invalidateRange(e),t.updateVisualization()}),this.props.source.on("networkprogress",function(e){t.setState({networkStatus:e})}),this.props.source.on("networkdone",function(e){t.setState({networkStatus:null})}),this.updateVisualization()}},{key:"getScale",value:function(){return _["default"].getTrackScale(this.props.range,this.props.width)}},{key:"componentDidUpdate",value:function(t,e){var n=!1;this.props.options!=t.options&&(this.handleOptionsChange(t.options),n=!0),(0,v["default"])(this.props,t)&&(0,v["default"])(this.state,e)&&!n||this.updateVisualization()}},{key:"handleOptionsChange",value:function(t){this.tiles.invalidateAll(),t.viewAsPairs!=this.props.options.viewAsPairs?(this.cache=new T["default"](this.props.referenceSource,this.props.options.viewAsPairs),this.tiles=new V(this.cache,this.props.options),this.updateReads(R["default"].fromGenomeRange(this.props.range))):t.colorByInsert!=this.props.options.colorByInsert&&(this.tiles.update(this.props.options),this.tiles.invalidateAll(),this.updateVisualization()),t.sort!=this.props.options.sort&&this.handleSort()}},{key:"updateReads",value:function(t){var e=this,n=this.cache.anyGroupsOverlapping(t);this.props.source.getAlignmentsInRange(t).forEach(function(t){return e.cache.addAlignment(t)}),!n&&this.cache.anyGroupsOverlapping(t)&&this.handleSort()}},{key:"updateVisualization",value:function(){var t=this.refs.canvas,e=this.props.width;if(0!==e){var n=u(this.cache.pileupHeightForRef(this.props.range.contig));_["default"].sizeCanvas(t,e,n);var r=P["default"].getContext(t),i=N["default"].getDataContext(r);this.renderScene(i)}}},{key:"renderScene",value:function(t){var e=this.props.range,n=new R["default"](e.contig,e.start,e.stop),r=this.getScale();t.reset(),t.clearRect(0,0,t.canvas.width,t.canvas.height),this.tiles.renderToScreen(t,n,r),this.renderCenterLine(t,n,r);var i=_["default"].findParent(this.refs.canvas,"track-content");i&&(i.scrollLeft=0)}},{key:"renderCenterLine",value:function(t,e,n){var r=Math.floor((e.stop()+e.start())/2),i=Math.ceil(n(r+1)),o=Math.floor(n(r)),a=t.canvas.height;if(t.save(),t.lineWidth=1,F&&t.setLineDash([5,5]),3>i-o){var s=Math.round((o+i)/2);P["default"].drawLine(t,s-.5,0,s-.5,a)}else P["default"].drawLine(t,o-.5,0,o-.5,a),P["default"].drawLine(t,i-.5,0,i-.5,a);t.restore()}},{key:"handleSort",value:function(){var t=this.props.range,e=t.start,n=t.stop,r=(e+n)/2;this.cache.sortReadsAt(this.props.range.contig,r),this.tiles.invalidateAll(),this.updateVisualization()}},{key:"handleClick",value:function(t){var e=t.nativeEvent,n=e.offsetX,r=e.offsetY,i=P["default"].getContext(this.refs.canvas),o=new N["default"].ClickTrackingContext(i,n,r),a=this.props.range,u=new R["default"](a.contig,a.start,a.stop),c=this.getScale(),l=this.cache.getGroupsOverlapping(u);s(o,c,u,null,!1,l);var f=m["default"].find(o.hits[0],function(t){return t.read}),p=window.alert||console.log;f&&p(f.read.debugString())}}]),e}(h["default"].Component);G.displayName="pileup",G.defaultOptions={viewAsPairs:!1,colorByInsert:!0,colorByStrand:!1},G.getOptionsMenu=function(t){return[{key:"view-pairs",label:"View as pairs",checked:t.viewAsPairs},"-",{key:"color-insert",label:"Color by insert size",checked:t.colorByInsert},{key:"color-strand",label:"Color by strand",checked:t.colorByStrand},"-",{key:"sort",label:"Sort alignments"}]};var W=1;G.handleSelectOption=function(t,e){var n=m["default"].clone(e);return"view-pairs"==t?(n.viewAsPairs=!n.viewAsPairs,n):"color-insert"==t?(n.colorByInsert=!n.colorByInsert,n.colorByInsert&&(n.colorByStrand=!1),n):"color-strand"==t?(n.colorByStrand=!n.colorByStrand,n.colorByStrand&&(n.colorByInsert=!1),n):"sort"==t?(n.sort=W++,n):e},e.exports=G},{"../ContigInterval":179,"../scale":201,"../style":208,"./DisplayMode":212,"./PileupCache":216,"./TiledCanvas":219,"./canvas-utils":221,"./d3utils":222,"./pileuputils":223,"data-canvas":7,react:175,"shallow-equals":176,underscore:177}],218:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=function(t,e,n){for(var r=!0;r;){var i=t,o=e,a=n;r=!1,null===i&&(i=Function.prototype);var s=Object.getOwnPropertyDescriptor(i,o);if(void 0!==s){if("value"in s)return s.value;var u=s.get;return void 0===u?void 0:u.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return void 0;t=c,e=o,n=a,r=!0,s=c=void 0}},u=t("react"),c=r(u),l=t("react-dom"),f=r(l),p=t("../sources/EmptySource"),h=r(p),d=t("./canvas-utils"),v=r(d),g=t("data-canvas"),m=r(g),y=t("../style"),b=r(y),w=t("./d3utils"),_=r(w),E=function(t){function e(t){i(this,e),s(Object.getPrototypeOf(e.prototype),"constructor",this).call(this,t)}return o(e,t),a(e,[{key:"getScale",value:function(){return _["default"].getTrackScale(this.props.range,this.props.width)}},{key:"render",value:function(){return c["default"].createElement("canvas",{ref:"canvas"})}},{key:"componentDidMount",value:function(){this.updateVisualization()}},{key:"componentDidUpdate",value:function(t,e){this.updateVisualization()}},{key:"getDOMNode",value:function(){return f["default"].findDOMNode(this)}},{key:"updateVisualization",value:function(){var t=this.getDOMNode(),e=this.props,n=e.range,r=e.width,i=e.height;_["default"].sizeCanvas(t,r,i);var o=m["default"].getDataContext(v["default"].getContext(t));o.save(),o.reset(),o.clearRect(0,0,o.canvas.width,o.canvas.height);var a=n.stop-n.start+1,s=Math.round(r/2),u=Math.round(i/2),c=_["default"].formatRange(a),l=c.prefix,f=c.unit;o.lineWidth=1,o.fillStyle=b["default"].SCALE_FONT_COLOR,o.font=b["default"].SCALE_FONT_STYLE,o.textAlign="center",o.fillText(l+" "+f,s,u+b["default"].SCALE_TEXT_Y_OFFSET),v["default"].drawLine(o,.5,u-.5,s-b["default"].SCALE_LINE_PADDING-.5,u-.5),o.beginPath(),o.moveTo(.5+b["default"].SCALE_ARROW_SIZE,u-b["default"].SCALE_ARROW_SIZE-.5),o.lineTo(.5,u-.5),o.lineTo(.5+b["default"].SCALE_ARROW_SIZE,u+b["default"].SCALE_ARROW_SIZE-.5),o.closePath(),o.fill(),o.stroke(),v["default"].drawLine(o,s+b["default"].SCALE_LINE_PADDING-.5,u-.5,r-.5,u-.5),o.beginPath(),o.moveTo(r-b["default"].SCALE_ARROW_SIZE-.5,u-b["default"].SCALE_ARROW_SIZE-.5),o.lineTo(r-.5,u-.5),o.lineTo(r-b["default"].SCALE_ARROW_SIZE-.5,u+b["default"].SCALE_ARROW_SIZE-.5),o.closePath(),o.fill(),o.stroke(),o.restore()}}]),e}(c["default"].Component);E.displayName="scale",E.defaultSource=h["default"].create(),e.exports=E},{"../sources/EmptySource":204,"../style":208,"./canvas-utils":221,"./d3utils":222,"data-canvas":7,react:175,"react-dom":23}],219:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=t("underscore"),s=r(a),u=t("../scale"),c=r(u),l=t("../ContigInterval"),f=r(l),p=t("../Interval"),h=r(p),d=t("./canvas-utils"),v=r(d),g=t("data-canvas"),m=r(g),y=t("../utils"),b=r(y),w=t("./d3utils"),_=r(w),E=1e-6,C=500,R=!1,k=function(){function t(){i(this,t),this.tileCache=[]}return o(t,[{key:"renderTile",value:function(t){var e=t.range,n=this.heightForRef(e.contig),r=Math.round(t.pixelsPerBase*e.length());t.buffer=document.createElement("canvas"),_["default"].sizeCanvas(t.buffer,r,n);var i=c["default"].linear().domain([e.start(),e.stop()+1]).range([0,r]),o=v["default"].getContext(t.buffer),a=m["default"].getDataContext(o);this.render(a,i,e)}},{key:"makeNewTiles",value:function(e,n,r){var i=this,o=t.getNewTileRanges(e,r.interval,n),a=o.map(function(t){return{pixelsPerBase:n,range:new f["default"](r.contig,t.start,t.stop),buffer:document.createElement("canvas")}});return a.forEach(function(t){return i.renderTile(t)}),this.tileCache=this.tileCache.concat(a),this.tileCache.sort(function(t,e){return f["default"].compare(t.range,e.range)}),a}},{key:"renderToScreen",value:function(t,e,n){var r=n(1)-n(0),i=this.tileCache.filter(function(t){return Math.abs(t.pixelsPerBase-r)<E&&e.chrOnContig(t.range.contig)}),o=this.heightForRef(e.contig),a=i.map(function(t){return t.range.interval});e.interval.isCoveredBy(a)||(i=i.concat(this.makeNewTiles(a,r,e)));var s=i.filter(function(t){return e.chrIntersects(t.range)});s.forEach(function(e){var r=Math.round(n(e.range.start())),i=Math.round(n(e.range.stop()+1)),a=i-r;0!==e.buffer.height&&(t.drawImage(e.buffer,0,0,e.buffer.width,e.buffer.height,r,0,a,e.buffer.height),R&&(t.save(),t.strokeStyle="black",v["default"].drawLine(t,r-.5,0,r-.5,o),v["default"].drawLine(t,i-.5,0,i-.5,o),t.restore()))})}},{key:"invalidateAll",value:function(){this.tileCache=[]}},{key:"invalidateRange",value:function(t){this.tileCache=this.tileCache.filter(function(e){return!e.range.chrIntersects(t)})}},{key:"heightForRef",value:function(t){throw"Not implemented"}},{key:"render",value:function(t,e,n){throw"Not implemented"}}],[{key:"getNewTileRanges",value:function(t,e,n){var r=Math.ceil(C/n),i=Math.floor(e.start/r)*r,o=s["default"].range(i,e.stop,r).map(function(t){return new h["default"](t,t+r-1)}).filter(function(e){return!e.isCoveredBy(t)});return b["default"].flatMap(o,function(e){return e.complementIntervals(t)}).filter(function(t){return t.intersects(e)})}}]),t}();e.exports=k},{"../ContigInterval":179,"../Interval":182,"../scale":201,"../utils":209,"./canvas-utils":221,"./d3utils":222,"data-canvas":7,underscore:177}],220:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=function(t,e,n){for(var r=!0;r;){var i=t,o=e,a=n;r=!1,null===i&&(i=Function.prototype);var s=Object.getOwnPropertyDescriptor(i,o);if(void 0!==s){if("value"in s)return s.value;var u=s.get;return void 0===u?void 0:u.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return void 0;t=c,e=o,n=a,r=!0,s=c=void 0}},u=t("react"),c=r(u),l=t("react-dom"),f=r(l),p=t("./d3utils"),h=r(p),d=t("shallow-equals"),v=r(d),g=t("../ContigInterval"),m=r(g),y=t("./canvas-utils"),b=r(y),w=t("data-canvas"),_=r(w),E=t("../style"),C=r(E),R=function(t){function e(t){i(this,e),s(Object.getPrototypeOf(e.prototype),"constructor",this).call(this,t)}return o(e,t),a(e,[{key:"render",value:function(){return c["default"].createElement("canvas",{onClick:this.handleClick})}},{key:"componentDidMount",value:function(){var t=this;this.updateVisualization(),this.props.source.on("newdata",function(){t.updateVisualization()})}},{key:"getScale",value:function(){return h["default"].getTrackScale(this.props.range,this.props.width)}},{key:"componentDidUpdate",value:function(t,e){(0,v["default"])(t,this.props)&&(0,v["default"])(e,this.state)||this.updateVisualization()}},{key:"updateVisualization",value:function(){var t=f["default"].findDOMNode(this),e=this.props,n=e.width,r=e.height;if(0!==n){h["default"].sizeCanvas(t,n,r);var i=b["default"].getContext(t),o=_["default"].getDataContext(i);this.renderScene(o)}}},{key:"renderScene",value:function(t){var e=this.props.range,n=new m["default"](e.contig,e.start,e.stop),r=this.props.source.getFeaturesInRange(n),i=this.getScale(),o=this.props.height,a=o-C["default"].VARIANT_HEIGHT-1;t.clearRect(0,0,t.canvas.width,t.canvas.height),t.reset(),t.save(),t.fillStyle=C["default"].VARIANT_FILL,t.strokeStyle=C["default"].VARIANT_STROKE,r.forEach(function(e){t.pushObject(e);var n=Math.round(i(e.position)),r=Math.round(i(e.position+1))-1-n;t.fillRect(n-.5,a-.5,r,C["default"].VARIANT_HEIGHT),t.strokeRect(n-.5,a-.5,r,C["default"].VARIANT_HEIGHT),t.popObject()}),t.restore()}},{key:"handleClick",value:function(t){var e=t.nativeEvent,n=e.offsetX,r=e.offsetY,i=f["default"].findDOMNode(this),o=b["default"].getContext(i),a=new _["default"].ClickTrackingContext(o,n,r);this.renderScene(a);var s=a.hit&&a.hit[0],u=window.alert||console.log;s&&u(JSON.stringify(s))}}]),e}(c["default"].Component);R.displayName="variants",e.exports=R},{"../ContigInterval":179,"../style":208,"./canvas-utils":221,"./d3utils":222,"data-canvas":7,react:175,"react-dom":23,"shallow-equals":176}],221:[function(t,e,n){"use strict";function r(t){var e=t,n=e.getContext("2d");return n}function i(t,e,n,r,i){t.beginPath(),t.moveTo(e,n),t.lineTo(r,i),t.stroke()}e.exports={getContext:r,drawLine:i}},{}],222:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!t)return l["default"].linear();var n=t.offsetPx||0;return l["default"].linear().domain([t.start,t.stop+1]).range([-n,e-n])}function o(t){var e=0;t&&(0>t&&(t*=-1),e=1+Math.floor(1e-12+Math.log(t)/Math.LN10),e=Math.max(0,Math.min(24,3*Math.floor((e-1)/3))));var n=Math.pow(10,e);return{symbol:f[e/3],scale:function(t){return t/n}}}function a(t){var e=t/1e3,n=o(Math.max(1,e)),r=n.symbol+"bp",i=Math.round(n.scale(t)).toLocaleString();return{prefix:i,unit:r}}function s(t,e,n){var r=window.devicePixelRatio;t.width=e*r,t.height=n*r,t.style.width=e+"px",t.style.height=n+"px";var i=t.getContext("2d");null!==i&&i instanceof CanvasRenderingContext2D&&i.scale(r,r)}function u(t,e){var n=t;do{if(n.classList.contains(e))return n;n=n.parentElement}while(n);return null}var c=t("../scale"),l=r(c),f=["","k","M","G","T","P","E","Z","Y"];e.exports={formatRange:a,getTrackScale:i,sizeCanvas:s,findParent:u}},{"../scale":201}],223:[function(t,e,n){"use strict";function r(t){for(var e=new Array(t.length),n=[],r=0;r<t.length;r++){for(var i=t[r],o=n.length,a=0;a<n.length;a++)if(!i.intersects(n[a])){o=a;break}e[r]=o,n[o]=i}return e}function i(t,e){for(var n=-1,r=0;r<e.length;r++){for(var i=e[r],o=!0,a=0;a<i.length;a++)if(i[a].intersects(t)){o=!1;break}if(o){n=r;break}}return-1==n&&(n=e.length,e[n]=[]),e[n].push(t),n}function o(t,e,n,r){for(var i=[],o=0;o<e.length;o++){var a=n+o,s=t.charAt(o),u=e.charAt(o);s!=u&&"."!=s&&i.push({pos:a,basePair:u,quality:r[o]})}return i}function a(t){var e,n,r=t.cigarOps;if("-"==t.getStrand()){for(e=0;e<r.length;e++)if(n=r[e],"S"!=n.op)return"M"==n.op?e:-1}else for(e=r.length-1;e>=0;e--)if(n=r[e],"S"!=n.op)return"M"==n.op?e:-1;return-1}function s(t,e){for(var n=t.cigarOps,r=t.getInterval(),i=r.start(),s=t.getSequence(),c=t.getQualityScores(),l=0,f=i,p=a(t),h=[],d=[],v=0;v<n.length;v++){var g=n[v];if("M"==g.op){var m=e.getRangeAsString({contig:r.contig,start:f,stop:f+g.length-1}),y=s.slice(l,l+g.length);d=d.concat(o(m,y,f,c))}switch(h.push({op:g.op,length:g.length,pos:f,arrow:null}),g.op){case u.MATCH:case u.DELETE:case u.SKIP:case u.SEQMATCH:case u.SEQMISMATCH:f+=g.length}switch(g.op){case u.MATCH:case u.INSERT:case u.SOFTCLIP:case u.SEQMATCH:case u.SEQMISMATCH:l+=g.length}}return p>=0&&(h[p].arrow="-"==t.getStrand()?"L":"R"),{ops:h,mismatches:d}}Object.defineProperty(n,"__esModule",{value:!0});var u={MATCH:"M",INSERT:"I",DELETE:"D",SKIP:"N",SOFTCLIP:"S",HARDCLIP:"H",PADDING:"P",SEQMATCH:"=",SEQMISMATCH:"X"};e.exports={pileup:r,addToPileup:i,getOpInfo:s,CigarOp:u}},{}]},{},[200])(200)});
//# sourceMappingURL=./pileup.min.js.map