this["JST"] = this["JST"] || {};

this["JST"]["app/templates/layouts/doc_editor.html"] = function(obj) {
obj || (obj = {});
var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
function print() { __p += __j.call(arguments, '') }
with (obj) {

/*
Licensed under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License. You may obtain a copy of
the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations under
the License.
*/;
__p += '\n\n<div id="dashboard" class="one-pane doc-editor-page">\n  <header>\n    <div class="flex-layout flex-row">\n      <div id="breadcrumbs" class="flex-body"></div>\n      <div id="api-navbar"></div>\n      <div id="notification-center-btn"></div>\n    </div>\n  </header>\n\n  <div id="dashboard-content"></div>\n</div>\n';

}
return __p
};

this["JST"]["app/templates/layouts/one_pane.html"] = function(obj) {
obj || (obj = {});
var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
function print() { __p += __j.call(arguments, '') }
with (obj) {

/*
Licensed under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License. You may obtain a copy of
the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations under
the License.
*/;
__p += '\n<div id="dashboard" class="one-pane">\n  <header>\n    <div class="flex-layout flex-row">\n      <div id="breadcrumbs" class="flex-body"></div>\n      <div id="right-header"></div>\n      <div id="api-navbar"></div>\n      <div id="notification-center-btn"></div>\n    </div>\n  </header>\n\n  <div class="content-area container-fluid">\n    <div id="tabs"></div>\n    <div id="dashboard-content" class="scrollable"></div>\n    <div id="footer"></div>\n  </div>\n</div>\n';

}
return __p
};

this["JST"]["app/templates/layouts/two_pane.html"] = function(obj) {
obj || (obj = {});
var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
function print() { __p += __j.call(arguments, '') }
with (obj) {

/*
Licensed under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License. You may obtain a copy of
the License at

  http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations under
the License.
*/;
__p += '\n<div id="dashboard" class="two-pane flex-layout flex-col">\n\n  <div class="header-wrapper flex-layout flex-row">\n    <div id="breadcrumbs"></div>\n    <div class="right-header-wrapper flex-layout flex-row flex-body">\n      <div id="react-headerbar" class="flex-body"></div>\n      <div id="right-header" class="flex-body"></div>\n      <div id="api-navbar"></div>\n      <div id="notification-center-btn"></div>\n    </div>\n  </div>\n\n  <div id="two-pane-content" class="flex-layout flex-row flex-body">\n    <div id="left-content" class="flex-body"></div>\n    <div id="right-content" class="flex-body flex-layout flex-col">\n      <div id="dashboard-lower-content" class="flex-body"></div>\n      <div id="footer"></div>\n    </div>\n  </div>\n</div>\n';

}
return __p
};

this["JST"]["app/templates/layouts/with_sidebar.html"] = function(obj) {
obj || (obj = {});
var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
function print() { __p += __j.call(arguments, '') }
with (obj) {

/*
Licensed under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License. You may obtain a copy of
the License at

  http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations under
the License.
*/;
__p += '\n<div id="dashboard" class="template-with-sidebar flex-layout flex-col">\n  <header class="flex-layout flex-row">\n    <div class="flex-layout flex-row">\n      <div id="breadcrumbs" class="flex-body"></div>\n      <div id="api-navbar" class="flex-fill"></div>\n      <div id="notification-center-btn" class="flex-fill"></div>\n    </div>\n  </header>\n\n  <div class="template-content flex-body flex-layout flex-row">\n    <div id="sidebar-content"></div>\n    <div id="dashboard-content" class="flex-body"></div>\n  </div>\n</div>\n';

}
return __p
};

this["JST"]["app/templates/layouts/with_tabs_sidebar.html"] = function(obj) {
obj || (obj = {});
var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
function print() { __p += __j.call(arguments, '') }
with (obj) {

/*
Licensed under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License. You may obtain a copy of
the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations under
the License.
*/;
__p += '\n\n<div id="dashboard" class="with-sidebar">\n  <header class="two-panel-header">\n    <div class="flex-layout flex-row">\n      <div id="breadcrumbs"></div>\n      <div class="right-header-wrapper flex-layout flex-row flex-body">\n        <div id="react-headerbar" class="flex-body"></div>\n        <div id="right-header" class="flex-fill"></div>\n        <div id="api-navbar" class="flex-fill"></div>\n        <div id="notification-center-btn" class="flex-fill"></div>\n      </div>\n    </div>\n  </header>\n\n  <div class="with-sidebar tabs-with-sidebar content-area">\n    <aside id="sidebar-content" class="scrollable"></aside>\n    <section id="dashboard-content" class="flex-layout flex-col">\n      <div id="dashboard-upper-content"></div>\n      <div id="dashboard-lower-content" class="flex-body"></div>\n      <div id="footer"></div>\n    </section>\n  </div>\n</div>\n';

}
return __p
};

this["JST"]["app/addons/config/templates/add_config_option.html"] = function(obj) {
obj || (obj = {});
var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
function print() { __p += __j.call(arguments, '') }
with (obj) {

/*
Licensed under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License. You may obtain a copy of
the License at

  http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations under
the License.
*/;
__p += '\n\n<a id="add-new-section" class="add-new-section-btn"><i class="icon icon-plus header-icon"></i> Add Option</a>\n\n<div class="add-section-tray tray">\n  <div class="add-on">Add Option</div>\n\n  <div class="js-form-error-config"></div>\n  <input type="text" name="section" placeholder="Section" autocomplete="off" autofocus>\n  <input type="text" name="name" placeholder="Name">\n  <input type="text" name="value" placeholder="Value">\n\n  <a class="btn" id="js-create-config-section">Create</a>\n</div>\n';

}
return __p
};

this["JST"]["app/addons/config/templates/dashboard.html"] = function(obj) {
obj || (obj = {});
var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
function print() { __p += __j.call(arguments, '') }
with (obj) {

/*
Licensed under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License. You may obtain a copy of
the License at

  http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations under
the License.
*/;
__p += '\n\n<table class="config table table-striped table-bordered">\n  <thead>\n    <th id="config-section" width="22%">Section</th>\n    <th id="config-option" width="20%">Option</th>\n    <th id="config-value">Value</th>\n    <th id="config-trash"></th>\n  </thead>\n  <tbody>\n  </tbody>\n</table>\n';

}
return __p
};

this["JST"]["app/addons/config/templates/header.html"] = function(obj) {
obj || (obj = {});
var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
function print() { __p += __j.call(arguments, '') }
with (obj) {

/*
Licensed under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License. You may obtain a copy of
the License at

  http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations under
the License.
*/;
__p += '\n\n<div id="add-section-button" class="button"></div>\n';

}
return __p
};

this["JST"]["app/addons/config/templates/item.html"] = function(obj) {
obj || (obj = {});
var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
function print() { __p += __j.call(arguments, '') }
with (obj) {

/*
Licensed under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License. You may obtain a copy of
the License at

  http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations under
the License.
*/;
__p += '\n\n';
 if (option.index === 0) {;
__p += '\n<th> ' +
__e( option.section ) +
' </th>\n';
 } else { ;
__p += '\n<td></td>\n';
 } ;
__p += '\n<td class="js-edit-value">\n  <div class="js-show-value">\n    ' +
__e( option.name ) +
'\n  </div>\n  <div class="js-edit-value-form js-hidden">\n    <input class="js-value-input" type="text" name="name" value="' +
__e( option.name ) +
'" />\n    <button class="js-save-value btn btn-success fonticon-ok-circled btn-small"> </button>\n    <button class="js-cancel-value btn btn-small fonticon-cancel-circled"> </button>\n  </div>\n</td>\n<td class="js-edit-value">\n  <div class="js-show-value">\n    ' +
__e( option.value ) +
'\n  </div>\n  <div class="js-edit-value-form js-hidden">\n    <input class="js-value-input" type="text" name="value" value="' +
__e( option.value ) +
'" />\n    <button class="js-save-value btn btn-success fonticon-ok-circled btn-small"> </button>\n    <button class="js-cancel-value btn btn-small fonticon-cancel-circled"> </button>\n  </div>\n</td>\n<td class="js-delete-value text-center"> <i class="icon-trash"> </i> </td>\n';

}
return __p
};

this["JST"]["app/addons/config/templates/sidebartabs.html"] = function(obj) {
obj || (obj = {});
var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
function print() { __p += __j.call(arguments, '') }
with (obj) {

/*
Licensed under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License. You may obtain a copy of
the License at

  http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations under
the License.
*/;
__p += '\n\n<ul class="nav nav-list">\n  ';
 _.each(sidebarItems, function (item) { ;
__p += '\n    <li>\n    <a data-type-select="' +
__e( item.typeSelect ) +
'" href="#' +
__e( item.link ) +
'">\n      <span class="' +
__e( item.icon ) +
'"></span>\n      ' +
__e( item.title ) +
'\n    </a>\n    </li>\n  ';
 }); ;
__p += '\n</ul>\n';

}
return __p
};

this["JST"]["app/addons/fauxton/templates/breadcrumbs.html"] = function(obj) {
obj || (obj = {});
var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
function print() { __p += __j.call(arguments, '') }
with (obj) {

/*
Licensed under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License. You may obtain a copy of
the License at

  http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations under
the License.
*/;
__p += '\n\n';
 _.each(_.initial(crumbs), function (crumb, index) { ;
__p += '\n\n  ';
 if (crumb.type === 'back') { ;
__p += '\n    <li class="pull-left breadcrumb-back-link">\n      <a href="#' +
__e( crumb.link ) +
'" class="fonticon fonticon-left-open"></a>\n    </li>\n  ';
 } else { ;
__p += '\n    <li class="pull-left">\n      <a href="#' +
__e( crumb.link ) +
'" class="fonticon ' +
__e( crumb.className ) +
'">' +
__e( crumb.name ) +
'</a>\n    </li>\n\n    ';
 if (nextCrumbHasLabel(crumb, index)) { ;
__p += '\n    <li class="divider fonticon-right-open"></li>\n    ';
 } ;
__p += '\n  ';
 }  ;
__p += '\n\n';
 }); ;
__p += '\n\n';
 var last = _.last(crumbs) || {name: '', className: '', dataEvent: ''} ;
__p += '\n<li class="js-lastelement active ' +
__e( last.className ) +
'" title="' +
__e( last.name ) +
'">' +
__e( last.name ) +
'</li>\n';

}
return __p
};

this["JST"]["app/addons/fauxton/templates/header_left.html"] = function(obj) {
obj || (obj = {});
var __t, __p = '', __e = _.escape;
with (obj) {
__p += '\n\n<div id="header-breadcrumbs"></div>\n\n\n<div id="header-dropdown-menu" class="add-dropdown"></div>\n';

}
return __p
};

this["JST"]["app/addons/replication/templates/form.html"] = function(obj) {
obj || (obj = {});
var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
function print() { __p += __j.call(arguments, '') }
with (obj) {

 /*
Licensed under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License. You may obtain a copy of
the License at

  http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations under
the License.
*/ ;
__p += '\n\n<form id="replication" class="form-horizontal">\n  <div class="from form_set local">\n    <div class="btn-group">\n      <button class="btn local-btn" type="button" value="local">Local</button>\n      <button class="btn remote-btn" type="button" value="remote">Remote</button>\n    </div>\n\n    <div class="from_local local_option">\n      <select id="from_name" name="source">\n        ';
 _.each( databases, function ( db, i ) { ;
__p += '\n           <option value="' +
__e( db.name ) +
'" ';
 if (selectedDB == db.name) {;
__p += 'selected';
};
__p += ' >' +
__e( db.name ) +
'</option>\n        ';
 }); ;
__p += '\n      </select>\n    </div>\n    <div class="from_to_remote remote_option">\n      <input type="text" id="from_url" name="source" size="30" value="http://">\n    </div>\n  </div>\n\n  <div class="form_set middle">\n    <span class="circle"></span>\n    <a href="#" title="Switch Target and Source" class="swap">\n      <span class="fonticon-swap-arrows"></span>\n    </a>\n  </div>\n\n  <div class="to form_set local">\n    <div class="btn-group">\n      <button class="btn local-btn" type="button" value="local">Local</button>\n      <button class="btn remote-btn" type="button" value="remote">Remote</button>\n    </div>\n    <div class="to_local local_option">\n      <input type="text" id="to_name" name="target" size="30" placeholder="database name">\n    </div>\n\n    <div class="to_remote remote_option">\n      <input type="text" id="to_url" name="target" size="30" value="http://">\n    </div>\n  </div>\n\n\t<div class="actions">\n\t\t<div class="control-group">\n\t\t\t<label for="continuous">\n\t\t\t\t<input type="checkbox" name="continuous" value="true" id="continuous">\n\t\t\t\tContinuous\n\t\t\t</label>\n\n\t\t\t<label for="createTarget">\n\t\t\t\t<input type="checkbox" name="create_target" value="true" id="createTarget">\n\t\t\t\tCreate Target <a class="help-link" data-bypass="true" href="' +
__e(getDocUrl('REPLICATION')) +
'" target="_blank"><i class="icon-question-sign" rel="tooltip" title="Create the target database"></i></a>\n\t\t\t</label>\n\t\t</div>\n\n\t\t<button class="btn btn-success save" type="submit">\n          <i class="icon fonticon-ok-circled"></i>\n          Replicate\n        </button>\n\t</div>\n</form>\n\n<div id="replicationStatus"></div>\n';

}
return __p
};

this["JST"]["app/addons/replication/templates/progress.html"] = function(obj) {
obj || (obj = {});
var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
function print() { __p += __j.call(arguments, '') }
with (obj) {

 /*
Licensed under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License. You may obtain a copy of
the License at

  http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations under
the License.
*/ ;
__p += '\n<p class="span6 break">Replicating <strong>' +
__e(source) +
'</strong> to <strong>' +
__e(target) +
'</strong></p>\n\n<div class="span4 progress progress-striped active">\n  <div class="bar" style="width: ' +
((__t = (progress || 0)) == null ? '' : __t) +
'%;">' +
((__t = (progress || "0")) == null ? '' : __t) +
'%</div>\n</div>\n\n<span class="span1">\n\t<button class="cancel btn btn-danger btn-large delete task-cancel-button" data-source="' +
__e(source) +
'"  data-rep-id="' +
__e(repid) +
'" data-continuous="' +
__e(continuous) +
'" data-target="' +
__e(target) +
'">Cancel</button>\n</span>\n';

}
return __p
};
!function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}(function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))switch(typeof e[t]){case"function":break;case"object":e[t]=function(t){var n=t.slice(1),r=e[t[0]];return function(e,t,i){r.apply(this,[e,t,i].concat(n))}}(e[t]);break;default:e[t]=e[e[t]]}return e}([function(e,t,n){e.exports=n(83)},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}var i=n(84),o=r(i),a=n(99),s=r(a),l=n(289),u=r(l),c=n(91),d=r(c),f=n(86),p=r(f);o["default"].addons=u["default"],s["default"].router=o["default"].router=new s["default"].Router(o["default"].addons),d["default"].history.start({pushState:!1,root:o["default"].root}),"ActiveXObject"in window&&p["default"].ajaxSetup({cache:!1}),(0,p["default"])(document).on("click","a:not([data-bypass])",function(e){var t={prop:(0,p["default"])(this).prop("href"),attr:(0,p["default"])(this).attr("href")},n=location.protocol+"//"+location.host;t.prop&&t.prop.slice(0,n.length)===n&&(e.preventDefault(),o["default"].router.navigate(t.attr,!0))})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=n(85),a=r(o),s=n(86),l=r(s),u=n(89),c=r(u),d=n(91),f=(r(d),n(93)),p=(r(f),n(94)),h=r(p),g=n(96),m=r(g),v=n(99),b=r(v),y=n(272),w=r(y);if(n(101),n(273),c["default"].isUndefined(console)&&(console={log:function(){},trace:function(){},debug:function(){}}),c["default"].isUndefined(window.location.origin)){var x="";window.location.port&&(x=":"+window.location.port),window.location.origin=window.location.protocol+"//"+window.location.hostname+x}i(a["default"],{utils:m["default"],getParams:b["default"].utils.getParams,helpers:h["default"]});var _=window.JST=window.JST||{};b["default"].Layout.configure({manage:!0,prefix:"app/",renderTemplate:function(e,t){return e(c["default"].extend(h["default"],t))},fetchTemplate:function(e){var t=void 0;return e+=".html",_[e]?_[e]:(t=this.async(),l["default"].ajax({url:a["default"].root+e}).then(function(n){t(_[e]=c["default"].template(n))}))}}),b["default"].setSession(new w["default"].Session),b["default"].config({el:".wrapper",masterLayout:new b["default"].Layout,addHeaderLink:function(e){b["default"].dispatch({type:"ADD_NAVBAR_LINK",link:e})},updateHeaderLink:function(e){b["default"].dispatch({type:"UPDATE_NAVBAR_LINK",link:e})},removeHeaderLink:function(e){b["default"].dispatch({type:"REMOVE_NAVBAR_LINK",link:e})}}),t["default"]=a["default"]},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]={root:"/",version:"1.0",host:"../..",i18n:{en_US:{"mango-descripton":"Mango is an easy way to find documents on predefined indexes.","new-mango-index":"Mango Indexes","mango-help-title":"Mango","run-query-with-mango":"Run A Query with Mango","mango-title-editor":"Mango Query","mango-descripton-index-editor":"Mango is an easy way to find documents on predefined indexes. <br/><br/>Create an Index to query it afterwards. The example in the editor shows how to create an index for the field '_id'. <br/><br/>The Indexes that you already created are listed on the right.","mango-additional-indexes-heading":"Your additional Indexes:","mango-indexeditor-title":"Mango","couchdb-productname":"Apache CouchDB","cors-disable-cors-prompt":"Are you sure? Disabling CORS will overwrite your specific origin domains.","cors-notice":"Cross-Origin Resource Sharing (CORS) lets you connect to remote servers directly from the browser, so you can host browser-based apps on static pages and talk directly with CouchDB to load your data."}}}},function(e,t,n){(function(t){e.exports=t.$=n(87)}).call(t,function(){return this}())},function(e,t,n){(function(t){e.exports=t.jQuery=n(88)}).call(t,function(){return this}())},function(e,t,n){var r,i;/*!
	 * jQuery JavaScript Library v2.2.4
	 * http://jquery.com/
	 *
	 * Includes Sizzle.js
	 * http://sizzlejs.com/
	 *
	 * Copyright jQuery Foundation and other contributors
	 * Released under the MIT license
	 * http://jquery.org/license
	 *
	 * Date: 2016-05-20T17:23Z
	 */
!function(t,n){"object"==typeof e&&"object"==typeof e.exports?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}:n(t)}("undefined"!=typeof window?window:this,function(n,o){function a(e){var t=!!e&&"length"in e&&e.length,n=ue.type(e);return"function"!==n&&!ue.isWindow(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}function s(e,t,n){if(ue.isFunction(t))return ue.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return ue.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(ye.test(t))return ue.filter(t,e,n);t=ue.filter(t,e)}return ue.grep(e,function(e){return re.call(t,e)>-1!==n})}function l(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function u(e){var t={};return ue.each(e.match(ke)||[],function(e,n){t[n]=!0}),t}function c(){Z.removeEventListener("DOMContentLoaded",c),n.removeEventListener("load",c),ue.ready()}function d(){this.expando=ue.expando+d.uid++}function f(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(Me,"-$&").toLowerCase(),n=e.getAttribute(r),"string"==typeof n){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:Fe.test(n)?ue.parseJSON(n):n)}catch(i){}Ne.set(e,t,n)}else n=void 0;return n}function p(e,t,n,r){var i,o=1,a=20,s=r?function(){return r.cur()}:function(){return ue.css(e,t,"")},l=s(),u=n&&n[3]||(ue.cssNumber[t]?"":"px"),c=(ue.cssNumber[t]||"px"!==u&&+l)&&Le.exec(ue.css(e,t));if(c&&c[3]!==u){u=u||c[3],n=n||[],c=+l||1;do o=o||".5",c/=o,ue.style(e,t,c+u);while(o!==(o=s()/l)&&1!==o&&--a)}return n&&(c=+c||+l||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=u,r.start=c,r.end=i)),i}function h(e,t){var n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[];return void 0===t||t&&ue.nodeName(e,t)?ue.merge([e],n):n}function g(e,t){for(var n=0,r=e.length;n<r;n++)De.set(e[n],"globalEval",!t||De.get(t[n],"globalEval"))}function m(e,t,n,r,i){for(var o,a,s,l,u,c,d=t.createDocumentFragment(),f=[],p=0,m=e.length;p<m;p++)if(o=e[p],o||0===o)if("object"===ue.type(o))ue.merge(f,o.nodeType?[o]:o);else if(Ve.test(o)){for(a=a||d.appendChild(t.createElement("div")),s=(Be.exec(o)||["",""])[1].toLowerCase(),l=$e[s]||$e._default,a.innerHTML=l[1]+ue.htmlPrefilter(o)+l[2],c=l[0];c--;)a=a.lastChild;ue.merge(f,a.childNodes),a=d.firstChild,a.textContent=""}else f.push(t.createTextNode(o));for(d.textContent="",p=0;o=f[p++];)if(r&&ue.inArray(o,r)>-1)i&&i.push(o);else if(u=ue.contains(o.ownerDocument,o),a=h(d.appendChild(o),"script"),u&&g(a),n)for(c=0;o=a[c++];)je.test(o.type||"")&&n.push(o);return d}function v(){return!0}function b(){return!1}function y(){try{return Z.activeElement}catch(e){}}function w(e,t,n,r,i,o){var a,s;if("object"==typeof t){"string"!=typeof n&&(r=r||n,n=void 0);for(s in t)w(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),i===!1)i=b;else if(!i)return e;return 1===o&&(a=i,i=function(e){return ue().off(e),a.apply(this,arguments)},i.guid=a.guid||(a.guid=ue.guid++)),e.each(function(){ue.event.add(this,t,i,r,n)})}function x(e,t){return ue.nodeName(e,"table")&&ue.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function _(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function E(e){var t=Ke.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function C(e,t){var n,r,i,o,a,s,l,u;if(1===t.nodeType){if(De.hasData(e)&&(o=De.access(e),a=De.set(t,o),u=o.events)){delete a.handle,a.events={};for(i in u)for(n=0,r=u[i].length;n<r;n++)ue.event.add(t,i,u[i][n])}Ne.hasData(e)&&(s=Ne.access(e),l=ue.extend({},s),Ne.set(t,l))}}function k(e,t){var n=t.nodeName.toLowerCase();"input"===n&&Re.test(e.type)?t.checked=e.checked:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}function S(e,t,n,r){t=te.apply([],t);var i,o,a,s,l,u,c=0,d=e.length,f=d-1,p=t[0],g=ue.isFunction(p);if(g||d>1&&"string"==typeof p&&!se.checkClone&&Ge.test(p))return e.each(function(i){var o=e.eq(i);g&&(t[0]=p.call(this,i,o.html())),S(o,t,n,r)});if(d&&(i=m(t,e[0].ownerDocument,!1,e,r),o=i.firstChild,1===i.childNodes.length&&(i=o),o||r)){for(a=ue.map(h(i,"script"),_),s=a.length;c<d;c++)l=i,c!==f&&(l=ue.clone(l,!0,!0),s&&ue.merge(a,h(l,"script"))),n.call(e[c],l,c);if(s)for(u=a[a.length-1].ownerDocument,ue.map(a,E),c=0;c<s;c++)l=a[c],je.test(l.type||"")&&!De.access(l,"globalEval")&&ue.contains(u,l)&&(l.src?ue._evalUrl&&ue._evalUrl(l.src):ue.globalEval(l.textContent.replace(Ye,"")))}return e}function A(e,t,n){for(var r,i=t?ue.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||ue.cleanData(h(r)),r.parentNode&&(n&&ue.contains(r.ownerDocument,r)&&g(h(r,"script")),r.parentNode.removeChild(r));return e}function T(e,t){var n=ue(t.createElement(e)).appendTo(t.body),r=ue.css(n[0],"display");return n.detach(),r}function D(e){var t=Z,n=Qe[e];return n||(n=T(e,t),"none"!==n&&n||(Xe=(Xe||ue("<iframe frameborder='0' width='0' height='0'/>")).appendTo(t.documentElement),t=Xe[0].contentDocument,t.write(),t.close(),n=T(e,t),Xe.detach()),Qe[e]=n),n}function N(e,t,n){var r,i,o,a,s=e.style;return n=n||et(e),a=n?n.getPropertyValue(t)||n[t]:void 0,""!==a&&void 0!==a||ue.contains(e.ownerDocument,e)||(a=ue.style(e,t)),n&&!se.pixelMarginRight()&&Ze.test(a)&&Je.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o),void 0!==a?a+"":a}function F(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function M(e){if(e in st)return e;for(var t=e[0].toUpperCase()+e.slice(1),n=at.length;n--;)if(e=at[n]+t,e in st)return e}function O(e,t,n){var r=Le.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function L(e,t,n,r,i){for(var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;o<4;o+=2)"margin"===n&&(a+=ue.css(e,n+Pe[o],!0,i)),r?("content"===n&&(a-=ue.css(e,"padding"+Pe[o],!0,i)),"margin"!==n&&(a-=ue.css(e,"border"+Pe[o]+"Width",!0,i))):(a+=ue.css(e,"padding"+Pe[o],!0,i),"padding"!==n&&(a+=ue.css(e,"border"+Pe[o]+"Width",!0,i)));return a}function P(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=et(e),a="border-box"===ue.css(e,"boxSizing",!1,o);if(i<=0||null==i){if(i=N(e,t,o),(i<0||null==i)&&(i=e.style[t]),Ze.test(i))return i;r=a&&(se.boxSizingReliable()||i===e.style[t]),i=parseFloat(i)||0}return i+L(e,t,n||(a?"border":"content"),r,o)+"px"}function I(e,t){for(var n,r,i,o=[],a=0,s=e.length;a<s;a++)r=e[a],r.style&&(o[a]=De.get(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&Ie(r)&&(o[a]=De.access(r,"olddisplay",D(r.nodeName)))):(i=Ie(r),"none"===n&&i||De.set(r,"olddisplay",i?n:ue.css(r,"display"))));for(a=0;a<s;a++)r=e[a],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"));return e}function R(e,t,n,r,i){return new R.prototype.init(e,t,n,r,i)}function B(){return n.setTimeout(function(){lt=void 0}),lt=ue.now()}function j(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)n=Pe[r],i["margin"+n]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function $(e,t,n){for(var r,i=(W.tweeners[t]||[]).concat(W.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function V(e,t,n){var r,i,o,a,s,l,u,c,d=this,f={},p=e.style,h=e.nodeType&&Ie(e),g=De.get(e,"fxshow");n.queue||(s=ue._queueHooks(e,"fx"),null==s.unqueued&&(s.unqueued=0,l=s.empty.fire,s.empty.fire=function(){s.unqueued||l()}),s.unqueued++,d.always(function(){d.always(function(){s.unqueued--,ue.queue(e,"fx").length||s.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],u=ue.css(e,"display"),c="none"===u?De.get(e,"olddisplay")||D(e.nodeName):u,"inline"===c&&"none"===ue.css(e,"float")&&(p.display="inline-block")),n.overflow&&(p.overflow="hidden",d.always(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}));for(r in t)if(i=t[r],ct.exec(i)){if(delete t[r],o=o||"toggle"===i,i===(h?"hide":"show")){if("show"!==i||!g||void 0===g[r])continue;h=!0}f[r]=g&&g[r]||ue.style(e,r)}else u=void 0;if(ue.isEmptyObject(f))"inline"===("none"===u?D(e.nodeName):u)&&(p.display=u);else{g?"hidden"in g&&(h=g.hidden):g=De.access(e,"fxshow",{}),o&&(g.hidden=!h),h?ue(e).show():d.done(function(){ue(e).hide()}),d.done(function(){var t;De.remove(e,"fxshow");for(t in f)ue.style(e,t,f[t])});for(r in f)a=$(h?g[r]:0,r,d),r in g||(g[r]=a.start,h&&(a.end=a.start,a.start="width"===r||"height"===r?1:0))}}function U(e,t){var n,r,i,o,a;for(n in e)if(r=ue.camelCase(n),i=t[r],o=e[n],ue.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),a=ue.cssHooks[r],a&&"expand"in a){o=a.expand(o),delete e[r];for(n in o)n in e||(e[n]=o[n],t[n]=i)}else t[r]=i}function W(e,t,n){var r,i,o=0,a=W.prefilters.length,s=ue.Deferred().always(function(){delete l.elem}),l=function(){if(i)return!1;for(var t=lt||B(),n=Math.max(0,u.startTime+u.duration-t),r=n/u.duration||0,o=1-r,a=0,l=u.tweens.length;a<l;a++)u.tweens[a].run(o);return s.notifyWith(e,[u,o,n]),o<1&&l?n:(s.resolveWith(e,[u]),!1)},u=s.promise({elem:e,props:ue.extend({},t),opts:ue.extend(!0,{specialEasing:{},easing:ue.easing._default},n),originalProperties:t,originalOptions:n,startTime:lt||B(),duration:n.duration,tweens:[],createTween:function(t,n){var r=ue.Tween(e,u.opts,t,n,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(r),r},stop:function(t){var n=0,r=t?u.tweens.length:0;if(i)return this;for(i=!0;n<r;n++)u.tweens[n].run(1);return t?(s.notifyWith(e,[u,1,0]),s.resolveWith(e,[u,t])):s.rejectWith(e,[u,t]),this}}),c=u.props;for(U(c,u.opts.specialEasing);o<a;o++)if(r=W.prefilters[o].call(u,e,c,u.opts))return ue.isFunction(r.stop)&&(ue._queueHooks(u.elem,u.opts.queue).stop=ue.proxy(r.stop,r)),r;return ue.map(c,$,u),ue.isFunction(u.opts.start)&&u.opts.start.call(e,u),ue.fx.timer(ue.extend(l,{elem:e,anim:u,queue:u.opts.queue})),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always)}function q(e){return e.getAttribute&&e.getAttribute("class")||""}function H(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(ke)||[];if(ue.isFunction(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function z(e,t,n,r){function i(s){var l;return o[s]=!0,ue.each(e[s]||[],function(e,s){var u=s(t,n,r);return"string"!=typeof u||a||o[u]?a?!(l=u):void 0:(t.dataTypes.unshift(u),i(u),!1)}),l}var o={},a=e===Nt;return i(t.dataTypes[0])||!o["*"]&&i("*")}function G(e,t){var n,r,i=ue.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&ue.extend(!0,e,r),e}function K(e,t,n){for(var r,i,o,a,s=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){l.unshift(i);break}if(l[0]in n)o=l[0];else{for(i in n){if(!l[0]||e.converters[i+" "+l[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==l[0]&&l.unshift(o),n[o]}function Y(e,t,n,r){var i,o,a,s,l,u={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)u[a.toLowerCase()]=e.converters[a];for(o=c.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!l&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=c.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(a=u[l+" "+o]||u["* "+o],!a)for(i in u)if(s=i.split(" "),s[1]===o&&(a=u[l+" "+s[0]]||u["* "+s[0]])){a===!0?a=u[i]:u[i]!==!0&&(o=s[0],c.unshift(s[1]));break}if(a!==!0)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(d){return{state:"parsererror",error:a?d:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}function X(e,t,n,r){var i;if(ue.isArray(t))ue.each(t,function(t,i){n||Lt.test(e)?r(e,i):X(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,r)});else if(n||"object"!==ue.type(t))r(e,t);else for(i in t)X(e+"["+i+"]",t[i],n,r)}function Q(e){return ue.isWindow(e)?e:9===e.nodeType&&e.defaultView}var J=[],Z=n.document,ee=J.slice,te=J.concat,ne=J.push,re=J.indexOf,ie={},oe=ie.toString,ae=ie.hasOwnProperty,se={},le="2.2.4",ue=function(e,t){return new ue.fn.init(e,t)},ce=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,de=/^-ms-/,fe=/-([\da-z])/gi,pe=function(e,t){return t.toUpperCase()};ue.fn=ue.prototype={jquery:le,constructor:ue,selector:"",length:0,toArray:function(){return ee.call(this)},get:function(e){return null!=e?e<0?this[e+this.length]:this[e]:ee.call(this)},pushStack:function(e){var t=ue.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e){return ue.each(this,e)},map:function(e){return this.pushStack(ue.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(ee.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:ne,sort:J.sort,splice:J.splice},ue.extend=ue.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,l=arguments.length,u=!1;for("boolean"==typeof a&&(u=a,a=arguments[s]||{},s++),"object"==typeof a||ue.isFunction(a)||(a={}),s===l&&(a=this,s--);s<l;s++)if(null!=(e=arguments[s]))for(t in e)n=a[t],r=e[t],a!==r&&(u&&r&&(ue.isPlainObject(r)||(i=ue.isArray(r)))?(i?(i=!1,o=n&&ue.isArray(n)?n:[]):o=n&&ue.isPlainObject(n)?n:{},a[t]=ue.extend(u,o,r)):void 0!==r&&(a[t]=r));return a},ue.extend({expando:"jQuery"+(le+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return"function"===ue.type(e)},isArray:Array.isArray,isWindow:function(e){return null!=e&&e===e.window},isNumeric:function(e){var t=e&&e.toString();return!ue.isArray(e)&&t-parseFloat(t)+1>=0},isPlainObject:function(e){var t;if("object"!==ue.type(e)||e.nodeType||ue.isWindow(e))return!1;if(e.constructor&&!ae.call(e,"constructor")&&!ae.call(e.constructor.prototype||{},"isPrototypeOf"))return!1;for(t in e);return void 0===t||ae.call(e,t)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?ie[oe.call(e)]||"object":typeof e},globalEval:function(e){var t,n=eval;e=ue.trim(e),e&&(1===e.indexOf("use strict")?(t=Z.createElement("script"),t.text=e,Z.head.appendChild(t).parentNode.removeChild(t)):n(e))},camelCase:function(e){return e.replace(de,"ms-").replace(fe,pe)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t){var n,r=0;if(a(e))for(n=e.length;r<n&&t.call(e[r],r,e[r])!==!1;r++);else for(r in e)if(t.call(e[r],r,e[r])===!1)break;return e},trim:function(e){return null==e?"":(e+"").replace(ce,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(a(Object(e))?ue.merge(n,"string"==typeof e?[e]:e):ne.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:re.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r,i=[],o=0,a=e.length,s=!n;o<a;o++)r=!t(e[o],o),r!==s&&i.push(e[o]);return i},map:function(e,t,n){var r,i,o=0,s=[];if(a(e))for(r=e.length;o<r;o++)i=t(e[o],o,n),null!=i&&s.push(i);else for(o in e)i=t(e[o],o,n),null!=i&&s.push(i);return te.apply([],s)},guid:1,proxy:function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),ue.isFunction(e))return r=ee.call(arguments,2),i=function(){return e.apply(t||this,r.concat(ee.call(arguments)))},i.guid=e.guid=e.guid||ue.guid++,i},now:Date.now,support:se}),"function"==typeof Symbol&&(ue.fn[Symbol.iterator]=J[Symbol.iterator]),ue.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){ie["[object "+t+"]"]=t.toLowerCase()});var he=/*!
	 * Sizzle CSS Selector Engine v2.2.1
	 * http://sizzlejs.com/
	 *
	 * Copyright jQuery Foundation and other contributors
	 * Released under the MIT license
	 * http://jquery.org/license
	 *
	 * Date: 2015-10-17
	 */
function(e){function t(e,t,n,r){var i,o,a,s,l,u,d,p,h=t&&t.ownerDocument,g=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==g&&9!==g&&11!==g)return n;if(!r&&((t?t.ownerDocument||t:$)!==M&&F(t),t=t||M,L)){if(11!==g&&(u=ve.exec(e)))if(i=u[1]){if(9===g){if(!(a=t.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(h&&(a=h.getElementById(i))&&B(t,a)&&a.id===i)return n.push(a),n}else{if(u[2])return J.apply(n,t.getElementsByTagName(e)),n;if((i=u[3])&&x.getElementsByClassName&&t.getElementsByClassName)return J.apply(n,t.getElementsByClassName(i)),n}if(x.qsa&&!H[e+" "]&&(!P||!P.test(e))){if(1!==g)h=t,p=e;else if("object"!==t.nodeName.toLowerCase()){for((s=t.getAttribute("id"))?s=s.replace(ye,"\\$&"):t.setAttribute("id",s=j),d=k(e),o=d.length,l=fe.test(s)?"#"+s:"[id='"+s+"']";o--;)d[o]=l+" "+f(d[o]);p=d.join(","),h=be.test(e)&&c(t.parentNode)||t}if(p)try{return J.apply(n,h.querySelectorAll(p)),n}catch(m){}finally{s===j&&t.removeAttribute("id")}}}return A(e.replace(se,"$1"),t,n,r)}function n(){function e(n,r){return t.push(n+" ")>_.cacheLength&&delete e[t.shift()],e[n+" "]=r}var t=[];return e}function r(e){return e[j]=!0,e}function i(e){var t=M.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var n=e.split("|"),r=n.length;r--;)_.attrHandle[n[r]]=t}function a(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||G)-(~e.sourceIndex||G);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function l(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function u(e){return r(function(t){return t=+t,r(function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function c(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function d(){}function f(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function p(e,t,n){var r=t.dir,i=n&&"parentNode"===r,o=U++;return t.first?function(t,n,o){for(;t=t[r];)if(1===t.nodeType||i)return e(t,n,o)}:function(t,n,a){var s,l,u,c=[V,o];if(a){for(;t=t[r];)if((1===t.nodeType||i)&&e(t,n,a))return!0}else for(;t=t[r];)if(1===t.nodeType||i){if(u=t[j]||(t[j]={}),l=u[t.uniqueID]||(u[t.uniqueID]={}),(s=l[r])&&s[0]===V&&s[1]===o)return c[2]=s[2];if(l[r]=c,c[2]=e(t,n,a))return!0}}}function h(e){return e.length>1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function g(e,n,r){for(var i=0,o=n.length;i<o;i++)t(e,n[i],r);return r}function m(e,t,n,r,i){for(var o,a=[],s=0,l=e.length,u=null!=t;s<l;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),u&&t.push(s)));return a}function v(e,t,n,i,o,a){return i&&!i[j]&&(i=v(i)),o&&!o[j]&&(o=v(o,a)),r(function(r,a,s,l){var u,c,d,f=[],p=[],h=a.length,v=r||g(t||"*",s.nodeType?[s]:s,[]),b=!e||!r&&t?v:m(v,f,e,s,l),y=n?o||(r?e:h||i)?[]:a:b;if(n&&n(b,y,s,l),i)for(u=m(y,p),i(u,[],s,l),c=u.length;c--;)(d=u[c])&&(y[p[c]]=!(b[p[c]]=d));if(r){if(o||e){if(o){for(u=[],c=y.length;c--;)(d=y[c])&&u.push(b[c]=d);o(null,y=[],u,l)}for(c=y.length;c--;)(d=y[c])&&(u=o?ee(r,d):f[c])>-1&&(r[u]=!(a[u]=d))}}else y=m(y===a?y.splice(h,y.length):y),o?o(null,a,y,l):J.apply(a,y)})}function b(e){for(var t,n,r,i=e.length,o=_.relative[e[0].type],a=o||_.relative[" "],s=o?1:0,l=p(function(e){return e===t},a,!0),u=p(function(e){return ee(t,e)>-1},a,!0),c=[function(e,n,r){var i=!o&&(r||n!==T)||((t=n).nodeType?l(e,n,r):u(e,n,r));return t=null,i}];s<i;s++)if(n=_.relative[e[s].type])c=[p(h(c),n)];else{if(n=_.filter[e[s].type].apply(null,e[s].matches),n[j]){for(r=++s;r<i&&!_.relative[e[r].type];r++);return v(s>1&&h(c),s>1&&f(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(se,"$1"),n,s<r&&b(e.slice(s,r)),r<i&&b(e=e.slice(r)),r<i&&f(e))}c.push(n)}return h(c)}function y(e,n){var i=n.length>0,o=e.length>0,a=function(r,a,s,l,u){var c,d,f,p=0,h="0",g=r&&[],v=[],b=T,y=r||o&&_.find.TAG("*",u),w=V+=null==b?1:Math.random()||.1,x=y.length;for(u&&(T=a===M||a||u);h!==x&&null!=(c=y[h]);h++){if(o&&c){for(d=0,a||c.ownerDocument===M||(F(c),s=!L);f=e[d++];)if(f(c,a||M,s)){l.push(c);break}u&&(V=w)}i&&((c=!f&&c)&&p--,r&&g.push(c))}if(p+=h,i&&h!==p){for(d=0;f=n[d++];)f(g,v,a,s);if(r){if(p>0)for(;h--;)g[h]||v[h]||(v[h]=X.call(l));v=m(v)}J.apply(l,v),u&&!r&&v.length>0&&p+n.length>1&&t.uniqueSort(l)}return u&&(V=w,T=b),g};return i?r(a):a}var w,x,_,E,C,k,S,A,T,D,N,F,M,O,L,P,I,R,B,j="sizzle"+1*new Date,$=e.document,V=0,U=0,W=n(),q=n(),H=n(),z=function(e,t){return e===t&&(N=!0),0},G=1<<31,K={}.hasOwnProperty,Y=[],X=Y.pop,Q=Y.push,J=Y.push,Z=Y.slice,ee=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},te="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",ne="[\\x20\\t\\r\\n\\f]",re="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",ie="\\["+ne+"*("+re+")(?:"+ne+"*([*^$|!~]?=)"+ne+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+re+"))|)"+ne+"*\\]",oe=":("+re+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+ie+")*)|.*)\\)|)",ae=new RegExp(ne+"+","g"),se=new RegExp("^"+ne+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ne+"+$","g"),le=new RegExp("^"+ne+"*,"+ne+"*"),ue=new RegExp("^"+ne+"*([>+~]|"+ne+")"+ne+"*"),ce=new RegExp("="+ne+"*([^\\]'\"]*?)"+ne+"*\\]","g"),de=new RegExp(oe),fe=new RegExp("^"+re+"$"),pe={ID:new RegExp("^#("+re+")"),CLASS:new RegExp("^\\.("+re+")"),TAG:new RegExp("^("+re+"|[*])"),ATTR:new RegExp("^"+ie),PSEUDO:new RegExp("^"+oe),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ne+"*(even|odd|(([+-]|)(\\d*)n|)"+ne+"*(?:([+-]|)"+ne+"*(\\d+)|))"+ne+"*\\)|)","i"),bool:new RegExp("^(?:"+te+")$","i"),needsContext:new RegExp("^"+ne+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ne+"*((?:-\\d)?\\d*)"+ne+"*\\)|)(?=[^-]|$)","i")},he=/^(?:input|select|textarea|button)$/i,ge=/^h\d$/i,me=/^[^{]+\{\s*\[native \w/,ve=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,be=/[+~]/,ye=/'|\\/g,we=new RegExp("\\\\([\\da-f]{1,6}"+ne+"?|("+ne+")|.)","ig"),xe=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},_e=function(){F()};try{J.apply(Y=Z.call($.childNodes),$.childNodes),Y[$.childNodes.length].nodeType}catch(Ee){J={apply:Y.length?function(e,t){Q.apply(e,Z.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}x=t.support={},C=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},F=t.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:$;return r!==M&&9===r.nodeType&&r.documentElement?(M=r,O=M.documentElement,L=!C(M),(n=M.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",_e,!1):n.attachEvent&&n.attachEvent("onunload",_e)),x.attributes=i(function(e){return e.className="i",!e.getAttribute("className")}),x.getElementsByTagName=i(function(e){return e.appendChild(M.createComment("")),!e.getElementsByTagName("*").length}),x.getElementsByClassName=me.test(M.getElementsByClassName),x.getById=i(function(e){return O.appendChild(e).id=j,!M.getElementsByName||!M.getElementsByName(j).length}),x.getById?(_.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&L){var n=t.getElementById(e);return n?[n]:[]}},_.filter.ID=function(e){var t=e.replace(we,xe);return function(e){return e.getAttribute("id")===t}}):(delete _.find.ID,_.filter.ID=function(e){var t=e.replace(we,xe);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}}),_.find.TAG=x.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):x.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},_.find.CLASS=x.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&L)return t.getElementsByClassName(e)},I=[],P=[],(x.qsa=me.test(M.querySelectorAll))&&(i(function(e){O.appendChild(e).innerHTML="<a id='"+j+"'></a><select id='"+j+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&P.push("[*^$]="+ne+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||P.push("\\["+ne+"*(?:value|"+te+")"),e.querySelectorAll("[id~="+j+"-]").length||P.push("~="),e.querySelectorAll(":checked").length||P.push(":checked"),e.querySelectorAll("a#"+j+"+*").length||P.push(".#.+[+~]")}),i(function(e){var t=M.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&P.push("name"+ne+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||P.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),P.push(",.*:")})),(x.matchesSelector=me.test(R=O.matches||O.webkitMatchesSelector||O.mozMatchesSelector||O.oMatchesSelector||O.msMatchesSelector))&&i(function(e){x.disconnectedMatch=R.call(e,"div"),R.call(e,"[s!='']:x"),I.push("!=",oe)}),P=P.length&&new RegExp(P.join("|")),I=I.length&&new RegExp(I.join("|")),t=me.test(O.compareDocumentPosition),B=t||me.test(O.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},z=t?function(e,t){if(e===t)return N=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n?n:(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!x.sortDetached&&t.compareDocumentPosition(e)===n?e===M||e.ownerDocument===$&&B($,e)?-1:t===M||t.ownerDocument===$&&B($,t)?1:D?ee(D,e)-ee(D,t):0:4&n?-1:1)}:function(e,t){if(e===t)return N=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,s=[e],l=[t];if(!i||!o)return e===M?-1:t===M?1:i?-1:o?1:D?ee(D,e)-ee(D,t):0;if(i===o)return a(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)l.unshift(n);for(;s[r]===l[r];)r++;return r?a(s[r],l[r]):s[r]===$?-1:l[r]===$?1:0},M):M},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==M&&F(e),n=n.replace(ce,"='$1']"),x.matchesSelector&&L&&!H[n+" "]&&(!I||!I.test(n))&&(!P||!P.test(n)))try{var r=R.call(e,n);if(r||x.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(i){}return t(n,M,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==M&&F(e),B(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==M&&F(e);var n=_.attrHandle[t.toLowerCase()],r=n&&K.call(_.attrHandle,t.toLowerCase())?n(e,t,!L):void 0;return void 0!==r?r:x.attributes||!L?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],r=0,i=0;if(N=!x.detectDuplicates,D=!x.sortStable&&e.slice(0),e.sort(z),N){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return D=null,e},E=t.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=E(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=E(t);return n},_=t.selectors={cacheLength:50,createPseudo:r,match:pe,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(we,xe),e[3]=(e[3]||e[4]||e[5]||"").replace(we,xe),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return pe.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&de.test(n)&&(t=k(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(we,xe).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=W[e+" "];return t||(t=new RegExp("(^|"+ne+")"+e+"("+ne+"|$)"))&&W(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,r){return function(i){var o=t.attr(i,e);return null==o?"!="===n:!n||(o+="","="===n?o===r:"!="===n?o!==r:"^="===n?r&&0===o.indexOf(r):"*="===n?r&&o.indexOf(r)>-1:"$="===n?r&&o.slice(-r.length)===r:"~="===n?(" "+o.replace(ae," ")+" ").indexOf(r)>-1:"|="===n&&(o===r||o.slice(0,r.length+1)===r+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var u,c,d,f,p,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,v=s&&t.nodeName.toLowerCase(),b=!l&&!s,y=!1;if(m){if(o){for(;g;){for(f=t;f=f[g];)if(s?f.nodeName.toLowerCase()===v:1===f.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&b){for(f=m,d=f[j]||(f[j]={}),c=d[f.uniqueID]||(d[f.uniqueID]={}),u=c[e]||[],p=u[0]===V&&u[1],y=p&&u[2],f=p&&m.childNodes[p];f=++p&&f&&f[g]||(y=p=0)||h.pop();)if(1===f.nodeType&&++y&&f===t){c[e]=[V,p,y];break}}else if(b&&(f=t,d=f[j]||(f[j]={}),c=d[f.uniqueID]||(d[f.uniqueID]={}),u=c[e]||[],p=u[0]===V&&u[1],y=p),y===!1)for(;(f=++p&&f&&f[g]||(y=p=0)||h.pop())&&((s?f.nodeName.toLowerCase()!==v:1!==f.nodeType)||!++y||(b&&(d=f[j]||(f[j]={}),c=d[f.uniqueID]||(d[f.uniqueID]={}),c[e]=[V,y]),f!==t)););return y-=i,y===r||y%r===0&&y/r>=0}}},PSEUDO:function(e,n){var i,o=_.pseudos[e]||_.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return o[j]?o(n):o.length>1?(i=[e,e,"",n],_.setFilters.hasOwnProperty(e.toLowerCase())?r(function(e,t){for(var r,i=o(e,n),a=i.length;a--;)r=ee(e,i[a]),e[r]=!(t[r]=i[a])}):function(e){return o(e,0,i)}):o}},pseudos:{not:r(function(e){var t=[],n=[],i=S(e.replace(se,"$1"));return i[j]?r(function(e,t,n,r){for(var o,a=i(e,null,r,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,r,o){return t[0]=e,i(t,null,o,n),t[0]=null,!n.pop()}}),has:r(function(e){return function(n){return t(e,n).length>0}}),contains:r(function(e){return e=e.replace(we,xe),function(t){return(t.textContent||t.innerText||E(t)).indexOf(e)>-1}}),lang:r(function(e){return fe.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(we,xe).toLowerCase(),function(t){var n;do if(n=L?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===O},focus:function(e){return e===M.activeElement&&(!M.hasFocus||M.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!_.pseudos.empty(e)},header:function(e){return ge.test(e.nodeName)},input:function(e){return he.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:u(function(){return[0]}),last:u(function(e,t){return[t-1]}),eq:u(function(e,t,n){return[n<0?n+t:n]}),even:u(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:u(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:u(function(e,t,n){for(var r=n<0?n+t:n;--r>=0;)e.push(r);return e}),gt:u(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}},_.pseudos.nth=_.pseudos.eq;for(w in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})_.pseudos[w]=s(w);for(w in{submit:!0,reset:!0})_.pseudos[w]=l(w);return d.prototype=_.filters=_.pseudos,_.setFilters=new d,k=t.tokenize=function(e,n){var r,i,o,a,s,l,u,c=q[e+" "];if(c)return n?0:c.slice(0);for(s=e,l=[],u=_.preFilter;s;){r&&!(i=le.exec(s))||(i&&(s=s.slice(i[0].length)||s),l.push(o=[])),r=!1,(i=ue.exec(s))&&(r=i.shift(),o.push({value:r,type:i[0].replace(se," ")}),s=s.slice(r.length));for(a in _.filter)!(i=pe[a].exec(s))||u[a]&&!(i=u[a](i))||(r=i.shift(),o.push({value:r,type:a,matches:i}),s=s.slice(r.length));if(!r)break}return n?s.length:s?t.error(e):q(e,l).slice(0)},S=t.compile=function(e,t){var n,r=[],i=[],o=H[e+" "];if(!o){for(t||(t=k(e)),n=t.length;n--;)o=b(t[n]),o[j]?r.push(o):i.push(o);o=H(e,y(i,r)),o.selector=e}return o},A=t.select=function(e,t,n,r){var i,o,a,s,l,u="function"==typeof e&&e,d=!r&&k(e=u.selector||e);if(n=n||[],1===d.length){if(o=d[0]=d[0].slice(0),o.length>2&&"ID"===(a=o[0]).type&&x.getById&&9===t.nodeType&&L&&_.relative[o[1].type]){if(t=(_.find.ID(a.matches[0].replace(we,xe),t)||[])[0],!t)return n;u&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(i=pe.needsContext.test(e)?0:o.length;i--&&(a=o[i],!_.relative[s=a.type]);)if((l=_.find[s])&&(r=l(a.matches[0].replace(we,xe),be.test(o[0].type)&&c(t.parentNode)||t))){if(o.splice(i,1),e=r.length&&f(o),!e)return J.apply(n,r),n;break}}return(u||S(e,d))(r,t,!L,n,!t||be.test(e)&&c(t.parentNode)||t),n},x.sortStable=j.split("").sort(z).join("")===j,x.detectDuplicates=!!N,F(),x.sortDetached=i(function(e){return 1&e.compareDocumentPosition(M.createElement("div"))}),i(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),x.attributes&&i(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),i(function(e){return null==e.getAttribute("disabled")})||o(te,function(e,t,n){var r;if(!n)return e[t]===!0?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),t}(n);ue.find=he,ue.expr=he.selectors,ue.expr[":"]=ue.expr.pseudos,ue.uniqueSort=ue.unique=he.uniqueSort,ue.text=he.getText,ue.isXMLDoc=he.isXML,ue.contains=he.contains;var ge=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&ue(e).is(n))break;r.push(e)}return r},me=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},ve=ue.expr.match.needsContext,be=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,ye=/^.[^:#\[\.,]*$/;ue.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?ue.find.matchesSelector(r,e)?[r]:[]:ue.find.matches(e,ue.grep(t,function(e){return 1===e.nodeType}))},ue.fn.extend({find:function(e){var t,n=this.length,r=[],i=this;if("string"!=typeof e)return this.pushStack(ue(e).filter(function(){for(t=0;t<n;t++)if(ue.contains(i[t],this))return!0}));for(t=0;t<n;t++)ue.find(e,i[t],r);return r=this.pushStack(n>1?ue.unique(r):r),r.selector=this.selector?this.selector+" "+e:e,r},filter:function(e){return this.pushStack(s(this,e||[],!1))},not:function(e){return this.pushStack(s(this,e||[],!0))},is:function(e){return!!s(this,"string"==typeof e&&ve.test(e)?ue(e):e||[],!1).length}});var we,xe=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,_e=ue.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||we,"string"==typeof e){if(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:xe.exec(e),!r||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof ue?t[0]:t,ue.merge(this,ue.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:Z,!0)),be.test(r[1])&&ue.isPlainObject(t))for(r in t)ue.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return i=Z.getElementById(r[2]),i&&i.parentNode&&(this.length=1,this[0]=i),this.context=Z,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):ue.isFunction(e)?void 0!==n.ready?n.ready(e):e(ue):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),ue.makeArray(e,this))};_e.prototype=ue.fn,we=ue(Z);var Ee=/^(?:parents|prev(?:Until|All))/,Ce={children:!0,contents:!0,next:!0,prev:!0};ue.fn.extend({has:function(e){var t=ue(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(ue.contains(this,t[e]))return!0})},closest:function(e,t){for(var n,r=0,i=this.length,o=[],a=ve.test(e)||"string"!=typeof e?ue(e,t||this.context):0;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&ue.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?ue.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?re.call(ue(e),this[0]):re.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(ue.uniqueSort(ue.merge(this.get(),ue(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),ue.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return ge(e,"parentNode")},parentsUntil:function(e,t,n){return ge(e,"parentNode",n)},next:function(e){return l(e,"nextSibling")},prev:function(e){return l(e,"previousSibling")},nextAll:function(e){return ge(e,"nextSibling")},prevAll:function(e){return ge(e,"previousSibling")},nextUntil:function(e,t,n){return ge(e,"nextSibling",n)},prevUntil:function(e,t,n){return ge(e,"previousSibling",n)},siblings:function(e){return me((e.parentNode||{}).firstChild,e)},children:function(e){return me(e.firstChild)},contents:function(e){return e.contentDocument||ue.merge([],e.childNodes)}},function(e,t){ue.fn[e]=function(n,r){var i=ue.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=ue.filter(r,i)),this.length>1&&(Ce[e]||ue.uniqueSort(i),Ee.test(e)&&i.reverse()),this.pushStack(i)}});var ke=/\S+/g;ue.Callbacks=function(e){e="string"==typeof e?u(e):ue.extend({},e);var t,n,r,i,o=[],a=[],s=-1,l=function(){for(i=e.once,r=t=!0;a.length;s=-1)for(n=a.shift();++s<o.length;)o[s].apply(n[0],n[1])===!1&&e.stopOnFalse&&(s=o.length,n=!1);e.memory||(n=!1),t=!1,i&&(o=n?[]:"")},c={add:function(){return o&&(n&&!t&&(s=o.length-1,a.push(n)),function r(t){ue.each(t,function(t,n){ue.isFunction(n)?e.unique&&c.has(n)||o.push(n):n&&n.length&&"string"!==ue.type(n)&&r(n)})}(arguments),n&&!t&&l()),this},remove:function(){return ue.each(arguments,function(e,t){for(var n;(n=ue.inArray(t,o,n))>-1;)o.splice(n,1),n<=s&&s--}),this},has:function(e){return e?ue.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=a=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=a=[],n||(o=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=n||[],n=[e,n.slice?n.slice():n],a.push(n),t||l()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},ue.extend({Deferred:function(e){var t=[["resolve","done",ue.Callbacks("once memory"),"resolved"],["reject","fail",ue.Callbacks("once memory"),"rejected"],["notify","progress",ue.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return ue.Deferred(function(n){ue.each(t,function(t,o){var a=ue.isFunction(e[t])&&e[t];i[o[1]](function(){var e=a&&a.apply(this,arguments);e&&ue.isFunction(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[o[0]+"With"](this===r?n.promise():this,a?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?ue.extend(e,r):r}},i={};return r.pipe=r.then,ue.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t,n,r,i=0,o=ee.call(arguments),a=o.length,s=1!==a||e&&ue.isFunction(e.promise)?a:0,l=1===s?e:ue.Deferred(),u=function(e,n,r){return function(i){n[e]=this,r[e]=arguments.length>1?ee.call(arguments):i,r===t?l.notifyWith(n,r):--s||l.resolveWith(n,r)}};if(a>1)for(t=new Array(a),n=new Array(a),r=new Array(a);i<a;i++)o[i]&&ue.isFunction(o[i].promise)?o[i].promise().progress(u(i,n,t)).done(u(i,r,o)).fail(l.reject):--s;return s||l.resolveWith(r,o),l.promise()}});var Se;ue.fn.ready=function(e){return ue.ready.promise().done(e),this},ue.extend({isReady:!1,readyWait:1,holdReady:function(e){e?ue.readyWait++:ue.ready(!0)},ready:function(e){(e===!0?--ue.readyWait:ue.isReady)||(ue.isReady=!0,e!==!0&&--ue.readyWait>0||(Se.resolveWith(Z,[ue]),ue.fn.triggerHandler&&(ue(Z).triggerHandler("ready"),ue(Z).off("ready"))))}}),ue.ready.promise=function(e){return Se||(Se=ue.Deferred(),"complete"===Z.readyState||"loading"!==Z.readyState&&!Z.documentElement.doScroll?n.setTimeout(ue.ready):(Z.addEventListener("DOMContentLoaded",c),n.addEventListener("load",c))),Se.promise(e)},ue.ready.promise();var Ae=function(e,t,n,r,i,o,a){var s=0,l=e.length,u=null==n;if("object"===ue.type(n)){i=!0;for(s in n)Ae(e,t,s,n[s],!0,o,a)}else if(void 0!==r&&(i=!0,ue.isFunction(r)||(a=!0),u&&(a?(t.call(e,r),t=null):(u=t,t=function(e,t,n){return u.call(ue(e),n)})),t))for(;s<l;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return i?e:u?t.call(e):l?t(e[0],n):o},Te=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};d.uid=1,d.prototype={register:function(e,t){var n=t||{};return e.nodeType?e[this.expando]=n:Object.defineProperty(e,this.expando,{value:n,writable:!0,configurable:!0}),e[this.expando]},cache:function(e){if(!Te(e))return{};var t=e[this.expando];return t||(t={},Te(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[t]=n;else for(r in t)i[r]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][t]},access:function(e,t,n){var r;return void 0===t||t&&"string"==typeof t&&void 0===n?(r=this.get(e,t),void 0!==r?r:this.get(e,ue.camelCase(t))):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r,i,o=e[this.expando];if(void 0!==o){if(void 0===t)this.register(e);else{ue.isArray(t)?r=t.concat(t.map(ue.camelCase)):(i=ue.camelCase(t),t in o?r=[t,i]:(r=i,r=r in o?[r]:r.match(ke)||[])),n=r.length;for(;n--;)delete o[r[n]]}(void 0===t||ue.isEmptyObject(o))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!ue.isEmptyObject(t)}};var De=new d,Ne=new d,Fe=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Me=/[A-Z]/g;ue.extend({hasData:function(e){return Ne.hasData(e)||De.hasData(e)},data:function(e,t,n){return Ne.access(e,t,n)},removeData:function(e,t){Ne.remove(e,t)},_data:function(e,t,n){return De.access(e,t,n)},_removeData:function(e,t){De.remove(e,t)}}),ue.fn.extend({data:function(e,t){var n,r,i,o=this[0],a=o&&o.attributes;if(void 0===e){if(this.length&&(i=Ne.get(o),1===o.nodeType&&!De.get(o,"hasDataAttrs"))){for(n=a.length;n--;)a[n]&&(r=a[n].name,0===r.indexOf("data-")&&(r=ue.camelCase(r.slice(5)),f(o,r,i[r])));De.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof e?this.each(function(){Ne.set(this,e)}):Ae(this,function(t){var n,r;if(o&&void 0===t){if(n=Ne.get(o,e)||Ne.get(o,e.replace(Me,"-$&").toLowerCase()),void 0!==n)return n;if(r=ue.camelCase(e),n=Ne.get(o,r),void 0!==n)return n;if(n=f(o,r,void 0),void 0!==n)return n}else r=ue.camelCase(e),this.each(function(){var n=Ne.get(this,r);Ne.set(this,r,t),e.indexOf("-")>-1&&void 0!==n&&Ne.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){Ne.remove(this,e)})}}),ue.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=De.get(e,t),n&&(!r||ue.isArray(n)?r=De.access(e,t,ue.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=ue.queue(e,t),r=n.length,i=n.shift(),o=ue._queueHooks(e,t),a=function(){ue.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return De.get(e,n)||De.access(e,n,{empty:ue.Callbacks("once memory").add(function(){De.remove(e,[t+"queue",n])})})}}),ue.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?ue.queue(this[0],e):void 0===t?this:this.each(function(){var n=ue.queue(this,e,t);ue._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&ue.dequeue(this,e)})},dequeue:function(e){return this.each(function(){ue.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=ue.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";a--;)n=De.get(o[a],e+"queueHooks"),n&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var Oe=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Le=new RegExp("^(?:([+-])=|)("+Oe+")([a-z%]*)$","i"),Pe=["Top","Right","Bottom","Left"],Ie=function(e,t){return e=t||e,"none"===ue.css(e,"display")||!ue.contains(e.ownerDocument,e)},Re=/^(?:checkbox|radio)$/i,Be=/<([\w:-]+)/,je=/^$|\/(?:java|ecma)script/i,$e={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};$e.optgroup=$e.option,$e.tbody=$e.tfoot=$e.colgroup=$e.caption=$e.thead,$e.th=$e.td;var Ve=/<|&#?\w+;/;!function(){var e=Z.createDocumentFragment(),t=e.appendChild(Z.createElement("div")),n=Z.createElement("input");n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),t.appendChild(n),se.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="<textarea>x</textarea>",se.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();var Ue=/^key/,We=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,qe=/^([^.]*)(?:\.(.+)|)/;ue.event={global:{},add:function(e,t,n,r,i){var o,a,s,l,u,c,d,f,p,h,g,m=De.get(e);if(m)for(n.handler&&(o=n,n=o.handler,i=o.selector),n.guid||(n.guid=ue.guid++),(l=m.events)||(l=m.events={}),(a=m.handle)||(a=m.handle=function(t){return"undefined"!=typeof ue&&ue.event.triggered!==t.type?ue.event.dispatch.apply(e,arguments):void 0}),t=(t||"").match(ke)||[""],u=t.length;u--;)s=qe.exec(t[u])||[],p=g=s[1],h=(s[2]||"").split(".").sort(),p&&(d=ue.event.special[p]||{},p=(i?d.delegateType:d.bindType)||p,d=ue.event.special[p]||{},c=ue.extend({type:p,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&ue.expr.match.needsContext.test(i),namespace:h.join(".")},o),(f=l[p])||(f=l[p]=[],f.delegateCount=0,d.setup&&d.setup.call(e,r,h,a)!==!1||e.addEventListener&&e.addEventListener(p,a)),d.add&&(d.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?f.splice(f.delegateCount++,0,c):f.push(c),ue.event.global[p]=!0)},remove:function(e,t,n,r,i){var o,a,s,l,u,c,d,f,p,h,g,m=De.hasData(e)&&De.get(e);if(m&&(l=m.events)){for(t=(t||"").match(ke)||[""],u=t.length;u--;)if(s=qe.exec(t[u])||[],p=g=s[1],h=(s[2]||"").split(".").sort(),p){for(d=ue.event.special[p]||{},p=(r?d.delegateType:d.bindType)||p,f=l[p]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=f.length;o--;)c=f[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(f.splice(o,1),
c.selector&&f.delegateCount--,d.remove&&d.remove.call(e,c));a&&!f.length&&(d.teardown&&d.teardown.call(e,h,m.handle)!==!1||ue.removeEvent(e,p,m.handle),delete l[p])}else for(p in l)ue.event.remove(e,p+t[u],n,r,!0);ue.isEmptyObject(l)&&De.remove(e,"handle events")}},dispatch:function(e){e=ue.event.fix(e);var t,n,r,i,o,a=[],s=ee.call(arguments),l=(De.get(this,"events")||{})[e.type]||[],u=ue.event.special[e.type]||{};if(s[0]=e,e.delegateTarget=this,!u.preDispatch||u.preDispatch.call(this,e)!==!1){for(a=ue.event.handlers.call(this,e,l),t=0;(i=a[t++])&&!e.isPropagationStopped();)for(e.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!e.isImmediatePropagationStopped();)e.rnamespace&&!e.rnamespace.test(o.namespace)||(e.handleObj=o,e.data=o.data,r=((ue.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s),void 0!==r&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()));return u.postDispatch&&u.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,r,i,o,a=[],s=t.delegateCount,l=e.target;if(s&&l.nodeType&&("click"!==e.type||isNaN(e.button)||e.button<1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&(l.disabled!==!0||"click"!==e.type)){for(r=[],n=0;n<s;n++)o=t[n],i=o.selector+" ",void 0===r[i]&&(r[i]=o.needsContext?ue(i,this).index(l)>-1:ue.find(i,this,null,[l]).length),r[i]&&r.push(o);r.length&&a.push({elem:l,handlers:r})}return s<t.length&&a.push({elem:this,handlers:t.slice(s)}),a},props:"altKey bubbles cancelable ctrlKey currentTarget detail eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,t){var n,r,i,o=t.button;return null==e.pageX&&null!=t.clientX&&(n=e.target.ownerDocument||Z,r=n.documentElement,i=n.body,e.pageX=t.clientX+(r&&r.scrollLeft||i&&i.scrollLeft||0)-(r&&r.clientLeft||i&&i.clientLeft||0),e.pageY=t.clientY+(r&&r.scrollTop||i&&i.scrollTop||0)-(r&&r.clientTop||i&&i.clientTop||0)),e.which||void 0===o||(e.which=1&o?1:2&o?3:4&o?2:0),e}},fix:function(e){if(e[ue.expando])return e;var t,n,r,i=e.type,o=e,a=this.fixHooks[i];for(a||(this.fixHooks[i]=a=We.test(i)?this.mouseHooks:Ue.test(i)?this.keyHooks:{}),r=a.props?this.props.concat(a.props):this.props,e=new ue.Event(o),t=r.length;t--;)n=r[t],e[n]=o[n];return e.target||(e.target=Z),3===e.target.nodeType&&(e.target=e.target.parentNode),a.filter?a.filter(e,o):e},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==y()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===y()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&ue.nodeName(this,"input"))return this.click(),!1},_default:function(e){return ue.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},ue.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},ue.Event=function(e,t){return this instanceof ue.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&e.returnValue===!1?v:b):this.type=e,t&&ue.extend(this,t),this.timeStamp=e&&e.timeStamp||ue.now(),void(this[ue.expando]=!0)):new ue.Event(e,t)},ue.Event.prototype={constructor:ue.Event,isDefaultPrevented:b,isPropagationStopped:b,isImmediatePropagationStopped:b,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=v,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=v,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=v,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},ue.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){ue.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return i&&(i===r||ue.contains(r,i))||(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),ue.fn.extend({on:function(e,t,n,r){return w(this,e,t,n,r)},one:function(e,t,n,r){return w(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,ue(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return t!==!1&&"function"!=typeof t||(n=t,t=void 0),n===!1&&(n=b),this.each(function(){ue.event.remove(this,e,n,t)})}});var He=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,ze=/<script|<style|<link/i,Ge=/checked\s*(?:[^=]|=\s*.checked.)/i,Ke=/^true\/(.*)/,Ye=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;ue.extend({htmlPrefilter:function(e){return e.replace(He,"<$1></$2>")},clone:function(e,t,n){var r,i,o,a,s=e.cloneNode(!0),l=ue.contains(e.ownerDocument,e);if(!(se.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||ue.isXMLDoc(e)))for(a=h(s),o=h(e),r=0,i=o.length;r<i;r++)k(o[r],a[r]);if(t)if(n)for(o=o||h(e),a=a||h(s),r=0,i=o.length;r<i;r++)C(o[r],a[r]);else C(e,s);return a=h(s,"script"),a.length>0&&g(a,!l&&h(e,"script")),s},cleanData:function(e){for(var t,n,r,i=ue.event.special,o=0;void 0!==(n=e[o]);o++)if(Te(n)){if(t=n[De.expando]){if(t.events)for(r in t.events)i[r]?ue.event.remove(n,r):ue.removeEvent(n,r,t.handle);n[De.expando]=void 0}n[Ne.expando]&&(n[Ne.expando]=void 0)}}}),ue.fn.extend({domManip:S,detach:function(e){return A(this,e,!0)},remove:function(e){return A(this,e)},text:function(e){return Ae(this,function(e){return void 0===e?ue.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return S(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=x(this,e);t.appendChild(e)}})},prepend:function(){return S(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=x(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return S(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return S(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(ue.cleanData(h(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return ue.clone(this,e,t)})},html:function(e){return Ae(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!ze.test(e)&&!$e[(Be.exec(e)||["",""])[1].toLowerCase()]){e=ue.htmlPrefilter(e);try{for(;n<r;n++)t=this[n]||{},1===t.nodeType&&(ue.cleanData(h(t,!1)),t.innerHTML=e);t=0}catch(i){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=[];return S(this,arguments,function(t){var n=this.parentNode;ue.inArray(this,e)<0&&(ue.cleanData(h(this)),n&&n.replaceChild(t,this))},e)}}),ue.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){ue.fn[e]=function(e){for(var n,r=[],i=ue(e),o=i.length-1,a=0;a<=o;a++)n=a===o?this:this.clone(!0),ue(i[a])[t](n),ne.apply(r,n.get());return this.pushStack(r)}});var Xe,Qe={HTML:"block",BODY:"block"},Je=/^margin/,Ze=new RegExp("^("+Oe+")(?!px)[a-z%]+$","i"),et=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=n),t.getComputedStyle(e)},tt=function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i},nt=Z.documentElement;!function(){function e(){s.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",s.innerHTML="",nt.appendChild(a);var e=n.getComputedStyle(s);t="1%"!==e.top,o="2px"===e.marginLeft,r="4px"===e.width,s.style.marginRight="50%",i="4px"===e.marginRight,nt.removeChild(a)}var t,r,i,o,a=Z.createElement("div"),s=Z.createElement("div");s.style&&(s.style.backgroundClip="content-box",s.cloneNode(!0).style.backgroundClip="",se.clearCloneStyle="content-box"===s.style.backgroundClip,a.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",a.appendChild(s),ue.extend(se,{pixelPosition:function(){return e(),t},boxSizingReliable:function(){return null==r&&e(),r},pixelMarginRight:function(){return null==r&&e(),i},reliableMarginLeft:function(){return null==r&&e(),o},reliableMarginRight:function(){var e,t=s.appendChild(Z.createElement("div"));return t.style.cssText=s.style.cssText="-webkit-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",t.style.marginRight=t.style.width="0",s.style.width="1px",nt.appendChild(a),e=!parseFloat(n.getComputedStyle(t).marginRight),nt.removeChild(a),s.removeChild(t),e}}))}();var rt=/^(none|table(?!-c[ea]).+)/,it={position:"absolute",visibility:"hidden",display:"block"},ot={letterSpacing:"0",fontWeight:"400"},at=["Webkit","O","Moz","ms"],st=Z.createElement("div").style;ue.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=N(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=ue.camelCase(t),l=e.style;return t=ue.cssProps[s]||(ue.cssProps[s]=M(s)||s),a=ue.cssHooks[t]||ue.cssHooks[s],void 0===n?a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t]:(o=typeof n,"string"===o&&(i=Le.exec(n))&&i[1]&&(n=p(e,t,i),o="number"),null!=n&&n===n&&("number"===o&&(n+=i&&i[3]||(ue.cssNumber[s]?"":"px")),se.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(l[t]=n)),void 0)}},css:function(e,t,n,r){var i,o,a,s=ue.camelCase(t);return t=ue.cssProps[s]||(ue.cssProps[s]=M(s)||s),a=ue.cssHooks[t]||ue.cssHooks[s],a&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=N(e,t,r)),"normal"===i&&t in ot&&(i=ot[t]),""===n||n?(o=parseFloat(i),n===!0||isFinite(o)?o||0:i):i}}),ue.each(["height","width"],function(e,t){ue.cssHooks[t]={get:function(e,n,r){if(n)return rt.test(ue.css(e,"display"))&&0===e.offsetWidth?tt(e,it,function(){return P(e,t,r)}):P(e,t,r)},set:function(e,n,r){var i,o=r&&et(e),a=r&&L(e,t,r,"border-box"===ue.css(e,"boxSizing",!1,o),o);return a&&(i=Le.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=ue.css(e,t)),O(e,n,a)}}}),ue.cssHooks.marginLeft=F(se.reliableMarginLeft,function(e,t){if(t)return(parseFloat(N(e,"marginLeft"))||e.getBoundingClientRect().left-tt(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),ue.cssHooks.marginRight=F(se.reliableMarginRight,function(e,t){if(t)return tt(e,{display:"inline-block"},N,[e,"marginRight"])}),ue.each({margin:"",padding:"",border:"Width"},function(e,t){ue.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+Pe[r]+t]=o[r]||o[r-2]||o[0];return i}},Je.test(e)||(ue.cssHooks[e+t].set=O)}),ue.fn.extend({css:function(e,t){return Ae(this,function(e,t,n){var r,i,o={},a=0;if(ue.isArray(t)){for(r=et(e),i=t.length;a<i;a++)o[t[a]]=ue.css(e,t[a],!1,r);return o}return void 0!==n?ue.style(e,t,n):ue.css(e,t)},e,t,arguments.length>1)},show:function(){return I(this,!0)},hide:function(){return I(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){Ie(this)?ue(this).show():ue(this).hide()})}}),ue.Tween=R,R.prototype={constructor:R,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||ue.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(ue.cssNumber[n]?"":"px")},cur:function(){var e=R.propHooks[this.prop];return e&&e.get?e.get(this):R.propHooks._default.get(this)},run:function(e){var t,n=R.propHooks[this.prop];return this.options.duration?this.pos=t=ue.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):R.propHooks._default.set(this),this}},R.prototype.init.prototype=R.prototype,R.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=ue.css(e.elem,e.prop,""),t&&"auto"!==t?t:0)},set:function(e){ue.fx.step[e.prop]?ue.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[ue.cssProps[e.prop]]&&!ue.cssHooks[e.prop]?e.elem[e.prop]=e.now:ue.style(e.elem,e.prop,e.now+e.unit)}}},R.propHooks.scrollTop=R.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},ue.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},ue.fx=R.prototype.init,ue.fx.step={};var lt,ut,ct=/^(?:toggle|show|hide)$/,dt=/queueHooks$/;ue.Animation=ue.extend(W,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return p(n.elem,e,Le.exec(t),n),n}]},tweener:function(e,t){ue.isFunction(e)?(t=e,e=["*"]):e=e.match(ke);for(var n,r=0,i=e.length;r<i;r++)n=e[r],W.tweeners[n]=W.tweeners[n]||[],W.tweeners[n].unshift(t)},prefilters:[V],prefilter:function(e,t){t?W.prefilters.unshift(e):W.prefilters.push(e)}}),ue.speed=function(e,t,n){var r=e&&"object"==typeof e?ue.extend({},e):{complete:n||!n&&t||ue.isFunction(e)&&e,duration:e,easing:n&&t||t&&!ue.isFunction(t)&&t};return r.duration=ue.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in ue.fx.speeds?ue.fx.speeds[r.duration]:ue.fx.speeds._default,null!=r.queue&&r.queue!==!0||(r.queue="fx"),r.old=r.complete,r.complete=function(){ue.isFunction(r.old)&&r.old.call(this),r.queue&&ue.dequeue(this,r.queue)},r},ue.fn.extend({fadeTo:function(e,t,n,r){return this.filter(Ie).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=ue.isEmptyObject(e),o=ue.speed(t,n,r),a=function(){var t=W(this,ue.extend({},e),o);(i||De.get(this,"finish"))&&t.stop(!0)};return a.finish=a,i||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,i=null!=e&&e+"queueHooks",o=ue.timers,a=De.get(this);if(i)a[i]&&a[i].stop&&r(a[i]);else for(i in a)a[i]&&a[i].stop&&dt.test(i)&&r(a[i]);for(i=o.length;i--;)o[i].elem!==this||null!=e&&o[i].queue!==e||(o[i].anim.stop(n),t=!1,o.splice(i,1));!t&&n||ue.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=De.get(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=ue.timers,a=r?r.length:0;for(n.finish=!0,ue.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;t<a;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),ue.each(["toggle","show","hide"],function(e,t){var n=ue.fn[t];ue.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(j(t,!0),e,r,i)}}),ue.each({slideDown:j("show"),slideUp:j("hide"),slideToggle:j("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){ue.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),ue.timers=[],ue.fx.tick=function(){var e,t=0,n=ue.timers;for(lt=ue.now();t<n.length;t++)e=n[t],e()||n[t]!==e||n.splice(t--,1);n.length||ue.fx.stop(),lt=void 0},ue.fx.timer=function(e){ue.timers.push(e),e()?ue.fx.start():ue.timers.pop()},ue.fx.interval=13,ue.fx.start=function(){ut||(ut=n.setInterval(ue.fx.tick,ue.fx.interval))},ue.fx.stop=function(){n.clearInterval(ut),ut=null},ue.fx.speeds={slow:600,fast:200,_default:400},ue.fn.delay=function(e,t){return e=ue.fx?ue.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,r){var i=n.setTimeout(t,e);r.stop=function(){n.clearTimeout(i)}})},function(){var e=Z.createElement("input"),t=Z.createElement("select"),n=t.appendChild(Z.createElement("option"));e.type="checkbox",se.checkOn=""!==e.value,se.optSelected=n.selected,t.disabled=!0,se.optDisabled=!n.disabled,e=Z.createElement("input"),e.value="t",e.type="radio",se.radioValue="t"===e.value}();var ft,pt=ue.expr.attrHandle;ue.fn.extend({attr:function(e,t){return Ae(this,ue.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){ue.removeAttr(this,e)})}}),ue.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?ue.prop(e,t,n):(1===o&&ue.isXMLDoc(e)||(t=t.toLowerCase(),i=ue.attrHooks[t]||(ue.expr.match.bool.test(t)?ft:void 0)),void 0!==n?null===n?void ue.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:(r=ue.find.attr(e,t),null==r?void 0:r))},attrHooks:{type:{set:function(e,t){if(!se.radioValue&&"radio"===t&&ue.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(ke);if(o&&1===e.nodeType)for(;n=o[i++];)r=ue.propFix[n]||n,ue.expr.match.bool.test(n)&&(e[r]=!1),e.removeAttribute(n)}}),ft={set:function(e,t,n){return t===!1?ue.removeAttr(e,n):e.setAttribute(n,n),n}},ue.each(ue.expr.match.bool.source.match(/\w+/g),function(e,t){var n=pt[t]||ue.find.attr;pt[t]=function(e,t,r){var i,o;return r||(o=pt[t],pt[t]=i,i=null!=n(e,t,r)?t.toLowerCase():null,pt[t]=o),i}});var ht=/^(?:input|select|textarea|button)$/i,gt=/^(?:a|area)$/i;ue.fn.extend({prop:function(e,t){return Ae(this,ue.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[ue.propFix[e]||e]})}}),ue.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&ue.isXMLDoc(e)||(t=ue.propFix[t]||t,i=ue.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=ue.find.attr(e,"tabindex");return t?parseInt(t,10):ht.test(e.nodeName)||gt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),se.optSelected||(ue.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),ue.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){ue.propFix[this.toLowerCase()]=this});var mt=/[\t\r\n\f]/g;ue.fn.extend({addClass:function(e){var t,n,r,i,o,a,s,l=0;if(ue.isFunction(e))return this.each(function(t){ue(this).addClass(e.call(this,t,q(this)))});if("string"==typeof e&&e)for(t=e.match(ke)||[];n=this[l++];)if(i=q(n),r=1===n.nodeType&&(" "+i+" ").replace(mt," ")){for(a=0;o=t[a++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");s=ue.trim(r),i!==s&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,r,i,o,a,s,l=0;if(ue.isFunction(e))return this.each(function(t){ue(this).removeClass(e.call(this,t,q(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(t=e.match(ke)||[];n=this[l++];)if(i=q(n),r=1===n.nodeType&&(" "+i+" ").replace(mt," ")){for(a=0;o=t[a++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");s=ue.trim(r),i!==s&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):ue.isFunction(e)?this.each(function(n){ue(this).toggleClass(e.call(this,n,q(this),t),t)}):this.each(function(){var t,r,i,o;if("string"===n)for(r=0,i=ue(this),o=e.match(ke)||[];t=o[r++];)i.hasClass(t)?i.removeClass(t):i.addClass(t);else void 0!==e&&"boolean"!==n||(t=q(this),t&&De.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||e===!1?"":De.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+q(n)+" ").replace(mt," ").indexOf(t)>-1)return!0;return!1}});var vt=/\r/g,bt=/[\x20\t\r\n\f]+/g;ue.fn.extend({val:function(e){var t,n,r,i=this[0];{if(arguments.length)return r=ue.isFunction(e),this.each(function(n){var i;1===this.nodeType&&(i=r?e.call(this,n,ue(this).val()):e,null==i?i="":"number"==typeof i?i+="":ue.isArray(i)&&(i=ue.map(i,function(e){return null==e?"":e+""})),t=ue.valHooks[this.type]||ue.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))});if(i)return t=ue.valHooks[i.type]||ue.valHooks[i.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:(n=i.value,"string"==typeof n?n.replace(vt,""):null==n?"":n)}}}),ue.extend({valHooks:{option:{get:function(e){var t=ue.find.attr(e,"value");return null!=t?t:ue.trim(ue.text(e)).replace(bt," ")}},select:{get:function(e){for(var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||i<0,a=o?null:[],s=o?i+1:r.length,l=i<0?s:o?i:0;l<s;l++)if(n=r[l],(n.selected||l===i)&&(se.optDisabled?!n.disabled:null===n.getAttribute("disabled"))&&(!n.parentNode.disabled||!ue.nodeName(n.parentNode,"optgroup"))){if(t=ue(n).val(),o)return t;a.push(t)}return a},set:function(e,t){for(var n,r,i=e.options,o=ue.makeArray(t),a=i.length;a--;)r=i[a],(r.selected=ue.inArray(ue.valHooks.option.get(r),o)>-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),ue.each(["radio","checkbox"],function(){ue.valHooks[this]={set:function(e,t){if(ue.isArray(t))return e.checked=ue.inArray(ue(e).val(),t)>-1}},se.checkOn||(ue.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var yt=/^(?:focusinfocus|focusoutblur)$/;ue.extend(ue.event,{trigger:function(e,t,r,i){var o,a,s,l,u,c,d,f=[r||Z],p=ae.call(e,"type")?e.type:e,h=ae.call(e,"namespace")?e.namespace.split("."):[];if(a=s=r=r||Z,3!==r.nodeType&&8!==r.nodeType&&!yt.test(p+ue.event.triggered)&&(p.indexOf(".")>-1&&(h=p.split("."),p=h.shift(),h.sort()),u=p.indexOf(":")<0&&"on"+p,e=e[ue.expando]?e:new ue.Event(p,"object"==typeof e&&e),e.isTrigger=i?2:3,e.namespace=h.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=r),t=null==t?[e]:ue.makeArray(t,[e]),d=ue.event.special[p]||{},i||!d.trigger||d.trigger.apply(r,t)!==!1)){if(!i&&!d.noBubble&&!ue.isWindow(r)){for(l=d.delegateType||p,yt.test(l+p)||(a=a.parentNode);a;a=a.parentNode)f.push(a),s=a;s===(r.ownerDocument||Z)&&f.push(s.defaultView||s.parentWindow||n)}for(o=0;(a=f[o++])&&!e.isPropagationStopped();)e.type=o>1?l:d.bindType||p,c=(De.get(a,"events")||{})[e.type]&&De.get(a,"handle"),c&&c.apply(a,t),c=u&&a[u],c&&c.apply&&Te(a)&&(e.result=c.apply(a,t),e.result===!1&&e.preventDefault());return e.type=p,i||e.isDefaultPrevented()||d._default&&d._default.apply(f.pop(),t)!==!1||!Te(r)||u&&ue.isFunction(r[p])&&!ue.isWindow(r)&&(s=r[u],s&&(r[u]=null),ue.event.triggered=p,r[p](),ue.event.triggered=void 0,s&&(r[u]=s)),e.result}},simulate:function(e,t,n){var r=ue.extend(new ue.Event,n,{type:e,isSimulated:!0});ue.event.trigger(r,null,t)}}),ue.fn.extend({trigger:function(e,t){return this.each(function(){ue.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return ue.event.trigger(e,t,n,!0)}}),ue.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){ue.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),ue.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),se.focusin="onfocusin"in n,se.focusin||ue.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){ue.event.simulate(t,e.target,ue.event.fix(e))};ue.event.special[t]={setup:function(){var r=this.ownerDocument||this,i=De.access(r,t);i||r.addEventListener(e,n,!0),De.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=De.access(r,t)-1;i?De.access(r,t,i):(r.removeEventListener(e,n,!0),De.remove(r,t))}}});var wt=n.location,xt=ue.now(),_t=/\?/;ue.parseJSON=function(e){return JSON.parse(e+"")},ue.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new n.DOMParser).parseFromString(e,"text/xml")}catch(r){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||ue.error("Invalid XML: "+e),t};var Et=/#.*$/,Ct=/([?&])_=[^&]*/,kt=/^(.*?):[ \t]*([^\r\n]*)$/gm,St=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,At=/^(?:GET|HEAD)$/,Tt=/^\/\//,Dt={},Nt={},Ft="*/".concat("*"),Mt=Z.createElement("a");Mt.href=wt.href,ue.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:wt.href,type:"GET",isLocal:St.test(wt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Ft,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":ue.parseJSON,"text xml":ue.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?G(G(e,ue.ajaxSettings),t):G(ue.ajaxSettings,e)},ajaxPrefilter:H(Dt),ajaxTransport:H(Nt),ajax:function(e,t){function r(e,t,r,s){var u,d,b,y,x,E=t;2!==w&&(w=2,l&&n.clearTimeout(l),i=void 0,a=s||"",_.readyState=e>0?4:0,u=e>=200&&e<300||304===e,r&&(y=K(f,_,r)),y=Y(f,y,_,u),u?(f.ifModified&&(x=_.getResponseHeader("Last-Modified"),x&&(ue.lastModified[o]=x),x=_.getResponseHeader("etag"),x&&(ue.etag[o]=x)),204===e||"HEAD"===f.type?E="nocontent":304===e?E="notmodified":(E=y.state,d=y.data,b=y.error,u=!b)):(b=E,!e&&E||(E="error",e<0&&(e=0))),_.status=e,_.statusText=(t||E)+"",u?g.resolveWith(p,[d,E,_]):g.rejectWith(p,[_,E,b]),_.statusCode(v),v=void 0,c&&h.trigger(u?"ajaxSuccess":"ajaxError",[_,f,u?d:b]),m.fireWith(p,[_,E]),c&&(h.trigger("ajaxComplete",[_,f]),--ue.active||ue.event.trigger("ajaxStop")))}"object"==typeof e&&(t=e,e=void 0),t=t||{};var i,o,a,s,l,u,c,d,f=ue.ajaxSetup({},t),p=f.context||f,h=f.context&&(p.nodeType||p.jquery)?ue(p):ue.event,g=ue.Deferred(),m=ue.Callbacks("once memory"),v=f.statusCode||{},b={},y={},w=0,x="canceled",_={readyState:0,getResponseHeader:function(e){var t;if(2===w){if(!s)for(s={};t=kt.exec(a);)s[t[1].toLowerCase()]=t[2];t=s[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===w?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return w||(e=y[n]=y[n]||e,b[e]=t),this},overrideMimeType:function(e){return w||(f.mimeType=e),this},statusCode:function(e){var t;if(e)if(w<2)for(t in e)v[t]=[v[t],e[t]];else _.always(e[_.status]);return this},abort:function(e){var t=e||x;return i&&i.abort(t),r(0,t),this}};if(g.promise(_).complete=m.add,_.success=_.done,_.error=_.fail,f.url=((e||f.url||wt.href)+"").replace(Et,"").replace(Tt,wt.protocol+"//"),f.type=t.method||t.type||f.method||f.type,f.dataTypes=ue.trim(f.dataType||"*").toLowerCase().match(ke)||[""],null==f.crossDomain){u=Z.createElement("a");try{u.href=f.url,u.href=u.href,f.crossDomain=Mt.protocol+"//"+Mt.host!=u.protocol+"//"+u.host}catch(E){f.crossDomain=!0}}if(f.data&&f.processData&&"string"!=typeof f.data&&(f.data=ue.param(f.data,f.traditional)),z(Dt,f,t,_),2===w)return _;c=ue.event&&f.global,c&&0===ue.active++&&ue.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!At.test(f.type),o=f.url,f.hasContent||(f.data&&(o=f.url+=(_t.test(o)?"&":"?")+f.data,delete f.data),f.cache===!1&&(f.url=Ct.test(o)?o.replace(Ct,"$1_="+xt++):o+(_t.test(o)?"&":"?")+"_="+xt++)),f.ifModified&&(ue.lastModified[o]&&_.setRequestHeader("If-Modified-Since",ue.lastModified[o]),ue.etag[o]&&_.setRequestHeader("If-None-Match",ue.etag[o])),(f.data&&f.hasContent&&f.contentType!==!1||t.contentType)&&_.setRequestHeader("Content-Type",f.contentType),_.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+Ft+"; q=0.01":""):f.accepts["*"]);for(d in f.headers)_.setRequestHeader(d,f.headers[d]);if(f.beforeSend&&(f.beforeSend.call(p,_,f)===!1||2===w))return _.abort();x="abort";for(d in{success:1,error:1,complete:1})_[d](f[d]);if(i=z(Nt,f,t,_)){if(_.readyState=1,c&&h.trigger("ajaxSend",[_,f]),2===w)return _;f.async&&f.timeout>0&&(l=n.setTimeout(function(){_.abort("timeout")},f.timeout));try{w=1,i.send(b,r)}catch(E){if(!(w<2))throw E;r(-1,E)}}else r(-1,"No Transport");return _},getJSON:function(e,t,n){return ue.get(e,t,n,"json")},getScript:function(e,t){return ue.get(e,void 0,t,"script")}}),ue.each(["get","post"],function(e,t){ue[t]=function(e,n,r,i){return ue.isFunction(n)&&(i=i||r,r=n,n=void 0),ue.ajax(ue.extend({url:e,type:t,dataType:i,data:n,success:r},ue.isPlainObject(e)&&e))}}),ue._evalUrl=function(e){return ue.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},ue.fn.extend({wrapAll:function(e){var t;return ue.isFunction(e)?this.each(function(t){ue(this).wrapAll(e.call(this,t))}):(this[0]&&(t=ue(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this)},wrapInner:function(e){return ue.isFunction(e)?this.each(function(t){ue(this).wrapInner(e.call(this,t))}):this.each(function(){var t=ue(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=ue.isFunction(e);return this.each(function(n){ue(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){ue.nodeName(this,"body")||ue(this).replaceWith(this.childNodes)}).end()}}),ue.expr.filters.hidden=function(e){return!ue.expr.filters.visible(e)},ue.expr.filters.visible=function(e){return e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0};var Ot=/%20/g,Lt=/\[\]$/,Pt=/\r?\n/g,It=/^(?:submit|button|image|reset|file)$/i,Rt=/^(?:input|select|textarea|keygen)/i;ue.param=function(e,t){var n,r=[],i=function(e,t){t=ue.isFunction(t)?t():null==t?"":t,r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=ue.ajaxSettings&&ue.ajaxSettings.traditional),ue.isArray(e)||e.jquery&&!ue.isPlainObject(e))ue.each(e,function(){i(this.name,this.value)});else for(n in e)X(n,e[n],t,i);return r.join("&").replace(Ot,"+")},ue.fn.extend({serialize:function(){return ue.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=ue.prop(this,"elements");return e?ue.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!ue(this).is(":disabled")&&Rt.test(this.nodeName)&&!It.test(e)&&(this.checked||!Re.test(e))}).map(function(e,t){var n=ue(this).val();return null==n?null:ue.isArray(n)?ue.map(n,function(e){return{name:t.name,value:e.replace(Pt,"\r\n")}}):{name:t.name,value:n.replace(Pt,"\r\n")}}).get()}}),ue.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(e){}};var Bt={0:200,1223:204},jt=ue.ajaxSettings.xhr();se.cors=!!jt&&"withCredentials"in jt,se.ajax=jt=!!jt,ue.ajaxTransport(function(e){var t,r;if(se.cors||jt&&!e.crossDomain)return{send:function(i,o){var a,s=e.xhr();if(s.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(a in e.xhrFields)s[a]=e.xhrFields[a];e.mimeType&&s.overrideMimeType&&s.overrideMimeType(e.mimeType),e.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");
for(a in i)s.setRequestHeader(a,i[a]);t=function(e){return function(){t&&(t=r=s.onload=s.onerror=s.onabort=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?o(0,"error"):o(s.status,s.statusText):o(Bt[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=t(),r=s.onerror=t("error"),void 0!==s.onabort?s.onabort=r:s.onreadystatechange=function(){4===s.readyState&&n.setTimeout(function(){t&&r()})},t=t("abort");try{s.send(e.hasContent&&e.data||null)}catch(l){if(t)throw l}},abort:function(){t&&t()}}}),ue.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return ue.globalEval(e),e}}}),ue.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),ue.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(r,i){t=ue("<script>").prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&i("error"===e.type?404:200,e.type)}),Z.head.appendChild(t[0])},abort:function(){n&&n()}}}});var $t=[],Vt=/(=)\?(?=&|$)|\?\?/;ue.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=$t.pop()||ue.expando+"_"+xt++;return this[e]=!0,e}}),ue.ajaxPrefilter("json jsonp",function(e,t,r){var i,o,a,s=e.jsonp!==!1&&(Vt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(e.data)&&"data");if(s||"jsonp"===e.dataTypes[0])return i=e.jsonpCallback=ue.isFunction(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,s?e[s]=e[s].replace(Vt,"$1"+i):e.jsonp!==!1&&(e.url+=(_t.test(e.url)?"&":"?")+e.jsonp+"="+i),e.converters["script json"]=function(){return a||ue.error(i+" was not called"),a[0]},e.dataTypes[0]="json",o=n[i],n[i]=function(){a=arguments},r.always(function(){void 0===o?ue(n).removeProp(i):n[i]=o,e[i]&&(e.jsonpCallback=t.jsonpCallback,$t.push(i)),a&&ue.isFunction(o)&&o(a[0]),a=o=void 0}),"script"}),ue.parseHTML=function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||Z;var r=be.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=m([e],t,i),i&&i.length&&ue(i).remove(),ue.merge([],r.childNodes))};var Ut=ue.fn.load;ue.fn.load=function(e,t,n){if("string"!=typeof e&&Ut)return Ut.apply(this,arguments);var r,i,o,a=this,s=e.indexOf(" ");return s>-1&&(r=ue.trim(e.slice(s)),e=e.slice(0,s)),ue.isFunction(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),a.length>0&&ue.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?ue("<div>").append(ue.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},ue.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){ue.fn[t]=function(e){return this.on(t,e)}}),ue.expr.filters.animated=function(e){return ue.grep(ue.timers,function(t){return e===t.elem}).length},ue.offset={setOffset:function(e,t,n){var r,i,o,a,s,l,u,c=ue.css(e,"position"),d=ue(e),f={};"static"===c&&(e.style.position="relative"),s=d.offset(),o=ue.css(e,"top"),l=ue.css(e,"left"),u=("absolute"===c||"fixed"===c)&&(o+l).indexOf("auto")>-1,u?(r=d.position(),a=r.top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(l)||0),ue.isFunction(t)&&(t=t.call(e,n,ue.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):d.css(f)}},ue.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){ue.offset.setOffset(this,e,t)});var t,n,r=this[0],i={top:0,left:0},o=r&&r.ownerDocument;if(o)return t=o.documentElement,ue.contains(t,r)?(i=r.getBoundingClientRect(),n=Q(o),{top:i.top+n.pageYOffset-t.clientTop,left:i.left+n.pageXOffset-t.clientLeft}):i},position:function(){if(this[0]){var e,t,n=this[0],r={top:0,left:0};return"fixed"===ue.css(n,"position")?t=n.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),ue.nodeName(e[0],"html")||(r=e.offset()),r.top+=ue.css(e[0],"borderTopWidth",!0),r.left+=ue.css(e[0],"borderLeftWidth",!0)),{top:t.top-r.top-ue.css(n,"marginTop",!0),left:t.left-r.left-ue.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===ue.css(e,"position");)e=e.offsetParent;return e||nt})}}),ue.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n="pageYOffset"===t;ue.fn[e]=function(r){return Ae(this,function(e,r,i){var o=Q(e);return void 0===i?o?o[t]:e[r]:void(o?o.scrollTo(n?o.pageXOffset:i,n?i:o.pageYOffset):e[r]=i)},e,r,arguments.length)}}),ue.each(["top","left"],function(e,t){ue.cssHooks[t]=F(se.pixelPosition,function(e,n){if(n)return n=N(e,t),Ze.test(n)?ue(e).position()[t]+"px":n})}),ue.each({Height:"height",Width:"width"},function(e,t){ue.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){ue.fn[r]=function(r,i){var o=arguments.length&&(n||"boolean"!=typeof r),a=n||(r===!0||i===!0?"margin":"border");return Ae(this,function(t,n,r){var i;return ue.isWindow(t)?t.document.documentElement["client"+e]:9===t.nodeType?(i=t.documentElement,Math.max(t.body["scroll"+e],i["scroll"+e],t.body["offset"+e],i["offset"+e],i["client"+e])):void 0===r?ue.css(t,n,a):ue.style(t,n,r,a)},t,o?r:void 0,o,null)}})}),ue.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},size:function(){return this.length}}),ue.fn.andSelf=ue.fn.addBack,r=[],i=function(){return ue}.apply(t,r),!(void 0!==i&&(e.exports=i));var Wt=n.jQuery,qt=n.$;return ue.noConflict=function(e){return n.$===ue&&(n.$=qt),e&&n.jQuery===ue&&(n.jQuery=Wt),ue},o||(n.jQuery=n.$=ue),ue})},function(e,t,n){var r;(function(e,i){(function(){function o(e,t){if(e!==t){var n=null===e,r=e===A,i=e===e,o=null===t,a=t===A,s=t===t;if(e>t&&!o||!i||n&&!a&&s||r&&s)return 1;if(e<t&&!n||!s||o&&!r&&i||a&&i)return-1}return 0}function a(e,t,n){for(var r=e.length,i=n?r:-1;n?i--:++i<r;)if(t(e[i],i,e))return i;return-1}function s(e,t,n){if(t!==t)return b(e,n);for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}function l(e){return"function"==typeof e||!1}function u(e){return null==e?"":e+""}function c(e,t){for(var n=-1,r=e.length;++n<r&&t.indexOf(e.charAt(n))>-1;);return n}function d(e,t){for(var n=e.length;n--&&t.indexOf(e.charAt(n))>-1;);return n}function f(e,t){return o(e.criteria,t.criteria)||e.index-t.index}function p(e,t,n){for(var r=-1,i=e.criteria,a=t.criteria,s=i.length,l=n.length;++r<s;){var u=o(i[r],a[r]);if(u){if(r>=l)return u;var c=n[r];return u*("asc"===c||c===!0?1:-1)}}return e.index-t.index}function h(e){return ze[e]}function g(e){return Ge[e]}function m(e,t,n){return t?e=Xe[e]:n&&(e=Qe[e]),"\\"+e}function v(e){return"\\"+Qe[e]}function b(e,t,n){for(var r=e.length,i=t+(n?0:-1);n?i--:++i<r;){var o=e[i];if(o!==o)return i}return-1}function y(e){return!!e&&"object"==typeof e}function w(e){return e<=160&&e>=9&&e<=13||32==e||160==e||5760==e||6158==e||e>=8192&&(e<=8202||8232==e||8233==e||8239==e||8287==e||12288==e||65279==e)}function x(e,t){for(var n=-1,r=e.length,i=-1,o=[];++n<r;)e[n]===t&&(e[n]=z,o[++i]=n);return o}function _(e,t){for(var n,r=-1,i=e.length,o=-1,a=[];++r<i;){var s=e[r],l=t?t(s,r,e):s;r&&n===l||(n=l,a[++o]=s)}return a}function E(e){for(var t=-1,n=e.length;++t<n&&w(e.charCodeAt(t)););return t}function C(e){for(var t=e.length;t--&&w(e.charCodeAt(t)););return t}function k(e){return Ke[e]}function S(e){function t(e){if(y(e)&&!Ds(e)&&!(e instanceof i)){if(e instanceof r)return e;if(ta.call(e,"__chain__")&&ta.call(e,"__wrapped__"))return pr(e)}return new r(e)}function n(){}function r(e,t,n){this.__wrapped__=e,this.__actions__=n||[],this.__chain__=!!t}function i(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Ta,this.__views__=[]}function w(){var e=new i(this.__wrapped__);return e.__actions__=et(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=et(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=et(this.__views__),e}function Z(){if(this.__filtered__){var e=new i(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e}function re(){var e=this.__wrapped__.value(),t=this.__dir__,n=Ds(e),r=t<0,i=n?e.length:0,o=zn(0,i,this.__views__),a=o.start,s=o.end,l=s-a,u=r?s:a-1,c=this.__iteratees__,d=c.length,f=0,p=Ea(l,this.__takeCount__);if(!n||i<U||i==l&&p==l)return nn(r&&n?e.reverse():e,this.__actions__);var h=[];e:for(;l--&&f<p;){u+=t;for(var g=-1,m=e[u];++g<d;){var v=c[g],b=v.iteratee,y=v.type,w=b(m);if(y==q)m=w;else if(!w){if(y==W)continue e;break e}}h[f++]=m}return h}function oe(){this.__data__={}}function ze(e){return this.has(e)&&delete this.__data__[e]}function Ge(e){return"__proto__"==e?A:this.__data__[e]}function Ke(e){return"__proto__"!=e&&ta.call(this.__data__,e)}function Ye(e,t){return"__proto__"!=e&&(this.__data__[e]=t),this}function Xe(e){var t=e?e.length:0;for(this.data={hash:va(null),set:new da};t--;)this.push(e[t])}function Qe(e,t){var n=e.data,r="string"==typeof t||Li(t)?n.set.has(t):n.hash[t];return r?0:-1}function Je(e){var t=this.data;"string"==typeof e||Li(e)?t.set.add(e):t.hash[e]=!0}function Ze(e,t){for(var n=-1,r=e.length,i=-1,o=t.length,a=Vo(r+o);++n<r;)a[n]=e[n];for(;++i<o;)a[n++]=t[i];return a}function et(e,t){var n=-1,r=e.length;for(t||(t=Vo(r));++n<r;)t[n]=e[n];return t}function tt(e,t){for(var n=-1,r=e.length;++n<r&&t(e[n],n,e)!==!1;);return e}function nt(e,t){for(var n=e.length;n--&&t(e[n],n,e)!==!1;);return e}function ot(e,t){for(var n=-1,r=e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function at(e,t,n,r){for(var i=-1,o=e.length,a=r,s=a;++i<o;){var l=e[i],u=+t(l);n(u,a)&&(a=u,s=l)}return s}function st(e,t){for(var n=-1,r=e.length,i=-1,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[++i]=a)}return o}function lt(e,t){for(var n=-1,r=e.length,i=Vo(r);++n<r;)i[n]=t(e[n],n,e);return i}function ut(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function ct(e,t,n,r){var i=-1,o=e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function dt(e,t,n,r){var i=e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function ft(e,t){for(var n=-1,r=e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function pt(e,t){for(var n=e.length,r=0;n--;)r+=+t(e[n])||0;return r}function ht(e,t){return e===A?t:e}function gt(e,t,n,r){return e!==A&&ta.call(r,n)?e:t}function mt(e,t,n){for(var r=-1,i=$s(t),o=i.length;++r<o;){var a=i[r],s=e[a],l=n(s,t[a],a,e,t);(l===l?l===s:s!==s)&&(s!==A||a in e)||(e[a]=l)}return e}function vt(e,t){return null==t?e:yt(t,$s(t),e)}function bt(e,t){for(var n=-1,r=null==e,i=!r&&Qn(e),o=i?e.length:0,a=t.length,s=Vo(a);++n<a;){var l=t[n];i?s[n]=Jn(l,o)?e[l]:A:s[n]=r?A:e[l]}return s}function yt(e,t,n){n||(n={});for(var r=-1,i=t.length;++r<i;){var o=t[r];n[o]=e[o]}return n}function wt(e,t,n){var r=typeof e;return"function"==r?t===A?e:an(e,t,n):null==e?To:"object"==r?jt(e):t===A?Lo(e):$t(e,t)}function xt(e,t,n,r,i,o,a){var s;if(n&&(s=i?n(e,r,i):n(e)),s!==A)return s;if(!Li(e))return e;var l=Ds(e);if(l){if(s=Gn(e),!t)return et(e,s)}else{var u=ra.call(e),c=u==J;if(u!=te&&u!=G&&(!c||i))return He[u]?Yn(e,u,t):i?e:{};if(s=Kn(c?{}:e),!t)return vt(s,e)}o||(o=[]),a||(a=[]);for(var d=o.length;d--;)if(o[d]==e)return a[d];return o.push(e),a.push(s),(l?tt:Ft)(e,function(r,i){s[i]=xt(r,t,n,i,e,o,a)}),s}function _t(e,t,n){if("function"!=typeof e)throw new Xo(H);return fa(function(){e.apply(A,n)},t)}function Et(e,t){var n=e?e.length:0,r=[];if(!n)return r;var i=-1,o=Wn(),a=o==s,l=a&&t.length>=U?gn(t):null,u=t.length;l&&(o=Qe,a=!1,t=l);e:for(;++i<n;){var c=e[i];if(a&&c===c){for(var d=u;d--;)if(t[d]===c)continue e;r.push(c)}else o(t,c,0)<0&&r.push(c)}return r}function Ct(e,t){var n=!0;return Ia(e,function(e,r,i){return n=!!t(e,r,i)}),n}function kt(e,t,n,r){var i=r,o=i;return Ia(e,function(e,a,s){var l=+t(e,a,s);(n(l,i)||l===r&&l===o)&&(i=l,o=e)}),o}function St(e,t,n,r){var i=e.length;for(n=null==n?0:+n||0,n<0&&(n=-n>i?0:i+n),r=r===A||r>i?i:+r||0,r<0&&(r+=i),i=n>r?0:r>>>0,n>>>=0;n<i;)e[n++]=t;return e}function At(e,t){var n=[];return Ia(e,function(e,r,i){t(e,r,i)&&n.push(e)}),n}function Tt(e,t,n,r){var i;return n(e,function(e,n,o){if(t(e,n,o))return i=r?n:e,!1}),i}function Dt(e,t,n,r){r||(r=[]);for(var i=-1,o=e.length;++i<o;){var a=e[i];y(a)&&Qn(a)&&(n||Ds(a)||ki(a))?t?Dt(a,t,n,r):ut(r,a):n||(r[r.length]=a)}return r}function Nt(e,t){return Ba(e,t,eo)}function Ft(e,t){return Ba(e,t,$s)}function Mt(e,t){return ja(e,t,$s)}function Ot(e,t){for(var n=-1,r=t.length,i=-1,o=[];++n<r;){var a=t[n];Oi(e[a])&&(o[++i]=a)}return o}function Lt(e,t,n){if(null!=e){n!==A&&n in dr(e)&&(t=[n]);for(var r=0,i=t.length;null!=e&&r<i;)e=e[t[r++]];return r&&r==i?e:A}}function Pt(e,t,n,r,i,o){return e===t||(null==e||null==t||!Li(e)&&!y(t)?e!==e&&t!==t:It(e,t,Pt,n,r,i,o))}function It(e,t,n,r,i,o,a){var s=Ds(e),l=Ds(t),u=K,c=K;s||(u=ra.call(e),u==G?u=te:u!=te&&(s=Wi(e))),l||(c=ra.call(t),c==G?c=te:c!=te&&(l=Wi(t)));var d=u==te,f=c==te,p=u==c;if(p&&!s&&!d)return jn(e,t,u);if(!i){var h=d&&ta.call(e,"__wrapped__"),g=f&&ta.call(t,"__wrapped__");if(h||g)return n(h?e.value():e,g?t.value():t,r,i,o,a)}if(!p)return!1;o||(o=[]),a||(a=[]);for(var m=o.length;m--;)if(o[m]==e)return a[m]==t;o.push(e),a.push(t);var v=(s?Bn:$n)(e,t,n,r,i,o,a);return o.pop(),a.pop(),v}function Rt(e,t,n){var r=t.length,i=r,o=!n;if(null==e)return!i;for(e=dr(e);r--;){var a=t[r];if(o&&a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++r<i;){a=t[r];var s=a[0],l=e[s],u=a[1];if(o&&a[2]){if(l===A&&!(s in e))return!1}else{var c=n?n(l,u,s):A;if(!(c===A?Pt(u,l,n,!0):c))return!1}}return!0}function Bt(e,t){var n=-1,r=Qn(e)?Vo(e.length):[];return Ia(e,function(e,i,o){r[++n]=t(e,i,o)}),r}function jt(e){var t=qn(e);if(1==t.length&&t[0][2]){var n=t[0][0],r=t[0][1];return function(e){return null!=e&&(e[n]===r&&(r!==A||n in dr(e)))}}return function(e){return Rt(e,t)}}function $t(e,t){var n=Ds(e),r=er(e)&&rr(t),i=e+"";return e=fr(e),function(o){if(null==o)return!1;var a=i;if(o=dr(o),(n||!r)&&!(a in o)){if(o=1==e.length?o:Lt(o,Kt(e,0,-1)),null==o)return!1;a=Sr(e),o=dr(o)}return o[a]===t?t!==A||a in o:Pt(t,o[a],A,!0)}}function Vt(e,t,n,r,i){if(!Li(e))return e;var o=Qn(t)&&(Ds(t)||Wi(t)),a=o?A:$s(t);return tt(a||t,function(s,l){if(a&&(l=s,s=t[l]),y(s))r||(r=[]),i||(i=[]),Ut(e,t,l,Vt,n,r,i);else{var u=e[l],c=n?n(u,s,l,e,t):A,d=c===A;d&&(c=s),c===A&&(!o||l in e)||!d&&(c===c?c===u:u!==u)||(e[l]=c)}}),e}function Ut(e,t,n,r,i,o,a){for(var s=o.length,l=t[n];s--;)if(o[s]==l)return void(e[n]=a[s]);var u=e[n],c=i?i(u,l,n,e,t):A,d=c===A;d&&(c=l,Qn(l)&&(Ds(l)||Wi(l))?c=Ds(u)?u:Qn(u)?et(u):[]:$i(l)||ki(l)?c=ki(u)?Ki(u):$i(u)?u:{}:d=!1),o.push(l),a.push(c),d?e[n]=r(c,l,i,o,a):(c===c?c!==u:u===u)&&(e[n]=c)}function Wt(e){return function(t){return null==t?A:t[e]}}function qt(e){var t=e+"";return e=fr(e),function(n){return Lt(n,e,t)}}function Ht(e,t){for(var n=e?t.length:0;n--;){var r=t[n];if(r!=i&&Jn(r)){var i=r;pa.call(e,r,1)}}return e}function zt(e,t){return e+ba(Sa()*(t-e+1))}function Gt(e,t,n,r,i){return i(e,function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)}),n}function Kt(e,t,n){var r=-1,i=e.length;t=null==t?0:+t||0,t<0&&(t=-t>i?0:i+t),n=n===A||n>i?i:+n||0,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Vo(i);++r<i;)o[r]=e[r+t];return o}function Yt(e,t){var n;return Ia(e,function(e,r,i){return n=t(e,r,i),!n}),!!n}function Xt(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}function Qt(e,t,n){var r=Vn(),i=-1;t=lt(t,function(e){return r(e)});var o=Bt(e,function(e){var n=lt(t,function(t){return t(e)});return{criteria:n,index:++i,value:e}});return Xt(o,function(e,t){return p(e,t,n)})}function Jt(e,t){var n=0;return Ia(e,function(e,r,i){n+=+t(e,r,i)||0}),n}function Zt(e,t){var n=-1,r=Wn(),i=e.length,o=r==s,a=o&&i>=U,l=a?gn():null,u=[];l?(r=Qe,o=!1):(a=!1,l=t?[]:u);e:for(;++n<i;){var c=e[n],d=t?t(c,n,e):c;if(o&&c===c){for(var f=l.length;f--;)if(l[f]===d)continue e;t&&l.push(d),u.push(c)}else r(l,d,0)<0&&((t||a)&&l.push(d),u.push(c))}return u}function en(e,t){for(var n=-1,r=t.length,i=Vo(r);++n<r;)i[n]=e[t[n]];return i}function tn(e,t,n,r){for(var i=e.length,o=r?i:-1;(r?o--:++o<i)&&t(e[o],o,e););return n?Kt(e,r?0:o,r?o+1:i):Kt(e,r?o+1:0,r?i:o)}function nn(e,t){var n=e;n instanceof i&&(n=n.value());for(var r=-1,o=t.length;++r<o;){var a=t[r];n=a.func.apply(a.thisArg,ut([n],a.args))}return n}function rn(e,t,n){var r=0,i=e?e.length:r;if("number"==typeof t&&t===t&&i<=Fa){for(;r<i;){var o=r+i>>>1,a=e[o];(n?a<=t:a<t)&&null!==a?r=o+1:i=o}return i}return on(e,t,To,n)}function on(e,t,n,r){t=n(t);for(var i=0,o=e?e.length:0,a=t!==t,s=null===t,l=t===A;i<o;){var u=ba((i+o)/2),c=n(e[u]),d=c!==A,f=c===c;if(a)var p=f||r;else p=s?f&&d&&(r||null!=c):l?f&&(r||d):null!=c&&(r?c<=t:c<t);p?i=u+1:o=u}return Ea(o,Na)}function an(e,t,n){if("function"!=typeof e)return To;if(t===A)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 3:return function(n,r,i){return e.call(t,n,r,i)};case 4:return function(n,r,i,o){return e.call(t,n,r,i,o)};case 5:return function(n,r,i,o,a){return e.call(t,n,r,i,o,a)}}return function(){return e.apply(t,arguments)}}function sn(e){var t=new aa(e.byteLength),n=new ha(t);return n.set(new ha(e)),t}function ln(e,t,n){for(var r=n.length,i=-1,o=_a(e.length-r,0),a=-1,s=t.length,l=Vo(s+o);++a<s;)l[a]=t[a];for(;++i<r;)l[n[i]]=e[i];for(;o--;)l[a++]=e[i++];return l}function un(e,t,n){for(var r=-1,i=n.length,o=-1,a=_a(e.length-i,0),s=-1,l=t.length,u=Vo(a+l);++o<a;)u[o]=e[o];for(var c=o;++s<l;)u[c+s]=t[s];for(;++r<i;)u[c+n[r]]=e[o++];return u}function cn(e,t){return function(n,r,i){var o=t?t():{};if(r=Vn(r,i,3),Ds(n))for(var a=-1,s=n.length;++a<s;){var l=n[a];e(o,l,r(l,a,n),n)}else Ia(n,function(t,n,i){e(o,t,r(t,n,i),i)});return o}}function dn(e){return vi(function(t,n){var r=-1,i=null==t?0:n.length,o=i>2?n[i-2]:A,a=i>2?n[2]:A,s=i>1?n[i-1]:A;for("function"==typeof o?(o=an(o,s,5),i-=2):(o="function"==typeof s?s:A,i-=o?1:0),a&&Zn(n[0],n[1],a)&&(o=i<3?A:o,i=1);++r<i;){var l=n[r];l&&e(t,l,o)}return t})}function fn(e,t){return function(n,r){var i=n?Ua(n):0;if(!nr(i))return e(n,r);for(var o=t?i:-1,a=dr(n);(t?o--:++o<i)&&r(a[o],o,a)!==!1;);return n}}function pn(e){return function(t,n,r){for(var i=dr(t),o=r(t),a=o.length,s=e?a:-1;e?s--:++s<a;){var l=o[s];if(n(i[l],l,i)===!1)break}return t}}function hn(e,t){function n(){var i=this&&this!==rt&&this instanceof n?r:e;return i.apply(t,arguments)}var r=vn(e);return n}function gn(e){return va&&da?new Xe(e):null}function mn(e){return function(t){for(var n=-1,r=ko(co(t)),i=r.length,o="";++n<i;)o=e(o,r[n],n);return o}}function vn(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Pa(e.prototype),r=e.apply(n,t);return Li(r)?r:n}}function bn(e){function t(n,r,i){i&&Zn(n,r,i)&&(r=A);var o=Rn(n,e,A,A,A,A,A,r);return o.placeholder=t.placeholder,o}return t}function yn(e,t){return vi(function(n){var r=n[0];return null==r?r:(n.push(t),e.apply(A,n))})}function wn(e,t){return function(n,r,i){if(i&&Zn(n,r,i)&&(r=A),r=Vn(r,i,3),1==r.length){n=Ds(n)?n:cr(n);var o=at(n,r,e,t);if(!n.length||o!==t)return o}return kt(n,r,e,t)}}function xn(e,t){return function(n,r,i){if(r=Vn(r,i,3),Ds(n)){var o=a(n,r,t);return o>-1?n[o]:A}return Tt(n,r,e)}}function _n(e){return function(t,n,r){return t&&t.length?(n=Vn(n,r,3),a(t,n,e)):-1}}function En(e){return function(t,n,r){return n=Vn(n,r,3),Tt(t,n,e,!0)}}function Cn(e){return function(){for(var t,n=arguments.length,i=e?n:-1,o=0,a=Vo(n);e?i--:++i<n;){var s=a[o++]=arguments[i];if("function"!=typeof s)throw new Xo(H);!t&&r.prototype.thru&&"wrapper"==Un(s)&&(t=new r([],(!0)))}for(i=t?-1:n;++i<n;){s=a[i];var l=Un(s),u="wrapper"==l?Va(s):A;t=u&&tr(u[0])&&u[1]==(I|M|L|R)&&!u[4].length&&1==u[9]?t[Un(u[0])].apply(t,u[3]):1==s.length&&tr(s)?t[l]():t.thru(s)}return function(){var e=arguments,r=e[0];if(t&&1==e.length&&Ds(r)&&r.length>=U)return t.plant(r).value();for(var i=0,o=n?a[i].apply(this,e):r;++i<n;)o=a[i].call(this,o);return o}}}function kn(e,t){return function(n,r,i){return"function"==typeof r&&i===A&&Ds(n)?e(n,r):t(n,an(r,i,3))}}function Sn(e){return function(t,n,r){return"function"==typeof n&&r===A||(n=an(n,r,3)),e(t,n,eo)}}function An(e){return function(t,n,r){return"function"==typeof n&&r===A||(n=an(n,r,3)),e(t,n)}}function Tn(e){return function(t,n,r){var i={};return n=Vn(n,r,3),Ft(t,function(t,r,o){var a=n(t,r,o);r=e?a:r,t=e?t:a,i[r]=t}),i}}function Dn(e){return function(t,n,r){return t=u(t),(e?t:"")+On(t,n,r)+(e?"":t)}}function Nn(e){var t=vi(function(n,r){var i=x(r,t.placeholder);return Rn(n,e,A,r,i)});return t}function Fn(e,t){return function(n,r,i,o){var a=arguments.length<3;return"function"==typeof r&&o===A&&Ds(n)?e(n,r,i,a):Gt(n,Vn(r,o,4),i,a,t)}}function Mn(e,t,n,r,i,o,a,s,l,u){function c(){for(var b=arguments.length,y=b,w=Vo(b);y--;)w[y]=arguments[y];if(r&&(w=ln(w,r,i)),o&&(w=un(w,o,a)),h||m){var _=c.placeholder,E=x(w,_);if(b-=E.length,b<u){var C=s?et(s):A,k=_a(u-b,0),S=h?E:A,T=h?A:E,F=h?w:A,M=h?A:w;t|=h?L:P,t&=~(h?P:L),g||(t&=~(D|N));var O=[e,t,n,F,S,M,T,C,l,k],I=Mn.apply(A,O);return tr(e)&&Wa(I,O),I.placeholder=_,I}}var R=f?n:this,B=p?R[e]:e;return s&&(w=lr(w,s)),d&&l<w.length&&(w.length=l),this&&this!==rt&&this instanceof c&&(B=v||vn(e)),B.apply(R,w)}var d=t&I,f=t&D,p=t&N,h=t&M,g=t&F,m=t&O,v=p?A:vn(e);return c}function On(e,t,n){var r=e.length;if(t=+t,r>=t||!wa(t))return"";var i=t-r;return n=null==n?" ":n+"",vo(n,ma(i/n.length)).slice(0,i)}function Ln(e,t,n,r){function i(){for(var t=-1,s=arguments.length,l=-1,u=r.length,c=Vo(u+s);++l<u;)c[l]=r[l];for(;s--;)c[l++]=arguments[++t];var d=this&&this!==rt&&this instanceof i?a:e;return d.apply(o?n:this,c)}var o=t&D,a=vn(e);return i}function Pn(e){var t=Ho[e];return function(e,n){return n=n===A?0:+n||0,n?(n=ua(10,n),t(e*n)/n):t(e)}}function In(e){return function(t,n,r,i){var o=Vn(r);return null==r&&o===wt?rn(t,n,e):on(t,n,o(r,i,1),e)}}function Rn(e,t,n,r,i,o,a,s){var l=t&N;if(!l&&"function"!=typeof e)throw new Xo(H);var u=r?r.length:0;if(u||(t&=~(L|P),r=i=A),u-=i?i.length:0,t&P){var c=r,d=i;r=i=A}var f=l?A:Va(e),p=[e,t,n,r,i,c,d,o,a,s];if(f&&(ir(p,f),t=p[1],s=p[9]),p[9]=null==s?l?0:e.length:_a(s-u,0)||0,t==D)var h=hn(p[0],p[2]);else h=t!=L&&t!=(D|L)||p[4].length?Mn.apply(A,p):Ln.apply(A,p);var g=f?$a:Wa;return g(h,p)}function Bn(e,t,n,r,i,o,a){var s=-1,l=e.length,u=t.length;if(l!=u&&!(i&&u>l))return!1;for(;++s<l;){var c=e[s],d=t[s],f=r?r(i?d:c,i?c:d,s):A;if(f!==A){if(f)continue;return!1}if(i){if(!ft(t,function(e){return c===e||n(c,e,r,i,o,a)}))return!1}else if(c!==d&&!n(c,d,r,i,o,a))return!1}return!0}function jn(e,t,n){switch(n){case Y:case X:return+e==+t;case Q:return e.name==t.name&&e.message==t.message;case ee:return e!=+e?t!=+t:e==+t;case ne:case ie:return e==t+""}return!1}function $n(e,t,n,r,i,o,a){var s=$s(e),l=s.length,u=$s(t),c=u.length;if(l!=c&&!i)return!1;for(var d=l;d--;){var f=s[d];if(!(i?f in t:ta.call(t,f)))return!1}for(var p=i;++d<l;){f=s[d];var h=e[f],g=t[f],m=r?r(i?g:h,i?h:g,f):A;if(!(m===A?n(h,g,r,i,o,a):m))return!1;p||(p="constructor"==f)}if(!p){var v=e.constructor,b=t.constructor;if(v!=b&&"constructor"in e&&"constructor"in t&&!("function"==typeof v&&v instanceof v&&"function"==typeof b&&b instanceof b))return!1}return!0}function Vn(e,n,r){var i=t.callback||So;return i=i===So?wt:i,r?i(e,n,r):i}function Un(e){for(var t=e.name,n=La[t],r=n?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==e)return i.name}return t}function Wn(e,n,r){var i=t.indexOf||Cr;return i=i===Cr?s:i,e?i(e,n,r):i}function qn(e){for(var t=to(e),n=t.length;n--;)t[n][2]=rr(t[n][1]);return t}function Hn(e,t){var n=null==e?A:e[t];return Ri(n)?n:A}function zn(e,t,n){for(var r=-1,i=n.length;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=Ea(t,e+a);break;case"takeRight":e=_a(e,t-a)}}return{start:e,end:t}}function Gn(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&ta.call(e,"index")&&(n.index=e.index,n.input=e.input),n}function Kn(e){var t=e.constructor;return"function"==typeof t&&t instanceof t||(t=Go),new t}function Yn(e,t,n){var r=e.constructor;switch(t){case ae:return sn(e);case Y:case X:return new r((+e));case se:case le:case ue:case ce:case de:case fe:case pe:case he:case ge:var i=e.buffer;return new r(n?sn(i):i,e.byteOffset,e.length);case ee:case ie:return new r(e);case ne:var o=new r(e.source,Le.exec(e));o.lastIndex=e.lastIndex}return o}function Xn(e,t,n){null==e||er(t,e)||(t=fr(t),e=1==t.length?e:Lt(e,Kt(t,0,-1)),t=Sr(t));var r=null==e?e:e[t];return null==r?A:r.apply(e,n)}function Qn(e){return null!=e&&nr(Ua(e))}function Jn(e,t){return e="number"==typeof e||Re.test(e)?+e:-1,t=null==t?Ma:t,e>-1&&e%1==0&&e<t}function Zn(e,t,n){if(!Li(n))return!1;var r=typeof t;if("number"==r?Qn(n)&&Jn(t,n.length):"string"==r&&t in n){var i=n[t];return e===e?e===i:i!==i}return!1}function er(e,t){var n=typeof e;if("string"==n&&Ae.test(e)||"number"==n)return!0;if(Ds(e))return!1;var r=!Se.test(e);return r||null!=t&&e in dr(t)}function tr(e){var n=Un(e);if(!(n in i.prototype))return!1;var r=t[n];if(e===r)return!0;var o=Va(r);return!!o&&e===o[0]}function nr(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=Ma}function rr(e){return e===e&&!Li(e)}function ir(e,t){var n=e[1],r=t[1],i=n|r,o=i<I,a=r==I&&n==M||r==I&&n==R&&e[7].length<=t[8]||r==(I|R)&&n==M;if(!o&&!a)return e;r&D&&(e[2]=t[2],i|=n&D?0:F);var s=t[3];if(s){var l=e[3];e[3]=l?ln(l,s,t[4]):et(s),e[4]=l?x(e[3],z):et(t[4])}return s=t[5],s&&(l=e[5],e[5]=l?un(l,s,t[6]):et(s),e[6]=l?x(e[5],z):et(t[6])),s=t[7],s&&(e[7]=et(s)),r&I&&(e[8]=null==e[8]?t[8]:Ea(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=i,e}function or(e,t){return e===A?t:Ns(e,t,or)}function ar(e,t){e=dr(e);for(var n=-1,r=t.length,i={};++n<r;){var o=t[n];o in e&&(i[o]=e[o])}return i}function sr(e,t){var n={};return Nt(e,function(e,r,i){t(e,r,i)&&(n[r]=e)}),n}function lr(e,t){for(var n=e.length,r=Ea(t.length,n),i=et(e);r--;){var o=t[r];e[r]=Jn(o,n)?i[o]:A}return e}function ur(e){for(var t=eo(e),n=t.length,r=n&&e.length,i=!!r&&nr(r)&&(Ds(e)||ki(e)),o=-1,a=[];++o<n;){var s=t[o];(i&&Jn(s,r)||ta.call(e,s))&&a.push(s)}return a}function cr(e){return null==e?[]:Qn(e)?Li(e)?e:Go(e):oo(e)}function dr(e){return Li(e)?e:Go(e)}function fr(e){if(Ds(e))return e;var t=[];return u(e).replace(Te,function(e,n,r,i){t.push(r?i.replace(Me,"$1"):n||e)}),t}function pr(e){return e instanceof i?e.clone():new r(e.__wrapped__,e.__chain__,et(e.__actions__))}function hr(e,t,n){t=(n?Zn(e,t,n):null==t)?1:_a(ba(t)||1,1);for(var r=0,i=e?e.length:0,o=-1,a=Vo(ma(i/t));r<i;)a[++o]=Kt(e,r,r+=t);return a}function gr(e){for(var t=-1,n=e?e.length:0,r=-1,i=[];++t<n;){var o=e[t];o&&(i[++r]=o)}return i}function mr(e,t,n){var r=e?e.length:0;return r?((n?Zn(e,t,n):null==t)&&(t=1),Kt(e,t<0?0:t)):[]}function vr(e,t,n){var r=e?e.length:0;return r?((n?Zn(e,t,n):null==t)&&(t=1),t=r-(+t||0),Kt(e,0,t<0?0:t)):[]}function br(e,t,n){return e&&e.length?tn(e,Vn(t,n,3),!0,!0):[]}function yr(e,t,n){return e&&e.length?tn(e,Vn(t,n,3),!0):[]}function wr(e,t,n,r){var i=e?e.length:0;return i?(n&&"number"!=typeof n&&Zn(e,t,n)&&(n=0,r=i),St(e,t,n,r)):[]}function xr(e){return e?e[0]:A}function _r(e,t,n){var r=e?e.length:0;return n&&Zn(e,t,n)&&(t=!1),r?Dt(e,t):[]}function Er(e){var t=e?e.length:0;return t?Dt(e,!0):[]}function Cr(e,t,n){var r=e?e.length:0;if(!r)return-1;if("number"==typeof n)n=n<0?_a(r+n,0):n;else if(n){var i=rn(e,t);return i<r&&(t===t?t===e[i]:e[i]!==e[i])?i:-1}return s(e,t,n||0)}function kr(e){return vr(e,1)}function Sr(e){var t=e?e.length:0;return t?e[t-1]:A}function Ar(e,t,n){var r=e?e.length:0;if(!r)return-1;var i=r;if("number"==typeof n)i=(n<0?_a(r+n,0):Ea(n||0,r-1))+1;else if(n){i=rn(e,t,!0)-1;var o=e[i];return(t===t?t===o:o!==o)?i:-1}if(t!==t)return b(e,i,!0);for(;i--;)if(e[i]===t)return i;return-1}function Tr(){var e=arguments,t=e[0];if(!t||!t.length)return t;for(var n=0,r=Wn(),i=e.length;++n<i;)for(var o=0,a=e[n];(o=r(t,a,o))>-1;)pa.call(t,o,1);return t}function Dr(e,t,n){var r=[];if(!e||!e.length)return r;var i=-1,o=[],a=e.length;for(t=Vn(t,n,3);++i<a;){var s=e[i];t(s,i,e)&&(r.push(s),o.push(i))}return Ht(e,o),r}function Nr(e){return mr(e,1)}function Fr(e,t,n){var r=e?e.length:0;return r?(n&&"number"!=typeof n&&Zn(e,t,n)&&(t=0,n=r),Kt(e,t,n)):[]}function Mr(e,t,n){var r=e?e.length:0;return r?((n?Zn(e,t,n):null==t)&&(t=1),Kt(e,0,t<0?0:t)):[]}function Or(e,t,n){var r=e?e.length:0;return r?((n?Zn(e,t,n):null==t)&&(t=1),t=r-(+t||0),Kt(e,t<0?0:t)):[]}function Lr(e,t,n){return e&&e.length?tn(e,Vn(t,n,3),!1,!0):[]}function Pr(e,t,n){return e&&e.length?tn(e,Vn(t,n,3)):[]}function Ir(e,t,n,r){var i=e?e.length:0;if(!i)return[];null!=t&&"boolean"!=typeof t&&(r=n,n=Zn(e,t,r)?A:t,t=!1);var o=Vn();return null==n&&o===wt||(n=o(n,r,3)),t&&Wn()==s?_(e,n):Zt(e,n)}function Rr(e){if(!e||!e.length)return[];var t=-1,n=0;e=st(e,function(e){if(Qn(e))return n=_a(e.length,n),!0});for(var r=Vo(n);++t<n;)r[t]=lt(e,Wt(t));return r}function Br(e,t,n){var r=e?e.length:0;if(!r)return[];var i=Rr(e);return null==t?i:(t=an(t,n,4),lt(i,function(e){return ct(e,t,A,!0)}))}function jr(){for(var e=-1,t=arguments.length;++e<t;){var n=arguments[e];if(Qn(n))var r=r?ut(Et(r,n),Et(n,r)):n}return r?Zt(r):[]}function $r(e,t){var n=-1,r=e?e.length:0,i={};for(!r||t||Ds(e[0])||(t=[]);++n<r;){var o=e[n];t?i[o]=t[n]:o&&(i[o[0]]=o[1])}return i}function Vr(e){var n=t(e);return n.__chain__=!0,n}function Ur(e,t,n){return t.call(n,e),e}function Wr(e,t,n){return t.call(n,e)}function qr(){return Vr(this)}function Hr(){return new r(this.value(),this.__chain__)}function zr(e){for(var t,r=this;r instanceof n;){var i=pr(r);t?o.__wrapped__=i:t=i;var o=i;r=r.__wrapped__}return o.__wrapped__=e,t}function Gr(){var e=this.__wrapped__,t=function(e){return n&&n.__dir__<0?e:e.reverse()};if(e instanceof i){var n=e;return this.__actions__.length&&(n=new i(this)),n=n.reverse(),n.__actions__.push({func:Wr,args:[t],thisArg:A}),new r(n,this.__chain__)}return this.thru(t)}function Kr(){return this.value()+""}function Yr(){return nn(this.__wrapped__,this.__actions__)}function Xr(e,t,n){var r=Ds(e)?ot:Ct;return n&&Zn(e,t,n)&&(t=A),"function"==typeof t&&n===A||(t=Vn(t,n,3)),r(e,t)}function Qr(e,t,n){var r=Ds(e)?st:At;return t=Vn(t,n,3),r(e,t)}function Jr(e,t){return is(e,jt(t))}function Zr(e,t,n,r){var i=e?Ua(e):0;return nr(i)||(e=oo(e),i=e.length),n="number"!=typeof n||r&&Zn(t,n,r)?0:n<0?_a(i+n,0):n||0,"string"==typeof e||!Ds(e)&&Ui(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&Wn(e,t,n)>-1}function ei(e,t,n){var r=Ds(e)?lt:Bt;return t=Vn(t,n,3),r(e,t)}function ti(e,t){return ei(e,Lo(t))}function ni(e,t,n){var r=Ds(e)?st:At;return t=Vn(t,n,3),r(e,function(e,n,r){return!t(e,n,r)})}function ri(e,t,n){if(n?Zn(e,t,n):null==t){e=cr(e);var r=e.length;return r>0?e[zt(0,r-1)]:A}var i=-1,o=Gi(e),r=o.length,a=r-1;for(t=Ea(t<0?0:+t||0,r);++i<t;){var s=zt(i,a),l=o[s];o[s]=o[i],o[i]=l}return o.length=t,o}function ii(e){return ri(e,Ta)}function oi(e){var t=e?Ua(e):0;return nr(t)?t:$s(e).length}function ai(e,t,n){var r=Ds(e)?ft:Yt;return n&&Zn(e,t,n)&&(t=A),"function"==typeof t&&n===A||(t=Vn(t,n,3)),r(e,t)}function si(e,t,n){if(null==e)return[];n&&Zn(e,t,n)&&(t=A);var r=-1;t=Vn(t,n,3);var i=Bt(e,function(e,n,i){return{criteria:t(e,n,i),index:++r,value:e}});return Xt(i,f)}function li(e,t,n,r){return null==e?[]:(r&&Zn(t,n,r)&&(n=A),Ds(t)||(t=null==t?[]:[t]),Ds(n)||(n=null==n?[]:[n]),Qt(e,t,n))}function ui(e,t){return Qr(e,jt(t))}function ci(e,t){if("function"!=typeof t){
if("function"!=typeof e)throw new Xo(H);var n=e;e=t,t=n}return e=wa(e=+e)?e:0,function(){if(--e<1)return t.apply(this,arguments)}}function di(e,t,n){return n&&Zn(e,t,n)&&(t=A),t=e&&null==t?e.length:_a(+t||0,0),Rn(e,I,A,A,A,A,t)}function fi(e,t){var n;if("function"!=typeof t){if("function"!=typeof e)throw new Xo(H);var r=e;e=t,t=r}return function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=A),n}}function pi(e,t,n){function r(){p&&sa(p),u&&sa(u),g=0,u=p=h=A}function i(t,n){n&&sa(n),u=p=h=A,t&&(g=gs(),c=e.apply(f,l),p||u||(l=f=A))}function o(){var e=t-(gs()-d);e<=0||e>t?i(h,u):p=fa(o,e)}function a(){i(v,p)}function s(){if(l=arguments,d=gs(),f=this,h=v&&(p||!b),m===!1)var n=b&&!p;else{u||b||(g=d);var r=m-(d-g),i=r<=0||r>m;i?(u&&(u=sa(u)),g=d,c=e.apply(f,l)):u||(u=fa(a,r))}return i&&p?p=sa(p):p||t===m||(p=fa(o,t)),n&&(i=!0,c=e.apply(f,l)),!i||p||u||(l=f=A),c}var l,u,c,d,f,p,h,g=0,m=!1,v=!0;if("function"!=typeof e)throw new Xo(H);if(t=t<0?0:+t||0,n===!0){var b=!0;v=!1}else Li(n)&&(b=!!n.leading,m="maxWait"in n&&_a(+n.maxWait||0,t),v="trailing"in n?!!n.trailing:v);return s.cancel=r,s}function hi(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new Xo(H);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a),a};return n.cache=new hi.Cache,n}function gi(e){if("function"!=typeof e)throw new Xo(H);return function(){return!e.apply(this,arguments)}}function mi(e){return fi(2,e)}function vi(e,t){if("function"!=typeof e)throw new Xo(H);return t=_a(t===A?e.length-1:+t||0,0),function(){for(var n=arguments,r=-1,i=_a(n.length-t,0),o=Vo(i);++r<i;)o[r]=n[t+r];switch(t){case 0:return e.call(this,o);case 1:return e.call(this,n[0],o);case 2:return e.call(this,n[0],n[1],o)}var a=Vo(t+1);for(r=-1;++r<t;)a[r]=n[r];return a[t]=o,e.apply(this,a)}}function bi(e){if("function"!=typeof e)throw new Xo(H);return function(t){return e.apply(this,t)}}function yi(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new Xo(H);return n===!1?r=!1:Li(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),pi(e,t,{leading:r,maxWait:+t,trailing:i})}function wi(e,t){return t=null==t?To:t,Rn(t,L,A,[e],[])}function xi(e,t,n,r){return t&&"boolean"!=typeof t&&Zn(e,t,n)?t=!1:"function"==typeof t&&(r=n,n=t,t=!1),"function"==typeof n?xt(e,t,an(n,r,1)):xt(e,t)}function _i(e,t,n){return"function"==typeof t?xt(e,!0,an(t,n,1)):xt(e,!0)}function Ei(e,t){return e>t}function Ci(e,t){return e>=t}function ki(e){return y(e)&&Qn(e)&&ta.call(e,"callee")&&!ca.call(e,"callee")}function Si(e){return e===!0||e===!1||y(e)&&ra.call(e)==Y}function Ai(e){return y(e)&&ra.call(e)==X}function Ti(e){return!!e&&1===e.nodeType&&y(e)&&!$i(e)}function Di(e){return null==e||(Qn(e)&&(Ds(e)||Ui(e)||ki(e)||y(e)&&Oi(e.splice))?!e.length:!$s(e).length)}function Ni(e,t,n,r){n="function"==typeof n?an(n,r,3):A;var i=n?n(e,t):A;return i===A?Pt(e,t,n):!!i}function Fi(e){return y(e)&&"string"==typeof e.message&&ra.call(e)==Q}function Mi(e){return"number"==typeof e&&wa(e)}function Oi(e){return Li(e)&&ra.call(e)==J}function Li(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Pi(e,t,n,r){return n="function"==typeof n?an(n,r,3):A,Rt(e,qn(t),n)}function Ii(e){return ji(e)&&e!=+e}function Ri(e){return null!=e&&(Oi(e)?oa.test(ea.call(e)):y(e)&&Ie.test(e))}function Bi(e){return null===e}function ji(e){return"number"==typeof e||y(e)&&ra.call(e)==ee}function $i(e){var t;if(!y(e)||ra.call(e)!=te||ki(e)||!ta.call(e,"constructor")&&(t=e.constructor,"function"==typeof t&&!(t instanceof t)))return!1;var n;return Nt(e,function(e,t){n=t}),n===A||ta.call(e,n)}function Vi(e){return Li(e)&&ra.call(e)==ne}function Ui(e){return"string"==typeof e||y(e)&&ra.call(e)==ie}function Wi(e){return y(e)&&nr(e.length)&&!!qe[ra.call(e)]}function qi(e){return e===A}function Hi(e,t){return e<t}function zi(e,t){return e<=t}function Gi(e){var t=e?Ua(e):0;return nr(t)?t?et(e):[]:oo(e)}function Ki(e){return yt(e,eo(e))}function Yi(e,t,n){var r=Pa(e);return n&&Zn(e,t,n)&&(t=A),t?vt(r,t):r}function Xi(e){return Ot(e,eo(e))}function Qi(e,t,n){var r=null==e?A:Lt(e,fr(t),t+"");return r===A?n:r}function Ji(e,t){if(null==e)return!1;var n=ta.call(e,t);if(!n&&!er(t)){if(t=fr(t),e=1==t.length?e:Lt(e,Kt(t,0,-1)),null==e)return!1;t=Sr(t),n=ta.call(e,t)}return n||nr(e.length)&&Jn(t,e.length)&&(Ds(e)||ki(e))}function Zi(e,t,n){n&&Zn(e,t,n)&&(t=A);for(var r=-1,i=$s(e),o=i.length,a={};++r<o;){var s=i[r],l=e[s];t?ta.call(a,l)?a[l].push(s):a[l]=[s]:a[l]=s}return a}function eo(e){if(null==e)return[];Li(e)||(e=Go(e));var t=e.length;t=t&&nr(t)&&(Ds(e)||ki(e))&&t||0;for(var n=e.constructor,r=-1,i="function"==typeof n&&n.prototype===e,o=Vo(t),a=t>0;++r<t;)o[r]=r+"";for(var s in e)a&&Jn(s,t)||"constructor"==s&&(i||!ta.call(e,s))||o.push(s);return o}function to(e){e=dr(e);for(var t=-1,n=$s(e),r=n.length,i=Vo(r);++t<r;){var o=n[t];i[t]=[o,e[o]]}return i}function no(e,t,n){var r=null==e?A:e[t];return r===A&&(null==e||er(t,e)||(t=fr(t),e=1==t.length?e:Lt(e,Kt(t,0,-1)),r=null==e?A:e[Sr(t)]),r=r===A?n:r),Oi(r)?r.call(e):r}function ro(e,t,n){if(null==e)return e;var r=t+"";t=null!=e[r]||er(t,e)?[r]:fr(t);for(var i=-1,o=t.length,a=o-1,s=e;null!=s&&++i<o;){var l=t[i];Li(s)&&(i==a?s[l]=n:null==s[l]&&(s[l]=Jn(t[i+1])?[]:{})),s=s[l]}return e}function io(e,t,n,r){var i=Ds(e)||Wi(e);if(t=Vn(t,r,4),null==n)if(i||Li(e)){var o=e.constructor;n=i?Ds(e)?new o:[]:Pa(Oi(o)?o.prototype:A)}else n={};return(i?tt:Ft)(e,function(e,r,i){return t(n,e,r,i)}),n}function oo(e){return en(e,$s(e))}function ao(e){return en(e,eo(e))}function so(e,t,n){return t=+t||0,n===A?(n=t,t=0):n=+n||0,e>=Ea(t,n)&&e<_a(t,n)}function lo(e,t,n){n&&Zn(e,t,n)&&(t=n=A);var r=null==e,i=null==t;if(null==n&&(i&&"boolean"==typeof e?(n=e,e=1):"boolean"==typeof t&&(n=t,i=!0)),r&&i&&(t=1,i=!1),e=+e||0,i?(t=e,e=0):t=+t||0,n||e%1||t%1){var o=Sa();return Ea(e+o*(t-e+la("1e-"+((o+"").length-1))),t)}return zt(e,t)}function uo(e){return e=u(e),e&&e.charAt(0).toUpperCase()+e.slice(1)}function co(e){return e=u(e),e&&e.replace(Be,h).replace(Fe,"")}function fo(e,t,n){e=u(e),t+="";var r=e.length;return n=n===A?r:Ea(n<0?0:+n||0,r),n-=t.length,n>=0&&e.indexOf(t,n)==n}function po(e){return e=u(e),e&&_e.test(e)?e.replace(we,g):e}function ho(e){return e=u(e),e&&Ne.test(e)?e.replace(De,m):e||"(?:)"}function go(e,t,n){e=u(e),t=+t;var r=e.length;if(r>=t||!wa(t))return e;var i=(t-r)/2,o=ba(i),a=ma(i);return n=On("",a,n),n.slice(0,o)+e+n}function mo(e,t,n){return(n?Zn(e,t,n):null==t)?t=0:t&&(t=+t),e=wo(e),ka(e,t||(Pe.test(e)?16:10))}function vo(e,t){var n="";if(e=u(e),t=+t,t<1||!e||!wa(t))return n;do t%2&&(n+=e),t=ba(t/2),e+=e;while(t);return n}function bo(e,t,n){return e=u(e),n=null==n?0:Ea(n<0?0:+n||0,e.length),e.lastIndexOf(t,n)==n}function yo(e,n,r){var i=t.templateSettings;r&&Zn(e,n,r)&&(n=r=A),e=u(e),n=mt(vt({},r||n),i,gt);var o,a,s=mt(vt({},n.imports),i.imports,gt),l=$s(s),c=en(s,l),d=0,f=n.interpolate||je,p="__p += '",h=Ko((n.escape||je).source+"|"+f.source+"|"+(f===ke?Oe:je).source+"|"+(n.evaluate||je).source+"|$","g"),g="//# sourceURL="+("sourceURL"in n?n.sourceURL:"lodash.templateSources["+ ++We+"]")+"\n";e.replace(h,function(t,n,r,i,s,l){return r||(r=i),p+=e.slice(d,l).replace($e,v),n&&(o=!0,p+="' +\n__e("+n+") +\n'"),s&&(a=!0,p+="';\n"+s+";\n__p += '"),r&&(p+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),d=l+t.length,t}),p+="';\n";var m=n.variable;m||(p="with (obj) {\n"+p+"\n}\n"),p=(a?p.replace(me,""):p).replace(ve,"$1").replace(be,"$1;"),p="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var b=Qs(function(){return qo(l,g+"return "+p).apply(A,c)});if(b.source=p,Fi(b))throw b;return b}function wo(e,t,n){var r=e;return(e=u(e))?(n?Zn(r,t,n):null==t)?e.slice(E(e),C(e)+1):(t+="",e.slice(c(e,t),d(e,t)+1)):e}function xo(e,t,n){var r=e;return e=u(e),e?(n?Zn(r,t,n):null==t)?e.slice(E(e)):e.slice(c(e,t+"")):e}function _o(e,t,n){var r=e;return e=u(e),e?(n?Zn(r,t,n):null==t)?e.slice(0,C(e)+1):e.slice(0,d(e,t+"")+1):e}function Eo(e,t,n){n&&Zn(e,t,n)&&(t=A);var r=B,i=j;if(null!=t)if(Li(t)){var o="separator"in t?t.separator:o;r="length"in t?+t.length||0:r,i="omission"in t?u(t.omission):i}else r=+t||0;if(e=u(e),r>=e.length)return e;var a=r-i.length;if(a<1)return i;var s=e.slice(0,a);if(null==o)return s+i;if(Vi(o)){if(e.slice(a).search(o)){var l,c,d=e.slice(0,a);for(o.global||(o=Ko(o.source,(Le.exec(o)||"")+"g")),o.lastIndex=0;l=o.exec(d);)c=l.index;s=s.slice(0,null==c?a:c)}}else if(e.indexOf(o,a)!=a){var f=s.lastIndexOf(o);f>-1&&(s=s.slice(0,f))}return s+i}function Co(e){return e=u(e),e&&xe.test(e)?e.replace(ye,k):e}function ko(e,t,n){return n&&Zn(e,t,n)&&(t=A),e=u(e),e.match(t||Ve)||[]}function So(e,t,n){return n&&Zn(e,t,n)&&(t=A),y(e)?Do(e):wt(e,t)}function Ao(e){return function(){return e}}function To(e){return e}function Do(e){return jt(xt(e,!0))}function No(e,t){return $t(e,xt(t,!0))}function Fo(e,t,n){if(null==n){var r=Li(t),i=r?$s(t):A,o=i&&i.length?Ot(t,i):A;(o?o.length:r)||(o=!1,n=t,t=e,e=this)}o||(o=Ot(t,$s(t)));var a=!0,s=-1,l=Oi(e),u=o.length;n===!1?a=!1:Li(n)&&"chain"in n&&(a=n.chain);for(;++s<u;){var c=o[s],d=t[c];e[c]=d,l&&(e.prototype[c]=function(t){return function(){var n=this.__chain__;if(a||n){var r=e(this.__wrapped__),i=r.__actions__=et(this.__actions__);return i.push({func:t,args:arguments,thisArg:e}),r.__chain__=n,r}return t.apply(e,ut([this.value()],arguments))}}(d))}return e}function Mo(){return rt._=ia,this}function Oo(){}function Lo(e){return er(e)?Wt(e):qt(e)}function Po(e){return function(t){return Lt(e,fr(t),t+"")}}function Io(e,t,n){n&&Zn(e,t,n)&&(t=n=A),e=+e||0,n=null==n?1:+n||0,null==t?(t=e,e=0):t=+t||0;for(var r=-1,i=_a(ma((t-e)/(n||1)),0),o=Vo(i);++r<i;)o[r]=e,e+=n;return o}function Ro(e,t,n){if(e=ba(e),e<1||!wa(e))return[];var r=-1,i=Vo(Ea(e,Da));for(t=an(t,n,1);++r<e;)r<Da?i[r]=t(r):t(r);return i}function Bo(e){var t=++na;return u(e)+t}function jo(e,t){return(+e||0)+(+t||0)}function $o(e,t,n){return n&&Zn(e,t,n)&&(t=A),t=Vn(t,n,3),1==t.length?pt(Ds(e)?e:cr(e),t):Jt(e,t)}e=e?it.defaults(rt.Object(),e,it.pick(rt,Ue)):rt;var Vo=e.Array,Uo=e.Date,Wo=e.Error,qo=e.Function,Ho=e.Math,zo=e.Number,Go=e.Object,Ko=e.RegExp,Yo=e.String,Xo=e.TypeError,Qo=Vo.prototype,Jo=Go.prototype,Zo=Yo.prototype,ea=qo.prototype.toString,ta=Jo.hasOwnProperty,na=0,ra=Jo.toString,ia=rt._,oa=Ko("^"+ea.call(ta).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),aa=e.ArrayBuffer,sa=e.clearTimeout,la=e.parseFloat,ua=Ho.pow,ca=Jo.propertyIsEnumerable,da=Hn(e,"Set"),fa=e.setTimeout,pa=Qo.splice,ha=e.Uint8Array,ga=Hn(e,"WeakMap"),ma=Ho.ceil,va=Hn(Go,"create"),ba=Ho.floor,ya=Hn(Vo,"isArray"),wa=e.isFinite,xa=Hn(Go,"keys"),_a=Ho.max,Ea=Ho.min,Ca=Hn(Uo,"now"),ka=e.parseInt,Sa=Ho.random,Aa=zo.NEGATIVE_INFINITY,Ta=zo.POSITIVE_INFINITY,Da=4294967295,Na=Da-1,Fa=Da>>>1,Ma=9007199254740991,Oa=ga&&new ga,La={};t.support={};t.templateSettings={escape:Ee,evaluate:Ce,interpolate:ke,variable:"",imports:{_:t}};var Pa=function(){function e(){}return function(t){if(Li(t)){e.prototype=t;var n=new e;e.prototype=A}return n||{}}}(),Ia=fn(Ft),Ra=fn(Mt,!0),Ba=pn(),ja=pn(!0),$a=Oa?function(e,t){return Oa.set(e,t),e}:To,Va=Oa?function(e){return Oa.get(e)}:Oo,Ua=Wt("length"),Wa=function(){var e=0,t=0;return function(n,r){var i=gs(),o=V-(i-t);if(t=i,o>0){if(++e>=$)return n}else e=0;return $a(n,r)}}(),qa=vi(function(e,t){return y(e)&&Qn(e)?Et(e,Dt(t,!1,!0)):[]}),Ha=_n(),za=_n(!0),Ga=vi(function(e){for(var t=e.length,n=t,r=Vo(d),i=Wn(),o=i==s,a=[];n--;){var l=e[n]=Qn(l=e[n])?l:[];r[n]=o&&l.length>=120?gn(n&&l):null}var u=e[0],c=-1,d=u?u.length:0,f=r[0];e:for(;++c<d;)if(l=u[c],(f?Qe(f,l):i(a,l,0))<0){for(var n=t;--n;){var p=r[n];if((p?Qe(p,l):i(e[n],l,0))<0)continue e}f&&f.push(l),a.push(l)}return a}),Ka=vi(function(e,t){t=Dt(t);var n=bt(e,t);return Ht(e,t.sort(o)),n}),Ya=In(),Xa=In(!0),Qa=vi(function(e){return Zt(Dt(e,!1,!0))}),Ja=vi(function(e,t){return Qn(e)?Et(e,t):[]}),Za=vi(Rr),es=vi(function(e){var t=e.length,n=t>2?e[t-2]:A,r=t>1?e[t-1]:A;return t>2&&"function"==typeof n?t-=2:(n=t>1&&"function"==typeof r?(--t,r):A,r=A),e.length=t,Br(e,n,r)}),ts=vi(function(e){return e=Dt(e),this.thru(function(t){return Ze(Ds(t)?t:[dr(t)],e)})}),ns=vi(function(e,t){return bt(e,Dt(t))}),rs=cn(function(e,t,n){ta.call(e,n)?++e[n]:e[n]=1}),is=xn(Ia),os=xn(Ra,!0),as=kn(tt,Ia),ss=kn(nt,Ra),ls=cn(function(e,t,n){ta.call(e,n)?e[n].push(t):e[n]=[t]}),us=cn(function(e,t,n){e[n]=t}),cs=vi(function(e,t,n){var r=-1,i="function"==typeof t,o=er(t),a=Qn(e)?Vo(e.length):[];return Ia(e,function(e){var s=i?t:o&&null!=e?e[t]:A;a[++r]=s?s.apply(e,n):Xn(e,t,n)}),a}),ds=cn(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]}),fs=Fn(ct,Ia),ps=Fn(dt,Ra),hs=vi(function(e,t){if(null==e)return[];var n=t[2];return n&&Zn(t[0],t[1],n)&&(t.length=1),Qt(e,Dt(t),[])}),gs=Ca||function(){return(new Uo).getTime()},ms=vi(function(e,t,n){var r=D;if(n.length){var i=x(n,ms.placeholder);r|=L}return Rn(e,r,t,n,i)}),vs=vi(function(e,t){t=t.length?Dt(t):Xi(e);for(var n=-1,r=t.length;++n<r;){var i=t[n];e[i]=Rn(e[i],D,e)}return e}),bs=vi(function(e,t,n){var r=D|N;if(n.length){var i=x(n,bs.placeholder);r|=L}return Rn(t,r,e,n,i)}),ys=bn(M),ws=bn(O),xs=vi(function(e,t){return _t(e,1,t)}),_s=vi(function(e,t,n){return _t(e,t,n)}),Es=Cn(),Cs=Cn(!0),ks=vi(function(e,t){if(t=Dt(t),"function"!=typeof e||!ot(t,l))throw new Xo(H);var n=t.length;return vi(function(r){for(var i=Ea(r.length,n);i--;)r[i]=t[i](r[i]);return e.apply(this,r)})}),Ss=Nn(L),As=Nn(P),Ts=vi(function(e,t){return Rn(e,R,A,A,A,Dt(t))}),Ds=ya||function(e){return y(e)&&nr(e.length)&&ra.call(e)==K},Ns=dn(Vt),Fs=dn(function(e,t,n){return n?mt(e,t,n):vt(e,t)}),Ms=yn(Fs,ht),Os=yn(Ns,or),Ls=En(Ft),Ps=En(Mt),Is=Sn(Ba),Rs=Sn(ja),Bs=An(Ft),js=An(Mt),$s=xa?function(e){var t=null==e?A:e.constructor;return"function"==typeof t&&t.prototype===e||"function"!=typeof e&&Qn(e)?ur(e):Li(e)?xa(e):[]}:ur,Vs=Tn(!0),Us=Tn(),Ws=vi(function(e,t){if(null==e)return{};if("function"!=typeof t[0]){var t=lt(Dt(t),Yo);return ar(e,Et(eo(e),t))}var n=an(t[0],t[1],3);return sr(e,function(e,t,r){return!n(e,t,r)})}),qs=vi(function(e,t){return null==e?{}:"function"==typeof t[0]?sr(e,an(t[0],t[1],3)):ar(e,Dt(t))}),Hs=mn(function(e,t,n){return t=t.toLowerCase(),e+(n?t.charAt(0).toUpperCase()+t.slice(1):t)}),zs=mn(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),Gs=Dn(),Ks=Dn(!0),Ys=mn(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}),Xs=mn(function(e,t,n){return e+(n?" ":"")+(t.charAt(0).toUpperCase()+t.slice(1))}),Qs=vi(function(e,t){try{return e.apply(A,t)}catch(n){return Fi(n)?n:new Wo(n)}}),Js=vi(function(e,t){return function(n){return Xn(n,e,t)}}),Zs=vi(function(e,t){return function(n){return Xn(e,n,t)}}),el=Pn("ceil"),tl=Pn("floor"),nl=wn(Ei,Aa),rl=wn(Hi,Ta),il=Pn("round");return t.prototype=n.prototype,r.prototype=Pa(n.prototype),r.prototype.constructor=r,i.prototype=Pa(n.prototype),i.prototype.constructor=i,oe.prototype["delete"]=ze,oe.prototype.get=Ge,oe.prototype.has=Ke,oe.prototype.set=Ye,Xe.prototype.push=Je,hi.Cache=oe,t.after=ci,t.ary=di,t.assign=Fs,t.at=ns,t.before=fi,t.bind=ms,t.bindAll=vs,t.bindKey=bs,t.callback=So,t.chain=Vr,t.chunk=hr,t.compact=gr,t.constant=Ao,t.countBy=rs,t.create=Yi,t.curry=ys,t.curryRight=ws,t.debounce=pi,t.defaults=Ms,t.defaultsDeep=Os,t.defer=xs,t.delay=_s,t.difference=qa,t.drop=mr,t.dropRight=vr,t.dropRightWhile=br,t.dropWhile=yr,t.fill=wr,t.filter=Qr,t.flatten=_r,t.flattenDeep=Er,t.flow=Es,t.flowRight=Cs,t.forEach=as,t.forEachRight=ss,t.forIn=Is,t.forInRight=Rs,t.forOwn=Bs,t.forOwnRight=js,t.functions=Xi,t.groupBy=ls,t.indexBy=us,t.initial=kr,t.intersection=Ga,t.invert=Zi,t.invoke=cs,t.keys=$s,t.keysIn=eo,t.map=ei,t.mapKeys=Vs,t.mapValues=Us,t.matches=Do,t.matchesProperty=No,t.memoize=hi,t.merge=Ns,t.method=Js,t.methodOf=Zs,t.mixin=Fo,t.modArgs=ks,t.negate=gi,t.omit=Ws,t.once=mi,t.pairs=to,t.partial=Ss,t.partialRight=As,t.partition=ds,t.pick=qs,t.pluck=ti,t.property=Lo,t.propertyOf=Po,t.pull=Tr,t.pullAt=Ka,t.range=Io,t.rearg=Ts,t.reject=ni,t.remove=Dr,t.rest=Nr,t.restParam=vi,t.set=ro,t.shuffle=ii,t.slice=Fr,t.sortBy=si,t.sortByAll=hs,t.sortByOrder=li,t.spread=bi,t.take=Mr,t.takeRight=Or,t.takeRightWhile=Lr,t.takeWhile=Pr,t.tap=Ur,t.throttle=yi,t.thru=Wr,t.times=Ro,t.toArray=Gi,t.toPlainObject=Ki,t.transform=io,t.union=Qa,t.uniq=Ir,t.unzip=Rr,t.unzipWith=Br,t.values=oo,t.valuesIn=ao,t.where=ui,t.without=Ja,t.wrap=wi,t.xor=jr,t.zip=Za,t.zipObject=$r,t.zipWith=es,t.backflow=Cs,t.collect=ei,t.compose=Cs,t.each=as,t.eachRight=ss,t.extend=Fs,t.iteratee=So,t.methods=Xi,t.object=$r,t.select=Qr,t.tail=Nr,t.unique=Ir,Fo(t,t),t.add=jo,t.attempt=Qs,t.camelCase=Hs,t.capitalize=uo,t.ceil=el,t.clone=xi,t.cloneDeep=_i,t.deburr=co,t.endsWith=fo,t.escape=po,t.escapeRegExp=ho,t.every=Xr,t.find=is,t.findIndex=Ha,t.findKey=Ls,t.findLast=os,t.findLastIndex=za,t.findLastKey=Ps,t.findWhere=Jr,t.first=xr,t.floor=tl,t.get=Qi,t.gt=Ei,t.gte=Ci,t.has=Ji,t.identity=To,t.includes=Zr,t.indexOf=Cr,t.inRange=so,t.isArguments=ki,t.isArray=Ds,t.isBoolean=Si,t.isDate=Ai,t.isElement=Ti,t.isEmpty=Di,t.isEqual=Ni,t.isError=Fi,t.isFinite=Mi,t.isFunction=Oi,t.isMatch=Pi,t.isNaN=Ii,t.isNative=Ri,t.isNull=Bi,t.isNumber=ji,t.isObject=Li,t.isPlainObject=$i,t.isRegExp=Vi,t.isString=Ui,t.isTypedArray=Wi,t.isUndefined=qi,t.kebabCase=zs,t.last=Sr,t.lastIndexOf=Ar,t.lt=Hi,t.lte=zi,t.max=nl,t.min=rl,t.noConflict=Mo,t.noop=Oo,t.now=gs,t.pad=go,t.padLeft=Gs,t.padRight=Ks,t.parseInt=mo,t.random=lo,t.reduce=fs,t.reduceRight=ps,t.repeat=vo,t.result=no,t.round=il,t.runInContext=S,t.size=oi,t.snakeCase=Ys,t.some=ai,t.sortedIndex=Ya,t.sortedLastIndex=Xa,t.startCase=Xs,t.startsWith=bo,t.sum=$o,t.template=yo,t.trim=wo,t.trimLeft=xo,t.trimRight=_o,t.trunc=Eo,t.unescape=Co,t.uniqueId=Bo,t.words=ko,t.all=Xr,t.any=ai,t.contains=Zr,t.eq=Ni,t.detect=is,t.foldl=fs,t.foldr=ps,t.head=xr,t.include=Zr,t.inject=fs,Fo(t,function(){var e={};return Ft(t,function(n,r){t.prototype[r]||(e[r]=n)}),e}(),!1),t.sample=ri,t.prototype.sample=function(e){return this.__chain__||null!=e?this.thru(function(t){return ri(t,e)}):ri(this.value())},t.VERSION=T,tt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){t[e].placeholder=t}),tt(["drop","take"],function(e,t){i.prototype[e]=function(n){var r=this.__filtered__;if(r&&!t)return new i(this);n=null==n?1:_a(ba(n)||0,0);var o=this.clone();return r?o.__takeCount__=Ea(o.__takeCount__,n):o.__views__.push({size:n,type:e+(o.__dir__<0?"Right":"")}),o},i.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),tt(["filter","map","takeWhile"],function(e,t){var n=t+1,r=n!=q;i.prototype[e]=function(e,t){var i=this.clone();return i.__iteratees__.push({iteratee:Vn(e,t,1),type:n}),i.__filtered__=i.__filtered__||r,i}}),tt(["first","last"],function(e,t){var n="take"+(t?"Right":"");i.prototype[e]=function(){return this[n](1).value()[0]}}),tt(["initial","rest"],function(e,t){var n="drop"+(t?"":"Right");i.prototype[e]=function(){return this.__filtered__?new i(this):this[n](1)}}),tt(["pluck","where"],function(e,t){var n=t?"filter":"map",r=t?jt:Lo;i.prototype[e]=function(e){return this[n](r(e))}}),i.prototype.compact=function(){return this.filter(To)},i.prototype.reject=function(e,t){return e=Vn(e,t,1),this.filter(function(t){return!e(t)})},i.prototype.slice=function(e,t){e=null==e?0:+e||0;var n=this;return n.__filtered__&&(e>0||t<0)?new i(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==A&&(t=+t||0,n=t<0?n.dropRight(-t):n.take(t-e)),n)},i.prototype.takeRightWhile=function(e,t){return this.reverse().takeWhile(e,t).reverse()},i.prototype.toArray=function(){return this.take(Ta)},Ft(i.prototype,function(e,n){var o=/^(?:filter|map|reject)|While$/.test(n),a=/^(?:first|last)$/.test(n),s=t[a?"take"+("last"==n?"Right":""):n];s&&(t.prototype[n]=function(){var t=a?[1]:arguments,n=this.__chain__,l=this.__wrapped__,u=!!this.__actions__.length,c=l instanceof i,d=t[0],f=c||Ds(l);f&&o&&"function"==typeof d&&1!=d.length&&(c=f=!1);var p=function(e){return a&&n?s(e,1)[0]:s.apply(A,ut([e],t))},h={func:Wr,args:[p],thisArg:A},g=c&&!u;if(a&&!n)return g?(l=l.clone(),l.__actions__.push(h),e.call(l)):s.call(A,this.value())[0];if(!a&&f){l=g?l:new i(this);var m=e.apply(l,t);return m.__actions__.push(h),new r(m,n)}return this.thru(p)})}),tt(["join","pop","push","replace","shift","sort","splice","split","unshift"],function(e){var n=(/^(?:replace|split)$/.test(e)?Zo:Qo)[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",i=/^(?:join|pop|replace|shift)$/.test(e);t.prototype[e]=function(){var e=arguments;return i&&!this.__chain__?n.apply(this.value(),e):this[r](function(t){return n.apply(t,e)})}}),Ft(i.prototype,function(e,n){var r=t[n];if(r){var i=r.name,o=La[i]||(La[i]=[]);o.push({name:n,func:r})}}),La[Mn(A,N).name]=[{name:"wrapper",func:A}],i.prototype.clone=w,i.prototype.reverse=Z,i.prototype.value=re,t.prototype.chain=qr,t.prototype.commit=Hr,t.prototype.concat=ts,t.prototype.plant=zr,t.prototype.reverse=Gr,t.prototype.toString=Kr,t.prototype.run=t.prototype.toJSON=t.prototype.valueOf=t.prototype.value=Yr,t.prototype.collect=t.prototype.map,t.prototype.head=t.prototype.first,t.prototype.select=t.prototype.filter,t.prototype.tail=t.prototype.rest,t}var A,T="3.10.1",D=1,N=2,F=4,M=8,O=16,L=32,P=64,I=128,R=256,B=30,j="...",$=150,V=16,U=200,W=1,q=2,H="Expected a function",z="__lodash_placeholder__",G="[object Arguments]",K="[object Array]",Y="[object Boolean]",X="[object Date]",Q="[object Error]",J="[object Function]",Z="[object Map]",ee="[object Number]",te="[object Object]",ne="[object RegExp]",re="[object Set]",ie="[object String]",oe="[object WeakMap]",ae="[object ArrayBuffer]",se="[object Float32Array]",le="[object Float64Array]",ue="[object Int8Array]",ce="[object Int16Array]",de="[object Int32Array]",fe="[object Uint8Array]",pe="[object Uint8ClampedArray]",he="[object Uint16Array]",ge="[object Uint32Array]",me=/\b__p \+= '';/g,ve=/\b(__p \+=) '' \+/g,be=/(__e\(.*?\)|\b__t\)) \+\n'';/g,ye=/&(?:amp|lt|gt|quot|#39|#96);/g,we=/[&<>"'`]/g,xe=RegExp(ye.source),_e=RegExp(we.source),Ee=/<%-([\s\S]+?)%>/g,Ce=/<%([\s\S]+?)%>/g,ke=/<%=([\s\S]+?)%>/g,Se=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,Ae=/^\w*$/,Te=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g,De=/^[:!,]|[\\^$.*+?()[\]{}|\/]|(^[0-9a-fA-Fnrtuvx])|([\n\r\u2028\u2029])/g,Ne=RegExp(De.source),Fe=/[\u0300-\u036f\ufe20-\ufe23]/g,Me=/\\(\\)?/g,Oe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Le=/\w*$/,Pe=/^0[xX]/,Ie=/^\[object .+?Constructor\]$/,Re=/^\d+$/,Be=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,je=/($^)/,$e=/['\n\r\u2028\u2029\\]/g,Ve=function(){var e="[A-Z\\xc0-\\xd6\\xd8-\\xde]",t="[a-z\\xdf-\\xf6\\xf8-\\xff]+";return RegExp(e+"+(?="+e+t+")|"+e+"?"+t+"|"+e+"+|[0-9]+","g")}(),Ue=["Array","ArrayBuffer","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Math","Number","Object","RegExp","Set","String","_","clearTimeout","isFinite","parseFloat","parseInt","setTimeout","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap"],We=-1,qe={};qe[se]=qe[le]=qe[ue]=qe[ce]=qe[de]=qe[fe]=qe[pe]=qe[he]=qe[ge]=!0,qe[G]=qe[K]=qe[ae]=qe[Y]=qe[X]=qe[Q]=qe[J]=qe[Z]=qe[ee]=qe[te]=qe[ne]=qe[re]=qe[ie]=qe[oe]=!1;var He={};He[G]=He[K]=He[ae]=He[Y]=He[X]=He[se]=He[le]=He[ue]=He[ce]=He[de]=He[ee]=He[te]=He[ne]=He[ie]=He[fe]=He[pe]=He[he]=He[ge]=!0,He[Q]=He[J]=He[Z]=He[re]=He[oe]=!1;var ze={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss"},Ge={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","`":"&#96;"},Ke={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'","&#96;":"`"},Ye={"function":!0,object:!0},Xe={0:"x30",1:"x31",2:"x32",3:"x33",4:"x34",5:"x35",6:"x36",7:"x37",8:"x38",9:"x39",A:"x41",B:"x42",C:"x43",D:"x44",E:"x45",F:"x46",a:"x61",b:"x62",c:"x63",d:"x64",e:"x65",f:"x66",n:"x6e",r:"x72",t:"x74",u:"x75",v:"x76",x:"x78"},Qe={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Je=Ye[typeof t]&&t&&!t.nodeType&&t,Ze=Ye[typeof e]&&e&&!e.nodeType&&e,et=Je&&Ze&&"object"==typeof i&&i&&i.Object&&i,tt=Ye[typeof self]&&self&&self.Object&&self,nt=Ye[typeof window]&&window&&window.Object&&window,rt=(Ze&&Ze.exports===Je&&Je,et||nt!==(this&&this.window)&&nt||tt||this),it=S();rt._=it,r=function(){return it}.call(t,n,t,e),!(r!==A&&(e.exports=r))}).call(this)}).call(t,n(90)(e),function(){return this}())},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children=[],e.webpackPolyfill=1),e}},function(e,t,n){(function(t){e.exports=t.Backbone=n(92)}).call(t,function(){return this}())},function(e,t,n){var r,i;(function(o){!function(a){var s="object"==typeof self&&self.self===self&&self||"object"==typeof o&&o.global===o&&o;r=[n(89),n(86),t],i=function(e,t,n){s.Backbone=a(s,n,e,t)}.apply(t,r),!(void 0!==i&&(e.exports=i))}(function(e,t,n,r){var i=e.Backbone,o=Array.prototype.slice;t.VERSION="1.3.3",t.$=r,t.noConflict=function(){return e.Backbone=i,this},t.emulateHTTP=!1,t.emulateJSON=!1;var a=function(e,t,r){switch(e){case 1:return function(){return n[t](this[r])};case 2:return function(e){return n[t](this[r],e)};case 3:return function(e,i){return n[t](this[r],l(e,this),i)};case 4:return function(e,i,o){return n[t](this[r],l(e,this),i,o)};default:return function(){var e=o.call(arguments);return e.unshift(this[r]),n[t].apply(n,e)}}},s=function(e,t,r){n.each(t,function(t,i){n[i]&&(e.prototype[i]=a(t,i,r))})},l=function(e,t){return n.isFunction(e)?e:n.isObject(e)&&!t._isModel(e)?u(e):n.isString(e)?function(t){return t.get(e)}:e},u=function(e){var t=n.matches(e);return function(e){return t(e.attributes)}},c=t.Events={},d=/\s+/,f=function(e,t,r,i,o){var a,s=0;if(r&&"object"==typeof r){void 0!==i&&"context"in o&&void 0===o.context&&(o.context=i);for(a=n.keys(r);s<a.length;s++)t=f(e,t,a[s],r[a[s]],o)}else if(r&&d.test(r))for(a=r.split(d);s<a.length;s++)t=e(t,a[s],i,o);else t=e(t,r,i,o);return t};c.on=function(e,t,n){return p(this,e,t,n)};var p=function(e,t,n,r,i){if(e._events=f(h,e._events||{},t,n,{context:r,ctx:e,listening:i}),i){var o=e._listeners||(e._listeners={});o[i.id]=i}return e};c.listenTo=function(e,t,r){if(!e)return this;var i=e._listenId||(e._listenId=n.uniqueId("l")),o=this._listeningTo||(this._listeningTo={}),a=o[i];if(!a){var s=this._listenId||(this._listenId=n.uniqueId("l"));a=o[i]={obj:e,objId:i,id:s,listeningTo:o,count:0}}return p(e,t,r,this,a),this};var h=function(e,t,n,r){if(n){var i=e[t]||(e[t]=[]),o=r.context,a=r.ctx,s=r.listening;s&&s.count++,i.push({callback:n,context:o,ctx:o||a,listening:s})}return e};c.off=function(e,t,n){return this._events?(this._events=f(g,this._events,e,t,{context:n,listeners:this._listeners}),this):this},c.stopListening=function(e,t,r){var i=this._listeningTo;if(!i)return this;for(var o=e?[e._listenId]:n.keys(i),a=0;a<o.length;a++){var s=i[o[a]];if(!s)break;s.obj.off(t,r,this)}return this};var g=function(e,t,r,i){if(e){var o,a=0,s=i.context,l=i.listeners;if(t||r||s){for(var u=t?[t]:n.keys(e);a<u.length;a++){t=u[a];var c=e[t];if(!c)break;for(var d=[],f=0;f<c.length;f++){var p=c[f];r&&r!==p.callback&&r!==p.callback._callback||s&&s!==p.context?d.push(p):(o=p.listening,o&&0===--o.count&&(delete l[o.id],delete o.listeningTo[o.objId]))}d.length?e[t]=d:delete e[t]}return e}for(var h=n.keys(l);a<h.length;a++)o=l[h[a]],delete l[o.id],delete o.listeningTo[o.objId]}};c.once=function(e,t,r){var i=f(m,{},e,t,n.bind(this.off,this));return"string"==typeof e&&null==r&&(t=void 0),this.on(i,t,r)},c.listenToOnce=function(e,t,r){var i=f(m,{},t,r,n.bind(this.stopListening,this,e));return this.listenTo(e,i)};var m=function(e,t,r,i){if(r){var o=e[t]=n.once(function(){i(t,o),r.apply(this,arguments)});o._callback=r}return e};c.trigger=function(e){if(!this._events)return this;for(var t=Math.max(0,arguments.length-1),n=Array(t),r=0;r<t;r++)n[r]=arguments[r+1];return f(v,this._events,e,void 0,n),this};var v=function(e,t,n,r){if(e){var i=e[t],o=e.all;i&&o&&(o=o.slice()),i&&b(i,r),o&&b(o,[t].concat(r))}return e},b=function(e,t){var n,r=-1,i=e.length,o=t[0],a=t[1],s=t[2];switch(t.length){case 0:for(;++r<i;)(n=e[r]).callback.call(n.ctx);return;case 1:for(;++r<i;)(n=e[r]).callback.call(n.ctx,o);return;case 2:for(;++r<i;)(n=e[r]).callback.call(n.ctx,o,a);return;case 3:for(;++r<i;)(n=e[r]).callback.call(n.ctx,o,a,s);return;default:for(;++r<i;)(n=e[r]).callback.apply(n.ctx,t);return}};c.bind=c.on,c.unbind=c.off,n.extend(t,c);var y=t.Model=function(e,t){var r=e||{};t||(t={}),this.cid=n.uniqueId(this.cidPrefix),this.attributes={},t.collection&&(this.collection=t.collection),t.parse&&(r=this.parse(r,t)||{});var i=n.result(this,"defaults");r=n.defaults(n.extend({},i,r),i),this.set(r,t),this.changed={},this.initialize.apply(this,arguments)};n.extend(y.prototype,c,{changed:null,validationError:null,idAttribute:"id",cidPrefix:"c",initialize:function(){},toJSON:function(e){return n.clone(this.attributes)},sync:function(){return t.sync.apply(this,arguments)},get:function(e){return this.attributes[e]},escape:function(e){return n.escape(this.get(e))},has:function(e){return null!=this.get(e)},matches:function(e){return!!n.iteratee(e,this)(this.attributes)},set:function(e,t,r){if(null==e)return this;var i;if("object"==typeof e?(i=e,r=t):(i={})[e]=t,r||(r={}),!this._validate(i,r))return!1;var o=r.unset,a=r.silent,s=[],l=this._changing;this._changing=!0,l||(this._previousAttributes=n.clone(this.attributes),this.changed={});var u=this.attributes,c=this.changed,d=this._previousAttributes;for(var f in i)t=i[f],n.isEqual(u[f],t)||s.push(f),n.isEqual(d[f],t)?delete c[f]:c[f]=t,o?delete u[f]:u[f]=t;if(this.idAttribute in i&&(this.id=this.get(this.idAttribute)),!a){s.length&&(this._pending=r);for(var p=0;p<s.length;p++)this.trigger("change:"+s[p],this,u[s[p]],r)}if(l)return this;if(!a)for(;this._pending;)r=this._pending,this._pending=!1,this.trigger("change",this,r);return this._pending=!1,this._changing=!1,this},unset:function(e,t){return this.set(e,void 0,n.extend({},t,{unset:!0}))},clear:function(e){var t={};for(var r in this.attributes)t[r]=void 0;return this.set(t,n.extend({},e,{unset:!0}))},hasChanged:function(e){return null==e?!n.isEmpty(this.changed):n.has(this.changed,e)},changedAttributes:function(e){if(!e)return!!this.hasChanged()&&n.clone(this.changed);var t=this._changing?this._previousAttributes:this.attributes,r={};for(var i in e){var o=e[i];n.isEqual(t[i],o)||(r[i]=o)}return!!n.size(r)&&r},previous:function(e){return null!=e&&this._previousAttributes?this._previousAttributes[e]:null},previousAttributes:function(){return n.clone(this._previousAttributes)},fetch:function(e){e=n.extend({parse:!0},e);var t=this,r=e.success;return e.success=function(n){var i=e.parse?t.parse(n,e):n;return!!t.set(i,e)&&(r&&r.call(e.context,t,n,e),void t.trigger("sync",t,n,e))},V(this,e),this.sync("read",this,e)},save:function(e,t,r){var i;null==e||"object"==typeof e?(i=e,r=t):(i={})[e]=t,r=n.extend({validate:!0,parse:!0},r);var o=r.wait;if(i&&!o){if(!this.set(i,r))return!1}else if(!this._validate(i,r))return!1;var a=this,s=r.success,l=this.attributes;r.success=function(e){a.attributes=l;var t=r.parse?a.parse(e,r):e;return o&&(t=n.extend({},i,t)),!(t&&!a.set(t,r))&&(s&&s.call(r.context,a,e,r),void a.trigger("sync",a,e,r))},V(this,r),i&&o&&(this.attributes=n.extend({},l,i));var u=this.isNew()?"create":r.patch?"patch":"update";"patch"!==u||r.attrs||(r.attrs=i);var c=this.sync(u,this,r);return this.attributes=l,
c},destroy:function(e){e=e?n.clone(e):{};var t=this,r=e.success,i=e.wait,o=function(){t.stopListening(),t.trigger("destroy",t,t.collection,e)};e.success=function(n){i&&o(),r&&r.call(e.context,t,n,e),t.isNew()||t.trigger("sync",t,n,e)};var a=!1;return this.isNew()?n.defer(e.success):(V(this,e),a=this.sync("delete",this,e)),i||o(),a},url:function(){var e=n.result(this,"urlRoot")||n.result(this.collection,"url")||$();if(this.isNew())return e;var t=this.get(this.idAttribute);return e.replace(/[^\/]$/,"$&/")+encodeURIComponent(t)},parse:function(e,t){return e},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return!this.has(this.idAttribute)},isValid:function(e){return this._validate({},n.extend({},e,{validate:!0}))},_validate:function(e,t){if(!t.validate||!this.validate)return!0;e=n.extend({},this.attributes,e);var r=this.validationError=this.validate(e,t)||null;return!r||(this.trigger("invalid",this,r,n.extend(t,{validationError:r})),!1)}});var w={keys:1,values:1,pairs:1,invert:1,pick:0,omit:0,chain:1,isEmpty:1};s(y,w,"attributes");var x=t.Collection=function(e,t){t||(t={}),t.model&&(this.model=t.model),void 0!==t.comparator&&(this.comparator=t.comparator),this._reset(),this.initialize.apply(this,arguments),e&&this.reset(e,n.extend({silent:!0},t))},_={add:!0,remove:!0,merge:!0},E={add:!0,remove:!1},C=function(e,t,n){n=Math.min(Math.max(n,0),e.length);var r,i=Array(e.length-n),o=t.length;for(r=0;r<i.length;r++)i[r]=e[r+n];for(r=0;r<o;r++)e[r+n]=t[r];for(r=0;r<i.length;r++)e[r+o+n]=i[r]};n.extend(x.prototype,c,{model:y,initialize:function(){},toJSON:function(e){return this.map(function(t){return t.toJSON(e)})},sync:function(){return t.sync.apply(this,arguments)},add:function(e,t){return this.set(e,n.extend({merge:!1},t,E))},remove:function(e,t){t=n.extend({},t);var r=!n.isArray(e);e=r?[e]:e.slice();var i=this._removeModels(e,t);return!t.silent&&i.length&&(t.changes={added:[],merged:[],removed:i},this.trigger("update",this,t)),r?i[0]:i},set:function(e,t){if(null!=e){t=n.extend({},_,t),t.parse&&!this._isModel(e)&&(e=this.parse(e,t)||[]);var r=!n.isArray(e);e=r?[e]:e.slice();var i=t.at;null!=i&&(i=+i),i>this.length&&(i=this.length),i<0&&(i+=this.length+1);var o,a,s=[],l=[],u=[],c=[],d={},f=t.add,p=t.merge,h=t.remove,g=!1,m=this.comparator&&null==i&&t.sort!==!1,v=n.isString(this.comparator)?this.comparator:null;for(a=0;a<e.length;a++){o=e[a];var b=this.get(o);if(b){if(p&&o!==b){var y=this._isModel(o)?o.attributes:o;t.parse&&(y=b.parse(y,t)),b.set(y,t),u.push(b),m&&!g&&(g=b.hasChanged(v))}d[b.cid]||(d[b.cid]=!0,s.push(b)),e[a]=b}else f&&(o=e[a]=this._prepareModel(o,t),o&&(l.push(o),this._addReference(o,t),d[o.cid]=!0,s.push(o)))}if(h){for(a=0;a<this.length;a++)o=this.models[a],d[o.cid]||c.push(o);c.length&&this._removeModels(c,t)}var w=!1,x=!m&&f&&h;if(s.length&&x?(w=this.length!==s.length||n.some(this.models,function(e,t){return e!==s[t]}),this.models.length=0,C(this.models,s,0),this.length=this.models.length):l.length&&(m&&(g=!0),C(this.models,l,null==i?this.length:i),this.length=this.models.length),g&&this.sort({silent:!0}),!t.silent){for(a=0;a<l.length;a++)null!=i&&(t.index=i+a),o=l[a],o.trigger("add",o,this,t);(g||w)&&this.trigger("sort",this,t),(l.length||c.length||u.length)&&(t.changes={added:l,removed:c,merged:u},this.trigger("update",this,t))}return r?e[0]:e}},reset:function(e,t){t=t?n.clone(t):{};for(var r=0;r<this.models.length;r++)this._removeReference(this.models[r],t);return t.previousModels=this.models,this._reset(),e=this.add(e,n.extend({silent:!0},t)),t.silent||this.trigger("reset",this,t),e},push:function(e,t){return this.add(e,n.extend({at:this.length},t))},pop:function(e){var t=this.at(this.length-1);return this.remove(t,e)},unshift:function(e,t){return this.add(e,n.extend({at:0},t))},shift:function(e){var t=this.at(0);return this.remove(t,e)},slice:function(){return o.apply(this.models,arguments)},get:function(e){if(null!=e)return this._byId[e]||this._byId[this.modelId(e.attributes||e)]||e.cid&&this._byId[e.cid]},has:function(e){return null!=this.get(e)},at:function(e){return e<0&&(e+=this.length),this.models[e]},where:function(e,t){return this[t?"find":"filter"](e)},findWhere:function(e){return this.where(e,!0)},sort:function(e){var t=this.comparator;if(!t)throw new Error("Cannot sort a set without a comparator");e||(e={});var r=t.length;return n.isFunction(t)&&(t=n.bind(t,this)),1===r||n.isString(t)?this.models=this.sortBy(t):this.models.sort(t),e.silent||this.trigger("sort",this,e),this},pluck:function(e){return this.map(e+"")},fetch:function(e){e=n.extend({parse:!0},e);var t=e.success,r=this;return e.success=function(n){var i=e.reset?"reset":"set";r[i](n,e),t&&t.call(e.context,r,n,e),r.trigger("sync",r,n,e)},V(this,e),this.sync("read",this,e)},create:function(e,t){t=t?n.clone(t):{};var r=t.wait;if(e=this._prepareModel(e,t),!e)return!1;r||this.add(e,t);var i=this,o=t.success;return t.success=function(e,t,n){r&&i.add(e,n),o&&o.call(n.context,e,t,n)},e.save(null,t),e},parse:function(e,t){return e},clone:function(){return new this.constructor(this.models,{model:this.model,comparator:this.comparator})},modelId:function(e){return e[this.model.prototype.idAttribute||"id"]},_reset:function(){this.length=0,this.models=[],this._byId={}},_prepareModel:function(e,t){if(this._isModel(e))return e.collection||(e.collection=this),e;t=t?n.clone(t):{},t.collection=this;var r=new this.model(e,t);return r.validationError?(this.trigger("invalid",this,r.validationError,t),!1):r},_removeModels:function(e,t){for(var n=[],r=0;r<e.length;r++){var i=this.get(e[r]);if(i){var o=this.indexOf(i);this.models.splice(o,1),this.length--,delete this._byId[i.cid];var a=this.modelId(i.attributes);null!=a&&delete this._byId[a],t.silent||(t.index=o,i.trigger("remove",i,this,t)),n.push(i),this._removeReference(i,t)}}return n},_isModel:function(e){return e instanceof y},_addReference:function(e,t){this._byId[e.cid]=e;var n=this.modelId(e.attributes);null!=n&&(this._byId[n]=e),e.on("all",this._onModelEvent,this)},_removeReference:function(e,t){delete this._byId[e.cid];var n=this.modelId(e.attributes);null!=n&&delete this._byId[n],this===e.collection&&delete e.collection,e.off("all",this._onModelEvent,this)},_onModelEvent:function(e,t,n,r){if(t){if(("add"===e||"remove"===e)&&n!==this)return;if("destroy"===e&&this.remove(t,r),"change"===e){var i=this.modelId(t.previousAttributes()),o=this.modelId(t.attributes);i!==o&&(null!=i&&delete this._byId[i],null!=o&&(this._byId[o]=t))}}this.trigger.apply(this,arguments)}});var k={forEach:3,each:3,map:3,collect:3,reduce:0,foldl:0,inject:0,reduceRight:0,foldr:0,find:3,detect:3,filter:3,select:3,reject:3,every:3,all:3,some:3,any:3,include:3,includes:3,contains:3,invoke:0,max:3,min:3,toArray:1,size:1,first:3,head:3,take:3,initial:3,rest:3,tail:3,drop:3,last:3,without:0,difference:0,indexOf:3,shuffle:1,lastIndexOf:3,isEmpty:1,chain:1,sample:3,partition:3,groupBy:3,countBy:3,sortBy:3,indexBy:3,findIndex:3,findLastIndex:3};s(x,k,"models");var S=t.View=function(e){this.cid=n.uniqueId("view"),n.extend(this,n.pick(e,T)),this._ensureElement(),this.initialize.apply(this,arguments)},A=/^(\S+)\s*(.*)$/,T=["model","collection","el","id","attributes","className","tagName","events"];n.extend(S.prototype,c,{tagName:"div",$:function(e){return this.$el.find(e)},initialize:function(){},render:function(){return this},remove:function(){return this._removeElement(),this.stopListening(),this},_removeElement:function(){this.$el.remove()},setElement:function(e){return this.undelegateEvents(),this._setElement(e),this.delegateEvents(),this},_setElement:function(e){this.$el=e instanceof t.$?e:t.$(e),this.el=this.$el[0]},delegateEvents:function(e){if(e||(e=n.result(this,"events")),!e)return this;this.undelegateEvents();for(var t in e){var r=e[t];if(n.isFunction(r)||(r=this[r]),r){var i=t.match(A);this.delegate(i[1],i[2],n.bind(r,this))}}return this},delegate:function(e,t,n){return this.$el.on(e+".delegateEvents"+this.cid,t,n),this},undelegateEvents:function(){return this.$el&&this.$el.off(".delegateEvents"+this.cid),this},undelegate:function(e,t,n){return this.$el.off(e+".delegateEvents"+this.cid,t,n),this},_createElement:function(e){return document.createElement(e)},_ensureElement:function(){if(this.el)this.setElement(n.result(this,"el"));else{var e=n.extend({},n.result(this,"attributes"));this.id&&(e.id=n.result(this,"id")),this.className&&(e["class"]=n.result(this,"className")),this.setElement(this._createElement(n.result(this,"tagName"))),this._setAttributes(e)}},_setAttributes:function(e){this.$el.attr(e)}}),t.sync=function(e,r,i){var o=D[e];n.defaults(i||(i={}),{emulateHTTP:t.emulateHTTP,emulateJSON:t.emulateJSON});var a={type:o,dataType:"json"};if(i.url||(a.url=n.result(r,"url")||$()),null!=i.data||!r||"create"!==e&&"update"!==e&&"patch"!==e||(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(e){if(e.setRequestHeader("X-HTTP-Method-Override",o),s)return s.apply(this,arguments)}}"GET"===a.type||i.emulateJSON||(a.processData=!1);var l=i.error;i.error=function(e,t,n){i.textStatus=t,i.errorThrown=n,l&&l.call(i.context,e,t,n)};var u=i.xhr=t.ajax(n.extend(a,i));return r.trigger("request",r,u,i),u};var D={create:"POST",update:"PUT",patch:"PATCH","delete":"DELETE",read:"GET"};t.ajax=function(){return t.$.ajax.apply(t.$,arguments)};var N=t.Router=function(e){e||(e={}),e.routes&&(this.routes=e.routes),this._bindRoutes(),this.initialize.apply(this,arguments)},F=/\((.*?)\)/g,M=/(\(\?)?:\w+/g,O=/\*\w+/g,L=/[\-{}\[\]+?.,\\\^$|#\s]/g;n.extend(N.prototype,c,{initialize:function(){},route:function(e,r,i){n.isRegExp(e)||(e=this._routeToRegExp(e)),n.isFunction(r)&&(i=r,r=""),i||(i=this[r]);var o=this;return t.history.route(e,function(n){var a=o._extractParameters(e,n);o.execute(i,a,r)!==!1&&(o.trigger.apply(o,["route:"+r].concat(a)),o.trigger("route",r,a),t.history.trigger("route",o,r,a))}),this},execute:function(e,t,n){e&&e.apply(this,t)},navigate:function(e,n){return t.history.navigate(e,n),this},_bindRoutes:function(){if(this.routes){this.routes=n.result(this,"routes");for(var e,t=n.keys(this.routes);null!=(e=t.pop());)this.route(e,this.routes[e])}},_routeToRegExp:function(e){return e=e.replace(L,"\\$&").replace(F,"(?:$1)?").replace(M,function(e,t){return t?e:"([^/?]+)"}).replace(O,"([^?]*?)"),new RegExp("^"+e+"(?:\\?([\\s\\S]*))?$")},_extractParameters:function(e,t){var r=e.exec(t).slice(1);return n.map(r,function(e,t){return t===r.length-1?e||null:e?decodeURIComponent(e):null})}});var P=t.History=function(){this.handlers=[],this.checkUrl=n.bind(this.checkUrl,this),"undefined"!=typeof window&&(this.location=window.location,this.history=window.history)},I=/^[#\/]|\s+$/g,R=/^\/+|\/+$/g,B=/#.*$/;P.started=!1,n.extend(P.prototype,c,{interval:50,atRoot:function(){var e=this.location.pathname.replace(/[^\/]$/,"$&/");return e===this.root&&!this.getSearch()},matchRoot:function(){var e=this.decodeFragment(this.location.pathname),t=e.slice(0,this.root.length-1)+"/";return t===this.root},decodeFragment:function(e){return decodeURI(e.replace(/%25/g,"%2525"))},getSearch:function(){var e=this.location.href.replace(/#.*/,"").match(/\?.+/);return e?e[0]:""},getHash:function(e){var t=(e||this).location.href.match(/#(.*)$/);return t?t[1]:""},getPath:function(){var e=this.decodeFragment(this.location.pathname+this.getSearch()).slice(this.root.length-1);return"/"===e.charAt(0)?e.slice(1):e},getFragment:function(e){return null==e&&(e=this._usePushState||!this._wantsHashChange?this.getPath():this.getHash()),e.replace(I,"")},start:function(e){if(P.started)throw new Error("Backbone.history has already been started");if(P.started=!0,this.options=n.extend({root:"/"},this.options,e),this.root=this.options.root,this._wantsHashChange=this.options.hashChange!==!1,this._hasHashChange="onhashchange"in window&&(void 0===document.documentMode||document.documentMode>7),this._useHashChange=this._wantsHashChange&&this._hasHashChange,this._wantsPushState=!!this.options.pushState,this._hasPushState=!(!this.history||!this.history.pushState),this._usePushState=this._wantsPushState&&this._hasPushState,this.fragment=this.getFragment(),this.root=("/"+this.root+"/").replace(R,"/"),this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot()){var t=this.root.slice(0,-1)||"/";return this.location.replace(t+"#"+this.getPath()),!0}this._hasPushState&&this.atRoot()&&this.navigate(this.getHash(),{replace:!0})}if(!this._hasHashChange&&this._wantsHashChange&&!this._usePushState){this.iframe=document.createElement("iframe"),this.iframe.src="javascript:0",this.iframe.style.display="none",this.iframe.tabIndex=-1;var r=document.body,i=r.insertBefore(this.iframe,r.firstChild).contentWindow;i.document.open(),i.document.close(),i.location.hash="#"+this.fragment}var o=window.addEventListener||function(e,t){return attachEvent("on"+e,t)};if(this._usePushState?o("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe?o("hashchange",this.checkUrl,!1):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),!this.options.silent)return this.loadUrl()},stop:function(){var e=window.removeEventListener||function(e,t){return detachEvent("on"+e,t)};this._usePushState?e("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe&&e("hashchange",this.checkUrl,!1),this.iframe&&(document.body.removeChild(this.iframe),this.iframe=null),this._checkUrlInterval&&clearInterval(this._checkUrlInterval),P.started=!1},route:function(e,t){this.handlers.unshift({route:e,callback:t})},checkUrl:function(e){var t=this.getFragment();return t===this.fragment&&this.iframe&&(t=this.getHash(this.iframe.contentWindow)),t!==this.fragment&&(this.iframe&&this.navigate(t),void this.loadUrl())},loadUrl:function(e){return!!this.matchRoot()&&(e=this.fragment=this.getFragment(e),n.some(this.handlers,function(t){if(t.route.test(e))return t.callback(e),!0}))},navigate:function(e,t){if(!P.started)return!1;t&&t!==!0||(t={trigger:!!t}),e=this.getFragment(e||"");var n=this.root;""!==e&&"?"!==e.charAt(0)||(n=n.slice(0,-1)||"/");var r=n+e;if(e=this.decodeFragment(e.replace(B,"")),this.fragment!==e){if(this.fragment=e,this._usePushState)this.history[t.replace?"replaceState":"pushState"]({},document.title,r);else{if(!this._wantsHashChange)return this.location.assign(r);if(this._updateHash(this.location,e,t.replace),this.iframe&&e!==this.getHash(this.iframe.contentWindow)){var i=this.iframe.contentWindow;t.replace||(i.document.open(),i.document.close()),this._updateHash(i.location,e,t.replace)}}return t.trigger?this.loadUrl(e):void 0}},_updateHash:function(e,t,n){if(n){var r=e.href.replace(/(javascript:|#).*$/,"");e.replace(r+"#"+t)}else e.hash="#"+t}}),t.history=new P;var j=function(e,t){var r,i=this;return r=e&&n.has(e,"constructor")?e.constructor:function(){return i.apply(this,arguments)},n.extend(r,i,t),r.prototype=n.create(i.prototype,e),r.prototype.constructor=r,r.__super__=i.prototype,r};y.extend=x.extend=N.extend=S.extend=P.extend=j;var $=function(){throw new Error('A "url" property or function must be specified')},V=function(e,t){var n=t.error;t.error=function(r){n&&n.call(t.context,e,r,t),e.trigger("error",e,r,t)}};return t})}).call(t,function(){return this}())},function(e,t){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};!function(e){e(function(){e.support.transition=function(){var e=function(){var e,t=document.createElement("bootstrap"),n={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(e in n)if(void 0!==t.style[e])return n[e]}();return e&&{end:e}}()})}(window.jQuery),!function(e){var t=function(t,n){this.options=n,this.$element=e(t).delegate('[data-dismiss="modal"]',"click.dismiss.modal",e.proxy(this.hide,this)),this.options.remote&&this.$element.find(".modal-body").load(this.options.remote)};t.prototype={constructor:t,toggle:function(){return this[this.isShown?"hide":"show"]()},show:function(){var t=this,n=e.Event("show");this.$element.trigger(n),this.isShown||n.isDefaultPrevented()||(this.isShown=!0,this.escape(),this.backdrop(function(){var n=e.support.transition&&t.$element.hasClass("fade");t.$element.parent().length||t.$element.appendTo(document.body),t.$element.show(),n&&t.$element[0].offsetWidth,t.$element.addClass("in").attr("aria-hidden",!1),t.enforceFocus(),n?t.$element.one(e.support.transition.end,function(){t.$element.focus().trigger("shown")}):t.$element.focus().trigger("shown")}))},hide:function(t){t&&t.preventDefault();t=e.Event("hide"),this.$element.trigger(t),this.isShown&&!t.isDefaultPrevented()&&(this.isShown=!1,this.escape(),e(document).off("focusin.modal"),this.$element.removeClass("in").attr("aria-hidden",!0),e.support.transition&&this.$element.hasClass("fade")?this.hideWithTransition():this.hideModal())},enforceFocus:function(){var t=this;e(document).on("focusin.modal",function(e){t.$element[0]===e.target||t.$element.has(e.target).length||t.$element.focus()})},escape:function(){var e=this;this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.modal",function(t){27==t.which&&e.hide()}):this.isShown||this.$element.off("keyup.dismiss.modal")},hideWithTransition:function(){var t=this,n=setTimeout(function(){t.$element.off(e.support.transition.end),t.hideModal()},500);this.$element.one(e.support.transition.end,function(){clearTimeout(n),t.hideModal()})},hideModal:function(){var e=this;this.$element.hide(),this.backdrop(function(){e.removeBackdrop(),e.$element.trigger("hidden")})},removeBackdrop:function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},backdrop:function(t){var n=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var r=e.support.transition&&n;if(this.$backdrop=e('<div class="modal-backdrop '+n+'" />').appendTo(document.body),this.$backdrop.click("static"==this.options.backdrop?e.proxy(this.$element[0].focus,this.$element[0]):e.proxy(this.hide,this)),r&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!t)return;r?this.$backdrop.one(e.support.transition.end,t):t()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),e.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(e.support.transition.end,t):t()):t&&t()}};var r=e.fn.modal;e.fn.modal=function(r){return this.each(function(){var i=e(this),o=i.data("modal"),a=e.extend({},e.fn.modal.defaults,i.data(),"object"==("undefined"==typeof r?"undefined":n(r))&&r);o||i.data("modal",o=new t(this,a)),"string"==typeof r?o[r]():a.show&&o.show()})},e.fn.modal.defaults={backdrop:!0,keyboard:!0,show:!0},e.fn.modal.Constructor=t,e.fn.modal.noConflict=function(){return e.fn.modal=r,this},e(document).on("click.modal.data-api",'[data-toggle="modal"]',function(t){var n=e(this),r=n.attr("href"),i=e(n.attr("data-target")||r&&r.replace(/.*(?=#[^\s]+$)/,"")),o=i.data("modal")?"toggle":e.extend({remote:!/#/.test(r)&&r},i.data(),n.data());t.preventDefault(),i.modal(o).one("hide",function(){n.focus()})})}(window.jQuery),!function(e){function t(){e(".dropdown-backdrop").remove(),e(r).each(function(){n(e(this)).removeClass("open")})}function n(t){var n,r=t.attr("data-target");return r||(r=t.attr("href"),r=r&&/#/.test(r)&&r.replace(/.*(?=#[^\s]*$)/,"")),n=r&&e(r),n&&n.length||(n=t.parent()),n}var r="[data-toggle=dropdown]",i=function(t){var n=e(t).on("click.dropdown.data-api",this.toggle);e("html").on("click.dropdown.data-api",function(){n.parent().removeClass("open")})};i.prototype={constructor:i,toggle:function(r){var i,o,a=e(this);if(!a.is(".disabled, :disabled"))return i=n(a),o=i.hasClass("open"),t(),o||("ontouchstart"in document.documentElement&&e('<div class="dropdown-backdrop"/>').insertBefore(e(this)).on("click",t),i.toggleClass("open")),a.focus(),!1},keydown:function(t){var i,o,a,s,l;if(/(38|40|27)/.test(t.keyCode)&&(i=e(this),t.preventDefault(),t.stopPropagation(),!i.is(".disabled, :disabled"))){if(a=n(i),s=a.hasClass("open"),!s||s&&27==t.keyCode)return 27==t.which&&a.find(r).focus(),i.click();o=e("[role=menu] li:not(.divider):visible a",a),o.length&&(l=o.index(o.filter(":focus")),38==t.keyCode&&l>0&&l--,40==t.keyCode&&l<o.length-1&&l++,~l||(l=0),o.eq(l).focus())}}};var o=e.fn.dropdown;e.fn.dropdown=function(t){return this.each(function(){var n=e(this),r=n.data("dropdown");r||n.data("dropdown",r=new i(this)),"string"==typeof t&&r[t].call(n)})},e.fn.dropdown.Constructor=i,e.fn.dropdown.noConflict=function(){return e.fn.dropdown=o,this},e(document).on("click.dropdown.data-api",t).on("click.dropdown.data-api",".dropdown form",function(e){e.stopPropagation()}).on("click.dropdown.data-api",r,i.prototype.toggle).on("keydown.dropdown.data-api",r+", [role=menu]",i.prototype.keydown)}(window.jQuery),!function(e){function t(t,n){var r,i=e.proxy(this.process,this),o=e(e(t).is("body")?window:t);this.options=e.extend({},e.fn.scrollspy.defaults,n),this.$scrollElement=o.on("scroll.scroll-spy.data-api",i),this.selector=(this.options.target||(r=e(t).attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.$body=e("body"),this.refresh(),this.process()}t.prototype={constructor:t,refresh:function(){var t,n=this;this.offsets=e([]),this.targets=e([]),t=this.$body.find(this.selector).map(function(){var t=e(this),r=t.data("target")||t.attr("href"),i=/^#\w/.test(r)&&e(r);return i&&i.length&&[[i.position().top+(!e.isWindow(n.$scrollElement.get(0))&&n.$scrollElement.scrollTop()),r]]||null}).sort(function(e,t){return e[0]-t[0]}).each(function(){n.offsets.push(this[0]),n.targets.push(this[1])})},process:function(){var e,t=this.$scrollElement.scrollTop()+this.options.offset,n=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,r=n-this.$scrollElement.height(),i=this.offsets,o=this.targets,a=this.activeTarget;if(t>=r)return a!=(e=o.last()[0])&&this.activate(e);for(e=i.length;e--;)a!=o[e]&&t>=i[e]&&(!i[e+1]||t<=i[e+1])&&this.activate(o[e])},activate:function(t){var n,r;this.activeTarget=t,e(this.selector).parent(".active").removeClass("active"),r=this.selector+'[data-target="'+t+'"],'+this.selector+'[href="'+t+'"]',n=e(r).parent("li").addClass("active"),n.parent(".dropdown-menu").length&&(n=n.closest("li.dropdown").addClass("active")),n.trigger("activate")}};var r=e.fn.scrollspy;e.fn.scrollspy=function(r){return this.each(function(){var i=e(this),o=i.data("scrollspy"),a="object"==("undefined"==typeof r?"undefined":n(r))&&r;o||i.data("scrollspy",o=new t(this,a)),"string"==typeof r&&o[r]()})},e.fn.scrollspy.Constructor=t,e.fn.scrollspy.defaults={offset:10},e.fn.scrollspy.noConflict=function(){return e.fn.scrollspy=r,this},e(window).on("load",function(){e('[data-spy="scroll"]').each(function(){var t=e(this);t.scrollspy(t.data())})})}(window.jQuery),!function(e){var t=function(t){this.element=e(t)};t.prototype={constructor:t,show:function(){var t,n,r,i=this.element,o=i.closest("ul:not(.dropdown-menu)"),a=i.attr("data-target");a||(a=i.attr("href"),a=a&&a.replace(/.*(?=#[^\s]*$)/,"")),i.parent("li").hasClass("active")||(t=o.find(".active:last a")[0],r=e.Event("show",{relatedTarget:t}),i.trigger(r),r.isDefaultPrevented()||(n=e(a),this.activate(i.parent("li"),o),this.activate(n,n.parent(),function(){i.trigger({type:"shown",relatedTarget:t})})))},activate:function(t,n,r){function i(){o.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),t.addClass("active"),a?(t[0].offsetWidth,t.addClass("in")):t.removeClass("fade"),t.parent(".dropdown-menu")&&t.closest("li.dropdown").addClass("active"),r&&r()}var o=n.find("> .active"),a=r&&e.support.transition&&o.hasClass("fade");a?o.one(e.support.transition.end,i):i(),o.removeClass("in")}};var n=e.fn.tab;e.fn.tab=function(n){return this.each(function(){var r=e(this),i=r.data("tab");i||r.data("tab",i=new t(this)),"string"==typeof n&&i[n]()})},e.fn.tab.Constructor=t,e.fn.tab.noConflict=function(){return e.fn.tab=n,this},e(document).on("click.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(t){t.preventDefault(),e(this).tab("show")})}(window.jQuery),!function(e){var t=function(e,t){this.init("tooltip",e,t)};t.prototype={constructor:t,init:function(t,n,r){var i,o,a,s,l;for(this.type=t,this.$element=e(n),this.options=this.getOptions(r),this.enabled=!0,a=this.options.trigger.split(" "),l=a.length;l--;)s=a[l],"click"==s?this.$element.on("click."+this.type,this.options.selector,e.proxy(this.toggle,this)):"manual"!=s&&(i="hover"==s?"mouseenter":"focus",o="hover"==s?"mouseleave":"blur",this.$element.on(i+"."+this.type,this.options.selector,e.proxy(this.enter,this)),this.$element.on(o+"."+this.type,this.options.selector,e.proxy(this.leave,this)));this.options.selector?this._options=e.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(t){return t=e.extend({},e.fn[this.type].defaults,this.$element.data(),t),t.delay&&"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),t},enter:function(t){var n,r=e.fn[this.type].defaults,i={};return this._options&&e.each(this._options,function(e,t){r[e]!=t&&(i[e]=t)},this),n=e(t.currentTarget)[this.type](i).data(this.type),n.options.delay&&n.options.delay.show?(clearTimeout(this.timeout),n.hoverState="in",void(this.timeout=setTimeout(function(){"in"==n.hoverState&&n.show()},n.options.delay.show))):n.show()},leave:function(t){var n=e(t.currentTarget)[this.type](this._options).data(this.type);return this.timeout&&clearTimeout(this.timeout),n.options.delay&&n.options.delay.hide?(n.hoverState="out",void(this.timeout=setTimeout(function(){"out"==n.hoverState&&n.hide()},n.options.delay.hide))):n.hide()},show:function(){var t,n,r,i,o,a,s=e.Event("show");if(this.hasContent()&&this.enabled){if(this.$element.trigger(s),s.isDefaultPrevented())return;switch(t=this.tip(),this.setContent(),this.options.animation&&t.addClass("fade"),o="function"==typeof this.options.placement?this.options.placement.call(this,t[0],this.$element[0]):this.options.placement,t.detach().css({top:0,left:0,display:"block"}),this.options.container?t.appendTo(this.options.container):t.insertAfter(this.$element),n=this.getPosition(),r=t[0].offsetWidth,i=t[0].offsetHeight,o){case"bottom":a={top:n.top+n.height,left:n.left+n.width/2-r/2};break;case"top":a={top:n.top-i,left:n.left+n.width/2-r/2};break;case"left":a={top:n.top+n.height/2-i/2,left:n.left-r};break;case"right":a={top:n.top+n.height/2-i/2,left:n.left+n.width}}this.applyPlacement(a,o),this.$element.trigger("shown")}},applyPlacement:function(e,t){var n,r,i,o,a=this.tip(),s=a[0].offsetWidth,l=a[0].offsetHeight;a.offset(e).addClass(t).addClass("in"),n=a[0].offsetWidth,r=a[0].offsetHeight,"top"==t&&r!=l&&(e.top=e.top+l-r,o=!0),"bottom"==t||"top"==t?(i=0,e.left<0&&(i=e.left*-2,e.left=0,a.offset(e),n=a[0].offsetWidth,r=a[0].offsetHeight),this.replaceArrow(i-s+n,n,"left")):this.replaceArrow(r-l,r,"top"),o&&a.offset(e)},replaceArrow:function(e,t,n){this.arrow().css(n,e?50*(1-e/t)+"%":"")},setContent:function(){var e=this.tip(),t=this.getTitle();e.find(".tooltip-inner")[this.options.html?"html":"text"](t),e.removeClass("fade in top bottom left right")},hide:function(){function t(){var t=setTimeout(function(){n.off(e.support.transition.end).detach()},500);n.one(e.support.transition.end,function(){clearTimeout(t),n.detach()})}var n=this.tip(),r=e.Event("hide");if(this.$element.trigger(r),!r.isDefaultPrevented())return n.removeClass("in"),e.support.transition&&this.$tip.hasClass("fade")?t():n.detach(),this.$element.trigger("hidden"),this},fixTitle:function(){var e=this.$element;(e.attr("title")||"string"!=typeof e.attr("data-original-title"))&&e.attr("data-original-title",e.attr("title")||"").attr("title","")},hasContent:function(){return this.getTitle()},getPosition:function(){var t=this.$element[0];return e.extend({},"function"==typeof t.getBoundingClientRect?t.getBoundingClientRect():{width:t.offsetWidth,height:t.offsetHeight},this.$element.offset())},getTitle:function(){var e,t=this.$element,n=this.options;return e=t.attr("data-original-title")||("function"==typeof n.title?n.title.call(t[0]):n.title)},tip:function(){return this.$tip=this.$tip||e(this.options.template)},arrow:function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},validate:function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(t){var n=t?e(t.currentTarget)[this.type](this._options).data(this.type):this;n.tip().hasClass("in")?n.hide():n.show()},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}};var r=e.fn.tooltip;e.fn.tooltip=function(r){return this.each(function(){var i=e(this),o=i.data("tooltip"),a="object"==("undefined"==typeof r?"undefined":n(r))&&r;o||i.data("tooltip",o=new t(this,a)),"string"==typeof r&&o[r]()})},e.fn.tooltip.Constructor=t,e.fn.tooltip.defaults={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},e.fn.tooltip.noConflict=function(){return e.fn.tooltip=r,this}}(window.jQuery),!function(e){var t=function(e,t){this.init("popover",e,t)};t.prototype=e.extend({},e.fn.tooltip.Constructor.prototype,{constructor:t,setContent:function(){var e=this.tip(),t=this.getTitle(),n=this.getContent();e.find(".popover-title")[this.options.html?"html":"text"](t),e.find(".popover-content")[this.options.html?"html":"text"](n),e.removeClass("fade top bottom left right in")},hasContent:function(){return this.getTitle()||this.getContent()},getContent:function(){var e,t=this.$element,n=this.options;return e=("function"==typeof n.content?n.content.call(t[0]):n.content)||t.attr("data-content")},tip:function(){return this.$tip||(this.$tip=e(this.options.template)),this.$tip},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}});var r=e.fn.popover;e.fn.popover=function(r){return this.each(function(){var i=e(this),o=i.data("popover"),a="object"==("undefined"==typeof r?"undefined":n(r))&&r;o||i.data("popover",o=new t(this,a)),"string"==typeof r&&o[r]()})},e.fn.popover.Constructor=t,e.fn.popover.defaults=e.extend({},e.fn.tooltip.defaults,{placement:"right",trigger:"click",content:"",template:'<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),e.fn.popover.noConflict=function(){return e.fn.popover=r,this}}(window.jQuery),!function(e){var t=function(t,n){this.options=e.extend({},e.fn.affix.defaults,n),this.$window=e(window).on("scroll.affix.data-api",e.proxy(this.checkPosition,this)).on("click.affix.data-api",e.proxy(function(){setTimeout(e.proxy(this.checkPosition,this),1)},this)),this.$element=e(t),this.checkPosition()};t.prototype.checkPosition=function(){if(this.$element.is(":visible")){var t,r=e(document).height(),i=this.$window.scrollTop(),o=this.$element.offset(),a=this.options.offset,s=a.bottom,l=a.top,u="affix affix-top affix-bottom";"object"!=("undefined"==typeof a?"undefined":n(a))&&(s=l=a),"function"==typeof l&&(l=a.top()),"function"==typeof s&&(s=a.bottom()),t=!(null!=this.unpin&&i+this.unpin<=o.top)&&(null!=s&&o.top+this.$element.height()>=r-s?"bottom":null!=l&&i<=l&&"top"),this.affixed!==t&&(this.affixed=t,this.unpin="bottom"==t?o.top-i:null,this.$element.removeClass(u).addClass("affix"+(t?"-"+t:"")))}};var r=e.fn.affix;e.fn.affix=function(r){return this.each(function(){var i=e(this),o=i.data("affix"),a="object"==("undefined"==typeof r?"undefined":n(r))&&r;o||i.data("affix",o=new t(this,a)),
"string"==typeof r&&o[r]()})},e.fn.affix.Constructor=t,e.fn.affix.defaults={offset:0},e.fn.affix.noConflict=function(){return e.fn.affix=r,this},e(window).on("load",function(){e('[data-spy="affix"]').each(function(){var t=e(this),n=t.data();n.offset=n.offset||{},n.offsetBottom&&(n.offset.bottom=n.offsetBottom),n.offsetTop&&(n.offset.top=n.offsetTop),t.affix(n)})})}(window.jQuery),!function(e){var t='[data-dismiss="alert"]',n=function(n){e(n).on("click",t,this.close)};n.prototype.close=function(t){function n(){r.trigger("closed").remove()}var r,i=e(this),o=i.attr("data-target");o||(o=i.attr("href"),o=o&&o.replace(/.*(?=#[^\s]*$)/,"")),r=e(o),t&&t.preventDefault(),r.length||(r=i.hasClass("alert")?i:i.parent()),r.trigger(t=e.Event("close")),t.isDefaultPrevented()||(r.removeClass("in"),e.support.transition&&r.hasClass("fade")?r.on(e.support.transition.end,n):n())};var r=e.fn.alert;e.fn.alert=function(t){return this.each(function(){var r=e(this),i=r.data("alert");i||r.data("alert",i=new n(this)),"string"==typeof t&&i[t].call(r)})},e.fn.alert.Constructor=n,e.fn.alert.noConflict=function(){return e.fn.alert=r,this},e(document).on("click.alert.data-api",t,n.prototype.close)}(window.jQuery),!function(e){var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.button.defaults,n)};t.prototype.setState=function(e){var t="disabled",n=this.$element,r=n.data(),i=n.is("input")?"val":"html";e+="Text",r.resetText||n.data("resetText",n[i]()),n[i](r[e]||this.options[e]),setTimeout(function(){"loadingText"==e?n.addClass(t).attr(t,t):n.removeClass(t).removeAttr(t)},0)},t.prototype.toggle=function(){var e=this.$element.closest('[data-toggle="buttons-radio"]');e&&e.find(".active").removeClass("active"),this.$element.toggleClass("active")};var r=e.fn.button;e.fn.button=function(r){return this.each(function(){var i=e(this),o=i.data("button"),a="object"==("undefined"==typeof r?"undefined":n(r))&&r;o||i.data("button",o=new t(this,a)),"toggle"==r?o.toggle():r&&o.setState(r)})},e.fn.button.defaults={loadingText:"loading..."},e.fn.button.Constructor=t,e.fn.button.noConflict=function(){return e.fn.button=r,this},e(document).on("click.button.data-api","[data-toggle^=button]",function(t){var n=e(t.target);n.hasClass("btn")||(n=n.closest(".btn")),n.button("toggle")})}(window.jQuery),!function(e){var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.collapse.defaults,n),this.options.parent&&(this.$parent=e(this.options.parent)),this.options.toggle&&this.toggle()};t.prototype={constructor:t,dimension:function(){var e=this.$element.hasClass("width");return e?"width":"height"},show:function(){var t,n,r,i;if(!this.transitioning&&!this.$element.hasClass("in")){if(t=this.dimension(),n=e.camelCase(["scroll",t].join("-")),r=this.$parent&&this.$parent.find("> .accordion-group > .in"),r&&r.length){if(i=r.data("collapse"),i&&i.transitioning)return;r.collapse("hide"),i||r.data("collapse",null)}this.$element[t](0),this.transition("addClass",e.Event("show"),"shown"),e.support.transition&&this.$element[t](this.$element[0][n])}},hide:function(){var t;!this.transitioning&&this.$element.hasClass("in")&&(t=this.dimension(),this.reset(this.$element[t]()),this.transition("removeClass",e.Event("hide"),"hidden"),this.$element[t](0))},reset:function(e){var t=this.dimension();return this.$element.removeClass("collapse")[t](e||"auto")[0].offsetWidth,this.$element[null!==e?"addClass":"removeClass"]("collapse"),this},transition:function(t,n,r){var i=this,o=function(){"show"==n.type&&i.reset(),i.transitioning=0,i.$element.trigger(r)};this.$element.trigger(n),n.isDefaultPrevented()||(this.transitioning=1,this.$element[t]("in"),e.support.transition&&this.$element.hasClass("collapse")?this.$element.one(e.support.transition.end,o):o())},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}};var r=e.fn.collapse;e.fn.collapse=function(r){return this.each(function(){var i=e(this),o=i.data("collapse"),a=e.extend({},e.fn.collapse.defaults,i.data(),"object"==("undefined"==typeof r?"undefined":n(r))&&r);o||i.data("collapse",o=new t(this,a)),"string"==typeof r&&o[r]()})},e.fn.collapse.defaults={toggle:!0},e.fn.collapse.Constructor=t,e.fn.collapse.noConflict=function(){return e.fn.collapse=r,this},e(document).on("click.collapse.data-api","[data-toggle=collapse]",function(t){var n,r=e(this),i=r.attr("data-target")||t.preventDefault()||(n=r.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,""),o=e(i).data("collapse")?"toggle":r.data();r[e(i).hasClass("in")?"addClass":"removeClass"]("collapsed"),e(i).collapse(o)})}(window.jQuery),!function(e){var t=function(t,n){this.$element=e(t),this.$indicators=this.$element.find(".carousel-indicators"),this.options=n,"hover"==this.options.pause&&this.$element.on("mouseenter",e.proxy(this.pause,this)).on("mouseleave",e.proxy(this.cycle,this))};t.prototype={cycle:function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(e.proxy(this.next,this),this.options.interval)),this},getActiveIndex:function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},to:function(t){var n=this.getActiveIndex(),r=this;if(!(t>this.$items.length-1||t<0))return this.sliding?this.$element.one("slid",function(){r.to(t)}):n==t?this.pause().cycle():this.slide(t>n?"next":"prev",e(this.$items[t]))},pause:function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&e.support.transition.end&&(this.$element.trigger(e.support.transition.end),this.cycle(!0)),clearInterval(this.interval),this.interval=null,this},next:function(){if(!this.sliding)return this.slide("next")},prev:function(){if(!this.sliding)return this.slide("prev")},slide:function(t,n){var r,i=this.$element.find(".item.active"),o=n||i[t](),a=this.interval,s="next"==t?"left":"right",l="next"==t?"first":"last",u=this;if(this.sliding=!0,a&&this.pause(),o=o.length?o:this.$element.find(".item")[l](),r=e.Event("slide",{relatedTarget:o[0],direction:s}),!o.hasClass("active")){if(this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid",function(){var t=e(u.$indicators.children()[u.getActiveIndex()]);t&&t.addClass("active")})),e.support.transition&&this.$element.hasClass("slide")){if(this.$element.trigger(r),r.isDefaultPrevented())return;o.addClass(t),o[0].offsetWidth,i.addClass(s),o.addClass(s),this.$element.one(e.support.transition.end,function(){o.removeClass([t,s].join(" ")).addClass("active"),i.removeClass(["active",s].join(" ")),u.sliding=!1,setTimeout(function(){u.$element.trigger("slid")},0)})}else{if(this.$element.trigger(r),r.isDefaultPrevented())return;i.removeClass("active"),o.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return a&&this.cycle(),this}}};var r=e.fn.carousel;e.fn.carousel=function(r){return this.each(function(){var i=e(this),o=i.data("carousel"),a=e.extend({},e.fn.carousel.defaults,"object"==("undefined"==typeof r?"undefined":n(r))&&r),s="string"==typeof r?r:a.slide;o||i.data("carousel",o=new t(this,a)),"number"==typeof r?o.to(r):s?o[s]():a.interval&&o.pause().cycle()})},e.fn.carousel.defaults={interval:5e3,pause:"hover"},e.fn.carousel.Constructor=t,e.fn.carousel.noConflict=function(){return e.fn.carousel=r,this},e(document).on("click.carousel.data-api","[data-slide], [data-slide-to]",function(t){var n,r,i=e(this),o=e(i.attr("data-target")||(n=i.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,"")),a=e.extend({},o.data(),i.data());o.carousel(a),(r=i.attr("data-slide-to"))&&o.data("carousel").pause().to(r).cycle(),t.preventDefault()})}(window.jQuery),!function(e){var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.typeahead.defaults,n),this.matcher=this.options.matcher||this.matcher,this.sorter=this.options.sorter||this.sorter,this.highlighter=this.options.highlighter||this.highlighter,this.updater=this.options.updater||this.updater,this.source=this.options.source,this.$menu=e(this.options.menu),this.shown=!1,this.listen()};t.prototype={constructor:t,select:function(){var e=this.$menu.find(".active").attr("data-value");return this.$element.val(this.updater(e)).change(),this.hide()},updater:function(e){return e},show:function(){var t=e.extend({},this.$element.position(),{height:this.$element[0].offsetHeight});return this.$menu.insertAfter(this.$element).css({top:t.top+t.height,left:t.left}).show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},lookup:function(t){var n;return this.query=this.$element.val(),!this.query||this.query.length<this.options.minLength?this.shown?this.hide():this:(n=e.isFunction(this.source)?this.source(this.query,e.proxy(this.process,this)):this.source,n?this.process(n):this)},process:function(t){var n=this;return t=e.grep(t,function(e){return n.matcher(e)}),t=this.sorter(t),t.length?this.render(t.slice(0,this.options.items)).show():this.shown?this.hide():this},matcher:function(e){return~e.toLowerCase().indexOf(this.query.toLowerCase())},sorter:function(e){for(var t,n=[],r=[],i=[];t=e.shift();)t.toLowerCase().indexOf(this.query.toLowerCase())?~t.indexOf(this.query)?r.push(t):i.push(t):n.push(t);return n.concat(r,i)},highlighter:function(e){var t=this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&");return e.replace(new RegExp("("+t+")","ig"),function(e,t){return"<strong>"+t+"</strong>"})},render:function(t){var n=this;return t=e(t).map(function(t,r){return t=e(n.options.item).attr("data-value",r),t.find("a").html(n.highlighter(r)),t[0]}),t.first().addClass("active"),this.$menu.html(t),this},next:function i(t){var n=this.$menu.find(".active").removeClass("active"),i=n.next();i.length||(i=e(this.$menu.find("li")[0])),i.addClass("active")},prev:function o(e){var t=this.$menu.find(".active").removeClass("active"),o=t.prev();o.length||(o=this.$menu.find("li").last()),o.addClass("active")},listen:function(){this.$element.on("focus",e.proxy(this.focus,this)).on("blur",e.proxy(this.blur,this)).on("keypress",e.proxy(this.keypress,this)).on("keyup",e.proxy(this.keyup,this)),this.eventSupported("keydown")&&this.$element.on("keydown",e.proxy(this.keydown,this)),this.$menu.on("click",e.proxy(this.click,this)).on("mouseenter","li",e.proxy(this.mouseenter,this)).on("mouseleave","li",e.proxy(this.mouseleave,this))},eventSupported:function(e){var t=e in this.$element;return t||(this.$element.setAttribute(e,"return;"),t="function"==typeof this.$element[e]),t},move:function(e){if(this.shown){switch(e.keyCode){case 9:case 13:case 27:e.preventDefault();break;case 38:e.preventDefault(),this.prev();break;case 40:e.preventDefault(),this.next()}e.stopPropagation()}},keydown:function(t){this.suppressKeyPressRepeat=~e.inArray(t.keyCode,[40,38,9,13,27]),this.move(t)},keypress:function(e){this.suppressKeyPressRepeat||this.move(e)},keyup:function(e){switch(e.keyCode){case 40:case 38:case 16:case 17:case 18:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.lookup()}e.stopPropagation(),e.preventDefault()},focus:function(e){this.focused=!0},blur:function(e){this.focused=!1,!this.mousedover&&this.shown&&this.hide()},click:function(e){e.stopPropagation(),e.preventDefault(),this.select(),this.$element.focus()},mouseenter:function(t){this.mousedover=!0,this.$menu.find(".active").removeClass("active"),e(t.currentTarget).addClass("active")},mouseleave:function(e){this.mousedover=!1,!this.focused&&this.shown&&this.hide()}};var r=e.fn.typeahead;e.fn.typeahead=function(r){return this.each(function(){var i=e(this),o=i.data("typeahead"),a="object"==("undefined"==typeof r?"undefined":n(r))&&r;o||i.data("typeahead",o=new t(this,a)),"string"==typeof r&&o[r]()})},e.fn.typeahead.defaults={source:[],items:8,menu:'<ul class="typeahead dropdown-menu"></ul>',item:'<li><a href="#"></a></li>',minLength:1},e.fn.typeahead.Constructor=t,e.fn.typeahead.noConflict=function(){return e.fn.typeahead=r,this},e(document).on("focus.typeahead.data-api",'[data-provide="typeahead"]',function(t){var n=e(this);n.data("typeahead")||n.typeahead(n.data())})}(window.jQuery)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(95),o=r(i),a=n(96),s=r(a),l=n(97),u=(r(l),n(98)),c=r(u),d={};d.removeSpecialCharacters=s["default"].removeSpecialCharacters,d.safeURL=s["default"].safeURLName,d.imageUrl=function(e){return e},d.getDocUrl=function(e){return _.has(o["default"].DOC_URLS,e)?o["default"].DOC_URLS[e]:"#"},d.formatSize=function(e){var t=arguments.length<=1||void 0===arguments[1]?1:arguments[1],n=512;if(e<n)return e+" bytes";for(var r=["KB","MB","GB","TB","PB","EB","ZB","YB"],i=0;e>=n&&i<r.length;)i+=1,e/=1024;return e.toFixed(t)+" "+r[i-1]},d.formatDate=function(e){return(0,c["default"])(e,"X").format("MMM Do, h:mm:ss a")},d.getDateFromNow=function(e){return(0,c["default"])(e,"X").fromNow()},t["default"]=d},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]={MISC:{TRAY_TOGGLE_SPEED:250,DEFAULT_PAGE_SIZE:20,MODAL_BACKDROP_Z_INDEX:1025},DATABASES:{DOCUMENT_LIMIT:100},EVENTS:{TRAY_OPENED:"tray:opened",NAVBAR_SIZE_CHANGED:"navbar:size_changed"},DOC_URLS:{GENERAL:"/_utils/docs/intro/api.html#documents",ALL_DBS:"/_utils/docs/api/server/common.html?highlight=all_dbs#get--_all_dbs",REPLICATION:"/_utils/docs/replication/replicator.html#basics",DESIGN_DOCS:"/_utils/docs/couchapp/ddocs.html#design-docs",DESIGN_DOC_METADATA:"/_utils/docs/api/ddoc/common.html#api-ddoc-view-index-info",VIEW_FUNCS:"/_utils/docs/couchapp/ddocs.html#view-functions",MAP_FUNCS:"/_utils/docs/couchapp/ddocs.html#map-functions",REDUCE_FUNCS:"/_utils/docs/couchapp/ddocs.html#reduce-and-rereduce-functions",API_REF:"/_utils/docs/http-api.html",DB_PERMISSION:"/_utils/docs/api/database/security.html#db-security",STATS:"/_utils/docs/api/server/common.html?highlight=stats#get--_stats",ACTIVE_TASKS:"/_utils/docs/api/server/common.html?highlight=stats#active-tasks",LOG:"/_utils/docs/api/server/common.html?highlight=stats#log",CONFIG:"/_utils/docs/config/index.html",VIEWS:"/_utils/docs/intro/overview.html#views",MANGO_INDEX:"/_utils/docs/intro/api.html#documents",MANGO_SEARCH:"/_utils/docs/intro/api.html#documents",CHANGES:"/_utils/docs/api/database/changes.html?highlight=changes#post--db-_changes"},LOCAL_STORAGE:{SIDEBAR_MINIMIZED:"sidebar-minimized"}}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(86),o=r(i),a=n(89),s=r(a),l={getParams:function(e){e&&("?"===e.substring(0,1)?e=e.substring(1):e.indexOf("?")>-1&&(e=e.split("?")[1]));var t=window.location.hash.split("?")[1];e=e||t||window.location.search.substring(1);var n,r={},i=/\+/g,o=/([^&=]+)=?([^&]*)/g,a=function(e){return decodeURIComponent(e.replace(i," "))},s=e;if(e)for(;n=o.exec(s);)r[a(n[1])]=a(n[2]);return r},replaceQueryParams:function(e){var t=window.location.hash.replace(/\?.*$/,"");return s["default"].isEmpty(e)||(t=t+"?"+o["default"].param(e)),t},removeSpecialCharacters:function(e){return e.replace(/[^\w\s]/gi,"")},safeURLName:function(e){var t=e||"",n=t.match(/[\$\-\/,+-]/g);return null!==n?encodeURIComponent(e):e},getDocTypeFromId:function(e){return e&&/^_design\//.test(e)?"design doc":"doc"},isSystemDatabase:function(e){return/^_/.test(e)},getSafeIdForDoc:function(e){if("design doc"===l.getDocTypeFromId(e)){var t=e.replace(/^_design\//,"");return"_design/"+l.safeURLName(t)}return l.safeURLName(e)},localStorageSet:function(e,t){(s["default"].isObject(t)||s["default"].isArray(t))&&(t=JSON.stringify(t));var n=!0;try{window.localStorage.setItem(e,t)}catch(r){n=!1}return n},localStorageGet:function(e){var t;if(s["default"].has(window.localStorage,e)){t=window.localStorage[e];try{return JSON.parse(t)}catch(n){return t}}return t},stripHTML:function(e){var t=document.createElement("div");return t.innerHTML=e,t.textContent||t.innerText}};t["default"]=l},function(e,t,n){var r,i;!function(){function o(e){return e&&(e.ownerDocument||e.document||e).documentElement}function a(e){return e&&(e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView)}function s(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function l(e){return null===e?NaN:+e}function u(e){return!isNaN(e)}function c(e){return{left:function(t,n,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=t.length);r<i;){var o=r+i>>>1;e(t[o],n)<0?r=o+1:i=o}return r},right:function(t,n,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=t.length);r<i;){var o=r+i>>>1;e(t[o],n)>0?i=o:r=o+1}return r}}}function d(e){return e.length}function f(e){for(var t=1;e*t%1;)t*=10;return t}function p(e,t){for(var n in t)Object.defineProperty(e.prototype,n,{value:t[n],enumerable:!1})}function h(){this._=Object.create(null)}function g(e){return(e+="")===Sa||e[0]===Aa?Aa+e:e}function m(e){return(e+="")[0]===Aa?e.slice(1):e}function v(e){return g(e)in this._}function b(e){return(e=g(e))in this._&&delete this._[e]}function y(){var e=[];for(var t in this._)e.push(m(t));return e}function w(){var e=0;for(var t in this._)++e;return e}function x(){for(var e in this._)return!1;return!0}function _(){this._=Object.create(null)}function E(e){return e}function C(e,t,n){return function(){var r=n.apply(t,arguments);return r===t?e:r}}function k(e,t){if(t in e)return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var n=0,r=Ta.length;n<r;++n){var i=Ta[n]+t;if(i in e)return i}}function S(){}function A(){}function T(e){function t(){for(var t,r=n,i=-1,o=r.length;++i<o;)(t=r[i].on)&&t.apply(this,arguments);return e}var n=[],r=new h;return t.on=function(t,i){var o,a=r.get(t);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(t)),i&&n.push(r.set(t,{on:i})),e)},t}function D(){pa.event.preventDefault()}function N(){for(var e,t=pa.event;e=t.sourceEvent;)t=e;return t}function F(e){for(var t=new A,n=0,r=arguments.length;++n<r;)t[arguments[n]]=T(t);return t.of=function(n,r){return function(i){try{var o=i.sourceEvent=pa.event;i.target=e,pa.event=i,t[i.type].apply(n,r)}finally{pa.event=o}}},t}function M(e){return Na(e,La),e}function O(e){return"function"==typeof e?e:function(){return Fa(e,this)}}function L(e){return"function"==typeof e?e:function(){return Ma(e,this)}}function P(e,t){function n(){this.removeAttribute(e)}function r(){this.removeAttributeNS(e.space,e.local)}function i(){this.setAttribute(e,t)}function o(){this.setAttributeNS(e.space,e.local,t)}function a(){var n=t.apply(this,arguments);null==n?this.removeAttribute(e):this.setAttribute(e,n)}function s(){var n=t.apply(this,arguments);null==n?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}return e=pa.ns.qualify(e),null==t?e.local?r:n:"function"==typeof t?e.local?s:a:e.local?o:i}function I(e){return e.trim().replace(/\s+/g," ")}function R(e){return new RegExp("(?:^|\\s+)"+pa.requote(e)+"(?:\\s+|$)","g")}function B(e){return(e+"").trim().split(/^|\s+/)}function j(e,t){function n(){for(var n=-1;++n<i;)e[n](this,t)}function r(){for(var n=-1,r=t.apply(this,arguments);++n<i;)e[n](this,r)}e=B(e).map($);var i=e.length;return"function"==typeof t?r:n}function $(e){var t=R(e);return function(n,r){if(i=n.classList)return r?i.add(e):i.remove(e);var i=n.getAttribute("class")||"";r?(t.lastIndex=0,t.test(i)||n.setAttribute("class",I(i+" "+e))):n.setAttribute("class",I(i.replace(t," ")))}}function V(e,t,n){function r(){this.style.removeProperty(e)}function i(){this.style.setProperty(e,t,n)}function o(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(e):this.style.setProperty(e,r,n)}return null==t?r:"function"==typeof t?o:i}function U(e,t){function n(){delete this[e]}function r(){this[e]=t}function i(){var n=t.apply(this,arguments);null==n?delete this[e]:this[e]=n}return null==t?n:"function"==typeof t?i:r}function W(e){function t(){var t=this.ownerDocument,n=this.namespaceURI;return n===Pa&&t.documentElement.namespaceURI===Pa?t.createElement(e):t.createElementNS(n,e)}function n(){return this.ownerDocument.createElementNS(e.space,e.local)}return"function"==typeof e?e:(e=pa.ns.qualify(e)).local?n:t}function q(){var e=this.parentNode;e&&e.removeChild(this)}function H(e){return{__data__:e}}function z(e){return function(){return Oa(this,e)}}function G(e){return arguments.length||(e=s),function(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}}function K(e,t){for(var n=0,r=e.length;n<r;n++)for(var i,o=e[n],a=0,s=o.length;a<s;a++)(i=o[a])&&t(i,a,n);return e}function Y(e){return Na(e,Ra),e}function X(e){var t,n;return function(r,i,o){var a,s=e[o].update,l=s.length;for(o!=n&&(n=o,t=0),i>=t&&(t=i+1);!(a=s[t])&&++t<l;);return a}}function Q(e,t,n){function r(){var t=this[a];t&&(this.removeEventListener(e,t,t.$),delete this[a])}function i(){var i=l(t,ga(arguments));r.call(this),this.addEventListener(e,this[a]=i,i.$=n),i._=t}function o(){var t,n=new RegExp("^__on([^.]+)"+pa.requote(e)+"$");for(var r in this)if(t=r.match(n)){var i=this[r];this.removeEventListener(t[1],i,i.$),delete this[r]}}var a="__on"+e,s=e.indexOf("."),l=J;s>0&&(e=e.slice(0,s));var u=Ba.get(e);return u&&(e=u,l=Z),s?t?i:r:t?S:o}function J(e,t){return function(n){var r=pa.event;pa.event=n,t[0]=this.__data__;try{e.apply(this,t)}finally{pa.event=r}}}function Z(e,t){var n=J(e,t);return function(e){var t=this,r=e.relatedTarget;r&&(r===t||8&r.compareDocumentPosition(t))||n.call(t,e)}}function ee(e){var t=".dragsuppress-"+ ++$a,n="click"+t,r=pa.select(a(e)).on("touchmove"+t,D).on("dragstart"+t,D).on("selectstart"+t,D);if(null==ja&&(ja=!("onselectstart"in e)&&k(e.style,"userSelect")),ja){var i=o(e).style,s=i[ja];i[ja]="none"}return function(e){if(r.on(t,null),ja&&(i[ja]=s),e){var o=function(){r.on(n,null)};r.on(n,function(){D(),o()},!0),setTimeout(o,0)}}}function te(e,t){t.changedTouches&&(t=t.changedTouches[0]);var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();if(Va<0){var i=a(e);if(i.scrollX||i.scrollY){n=pa.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var o=n[0][0].getScreenCTM();Va=!(o.f||o.e),n.remove()}}return Va?(r.x=t.pageX,r.y=t.pageY):(r.x=t.clientX,r.y=t.clientY),r=r.matrixTransform(e.getScreenCTM().inverse()),[r.x,r.y]}var s=e.getBoundingClientRect();return[t.clientX-s.left-e.clientLeft,t.clientY-s.top-e.clientTop]}function ne(){return pa.event.changedTouches[0].identifier}function re(e){return e>0?1:e<0?-1:0}function ie(e,t,n){return(t[0]-e[0])*(n[1]-e[1])-(t[1]-e[1])*(n[0]-e[0])}function oe(e){return e>1?0:e<-1?qa:Math.acos(e)}function ae(e){return e>1?Ga:e<-1?-Ga:Math.asin(e)}function se(e){return((e=Math.exp(e))-1/e)/2}function le(e){return((e=Math.exp(e))+1/e)/2}function ue(e){return((e=Math.exp(2*e))-1)/(e+1)}function ce(e){return(e=Math.sin(e/2))*e}function de(){}function fe(e,t,n){return this instanceof fe?(this.h=+e,this.s=+t,void(this.l=+n)):arguments.length<2?e instanceof fe?new fe(e.h,e.s,e.l):Se(""+e,Ae,fe):new fe(e,t,n)}function pe(e,t,n){function r(e){return e>360?e-=360:e<0&&(e+=360),e<60?o+(a-o)*e/60:e<180?a:e<240?o+(a-o)*(240-e)/60:o}function i(e){return Math.round(255*r(e))}var o,a;return e=isNaN(e)?0:(e%=360)<0?e+360:e,t=isNaN(t)?0:t<0?0:t>1?1:t,n=n<0?0:n>1?1:n,a=n<=.5?n*(1+t):n+t-n*t,o=2*n-a,new _e(i(e+120),i(e),i(e-120))}function he(e,t,n){return this instanceof he?(this.h=+e,this.c=+t,void(this.l=+n)):arguments.length<2?e instanceof he?new he(e.h,e.c,e.l):e instanceof me?be(e.l,e.a,e.b):be((e=Te((e=pa.rgb(e)).r,e.g,e.b)).l,e.a,e.b):new he(e,t,n)}function ge(e,t,n){return isNaN(e)&&(e=0),isNaN(t)&&(t=0),new me(n,Math.cos(e*=Ka)*t,Math.sin(e)*t)}function me(e,t,n){return this instanceof me?(this.l=+e,this.a=+t,void(this.b=+n)):arguments.length<2?e instanceof me?new me(e.l,e.a,e.b):e instanceof he?ge(e.h,e.c,e.l):Te((e=_e(e)).r,e.g,e.b):new me(e,t,n)}function ve(e,t,n){var r=(e+16)/116,i=r+t/500,o=r-n/200;return i=ye(i)*os,r=ye(r)*as,o=ye(o)*ss,new _e(xe(3.2404542*i-1.5371385*r-.4985314*o),xe(-.969266*i+1.8760108*r+.041556*o),xe(.0556434*i-.2040259*r+1.0572252*o))}function be(e,t,n){return e>0?new he(Math.atan2(n,t)*Ya,Math.sqrt(t*t+n*n),e):new he(NaN,NaN,e)}function ye(e){return e>.206893034?e*e*e:(e-4/29)/7.787037}function we(e){return e>.008856?Math.pow(e,1/3):7.787037*e+4/29}function xe(e){return Math.round(255*(e<=.00304?12.92*e:1.055*Math.pow(e,1/2.4)-.055))}function _e(e,t,n){return this instanceof _e?(this.r=~~e,this.g=~~t,void(this.b=~~n)):arguments.length<2?e instanceof _e?new _e(e.r,e.g,e.b):Se(""+e,_e,pe):new _e(e,t,n)}function Ee(e){return new _e(e>>16,e>>8&255,255&e)}function Ce(e){return Ee(e)+""}function ke(e){return e<16?"0"+Math.max(0,e).toString(16):Math.min(255,e).toString(16)}function Se(e,t,n){var r,i,o,a=0,s=0,l=0;if(r=/([a-z]+)\((.*)\)/.exec(e=e.toLowerCase()))switch(i=r[2].split(","),r[1]){case"hsl":return n(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100);case"rgb":return t(Ne(i[0]),Ne(i[1]),Ne(i[2]))}return(o=cs.get(e))?t(o.r,o.g,o.b):(null==e||"#"!==e.charAt(0)||isNaN(o=parseInt(e.slice(1),16))||(4===e.length?(a=(3840&o)>>4,a=a>>4|a,s=240&o,s=s>>4|s,l=15&o,l=l<<4|l):7===e.length&&(a=(16711680&o)>>16,s=(65280&o)>>8,l=255&o)),t(a,s,l))}function Ae(e,t,n){var r,i,o=Math.min(e/=255,t/=255,n/=255),a=Math.max(e,t,n),s=a-o,l=(a+o)/2;return s?(i=l<.5?s/(a+o):s/(2-a-o),r=e==a?(t-n)/s+(t<n?6:0):t==a?(n-e)/s+2:(e-t)/s+4,r*=60):(r=NaN,i=l>0&&l<1?0:r),new fe(r,i,l)}function Te(e,t,n){e=De(e),t=De(t),n=De(n);var r=we((.4124564*e+.3575761*t+.1804375*n)/os),i=we((.2126729*e+.7151522*t+.072175*n)/as),o=we((.0193339*e+.119192*t+.9503041*n)/ss);return me(116*i-16,500*(r-i),200*(i-o))}function De(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Ne(e){var t=parseFloat(e);return"%"===e.charAt(e.length-1)?Math.round(2.55*t):t}function Fe(e){return"function"==typeof e?e:function(){return e}}function Me(e){return function(t,n,r){return 2===arguments.length&&"function"==typeof n&&(r=n,n=null),Oe(t,n,e,r)}}function Oe(e,t,n,r){function i(){var e,t=l.status;if(!t&&Pe(l)||t>=200&&t<300||304===t){try{e=n.call(o,l)}catch(r){return void a.error.call(o,r)}a.load.call(o,e)}else a.error.call(o,l)}var o={},a=pa.dispatch("beforesend","progress","load","error"),s={},l=new XMLHttpRequest,u=null;return!this.XDomainRequest||"withCredentials"in l||!/^(http(s)?:)?\/\//.test(e)||(l=new XDomainRequest),"onload"in l?l.onload=l.onerror=i:l.onreadystatechange=function(){l.readyState>3&&i()},l.onprogress=function(e){var t=pa.event;pa.event=e;try{a.progress.call(o,l)}finally{pa.event=t}},o.header=function(e,t){return e=(e+"").toLowerCase(),arguments.length<2?s[e]:(null==t?delete s[e]:s[e]=t+"",o)},o.mimeType=function(e){return arguments.length?(t=null==e?null:e+"",o):t},o.responseType=function(e){return arguments.length?(u=e,o):u},o.response=function(e){return n=e,o},["get","post"].forEach(function(e){o[e]=function(){return o.send.apply(o,[e].concat(ga(arguments)))}}),o.send=function(n,r,i){if(2===arguments.length&&"function"==typeof r&&(i=r,r=null),l.open(n,e,!0),null==t||"accept"in s||(s.accept=t+",*/*"),l.setRequestHeader)for(var c in s)l.setRequestHeader(c,s[c]);return null!=t&&l.overrideMimeType&&l.overrideMimeType(t),null!=u&&(l.responseType=u),null!=i&&o.on("error",i).on("load",function(e){i(null,e)}),a.beforesend.call(o,l),l.send(null==r?null:r),o},o.abort=function(){return l.abort(),o},pa.rebind(o,a,"on"),null==r?o:o.get(Le(r))}function Le(e){return 1===e.length?function(t,n){e(null==t?n:null)}:e}function Pe(e){var t=e.responseType;return t&&"text"!==t?e.response:e.responseText}function Ie(e,t,n){var r=arguments.length;r<2&&(t=0),r<3&&(n=Date.now());var i=n+t,o={c:e,t:i,n:null};return fs?fs.n=o:ds=o,fs=o,ps||(hs=clearTimeout(hs),ps=1,gs(Re)),o}function Re(){var e=Be(),t=je()-e;t>24?(isFinite(t)&&(clearTimeout(hs),hs=setTimeout(Re,t)),ps=0):(ps=1,gs(Re))}function Be(){for(var e=Date.now(),t=ds;t;)e>=t.t&&t.c(e-t.t)&&(t.c=null),t=t.n;return e}function je(){for(var e,t=ds,n=1/0;t;)t.c?(t.t<n&&(n=t.t),t=(e=t).n):t=e?e.n=t.n:ds=t.n;return fs=e,n}function $e(e,t){return t-(e?Math.ceil(Math.log(e)/Math.LN10):1)}function Ve(e,t){var n=Math.pow(10,3*ka(8-t));return{scale:t>8?function(e){return e/n}:function(e){return e*n},symbol:e}}function Ue(e){var t=e.decimal,n=e.thousands,r=e.grouping,i=e.currency,o=r&&n?function(e,t){for(var i=e.length,o=[],a=0,s=r[0],l=0;i>0&&s>0&&(l+s+1>t&&(s=Math.max(1,t-l)),o.push(e.substring(i-=s,i+s)),!((l+=s+1)>t));)s=r[a=(a+1)%r.length];return o.reverse().join(n)}:E;return function(e){var n=vs.exec(e),r=n[1]||" ",a=n[2]||">",s=n[3]||"-",l=n[4]||"",u=n[5],c=+n[6],d=n[7],f=n[8],p=n[9],h=1,g="",m="",v=!1,b=!0;switch(f&&(f=+f.substring(1)),(u||"0"===r&&"="===a)&&(u=r="0",a="="),p){case"n":d=!0,p="g";break;case"%":h=100,m="%",p="f";break;case"p":h=100,m="%",p="r";break;case"b":case"o":case"x":case"X":"#"===l&&(g="0"+p.toLowerCase());case"c":b=!1;case"d":v=!0,f=0;break;case"s":h=-1,p="r"}"$"===l&&(g=i[0],m=i[1]),"r"!=p||f||(p="g"),null!=f&&("g"==p?f=Math.max(1,Math.min(21,f)):"e"!=p&&"f"!=p||(f=Math.max(0,Math.min(20,f)))),p=bs.get(p)||We;var y=u&&d;return function(e){var n=m;if(v&&e%1)return"";var i=e<0||0===e&&1/e<0?(e=-e,"-"):"-"===s?"":s;if(h<0){var l=pa.formatPrefix(e,f);e=l.scale(e),n=l.symbol+m}else e*=h;e=p(e,f);var w,x,_=e.lastIndexOf(".");if(_<0){var E=b?e.lastIndexOf("e"):-1;E<0?(w=e,x=""):(w=e.substring(0,E),x=e.substring(E))}else w=e.substring(0,_),x=t+e.substring(_+1);!u&&d&&(w=o(w,1/0));var C=g.length+w.length+x.length+(y?0:i.length),k=C<c?new Array(C=c-C+1).join(r):"";return y&&(w=o(k+w,k.length?c-x.length:1/0)),i+=g,e=w+x,("<"===a?i+e+k:">"===a?k+i+e:"^"===a?k.substring(0,C>>=1)+i+e+k.substring(C):i+(y?e:k+e))+n}}}function We(e){return e+""}function qe(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function He(e,t,n){function r(t){var n=e(t),r=o(n,1);return t-n<r-t?n:r}function i(n){return t(n=e(new ws(n-1)),1),n}function o(e,n){return t(e=new ws((+e)),n),e}function a(e,r,o){var a=i(e),s=[];if(o>1)for(;a<r;)n(a)%o||s.push(new Date((+a))),t(a,1);else for(;a<r;)s.push(new Date((+a))),t(a,1);return s}function s(e,t,n){try{ws=qe;var r=new qe;return r._=e,a(r,t,n)}finally{ws=Date}}e.floor=e,e.round=r,e.ceil=i,e.offset=o,e.range=a;var l=e.utc=ze(e);return l.floor=l,l.round=ze(r),l.ceil=ze(i),l.offset=ze(o),l.range=s,e}function ze(e){return function(t,n){try{ws=qe;var r=new qe;return r._=t,e(r,n)._}finally{ws=Date}}}function Ge(e){function t(e){function t(t){for(var n,i,o,a=[],s=-1,l=0;++s<r;)37===e.charCodeAt(s)&&(a.push(e.slice(l,s)),null!=(i=_s[n=e.charAt(++s)])&&(n=e.charAt(++s)),(o=T[n])&&(n=o(t,null==i?"e"===n?" ":"0":i)),a.push(n),l=s+1);return a.push(e.slice(l,s)),a.join("")}var r=e.length;return t.parse=function(t){var r={y:1900,m:0,d:1,H:0,M:0,S:0,L:0,Z:null},i=n(r,e,t,0);if(i!=t.length)return null;"p"in r&&(r.H=r.H%12+12*r.p);var o=null!=r.Z&&ws!==qe,a=new(o?qe:ws);return"j"in r?a.setFullYear(r.y,0,r.j):"W"in r||"U"in r?("w"in r||(r.w="W"in r?1:0),a.setFullYear(r.y,0,1),a.setFullYear(r.y,0,"W"in r?(r.w+6)%7+7*r.W-(a.getDay()+5)%7:r.w+7*r.U-(a.getDay()+6)%7)):a.setFullYear(r.y,r.m,r.d),a.setHours(r.H+(r.Z/100|0),r.M+r.Z%100,r.S,r.L),o?a._:a},t.toString=function(){return e},t}function n(e,t,n,r){for(var i,o,a,s=0,l=t.length,u=n.length;s<l;){if(r>=u)return-1;if(i=t.charCodeAt(s++),37===i){if(a=t.charAt(s++),o=D[a in _s?t.charAt(s++):a],!o||(r=o(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}function r(e,t,n){_.lastIndex=0;var r=_.exec(t.slice(n));return r?(e.w=E.get(r[0].toLowerCase()),n+r[0].length):-1}function i(e,t,n){w.lastIndex=0;var r=w.exec(t.slice(n));return r?(e.w=x.get(r[0].toLowerCase()),n+r[0].length):-1}function o(e,t,n){S.lastIndex=0;var r=S.exec(t.slice(n));return r?(e.m=A.get(r[0].toLowerCase()),n+r[0].length):-1}function a(e,t,n){C.lastIndex=0;var r=C.exec(t.slice(n));return r?(e.m=k.get(r[0].toLowerCase()),n+r[0].length):-1}function s(e,t,r){return n(e,T.c.toString(),t,r);
}function l(e,t,r){return n(e,T.x.toString(),t,r)}function u(e,t,r){return n(e,T.X.toString(),t,r)}function c(e,t,n){var r=y.get(t.slice(n,n+=2).toLowerCase());return null==r?-1:(e.p=r,n)}var d=e.dateTime,f=e.date,p=e.time,h=e.periods,g=e.days,m=e.shortDays,v=e.months,b=e.shortMonths;t.utc=function(e){function n(e){try{ws=qe;var t=new ws;return t._=e,r(t)}finally{ws=Date}}var r=t(e);return n.parse=function(e){try{ws=qe;var t=r.parse(e);return t&&t._}finally{ws=Date}},n.toString=r.toString,n},t.multi=t.utc.multi=pt;var y=pa.map(),w=Ye(g),x=Xe(g),_=Ye(m),E=Xe(m),C=Ye(v),k=Xe(v),S=Ye(b),A=Xe(b);h.forEach(function(e,t){y.set(e.toLowerCase(),t)});var T={a:function(e){return m[e.getDay()]},A:function(e){return g[e.getDay()]},b:function(e){return b[e.getMonth()]},B:function(e){return v[e.getMonth()]},c:t(d),d:function(e,t){return Ke(e.getDate(),t,2)},e:function(e,t){return Ke(e.getDate(),t,2)},H:function(e,t){return Ke(e.getHours(),t,2)},I:function(e,t){return Ke(e.getHours()%12||12,t,2)},j:function(e,t){return Ke(1+ys.dayOfYear(e),t,3)},L:function(e,t){return Ke(e.getMilliseconds(),t,3)},m:function(e,t){return Ke(e.getMonth()+1,t,2)},M:function(e,t){return Ke(e.getMinutes(),t,2)},p:function(e){return h[+(e.getHours()>=12)]},S:function(e,t){return Ke(e.getSeconds(),t,2)},U:function(e,t){return Ke(ys.sundayOfYear(e),t,2)},w:function(e){return e.getDay()},W:function(e,t){return Ke(ys.mondayOfYear(e),t,2)},x:t(f),X:t(p),y:function(e,t){return Ke(e.getFullYear()%100,t,2)},Y:function(e,t){return Ke(e.getFullYear()%1e4,t,4)},Z:dt,"%":function(){return"%"}},D={a:r,A:i,b:o,B:a,c:s,d:ot,e:ot,H:st,I:st,j:at,L:ct,m:it,M:lt,p:c,S:ut,U:Je,w:Qe,W:Ze,x:l,X:u,y:tt,Y:et,Z:nt,"%":ft};return t}function Ke(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(t)+i:i)}function Ye(e){return new RegExp("^(?:"+e.map(pa.requote).join("|")+")","i")}function Xe(e){for(var t=new h,n=-1,r=e.length;++n<r;)t.set(e[n].toLowerCase(),n);return t}function Qe(e,t,n){Es.lastIndex=0;var r=Es.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Je(e,t,n){Es.lastIndex=0;var r=Es.exec(t.slice(n));return r?(e.U=+r[0],n+r[0].length):-1}function Ze(e,t,n){Es.lastIndex=0;var r=Es.exec(t.slice(n));return r?(e.W=+r[0],n+r[0].length):-1}function et(e,t,n){Es.lastIndex=0;var r=Es.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function tt(e,t,n){Es.lastIndex=0;var r=Es.exec(t.slice(n,n+2));return r?(e.y=rt(+r[0]),n+r[0].length):-1}function nt(e,t,n){return/^[+-]\d{4}$/.test(t=t.slice(n,n+5))?(e.Z=-t,n+5):-1}function rt(e){return e+(e>68?1900:2e3)}function it(e,t,n){Es.lastIndex=0;var r=Es.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function ot(e,t,n){Es.lastIndex=0;var r=Es.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function at(e,t,n){Es.lastIndex=0;var r=Es.exec(t.slice(n,n+3));return r?(e.j=+r[0],n+r[0].length):-1}function st(e,t,n){Es.lastIndex=0;var r=Es.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function lt(e,t,n){Es.lastIndex=0;var r=Es.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function ut(e,t,n){Es.lastIndex=0;var r=Es.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function ct(e,t,n){Es.lastIndex=0;var r=Es.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function dt(e){var t=e.getTimezoneOffset(),n=t>0?"-":"+",r=ka(t)/60|0,i=ka(t)%60;return n+Ke(r,"0",2)+Ke(i,"0",2)}function ft(e,t,n){Cs.lastIndex=0;var r=Cs.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function pt(e){for(var t=e.length,n=-1;++n<t;)e[n][0]=this(e[n][0]);return function(t){for(var n=0,r=e[n];!r[1](t);)r=e[++n];return r[0](t)}}function ht(){}function gt(e,t,n){var r=n.s=e+t,i=r-e,o=r-i;n.t=e-o+(t-i)}function mt(e,t){e&&Ts.hasOwnProperty(e.type)&&Ts[e.type](e,t)}function vt(e,t,n){var r,i=-1,o=e.length-n;for(t.lineStart();++i<o;)r=e[i],t.point(r[0],r[1],r[2]);t.lineEnd()}function bt(e,t){var n=-1,r=e.length;for(t.polygonStart();++n<r;)vt(e[n],t,1);t.polygonEnd()}function yt(){function e(e,t){e*=Ka,t=t*Ka/2+qa/4;var n=e-r,a=n>=0?1:-1,s=a*n,l=Math.cos(t),u=Math.sin(t),c=o*u,d=i*l+c*Math.cos(s),f=c*a*Math.sin(s);Ns.add(Math.atan2(f,d)),r=e,i=l,o=u}var t,n,r,i,o;Fs.point=function(a,s){Fs.point=e,r=(t=a)*Ka,i=Math.cos(s=(n=s)*Ka/2+qa/4),o=Math.sin(s)},Fs.lineEnd=function(){e(t,n)}}function wt(e){var t=e[0],n=e[1],r=Math.cos(n);return[r*Math.cos(t),r*Math.sin(t),Math.sin(n)]}function xt(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function _t(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function Et(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function Ct(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function kt(e){var t=Math.sqrt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}function St(e){return[Math.atan2(e[1],e[0]),ae(e[2])]}function At(e,t){return ka(e[0]-t[0])<Ua&&ka(e[1]-t[1])<Ua}function Tt(e,t){e*=Ka;var n=Math.cos(t*=Ka);Dt(n*Math.cos(e),n*Math.sin(e),Math.sin(t))}function Dt(e,t,n){++Ms,Ls+=(e-Ls)/Ms,Ps+=(t-Ps)/Ms,Is+=(n-Is)/Ms}function Nt(){function e(e,i){e*=Ka;var o=Math.cos(i*=Ka),a=o*Math.cos(e),s=o*Math.sin(e),l=Math.sin(i),u=Math.atan2(Math.sqrt((u=n*l-r*s)*u+(u=r*a-t*l)*u+(u=t*s-n*a)*u),t*a+n*s+r*l);Os+=u,Rs+=u*(t+(t=a)),Bs+=u*(n+(n=s)),js+=u*(r+(r=l)),Dt(t,n,r)}var t,n,r;Ws.point=function(i,o){i*=Ka;var a=Math.cos(o*=Ka);t=a*Math.cos(i),n=a*Math.sin(i),r=Math.sin(o),Ws.point=e,Dt(t,n,r)}}function Ft(){Ws.point=Tt}function Mt(){function e(e,t){e*=Ka;var n=Math.cos(t*=Ka),a=n*Math.cos(e),s=n*Math.sin(e),l=Math.sin(t),u=i*l-o*s,c=o*a-r*l,d=r*s-i*a,f=Math.sqrt(u*u+c*c+d*d),p=r*a+i*s+o*l,h=f&&-oe(p)/f,g=Math.atan2(f,p);$s+=h*u,Vs+=h*c,Us+=h*d,Os+=g,Rs+=g*(r+(r=a)),Bs+=g*(i+(i=s)),js+=g*(o+(o=l)),Dt(r,i,o)}var t,n,r,i,o;Ws.point=function(a,s){t=a,n=s,Ws.point=e,a*=Ka;var l=Math.cos(s*=Ka);r=l*Math.cos(a),i=l*Math.sin(a),o=Math.sin(s),Dt(r,i,o)},Ws.lineEnd=function(){e(t,n),Ws.lineEnd=Ft,Ws.point=Tt}}function Ot(e,t){function n(n,r){return n=e(n,r),t(n[0],n[1])}return e.invert&&t.invert&&(n.invert=function(n,r){return n=t.invert(n,r),n&&e.invert(n[0],n[1])}),n}function Lt(){return!0}function Pt(e,t,n,r,i){var o=[],a=[];if(e.forEach(function(e){if(!((t=e.length-1)<=0)){var t,n=e[0],r=e[t];if(At(n,r)){i.lineStart();for(var s=0;s<t;++s)i.point((n=e[s])[0],n[1]);return void i.lineEnd()}var l=new Rt(n,e,null,(!0)),u=new Rt(n,null,l,(!1));l.o=u,o.push(l),a.push(u),l=new Rt(r,e,null,(!1)),u=new Rt(r,null,l,(!0)),l.o=u,o.push(l),a.push(u)}}),a.sort(t),It(o),It(a),o.length){for(var s=0,l=n,u=a.length;s<u;++s)a[s].e=l=!l;for(var c,d,f=o[0];;){for(var p=f,h=!0;p.v;)if((p=p.n)===f)return;c=p.z,i.lineStart();do{if(p.v=p.o.v=!0,p.e){if(h)for(var s=0,u=c.length;s<u;++s)i.point((d=c[s])[0],d[1]);else r(p.x,p.n.x,1,i);p=p.n}else{if(h){c=p.p.z;for(var s=c.length-1;s>=0;--s)i.point((d=c[s])[0],d[1])}else r(p.x,p.p.x,-1,i);p=p.p}p=p.o,c=p.z,h=!h}while(!p.v);i.lineEnd()}}}function It(e){if(t=e.length){for(var t,n,r=0,i=e[0];++r<t;)i.n=n=e[r],n.p=i,i=n;i.n=n=e[0],n.p=i}}function Rt(e,t,n,r){this.x=e,this.z=t,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function Bt(e,t,n,r){return function(i,o){function a(t,n){var r=i(t,n);e(t=r[0],n=r[1])&&o.point(t,n)}function s(e,t){var n=i(e,t);m.point(n[0],n[1])}function l(){b.point=s,m.lineStart()}function u(){b.point=a,m.lineEnd()}function c(e,t){g.push([e,t]);var n=i(e,t);w.point(n[0],n[1])}function d(){w.lineStart(),g=[]}function f(){c(g[0][0],g[0][1]),w.lineEnd();var e,t=w.clean(),n=y.buffer(),r=n.length;if(g.pop(),h.push(g),g=null,r)if(1&t){e=n[0];var i,r=e.length-1,a=-1;if(r>0){for(x||(o.polygonStart(),x=!0),o.lineStart();++a<r;)o.point((i=e[a])[0],i[1]);o.lineEnd()}}else r>1&&2&t&&n.push(n.pop().concat(n.shift())),p.push(n.filter(jt))}var p,h,g,m=t(o),v=i.invert(r[0],r[1]),b={point:a,lineStart:l,lineEnd:u,polygonStart:function(){b.point=c,b.lineStart=d,b.lineEnd=f,p=[],h=[]},polygonEnd:function(){b.point=a,b.lineStart=l,b.lineEnd=u,p=pa.merge(p);var e=Ht(v,h);p.length?(x||(o.polygonStart(),x=!0),Pt(p,Vt,e,n,o)):e&&(x||(o.polygonStart(),x=!0),o.lineStart(),n(null,null,1,o),o.lineEnd()),x&&(o.polygonEnd(),x=!1),p=h=null},sphere:function(){o.polygonStart(),o.lineStart(),n(null,null,1,o),o.lineEnd(),o.polygonEnd()}},y=$t(),w=t(y),x=!1;return b}}function jt(e){return e.length>1}function $t(){var e,t=[];return{lineStart:function(){t.push(e=[])},point:function(t,n){e.push([t,n])},lineEnd:S,buffer:function(){var n=t;return t=[],e=null,n},rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))}}}function Vt(e,t){return((e=e.x)[0]<0?e[1]-Ga-Ua:Ga-e[1])-((t=t.x)[0]<0?t[1]-Ga-Ua:Ga-t[1])}function Ut(e){var t,n=NaN,r=NaN,i=NaN;return{lineStart:function(){e.lineStart(),t=1},point:function(o,a){var s=o>0?qa:-qa,l=ka(o-n);ka(l-qa)<Ua?(e.point(n,r=(r+a)/2>0?Ga:-Ga),e.point(i,r),e.lineEnd(),e.lineStart(),e.point(s,r),e.point(o,r),t=0):i!==s&&l>=qa&&(ka(n-i)<Ua&&(n-=i*Ua),ka(o-s)<Ua&&(o-=s*Ua),r=Wt(n,r,o,a),e.point(i,r),e.lineEnd(),e.lineStart(),e.point(s,r),t=0),e.point(n=o,r=a),i=s},lineEnd:function(){e.lineEnd(),n=r=NaN},clean:function(){return 2-t}}}function Wt(e,t,n,r){var i,o,a=Math.sin(e-n);return ka(a)>Ua?Math.atan((Math.sin(t)*(o=Math.cos(r))*Math.sin(n)-Math.sin(r)*(i=Math.cos(t))*Math.sin(e))/(i*o*a)):(t+r)/2}function qt(e,t,n,r){var i;if(null==e)i=n*Ga,r.point(-qa,i),r.point(0,i),r.point(qa,i),r.point(qa,0),r.point(qa,-i),r.point(0,-i),r.point(-qa,-i),r.point(-qa,0),r.point(-qa,i);else if(ka(e[0]-t[0])>Ua){var o=e[0]<t[0]?qa:-qa;i=n*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(t[0],t[1])}function Ht(e,t){var n=e[0],r=e[1],i=[Math.sin(n),-Math.cos(n),0],o=0,a=0;Ns.reset();for(var s=0,l=t.length;s<l;++s){var u=t[s],c=u.length;if(c)for(var d=u[0],f=d[0],p=d[1]/2+qa/4,h=Math.sin(p),g=Math.cos(p),m=1;;){m===c&&(m=0),e=u[m];var v=e[0],b=e[1]/2+qa/4,y=Math.sin(b),w=Math.cos(b),x=v-f,_=x>=0?1:-1,E=_*x,C=E>qa,k=h*y;if(Ns.add(Math.atan2(k*_*Math.sin(E),g*w+k*Math.cos(E))),o+=C?x+_*Ha:x,C^f>=n^v>=n){var S=_t(wt(d),wt(e));kt(S);var A=_t(i,S);kt(A);var T=(C^x>=0?-1:1)*ae(A[2]);(r>T||r===T&&(S[0]||S[1]))&&(a+=C^x>=0?1:-1)}if(!m++)break;f=v,h=y,g=w,d=e}}return(o<-Ua||o<Ua&&Ns<-Ua)^1&a}function zt(e){function t(e,t){return Math.cos(e)*Math.cos(t)>o}function n(e){var n,o,l,u,c;return{lineStart:function(){u=l=!1,c=1},point:function(d,f){var p,h=[d,f],g=t(d,f),m=a?g?0:i(d,f):g?i(d+(d<0?qa:-qa),f):0;if(!n&&(u=l=g)&&e.lineStart(),g!==l&&(p=r(n,h),(At(n,p)||At(h,p))&&(h[0]+=Ua,h[1]+=Ua,g=t(h[0],h[1]))),g!==l)c=0,g?(e.lineStart(),p=r(h,n),e.point(p[0],p[1])):(p=r(n,h),e.point(p[0],p[1]),e.lineEnd()),n=p;else if(s&&n&&a^g){var v;m&o||!(v=r(h,n,!0))||(c=0,a?(e.lineStart(),e.point(v[0][0],v[0][1]),e.point(v[1][0],v[1][1]),e.lineEnd()):(e.point(v[1][0],v[1][1]),e.lineEnd(),e.lineStart(),e.point(v[0][0],v[0][1])))}!g||n&&At(n,h)||e.point(h[0],h[1]),n=h,l=g,o=m},lineEnd:function(){l&&e.lineEnd(),n=null},clean:function(){return c|(u&&l)<<1}}}function r(e,t,n){var r=wt(e),i=wt(t),a=[1,0,0],s=_t(r,i),l=xt(s,s),u=s[0],c=l-u*u;if(!c)return!n&&e;var d=o*l/c,f=-o*u/c,p=_t(a,s),h=Ct(a,d),g=Ct(s,f);Et(h,g);var m=p,v=xt(h,m),b=xt(m,m),y=v*v-b*(xt(h,h)-1);if(!(y<0)){var w=Math.sqrt(y),x=Ct(m,(-v-w)/b);if(Et(x,h),x=St(x),!n)return x;var _,E=e[0],C=t[0],k=e[1],S=t[1];C<E&&(_=E,E=C,C=_);var A=C-E,T=ka(A-qa)<Ua,D=T||A<Ua;if(!T&&S<k&&(_=k,k=S,S=_),D?T?k+S>0^x[1]<(ka(x[0]-E)<Ua?k:S):k<=x[1]&&x[1]<=S:A>qa^(E<=x[0]&&x[0]<=C)){var N=Ct(m,(-v+w)/b);return Et(N,h),[x,St(N)]}}}function i(t,n){var r=a?e:qa-e,i=0;return t<-r?i|=1:t>r&&(i|=2),n<-r?i|=4:n>r&&(i|=8),i}var o=Math.cos(e),a=o>0,s=ka(o)>Ua,l=wn(e,6*Ka);return Bt(t,n,l,a?[0,-e]:[-qa,e-qa])}function Gt(e,t,n,r){return function(i){var o,a=i.a,s=i.b,l=a.x,u=a.y,c=s.x,d=s.y,f=0,p=1,h=c-l,g=d-u;if(o=e-l,h||!(o>0)){if(o/=h,h<0){if(o<f)return;o<p&&(p=o)}else if(h>0){if(o>p)return;o>f&&(f=o)}if(o=n-l,h||!(o<0)){if(o/=h,h<0){if(o>p)return;o>f&&(f=o)}else if(h>0){if(o<f)return;o<p&&(p=o)}if(o=t-u,g||!(o>0)){if(o/=g,g<0){if(o<f)return;o<p&&(p=o)}else if(g>0){if(o>p)return;o>f&&(f=o)}if(o=r-u,g||!(o<0)){if(o/=g,g<0){if(o>p)return;o>f&&(f=o)}else if(g>0){if(o<f)return;o<p&&(p=o)}return f>0&&(i.a={x:l+f*h,y:u+f*g}),p<1&&(i.b={x:l+p*h,y:u+p*g}),i}}}}}}function Kt(e,t,n,r){function i(r,i){return ka(r[0]-e)<Ua?i>0?0:3:ka(r[0]-n)<Ua?i>0?2:1:ka(r[1]-t)<Ua?i>0?1:0:i>0?3:2}function o(e,t){return a(e.x,t.x)}function a(e,t){var n=i(e,1),r=i(t,1);return n!==r?n-r:0===n?t[1]-e[1]:1===n?e[0]-t[0]:2===n?e[1]-t[1]:t[0]-e[0]}return function(s){function l(e){for(var t=0,n=m.length,r=e[1],i=0;i<n;++i)for(var o,a=1,s=m[i],l=s.length,u=s[0];a<l;++a)o=s[a],u[1]<=r?o[1]>r&&ie(u,o,e)>0&&++t:o[1]<=r&&ie(u,o,e)<0&&--t,u=o;return 0!==t}function u(o,s,l,u){var c=0,d=0;if(null==o||(c=i(o,l))!==(d=i(s,l))||a(o,s)<0^l>0){do u.point(0===c||3===c?e:n,c>1?r:t);while((c=(c+l+4)%4)!==d)}else u.point(s[0],s[1])}function c(i,o){return e<=i&&i<=n&&t<=o&&o<=r}function d(e,t){c(e,t)&&s.point(e,t)}function f(){D.point=h,m&&m.push(v=[]),C=!0,E=!1,x=_=NaN}function p(){g&&(h(b,y),w&&E&&A.rejoin(),g.push(A.buffer())),D.point=d,E&&s.lineEnd()}function h(e,t){e=Math.max(-Hs,Math.min(Hs,e)),t=Math.max(-Hs,Math.min(Hs,t));var n=c(e,t);if(m&&v.push([e,t]),C)b=e,y=t,w=n,C=!1,n&&(s.lineStart(),s.point(e,t));else if(n&&E)s.point(e,t);else{var r={a:{x:x,y:_},b:{x:e,y:t}};T(r)?(E||(s.lineStart(),s.point(r.a.x,r.a.y)),s.point(r.b.x,r.b.y),n||s.lineEnd(),k=!1):n&&(s.lineStart(),s.point(e,t),k=!1)}x=e,_=t,E=n}var g,m,v,b,y,w,x,_,E,C,k,S=s,A=$t(),T=Gt(e,t,n,r),D={point:d,lineStart:f,lineEnd:p,polygonStart:function(){s=A,g=[],m=[],k=!0},polygonEnd:function(){s=S,g=pa.merge(g);var t=l([e,r]),n=k&&t,i=g.length;(n||i)&&(s.polygonStart(),n&&(s.lineStart(),u(null,null,1,s),s.lineEnd()),i&&Pt(g,o,t,u,s),s.polygonEnd()),g=m=v=null}};return D}}function Yt(e){var t=0,n=qa/3,r=fn(e),i=r(t,n);return i.parallels=function(e){return arguments.length?r(t=e[0]*qa/180,n=e[1]*qa/180):[t/qa*180,n/qa*180]},i}function Xt(e,t){function n(e,t){var n=Math.sqrt(o-2*i*Math.sin(t))/i;return[n*Math.sin(e*=i),a-n*Math.cos(e)]}var r=Math.sin(e),i=(r+Math.sin(t))/2,o=1+r*(2*i-r),a=Math.sqrt(o)/i;return n.invert=function(e,t){var n=a-t;return[Math.atan2(e,n)/i,ae((o-(e*e+n*n)*i*i)/(2*i))]},n}function Qt(){function e(e,t){Gs+=i*e-r*t,r=e,i=t}var t,n,r,i;Js.point=function(o,a){Js.point=e,t=r=o,n=i=a},Js.lineEnd=function(){e(t,n)}}function Jt(e,t){e<Ks&&(Ks=e),e>Xs&&(Xs=e),t<Ys&&(Ys=t),t>Qs&&(Qs=t)}function Zt(){function e(e,t){a.push("M",e,",",t,o)}function t(e,t){a.push("M",e,",",t),s.point=n}function n(e,t){a.push("L",e,",",t)}function r(){s.point=e}function i(){a.push("Z")}var o=en(4.5),a=[],s={point:e,lineStart:function(){s.point=t},lineEnd:r,polygonStart:function(){s.lineEnd=i},polygonEnd:function(){s.lineEnd=r,s.point=e},pointRadius:function(e){return o=en(e),s},result:function(){if(a.length){var e=a.join("");return a=[],e}}};return s}function en(e){return"m0,"+e+"a"+e+","+e+" 0 1,1 0,"+-2*e+"a"+e+","+e+" 0 1,1 0,"+2*e+"z"}function tn(e,t){Ls+=e,Ps+=t,++Is}function nn(){function e(e,r){var i=e-t,o=r-n,a=Math.sqrt(i*i+o*o);Rs+=a*(t+e)/2,Bs+=a*(n+r)/2,js+=a,tn(t=e,n=r)}var t,n;el.point=function(r,i){el.point=e,tn(t=r,n=i)}}function rn(){el.point=tn}function on(){function e(e,t){var n=e-r,o=t-i,a=Math.sqrt(n*n+o*o);Rs+=a*(r+e)/2,Bs+=a*(i+t)/2,js+=a,a=i*e-r*t,$s+=a*(r+e),Vs+=a*(i+t),Us+=3*a,tn(r=e,i=t)}var t,n,r,i;el.point=function(o,a){el.point=e,tn(t=r=o,n=i=a)},el.lineEnd=function(){e(t,n)}}function an(e){function t(t,n){e.moveTo(t+a,n),e.arc(t,n,a,0,Ha)}function n(t,n){e.moveTo(t,n),s.point=r}function r(t,n){e.lineTo(t,n)}function i(){s.point=t}function o(){e.closePath()}var a=4.5,s={point:t,lineStart:function(){s.point=n},lineEnd:i,polygonStart:function(){s.lineEnd=o},polygonEnd:function(){s.lineEnd=i,s.point=t},pointRadius:function(e){return a=e,s},result:S};return s}function sn(e){function t(e){return(s?r:n)(e)}function n(t){return cn(t,function(n,r){n=e(n,r),t.point(n[0],n[1])})}function r(t){function n(n,r){n=e(n,r),t.point(n[0],n[1])}function r(){y=NaN,C.point=o,t.lineStart()}function o(n,r){var o=wt([n,r]),a=e(n,r);i(y,w,b,x,_,E,y=a[0],w=a[1],b=n,x=o[0],_=o[1],E=o[2],s,t),t.point(y,w)}function a(){C.point=n,t.lineEnd()}function l(){r(),C.point=u,C.lineEnd=c}function u(e,t){o(d=e,f=t),p=y,h=w,g=x,m=_,v=E,C.point=o}function c(){i(y,w,b,x,_,E,p,h,d,g,m,v,s,t),C.lineEnd=a,a()}var d,f,p,h,g,m,v,b,y,w,x,_,E,C={point:n,lineStart:r,lineEnd:a,polygonStart:function(){t.polygonStart(),C.lineStart=l},polygonEnd:function(){t.polygonEnd(),C.lineStart=r}};return C}function i(t,n,r,s,l,u,c,d,f,p,h,g,m,v){var b=c-t,y=d-n,w=b*b+y*y;if(w>4*o&&m--){var x=s+p,_=l+h,E=u+g,C=Math.sqrt(x*x+_*_+E*E),k=Math.asin(E/=C),S=ka(ka(E)-1)<Ua||ka(r-f)<Ua?(r+f)/2:Math.atan2(_,x),A=e(S,k),T=A[0],D=A[1],N=T-t,F=D-n,M=y*N-b*F;(M*M/w>o||ka((b*N+y*F)/w-.5)>.3||s*p+l*h+u*g<a)&&(i(t,n,r,s,l,u,T,D,S,x/=C,_/=C,E,m,v),v.point(T,D),i(T,D,S,x,_,E,c,d,f,p,h,g,m,v))}}var o=.5,a=Math.cos(30*Ka),s=16;return t.precision=function(e){return arguments.length?(s=(o=e*e)>0&&16,t):Math.sqrt(o)},t}function ln(e){var t=sn(function(t,n){return e([t*Ya,n*Ya])});return function(e){return pn(t(e))}}function un(e){this.stream=e}function cn(e,t){return{point:t,sphere:function(){e.sphere()},lineStart:function(){e.lineStart()},lineEnd:function(){e.lineEnd()},polygonStart:function(){e.polygonStart()},polygonEnd:function(){e.polygonEnd()}}}function dn(e){return fn(function(){return e})()}function fn(e){function t(e){return e=s(e[0]*Ka,e[1]*Ka),[e[0]*f+l,u-e[1]*f]}function n(e){return e=s.invert((e[0]-l)/f,(u-e[1])/f),e&&[e[0]*Ya,e[1]*Ya]}function r(){s=Ot(a=mn(v,b,y),o);var e=o(g,m);return l=p-e[0]*f,u=h+e[1]*f,i()}function i(){return c&&(c.valid=!1,c=null),t}var o,a,s,l,u,c,d=sn(function(e,t){return e=o(e,t),[e[0]*f+l,u-e[1]*f]}),f=150,p=480,h=250,g=0,m=0,v=0,b=0,y=0,w=qs,x=E,_=null,C=null;return t.stream=function(e){return c&&(c.valid=!1),c=pn(w(a,d(x(e)))),c.valid=!0,c},t.clipAngle=function(e){return arguments.length?(w=null==e?(_=e,qs):zt((_=+e)*Ka),i()):_},t.clipExtent=function(e){return arguments.length?(C=e,x=e?Kt(e[0][0],e[0][1],e[1][0],e[1][1]):E,i()):C},t.scale=function(e){return arguments.length?(f=+e,r()):f},t.translate=function(e){return arguments.length?(p=+e[0],h=+e[1],r()):[p,h]},t.center=function(e){return arguments.length?(g=e[0]%360*Ka,m=e[1]%360*Ka,r()):[g*Ya,m*Ya]},t.rotate=function(e){return arguments.length?(v=e[0]%360*Ka,b=e[1]%360*Ka,y=e.length>2?e[2]%360*Ka:0,r()):[v*Ya,b*Ya,y*Ya]},pa.rebind(t,d,"precision"),function(){return o=e.apply(this,arguments),t.invert=o.invert&&n,r()}}function pn(e){return cn(e,function(t,n){e.point(t*Ka,n*Ka)})}function hn(e,t){return[e,t]}function gn(e,t){return[e>qa?e-Ha:e<-qa?e+Ha:e,t]}function mn(e,t,n){return e?t||n?Ot(bn(e),yn(t,n)):bn(e):t||n?yn(t,n):gn}function vn(e){return function(t,n){return t+=e,[t>qa?t-Ha:t<-qa?t+Ha:t,n]}}function bn(e){var t=vn(e);return t.invert=vn(-e),t}function yn(e,t){function n(e,t){var n=Math.cos(t),s=Math.cos(e)*n,l=Math.sin(e)*n,u=Math.sin(t),c=u*r+s*i;return[Math.atan2(l*o-c*a,s*r-u*i),ae(c*o+l*a)]}var r=Math.cos(e),i=Math.sin(e),o=Math.cos(t),a=Math.sin(t);return n.invert=function(e,t){var n=Math.cos(t),s=Math.cos(e)*n,l=Math.sin(e)*n,u=Math.sin(t),c=u*o-l*a;return[Math.atan2(l*o+u*a,s*r+c*i),ae(c*r-s*i)]},n}function wn(e,t){var n=Math.cos(e),r=Math.sin(e);return function(i,o,a,s){var l=a*t;null!=i?(i=xn(n,i),o=xn(n,o),(a>0?i<o:i>o)&&(i+=a*Ha)):(i=e+a*Ha,o=e-.5*l);for(var u,c=i;a>0?c>o:c<o;c-=l)s.point((u=St([n,-r*Math.cos(c),-r*Math.sin(c)]))[0],u[1])}}function xn(e,t){var n=wt(t);n[0]-=e,kt(n);var r=oe(-n[1]);return((-n[2]<0?-r:r)+2*Math.PI-Ua)%(2*Math.PI)}function _n(e,t,n){var r=pa.range(e,t-Ua,n).concat(t);return function(e){return r.map(function(t){return[e,t]})}}function En(e,t,n){var r=pa.range(e,t-Ua,n).concat(t);return function(e){return r.map(function(t){return[t,e]})}}function Cn(e){return e.source}function kn(e){return e.target}function Sn(e,t,n,r){var i=Math.cos(t),o=Math.sin(t),a=Math.cos(r),s=Math.sin(r),l=i*Math.cos(e),u=i*Math.sin(e),c=a*Math.cos(n),d=a*Math.sin(n),f=2*Math.asin(Math.sqrt(ce(r-t)+i*a*ce(n-e))),p=1/Math.sin(f),h=f?function(e){var t=Math.sin(e*=f)*p,n=Math.sin(f-e)*p,r=n*l+t*c,i=n*u+t*d,a=n*o+t*s;return[Math.atan2(i,r)*Ya,Math.atan2(a,Math.sqrt(r*r+i*i))*Ya]}:function(){return[e*Ya,t*Ya]};return h.distance=f,h}function An(){function e(e,i){var o=Math.sin(i*=Ka),a=Math.cos(i),s=ka((e*=Ka)-t),l=Math.cos(s);tl+=Math.atan2(Math.sqrt((s=a*Math.sin(s))*s+(s=r*o-n*a*l)*s),n*o+r*a*l),t=e,n=o,r=a}var t,n,r;nl.point=function(i,o){t=i*Ka,n=Math.sin(o*=Ka),r=Math.cos(o),nl.point=e},nl.lineEnd=function(){nl.point=nl.lineEnd=S}}function Tn(e,t){function n(t,n){var r=Math.cos(t),i=Math.cos(n),o=e(r*i);return[o*i*Math.sin(t),o*Math.sin(n)]}return n.invert=function(e,n){var r=Math.sqrt(e*e+n*n),i=t(r),o=Math.sin(i),a=Math.cos(i);return[Math.atan2(e*o,r*a),Math.asin(r&&n*o/r)]},n}function Dn(e,t){function n(e,t){a>0?t<-Ga+Ua&&(t=-Ga+Ua):t>Ga-Ua&&(t=Ga-Ua);var n=a/Math.pow(i(t),o);return[n*Math.sin(o*e),a-n*Math.cos(o*e)]}var r=Math.cos(e),i=function(e){return Math.tan(qa/4+e/2)},o=e===t?Math.sin(e):Math.log(r/Math.cos(t))/Math.log(i(t)/i(e)),a=r*Math.pow(i(e),o)/o;return o?(n.invert=function(e,t){var n=a-t,r=re(o)*Math.sqrt(e*e+n*n);return[Math.atan2(e,n)/o,2*Math.atan(Math.pow(a/r,1/o))-Ga]},n):Fn}function Nn(e,t){function n(e,t){var n=o-t;return[n*Math.sin(i*e),o-n*Math.cos(i*e)]}var r=Math.cos(e),i=e===t?Math.sin(e):(r-Math.cos(t))/(t-e),o=r/i+e;return ka(i)<Ua?hn:(n.invert=function(e,t){var n=o-t;return[Math.atan2(e,n)/i,o-re(i)*Math.sqrt(e*e+n*n)]},n)}function Fn(e,t){return[e,Math.log(Math.tan(qa/4+t/2))]}function Mn(e){var t,n=dn(e),r=n.scale,i=n.translate,o=n.clipExtent;return n.scale=function(){var e=r.apply(n,arguments);return e===n?t?n.clipExtent(null):n:e},n.translate=function(){var e=i.apply(n,arguments);return e===n?t?n.clipExtent(null):n:e},n.clipExtent=function(e){var a=o.apply(n,arguments);if(a===n){if(t=null==e){var s=qa*r(),l=i();o([[l[0]-s,l[1]-s],[l[0]+s,l[1]+s]])}}else t&&(a=null);return a},n.clipExtent(null)}function On(e,t){return[Math.log(Math.tan(qa/4+t/2)),-e]}function Ln(e){return e[0]}function Pn(e){return e[1]}function In(e){for(var t=e.length,n=[0,1],r=2,i=2;i<t;i++){for(;r>1&&ie(e[n[r-2]],e[n[r-1]],e[i])<=0;)--r;n[r++]=i}return n.slice(0,r)}function Rn(e,t){return e[0]-t[0]||e[1]-t[1]}function Bn(e,t,n){return(n[0]-t[0])*(e[1]-t[1])<(n[1]-t[1])*(e[0]-t[0])}function jn(e,t,n,r){var i=e[0],o=n[0],a=t[0]-i,s=r[0]-o,l=e[1],u=n[1],c=t[1]-l,d=r[1]-u,f=(s*(l-u)-d*(i-o))/(d*a-s*c);return[i+f*a,l+f*c]}function $n(e){var t=e[0],n=e[e.length-1];return!(t[0]-n[0]||t[1]-n[1])}function Vn(){lr(this),this.edge=this.site=this.circle=null}function Un(e){var t=hl.pop()||new Vn;return t.site=e,t}function Wn(e){Zn(e),dl.remove(e),hl.push(e),lr(e)}function qn(e){var t=e.circle,n=t.x,r=t.cy,i={x:n,y:r},o=e.P,a=e.N,s=[e];Wn(e);for(var l=o;l.circle&&ka(n-l.circle.x)<Ua&&ka(r-l.circle.cy)<Ua;)o=l.P,s.unshift(l),Wn(l),l=o;s.unshift(l),Zn(l);for(var u=a;u.circle&&ka(n-u.circle.x)<Ua&&ka(r-u.circle.cy)<Ua;)a=u.N,s.push(u),Wn(u),u=a;s.push(u),Zn(u);var c,d=s.length;for(c=1;c<d;++c)u=s[c],l=s[c-1],or(u.edge,l.site,u.site,i);l=s[0],u=s[d-1],u.edge=rr(l.site,u.site,null,i),Jn(l),Jn(u)}function Hn(e){for(var t,n,r,i,o=e.x,a=e.y,s=dl._;s;)if(r=zn(s,a)-o,r>Ua)s=s.L;else{if(i=o-Gn(s,a),!(i>Ua)){r>-Ua?(t=s.P,n=s):i>-Ua?(t=s,n=s.N):t=n=s;break}if(!s.R){t=s;break}s=s.R}var l=Un(e);if(dl.insert(t,l),t||n){if(t===n)return Zn(t),n=Un(t.site),dl.insert(l,n),l.edge=n.edge=rr(t.site,l.site),Jn(t),void Jn(n);if(!n)return void(l.edge=rr(t.site,l.site));Zn(t),Zn(n);var u=t.site,c=u.x,d=u.y,f=e.x-c,p=e.y-d,h=n.site,g=h.x-c,m=h.y-d,v=2*(f*m-p*g),b=f*f+p*p,y=g*g+m*m,w={x:(m*b-p*y)/v+c,y:(f*y-g*b)/v+d};or(n.edge,u,h,w),l.edge=rr(u,e,null,w),n.edge=rr(e,h,null,w),Jn(t),Jn(n)}}function zn(e,t){var n=e.site,r=n.x,i=n.y,o=i-t;if(!o)return r;var a=e.P;if(!a)return-(1/0);n=a.site;var s=n.x,l=n.y,u=l-t;if(!u)return s;var c=s-r,d=1/o-1/u,f=c/u;return d?(-f+Math.sqrt(f*f-2*d*(c*c/(-2*u)-l+u/2+i-o/2)))/d+r:(r+s)/2}function Gn(e,t){var n=e.N;if(n)return zn(n,t);var r=e.site;return r.y===t?r.x:1/0}function Kn(e){this.site=e,this.edges=[]}function Yn(e){for(var t,n,r,i,o,a,s,l,u,c,d=e[0][0],f=e[1][0],p=e[0][1],h=e[1][1],g=cl,m=g.length;m--;)if(o=g[m],o&&o.prepare())for(s=o.edges,l=s.length,a=0;a<l;)c=s[a].end(),r=c.x,i=c.y,u=s[++a%l].start(),t=u.x,n=u.y,(ka(r-t)>Ua||ka(i-n)>Ua)&&(s.splice(a,0,new ar(ir(o.site,c,ka(r-d)<Ua&&h-i>Ua?{x:d,y:ka(t-d)<Ua?n:h}:ka(i-h)<Ua&&f-r>Ua?{x:ka(n-h)<Ua?t:f,y:h}:ka(r-f)<Ua&&i-p>Ua?{x:f,y:ka(t-f)<Ua?n:p}:ka(i-p)<Ua&&r-d>Ua?{x:ka(n-p)<Ua?t:d,y:p}:null),o.site,null)),++l)}function Xn(e,t){return t.angle-e.angle}function Qn(){lr(this),this.x=this.y=this.arc=this.site=this.cy=null}function Jn(e){var t=e.P,n=e.N;if(t&&n){var r=t.site,i=e.site,o=n.site;if(r!==o){var a=i.x,s=i.y,l=r.x-a,u=r.y-s,c=o.x-a,d=o.y-s,f=2*(l*d-u*c);if(!(f>=-Wa)){var p=l*l+u*u,h=c*c+d*d,g=(d*p-u*h)/f,m=(l*h-c*p)/f,d=m+s,v=gl.pop()||new Qn;v.arc=e,v.site=i,v.x=g+a,v.y=d+Math.sqrt(g*g+m*m),v.cy=d,e.circle=v;for(var b=null,y=pl._;y;)if(v.y<y.y||v.y===y.y&&v.x<=y.x){if(!y.L){b=y.P;break}y=y.L}else{if(!y.R){b=y;break}y=y.R}pl.insert(b,v),b||(fl=v)}}}}function Zn(e){var t=e.circle;t&&(t.P||(fl=t.N),pl.remove(t),gl.push(t),lr(t),e.circle=null)}function er(e){for(var t,n=ul,r=Gt(e[0][0],e[0][1],e[1][0],e[1][1]),i=n.length;i--;)t=n[i],(!tr(t,e)||!r(t)||ka(t.a.x-t.b.x)<Ua&&ka(t.a.y-t.b.y)<Ua)&&(t.a=t.b=null,n.splice(i,1))}function tr(e,t){var n=e.b;if(n)return!0;var r,i,o=e.a,a=t[0][0],s=t[1][0],l=t[0][1],u=t[1][1],c=e.l,d=e.r,f=c.x,p=c.y,h=d.x,g=d.y,m=(f+h)/2,v=(p+g)/2;if(g===p){if(m<a||m>=s)return;if(f>h){if(o){if(o.y>=u)return}else o={x:m,y:l};n={x:m,y:u}}else{if(o){if(o.y<l)return}else o={x:m,y:u};n={x:m,y:l}}}else if(r=(f-h)/(g-p),i=v-r*m,r<-1||r>1)if(f>h){if(o){if(o.y>=u)return}else o={x:(l-i)/r,y:l};n={x:(u-i)/r,y:u}}else{if(o){if(o.y<l)return}else o={x:(u-i)/r,y:u};n={x:(l-i)/r,y:l}}else if(p<g){if(o){if(o.x>=s)return}else o={x:a,y:r*a+i};n={x:s,y:r*s+i}}else{if(o){if(o.x<a)return}else o={x:s,y:r*s+i};n={x:a,y:r*a+i}}return e.a=o,e.b=n,!0}function nr(e,t){this.l=e,this.r=t,this.a=this.b=null}function rr(e,t,n,r){var i=new nr(e,t);return ul.push(i),n&&or(i,e,t,n),r&&or(i,t,e,r),cl[e.i].edges.push(new ar(i,e,t)),cl[t.i].edges.push(new ar(i,t,e)),i}function ir(e,t,n){var r=new nr(e,null);return r.a=t,r.b=n,ul.push(r),r}function or(e,t,n,r){e.a||e.b?e.l===n?e.b=r:e.a=r:(e.a=r,e.l=t,e.r=n)}function ar(e,t,n){var r=e.a,i=e.b;this.edge=e,this.site=t,this.angle=n?Math.atan2(n.y-t.y,n.x-t.x):e.l===t?Math.atan2(i.x-r.x,r.y-i.y):Math.atan2(r.x-i.x,i.y-r.y)}function sr(){this._=null}function lr(e){e.U=e.C=e.L=e.R=e.P=e.N=null}function ur(e,t){var n=t,r=t.R,i=n.U;i?i.L===n?i.L=r:i.R=r:e._=r,r.U=i,n.U=r,n.R=r.L,n.R&&(n.R.U=n),r.L=n}function cr(e,t){var n=t,r=t.L,i=n.U;i?i.L===n?i.L=r:i.R=r:e._=r,r.U=i,n.U=r,n.L=r.R,n.L&&(n.L.U=n),r.R=n}function dr(e){for(;e.L;)e=e.L;return e}function fr(e,t){var n,r,i,o=e.sort(pr).pop();for(ul=[],cl=new Array(e.length),dl=new sr,pl=new sr;;)if(i=fl,o&&(!i||o.y<i.y||o.y===i.y&&o.x<i.x))o.x===n&&o.y===r||(cl[o.i]=new Kn(o),Hn(o),n=o.x,r=o.y),o=e.pop();else{if(!i)break;qn(i.arc)}t&&(er(t),Yn(t));var a={cells:cl,edges:ul};return dl=pl=ul=cl=null,a}function pr(e,t){return t.y-e.y||t.x-e.x}function hr(e,t,n){return(e.x-n.x)*(t.y-e.y)-(e.x-t.x)*(n.y-e.y)}function gr(e){return e.x}function mr(e){return e.y}function vr(){return{leaf:!0,nodes:[],point:null,x:null,y:null}}function br(e,t,n,r,i,o){if(!e(t,n,r,i,o)){var a=.5*(n+i),s=.5*(r+o),l=t.nodes;l[0]&&br(e,l[0],n,r,a,s),l[1]&&br(e,l[1],a,r,i,s),l[2]&&br(e,l[2],n,s,a,o),l[3]&&br(e,l[3],a,s,i,o)}}function yr(e,t,n,r,i,o,a){var s,l=1/0;return function u(e,c,d,f,p){if(!(c>o||d>a||f<r||p<i)){if(h=e.point){var h,g=t-e.x,m=n-e.y,v=g*g+m*m;if(v<l){var b=Math.sqrt(l=v);r=t-b,i=n-b,o=t+b,a=n+b,s=h}}for(var y=e.nodes,w=.5*(c+f),x=.5*(d+p),_=t>=w,E=n>=x,C=E<<1|_,k=C+4;C<k;++C)if(e=y[3&C])switch(3&C){case 0:u(e,c,d,w,x);break;case 1:u(e,w,d,f,x);break;case 2:u(e,c,x,w,p);break;case 3:u(e,w,x,f,p)}}}(e,r,i,o,a),s}function wr(e,t){e=pa.rgb(e),t=pa.rgb(t);var n=e.r,r=e.g,i=e.b,o=t.r-n,a=t.g-r,s=t.b-i;return function(e){return"#"+ke(Math.round(n+o*e))+ke(Math.round(r+a*e))+ke(Math.round(i+s*e))}}function xr(e,t){var n,r={},i={};for(n in e)n in t?r[n]=Cr(e[n],t[n]):i[n]=e[n];for(n in t)n in e||(i[n]=t[n]);return function(e){for(n in r)i[n]=r[n](e);return i}}function _r(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function Er(e,t){var n,r,i,o=vl.lastIndex=bl.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(n=vl.exec(e))&&(r=bl.exec(t));)(i=r.index)>o&&(i=t.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,l.push({i:a,x:_r(n,r)})),o=bl.lastIndex;return o<t.length&&(i=t.slice(o),s[a]?s[a]+=i:s[++a]=i),s.length<2?l[0]?(t=l[0].x,function(e){return t(e)+""}):function(){return t}:(t=l.length,function(e){for(var n,r=0;r<t;++r)s[(n=l[r]).i]=n.x(e);return s.join("")})}function Cr(e,t){for(var n,r=pa.interpolators.length;--r>=0&&!(n=pa.interpolators[r](e,t)););return n}function kr(e,t){var n,r=[],i=[],o=e.length,a=t.length,s=Math.min(e.length,t.length);for(n=0;n<s;++n)r.push(Cr(e[n],t[n]));for(;n<o;++n)i[n]=e[n];for(;n<a;++n)i[n]=t[n];return function(e){for(n=0;n<s;++n)i[n]=r[n](e);return i}}function Sr(e){return function(t){return t<=0?0:t>=1?1:e(t)}}function Ar(e){return function(t){return 1-e(1-t)}}function Tr(e){return function(t){return.5*(t<.5?e(2*t):2-e(2-2*t))}}function Dr(e){return e*e}function Nr(e){return e*e*e}function Fr(e){if(e<=0)return 0;if(e>=1)return 1;var t=e*e,n=t*e;return 4*(e<.5?n:3*(e-t)+n-.75)}function Mr(e){return function(t){return Math.pow(t,e)}}function Or(e){return 1-Math.cos(e*Ga)}function Lr(e){return Math.pow(2,10*(e-1))}function Pr(e){return 1-Math.sqrt(1-e*e)}function Ir(e,t){var n;return arguments.length<2&&(t=.45),arguments.length?n=t/Ha*Math.asin(1/e):(e=1,n=t/4),function(r){return 1+e*Math.pow(2,-10*r)*Math.sin((r-n)*Ha/t)}}function Rr(e){return e||(e=1.70158),function(t){return t*t*((e+1)*t-e)}}function Br(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375}function jr(e,t){e=pa.hcl(e),t=pa.hcl(t);var n=e.h,r=e.c,i=e.l,o=t.h-n,a=t.c-r,s=t.l-i;return isNaN(a)&&(a=0,r=isNaN(r)?t.c:r),isNaN(o)?(o=0,n=isNaN(n)?t.h:n):o>180?o-=360:o<-180&&(o+=360),function(e){return ge(n+o*e,r+a*e,i+s*e)+""}}function $r(e,t){e=pa.hsl(e),t=pa.hsl(t);var n=e.h,r=e.s,i=e.l,o=t.h-n,a=t.s-r,s=t.l-i;return isNaN(a)&&(a=0,r=isNaN(r)?t.s:r),isNaN(o)?(o=0,n=isNaN(n)?t.h:n):o>180?o-=360:o<-180&&(o+=360),function(e){return pe(n+o*e,r+a*e,i+s*e)+""}}function Vr(e,t){e=pa.lab(e),t=pa.lab(t);var n=e.l,r=e.a,i=e.b,o=t.l-n,a=t.a-r,s=t.b-i;return function(e){return ve(n+o*e,r+a*e,i+s*e)+""}}function Ur(e,t){return t-=e,function(n){return Math.round(e+t*n)}}function Wr(e){var t=[e.a,e.b],n=[e.c,e.d],r=Hr(t),i=qr(t,n),o=Hr(zr(n,t,-i))||0;t[0]*n[1]<n[0]*t[1]&&(t[0]*=-1,t[1]*=-1,r*=-1,i*=-1),this.rotate=(r?Math.atan2(t[1],t[0]):Math.atan2(-n[0],n[1]))*Ya,this.translate=[e.e,e.f],this.scale=[r,o],this.skew=o?Math.atan2(i,o)*Ya:0}function qr(e,t){return e[0]*t[0]+e[1]*t[1]}function Hr(e){var t=Math.sqrt(qr(e,e));return t&&(e[0]/=t,e[1]/=t),t}function zr(e,t,n){return e[0]+=n*t[0],e[1]+=n*t[1],e}function Gr(e){return e.length?e.pop()+",":""}function Kr(e,t,n,r){if(e[0]!==t[0]||e[1]!==t[1]){var i=n.push("translate(",null,",",null,")");r.push({i:i-4,x:_r(e[0],t[0])},{i:i-2,x:_r(e[1],t[1])})}else(t[0]||t[1])&&n.push("translate("+t+")")}function Yr(e,t,n,r){e!==t?(e-t>180?t+=360:t-e>180&&(e+=360),r.push({i:n.push(Gr(n)+"rotate(",null,")")-2,x:_r(e,t)})):t&&n.push(Gr(n)+"rotate("+t+")")}function Xr(e,t,n,r){e!==t?r.push({i:n.push(Gr(n)+"skewX(",null,")")-2,x:_r(e,t)}):t&&n.push(Gr(n)+"skewX("+t+")")}function Qr(e,t,n,r){if(e[0]!==t[0]||e[1]!==t[1]){var i=n.push(Gr(n)+"scale(",null,",",null,")");r.push({i:i-4,x:_r(e[0],t[0])},{i:i-2,x:_r(e[1],t[1])})}else 1===t[0]&&1===t[1]||n.push(Gr(n)+"scale("+t+")")}function Jr(e,t){var n=[],r=[];return e=pa.transform(e),t=pa.transform(t),Kr(e.translate,t.translate,n,r),
Yr(e.rotate,t.rotate,n,r),Xr(e.skew,t.skew,n,r),Qr(e.scale,t.scale,n,r),e=t=null,function(e){for(var t,i=-1,o=r.length;++i<o;)n[(t=r[i]).i]=t.x(e);return n.join("")}}function Zr(e,t){return t=(t-=e=+e)||1/t,function(n){return(n-e)/t}}function ei(e,t){return t=(t-=e=+e)||1/t,function(n){return Math.max(0,Math.min(1,(n-e)/t))}}function ti(e){for(var t=e.source,n=e.target,r=ri(t,n),i=[t];t!==r;)t=t.parent,i.push(t);for(var o=i.length;n!==r;)i.splice(o,0,n),n=n.parent;return i}function ni(e){for(var t=[],n=e.parent;null!=n;)t.push(e),e=n,n=n.parent;return t.push(e),t}function ri(e,t){if(e===t)return e;for(var n=ni(e),r=ni(t),i=n.pop(),o=r.pop(),a=null;i===o;)a=i,i=n.pop(),o=r.pop();return a}function ii(e){e.fixed|=2}function oi(e){e.fixed&=-7}function ai(e){e.fixed|=4,e.px=e.x,e.py=e.y}function si(e){e.fixed&=-5}function li(e,t,n){var r=0,i=0;if(e.charge=0,!e.leaf)for(var o,a=e.nodes,s=a.length,l=-1;++l<s;)o=a[l],null!=o&&(li(o,t,n),e.charge+=o.charge,r+=o.charge*o.cx,i+=o.charge*o.cy);if(e.point){e.leaf||(e.point.x+=Math.random()-.5,e.point.y+=Math.random()-.5);var u=t*n[e.point.index];e.charge+=e.pointCharge=u,r+=u*e.point.x,i+=u*e.point.y}e.cx=r/e.charge,e.cy=i/e.charge}function ui(e,t){return pa.rebind(e,t,"sort","children","value"),e.nodes=e,e.links=gi,e}function ci(e,t){for(var n=[e];null!=(e=n.pop());)if(t(e),(i=e.children)&&(r=i.length))for(var r,i;--r>=0;)n.push(i[r])}function di(e,t){for(var n=[e],r=[];null!=(e=n.pop());)if(r.push(e),(o=e.children)&&(i=o.length))for(var i,o,a=-1;++a<i;)n.push(o[a]);for(;null!=(e=r.pop());)t(e)}function fi(e){return e.children}function pi(e){return e.value}function hi(e,t){return t.value-e.value}function gi(e){return pa.merge(e.map(function(e){return(e.children||[]).map(function(t){return{source:e,target:t}})}))}function mi(e){return e.x}function vi(e){return e.y}function bi(e,t,n){e.y0=t,e.y=n}function yi(e){return pa.range(e.length)}function wi(e){for(var t=-1,n=e[0].length,r=[];++t<n;)r[t]=0;return r}function xi(e){for(var t,n=1,r=0,i=e[0][1],o=e.length;n<o;++n)(t=e[n][1])>i&&(r=n,i=t);return r}function _i(e){return e.reduce(Ei,0)}function Ei(e,t){return e+t[1]}function Ci(e,t){return ki(e,Math.ceil(Math.log(t.length)/Math.LN2+1))}function ki(e,t){for(var n=-1,r=+e[0],i=(e[1]-r)/t,o=[];++n<=t;)o[n]=i*n+r;return o}function Si(e){return[pa.min(e),pa.max(e)]}function Ai(e,t){return e.value-t.value}function Ti(e,t){var n=e._pack_next;e._pack_next=t,t._pack_prev=e,t._pack_next=n,n._pack_prev=t}function Di(e,t){e._pack_next=t,t._pack_prev=e}function Ni(e,t){var n=t.x-e.x,r=t.y-e.y,i=e.r+t.r;return.999*i*i>n*n+r*r}function Fi(e){function t(e){c=Math.min(e.x-e.r,c),d=Math.max(e.x+e.r,d),f=Math.min(e.y-e.r,f),p=Math.max(e.y+e.r,p)}if((n=e.children)&&(u=n.length)){var n,r,i,o,a,s,l,u,c=1/0,d=-(1/0),f=1/0,p=-(1/0);if(n.forEach(Mi),r=n[0],r.x=-r.r,r.y=0,t(r),u>1&&(i=n[1],i.x=i.r,i.y=0,t(i),u>2))for(o=n[2],Pi(r,i,o),t(o),Ti(r,o),r._pack_prev=o,Ti(o,i),i=r._pack_next,a=3;a<u;a++){Pi(r,i,o=n[a]);var h=0,g=1,m=1;for(s=i._pack_next;s!==i;s=s._pack_next,g++)if(Ni(s,o)){h=1;break}if(1==h)for(l=r._pack_prev;l!==s._pack_prev&&!Ni(l,o);l=l._pack_prev,m++);h?(g<m||g==m&&i.r<r.r?Di(r,i=s):Di(r=l,i),a--):(Ti(r,o),i=o,t(o))}var v=(c+d)/2,b=(f+p)/2,y=0;for(a=0;a<u;a++)o=n[a],o.x-=v,o.y-=b,y=Math.max(y,o.r+Math.sqrt(o.x*o.x+o.y*o.y));e.r=y,n.forEach(Oi)}}function Mi(e){e._pack_next=e._pack_prev=e}function Oi(e){delete e._pack_next,delete e._pack_prev}function Li(e,t,n,r){var i=e.children;if(e.x=t+=r*e.x,e.y=n+=r*e.y,e.r*=r,i)for(var o=-1,a=i.length;++o<a;)Li(i[o],t,n,r)}function Pi(e,t,n){var r=e.r+n.r,i=t.x-e.x,o=t.y-e.y;if(r&&(i||o)){var a=t.r+n.r,s=i*i+o*o;a*=a,r*=r;var l=.5+(r-a)/(2*s),u=Math.sqrt(Math.max(0,2*a*(r+s)-(r-=s)*r-a*a))/(2*s);n.x=e.x+l*i+u*o,n.y=e.y+l*o-u*i}else n.x=e.x+r,n.y=e.y}function Ii(e,t){return e.parent==t.parent?1:2}function Ri(e){var t=e.children;return t.length?t[0]:e.t}function Bi(e){var t,n=e.children;return(t=n.length)?n[t-1]:e.t}function ji(e,t,n){var r=n/(t.i-e.i);t.c-=r,t.s+=n,e.c+=r,t.z+=n,t.m+=n}function $i(e){for(var t,n=0,r=0,i=e.children,o=i.length;--o>=0;)t=i[o],t.z+=n,t.m+=n,n+=t.s+(r+=t.c)}function Vi(e,t,n){return e.a.parent===t.parent?e.a:n}function Ui(e){return 1+pa.max(e,function(e){return e.y})}function Wi(e){return e.reduce(function(e,t){return e+t.x},0)/e.length}function qi(e){var t=e.children;return t&&t.length?qi(t[0]):e}function Hi(e){var t,n=e.children;return n&&(t=n.length)?Hi(n[t-1]):e}function zi(e){return{x:e.x,y:e.y,dx:e.dx,dy:e.dy}}function Gi(e,t){var n=e.x+t[3],r=e.y+t[0],i=e.dx-t[1]-t[3],o=e.dy-t[0]-t[2];return i<0&&(n+=i/2,i=0),o<0&&(r+=o/2,o=0),{x:n,y:r,dx:i,dy:o}}function Ki(e){var t=e[0],n=e[e.length-1];return t<n?[t,n]:[n,t]}function Yi(e){return e.rangeExtent?e.rangeExtent():Ki(e.range())}function Xi(e,t,n,r){var i=n(e[0],e[1]),o=r(t[0],t[1]);return function(e){return o(i(e))}}function Qi(e,t){var n,r=0,i=e.length-1,o=e[r],a=e[i];return a<o&&(n=r,r=i,i=n,n=o,o=a,a=n),e[r]=t.floor(o),e[i]=t.ceil(a),e}function Ji(e){return e?{floor:function(t){return Math.floor(t/e)*e},ceil:function(t){return Math.ceil(t/e)*e}}:Dl}function Zi(e,t,n,r){var i=[],o=[],a=0,s=Math.min(e.length,t.length)-1;for(e[s]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<=s;)i.push(n(e[a-1],e[a])),o.push(r(t[a-1],t[a]));return function(t){var n=pa.bisect(e,t,1,s)-1;return o[n](i[n](t))}}function eo(e,t,n,r){function i(){var i=Math.min(e.length,t.length)>2?Zi:Xi,l=r?ei:Zr;return a=i(e,t,l,n),s=i(t,e,l,Cr),o}function o(e){return a(e)}var a,s;return o.invert=function(e){return s(e)},o.domain=function(t){return arguments.length?(e=t.map(Number),i()):e},o.range=function(e){return arguments.length?(t=e,i()):t},o.rangeRound=function(e){return o.range(e).interpolate(Ur)},o.clamp=function(e){return arguments.length?(r=e,i()):r},o.interpolate=function(e){return arguments.length?(n=e,i()):n},o.ticks=function(t){return io(e,t)},o.tickFormat=function(t,n){return oo(e,t,n)},o.nice=function(t){return no(e,t),i()},o.copy=function(){return eo(e,t,n,r)},i()}function to(e,t){return pa.rebind(e,t,"range","rangeRound","interpolate","clamp")}function no(e,t){return Qi(e,Ji(ro(e,t)[2])),Qi(e,Ji(ro(e,t)[2])),e}function ro(e,t){null==t&&(t=10);var n=Ki(e),r=n[1]-n[0],i=Math.pow(10,Math.floor(Math.log(r/t)/Math.LN10)),o=t/r*i;return o<=.15?i*=10:o<=.35?i*=5:o<=.75&&(i*=2),n[0]=Math.ceil(n[0]/i)*i,n[1]=Math.floor(n[1]/i)*i+.5*i,n[2]=i,n}function io(e,t){return pa.range.apply(pa,ro(e,t))}function oo(e,t,n){var r=ro(e,t);if(n){var i=vs.exec(n);if(i.shift(),"s"===i[8]){var o=pa.formatPrefix(Math.max(ka(r[0]),ka(r[1])));return i[7]||(i[7]="."+ao(o.scale(r[2]))),i[8]="f",n=pa.format(i.join("")),function(e){return n(o.scale(e))+o.symbol}}i[7]||(i[7]="."+so(i[8],r)),n=i.join("")}else n=",."+ao(r[2])+"f";return pa.format(n)}function ao(e){return-Math.floor(Math.log(e)/Math.LN10+.01)}function so(e,t){var n=ao(t[2]);return e in Nl?Math.abs(n-ao(Math.max(ka(t[0]),ka(t[1]))))+ +("e"!==e):n-2*("%"===e)}function lo(e,t,n,r){function i(e){return(n?Math.log(e<0?0:e):-Math.log(e>0?0:-e))/Math.log(t)}function o(e){return n?Math.pow(t,e):-Math.pow(t,-e)}function a(t){return e(i(t))}return a.invert=function(t){return o(e.invert(t))},a.domain=function(t){return arguments.length?(n=t[0]>=0,e.domain((r=t.map(Number)).map(i)),a):r},a.base=function(n){return arguments.length?(t=+n,e.domain(r.map(i)),a):t},a.nice=function(){var t=Qi(r.map(i),n?Math:Ml);return e.domain(t),r=t.map(o),a},a.ticks=function(){var e=Ki(r),a=[],s=e[0],l=e[1],u=Math.floor(i(s)),c=Math.ceil(i(l)),d=t%1?2:t;if(isFinite(c-u)){if(n){for(;u<c;u++)for(var f=1;f<d;f++)a.push(o(u)*f);a.push(o(u))}else for(a.push(o(u));u++<c;)for(var f=d-1;f>0;f--)a.push(o(u)*f);for(u=0;a[u]<s;u++);for(c=a.length;a[c-1]>l;c--);a=a.slice(u,c)}return a},a.tickFormat=function(e,n){if(!arguments.length)return Fl;arguments.length<2?n=Fl:"function"!=typeof n&&(n=pa.format(n));var r=Math.max(1,t*e/a.ticks().length);return function(e){var a=e/o(Math.round(i(e)));return a*t<t-.5&&(a*=t),a<=r?n(e):""}},a.copy=function(){return lo(e.copy(),t,n,r)},to(a,e)}function uo(e,t,n){function r(t){return e(i(t))}var i=co(t),o=co(1/t);return r.invert=function(t){return o(e.invert(t))},r.domain=function(t){return arguments.length?(e.domain((n=t.map(Number)).map(i)),r):n},r.ticks=function(e){return io(n,e)},r.tickFormat=function(e,t){return oo(n,e,t)},r.nice=function(e){return r.domain(no(n,e))},r.exponent=function(a){return arguments.length?(i=co(t=a),o=co(1/t),e.domain(n.map(i)),r):t},r.copy=function(){return uo(e.copy(),t,n)},to(r,e)}function co(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function fo(e,t){function n(n){return o[((i.get(n)||("range"===t.t?i.set(n,e.push(n)):NaN))-1)%o.length]}function r(t,n){return pa.range(e.length).map(function(e){return t+n*e})}var i,o,a;return n.domain=function(r){if(!arguments.length)return e;e=[],i=new h;for(var o,a=-1,s=r.length;++a<s;)i.has(o=r[a])||i.set(o,e.push(o));return n[t.t].apply(n,t.a)},n.range=function(e){return arguments.length?(o=e,a=0,t={t:"range",a:arguments},n):o},n.rangePoints=function(i,s){arguments.length<2&&(s=0);var l=i[0],u=i[1],c=e.length<2?(l=(l+u)/2,0):(u-l)/(e.length-1+s);return o=r(l+c*s/2,c),a=0,t={t:"rangePoints",a:arguments},n},n.rangeRoundPoints=function(i,s){arguments.length<2&&(s=0);var l=i[0],u=i[1],c=e.length<2?(l=u=Math.round((l+u)/2),0):(u-l)/(e.length-1+s)|0;return o=r(l+Math.round(c*s/2+(u-l-(e.length-1+s)*c)/2),c),a=0,t={t:"rangeRoundPoints",a:arguments},n},n.rangeBands=function(i,s,l){arguments.length<2&&(s=0),arguments.length<3&&(l=s);var u=i[1]<i[0],c=i[u-0],d=i[1-u],f=(d-c)/(e.length-s+2*l);return o=r(c+f*l,f),u&&o.reverse(),a=f*(1-s),t={t:"rangeBands",a:arguments},n},n.rangeRoundBands=function(i,s,l){arguments.length<2&&(s=0),arguments.length<3&&(l=s);var u=i[1]<i[0],c=i[u-0],d=i[1-u],f=Math.floor((d-c)/(e.length-s+2*l));return o=r(c+Math.round((d-c-(e.length-s)*f)/2),f),u&&o.reverse(),a=Math.round(f*(1-s)),t={t:"rangeRoundBands",a:arguments},n},n.rangeBand=function(){return a},n.rangeExtent=function(){return Ki(t.a[0])},n.copy=function(){return fo(e,t)},n.domain(e)}function po(e,t){function n(){var n=0,o=t.length;for(i=[];++n<o;)i[n-1]=pa.quantile(e,n/o);return r}function r(e){if(!isNaN(e=+e))return t[pa.bisect(i,e)]}var i;return r.domain=function(t){return arguments.length?(e=t.map(l).filter(u).sort(s),n()):e},r.range=function(e){return arguments.length?(t=e,n()):t},r.quantiles=function(){return i},r.invertExtent=function(n){return n=t.indexOf(n),n<0?[NaN,NaN]:[n>0?i[n-1]:e[0],n<i.length?i[n]:e[e.length-1]]},r.copy=function(){return po(e,t)},n()}function ho(e,t,n){function r(t){return n[Math.max(0,Math.min(a,Math.floor(o*(t-e))))]}function i(){return o=n.length/(t-e),a=n.length-1,r}var o,a;return r.domain=function(n){return arguments.length?(e=+n[0],t=+n[n.length-1],i()):[e,t]},r.range=function(e){return arguments.length?(n=e,i()):n},r.invertExtent=function(t){return t=n.indexOf(t),t=t<0?NaN:t/o+e,[t,t+1/o]},r.copy=function(){return ho(e,t,n)},i()}function go(e,t){function n(n){if(n<=n)return t[pa.bisect(e,n)]}return n.domain=function(t){return arguments.length?(e=t,n):e},n.range=function(e){return arguments.length?(t=e,n):t},n.invertExtent=function(n){return n=t.indexOf(n),[e[n-1],e[n]]},n.copy=function(){return go(e,t)},n}function mo(e){function t(e){return+e}return t.invert=t,t.domain=t.range=function(n){return arguments.length?(e=n.map(t),t):e},t.ticks=function(t){return io(e,t)},t.tickFormat=function(t,n){return oo(e,t,n)},t.copy=function(){return mo(e)},t}function vo(){return 0}function bo(e){return e.innerRadius}function yo(e){return e.outerRadius}function wo(e){return e.startAngle}function xo(e){return e.endAngle}function _o(e){return e&&e.padAngle}function Eo(e,t,n,r){return(e-n)*t-(t-r)*e>0?0:1}function Co(e,t,n,r,i){var o=e[0]-t[0],a=e[1]-t[1],s=(i?r:-r)/Math.sqrt(o*o+a*a),l=s*a,u=-s*o,c=e[0]+l,d=e[1]+u,f=t[0]+l,p=t[1]+u,h=(c+f)/2,g=(d+p)/2,m=f-c,v=p-d,b=m*m+v*v,y=n-r,w=c*p-f*d,x=(v<0?-1:1)*Math.sqrt(Math.max(0,y*y*b-w*w)),_=(w*v-m*x)/b,E=(-w*m-v*x)/b,C=(w*v+m*x)/b,k=(-w*m+v*x)/b,S=_-h,A=E-g,T=C-h,D=k-g;return S*S+A*A>T*T+D*D&&(_=C,E=k),[[_-l,E-u],[_*n/y,E*n/y]]}function ko(e){function t(t){function a(){u.push("M",o(e(c),s))}for(var l,u=[],c=[],d=-1,f=t.length,p=Fe(n),h=Fe(r);++d<f;)i.call(this,l=t[d],d)?c.push([+p.call(this,l,d),+h.call(this,l,d)]):c.length&&(a(),c=[]);return c.length&&a(),u.length?u.join(""):null}var n=Ln,r=Pn,i=Lt,o=So,a=o.key,s=.7;return t.x=function(e){return arguments.length?(n=e,t):n},t.y=function(e){return arguments.length?(r=e,t):r},t.defined=function(e){return arguments.length?(i=e,t):i},t.interpolate=function(e){return arguments.length?(a="function"==typeof e?o=e:(o=Bl.get(e)||So).key,t):a},t.tension=function(e){return arguments.length?(s=e,t):s},t}function So(e){return e.length>1?e.join("L"):e+"Z"}function Ao(e){return e.join("L")+"Z"}function To(e){for(var t=0,n=e.length,r=e[0],i=[r[0],",",r[1]];++t<n;)i.push("H",(r[0]+(r=e[t])[0])/2,"V",r[1]);return n>1&&i.push("H",r[0]),i.join("")}function Do(e){for(var t=0,n=e.length,r=e[0],i=[r[0],",",r[1]];++t<n;)i.push("V",(r=e[t])[1],"H",r[0]);return i.join("")}function No(e){for(var t=0,n=e.length,r=e[0],i=[r[0],",",r[1]];++t<n;)i.push("H",(r=e[t])[0],"V",r[1]);return i.join("")}function Fo(e,t){return e.length<4?So(e):e[1]+Lo(e.slice(1,-1),Po(e,t))}function Mo(e,t){return e.length<3?Ao(e):e[0]+Lo((e.push(e[0]),e),Po([e[e.length-2]].concat(e,[e[1]]),t))}function Oo(e,t){return e.length<3?So(e):e[0]+Lo(e,Po(e,t))}function Lo(e,t){if(t.length<1||e.length!=t.length&&e.length!=t.length+2)return So(e);var n=e.length!=t.length,r="",i=e[0],o=e[1],a=t[0],s=a,l=1;if(n&&(r+="Q"+(o[0]-2*a[0]/3)+","+(o[1]-2*a[1]/3)+","+o[0]+","+o[1],i=e[1],l=2),t.length>1){s=t[1],o=e[l],l++,r+="C"+(i[0]+a[0])+","+(i[1]+a[1])+","+(o[0]-s[0])+","+(o[1]-s[1])+","+o[0]+","+o[1];for(var u=2;u<t.length;u++,l++)o=e[l],s=t[u],r+="S"+(o[0]-s[0])+","+(o[1]-s[1])+","+o[0]+","+o[1]}if(n){var c=e[l];r+="Q"+(o[0]+2*s[0]/3)+","+(o[1]+2*s[1]/3)+","+c[0]+","+c[1]}return r}function Po(e,t){for(var n,r=[],i=(1-t)/2,o=e[0],a=e[1],s=1,l=e.length;++s<l;)n=o,o=a,a=e[s],r.push([i*(a[0]-n[0]),i*(a[1]-n[1])]);return r}function Io(e){if(e.length<3)return So(e);var t=1,n=e.length,r=e[0],i=r[0],o=r[1],a=[i,i,i,(r=e[1])[0]],s=[o,o,o,r[1]],l=[i,",",o,"L",$o(Vl,a),",",$o(Vl,s)];for(e.push(e[n-1]);++t<=n;)r=e[t],a.shift(),a.push(r[0]),s.shift(),s.push(r[1]),Vo(l,a,s);return e.pop(),l.push("L",r),l.join("")}function Ro(e){if(e.length<4)return So(e);for(var t,n=[],r=-1,i=e.length,o=[0],a=[0];++r<3;)t=e[r],o.push(t[0]),a.push(t[1]);for(n.push($o(Vl,o)+","+$o(Vl,a)),--r;++r<i;)t=e[r],o.shift(),o.push(t[0]),a.shift(),a.push(t[1]),Vo(n,o,a);return n.join("")}function Bo(e){for(var t,n,r=-1,i=e.length,o=i+4,a=[],s=[];++r<4;)n=e[r%i],a.push(n[0]),s.push(n[1]);for(t=[$o(Vl,a),",",$o(Vl,s)],--r;++r<o;)n=e[r%i],a.shift(),a.push(n[0]),s.shift(),s.push(n[1]),Vo(t,a,s);return t.join("")}function jo(e,t){var n=e.length-1;if(n)for(var r,i,o=e[0][0],a=e[0][1],s=e[n][0]-o,l=e[n][1]-a,u=-1;++u<=n;)r=e[u],i=u/n,r[0]=t*r[0]+(1-t)*(o+i*s),r[1]=t*r[1]+(1-t)*(a+i*l);return Io(e)}function $o(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function Vo(e,t,n){e.push("C",$o(jl,t),",",$o(jl,n),",",$o($l,t),",",$o($l,n),",",$o(Vl,t),",",$o(Vl,n))}function Uo(e,t){return(t[1]-e[1])/(t[0]-e[0])}function Wo(e){for(var t=0,n=e.length-1,r=[],i=e[0],o=e[1],a=r[0]=Uo(i,o);++t<n;)r[t]=(a+(a=Uo(i=o,o=e[t+1])))/2;return r[t]=a,r}function qo(e){for(var t,n,r,i,o=[],a=Wo(e),s=-1,l=e.length-1;++s<l;)t=Uo(e[s],e[s+1]),ka(t)<Ua?a[s]=a[s+1]=0:(n=a[s]/t,r=a[s+1]/t,i=n*n+r*r,i>9&&(i=3*t/Math.sqrt(i),a[s]=i*n,a[s+1]=i*r));for(s=-1;++s<=l;)i=(e[Math.min(l,s+1)][0]-e[Math.max(0,s-1)][0])/(6*(1+a[s]*a[s])),o.push([i||0,a[s]*i||0]);return o}function Ho(e){return e.length<3?So(e):e[0]+Lo(e,qo(e))}function zo(e){for(var t,n,r,i=-1,o=e.length;++i<o;)t=e[i],n=t[0],r=t[1]-Ga,t[0]=n*Math.cos(r),t[1]=n*Math.sin(r);return e}function Go(e){function t(t){function l(){g.push("M",s(e(v),d),c,u(e(m.reverse()),d),"Z")}for(var f,p,h,g=[],m=[],v=[],b=-1,y=t.length,w=Fe(n),x=Fe(i),_=n===r?function(){return p}:Fe(r),E=i===o?function(){return h}:Fe(o);++b<y;)a.call(this,f=t[b],b)?(m.push([p=+w.call(this,f,b),h=+x.call(this,f,b)]),v.push([+_.call(this,f,b),+E.call(this,f,b)])):m.length&&(l(),m=[],v=[]);return m.length&&l(),g.length?g.join(""):null}var n=Ln,r=Ln,i=0,o=Pn,a=Lt,s=So,l=s.key,u=s,c="L",d=.7;return t.x=function(e){return arguments.length?(n=r=e,t):r},t.x0=function(e){return arguments.length?(n=e,t):n},t.x1=function(e){return arguments.length?(r=e,t):r},t.y=function(e){return arguments.length?(i=o=e,t):o},t.y0=function(e){return arguments.length?(i=e,t):i},t.y1=function(e){return arguments.length?(o=e,t):o},t.defined=function(e){return arguments.length?(a=e,t):a},t.interpolate=function(e){return arguments.length?(l="function"==typeof e?s=e:(s=Bl.get(e)||So).key,u=s.reverse||s,c=s.closed?"M":"L",t):l},t.tension=function(e){return arguments.length?(d=e,t):d},t}function Ko(e){return e.radius}function Yo(e){return[e.x,e.y]}function Xo(e){return function(){var t=e.apply(this,arguments),n=t[0],r=t[1]-Ga;return[n*Math.cos(r),n*Math.sin(r)]}}function Qo(){return 64}function Jo(){return"circle"}function Zo(e){var t=Math.sqrt(e/qa);return"M0,"+t+"A"+t+","+t+" 0 1,1 0,"+-t+"A"+t+","+t+" 0 1,1 0,"+t+"Z"}function ea(e){return function(){var t,n,r;(t=this[e])&&(r=t[n=t.active])&&(r.timer.c=null,r.timer.t=NaN,--t.count?delete t[n]:delete this[e],t.active+=.5,r.event&&r.event.interrupt.call(this,this.__data__,r.index))}}function ta(e,t,n){return Na(e,Kl),e.namespace=t,e.id=n,e}function na(e,t,n,r){var i=e.id,o=e.namespace;return K(e,"function"==typeof n?function(e,a,s){e[o][i].tween.set(t,r(n.call(e,e.__data__,a,s)))}:(n=r(n),function(e){e[o][i].tween.set(t,n)}))}function ra(e){return null==e&&(e=""),function(){this.textContent=e}}function ia(e){return null==e?"__transition__":"__transition_"+e+"__"}function oa(e,t,n,r,i){function o(e){var t=g.delay;return u.t=t+l,t<=e?a(e-t):void(u.c=a)}function a(n){var i=p.active,o=p[i];o&&(o.timer.c=null,o.timer.t=NaN,--p.count,delete p[i],o.event&&o.event.interrupt.call(e,e.__data__,o.index));for(var a in p)if(+a<r){var h=p[a];h.timer.c=null,h.timer.t=NaN,--p.count,delete p[a]}u.c=s,Ie(function(){return u.c&&s(n||1)&&(u.c=null,u.t=NaN),1},0,l),p.active=r,g.event&&g.event.start.call(e,e.__data__,t),f=[],g.tween.forEach(function(n,r){(r=r.call(e,e.__data__,t))&&f.push(r)}),d=g.ease,c=g.duration}function s(i){for(var o=i/c,a=d(o),s=f.length;s>0;)f[--s].call(e,a);if(o>=1)return g.event&&g.event.end.call(e,e.__data__,t),--p.count?delete p[r]:delete e[n],1}var l,u,c,d,f,p=e[n]||(e[n]={active:0,count:0}),g=p[r];g||(l=i.time,u=Ie(o,0,l),g=p[r]={tween:new h,time:l,timer:u,delay:i.delay,duration:i.duration,ease:i.ease,index:t},i=null,++p.count)}function aa(e,t,n){e.attr("transform",function(e){var r=t(e);return"translate("+(isFinite(r)?r:n(e))+",0)"})}function sa(e,t,n){e.attr("transform",function(e){var r=t(e);return"translate(0,"+(isFinite(r)?r:n(e))+")"})}function la(e){return e.toISOString()}function ua(e,t,n){function r(t){return e(t)}function i(e,n){var r=e[1]-e[0],i=r/n,o=pa.bisect(ru,i);return o==ru.length?[t.year,ro(e.map(function(e){return e/31536e6}),n)[2]]:o?t[i/ru[o-1]<ru[o]/i?o-1:o]:[au,ro(e,n)[2]]}return r.invert=function(t){return ca(e.invert(t))},r.domain=function(t){return arguments.length?(e.domain(t),r):e.domain().map(ca)},r.nice=function(e,t){function n(n){return!isNaN(n)&&!e.range(n,ca(+n+1),t).length}var o=r.domain(),a=Ki(o),s=null==e?i(a,10):"number"==typeof e&&i(a,e);return s&&(e=s[0],t=s[1]),r.domain(Qi(o,t>1?{floor:function(t){for(;n(t=e.floor(t));)t=ca(t-1);return t},ceil:function(t){for(;n(t=e.ceil(t));)t=ca(+t+1);return t}}:e))},r.ticks=function(e,t){var n=Ki(r.domain()),o=null==e?i(n,10):"number"==typeof e?i(n,e):!e.range&&[{range:e},t];return o&&(e=o[0],t=o[1]),e.range(n[0],ca(+n[1]+1),t<1?1:t)},r.tickFormat=function(){return n},r.copy=function(){return ua(e.copy(),t,n)},to(r,e)}function ca(e){return new Date(e)}function da(e){return JSON.parse(e.responseText)}function fa(e){var t=ma.createRange();return t.selectNode(ma.body),t.createContextualFragment(e.responseText)}var pa={version:"3.5.17"},ha=[].slice,ga=function(e){return ha.call(e)},ma=this.document;if(ma)try{ga(ma.documentElement.childNodes)[0].nodeType}catch(va){ga=function(e){for(var t=e.length,n=new Array(t);t--;)n[t]=e[t];return n}}if(Date.now||(Date.now=function(){return+new Date}),ma)try{ma.createElement("DIV").style.setProperty("opacity",0,"")}catch(ba){var ya=this.Element.prototype,wa=ya.setAttribute,xa=ya.setAttributeNS,_a=this.CSSStyleDeclaration.prototype,Ea=_a.setProperty;ya.setAttribute=function(e,t){wa.call(this,e,t+"")},ya.setAttributeNS=function(e,t,n){xa.call(this,e,t,n+"")},_a.setProperty=function(e,t,n){Ea.call(this,e,t+"",n)}}pa.ascending=s,pa.descending=function(e,t){return t<e?-1:t>e?1:t>=e?0:NaN},pa.min=function(e,t){var n,r,i=-1,o=e.length;if(1===arguments.length){for(;++i<o;)if(null!=(r=e[i])&&r>=r){n=r;break}for(;++i<o;)null!=(r=e[i])&&n>r&&(n=r)}else{for(;++i<o;)if(null!=(r=t.call(e,e[i],i))&&r>=r){n=r;break}for(;++i<o;)null!=(r=t.call(e,e[i],i))&&n>r&&(n=r)}return n},pa.max=function(e,t){var n,r,i=-1,o=e.length;if(1===arguments.length){for(;++i<o;)if(null!=(r=e[i])&&r>=r){n=r;break}for(;++i<o;)null!=(r=e[i])&&r>n&&(n=r)}else{for(;++i<o;)if(null!=(r=t.call(e,e[i],i))&&r>=r){n=r;break}for(;++i<o;)null!=(r=t.call(e,e[i],i))&&r>n&&(n=r)}return n},pa.extent=function(e,t){var n,r,i,o=-1,a=e.length;if(1===arguments.length){for(;++o<a;)if(null!=(r=e[o])&&r>=r){n=i=r;break}for(;++o<a;)null!=(r=e[o])&&(n>r&&(n=r),i<r&&(i=r))}else{for(;++o<a;)if(null!=(r=t.call(e,e[o],o))&&r>=r){n=i=r;break}for(;++o<a;)null!=(r=t.call(e,e[o],o))&&(n>r&&(n=r),i<r&&(i=r))}return[n,i]},pa.sum=function(e,t){var n,r=0,i=e.length,o=-1;if(1===arguments.length)for(;++o<i;)u(n=+e[o])&&(r+=n);else for(;++o<i;)u(n=+t.call(e,e[o],o))&&(r+=n);return r},pa.mean=function(e,t){var n,r=0,i=e.length,o=-1,a=i;if(1===arguments.length)for(;++o<i;)u(n=l(e[o]))?r+=n:--a;else for(;++o<i;)u(n=l(t.call(e,e[o],o)))?r+=n:--a;if(a)return r/a},pa.quantile=function(e,t){var n=(e.length-1)*t+1,r=Math.floor(n),i=+e[r-1],o=n-r;return o?i+o*(e[r]-i):i},pa.median=function(e,t){var n,r=[],i=e.length,o=-1;if(1===arguments.length)for(;++o<i;)u(n=l(e[o]))&&r.push(n);else for(;++o<i;)u(n=l(t.call(e,e[o],o)))&&r.push(n);if(r.length)return pa.quantile(r.sort(s),.5)},pa.variance=function(e,t){var n,r,i=e.length,o=0,a=0,s=-1,c=0;if(1===arguments.length)for(;++s<i;)u(n=l(e[s]))&&(r=n-o,o+=r/++c,a+=r*(n-o));else for(;++s<i;)u(n=l(t.call(e,e[s],s)))&&(r=n-o,o+=r/++c,a+=r*(n-o));if(c>1)return a/(c-1)},pa.deviation=function(){var e=pa.variance.apply(this,arguments);return e?Math.sqrt(e):e};var Ca=c(s);pa.bisectLeft=Ca.left,pa.bisect=pa.bisectRight=Ca.right,pa.bisector=function(e){return c(1===e.length?function(t,n){return s(e(t),n)}:e)},pa.shuffle=function(e,t,n){(o=arguments.length)<3&&(n=e.length,o<2&&(t=0));for(var r,i,o=n-t;o;)i=Math.random()*o--|0,r=e[o+t],e[o+t]=e[i+t],e[i+t]=r;return e},pa.permute=function(e,t){for(var n=t.length,r=new Array(n);n--;)r[n]=e[t[n]];return r},pa.pairs=function(e){for(var t,n=0,r=e.length-1,i=e[0],o=new Array(r<0?0:r);n<r;)o[n]=[t=i,i=e[++n]];return o},pa.transpose=function(e){if(!(i=e.length))return[];for(var t=-1,n=pa.min(e,d),r=new Array(n);++t<n;)for(var i,o=-1,a=r[t]=new Array(i);++o<i;)a[o]=e[o][t];return r},pa.zip=function(){return pa.transpose(arguments)},pa.keys=function(e){var t=[];for(var n in e)t.push(n);return t},pa.values=function(e){var t=[];for(var n in e)t.push(e[n]);return t},pa.entries=function(e){var t=[];for(var n in e)t.push({key:n,value:e[n]});return t},pa.merge=function(e){for(var t,n,r,i=e.length,o=-1,a=0;++o<i;)a+=e[o].length;for(n=new Array(a);--i>=0;)for(r=e[i],t=r.length;--t>=0;)n[--a]=r[t];return n};var ka=Math.abs;pa.range=function(e,t,n){if(arguments.length<3&&(n=1,arguments.length<2&&(t=e,e=0)),(t-e)/n===1/0)throw new Error("infinite range");var r,i=[],o=f(ka(n)),a=-1;if(e*=o,t*=o,n*=o,n<0)for(;(r=e+n*++a)>t;)i.push(r/o);else for(;(r=e+n*++a)<t;)i.push(r/o);return i},pa.map=function(e,t){var n=new h;if(e instanceof h)e.forEach(function(e,t){n.set(e,t)});else if(Array.isArray(e)){var r,i=-1,o=e.length;if(1===arguments.length)for(;++i<o;)n.set(i,e[i]);else for(;++i<o;)n.set(t.call(e,r=e[i],i),r)}else for(var a in e)n.set(a,e[a]);return n};var Sa="__proto__",Aa="\0";p(h,{has:v,get:function(e){return this._[g(e)]},set:function(e,t){return this._[g(e)]=t},remove:b,keys:y,values:function(){var e=[];for(var t in this._)e.push(this._[t]);return e},entries:function(){var e=[];for(var t in this._)e.push({key:m(t),value:this._[t]});return e},size:w,empty:x,forEach:function(e){for(var t in this._)e.call(this,m(t),this._[t])}}),pa.nest=function(){function e(t,a,s){if(s>=o.length)return r?r.call(i,a):n?a.sort(n):a;for(var l,u,c,d,f=-1,p=a.length,g=o[s++],m=new h;++f<p;)(d=m.get(l=g(u=a[f])))?d.push(u):m.set(l,[u]);return t?(u=t(),c=function(n,r){u.set(n,e(t,r,s))}):(u={},c=function(n,r){u[n]=e(t,r,s)}),m.forEach(c),u}function t(e,n){if(n>=o.length)return e;var r=[],i=a[n++];return e.forEach(function(e,i){r.push({key:e,values:t(i,n)})}),i?r.sort(function(e,t){return i(e.key,t.key)}):r}var n,r,i={},o=[],a=[];return i.map=function(t,n){return e(n,t,0)},i.entries=function(n){return t(e(pa.map,n,0),0)},i.key=function(e){return o.push(e),i},i.sortKeys=function(e){return a[o.length-1]=e,i},i.sortValues=function(e){return n=e,i},i.rollup=function(e){return r=e,i},i},pa.set=function(e){var t=new _;if(e)for(var n=0,r=e.length;n<r;++n)t.add(e[n]);return t},p(_,{has:v,add:function(e){return this._[g(e+="")]=!0,e},remove:b,values:y,size:w,empty:x,forEach:function(e){for(var t in this._)e.call(this,m(t))}}),pa.behavior={},pa.rebind=function(e,t){for(var n,r=1,i=arguments.length;++r<i;)e[n=arguments[r]]=C(e,t,t[n]);return e};var Ta=["webkit","ms","moz","Moz","o","O"];pa.dispatch=function(){for(var e=new A,t=-1,n=arguments.length;++t<n;)e[arguments[t]]=T(e);return e},A.prototype.on=function(e,t){var n=e.indexOf("."),r="";if(n>=0&&(r=e.slice(n+1),e=e.slice(0,n)),e)return arguments.length<2?this[e].on(r):this[e].on(r,t);if(2===arguments.length){if(null==t)for(e in this)this.hasOwnProperty(e)&&this[e].on(r,null);return this}},pa.event=null,pa.requote=function(e){return e.replace(Da,"\\$&")};var Da=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,Na={}.__proto__?function(e,t){e.__proto__=t}:function(e,t){for(var n in t)e[n]=t[n]},Fa=function(e,t){return t.querySelector(e)},Ma=function(e,t){return t.querySelectorAll(e)},Oa=function(e,t){var n=e.matches||e[k(e,"matchesSelector")];return(Oa=function(e,t){return n.call(e,t)})(e,t)};"function"==typeof Sizzle&&(Fa=function(e,t){return Sizzle(e,t)[0]||null},Ma=Sizzle,Oa=Sizzle.matchesSelector),pa.selection=function(){return pa.select(ma.documentElement)};var La=pa.selection.prototype=[];La.select=function(e){var t,n,r,i,o=[];e=O(e);for(var a=-1,s=this.length;++a<s;){o.push(t=[]),t.parentNode=(r=this[a]).parentNode;for(var l=-1,u=r.length;++l<u;)(i=r[l])?(t.push(n=e.call(i,i.__data__,l,a)),n&&"__data__"in i&&(n.__data__=i.__data__)):t.push(null)}return M(o)},La.selectAll=function(e){var t,n,r=[];e=L(e);for(var i=-1,o=this.length;++i<o;)for(var a=this[i],s=-1,l=a.length;++s<l;)(n=a[s])&&(r.push(t=ga(e.call(n,n.__data__,s,i))),t.parentNode=n);return M(r)};var Pa="http://www.w3.org/1999/xhtml",Ia={svg:"http://www.w3.org/2000/svg",xhtml:Pa,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};pa.ns={prefix:Ia,qualify:function(e){var t=e.indexOf(":"),n=e;return t>=0&&"xmlns"!==(n=e.slice(0,t))&&(e=e.slice(t+1)),Ia.hasOwnProperty(n)?{space:Ia[n],local:e}:e}},La.attr=function(e,t){if(arguments.length<2){if("string"==typeof e){var n=this.node();return e=pa.ns.qualify(e),e.local?n.getAttributeNS(e.space,e.local):n.getAttribute(e)}for(t in e)this.each(P(t,e[t]));return this}return this.each(P(e,t))},La.classed=function(e,t){if(arguments.length<2){if("string"==typeof e){var n=this.node(),r=(e=B(e)).length,i=-1;if(t=n.classList){for(;++i<r;)if(!t.contains(e[i]))return!1}else for(t=n.getAttribute("class");++i<r;)if(!R(e[i]).test(t))return!1;return!0}for(t in e)this.each(j(t,e[t]));return this}return this.each(j(e,t))},La.style=function(e,t,n){var r=arguments.length;if(r<3){if("string"!=typeof e){r<2&&(t="");for(n in e)this.each(V(n,e[n],t));return this}if(r<2){var i=this.node();return a(i).getComputedStyle(i,null).getPropertyValue(e)}n=""}return this.each(V(e,t,n))},La.property=function(e,t){if(arguments.length<2){if("string"==typeof e)return this.node()[e];for(t in e)this.each(U(t,e[t]));return this}return this.each(U(e,t))},La.text=function(e){return arguments.length?this.each("function"==typeof e?function(){var t=e.apply(this,arguments);this.textContent=null==t?"":t}:null==e?function(){this.textContent=""}:function(){this.textContent=e}):this.node().textContent},La.html=function(e){return arguments.length?this.each("function"==typeof e?function(){var t=e.apply(this,arguments);this.innerHTML=null==t?"":t}:null==e?function(){this.innerHTML=""}:function(){this.innerHTML=e}):this.node().innerHTML},La.append=function(e){return e=W(e),this.select(function(){return this.appendChild(e.apply(this,arguments))})},La.insert=function(e,t){return e=W(e),t=O(t),this.select(function(){return this.insertBefore(e.apply(this,arguments),t.apply(this,arguments)||null)})},La.remove=function(){return this.each(q)},La.data=function(e,t){function n(e,n){var r,i,o,a=e.length,c=n.length,d=Math.min(a,c),f=new Array(c),p=new Array(c),g=new Array(a);if(t){var m,v=new h,b=new Array(a);for(r=-1;++r<a;)(i=e[r])&&(v.has(m=t.call(i,i.__data__,r))?g[r]=i:v.set(m,i),b[r]=m);for(r=-1;++r<c;)(i=v.get(m=t.call(n,o=n[r],r)))?i!==!0&&(f[r]=i,i.__data__=o):p[r]=H(o),v.set(m,!0);for(r=-1;++r<a;)r in b&&v.get(b[r])!==!0&&(g[r]=e[r])}else{for(r=-1;++r<d;)i=e[r],o=n[r],i?(i.__data__=o,f[r]=i):p[r]=H(o);for(;r<c;++r)p[r]=H(n[r]);for(;r<a;++r)g[r]=e[r]}p.update=f,p.parentNode=f.parentNode=g.parentNode=e.parentNode,s.push(p),l.push(f),u.push(g)}var r,i,o=-1,a=this.length;if(!arguments.length){for(e=new Array(a=(r=this[0]).length);++o<a;)(i=r[o])&&(e[o]=i.__data__);return e}var s=Y([]),l=M([]),u=M([]);if("function"==typeof e)for(;++o<a;)n(r=this[o],e.call(r,r.parentNode.__data__,o));else for(;++o<a;)n(r=this[o],e);return l.enter=function(){return s},l.exit=function(){return u},l},La.datum=function(e){return arguments.length?this.property("__data__",e):this.property("__data__")},La.filter=function(e){var t,n,r,i=[];"function"!=typeof e&&(e=z(e));for(var o=0,a=this.length;o<a;o++){i.push(t=[]),t.parentNode=(n=this[o]).parentNode;for(var s=0,l=n.length;s<l;s++)(r=n[s])&&e.call(r,r.__data__,s,o)&&t.push(r)}return M(i)},La.order=function(){for(var e=-1,t=this.length;++e<t;)for(var n,r=this[e],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},La.sort=function(e){e=G.apply(this,arguments);for(var t=-1,n=this.length;++t<n;)this[t].sort(e);return this.order()},La.each=function(e){return K(this,function(t,n,r){e.call(t,t.__data__,n,r)})},La.call=function(e){var t=ga(arguments);return e.apply(t[0]=this,t),this},La.empty=function(){return!this.node()},La.node=function(){for(var e=0,t=this.length;e<t;e++)for(var n=this[e],r=0,i=n.length;r<i;r++){var o=n[r];if(o)return o}return null},La.size=function(){var e=0;return K(this,function(){++e}),e};var Ra=[];pa.selection.enter=Y,pa.selection.enter.prototype=Ra,Ra.append=La.append,Ra.empty=La.empty,Ra.node=La.node,Ra.call=La.call,Ra.size=La.size,Ra.select=function(e){for(var t,n,r,i,o,a=[],s=-1,l=this.length;++s<l;){r=(i=this[s]).update,a.push(t=[]),t.parentNode=i.parentNode;for(var u=-1,c=i.length;++u<c;)(o=i[u])?(t.push(r[u]=n=e.call(i.parentNode,o.__data__,u,s)),n.__data__=o.__data__):t.push(null)}return M(a)},Ra.insert=function(e,t){return arguments.length<2&&(t=X(this)),
La.insert.call(this,e,t)},pa.select=function(e){var t;return"string"==typeof e?(t=[Fa(e,ma)],t.parentNode=ma.documentElement):(t=[e],t.parentNode=o(e)),M([t])},pa.selectAll=function(e){var t;return"string"==typeof e?(t=ga(Ma(e,ma)),t.parentNode=ma.documentElement):(t=ga(e),t.parentNode=null),M([t])},La.on=function(e,t,n){var r=arguments.length;if(r<3){if("string"!=typeof e){r<2&&(t=!1);for(n in e)this.each(Q(n,e[n],t));return this}if(r<2)return(r=this.node()["__on"+e])&&r._;n=!1}return this.each(Q(e,t,n))};var Ba=pa.map({mouseenter:"mouseover",mouseleave:"mouseout"});ma&&Ba.forEach(function(e){"on"+e in ma&&Ba.remove(e)});var ja,$a=0;pa.mouse=function(e){return te(e,N())};var Va=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;pa.touch=function(e,t,n){if(arguments.length<3&&(n=t,t=N().changedTouches),t)for(var r,i=0,o=t.length;i<o;++i)if((r=t[i]).identifier===n)return te(e,r)},pa.behavior.drag=function(){function e(){this.on("mousedown.drag",i).on("touchstart.drag",o)}function t(e,t,i,o,a){return function(){function s(){var e,n,r=t(f,g);r&&(e=r[0]-y[0],n=r[1]-y[1],h|=e|n,y=r,p({type:"drag",x:r[0]+u[0],y:r[1]+u[1],dx:e,dy:n}))}function l(){t(f,g)&&(v.on(o+m,null).on(a+m,null),b(h),p({type:"dragend"}))}var u,c=this,d=pa.event.target.correspondingElement||pa.event.target,f=c.parentNode,p=n.of(c,arguments),h=0,g=e(),m=".drag"+(null==g?"":"-"+g),v=pa.select(i(d)).on(o+m,s).on(a+m,l),b=ee(d),y=t(f,g);r?(u=r.apply(c,arguments),u=[u.x-y[0],u.y-y[1]]):u=[0,0],p({type:"dragstart"})}}var n=F(e,"drag","dragstart","dragend"),r=null,i=t(S,pa.mouse,a,"mousemove","mouseup"),o=t(ne,pa.touch,E,"touchmove","touchend");return e.origin=function(t){return arguments.length?(r=t,e):r},pa.rebind(e,n,"on")},pa.touches=function(e,t){return arguments.length<2&&(t=N().touches),t?ga(t).map(function(t){var n=te(e,t);return n.identifier=t.identifier,n}):[]};var Ua=1e-6,Wa=Ua*Ua,qa=Math.PI,Ha=2*qa,za=Ha-Ua,Ga=qa/2,Ka=qa/180,Ya=180/qa,Xa=Math.SQRT2,Qa=2,Ja=4;pa.interpolateZoom=function(e,t){var n,r,i=e[0],o=e[1],a=e[2],s=t[0],l=t[1],u=t[2],c=s-i,d=l-o,f=c*c+d*d;if(f<Wa)r=Math.log(u/a)/Xa,n=function(e){return[i+e*c,o+e*d,a*Math.exp(Xa*e*r)]};else{var p=Math.sqrt(f),h=(u*u-a*a+Ja*f)/(2*a*Qa*p),g=(u*u-a*a-Ja*f)/(2*u*Qa*p),m=Math.log(Math.sqrt(h*h+1)-h),v=Math.log(Math.sqrt(g*g+1)-g);r=(v-m)/Xa,n=function(e){var t=e*r,n=le(m),s=a/(Qa*p)*(n*ue(Xa*t+m)-se(m));return[i+s*c,o+s*d,a*n/le(Xa*t+m)]}}return n.duration=1e3*r,n},pa.behavior.zoom=function(){function e(e){e.on(N,d).on(es+".zoom",p).on("dblclick.zoom",h).on(L,f)}function t(e){return[(e[0]-C.x)/C.k,(e[1]-C.y)/C.k]}function n(e){return[e[0]*C.k+C.x,e[1]*C.k+C.y]}function r(e){C.k=Math.max(S[0],Math.min(S[1],e))}function i(e,t){t=n(t),C.x+=e[0]-t[0],C.y+=e[1]-t[1]}function o(t,n,o,a){t.__chart__={x:C.x,y:C.y,k:C.k},r(Math.pow(2,a)),i(m=n,o),t=pa.select(t),A>0&&(t=t.transition().duration(A)),t.call(e.event)}function s(){x&&x.domain(w.range().map(function(e){return(e-C.x)/C.k}).map(w.invert)),E&&E.domain(_.range().map(function(e){return(e-C.y)/C.k}).map(_.invert))}function l(e){T++||e({type:"zoomstart"})}function u(e){s(),e({type:"zoom",scale:C.k,translate:[C.x,C.y]})}function c(e){--T||(e({type:"zoomend"}),m=null)}function d(){function e(){s=1,i(pa.mouse(r),f),u(o)}function n(){d.on(M,null).on(O,null),p(s),c(o)}var r=this,o=P.of(r,arguments),s=0,d=pa.select(a(r)).on(M,e).on(O,n),f=t(pa.mouse(r)),p=ee(r);Gl.call(r),l(o)}function f(){function e(){var e=pa.touches(h);return p=C.k,e.forEach(function(e){e.identifier in m&&(m[e.identifier]=t(e))}),e}function n(){var t=pa.event.target;pa.select(t).on(w,a).on(x,s),_.push(t);for(var n=pa.event.changedTouches,r=0,i=n.length;r<i;++r)m[n[r].identifier]=null;var l=e(),u=Date.now();if(1===l.length){if(u-y<500){var c=l[0];o(h,c,m[c.identifier],Math.floor(Math.log(C.k)/Math.LN2)+1),D()}y=u}else if(l.length>1){var c=l[0],d=l[1],f=c[0]-d[0],p=c[1]-d[1];v=f*f+p*p}}function a(){var e,t,n,o,a=pa.touches(h);Gl.call(h);for(var s=0,l=a.length;s<l;++s,o=null)if(n=a[s],o=m[n.identifier]){if(t)break;e=n,t=o}if(o){var c=(c=n[0]-e[0])*c+(c=n[1]-e[1])*c,d=v&&Math.sqrt(c/v);e=[(e[0]+n[0])/2,(e[1]+n[1])/2],t=[(t[0]+o[0])/2,(t[1]+o[1])/2],r(d*p)}y=null,i(e,t),u(g)}function s(){if(pa.event.touches.length){for(var t=pa.event.changedTouches,n=0,r=t.length;n<r;++n)delete m[t[n].identifier];for(var i in m)return void e()}pa.selectAll(_).on(b,null),E.on(N,d).on(L,f),k(),c(g)}var p,h=this,g=P.of(h,arguments),m={},v=0,b=".zoom-"+pa.event.changedTouches[0].identifier,w="touchmove"+b,x="touchend"+b,_=[],E=pa.select(h),k=ee(h);n(),l(g),E.on(N,null).on(L,n)}function p(){var e=P.of(this,arguments);b?clearTimeout(b):(Gl.call(this),g=t(m=v||pa.mouse(this)),l(e)),b=setTimeout(function(){b=null,c(e)},50),D(),r(Math.pow(2,.002*Za())*C.k),i(m,g),u(e)}function h(){var e=pa.mouse(this),n=Math.log(C.k)/Math.LN2;o(this,e,t(e),pa.event.shiftKey?Math.ceil(n)-1:Math.floor(n)+1)}var g,m,v,b,y,w,x,_,E,C={x:0,y:0,k:1},k=[960,500],S=ts,A=250,T=0,N="mousedown.zoom",M="mousemove.zoom",O="mouseup.zoom",L="touchstart.zoom",P=F(e,"zoomstart","zoom","zoomend");return es||(es="onwheel"in ma?(Za=function(){return-pa.event.deltaY*(pa.event.deltaMode?120:1)},"wheel"):"onmousewheel"in ma?(Za=function(){return pa.event.wheelDelta},"mousewheel"):(Za=function(){return-pa.event.detail},"MozMousePixelScroll")),e.event=function(e){e.each(function(){var e=P.of(this,arguments),t=C;Hl?pa.select(this).transition().each("start.zoom",function(){C=this.__chart__||{x:0,y:0,k:1},l(e)}).tween("zoom:zoom",function(){var n=k[0],r=k[1],i=m?m[0]:n/2,o=m?m[1]:r/2,a=pa.interpolateZoom([(i-C.x)/C.k,(o-C.y)/C.k,n/C.k],[(i-t.x)/t.k,(o-t.y)/t.k,n/t.k]);return function(t){var r=a(t),s=n/r[2];this.__chart__=C={x:i-r[0]*s,y:o-r[1]*s,k:s},u(e)}}).each("interrupt.zoom",function(){c(e)}).each("end.zoom",function(){c(e)}):(this.__chart__=C,l(e),u(e),c(e))})},e.translate=function(t){return arguments.length?(C={x:+t[0],y:+t[1],k:C.k},s(),e):[C.x,C.y]},e.scale=function(t){return arguments.length?(C={x:C.x,y:C.y,k:null},r(+t),s(),e):C.k},e.scaleExtent=function(t){return arguments.length?(S=null==t?ts:[+t[0],+t[1]],e):S},e.center=function(t){return arguments.length?(v=t&&[+t[0],+t[1]],e):v},e.size=function(t){return arguments.length?(k=t&&[+t[0],+t[1]],e):k},e.duration=function(t){return arguments.length?(A=+t,e):A},e.x=function(t){return arguments.length?(x=t,w=t.copy(),C={x:0,y:0,k:1},e):x},e.y=function(t){return arguments.length?(E=t,_=t.copy(),C={x:0,y:0,k:1},e):E},pa.rebind(e,P,"on")};var Za,es,ts=[0,1/0];pa.color=de,de.prototype.toString=function(){return this.rgb()+""},pa.hsl=fe;var ns=fe.prototype=new de;ns.brighter=function(e){return e=Math.pow(.7,arguments.length?e:1),new fe(this.h,this.s,this.l/e)},ns.darker=function(e){return e=Math.pow(.7,arguments.length?e:1),new fe(this.h,this.s,e*this.l)},ns.rgb=function(){return pe(this.h,this.s,this.l)},pa.hcl=he;var rs=he.prototype=new de;rs.brighter=function(e){return new he(this.h,this.c,Math.min(100,this.l+is*(arguments.length?e:1)))},rs.darker=function(e){return new he(this.h,this.c,Math.max(0,this.l-is*(arguments.length?e:1)))},rs.rgb=function(){return ge(this.h,this.c,this.l).rgb()},pa.lab=me;var is=18,os=.95047,as=1,ss=1.08883,ls=me.prototype=new de;ls.brighter=function(e){return new me(Math.min(100,this.l+is*(arguments.length?e:1)),this.a,this.b)},ls.darker=function(e){return new me(Math.max(0,this.l-is*(arguments.length?e:1)),this.a,this.b)},ls.rgb=function(){return ve(this.l,this.a,this.b)},pa.rgb=_e;var us=_e.prototype=new de;us.brighter=function(e){e=Math.pow(.7,arguments.length?e:1);var t=this.r,n=this.g,r=this.b,i=30;return t||n||r?(t&&t<i&&(t=i),n&&n<i&&(n=i),r&&r<i&&(r=i),new _e(Math.min(255,t/e),Math.min(255,n/e),Math.min(255,r/e))):new _e(i,i,i)},us.darker=function(e){return e=Math.pow(.7,arguments.length?e:1),new _e(e*this.r,e*this.g,e*this.b)},us.hsl=function(){return Ae(this.r,this.g,this.b)},us.toString=function(){return"#"+ke(this.r)+ke(this.g)+ke(this.b)};var cs=pa.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});cs.forEach(function(e,t){cs.set(e,Ee(t))}),pa.functor=Fe,pa.xhr=Me(E),pa.dsv=function(e,t){function n(e,n,o){arguments.length<3&&(o=n,n=null);var a=Oe(e,t,null==n?r:i(n),o);return a.row=function(e){return arguments.length?a.response(null==(n=e)?r:i(e)):n},a}function r(e){return n.parse(e.responseText)}function i(e){return function(t){return n.parse(t.responseText,e)}}function o(t){return t.map(a).join(e)}function a(e){return s.test(e)?'"'+e.replace(/\"/g,'""')+'"':e}var s=new RegExp('["'+e+"\n]"),l=e.charCodeAt(0);return n.parse=function(e,t){var r;return n.parseRows(e,function(e,n){if(r)return r(e,n-1);var i=new Function("d","return {"+e.map(function(e,t){return JSON.stringify(e)+": d["+t+"]"}).join(",")+"}");r=t?function(e,n){return t(i(e),n)}:i})},n.parseRows=function(e,t){function n(){if(c>=u)return a;if(i)return i=!1,o;var t=c;if(34===e.charCodeAt(t)){for(var n=t;n++<u;)if(34===e.charCodeAt(n)){if(34!==e.charCodeAt(n+1))break;++n}c=n+2;var r=e.charCodeAt(n+1);return 13===r?(i=!0,10===e.charCodeAt(n+2)&&++c):10===r&&(i=!0),e.slice(t+1,n).replace(/""/g,'"')}for(;c<u;){var r=e.charCodeAt(c++),s=1;if(10===r)i=!0;else if(13===r)i=!0,10===e.charCodeAt(c)&&(++c,++s);else if(r!==l)continue;return e.slice(t,c-s)}return e.slice(t)}for(var r,i,o={},a={},s=[],u=e.length,c=0,d=0;(r=n())!==a;){for(var f=[];r!==o&&r!==a;)f.push(r),r=n();t&&null==(f=t(f,d++))||s.push(f)}return s},n.format=function(t){if(Array.isArray(t[0]))return n.formatRows(t);var r=new _,i=[];return t.forEach(function(e){for(var t in e)r.has(t)||i.push(r.add(t))}),[i.map(a).join(e)].concat(t.map(function(t){return i.map(function(e){return a(t[e])}).join(e)})).join("\n")},n.formatRows=function(e){return e.map(o).join("\n")},n},pa.csv=pa.dsv(",","text/csv"),pa.tsv=pa.dsv("\t","text/tab-separated-values");var ds,fs,ps,hs,gs=this[k(this,"requestAnimationFrame")]||function(e){setTimeout(e,17)};pa.timer=function(){Ie.apply(this,arguments)},pa.timer.flush=function(){Be(),je()},pa.round=function(e,t){return t?Math.round(e*(t=Math.pow(10,t)))/t:Math.round(e)};var ms=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"].map(Ve);pa.formatPrefix=function(e,t){var n=0;return(e=+e)&&(e<0&&(e*=-1),t&&(e=pa.round(e,$e(e,t))),n=1+Math.floor(1e-12+Math.log(e)/Math.LN10),n=Math.max(-24,Math.min(24,3*Math.floor((n-1)/3)))),ms[8+n/3]};var vs=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,bs=pa.map({b:function(e){return e.toString(2)},c:function(e){return String.fromCharCode(e)},o:function(e){return e.toString(8)},x:function(e){return e.toString(16)},X:function(e){return e.toString(16).toUpperCase()},g:function(e,t){return e.toPrecision(t)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},r:function(e,t){return(e=pa.round(e,$e(e,t))).toFixed(Math.max(0,Math.min(20,$e(e*(1+1e-15),t))))}}),ys=pa.time={},ws=Date;qe.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){xs.setUTCDate.apply(this._,arguments)},setDay:function(){xs.setUTCDay.apply(this._,arguments)},setFullYear:function(){xs.setUTCFullYear.apply(this._,arguments)},setHours:function(){xs.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){xs.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){xs.setUTCMinutes.apply(this._,arguments)},setMonth:function(){xs.setUTCMonth.apply(this._,arguments)},setSeconds:function(){xs.setUTCSeconds.apply(this._,arguments)},setTime:function(){xs.setTime.apply(this._,arguments)}};var xs=Date.prototype;ys.year=He(function(e){return e=ys.day(e),e.setMonth(0,1),e},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e){return e.getFullYear()}),ys.years=ys.year.range,ys.years.utc=ys.year.utc.range,ys.day=He(function(e){var t=new ws(2e3,0);return t.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),t},function(e,t){e.setDate(e.getDate()+t)},function(e){return e.getDate()-1}),ys.days=ys.day.range,ys.days.utc=ys.day.utc.range,ys.dayOfYear=function(e){var t=ys.year(e);return Math.floor((e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(e,t){t=7-t;var n=ys[e]=He(function(e){return(e=ys.day(e)).setDate(e.getDate()-(e.getDay()+t)%7),e},function(e,t){e.setDate(e.getDate()+7*Math.floor(t))},function(e){var n=ys.year(e).getDay();return Math.floor((ys.dayOfYear(e)+(n+t)%7)/7)-(n!==t)});ys[e+"s"]=n.range,ys[e+"s"].utc=n.utc.range,ys[e+"OfYear"]=function(e){var n=ys.year(e).getDay();return Math.floor((ys.dayOfYear(e)+(n+t)%7)/7)}}),ys.week=ys.sunday,ys.weeks=ys.sunday.range,ys.weeks.utc=ys.sunday.utc.range,ys.weekOfYear=ys.sundayOfYear;var _s={"-":"",_:" ",0:"0"},Es=/^\s*\d+/,Cs=/^%/;pa.locale=function(e){return{numberFormat:Ue(e),timeFormat:Ge(e)}};var ks=pa.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});pa.format=ks.numberFormat,pa.geo={},ht.prototype={s:0,t:0,add:function(e){gt(e,this.t,Ss),gt(Ss.s,this.s,this),this.s?this.t+=Ss.t:this.s=Ss.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var Ss=new ht;pa.geo.stream=function(e,t){e&&As.hasOwnProperty(e.type)?As[e.type](e,t):mt(e,t)};var As={Feature:function(e,t){mt(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r<i;)mt(n[r].geometry,t)}},Ts={Sphere:function(e,t){t.sphere()},Point:function(e,t){e=e.coordinates,t.point(e[0],e[1],e[2])},MultiPoint:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)e=n[r],t.point(e[0],e[1],e[2])},LineString:function(e,t){vt(e.coordinates,t,0)},MultiLineString:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)vt(n[r],t,0)},Polygon:function(e,t){bt(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)bt(n[r],t)},GeometryCollection:function(e,t){for(var n=e.geometries,r=-1,i=n.length;++r<i;)mt(n[r],t)}};pa.geo.area=function(e){return Ds=0,pa.geo.stream(e,Fs),Ds};var Ds,Ns=new ht,Fs={sphere:function(){Ds+=4*qa},point:S,lineStart:S,lineEnd:S,polygonStart:function(){Ns.reset(),Fs.lineStart=yt},polygonEnd:function(){var e=2*Ns;Ds+=e<0?4*qa+e:e,Fs.lineStart=Fs.lineEnd=Fs.point=S}};pa.geo.bounds=function(){function e(e,t){y.push(w=[c=e,f=e]),t<d&&(d=t),t>p&&(p=t)}function t(t,n){var r=wt([t*Ka,n*Ka]);if(v){var i=_t(v,r),o=[i[1],-i[0],0],a=_t(o,i);kt(a),a=St(a);var l=t-h,u=l>0?1:-1,g=a[0]*Ya*u,m=ka(l)>180;if(m^(u*h<g&&g<u*t)){var b=a[1]*Ya;b>p&&(p=b)}else if(g=(g+360)%360-180,m^(u*h<g&&g<u*t)){var b=-a[1]*Ya;b<d&&(d=b)}else n<d&&(d=n),n>p&&(p=n);m?t<h?s(c,t)>s(c,f)&&(f=t):s(t,f)>s(c,f)&&(c=t):f>=c?(t<c&&(c=t),t>f&&(f=t)):t>h?s(c,t)>s(c,f)&&(f=t):s(t,f)>s(c,f)&&(c=t)}else e(t,n);v=r,h=t}function n(){x.point=t}function r(){w[0]=c,w[1]=f,x.point=e,v=null}function i(e,n){if(v){var r=e-h;b+=ka(r)>180?r+(r>0?360:-360):r}else g=e,m=n;Fs.point(e,n),t(e,n)}function o(){Fs.lineStart()}function a(){i(g,m),Fs.lineEnd(),ka(b)>Ua&&(c=-(f=180)),w[0]=c,w[1]=f,v=null}function s(e,t){return(t-=e)<0?t+360:t}function l(e,t){return e[0]-t[0]}function u(e,t){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:e<t[0]||t[1]<e}var c,d,f,p,h,g,m,v,b,y,w,x={point:e,lineStart:n,lineEnd:r,polygonStart:function(){x.point=i,x.lineStart=o,x.lineEnd=a,b=0,Fs.polygonStart()},polygonEnd:function(){Fs.polygonEnd(),x.point=e,x.lineStart=n,x.lineEnd=r,Ns<0?(c=-(f=180),d=-(p=90)):b>Ua?p=90:b<-Ua&&(d=-90),w[0]=c,w[1]=f}};return function(e){p=f=-(c=d=1/0),y=[],pa.geo.stream(e,x);var t=y.length;if(t){y.sort(l);for(var n,r=1,i=y[0],o=[i];r<t;++r)n=y[r],u(n[0],i)||u(n[1],i)?(s(i[0],n[1])>s(i[0],i[1])&&(i[1]=n[1]),s(n[0],i[1])>s(i[0],i[1])&&(i[0]=n[0])):o.push(i=n);for(var a,n,h=-(1/0),t=o.length-1,r=0,i=o[t];r<=t;i=n,++r)n=o[r],(a=s(i[1],n[0]))>h&&(h=a,c=n[0],f=i[1])}return y=w=null,c===1/0||d===1/0?[[NaN,NaN],[NaN,NaN]]:[[c,d],[f,p]]}}(),pa.geo.centroid=function(e){Ms=Os=Ls=Ps=Is=Rs=Bs=js=$s=Vs=Us=0,pa.geo.stream(e,Ws);var t=$s,n=Vs,r=Us,i=t*t+n*n+r*r;return i<Wa&&(t=Rs,n=Bs,r=js,Os<Ua&&(t=Ls,n=Ps,r=Is),i=t*t+n*n+r*r,i<Wa)?[NaN,NaN]:[Math.atan2(n,t)*Ya,ae(r/Math.sqrt(i))*Ya]};var Ms,Os,Ls,Ps,Is,Rs,Bs,js,$s,Vs,Us,Ws={sphere:S,point:Tt,lineStart:Nt,lineEnd:Ft,polygonStart:function(){Ws.lineStart=Mt},polygonEnd:function(){Ws.lineStart=Nt}},qs=Bt(Lt,Ut,qt,[-qa,-qa/2]),Hs=1e9;pa.geo.clipExtent=function(){var e,t,n,r,i,o,a={stream:function(e){return i&&(i.valid=!1),i=o(e),i.valid=!0,i},extent:function(s){return arguments.length?(o=Kt(e=+s[0][0],t=+s[0][1],n=+s[1][0],r=+s[1][1]),i&&(i.valid=!1,i=null),a):[[e,t],[n,r]]}};return a.extent([[0,0],[960,500]])},(pa.geo.conicEqualArea=function(){return Yt(Xt)}).raw=Xt,pa.geo.albers=function(){return pa.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},pa.geo.albersUsa=function(){function e(e){var o=e[0],a=e[1];return t=null,n(o,a),t||(r(o,a),t)||i(o,a),t}var t,n,r,i,o=pa.geo.albers(),a=pa.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),s=pa.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),l={point:function(e,n){t=[e,n]}};return e.invert=function(e){var t=o.scale(),n=o.translate(),r=(e[0]-n[0])/t,i=(e[1]-n[1])/t;return(i>=.12&&i<.234&&r>=-.425&&r<-.214?a:i>=.166&&i<.234&&r>=-.214&&r<-.115?s:o).invert(e)},e.stream=function(e){var t=o.stream(e),n=a.stream(e),r=s.stream(e);return{point:function(e,i){t.point(e,i),n.point(e,i),r.point(e,i)},sphere:function(){t.sphere(),n.sphere(),r.sphere()},lineStart:function(){t.lineStart(),n.lineStart(),r.lineStart()},lineEnd:function(){t.lineEnd(),n.lineEnd(),r.lineEnd()},polygonStart:function(){t.polygonStart(),n.polygonStart(),r.polygonStart()},polygonEnd:function(){t.polygonEnd(),n.polygonEnd(),r.polygonEnd()}}},e.precision=function(t){return arguments.length?(o.precision(t),a.precision(t),s.precision(t),e):o.precision()},e.scale=function(t){return arguments.length?(o.scale(t),a.scale(.35*t),s.scale(t),e.translate(o.translate())):o.scale()},e.translate=function(t){if(!arguments.length)return o.translate();var u=o.scale(),c=+t[0],d=+t[1];return n=o.translate(t).clipExtent([[c-.455*u,d-.238*u],[c+.455*u,d+.238*u]]).stream(l).point,r=a.translate([c-.307*u,d+.201*u]).clipExtent([[c-.425*u+Ua,d+.12*u+Ua],[c-.214*u-Ua,d+.234*u-Ua]]).stream(l).point,i=s.translate([c-.205*u,d+.212*u]).clipExtent([[c-.214*u+Ua,d+.166*u+Ua],[c-.115*u-Ua,d+.234*u-Ua]]).stream(l).point,e},e.scale(1070)};var zs,Gs,Ks,Ys,Xs,Qs,Js={point:S,lineStart:S,lineEnd:S,polygonStart:function(){Gs=0,Js.lineStart=Qt},polygonEnd:function(){Js.lineStart=Js.lineEnd=Js.point=S,zs+=ka(Gs/2)}},Zs={point:Jt,lineStart:S,lineEnd:S,polygonStart:S,polygonEnd:S},el={point:tn,lineStart:nn,lineEnd:rn,polygonStart:function(){el.lineStart=on},polygonEnd:function(){el.point=tn,el.lineStart=nn,el.lineEnd=rn}};pa.geo.path=function(){function e(e){return e&&("function"==typeof s&&o.pointRadius(+s.apply(this,arguments)),a&&a.valid||(a=i(o)),pa.geo.stream(e,a)),o.result()}function t(){return a=null,e}var n,r,i,o,a,s=4.5;return e.area=function(e){return zs=0,pa.geo.stream(e,i(Js)),zs},e.centroid=function(e){return Ls=Ps=Is=Rs=Bs=js=$s=Vs=Us=0,pa.geo.stream(e,i(el)),Us?[$s/Us,Vs/Us]:js?[Rs/js,Bs/js]:Is?[Ls/Is,Ps/Is]:[NaN,NaN]},e.bounds=function(e){return Xs=Qs=-(Ks=Ys=1/0),pa.geo.stream(e,i(Zs)),[[Ks,Ys],[Xs,Qs]]},e.projection=function(e){return arguments.length?(i=(n=e)?e.stream||ln(e):E,t()):n},e.context=function(e){return arguments.length?(o=null==(r=e)?new Zt:new an(e),"function"!=typeof s&&o.pointRadius(s),t()):r},e.pointRadius=function(t){return arguments.length?(s="function"==typeof t?t:(o.pointRadius(+t),+t),e):s},e.projection(pa.geo.albersUsa()).context(null)},pa.geo.transform=function(e){return{stream:function(t){var n=new un(t);for(var r in e)n[r]=e[r];return n}}},un.prototype={point:function(e,t){this.stream.point(e,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},pa.geo.projection=dn,pa.geo.projectionMutator=fn,(pa.geo.equirectangular=function(){return dn(hn)}).raw=hn.invert=hn,pa.geo.rotation=function(e){function t(t){return t=e(t[0]*Ka,t[1]*Ka),t[0]*=Ya,t[1]*=Ya,t}return e=mn(e[0]%360*Ka,e[1]*Ka,e.length>2?e[2]*Ka:0),t.invert=function(t){return t=e.invert(t[0]*Ka,t[1]*Ka),t[0]*=Ya,t[1]*=Ya,t},t},gn.invert=hn,pa.geo.circle=function(){function e(){var e="function"==typeof r?r.apply(this,arguments):r,t=mn(-e[0]*Ka,-e[1]*Ka,0).invert,i=[];return n(null,null,1,{point:function(e,n){i.push(e=t(e,n)),e[0]*=Ya,e[1]*=Ya}}),{type:"Polygon",coordinates:[i]}}var t,n,r=[0,0],i=6;return e.origin=function(t){return arguments.length?(r=t,e):r},e.angle=function(r){return arguments.length?(n=wn((t=+r)*Ka,i*Ka),e):t},e.precision=function(r){return arguments.length?(n=wn(t*Ka,(i=+r)*Ka),e):i},e.angle(90)},pa.geo.distance=function(e,t){var n,r=(t[0]-e[0])*Ka,i=e[1]*Ka,o=t[1]*Ka,a=Math.sin(r),s=Math.cos(r),l=Math.sin(i),u=Math.cos(i),c=Math.sin(o),d=Math.cos(o);return Math.atan2(Math.sqrt((n=d*a)*n+(n=u*c-l*d*s)*n),l*c+u*d*s)},pa.geo.graticule=function(){function e(){return{type:"MultiLineString",coordinates:t()}}function t(){return pa.range(Math.ceil(o/m)*m,i,m).map(f).concat(pa.range(Math.ceil(u/v)*v,l,v).map(p)).concat(pa.range(Math.ceil(r/h)*h,n,h).filter(function(e){return ka(e%m)>Ua}).map(c)).concat(pa.range(Math.ceil(s/g)*g,a,g).filter(function(e){return ka(e%v)>Ua}).map(d))}var n,r,i,o,a,s,l,u,c,d,f,p,h=10,g=h,m=90,v=360,b=2.5;return e.lines=function(){return t().map(function(e){return{type:"LineString",coordinates:e}})},e.outline=function(){return{type:"Polygon",coordinates:[f(o).concat(p(l).slice(1),f(i).reverse().slice(1),p(u).reverse().slice(1))]}},e.extent=function(t){return arguments.length?e.majorExtent(t).minorExtent(t):e.minorExtent()},e.majorExtent=function(t){return arguments.length?(o=+t[0][0],i=+t[1][0],u=+t[0][1],l=+t[1][1],o>i&&(t=o,o=i,i=t),u>l&&(t=u,u=l,l=t),e.precision(b)):[[o,u],[i,l]]},e.minorExtent=function(t){return arguments.length?(r=+t[0][0],n=+t[1][0],s=+t[0][1],a=+t[1][1],r>n&&(t=r,r=n,n=t),s>a&&(t=s,s=a,a=t),e.precision(b)):[[r,s],[n,a]]},e.step=function(t){return arguments.length?e.majorStep(t).minorStep(t):e.minorStep()},e.majorStep=function(t){return arguments.length?(m=+t[0],v=+t[1],e):[m,v]},e.minorStep=function(t){return arguments.length?(h=+t[0],g=+t[1],e):[h,g]},e.precision=function(t){return arguments.length?(b=+t,c=_n(s,a,90),d=En(r,n,b),f=_n(u,l,90),p=En(o,i,b),e):b},e.majorExtent([[-180,-90+Ua],[180,90-Ua]]).minorExtent([[-180,-80-Ua],[180,80+Ua]])},pa.geo.greatArc=function(){function e(){return{type:"LineString",coordinates:[t||r.apply(this,arguments),n||i.apply(this,arguments)]}}var t,n,r=Cn,i=kn;return e.distance=function(){return pa.geo.distance(t||r.apply(this,arguments),n||i.apply(this,arguments))},e.source=function(n){return arguments.length?(r=n,t="function"==typeof n?null:n,e):r},e.target=function(t){return arguments.length?(i=t,n="function"==typeof t?null:t,e):i},e.precision=function(){return arguments.length?e:0},e},pa.geo.interpolate=function(e,t){return Sn(e[0]*Ka,e[1]*Ka,t[0]*Ka,t[1]*Ka)},pa.geo.length=function(e){return tl=0,pa.geo.stream(e,nl),tl};var tl,nl={sphere:S,point:S,lineStart:An,lineEnd:S,polygonStart:S,polygonEnd:S},rl=Tn(function(e){return Math.sqrt(2/(1+e))},function(e){return 2*Math.asin(e/2)});(pa.geo.azimuthalEqualArea=function(){return dn(rl)}).raw=rl;var il=Tn(function(e){var t=Math.acos(e);return t&&t/Math.sin(t)},E);(pa.geo.azimuthalEquidistant=function(){return dn(il)}).raw=il,(pa.geo.conicConformal=function(){return Yt(Dn)}).raw=Dn,(pa.geo.conicEquidistant=function(){return Yt(Nn)}).raw=Nn;var ol=Tn(function(e){return 1/e},Math.atan);(pa.geo.gnomonic=function(){return dn(ol)}).raw=ol,Fn.invert=function(e,t){return[e,2*Math.atan(Math.exp(t))-Ga]},(pa.geo.mercator=function(){return Mn(Fn)}).raw=Fn;var al=Tn(function(){return 1},Math.asin);(pa.geo.orthographic=function(){return dn(al)}).raw=al;var sl=Tn(function(e){return 1/(1+e)},function(e){return 2*Math.atan(e)});(pa.geo.stereographic=function(){return dn(sl)}).raw=sl,On.invert=function(e,t){return[-t,2*Math.atan(Math.exp(e))-Ga]},(pa.geo.transverseMercator=function(){var e=Mn(On),t=e.center,n=e.rotate;return e.center=function(e){return e?t([-e[1],e[0]]):(e=t(),[e[1],-e[0]])},e.rotate=function(e){return e?n([e[0],e[1],e.length>2?e[2]+90:90]):(e=n(),[e[0],e[1],e[2]-90])},n([0,0,90])}).raw=On,pa.geom={},pa.geom.hull=function(e){function t(e){if(e.length<3)return[];var t,i=Fe(n),o=Fe(r),a=e.length,s=[],l=[];for(t=0;t<a;t++)s.push([+i.call(this,e[t],t),+o.call(this,e[t],t),t]);for(s.sort(Rn),t=0;t<a;t++)l.push([s[t][0],-s[t][1]]);var u=In(s),c=In(l),d=c[0]===u[0],f=c[c.length-1]===u[u.length-1],p=[];for(t=u.length-1;t>=0;--t)p.push(e[s[u[t]][2]]);for(t=+d;t<c.length-f;++t)p.push(e[s[c[t]][2]]);return p}var n=Ln,r=Pn;return arguments.length?t(e):(t.x=function(e){return arguments.length?(n=e,t):n},t.y=function(e){return arguments.length?(r=e,t):r},t)},pa.geom.polygon=function(e){return Na(e,ll),e};var ll=pa.geom.polygon.prototype=[];ll.area=function(){for(var e,t=-1,n=this.length,r=this[n-1],i=0;++t<n;)e=r,r=this[t],i+=e[1]*r[0]-e[0]*r[1];return.5*i},ll.centroid=function(e){var t,n,r=-1,i=this.length,o=0,a=0,s=this[i-1];for(arguments.length||(e=-1/(6*this.area()));++r<i;)t=s,s=this[r],n=t[0]*s[1]-s[0]*t[1],o+=(t[0]+s[0])*n,a+=(t[1]+s[1])*n;return[o*e,a*e]},ll.clip=function(e){for(var t,n,r,i,o,a,s=$n(e),l=-1,u=this.length-$n(this),c=this[u-1];++l<u;){for(t=e.slice(),e.length=0,i=this[l],o=t[(r=t.length-s)-1],n=-1;++n<r;)a=t[n],Bn(a,c,i)?(Bn(o,c,i)||e.push(jn(o,a,c,i)),e.push(a)):Bn(o,c,i)&&e.push(jn(o,a,c,i)),o=a;s&&e.push(e[0]),c=i}return e};var ul,cl,dl,fl,pl,hl=[],gl=[];Kn.prototype.prepare=function(){for(var e,t=this.edges,n=t.length;n--;)e=t[n].edge,e.b&&e.a||t.splice(n,1);return t.sort(Xn),t.length},ar.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}},sr.prototype={insert:function(e,t){var n,r,i;if(e){if(t.P=e,t.N=e.N,e.N&&(e.N.P=t),e.N=t,e.R){for(e=e.R;e.L;)e=e.L;e.L=t}else e.R=t;n=e}else this._?(e=dr(this._),t.P=null,t.N=e,e.P=e.L=t,n=e):(t.P=t.N=null,this._=t,n=null);for(t.L=t.R=null,t.U=n,t.C=!0,e=t;n&&n.C;)r=n.U,n===r.L?(i=r.R,i&&i.C?(n.C=i.C=!1,r.C=!0,e=r):(e===n.R&&(ur(this,n),e=n,n=e.U),n.C=!1,r.C=!0,cr(this,r))):(i=r.L,i&&i.C?(n.C=i.C=!1,r.C=!0,e=r):(e===n.L&&(cr(this,n),e=n,n=e.U),n.C=!1,r.C=!0,ur(this,r))),n=e.U;this._.C=!1},remove:function(e){e.N&&(e.N.P=e.P),e.P&&(e.P.N=e.N),e.N=e.P=null;var t,n,r,i=e.U,o=e.L,a=e.R;if(n=o?a?dr(a):o:a,i?i.L===e?i.L=n:i.R=n:this._=n,o&&a?(r=n.C,n.C=e.C,n.L=o,o.U=n,n!==a?(i=n.U,n.U=e.U,e=n.R,i.L=e,n.R=a,a.U=n):(n.U=i,i=n,e=n.R)):(r=e.C,e=n),e&&(e.U=i),!r){if(e&&e.C)return void(e.C=!1);do{if(e===this._)break;if(e===i.L){if(t=i.R,t.C&&(t.C=!1,i.C=!0,ur(this,i),t=i.R),t.L&&t.L.C||t.R&&t.R.C){t.R&&t.R.C||(t.L.C=!1,t.C=!0,cr(this,t),t=i.R),t.C=i.C,i.C=t.R.C=!1,ur(this,i),e=this._;break}}else if(t=i.L,t.C&&(t.C=!1,i.C=!0,cr(this,i),t=i.L),t.L&&t.L.C||t.R&&t.R.C){t.L&&t.L.C||(t.R.C=!1,t.C=!0,ur(this,t),t=i.L),t.C=i.C,i.C=t.L.C=!1,cr(this,i),e=this._;break}t.C=!0,e=i,i=i.U}while(!e.C);e&&(e.C=!1)}}},pa.geom.voronoi=function(e){function t(e){var t=new Array(e.length),r=s[0][0],i=s[0][1],o=s[1][0],a=s[1][1];return fr(n(e),s).cells.forEach(function(n,s){var l=n.edges,u=n.site,c=t[s]=l.length?l.map(function(e){var t=e.start();return[t.x,t.y]}):u.x>=r&&u.x<=o&&u.y>=i&&u.y<=a?[[r,a],[o,a],[o,i],[r,i]]:[];c.point=e[s]}),t}function n(e){return e.map(function(e,t){return{x:Math.round(o(e,t)/Ua)*Ua,y:Math.round(a(e,t)/Ua)*Ua,i:t}})}var r=Ln,i=Pn,o=r,a=i,s=ml;return e?t(e):(t.links=function(e){return fr(n(e)).edges.filter(function(e){return e.l&&e.r}).map(function(t){return{source:e[t.l.i],target:e[t.r.i]}})},t.triangles=function(e){var t=[];return fr(n(e)).cells.forEach(function(n,r){for(var i,o,a=n.site,s=n.edges.sort(Xn),l=-1,u=s.length,c=s[u-1].edge,d=c.l===a?c.r:c.l;++l<u;)i=c,o=d,c=s[l].edge,d=c.l===a?c.r:c.l,r<o.i&&r<d.i&&hr(a,o,d)<0&&t.push([e[r],e[o.i],e[d.i]])}),t},t.x=function(e){return arguments.length?(o=Fe(r=e),t):r},t.y=function(e){return arguments.length?(a=Fe(i=e),t):i},t.clipExtent=function(e){return arguments.length?(s=null==e?ml:e,t):s===ml?null:s},t.size=function(e){return arguments.length?t.clipExtent(e&&[[0,0],e]):s===ml?null:s&&s[1]},t)};var ml=[[-1e6,-1e6],[1e6,1e6]];pa.geom.delaunay=function(e){
return pa.geom.voronoi().triangles(e)},pa.geom.quadtree=function(e,t,n,r,i){function o(e){function o(e,t,n,r,i,o,a,s){if(!isNaN(n)&&!isNaN(r))if(e.leaf){var l=e.x,c=e.y;if(null!=l)if(ka(l-n)+ka(c-r)<.01)u(e,t,n,r,i,o,a,s);else{var d=e.point;e.x=e.y=e.point=null,u(e,d,l,c,i,o,a,s),u(e,t,n,r,i,o,a,s)}else e.x=n,e.y=r,e.point=t}else u(e,t,n,r,i,o,a,s)}function u(e,t,n,r,i,a,s,l){var u=.5*(i+s),c=.5*(a+l),d=n>=u,f=r>=c,p=f<<1|d;e.leaf=!1,e=e.nodes[p]||(e.nodes[p]=vr()),d?i=u:s=u,f?a=c:l=c,o(e,t,n,r,i,a,s,l)}var c,d,f,p,h,g,m,v,b,y=Fe(s),w=Fe(l);if(null!=t)g=t,m=n,v=r,b=i;else if(v=b=-(g=m=1/0),d=[],f=[],h=e.length,a)for(p=0;p<h;++p)c=e[p],c.x<g&&(g=c.x),c.y<m&&(m=c.y),c.x>v&&(v=c.x),c.y>b&&(b=c.y),d.push(c.x),f.push(c.y);else for(p=0;p<h;++p){var x=+y(c=e[p],p),_=+w(c,p);x<g&&(g=x),_<m&&(m=_),x>v&&(v=x),_>b&&(b=_),d.push(x),f.push(_)}var E=v-g,C=b-m;E>C?b=m+E:v=g+C;var k=vr();if(k.add=function(e){o(k,e,+y(e,++p),+w(e,p),g,m,v,b)},k.visit=function(e){br(e,k,g,m,v,b)},k.find=function(e){return yr(k,e[0],e[1],g,m,v,b)},p=-1,null==t){for(;++p<h;)o(k,e[p],d[p],f[p],g,m,v,b);--p}else e.forEach(k.add);return d=f=e=c=null,k}var a,s=Ln,l=Pn;return(a=arguments.length)?(s=gr,l=mr,3===a&&(i=n,r=t,n=t=0),o(e)):(o.x=function(e){return arguments.length?(s=e,o):s},o.y=function(e){return arguments.length?(l=e,o):l},o.extent=function(e){return arguments.length?(null==e?t=n=r=i=null:(t=+e[0][0],n=+e[0][1],r=+e[1][0],i=+e[1][1]),o):null==t?null:[[t,n],[r,i]]},o.size=function(e){return arguments.length?(null==e?t=n=r=i=null:(t=n=0,r=+e[0],i=+e[1]),o):null==t?null:[r-t,i-n]},o)},pa.interpolateRgb=wr,pa.interpolateObject=xr,pa.interpolateNumber=_r,pa.interpolateString=Er;var vl=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,bl=new RegExp(vl.source,"g");pa.interpolate=Cr,pa.interpolators=[function(e,t){var n=typeof t;return("string"===n?cs.has(t.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(t)?wr:Er:t instanceof de?wr:Array.isArray(t)?kr:"object"===n&&isNaN(t)?xr:_r)(e,t)}],pa.interpolateArray=kr;var yl=function(){return E},wl=pa.map({linear:yl,poly:Mr,quad:function(){return Dr},cubic:function(){return Nr},sin:function(){return Or},exp:function(){return Lr},circle:function(){return Pr},elastic:Ir,back:Rr,bounce:function(){return Br}}),xl=pa.map({"in":E,out:Ar,"in-out":Tr,"out-in":function(e){return Tr(Ar(e))}});pa.ease=function(e){var t=e.indexOf("-"),n=t>=0?e.slice(0,t):e,r=t>=0?e.slice(t+1):"in";return n=wl.get(n)||yl,r=xl.get(r)||E,Sr(r(n.apply(null,ha.call(arguments,1))))},pa.interpolateHcl=jr,pa.interpolateHsl=$r,pa.interpolateLab=Vr,pa.interpolateRound=Ur,pa.transform=function(e){var t=ma.createElementNS(pa.ns.prefix.svg,"g");return(pa.transform=function(e){if(null!=e){t.setAttribute("transform",e);var n=t.transform.baseVal.consolidate()}return new Wr(n?n.matrix:_l)})(e)},Wr.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var _l={a:1,b:0,c:0,d:1,e:0,f:0};pa.interpolateTransform=Jr,pa.layout={},pa.layout.bundle=function(){return function(e){for(var t=[],n=-1,r=e.length;++n<r;)t.push(ti(e[n]));return t}},pa.layout.chord=function(){function e(){var e,u,d,f,p,h={},g=[],m=pa.range(o),v=[];for(n=[],r=[],e=0,f=-1;++f<o;){for(u=0,p=-1;++p<o;)u+=i[f][p];g.push(u),v.push(pa.range(o)),e+=u}for(a&&m.sort(function(e,t){return a(g[e],g[t])}),s&&v.forEach(function(e,t){e.sort(function(e,n){return s(i[t][e],i[t][n])})}),e=(Ha-c*o)/e,u=0,f=-1;++f<o;){for(d=u,p=-1;++p<o;){var b=m[f],y=v[b][p],w=i[b][y],x=u,_=u+=w*e;h[b+"-"+y]={index:b,subindex:y,startAngle:x,endAngle:_,value:w}}r[b]={index:b,startAngle:d,endAngle:u,value:g[b]},u+=c}for(f=-1;++f<o;)for(p=f-1;++p<o;){var E=h[f+"-"+p],C=h[p+"-"+f];(E.value||C.value)&&n.push(E.value<C.value?{source:C,target:E}:{source:E,target:C})}l&&t()}function t(){n.sort(function(e,t){return l((e.source.value+e.target.value)/2,(t.source.value+t.target.value)/2)})}var n,r,i,o,a,s,l,u={},c=0;return u.matrix=function(e){return arguments.length?(o=(i=e)&&i.length,n=r=null,u):i},u.padding=function(e){return arguments.length?(c=e,n=r=null,u):c},u.sortGroups=function(e){return arguments.length?(a=e,n=r=null,u):a},u.sortSubgroups=function(e){return arguments.length?(s=e,n=null,u):s},u.sortChords=function(e){return arguments.length?(l=e,n&&t(),u):l},u.chords=function(){return n||e(),n},u.groups=function(){return r||e(),r},u},pa.layout.force=function(){function e(e){return function(t,n,r,i){if(t.point!==e){var o=t.cx-e.x,a=t.cy-e.y,s=i-n,l=o*o+a*a;if(s*s/v<l){if(l<g){var u=t.charge/l;e.px-=o*u,e.py-=a*u}return!0}if(t.point&&l&&l<g){var u=t.pointCharge/l;e.px-=o*u,e.py-=a*u}}return!t.charge}}function t(e){e.px=pa.event.x,e.py=pa.event.y,l.resume()}var n,r,i,o,a,s,l={},u=pa.dispatch("start","tick","end"),c=[1,1],d=.9,f=El,p=Cl,h=-30,g=kl,m=.1,v=.64,b=[],y=[];return l.tick=function(){if((i*=.99)<.005)return n=null,u.end({type:"end",alpha:i=0}),!0;var t,r,l,f,p,g,v,w,x,_=b.length,E=y.length;for(r=0;r<E;++r)l=y[r],f=l.source,p=l.target,w=p.x-f.x,x=p.y-f.y,(g=w*w+x*x)&&(g=i*a[r]*((g=Math.sqrt(g))-o[r])/g,w*=g,x*=g,p.x-=w*(v=f.weight+p.weight?f.weight/(f.weight+p.weight):.5),p.y-=x*v,f.x+=w*(v=1-v),f.y+=x*v);if((v=i*m)&&(w=c[0]/2,x=c[1]/2,r=-1,v))for(;++r<_;)l=b[r],l.x+=(w-l.x)*v,l.y+=(x-l.y)*v;if(h)for(li(t=pa.geom.quadtree(b),i,s),r=-1;++r<_;)(l=b[r]).fixed||t.visit(e(l));for(r=-1;++r<_;)l=b[r],l.fixed?(l.x=l.px,l.y=l.py):(l.x-=(l.px-(l.px=l.x))*d,l.y-=(l.py-(l.py=l.y))*d);u.tick({type:"tick",alpha:i})},l.nodes=function(e){return arguments.length?(b=e,l):b},l.links=function(e){return arguments.length?(y=e,l):y},l.size=function(e){return arguments.length?(c=e,l):c},l.linkDistance=function(e){return arguments.length?(f="function"==typeof e?e:+e,l):f},l.distance=l.linkDistance,l.linkStrength=function(e){return arguments.length?(p="function"==typeof e?e:+e,l):p},l.friction=function(e){return arguments.length?(d=+e,l):d},l.charge=function(e){return arguments.length?(h="function"==typeof e?e:+e,l):h},l.chargeDistance=function(e){return arguments.length?(g=e*e,l):Math.sqrt(g)},l.gravity=function(e){return arguments.length?(m=+e,l):m},l.theta=function(e){return arguments.length?(v=e*e,l):Math.sqrt(v)},l.alpha=function(e){return arguments.length?(e=+e,i?e>0?i=e:(n.c=null,n.t=NaN,n=null,u.end({type:"end",alpha:i=0})):e>0&&(u.start({type:"start",alpha:i=e}),n=Ie(l.tick)),l):i},l.start=function(){function e(e,r){if(!n){for(n=new Array(i),l=0;l<i;++l)n[l]=[];for(l=0;l<u;++l){var o=y[l];n[o.source.index].push(o.target),n[o.target.index].push(o.source)}}for(var a,s=n[t],l=-1,c=s.length;++l<c;)if(!isNaN(a=s[l][e]))return a;return Math.random()*r}var t,n,r,i=b.length,u=y.length,d=c[0],g=c[1];for(t=0;t<i;++t)(r=b[t]).index=t,r.weight=0;for(t=0;t<u;++t)r=y[t],"number"==typeof r.source&&(r.source=b[r.source]),"number"==typeof r.target&&(r.target=b[r.target]),++r.source.weight,++r.target.weight;for(t=0;t<i;++t)r=b[t],isNaN(r.x)&&(r.x=e("x",d)),isNaN(r.y)&&(r.y=e("y",g)),isNaN(r.px)&&(r.px=r.x),isNaN(r.py)&&(r.py=r.y);if(o=[],"function"==typeof f)for(t=0;t<u;++t)o[t]=+f.call(this,y[t],t);else for(t=0;t<u;++t)o[t]=f;if(a=[],"function"==typeof p)for(t=0;t<u;++t)a[t]=+p.call(this,y[t],t);else for(t=0;t<u;++t)a[t]=p;if(s=[],"function"==typeof h)for(t=0;t<i;++t)s[t]=+h.call(this,b[t],t);else for(t=0;t<i;++t)s[t]=h;return l.resume()},l.resume=function(){return l.alpha(.1)},l.stop=function(){return l.alpha(0)},l.drag=function(){return r||(r=pa.behavior.drag().origin(E).on("dragstart.force",ii).on("drag.force",t).on("dragend.force",oi)),arguments.length?void this.on("mouseover.force",ai).on("mouseout.force",si).call(r):r},pa.rebind(l,u,"on")};var El=20,Cl=1,kl=1/0;pa.layout.hierarchy=function(){function e(i){var o,a=[i],s=[];for(i.depth=0;null!=(o=a.pop());)if(s.push(o),(u=n.call(e,o,o.depth))&&(l=u.length)){for(var l,u,c;--l>=0;)a.push(c=u[l]),c.parent=o,c.depth=o.depth+1;r&&(o.value=0),o.children=u}else r&&(o.value=+r.call(e,o,o.depth)||0),delete o.children;return di(i,function(e){var n,i;t&&(n=e.children)&&n.sort(t),r&&(i=e.parent)&&(i.value+=e.value)}),s}var t=hi,n=fi,r=pi;return e.sort=function(n){return arguments.length?(t=n,e):t},e.children=function(t){return arguments.length?(n=t,e):n},e.value=function(t){return arguments.length?(r=t,e):r},e.revalue=function(t){return r&&(ci(t,function(e){e.children&&(e.value=0)}),di(t,function(t){var n;t.children||(t.value=+r.call(e,t,t.depth)||0),(n=t.parent)&&(n.value+=t.value)})),t},e},pa.layout.partition=function(){function e(t,n,r,i){var o=t.children;if(t.x=n,t.y=t.depth*i,t.dx=r,t.dy=i,o&&(a=o.length)){var a,s,l,u=-1;for(r=t.value?r/t.value:0;++u<a;)e(s=o[u],n,l=s.value*r,i),n+=l}}function t(e){var n=e.children,r=0;if(n&&(i=n.length))for(var i,o=-1;++o<i;)r=Math.max(r,t(n[o]));return 1+r}function n(n,o){var a=r.call(this,n,o);return e(a[0],0,i[0],i[1]/t(a[0])),a}var r=pa.layout.hierarchy(),i=[1,1];return n.size=function(e){return arguments.length?(i=e,n):i},ui(n,r)},pa.layout.pie=function(){function e(a){var s,l=a.length,u=a.map(function(n,r){return+t.call(e,n,r)}),c=+("function"==typeof r?r.apply(this,arguments):r),d=("function"==typeof i?i.apply(this,arguments):i)-c,f=Math.min(Math.abs(d)/l,+("function"==typeof o?o.apply(this,arguments):o)),p=f*(d<0?-1:1),h=pa.sum(u),g=h?(d-l*p)/h:0,m=pa.range(l),v=[];return null!=n&&m.sort(n===Sl?function(e,t){return u[t]-u[e]}:function(e,t){return n(a[e],a[t])}),m.forEach(function(e){v[e]={data:a[e],value:s=u[e],startAngle:c,endAngle:c+=s*g+p,padAngle:f}}),v}var t=Number,n=Sl,r=0,i=Ha,o=0;return e.value=function(n){return arguments.length?(t=n,e):t},e.sort=function(t){return arguments.length?(n=t,e):n},e.startAngle=function(t){return arguments.length?(r=t,e):r},e.endAngle=function(t){return arguments.length?(i=t,e):i},e.padAngle=function(t){return arguments.length?(o=t,e):o},e};var Sl={};pa.layout.stack=function(){function e(s,l){if(!(f=s.length))return s;var u=s.map(function(n,r){return t.call(e,n,r)}),c=u.map(function(t){return t.map(function(t,n){return[o.call(e,t,n),a.call(e,t,n)]})}),d=n.call(e,c,l);u=pa.permute(u,d),c=pa.permute(c,d);var f,p,h,g,m=r.call(e,c,l),v=u[0].length;for(h=0;h<v;++h)for(i.call(e,u[0][h],g=m[h],c[0][h][1]),p=1;p<f;++p)i.call(e,u[p][h],g+=c[p-1][h][1],c[p][h][1]);return s}var t=E,n=yi,r=wi,i=bi,o=mi,a=vi;return e.values=function(n){return arguments.length?(t=n,e):t},e.order=function(t){return arguments.length?(n="function"==typeof t?t:Al.get(t)||yi,e):n},e.offset=function(t){return arguments.length?(r="function"==typeof t?t:Tl.get(t)||wi,e):r},e.x=function(t){return arguments.length?(o=t,e):o},e.y=function(t){return arguments.length?(a=t,e):a},e.out=function(t){return arguments.length?(i=t,e):i},e};var Al=pa.map({"inside-out":function(e){var t,n,r=e.length,i=e.map(xi),o=e.map(_i),a=pa.range(r).sort(function(e,t){return i[e]-i[t]}),s=0,l=0,u=[],c=[];for(t=0;t<r;++t)n=a[t],s<l?(s+=o[n],u.push(n)):(l+=o[n],c.push(n));return c.reverse().concat(u)},reverse:function(e){return pa.range(e.length).reverse()},"default":yi}),Tl=pa.map({silhouette:function(e){var t,n,r,i=e.length,o=e[0].length,a=[],s=0,l=[];for(n=0;n<o;++n){for(t=0,r=0;t<i;t++)r+=e[t][n][1];r>s&&(s=r),a.push(r)}for(n=0;n<o;++n)l[n]=(s-a[n])/2;return l},wiggle:function(e){var t,n,r,i,o,a,s,l,u,c=e.length,d=e[0],f=d.length,p=[];for(p[0]=l=u=0,n=1;n<f;++n){for(t=0,i=0;t<c;++t)i+=e[t][n][1];for(t=0,o=0,s=d[n][0]-d[n-1][0];t<c;++t){for(r=0,a=(e[t][n][1]-e[t][n-1][1])/(2*s);r<t;++r)a+=(e[r][n][1]-e[r][n-1][1])/s;o+=a*e[t][n][1]}p[n]=l-=i?o/i*s:0,l<u&&(u=l)}for(n=0;n<f;++n)p[n]-=u;return p},expand:function(e){var t,n,r,i=e.length,o=e[0].length,a=1/i,s=[];for(n=0;n<o;++n){for(t=0,r=0;t<i;t++)r+=e[t][n][1];if(r)for(t=0;t<i;t++)e[t][n][1]/=r;else for(t=0;t<i;t++)e[t][n][1]=a}for(n=0;n<o;++n)s[n]=0;return s},zero:wi});pa.layout.histogram=function(){function e(e,o){for(var a,s,l=[],u=e.map(n,this),c=r.call(this,u,o),d=i.call(this,c,u,o),o=-1,f=u.length,p=d.length-1,h=t?1:1/f;++o<p;)a=l[o]=[],a.dx=d[o+1]-(a.x=d[o]),a.y=0;if(p>0)for(o=-1;++o<f;)s=u[o],s>=c[0]&&s<=c[1]&&(a=l[pa.bisect(d,s,1,p)-1],a.y+=h,a.push(e[o]));return l}var t=!0,n=Number,r=Si,i=Ci;return e.value=function(t){return arguments.length?(n=t,e):n},e.range=function(t){return arguments.length?(r=Fe(t),e):r},e.bins=function(t){return arguments.length?(i="number"==typeof t?function(e){return ki(e,t)}:Fe(t),e):i},e.frequency=function(n){return arguments.length?(t=!!n,e):t},e},pa.layout.pack=function(){function e(e,o){var a=n.call(this,e,o),s=a[0],l=i[0],u=i[1],c=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(s.x=s.y=0,di(s,function(e){e.r=+c(e.value)}),di(s,Fi),r){var d=r*(t?1:Math.max(2*s.r/l,2*s.r/u))/2;di(s,function(e){e.r+=d}),di(s,Fi),di(s,function(e){e.r-=d})}return Li(s,l/2,u/2,t?1:1/Math.max(2*s.r/l,2*s.r/u)),a}var t,n=pa.layout.hierarchy().sort(Ai),r=0,i=[1,1];return e.size=function(t){return arguments.length?(i=t,e):i},e.radius=function(n){return arguments.length?(t=null==n||"function"==typeof n?n:+n,e):t},e.padding=function(t){return arguments.length?(r=+t,e):r},ui(e,n)},pa.layout.tree=function(){function e(e,i){var c=a.call(this,e,i),d=c[0],f=t(d);if(di(f,n),f.parent.m=-f.z,ci(f,r),u)ci(d,o);else{var p=d,h=d,g=d;ci(d,function(e){e.x<p.x&&(p=e),e.x>h.x&&(h=e),e.depth>g.depth&&(g=e)});var m=s(p,h)/2-p.x,v=l[0]/(h.x+s(h,p)/2+m),b=l[1]/(g.depth||1);ci(d,function(e){e.x=(e.x+m)*v,e.y=e.depth*b})}return c}function t(e){for(var t,n={A:null,children:[e]},r=[n];null!=(t=r.pop());)for(var i,o=t.children,a=0,s=o.length;a<s;++a)r.push((o[a]=i={_:o[a],parent:t,children:(i=o[a].children)&&i.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:a}).a=i);return n.children[0]}function n(e){var t=e.children,n=e.parent.children,r=e.i?n[e.i-1]:null;if(t.length){$i(e);var o=(t[0].z+t[t.length-1].z)/2;r?(e.z=r.z+s(e._,r._),e.m=e.z-o):e.z=o}else r&&(e.z=r.z+s(e._,r._));e.parent.A=i(e,r,e.parent.A||n[0])}function r(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function i(e,t,n){if(t){for(var r,i=e,o=e,a=t,l=i.parent.children[0],u=i.m,c=o.m,d=a.m,f=l.m;a=Bi(a),i=Ri(i),a&&i;)l=Ri(l),o=Bi(o),o.a=e,r=a.z+d-i.z-u+s(a._,i._),r>0&&(ji(Vi(a,e,n),e,r),u+=r,c+=r),d+=a.m,u+=i.m,f+=l.m,c+=o.m;a&&!Bi(o)&&(o.t=a,o.m+=d-c),i&&!Ri(l)&&(l.t=i,l.m+=u-f,n=e)}return n}function o(e){e.x*=l[0],e.y=e.depth*l[1]}var a=pa.layout.hierarchy().sort(null).value(null),s=Ii,l=[1,1],u=null;return e.separation=function(t){return arguments.length?(s=t,e):s},e.size=function(t){return arguments.length?(u=null==(l=t)?o:null,e):u?null:l},e.nodeSize=function(t){return arguments.length?(u=null==(l=t)?null:o,e):u?l:null},ui(e,a)},pa.layout.cluster=function(){function e(e,o){var a,s=t.call(this,e,o),l=s[0],u=0;di(l,function(e){var t=e.children;t&&t.length?(e.x=Wi(t),e.y=Ui(t)):(e.x=a?u+=n(e,a):0,e.y=0,a=e)});var c=qi(l),d=Hi(l),f=c.x-n(c,d)/2,p=d.x+n(d,c)/2;return di(l,i?function(e){e.x=(e.x-l.x)*r[0],e.y=(l.y-e.y)*r[1]}:function(e){e.x=(e.x-f)/(p-f)*r[0],e.y=(1-(l.y?e.y/l.y:1))*r[1]}),s}var t=pa.layout.hierarchy().sort(null).value(null),n=Ii,r=[1,1],i=!1;return e.separation=function(t){return arguments.length?(n=t,e):n},e.size=function(t){return arguments.length?(i=null==(r=t),e):i?null:r},e.nodeSize=function(t){return arguments.length?(i=null!=(r=t),e):i?r:null},ui(e,t)},pa.layout.treemap=function(){function e(e,t){for(var n,r,i=-1,o=e.length;++i<o;)r=(n=e[i]).value*(t<0?0:t),n.area=isNaN(r)||r<=0?0:r}function t(n){var o=n.children;if(o&&o.length){var a,s,l,u=d(n),c=[],f=o.slice(),h=1/0,g="slice"===p?u.dx:"dice"===p?u.dy:"slice-dice"===p?1&n.depth?u.dy:u.dx:Math.min(u.dx,u.dy);for(e(f,u.dx*u.dy/n.value),c.area=0;(l=f.length)>0;)c.push(a=f[l-1]),c.area+=a.area,"squarify"!==p||(s=r(c,g))<=h?(f.pop(),h=s):(c.area-=c.pop().area,i(c,g,u,!1),g=Math.min(u.dx,u.dy),c.length=c.area=0,h=1/0);c.length&&(i(c,g,u,!0),c.length=c.area=0),o.forEach(t)}}function n(t){var r=t.children;if(r&&r.length){var o,a=d(t),s=r.slice(),l=[];for(e(s,a.dx*a.dy/t.value),l.area=0;o=s.pop();)l.push(o),l.area+=o.area,null!=o.z&&(i(l,o.z?a.dx:a.dy,a,!s.length),l.length=l.area=0);r.forEach(n)}}function r(e,t){for(var n,r=e.area,i=0,o=1/0,a=-1,s=e.length;++a<s;)(n=e[a].area)&&(n<o&&(o=n),n>i&&(i=n));return r*=r,t*=t,r?Math.max(t*i*h/r,r/(t*o*h)):1/0}function i(e,t,n,r){var i,o=-1,a=e.length,s=n.x,u=n.y,c=t?l(e.area/t):0;if(t==n.dx){for((r||c>n.dy)&&(c=n.dy);++o<a;)i=e[o],i.x=s,i.y=u,i.dy=c,s+=i.dx=Math.min(n.x+n.dx-s,c?l(i.area/c):0);i.z=!0,i.dx+=n.x+n.dx-s,n.y+=c,n.dy-=c}else{for((r||c>n.dx)&&(c=n.dx);++o<a;)i=e[o],i.x=s,i.y=u,i.dx=c,u+=i.dy=Math.min(n.y+n.dy-u,c?l(i.area/c):0);i.z=!1,i.dy+=n.y+n.dy-u,n.x+=c,n.dx-=c}}function o(r){var i=a||s(r),o=i[0];return o.x=o.y=0,o.value?(o.dx=u[0],o.dy=u[1]):o.dx=o.dy=0,a&&s.revalue(o),e([o],o.dx*o.dy/o.value),(a?n:t)(o),f&&(a=i),i}var a,s=pa.layout.hierarchy(),l=Math.round,u=[1,1],c=null,d=zi,f=!1,p="squarify",h=.5*(1+Math.sqrt(5));return o.size=function(e){return arguments.length?(u=e,o):u},o.padding=function(e){function t(t){var n=e.call(o,t,t.depth);return null==n?zi(t):Gi(t,"number"==typeof n?[n,n,n,n]:n)}function n(t){return Gi(t,e)}if(!arguments.length)return c;var r;return d=null==(c=e)?zi:"function"==(r=typeof e)?t:"number"===r?(e=[e,e,e,e],n):n,o},o.round=function(e){return arguments.length?(l=e?Math.round:Number,o):l!=Number},o.sticky=function(e){return arguments.length?(f=e,a=null,o):f},o.ratio=function(e){return arguments.length?(h=e,o):h},o.mode=function(e){return arguments.length?(p=e+"",o):p},ui(o,s)},pa.random={normal:function(e,t){var n=arguments.length;return n<2&&(t=1),n<1&&(e=0),function(){var n,r,i;do n=2*Math.random()-1,r=2*Math.random()-1,i=n*n+r*r;while(!i||i>1);return e+t*n*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var e=pa.random.normal.apply(pa,arguments);return function(){return Math.exp(e())}},bates:function(e){var t=pa.random.irwinHall(e);return function(){return t()/e}},irwinHall:function(e){return function(){for(var t=0,n=0;n<e;n++)t+=Math.random();return t}}},pa.scale={};var Dl={floor:E,ceil:E};pa.scale.linear=function(){return eo([0,1],[0,1],Cr,!1)};var Nl={s:1,g:1,p:1,r:1,e:1};pa.scale.log=function(){return lo(pa.scale.linear().domain([0,1]),10,!0,[1,10])};var Fl=pa.format(".0e"),Ml={floor:function(e){return-Math.ceil(-e)},ceil:function(e){return-Math.floor(-e)}};pa.scale.pow=function(){return uo(pa.scale.linear(),1,[0,1])},pa.scale.sqrt=function(){return pa.scale.pow().exponent(.5)},pa.scale.ordinal=function(){return fo([],{t:"range",a:[[]]})},pa.scale.category10=function(){return pa.scale.ordinal().range(Ol)},pa.scale.category20=function(){return pa.scale.ordinal().range(Ll)},pa.scale.category20b=function(){return pa.scale.ordinal().range(Pl)},pa.scale.category20c=function(){return pa.scale.ordinal().range(Il)};var Ol=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(Ce),Ll=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(Ce),Pl=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(Ce),Il=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(Ce);pa.scale.quantile=function(){return po([],[])},pa.scale.quantize=function(){return ho(0,1,[0,1])},pa.scale.threshold=function(){return go([.5],[0,1])},pa.scale.identity=function(){return mo([0,1])},pa.svg={},pa.svg.arc=function(){function e(){var e=Math.max(0,+n.apply(this,arguments)),u=Math.max(0,+r.apply(this,arguments)),c=a.apply(this,arguments)-Ga,d=s.apply(this,arguments)-Ga,f=Math.abs(d-c),p=c>d?0:1;if(u<e&&(h=u,u=e,e=h),f>=za)return t(u,p)+(e?t(e,1-p):"")+"Z";var h,g,m,v,b,y,w,x,_,E,C,k,S=0,A=0,T=[];if((v=(+l.apply(this,arguments)||0)/2)&&(m=o===Rl?Math.sqrt(e*e+u*u):+o.apply(this,arguments),p||(A*=-1),u&&(A=ae(m/u*Math.sin(v))),e&&(S=ae(m/e*Math.sin(v)))),u){b=u*Math.cos(c+A),y=u*Math.sin(c+A),w=u*Math.cos(d-A),x=u*Math.sin(d-A);var D=Math.abs(d-c-2*A)<=qa?0:1;if(A&&Eo(b,y,w,x)===p^D){var N=(c+d)/2;b=u*Math.cos(N),y=u*Math.sin(N),w=x=null}}else b=y=0;if(e){_=e*Math.cos(d-S),E=e*Math.sin(d-S),C=e*Math.cos(c+S),k=e*Math.sin(c+S);var F=Math.abs(c-d+2*S)<=qa?0:1;if(S&&Eo(_,E,C,k)===1-p^F){var M=(c+d)/2;_=e*Math.cos(M),E=e*Math.sin(M),C=k=null}}else _=E=0;if(f>Ua&&(h=Math.min(Math.abs(u-e)/2,+i.apply(this,arguments)))>.001){g=e<u^p?0:1;var O=h,L=h;if(f<qa){var P=null==C?[_,E]:null==w?[b,y]:jn([b,y],[C,k],[w,x],[_,E]),I=b-P[0],R=y-P[1],B=w-P[0],j=x-P[1],$=1/Math.sin(Math.acos((I*B+R*j)/(Math.sqrt(I*I+R*R)*Math.sqrt(B*B+j*j)))/2),V=Math.sqrt(P[0]*P[0]+P[1]*P[1]);L=Math.min(h,(e-V)/($-1)),O=Math.min(h,(u-V)/($+1))}if(null!=w){var U=Co(null==C?[_,E]:[C,k],[b,y],u,O,p),W=Co([w,x],[_,E],u,O,p);h===O?T.push("M",U[0],"A",O,",",O," 0 0,",g," ",U[1],"A",u,",",u," 0 ",1-p^Eo(U[1][0],U[1][1],W[1][0],W[1][1]),",",p," ",W[1],"A",O,",",O," 0 0,",g," ",W[0]):T.push("M",U[0],"A",O,",",O," 0 1,",g," ",W[0])}else T.push("M",b,",",y);if(null!=C){var q=Co([b,y],[C,k],e,-L,p),H=Co([_,E],null==w?[b,y]:[w,x],e,-L,p);h===L?T.push("L",H[0],"A",L,",",L," 0 0,",g," ",H[1],"A",e,",",e," 0 ",p^Eo(H[1][0],H[1][1],q[1][0],q[1][1]),",",1-p," ",q[1],"A",L,",",L," 0 0,",g," ",q[0]):T.push("L",H[0],"A",L,",",L," 0 0,",g," ",q[0])}else T.push("L",_,",",E)}else T.push("M",b,",",y),null!=w&&T.push("A",u,",",u," 0 ",D,",",p," ",w,",",x),T.push("L",_,",",E),null!=C&&T.push("A",e,",",e," 0 ",F,",",1-p," ",C,",",k);return T.push("Z"),T.join("")}function t(e,t){return"M0,"+e+"A"+e+","+e+" 0 1,"+t+" 0,"+-e+"A"+e+","+e+" 0 1,"+t+" 0,"+e}var n=bo,r=yo,i=vo,o=Rl,a=wo,s=xo,l=_o;return e.innerRadius=function(t){return arguments.length?(n=Fe(t),e):n},e.outerRadius=function(t){return arguments.length?(r=Fe(t),e):r},e.cornerRadius=function(t){return arguments.length?(i=Fe(t),e):i},e.padRadius=function(t){return arguments.length?(o=t==Rl?Rl:Fe(t),e):o},e.startAngle=function(t){return arguments.length?(a=Fe(t),e):a},e.endAngle=function(t){return arguments.length?(s=Fe(t),e):s},e.padAngle=function(t){return arguments.length?(l=Fe(t),e):l},e.centroid=function(){var e=(+n.apply(this,arguments)+ +r.apply(this,arguments))/2,t=(+a.apply(this,arguments)+ +s.apply(this,arguments))/2-Ga;return[Math.cos(t)*e,Math.sin(t)*e]},e};var Rl="auto";pa.svg.line=function(){return ko(E)};var Bl=pa.map({linear:So,"linear-closed":Ao,step:To,"step-before":Do,"step-after":No,basis:Io,"basis-open":Ro,"basis-closed":Bo,bundle:jo,cardinal:Oo,"cardinal-open":Fo,"cardinal-closed":Mo,monotone:Ho});Bl.forEach(function(e,t){t.key=e,t.closed=/-closed$/.test(e)});var jl=[0,2/3,1/3,0],$l=[0,1/3,2/3,0],Vl=[0,1/6,2/3,1/6];pa.svg.line.radial=function(){var e=ko(zo);return e.radius=e.x,delete e.x,e.angle=e.y,delete e.y,e},Do.reverse=No,No.reverse=Do,pa.svg.area=function(){return Go(E)},pa.svg.area.radial=function(){var e=Go(zo);return e.radius=e.x,delete e.x,e.innerRadius=e.x0,delete e.x0,e.outerRadius=e.x1,delete e.x1,e.angle=e.y,delete e.y,e.startAngle=e.y0,delete e.y0,e.endAngle=e.y1,delete e.y1,e},pa.svg.chord=function(){function e(e,s){var l=t(this,o,e,s),u=t(this,a,e,s);return"M"+l.p0+r(l.r,l.p1,l.a1-l.a0)+(n(l,u)?i(l.r,l.p1,l.r,l.p0):i(l.r,l.p1,u.r,u.p0)+r(u.r,u.p1,u.a1-u.a0)+i(u.r,u.p1,l.r,l.p0))+"Z"}function t(e,t,n,r){var i=t.call(e,n,r),o=s.call(e,i,r),a=l.call(e,i,r)-Ga,c=u.call(e,i,r)-Ga;return{r:o,a0:a,a1:c,p0:[o*Math.cos(a),o*Math.sin(a)],p1:[o*Math.cos(c),o*Math.sin(c)]}}function n(e,t){return e.a0==t.a0&&e.a1==t.a1}function r(e,t,n){return"A"+e+","+e+" 0 "+ +(n>qa)+",1 "+t}function i(e,t,n,r){return"Q 0,0 "+r}var o=Cn,a=kn,s=Ko,l=wo,u=xo;return e.radius=function(t){return arguments.length?(s=Fe(t),e):s},e.source=function(t){return arguments.length?(o=Fe(t),e):o},e.target=function(t){return arguments.length?(a=Fe(t),e):a},e.startAngle=function(t){return arguments.length?(l=Fe(t),e):l},e.endAngle=function(t){return arguments.length?(u=Fe(t),e):u},e},pa.svg.diagonal=function(){function e(e,i){var o=t.call(this,e,i),a=n.call(this,e,i),s=(o.y+a.y)/2,l=[o,{x:o.x,y:s},{x:a.x,y:s},a];return l=l.map(r),"M"+l[0]+"C"+l[1]+" "+l[2]+" "+l[3]}var t=Cn,n=kn,r=Yo;return e.source=function(n){return arguments.length?(t=Fe(n),e):t},e.target=function(t){return arguments.length?(n=Fe(t),e):n},e.projection=function(t){return arguments.length?(r=t,e):r},e},pa.svg.diagonal.radial=function(){var e=pa.svg.diagonal(),t=Yo,n=e.projection;return e.projection=function(e){return arguments.length?n(Xo(t=e)):t},e},pa.svg.symbol=function(){function e(e,r){return(Ul.get(t.call(this,e,r))||Zo)(n.call(this,e,r))}var t=Jo,n=Qo;return e.type=function(n){return arguments.length?(t=Fe(n),e):t},e.size=function(t){return arguments.length?(n=Fe(t),e):n},e};var Ul=pa.map({circle:Zo,cross:function(e){var t=Math.sqrt(e/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(e){var t=Math.sqrt(e/(2*ql)),n=t*ql;return"M0,"+-t+"L"+n+",0 0,"+t+" "+-n+",0Z"},square:function(e){var t=Math.sqrt(e)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(e){var t=Math.sqrt(e/Wl),n=t*Wl/2;return"M0,"+n+"L"+t+","+-n+" "+-t+","+-n+"Z"},"triangle-up":function(e){var t=Math.sqrt(e/Wl),n=t*Wl/2;return"M0,"+-n+"L"+t+","+n+" "+-t+","+n+"Z"}});pa.svg.symbolTypes=Ul.keys();var Wl=Math.sqrt(3),ql=Math.tan(30*Ka);La.transition=function(e){for(var t,n,r=Hl||++Yl,i=ia(e),o=[],a=zl||{time:Date.now(),ease:Fr,delay:0,duration:250},s=-1,l=this.length;++s<l;){o.push(t=[]);for(var u=this[s],c=-1,d=u.length;++c<d;)(n=u[c])&&oa(n,c,i,r,a),t.push(n)}return ta(o,i,r)},La.interrupt=function(e){return this.each(null==e?Gl:ea(ia(e)))};var Hl,zl,Gl=ea(ia()),Kl=[],Yl=0;Kl.call=La.call,Kl.empty=La.empty,Kl.node=La.node,Kl.size=La.size,pa.transition=function(e,t){return e&&e.transition?Hl?e.transition(t):e:pa.selection().transition(e)},pa.transition.prototype=Kl,Kl.select=function(e){var t,n,r,i=this.id,o=this.namespace,a=[];e=O(e);for(var s=-1,l=this.length;++s<l;){a.push(t=[]);for(var u=this[s],c=-1,d=u.length;++c<d;)(r=u[c])&&(n=e.call(r,r.__data__,c,s))?("__data__"in r&&(n.__data__=r.__data__),oa(n,c,o,i,r[o][i]),t.push(n)):t.push(null)}return ta(a,o,i)},Kl.selectAll=function(e){var t,n,r,i,o,a=this.id,s=this.namespace,l=[];e=L(e);for(var u=-1,c=this.length;++u<c;)for(var d=this[u],f=-1,p=d.length;++f<p;)if(r=d[f]){o=r[s][a],n=e.call(r,r.__data__,f,u),l.push(t=[]);for(var h=-1,g=n.length;++h<g;)(i=n[h])&&oa(i,h,s,a,o),t.push(i)}return ta(l,s,a)},Kl.filter=function(e){var t,n,r,i=[];"function"!=typeof e&&(e=z(e));for(var o=0,a=this.length;o<a;o++){i.push(t=[]);for(var n=this[o],s=0,l=n.length;s<l;s++)(r=n[s])&&e.call(r,r.__data__,s,o)&&t.push(r)}return ta(i,this.namespace,this.id)},Kl.tween=function(e,t){var n=this.id,r=this.namespace;return arguments.length<2?this.node()[r][n].tween.get(e):K(this,null==t?function(t){t[r][n].tween.remove(e)}:function(i){i[r][n].tween.set(e,t)})},Kl.attr=function(e,t){function n(){this.removeAttribute(s)}function r(){this.removeAttributeNS(s.space,s.local)}function i(e){return null==e?n:(e+="",function(){var t,n=this.getAttribute(s);return n!==e&&(t=a(n,e),function(e){this.setAttribute(s,t(e))})})}function o(e){return null==e?r:(e+="",function(){var t,n=this.getAttributeNS(s.space,s.local);return n!==e&&(t=a(n,e),function(e){this.setAttributeNS(s.space,s.local,t(e))})})}if(arguments.length<2){for(t in e)this.attr(t,e[t]);return this}var a="transform"==e?Jr:Cr,s=pa.ns.qualify(e);return na(this,"attr."+e,t,s.local?o:i)},Kl.attrTween=function(e,t){function n(e,n){var r=t.call(this,e,n,this.getAttribute(i));return r&&function(e){this.setAttribute(i,r(e))}}function r(e,n){var r=t.call(this,e,n,this.getAttributeNS(i.space,i.local));return r&&function(e){this.setAttributeNS(i.space,i.local,r(e))}}var i=pa.ns.qualify(e);return this.tween("attr."+e,i.local?r:n)},Kl.style=function(e,t,n){function r(){this.style.removeProperty(e)}function i(t){return null==t?r:(t+="",function(){var r,i=a(this).getComputedStyle(this,null).getPropertyValue(e);return i!==t&&(r=Cr(i,t),function(t){this.style.setProperty(e,r(t),n)})})}var o=arguments.length;if(o<3){if("string"!=typeof e){o<2&&(t="");for(n in e)this.style(n,e[n],t);return this}n=""}return na(this,"style."+e,t,i)},Kl.styleTween=function(e,t,n){function r(r,i){var o=t.call(this,r,i,a(this).getComputedStyle(this,null).getPropertyValue(e));return o&&function(t){this.style.setProperty(e,o(t),n)}}return arguments.length<3&&(n=""),this.tween("style."+e,r)},Kl.text=function(e){return na(this,"text",e,ra)},Kl.remove=function(){var e=this.namespace;return this.each("end.transition",function(){var t;this[e].count<2&&(t=this.parentNode)&&t.removeChild(this)})},Kl.ease=function(e){var t=this.id,n=this.namespace;return arguments.length<1?this.node()[n][t].ease:("function"!=typeof e&&(e=pa.ease.apply(pa,arguments)),K(this,function(r){r[n][t].ease=e}))},Kl.delay=function(e){var t=this.id,n=this.namespace;return arguments.length<1?this.node()[n][t].delay:K(this,"function"==typeof e?function(r,i,o){r[n][t].delay=+e.call(r,r.__data__,i,o)}:(e=+e,function(r){r[n][t].delay=e}))},Kl.duration=function(e){var t=this.id,n=this.namespace;return arguments.length<1?this.node()[n][t].duration:K(this,"function"==typeof e?function(r,i,o){r[n][t].duration=Math.max(1,e.call(r,r.__data__,i,o))}:(e=Math.max(1,e),function(r){r[n][t].duration=e}))},Kl.each=function(e,t){var n=this.id,r=this.namespace;if(arguments.length<2){var i=zl,o=Hl;try{Hl=n,K(this,function(t,i,o){zl=t[r][n],e.call(t,t.__data__,i,o)})}finally{zl=i,Hl=o}}else K(this,function(i){var o=i[r][n];(o.event||(o.event=pa.dispatch("start","end","interrupt"))).on(e,t)});return this},Kl.transition=function(){for(var e,t,n,r,i=this.id,o=++Yl,a=this.namespace,s=[],l=0,u=this.length;l<u;l++){s.push(e=[]);for(var t=this[l],c=0,d=t.length;c<d;c++)(n=t[c])&&(r=n[a][i],oa(n,c,a,o,{time:r.time,ease:r.ease,delay:r.delay+r.duration,duration:r.duration})),e.push(n)}return ta(s,a,o)},pa.svg.axis=function(){function e(e){e.each(function(){var e,u=pa.select(this),c=this.__chart__||n,d=this.__chart__=n.copy(),f=null==l?d.ticks?d.ticks.apply(d,s):d.domain():l,p=null==t?d.tickFormat?d.tickFormat.apply(d,s):E:t,h=u.selectAll(".tick").data(f,d),g=h.enter().insert("g",".domain").attr("class","tick").style("opacity",Ua),m=pa.transition(h.exit()).style("opacity",Ua).remove(),v=pa.transition(h.order()).style("opacity",1),b=Math.max(i,0)+a,y=Yi(d),w=u.selectAll(".domain").data([0]),x=(w.enter().append("path").attr("class","domain"),pa.transition(w));g.append("line"),g.append("text");var _,C,k,S,A=g.select("line"),T=v.select("line"),D=h.select("text").text(p),N=g.select("text"),F=v.select("text"),M="top"===r||"left"===r?-1:1;if("bottom"===r||"top"===r?(e=aa,_="x",k="y",C="x2",S="y2",D.attr("dy",M<0?"0em":".71em").style("text-anchor","middle"),x.attr("d","M"+y[0]+","+M*o+"V0H"+y[1]+"V"+M*o)):(e=sa,_="y",k="x",C="y2",S="x2",D.attr("dy",".32em").style("text-anchor",M<0?"end":"start"),x.attr("d","M"+M*o+","+y[0]+"H0V"+y[1]+"H"+M*o)),A.attr(S,M*i),N.attr(k,M*b),T.attr(C,0).attr(S,M*i),F.attr(_,0).attr(k,M*b),d.rangeBand){var O=d,L=O.rangeBand()/2;c=d=function(e){return O(e)+L}}else c.rangeBand?c=d:m.call(e,d,c);g.call(e,c,d),v.call(e,d,d)})}var t,n=pa.scale.linear(),r=Xl,i=6,o=6,a=3,s=[10],l=null;return e.scale=function(t){return arguments.length?(n=t,e):n},e.orient=function(t){return arguments.length?(r=t in Ql?t+"":Xl,e):r},e.ticks=function(){return arguments.length?(s=ga(arguments),e):s},e.tickValues=function(t){return arguments.length?(l=t,e):l},e.tickFormat=function(n){return arguments.length?(t=n,e):t},e.tickSize=function(t){var n=arguments.length;return n?(i=+t,o=+arguments[n-1],e):i},e.innerTickSize=function(t){return arguments.length?(i=+t,e):i},e.outerTickSize=function(t){return arguments.length?(o=+t,e):o},e.tickPadding=function(t){return arguments.length?(a=+t,e):a},e.tickSubdivide=function(){return arguments.length&&e},e};var Xl="bottom",Ql={top:1,right:1,bottom:1,
left:1};pa.svg.brush=function(){function e(o){o.each(function(){var o=pa.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",i).on("touchstart.brush",i),a=o.selectAll(".background").data([0]);a.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),o.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var s=o.selectAll(".resize").data(g,E);s.exit().remove(),s.enter().append("g").attr("class",function(e){return"resize "+e}).style("cursor",function(e){return Jl[e]}).append("rect").attr("x",function(e){return/[ew]$/.test(e)?-3:null}).attr("y",function(e){return/^[ns]/.test(e)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),s.style("display",e.empty()?"none":null);var l,d=pa.transition(o),f=pa.transition(a);u&&(l=Yi(u),f.attr("x",l[0]).attr("width",l[1]-l[0]),n(d)),c&&(l=Yi(c),f.attr("y",l[0]).attr("height",l[1]-l[0]),r(d)),t(d)})}function t(e){e.selectAll(".resize").attr("transform",function(e){return"translate("+d[+/e$/.test(e)]+","+f[+/^s/.test(e)]+")"})}function n(e){e.select(".extent").attr("x",d[0]),e.selectAll(".extent,.n>rect,.s>rect").attr("width",d[1]-d[0])}function r(e){e.select(".extent").attr("y",f[0]),e.selectAll(".extent,.e>rect,.w>rect").attr("height",f[1]-f[0])}function i(){function i(){32==pa.event.keyCode&&(T||(y=null,F[0]-=d[1],F[1]-=f[1],T=2),D())}function g(){32==pa.event.keyCode&&2==T&&(F[0]+=d[1],F[1]+=f[1],T=0,D())}function m(){var e=pa.mouse(x),i=!1;w&&(e[0]+=w[0],e[1]+=w[1]),T||(pa.event.altKey?(y||(y=[(d[0]+d[1])/2,(f[0]+f[1])/2]),F[0]=d[+(e[0]<y[0])],F[1]=f[+(e[1]<y[1])]):y=null),S&&v(e,u,0)&&(n(C),i=!0),A&&v(e,c,1)&&(r(C),i=!0),i&&(t(C),E({type:"brush",mode:T?"move":"resize"}))}function v(e,t,n){var r,i,a=Yi(t),l=a[0],u=a[1],c=F[n],g=n?f:d,m=g[1]-g[0];if(T&&(l-=c,u-=m+c),r=(n?h:p)?Math.max(l,Math.min(u,e[n])):e[n],T?i=(r+=c)+m:(y&&(c=Math.max(l,Math.min(u,2*y[n]-r))),c<r?(i=r,r=c):i=c),g[0]!=r||g[1]!=i)return n?s=null:o=null,g[0]=r,g[1]=i,!0}function b(){m(),C.style("pointer-events","all").selectAll(".resize").style("display",e.empty()?"none":null),pa.select("body").style("cursor",null),M.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),N(),E({type:"brushend"})}var y,w,x=this,_=pa.select(pa.event.target),E=l.of(x,arguments),C=pa.select(x),k=_.datum(),S=!/^(n|s)$/.test(k)&&u,A=!/^(e|w)$/.test(k)&&c,T=_.classed("extent"),N=ee(x),F=pa.mouse(x),M=pa.select(a(x)).on("keydown.brush",i).on("keyup.brush",g);if(pa.event.changedTouches?M.on("touchmove.brush",m).on("touchend.brush",b):M.on("mousemove.brush",m).on("mouseup.brush",b),C.interrupt().selectAll("*").interrupt(),T)F[0]=d[0]-F[0],F[1]=f[0]-F[1];else if(k){var O=+/w$/.test(k),L=+/^n/.test(k);w=[d[1-O]-F[0],f[1-L]-F[1]],F[0]=d[O],F[1]=f[L]}else pa.event.altKey&&(y=F.slice());C.style("pointer-events","none").selectAll(".resize").style("display",null),pa.select("body").style("cursor",_.style("cursor")),E({type:"brushstart"}),m()}var o,s,l=F(e,"brushstart","brush","brushend"),u=null,c=null,d=[0,0],f=[0,0],p=!0,h=!0,g=Zl[0];return e.event=function(e){e.each(function(){var e=l.of(this,arguments),t={x:d,y:f,i:o,j:s},n=this.__chart__||t;this.__chart__=t,Hl?pa.select(this).transition().each("start.brush",function(){o=n.i,s=n.j,d=n.x,f=n.y,e({type:"brushstart"})}).tween("brush:brush",function(){var n=kr(d,t.x),r=kr(f,t.y);return o=s=null,function(i){d=t.x=n(i),f=t.y=r(i),e({type:"brush",mode:"resize"})}}).each("end.brush",function(){o=t.i,s=t.j,e({type:"brush",mode:"resize"}),e({type:"brushend"})}):(e({type:"brushstart"}),e({type:"brush",mode:"resize"}),e({type:"brushend"}))})},e.x=function(t){return arguments.length?(u=t,g=Zl[!u<<1|!c],e):u},e.y=function(t){return arguments.length?(c=t,g=Zl[!u<<1|!c],e):c},e.clamp=function(t){return arguments.length?(u&&c?(p=!!t[0],h=!!t[1]):u?p=!!t:c&&(h=!!t),e):u&&c?[p,h]:u?p:c?h:null},e.extent=function(t){var n,r,i,a,l;return arguments.length?(u&&(n=t[0],r=t[1],c&&(n=n[0],r=r[0]),o=[n,r],u.invert&&(n=u(n),r=u(r)),r<n&&(l=n,n=r,r=l),n==d[0]&&r==d[1]||(d=[n,r])),c&&(i=t[0],a=t[1],u&&(i=i[1],a=a[1]),s=[i,a],c.invert&&(i=c(i),a=c(a)),a<i&&(l=i,i=a,a=l),i==f[0]&&a==f[1]||(f=[i,a])),e):(u&&(o?(n=o[0],r=o[1]):(n=d[0],r=d[1],u.invert&&(n=u.invert(n),r=u.invert(r)),r<n&&(l=n,n=r,r=l))),c&&(s?(i=s[0],a=s[1]):(i=f[0],a=f[1],c.invert&&(i=c.invert(i),a=c.invert(a)),a<i&&(l=i,i=a,a=l))),u&&c?[[n,i],[r,a]]:u?[n,r]:c&&[i,a])},e.clear=function(){return e.empty()||(d=[0,0],f=[0,0],o=s=null),e},e.empty=function(){return!!u&&d[0]==d[1]||!!c&&f[0]==f[1]},pa.rebind(e,l,"on")};var Jl={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Zl=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],eu=ys.format=ks.timeFormat,tu=eu.utc,nu=tu("%Y-%m-%dT%H:%M:%S.%LZ");eu.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?la:nu,la.parse=function(e){var t=new Date(e);return isNaN(t)?null:t},la.toString=nu.toString,ys.second=He(function(e){return new ws(1e3*Math.floor(e/1e3))},function(e,t){e.setTime(e.getTime()+1e3*Math.floor(t))},function(e){return e.getSeconds()}),ys.seconds=ys.second.range,ys.seconds.utc=ys.second.utc.range,ys.minute=He(function(e){return new ws(6e4*Math.floor(e/6e4))},function(e,t){e.setTime(e.getTime()+6e4*Math.floor(t))},function(e){return e.getMinutes()}),ys.minutes=ys.minute.range,ys.minutes.utc=ys.minute.utc.range,ys.hour=He(function(e){var t=e.getTimezoneOffset()/60;return new ws(36e5*(Math.floor(e/36e5-t)+t))},function(e,t){e.setTime(e.getTime()+36e5*Math.floor(t))},function(e){return e.getHours()}),ys.hours=ys.hour.range,ys.hours.utc=ys.hour.utc.range,ys.month=He(function(e){return e=ys.day(e),e.setDate(1),e},function(e,t){e.setMonth(e.getMonth()+t)},function(e){return e.getMonth()}),ys.months=ys.month.range,ys.months.utc=ys.month.utc.range;var ru=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],iu=[[ys.second,1],[ys.second,5],[ys.second,15],[ys.second,30],[ys.minute,1],[ys.minute,5],[ys.minute,15],[ys.minute,30],[ys.hour,1],[ys.hour,3],[ys.hour,6],[ys.hour,12],[ys.day,1],[ys.day,2],[ys.week,1],[ys.month,1],[ys.month,3],[ys.year,1]],ou=eu.multi([[".%L",function(e){return e.getMilliseconds()}],[":%S",function(e){return e.getSeconds()}],["%I:%M",function(e){return e.getMinutes()}],["%I %p",function(e){return e.getHours()}],["%a %d",function(e){return e.getDay()&&1!=e.getDate()}],["%b %d",function(e){return 1!=e.getDate()}],["%B",function(e){return e.getMonth()}],["%Y",Lt]]),au={range:function(e,t,n){return pa.range(Math.ceil(e/n)*n,+t,n).map(ca)},floor:E,ceil:E};iu.year=ys.year,ys.scale=function(){return ua(pa.scale.linear(),iu,ou)};var su=iu.map(function(e){return[e[0].utc,e[1]]}),lu=tu.multi([[".%L",function(e){return e.getUTCMilliseconds()}],[":%S",function(e){return e.getUTCSeconds()}],["%I:%M",function(e){return e.getUTCMinutes()}],["%I %p",function(e){return e.getUTCHours()}],["%a %d",function(e){return e.getUTCDay()&&1!=e.getUTCDate()}],["%b %d",function(e){return 1!=e.getUTCDate()}],["%B",function(e){return e.getUTCMonth()}],["%Y",Lt]]);su.year=ys.year.utc,ys.scale.utc=function(){return ua(pa.scale.linear(),su,lu)},pa.text=Me(function(e){return e.responseText}),pa.json=function(e,t){return Oe(e,"application/json",da,t)},pa.html=function(e,t){return Oe(e,"text/html",fa,t)},pa.xml=Me(function(e){return e.responseXML}),this.d3=pa,r=pa,i="function"==typeof r?r.call(t,n,t,e):r,!(void 0!==i&&(e.exports=i))}()},function(e,t,n){(function(e){!function(t,n){e.exports=n()}(this,function(){"use strict";function t(){return hr.apply(null,arguments)}function n(e){hr=e}function r(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function i(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function o(e){var t;for(t in e)return!1;return!0}function a(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function s(e,t){var n,r=[];for(n=0;n<e.length;++n)r.push(t(e[n],n));return r}function l(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function u(e,t){for(var n in t)l(t,n)&&(e[n]=t[n]);return l(t,"toString")&&(e.toString=t.toString),l(t,"valueOf")&&(e.valueOf=t.valueOf),e}function c(e,t,n,r){return vt(e,t,n,r,!0).utc()}function d(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null}}function f(e){return null==e._pf&&(e._pf=d()),e._pf}function p(e){if(null==e._isValid){var t=f(e),n=gr.call(t.parsedDateParts,function(e){return null!=e}),r=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidMonth&&!t.invalidWeekday&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n);if(e._strict&&(r=r&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return r;e._isValid=r}return e._isValid}function h(e){var t=c(NaN);return null!=e?u(f(t),e):f(t).userInvalidated=!0,t}function g(e){return void 0===e}function m(e,t){var n,r,i;if(g(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),g(t._i)||(e._i=t._i),g(t._f)||(e._f=t._f),g(t._l)||(e._l=t._l),g(t._strict)||(e._strict=t._strict),g(t._tzm)||(e._tzm=t._tzm),g(t._isUTC)||(e._isUTC=t._isUTC),g(t._offset)||(e._offset=t._offset),g(t._pf)||(e._pf=f(t)),g(t._locale)||(e._locale=t._locale),mr.length>0)for(n in mr)r=mr[n],i=t[r],g(i)||(e[r]=i);return e}function v(e){m(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),vr===!1&&(vr=!0,t.updateOffset(this),vr=!1)}function b(e){return e instanceof v||null!=e&&null!=e._isAMomentObject}function y(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function w(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=y(t)),n}function x(e,t,n){var r,i=Math.min(e.length,t.length),o=Math.abs(e.length-t.length),a=0;for(r=0;r<i;r++)(n&&e[r]!==t[r]||!n&&w(e[r])!==w(t[r]))&&a++;return a+o}function _(e){t.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function E(e,n){var r=!0;return u(function(){if(null!=t.deprecationHandler&&t.deprecationHandler(null,e),r){for(var i,o=[],a=0;a<arguments.length;a++){if(i="","object"==typeof arguments[a]){i+="\n["+a+"] ";for(var s in arguments[0])i+=s+": "+arguments[0][s]+", ";i=i.slice(0,-2)}else i=arguments[a];o.push(i)}_(e+"\nArguments: "+Array.prototype.slice.call(o).join("")+"\n"+(new Error).stack),r=!1}return n.apply(this,arguments)},n)}function C(e,n){null!=t.deprecationHandler&&t.deprecationHandler(e,n),br[e]||(_(n),br[e]=!0)}function k(e){return e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function S(e){var t,n;for(n in e)t=e[n],k(t)?this[n]=t:this["_"+n]=t;this._config=e,this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)}function A(e,t){var n,r=u({},e);for(n in t)l(t,n)&&(i(e[n])&&i(t[n])?(r[n]={},u(r[n],e[n]),u(r[n],t[n])):null!=t[n]?r[n]=t[n]:delete r[n]);for(n in e)l(e,n)&&!l(t,n)&&i(e[n])&&(r[n]=u({},r[n]));return r}function T(e){null!=e&&this.set(e)}function D(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return k(r)?r.call(t,n):r}function N(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.replace(/MMMM|MM|DD|dddd/g,function(e){return e.slice(1)}),this._longDateFormat[e])}function F(){return this._invalidDate}function M(e){return this._ordinal.replace("%d",e)}function O(e,t,n,r){var i=this._relativeTime[n];return k(i)?i(e,t,n,r):i.replace(/%d/i,e)}function L(e,t){var n=this._relativeTime[e>0?"future":"past"];return k(n)?n(t):n.replace(/%s/i,t)}function P(e,t){var n=e.toLowerCase();Ar[n]=Ar[n+"s"]=Ar[t]=e}function I(e){return"string"==typeof e?Ar[e]||Ar[e.toLowerCase()]:void 0}function R(e){var t,n,r={};for(n in e)l(e,n)&&(t=I(n),t&&(r[t]=e[n]));return r}function B(e,t){Tr[e]=t}function j(e){var t=[];for(var n in e)t.push({unit:n,priority:Tr[n]});return t.sort(function(e,t){return e.priority-t.priority}),t}function $(e,n){return function(r){return null!=r?(U(this,e,r),t.updateOffset(this,n),this):V(this,e)}}function V(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function U(e,t,n){e.isValid()&&e._d["set"+(e._isUTC?"UTC":"")+t](n)}function W(e){return e=I(e),k(this[e])?this[e]():this}function q(e,t){if("object"==typeof e){e=R(e);for(var n=j(e),r=0;r<n.length;r++)this[n[r].unit](e[n[r].unit])}else if(e=I(e),k(this[e]))return this[e](t);return this}function H(e,t,n){var r=""+Math.abs(e),i=t-r.length,o=e>=0;return(o?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}function z(e,t,n,r){var i=r;"string"==typeof r&&(i=function(){return this[r]()}),e&&(Mr[e]=i),t&&(Mr[t[0]]=function(){return H(i.apply(this,arguments),t[1],t[2])}),n&&(Mr[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function G(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function K(e){var t,n,r=e.match(Dr);for(t=0,n=r.length;t<n;t++)Mr[r[t]]?r[t]=Mr[r[t]]:r[t]=G(r[t]);return function(t){var i,o="";for(i=0;i<n;i++)o+=r[i]instanceof Function?r[i].call(t,e):r[i];return o}}function Y(e,t){return e.isValid()?(t=X(t,e.localeData()),Fr[t]=Fr[t]||K(t),Fr[t](e)):e.localeData().invalidDate()}function X(e,t){function n(e){return t.longDateFormat(e)||e}var r=5;for(Nr.lastIndex=0;r>=0&&Nr.test(e);)e=e.replace(Nr,n),Nr.lastIndex=0,r-=1;return e}function Q(e,t,n){Xr[e]=k(t)?t:function(e,r){return e&&n?n:t}}function J(e,t){return l(Xr,e)?Xr[e](t._strict,t._locale):new RegExp(Z(e))}function Z(e){return ee(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,r,i){return t||n||r||i}))}function ee(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function te(e,t){var n,r=t;for("string"==typeof e&&(e=[e]),"number"==typeof t&&(r=function(e,n){n[t]=w(e)}),n=0;n<e.length;n++)Qr[e[n]]=r}function ne(e,t){te(e,function(e,n,r,i){r._w=r._w||{},t(e,r._w,r,i)})}function re(e,t,n){null!=t&&l(Qr,e)&&Qr[e](t,n._a,n,e)}function ie(e,t){return new Date(Date.UTC(e,t+1,0)).getUTCDate()}function oe(e,t){return e?r(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||si).test(t)?"format":"standalone"][e.month()]:this._months}function ae(e,t){return e?r(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[si.test(t)?"format":"standalone"][e.month()]:this._monthsShort}function se(e,t,n){var r,i,o,a=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)o=c([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(o,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(o,"").toLocaleLowerCase();return n?"MMM"===t?(i=wr.call(this._shortMonthsParse,a),i!==-1?i:null):(i=wr.call(this._longMonthsParse,a),i!==-1?i:null):"MMM"===t?(i=wr.call(this._shortMonthsParse,a),i!==-1?i:(i=wr.call(this._longMonthsParse,a),i!==-1?i:null)):(i=wr.call(this._longMonthsParse,a),i!==-1?i:(i=wr.call(this._shortMonthsParse,a),i!==-1?i:null))}function le(e,t,n){var r,i,o;if(this._monthsParseExact)return se.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(i=c([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(o="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(o.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[r].test(e))return r;if(n&&"MMM"===t&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}}function ue(e,t){var n;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=w(t);else if(t=e.localeData().monthsParse(t),"number"!=typeof t)return e;return n=Math.min(e.date(),ie(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n),e}function ce(e){return null!=e?(ue(this,e),t.updateOffset(this,!0),this):V(this,"Month")}function de(){return ie(this.year(),this.month())}function fe(e){return this._monthsParseExact?(l(this,"_monthsRegex")||he.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(l(this,"_monthsShortRegex")||(this._monthsShortRegex=ci),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function pe(e){return this._monthsParseExact?(l(this,"_monthsRegex")||he.call(this),e?this._monthsStrictRegex:this._monthsRegex):(l(this,"_monthsRegex")||(this._monthsRegex=di),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function he(){function e(e,t){return t.length-e.length}var t,n,r=[],i=[],o=[];for(t=0;t<12;t++)n=c([2e3,t]),r.push(this.monthsShort(n,"")),i.push(this.months(n,"")),o.push(this.months(n,"")),o.push(this.monthsShort(n,""));for(r.sort(e),i.sort(e),o.sort(e),t=0;t<12;t++)r[t]=ee(r[t]),i[t]=ee(i[t]);for(t=0;t<24;t++)o[t]=ee(o[t]);this._monthsRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+r.join("|")+")","i")}function ge(e){return me(e)?366:365}function me(e){return e%4===0&&e%100!==0||e%400===0}function ve(){return me(this.year())}function be(e,t,n,r,i,o,a){var s=new Date(e,t,n,r,i,o,a);return e<100&&e>=0&&isFinite(s.getFullYear())&&s.setFullYear(e),s}function ye(e){var t=new Date(Date.UTC.apply(null,arguments));return e<100&&e>=0&&isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e),t}function we(e,t,n){var r=7+t-n,i=(7+ye(e,0,r).getUTCDay()-t)%7;return-i+r-1}function xe(e,t,n,r,i){var o,a,s=(7+n-r)%7,l=we(e,r,i),u=1+7*(t-1)+s+l;return u<=0?(o=e-1,a=ge(o)+u):u>ge(e)?(o=e+1,a=u-ge(e)):(o=e,a=u),{year:o,dayOfYear:a}}function _e(e,t,n){var r,i,o=we(e.year(),t,n),a=Math.floor((e.dayOfYear()-o-1)/7)+1;return a<1?(i=e.year()-1,r=a+Ee(i,t,n)):a>Ee(e.year(),t,n)?(r=a-Ee(e.year(),t,n),i=e.year()+1):(i=e.year(),r=a),{week:r,year:i}}function Ee(e,t,n){var r=we(e,t,n),i=we(e+1,t,n);return(ge(e)-r+i)/7}function Ce(e){return _e(e,this._week.dow,this._week.doy).week}function ke(){return this._week.dow}function Se(){return this._week.doy}function Ae(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")}function Te(e){var t=_e(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")}function De(e,t){return"string"!=typeof e?e:isNaN(e)?(e=t.weekdaysParse(e),"number"==typeof e?e:null):parseInt(e,10)}function Ne(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Fe(e,t){return e?r(this._weekdays)?this._weekdays[e.day()]:this._weekdays[this._weekdays.isFormat.test(t)?"format":"standalone"][e.day()]:this._weekdays}function Me(e){return e?this._weekdaysShort[e.day()]:this._weekdaysShort}function Oe(e){return e?this._weekdaysMin[e.day()]:this._weekdaysMin}function Le(e,t,n){var r,i,o,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)o=c([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(o,"").toLocaleLowerCase();return n?"dddd"===t?(i=wr.call(this._weekdaysParse,a),i!==-1?i:null):"ddd"===t?(i=wr.call(this._shortWeekdaysParse,a),i!==-1?i:null):(i=wr.call(this._minWeekdaysParse,a),i!==-1?i:null):"dddd"===t?(i=wr.call(this._weekdaysParse,a),i!==-1?i:(i=wr.call(this._shortWeekdaysParse,a),i!==-1?i:(i=wr.call(this._minWeekdaysParse,a),i!==-1?i:null))):"ddd"===t?(i=wr.call(this._shortWeekdaysParse,a),i!==-1?i:(i=wr.call(this._weekdaysParse,a),i!==-1?i:(i=wr.call(this._minWeekdaysParse,a),i!==-1?i:null))):(i=wr.call(this._minWeekdaysParse,a),i!==-1?i:(i=wr.call(this._weekdaysParse,a),i!==-1?i:(i=wr.call(this._shortWeekdaysParse,a),i!==-1?i:null)))}function Pe(e,t,n){var r,i,o;if(this._weekdaysParseExact)return Le.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=c([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".",".?")+"$","i")),this._weekdaysParse[r]||(o="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(o.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[r].test(e))return r;if(n&&"ddd"===t&&this._shortWeekdaysParse[r].test(e))return r;if(n&&"dd"===t&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}function Ie(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=De(e,this.localeData()),this.add(e-t,"d")):t}function Re(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")}function Be(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=Ne(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7}function je(e){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||Ue.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(l(this,"_weekdaysRegex")||(this._weekdaysRegex=vi),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function $e(e){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||Ue.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(l(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=bi),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Ve(e){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||Ue.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(l(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=yi),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Ue(){function e(e,t){return t.length-e.length}var t,n,r,i,o,a=[],s=[],l=[],u=[];for(t=0;t<7;t++)n=c([2e3,1]).day(t),r=this.weekdaysMin(n,""),i=this.weekdaysShort(n,""),o=this.weekdays(n,""),a.push(r),s.push(i),l.push(o),u.push(r),u.push(i),u.push(o);for(a.sort(e),s.sort(e),l.sort(e),u.sort(e),t=0;t<7;t++)s[t]=ee(s[t]),l[t]=ee(l[t]),u[t]=ee(u[t]);this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function We(){return this.hours()%12||12}function qe(){return this.hours()||24}function He(e,t){z(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function ze(e,t){return t._meridiemParse}function Ge(e){return"p"===(e+"").toLowerCase().charAt(0)}function Ke(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}function Ye(e){return e?e.toLowerCase().replace("_","-"):e}function Xe(e){for(var t,n,r,i,o=0;o<e.length;){for(i=Ye(e[o]).split("-"),t=i.length,n=Ye(e[o+1]),n=n?n.split("-"):null;t>0;){if(r=Qe(i.slice(0,t).join("-")))return r;if(n&&n.length>=t&&x(i,n,!0)>=t-1)break;t--}o++}return null}function Qe(t){var n=null;if(!Ci[t]&&"undefined"!=typeof e&&e&&e.require)try{n=wi._abbr,e.require("./locale/"+t),Je(n)}catch(r){}return Ci[t]}function Je(e,t){var n;return e&&(n=g(t)?tt(e):Ze(e,t),n&&(wi=n)),wi._abbr}function Ze(e,t){if(null!==t){var n=Ei;return t.abbr=e,null!=Ci[e]?(C("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=Ci[e]._config):null!=t.parentLocale&&(null!=Ci[t.parentLocale]?n=Ci[t.parentLocale]._config:C("parentLocaleUndefined","specified parentLocale is not defined yet. See http://momentjs.com/guides/#/warnings/parent-locale/")),Ci[e]=new T(A(n,t)),Je(e),Ci[e]}return delete Ci[e],null}function et(e,t){if(null!=t){var n,r=Ei;null!=Ci[e]&&(r=Ci[e]._config),t=A(r,t),n=new T(t),n.parentLocale=Ci[e],Ci[e]=n,Je(e)}else null!=Ci[e]&&(null!=Ci[e].parentLocale?Ci[e]=Ci[e].parentLocale:null!=Ci[e]&&delete Ci[e]);return Ci[e]}function tt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return wi;if(!r(e)){if(t=Qe(e))return t;e=[e]}return Xe(e)}function nt(){return yr(Ci)}function rt(e){var t,n=e._a;return n&&f(e).overflow===-2&&(t=n[Zr]<0||n[Zr]>11?Zr:n[ei]<1||n[ei]>ie(n[Jr],n[Zr])?ei:n[ti]<0||n[ti]>24||24===n[ti]&&(0!==n[ni]||0!==n[ri]||0!==n[ii])?ti:n[ni]<0||n[ni]>59?ni:n[ri]<0||n[ri]>59?ri:n[ii]<0||n[ii]>999?ii:-1,f(e)._overflowDayOfYear&&(t<Jr||t>ei)&&(t=ei),f(e)._overflowWeeks&&t===-1&&(t=oi),f(e)._overflowWeekday&&t===-1&&(t=ai),f(e).overflow=t),e}function it(e){var t,n,r,i,o,a,s=e._i,l=ki.exec(s)||Si.exec(s);if(l){for(f(e).iso=!0,t=0,n=Ti.length;t<n;t++)if(Ti[t][1].exec(l[1])){i=Ti[t][0],r=Ti[t][2]!==!1;break}if(null==i)return void(e._isValid=!1);if(l[3]){for(t=0,n=Di.length;t<n;t++)if(Di[t][1].exec(l[3])){o=(l[2]||" ")+Di[t][0];break}if(null==o)return void(e._isValid=!1)}if(!r&&null!=o)return void(e._isValid=!1);if(l[4]){if(!Ai.exec(l[4]))return void(e._isValid=!1);a="Z"}e._f=i+(o||"")+(a||""),ct(e)}else e._isValid=!1}function ot(e){var n=Ni.exec(e._i);return null!==n?void(e._d=new Date((+n[1]))):(it(e),void(e._isValid===!1&&(delete e._isValid,t.createFromInputFallback(e))))}function at(e,t,n){return null!=e?e:null!=t?t:n}function st(e){var n=new Date(t.now());return e._useUTC?[n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate()]:[n.getFullYear(),n.getMonth(),n.getDate()]}function lt(e){var t,n,r,i,o=[];if(!e._d){for(r=st(e),e._w&&null==e._a[ei]&&null==e._a[Zr]&&ut(e),e._dayOfYear&&(i=at(e._a[Jr],r[Jr]),e._dayOfYear>ge(i)&&(f(e)._overflowDayOfYear=!0),n=ye(i,0,e._dayOfYear),e._a[Zr]=n.getUTCMonth(),e._a[ei]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=o[t]=r[t];for(;t<7;t++)e._a[t]=o[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[ti]&&0===e._a[ni]&&0===e._a[ri]&&0===e._a[ii]&&(e._nextDay=!0,e._a[ti]=0),e._d=(e._useUTC?ye:be).apply(null,o),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[ti]=24)}}function ut(e){var t,n,r,i,o,a,s,l;t=e._w,null!=t.GG||null!=t.W||null!=t.E?(o=1,a=4,n=at(t.GG,e._a[Jr],_e(bt(),1,4).year),r=at(t.W,1),i=at(t.E,1),(i<1||i>7)&&(l=!0)):(o=e._locale._week.dow,a=e._locale._week.doy,n=at(t.gg,e._a[Jr],_e(bt(),o,a).year),r=at(t.w,1),null!=t.d?(i=t.d,(i<0||i>6)&&(l=!0)):null!=t.e?(i=t.e+o,(t.e<0||t.e>6)&&(l=!0)):i=o),r<1||r>Ee(n,o,a)?f(e)._overflowWeeks=!0:null!=l?f(e)._overflowWeekday=!0:(s=xe(n,r,i,o,a),e._a[Jr]=s.year,e._dayOfYear=s.dayOfYear)}function ct(e){if(e._f===t.ISO_8601)return void it(e);e._a=[],f(e).empty=!0;var n,r,i,o,a,s=""+e._i,l=s.length,u=0;for(i=X(e._f,e._locale).match(Dr)||[],n=0;n<i.length;n++)o=i[n],r=(s.match(J(o,e))||[])[0],r&&(a=s.substr(0,s.indexOf(r)),a.length>0&&f(e).unusedInput.push(a),s=s.slice(s.indexOf(r)+r.length),u+=r.length),Mr[o]?(r?f(e).empty=!1:f(e).unusedTokens.push(o),re(o,r,e)):e._strict&&!r&&f(e).unusedTokens.push(o);f(e).charsLeftOver=l-u,s.length>0&&f(e).unusedInput.push(s),e._a[ti]<=12&&f(e).bigHour===!0&&e._a[ti]>0&&(f(e).bigHour=void 0),f(e).parsedDateParts=e._a.slice(0),f(e).meridiem=e._meridiem,e._a[ti]=dt(e._locale,e._a[ti],e._meridiem),lt(e),rt(e)}function dt(e,t,n){var r;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?(r=e.isPM(n),r&&t<12&&(t+=12),r||12!==t||(t=0),t):t}function ft(e){var t,n,r,i,o;if(0===e._f.length)return f(e).invalidFormat=!0,void(e._d=new Date(NaN));for(i=0;i<e._f.length;i++)o=0,t=m({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[i],ct(t),p(t)&&(o+=f(t).charsLeftOver,o+=10*f(t).unusedTokens.length,f(t).score=o,(null==r||o<r)&&(r=o,n=t));u(e,n||t)}function pt(e){if(!e._d){var t=R(e._i);e._a=s([t.year,t.month,t.day||t.date,t.hour,t.minute,t.second,t.millisecond],function(e){return e&&parseInt(e,10)}),lt(e)}}function ht(e){var t=new v(rt(gt(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function gt(e){var t=e._i,n=e._f;return e._locale=e._locale||tt(e._l),null===t||void 0===n&&""===t?h({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),b(t)?new v(rt(t)):(r(n)?ft(e):a(t)?e._d=t:n?ct(e):mt(e),p(e)||(e._d=null),e))}function mt(e){var n=e._i;void 0===n?e._d=new Date(t.now()):a(n)?e._d=new Date(n.valueOf()):"string"==typeof n?ot(e):r(n)?(e._a=s(n.slice(0),function(e){return parseInt(e,10)}),lt(e)):"object"==typeof n?pt(e):"number"==typeof n?e._d=new Date(n):t.createFromInputFallback(e)}function vt(e,t,n,a,s){var l={};return"boolean"==typeof n&&(a=n,n=void 0),(i(e)&&o(e)||r(e)&&0===e.length)&&(e=void 0),l._isAMomentObject=!0,l._useUTC=l._isUTC=s,l._l=n,l._i=e,l._f=t,l._strict=a,ht(l)}function bt(e,t,n,r){return vt(e,t,n,r,!1)}function yt(e,t){var n,i;if(1===t.length&&r(t[0])&&(t=t[0]),!t.length)return bt();for(n=t[0],i=1;i<t.length;++i)t[i].isValid()&&!t[i][e](n)||(n=t[i]);return n}function wt(){var e=[].slice.call(arguments,0);return yt("isBefore",e)}function xt(){var e=[].slice.call(arguments,0);return yt("isAfter",e)}function _t(e){var t=R(e),n=t.year||0,r=t.quarter||0,i=t.month||0,o=t.week||0,a=t.day||0,s=t.hour||0,l=t.minute||0,u=t.second||0,c=t.millisecond||0;this._milliseconds=+c+1e3*u+6e4*l+1e3*s*60*60,this._days=+a+7*o,this._months=+i+3*r+12*n,this._data={},this._locale=tt(),this._bubble()}function Et(e){return e instanceof _t}function Ct(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function kt(e,t){z(e,0,0,function(){var e=this.utcOffset(),n="+";return e<0&&(e=-e,n="-"),n+H(~~(e/60),2)+t+H(~~e%60,2)})}function St(e,t){var n=(t||"").match(e)||[],r=n[n.length-1]||[],i=(r+"").match(Li)||["-",0,0],o=+(60*i[1])+w(i[2]);return"+"===i[0]?o:-o}function At(e,n){var r,i;return n._isUTC?(r=n.clone(),i=(b(e)||a(e)?e.valueOf():bt(e).valueOf())-r.valueOf(),r._d.setTime(r._d.valueOf()+i),t.updateOffset(r,!1),r):bt(e).local()}function Tt(e){return 15*-Math.round(e._d.getTimezoneOffset()/15)}function Dt(e,n){var r,i=this._offset||0;return this.isValid()?null!=e?("string"==typeof e?e=St(Gr,e):Math.abs(e)<16&&(e=60*e),!this._isUTC&&n&&(r=Tt(this)),this._offset=e,this._isUTC=!0,null!=r&&this.add(r,"m"),i!==e&&(!n||this._changeInProgress?Ht(this,$t(e-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,t.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?i:Tt(this):null!=e?this:NaN}function Nt(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function Ft(e){return this.utcOffset(0,e)}function Mt(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Tt(this),"m")),this}function Ot(){if(this._tzm)this.utcOffset(this._tzm);else if("string"==typeof this._i){var e=St(zr,this._i);0===e?this.utcOffset(0,!0):this.utcOffset(St(zr,this._i))}return this}function Lt(e){return!!this.isValid()&&(e=e?bt(e).utcOffset():0,(this.utcOffset()-e)%60===0)}function Pt(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function It(){if(!g(this._isDSTShifted))return this._isDSTShifted;var e={};if(m(e,this),e=gt(e),e._a){var t=e._isUTC?c(e._a):bt(e._a);this._isDSTShifted=this.isValid()&&x(e._a,t.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function Rt(){return!!this.isValid()&&!this._isUTC;
}function Bt(){return!!this.isValid()&&this._isUTC}function jt(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}function $t(e,t){var n,r,i,o=e,a=null;return Et(e)?o={ms:e._milliseconds,d:e._days,M:e._months}:"number"==typeof e?(o={},t?o[t]=e:o.milliseconds=e):(a=Pi.exec(e))?(n="-"===a[1]?-1:1,o={y:0,d:w(a[ei])*n,h:w(a[ti])*n,m:w(a[ni])*n,s:w(a[ri])*n,ms:w(Ct(1e3*a[ii]))*n}):(a=Ii.exec(e))?(n="-"===a[1]?-1:1,o={y:Vt(a[2],n),M:Vt(a[3],n),w:Vt(a[4],n),d:Vt(a[5],n),h:Vt(a[6],n),m:Vt(a[7],n),s:Vt(a[8],n)}):null==o?o={}:"object"==typeof o&&("from"in o||"to"in o)&&(i=Wt(bt(o.from),bt(o.to)),o={},o.ms=i.milliseconds,o.M=i.months),r=new _t(o),Et(e)&&l(e,"_locale")&&(r._locale=e._locale),r}function Vt(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Ut(e,t){var n={milliseconds:0,months:0};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function Wt(e,t){var n;return e.isValid()&&t.isValid()?(t=At(t,e),e.isBefore(t)?n=Ut(e,t):(n=Ut(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function qt(e,t){return function(n,r){var i,o;return null===r||isNaN(+r)||(C(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),o=n,n=r,r=o),n="string"==typeof n?+n:n,i=$t(n,r),Ht(this,i,e),this}}function Ht(e,n,r,i){var o=n._milliseconds,a=Ct(n._days),s=Ct(n._months);e.isValid()&&(i=null==i||i,o&&e._d.setTime(e._d.valueOf()+o*r),a&&U(e,"Date",V(e,"Date")+a*r),s&&ue(e,V(e,"Month")+s*r),i&&t.updateOffset(e,a||s))}function zt(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function Gt(e,n){var r=e||bt(),i=At(r,this).startOf("day"),o=t.calendarFormat(this,i)||"sameElse",a=n&&(k(n[o])?n[o].call(this,r):n[o]);return this.format(a||this.localeData().calendar(o,this,bt(r)))}function Kt(){return new v(this)}function Yt(e,t){var n=b(e)?e:bt(e);return!(!this.isValid()||!n.isValid())&&(t=I(g(t)?"millisecond":t),"millisecond"===t?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())}function Xt(e,t){var n=b(e)?e:bt(e);return!(!this.isValid()||!n.isValid())&&(t=I(g(t)?"millisecond":t),"millisecond"===t?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())}function Qt(e,t,n,r){return r=r||"()",("("===r[0]?this.isAfter(e,n):!this.isBefore(e,n))&&(")"===r[1]?this.isBefore(t,n):!this.isAfter(t,n))}function Jt(e,t){var n,r=b(e)?e:bt(e);return!(!this.isValid()||!r.isValid())&&(t=I(t||"millisecond"),"millisecond"===t?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))}function Zt(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function en(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function tn(e,t,n){var r,i,o,a;return this.isValid()?(r=At(e,this),r.isValid()?(i=6e4*(r.utcOffset()-this.utcOffset()),t=I(t),"year"===t||"month"===t||"quarter"===t?(a=nn(this,r),"quarter"===t?a/=3:"year"===t&&(a/=12)):(o=this-r,a="second"===t?o/1e3:"minute"===t?o/6e4:"hour"===t?o/36e5:"day"===t?(o-i)/864e5:"week"===t?(o-i)/6048e5:o),n?a:y(a)):NaN):NaN}function nn(e,t){var n,r,i=12*(t.year()-e.year())+(t.month()-e.month()),o=e.clone().add(i,"months");return t-o<0?(n=e.clone().add(i-1,"months"),r=(t-o)/(o-n)):(n=e.clone().add(i+1,"months"),r=(t-o)/(n-o)),-(i+r)||0}function rn(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function on(){var e=this.clone().utc();return 0<e.year()&&e.year()<=9999?k(Date.prototype.toISOString)?this.toDate().toISOString():Y(e,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):Y(e,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")}function an(e){e||(e=this.isUtc()?t.defaultFormatUtc:t.defaultFormat);var n=Y(this,e);return this.localeData().postformat(n)}function sn(e,t){return this.isValid()&&(b(e)&&e.isValid()||bt(e).isValid())?$t({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function ln(e){return this.from(bt(),e)}function un(e,t){return this.isValid()&&(b(e)&&e.isValid()||bt(e).isValid())?$t({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function cn(e){return this.to(bt(),e)}function dn(e){var t;return void 0===e?this._locale._abbr:(t=tt(e),null!=t&&(this._locale=t),this)}function fn(){return this._locale}function pn(e){switch(e=I(e)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":case"date":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===e&&this.weekday(0),"isoWeek"===e&&this.isoWeekday(1),"quarter"===e&&this.month(3*Math.floor(this.month()/3)),this}function hn(e){return e=I(e),void 0===e||"millisecond"===e?this:("date"===e&&(e="day"),this.startOf(e).add(1,"isoWeek"===e?"week":e).subtract(1,"ms"))}function gn(){return this._d.valueOf()-6e4*(this._offset||0)}function mn(){return Math.floor(this.valueOf()/1e3)}function vn(){return new Date(this.valueOf())}function bn(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function yn(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function wn(){return this.isValid()?this.toISOString():null}function xn(){return p(this)}function _n(){return u({},f(this))}function En(){return f(this).overflow}function Cn(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function kn(e,t){z(0,[e,e.length],0,t)}function Sn(e){return Nn.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function An(e){return Nn.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function Tn(){return Ee(this.year(),1,4)}function Dn(){var e=this.localeData()._week;return Ee(this.year(),e.dow,e.doy)}function Nn(e,t,n,r,i){var o;return null==e?_e(this,r,i).year:(o=Ee(e,r,i),t>o&&(t=o),Fn.call(this,e,t,n,r,i))}function Fn(e,t,n,r,i){var o=xe(e,t,n,r,i),a=ye(o.year,0,o.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}function Mn(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)}function On(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")}function Ln(e,t){t[ii]=w(1e3*("0."+e))}function Pn(){return this._isUTC?"UTC":""}function In(){return this._isUTC?"Coordinated Universal Time":""}function Rn(e){return bt(1e3*e)}function Bn(){return bt.apply(null,arguments).parseZone()}function jn(e){return e}function $n(e,t,n,r){var i=tt(),o=c().set(r,t);return i[n](o,e)}function Vn(e,t,n){if("number"==typeof e&&(t=e,e=void 0),e=e||"",null!=t)return $n(e,t,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=$n(e,r,n,"month");return i}function Un(e,t,n,r){"boolean"==typeof e?("number"==typeof t&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,"number"==typeof t&&(n=t,t=void 0),t=t||"");var i=tt(),o=e?i._week.dow:0;if(null!=n)return $n(t,(n+o)%7,r,"day");var a,s=[];for(a=0;a<7;a++)s[a]=$n(t,(a+o)%7,r,"day");return s}function Wn(e,t){return Vn(e,t,"months")}function qn(e,t){return Vn(e,t,"monthsShort")}function Hn(e,t,n){return Un(e,t,n,"weekdays")}function zn(e,t,n){return Un(e,t,n,"weekdaysShort")}function Gn(e,t,n){return Un(e,t,n,"weekdaysMin")}function Kn(){var e=this._data;return this._milliseconds=Ki(this._milliseconds),this._days=Ki(this._days),this._months=Ki(this._months),e.milliseconds=Ki(e.milliseconds),e.seconds=Ki(e.seconds),e.minutes=Ki(e.minutes),e.hours=Ki(e.hours),e.months=Ki(e.months),e.years=Ki(e.years),this}function Yn(e,t,n,r){var i=$t(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function Xn(e,t){return Yn(this,e,t,1)}function Qn(e,t){return Yn(this,e,t,-1)}function Jn(e){return e<0?Math.floor(e):Math.ceil(e)}function Zn(){var e,t,n,r,i,o=this._milliseconds,a=this._days,s=this._months,l=this._data;return o>=0&&a>=0&&s>=0||o<=0&&a<=0&&s<=0||(o+=864e5*Jn(tr(s)+a),a=0,s=0),l.milliseconds=o%1e3,e=y(o/1e3),l.seconds=e%60,t=y(e/60),l.minutes=t%60,n=y(t/60),l.hours=n%24,a+=y(n/24),i=y(er(a)),s+=i,a-=Jn(tr(i)),r=y(s/12),s%=12,l.days=a,l.months=s,l.years=r,this}function er(e){return 4800*e/146097}function tr(e){return 146097*e/4800}function nr(e){var t,n,r=this._milliseconds;if(e=I(e),"month"===e||"year"===e)return t=this._days+r/864e5,n=this._months+er(t),"month"===e?n:n/12;switch(t=this._days+Math.round(tr(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return 24*t+r/36e5;case"minute":return 1440*t+r/6e4;case"second":return 86400*t+r/1e3;case"millisecond":return Math.floor(864e5*t)+r;default:throw new Error("Unknown unit "+e)}}function rr(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*w(this._months/12)}function ir(e){return function(){return this.as(e)}}function or(e){return e=I(e),this[e+"s"]()}function ar(e){return function(){return this._data[e]}}function sr(){return y(this.days()/7)}function lr(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}function ur(e,t,n){var r=$t(e).abs(),i=co(r.as("s")),o=co(r.as("m")),a=co(r.as("h")),s=co(r.as("d")),l=co(r.as("M")),u=co(r.as("y")),c=i<fo.s&&["s",i]||o<=1&&["m"]||o<fo.m&&["mm",o]||a<=1&&["h"]||a<fo.h&&["hh",a]||s<=1&&["d"]||s<fo.d&&["dd",s]||l<=1&&["M"]||l<fo.M&&["MM",l]||u<=1&&["y"]||["yy",u];return c[2]=t,c[3]=+e>0,c[4]=n,lr.apply(null,c)}function cr(e){return void 0===e?co:"function"==typeof e&&(co=e,!0)}function dr(e,t){return void 0!==fo[e]&&(void 0===t?fo[e]:(fo[e]=t,!0))}function fr(e){var t=this.localeData(),n=ur(this,!e,t);return e&&(n=t.pastFuture(+this,n)),t.postformat(n)}function pr(){var e,t,n,r=po(this._milliseconds)/1e3,i=po(this._days),o=po(this._months);e=y(r/60),t=y(e/60),r%=60,e%=60,n=y(o/12),o%=12;var a=n,s=o,l=i,u=t,c=e,d=r,f=this.asSeconds();return f?(f<0?"-":"")+"P"+(a?a+"Y":"")+(s?s+"M":"")+(l?l+"D":"")+(u||c||d?"T":"")+(u?u+"H":"")+(c?c+"M":"")+(d?d+"S":""):"P0D"}var hr,gr;gr=Array.prototype.some?Array.prototype.some:function(e){for(var t=Object(this),n=t.length>>>0,r=0;r<n;r++)if(r in t&&e.call(this,t[r],r,t))return!0;return!1};var mr=t.momentProperties=[],vr=!1,br={};t.suppressDeprecationWarnings=!1,t.deprecationHandler=null;var yr;yr=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)l(e,t)&&n.push(t);return n};var wr,xr={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},_r={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},Er="Invalid date",Cr="%d",kr=/\d{1,2}/,Sr={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},Ar={},Tr={},Dr=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Nr=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Fr={},Mr={},Or=/\d/,Lr=/\d\d/,Pr=/\d{3}/,Ir=/\d{4}/,Rr=/[+-]?\d{6}/,Br=/\d\d?/,jr=/\d\d\d\d?/,$r=/\d\d\d\d\d\d?/,Vr=/\d{1,3}/,Ur=/\d{1,4}/,Wr=/[+-]?\d{1,6}/,qr=/\d+/,Hr=/[+-]?\d+/,zr=/Z|[+-]\d\d:?\d\d/gi,Gr=/Z|[+-]\d\d(?::?\d\d)?/gi,Kr=/[+-]?\d+(\.\d{1,3})?/,Yr=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,Xr={},Qr={},Jr=0,Zr=1,ei=2,ti=3,ni=4,ri=5,ii=6,oi=7,ai=8;wr=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},z("M",["MM",2],"Mo",function(){return this.month()+1}),z("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),z("MMMM",0,0,function(e){return this.localeData().months(this,e)}),P("month","M"),B("month",8),Q("M",Br),Q("MM",Br,Lr),Q("MMM",function(e,t){return t.monthsShortRegex(e)}),Q("MMMM",function(e,t){return t.monthsRegex(e)}),te(["M","MM"],function(e,t){t[Zr]=w(e)-1}),te(["MMM","MMMM"],function(e,t,n,r){var i=n._locale.monthsParse(e,r,n._strict);null!=i?t[Zr]=i:f(n).invalidMonth=e});var si=/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/,li="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ui="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),ci=Yr,di=Yr;z("Y",0,0,function(){var e=this.year();return e<=9999?""+e:"+"+e}),z(0,["YY",2],0,function(){return this.year()%100}),z(0,["YYYY",4],0,"year"),z(0,["YYYYY",5],0,"year"),z(0,["YYYYYY",6,!0],0,"year"),P("year","y"),B("year",1),Q("Y",Hr),Q("YY",Br,Lr),Q("YYYY",Ur,Ir),Q("YYYYY",Wr,Rr),Q("YYYYYY",Wr,Rr),te(["YYYYY","YYYYYY"],Jr),te("YYYY",function(e,n){n[Jr]=2===e.length?t.parseTwoDigitYear(e):w(e)}),te("YY",function(e,n){n[Jr]=t.parseTwoDigitYear(e)}),te("Y",function(e,t){t[Jr]=parseInt(e,10)}),t.parseTwoDigitYear=function(e){return w(e)+(w(e)>68?1900:2e3)};var fi=$("FullYear",!0);z("w",["ww",2],"wo","week"),z("W",["WW",2],"Wo","isoWeek"),P("week","w"),P("isoWeek","W"),B("week",5),B("isoWeek",5),Q("w",Br),Q("ww",Br,Lr),Q("W",Br),Q("WW",Br,Lr),ne(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=w(e)});var pi={dow:0,doy:6};z("d",0,"do","day"),z("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),z("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),z("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),z("e",0,0,"weekday"),z("E",0,0,"isoWeekday"),P("day","d"),P("weekday","e"),P("isoWeekday","E"),B("day",11),B("weekday",11),B("isoWeekday",11),Q("d",Br),Q("e",Br),Q("E",Br),Q("dd",function(e,t){return t.weekdaysMinRegex(e)}),Q("ddd",function(e,t){return t.weekdaysShortRegex(e)}),Q("dddd",function(e,t){return t.weekdaysRegex(e)}),ne(["dd","ddd","dddd"],function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);null!=i?t.d=i:f(n).invalidWeekday=e}),ne(["d","e","E"],function(e,t,n,r){t[r]=w(e)});var hi="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),gi="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),mi="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),vi=Yr,bi=Yr,yi=Yr;z("H",["HH",2],0,"hour"),z("h",["hh",2],0,We),z("k",["kk",2],0,qe),z("hmm",0,0,function(){return""+We.apply(this)+H(this.minutes(),2)}),z("hmmss",0,0,function(){return""+We.apply(this)+H(this.minutes(),2)+H(this.seconds(),2)}),z("Hmm",0,0,function(){return""+this.hours()+H(this.minutes(),2)}),z("Hmmss",0,0,function(){return""+this.hours()+H(this.minutes(),2)+H(this.seconds(),2)}),He("a",!0),He("A",!1),P("hour","h"),B("hour",13),Q("a",ze),Q("A",ze),Q("H",Br),Q("h",Br),Q("HH",Br,Lr),Q("hh",Br,Lr),Q("hmm",jr),Q("hmmss",$r),Q("Hmm",jr),Q("Hmmss",$r),te(["H","HH"],ti),te(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),te(["h","hh"],function(e,t,n){t[ti]=w(e),f(n).bigHour=!0}),te("hmm",function(e,t,n){var r=e.length-2;t[ti]=w(e.substr(0,r)),t[ni]=w(e.substr(r)),f(n).bigHour=!0}),te("hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[ti]=w(e.substr(0,r)),t[ni]=w(e.substr(r,2)),t[ri]=w(e.substr(i)),f(n).bigHour=!0}),te("Hmm",function(e,t,n){var r=e.length-2;t[ti]=w(e.substr(0,r)),t[ni]=w(e.substr(r))}),te("Hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[ti]=w(e.substr(0,r)),t[ni]=w(e.substr(r,2)),t[ri]=w(e.substr(i))});var wi,xi=/[ap]\.?m?\.?/i,_i=$("Hours",!0),Ei={calendar:xr,longDateFormat:_r,invalidDate:Er,ordinal:Cr,ordinalParse:kr,relativeTime:Sr,months:li,monthsShort:ui,week:pi,weekdays:hi,weekdaysMin:mi,weekdaysShort:gi,meridiemParse:xi},Ci={},ki=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/,Si=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/,Ai=/Z|[+-]\d\d(?::?\d\d)?/,Ti=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],Di=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Ni=/^\/?Date\((\-?\d+)/i;t.createFromInputFallback=E("value provided is not in a recognized ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))}),t.ISO_8601=function(){};var Fi=E("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=bt.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:h()}),Mi=E("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=bt.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:h()}),Oi=function(){return Date.now?Date.now():+new Date};kt("Z",":"),kt("ZZ",""),Q("Z",Gr),Q("ZZ",Gr),te(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=St(Gr,e)});var Li=/([\+\-]|\d\d)/gi;t.updateOffset=function(){};var Pi=/^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,Ii=/^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?$/;$t.fn=_t.prototype;var Ri=qt(1,"add"),Bi=qt(-1,"subtract");t.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",t.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var ji=E("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});z(0,["gg",2],0,function(){return this.weekYear()%100}),z(0,["GG",2],0,function(){return this.isoWeekYear()%100}),kn("gggg","weekYear"),kn("ggggg","weekYear"),kn("GGGG","isoWeekYear"),kn("GGGGG","isoWeekYear"),P("weekYear","gg"),P("isoWeekYear","GG"),B("weekYear",1),B("isoWeekYear",1),Q("G",Hr),Q("g",Hr),Q("GG",Br,Lr),Q("gg",Br,Lr),Q("GGGG",Ur,Ir),Q("gggg",Ur,Ir),Q("GGGGG",Wr,Rr),Q("ggggg",Wr,Rr),ne(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,r){t[r.substr(0,2)]=w(e)}),ne(["gg","GG"],function(e,n,r,i){n[i]=t.parseTwoDigitYear(e)}),z("Q",0,"Qo","quarter"),P("quarter","Q"),B("quarter",7),Q("Q",Or),te("Q",function(e,t){t[Zr]=3*(w(e)-1)}),z("D",["DD",2],"Do","date"),P("date","D"),B("date",9),Q("D",Br),Q("DD",Br,Lr),Q("Do",function(e,t){return e?t._ordinalParse:t._ordinalParseLenient}),te(["D","DD"],ei),te("Do",function(e,t){t[ei]=w(e.match(Br)[0],10)});var $i=$("Date",!0);z("DDD",["DDDD",3],"DDDo","dayOfYear"),P("dayOfYear","DDD"),B("dayOfYear",4),Q("DDD",Vr),Q("DDDD",Pr),te(["DDD","DDDD"],function(e,t,n){n._dayOfYear=w(e)}),z("m",["mm",2],0,"minute"),P("minute","m"),B("minute",14),Q("m",Br),Q("mm",Br,Lr),te(["m","mm"],ni);var Vi=$("Minutes",!1);z("s",["ss",2],0,"second"),P("second","s"),B("second",15),Q("s",Br),Q("ss",Br,Lr),te(["s","ss"],ri);var Ui=$("Seconds",!1);z("S",0,0,function(){return~~(this.millisecond()/100)}),z(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),z(0,["SSS",3],0,"millisecond"),z(0,["SSSS",4],0,function(){return 10*this.millisecond()}),z(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),z(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),z(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),z(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),z(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),P("millisecond","ms"),B("millisecond",16),Q("S",Vr,Or),Q("SS",Vr,Lr),Q("SSS",Vr,Pr);var Wi;for(Wi="SSSS";Wi.length<=9;Wi+="S")Q(Wi,qr);for(Wi="S";Wi.length<=9;Wi+="S")te(Wi,Ln);var qi=$("Milliseconds",!1);z("z",0,0,"zoneAbbr"),z("zz",0,0,"zoneName");var Hi=v.prototype;Hi.add=Ri,Hi.calendar=Gt,Hi.clone=Kt,Hi.diff=tn,Hi.endOf=hn,Hi.format=an,Hi.from=sn,Hi.fromNow=ln,Hi.to=un,Hi.toNow=cn,Hi.get=W,Hi.invalidAt=En,Hi.isAfter=Yt,Hi.isBefore=Xt,Hi.isBetween=Qt,Hi.isSame=Jt,Hi.isSameOrAfter=Zt,Hi.isSameOrBefore=en,Hi.isValid=xn,Hi.lang=ji,Hi.locale=dn,Hi.localeData=fn,Hi.max=Mi,Hi.min=Fi,Hi.parsingFlags=_n,Hi.set=q,Hi.startOf=pn,Hi.subtract=Bi,Hi.toArray=bn,Hi.toObject=yn,Hi.toDate=vn,Hi.toISOString=on,Hi.toJSON=wn,Hi.toString=rn,Hi.unix=mn,Hi.valueOf=gn,Hi.creationData=Cn,Hi.year=fi,Hi.isLeapYear=ve,Hi.weekYear=Sn,Hi.isoWeekYear=An,Hi.quarter=Hi.quarters=Mn,Hi.month=ce,Hi.daysInMonth=de,Hi.week=Hi.weeks=Ae,Hi.isoWeek=Hi.isoWeeks=Te,Hi.weeksInYear=Dn,Hi.isoWeeksInYear=Tn,Hi.date=$i,Hi.day=Hi.days=Ie,Hi.weekday=Re,Hi.isoWeekday=Be,Hi.dayOfYear=On,Hi.hour=Hi.hours=_i,Hi.minute=Hi.minutes=Vi,Hi.second=Hi.seconds=Ui,Hi.millisecond=Hi.milliseconds=qi,Hi.utcOffset=Dt,Hi.utc=Ft,Hi.local=Mt,Hi.parseZone=Ot,Hi.hasAlignedHourOffset=Lt,Hi.isDST=Pt,Hi.isLocal=Rt,Hi.isUtcOffset=Bt,Hi.isUtc=jt,Hi.isUTC=jt,Hi.zoneAbbr=Pn,Hi.zoneName=In,Hi.dates=E("dates accessor is deprecated. Use date instead.",$i),Hi.months=E("months accessor is deprecated. Use month instead",ce),Hi.years=E("years accessor is deprecated. Use year instead",fi),Hi.zone=E("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Nt),Hi.isDSTShifted=E("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",It);var zi=Hi,Gi=T.prototype;Gi.calendar=D,Gi.longDateFormat=N,Gi.invalidDate=F,Gi.ordinal=M,Gi.preparse=jn,Gi.postformat=jn,Gi.relativeTime=O,Gi.pastFuture=L,Gi.set=S,Gi.months=oe,Gi.monthsShort=ae,Gi.monthsParse=le,Gi.monthsRegex=pe,Gi.monthsShortRegex=fe,Gi.week=Ce,Gi.firstDayOfYear=Se,Gi.firstDayOfWeek=ke,Gi.weekdays=Fe,Gi.weekdaysMin=Oe,Gi.weekdaysShort=Me,Gi.weekdaysParse=Pe,Gi.weekdaysRegex=je,Gi.weekdaysShortRegex=$e,Gi.weekdaysMinRegex=Ve,Gi.isPM=Ge,Gi.meridiem=Ke,Je("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=1===w(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+n}}),t.lang=E("moment.lang is deprecated. Use moment.locale instead.",Je),t.langData=E("moment.langData is deprecated. Use moment.localeData instead.",tt);var Ki=Math.abs,Yi=ir("ms"),Xi=ir("s"),Qi=ir("m"),Ji=ir("h"),Zi=ir("d"),eo=ir("w"),to=ir("M"),no=ir("y"),ro=ar("milliseconds"),io=ar("seconds"),oo=ar("minutes"),ao=ar("hours"),so=ar("days"),lo=ar("months"),uo=ar("years"),co=Math.round,fo={s:45,m:45,h:22,d:26,M:11},po=Math.abs,ho=_t.prototype;ho.abs=Kn,ho.add=Xn,ho.subtract=Qn,ho.as=nr,ho.asMilliseconds=Yi,ho.asSeconds=Xi,ho.asMinutes=Qi,ho.asHours=Ji,ho.asDays=Zi,ho.asWeeks=eo,ho.asMonths=to,ho.asYears=no,ho.valueOf=rr,ho._bubble=Zn,ho.get=or,ho.milliseconds=ro,ho.seconds=io,ho.minutes=oo,ho.hours=ao,ho.days=so,ho.weeks=sr,ho.months=lo,ho.years=uo,ho.humanize=fr,ho.toISOString=pr,ho.toString=pr,ho.toJSON=pr,ho.locale=dn,ho.localeData=fn,ho.toIsoString=E("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",pr),ho.lang=ji,z("X",0,0,"unix"),z("x",0,0,"valueOf"),Q("x",Hr),Q("X",Kr),te("X",function(e,t,n){n._d=new Date(1e3*parseFloat(e,10))}),te("x",function(e,t,n){n._d=new Date(w(e))}),t.version="2.15.0",n(bt),t.fn=zi,t.min=wt,t.max=xt,t.now=Oi,t.utc=c,t.unix=Rn,t.months=Wn,t.isDate=a,t.locale=Je,t.invalid=h,t.duration=$t,t.isMoment=b,t.weekdays=Hn,t.parseZone=Bn,t.localeData=tt,t.isDuration=Et,t.monthsShort=qn,t.weekdaysMin=Gn,t.defineLocale=Ze,t.updateLocale=et,t.locales=nt,t.weekdaysShort=zn,t.normalizeUnits=I,t.relativeTimeRounding=cr,t.relativeTimeThreshold=dr,t.calendarFormat=zt,t.prototype=zi;var go=t;return go})}).call(t,n(90)(e))},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=n(100),a=r(o),s=n(102),l=r(s),u=n(103),c=r(u),d=n(105),f=r(d),p=n(96),h=r(p),g=n(268),m=r(g),v=n(95),b=r(v),y=n(269),w=r(y),x=n(86),E=r(x),C=n(91),k=r(C);k["default"].$=E["default"],k["default"].ajax=function(){return k["default"].$.ajax.apply(k["default"].$,arguments)},i(a["default"],{Layout:l["default"],Router:c["default"],RouteObject:f["default"],utils:h["default"],Store:m["default"],Events:_.extend({},k["default"].Events),dispatcher:new w["default"].Dispatcher}),a["default"].constants=b["default"],a["default"].dispatch=_.bind(a["default"].dispatcher.dispatch,a["default"].dispatcher),a["default"].navigate=function(e,t){var n=_.extend({trigger:!0},t);a["default"].router.navigate(e,n)},a["default"].beforeUnload=function(){a["default"].router.beforeUnload.apply(a["default"].router,arguments)},a["default"].removeBeforeUnload=function(){a["default"].router.removeBeforeUnload.apply(a["default"].router,arguments)},a["default"].addRoute=function(e){a["default"].router.route(e.route,e.name,e.callback)},a["default"].triggerRouteEvent=function(e,t){a["default"].router.triggerRouteEvent("route:"+e,t)};var S={};a["default"].registerUrls=function(e,t){S[e]=t},a["default"].urls=function(e,t){var n,r=a["default"].getExtensions("urls:interceptors"),i=arguments;return _.find(r,function(e){var t=e.apply(null,i);return!!t&&(n=t,!0)}),_.isUndefined(n)?S[e]?S[e][t]?(i=Array.prototype.slice.call(arguments,2),n=S[e][t].apply(null,i)):(console.error("could not find context ",t),""):(console.error("could not find name ",e),""):n},a["default"].getIndexTypePropNames=function(){var e=a["default"].getExtensions("IndexTypes:propNames");return e.push("views"),e},t["default"]=a["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(91),o=r(i),a=n(101),s=(r(a),{router:{navigate:function(){}},masterLayout:{},addHeaderLink:function(e){s.dispatch({type:"ADD_NAVBAR_LINK",link:e})},addNotification:function(e){e=_.extend({msg:"Notification Event Triggered!",type:"info",escape:!0,clear:!1},e),s.dispatch({type:"ADD_NOTIFICATION",options:{info:e}})},config:function(e){return _.extend(this,e)}});s.Deferred=function(){return $.Deferred()},s.when=function(e){return e instanceof Array?$.when.apply(null,e):$.when(e)},s.addonExtensions={initialize:function(){},RouteObjects:{},Views:{}},s.addon=function(e){return _.extend(_.clone(s.addonExtensions),e)},s.View=o["default"].View.extend({establish:function(){return null},loaderClassname:"loader",manage:!0,disableLoader:!1,forceRender:function(){this.hasRendered=!1}});var l={fetchOnce:function(e){var t=_.extend({},e);return this._deferred&&"rejected"!==this._deferred.state()&&!t.forceFetch||(this._deferred=this.fetch()),this._deferred}};s.Model=o["default"].Model.extend({}),s.Collection=o["default"].Collection.extend({}),_.each([s.Model,s.Collection],function(e){_.extend(e.prototype,l)});var u=_.extend({},o["default"].Events);s.registerExtension=function(e,t){u[e]||(u[e]=[]),u.trigger("add:"+e,t),u[e].push(t)},s.unRegisterExtension=function(e){var t=u[e];t&&(u.trigger("remove:"+e,t),delete u[e])},s.getExtensions=function(e){var t=u[e];return t||(t=[]),t},s.removeExtensionItem=function(e,t,n){var r=u[e];if(r){var i=arguments[arguments.length-1];_.isObject(t)&&!n&&(i=function(e){return _.isEqual(e,t)}),r=_.filter(r,function(e){return!i(e)}),u[e]=r,u.trigger("removeItem:"+e,t)}},s.extensions=u,s.setSession=function(e){return s.session=e,s.session.fetchUser()},t["default"]=s},function(e,t,n){var r,i;(function(o){/*!
	 * backbone.layoutmanager.js v0.9.7
	 * Copyright 2015, Tim Branyen (@tbranyen)
	 * backbone.layoutmanager.js may be freely distributed under the MIT license.
	 */
!function(o,a){"use strict";r=[n(91),n(89),n(86)],i=function(){return a.apply(o,arguments)}.apply(t,r),!(void 0!==i&&(e.exports=i))}("object"==typeof o?o:this,function(e,t,n){"use strict";var r=this,i=e.View,o=Array.prototype.push,a=Array.prototype.concat,s=Array.prototype.splice,l=String.prototype.trim?t.bind(String.prototype.trim.call,String.prototype.trim):n.trim,u=e.View.extend({_render:function(){var e=this,t=e.__manager__,n=e.beforeRender,r=e.deferred();if(e.hasRendered&&e._removeViews(),t.callback=function(){delete t.isAsync,delete t.callback,e.trigger("beforeRender",e),e._viewRender(t).render().then(function(){r.resolve()})},n){var i=n.call(e,e);if(i&&i.then&&(t.isAsync=!0,i.then(function(){t.callback(),r.resolve()},r.resolve)),i===!1)return r.resolve()}return t.isAsync||t.callback(),r.promise()},_applyTemplate:function(e,r,i){t.isString(e)&&(r.noel?(e=n.parseHTML(e,!0),this.$el.slice(1).remove(),this.$el.replaceWith(e),this.setElement(e,!1)):this.html(this.$el,e)),i.resolveWith(this,[this])},_viewRender:function(e){function n(t,n){var i;e.callback=function(t){delete e.isAsync,delete e.callback,a._applyTemplate(t,e,o)},u.cache(r,n),n&&(i=a.renderTemplate.call(a,n,t)),e.isAsync||a._applyTemplate(i,e,o)}var r,i,o,a=this;return{render:function(){var s=a.serialize,l=a.template;return o=a.deferred(),t.isFunction(s)&&(s=s.call(a)),e.callback=function(t){delete e.isAsync,delete e.callback,n(s,t)},"string"==typeof l&&(r=a.prefix+l),(i=u.cache(r))?(n(s,i,r),o):("string"==typeof l?i=a.fetchTemplate.call(a,a.prefix+l):"function"==typeof l?i=l:null!=l&&(i=a.fetchTemplate.call(a,l)),e.isAsync||n(s,i),o)}}},constructor:function(n){this.manage=!0,t.extend(this,n),e.View.apply(this,arguments)},async:function(){var e=this.__manager__;return e.isAsync=!0,e.callback},promise:function(){return this.__manager__.renderDeferred.promise()},then:function(){return this.promise().then.apply(this,arguments)},renderViews:function(e){var n=this,r=n.__manager__,i=n.deferred();e=e&&t.isArray(e)?t.chain(e):n.getViews(e);var o=e.map(function(e){return e.render().__manager__.renderDeferred}).value();return r.renderDeferred=i.promise(),n.when(o).then(function(){i.resolveWith(n,[n])}),n},insertView:function(e,t){return t?this.setView(e,t,!0):this.setView(e,!0)},insertViews:function(e){return t.isArray(e)?this.setViews({"":e}):(t.each(e,function(n,r){e[r]=t.isArray(n)?n:[n]}),this.setViews(e))},getView:function(e){return null==e&&(e=arguments[1]),this.getViews(e).first().value()},getViews:function(e){var n;return"string"==typeof e?(e=this.sections[e]||e,n=this.views[e]||[],t.chain([].concat(n))):(n=t.chain(this.views).map(function(e){return t.isArray(e)?e:[e]},this).flatten(),"object"==typeof e?n.where(e):"function"==typeof e?n.filter(e):n)},removeView:function(e){var t;return t=this.getViews(e).each(function(e){e.remove()}),t.value(),t},setView:function(e,t,n){var r,i,o=this;if("string"!=typeof e&&(n=t,t=e,e=""),r=t.__manager__,!r)throw new Error("The argument associated with selector '"+e+"' is defined and a View.  Set `manage` property to true for Backbone.View instances.");return r.parent=o,i=r.selector=o.sections[e]||e,n?(o.views[i]=a.call([],o.views[e]||[],t),o.__manager__.insert=!0,t):(o.getView(e)!==t&&o.removeView(e),o.views[i]=t)},setViews:function(e){return t.each(e,function(e,n){return t.isArray(e)?t.each(e,function(e){this.insertView(n,e)},this):void this.setView(n,e)},this),this},render:function(){function e(){function e(){var e=r.console,n=i.afterRender;n&&n.call(i,i),i.trigger("afterRender",i),o.noel&&i.$el.length>1&&t.isFunction(e.warn)&&!i.suppressWarnings&&(e.warn("`el: false` with multiple top level elements is not supported."),t.isFunction(e.trace)&&e.trace())}return t.each(i.views,function(e,n){t.isArray(e)&&i.htmlBatch(i,e,n)}),a&&!o.insertedViaFragment&&(i.contains(a.el,i.el)||a.partial(a.$el,i.$el,s,o)),i.delegateEvents(),i.hasRendered=!0,o.renderInProgress=!1,delete o.triggeredByRAF,o.queue&&o.queue.length?o.queue.shift()():delete o.queue,s&&(s.renderInProgress||s.queue)?a.once("afterRender",e):e(),l.resolveWith(i,[i])}function n(){i._render().done(function(){if(!t.keys(i.views).length)return e();var n=t.map(i.views,function(e){var n=t.isArray(e);return n&&e.length?i.when(t.map(e,function(e){return e.__manager__.insertedViaFragment=!0,e.render().__manager__.renderDeferred})):n?e:e.render().__manager__.renderDeferred});i.when(n).done(e)})}var i=this,o=i.__manager__,a=o.parent,s=a&&a.__manager__,l=i.deferred();return o.renderInProgress=!0,i._registerWithRAF(n,l),o.renderDeferred=l,i},remove:function(){return u._removeView(this,!0),this._remove.apply(this,arguments)},_registerWithRAF:function(e,t){function n(){a.rafID=null,a.triggeredByRAF=!0,e()}function r(){for(var e=0;e<a.deferreds.length;e++)a.deferreds[e].resolveWith(i,[i]);a.deferreds=[]}var i=this,a=i.__manager__,s=a.parent&&a.parent.__manager__;return this.useRAF===!1?void(a.queue?o.call(a.queue,e):(a.queue=[],e())):(a.deferreds=a.deferreds||[],a.deferreds.push(t),t.done(r),this._cancelQueuedRAFRender(),s&&s.triggeredByRAF?n():void(a.rafID=i.requestAnimationFrame(n)))},_cancelQueuedRAFRender:function(){var e=this,t=e.__manager__;null!=t.rafID&&e.cancelAnimationFrame(t.rafID)}},{_cache:{},_removeViews:function(e,t){"boolean"==typeof e&&(t=e,e=this),e=e||this,e.getViews().each(function(e){(e.hasRendered||t)&&u._removeView(e,t)}).value()},_removeView:function(e,n){var r,i=e.__manager__,o=i.parent&&i.parent.__manager__,a="boolean"==typeof e.keep?e.keep:e.options.keep;if(!a&&o&&o.insert===!0||n){if(u.cleanViews(e),e._removeViews(!0),e.$el.remove(),e._cancelQueuedRAFRender(),!i.parent)return;if(r=i.parent.views[i.selector],t.isArray(r))return t.each(t.clone(r),function(e,t){e&&e.__manager__===i&&s.call(r,t,1)}),void(t.isEmpty(r)&&i.parent.trigger("empty",i.selector));delete i.parent.views[i.selector],i.parent.trigger("empty",i.selector)}},cache:function(e,t){return e in this._cache&&null==t?this._cache[e]:null!=e&&null!=t?this._cache[e]=t:void 0},cleanViews:function(n){t.each(a.call([],n),function(n){n.trigger("cleanup",n),n.unbind(),n.model instanceof e.Model&&n.model.off(null,null,n),n.collection instanceof e.Collection&&n.collection.off(null,null,n),n.stopListening(),t.isFunction(n.cleanup)&&n.cleanup()})},configure:function(n){t.extend(u.prototype,n),n.manage&&(e.View.prototype.manage=!0),n.el===!1&&(e.View.prototype.el=!1),n.suppressWarnings===!0&&(e.View.prototype.suppressWarnings=!0),n.useRAF===!1&&(e.View.prototype.useRAF=!1),n._&&(t=n._)},setupView:function(n,r){r=t.extend({},r),t.each(a.call([],n),function(n){if(!n.__manager__){var i,o,a=u.prototype;t.defaults(n,{views:{},sections:{},__manager__:{},_removeViews:u._removeViews,_removeView:u._removeView},u.prototype),n.options=r,t.extend(n,r),n._remove=e.View.prototype.remove,n.render=u.prototype.render,n.remove!==a.remove&&(n._remove=n.remove,n.remove=a.remove),i=r.views||n.views,t.keys(i).length&&(o=i,n.views={},t.each(o,function(e,t){"function"==typeof e&&(o[t]=e.call(n,n))}),n.setViews(o))}})}});u.VERSION="0.9.7",e.Layout=u,e.View.prototype.constructor=function(e){var t;e=e||{},("el"in e?e.el===!1:this.el===!1)&&(t=!0),(e.manage||this.manage)&&u.setupView(this,e),this.__manager__&&(this.__manager__.noel=t,this.__manager__.suppressWarnings=e.suppressWarnings),i.apply(this,arguments)},e.View=e.View.prototype.constructor,e.View.extend=i.extend,e.View.prototype=i.prototype;var c={prefix:"",useRAF:!0,deferred:function(){return n.Deferred()},fetchTemplate:function(e){return t.template(n(e).html())},renderTemplate:function(e,t){return l(e.call(this,t))},serialize:function(){return this.model?t.clone(this.model.attributes):{}},partial:function(e,t,n,r){var i;r.selector&&(n.noel?(i=e.filter(r.selector),e=i.length?i:e.find(r.selector)):e=e.find(r.selector)),n.insert?this.insert(e,t):this.html(e,t)},html:function(e,t){e.empty().append(t)},htmlBatch:function(e,r,i){var o=e.__manager__,a={selector:i},s=t.reduce(r,function(t,r){var i="boolean"==typeof r.keep?r.keep:r.options.keep,o=i&&n.contains(e.el,r.el);return r.el&&!o&&t.push(r.el),t},[]);return this.partial(e.$el,n(s),o,a)},insert:function(e,t){e.append(t)},when:function(e){return n.when.apply(null,e)},contains:function(e,t){return n.contains(e,t)},requestAnimationFrame:function(){for(var e=0,n=["ms","moz","webkit","o"],i=r.requestAnimationFrame,o=0;o<n.length&&!r.requestAnimationFrame;++o)i=r[n[o]+"RequestAnimationFrame"];return i||(i=function(t){var n=(new Date).getTime(),i=Math.max(0,16-(n-e)),o=r.setTimeout(function(){t(n+i)},i);return e=n+i,o}),t.bind(i,r)}(),cancelAnimationFrame:function(){for(var e=["ms","moz","webkit","o"],n=r.cancelAnimationFrame,i=0;i<e.length&&!r.requestAnimationFrame;++i)n=r[e[i]+"CancelAnimationFrame"]||r[e[i]+"CancelRequestAnimationFrame"];return n||(n=function(e){clearTimeout(e)}),t.bind(n,r)}()};return t.extend(u.prototype,c),u})}).call(t,function(){return this}())},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(91),o=r(i);n(101);var a=function(){this.layout=new o["default"].Layout({template:"templates/layouts/with_sidebar",className:"pusher"}),this.layoutViews={},this.reactComponents={},this.permanentViews={},this.el=this.layout.el};a.configure=function(e){o["default"].Layout.configure(e)},_.extend(a.prototype,{render:function(){return this.layout.render()},setTemplate:function(e){return e.prefix?this.layout.template=e.prefix+e.name:this.layout.template="templates/layouts/"+e,_.each(this.layoutViews,function(e){e.removeView()}),this.layoutViews={},this.render().promise()},setView:function(e,t,n){return this.layout.setView(e,t,!1),n?this.permanentViews[e]=t:this.layoutViews[e]=t,t},renderView:function(e){var t=this.layoutViews[e];return!!t&&t.render()},removeView:function(e){var t=this.layout.getView(e);return!!t&&(this.layout.removeView(e),this.layoutViews[e]&&delete this.layoutViews[e],!0)}}),t["default"]=a},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(100),o=r(i),a=n(104),s=r(a),l=n(91),u=r(l),c={};t["default"]=u["default"].Router.extend({routes:{},beforeUnload:function(e,t){c[e]=t},removeBeforeUnload:function(e){delete c[e]},navigate:function(e,t){var n=!0,r=_.find(_.map(c,function(e){return e()}),function(e){if(e)return!0});return r&&(n=window.confirm(r)),t&&t.redirect?window.location=e:void(n&&u["default"].Router.prototype.navigate(e,t))},addModuleRouteObject:function(e){var t=this,n=o["default"].masterLayout,r=e.prototype.getRouteUrls();_.each(r,function(r){this.route(r,r.toString(),function(){var i=Array.prototype.slice.call(arguments),a=e.prototype.getRouteRoles(r),s=o["default"].auth.checkAccess(a);s.then(function(){t.activeRouteObject&&t.activeRouteObject.hasRoute(r)||(t.activeRouteObject&&t.activeRouteObject.cleanup(),t.activeRouteObject=new e(r,n,i));var o=t.activeRouteObject;o.rejectPromises(),o.routeCallback(r,i),o.renderWith(r,n,i)},function(){o["default"].auth.authDeniedCb()})})},this)},setModuleRoutes:function(e){_.each(e,function(e){e&&(e.initialize(),e.RouteObjects&&_.each(e.RouteObjects,this.addModuleRouteObject,this))},this)},initialize:function(e){this.addons=e,this.auth=o["default"].auth=new s["default"],this.setModuleRoutes(e),$(o["default"].el).append(o["default"].masterLayout.el),o["default"].masterLayout.render(),this.lastPages=[],u["default"].history.on("route",function(){this.lastPages.push(u["default"].history.fragment),this.lastPages.length>2&&this.lastPages.shift()},this)},triggerRouteEvent:function(e,t){if(this.activeRouteObject){var n=[e].concat(t);this.activeRouteObject.trigger.apply(this.activeRouteObject,n),this.activeRouteObject.renderWith(n,o["default"].masterLayout,t)}}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(100),o=r(i),a=n(91),s=r(a),l=function(e){this._options=e,this.initialize.apply(this,arguments)};l.extend=s["default"].Model.extend,_.extend(l.prototype,s["default"].Events,{authDeniedCb:function(){},initialize:function(){},authHandlerCb:function(e){var t=$.Deferred();return t.resolve(),t},registerAuth:function(e){this.authHandlerCb=e},registerAuthDenied:function(e){this.authDeniedCb=e},checkAccess:function(e){var t=e||[],n=this;if(!o["default"].session)throw new Error("Fauxton.session is not configured.");return o["default"].session.fetchUser().then(function(e){return o["default"].when(n.authHandlerCb(o["default"].session,t))})}}),t["default"]=l},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},o=n(100),a=r(o),s=n(106),l=r(s),u=n(137),c=r(u),d=n(91),f=r(d),p=function(e){this._options=e,this.reactComponents={},this._configure(e||{}),this.initialize.apply(this,arguments),this.addEvents()},h={};_.extend(h,f["default"].Events),p.on=function(e,t){h.on(e,t)},p.extend=f["default"].Model.extend;var g=["views","routes","events","roles","crumbs","layout","apiUrl","establish"];_.extend(p.prototype,f["default"].Events,{views:{},routes:{},events:{},crumbs:[],layout:"with_sidebar",apiUrl:null,hideNotificationPanel:null,disableLoader:!1,loaderClassname:"loader",renderedState:!1,establish:function(){},route:function(){},roles:[],_promises:[],initialize:function(){}},{renderWith:function(e,t,n){var r={masterLayout:t,route:e,args:n},i=this.setTemplateOnFullRender(t);this.triggerBroadcast("beforeEstablish");var o=_.bind(this.renderAllViews,this,r),a=_.bind(this.establishError,this),s=_.bind(this.renderComplete,this),l=_.bind(this.callEstablish,this),u=_.bind(this.renderReactComponents,this),c=this.establish();i.then(function(){var e=this;u(),l(c).then(o,a).then(s,function(t){console.error("renderpipeline broke"),console.error("check your establish method"),console.log(e.establish.toString()),console.error(t)})}.bind(this))},setTemplateOnFullRender:function(e){var t=$.Deferred();return this.renderedState?t.resolve():(this.triggerBroadcast("beforeFullRender"),e.setTemplate(this.layout).then(t.resolve,t.reject)),t},renderReactComponents:function(){_.each(this.reactComponents,function(e,t){$(t)[0]&&c["default"].render(l["default"].createElement(e.component,e.props),$(t)[0])})},callEstablish:function(e){return this.addPromise(e),a["default"].when(e)},renderAllViews:function(e,t){var n=this,r=_.bind(this.renderView,this,n,e);this.triggerBroadcast("afterEstablish");var i=_.map(n.getViews(),r,this);return a["default"].when(i)},renderView:function(e,t,n,r){var i={view:n,selector:r,masterLayout:t.masterLayout},o=_.bind(this.renderViewOnLayout,this,i);return n.hasRendered?void this.triggerBroadcast("viewHasRendered",n,r):(this.triggerBroadcast("beforeRender",n,r),this.callEstablish(n.establish()).then(o,this.establishError))},renderViewOnLayout:function(e,t,n){var r=e.masterLayout,i=_.bind(this.triggerBroadcast,this);r.setView(e.selector,e.view);var o=r.renderView(e.selector).promise();return o.then(function(){i("afterRender",e.view,e.selector)}),o},establishError:function(e){e&&e.responseText&&a["default"].addNotification({msg:"An Error occurred: "+JSON.parse(e.responseText).reason,type:"error",clear:!0})},renderComplete:function(){this.setRenderedState(!0),this.triggerBroadcast("renderComplete")},setRenderedState:function(e){this.renderedState=e},triggerBroadcast:function(e){var t=Array.prototype.slice.call(arguments);this.trigger.apply(this,t),t.splice(0,1,e,this),h.trigger.apply(h,t)},get:function(e){return _.isFunction(this[e])?this[e]():this[e]},addEvents:function(e){e=e||this.get("events"),_.each(e,function(e,t){if(!_.isFunction(e)&&!_.isFunction(this[e]))throw new Error("Invalid method: "+e);e=_.isFunction(e)?e:this[e],this.on(t,e)},this)},_configure:function(e){_.each(_.intersection(_.keys(e),g),function(t){this[t]=e[t]},this)},getView:function(e){return this.views[e]},setView:function(e,t){return this.removeView(e),this.removeComponent(e),this.views[e]=t,t},setComponent:function(e,t,n){this.removeView(e),this.removeComponent(e),this.reactComponents[e]={component:t,props:n||null}},removeComponent:function(e){_.has(this.reactComponents,e)&&($(e)[0]&&c["default"].unmountComponentAtNode($(e)[0]),this.reactComponents[e]=null,delete this.reactComponents[e])},removeComponents:function(){_.each(this.reactComponents,function(e,t){this.removeComponent(t)},this),this.reactComponents={}},getViews:function(){return this.views},removeView:function(e){_.has(this.views,e)&&(this.views[e].remove(),this.views[e]=null,delete this.views[e])},removeViews:function(){_.each(this.views,function(e,t){e.remove(),delete this.views[t],e=null},this)},addPromise:function(e){if(!_.isEmpty(e))return _.isArray(e)?void _.each(e,function(e){this._promises.push(e)},this):this._promises.push(e)},cleanup:function(){this.removeComponents(),this.removeViews(),this.rejectPromises()},rejectPromises:function(){_.each(this._promises,function(e){if("resolved"!==e.state())return e.abort?e.abort("Route change"):void(e.reject&&e.reject())},this),this._promises=[]},getRouteUrls:function(){return _.keys(this.get("routes"))},hasRoute:function(e){return!!this.get("routes")[e]},routeCallback:function m(e,t){var m,n=this.get("routes"),r=n[e];m="object"===("undefined"==typeof r?"undefined":i(r))?this[r.route]:this[r],m.apply(this,t)},getRouteRoles:function(e){var t=this.get("routes")[e];return"object"===("undefined"==typeof t?"undefined":i(t))&&t.roles?t.roles:this.roles}}),t["default"]=p},function(e,t,n){"use strict";e.exports=n(107)},function(e,t,n){"use strict";var r=n(108),i=n(109),o=n(120),a=n(126),s=n(131),l=n(112),u=(n(132),n(134)),c=n(135),d=n(136),f=(n(114),l.createElement),p=l.createFactory,h=l.cloneElement,g=r,m={Children:{map:i.map,forEach:i.forEach,count:i.count,toArray:i.toArray,only:d},Component:o,createElement:f,cloneElement:h,isValidElement:l.isValidElement,PropTypes:u,createClass:a.createClass,createFactory:p,createMixin:function(e){return e},DOM:s,version:c,__spread:g};e.exports=m},function(e,t){"use strict";function n(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function r(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"!==r.join(""))return!1;var i={};return"abcdefghijklmnopqrst".split("").forEach(function(e){i[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},i)).join("")}catch(o){return!1}}var i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;e.exports=r()?Object.assign:function(e,t){for(var r,a,s=n(e),l=1;l<arguments.length;l++){r=Object(arguments[l]);for(var u in r)i.call(r,u)&&(s[u]=r[u]);if(Object.getOwnPropertySymbols){a=Object.getOwnPropertySymbols(r);for(var c=0;c<a.length;c++)o.call(r,a[c])&&(s[a[c]]=r[a[c]])}}return s}},function(e,t,n){"use strict";function r(e){return(""+e).replace(w,"$&/")}function i(e,t){this.func=e,this.context=t,this.count=0}function o(e,t,n){var r=e.func,i=e.context;r.call(i,t,e.count++)}function a(e,t,n){if(null==e)return e;var r=i.getPooled(t,n);v(e,o,r),i.release(r)}function s(e,t,n,r){this.result=e,this.keyPrefix=t,this.func=n,this.context=r,this.count=0}function l(e,t,n){var i=e.result,o=e.keyPrefix,a=e.func,s=e.context,l=a.call(s,t,e.count++);Array.isArray(l)?u(l,i,n,m.thatReturnsArgument):null!=l&&(g.isValidElement(l)&&(l=g.cloneAndReplaceKey(l,o+(!l.key||t&&t.key===l.key?"":r(l.key)+"/")+n)),i.push(l))}function u(e,t,n,i,o){var a="";null!=n&&(a=r(n)+"/");var u=s.getPooled(t,a,i,o);v(e,l,u),s.release(u)}function c(e,t,n){if(null==e)return e;var r=[];return u(e,r,null,t,n),r}function d(e,t,n){return null}function f(e,t){return v(e,d,null)}function p(e){var t=[];return u(e,t,null,m.thatReturnsArgument),t}var h=n(110),g=n(112),m=n(115),v=n(117),b=h.twoArgumentPooler,y=h.fourArgumentPooler,w=/\/+/g;i.prototype.destructor=function(){this.func=null,this.context=null,this.count=0},h.addPoolingTo(i,b),s.prototype.destructor=function(){this.result=null,this.keyPrefix=null,this.func=null,this.context=null,this.count=0},h.addPoolingTo(s,y);var x={forEach:a,map:c,mapIntoWithKeyPrefixInternal:u,count:f,toArray:p};e.exports=x},function(e,t,n){"use strict";var r=n(111),i=function(e){var t=this;if(t.instancePool.length){var n=t.instancePool.pop();return t.call(n,e),n}return new t(e)},o=function(e,t){var n=this;if(n.instancePool.length){var r=n.instancePool.pop();return n.call(r,e,t),r}return new n(e,t)},a=function(e,t,n){var r=this;if(r.instancePool.length){var i=r.instancePool.pop();return r.call(i,e,t,n),i}return new r(e,t,n)},s=function(e,t,n,r){var i=this;if(i.instancePool.length){var o=i.instancePool.pop();return i.call(o,e,t,n,r),o}return new i(e,t,n,r)},l=function(e,t,n,r,i){var o=this;if(o.instancePool.length){var a=o.instancePool.pop();return o.call(a,e,t,n,r,i),a}return new o(e,t,n,r,i)},u=function(e){var t=this;e instanceof t?void 0:r(!1),e.destructor(),t.instancePool.length<t.poolSize&&t.instancePool.push(e)},c=10,d=i,f=function(e,t){var n=e;return n.instancePool=[],n.getPooled=t||d,n.poolSize||(n.poolSize=c),n.release=u,n},p={addPoolingTo:f,oneArgumentPooler:i,twoArgumentPooler:o,threeArgumentPooler:a,fourArgumentPooler:s,fiveArgumentPooler:l};e.exports=p},function(e,t,n){"use strict";function r(e,t,n,r,i,o,a,s){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,i,o,a,s],c=0;l=new Error(t.replace(/%s/g,function(){return u[c++]})),l.name="Invariant Violation"}throw l.framesToPop=1,l}}e.exports=r},function(e,t,n){"use strict";var r=n(108),i=n(113),o=(n(114),n(116),"function"==typeof Symbol&&Symbol["for"]&&Symbol["for"]("react.element")||60103),a={key:!0,ref:!0,__self:!0,__source:!0},s=function(e,t,n,r,i,a,s){var l={$$typeof:o,type:e,key:t,ref:n,props:s,_owner:a};return l};s.createElement=function(e,t,n){var r,o={},l=null,u=null,c=null,d=null;if(null!=t){u=void 0===t.ref?null:t.ref,l=void 0===t.key?null:""+t.key,c=void 0===t.__self?null:t.__self,d=void 0===t.__source?null:t.__source;for(r in t)t.hasOwnProperty(r)&&!a.hasOwnProperty(r)&&(o[r]=t[r])}var f=arguments.length-2;if(1===f)o.children=n;else if(f>1){for(var p=Array(f),h=0;h<f;h++)p[h]=arguments[h+2];o.children=p}if(e&&e.defaultProps){var g=e.defaultProps;for(r in g)void 0===o[r]&&(o[r]=g[r])}return s(e,l,u,c,d,i.current,o)},s.createFactory=function(e){var t=s.createElement.bind(null,e);return t.type=e,t},s.cloneAndReplaceKey=function(e,t){var n=s(e.type,t,e.ref,e._self,e._source,e._owner,e.props);return n},s.cloneElement=function(e,t,n){var o,l=r({},e.props),u=e.key,c=e.ref,d=e._self,f=e._source,p=e._owner;if(null!=t){void 0!==t.ref&&(c=t.ref,p=i.current),void 0!==t.key&&(u=""+t.key);var h;e.type&&e.type.defaultProps&&(h=e.type.defaultProps);for(o in t)t.hasOwnProperty(o)&&!a.hasOwnProperty(o)&&(void 0===t[o]&&void 0!==h?l[o]=h[o]:l[o]=t[o])}var g=arguments.length-2;if(1===g)l.children=n;else if(g>1){for(var m=Array(g),v=0;v<g;v++)m[v]=arguments[v+2];l.children=m}return s(e.type,u,c,d,f,p,l)},s.isValidElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===o},e.exports=s},function(e,t){"use strict";var n={current:null};e.exports=n},function(e,t,n){"use strict";var r=n(115),i=r;e.exports=i},function(e,t){"use strict";function n(e){return function(){return e}}var r=function(){};r.thatReturns=n,r.thatReturnsFalse=n(!1),r.thatReturnsTrue=n(!0),r.thatReturnsNull=n(null),r.thatReturnsThis=function(){return this},r.thatReturnsArgument=function(e){return e},e.exports=r},function(e,t,n){"use strict";var r=!1;e.exports=r},function(e,t,n){"use strict";function r(e,t){return e&&"object"==typeof e&&null!=e.key?u.escape(e.key):t.toString(36)}function i(e,t,n,o){var f=typeof e;if("undefined"!==f&&"boolean"!==f||(e=null),null===e||"string"===f||"number"===f||a.isValidElement(e))return n(o,e,""===t?c+r(e,0):t),1;var p,h,g=0,m=""===t?c:t+d;if(Array.isArray(e))for(var v=0;v<e.length;v++)p=e[v],h=m+r(p,v),g+=i(p,h,n,o);else{var b=s(e);if(b){var y,w=b.call(e);if(b!==e.entries)for(var x=0;!(y=w.next()).done;)p=y.value,h=m+r(p,x++),g+=i(p,h,n,o);else for(;!(y=w.next()).done;){var _=y.value;_&&(p=_[1],h=m+u.escape(_[0])+d+r(p,0),g+=i(p,h,n,o))}}else if("object"===f){String(e);l(!1)}}return g}function o(e,t,n){return null==e?0:i(e,"",t,n)}var a=(n(113),n(112)),s=n(118),l=n(111),u=n(119),c=(n(114),"."),d=":";e.exports=o},function(e,t){"use strict";function n(e){var t=e&&(r&&e[r]||e[i]);if("function"==typeof t)return t}var r="function"==typeof Symbol&&Symbol.iterator,i="@@iterator";e.exports=n},function(e,t){"use strict";function n(e){var t=/[=:]/g,n={"=":"=0",":":"=2"},r=(""+e).replace(t,function(e){return n[e]});return"$"+r}function r(e){var t=/(=0|=2)/g,n={"=0":"=","=2":":"},r="."===e[0]&&"$"===e[1]?e.substring(2):e.substring(1);return(""+r).replace(t,function(e){return n[e]})}var i={escape:n,unescape:r};e.exports=i},function(e,t,n){"use strict";function r(e,t,n){this.props=e,this.context=t,this.refs=o,this.updater=n||i}var i=n(121),o=(n(122),n(116),n(125)),a=n(111);n(114);r.prototype.isReactComponent={},r.prototype.setState=function(e,t){"object"!=typeof e&&"function"!=typeof e&&null!=e?a(!1):void 0,this.updater.enqueueSetState(this,e),t&&this.updater.enqueueCallback(this,t,"setState")},r.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this),e&&this.updater.enqueueCallback(this,e,"forceUpdate")};e.exports=r},function(e,t,n){"use strict";function r(e,t){}var i=(n(114),{isMounted:function(e){return!1},enqueueCallback:function(e,t){},enqueueForceUpdate:function(e){r(e,"forceUpdate")},enqueueReplaceState:function(e,t){r(e,"replaceState")},enqueueSetState:function(e,t){r(e,"setState")}});e.exports=i},function(e,t,n){"use strict";var r=n(123);e.exports={debugTool:r}},function(e,t,n){"use strict";function r(e,t,n,r,i,o){}var i=n(124),o=(n(114),[]),a={addDevtool:function(e){o.push(e)},removeDevtool:function(e){for(var t=0;t<o.length;t++)o[t]===e&&(o.splice(t,1),t--)},onBeginProcessingChildContext:function(){r("onBeginProcessingChildContext")},onEndProcessingChildContext:function(){r("onEndProcessingChildContext")},onSetState:function(){r("onSetState")},onMountRootComponent:function(e){r("onMountRootComponent",e)},onMountComponent:function(e){r("onMountComponent",e)},onUpdateComponent:function(e){r("onUpdateComponent",e)},onUnmountComponent:function(e){r("onUnmountComponent",e)}};a.addDevtool(i),e.exports=a},function(e,t,n){"use strict";var r,i,o=(n(114),{onBeginProcessingChildContext:function(){r=!0},onEndProcessingChildContext:function(){r=!1},onSetState:function(){i()}});e.exports=o},function(e,t,n){"use strict";var r={};e.exports=r},function(e,t,n){"use strict";function r(e,t){var n=_.hasOwnProperty(t)?_[t]:null;C.hasOwnProperty(t)&&(n!==w.OVERRIDE_BASE?m(!1):void 0),e&&(n!==w.DEFINE_MANY&&n!==w.DEFINE_MANY_MERGED?m(!1):void 0)}function i(e,t){if(t){"function"==typeof t?m(!1):void 0,p.isValidElement(t)?m(!1):void 0;var n=e.prototype,i=n.__reactAutoBindPairs;t.hasOwnProperty(y)&&E.mixins(e,t.mixins);for(var o in t)if(t.hasOwnProperty(o)&&o!==y){var a=t[o],u=n.hasOwnProperty(o);if(r(u,o),E.hasOwnProperty(o))E[o](e,a);else{var c=_.hasOwnProperty(o),d="function"==typeof a,f=d&&!c&&!u&&t.autobind!==!1;if(f)i.push(o,a),n[o]=a;else if(u){var h=_[o];!c||h!==w.DEFINE_MANY_MERGED&&h!==w.DEFINE_MANY?m(!1):void 0,h===w.DEFINE_MANY_MERGED?n[o]=s(n[o],a):h===w.DEFINE_MANY&&(n[o]=l(n[o],a))}else n[o]=a}}}}function o(e,t){if(t)for(var n in t){var r=t[n];if(t.hasOwnProperty(n)){var i=n in E;i?m(!1):void 0;var o=n in e;o?m(!1):void 0,e[n]=r}}}function a(e,t){e&&t&&"object"==typeof e&&"object"==typeof t?void 0:m(!1);for(var n in t)t.hasOwnProperty(n)&&(void 0!==e[n]?m(!1):void 0,e[n]=t[n]);return e}function s(e,t){return function(){var n=e.apply(this,arguments),r=t.apply(this,arguments);if(null==n)return r;if(null==r)return n;var i={};return a(i,n),a(i,r),i}}function l(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function u(e,t){var n=t.bind(e);return n}function c(e){for(var t=e.__reactAutoBindPairs,n=0;n<t.length;n+=2){var r=t[n],i=t[n+1];e[r]=u(e,i)}}var d=n(108),f=n(120),p=n(112),h=(n(127),n(129),n(121)),g=n(125),m=n(111),v=n(128),b=n(130),y=(n(114),b({mixins:null})),w=v({DEFINE_ONCE:null,DEFINE_MANY:null,OVERRIDE_BASE:null,DEFINE_MANY_MERGED:null}),x=[],_={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},E={displayName:function(e,t){e.displayName=t},mixins:function(e,t){if(t)for(var n=0;n<t.length;n++)i(e,t[n])},childContextTypes:function(e,t){e.childContextTypes=d({},e.childContextTypes,t)},contextTypes:function(e,t){e.contextTypes=d({},e.contextTypes,t)},getDefaultProps:function(e,t){e.getDefaultProps?e.getDefaultProps=s(e.getDefaultProps,t):e.getDefaultProps=t},propTypes:function(e,t){e.propTypes=d({},e.propTypes,t)},statics:function(e,t){o(e,t)},autobind:function(){}},C={replaceState:function(e,t){this.updater.enqueueReplaceState(this,e),t&&this.updater.enqueueCallback(this,t,"replaceState")},isMounted:function(){return this.updater.isMounted(this)}},k=function(){};d(k.prototype,f.prototype,C);var S={createClass:function(e){var t=function(e,t,n){this.__reactAutoBindPairs.length&&c(this),this.props=e,this.context=t,this.refs=g,this.updater=n||h,this.state=null;var r=this.getInitialState?this.getInitialState():null;"object"!=typeof r||Array.isArray(r)?m(!1):void 0,this.state=r};t.prototype=new k,t.prototype.constructor=t,t.prototype.__reactAutoBindPairs=[],x.forEach(i.bind(null,t)),i(t,e),t.getDefaultProps&&(t.defaultProps=t.getDefaultProps()),t.prototype.render?void 0:m(!1);for(var n in _)t.prototype[n]||(t.prototype[n]=null);return t},injection:{injectMixin:function(e){x.push(e)}}};e.exports=S},function(e,t,n){"use strict";var r=n(128),i=r({prop:null,context:null,childContext:null});e.exports=i},function(e,t,n){"use strict";var r=n(111),i=function(e){var t,n={};e instanceof Object&&!Array.isArray(e)?void 0:r(!1);for(t in e)e.hasOwnProperty(t)&&(n[t]=t);return n};e.exports=i},function(e,t,n){"use strict";var r={};e.exports=r},function(e,t){"use strict";var n=function(e){var t;for(t in e)if(e.hasOwnProperty(t))return t;return null};e.exports=n},function(e,t,n){"use strict";function r(e){return i.createFactory(e)}var i=n(112),o=(n(132),n(133)),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},function(e,t,n){"use strict";function r(){if(d.current){var e=d.current.getName();if(e)return" Check the render method of `"+e+"`."}return""}function i(e,t){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;o("uniqueKey",e,t)}}function o(e,t,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=h[e]||(h[e]={});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 t&&t._owner&&t._owner!==d.current&&(s.childOwner=" It was passed a child from "+t._owner.getName()+"."),s}function a(e,t){if("object"==typeof e)if(Array.isArray(e))for(var n=0;n<e.length;n++){var r=e[n];u.isValidElement(r)&&i(r,t)}else if(u.isValidElement(e))e._store&&(e._store.validated=!0);else if(e){var o=f(e);if(o&&o!==e.entries)for(var a,s=o.call(e);!(a=s.next()).done;)u.isValidElement(a.value)&&i(a.value,t)}}function s(e,t,n,i){for(var o in t)if(t.hasOwnProperty(o)){var a;try{"function"!=typeof t[o]?p(!1):void 0,a=t[o](n,o,e,i)}catch(s){a=s}if(a instanceof Error&&!(a.message in g)){g[a.message]=!0;r()}}}function l(e){var t=e.type;if("function"==typeof t){var n=t.displayName||t.name;t.propTypes&&s(n,t.propTypes,e.props,c.prop),"function"==typeof t.getDefaultProps}}var u=n(112),c=n(127),d=(n(129),n(113)),f=(n(116),n(118)),p=n(111),h=(n(114),{}),g={},m={createElement:function(e,t,n){var r="string"==typeof e||"function"==typeof e,i=u.createElement.apply(this,arguments);if(null==i)return i;if(r)for(var o=2;o<arguments.length;o++)a(arguments[o],e);return l(i),i},createFactory:function(e){var t=m.createElement.bind(null,e);return t.type=e,t},cloneElement:function(e,t,n){for(var r=u.cloneElement.apply(this,arguments),i=2;i<arguments.length;i++)a(arguments[i],r.type);return l(r),r}};e.exports=m},function(e,t){"use strict";function n(e,t,n){if(!e)return null;var i={};for(var o in e)r.call(e,o)&&(i[o]=t.call(n,e[o],o,e));return i}var r=Object.prototype.hasOwnProperty;e.exports=n},function(e,t,n){"use strict";function r(e,t){return e===t?0!==e||1/e===1/t:e!==e&&t!==t}function i(e){function t(t,n,r,i,o,a){if(i=i||E,a=a||r,null==n[r]){var s=w[o];return t?new Error("Required "+s+" `"+a+"` was not specified in "+("`"+i+"`.")):null}return e(n,r,i,o,a)}var n=t.bind(null,!1);return n.isRequired=t.bind(null,!0),n}function o(e){function t(t,n,r,i,o){var a=t[n],s=m(a);if(s!==e){var l=w[i],u=v(a);return new Error("Invalid "+l+" `"+o+"` of type "+("`"+u+"` supplied to `"+r+"`, expected ")+("`"+e+"`."))}return null}return i(t)}function a(){return i(x.thatReturns(null))}function s(e){function t(t,n,r,i,o){if("function"!=typeof e)return new Error("Property `"+o+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var a=t[n];if(!Array.isArray(a)){var s=w[i],l=m(a);return new Error("Invalid "+s+" `"+o+"` of type "+("`"+l+"` supplied to `"+r+"`, expected an array."))}for(var u=0;u<a.length;u++){var c=e(a,u,r,i,o+"["+u+"]");if(c instanceof Error)return c}return null}return i(t)}function l(){function e(e,t,n,r,i){if(!y.isValidElement(e[t])){var o=w[r];return new Error("Invalid "+o+" `"+i+"` supplied to "+("`"+n+"`, expected a single ReactElement."))}return null}return i(e)}function u(e){function t(t,n,r,i,o){if(!(t[n]instanceof e)){var a=w[i],s=e.name||E,l=b(t[n]);return new Error("Invalid "+a+" `"+o+"` of type "+("`"+l+"` supplied to `"+r+"`, expected ")+("instance of `"+s+"`."))}return null}return i(t)}function c(e){function t(t,n,i,o,a){for(var s=t[n],l=0;l<e.length;l++)if(r(s,e[l]))return null;var u=w[o],c=JSON.stringify(e);return new Error("Invalid "+u+" `"+a+"` of value `"+s+"` "+("supplied to `"+i+"`, expected one of "+c+"."))}return i(Array.isArray(e)?t:function(){return new Error("Invalid argument supplied to oneOf, expected an instance of array.")})}function d(e){function t(t,n,r,i,o){if("function"!=typeof e)return new Error("Property `"+o+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var a=t[n],s=m(a);if("object"!==s){var l=w[i];return new Error("Invalid "+l+" `"+o+"` of type "+("`"+s+"` supplied to `"+r+"`, expected an object."))}for(var u in a)if(a.hasOwnProperty(u)){var c=e(a,u,r,i,o+"."+u);if(c instanceof Error)return c}return null}return i(t)}function f(e){function t(t,n,r,i,o){for(var a=0;a<e.length;a++){var s=e[a];if(null==s(t,n,r,i,o))return null}var l=w[i];return new Error("Invalid "+l+" `"+o+"` supplied to "+("`"+r+"`."))}return i(Array.isArray(e)?t:function(){return new Error("Invalid argument supplied to oneOfType, expected an instance of array.")})}function p(){function e(e,t,n,r,i){if(!g(e[t])){var o=w[r];return new Error("Invalid "+o+" `"+i+"` supplied to "+("`"+n+"`, expected a ReactNode."))}return null}return i(e)}function h(e){function t(t,n,r,i,o){var a=t[n],s=m(a);if("object"!==s){var l=w[i];return new Error("Invalid "+l+" `"+o+"` of type `"+s+"` "+("supplied to `"+r+"`, expected `object`."))}for(var u in e){var c=e[u];if(c){var d=c(a,u,r,i,o+"."+u);if(d)return d}}return null}return i(t)}function g(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(g);if(null===e||y.isValidElement(e))return!0;var t=_(e);if(!t)return!1;var n,r=t.call(e);if(t!==e.entries){for(;!(n=r.next()).done;)if(!g(n.value))return!1}else for(;!(n=r.next()).done;){var i=n.value;if(i&&!g(i[1]))return!1}return!0;default:return!1}}function m(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":t}function v(e){var t=m(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function b(e){return e.constructor&&e.constructor.name?e.constructor.name:E}var y=n(112),w=n(129),x=n(115),_=n(118),E="<<anonymous>>",C={array:o("array"),bool:o("boolean"),func:o("function"),number:o("number"),object:o("object"),string:o("string"),any:a(),arrayOf:s,element:l(),instanceOf:u,node:p(),objectOf:d,oneOf:c,oneOfType:f,shape:h};e.exports=C},function(e,t){"use strict";e.exports="15.0.2"},function(e,t,n){"use strict";function r(e){return i.isValidElement(e)?void 0:o(!1),e}var i=n(112),o=n(111);e.exports=r},function(e,t,n){"use strict";e.exports=n(138)},function(e,t,n){"use strict";var r=n(139),i=n(142),o=n(260),a=n(162),s=n(163),l=n(159),u=n(135),c=n(265),d=n(266),f=n(267);n(114);i.inject();var p=a.measure("React","render",o.render),h={findDOMNode:c,render:p,unmountComponentAtNode:o.unmountComponentAtNode,version:u,unstable_batchedUpdates:l.batchedUpdates,unstable_renderSubtreeIntoContainer:f};"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject&&__REACT_DEVTOOLS_GLOBAL_HOOK__.inject({ComponentTree:{getClosestInstanceFromNode:r.getClosestInstanceFromNode,getNodeFromInstance:function(e){return e._renderedComponent&&(e=d(e)),e?r.getNodeFromInstance(e):null}},Mount:o,Reconciler:s});e.exports=h},function(e,t,n){"use strict";function r(e){for(var t;t=e._renderedComponent;)e=t;return e}function i(e,t){var n=r(e);n._nativeNode=t,t[g]=n}function o(e){var t=e._nativeNode;t&&(delete t[g],e._nativeNode=null)}function a(e,t){if(!(e._flags&h.hasCachedChildNodes)){var n=e._renderedChildren,o=t.firstChild;e:for(var a in n)if(n.hasOwnProperty(a)){var s=n[a],l=r(s)._domID;if(null!=l){for(;null!==o;o=o.nextSibling)if(1===o.nodeType&&o.getAttribute(p)===String(l)||8===o.nodeType&&o.nodeValue===" react-text: "+l+" "||8===o.nodeType&&o.nodeValue===" react-empty: "+l+" "){i(s,o);continue e}f(!1)}}e._flags|=h.hasCachedChildNodes}}function s(e){if(e[g])return e[g];for(var t=[];!e[g];){if(t.push(e),!e.parentNode)return null;e=e.parentNode}for(var n,r;e&&(r=e[g]);e=t.pop())n=r,t.length&&a(r,e);return n}function l(e){var t=s(e);return null!=t&&t._nativeNode===e?t:null}function u(e){if(void 0===e._nativeNode?f(!1):void 0,e._nativeNode)return e._nativeNode;for(var t=[];!e._nativeNode;)t.push(e),e._nativeParent?void 0:f(!1),e=e._nativeParent;for(;t.length;e=t.pop())a(e,e._nativeNode);return e._nativeNode}var c=n(140),d=n(141),f=n(111),p=c.ID_ATTRIBUTE_NAME,h=d,g="__reactInternalInstance$"+Math.random().toString(36).slice(2),m={getClosestInstanceFromNode:s,getInstanceFromNode:l,getNodeFromInstance:u,precacheChildNodes:a,precacheNode:i,uncacheNode:o};e.exports=m},function(e,t,n){"use strict";function r(e,t){return(e&t)===t}var i=n(111),o={MUST_USE_PROPERTY:1,HAS_SIDE_EFFECTS:2,HAS_BOOLEAN_VALUE:4,HAS_NUMERIC_VALUE:8,HAS_POSITIVE_NUMERIC_VALUE:24,HAS_OVERLOADED_BOOLEAN_VALUE:32,injectDOMPropertyConfig:function(e){var t=o,n=e.Properties||{},a=e.DOMAttributeNamespaces||{},l=e.DOMAttributeNames||{},u=e.DOMPropertyNames||{},c=e.DOMMutationMethods||{};e.isCustomAttribute&&s._isCustomAttributeFunctions.push(e.isCustomAttribute);for(var d in n){s.properties.hasOwnProperty(d)?i(!1):void 0;var f=d.toLowerCase(),p=n[d],h={attributeName:f,attributeNamespace:null,propertyName:d,mutationMethod:null,mustUseProperty:r(p,t.MUST_USE_PROPERTY),hasSideEffects:r(p,t.HAS_SIDE_EFFECTS),hasBooleanValue:r(p,t.HAS_BOOLEAN_VALUE),hasNumericValue:r(p,t.HAS_NUMERIC_VALUE),hasPositiveNumericValue:r(p,t.HAS_POSITIVE_NUMERIC_VALUE),hasOverloadedBooleanValue:r(p,t.HAS_OVERLOADED_BOOLEAN_VALUE)};if(!h.mustUseProperty&&h.hasSideEffects?i(!1):void 0,h.hasBooleanValue+h.hasNumericValue+h.hasOverloadedBooleanValue<=1?void 0:i(!1),l.hasOwnProperty(d)){var g=l[d];h.attributeName=g}a.hasOwnProperty(d)&&(h.attributeNamespace=a[d]),u.hasOwnProperty(d)&&(h.propertyName=u[d]),c.hasOwnProperty(d)&&(h.mutationMethod=c[d]),s.properties[d]=h}}},a=":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",s={ID_ATTRIBUTE_NAME:"data-reactid",ROOT_ATTRIBUTE_NAME:"data-reactroot",ATTRIBUTE_NAME_START_CHAR:a,ATTRIBUTE_NAME_CHAR:a+"\\-.0-9\\uB7\\u0300-\\u036F\\u203F-\\u2040",properties:{},getPossibleStandardName:null,_isCustomAttributeFunctions:[],isCustomAttribute:function(e){for(var t=0;t<s._isCustomAttributeFunctions.length;t++){var n=s._isCustomAttributeFunctions[t];if(n(e))return!0}return!1},injection:o};e.exports=s},function(e,t){"use strict";var n={hasCachedChildNodes:1};e.exports=n},function(e,t,n){"use strict";function r(){if(!_){_=!0,v.EventEmitter.injectReactEventListener(m),v.EventPluginHub.injectEventPluginOrder(a),v.EventPluginUtils.injectComponentTree(d),v.EventPluginUtils.injectTreeTraversal(p),v.EventPluginHub.injectEventPluginsByName({SimpleEventPlugin:x,EnterLeaveEventPlugin:s,ChangeEventPlugin:o,SelectEventPlugin:w,BeforeInputEventPlugin:i}),v.NativeComponent.injectGenericComponentClass(c),v.NativeComponent.injectTextComponentClass(h),v.DOMProperty.injectDOMPropertyConfig(l),v.DOMProperty.injectDOMPropertyConfig(y),v.EmptyComponent.injectEmptyComponentFactory(function(e){return new f(e)}),v.Updates.injectReconcileTransaction(b),v.Updates.injectBatchingStrategy(g),v.Component.injectEnvironment(u)}}var i=n(143),o=n(158),a=n(170),s=n(171),l=(n(152),n(176)),u=n(177),c=n(190),d=n(139),f=n(231),p=n(232),h=n(233),g=n(234),m=n(235),v=n(238),b=n(239),y=n(247),w=n(248),x=n(249),_=!1;e.exports={inject:r}},function(e,t,n){"use strict";function r(){var e=window.opera;return"object"==typeof e&&"function"==typeof e.version&&parseInt(e.version(),10)<=12}function i(e){return(e.ctrlKey||e.altKey||e.metaKey)&&!(e.ctrlKey&&e.altKey)}function o(e){switch(e){case T.topCompositionStart:return D.compositionStart;case T.topCompositionEnd:return D.compositionEnd;case T.topCompositionUpdate:return D.compositionUpdate}}function a(e,t){return e===T.topKeyDown&&t.keyCode===x}function s(e,t){switch(e){case T.topKeyUp:return w.indexOf(t.keyCode)!==-1;case T.topKeyDown:return t.keyCode!==x;case T.topKeyPress:case T.topMouseDown:case T.topBlur:return!0;default:return!1}}function l(e){var t=e.detail;return"object"==typeof t&&"data"in t?t.data:null}function u(e,t,n,r){var i,u;if(_?i=o(e):F?s(e,n)&&(i=D.compositionEnd):a(e,n)&&(i=D.compositionStart),!i)return null;k&&(F||i!==D.compositionStart?i===D.compositionEnd&&F&&(u=F.getData()):F=m.getPooled(r));var c=v.getPooled(i,t,n,r);if(u)c.data=u;else{var d=l(n);null!==d&&(c.data=d)}return h.accumulateTwoPhaseDispatches(c),c}function c(e,t){switch(e){case T.topCompositionEnd:return l(t);case T.topKeyPress:var n=t.which;return n!==S?null:(N=!0,A);case T.topTextInput:var r=t.data;return r===A&&N?null:r;default:return null}}function d(e,t){if(F){if(e===T.topCompositionEnd||s(e,t)){var n=F.getData();return m.release(F),F=null,n}return null}switch(e){case T.topPaste:return null;case T.topKeyPress:return t.which&&!i(t)?String.fromCharCode(t.which):null;case T.topCompositionEnd:return k?null:t.data;default:return null}}function f(e,t,n,r){var i;if(i=C?c(e,n):d(e,n),!i)return null;var o=b.getPooled(D.beforeInput,t,n,r);return o.data=i,h.accumulateTwoPhaseDispatches(o),o}var p=n(144),h=n(145),g=n(152),m=n(153),v=n(155),b=n(157),y=n(130),w=[9,13,27,32],x=229,_=g.canUseDOM&&"CompositionEvent"in window,E=null;g.canUseDOM&&"documentMode"in document&&(E=document.documentMode);var C=g.canUseDOM&&"TextEvent"in window&&!E&&!r(),k=g.canUseDOM&&(!_||E&&E>8&&E<=11),S=32,A=String.fromCharCode(S),T=p.topLevelTypes,D={beforeInput:{phasedRegistrationNames:{bubbled:y({onBeforeInput:null}),captured:y({onBeforeInputCapture:null})},dependencies:[T.topCompositionEnd,T.topKeyPress,T.topTextInput,T.topPaste]},compositionEnd:{phasedRegistrationNames:{bubbled:y({onCompositionEnd:null}),captured:y({onCompositionEndCapture:null})},dependencies:[T.topBlur,T.topCompositionEnd,T.topKeyDown,T.topKeyPress,T.topKeyUp,T.topMouseDown]},compositionStart:{phasedRegistrationNames:{bubbled:y({onCompositionStart:null}),captured:y({onCompositionStartCapture:null})},dependencies:[T.topBlur,T.topCompositionStart,T.topKeyDown,T.topKeyPress,T.topKeyUp,T.topMouseDown]},compositionUpdate:{phasedRegistrationNames:{bubbled:y({onCompositionUpdate:null}),captured:y({onCompositionUpdateCapture:null})},dependencies:[T.topBlur,T.topCompositionUpdate,T.topKeyDown,T.topKeyPress,T.topKeyUp,T.topMouseDown]}},N=!1,F=null,M={eventTypes:D,extractEvents:function(e,t,n,r){return[u(e,t,n,r),f(e,t,n,r)]}};e.exports=M},function(e,t,n){"use strict";var r=n(128),i=r({bubbled:null,captured:null}),o=r({topAbort:null,topAnimationEnd:null,topAnimationIteration:null,topAnimationStart: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,topInvalid: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,topTransitionEnd:null,topVolumeChange:null,topWaiting:null,topWheel:null}),a={topLevelTypes:o,PropagationPhases:i};e.exports=a},function(e,t,n){"use strict";function r(e,t,n){var r=t.dispatchConfig.phasedRegistrationNames[n];return y(e,r)}function i(e,t,n){var i=t?b.bubbled:b.captured,o=r(e,n,i);o&&(n._dispatchListeners=m(n._dispatchListeners,o),n._dispatchInstances=m(n._dispatchInstances,e))}function o(e){e&&e.dispatchConfig.phasedRegistrationNames&&g.traverseTwoPhase(e._targetInst,i,e)}function a(e){if(e&&e.dispatchConfig.phasedRegistrationNames){var t=e._targetInst,n=t?g.getParentInstance(t):null;g.traverseTwoPhase(n,i,e)}}function s(e,t,n){if(n&&n.dispatchConfig.registrationName){var r=n.dispatchConfig.registrationName,i=y(e,r);i&&(n._dispatchListeners=m(n._dispatchListeners,i),n._dispatchInstances=m(n._dispatchInstances,e))}}function l(e){e&&e.dispatchConfig.registrationName&&s(e._targetInst,null,e)}function u(e){v(e,o)}function c(e){v(e,a)}function d(e,t,n,r){g.traverseEnterLeave(n,r,s,e,t)}function f(e){v(e,l)}var p=n(144),h=n(146),g=n(148),m=n(150),v=n(151),b=(n(114),p.PropagationPhases),y=h.getListener,w={accumulateTwoPhaseDispatches:u,accumulateTwoPhaseDispatchesSkipTarget:c,accumulateDirectDispatches:f,accumulateEnterLeaveDispatches:d};e.exports=w},function(e,t,n){"use strict";var r=n(147),i=n(148),o=n(149),a=n(150),s=n(151),l=n(111),u={},c=null,d=function(e,t){e&&(i.executeDispatchesInOrder(e,t),e.isPersistent()||e.constructor.release(e))},f=function(e){return d(e,!0)},p=function(e){return d(e,!1)},h={injection:{injectEventPluginOrder:r.injectEventPluginOrder,injectEventPluginsByName:r.injectEventPluginsByName},putListener:function(e,t,n){"function"!=typeof n?l(!1):void 0;var i=u[t]||(u[t]={});i[e._rootNodeID]=n;var o=r.registrationNameModules[t];o&&o.didPutListener&&o.didPutListener(e,t,n)},getListener:function(e,t){var n=u[t];return n&&n[e._rootNodeID]},deleteListener:function(e,t){var n=r.registrationNameModules[t];n&&n.willDeleteListener&&n.willDeleteListener(e,t);var i=u[t];i&&delete i[e._rootNodeID]},deleteAllListeners:function(e){for(var t in u)if(u[t][e._rootNodeID]){var n=r.registrationNameModules[t];n&&n.willDeleteListener&&n.willDeleteListener(e,t),delete u[t][e._rootNodeID]}},extractEvents:function(e,t,n,i){for(var o,s=r.plugins,l=0;l<s.length;l++){var u=s[l];if(u){var c=u.extractEvents(e,t,n,i);c&&(o=a(o,c))}}return o},enqueueEvents:function(e){e&&(c=a(c,e))},processEventQueue:function(e){var t=c;c=null,e?s(t,f):s(t,p),c?l(!1):void 0,o.rethrowCaughtError()},__purge:function(){u={}},__getListenerBank:function(){return u}};e.exports=h},function(e,t,n){"use strict";function r(){if(s)for(var e in l){var t=l[e],n=s.indexOf(e);if(n>-1?void 0:a(!1),!u.plugins[n]){t.extractEvents?void 0:a(!1),u.plugins[n]=t;var r=t.eventTypes;for(var o in r)i(r[o],t,o)?void 0:a(!1)}}}function i(e,t,n){u.eventNameDispatchConfigs.hasOwnProperty(n)?a(!1):void 0,u.eventNameDispatchConfigs[n]=e;var r=e.phasedRegistrationNames;if(r){for(var i in r)if(r.hasOwnProperty(i)){var s=r[i];o(s,t,n)}return!0}return!!e.registrationName&&(o(e.registrationName,t,n),!0)}function o(e,t,n){u.registrationNameModules[e]?a(!1):void 0,u.registrationNameModules[e]=t,u.registrationNameDependencies[e]=t.eventTypes[n].dependencies}var a=n(111),s=null,l={},u={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},possibleRegistrationNames:null,injectEventPluginOrder:function(e){s?a(!1):void 0,s=Array.prototype.slice.call(e),r()},injectEventPluginsByName:function(e){var t=!1;for(var n in e)if(e.hasOwnProperty(n)){var i=e[n];l.hasOwnProperty(n)&&l[n]===i||(l[n]?a(!1):void 0,l[n]=i,t=!0)}t&&r()},getPluginModuleForEvent:function(e){var t=e.dispatchConfig;if(t.registrationName)return u.registrationNameModules[t.registrationName]||null;for(var n in t.phasedRegistrationNames)if(t.phasedRegistrationNames.hasOwnProperty(n)){var r=u.registrationNameModules[t.phasedRegistrationNames[n]];if(r)return r}return null},_resetEventPlugins:function(){s=null;for(var e in l)l.hasOwnProperty(e)&&delete l[e];u.plugins.length=0;var t=u.eventNameDispatchConfigs;for(var n in t)t.hasOwnProperty(n)&&delete t[n];var r=u.registrationNameModules;for(var i in r)r.hasOwnProperty(i)&&delete r[i]}};e.exports=u},function(e,t,n){"use strict";function r(e){return e===b.topMouseUp||e===b.topTouchEnd||e===b.topTouchCancel}function i(e){return e===b.topMouseMove||e===b.topTouchMove}function o(e){return e===b.topMouseDown||e===b.topTouchStart}function a(e,t,n,r){var i=e.type||"unknown-event";e.currentTarget=y.getNodeFromInstance(r),t?g.invokeGuardedCallbackWithCatch(i,n,e):g.invokeGuardedCallback(i,n,e),e.currentTarget=null}function s(e,t){var n=e._dispatchListeners,r=e._dispatchInstances;if(Array.isArray(n))for(var i=0;i<n.length&&!e.isPropagationStopped();i++)a(e,t,n[i],r[i]);else n&&a(e,t,n,r);e._dispatchListeners=null,e._dispatchInstances=null}function l(e){var t=e._dispatchListeners,n=e._dispatchInstances;if(Array.isArray(t)){for(var r=0;r<t.length&&!e.isPropagationStopped();r++)if(t[r](e,n[r]))return n[r]}else if(t&&t(e,n))return n;return null}function u(e){var t=l(e);return e._dispatchInstances=null,e._dispatchListeners=null,t}function c(e){var t=e._dispatchListeners,n=e._dispatchInstances;Array.isArray(t)?m(!1):void 0,e.currentTarget=t?y.getNodeFromInstance(n):null;var r=t?t(e):null;return e.currentTarget=null,e._dispatchListeners=null,e._dispatchInstances=null,r}function d(e){return!!e._dispatchListeners}var f,p,h=n(144),g=n(149),m=n(111),v=(n(114),{injectComponentTree:function(e){f=e},injectTreeTraversal:function(e){p=e}}),b=h.topLevelTypes,y={isEndish:r,isMoveish:i,isStartish:o,executeDirectDispatch:c,executeDispatchesInOrder:s,executeDispatchesInOrderStopAtTrue:u,hasDispatches:d,getInstanceFromNode:function(e){return f.getInstanceFromNode(e)},getNodeFromInstance:function(e){return f.getNodeFromInstance(e)},isAncestor:function(e,t){return p.isAncestor(e,t)},getLowestCommonAncestor:function(e,t){return p.getLowestCommonAncestor(e,t)},getParentInstance:function(e){return p.getParentInstance(e)},traverseTwoPhase:function(e,t,n){return p.traverseTwoPhase(e,t,n)},traverseEnterLeave:function(e,t,n,r,i){return p.traverseEnterLeave(e,t,n,r,i)},injection:v};e.exports=y},function(e,t,n){"use strict";function r(e,t,n,r){try{return t(n,r)}catch(o){return void(null===i&&(i=o))}}var i=null,o={invokeGuardedCallback:r,invokeGuardedCallbackWithCatch:r,rethrowCaughtError:function(){if(i){var e=i;throw i=null,e}}};e.exports=o},function(e,t,n){"use strict";function r(e,t){if(null==t?i(!1):void 0,null==e)return t;var n=Array.isArray(e),r=Array.isArray(t);return n&&r?(e.push.apply(e,t),e):n?(e.push(t),e):r?[e].concat(t):[e,t]}var i=n(111);e.exports=r},function(e,t){"use strict";var n=function(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)};e.exports=n},function(e,t){"use strict";var n=!("undefined"==typeof window||!window.document||!window.document.createElement),r={canUseDOM:n,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:n&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:n&&!!window.screen,isInWorker:!n};e.exports=r},function(e,t,n){"use strict";function r(e){this._root=e,this._startText=this.getText(),this._fallbackText=null}var i=n(108),o=n(110),a=n(154);i(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 e,t,n=this._startText,r=n.length,i=this.getText(),o=i.length;for(e=0;e<r&&n[e]===i[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===i[o-t];t++);var s=t>1?1-t:void 0;return this._fallbackText=i.slice(e,s),this._fallbackText}}),o.addPoolingTo(r),e.exports=r},function(e,t,n){"use strict";function r(){return!o&&i.canUseDOM&&(o="textContent"in document.documentElement?"textContent":"innerText"),o}var i=n(152),o=null;e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return i.call(this,e,t,n,r)}var i=n(156),o={data:null};i.augmentClass(r,o),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){this.dispatchConfig=e,this._targetInst=t,this.nativeEvent=n;var i=this.constructor.Interface;for(var o in i)if(i.hasOwnProperty(o)){var s=i[o];s?this[o]=s(n):"target"===o?this.target=r:this[o]=n[o]}var l=null!=n.defaultPrevented?n.defaultPrevented:n.returnValue===!1;return l?this.isDefaultPrevented=a.thatReturnsTrue:this.isDefaultPrevented=a.thatReturnsFalse,this.isPropagationStopped=a.thatReturnsFalse,this}var i=n(108),o=n(110),a=n(115),s=(n(114),"function"==typeof Proxy,["dispatchConfig","_targetInst","nativeEvent","isDefaultPrevented","isPropagationStopped","_dispatchListeners","_dispatchInstances"]),l={type:null,target:null,currentTarget:a.thatReturnsNull,eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};i(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():e.returnValue=!1,this.isDefaultPrevented=a.thatReturnsTrue)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0,this.isPropagationStopped=a.thatReturnsTrue)},persist:function(){this.isPersistent=a.thatReturnsTrue},isPersistent:a.thatReturnsFalse,destructor:function(){var e=this.constructor.Interface;for(var t in e)this[t]=null;for(var n=0;n<s.length;n++)this[s[n]]=null}}),r.Interface=l,r.augmentClass=function(e,t){var n=this,r=function(){};r.prototype=n.prototype;var a=new r;i(a,e.prototype),e.prototype=a,e.prototype.constructor=e,e.Interface=i({},n.Interface,t),e.augmentClass=n.augmentClass,o.addPoolingTo(e,o.fourArgumentPooler)},o.addPoolingTo(r,o.fourArgumentPooler),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return i.call(this,e,t,n,r)}var i=n(156),o={data:null};i.augmentClass(r,o),e.exports=r},function(e,t,n){"use strict";function r(e){var t=e.nodeName&&e.nodeName.toLowerCase();return"select"===t||"input"===t&&"file"===e.type}function i(e){var t=C.getPooled(N.change,M,e,k(e));w.accumulateTwoPhaseDispatches(t),E.batchedUpdates(o,t)}function o(e){y.enqueueEvents(e),y.processEventQueue(!1)}function a(e,t){F=e,M=t,F.attachEvent("onchange",i)}function s(){F&&(F.detachEvent("onchange",i),F=null,M=null)}function l(e,t){if(e===D.topChange)return t}function u(e,t,n){e===D.topFocus?(s(),a(t,n)):e===D.topBlur&&s()}function c(e,t){F=e,M=t,O=e.value,L=Object.getOwnPropertyDescriptor(e.constructor.prototype,"value"),Object.defineProperty(F,"value",R),F.attachEvent?F.attachEvent("onpropertychange",f):F.addEventListener("propertychange",f,!1)}function d(){F&&(delete F.value,F.detachEvent?F.detachEvent("onpropertychange",f):F.removeEventListener("propertychange",f,!1),F=null,M=null,O=null,L=null)}function f(e){if("value"===e.propertyName){var t=e.srcElement.value;t!==O&&(O=t,i(e))}}function p(e,t){if(e===D.topInput)return t}function h(e,t,n){e===D.topFocus?(d(),c(t,n)):e===D.topBlur&&d()}function g(e,t){if((e===D.topSelectionChange||e===D.topKeyUp||e===D.topKeyDown)&&F&&F.value!==O)return O=F.value,M}function m(e){return e.nodeName&&"input"===e.nodeName.toLowerCase()&&("checkbox"===e.type||"radio"===e.type)}function v(e,t){if(e===D.topClick)return t}var b=n(144),y=n(146),w=n(145),x=n(152),_=n(139),E=n(159),C=n(156),k=n(167),S=n(168),A=n(169),T=n(130),D=b.topLevelTypes,N={change:{phasedRegistrationNames:{bubbled:T({onChange:null}),captured:T({onChangeCapture:null})},dependencies:[D.topBlur,D.topChange,D.topClick,D.topFocus,D.topInput,D.topKeyDown,D.topKeyUp,D.topSelectionChange]}},F=null,M=null,O=null,L=null,P=!1;x.canUseDOM&&(P=S("change")&&(!("documentMode"in document)||document.documentMode>8));var I=!1;x.canUseDOM&&(I=S("input")&&(!("documentMode"in document)||document.documentMode>11));var R={get:function(){return L.get.call(this)},set:function(e){O=""+e,L.set.call(this,e)}},B={eventTypes:N,extractEvents:function(e,t,n,i){var o,a,s=t?_.getNodeFromInstance(t):window;if(r(s)?P?o=l:a=u:A(s)?I?o=p:(o=g,a=h):m(s)&&(o=v),o){var c=o(e,t);if(c){var d=C.getPooled(N.change,c,n,i);return d.type="change",w.accumulateTwoPhaseDispatches(d),d}}a&&a(e,s,t)}};e.exports=B},function(e,t,n){"use strict";function r(){A.ReactReconcileTransaction&&x?void 0:v(!1)}function i(){this.reinitializeTransaction(),this.dirtyComponentsLength=null,this.callbackQueue=d.getPooled(),this.reconcileTransaction=A.ReactReconcileTransaction.getPooled(!0)}function o(e,t,n,i,o,a){r(),x.batchedUpdates(e,t,n,i,o,a)}function a(e,t){return e._mountOrder-t._mountOrder}function s(e){var t=e.dirtyComponentsLength;t!==b.length?v(!1):void 0,b.sort(a);for(var n=0;n<t;n++){var r=b[n],i=r._pendingCallbacks;r._pendingCallbacks=null;var o;if(p.logTopLevelRenders){var s=r;r._currentElement.props===r._renderedComponent._currentElement&&(s=r._renderedComponent),o="React update: "+s.getName(),console.time(o)}if(g.performUpdateIfNecessary(r,e.reconcileTransaction),o&&console.timeEnd(o),i)for(var l=0;l<i.length;l++)e.callbackQueue.enqueue(i[l],r.getPublicInstance())}}function l(e){return r(),x.isBatchingUpdates?void b.push(e):void x.batchedUpdates(l,e)}function u(e,t){x.isBatchingUpdates?void 0:v(!1),y.enqueue(e,t),w=!0}var c=n(108),d=n(160),f=n(110),p=n(161),h=n(162),g=n(163),m=n(166),v=n(111),b=[],y=d.getPooled(),w=!1,x=null,_={initialize:function(){this.dirtyComponentsLength=b.length},close:function(){this.dirtyComponentsLength!==b.length?(b.splice(0,this.dirtyComponentsLength),k()):b.length=0}},E={initialize:function(){this.callbackQueue.reset()},close:function(){this.callbackQueue.notifyAll()}},C=[_,E];c(i.prototype,m.Mixin,{getTransactionWrappers:function(){return C},destructor:function(){this.dirtyComponentsLength=null,d.release(this.callbackQueue),this.callbackQueue=null,A.ReactReconcileTransaction.release(this.reconcileTransaction),this.reconcileTransaction=null},perform:function(e,t,n){return m.Mixin.perform.call(this,this.reconcileTransaction.perform,this.reconcileTransaction,e,t,n)}}),f.addPoolingTo(i);var k=function(){for(;b.length||w;){if(b.length){var e=i.getPooled();e.perform(s,null,e),i.release(e)}if(w){w=!1;var t=y;y=d.getPooled(),t.notifyAll(),d.release(t)}}};k=h.measure("ReactUpdates","flushBatchedUpdates",k);var S={injectReconcileTransaction:function(e){e?void 0:v(!1),A.ReactReconcileTransaction=e},injectBatchingStrategy:function(e){e?void 0:v(!1),"function"!=typeof e.batchedUpdates?v(!1):void 0,"boolean"!=typeof e.isBatchingUpdates?v(!1):void 0,x=e}},A={ReactReconcileTransaction:null,batchedUpdates:o,enqueueUpdate:l,flushBatchedUpdates:k,injection:S,asap:u};e.exports=A},function(e,t,n){"use strict";function r(){this._callbacks=null,this._contexts=null}var i=n(108),o=n(110),a=n(111);i(r.prototype,{enqueue:function(e,t){this._callbacks=this._callbacks||[],this._contexts=this._contexts||[],this._callbacks.push(e),this._contexts.push(t)},notifyAll:function(){var e=this._callbacks,t=this._contexts;if(e){e.length!==t.length?a(!1):void 0,this._callbacks=null,this._contexts=null;for(var n=0;n<e.length;n++)e[n].call(t[n]);e.length=0,t.length=0}},checkpoint:function(){return this._callbacks?this._callbacks.length:0},rollback:function(e){this._callbacks&&(this._callbacks.length=e,this._contexts.length=e)},reset:function(){this._callbacks=null,this._contexts=null},destructor:function(){this.reset()}}),o.addPoolingTo(r),e.exports=r},function(e,t){"use strict";var n={logTopLevelRenders:!1};e.exports=n},function(e,t,n){"use strict";function r(e,t,n){return n}var i={enableMeasure:!1,storedMeasure:r,measureMethods:function(e,t,n){},
measure:function(e,t,n){return n},injection:{injectMeasure:function(e){i.storedMeasure=e}}};e.exports=i},function(e,t,n){"use strict";function r(){i.attachRefs(this,this._currentElement)}var i=n(164),o=(n(122),{mountComponent:function(e,t,n,i,o){var a=e.mountComponent(t,n,i,o);return e._currentElement&&null!=e._currentElement.ref&&t.getReactMountReady().enqueue(r,e),a},getNativeNode:function(e){return e.getNativeNode()},unmountComponent:function(e,t){i.detachRefs(e,e._currentElement),e.unmountComponent(t)},receiveComponent:function(e,t,n,o){var a=e._currentElement;if(t!==a||o!==e._context){var s=i.shouldUpdateRefs(a,t);s&&i.detachRefs(e,a),e.receiveComponent(t,n,o),s&&e._currentElement&&null!=e._currentElement.ref&&n.getReactMountReady().enqueue(r,e)}},performUpdateIfNecessary:function(e,t){e.performUpdateIfNecessary(t)}});e.exports=o},function(e,t,n){"use strict";function r(e,t,n){"function"==typeof e?e(t.getPublicInstance()):o.addComponentAsRefTo(t,e,n)}function i(e,t,n){"function"==typeof e?e(null):o.removeComponentAsRefFrom(t,e,n)}var o=n(165),a={};a.attachRefs=function(e,t){if(null!==t&&t!==!1){var n=t.ref;null!=n&&r(n,e,t._owner)}},a.shouldUpdateRefs=function(e,t){var n=null===e||e===!1,r=null===t||t===!1;return n||r||t._owner!==e._owner||t.ref!==e.ref},a.detachRefs=function(e,t){if(null!==t&&t!==!1){var n=t.ref;null!=n&&i(n,e,t._owner)}},e.exports=a},function(e,t,n){"use strict";var r=n(111),i={isValidOwner:function(e){return!(!e||"function"!=typeof e.attachRef||"function"!=typeof e.detachRef)},addComponentAsRefTo:function(e,t,n){i.isValidOwner(n)?void 0:r(!1),n.attachRef(t,e)},removeComponentAsRefFrom:function(e,t,n){i.isValidOwner(n)?void 0:r(!1);var o=n.getPublicInstance();o&&o.refs[t]===e.getPublicInstance()&&n.detachRef(t)}};e.exports=i},function(e,t,n){"use strict";var r=n(111),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(e,t,n,i,o,a,s,l){this.isInTransaction()?r(!1):void 0;var u,c;try{this._isInTransaction=!0,u=!0,this.initializeAll(0),c=e.call(t,n,i,o,a,s,l),u=!1}finally{try{if(u)try{this.closeAll(0)}catch(d){}else this.closeAll(0)}finally{this._isInTransaction=!1}}return c},initializeAll:function(e){for(var t=this.transactionWrappers,n=e;n<t.length;n++){var r=t[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(e){this.isInTransaction()?void 0:r(!1);for(var t=this.transactionWrappers,n=e;n<t.length;n++){var i,a=t[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(l){}}}this.wrapperInitData.length=0}},o={Mixin:i,OBSERVED_ERROR:{}};e.exports=o},function(e,t){"use strict";function n(e){var t=e.target||e.srcElement||window;return t.correspondingUseElement&&(t=t.correspondingUseElement),3===t.nodeType?t.parentNode:t}e.exports=n},function(e,t,n){"use strict";/**
	 * Checks if an event is supported in the current execution environment.
	 *
	 * NOTE: This will not work correctly for non-generic events such as `change`,
	 * `reset`, `load`, `error`, and `select`.
	 *
	 * Borrows from Modernizr.
	 *
	 * @param {string} eventNameSuffix Event name, e.g. "click".
	 * @param {?boolean} capture Check if the capture phase is supported.
	 * @return {boolean} True if the event is supported.
	 * @internal
	 * @license Modernizr 3.0.0pre (Custom Build) | MIT
	 */
function r(e,t){if(!o.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,r=n in document;if(!r){var a=document.createElement("div");a.setAttribute(n,"return;"),r="function"==typeof a[n]}return!r&&i&&"wheel"===e&&(r=document.implementation.hasFeature("Events.wheel","3.0")),r}var i,o=n(152);o.canUseDOM&&(i=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0),e.exports=r},function(e,t){"use strict";function n(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&r[e.type]||"textarea"===t)}var r={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=n},function(e,t,n){"use strict";var r=n(130),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},function(e,t,n){"use strict";var r=n(144),i=n(145),o=n(139),a=n(172),s=n(130),l=r.topLevelTypes,u={mouseEnter:{registrationName:s({onMouseEnter:null}),dependencies:[l.topMouseOut,l.topMouseOver]},mouseLeave:{registrationName:s({onMouseLeave:null}),dependencies:[l.topMouseOut,l.topMouseOver]}},c={eventTypes:u,extractEvents:function(e,t,n,r){if(e===l.topMouseOver&&(n.relatedTarget||n.fromElement))return null;if(e!==l.topMouseOut&&e!==l.topMouseOver)return null;var s;if(r.window===r)s=r;else{var c=r.ownerDocument;s=c?c.defaultView||c.parentWindow:window}var d,f;if(e===l.topMouseOut){d=t;var p=n.relatedTarget||n.toElement;f=p?o.getClosestInstanceFromNode(p):null}else d=null,f=t;if(d===f)return null;var h=null==d?s:o.getNodeFromInstance(d),g=null==f?s:o.getNodeFromInstance(f),m=a.getPooled(u.mouseLeave,d,n,r);m.type="mouseleave",m.target=h,m.relatedTarget=g;var v=a.getPooled(u.mouseEnter,f,n,r);return v.type="mouseenter",v.target=g,v.relatedTarget=h,i.accumulateEnterLeaveDispatches(m,v,d,f),[m,v]}};e.exports=c},function(e,t,n){"use strict";function r(e,t,n,r){return i.call(this,e,t,n,r)}var i=n(173),o=n(174),a=n(175),s={screenX:null,screenY:null,clientX:null,clientY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:a,button:function(e){var t=e.button;return"which"in e?t:2===t?2:4===t?1:0},buttons:null,relatedTarget:function(e){return e.relatedTarget||(e.fromElement===e.srcElement?e.toElement:e.fromElement)},pageX:function(e){return"pageX"in e?e.pageX:e.clientX+o.currentScrollLeft},pageY:function(e){return"pageY"in e?e.pageY:e.clientY+o.currentScrollTop}};i.augmentClass(r,s),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return i.call(this,e,t,n,r)}var i=n(156),o=n(167),a={view:function(e){if(e.view)return e.view;var t=o(e);if(null!=t&&t.window===t)return t;var n=t.ownerDocument;return n?n.defaultView||n.parentWindow:window},detail:function(e){return e.detail||0}};i.augmentClass(r,a),e.exports=r},function(e,t){"use strict";var n={currentScrollLeft:0,currentScrollTop:0,refreshScrollValues:function(e){n.currentScrollLeft=e.x,n.currentScrollTop=e.y}};e.exports=n},function(e,t){"use strict";function n(e){var t=this,n=t.nativeEvent;if(n.getModifierState)return n.getModifierState(e);var r=i[e];return!!r&&!!n[r]}function r(e){return n}var i={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};e.exports=r},function(e,t,n){"use strict";var r=n(140),i=r.injection.MUST_USE_PROPERTY,o=r.injection.HAS_BOOLEAN_VALUE,a=r.injection.HAS_SIDE_EFFECTS,s=r.injection.HAS_NUMERIC_VALUE,l=r.injection.HAS_POSITIVE_NUMERIC_VALUE,u=r.injection.HAS_OVERLOADED_BOOLEAN_VALUE,c={isCustomAttribute:RegExp.prototype.test.bind(new RegExp("^(data|aria)-["+r.ATTRIBUTE_NAME_CHAR+"]*$")),Properties:{accept:0,acceptCharset:0,accessKey:0,action:0,allowFullScreen:o,allowTransparency:0,alt:0,async:o,autoComplete:0,autoPlay:o,capture:o,cellPadding:0,cellSpacing:0,charSet:0,challenge:0,checked:i|o,cite:0,classID:0,className:0,cols:l,colSpan:0,content:0,contentEditable:0,contextMenu:0,controls:o,coords:0,crossOrigin:0,data:0,dateTime:0,"default":o,defer:o,dir:0,disabled:o,download:u,draggable:0,encType:0,form:0,formAction:0,formEncType:0,formMethod:0,formNoValidate:o,formTarget:0,frameBorder:0,headers:0,height:0,hidden:o,high:0,href:0,hrefLang:0,htmlFor:0,httpEquiv:0,icon:0,id:0,inputMode:0,integrity:0,is:0,keyParams:0,keyType:0,kind:0,label:0,lang:0,list:0,loop:o,low:0,manifest:0,marginHeight:0,marginWidth:0,max:0,maxLength:0,media:0,mediaGroup:0,method:0,min:0,minLength:0,multiple:i|o,muted:i|o,name:0,nonce:0,noValidate:o,open:o,optimum:0,pattern:0,placeholder:0,poster:0,preload:0,profile:0,radioGroup:0,readOnly:o,rel:0,required:o,reversed:o,role:0,rows:l,rowSpan:s,sandbox:0,scope:0,scoped:o,scrolling:0,seamless:o,selected:i|o,shape:0,size:l,sizes:0,span:l,spellCheck:0,src:0,srcDoc:0,srcLang:0,srcSet:0,start:s,step:0,style:0,summary:0,tabIndex:0,target:0,title:0,type:0,useMap:0,value:i|a,width:0,wmode:0,wrap:0,about:0,datatype:0,inlist:0,prefix:0,property:0,resource:0,"typeof":0,vocab:0,autoCapitalize:0,autoCorrect:0,autoSave:0,color:0,itemProp:0,itemScope:o,itemType:0,itemID:0,itemRef:0,results:0,security:0,unselectable:0},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},DOMPropertyNames:{}};e.exports=c},function(e,t,n){"use strict";var r=n(178),i=n(189),o=n(162),a={processChildrenUpdates:i.dangerouslyProcessChildrenUpdates,replaceNodeWithMarkup:r.dangerouslyReplaceNodeWithMarkup,unmountIDFromEnvironment:function(e){}};o.measureMethods(a,"ReactComponentBrowserEnvironment",{replaceNodeWithMarkup:"replaceNodeWithMarkup"}),e.exports=a},function(e,t,n){"use strict";function r(e,t){return Array.isArray(t)&&(t=t[1]),t?t.nextSibling:e.firstChild}function i(e,t,n){c.insertTreeBefore(e,t,n)}function o(e,t,n){Array.isArray(t)?s(e,t[0],t[1],n):v(e,t,n)}function a(e,t){if(Array.isArray(t)){var n=t[1];t=t[0],l(e,t,n),e.removeChild(n)}e.removeChild(t)}function s(e,t,n,r){for(var i=t;;){var o=i.nextSibling;if(v(e,i,r),i===n)break;i=o}}function l(e,t,n){for(;;){var r=t.nextSibling;if(r===n)break;e.removeChild(r)}}function u(e,t,n){var r=e.parentNode,i=e.nextSibling;i===t?n&&v(r,document.createTextNode(n),i):n?(m(i,n),l(r,i,t)):l(r,e,t)}var c=n(179),d=n(184),f=n(188),p=n(162),h=n(180),g=n(183),m=n(181),v=h(function(e,t,n){e.insertBefore(t,n)}),b={dangerouslyReplaceNodeWithMarkup:d.dangerouslyReplaceNodeWithMarkup,replaceDelimitedText:u,processUpdates:function(e,t){for(var n=0;n<t.length;n++){var s=t[n];switch(s.type){case f.INSERT_MARKUP:i(e,s.content,r(e,s.afterNode));break;case f.MOVE_EXISTING:o(e,s.fromNode,r(e,s.afterNode));break;case f.SET_MARKUP:g(e,s.content);break;case f.TEXT_CONTENT:m(e,s.content);break;case f.REMOVE_NODE:a(e,s.fromNode)}}}};p.measureMethods(b,"DOMChildrenOperations",{replaceDelimitedText:"replaceDelimitedText"}),e.exports=b},function(e,t,n){"use strict";function r(e){if(d){var t=e.node,n=e.children;if(n.length)for(var r=0;r<n.length;r++)f(t,n[r],null);else null!=e.html?t.innerHTML=e.html:null!=e.text&&c(t,e.text)}}function i(e,t){e.parentNode.replaceChild(t.node,e),r(t)}function o(e,t){d?e.children.push(t):e.node.appendChild(t.node)}function a(e,t){d?e.html=t:e.node.innerHTML=t}function s(e,t){d?e.text=t:c(e.node,t)}function l(e){return{node:e,children:[],html:null,text:null}}var u=n(180),c=n(181),d="undefined"!=typeof document&&"number"==typeof document.documentMode||"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent&&/\bEdge\/\d/.test(navigator.userAgent),f=u(function(e,t,n){11===t.node.nodeType?(r(t),e.insertBefore(t.node,n)):(e.insertBefore(t.node,n),r(t))});l.insertTreeBefore=f,l.replaceChildWithTree=i,l.queueChild=o,l.queueHTML=a,l.queueText=s,e.exports=l},function(e,t){"use strict";var n=function(e){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e};e.exports=n},function(e,t,n){"use strict";var r=n(152),i=n(182),o=n(183),a=function(e,t){e.textContent=t};r.canUseDOM&&("textContent"in document.documentElement||(a=function(e,t){o(e,i(t))})),e.exports=a},function(e,t){"use strict";function n(e){return i[e]}function r(e){return(""+e).replace(o,n)}var i={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},o=/[&><"']/g;e.exports=r},function(e,t,n){"use strict";var r=n(152),i=/^[ \r\n\t\f]/,o=/<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/,a=n(180),s=a(function(e,t){e.innerHTML=t});if(r.canUseDOM){var l=document.createElement("div");l.innerHTML=" ",""===l.innerHTML&&(s=function(e,t){if(e.parentNode&&e.parentNode.replaceChild(e,e),i.test(t)||"<"===t[0]&&o.test(t)){e.innerHTML=String.fromCharCode(65279)+t;var n=e.firstChild;1===n.data.length?e.removeChild(n):n.deleteData(0,1)}else e.innerHTML=t}),l=null}e.exports=s},function(e,t,n){"use strict";function r(e){return e.substring(1,e.indexOf(" "))}var i=n(179),o=n(152),a=n(185),s=n(115),l=n(187),u=n(111),c=/^(<[^ \/>]+)/,d="data-danger-index",f={dangerouslyRenderMarkup:function(e){o.canUseDOM?void 0:u(!1);for(var t,n={},i=0;i<e.length;i++)e[i]?void 0:u(!1),t=r(e[i]),t=l(t)?t:"*",n[t]=n[t]||[],n[t][i]=e[i];var f=[],p=0;for(t in n)if(n.hasOwnProperty(t)){var h,g=n[t];for(h in g)if(g.hasOwnProperty(h)){var m=g[h];g[h]=m.replace(c,"$1 "+d+'="'+h+'" ')}for(var v=a(g.join(""),s),b=0;b<v.length;++b){var y=v[b];y.hasAttribute&&y.hasAttribute(d)&&(h=+y.getAttribute(d),y.removeAttribute(d),f.hasOwnProperty(h)?u(!1):void 0,f[h]=y,p+=1)}}return p!==f.length?u(!1):void 0,f.length!==e.length?u(!1):void 0,f},dangerouslyReplaceNodeWithMarkup:function(e,t){if(o.canUseDOM?void 0:u(!1),t?void 0:u(!1),"HTML"===e.nodeName?u(!1):void 0,"string"==typeof t){var n=a(t,s)[0];e.parentNode.replaceChild(n,e)}else i.replaceChildWithTree(e,t)}};e.exports=f},function(e,t,n){"use strict";function r(e){var t=e.match(c);return t&&t[1].toLowerCase()}function i(e,t){var n=u;u?void 0:l(!1);var i=r(e),o=i&&s(i);if(o){n.innerHTML=o[1]+e+o[2];for(var c=o[0];c--;)n=n.lastChild}else n.innerHTML=e;var d=n.getElementsByTagName("script");d.length&&(t?void 0:l(!1),a(d).forEach(t));for(var f=Array.from(n.childNodes);n.lastChild;)n.removeChild(n.lastChild);return f}var o=n(152),a=n(186),s=n(187),l=n(111),u=o.canUseDOM?document.createElement("div"):null,c=/^\s*<(\w+)/;e.exports=i},function(e,t,n){"use strict";function r(e){var t=e.length;if(Array.isArray(e)||"object"!=typeof e&&"function"!=typeof e?a(!1):void 0,"number"!=typeof t?a(!1):void 0,0===t||t-1 in e?void 0:a(!1),"function"==typeof e.callee?a(!1):void 0,e.hasOwnProperty)try{return Array.prototype.slice.call(e)}catch(n){}for(var r=Array(t),i=0;i<t;i++)r[i]=e[i];return r}function i(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"length"in e&&!("setInterval"in e)&&"number"!=typeof e.nodeType&&(Array.isArray(e)||"callee"in e||"item"in e)}function o(e){return i(e)?Array.isArray(e)?e.slice():r(e):[e]}var a=n(111);e.exports=o},function(e,t,n){"use strict";function r(e){return a?void 0:o(!1),f.hasOwnProperty(e)||(e="*"),s.hasOwnProperty(e)||("*"===e?a.innerHTML="<link />":a.innerHTML="<"+e+"></"+e+">",s[e]=!a.firstChild),s[e]?f[e]:null}var i=n(152),o=n(111),a=i.canUseDOM?document.createElement("div"):null,s={},l=[1,'<select multiple="true">',"</select>"],u=[1,"<table>","</table>"],c=[3,"<table><tbody><tr>","</tr></tbody></table>"],d=[1,'<svg xmlns="http://www.w3.org/2000/svg">',"</svg>"],f={"*":[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:l,option:l,caption:u,colgroup:u,tbody:u,tfoot:u,thead:u,td:c,th:c},p=["circle","clipPath","defs","ellipse","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","text","tspan"];p.forEach(function(e){f[e]=d,s[e]=!0}),e.exports=r},function(e,t,n){"use strict";var r=n(128),i=r({INSERT_MARKUP:null,MOVE_EXISTING:null,REMOVE_NODE:null,SET_MARKUP:null,TEXT_CONTENT:null});e.exports=i},function(e,t,n){"use strict";var r=n(178),i=n(139),o=n(162),a={dangerouslyProcessChildrenUpdates:function(e,t){var n=i.getNodeFromInstance(e);r.processUpdates(n,t)}};o.measureMethods(a,"ReactDOMIDOperations",{dangerouslyProcessChildrenUpdates:"dangerouslyProcessChildrenUpdates"}),e.exports=a},function(e,t,n){"use strict";function r(e,t){t&&(Y[e._tag]&&(null!=t.children||null!=t.dangerouslySetInnerHTML?L(!1):void 0),null!=t.dangerouslySetInnerHTML&&(null!=t.children?L(!1):void 0,"object"==typeof t.dangerouslySetInnerHTML&&W in t.dangerouslySetInnerHTML?void 0:L(!1)),null!=t.style&&"object"!=typeof t.style?L(!1):void 0)}function i(e,t,n,r){var i=e._nativeContainerInfo,a=i._node&&i._node.nodeType===H,s=a?i._node:i._ownerDocument;s&&(j(t,s),r.getReactMountReady().enqueue(o,{inst:e,registrationName:t,listener:n}))}function o(){var e=this;w.putListener(e.inst,e.registrationName,e.listener)}function a(){var e=this;T.postMountWrapper(e)}function s(){var e=this;e._rootNodeID?void 0:L(!1);var t=B(e);switch(t?void 0:L(!1),e._tag){case"iframe":case"object":e._wrapperState.listeners=[_.trapBubbledEvent(y.topLevelTypes.topLoad,"load",t)];break;case"video":case"audio":e._wrapperState.listeners=[];for(var n in z)z.hasOwnProperty(n)&&e._wrapperState.listeners.push(_.trapBubbledEvent(y.topLevelTypes[n],z[n],t));break;case"img":e._wrapperState.listeners=[_.trapBubbledEvent(y.topLevelTypes.topError,"error",t),_.trapBubbledEvent(y.topLevelTypes.topLoad,"load",t)];break;case"form":e._wrapperState.listeners=[_.trapBubbledEvent(y.topLevelTypes.topReset,"reset",t),_.trapBubbledEvent(y.topLevelTypes.topSubmit,"submit",t)];break;case"input":case"select":case"textarea":e._wrapperState.listeners=[_.trapBubbledEvent(y.topLevelTypes.topInvalid,"invalid",t)]}}function l(){D.postUpdateWrapper(this)}function u(e){J.call(Q,e)||(X.test(e)?void 0:L(!1),Q[e]=!0)}function c(e,t){return e.indexOf("-")>=0||null!=t.is}function d(e){var t=e.type;u(t),this._currentElement=e,this._tag=t.toLowerCase(),this._namespaceURI=null,this._renderedChildren=null,this._previousStyle=null,this._previousStyleCopy=null,this._nativeNode=null,this._nativeParent=null,this._rootNodeID=null,this._domID=null,this._nativeContainerInfo=null,this._wrapperState=null,this._topLevelWrapper=null,this._flags=0}var f=n(108),p=n(191),h=n(193),g=n(179),m=n(201),v=n(140),b=n(202),y=n(144),w=n(146),x=n(147),_=n(207),E=n(177),C=n(210),k=n(141),S=n(139),A=n(212),T=n(214),D=n(215),N=n(216),F=n(217),M=n(162),O=n(182),L=n(111),P=(n(168),n(130)),I=(n(229),n(230),n(114),k),R=w.deleteListener,B=S.getNodeFromInstance,j=_.listenTo,$=x.registrationNameModules,V={string:!0,number:!0},U=P({style:null}),W=P({__html:null}),q={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null},H=11,z={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"},G={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},K={listing:!0,pre:!0,textarea:!0},Y=f({menuitem:!0},G),X=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,Q={},J={}.hasOwnProperty,Z=1;d.displayName="ReactDOMComponent",d.Mixin={mountComponent:function(e,t,n,i){this._rootNodeID=Z++,this._domID=n._idCounter++,this._nativeParent=t,this._nativeContainerInfo=n;var o=this._currentElement.props;switch(this._tag){case"iframe":case"object":case"img":case"form":case"video":case"audio":this._wrapperState={listeners:null},e.getReactMountReady().enqueue(s,this);break;case"button":o=C.getNativeProps(this,o,t);break;case"input":A.mountWrapper(this,o,t),o=A.getNativeProps(this,o),e.getReactMountReady().enqueue(s,this);break;case"option":T.mountWrapper(this,o,t),o=T.getNativeProps(this,o);break;case"select":D.mountWrapper(this,o,t),o=D.getNativeProps(this,o),e.getReactMountReady().enqueue(s,this);break;case"textarea":N.mountWrapper(this,o,t),o=N.getNativeProps(this,o),e.getReactMountReady().enqueue(s,this)}r(this,o);var l,u;null!=t?(l=t._namespaceURI,u=t._tag):n._tag&&(l=n._namespaceURI,u=n._tag),(null==l||l===m.svg&&"foreignobject"===u)&&(l=m.html),l===m.html&&("svg"===this._tag?l=m.svg:"math"===this._tag&&(l=m.mathml)),this._namespaceURI=l;var c;if(e.useCreateElement){var d,f=n._ownerDocument;if(l===m.html)if("script"===this._tag){var h=f.createElement("div"),v=this._currentElement.type;h.innerHTML="<"+v+"></"+v+">",d=h.removeChild(h.firstChild)}else d=f.createElement(this._currentElement.type);else d=f.createElementNS(l,this._currentElement.type);S.precacheNode(this,d),this._flags|=I.hasCachedChildNodes,this._nativeParent||b.setAttributeForRoot(d),this._updateDOMProperties(null,o,e);var y=g(d);this._createInitialChildren(e,o,i,y),c=y}else{var w=this._createOpenTagMarkupAndPutListeners(e,o),x=this._createContentMarkup(e,o,i);c=!x&&G[this._tag]?w+"/>":w+">"+x+"</"+this._currentElement.type+">"}switch(this._tag){case"button":case"input":case"select":case"textarea":o.autoFocus&&e.getReactMountReady().enqueue(p.focusDOMComponent,this);break;case"option":e.getReactMountReady().enqueue(a,this)}return c},_createOpenTagMarkupAndPutListeners:function(e,t){var n="<"+this._currentElement.type;for(var r in t)if(t.hasOwnProperty(r)){var o=t[r];if(null!=o)if($.hasOwnProperty(r))o&&i(this,r,o,e);else{r===U&&(o&&(o=this._previousStyleCopy=f({},t.style)),o=h.createMarkupForStyles(o,this));var a=null;null!=this._tag&&c(this._tag,t)?q.hasOwnProperty(r)||(a=b.createMarkupForCustomAttribute(r,o)):a=b.createMarkupForProperty(r,o),a&&(n+=" "+a)}}return e.renderToStaticMarkup?n:(this._nativeParent||(n+=" "+b.createMarkupForRoot()),n+=" "+b.createMarkupForID(this._domID))},_createContentMarkup:function(e,t,n){var r="",i=t.dangerouslySetInnerHTML;if(null!=i)null!=i.__html&&(r=i.__html);else{var o=V[typeof t.children]?t.children:null,a=null!=o?null:t.children;if(null!=o)r=O(o);else if(null!=a){var s=this.mountChildren(a,e,n);r=s.join("")}}return K[this._tag]&&"\n"===r.charAt(0)?"\n"+r:r},_createInitialChildren:function(e,t,n,r){var i=t.dangerouslySetInnerHTML;if(null!=i)null!=i.__html&&g.queueHTML(r,i.__html);else{var o=V[typeof t.children]?t.children:null,a=null!=o?null:t.children;if(null!=o)g.queueText(r,o);else if(null!=a)for(var s=this.mountChildren(a,e,n),l=0;l<s.length;l++)g.queueChild(r,s[l])}},receiveComponent:function(e,t,n){var r=this._currentElement;this._currentElement=e,this.updateComponent(t,r,e,n)},updateComponent:function(e,t,n,i){var o=t.props,a=this._currentElement.props;switch(this._tag){case"button":o=C.getNativeProps(this,o),a=C.getNativeProps(this,a);break;case"input":A.updateWrapper(this),o=A.getNativeProps(this,o),a=A.getNativeProps(this,a);break;case"option":o=T.getNativeProps(this,o),a=T.getNativeProps(this,a);break;case"select":o=D.getNativeProps(this,o),a=D.getNativeProps(this,a);break;case"textarea":N.updateWrapper(this),o=N.getNativeProps(this,o),a=N.getNativeProps(this,a)}r(this,a),this._updateDOMProperties(o,a,e),this._updateDOMChildren(o,a,e,i),"select"===this._tag&&e.getReactMountReady().enqueue(l,this)},_updateDOMProperties:function(e,t,n){var r,o,a;for(r in e)if(!t.hasOwnProperty(r)&&e.hasOwnProperty(r)&&null!=e[r])if(r===U){var s=this._previousStyleCopy;for(o in s)s.hasOwnProperty(o)&&(a=a||{},a[o]="");this._previousStyleCopy=null}else $.hasOwnProperty(r)?e[r]&&R(this,r):(v.properties[r]||v.isCustomAttribute(r))&&b.deleteValueForProperty(B(this),r);for(r in t){var l=t[r],u=r===U?this._previousStyleCopy:null!=e?e[r]:void 0;if(t.hasOwnProperty(r)&&l!==u&&(null!=l||null!=u))if(r===U)if(l?l=this._previousStyleCopy=f({},l):this._previousStyleCopy=null,u){for(o in u)!u.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(a=a||{},a[o]="");for(o in l)l.hasOwnProperty(o)&&u[o]!==l[o]&&(a=a||{},a[o]=l[o])}else a=l;else if($.hasOwnProperty(r))l?i(this,r,l,n):u&&R(this,r);else if(c(this._tag,t))q.hasOwnProperty(r)||b.setValueForAttribute(B(this),r,l);else if(v.properties[r]||v.isCustomAttribute(r)){var d=B(this);null!=l?b.setValueForProperty(d,r,l):b.deleteValueForProperty(d,r)}}a&&h.setValueForStyles(B(this),a,this)},_updateDOMChildren:function(e,t,n,r){var i=V[typeof e.children]?e.children:null,o=V[typeof t.children]?t.children:null,a=e.dangerouslySetInnerHTML&&e.dangerouslySetInnerHTML.__html,s=t.dangerouslySetInnerHTML&&t.dangerouslySetInnerHTML.__html,l=null!=i?null:e.children,u=null!=o?null:t.children,c=null!=i||null!=a,d=null!=o||null!=s;null!=l&&null==u?this.updateChildren(null,n,r):c&&!d&&this.updateTextContent(""),null!=o?i!==o&&this.updateTextContent(""+o):null!=s?a!==s&&this.updateMarkup(""+s):null!=u&&this.updateChildren(u,n,r)},getNativeNode:function(){return B(this)},unmountComponent:function(e){switch(this._tag){case"iframe":case"object":case"img":case"form":case"video":case"audio":var t=this._wrapperState.listeners;if(t)for(var n=0;n<t.length;n++)t[n].remove();break;case"html":case"head":case"body":L(!1)}this.unmountChildren(e),S.uncacheNode(this),w.deleteAllListeners(this),E.unmountIDFromEnvironment(this._rootNodeID),this._rootNodeID=null,this._domID=null,this._wrapperState=null},getPublicInstance:function(){return B(this)}},M.measureMethods(d.Mixin,"ReactDOMComponent",{mountComponent:"mountComponent",receiveComponent:"receiveComponent"}),f(d.prototype,d.Mixin,F.Mixin),e.exports=d},function(e,t,n){"use strict";var r=n(139),i=n(192),o={focusDOMComponent:function(){i(r.getNodeFromInstance(this))}};e.exports=o},function(e,t){"use strict";function n(e){try{e.focus()}catch(t){}}e.exports=n},function(e,t,n){"use strict";var r=n(194),i=n(152),o=n(162),a=(n(195),n(197)),s=n(198),l=n(200),u=(n(114),l(function(e){return s(e)})),c=!1,d="cssFloat";if(i.canUseDOM){var f=document.createElement("div").style;try{f.font=""}catch(p){c=!0}void 0===document.documentElement.style.cssFloat&&(d="styleFloat")}var h={createMarkupForStyles:function(e,t){var n="";for(var r in e)if(e.hasOwnProperty(r)){var i=e[r];null!=i&&(n+=u(r)+":",n+=a(r,i,t)+";")}return n||null},setValueForStyles:function(e,t,n){var i=e.style;for(var o in t)if(t.hasOwnProperty(o)){var s=a(o,t[o],n);if("float"!==o&&"cssFloat"!==o||(o=d),s)i[o]=s;else{var l=c&&r.shorthandPropertyExpansions[o];if(l)for(var u in l)i[u]="";else i[o]=""}}}};o.measureMethods(h,"CSSPropertyOperations",{setValueForStyles:"setValueForStyles"}),e.exports=h},function(e,t){"use strict";function n(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}var r={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridColumn:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},i=["Webkit","ms","Moz","O"];Object.keys(r).forEach(function(e){i.forEach(function(t){r[n(t,e)]=r[e]})});var o={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}},a={isUnitlessNumber:r,shorthandPropertyExpansions:o};e.exports=a},function(e,t,n){"use strict";function r(e){return i(e.replace(o,"ms-"))}var i=n(196),o=/^-ms-/;e.exports=r},function(e,t){"use strict";function n(e){return e.replace(r,function(e,t){return t.toUpperCase()})}var r=/-(.)/g;e.exports=n},function(e,t,n){"use strict";function r(e,t,n){var r=null==t||"boolean"==typeof t||""===t;if(r)return"";var i=isNaN(t);if(i||0===t||o.hasOwnProperty(e)&&o[e])return""+t;if("string"==typeof t){t=t.trim()}return t+"px"}var i=n(194),o=(n(114),i.isUnitlessNumber);e.exports=r},function(e,t,n){"use strict";function r(e){return i(e).replace(o,"-ms-")}var i=n(199),o=/^ms-/;e.exports=r},function(e,t){"use strict";function n(e){return e.replace(r,"-$1").toLowerCase()}var r=/([A-Z])/g;e.exports=n},function(e,t){"use strict";function n(e){var t={};return function(n){return t.hasOwnProperty(n)||(t[n]=e.call(this,n)),t[n]}}e.exports=n},function(e,t){"use strict";var n={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};e.exports=n},function(e,t,n){"use strict";function r(e){return!!c.hasOwnProperty(e)||!u.hasOwnProperty(e)&&(l.test(e)?(c[e]=!0,!0):(u[e]=!0,!1))}function i(e,t){return null==t||e.hasBooleanValue&&!t||e.hasNumericValue&&isNaN(t)||e.hasPositiveNumericValue&&t<1||e.hasOverloadedBooleanValue&&t===!1}var o=n(140),a=(n(203),n(162)),s=n(206),l=(n(114),new RegExp("^["+o.ATTRIBUTE_NAME_START_CHAR+"]["+o.ATTRIBUTE_NAME_CHAR+"]*$")),u={},c={},d={createMarkupForID:function(e){return o.ID_ATTRIBUTE_NAME+"="+s(e)},setAttributeForID:function(e,t){e.setAttribute(o.ID_ATTRIBUTE_NAME,t)},createMarkupForRoot:function(){return o.ROOT_ATTRIBUTE_NAME+'=""'},setAttributeForRoot:function(e){e.setAttribute(o.ROOT_ATTRIBUTE_NAME,"")},createMarkupForProperty:function(e,t){var n=o.properties.hasOwnProperty(e)?o.properties[e]:null;if(n){if(i(n,t))return"";var r=n.attributeName;return n.hasBooleanValue||n.hasOverloadedBooleanValue&&t===!0?r+'=""':r+"="+s(t)}return o.isCustomAttribute(e)?null==t?"":e+"="+s(t):null},createMarkupForCustomAttribute:function(e,t){return r(e)&&null!=t?e+"="+s(t):""},setValueForProperty:function(e,t,n){var r=o.properties.hasOwnProperty(t)?o.properties[t]:null;if(r){var a=r.mutationMethod;if(a)a(e,n);else if(i(r,n))this.deleteValueForProperty(e,t);else if(r.mustUseProperty){var s=r.propertyName;r.hasSideEffects&&""+e[s]==""+n||(e[s]=n)}else{var l=r.attributeName,u=r.attributeNamespace;u?e.setAttributeNS(u,l,""+n):r.hasBooleanValue||r.hasOverloadedBooleanValue&&n===!0?e.setAttribute(l,""):e.setAttribute(l,""+n)}}else o.isCustomAttribute(t)&&d.setValueForAttribute(e,t,n)},setValueForAttribute:function(e,t,n){r(t)&&(null==n?e.removeAttribute(t):e.setAttribute(t,""+n))},deleteValueForProperty:function(e,t){var n=o.properties.hasOwnProperty(t)?o.properties[t]:null;if(n){var r=n.mutationMethod;if(r)r(e,void 0);else if(n.mustUseProperty){var i=n.propertyName;n.hasBooleanValue?e[i]=!1:n.hasSideEffects&&""+e[i]==""||(e[i]="")}else e.removeAttribute(n.attributeName)}else o.isCustomAttribute(t)&&e.removeAttribute(t)}};a.measureMethods(d,"DOMPropertyOperations",{setValueForProperty:"setValueForProperty",setValueForAttribute:"setValueForAttribute",deleteValueForProperty:"deleteValueForProperty"}),e.exports=d},function(e,t,n){"use strict";var r=n(204);e.exports={debugTool:r}},function(e,t,n){"use strict";function r(e,t,n,r,i,o){}var i=n(205),o=(n(114),[]),a={addDevtool:function(e){o.push(e)},removeDevtool:function(e){for(var t=0;t<o.length;t++)o[t]===e&&(o.splice(t,1),t--)},onCreateMarkupForProperty:function(e,t){r("onCreateMarkupForProperty",e,t)},onSetValueForProperty:function(e,t,n){r("onSetValueForProperty",e,t,n)},onDeleteValueForProperty:function(e,t){r("onDeleteValueForProperty",e,t)}};a.addDevtool(i),e.exports=a},function(e,t,n){"use strict";var r,i=(n(140),n(147),n(114),{onCreateMarkupForProperty:function(e,t){r(e)},onSetValueForProperty:function(e,t,n){r(t)},onDeleteValueForProperty:function(e,t){r(t)}});e.exports=i},function(e,t,n){"use strict";function r(e){return'"'+i(e)+'"'}var i=n(182);e.exports=r},function(e,t,n){"use strict";function r(e){return Object.prototype.hasOwnProperty.call(e,m)||(e[m]=h++,f[e[m]]={}),f[e[m]]}var i,o=n(108),a=n(144),s=n(147),l=n(208),u=n(174),c=n(209),d=n(168),f={},p=!1,h=0,g={topAbort:"abort",topAnimationEnd:c("animationend")||"animationend",topAnimationIteration:c("animationiteration")||"animationiteration",topAnimationStart:c("animationstart")||"animationstart",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",topTransitionEnd:c("transitionend")||"transitionend",topVolumeChange:"volumechange",topWaiting:"waiting",topWheel:"wheel"},m="_reactListenersID"+String(Math.random()).slice(2),v=o({},l,{ReactEventListener:null,injection:{injectReactEventListener:function(e){e.setHandleTopLevel(v.handleTopLevel),v.ReactEventListener=e}},setEnabled:function(e){v.ReactEventListener&&v.ReactEventListener.setEnabled(e)},isEnabled:function(){return!(!v.ReactEventListener||!v.ReactEventListener.isEnabled())},listenTo:function(e,t){for(var n=t,i=r(n),o=s.registrationNameDependencies[e],l=a.topLevelTypes,u=0;u<o.length;u++){var c=o[u];i.hasOwnProperty(c)&&i[c]||(c===l.topWheel?d("wheel")?v.ReactEventListener.trapBubbledEvent(l.topWheel,"wheel",n):d("mousewheel")?v.ReactEventListener.trapBubbledEvent(l.topWheel,"mousewheel",n):v.ReactEventListener.trapBubbledEvent(l.topWheel,"DOMMouseScroll",n):c===l.topScroll?d("scroll",!0)?v.ReactEventListener.trapCapturedEvent(l.topScroll,"scroll",n):v.ReactEventListener.trapBubbledEvent(l.topScroll,"scroll",v.ReactEventListener.WINDOW_HANDLE):c===l.topFocus||c===l.topBlur?(d("focus",!0)?(v.ReactEventListener.trapCapturedEvent(l.topFocus,"focus",n),v.ReactEventListener.trapCapturedEvent(l.topBlur,"blur",n)):d("focusin")&&(v.ReactEventListener.trapBubbledEvent(l.topFocus,"focusin",n),v.ReactEventListener.trapBubbledEvent(l.topBlur,"focusout",n)),i[l.topBlur]=!0,i[l.topFocus]=!0):g.hasOwnProperty(c)&&v.ReactEventListener.trapBubbledEvent(c,g[c],n),i[c]=!0)}},trapBubbledEvent:function(e,t,n){return v.ReactEventListener.trapBubbledEvent(e,t,n)},trapCapturedEvent:function(e,t,n){return v.ReactEventListener.trapCapturedEvent(e,t,n)},ensureScrollValueMonitoring:function(){if(void 0===i&&(i=document.createEvent&&"pageX"in document.createEvent("MouseEvent")),!i&&!p){var e=u.refreshScrollValues;v.ReactEventListener.monitorScrollValue(e),p=!0}}});e.exports=v},function(e,t,n){"use strict";function r(e){i.enqueueEvents(e),
i.processEventQueue(!1)}var i=n(146),o={handleTopLevel:function(e,t,n,o){var a=i.extractEvents(e,t,n,o);r(a)}};e.exports=o},function(e,t,n){"use strict";function r(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n["ms"+e]="MS"+t,n["O"+e]="o"+t.toLowerCase(),n}function i(e){if(s[e])return s[e];if(!a[e])return e;var t=a[e];for(var n in t)if(t.hasOwnProperty(n)&&n in l)return s[e]=t[n];return""}var o=n(152),a={animationend:r("Animation","AnimationEnd"),animationiteration:r("Animation","AnimationIteration"),animationstart:r("Animation","AnimationStart"),transitionend:r("Transition","TransitionEnd")},s={},l={};o.canUseDOM&&(l=document.createElement("div").style,"AnimationEvent"in window||(delete a.animationend.animation,delete a.animationiteration.animation,delete a.animationstart.animation),"TransitionEvent"in window||delete a.transitionend.transition),e.exports=i},function(e,t,n){"use strict";var r=n(211),i={getNativeProps:r.getNativeProps};e.exports=i},function(e,t){"use strict";var n={onClick:!0,onDoubleClick:!0,onMouseDown:!0,onMouseMove:!0,onMouseUp:!0,onClickCapture:!0,onDoubleClickCapture:!0,onMouseDownCapture:!0,onMouseMoveCapture:!0,onMouseUpCapture:!0},r={getNativeProps:function(e,t){if(!t.disabled)return t;var r={};for(var i in t)!n[i]&&t.hasOwnProperty(i)&&(r[i]=t[i]);return r}};e.exports=r},function(e,t,n){"use strict";function r(){this._rootNodeID&&f.updateWrapper(this)}function i(e){var t=this._currentElement.props,n=l.executeOnChange(t,e);c.asap(r,this);var i=t.name;if("radio"===t.type&&null!=i){for(var o=u.getNodeFromInstance(this),a=o;a.parentNode;)a=a.parentNode;for(var s=a.querySelectorAll("input[name="+JSON.stringify(""+i)+'][type="radio"]'),f=0;f<s.length;f++){var p=s[f];if(p!==o&&p.form===o.form){var h=u.getInstanceFromNode(p);h?void 0:d(!1),c.asap(r,h)}}}return n}var o=n(108),a=n(211),s=n(202),l=n(213),u=n(139),c=n(159),d=n(111),f=(n(114),{getNativeProps:function(e,t){var n=l.getValue(t),r=l.getChecked(t),i=o({type:void 0},a.getNativeProps(e,t),{defaultChecked:void 0,defaultValue:void 0,value:null!=n?n:e._wrapperState.initialValue,checked:null!=r?r:e._wrapperState.initialChecked,onChange:e._wrapperState.onChange});return i},mountWrapper:function(e,t){var n=t.defaultValue;e._wrapperState={initialChecked:t.defaultChecked||!1,initialValue:null!=n?n:null,listeners:null,onChange:i.bind(e)}},updateWrapper:function(e){var t=e._currentElement.props,n=t.checked;null!=n&&s.setValueForProperty(u.getNodeFromInstance(e),"checked",n||!1);var r=l.getValue(t);null!=r&&s.setValueForProperty(u.getNodeFromInstance(e),"value",""+r)}});e.exports=f},function(e,t,n){"use strict";function r(e){null!=e.checkedLink&&null!=e.valueLink?u(!1):void 0}function i(e){r(e),null!=e.value||null!=e.onChange?u(!1):void 0}function o(e){r(e),null!=e.checked||null!=e.onChange?u(!1):void 0}function a(e){if(e){var t=e.getName();if(t)return" Check the render method of `"+t+"`."}return""}var s=n(134),l=n(127),u=n(111),c=(n(114),{button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0}),d={value:function(e,t,n){return!e[t]||c[e.type]||e.onChange||e.readOnly||e.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(e,t,n){return!e[t]||e.onChange||e.readOnly||e.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},f={},p={checkPropTypes:function(e,t,n){for(var r in d){if(d.hasOwnProperty(r))var i=d[r](t,r,e,l.prop);if(i instanceof Error&&!(i.message in f)){f[i.message]=!0;a(n)}}},getValue:function(e){return e.valueLink?(i(e),e.valueLink.value):e.value},getChecked:function(e){return e.checkedLink?(o(e),e.checkedLink.value):e.checked},executeOnChange:function(e,t){return e.valueLink?(i(e),e.valueLink.requestChange(t.target.value)):e.checkedLink?(o(e),e.checkedLink.requestChange(t.target.checked)):e.onChange?e.onChange.call(void 0,t):void 0}};e.exports=p},function(e,t,n){"use strict";var r=n(108),i=n(109),o=n(139),a=n(215),s=(n(114),{mountWrapper:function(e,t,n){var r=null;if(null!=n){var i=n;"optgroup"===i._tag&&(i=i._nativeParent),null!=i&&"select"===i._tag&&(r=a.getSelectValueContext(i))}var o=null;if(null!=r)if(o=!1,Array.isArray(r)){for(var s=0;s<r.length;s++)if(""+r[s]==""+t.value){o=!0;break}}else o=""+r==""+t.value;e._wrapperState={selected:o}},postMountWrapper:function(e){var t=e._currentElement.props;if(null!=t.value){var n=o.getNodeFromInstance(e);n.setAttribute("value",t.value)}},getNativeProps:function(e,t){var n=r({selected:void 0,children:void 0},t);null!=e._wrapperState.selected&&(n.selected=e._wrapperState.selected);var o="";return i.forEach(t.children,function(e){null!=e&&("string"!=typeof e&&"number"!=typeof e||(o+=e))}),o&&(n.children=o),n}});e.exports=s},function(e,t,n){"use strict";function r(){if(this._rootNodeID&&this._wrapperState.pendingUpdate){this._wrapperState.pendingUpdate=!1;var e=this._currentElement.props,t=l.getValue(e);null!=t&&i(this,Boolean(e.multiple),t)}}function i(e,t,n){var r,i,o=u.getNodeFromInstance(e).options;if(t){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(e){var t=this._currentElement.props,n=l.executeOnChange(t,e);return this._rootNodeID&&(this._wrapperState.pendingUpdate=!0),c.asap(r,this),n}var a=n(108),s=n(211),l=n(213),u=n(139),c=n(159),d=(n(114),!1),f={getNativeProps:function(e,t){return a({},s.getNativeProps(e,t),{onChange:e._wrapperState.onChange,value:void 0})},mountWrapper:function(e,t){var n=l.getValue(t);e._wrapperState={pendingUpdate:!1,initialValue:null!=n?n:t.defaultValue,listeners:null,onChange:o.bind(e),wasMultiple:Boolean(t.multiple)},void 0===t.value||void 0===t.defaultValue||d||(d=!0)},getSelectValueContext:function(e){return e._wrapperState.initialValue},postUpdateWrapper:function(e){var t=e._currentElement.props;e._wrapperState.initialValue=void 0;var n=e._wrapperState.wasMultiple;e._wrapperState.wasMultiple=Boolean(t.multiple);var r=l.getValue(t);null!=r?(e._wrapperState.pendingUpdate=!1,i(e,Boolean(t.multiple),r)):n!==Boolean(t.multiple)&&(null!=t.defaultValue?i(e,Boolean(t.multiple),t.defaultValue):i(e,Boolean(t.multiple),t.multiple?[]:""))}};e.exports=f},function(e,t,n){"use strict";function r(){this._rootNodeID&&f.updateWrapper(this)}function i(e){var t=this._currentElement.props,n=l.executeOnChange(t,e);return c.asap(r,this),n}var o=n(108),a=n(211),s=n(202),l=n(213),u=n(139),c=n(159),d=n(111),f=(n(114),{getNativeProps:function(e,t){null!=t.dangerouslySetInnerHTML?d(!1):void 0;var n=o({},a.getNativeProps(e,t),{defaultValue:void 0,value:void 0,children:e._wrapperState.initialValue,onChange:e._wrapperState.onChange});return n},mountWrapper:function(e,t){var n=t.defaultValue,r=t.children;null!=r&&(null!=n?d(!1):void 0,Array.isArray(r)&&(r.length<=1?void 0:d(!1),r=r[0]),n=""+r),null==n&&(n="");var o=l.getValue(t);e._wrapperState={initialValue:""+(null!=o?o:n),listeners:null,onChange:i.bind(e)}},updateWrapper:function(e){var t=e._currentElement.props,n=l.getValue(t);null!=n&&s.setValueForProperty(u.getNodeFromInstance(e),"value",""+n)}});e.exports=f},function(e,t,n){"use strict";function r(e,t,n){return{type:d.INSERT_MARKUP,content:e,fromIndex:null,fromNode:null,toIndex:n,afterNode:t}}function i(e,t,n){return{type:d.MOVE_EXISTING,content:null,fromIndex:e._mountIndex,fromNode:f.getNativeNode(e),toIndex:n,afterNode:t}}function o(e,t){return{type:d.REMOVE_NODE,content:null,fromIndex:e._mountIndex,fromNode:t,toIndex:null,afterNode:null}}function a(e){return{type:d.SET_MARKUP,content:e,fromIndex:null,fromNode:null,toIndex:null,afterNode:null}}function s(e){return{type:d.TEXT_CONTENT,content:e,fromIndex:null,fromNode:null,toIndex:null,afterNode:null}}function l(e,t){return t&&(e=e||[],e.push(t)),e}function u(e,t){c.processChildrenUpdates(e,t)}var c=n(218),d=n(188),f=(n(113),n(163)),p=n(219),h=n(228),g=n(111),m={Mixin:{_reconcilerInstantiateChildren:function(e,t,n){return p.instantiateChildren(e,t,n)},_reconcilerUpdateChildren:function(e,t,n,r,i){var o;return o=h(t),p.updateChildren(e,o,n,r,i),o},mountChildren:function(e,t,n){var r=this._reconcilerInstantiateChildren(e,t,n);this._renderedChildren=r;var i=[],o=0;for(var a in r)if(r.hasOwnProperty(a)){var s=r[a],l=f.mountComponent(s,t,this,this._nativeContainerInfo,n);s._mountIndex=o++,i.push(l)}return i},updateTextContent:function(e){var t=this._renderedChildren;p.unmountChildren(t,!1);for(var n in t)t.hasOwnProperty(n)&&g(!1);var r=[s(e)];u(this,r)},updateMarkup:function(e){var t=this._renderedChildren;p.unmountChildren(t,!1);for(var n in t)t.hasOwnProperty(n)&&g(!1);var r=[a(e)];u(this,r)},updateChildren:function(e,t,n){this._updateChildren(e,t,n)},_updateChildren:function(e,t,n){var r=this._renderedChildren,i={},o=this._reconcilerUpdateChildren(r,e,i,t,n);if(o||r){var a,s=null,c=0,d=0,p=null;for(a in o)if(o.hasOwnProperty(a)){var h=r&&r[a],g=o[a];h===g?(s=l(s,this.moveChild(h,p,d,c)),c=Math.max(h._mountIndex,c),h._mountIndex=d):(h&&(c=Math.max(h._mountIndex,c)),s=l(s,this._mountChildAtIndex(g,p,d,t,n))),d++,p=f.getNativeNode(g)}for(a in i)i.hasOwnProperty(a)&&(s=l(s,this._unmountChild(r[a],i[a])));s&&u(this,s),this._renderedChildren=o}},unmountChildren:function(e){var t=this._renderedChildren;p.unmountChildren(t,e),this._renderedChildren=null},moveChild:function(e,t,n,r){if(e._mountIndex<r)return i(e,t,n)},createChild:function(e,t,n){return r(n,t,e._mountIndex)},removeChild:function(e,t){return o(e,t)},_mountChildAtIndex:function(e,t,n,r,i){var o=f.mountComponent(e,r,this,this._nativeContainerInfo,i);return e._mountIndex=n,this.createChild(e,t,o)},_unmountChild:function(e,t){var n=this.removeChild(e,t);return e._mountIndex=null,n}}};e.exports=m},function(e,t,n){"use strict";var r=n(111),i=!1,o={unmountIDFromEnvironment:null,replaceNodeWithMarkup:null,processChildrenUpdates:null,injection:{injectEnvironment:function(e){i?r(!1):void 0,o.unmountIDFromEnvironment=e.unmountIDFromEnvironment,o.replaceNodeWithMarkup=e.replaceNodeWithMarkup,o.processChildrenUpdates=e.processChildrenUpdates,i=!0}}};e.exports=o},function(e,t,n){"use strict";function r(e,t,n){var r=void 0===e[n];null!=t&&r&&(e[n]=o(t))}var i=n(163),o=n(220),a=(n(119),n(225)),s=n(117),l=(n(114),{instantiateChildren:function(e,t,n){if(null==e)return null;var i={};return s(e,r,i),i},updateChildren:function(e,t,n,r,s){if(t||e){var l,u;for(l in t)if(t.hasOwnProperty(l)){u=e&&e[l];var c=u&&u._currentElement,d=t[l];if(null!=u&&a(c,d))i.receiveComponent(u,d,r,s),t[l]=u;else{u&&(n[l]=i.getNativeNode(u),i.unmountComponent(u,!1));var f=o(d);t[l]=f}}for(l in e)!e.hasOwnProperty(l)||t&&t.hasOwnProperty(l)||(u=e[l],n[l]=i.getNativeNode(u),i.unmountComponent(u,!1))}},unmountChildren:function(e,t){for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];i.unmountComponent(r,t)}}});e.exports=l},function(e,t,n){"use strict";function r(e){return"function"==typeof e&&"undefined"!=typeof e.prototype&&"function"==typeof e.prototype.mountComponent&&"function"==typeof e.prototype.receiveComponent}function i(e){var t;if(null===e||e===!1)t=s.create(i);else if("object"==typeof e){var n=e;!n||"function"!=typeof n.type&&"string"!=typeof n.type?u(!1):void 0,t="string"==typeof n.type?l.createInternalComponent(n):r(n.type)?new n.type(n):new c(n)}else"string"==typeof e||"number"==typeof e?t=l.createInstanceForText(e):u(!1);return t._mountIndex=0,t._mountImage=null,t}var o=n(108),a=n(221),s=n(226),l=n(227),u=n(111),c=(n(114),function(e){this.construct(e)});o(c.prototype,a.Mixin,{_instantiateReactComponent:i}),e.exports=i},function(e,t,n){"use strict";function r(e){var t=e._currentElement._owner||null;if(t){var n=t.getName();if(n)return" Check the render method of `"+n+"`."}return""}function i(e){}function o(e,t){}function a(e){return e.prototype&&e.prototype.isReactComponent}var s=n(108),l=n(218),u=n(113),c=n(112),d=n(149),f=n(222),p=(n(122),n(223)),h=n(162),g=n(127),m=(n(129),n(163)),v=n(224),b=n(125),y=n(111),w=n(225);n(114);i.prototype.render=function(){var e=f.get(this)._currentElement.type,t=e(this.props,this.context,this.updater);return o(e,t),t};var x=1,_={construct:function(e){this._currentElement=e,this._rootNodeID=null,this._instance=null,this._nativeParent=null,this._nativeContainerInfo=null,this._pendingElement=null,this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1,this._renderedNodeType=null,this._renderedComponent=null,this._context=null,this._mountOrder=0,this._topLevelWrapper=null,this._pendingCallbacks=null,this._calledComponentWillUnmount=!1},mountComponent:function(e,t,n,r){this._context=r,this._mountOrder=x++,this._nativeParent=t,this._nativeContainerInfo=n;var s,l=this._processProps(this._currentElement.props),u=this._processContext(r),d=this._currentElement.type,p=this._constructComponent(l,u);a(d)||null!=p&&null!=p.render||(s=p,o(d,s),null===p||p===!1||c.isValidElement(p)?void 0:y(!1),p=new i(d));p.props=l,p.context=u,p.refs=b,p.updater=v,this._instance=p,f.set(p,this);var h=p.state;void 0===h&&(p.state=h=null),"object"!=typeof h||Array.isArray(h)?y(!1):void 0,this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1;var g;return g=p.unstable_handleError?this.performInitialMountWithErrorHandling(s,t,n,e,r):this.performInitialMount(s,t,n,e,r),p.componentDidMount&&e.getReactMountReady().enqueue(p.componentDidMount,p),g},_constructComponent:function(e,t){return this._constructComponentWithoutOwner(e,t)},_constructComponentWithoutOwner:function(e,t){var n=this._currentElement.type;return a(n)?new n(e,t,v):n(e,t,v)},performInitialMountWithErrorHandling:function(e,t,n,r,i){var o,a=r.checkpoint();try{o=this.performInitialMount(e,t,n,r,i)}catch(s){r.rollback(a),this._instance.unstable_handleError(s),this._pendingStateQueue&&(this._instance.state=this._processPendingState(this._instance.props,this._instance.context)),a=r.checkpoint(),this._renderedComponent.unmountComponent(!0),r.rollback(a),o=this.performInitialMount(e,t,n,r,i)}return o},performInitialMount:function(e,t,n,r,i){var o=this._instance;o.componentWillMount&&(o.componentWillMount(),this._pendingStateQueue&&(o.state=this._processPendingState(o.props,o.context))),void 0===e&&(e=this._renderValidatedComponent()),this._renderedNodeType=p.getType(e),this._renderedComponent=this._instantiateReactComponent(e);var a=m.mountComponent(this._renderedComponent,r,t,n,this._processChildContext(i));return a},getNativeNode:function(){return m.getNativeNode(this._renderedComponent)},unmountComponent:function(e){if(this._renderedComponent){var t=this._instance;if(t.componentWillUnmount&&!t._calledComponentWillUnmount)if(t._calledComponentWillUnmount=!0,e){var n=this.getName()+".componentWillUnmount()";d.invokeGuardedCallback(n,t.componentWillUnmount.bind(t))}else t.componentWillUnmount();this._renderedComponent&&(m.unmountComponent(this._renderedComponent,e),this._renderedNodeType=null,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,f.remove(t)}},_maskContext:function(e){var t=this._currentElement.type,n=t.contextTypes;if(!n)return b;var r={};for(var i in n)r[i]=e[i];return r},_processContext:function(e){var t=this._maskContext(e);return t},_processChildContext:function(e){var t=this._currentElement.type,n=this._instance,r=n.getChildContext&&n.getChildContext();if(r){"object"!=typeof t.childContextTypes?y(!1):void 0;for(var i in r)i in t.childContextTypes?void 0:y(!1);return s({},e,r)}return e},_processProps:function(e){return e},_checkPropTypes:function(e,t,n){var i=this.getName();for(var o in e)if(e.hasOwnProperty(o)){var a;try{"function"!=typeof e[o]?y(!1):void 0,a=e[o](t,o,i,n)}catch(s){a=s}if(a instanceof Error){r(this);n===g.prop}}},receiveComponent:function(e,t,n){var r=this._currentElement,i=this._context;this._pendingElement=null,this.updateComponent(t,r,e,i,n)},performUpdateIfNecessary:function(e){null!=this._pendingElement&&m.receiveComponent(this,this._pendingElement,e,this._context),(null!==this._pendingStateQueue||this._pendingForceUpdate)&&this.updateComponent(e,this._currentElement,this._currentElement,this._context,this._context)},updateComponent:function(e,t,n,r,i){var o,a,s=this._instance,l=!1;this._context===i?o=s.context:(o=this._processContext(i),l=!0),t===n?a=n.props:(a=this._processProps(n.props),l=!0),l&&s.componentWillReceiveProps&&s.componentWillReceiveProps(a,o);var u=this._processPendingState(a,o),c=this._pendingForceUpdate||!s.shouldComponentUpdate||s.shouldComponentUpdate(a,u,o);c?(this._pendingForceUpdate=!1,this._performComponentUpdate(n,a,u,o,e,i)):(this._currentElement=n,this._context=i,s.props=a,s.state=u,s.context=o)},_processPendingState:function(e,t){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=s({},i?r[0]:n.state),a=i?1:0;a<r.length;a++){var l=r[a];s(o,"function"==typeof l?l.call(n,o,e,t):l)}return o},_performComponentUpdate:function(e,t,n,r,i,o){var a,s,l,u=this._instance,c=Boolean(u.componentDidUpdate);c&&(a=u.props,s=u.state,l=u.context),u.componentWillUpdate&&u.componentWillUpdate(t,n,r),this._currentElement=e,this._context=o,u.props=t,u.state=n,u.context=r,this._updateRenderedComponent(i,o),c&&i.getReactMountReady().enqueue(u.componentDidUpdate.bind(u,a,s,l),u)},_updateRenderedComponent:function(e,t){var n=this._renderedComponent,r=n._currentElement,i=this._renderValidatedComponent();if(w(r,i))m.receiveComponent(n,i,e,this._processChildContext(t));else{var o=m.getNativeNode(n);m.unmountComponent(n,!1),this._renderedNodeType=p.getType(i),this._renderedComponent=this._instantiateReactComponent(i);var a=m.mountComponent(this._renderedComponent,e,this._nativeParent,this._nativeContainerInfo,this._processChildContext(t));this._replaceNodeWithMarkup(o,a)}},_replaceNodeWithMarkup:function(e,t){l.replaceNodeWithMarkup(e,t)},_renderValidatedComponentWithoutOwnerOrContext:function(){var e=this._instance,t=e.render();return t},_renderValidatedComponent:function(){var e;u.current=this;try{e=this._renderValidatedComponentWithoutOwnerOrContext()}finally{u.current=null}return null===e||e===!1||c.isValidElement(e)?void 0:y(!1),e},attachRef:function(e,t){var n=this.getPublicInstance();null==n?y(!1):void 0;var r=t.getPublicInstance(),i=n.refs===b?n.refs={}:n.refs;i[e]=r},detachRef:function(e){var t=this.getPublicInstance().refs;delete t[e]},getName:function(){var e=this._currentElement.type,t=this._instance&&this._instance.constructor;return e.displayName||t&&t.displayName||e.name||t&&t.name||null},getPublicInstance:function(){var e=this._instance;return e instanceof i?null:e},_instantiateReactComponent:null};h.measureMethods(_,"ReactCompositeComponent",{mountComponent:"mountComponent",updateComponent:"updateComponent",_renderValidatedComponent:"_renderValidatedComponent"});var E={Mixin:_};e.exports=E},function(e,t){"use strict";var n={remove:function(e){e._reactInternalInstance=void 0},get:function(e){return e._reactInternalInstance},has:function(e){return void 0!==e._reactInternalInstance},set:function(e,t){e._reactInternalInstance=t}};e.exports=n},function(e,t,n){"use strict";var r=n(112),i=n(111),o={NATIVE:0,COMPOSITE:1,EMPTY:2,getType:function(e){return null===e||e===!1?o.EMPTY:r.isValidElement(e)?"function"==typeof e.type?o.COMPOSITE:o.NATIVE:void i(!1)}};e.exports=o},function(e,t,n){"use strict";function r(e){a.enqueueUpdate(e)}function i(e,t){var n=o.get(e);return n?n:null}var o=(n(113),n(222)),a=n(159),s=n(111),l=(n(114),{isMounted:function(e){var t=o.get(e);return!!t&&!!t._renderedComponent},enqueueCallback:function(e,t,n){l.validateCallback(t,n);var o=i(e);return o?(o._pendingCallbacks?o._pendingCallbacks.push(t):o._pendingCallbacks=[t],void r(o)):null},enqueueCallbackInternal:function(e,t){e._pendingCallbacks?e._pendingCallbacks.push(t):e._pendingCallbacks=[t],r(e)},enqueueForceUpdate:function(e){var t=i(e,"forceUpdate");t&&(t._pendingForceUpdate=!0,r(t))},enqueueReplaceState:function(e,t){var n=i(e,"replaceState");n&&(n._pendingStateQueue=[t],n._pendingReplaceState=!0,r(n))},enqueueSetState:function(e,t){var n=i(e,"setState");if(n){var o=n._pendingStateQueue||(n._pendingStateQueue=[]);o.push(t),r(n)}},enqueueElementInternal:function(e,t){e._pendingElement=t,r(e)},validateCallback:function(e,t){e&&"function"!=typeof e?s(!1):void 0}});e.exports=l},function(e,t){"use strict";function n(e,t){var n=null===e||e===!1,r=null===t||t===!1;if(n||r)return n===r;var i=typeof e,o=typeof t;return"string"===i||"number"===i?"string"===o||"number"===o:"object"===o&&e.type===t.type&&e.key===t.key}e.exports=n},function(e,t){"use strict";var n,r={injectEmptyComponentFactory:function(e){n=e}},i={create:function(e){return n(e)}};i.injection=r,e.exports=i},function(e,t,n){"use strict";function r(e){if("function"==typeof e.type)return e.type;var t=e.type,n=d[t];return null==n&&(d[t]=n=u(t)),n}function i(e){return c?void 0:l(!1),new c(e)}function o(e){return new f(e)}function a(e){return e instanceof f}var s=n(108),l=n(111),u=null,c=null,d={},f=null,p={injectGenericComponentClass:function(e){c=e},injectTextComponentClass:function(e){f=e},injectComponentClasses:function(e){s(d,e)}},h={getComponentClassForElement:r,createInternalComponent:i,createInstanceForText:o,isTextComponent:a,injection:p};e.exports=h},function(e,t,n){"use strict";function r(e,t,n){var r=e,i=void 0===r[n];i&&null!=t&&(r[n]=t)}function i(e){if(null==e)return e;var t={};return o(e,r,t),t}var o=(n(119),n(117));n(114);e.exports=i},function(e,t){"use strict";function n(e,t){return e===t?0!==e||1/e===1/t:e!==e&&t!==t}function r(e,t){if(n(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var r=Object.keys(e),o=Object.keys(t);if(r.length!==o.length)return!1;for(var a=0;a<r.length;a++)if(!i.call(t,r[a])||!n(e[r[a]],t[r[a]]))return!1;return!0}var i=Object.prototype.hasOwnProperty;e.exports=r},function(e,t,n){"use strict";var r=(n(108),n(115)),i=(n(114),r);e.exports=i},function(e,t,n){"use strict";var r=n(108),i=n(179),o=n(139),a=function(e){this._currentElement=null,this._nativeNode=null,this._nativeParent=null,this._nativeContainerInfo=null,this._domID=null};r(a.prototype,{mountComponent:function(e,t,n,r){var a=n._idCounter++;this._domID=a,this._nativeParent=t,this._nativeContainerInfo=n;var s=" react-empty: "+this._domID+" ";if(e.useCreateElement){var l=n._ownerDocument,u=l.createComment(s);return o.precacheNode(this,u),i(u)}return e.renderToStaticMarkup?"":"<!--"+s+"-->"},receiveComponent:function(){},getNativeNode:function(){return o.getNodeFromInstance(this)},unmountComponent:function(){o.uncacheNode(this)}}),e.exports=a},function(e,t,n){"use strict";function r(e,t){"_nativeNode"in e?void 0:l(!1),"_nativeNode"in t?void 0:l(!1);for(var n=0,r=e;r;r=r._nativeParent)n++;for(var i=0,o=t;o;o=o._nativeParent)i++;for(;n-i>0;)e=e._nativeParent,n--;for(;i-n>0;)t=t._nativeParent,i--;for(var a=n;a--;){if(e===t)return e;e=e._nativeParent,t=t._nativeParent}return null}function i(e,t){"_nativeNode"in e?void 0:l(!1),"_nativeNode"in t?void 0:l(!1);for(;t;){if(t===e)return!0;t=t._nativeParent}return!1}function o(e){return"_nativeNode"in e?void 0:l(!1),e._nativeParent}function a(e,t,n){for(var r=[];e;)r.push(e),e=e._nativeParent;var i;for(i=r.length;i-- >0;)t(r[i],!1,n);for(i=0;i<r.length;i++)t(r[i],!0,n)}function s(e,t,n,i,o){for(var a=e&&t?r(e,t):null,s=[];e&&e!==a;)s.push(e),e=e._nativeParent;for(var l=[];t&&t!==a;)l.push(t),t=t._nativeParent;var u;for(u=0;u<s.length;u++)n(s[u],!0,i);for(u=l.length;u-- >0;)n(l[u],!1,o)}var l=n(111);e.exports={isAncestor:i,getLowestCommonAncestor:r,getParentInstance:o,traverseTwoPhase:a,traverseEnterLeave:s}},function(e,t,n){"use strict";var r=n(108),i=n(178),o=n(179),a=n(139),s=n(162),l=n(182),u=n(111),c=(n(230),function(e){this._currentElement=e,this._stringText=""+e,this._nativeNode=null,this._nativeParent=null,this._domID=null,this._mountIndex=0,this._closingComment=null,this._commentNodes=null});r(c.prototype,{mountComponent:function(e,t,n,r){var i=n._idCounter++,s=" react-text: "+i+" ",u=" /react-text ";if(this._domID=i,this._nativeParent=t,e.useCreateElement){var c=n._ownerDocument,d=c.createComment(s),f=c.createComment(u),p=o(c.createDocumentFragment());return o.queueChild(p,o(d)),this._stringText&&o.queueChild(p,o(c.createTextNode(this._stringText))),o.queueChild(p,o(f)),a.precacheNode(this,d),this._closingComment=f,p}var h=l(this._stringText);return e.renderToStaticMarkup?h:"<!--"+s+"-->"+h+"<!--"+u+"-->"},receiveComponent:function(e,t){if(e!==this._currentElement){this._currentElement=e;var n=""+e;if(n!==this._stringText){this._stringText=n;var r=this.getNativeNode();i.replaceDelimitedText(r[0],r[1],n)}}},getNativeNode:function(){var e=this._commentNodes;if(e)return e;if(!this._closingComment)for(var t=a.getNodeFromInstance(this),n=t.nextSibling;;){if(null==n?u(!1):void 0,8===n.nodeType&&" /react-text "===n.nodeValue){this._closingComment=n;break}n=n.nextSibling}return e=[this._nativeNode,this._closingComment],this._commentNodes=e,e},unmountComponent:function(){this._closingComment=null,this._commentNodes=null,a.uncacheNode(this)}}),s.measureMethods(c.prototype,"ReactDOMTextComponent",{mountComponent:"mountComponent",receiveComponent:"receiveComponent"}),e.exports=c},function(e,t,n){"use strict";function r(){this.reinitializeTransaction()}var i=n(108),o=n(159),a=n(166),s=n(115),l={initialize:s,close:function(){f.isBatchingUpdates=!1}},u={initialize:s,close:o.flushBatchedUpdates.bind(o)},c=[u,l];i(r.prototype,a.Mixin,{getTransactionWrappers:function(){return c}});var d=new r,f={isBatchingUpdates:!1,batchedUpdates:function(e,t,n,r,i,o){var a=f.isBatchingUpdates;f.isBatchingUpdates=!0,a?e(t,n,r,i,o):d.perform(e,null,t,n,r,i,o)}};e.exports=f},function(e,t,n){"use strict";function r(e){for(;e._nativeParent;)e=e._nativeParent;var t=d.getNodeFromInstance(e),n=t.parentNode;return d.getClosestInstanceFromNode(n)}function i(e,t){this.topLevelType=e,this.nativeEvent=t,this.ancestors=[]}function o(e){var t=p(e.nativeEvent),n=d.getClosestInstanceFromNode(t),i=n;do e.ancestors.push(i),i=i&&r(i);while(i);for(var o=0;o<e.ancestors.length;o++)n=e.ancestors[o],g._handleTopLevel(e.topLevelType,n,e.nativeEvent,p(e.nativeEvent))}function a(e){var t=h(window);e(t)}var s=n(108),l=n(236),u=n(152),c=n(110),d=n(139),f=n(159),p=n(167),h=n(237);s(i.prototype,{destructor:function(){this.topLevelType=null,this.nativeEvent=null,this.ancestors.length=0}}),c.addPoolingTo(i,c.twoArgumentPooler);var g={_enabled:!0,_handleTopLevel:null,WINDOW_HANDLE:u.canUseDOM?window:null,setHandleTopLevel:function(e){g._handleTopLevel=e},setEnabled:function(e){g._enabled=!!e},isEnabled:function(){return g._enabled},trapBubbledEvent:function(e,t,n){var r=n;return r?l.listen(r,t,g.dispatchEvent.bind(null,e)):null},trapCapturedEvent:function(e,t,n){var r=n;return r?l.capture(r,t,g.dispatchEvent.bind(null,e)):null},monitorScrollValue:function(e){var t=a.bind(null,e);l.listen(window,"scroll",t)},dispatchEvent:function(e,t){if(g._enabled){var n=i.getPooled(e,t);try{f.batchedUpdates(o,n)}finally{i.release(n)}}}};e.exports=g},function(e,t,n){"use strict";var r=n(115),i={listen:function(e,t,n){return e.addEventListener?(e.addEventListener(t,n,!1),{remove:function(){e.removeEventListener(t,n,!1)}}):e.attachEvent?(e.attachEvent("on"+t,n),{remove:function(){e.detachEvent("on"+t,n)}}):void 0},capture:function(e,t,n){return e.addEventListener?(e.addEventListener(t,n,!0),{remove:function(){e.removeEventListener(t,n,!0)}}):{remove:r}},registerDefault:function(){}};e.exports=i},function(e,t){"use strict";function n(e){return e===window?{x:window.pageXOffset||document.documentElement.scrollLeft,y:window.pageYOffset||document.documentElement.scrollTop}:{x:e.scrollLeft,y:e.scrollTop}}e.exports=n},function(e,t,n){"use strict";var r=n(140),i=n(146),o=n(148),a=n(218),s=n(126),l=n(226),u=n(207),c=n(227),d=n(162),f=n(159),p={Component:a.injection,Class:s.injection,DOMProperty:r.injection,EmptyComponent:l.injection,EventPluginHub:i.injection,EventPluginUtils:o.injection,EventEmitter:u.injection,NativeComponent:c.injection,Perf:d.injection,Updates:f.injection};e.exports=p},function(e,t,n){"use strict";function r(e){this.reinitializeTransaction(),this.renderToStaticMarkup=!1,this.reactMountReady=o.getPooled(null),this.useCreateElement=e}var i=n(108),o=n(160),a=n(110),s=n(207),l=n(240),u=n(166),c={initialize:l.getSelectionInformation,close:l.restoreSelection},d={initialize:function(){var e=s.isEnabled();return s.setEnabled(!1),e},close:function(e){s.setEnabled(e)}},f={initialize:function(){this.reactMountReady.reset()},close:function(){this.reactMountReady.notifyAll()}},p=[c,d,f],h={getTransactionWrappers:function(){return p},getReactMountReady:function(){return this.reactMountReady},checkpoint:function(){return this.reactMountReady.checkpoint()},rollback:function(e){this.reactMountReady.rollback(e)},destructor:function(){o.release(this.reactMountReady),this.reactMountReady=null}};i(r.prototype,u.Mixin,h),a.addPoolingTo(r),e.exports=r},function(e,t,n){"use strict";function r(e){return o(document.documentElement,e)}var i=n(241),o=n(243),a=n(192),s=n(246),l={hasSelectionCapabilities:function(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&"text"===e.type||"textarea"===t||"true"===e.contentEditable)},getSelectionInformation:function(){var e=s();return{focusedElem:e,selectionRange:l.hasSelectionCapabilities(e)?l.getSelection(e):null}},restoreSelection:function(e){var t=s(),n=e.focusedElem,i=e.selectionRange;t!==n&&r(n)&&(l.hasSelectionCapabilities(n)&&l.setSelection(n,i),a(n))},getSelection:function(e){var t;if("selectionStart"in e)t={start:e.selectionStart,end:e.selectionEnd};else if(document.selection&&e.nodeName&&"input"===e.nodeName.toLowerCase()){var n=document.selection.createRange();n.parentElement()===e&&(t={start:-n.moveStart("character",-e.value.length),end:-n.moveEnd("character",-e.value.length)})}else t=i.getOffsets(e);return t||{start:0,end:0}},setSelection:function(e,t){var n=t.start,r=t.end;if(void 0===r&&(r=n),"selectionStart"in e)e.selectionStart=n,e.selectionEnd=Math.min(r,e.value.length);else if(document.selection&&e.nodeName&&"input"===e.nodeName.toLowerCase()){var o=e.createTextRange();o.collapse(!0),o.moveStart("character",n),o.moveEnd("character",r-n),o.select()}else i.setOffsets(e,t)}};e.exports=l},function(e,t,n){"use strict";function r(e,t,n,r){return e===n&&t===r}function i(e){var t=document.selection,n=t.createRange(),r=n.text.length,i=n.duplicate();i.moveToElementText(e),i.setEndPoint("EndToStart",n);var o=i.text.length,a=o+r;return{start:o,end:a}}function o(e){var t=window.getSelection&&window.getSelection();if(!t||0===t.rangeCount)return null;var n=t.anchorNode,i=t.anchorOffset,o=t.focusNode,a=t.focusOffset,s=t.getRangeAt(0);try{s.startContainer.nodeType,s.endContainer.nodeType}catch(l){return null}var u=r(t.anchorNode,t.anchorOffset,t.focusNode,t.focusOffset),c=u?0:s.toString().length,d=s.cloneRange();d.selectNodeContents(e),d.setEnd(s.startContainer,s.startOffset);var f=r(d.startContainer,d.startOffset,d.endContainer,d.endOffset),p=f?0:d.toString().length,h=p+c,g=document.createRange();g.setStart(n,i),g.setEnd(o,a);var m=g.collapsed;return{start:m?h:p,end:m?p:h}}function a(e,t){var n,r,i=document.selection.createRange().duplicate();
void 0===t.end?(n=t.start,r=n):t.start>t.end?(n=t.end,r=t.start):(n=t.start,r=t.end),i.moveToElementText(e),i.moveStart("character",n),i.setEndPoint("EndToStart",i),i.moveEnd("character",r-n),i.select()}function s(e,t){if(window.getSelection){var n=window.getSelection(),r=e[c()].length,i=Math.min(t.start,r),o=void 0===t.end?i:Math.min(t.end,r);if(!n.extend&&i>o){var a=o;o=i,i=a}var s=u(e,i),l=u(e,o);if(s&&l){var d=document.createRange();d.setStart(s.node,s.offset),n.removeAllRanges(),i>o?(n.addRange(d),n.extend(l.node,l.offset)):(d.setEnd(l.node,l.offset),n.addRange(d))}}}var l=n(152),u=n(242),c=n(154),d=l.canUseDOM&&"selection"in document&&!("getSelection"in window),f={getOffsets:d?i:o,setOffsets:d?a:s};e.exports=f},function(e,t){"use strict";function n(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function r(e){for(;e;){if(e.nextSibling)return e.nextSibling;e=e.parentNode}}function i(e,t){for(var i=n(e),o=0,a=0;i;){if(3===i.nodeType){if(a=o+i.textContent.length,o<=t&&a>=t)return{node:i,offset:t-o};o=a}i=n(r(i))}}e.exports=i},function(e,t,n){"use strict";function r(e,t){return!(!e||!t)&&(e===t||!i(e)&&(i(t)?r(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}var i=n(244);e.exports=r},function(e,t,n){"use strict";function r(e){return i(e)&&3==e.nodeType}var i=n(245);e.exports=r},function(e,t){"use strict";function n(e){return!(!e||!("function"==typeof Node?e instanceof Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName))}e.exports=n},function(e,t){"use strict";function n(){if("undefined"==typeof document)return null;try{return document.activeElement||document.body}catch(e){return document.body}}e.exports=n},function(e,t){"use strict";var n={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},r={accentHeight:"accent-height",accumulate:0,additive:0,alignmentBaseline:"alignment-baseline",allowReorder:"allowReorder",alphabetic:0,amplitude:0,arabicForm:"arabic-form",ascent:0,attributeName:"attributeName",attributeType:"attributeType",autoReverse:"autoReverse",azimuth:0,baseFrequency:"baseFrequency",baseProfile:"baseProfile",baselineShift:"baseline-shift",bbox:0,begin:0,bias:0,by:0,calcMode:"calcMode",capHeight:"cap-height",clip:0,clipPath:"clip-path",clipRule:"clip-rule",clipPathUnits:"clipPathUnits",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",contentScriptType:"contentScriptType",contentStyleType:"contentStyleType",cursor:0,cx:0,cy:0,d:0,decelerate:0,descent:0,diffuseConstant:"diffuseConstant",direction:0,display:0,divisor:0,dominantBaseline:"dominant-baseline",dur:0,dx:0,dy:0,edgeMode:"edgeMode",elevation:0,enableBackground:"enable-background",end:0,exponent:0,externalResourcesRequired:"externalResourcesRequired",fill:0,fillOpacity:"fill-opacity",fillRule:"fill-rule",filter:0,filterRes:"filterRes",filterUnits:"filterUnits",floodColor:"flood-color",floodOpacity:"flood-opacity",focusable:0,fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",glyphRef:"glyphRef",gradientTransform:"gradientTransform",gradientUnits:"gradientUnits",hanging:0,horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",ideographic:0,imageRendering:"image-rendering","in":0,in2:0,intercept:0,k:0,k1:0,k2:0,k3:0,k4:0,kernelMatrix:"kernelMatrix",kernelUnitLength:"kernelUnitLength",kerning:0,keyPoints:"keyPoints",keySplines:"keySplines",keyTimes:"keyTimes",lengthAdjust:"lengthAdjust",letterSpacing:"letter-spacing",lightingColor:"lighting-color",limitingConeAngle:"limitingConeAngle",local:0,markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",markerHeight:"markerHeight",markerUnits:"markerUnits",markerWidth:"markerWidth",mask:0,maskContentUnits:"maskContentUnits",maskUnits:"maskUnits",mathematical:0,mode:0,numOctaves:"numOctaves",offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pathLength:"pathLength",patternContentUnits:"patternContentUnits",patternTransform:"patternTransform",patternUnits:"patternUnits",pointerEvents:"pointer-events",points:0,pointsAtX:"pointsAtX",pointsAtY:"pointsAtY",pointsAtZ:"pointsAtZ",preserveAlpha:"preserveAlpha",preserveAspectRatio:"preserveAspectRatio",primitiveUnits:"primitiveUnits",r:0,radius:0,refX:"refX",refY:"refY",renderingIntent:"rendering-intent",repeatCount:"repeatCount",repeatDur:"repeatDur",requiredExtensions:"requiredExtensions",requiredFeatures:"requiredFeatures",restart:0,result:0,rotate:0,rx:0,ry:0,scale:0,seed:0,shapeRendering:"shape-rendering",slope:0,spacing:0,specularConstant:"specularConstant",specularExponent:"specularExponent",speed:0,spreadMethod:"spreadMethod",startOffset:"startOffset",stdDeviation:"stdDeviation",stemh:0,stemv:0,stitchTiles:"stitchTiles",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",string:0,stroke:0,strokeDasharray:"stroke-dasharray",strokeDashoffset:"stroke-dashoffset",strokeLinecap:"stroke-linecap",strokeLinejoin:"stroke-linejoin",strokeMiterlimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",surfaceScale:"surfaceScale",systemLanguage:"systemLanguage",tableValues:"tableValues",targetX:"targetX",targetY:"targetY",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",textLength:"textLength",to:0,transform:0,u1:0,u2:0,underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicode:0,unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",values:0,vectorEffect:"vector-effect",version:0,vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",viewBox:"viewBox",viewTarget:"viewTarget",visibility:0,widths:0,wordSpacing:"word-spacing",writingMode:"writing-mode",x:0,xHeight:"x-height",x1:0,x2:0,xChannelSelector:"xChannelSelector",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",y:0,y1:0,y2:0,yChannelSelector:"yChannelSelector",z:0,zoomAndPan:"zoomAndPan"},i={Properties:{},DOMAttributeNamespaces:{xlinkActuate:n.xlink,xlinkArcrole:n.xlink,xlinkHref:n.xlink,xlinkRole:n.xlink,xlinkShow:n.xlink,xlinkTitle:n.xlink,xlinkType:n.xlink,xmlBase:n.xml,xmlLang:n.xml,xmlSpace:n.xml},DOMAttributeNames:{}};Object.keys(r).forEach(function(e){i.Properties[e]=0,r[e]&&(i.DOMAttributeNames[e]=r[e])}),e.exports=i},function(e,t,n){"use strict";function r(e){if("selectionStart"in e&&u.hasSelectionCapabilities(e))return{start:e.selectionStart,end:e.selectionEnd};if(window.getSelection){var t=window.getSelection();return{anchorNode:t.anchorNode,anchorOffset:t.anchorOffset,focusNode:t.focusNode,focusOffset:t.focusOffset}}if(document.selection){var n=document.selection.createRange();return{parentElement:n.parentElement(),text:n.text,top:n.boundingTop,left:n.boundingLeft}}}function i(e,t){if(x||null==b||b!==d())return null;var n=r(b);if(!w||!h(w,n)){w=n;var i=c.getPooled(v.select,y,e,t);return i.type="select",i.target=b,a.accumulateTwoPhaseDispatches(i),i}return null}var o=n(144),a=n(145),s=n(152),l=n(139),u=n(240),c=n(156),d=n(246),f=n(169),p=n(130),h=n(229),g=o.topLevelTypes,m=s.canUseDOM&&"documentMode"in document&&document.documentMode<=11,v={select:{phasedRegistrationNames:{bubbled:p({onSelect:null}),captured:p({onSelectCapture:null})},dependencies:[g.topBlur,g.topContextMenu,g.topFocus,g.topKeyDown,g.topMouseDown,g.topMouseUp,g.topSelectionChange]}},b=null,y=null,w=null,x=!1,_=!1,E=p({onSelect:null}),C={eventTypes:v,extractEvents:function(e,t,n,r){if(!_)return null;var o=t?l.getNodeFromInstance(t):window;switch(e){case g.topFocus:(f(o)||"true"===o.contentEditable)&&(b=o,y=t,w=null);break;case g.topBlur:b=null,y=null,w=null;break;case g.topMouseDown:x=!0;break;case g.topContextMenu:case g.topMouseUp:return x=!1,i(n,r);case g.topSelectionChange:if(m)break;case g.topKeyDown:case g.topKeyUp:return i(n,r)}return null},didPutListener:function(e,t,n){t===E&&(_=!0)}};e.exports=C},function(e,t,n){"use strict";var r=n(144),i=n(236),o=n(145),a=n(139),s=n(250),l=n(251),u=n(156),c=n(252),d=n(253),f=n(172),p=n(256),h=n(257),g=n(258),m=n(173),v=n(259),b=n(115),y=n(254),w=n(111),x=n(130),_=r.topLevelTypes,E={abort:{phasedRegistrationNames:{bubbled:x({onAbort:!0}),captured:x({onAbortCapture:!0})}},animationEnd:{phasedRegistrationNames:{bubbled:x({onAnimationEnd:!0}),captured:x({onAnimationEndCapture:!0})}},animationIteration:{phasedRegistrationNames:{bubbled:x({onAnimationIteration:!0}),captured:x({onAnimationIterationCapture:!0})}},animationStart:{phasedRegistrationNames:{bubbled:x({onAnimationStart:!0}),captured:x({onAnimationStartCapture:!0})}},blur:{phasedRegistrationNames:{bubbled:x({onBlur:!0}),captured:x({onBlurCapture:!0})}},canPlay:{phasedRegistrationNames:{bubbled:x({onCanPlay:!0}),captured:x({onCanPlayCapture:!0})}},canPlayThrough:{phasedRegistrationNames:{bubbled:x({onCanPlayThrough:!0}),captured:x({onCanPlayThroughCapture:!0})}},click:{phasedRegistrationNames:{bubbled:x({onClick:!0}),captured:x({onClickCapture:!0})}},contextMenu:{phasedRegistrationNames:{bubbled:x({onContextMenu:!0}),captured:x({onContextMenuCapture:!0})}},copy:{phasedRegistrationNames:{bubbled:x({onCopy:!0}),captured:x({onCopyCapture:!0})}},cut:{phasedRegistrationNames:{bubbled:x({onCut:!0}),captured:x({onCutCapture:!0})}},doubleClick:{phasedRegistrationNames:{bubbled:x({onDoubleClick:!0}),captured:x({onDoubleClickCapture:!0})}},drag:{phasedRegistrationNames:{bubbled:x({onDrag:!0}),captured:x({onDragCapture:!0})}},dragEnd:{phasedRegistrationNames:{bubbled:x({onDragEnd:!0}),captured:x({onDragEndCapture:!0})}},dragEnter:{phasedRegistrationNames:{bubbled:x({onDragEnter:!0}),captured:x({onDragEnterCapture:!0})}},dragExit:{phasedRegistrationNames:{bubbled:x({onDragExit:!0}),captured:x({onDragExitCapture:!0})}},dragLeave:{phasedRegistrationNames:{bubbled:x({onDragLeave:!0}),captured:x({onDragLeaveCapture:!0})}},dragOver:{phasedRegistrationNames:{bubbled:x({onDragOver:!0}),captured:x({onDragOverCapture:!0})}},dragStart:{phasedRegistrationNames:{bubbled:x({onDragStart:!0}),captured:x({onDragStartCapture:!0})}},drop:{phasedRegistrationNames:{bubbled:x({onDrop:!0}),captured:x({onDropCapture:!0})}},durationChange:{phasedRegistrationNames:{bubbled:x({onDurationChange:!0}),captured:x({onDurationChangeCapture:!0})}},emptied:{phasedRegistrationNames:{bubbled:x({onEmptied:!0}),captured:x({onEmptiedCapture:!0})}},encrypted:{phasedRegistrationNames:{bubbled:x({onEncrypted:!0}),captured:x({onEncryptedCapture:!0})}},ended:{phasedRegistrationNames:{bubbled:x({onEnded:!0}),captured:x({onEndedCapture:!0})}},error:{phasedRegistrationNames:{bubbled:x({onError:!0}),captured:x({onErrorCapture:!0})}},focus:{phasedRegistrationNames:{bubbled:x({onFocus:!0}),captured:x({onFocusCapture:!0})}},input:{phasedRegistrationNames:{bubbled:x({onInput:!0}),captured:x({onInputCapture:!0})}},invalid:{phasedRegistrationNames:{bubbled:x({onInvalid:!0}),captured:x({onInvalidCapture:!0})}},keyDown:{phasedRegistrationNames:{bubbled:x({onKeyDown:!0}),captured:x({onKeyDownCapture:!0})}},keyPress:{phasedRegistrationNames:{bubbled:x({onKeyPress:!0}),captured:x({onKeyPressCapture:!0})}},keyUp:{phasedRegistrationNames:{bubbled:x({onKeyUp:!0}),captured:x({onKeyUpCapture:!0})}},load:{phasedRegistrationNames:{bubbled:x({onLoad:!0}),captured:x({onLoadCapture:!0})}},loadedData:{phasedRegistrationNames:{bubbled:x({onLoadedData:!0}),captured:x({onLoadedDataCapture:!0})}},loadedMetadata:{phasedRegistrationNames:{bubbled:x({onLoadedMetadata:!0}),captured:x({onLoadedMetadataCapture:!0})}},loadStart:{phasedRegistrationNames:{bubbled:x({onLoadStart:!0}),captured:x({onLoadStartCapture:!0})}},mouseDown:{phasedRegistrationNames:{bubbled:x({onMouseDown:!0}),captured:x({onMouseDownCapture:!0})}},mouseMove:{phasedRegistrationNames:{bubbled:x({onMouseMove:!0}),captured:x({onMouseMoveCapture:!0})}},mouseOut:{phasedRegistrationNames:{bubbled:x({onMouseOut:!0}),captured:x({onMouseOutCapture:!0})}},mouseOver:{phasedRegistrationNames:{bubbled:x({onMouseOver:!0}),captured:x({onMouseOverCapture:!0})}},mouseUp:{phasedRegistrationNames:{bubbled:x({onMouseUp:!0}),captured:x({onMouseUpCapture:!0})}},paste:{phasedRegistrationNames:{bubbled:x({onPaste:!0}),captured:x({onPasteCapture:!0})}},pause:{phasedRegistrationNames:{bubbled:x({onPause:!0}),captured:x({onPauseCapture:!0})}},play:{phasedRegistrationNames:{bubbled:x({onPlay:!0}),captured:x({onPlayCapture:!0})}},playing:{phasedRegistrationNames:{bubbled:x({onPlaying:!0}),captured:x({onPlayingCapture:!0})}},progress:{phasedRegistrationNames:{bubbled:x({onProgress:!0}),captured:x({onProgressCapture:!0})}},rateChange:{phasedRegistrationNames:{bubbled:x({onRateChange:!0}),captured:x({onRateChangeCapture:!0})}},reset:{phasedRegistrationNames:{bubbled:x({onReset:!0}),captured:x({onResetCapture:!0})}},scroll:{phasedRegistrationNames:{bubbled:x({onScroll:!0}),captured:x({onScrollCapture:!0})}},seeked:{phasedRegistrationNames:{bubbled:x({onSeeked:!0}),captured:x({onSeekedCapture:!0})}},seeking:{phasedRegistrationNames:{bubbled:x({onSeeking:!0}),captured:x({onSeekingCapture:!0})}},stalled:{phasedRegistrationNames:{bubbled:x({onStalled:!0}),captured:x({onStalledCapture:!0})}},submit:{phasedRegistrationNames:{bubbled:x({onSubmit:!0}),captured:x({onSubmitCapture:!0})}},suspend:{phasedRegistrationNames:{bubbled:x({onSuspend:!0}),captured:x({onSuspendCapture:!0})}},timeUpdate:{phasedRegistrationNames:{bubbled:x({onTimeUpdate:!0}),captured:x({onTimeUpdateCapture:!0})}},touchCancel:{phasedRegistrationNames:{bubbled:x({onTouchCancel:!0}),captured:x({onTouchCancelCapture:!0})}},touchEnd:{phasedRegistrationNames:{bubbled:x({onTouchEnd:!0}),captured:x({onTouchEndCapture:!0})}},touchMove:{phasedRegistrationNames:{bubbled:x({onTouchMove:!0}),captured:x({onTouchMoveCapture:!0})}},touchStart:{phasedRegistrationNames:{bubbled:x({onTouchStart:!0}),captured:x({onTouchStartCapture:!0})}},transitionEnd:{phasedRegistrationNames:{bubbled:x({onTransitionEnd:!0}),captured:x({onTransitionEndCapture:!0})}},volumeChange:{phasedRegistrationNames:{bubbled:x({onVolumeChange:!0}),captured:x({onVolumeChangeCapture:!0})}},waiting:{phasedRegistrationNames:{bubbled:x({onWaiting:!0}),captured:x({onWaitingCapture:!0})}},wheel:{phasedRegistrationNames:{bubbled:x({onWheel:!0}),captured:x({onWheelCapture:!0})}}},C={topAbort:E.abort,topAnimationEnd:E.animationEnd,topAnimationIteration:E.animationIteration,topAnimationStart:E.animationStart,topBlur:E.blur,topCanPlay:E.canPlay,topCanPlayThrough:E.canPlayThrough,topClick:E.click,topContextMenu:E.contextMenu,topCopy:E.copy,topCut:E.cut,topDoubleClick:E.doubleClick,topDrag:E.drag,topDragEnd:E.dragEnd,topDragEnter:E.dragEnter,topDragExit:E.dragExit,topDragLeave:E.dragLeave,topDragOver:E.dragOver,topDragStart:E.dragStart,topDrop:E.drop,topDurationChange:E.durationChange,topEmptied:E.emptied,topEncrypted:E.encrypted,topEnded:E.ended,topError:E.error,topFocus:E.focus,topInput:E.input,topInvalid:E.invalid,topKeyDown:E.keyDown,topKeyPress:E.keyPress,topKeyUp:E.keyUp,topLoad:E.load,topLoadedData:E.loadedData,topLoadedMetadata:E.loadedMetadata,topLoadStart:E.loadStart,topMouseDown:E.mouseDown,topMouseMove:E.mouseMove,topMouseOut:E.mouseOut,topMouseOver:E.mouseOver,topMouseUp:E.mouseUp,topPaste:E.paste,topPause:E.pause,topPlay:E.play,topPlaying:E.playing,topProgress:E.progress,topRateChange:E.rateChange,topReset:E.reset,topScroll:E.scroll,topSeeked:E.seeked,topSeeking:E.seeking,topStalled:E.stalled,topSubmit:E.submit,topSuspend:E.suspend,topTimeUpdate:E.timeUpdate,topTouchCancel:E.touchCancel,topTouchEnd:E.touchEnd,topTouchMove:E.touchMove,topTouchStart:E.touchStart,topTransitionEnd:E.transitionEnd,topVolumeChange:E.volumeChange,topWaiting:E.waiting,topWheel:E.wheel};for(var k in C)C[k].dependencies=[k];var S=x({onClick:null}),A={},T={eventTypes:E,extractEvents:function(e,t,n,r){var i=C[e];if(!i)return null;var a;switch(e){case _.topAbort:case _.topCanPlay:case _.topCanPlayThrough:case _.topDurationChange:case _.topEmptied:case _.topEncrypted:case _.topEnded:case _.topError:case _.topInput:case _.topInvalid:case _.topLoad:case _.topLoadedData:case _.topLoadedMetadata:case _.topLoadStart:case _.topPause:case _.topPlay:case _.topPlaying:case _.topProgress:case _.topRateChange:case _.topReset:case _.topSeeked:case _.topSeeking:case _.topStalled:case _.topSubmit:case _.topSuspend:case _.topTimeUpdate:case _.topVolumeChange:case _.topWaiting:a=u;break;case _.topKeyPress:if(0===y(n))return null;case _.topKeyDown:case _.topKeyUp:a=d;break;case _.topBlur:case _.topFocus:a=c;break;case _.topClick:if(2===n.button)return null;case _.topContextMenu:case _.topDoubleClick:case _.topMouseDown:case _.topMouseMove:case _.topMouseOut:case _.topMouseOver:case _.topMouseUp:a=f;break;case _.topDrag:case _.topDragEnd:case _.topDragEnter:case _.topDragExit:case _.topDragLeave:case _.topDragOver:case _.topDragStart:case _.topDrop:a=p;break;case _.topTouchCancel:case _.topTouchEnd:case _.topTouchMove:case _.topTouchStart:a=h;break;case _.topAnimationEnd:case _.topAnimationIteration:case _.topAnimationStart:a=s;break;case _.topTransitionEnd:a=g;break;case _.topScroll:a=m;break;case _.topWheel:a=v;break;case _.topCopy:case _.topCut:case _.topPaste:a=l}a?void 0:w(!1);var b=a.getPooled(i,t,n,r);return o.accumulateTwoPhaseDispatches(b),b},didPutListener:function(e,t,n){if(t===S){var r=e._rootNodeID,o=a.getNodeFromInstance(e);A[r]||(A[r]=i.listen(o,"click",b))}},willDeleteListener:function(e,t){if(t===S){var n=e._rootNodeID;A[n].remove(),delete A[n]}}};e.exports=T},function(e,t,n){"use strict";function r(e,t,n,r){return i.call(this,e,t,n,r)}var i=n(156),o={animationName:null,elapsedTime:null,pseudoElement:null};i.augmentClass(r,o),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return i.call(this,e,t,n,r)}var i=n(156),o={clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}};i.augmentClass(r,o),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return i.call(this,e,t,n,r)}var i=n(173),o={relatedTarget:null};i.augmentClass(r,o),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return i.call(this,e,t,n,r)}var i=n(173),o=n(254),a=n(255),s=n(175),l={key:a,location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:s,charCode:function(e){return"keypress"===e.type?o(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?o(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}};i.augmentClass(r,l),e.exports=r},function(e,t){"use strict";function n(e){var t,n=e.keyCode;return"charCode"in e?(t=e.charCode,0===t&&13===n&&(t=13)):t=n,t>=32||13===t?t:0}e.exports=n},function(e,t,n){"use strict";function r(e){if(e.key){var t=o[e.key]||e.key;if("Unidentified"!==t)return t}if("keypress"===e.type){var n=i(e);return 13===n?"Enter":String.fromCharCode(n)}return"keydown"===e.type||"keyup"===e.type?a[e.keyCode]||"Unidentified":""}var i=n(254),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},function(e,t,n){"use strict";function r(e,t,n,r){return i.call(this,e,t,n,r)}var i=n(172),o={dataTransfer:null};i.augmentClass(r,o),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return i.call(this,e,t,n,r)}var i=n(173),o=n(175),a={touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:o};i.augmentClass(r,a),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return i.call(this,e,t,n,r)}var i=n(156),o={propertyName:null,elapsedTime:null,pseudoElement:null};i.augmentClass(r,o),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return i.call(this,e,t,n,r)}var i=n(172),o={deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:null,deltaMode:null};i.augmentClass(r,o),e.exports=r},function(e,t,n){"use strict";function r(e,t){for(var n=Math.min(e.length,t.length),r=0;r<n;r++)if(e.charAt(r)!==t.charAt(r))return r;return e.length===t.length?-1:n}function i(e){return e?e.nodeType===O?e.documentElement:e.firstChild:null}function o(e){return e.getAttribute&&e.getAttribute(N)||""}function a(e,t,n,r,i){var o;if(y.logTopLevelRenders){var a=e._currentElement.props,s=a.type;o="React mount: "+("string"==typeof s?s:s.displayName||s.name),console.time(o)}var l=_.mountComponent(e,n,null,m(e,t),i);o&&console.timeEnd(o),e._renderedComponent._topLevelWrapper=e,B._mountImageIntoNode(l,t,e,r,n)}function s(e,t,n,r){var i=C.ReactReconcileTransaction.getPooled(!n&&v.useCreateElement);i.perform(a,null,e,t,i,n,r),C.ReactReconcileTransaction.release(i)}function l(e,t,n){for(_.unmountComponent(e,n),t.nodeType===O&&(t=t.documentElement);t.lastChild;)t.removeChild(t.lastChild)}function u(e){var t=i(e);if(t){var n=g.getInstanceFromNode(t);return!(!n||!n._nativeParent)}}function c(e){var t=i(e),n=t&&g.getInstanceFromNode(t);return n&&!n._nativeParent?n:null}function d(e){var t=c(e);return t?t._nativeContainerInfo._topLevelWrapper:null}var f=n(179),p=n(140),h=n(207),g=(n(113),n(139)),m=n(261),v=n(262),b=n(112),y=n(161),w=(n(122),n(263)),x=n(162),_=n(163),E=n(224),C=n(159),k=n(125),S=n(220),A=n(111),T=n(183),D=n(225),N=(n(114),p.ID_ATTRIBUTE_NAME),F=p.ROOT_ATTRIBUTE_NAME,M=1,O=9,L=11,P={},I=1,R=function(){this.rootID=I++};R.prototype.isReactComponent={},R.prototype.render=function(){return this.props};var B={TopLevelWrapper:R,_instancesByReactRootID:P,scrollMonitor:function(e,t){t()},_updateRootComponent:function(e,t,n,r){return B.scrollMonitor(n,function(){E.enqueueElementInternal(e,t),r&&E.enqueueCallbackInternal(e,r)}),e},_renderNewRootComponent:function(e,t,n,r){!t||t.nodeType!==M&&t.nodeType!==O&&t.nodeType!==L?A(!1):void 0,h.ensureScrollValueMonitoring();var i=S(e);C.batchedUpdates(s,i,t,n,r);var o=i._instance.rootID;return P[o]=i,i},renderSubtreeIntoContainer:function(e,t,n,r){return null==e||null==e._reactInternalInstance?A(!1):void 0,B._renderSubtreeIntoContainer(e,t,n,r)},_renderSubtreeIntoContainer:function(e,t,n,r){E.validateCallback(r,"ReactDOM.render"),b.isValidElement(t)?void 0:A(!1);var a=b(R,null,null,null,null,null,t),s=d(n);if(s){var l=s._currentElement,c=l.props;if(D(c,t)){var f=s._renderedComponent.getPublicInstance(),p=r&&function(){r.call(f)};return B._updateRootComponent(s,a,n,p),f}B.unmountComponentAtNode(n)}var h=i(n),g=h&&!!o(h),m=u(n),v=g&&!s&&!m,y=B._renderNewRootComponent(a,n,v,null!=e?e._reactInternalInstance._processChildContext(e._reactInternalInstance._context):k)._renderedComponent.getPublicInstance();return r&&r.call(y),y},render:function(e,t,n){return B._renderSubtreeIntoContainer(null,e,t,n)},unmountComponentAtNode:function(e){!e||e.nodeType!==M&&e.nodeType!==O&&e.nodeType!==L?A(!1):void 0;var t=d(e);if(!t){u(e),1===e.nodeType&&e.hasAttribute(F);return!1}return delete P[t._instance.rootID],C.batchedUpdates(l,t,e,!1),!0},_mountImageIntoNode:function(e,t,n,o,a){if(!t||t.nodeType!==M&&t.nodeType!==O&&t.nodeType!==L?A(!1):void 0,o){var s=i(t);if(w.canReuseMarkup(e,s))return void g.precacheNode(n,s);var l=s.getAttribute(w.CHECKSUM_ATTR_NAME);s.removeAttribute(w.CHECKSUM_ATTR_NAME);var u=s.outerHTML;s.setAttribute(w.CHECKSUM_ATTR_NAME,l);var c=e,d=r(c,u);" (client) "+c.substring(d-20,d+20)+"\n (server) "+u.substring(d-20,d+20);t.nodeType===O?A(!1):void 0}if(t.nodeType===O?A(!1):void 0,a.useCreateElement){for(;t.lastChild;)t.removeChild(t.lastChild);f.insertTreeBefore(t,e,null)}else T(t,e),g.precacheNode(n,t.firstChild)}};x.measureMethods(B,"ReactMount",{_renderNewRootComponent:"_renderNewRootComponent",_mountImageIntoNode:"_mountImageIntoNode"}),e.exports=B},function(e,t,n){"use strict";function r(e,t){var n={_topLevelWrapper:e,_idCounter:1,_ownerDocument:t?t.nodeType===i?t:t.ownerDocument:null,_node:t,_tag:t?t.nodeName.toLowerCase():null,_namespaceURI:t?t.namespaceURI:null};return n}var i=(n(230),9);e.exports=r},function(e,t){"use strict";var n={useCreateElement:!0};e.exports=n},function(e,t,n){"use strict";var r=n(264),i=/\/?>/,o=/^<\!\-\-/,a={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(e){var t=r(e);return o.test(e)?e:e.replace(i," "+a.CHECKSUM_ATTR_NAME+'="'+t+'"$&')},canReuseMarkup:function(e,t){var n=t.getAttribute(a.CHECKSUM_ATTR_NAME);n=n&&parseInt(n,10);var i=r(e);return i===n}};e.exports=a},function(e,t){"use strict";function n(e){for(var t=1,n=0,i=0,o=e.length,a=o&-4;i<a;){for(var s=Math.min(i+4096,a);i<s;i+=4)n+=(t+=e.charCodeAt(i))+(t+=e.charCodeAt(i+1))+(t+=e.charCodeAt(i+2))+(t+=e.charCodeAt(i+3));t%=r,n%=r}for(;i<o;i++)n+=t+=e.charCodeAt(i);return t%=r,n%=r,t|n<<16}var r=65521;e.exports=n},function(e,t,n){"use strict";function r(e){if(null==e)return null;if(1===e.nodeType)return e;var t=o.get(e);return t?(t=a(t),t?i.getNodeFromInstance(t):null):void s(("function"==typeof e.render,!1))}var i=(n(113),n(139)),o=n(222),a=n(266),s=n(111);n(114);e.exports=r},function(e,t,n){"use strict";function r(e){for(var t;(t=e._renderedNodeType)===i.COMPOSITE;)e=e._renderedComponent;return t===i.NATIVE?e._renderedComponent:t===i.EMPTY?null:void 0}var i=n(223);e.exports=r},function(e,t,n){"use strict";var r=n(260);e.exports=r.renderSubtreeIntoContainer},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(91),o=r(i),a=function(){this.initialize.apply(this,arguments),_.bindAll(this)};a.extend=o["default"].Model.extend,_.extend(a.prototype,o["default"].Events,{triggerChange:function(){this.trigger("change")},initialize:function(){}}),t["default"]=a},function(e,t,n){e.exports.Dispatcher=n(270)},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var i=n(271),o="ID_",a=function(){function e(){r(this,e),this._callbacks={},this._isDispatching=!1,this._isHandled={},this._isPending={},this._lastID=1}return e.prototype.register=function(e){var t=o+this._lastID++;return this._callbacks[t]=e,t},e.prototype.unregister=function(e){this._callbacks[e]?void 0:i(!1),delete this._callbacks[e]},e.prototype.waitFor=function(e){this._isDispatching?void 0:i(!1);for(var t=0;t<e.length;t++){var n=e[t];this._isPending[n]?this._isHandled[n]?void 0:i(!1):(this._callbacks[n]?void 0:i(!1),this._invokeCallback(n))}},e.prototype.dispatch=function(e){this._isDispatching?i(!1):void 0,this._startDispatching(e);try{for(var t in this._callbacks)this._isPending[t]||this._invokeCallback(t)}finally{this._stopDispatching()}},e.prototype.isDispatching=function(){return this._isDispatching},e.prototype._invokeCallback=function(e){this._isPending[e]=!0,this._callbacks[e](this._pendingPayload),this._isHandled[e]=!0},e.prototype._startDispatching=function(e){for(var t in this._callbacks)this._isPending[t]=!1,this._isHandled[t]=!1;this._pendingPayload=e,this._isDispatching=!0},e.prototype._stopDispatching=function(){delete this._pendingPayload,this._isDispatching=!1},e}();e.exports=a},function(e,t,n){"use strict";var r=function(e,t,n,r,i,o,a,s){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,i,o,a,s],c=0;l=new Error("Invariant Violation: "+t.replace(/%s/g,function(){return u[c++]}))}throw l.framesToPop=1,l}};e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(100),o=r(i),a={Session:o["default"].Model.extend({url:"/_session",user:function(){var e=this.get("userCtx");return e&&e.name?{name:e.name,roles:e.roles}:null},isAdmin:function(){var e=this.get("userCtx");return e.roles.indexOf("_admin")!==-1},fetchUser:function(e){var t=e||{},n=this.user(),r=_.bind(this.fetchOnce,this);return t.forceFetch&&(r=_.bind(this.fetch,this)),r(e).then(function(){var e=this.user();return n!==e?this.trigger("session:userChanged"):this.trigger("session:userFetched"),e}.bind(this),this.triggerError.bind(this))},triggerError:function(e,t,n){this.trigger("session:error",e,t,n)}})};t["default"]=a},function(e,t,n){var r=n(274);"string"==typeof r&&(r=[[e.id,r,""]]);n(288)(r,{});r.locals&&(e.exports=r.locals)},function(e,t,n){t=e.exports=n(275)(),t.push([e.id,'/*!\n * Bootstrap v2.3.2\n *\n * Copyright 2012 Twitter, Inc\n * Licensed under the Apache License v2.0\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Designed and built with all the love in the world @twitter by @mdo and @fat.\n */article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio,canvas,video{display:inline-block;*display:inline;*zoom:1}audio:not([controls]){display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}a:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}a:active,a:hover{outline:0}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{max-width:100%;width:auto\\9;height:auto;vertical-align:middle;border:0;-ms-interpolation-mode:bicubic}#map_canvas img,.google-maps img{max-width:none}button,input,select,textarea{margin:0;font-size:100%;vertical-align:middle}button,input{*overflow:visible;line-height:normal}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button,input[type=button],input[type=checkbox],input[type=radio],input[type=reset],input[type=submit],label,select{cursor:pointer}input[type=search]{box-sizing:content-box;-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}textarea{overflow:auto;vertical-align:top}@media print{*{text-shadow:none!important;color:#000!important;background:transparent!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}.ir a:after,a[href^="#"]:after,a[href^="javascript:"]:after{content:""}blockquote,pre{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}@page{margin:.5cm}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}}body{margin:0;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:14px;line-height:20px;color:#333;background-color:#fff}a{color:#e33f3b;text-decoration:none}a:focus,a:hover{color:#af2d24;text-decoration:underline}.img-rounded{border-radius:6px}.img-polaroid{padding:4px;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);box-shadow:0 1px 3px rgba(0,0,0,.1)}.img-circle{border-radius:500px}.row{margin-left:-20px;*zoom:1}.row:after,.row:before{display:table;content:"";line-height:0}.row:after{clear:both}[class*=span]{float:left;min-height:1px;margin-left:20px}.container,.navbar-fixed-bottom .container,.navbar-fixed-top .container,.navbar-static-top .container,.span12{width:940px}.span11{width:860px}.span10{width:780px}.span9{width:700px}.span8{width:620px}.span7{width:540px}.span6{width:460px}.span5{width:380px}.span4{width:300px}.span3{width:220px}.span2{width:140px}.span1{width:60px}.offset12{margin-left:980px}.offset11{margin-left:900px}.offset10{margin-left:820px}.offset9{margin-left:740px}.offset8{margin-left:660px}.offset7{margin-left:580px}.offset6{margin-left:500px}.offset5{margin-left:420px}.offset4{margin-left:340px}.offset3{margin-left:260px}.offset2{margin-left:180px}.offset1{margin-left:100px}.row-fluid{width:100%;*zoom:1}.row-fluid:after,.row-fluid:before{display:table;content:"";line-height:0}.row-fluid:after{clear:both}.row-fluid [class*=span]{display:block;width:100%;min-height:30px;box-sizing:border-box;float:left;margin-left:2.12765957%;*margin-left:2.07446809%}.row-fluid [class*=span]:first-child{margin-left:0}.row-fluid .controls-row [class*=span]+[class*=span]{margin-left:2.12765957%}.row-fluid .span12{width:100%;*width:99.94680851%}.row-fluid .span11{width:91.4893617%;*width:91.43617021%}.row-fluid .span10{width:82.9787234%;*width:82.92553191%}.row-fluid .span9{width:74.46808511%;*width:74.41489362%}.row-fluid .span8{width:65.95744681%;*width:65.90425532%}.row-fluid .span7{width:57.44680851%;*width:57.39361702%}.row-fluid .span6{width:48.93617021%;*width:48.88297872%}.row-fluid .span5{width:40.42553191%;*width:40.37234043%}.row-fluid .span4{width:31.91489362%;*width:31.86170213%}.row-fluid .span3{width:23.40425532%;*width:23.35106383%}.row-fluid .span2{width:14.89361702%;*width:14.84042553%}.row-fluid .span1{width:6.38297872%;*width:6.32978723%}.row-fluid .offset12{margin-left:104.25531915%;*margin-left:104.14893617%}.row-fluid .offset12:first-child{margin-left:102.12765957%;*margin-left:102.0212766%}.row-fluid .offset11{margin-left:95.74468085%;*margin-left:95.63829787%}.row-fluid .offset11:first-child{margin-left:93.61702128%;*margin-left:93.5106383%}.row-fluid .offset10{margin-left:87.23404255%;*margin-left:87.12765957%}.row-fluid .offset10:first-child{margin-left:85.10638298%;*margin-left:85%}.row-fluid .offset9{margin-left:78.72340426%;*margin-left:78.61702128%}.row-fluid .offset9:first-child{margin-left:76.59574468%;*margin-left:76.4893617%}.row-fluid .offset8{margin-left:70.21276596%;*margin-left:70.10638298%}.row-fluid .offset8:first-child{margin-left:68.08510638%;*margin-left:67.9787234%}.row-fluid .offset7{margin-left:61.70212766%;*margin-left:61.59574468%}.row-fluid .offset7:first-child{margin-left:59.57446809%;*margin-left:59.46808511%}.row-fluid .offset6{margin-left:53.19148936%;*margin-left:53.08510638%}.row-fluid .offset6:first-child{margin-left:51.06382979%;*margin-left:50.95744681%}.row-fluid .offset5{margin-left:44.68085106%;*margin-left:44.57446809%}.row-fluid .offset5:first-child{margin-left:42.55319149%;*margin-left:42.44680851%}.row-fluid .offset4{margin-left:36.17021277%;*margin-left:36.06382979%}.row-fluid .offset4:first-child{margin-left:34.04255319%;*margin-left:33.93617021%}.row-fluid .offset3{margin-left:27.65957447%;*margin-left:27.55319149%}.row-fluid .offset3:first-child{margin-left:25.53191489%;*margin-left:25.42553191%}.row-fluid .offset2{margin-left:19.14893617%;*margin-left:19.04255319%}.row-fluid .offset2:first-child{margin-left:17.0212766%;*margin-left:16.91489362%}.row-fluid .offset1{margin-left:10.63829787%;*margin-left:10.53191489%}.row-fluid .offset1:first-child{margin-left:8.5106383%;*margin-left:8.40425532%}.row-fluid [class*=span].hide,[class*=span].hide{display:none}.row-fluid [class*=span].pull-right,[class*=span].pull-right{float:right}.container{margin-right:auto;margin-left:auto;*zoom:1}.container:after,.container:before{display:table;content:"";line-height:0}.container:after{clear:both}.container-fluid{padding-right:20px;padding-left:20px;*zoom:1}.container-fluid:after,.container-fluid:before{display:table;content:"";line-height:0}.container-fluid:after{clear:both}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:21px;font-weight:200;line-height:30px}small{font-size:85%}strong{font-weight:700}em{font-style:italic}cite{font-style:normal}.muted{color:#999}a.muted:focus,a.muted:hover{color:gray}.text-warning{color:#c09853}a.text-warning:focus,a.text-warning:hover{color:#a47e3c}.text-error{color:#b94a48}a.text-error:focus,a.text-error:hover{color:#953b39}.text-info{color:#3a87ad}a.text-info:focus,a.text-info:hover{color:#2d6987}.text-success{color:#468847}a.text-success:focus,a.text-success:hover{color:#356635}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}h1,h2,h3,h4,h5,h6{margin:10px 0;font-family:inherit;font-weight:700;line-height:20px;color:inherit;text-rendering:optimizelegibility}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{font-weight:400;line-height:1;color:#999}h1,h2,h3{line-height:40px}h1{font-size:38.5px}h2{font-size:31.5px}h3{font-size:24.5px}h4{font-size:17.5px}h5{font-size:14px}h6{font-size:11.9px}h1 small{font-size:24.5px}h2 small{font-size:17.5px}h3 small,h4 small{font-size:14px}.page-header{padding-bottom:9px;margin:20px 0 30px;border-bottom:1px solid #eee}ol,ul{padding:0;margin:0 0 10px 25px}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}li{line-height:20px}ol.inline,ol.unstyled,ul.inline,ul.unstyled{margin-left:0;list-style:none}ol.inline>li,ul.inline>li{display:inline-block;*display:inline;*zoom:1;padding-left:5px;padding-right:5px}dl{margin-bottom:20px}dd,dt{line-height:20px}dt{font-weight:700}dd{margin-left:10px}.dl-horizontal{*zoom:1}.dl-horizontal:after,.dl-horizontal:before{display:table;content:"";line-height:0}.dl-horizontal:after{clear:both}.dl-horizontal dt{float:left;width:160px;clear:left;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}hr{margin:20px 0;border:0;border-top:1px solid #eee;border-bottom:1px solid #fff}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #999}abbr.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:0 0 0 15px;margin:0 0 20px;border-left:5px solid #eee}blockquote p{margin-bottom:0;font-size:17.5px;font-weight:300;line-height:1.25}blockquote small{display:block;line-height:20px;color:#999}blockquote small:before{content:\'\\2014   \\A0\'}blockquote.pull-right{float:right;padding-right:15px;padding-left:0;border-right:5px solid #eee;border-left:0}blockquote.pull-right p,blockquote.pull-right small{text-align:right}blockquote.pull-right small:before{content:\'\'}blockquote.pull-right small:after{content:\'\\A0   \\2014\'}blockquote:after,blockquote:before,q:after,q:before{content:""}address{display:block;margin-bottom:20px;font-style:normal;line-height:20px}code,pre{padding:0 3px 2px;font-family:Monaco,Menlo,Consolas,Courier New,monospace;font-size:12px;color:#333;border-radius:3px}code{padding:2px 4px;color:#d14;background-color:#f7f7f9;border:1px solid #e1e1e8;white-space:nowrap}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:20px;word-break:break-all;word-wrap:break-word;white-space:pre;white-space:pre-wrap;background-color:#f5f5f5;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:0}pre.prettyprint{margin-bottom:20px}pre code{padding:0;color:inherit;white-space:pre;white-space:pre-wrap;background-color:transparent;border:0}.pre-scrollable{max-height:340px;overflow-y:scroll}form{margin:0 0 20px}fieldset{margin:0}fieldset,legend{padding:0;border:0}legend{display:block;width:100%;margin-bottom:20px;font-size:21px;line-height:40px;color:#333;border-bottom:1px solid #e5e5e5}legend small{font-size:15px;color:#999}button,input,label,select,textarea{font-size:14px;font-weight:400;line-height:20px}button,input,select,textarea{font-family:Helvetica Neue,Helvetica,Arial,sans-serif}label{display:block;margin-bottom:5px}.uneditable-input,input[type=color],input[type=date],input[type=datetime-local],input[type=datetime],input[type=email],input[type=month],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week],select,textarea{display:inline-block;height:20px;padding:4px 6px;margin-bottom:10px;font-size:14px;line-height:20px;color:#555;border-radius:0;vertical-align:middle}.uneditable-input,input,textarea{width:206px}textarea{height:auto}.uneditable-input,input[type=color],input[type=date],input[type=datetime-local],input[type=datetime],input[type=email],input[type=month],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week],textarea{background-color:#fff;border:1px solid #ccc;box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border .2s linear,box-shadow .2s linear;transition:border .2s linear,box-shadow .2s linear}.uneditable-input:focus,input[type=color]:focus,input[type=date]:focus,input[type=datetime-local]:focus,input[type=datetime]:focus,input[type=email]:focus,input[type=month]:focus,input[type=number]:focus,input[type=password]:focus,input[type=search]:focus,input[type=tel]:focus,input[type=text]:focus,input[type=time]:focus,input[type=url]:focus,input[type=week]:focus,textarea:focus{border-color:rgba(82,168,236,.8);outline:0;outline:thin dotted\\9;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(82,168,236,.6)}input[type=checkbox],input[type=radio]{margin:4px 0 0;*margin-top:0;margin-top:1px\\9;line-height:normal}input[type=button],input[type=checkbox],input[type=file],input[type=image],input[type=radio],input[type=reset],input[type=submit]{width:auto}input[type=file],select{height:30px;*margin-top:4px;line-height:30px}select{width:220px;border:1px solid #ccc;background-color:#fff}select[multiple],select[size]{height:auto}input[type=checkbox]:focus,input[type=file]:focus,input[type=radio]:focus,select:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.uneditable-input,.uneditable-textarea{color:#999;background-color:#fcfcfc;border-color:#ccc;box-shadow:inset 0 1px 2px rgba(0,0,0,.025);cursor:not-allowed}.uneditable-input{overflow:hidden;white-space:nowrap}.uneditable-textarea{width:auto;height:auto}input:-moz-placeholder,textarea:-moz-placeholder{color:#999}input:-ms-input-placeholder,textarea:-ms-input-placeholder{color:#999}input::-webkit-input-placeholder,textarea::-webkit-input-placeholder{color:#999}.checkbox,.radio{min-height:20px;padding-left:20px}.checkbox input[type=checkbox],.radio input[type=radio]{float:left;margin-left:-20px}.controls>.checkbox:first-child,.controls>.radio:first-child{padding-top:5px}.checkbox.inline,.radio.inline{display:inline-block;padding-top:5px;margin-bottom:0;vertical-align:middle}.checkbox.inline+.checkbox.inline,.radio.inline+.radio.inline{margin-left:10px}.input-mini{width:60px}.input-small{width:90px}.input-medium{width:150px}.input-large{width:210px}.input-xlarge{width:270px}.input-xxlarge{width:530px}.row-fluid .uneditable-input[class*=span],.row-fluid input[class*=span],.row-fluid select[class*=span],.row-fluid textarea[class*=span],.uneditable-input[class*=span],input[class*=span],select[class*=span],textarea[class*=span]{float:none;margin-left:0}.input-append .uneditable-input[class*=span],.input-append input[class*=span],.input-prepend .uneditable-input[class*=span],.input-prepend input[class*=span],.row-fluid .input-append [class*=span],.row-fluid .input-prepend [class*=span],.row-fluid .uneditable-input[class*=span],.row-fluid input[class*=span],.row-fluid select[class*=span],.row-fluid textarea[class*=span]{display:inline-block}.uneditable-input,input,textarea{margin-left:0}.controls-row [class*=span]+[class*=span]{margin-left:20px}.uneditable-input.span12,input.span12,textarea.span12{width:926px}.uneditable-input.span11,input.span11,textarea.span11{width:846px}.uneditable-input.span10,input.span10,textarea.span10{width:766px}.uneditable-input.span9,input.span9,textarea.span9{width:686px}.uneditable-input.span8,input.span8,textarea.span8{width:606px}.uneditable-input.span7,input.span7,textarea.span7{width:526px}.uneditable-input.span6,input.span6,textarea.span6{width:446px}.uneditable-input.span5,input.span5,textarea.span5{width:366px}.uneditable-input.span4,input.span4,textarea.span4{width:286px}.uneditable-input.span3,input.span3,textarea.span3{width:206px}.uneditable-input.span2,input.span2,textarea.span2{width:126px}.uneditable-input.span1,input.span1,textarea.span1{width:46px}.controls-row{*zoom:1}.controls-row:after,.controls-row:before{display:table;content:"";line-height:0}.controls-row:after{clear:both}.controls-row [class*=span],.row-fluid .controls-row [class*=span]{float:left}.controls-row .checkbox[class*=span],.controls-row .radio[class*=span]{padding-top:5px}input[disabled],input[readonly],select[disabled],select[readonly],textarea[disabled],textarea[readonly]{cursor:not-allowed;background-color:#eee}input[type=checkbox][disabled],input[type=checkbox][readonly],input[type=radio][disabled],input[type=radio][readonly]{background-color:transparent}.control-group.warning .checkbox,.control-group.warning .control-label,.control-group.warning .help-block,.control-group.warning .help-inline,.control-group.warning .radio,.control-group.warning input,.control-group.warning select,.control-group.warning textarea{color:#c09853}.control-group.warning input,.control-group.warning select,.control-group.warning textarea{border-color:#c09853;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.control-group.warning input:focus,.control-group.warning select:focus,.control-group.warning textarea:focus{border-color:#a47e3c;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #dbc59e}.control-group.warning .input-append .add-on,.control-group.warning .input-prepend .add-on{color:#c09853;background-color:#fcf8e3;border-color:#c09853}.control-group.error .checkbox,.control-group.error .control-label,.control-group.error .help-block,.control-group.error .help-inline,.control-group.error .radio,.control-group.error input,.control-group.error select,.control-group.error textarea{color:#b94a48}.control-group.error input,.control-group.error select,.control-group.error textarea{border-color:#b94a48;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.control-group.error input:focus,.control-group.error select:focus,.control-group.error textarea:focus{border-color:#953b39;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #d59392}.control-group.error .input-append .add-on,.control-group.error .input-prepend .add-on{color:#b94a48;background-color:#f2dede;border-color:#b94a48}.control-group.success .checkbox,.control-group.success .control-label,.control-group.success .help-block,.control-group.success .help-inline,.control-group.success .radio,.control-group.success input,.control-group.success select,.control-group.success textarea{color:#468847}.control-group.success input,.control-group.success select,.control-group.success textarea{border-color:#468847;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.control-group.success input:focus,.control-group.success select:focus,.control-group.success textarea:focus{border-color:#356635;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #7aba7b}.control-group.success .input-append .add-on,.control-group.success .input-prepend .add-on{color:#468847;background-color:#dff0d8;border-color:#468847}.control-group.info .checkbox,.control-group.info .control-label,.control-group.info .help-block,.control-group.info .help-inline,.control-group.info .radio,.control-group.info input,.control-group.info select,.control-group.info textarea{color:#3a87ad}.control-group.info input,.control-group.info select,.control-group.info textarea{border-color:#3a87ad;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.control-group.info input:focus,.control-group.info select:focus,.control-group.info textarea:focus{border-color:#2d6987;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #7ab5d3}.control-group.info .input-append .add-on,.control-group.info .input-prepend .add-on{color:#3a87ad;background-color:#d9edf7;border-color:#3a87ad}input:focus:invalid,select:focus:invalid,textarea:focus:invalid{color:#b94a48;border-color:#ee5f5b}input:focus:invalid:focus,select:focus:invalid:focus,textarea:focus:invalid:focus{border-color:#e9322d;box-shadow:0 0 6px #f8b9b7}.form-actions{padding:19px 20px 20px;margin-top:20px;margin-bottom:20px;background-color:#f5f5f5;border-top:1px solid #e5e5e5;*zoom:1}.form-actions:after,.form-actions:before{display:table;content:"";line-height:0}.form-actions:after{clear:both}.help-block,.help-inline{color:#595959}.help-block{display:block;margin-bottom:10px}.help-inline{display:inline-block;*display:inline;*zoom:1;vertical-align:middle;padding-left:5px}.input-append,.input-prepend{display:inline-block;margin-bottom:10px;vertical-align:middle;font-size:0;white-space:nowrap}.input-append .dropdown-menu,.input-append .popover,.input-append .uneditable-input,.input-append input,.input-append select,.input-prepend .dropdown-menu,.input-prepend .popover,.input-prepend .uneditable-input,.input-prepend input,.input-prepend select{font-size:14px}.input-append .uneditable-input,.input-append input,.input-append select,.input-prepend .uneditable-input,.input-prepend input,.input-prepend select{position:relative;margin-bottom:0;*margin-left:0;vertical-align:top;border-radius:0 0 0 0}.input-append .uneditable-input:focus,.input-append input:focus,.input-append select:focus,.input-prepend .uneditable-input:focus,.input-prepend input:focus,.input-prepend select:focus{z-index:2}.input-append .add-on,.input-prepend .add-on{display:inline-block;width:auto;height:20px;min-width:16px;padding:4px 5px;font-size:14px;font-weight:400;line-height:20px;text-align:center;text-shadow:0 1px 0 #fff;background-color:#eee;border:1px solid #ccc}.input-append .add-on,.input-append .btn,.input-append .btn-group>.dropdown-toggle,.input-prepend .add-on,.input-prepend .btn,.input-prepend .btn-group>.dropdown-toggle{vertical-align:top;border-radius:0}.input-append .active,.input-prepend .active{background-color:#cdf355;border-color:#7fa30c}.input-prepend .add-on,.input-prepend .btn{margin-right:-1px}.input-append .uneditable-input,.input-append .uneditable-input+.btn-group .btn:last-child,.input-append input,.input-append input+.btn-group .btn:last-child,.input-append select,.input-append select+.btn-group .btn:last-child,.input-prepend .add-on:first-child,.input-prepend .btn:first-child{border-radius:0 0 0 0}.input-append .add-on,.input-append .btn,.input-append .btn-group{margin-left:-1px}.input-append .add-on:last-child,.input-append .btn-group:last-child>.dropdown-toggle,.input-append .btn:last-child{border-radius:0 0 0 0}.input-prepend.input-append .uneditable-input,.input-prepend.input-append input,.input-prepend.input-append select{border-radius:0}.input-prepend.input-append .uneditable-input+.btn-group .btn,.input-prepend.input-append input+.btn-group .btn,.input-prepend.input-append select+.btn-group .btn{border-radius:0 0 0 0}.input-prepend.input-append .add-on:first-child,.input-prepend.input-append .btn:first-child{margin-right:-1px;border-radius:0 0 0 0}.input-prepend.input-append .add-on:last-child,.input-prepend.input-append .btn:last-child{margin-left:-1px;border-radius:0 0 0 0}.input-prepend.input-append .btn-group:first-child{margin-left:0}input.search-query{padding-right:14px;padding-right:4px\\9;padding-left:14px;padding-left:4px\\9;margin-bottom:0;border-radius:15px}.form-search .input-append .search-query,.form-search .input-prepend .search-query{border-radius:0}.form-search .input-append .search-query{border-radius:14px 0 0 14px}.form-search .input-append .btn,.form-search .input-prepend .search-query{border-radius:0 14px 14px 0}.form-search .input-prepend .btn{border-radius:14px 0 0 14px}.form-horizontal .help-inline,.form-horizontal .input-append,.form-horizontal .input-prepend,.form-horizontal .uneditable-input,.form-horizontal input,.form-horizontal select,.form-horizontal textarea,.form-inline .help-inline,.form-inline .input-append,.form-inline .input-prepend,.form-inline .uneditable-input,.form-inline input,.form-inline select,.form-inline textarea,.form-search .help-inline,.form-search .input-append,.form-search .input-prepend,.form-search .uneditable-input,.form-search input,.form-search select,.form-search textarea{display:inline-block;*display:inline;*zoom:1;margin-bottom:0;vertical-align:middle}.form-horizontal .hide,.form-inline .hide,.form-search .hide{display:none}.form-inline .btn-group,.form-inline label,.form-search .btn-group,.form-search label{display:inline-block}.form-inline .input-append,.form-inline .input-prepend,.form-search .input-append,.form-search .input-prepend{margin-bottom:0}.form-inline .checkbox,.form-inline .radio,.form-search .checkbox,.form-search .radio{padding-left:0;margin-bottom:0;vertical-align:middle}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio],.form-search .checkbox input[type=checkbox],.form-search .radio input[type=radio]{float:left;margin-right:3px;margin-left:0}.control-group{margin-bottom:10px}legend+.control-group{margin-top:20px;-webkit-margin-top-collapse:separate}.form-horizontal .control-group{margin-bottom:20px;*zoom:1}.form-horizontal .control-group:after,.form-horizontal .control-group:before{display:table;content:"";line-height:0}.form-horizontal .control-group:after{clear:both}.form-horizontal .control-label{float:left;width:160px;padding-top:5px;text-align:right}.form-horizontal .controls{*display:inline-block;*padding-left:20px;margin-left:180px;*margin-left:0}.form-horizontal .controls:first-child{*padding-left:180px}.form-horizontal .help-block{margin-bottom:0}.form-horizontal .input-append+.help-block,.form-horizontal .input-prepend+.help-block,.form-horizontal .uneditable-input+.help-block,.form-horizontal input+.help-block,.form-horizontal select+.help-block,.form-horizontal textarea+.help-block{margin-top:10px}.form-horizontal .form-actions{padding-left:180px}table{max-width:100%;background-color:transparent;border-collapse:collapse;border-spacing:0}.table{width:100%;margin-bottom:20px}.table td,.table th{padding:8px;line-height:20px;text-align:left;vertical-align:top;border-top:1px solid #ddd}.table th{font-weight:700}.table thead th{vertical-align:bottom}.table caption+thead tr:first-child td,.table caption+thead tr:first-child th,.table colgroup+thead tr:first-child td,.table colgroup+thead tr:first-child th,.table thead:first-child tr:first-child td,.table thead:first-child tr:first-child th{border-top:0}.table tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed td,.table-condensed th{padding:4px 5px}.table-bordered{border:1px solid #ddd;border-collapse:separate;*border-collapse:collapse;border-left:0;border-radius:0}.table-bordered td,.table-bordered th{border-left:1px solid #ddd}.table-bordered caption+tbody tr:first-child td,.table-bordered caption+tbody tr:first-child th,.table-bordered caption+thead tr:first-child th,.table-bordered colgroup+tbody tr:first-child td,.table-bordered colgroup+tbody tr:first-child th,.table-bordered colgroup+thead tr:first-child th,.table-bordered tbody:first-child tr:first-child td,.table-bordered tbody:first-child tr:first-child th,.table-bordered thead:first-child tr:first-child th{border-top:0}.table-bordered tbody:first-child tr:first-child>td:first-child,.table-bordered tbody:first-child tr:first-child>th:first-child,.table-bordered thead:first-child tr:first-child>th:first-child{border-top-left-radius:0}.table-bordered tbody:first-child tr:first-child>td:last-child,.table-bordered tbody:first-child tr:first-child>th:last-child,.table-bordered thead:first-child tr:first-child>th:last-child{border-top-right-radius:0}.table-bordered tbody:last-child tr:last-child>td:first-child,.table-bordered tbody:last-child tr:last-child>th:first-child,.table-bordered tfoot:last-child tr:last-child>td:first-child,.table-bordered tfoot:last-child tr:last-child>th:first-child,.table-bordered thead:last-child tr:last-child>th:first-child{border-bottom-left-radius:0}.table-bordered tbody:last-child tr:last-child>td:last-child,.table-bordered tbody:last-child tr:last-child>th:last-child,.table-bordered tfoot:last-child tr:last-child>td:last-child,.table-bordered tfoot:last-child tr:last-child>th:last-child,.table-bordered thead:last-child tr:last-child>th:last-child{border-bottom-right-radius:0}.table-bordered tfoot+tbody:last-child tr:last-child td:first-child{border-bottom-left-radius:0}.table-bordered tfoot+tbody:last-child tr:last-child td:last-child{border-bottom-right-radius:0}.table-bordered caption+tbody tr:first-child td:first-child,.table-bordered caption+thead tr:first-child th:first-child,.table-bordered colgroup+tbody tr:first-child td:first-child,.table-bordered colgroup+thead tr:first-child th:first-child{border-top-left-radius:0}.table-bordered caption+tbody tr:first-child td:last-child,.table-bordered caption+thead tr:first-child th:last-child,.table-bordered colgroup+tbody tr:first-child td:last-child,.table-bordered colgroup+thead tr:first-child th:last-child{border-top-right-radius:0}.table-striped tbody>tr:nth-child(odd)>td,.table-striped tbody>tr:nth-child(odd)>th{background-color:#f9f9f9}.table-hover tbody tr:hover>td,.table-hover tbody tr:hover>th{background-color:#f5f5f5}.row-fluid table td[class*=span],.row-fluid table th[class*=span],table td[class*=span],table th[class*=span]{display:table-cell;float:none;margin-left:0}.table td.span1,.table th.span1{float:none;width:44px;margin-left:0}.table td.span2,.table th.span2{float:none;width:124px;margin-left:0}.table td.span3,.table th.span3{float:none;width:204px;margin-left:0}.table td.span4,.table th.span4{float:none;width:284px;margin-left:0}.table td.span5,.table th.span5{float:none;width:364px;margin-left:0}.table td.span6,.table th.span6{float:none;width:444px;margin-left:0}.table td.span7,.table th.span7{float:none;width:524px;margin-left:0}.table td.span8,.table th.span8{float:none;width:604px;margin-left:0}.table td.span9,.table th.span9{float:none;width:684px;margin-left:0}.table td.span10,.table th.span10{float:none;width:764px;margin-left:0}.table td.span11,.table th.span11{float:none;width:844px;margin-left:0}.table td.span12,.table th.span12{float:none;width:924px;margin-left:0}.table tbody tr.success>td{background-color:#dff0d8}.table tbody tr.error>td{background-color:#f2dede}.table tbody tr.warning>td{background-color:#fcf8e3}.table tbody tr.info>td{background-color:#d9edf7}.table-hover tbody tr.success:hover>td{background-color:#d0e9c6}.table-hover tbody tr.error:hover>td{background-color:#ebcccc}.table-hover tbody tr.warning:hover>td{background-color:#faf2cc}.table-hover tbody tr.info:hover>td{background-color:#c4e3f3}/*!\n *  Font Awesome 3.2.1\n *  the iconic font designed for Bootstrap\n *  ------------------------------------------------------------------------------\n *  The full suite of pictographic icons, examples, and documentation can be\n *  found at http://fontawesome.io.  Stay up to date on Twitter at\n *  http://twitter.com/fontawesome.\n *\n *  License\n *  ------------------------------------------------------------------------------\n *  - The Font Awesome font is licensed under SIL OFL 1.1 -\n *    http://scripts.sil.org/OFL\n *  - Font Awesome CSS, LESS, and SASS files are licensed under MIT License -\n *    http://opensource.org/licenses/mit-license.html\n *  - Font Awesome documentation licensed under CC BY 3.0 -\n *    http://creativecommons.org/licenses/by/3.0/\n *  - Attribution is no longer required in Font Awesome 3.0, but much appreciated:\n *    "Font Awesome by Dave Gandy - http://fontawesome.io"\n *\n *  Author - Dave Gandy\n *  ------------------------------------------------------------------------------\n *  Email: dave@fontawesome.io\n *  Twitter: http://twitter.com/davegandy\n *  Work: Lead Product Designer @ Kyruus - http://kyruus.com\n */@font-face{font-family:FontAwesome;src:url('+n(276)+");src:url("+n(277)+"?#iefix&v=3.2.1) format('embedded-opentype'),url("+n(278)+") format('woff'),url("+n(279)+") format('truetype'),url("+n(280)+'#fontawesomeregular?v=3.2.1) format(\'svg\');font-weight:400;font-style:normal}[class*=" icon-"],[class^=icon-]{font-family:FontAwesome;font-weight:400;font-style:normal;text-decoration:inherit;-webkit-font-smoothing:antialiased;*margin-right:.3em}[class*=" icon-"]:before,[class^=icon-]:before{text-decoration:inherit;display:inline-block;speak:none}.icon-large:before{vertical-align:-10%;font-size:1.33333333em}a [class*=" icon-"],a [class^=icon-]{display:inline}[class*=" icon-"].icon-fixed-width,[class^=icon-].icon-fixed-width{display:inline-block;width:1.14285714em;text-align:right;padding-right:.28571429em}[class*=" icon-"].icon-fixed-width.icon-large,[class^=icon-].icon-fixed-width.icon-large{width:1.42857143em}.icons-ul{margin-left:2.14285714em;list-style-type:none}.icons-ul>li{position:relative}.icons-ul .icon-li{position:absolute;left:-2.14285714em;width:2.14285714em;text-align:center;line-height:inherit}[class*=" icon-"].hide,[class^=icon-].hide{display:none}.icon-muted{color:#eee}.icon-light{color:#fff}.icon-dark{color:#333}.icon-border{border:1px solid #eee;padding:.2em .25em .15em;border-radius:3px}.icon-2x{font-size:2em}.icon-2x.icon-border{border-width:2px;border-radius:4px}.icon-3x{font-size:3em}.icon-3x.icon-border{border-width:3px;border-radius:5px}.icon-4x{font-size:4em}.icon-4x.icon-border{border-width:4px;border-radius:6px}.icon-5x{font-size:5em}.icon-5x.icon-border{border-width:5px;border-radius:7px}[class*=" icon-"].pull-left,[class^=icon-].pull-left{margin-right:.3em}[class*=" icon-"].pull-right,[class^=icon-].pull-right{margin-left:.3em}[class*=" icon-"],[class^=icon-]{display:inline;width:auto;height:auto;line-height:normal;vertical-align:baseline;background-image:none;background-position:0 0;background-repeat:repeat;margin-top:0}.dropdown-menu>.active>a>[class*=" icon-"],.dropdown-menu>.active>a>[class^=icon-],.dropdown-menu>li>a:hover>[class*=" icon-"],.dropdown-menu>li>a:hover>[class^=icon-],.dropdown-submenu:hover>a>[class*=" icon-"],.dropdown-submenu:hover>a>[class^=icon-],.icon-white,.nav-list>.active>a>[class*=" icon-"],.nav-list>.active>a>[class^=icon-],.nav-pills>.active>a>[class*=" icon-"],.nav-pills>.active>a>[class^=icon-],.navbar-inverse .nav>.active>a>[class*=" icon-"],.navbar-inverse .nav>.active>a>[class^=icon-]{background-image:none}.btn [class*=" icon-"].icon-large,.btn [class^=icon-].icon-large,.nav [class*=" icon-"].icon-large,.nav [class^=icon-].icon-large{line-height:.9em}.btn [class*=" icon-"].icon-spin,.btn [class^=icon-].icon-spin,.nav [class*=" icon-"].icon-spin,.nav [class^=icon-].icon-spin{display:inline-block}.nav-pills [class*=" icon-"],.nav-pills [class*=" icon-"].icon-large,.nav-pills [class^=icon-],.nav-pills [class^=icon-].icon-large,.nav-tabs [class*=" icon-"],.nav-tabs [class*=" icon-"].icon-large,.nav-tabs [class^=icon-],.nav-tabs [class^=icon-].icon-large{line-height:.9em}.btn [class*=" icon-"].pull-left.icon-2x,.btn [class*=" icon-"].pull-right.icon-2x,.btn [class^=icon-].pull-left.icon-2x,.btn [class^=icon-].pull-right.icon-2x{margin-top:.18em}.btn [class*=" icon-"].icon-spin.icon-large,.btn [class^=icon-].icon-spin.icon-large{line-height:.8em}.btn.btn-small [class*=" icon-"].pull-left.icon-2x,.btn.btn-small [class*=" icon-"].pull-right.icon-2x,.btn.btn-small [class^=icon-].pull-left.icon-2x,.btn.btn-small [class^=icon-].pull-right.icon-2x{margin-top:.25em}.btn.btn-large [class*=" icon-"],.btn.btn-large [class^=icon-]{margin-top:0}.btn.btn-large [class*=" icon-"].pull-left.icon-2x,.btn.btn-large [class*=" icon-"].pull-right.icon-2x,.btn.btn-large [class^=icon-].pull-left.icon-2x,.btn.btn-large [class^=icon-].pull-right.icon-2x{margin-top:.05em}.btn.btn-large [class*=" icon-"].pull-left.icon-2x,.btn.btn-large [class^=icon-].pull-left.icon-2x{margin-right:.2em}.btn.btn-large [class*=" icon-"].pull-right.icon-2x,.btn.btn-large [class^=icon-].pull-right.icon-2x{margin-left:.2em}.nav-list [class*=" icon-"],.nav-list [class^=icon-]{line-height:inherit}.icon-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:-35%}.icon-stack [class*=" icon-"],.icon-stack [class^=icon-]{display:block;text-align:center;position:absolute;width:100%;height:100%;font-size:1em;line-height:inherit;*line-height:2em}.icon-stack .icon-stack-base{font-size:2em;*line-height:1em}.icon-spin{display:inline-block;-webkit-animation:spin 2s infinite linear;animation:spin 2s infinite linear}a .icon-spin,a .icon-stack{display:inline-block;text-decoration:none}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(359deg)}}@keyframes spin{0%{transform:rotate(0deg)}to{transform:rotate(359deg)}}.icon-rotate-90:before{-webkit-transform:rotate(90deg);transform:rotate(90deg);filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1)}.icon-rotate-180:before{-webkit-transform:rotate(180deg);transform:rotate(180deg);filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2)}.icon-rotate-270:before{-webkit-transform:rotate(270deg);transform:rotate(270deg);filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3)}.icon-flip-horizontal:before{-webkit-transform:scaleX(-1);transform:scaleX(-1)}.icon-flip-vertical:before{-webkit-transform:scaleY(-1);transform:scaleY(-1)}a .icon-flip-horizontal:before,a .icon-flip-vertical:before,a .icon-rotate-90:before,a .icon-rotate-180:before,a .icon-rotate-270:before{display:inline-block}.icon-glass:before{content:"\\F000"}.icon-music:before{content:"\\F001"}.icon-search:before{content:"\\F002"}.icon-envelope-alt:before{content:"\\F003"}.icon-heart:before{content:"\\F004"}.icon-star:before{content:"\\F005"}.icon-star-empty:before{content:"\\F006"}.icon-user:before{content:"\\F007"}.icon-film:before{content:"\\F008"}.icon-th-large:before{content:"\\F009"}.icon-th:before{content:"\\F00A"}.icon-th-list:before{content:"\\F00B"}.icon-ok:before{content:"\\F00C"}.icon-remove:before{content:"\\F00D"}.icon-zoom-in:before{content:"\\F00E"}.icon-zoom-out:before{content:"\\F010"}.icon-off:before,.icon-power-off:before{content:"\\F011"}.icon-signal:before{content:"\\F012"}.icon-cog:before,.icon-gear:before{content:"\\F013"}.icon-trash:before{content:"\\F014"}.icon-home:before{content:"\\F015"}.icon-file-alt:before{content:"\\F016"}.icon-time:before{content:"\\F017"}.icon-road:before{content:"\\F018"}.icon-download-alt:before{content:"\\F019"}.icon-download:before{content:"\\F01A"}.icon-upload:before{content:"\\F01B"}.icon-inbox:before{content:"\\F01C"}.icon-play-circle:before{content:"\\F01D"}.icon-repeat:before,.icon-rotate-right:before{content:"\\F01E"}.icon-refresh:before{content:"\\F021"}.icon-list-alt:before{content:"\\F022"}.icon-lock:before{content:"\\F023"}.icon-flag:before{content:"\\F024"}.icon-headphones:before{content:"\\F025"}.icon-volume-off:before{content:"\\F026"}.icon-volume-down:before{content:"\\F027"}.icon-volume-up:before{content:"\\F028"}.icon-qrcode:before{content:"\\F029"}.icon-barcode:before{content:"\\F02A"}.icon-tag:before{content:"\\F02B"}.icon-tags:before{content:"\\F02C"}.icon-book:before{content:"\\F02D"}.icon-bookmark:before{content:"\\F02E"}.icon-print:before{content:"\\F02F"}.icon-camera:before{content:"\\F030"}.icon-font:before{content:"\\F031"}.icon-bold:before{content:"\\F032"}.icon-italic:before{content:"\\F033"}.icon-text-height:before{content:"\\F034"}.icon-text-width:before{content:"\\F035"}.icon-align-left:before{content:"\\F036"}.icon-align-center:before{content:"\\F037"}.icon-align-right:before{content:"\\F038"}.icon-align-justify:before{content:"\\F039"}.icon-list:before{content:"\\F03A"}.icon-indent-left:before{content:"\\F03B"}.icon-indent-right:before{content:"\\F03C"}.icon-facetime-video:before{content:"\\F03D"}.icon-picture:before{content:"\\F03E"}.icon-pencil:before{content:"\\F040"}.icon-map-marker:before{content:"\\F041"}.icon-adjust:before{content:"\\F042"}.icon-tint:before{content:"\\F043"}.icon-edit:before{content:"\\F044"}.icon-share:before{content:"\\F045"}.icon-check:before{content:"\\F046"}.icon-move:before{content:"\\F047"}.icon-step-backward:before{content:"\\F048"}.icon-fast-backward:before{content:"\\F049"}.icon-backward:before{content:"\\F04A"}.icon-play:before{content:"\\F04B"}.icon-pause:before{content:"\\F04C"}.icon-stop:before{content:"\\F04D"}.icon-forward:before{content:"\\F04E"}.icon-fast-forward:before{content:"\\F050"}.icon-step-forward:before{content:"\\F051"}.icon-eject:before{content:"\\F052"}.icon-chevron-left:before{content:"\\F053"}.icon-chevron-right:before{content:"\\F054"}.icon-plus-sign:before{content:"\\F055"}.icon-minus-sign:before{content:"\\F056"}.icon-remove-sign:before{content:"\\F057"}.icon-ok-sign:before{content:"\\F058"}.icon-question-sign:before{content:"\\F059"}.icon-info-sign:before{content:"\\F05A"}.icon-screenshot:before{content:"\\F05B"}.icon-remove-circle:before{content:"\\F05C"}.icon-ok-circle:before{content:"\\F05D"}.icon-ban-circle:before{content:"\\F05E"}.icon-arrow-left:before{content:"\\F060"}.icon-arrow-right:before{content:"\\F061"}.icon-arrow-up:before{content:"\\F062"}.icon-arrow-down:before{content:"\\F063"}.icon-mail-forward:before,.icon-share-alt:before{content:"\\F064"}.icon-resize-full:before{content:"\\F065"}.icon-resize-small:before{content:"\\F066"}.icon-plus:before{content:"\\F067"}.icon-minus:before{content:"\\F068"}.icon-asterisk:before{content:"\\F069"}.icon-exclamation-sign:before{content:"\\F06A"}.icon-gift:before{content:"\\F06B"}.icon-leaf:before{content:"\\F06C"}.icon-fire:before{content:"\\F06D"}.icon-eye-open:before{content:"\\F06E"}.icon-eye-close:before{content:"\\F070"}.icon-warning-sign:before{content:"\\F071"}.icon-plane:before{content:"\\F072"}.icon-calendar:before{content:"\\F073"}.icon-random:before{content:"\\F074"}.icon-comment:before{content:"\\F075"}.icon-magnet:before{content:"\\F076"}.icon-chevron-up:before{content:"\\F077"}.icon-chevron-down:before{content:"\\F078"}.icon-retweet:before{content:"\\F079"}.icon-shopping-cart:before{content:"\\F07A"}.icon-folder-close:before{content:"\\F07B"}.icon-folder-open:before{content:"\\F07C"}.icon-resize-vertical:before{content:"\\F07D"}.icon-resize-horizontal:before{content:"\\F07E"}.icon-bar-chart:before{content:"\\F080"}.icon-twitter-sign:before{content:"\\F081"}.icon-facebook-sign:before{content:"\\F082"}.icon-camera-retro:before{content:"\\F083"}.icon-key:before{content:"\\F084"}.icon-cogs:before,.icon-gears:before{content:"\\F085"}.icon-comments:before{content:"\\F086"}.icon-thumbs-up-alt:before{content:"\\F087"}.icon-thumbs-down-alt:before{content:"\\F088"}.icon-star-half:before{content:"\\F089"}.icon-heart-empty:before{content:"\\F08A"}.icon-signout:before{content:"\\F08B"}.icon-linkedin-sign:before{content:"\\F08C"}.icon-pushpin:before{content:"\\F08D"}.icon-external-link:before{content:"\\F08E"}.icon-signin:before{content:"\\F090"}.icon-trophy:before{content:"\\F091"}.icon-github-sign:before{content:"\\F092"}.icon-upload-alt:before{content:"\\F093"}.icon-lemon:before{content:"\\F094"}.icon-phone:before{content:"\\F095"}.icon-check-empty:before,.icon-unchecked:before{content:"\\F096"}.icon-bookmark-empty:before{content:"\\F097"}.icon-phone-sign:before{content:"\\F098"}.icon-twitter:before{content:"\\F099"}.icon-facebook:before{content:"\\F09A"}.icon-github:before{content:"\\F09B"}.icon-unlock:before{content:"\\F09C"}.icon-credit-card:before{content:"\\F09D"}.icon-rss:before{content:"\\F09E"}.icon-hdd:before{content:"\\F0A0"}.icon-bullhorn:before{content:"\\F0A1"}.icon-bell:before{content:"\\F0A2"}.icon-certificate:before{content:"\\F0A3"}.icon-hand-right:before{content:"\\F0A4"}.icon-hand-left:before{content:"\\F0A5"}.icon-hand-up:before{content:"\\F0A6"}.icon-hand-down:before{content:"\\F0A7"}.icon-circle-arrow-left:before{content:"\\F0A8"}.icon-circle-arrow-right:before{content:"\\F0A9"}.icon-circle-arrow-up:before{content:"\\F0AA"}.icon-circle-arrow-down:before{content:"\\F0AB"}.icon-globe:before{content:"\\F0AC"}.icon-wrench:before{content:"\\F0AD"}.icon-tasks:before{content:"\\F0AE"}.icon-filter:before{content:"\\F0B0"}.icon-briefcase:before{content:"\\F0B1"}.icon-fullscreen:before{content:"\\F0B2"}.icon-group:before{content:"\\F0C0"}.icon-link:before{content:"\\F0C1"}.icon-cloud:before{content:"\\F0C2"}.icon-beaker:before{content:"\\F0C3"}.icon-cut:before{content:"\\F0C4"}.icon-copy:before{content:"\\F0C5"}.icon-paper-clip:before,.icon-paperclip:before{content:"\\F0C6"}.icon-save:before{content:"\\F0C7"}.icon-sign-blank:before{content:"\\F0C8"}.icon-reorder:before{content:"\\F0C9"}.icon-list-ul:before{content:"\\F0CA"}.icon-list-ol:before{content:"\\F0CB"}.icon-strikethrough:before{content:"\\F0CC"}.icon-underline:before{content:"\\F0CD"}.icon-table:before{content:"\\F0CE"}.icon-magic:before{content:"\\F0D0"}.icon-truck:before{content:"\\F0D1"}.icon-pinterest:before{content:"\\F0D2"}.icon-pinterest-sign:before{content:"\\F0D3"}.icon-google-plus-sign:before{content:"\\F0D4"}.icon-google-plus:before{content:"\\F0D5"}.icon-money:before{content:"\\F0D6"}.icon-caret-down:before{content:"\\F0D7"}.icon-caret-up:before{content:"\\F0D8"}.icon-caret-left:before{content:"\\F0D9"}.icon-caret-right:before{content:"\\F0DA"}.icon-columns:before{content:"\\F0DB"}.icon-sort:before{content:"\\F0DC"}.icon-sort-down:before{content:"\\F0DD"}.icon-sort-up:before{content:"\\F0DE"}.icon-envelope:before{content:"\\F0E0"}.icon-linkedin:before{content:"\\F0E1"}.icon-rotate-left:before,.icon-undo:before{content:"\\F0E2"}.icon-legal:before{content:"\\F0E3"}.icon-dashboard:before{content:"\\F0E4"}.icon-comment-alt:before{content:"\\F0E5"}.icon-comments-alt:before{content:"\\F0E6"}.icon-bolt:before{content:"\\F0E7"}.icon-sitemap:before{content:"\\F0E8"}.icon-umbrella:before{content:"\\F0E9"}.icon-paste:before{content:"\\F0EA"}.icon-lightbulb:before{content:"\\F0EB"}.icon-exchange:before{content:"\\F0EC"}.icon-cloud-download:before{content:"\\F0ED"}.icon-cloud-upload:before{content:"\\F0EE"}.icon-user-md:before{content:"\\F0F0"}.icon-stethoscope:before{content:"\\F0F1"}.icon-suitcase:before{content:"\\F0F2"}.icon-bell-alt:before{content:"\\F0F3"}.icon-coffee:before{content:"\\F0F4"}.icon-food:before{content:"\\F0F5"}.icon-file-text-alt:before{content:"\\F0F6"}.icon-building:before{content:"\\F0F7"}.icon-hospital:before{content:"\\F0F8"}.icon-ambulance:before{content:"\\F0F9"}.icon-medkit:before{content:"\\F0FA"}.icon-fighter-jet:before{content:"\\F0FB"}.icon-beer:before{content:"\\F0FC"}.icon-h-sign:before{content:"\\F0FD"}.icon-plus-sign-alt:before{content:"\\F0FE"}.icon-double-angle-left:before{content:"\\F100"}.icon-double-angle-right:before{content:"\\F101"}.icon-double-angle-up:before{content:"\\F102"}.icon-double-angle-down:before{content:"\\F103"}.icon-angle-left:before{content:"\\F104"}.icon-angle-right:before{content:"\\F105"}.icon-angle-up:before{content:"\\F106"}.icon-angle-down:before{content:"\\F107"}.icon-desktop:before{content:"\\F108"}.icon-laptop:before{content:"\\F109"}.icon-tablet:before{content:"\\F10A"}.icon-mobile-phone:before{content:"\\F10B"}.icon-circle-blank:before{content:"\\F10C"}.icon-quote-left:before{content:"\\F10D"}.icon-quote-right:before{content:"\\F10E"}.icon-spinner:before{content:"\\F110"}.icon-circle:before{content:"\\F111"}.icon-mail-reply:before,.icon-reply:before{content:"\\F112"}.icon-github-alt:before{content:"\\F113"}.icon-folder-close-alt:before{content:"\\F114"}.icon-folder-open-alt:before{content:"\\F115"}.icon-expand-alt:before{content:"\\F116"}.icon-collapse-alt:before{content:"\\F117"}.icon-smile:before{content:"\\F118"}.icon-frown:before{content:"\\F119"}.icon-meh:before{content:"\\F11A"}.icon-gamepad:before{content:"\\F11B"}.icon-keyboard:before{content:"\\F11C"}.icon-flag-alt:before{content:"\\F11D"}.icon-flag-checkered:before{content:"\\F11E"}.icon-terminal:before{content:"\\F120"}.icon-code:before{content:"\\F121"}.icon-mail-reply-all:before,.icon-reply-all:before{content:"\\F122"}.icon-star-half-empty:before,.icon-star-half-full:before{content:"\\F123"}.icon-location-arrow:before{content:"\\F124"}.icon-crop:before{content:"\\F125"}.icon-code-fork:before{content:"\\F126"}.icon-unlink:before{content:"\\F127"}.icon-question:before{content:"\\F128"}.icon-info:before{content:"\\F129"}.icon-exclamation:before{content:"\\F12A"}.icon-superscript:before{content:"\\F12B"}.icon-subscript:before{content:"\\F12C"}.icon-eraser:before{content:"\\F12D"}.icon-puzzle-piece:before{content:"\\F12E"}.icon-microphone:before{content:"\\F130"}.icon-microphone-off:before{content:"\\F131"}.icon-shield:before{content:"\\F132"}.icon-calendar-empty:before{content:"\\F133"}.icon-fire-extinguisher:before{content:"\\F134"}.icon-rocket:before{content:"\\F135"}.icon-maxcdn:before{content:"\\F136"}.icon-chevron-sign-left:before{content:"\\F137"}.icon-chevron-sign-right:before{content:"\\F138"}.icon-chevron-sign-up:before{content:"\\F139"}.icon-chevron-sign-down:before{content:"\\F13A"}.icon-html5:before{content:"\\F13B"}.icon-css3:before{content:"\\F13C"}.icon-anchor:before{content:"\\F13D"}.icon-unlock-alt:before{content:"\\F13E"}.icon-bullseye:before{content:"\\F140"}.icon-ellipsis-horizontal:before{content:"\\F141"}.icon-ellipsis-vertical:before{content:"\\F142"}.icon-rss-sign:before{content:"\\F143"}.icon-play-sign:before{content:"\\F144"}.icon-ticket:before{content:"\\F145"}.icon-minus-sign-alt:before{content:"\\F146"}.icon-check-minus:before{content:"\\F147"}.icon-level-up:before{content:"\\F148"}.icon-level-down:before{content:"\\F149"}.icon-check-sign:before{content:"\\F14A"}.icon-edit-sign:before{content:"\\F14B"}.icon-external-link-sign:before{content:"\\F14C"}.icon-share-sign:before{content:"\\F14D"}.icon-compass:before{content:"\\F14E"}.icon-collapse:before{content:"\\F150"}.icon-collapse-top:before{content:"\\F151"}.icon-expand:before{content:"\\F152"}.icon-eur:before,.icon-euro:before{content:"\\F153"}.icon-gbp:before{content:"\\F154"}.icon-dollar:before,.icon-usd:before{content:"\\F155"}.icon-inr:before,.icon-rupee:before{content:"\\F156"}.icon-jpy:before,.icon-yen:before{content:"\\F157"}.icon-cny:before,.icon-renminbi:before{content:"\\F158"}.icon-krw:before,.icon-won:before{content:"\\F159"}.icon-bitcoin:before,.icon-btc:before{content:"\\F15A"}.icon-file:before{content:"\\F15B"}.icon-file-text:before{content:"\\F15C"}.icon-sort-by-alphabet:before{content:"\\F15D"}.icon-sort-by-alphabet-alt:before{content:"\\F15E"}.icon-sort-by-attributes:before{content:"\\F160"}.icon-sort-by-attributes-alt:before{content:"\\F161"}.icon-sort-by-order:before{content:"\\F162"}.icon-sort-by-order-alt:before{content:"\\F163"}.icon-thumbs-up:before{content:"\\F164"}.icon-thumbs-down:before{content:"\\F165"}.icon-youtube-sign:before{content:"\\F166"}.icon-youtube:before{content:"\\F167"}.icon-xing:before{content:"\\F168"}.icon-xing-sign:before{content:"\\F169"}.icon-youtube-play:before{content:"\\F16A"}.icon-dropbox:before{content:"\\F16B"}.icon-stackexchange:before{content:"\\F16C"}.icon-instagram:before{content:"\\F16D"}.icon-flickr:before{content:"\\F16E"}.icon-adn:before{content:"\\F170"}.icon-bitbucket:before{content:"\\F171"}.icon-bitbucket-sign:before{content:"\\F172"}.icon-tumblr:before{content:"\\F173"}.icon-tumblr-sign:before{content:"\\F174"}.icon-long-arrow-down:before{content:"\\F175"}.icon-long-arrow-up:before{content:"\\F176"}.icon-long-arrow-left:before{content:"\\F177"}.icon-long-arrow-right:before{content:"\\F178"}.icon-apple:before{content:"\\F179"}.icon-windows:before{content:"\\F17A"}.icon-android:before{content:"\\F17B"}.icon-linux:before{content:"\\F17C"}.icon-dribbble:before{content:"\\F17D"}.icon-skype:before{content:"\\F17E"}.icon-foursquare:before{content:"\\F180"}.icon-trello:before{content:"\\F181"}.icon-female:before{content:"\\F182"}.icon-male:before{content:"\\F183"}.icon-gittip:before{content:"\\F184"}.icon-sun:before{content:"\\F185"}.icon-moon:before{content:"\\F186"}.icon-archive:before{content:"\\F187"}.icon-bug:before{content:"\\F188"}.icon-vk:before{content:"\\F189"}.icon-weibo:before{content:"\\F18A"}.icon-renren:before{content:"\\F18B"}.dropdown,.dropup{position:relative}.dropdown-toggle{*margin-bottom:-3px}.dropdown-toggle:active,.open .dropdown-toggle{outline:0}.caret{display:inline-block;width:0;height:0;vertical-align:top;border-top:4px solid #000;border-right:4px solid transparent;border-left:4px solid transparent;content:""}.dropdown .caret{margin-top:8px;margin-left:2px}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;margin:2px 0 0;list-style:none;background-color:#2b2f33;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);*border-right-width:2px;*border-bottom-width:2px;background-clip:padding-box}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu li.header-label{background-color:#1a1a1a;color:#676767;padding:3px 20px;font-size:13px}.dropdown-menu.arrow:before{content:"";display:block;position:absolute;border-style:solid;top:-20px;right:10%;width:0;height:0;margin-left:-10px;border-left:10px solid transparent;border-right:10px solid transparent;border-bottom:10px solid #2b2f33;border-top:10px solid transparent}.dropdown-menu .divider{*width:100%;height:1px;margin:9px 1px;*margin:-5px 0 5px;overflow:hidden;background-color:#1a1a1a;border-bottom:1px solid #1a1a1a}.dropdown-menu>li>a{font-size:12px;display:block;padding:3px 20px;clear:both;font-weight:400;line-height:20px;color:#d9d9d9;white-space:nowrap;border-bottom:1px solid #1a1a1a}.dropdown-menu>li>a.icon:before{padding-right:5px}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover,.dropdown-submenu:focus>a,.dropdown-submenu:hover>a{text-decoration:none;color:#fff}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{color:#fff;text-decoration:none;outline:0;background-color:#e23632;background-image:-webkit-gradient(linear,0 0,0 100%,from(#e33f3b),to(#e02925));background-image:-webkit-linear-gradient(top,#e33f3b,#e02925);background-image:linear-gradient(180deg,#e33f3b,#e02925);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=\'#ffe33f3b\',endColorstr=\'#ffe02925\',GradientType=0)}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{color:#999}.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);cursor:default}.open{*z-index:1000}.open>.dropdown-menu{display:block}.dropdown-backdrop{position:fixed;left:0;right:0;bottom:0;top:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px solid #000;content:""}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px}.dropdown-submenu{position:relative}.dropdown-submenu>.dropdown-menu{top:0;left:100%;margin-top:-6px;margin-left:-1px;border-radius:0 6px 6px 6px}.dropdown-submenu:hover>.dropdown-menu{display:block}.dropup .dropdown-submenu>.dropdown-menu{top:auto;bottom:0;margin-top:0;margin-bottom:-2px;border-radius:5px 5px 5px 0}.dropdown-submenu>a:after{display:block;content:" ";float:right;width:0;height:0;border-color:transparent;border-style:solid;border-width:5px 0 5px 5px;border-left-color:#000;margin-top:5px;margin-right:-10px}.dropdown-submenu:hover>a:after{border-left-color:#fff}.dropdown-submenu.pull-left{float:none}.dropdown-submenu.pull-left>.dropdown-menu{left:-100%;margin-left:10px;border-radius:6px 0 6px 6px}.dropdown .dropdown-menu .nav-header{padding-left:20px;padding-right:20px}.typeahead{z-index:1051;margin-top:2px;border-radius:0}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-large{padding:24px;border-radius:6px}.well-small{padding:9px;border-radius:3px}.fade{opacity:0;-webkit-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{position:relative;height:0;overflow:hidden;-webkit-transition:height .35s ease;transition:height .35s ease}.collapse.in{height:auto}.close{float:right;font-size:20px;font-weight:700;line-height:20px;color:#000;text-shadow:0 1px 0 #fff;opacity:.2;filter:alpha(opacity=20)}.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer;opacity:.4;filter:alpha(opacity=40)}button.close{padding:0;cursor:pointer;background:transparent;border:0;-webkit-appearance:none}.btn{display:inline-block;*display:inline;*zoom:1;padding:4px 12px;margin-bottom:0;font-size:14px;line-height:20px;text-align:center;vertical-align:middle;cursor:pointer;color:#333;text-shadow:0 1px 1px hsla(0,0%,100%,.75);background-color:#f5f5f5;background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#e6e6e6));background-image:-webkit-linear-gradient(top,#fff,#e6e6e6);background-image:linear-gradient(180deg,#fff,#e6e6e6);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=\'#ffffffff\',endColorstr=\'#ffe6e6e6\',GradientType=0);border-color:#e6e6e6 #e6e6e6 #bfbfbf;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);*background-color:#e6e6e6;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);border:1px solid #ccc;*border:0;border-bottom-color:#b3b3b3;border-radius:0;*margin-left:.3em;box-shadow:inset 0 1px 0 hsla(0,0%,100%,.2),0 1px 2px rgba(0,0,0,.05)}.btn.active,.btn.disabled,.btn:active,.btn:focus,.btn:hover,.btn[disabled]{color:#333;background-color:#e6e6e6;*background-color:#d9d9d9}.btn.active,.btn:active{background-color:#ccc\\9}.btn:first-child{*margin-left:0}.btn:focus,.btn:hover{color:#333;text-decoration:none;background-position:0 -15px;-webkit-transition:background-position .1s linear;transition:background-position .1s linear}.btn:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.active,.btn:active{background-image:none;outline:0;box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05)}.btn.disabled,.btn[disabled]{cursor:default;background-image:none;opacity:.65;filter:alpha(opacity=65);box-shadow:none}.btn-large{padding:11px 19px;font-size:17.5px;border-radius:6px}.btn-large [class*=" icon-"],.btn-large [class^=icon-]{margin-top:4px}.btn-small{padding:2px 10px;font-size:11.9px;border-radius:3px}.btn-small [class*=" icon-"],.btn-small [class^=icon-]{margin-top:0}.btn-mini [class*=" icon-"],.btn-mini [class^=icon-]{margin-top:-1px}.btn-mini{padding:0 6px;font-size:10.5px;border-radius:3px}.btn-block{display:block;width:100%;padding-left:0;padding-right:0;box-sizing:border-box}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.btn-danger.active,.btn-info.active,.btn-inverse.active,.btn-primary.active,.btn-success.active,.btn-warning.active{color:hsla(0,0%,100%,.75)}.btn-primary{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#e3553b;background-image:-webkit-gradient(linear,0 0,0 100%,from(#e33f3b),to(#e3773b));background-image:-webkit-linear-gradient(top,#e33f3b,#e3773b);background-image:linear-gradient(180deg,#e33f3b,#e3773b);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=\'#ffe33f3b\',endColorstr=\'#ffe3773b\',GradientType=0);border-color:#e3773b #e3773b #b7521a;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);*background-color:#e3773b;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false)}.btn-primary.active,.btn-primary.disabled,.btn-primary:active,.btn-primary:focus,.btn-primary:hover,.btn-primary[disabled]{color:#fff;background-color:#e3773b;*background-color:#e06825}.btn-primary.active,.btn-primary:active{background-color:#ce5c1d\\9}.btn-warning{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#f58258;background-image:-webkit-gradient(linear,0 0,0 100%,from(#f79875),to(#f3622d));background-image:-webkit-linear-gradient(top,#f79875,#f3622d);background-image:linear-gradient(180deg,#f79875,#f3622d);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=\'#fff79875\',endColorstr=\'#fff3622d\',GradientType=0);border-color:#f3622d #f3622d #c83e0b;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);*background-color:#f3622d;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false)}.btn-warning.active,.btn-warning.disabled,.btn-warning:active,.btn-warning:focus,.btn-warning:hover,.btn-warning[disabled]{color:#fff;background-color:#f3622d;*background-color:#f25015}.btn-warning.active,.btn-warning:active{background-color:#e0450d\\9}.btn-danger{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#da4f49;background-image:-webkit-gradient(linear,0 0,0 100%,from(#ee5f5b),to(#bd362f));background-image:-webkit-linear-gradient(top,#ee5f5b,#bd362f);background-image:linear-gradient(180deg,#ee5f5b,#bd362f);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=\'#ffee5f5b\',endColorstr=\'#ffbd362f\',GradientType=0);border-color:#bd362f #bd362f #802420;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);*background-color:#bd362f;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false)}.btn-danger.active,.btn-danger.disabled,.btn-danger:active,.btn-danger:focus,.btn-danger:hover,.btn-danger[disabled]{color:#fff;background-color:#bd362f;*background-color:#a9302a}.btn-danger.active,.btn-danger:active{background-color:#942a25\\9}.btn-success{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#5bb75b;background-image:-webkit-gradient(linear,0 0,0 100%,from(#62c462),to(#51a351));background-image:-webkit-linear-gradient(top,#62c462,#51a351);background-image:linear-gradient(180deg,#62c462,#51a351);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=\'#ff62c462\',endColorstr=\'#ff51a351\',GradientType=0);border-color:#51a351 #51a351 #387038;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);*background-color:#51a351;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false)}.btn-success.active,.btn-success.disabled,.btn-success:active,.btn-success:focus,.btn-success:hover,.btn-success[disabled]{color:#fff;background-color:#51a351;*background-color:#499249}.btn-success.active,.btn-success:active{background-color:#408140\\9}.btn-info{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#49afcd;background-image:-webkit-gradient(linear,0 0,0 100%,from(#5bc0de),to(#2f96b4));background-image:-webkit-linear-gradient(top,#5bc0de,#2f96b4);background-image:linear-gradient(180deg,#5bc0de,#2f96b4);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=\'#ff5bc0de\',endColorstr=\'#ff2f96b4\',GradientType=0);border-color:#2f96b4 #2f96b4 #1f6377;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);*background-color:#2f96b4;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false)}.btn-info.active,.btn-info.disabled,.btn-info:active,.btn-info:focus,.btn-info:hover,.btn-info[disabled]{color:#fff;background-color:#2f96b4;*background-color:#2a85a0}.btn-info.active,.btn-info:active{background-color:#24748c\\9}.btn-inverse{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#363636;background-image:-webkit-gradient(linear,0 0,0 100%,from(#444),to(#222));background-image:-webkit-linear-gradient(top,#444,#222);background-image:linear-gradient(180deg,#444,#222);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=\'#ff444444\',endColorstr=\'#ff222222\',GradientType=0);border-color:#222 #222 #000;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);*background-color:#222;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false)}.btn-inverse.active,.btn-inverse.disabled,.btn-inverse:active,.btn-inverse:focus,.btn-inverse:hover,.btn-inverse[disabled]{color:#fff;background-color:#222;*background-color:#151515}.btn-inverse.active,.btn-inverse:active{background-color:#080808\\9}button.btn,input[type=submit].btn{*padding-top:3px;*padding-bottom:3px}button.btn::-moz-focus-inner,input[type=submit].btn::-moz-focus-inner{padding:0;border:0}button.btn.btn-large,input[type=submit].btn.btn-large{*padding-top:7px;*padding-bottom:7px}button.btn.btn-small,input[type=submit].btn.btn-small{*padding-top:3px;*padding-bottom:3px}button.btn.btn-mini,input[type=submit].btn.btn-mini{*padding-top:1px;*padding-bottom:1px}.btn-link,.btn-link:active,.btn-link[disabled]{background-color:transparent;background-image:none;box-shadow:none}.btn-link{border-color:transparent;cursor:pointer;color:#e33f3b;border-radius:0}.btn-link:focus,.btn-link:hover{color:#af2d24;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover{color:#333;text-decoration:none}.btn-group{position:relative;display:inline-block;*display:inline;*zoom:1;font-size:0;vertical-align:middle;white-space:nowrap;*margin-left:.3em}.btn-group:first-child{*margin-left:0}.btn-group+.btn-group{margin-left:5px}.btn-toolbar{font-size:0;margin-top:10px;margin-bottom:10px}.btn-toolbar>.btn+.btn,.btn-toolbar>.btn+.btn-group,.btn-toolbar>.btn-group+.btn{margin-left:5px}.btn-group>.btn{position:relative;border-radius:0}.btn-group>.btn+.btn{margin-left:-1px}.btn-group>.btn,.btn-group>.dropdown-menu,.btn-group>.popover{font-size:14px}.btn-group>.btn-mini{font-size:10.5px}.btn-group>.btn-small{font-size:11.9px}.btn-group>.btn-large{font-size:17.5px}.btn-group>.btn:first-child{margin-left:0;border-top-left-radius:0;border-bottom-left-radius:0}.btn-group>.btn:last-child,.btn-group>.dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn.large:first-child{margin-left:0;border-top-left-radius:6px;border-bottom-left-radius:6px}.btn-group>.btn.large:last-child,.btn-group>.large.dropdown-toggle{border-top-right-radius:6px;border-bottom-right-radius:6px}.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:2}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding:5px 8px;box-shadow:inset 1px 0 0 hsla(0,0%,100%,.125),inset 0 1px 0 hsla(0,0%,100%,.2),0 1px 2px rgba(0,0,0,.05)}.btn-group>.btn-mini+.dropdown-toggle{padding:2px 5px}.btn-group>.btn-small+.dropdown-toggle{*padding-top:5px;*padding-bottom:4px}.btn-group>.btn-large+.dropdown-toggle{padding:7px 12px}.btn-group.open .dropdown-toggle{background-image:none;box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05)}.btn-group.open .btn.dropdown-toggle{background-color:#e6e6e6}.btn-group.open .btn-primary.dropdown-toggle{background-color:#e3773b}.btn-group.open .btn-warning.dropdown-toggle{background-color:#f3622d}.btn-group.open .btn-danger.dropdown-toggle{background-color:#bd362f}.btn-group.open .btn-success.dropdown-toggle{background-color:#51a351}.btn-group.open .btn-info.dropdown-toggle{background-color:#2f96b4}.btn-group.open .btn-inverse.dropdown-toggle{background-color:#222}.btn .caret{margin-top:8px;margin-left:0}.btn-large .caret{margin-top:6px;border-left-width:5px;border-right-width:5px;border-top-width:5px}.btn-mini .caret,.btn-small .caret{margin-top:8px}.dropup .btn-large .caret{border-bottom-width:5px}.btn-danger .caret,.btn-info .caret,.btn-inverse .caret,.btn-primary .caret,.btn-success .caret,.btn-warning .caret{border-top-color:#fff;border-bottom-color:#fff}.btn-group-vertical{display:inline-block;*display:inline;*zoom:1}.btn-group-vertical>.btn{display:block;float:none;max-width:100%;border-radius:0}.btn-group-vertical>.btn+.btn{margin-left:0;margin-top:-1px}.btn-group-vertical>.btn:first-child,.btn-group-vertical>.btn:last-child{border-radius:0 0 0 0}.btn-group-vertical>.btn-large:first-child{border-radius:6px 6px 0 0}.btn-group-vertical>.btn-large:last-child{border-radius:0 0 6px 6px}.alert{padding:8px 35px 8px 14px;margin-bottom:20px;text-shadow:0 1px 0 hsla(0,0%,100%,.5);background-color:#fcf8e3;border:1px solid #fbeed5;border-radius:0}.alert,.alert h4{color:#c09853}.alert h4{margin:0}.alert .close{position:relative;top:-2px;right:-21px;line-height:20px}.alert-success{background-color:#dff0d8;border-color:#d6e9c6;color:#468847}.alert-success h4{color:#468847}.alert-danger,.alert-error{background-color:#f2dede;border-color:#eed3d7;color:#b94a48}.alert-danger h4,.alert-error h4{color:#b94a48}.alert-info{background-color:#d9edf7;border-color:#bce8f1}.alert-info,.alert-info h4{color:#3a87ad}.alert-block{padding-top:14px;padding-bottom:14px}.alert-block>p,.alert-block>ul{margin-bottom:0}.alert-block p+p{margin-top:5px}.nav{margin-left:0;margin-bottom:20px;list-style:none}.nav>li>a{display:block}.nav>li>a:focus,.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>li>a>img{max-width:none}.nav>.pull-right{float:right}.nav-header{display:block;padding:3px 15px;line-height:20px;color:#999;text-shadow:0 1px 0 hsla(0,0%,100%,.5)}.nav li+.nav-header{margin-top:9px}.nav-list{padding-left:15px;padding-right:15px;margin-bottom:0}.nav-list .nav-header,.nav-list>li>a{margin-left:-15px;margin-right:-15px;text-shadow:0 1px 0 hsla(0,0%,100%,.5)}.nav-list>li>a{padding:3px 15px}.nav-list>.active>a,.nav-list>.active>a:focus,.nav-list>.active>a:hover{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.2);background-color:#e33f3b}.nav-list [class*=" icon-"],.nav-list [class^=icon-]{margin-right:2px}.nav-list .divider{*width:100%;height:1px;margin:9px 1px;*margin:-5px 0 5px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #fff}.nav-pills,.nav-tabs{*zoom:1}.nav-pills:after,.nav-pills:before,.nav-tabs:after,.nav-tabs:before{display:table;content:"";line-height:0}.nav-pills:after,.nav-tabs:after{clear:both}.nav-pills>li,.nav-tabs>li{float:left}.nav-pills>li>a,.nav-tabs>li>a{padding-right:12px;padding-left:12px;margin-right:2px;line-height:14px}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{margin-bottom:-1px}.nav-tabs>li>a{padding-top:8px;padding-bottom:8px;line-height:20px;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:focus,.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>.active>a,.nav-tabs>.active>a:focus,.nav-tabs>.active>a:hover{color:#555;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent;cursor:default}.nav-pills>li>a{padding-top:8px;padding-bottom:8px;margin-top:2px;margin-bottom:2px;border-radius:5px}.nav-pills>.active>a,.nav-pills>.active>a:focus,.nav-pills>.active>a:hover{color:#fff;background-color:#e33f3b}.nav-stacked>li{float:none}.nav-stacked>li>a{margin-right:0}.nav-tabs.nav-stacked{border-bottom:0}.nav-tabs.nav-stacked>li>a{border:1px solid #ddd;border-radius:0}.nav-tabs.nav-stacked>li:first-child>a{-webkit-border-top-right-radius:4px;-moz-border-radius-topright:4px;-webkit-border-top-left-radius:4px;-moz-border-radius-topleft:4px;border-top-right-radius:4px;border-top-left-radius:4px}.nav-tabs.nav-stacked>li:last-child>a{-webkit-border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px;-webkit-border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.nav-tabs.nav-stacked>li>a:focus,.nav-tabs.nav-stacked>li>a:hover{border-color:#ddd;z-index:2}.nav-pills.nav-stacked>li>a{margin-bottom:3px}.nav-pills.nav-stacked>li:last-child>a{margin-bottom:1px}.nav-tabs .dropdown-menu{border-radius:0 0 6px 6px}.nav-pills .dropdown-menu{border-radius:6px}.nav .dropdown-toggle .caret{border-top-color:#e33f3b;border-bottom-color:#e33f3b;margin-top:6px}.nav .dropdown-toggle:focus .caret,.nav .dropdown-toggle:hover .caret{border-top-color:#af2d24;border-bottom-color:#af2d24}.nav-tabs .dropdown-toggle .caret{margin-top:8px}.nav .active .dropdown-toggle .caret{border-top-color:#fff;border-bottom-color:#fff}.nav-tabs .active .dropdown-toggle .caret{border-top-color:#555;border-bottom-color:#555}.nav>.dropdown.active>a:focus,.nav>.dropdown.active>a:hover{cursor:pointer}.nav-pills .open .dropdown-toggle,.nav-tabs .open .dropdown-toggle,.nav>li.dropdown.open.active>a:focus,.nav>li.dropdown.open.active>a:hover{color:#fff;background-color:#999;border-color:#999}.nav li.dropdown.open.active .caret,.nav li.dropdown.open .caret,.nav li.dropdown.open a:focus .caret,.nav li.dropdown.open a:hover .caret{border-top-color:#fff;border-bottom-color:#fff;opacity:1;filter:alpha(opacity=100)}.tabs-stacked .open>a:focus,.tabs-stacked .open>a:hover{border-color:#999}.tabbable{*zoom:1}.tabbable:after,.tabbable:before{display:table;content:"";line-height:0}.tabbable:after{clear:both}.tab-content{overflow:auto}.tabs-below>.nav-tabs,.tabs-left>.nav-tabs,.tabs-right>.nav-tabs{border-bottom:0}.pill-content>.pill-pane,.tab-content>.tab-pane{display:none}.pill-content>.active,.tab-content>.active{display:block}.tabs-below>.nav-tabs{border-top:1px solid #ddd}.tabs-below>.nav-tabs>li{margin-top:-1px;margin-bottom:0}.tabs-below>.nav-tabs>li>a{border-radius:0 0 4px 4px}.tabs-below>.nav-tabs>li>a:focus,.tabs-below>.nav-tabs>li>a:hover{border-bottom-color:transparent;border-top-color:#ddd}.tabs-below>.nav-tabs>.active>a,.tabs-below>.nav-tabs>.active>a:focus,.tabs-below>.nav-tabs>.active>a:hover{border-color:transparent #ddd #ddd}.tabs-left>.nav-tabs>li,.tabs-right>.nav-tabs>li{float:none}.tabs-left>.nav-tabs>li>a,.tabs-right>.nav-tabs>li>a{min-width:74px;margin-right:0;margin-bottom:3px}.tabs-left>.nav-tabs{float:left;margin-right:19px;border-right:1px solid #ddd}.tabs-left>.nav-tabs>li>a{margin-right:-1px;border-radius:4px 0 0 4px}.tabs-left>.nav-tabs>li>a:focus,.tabs-left>.nav-tabs>li>a:hover{border-color:#eee #ddd #eee #eee}.tabs-left>.nav-tabs .active>a,.tabs-left>.nav-tabs .active>a:focus,.tabs-left>.nav-tabs .active>a:hover{border-color:#ddd transparent #ddd #ddd;*border-right-color:#fff}.tabs-right>.nav-tabs{float:right;margin-left:19px;border-left:1px solid #ddd}.tabs-right>.nav-tabs>li>a{margin-left:-1px;border-radius:0 4px 4px 0}.tabs-right>.nav-tabs>li>a:focus,.tabs-right>.nav-tabs>li>a:hover{border-color:#eee #eee #eee #ddd}.tabs-right>.nav-tabs .active>a,.tabs-right>.nav-tabs .active>a:focus,.tabs-right>.nav-tabs .active>a:hover{border-color:#ddd #ddd #ddd transparent;*border-left-color:#fff}.nav>.disabled>a{color:#999}.nav>.disabled>a:focus,.nav>.disabled>a:hover{text-decoration:none;background-color:transparent;cursor:default}.navbar{overflow:visible;margin-bottom:20px;*position:relative;*z-index:2}.navbar-inner{min-height:40px;padding-left:20px;padding-right:20px;background-color:#fafafa;background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#f2f2f2));background-image:-webkit-linear-gradient(top,#fff,#f2f2f2);background-image:linear-gradient(180deg,#fff,#f2f2f2);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=\'#ffffffff\',endColorstr=\'#fff2f2f2\',GradientType=0);border:1px solid #d4d4d4;border-radius:0;box-shadow:0 1px 4px rgba(0,0,0,.065);*zoom:1}.navbar-inner:after,.navbar-inner:before{display:table;content:"";line-height:0}.navbar-inner:after{clear:both}.navbar .container{width:auto}.nav-collapse.collapse{height:auto;overflow:visible}.navbar .brand{float:left;display:block;padding:10px 20px;margin-left:-20px;font-size:20px;font-weight:200;color:#777;text-shadow:0 1px 0 #fff}.navbar .brand:focus,.navbar .brand:hover{text-decoration:none}.navbar-text{margin-bottom:0;line-height:40px;color:#777}.navbar-link{color:#777}.navbar-link:focus,.navbar-link:hover{color:#333}.navbar .divider-vertical{height:40px;margin:0 9px;border-left:1px solid #f2f2f2;border-right:1px solid #fff}.navbar .btn,.navbar .btn-group{margin-top:5px}.navbar .btn-group .btn,.navbar .input-append .btn,.navbar .input-append .btn-group,.navbar .input-prepend .btn,.navbar .input-prepend .btn-group{margin-top:0}.navbar-form{margin-bottom:0;*zoom:1}.navbar-form:after,.navbar-form:before{display:table;content:"";line-height:0}.navbar-form:after{clear:both}.navbar-form .checkbox,.navbar-form .radio,.navbar-form input,.navbar-form select{margin-top:5px}.navbar-form .btn,.navbar-form input,.navbar-form select{display:inline-block;margin-bottom:0}.navbar-form input[type=checkbox],.navbar-form input[type=image],.navbar-form input[type=radio]{margin-top:3px}.navbar-form .input-append,.navbar-form .input-prepend{margin-top:0;white-space:nowrap}.navbar-form .input-append input,.navbar-form .input-prepend input{margin-top:0}.navbar-search{position:relative;float:left;margin-top:5px;margin-bottom:0}.navbar-search .search-query{margin-bottom:0;padding:4px 14px;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:13px;font-weight:400;line-height:1;border-radius:15px}.navbar-static-top{position:static;margin-bottom:0}.navbar-static-top .navbar-inner{border-radius:0}.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030;margin-bottom:0}.navbar-fixed-top .navbar-inner,.navbar-static-top .navbar-inner{border-width:0 0 1px}.navbar-fixed-bottom .navbar-inner{border-width:1px 0 0}.navbar-fixed-bottom .navbar-inner,.navbar-fixed-top .navbar-inner{padding-left:0;padding-right:0;border-radius:0}.navbar-fixed-bottom .container,.navbar-fixed-top .container,.navbar-static-top .container{width:940px}.navbar-fixed-top{top:0}.navbar-fixed-top .navbar-inner,.navbar-static-top .navbar-inner{box-shadow:0 1px 10px rgba(0,0,0,.1)}.navbar-fixed-bottom{bottom:0}.navbar-fixed-bottom .navbar-inner{box-shadow:0 -1px 10px rgba(0,0,0,.1)}.navbar .nav{position:relative;left:0;display:block;float:left;margin:0 10px 0 0}.navbar .nav.pull-right{float:right;margin-right:0}.navbar .nav>li{float:left}.navbar .nav>li>a{float:none;padding:10px 15px;color:#777;text-decoration:none;text-shadow:0 1px 0 #fff}.navbar .nav .dropdown-toggle .caret{margin-top:8px}.navbar .nav>li>a:focus,.navbar .nav>li>a:hover{background-color:transparent;color:#333;text-decoration:none}.navbar .nav>.active>a,.navbar .nav>.active>a:focus,.navbar .nav>.active>a:hover{color:#555;text-decoration:none;background-color:#e5e5e5;box-shadow:inset 0 3px 8px rgba(0,0,0,.125)}.navbar .btn-navbar{display:none;float:right;padding:7px 10px;margin-left:5px;margin-right:5px;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#ededed;background-image:-webkit-gradient(linear,0 0,0 100%,from(#f2f2f2),to(#e5e5e5));background-image:-webkit-linear-gradient(top,#f2f2f2,#e5e5e5);background-image:linear-gradient(180deg,#f2f2f2,#e5e5e5);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=\'#fff2f2f2\',endColorstr=\'#ffe5e5e5\',GradientType=0);border-color:#e5e5e5 #e5e5e5 #bfbfbf;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);*background-color:#e5e5e5;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);box-shadow:inset 0 1px 0 hsla(0,0%,100%,.1),0 1px 0 hsla(0,0%,100%,.075)}.navbar .btn-navbar.active,.navbar .btn-navbar.disabled,.navbar .btn-navbar:active,.navbar .btn-navbar:focus,.navbar .btn-navbar:hover,.navbar .btn-navbar[disabled]{color:#fff;background-color:#e5e5e5;*background-color:#d9d9d9}.navbar .btn-navbar.active,.navbar .btn-navbar:active{background-color:#ccc\\9}.navbar .btn-navbar .icon-bar{display:block;width:18px;height:2px;background-color:#f5f5f5;border-radius:1px;box-shadow:0 1px 0 rgba(0,0,0,.25)}.btn-navbar .icon-bar+.icon-bar{margin-top:3px}.navbar .nav>li>.dropdown-menu:before{content:\'\';display:inline-block;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-bottom-color:rgba(0,0,0,.2);position:absolute;top:-7px;left:9px}.navbar .nav>li>.dropdown-menu:after{content:\'\';display:inline-block;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #2b2f33;position:absolute;top:-6px;left:10px}.navbar-fixed-bottom .nav>li>.dropdown-menu:before{border-top:7px solid #ccc;border-top-color:rgba(0,0,0,.2);border-bottom:0;bottom:-7px;top:auto}.navbar-fixed-bottom .nav>li>.dropdown-menu:after{border-top:6px solid #2b2f33;border-bottom:0;bottom:-6px;top:auto}.navbar .nav li.dropdown>a:focus .caret,.navbar .nav li.dropdown>a:hover .caret{border-top-color:#333;border-bottom-color:#333}.navbar .nav li.dropdown.active>.dropdown-toggle,.navbar .nav li.dropdown.open.active>.dropdown-toggle,.navbar .nav li.dropdown.open>.dropdown-toggle{background-color:#e5e5e5;color:#555}.navbar .nav li.dropdown>.dropdown-toggle .caret{border-top-color:#777;border-bottom-color:#777}.navbar .nav li.dropdown.active>.dropdown-toggle .caret,.navbar .nav li.dropdown.open.active>.dropdown-toggle .caret,.navbar .nav li.dropdown.open>.dropdown-toggle .caret{border-top-color:#555;border-bottom-color:#555}.navbar .nav>li>.dropdown-menu.pull-right,.navbar .pull-right>li>.dropdown-menu{left:auto;right:0}.navbar .nav>li>.dropdown-menu.pull-right:before,.navbar .pull-right>li>.dropdown-menu:before{left:auto;right:12px}.navbar .nav>li>.dropdown-menu.pull-right:after,.navbar .pull-right>li>.dropdown-menu:after{left:auto;right:13px}.navbar .nav>li>.dropdown-menu.pull-right .dropdown-menu,.navbar .pull-right>li>.dropdown-menu .dropdown-menu{left:auto;right:100%;margin-left:0;margin-right:-1px;border-radius:6px 0 6px 6px}.navbar-inverse .navbar-inner{background-color:#1b1b1b;background-image:-webkit-gradient(linear,0 0,0 100%,from(#222),to(#111));background-image:-webkit-linear-gradient(top,#222,#111);background-image:linear-gradient(180deg,#222,#111);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=\'#ff222222\',endColorstr=\'#ff111111\',GradientType=0);border-color:#252525}.navbar-inverse .brand,.navbar-inverse .nav>li>a{color:#999;text-shadow:0 -1px 0 rgba(0,0,0,.25)}.navbar-inverse .brand:focus,.navbar-inverse .brand:hover,.navbar-inverse .nav>li>a:focus,.navbar-inverse .nav>li>a:hover{color:#fff}.navbar-inverse .brand,.navbar-inverse .navbar-text{color:#999}.navbar-inverse .nav>li>a:focus,.navbar-inverse .nav>li>a:hover{background-color:transparent;color:#fff}.navbar-inverse .nav .active>a,.navbar-inverse .nav .active>a:focus,.navbar-inverse .nav .active>a:hover{color:#fff;background-color:#111}.navbar-inverse .navbar-link{color:#999}.navbar-inverse .navbar-link:focus,.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .divider-vertical{border-left-color:#111;border-right-color:#222}.navbar-inverse .nav li.dropdown.active>.dropdown-toggle,.navbar-inverse .nav li.dropdown.open.active>.dropdown-toggle,.navbar-inverse .nav li.dropdown.open>.dropdown-toggle{background-color:#111;color:#fff}.navbar-inverse .nav li.dropdown>a:focus .caret,.navbar-inverse .nav li.dropdown>a:hover .caret{border-top-color:#fff;border-bottom-color:#fff}.navbar-inverse .nav li.dropdown>.dropdown-toggle .caret{border-top-color:#999;border-bottom-color:#999}.navbar-inverse .nav li.dropdown.active>.dropdown-toggle .caret,.navbar-inverse .nav li.dropdown.open.active>.dropdown-toggle .caret,.navbar-inverse .nav li.dropdown.open>.dropdown-toggle .caret{border-top-color:#fff;border-bottom-color:#fff}.navbar-inverse .navbar-search .search-query{color:#fff;background-color:#515151;border-color:#111;box-shadow:inset 0 1px 2px rgba(0,0,0,.1),0 1px 0 hsla(0,0%,100%,.15);-webkit-transition:none;transition:none}.navbar-inverse .navbar-search .search-query:-moz-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query:-ms-input-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query::-webkit-input-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query.focused,.navbar-inverse .navbar-search .search-query:focus{padding:5px 15px;color:#333;text-shadow:0 1px 0 #fff;background-color:#fff;border:0;box-shadow:0 0 3px rgba(0,0,0,.15);outline:0}.navbar-inverse .btn-navbar{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#0e0e0e;background-image:-webkit-gradient(linear,0 0,0 100%,from(#151515),to(#040404));background-image:-webkit-linear-gradient(top,#151515,#040404);background-image:linear-gradient(180deg,#151515,#040404);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=\'#ff151515\',endColorstr=\'#ff040404\',GradientType=0);border-color:#040404 #040404 #000;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);*background-color:#040404;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false)}.navbar-inverse .btn-navbar.active,.navbar-inverse .btn-navbar.disabled,.navbar-inverse .btn-navbar:active,.navbar-inverse .btn-navbar:focus,.navbar-inverse .btn-navbar:hover,.navbar-inverse .btn-navbar[disabled]{color:#fff;background-color:#040404;*background-color:#000}.navbar-inverse .btn-navbar.active,.navbar-inverse .btn-navbar:active{background-color:#000\\9}.breadcrumb{padding:8px 15px;margin:0 0 20px;list-style:none;background-color:#f5f5f5;border-radius:0}.breadcrumb>li{display:inline-block;*display:inline;*zoom:1;text-shadow:0 1px 0 #fff}.breadcrumb>li>.divider{padding:0 5px;color:#ccc}.breadcrumb>.active{color:#999}.pagination ul{display:inline-block;*display:inline;*zoom:1;margin-left:0;margin-bottom:0;border-radius:0;box-shadow:0 1px 2px rgba(0,0,0,.05)}.pagination ul>li{display:inline}.pagination ul>li>a,.pagination ul>li>span{float:left;padding:4px 12px;line-height:20px;text-decoration:none;background-color:#fff;border:1px solid #ddd;border-left-width:0}.pagination ul>.active>a,.pagination ul>.active>span,.pagination ul>li>a:focus,.pagination ul>li>a:hover{background-color:#f5f5f5}.pagination ul>.active>a,.pagination ul>.active>span{color:#999;cursor:default}.pagination ul>.disabled>a,.pagination ul>.disabled>a:focus,.pagination ul>.disabled>a:hover,.pagination ul>.disabled>span{color:#999;background-color:transparent;cursor:default}.pagination ul>li:first-child>a,.pagination ul>li:first-child>span{border-left-width:1px;-webkit-border-top-left-radius:0;-moz-border-radius-topleft:0;border-bottom-left-radius:0;border-top-left-radius:0}.pagination ul>li:last-child>a,.pagination ul>li:last-child>span{-webkit-border-top-right-radius:0;-moz-border-radius-topright:0;border-bottom-right-radius:0;border-top-right-radius:0}.pagination-large ul>li>a,.pagination-large ul>li>span{padding:11px 19px;font-size:17.5px}.pagination-large ul>li:first-child>a,.pagination-large ul>li:first-child>span{-webkit-border-top-left-radius:6px;-moz-border-radius-topleft:6px;border-bottom-left-radius:6px;border-top-left-radius:6px}.pagination-large ul>li:last-child>a,.pagination-large ul>li:last-child>span{-webkit-border-top-right-radius:6px;-moz-border-radius-topright:6px;border-bottom-right-radius:6px;border-top-right-radius:6px}.pagination-mini ul>li:first-child>a,.pagination-mini ul>li:first-child>span,.pagination-small ul>li:first-child>a,.pagination-small ul>li:first-child>span{-webkit-border-top-left-radius:3px;-moz-border-radius-topleft:3px;border-bottom-left-radius:3px;border-top-left-radius:3px}.pagination-mini ul>li:last-child>a,.pagination-mini ul>li:last-child>span,.pagination-small ul>li:last-child>a,.pagination-small ul>li:last-child>span{-webkit-border-top-right-radius:3px;-moz-border-radius-topright:3px;border-bottom-right-radius:3px;border-top-right-radius:3px}.pagination-small ul>li>a,.pagination-small ul>li>span{padding:2px 10px;font-size:11.9px}.pagination-mini ul>li>a,.pagination-mini ul>li>span{padding:0 6px;font-size:10.5px}.pager{margin:20px 0;list-style:none;text-align:center;*zoom:1}.pager:after,.pager:before{display:table;content:"";line-height:0}.pager:after{clear:both}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:focus,.pager li>a:hover{text-decoration:none;background-color:#f5f5f5}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span{color:#999;background-color:#fff;cursor:default}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{opacity:0}.modal-backdrop,.modal-backdrop.fade.in{opacity:.8;filter:alpha(opacity=80)}.modal{position:fixed;top:10%;left:50%;z-index:1050;width:560px;margin-left:-280px;background-color:#fff;border:1px solid rgba(0,0,0,.3);*border:1px solid #999;border-radius:6px;box-shadow:0 3px 7px rgba(0,0,0,.3);background-clip:padding-box;outline:none}.modal.fade{-webkit-transition:opacity .3s linear,top .3s ease-out;transition:opacity .3s linear,top .3s ease-out;top:-25%}.modal.fade.in{top:10%}.modal-header{padding:9px 15px;border-bottom:1px solid #eee}.modal-header .close{margin-top:2px}.modal-header h3{margin:0;line-height:30px}.modal-body{position:relative;overflow-y:auto;max-height:600px;padding:15px}.modal-footer,.modal-form{margin-bottom:0}.modal-footer{padding:14px 15px 15px;text-align:right;background-color:#f5f5f5;border-top:1px solid #ddd;border-radius:0 0 6px 6px;box-shadow:inset 0 1px 0 #fff;*zoom:1}.modal-footer:after,.modal-footer:before{display:table;content:"";line-height:0}.modal-footer:after{clear:both}.modal-footer .btn+.btn{margin-left:5px;margin-bottom:0}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.tooltip{position:absolute;z-index:1030;display:block;visibility:visible;font-size:11px;line-height:1.4;opacity:0;filter:alpha(opacity=0)}.tooltip.in{opacity:.8;filter:alpha(opacity=80)}.tooltip.top{margin-top:-3px;padding:5px 0}.tooltip.right{margin-left:3px;padding:0 5px}.tooltip.bottom{margin-top:3px;padding:5px 0}.tooltip.left{margin-left:-3px;padding:0 5px}.tooltip-inner{max-width:200px;padding:8px;color:#fff;text-align:center;text-decoration:none;background-color:#000;border-radius:0}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1010;display:none;max-width:276px;padding:1px;text-align:left;background-color:#fff;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;box-shadow:0 5px 10px rgba(0,0,0,.2);white-space:normal}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{margin:0;padding:8px 14px;font-size:14px;font-weight:400;line-height:18px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-title:empty{display:none}.popover-content{padding:9px 14px}.popover .arrow,.popover .arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover .arrow{border-width:11px}.popover .arrow:after{border-width:10px;content:""}.popover.top .arrow{left:50%;margin-left:-11px;border-bottom-width:0;border-top-color:#999;border-top-color:rgba(0,0,0,.25);bottom:-11px}.popover.top .arrow:after{bottom:1px;margin-left:-10px;border-bottom-width:0;border-top-color:#fff}.popover.right .arrow{top:50%;left:-11px;margin-top:-11px;border-left-width:0;border-right-color:#999;border-right-color:rgba(0,0,0,.25)}.popover.right .arrow:after{left:1px;bottom:-10px;border-left-width:0;border-right-color:#fff}.popover.bottom .arrow{left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25);top:-11px}.popover.bottom .arrow:after{top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#fff}.popover.left .arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left .arrow:after{right:1px;border-right-width:0;border-left-color:#fff;bottom:-10px}.thumbnails{margin-left:-20px;list-style:none;*zoom:1}.thumbnails:after,.thumbnails:before{display:table;content:"";line-height:0}.thumbnails:after{clear:both}.row-fluid .thumbnails{margin-left:0}.thumbnails>li{float:left;margin-bottom:20px;margin-left:20px}.thumbnail{display:block;padding:4px;line-height:20px;border:1px solid #ddd;border-radius:0;box-shadow:0 1px 3px rgba(0,0,0,.055);-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}a.thumbnail:focus,a.thumbnail:hover{border-color:#e33f3b;box-shadow:0 1px 4px rgba(0,105,214,.25)}.thumbnail>img{display:block;max-width:100%;margin-left:auto;margin-right:auto}.thumbnail .caption{padding:9px;color:#555}.media,.media-body{overflow:hidden;*overflow:visible;zoom:1}.media,.media .media{margin-top:15px}.media:first-child{margin-top:0}.media-object{display:block}.media-heading{margin:0 0 5px}.media>.pull-left{margin-right:10px}.media>.pull-right{margin-left:10px}.media-list{margin-left:0;list-style:none}.badge,.label{display:inline-block;padding:2px 4px;font-size:11.844px;font-weight:700;line-height:14px;color:#fff;vertical-align:baseline;white-space:nowrap;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#999}.label{border-radius:3px}.badge{padding-left:9px;padding-right:9px;border-radius:9px}.badge:empty,.label:empty{display:none}a.badge:focus,a.badge:hover,a.label:focus,a.label:hover{color:#fff;text-decoration:none;cursor:pointer}.badge-important,.label-important{background-color:#b94a48}.badge-important[href],.label-important[href]{background-color:#953b39}.badge-warning,.label-warning{background-color:#f3622d}.badge-warning[href],.label-warning[href]{background-color:#e0450d}.badge-success,.label-success{background-color:#468847}.badge-success[href],.label-success[href]{background-color:#356635}.badge-info,.label-info{background-color:#3a87ad}.badge-info[href],.label-info[href]{background-color:#2d6987}.badge-inverse,.label-inverse{background-color:#333}.badge-inverse[href],.label-inverse[href]{background-color:#1a1a1a}.btn .badge,.btn .label{position:relative;top:-1px}.btn-mini .badge,.btn-mini .label{top:0}@-webkit-keyframes progress-bar-stripes{0%{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{0%{background-position:40px 0}to{background-position:0 0}}.progress{overflow:hidden;height:20px;margin-bottom:20px;background-color:#f7f7f7;background-image:-webkit-gradient(linear,0 0,0 100%,from(#f5f5f5),to(#f9f9f9));background-image:-webkit-linear-gradient(top,#f5f5f5,#f9f9f9);background-image:linear-gradient(180deg,#f5f5f5,#f9f9f9);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=\'#fff5f5f5\',endColorstr=\'#fff9f9f9\',GradientType=0);box-shadow:inset 0 1px 2px rgba(0,0,0,.1);border-radius:0}.progress,.progress .bar{background-repeat:repeat-x}.progress .bar{width:0;height:100%;color:#fff;float:left;font-size:12px;text-align:center;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#0e90d2;background-image:-webkit-gradient(linear,0 0,0 100%,from(#149bdf),to(#0480be));background-image:-webkit-linear-gradient(top,#149bdf,#0480be);background-image:linear-gradient(180deg,#149bdf,#0480be);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=\'#ff149bdf\',endColorstr=\'#ff0480be\',GradientType=0);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-sizing:border-box;-webkit-transition:width .6s ease;transition:width .6s ease}.progress .bar+.bar{box-shadow:inset 1px 0 0 rgba(0,0,0,.15),inset 0 -1px 0 rgba(0,0,0,.15)}.progress-striped .bar{background-color:#149bdf;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(.25,hsla(0,0%,100%,.15)),color-stop(.25,transparent),color-stop(.5,transparent),color-stop(.5,hsla(0,0%,100%,.15)),color-stop(.75,hsla(0,0%,100%,.15)),color-stop(.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-size:40px 40px}.progress.active .bar{-webkit-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-danger .bar,.progress .bar-danger{background-color:#dd514c;background-image:-webkit-gradient(linear,0 0,0 100%,from(#ee5f5b),to(#c43c35));background-image:-webkit-linear-gradient(top,#ee5f5b,#c43c35);background-image:linear-gradient(180deg,#ee5f5b,#c43c35);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=\'#ffee5f5b\',endColorstr=\'#ffc43c35\',GradientType=0)}.progress-danger.progress-striped .bar,.progress-striped .bar-danger{background-color:#ee5f5b;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(.25,hsla(0,0%,100%,.15)),color-stop(.25,transparent),color-stop(.5,transparent),color-stop(.5,hsla(0,0%,100%,.15)),color-stop(.75,hsla(0,0%,100%,.15)),color-stop(.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent)}.progress-success .bar,.progress .bar-success{background-color:#5eb95e;background-image:-webkit-gradient(linear,0 0,0 100%,from(#62c462),to(#57a957));background-image:-webkit-linear-gradient(top,#62c462,#57a957);background-image:linear-gradient(180deg,#62c462,#57a957);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=\'#ff62c462\',endColorstr=\'#ff57a957\',GradientType=0)}.progress-striped .bar-success,.progress-success.progress-striped .bar{background-color:#62c462;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(.25,hsla(0,0%,100%,.15)),color-stop(.25,transparent),color-stop(.5,transparent),color-stop(.5,hsla(0,0%,100%,.15)),color-stop(.75,hsla(0,0%,100%,.15)),color-stop(.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent)}.progress-info .bar,.progress .bar-info{background-color:#4bb1cf;background-image:-webkit-gradient(linear,0 0,0 100%,from(#5bc0de),to(#339bb9));background-image:-webkit-linear-gradient(top,#5bc0de,#339bb9);background-image:linear-gradient(180deg,#5bc0de,#339bb9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=\'#ff5bc0de\',endColorstr=\'#ff339bb9\',GradientType=0)}.progress-info.progress-striped .bar,.progress-striped .bar-info{background-color:#5bc0de;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(.25,hsla(0,0%,100%,.15)),color-stop(.25,transparent),color-stop(.5,transparent),color-stop(.5,hsla(0,0%,100%,.15)),color-stop(.75,hsla(0,0%,100%,.15)),color-stop(.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent)}.progress-warning .bar,.progress .bar-warning{background-color:#f58258;background-image:-webkit-gradient(linear,0 0,0 100%,from(#f79875),to(#f3622d));background-image:-webkit-linear-gradient(top,#f79875,#f3622d);background-image:linear-gradient(180deg,#f79875,#f3622d);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=\'#fff79875\',endColorstr=\'#fff3622d\',GradientType=0)}.progress-striped .bar-warning,.progress-warning.progress-striped .bar{background-color:#f79875;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(.25,hsla(0,0%,100%,.15)),color-stop(.25,transparent),color-stop(.5,transparent),color-stop(.5,hsla(0,0%,100%,.15)),color-stop(.75,hsla(0,0%,100%,.15)),color-stop(.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent)}.accordion{margin-bottom:20px}.accordion-group{margin-bottom:2px;border:1px solid #e5e5e5;border-radius:0}.accordion-heading{border-bottom:0}.accordion-heading .accordion-toggle{display:block;padding:8px 15px}.accordion-toggle{cursor:pointer}.accordion-inner{padding:9px 15px;border-top:1px solid #e5e5e5}.carousel{position:relative;margin-bottom:20px;line-height:1}.carousel-inner{overflow:hidden;width:100%;position:relative}.carousel-inner>.item{display:none;position:relative;-webkit-transition:left .6s ease-in-out;transition:left .6s ease-in-out}.carousel-inner>.item>a>img,.carousel-inner>.item>img{display:block;line-height:1}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:40%;left:15px;width:40px;height:40px;margin-top:-20px;font-size:60px;font-weight:100;line-height:30px;color:#fff;text-align:center;background:#222;border:3px solid #fff;border-radius:23px;opacity:.5;filter:alpha(opacity=50)}.carousel-control.right{left:auto;right:15px}.carousel-control:focus,.carousel-control:hover{color:#fff;text-decoration:none;opacity:.9;filter:alpha(opacity=90)}.carousel-indicators{position:absolute;top:15px;right:15px;z-index:5;margin:0;list-style:none}.carousel-indicators li{display:block;float:left;width:10px;height:10px;margin-left:5px;text-indent:-999px;background-color:#ccc;background-color:hsla(0,0%,100%,.25);border-radius:5px}.carousel-indicators .active{background-color:#fff}.carousel-caption{position:absolute;left:0;right:0;bottom:0;padding:15px;background:#333;background:rgba(0,0,0,.75)}.carousel-caption h4,.carousel-caption p{color:#fff;line-height:20px}.carousel-caption h4{margin:0 0 5px}.carousel-caption p{margin-bottom:0}.hero-unit{padding:60px;margin-bottom:30px;font-size:18px;font-weight:200;line-height:30px;color:inherit;background-color:#eee;border-radius:6px}.hero-unit h1{margin-bottom:0;font-size:60px;line-height:1;color:inherit;letter-spacing:-1px}.hero-unit li{line-height:30px}.pull-right{float:right}.pull-left{float:left}.hide{display:none}.show{display:block}.invisible{visibility:hidden}.affix{position:fixed}.clearfix{*zoom:1}.clearfix:after,.clearfix:before{display:table;content:"";line-height:0}.clearfix:after{clear:both}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.input-block-level{display:block;width:100%;min-height:30px;box-sizing:border-box}.Select{position:relative}.Select,.Select div,.Select input,.Select span{box-sizing:border-box}.Select.is-disabled>.Select-control{background-color:#f9f9f9}.Select.is-disabled>.Select-control:hover{box-shadow:none}.Select.is-disabled .Select-arrow-zone{cursor:default;pointer-events:none;opacity:.35}.Select-control{background-color:#fff;border-color:#d9d9d9 #ccc #b3b3b3;border-radius:4px;border:1px solid #ccc;color:#333;cursor:default;display:table;border-spacing:0;border-collapse:separate;height:36px;outline:none;overflow:hidden;position:relative;width:100%}.Select-control:hover{box-shadow:0 1px 0 rgba(0,0,0,.06)}.Select-control .Select-input:focus{outline:none}.is-searchable.is-open>.Select-control{cursor:text}.is-open>.Select-control{-webkit-border-bottom-right-radius:0;-moz-border-radius-bottomright:0;-webkit-border-bottom-left-radius:0;-moz-border-radius-bottomleft:0;border-bottom-right-radius:0;border-bottom-left-radius:0;background:#fff;border-color:#b3b3b3 #ccc #d9d9d9}.is-open>.Select-control>.Select-arrow{border-color:transparent transparent #999;border-width:0 5px 5px}.is-searchable.is-focused:not(.is-open)>.Select-control{cursor:text}.is-focused:not(.is-open)>.Select-control{border-color:#007eff;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 0 3px rgba(0,126,255,.1)}.Select--single>.Select-control .Select-value,.Select-placeholder{bottom:0;color:#aaa;left:0;line-height:34px;padding-left:10px;padding-right:10px;position:absolute;right:0;top:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.has-value.is-pseudo-focused.Select--single>.Select-control .Select-value .Select-value-label,.has-value.Select--single>.Select-control .Select-value .Select-value-label{color:#333}.has-value.is-pseudo-focused.Select--single>.Select-control .Select-value a.Select-value-label,.has-value.Select--single>.Select-control .Select-value a.Select-value-label{cursor:pointer;text-decoration:none}.has-value.is-pseudo-focused.Select--single>.Select-control .Select-value a.Select-value-label:focus,.has-value.is-pseudo-focused.Select--single>.Select-control .Select-value a.Select-value-label:hover,.has-value.Select--single>.Select-control .Select-value a.Select-value-label:focus,.has-value.Select--single>.Select-control .Select-value a.Select-value-label:hover{color:#007eff;outline:none;text-decoration:underline}.Select-input{height:34px;padding-left:10px;padding-right:10px;vertical-align:middle}.Select-input>input{width:100%;background:none transparent;border:0 none;box-shadow:none;cursor:default;display:inline-block;font-family:inherit;font-size:inherit;margin:0;outline:none;line-height:14px;padding:8px 0 12px;-webkit-appearance:none}.is-focused .Select-input>input{cursor:text}.has-value.is-pseudo-focused .Select-input{opacity:0}.Select-control:not(.is-searchable)>.Select-input{outline:none}.Select-loading-zone{cursor:pointer;display:table-cell;text-align:center}.Select-loading,.Select-loading-zone{position:relative;vertical-align:middle;width:16px}.Select-loading{-webkit-animation:Select-animation-spin .4s infinite linear;animation:Select-animation-spin .4s infinite linear;height:16px;box-sizing:border-box;border-radius:50%;border:2px solid #ccc;border-right-color:#333;display:inline-block}.Select-clear-zone{-webkit-animation:Select-animation-fadeIn .2s;animation:Select-animation-fadeIn .2s;color:#999;cursor:pointer;display:table-cell;position:relative;text-align:center;vertical-align:middle;width:17px}.Select-clear-zone:hover{color:#d0021b}.Select-clear{display:inline-block;font-size:18px;line-height:1}.Select--multi .Select-clear-zone{width:17px}.Select-arrow-zone{cursor:pointer;display:table-cell;position:relative;text-align:center;vertical-align:middle;width:25px;padding-right:5px}.Select-arrow{border-color:#999 transparent transparent;border-style:solid;border-width:5px 5px 2.5px;display:inline-block;height:0;width:0}.is-open .Select-arrow,.Select-arrow-zone:hover>.Select-arrow{border-top-color:#666}.Select--multi .Select-multi-value-wrapper{display:inline-block}.Select .Select-aria-only{display:inline-block;height:1px;width:1px;margin:-1px;clip:rect(0,0,0,0);overflow:hidden}@-webkit-keyframes Select-animation-fadeIn{0%{opacity:0}to{opacity:1}}@keyframes Select-animation-fadeIn{0%{opacity:0}to{opacity:1}}.Select-menu-outer{-webkit-border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px;-webkit-border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px;border-bottom-right-radius:4px;border-bottom-left-radius:4px;background-color:#fff;border:1px solid #ccc;border-top-color:#e6e6e6;box-shadow:0 1px 0 rgba(0,0,0,.06);box-sizing:border-box;margin-top:-1px;max-height:200px;position:absolute;top:100%;width:100%;z-index:1;-webkit-overflow-scrolling:touch}.Select-menu{max-height:198px;overflow-y:auto}.Select-option{box-sizing:border-box;background-color:#fff;color:#666;cursor:pointer;display:block;padding:8px 10px}.Select-option:last-child{-webkit-border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px;-webkit-border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.Select-option.is-selected{background-color:#f5faff;background-color:rgba(0,126,255,.04);color:#333}.Select-option.is-focused{background-color:#ebf5ff;background-color:rgba(0,126,255,.08);color:#333}.Select-option.is-disabled{color:#ccc;cursor:default}.Select-noresults{box-sizing:border-box;color:#999;cursor:default;display:block;padding:8px 10px}.Select--multi .Select-input{vertical-align:middle;margin-left:10px;padding:0}.Select--multi.has-value .Select-input{margin-left:5px}.Select--multi .Select-value{background-color:#ebf5ff;background-color:rgba(0,126,255,.08);border-radius:2px;border:1px solid #c2e0ff;border:1px solid rgba(0,126,255,.24);color:#007eff;display:inline-block;font-size:.9em;line-height:1.4;margin-left:5px;margin-top:5px;vertical-align:top}.Select--multi .Select-value-icon,.Select--multi .Select-value-label{display:inline-block;vertical-align:middle}.Select--multi .Select-value-label{-webkit-border-top-right-radius:2px;-moz-border-radius-topright:2px;border-bottom-right-radius:2px;border-top-right-radius:2px;cursor:default;padding:2px 5px}.Select--multi a.Select-value-label{color:#007eff;cursor:pointer;text-decoration:none}.Select--multi a.Select-value-label:hover{text-decoration:underline}.Select--multi .Select-value-icon{cursor:pointer;-webkit-border-top-left-radius:2px;-moz-border-radius-topleft:2px;border-bottom-left-radius:2px;border-top-left-radius:2px;border-right:1px solid #c2e0ff;border-right:1px solid rgba(0,126,255,.24);padding:1px 5px 3px}.Select--multi .Select-value-icon:focus,.Select--multi .Select-value-icon:hover{background-color:#d8eafd;background-color:rgba(0,113,230,.08);color:#0071e6}.Select--multi .Select-value-icon:active{background-color:#c2e0ff;background-color:rgba(0,126,255,.24)}.Select--multi.is-disabled .Select-value{background-color:#fcfcfc;border:1px solid #e3e3e3;color:#333}.Select--multi.is-disabled .Select-value-icon{cursor:not-allowed;border-right:1px solid #e3e3e3}.Select--multi.is-disabled .Select-value-icon:active,.Select--multi.is-disabled .Select-value-icon:focus,.Select--multi.is-disabled .Select-value-icon:hover{background-color:#fcfcfc}@keyframes Select-animation-spin{to{transform:rotate(1turn)}}@-webkit-keyframes Select-animation-spin{to{-webkit-transform:rotate(1turn)}}body #dashboard.flex-layout,body #dashboard .flex-layout,body #notification-center .flex-layout{display:-ms-flexbox;display:flex;padding:0}body #dashboard.flex-layout.flex-col,body #dashboard .flex-layout.flex-col,body #notification-center .flex-layout.flex-col{-ms-flex-direction:column;flex-direction:column}body #dashboard.flex-layout.flex-row,body #dashboard .flex-layout.flex-row,body #notification-center .flex-layout.flex-row{-ms-flex-direction:row;flex-direction:row}body #dashboard.flex-layout>div,body #dashboard .flex-layout>div,body #notification-center .flex-layout>div{padding:0}body #dashboard.flex-layout>*,body #dashboard .flex-layout>*,body #notification-center .flex-layout>*{-ms-flex:0;flex:0}body #dashboard.flex-layout #dashboard-upper-content,body #dashboard .flex-layout #dashboard-upper-content,body #notification-center .flex-layout #dashboard-upper-content{-ms-flex:0 0 auto;flex:0 0 auto}body #dashboard.flex-layout #dashboard-lower-content,body #dashboard .flex-layout #dashboard-lower-content,body #notification-center .flex-layout #dashboard-lower-content{padding:15px}body #dashboard.flex-layout #footer,body #dashboard .flex-layout #footer,body #notification-center .flex-layout #footer{-ms-flex:0 0 auto;flex:0 0 auto}body #dashboard .flex-body,body #notification-center .flex-body{-ms-flex:1;flex:1;overflow:auto}body #dashboard .flex-fill{-ms-flex:0 0 auto;flex:0 0 auto}.one-pane #footer{position:absolute;bottom:0;width:100%;margin:0 -20px}.one-pane>header{width:100%}.one-pane>header #breadcrumbs{overflow:hidden;float:none}.one-pane>header #right-header{-ms-flex-preferred-size:auto;flex-grow:0;flex-shrink:0;flex-basis:inherit}.one-pane>header #api-navbar{-ms-flex:0 0 auto;flex:0 0 auto}body #dashboard .flex-body#right-header{-ms-flex:0 1 auto;flex:0 1 auto;overflow:hidden}body #dashboard .flex-layout #api-navbar{-ms-flex:0 0 auto;flex:0 0 auto}.with-sidebar #breadcrumbs{float:left}.with-sidebar #api-navbar{float:right}body #dashboard .header-right-panel{overflow:hidden}.right-header-wrapper #api-navbar{float:right}body #dashboard .right-db-header>div{-ms-flex:1 0 auto;flex:1 0 auto}body #dashboard.two-pane{height:100%}body #dashboard.two-pane #two-pane-content{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}body #dashboard.two-pane #left-content{-ms-flex:0 0 440px;flex:0 0 440px}body #dashboard.two-pane #footer{-ms-flex:0 0 50px;flex:0 0 50px}body #dashboard.two-pane .editor-wrapper form{padding-bottom:0}body #dashboard.two-pane .header-wrapper{-ms-flex:0 0 65px;flex:0 0 65px;position:inherit}body #dashboard.two-pane .header-wrapper #breadcrumbs{height:64px;-ms-flex:0 0 440px;flex:0 0 440px;overflow:hidden}body #dashboard.template-with-sidebar header{-ms-flex:0 0 65px;flex:0 0 65px}body #dashboard.template-with-sidebar #sidebar-content{-ms-flex:0 0 330px;flex:0 0 330px;overflow:auto;overflow-x:hidden}body #dashboard.template-with-sidebar .template-content{overflow:hidden}body #dashboard.template-with-sidebar #dashboard-content{border-left:1px solid #999;box-shadow:-6px 0 rgba(0,0,0,.1)}aside#sidebar-content{top:64px}pre.prettyprint{background:#4d4d4d;border:none;font-size:83%;line-height:1.4;margin:0;padding:16px}.prettyprint .pln,.prettyprint .pun,.prettyprint .typ{color:#333}.prettyprint .kwd{color:#ddd}.prettyprint .lit,.prettyprint .str{color:#fff}.prettyprint .com{color:#666}@font-face{font-family:fauxtonicon5;src:url('+n(281)+");src:url("+n(281)+'?#iefix) format("embedded-opentype"),url('+n(282)+') format("woff"),url('+n(283)+') format("truetype"),url('+n(284)+'#fauxtonicon5) format("svg");font-weight:400;font-style:normal}@media screen and (-webkit-min-device-pixel-ratio:0){@font-face{font-family:fauxtonicon5;src:url('+n(284)+'#fauxtonicon5) format("svg")}}[data-icon]:before{content:attr(data-icon)}.fonticon-activetasks:before,.fonticon-arrow-box-down:before,.fonticon-arrow-box-up:before,.fonticon-arrow_left:before,.fonticon-arrow_right:before,.fonticon-arrows-cw:before,.fonticon-article:before,.fonticon-attention-alt:before,.fonticon-attention-circled:before,.fonticon-bell:before,.fonticon-block:before,.fonticon-bookmark-ribbon-wplus:before,.fonticon-bookmark:before,.fonticon-burger:before,.fonticon-cancel-circled2:before,.fonticon-cancel-circled:before,.fonticon-cancel:before,.fonticon-circle-empty:before,.fonticon-clipboard:before,.fonticon-clock:before,.fonticon-cog:before,.fonticon-collapse:before,.fonticon-cw:before,.fonticon-dashboard:before,.fonticon-database:before,.fonticon-deselect-all:before,.fonticon-document:before,.fonticon-documents:before,.fonticon-dot-circled:before,.fonticon-down-1:before,.fonticon-down-circled:before,.fonticon-down-dir:before,.fonticon-down-open:before,.fonticon-down:before,.fonticon-drop-down-dots:before,.fonticon-exchange:before,.fonticon-expand:before,.fonticon-eye:before,.fonticon-file-code-o:before,.fonticon-files-o:before,.fonticon-filter:before,.fonticon-gears:before,.fonticon-help-circled:before,.fonticon-help:before,.fonticon-info-circled:before,.fonticon-json:before,.fonticon-key:before,.fonticon-left-1:before,.fonticon-left-circled:before,.fonticon-left-dir:before,.fonticon-left-open:before,.fonticon-left:before,.fonticon-link:before,.fonticon-list-alt:before,.fonticon-lock:before,.fonticon-mail-alt:before,.fonticon-mail:before,.fonticon-map2:before,.fonticon-map:before,.fonticon-megaphone:before,.fonticon-minus-circled2:before,.fonticon-minus-circled:before,.fonticon-minus-squared-alt:before,.fonticon-minus-squared:before,.fonticon-minus:before,.fonticon-mixer:before,.fonticon-new-database:before,.fonticon-ok-circled-2:before,.fonticon-ok-circled:before,.fonticon-ok:before,.fonticon-paperclip:before,.fonticon-pencil:before,.fonticon-picture:before,.fonticon-play:before,.fonticon-plus-circled2:before,.fonticon-plus-circled:before,.fonticon-plus-squared-alt:before,.fonticon-plus-squared:before,.fonticon-plus:before,.fonticon-popin:before,.fonticon-popout:before,.fonticon-profile:before,.fonticon-replicate:before,.fonticon-reply-all:before,.fonticon-reply:before,.fonticon-resize-full-reverse:before,.fonticon-resize-full:before,.fonticon-resize-small-reverse:before,.fonticon-resize-small:before,.fonticon-right-1:before,.fonticon-right-circled:before,.fonticon-right-dir:before,.fonticon-right-open:before,.fonticon-right:before,.fonticon-save:before,.fonticon-search:before,.fonticon-select-all:before,.fonticon-sidenav-filter-function:before,.fonticon-sidenav-info:before,.fonticon-sidenav-list-function:before,.fonticon-sidenav-map-reduce:before,.fonticon-sidenav-search:before,.fonticon-sidenav-show-function:before,.fonticon-sidenav-update-function:before,.fonticon-sitemap:before,.fonticon-stats:before,.fonticon-support:before,.fonticon-swap-arrows:before,.fonticon-table:before,.fonticon-trash:before,.fonticon-up-1:before,.fonticon-up-circled:before,.fonticon-up-dir:before,.fonticon-up-open:before,.fonticon-up:before,.fonticon-user:before,.fonticon-users:before,.fonticon-vertical-ellipsis:before,.fonticon-wrench2:before,.fonticon-wrench:before,[data-icon]:before{display:inline-block;font-family:fauxtonicon5;font-style:normal;font-weight:400;font-variant:normal;line-height:1;text-decoration:inherit;text-rendering:optimizeLegibility;text-transform:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-smoothing:antialiased}.fonticon-activetasks:before{content:"\\F100"}.fonticon-arrow-box-down:before{content:"\\F101"}.fonticon-arrow-box-up:before{content:"\\F102"}.fonticon-arrow_left:before{content:"\\F103"}.fonticon-arrow_right:before{content:"\\F104"}.fonticon-arrows-cw:before{content:"\\F105"}.fonticon-article:before{content:"\\F106"}.fonticon-attention-alt:before{content:"\\F107"}.fonticon-attention-circled:before{content:"\\F108"}.fonticon-bell:before{content:"\\F109"}.fonticon-block:before{content:"\\F10A"}.fonticon-bookmark:before{content:"\\F10B"}.fonticon-bookmark-ribbon-wplus:before{content:"\\F10C"}.fonticon-burger:before{content:"\\F10D"}.fonticon-cancel:before{content:"\\F10E"}.fonticon-cancel-circled:before{content:"\\F10F"}.fonticon-cancel-circled2:before{content:"\\F110"}.fonticon-circle-empty:before{content:"\\F111"}.fonticon-clipboard:before{content:"\\F112"}.fonticon-clock:before{content:"\\F113"}.fonticon-cog:before{content:"\\F114"}.fonticon-collapse:before{content:"\\F115"}.fonticon-cw:before{content:"\\F116"}.fonticon-dashboard:before{content:"\\F117"}.fonticon-database:before{content:"\\F118"}.fonticon-deselect-all:before{content:"\\F119"}.fonticon-document:before{content:"\\F11A"}.fonticon-documents:before{content:"\\F11B"}.fonticon-dot-circled:before{content:"\\F11C"}.fonticon-down:before{content:"\\F11D"}.fonticon-down-1:before{content:"\\F11E"}.fonticon-down-circled:before{content:"\\F11F"}.fonticon-down-dir:before{content:"\\F120"}.fonticon-down-open:before{content:"\\F121"}.fonticon-drop-down-dots:before{content:"\\F122"}.fonticon-exchange:before{content:"\\F123"}.fonticon-expand:before{content:"\\F124"}.fonticon-eye:before{content:"\\F125"}.fonticon-file-code-o:before{content:"\\F126"}.fonticon-files-o:before{content:"\\F127"}.fonticon-filter:before{content:"\\F128"}.fonticon-gears:before{content:"\\F129"}.fonticon-help:before{content:"\\F12A"}.fonticon-help-circled:before{content:"\\F12B"}.fonticon-info-circled:before{content:"\\F12C"}.fonticon-json:before{content:"\\F12D"}.fonticon-key:before{content:"\\F12E"}.fonticon-left:before{content:"\\F12F"}.fonticon-left-1:before{content:"\\F130"}.fonticon-left-circled:before{content:"\\F131"}.fonticon-left-dir:before{content:"\\F132"}.fonticon-left-open:before{content:"\\F133"}.fonticon-link:before{content:"\\F134"}.fonticon-list-alt:before{content:"\\F135"}.fonticon-lock:before{content:"\\F136"}.fonticon-mail:before{content:"\\F137"}.fonticon-mail-alt:before{content:"\\F138"}.fonticon-map:before{content:"\\F139"}.fonticon-map2:before{content:"\\F13A"}.fonticon-megaphone:before{content:"\\F13B"}.fonticon-minus:before{content:"\\F13C"}.fonticon-minus-circled:before{content:"\\F13D"}.fonticon-minus-circled2:before{content:"\\F13E"}.fonticon-minus-squared:before{content:"\\F13F"}.fonticon-minus-squared-alt:before{content:"\\F140"}.fonticon-mixer:before{content:"\\F141"}.fonticon-new-database:before{content:"\\F142"}.fonticon-ok:before{content:"\\F143"}.fonticon-ok-circled:before{content:"\\F144"}.fonticon-ok-circled-2:before{content:"\\F145"}.fonticon-paperclip:before{content:"\\F146"}.fonticon-pencil:before{content:"\\F147"}.fonticon-picture:before{content:"\\F148"}.fonticon-play:before{content:"\\F149"}.fonticon-plus:before{content:"\\F14A"}.fonticon-plus-circled:before{content:"\\F14B"}.fonticon-plus-circled2:before{content:"\\F14C"}.fonticon-plus-squared:before{content:"\\F14D"}.fonticon-plus-squared-alt:before{content:"\\F14E"}.fonticon-popin:before{content:"\\F14F"}.fonticon-popout:before{content:"\\F150"}.fonticon-profile:before{content:"\\F151"}.fonticon-replicate:before{content:"\\F152"}.fonticon-reply:before{content:"\\F153"}.fonticon-reply-all:before{content:"\\F154"}.fonticon-resize-full:before{content:"\\F155"}.fonticon-resize-full-reverse:before{content:"\\F156"}.fonticon-resize-small:before{content:"\\F157"}.fonticon-resize-small-reverse:before{content:"\\F158"}.fonticon-right:before{content:"\\F159"}.fonticon-right-1:before{content:"\\F15A"}.fonticon-right-circled:before{content:"\\F15B"}.fonticon-right-dir:before{content:"\\F15C"}.fonticon-right-open:before{content:"\\F15D"}.fonticon-save:before{content:"\\F15E"}.fonticon-search:before{content:"\\F15F"}.fonticon-select-all:before{content:"\\F160"}.fonticon-sidenav-filter-function:before{content:"\\F161"}.fonticon-sidenav-info:before{content:"\\F162"}.fonticon-sidenav-list-function:before{content:"\\F163"}.fonticon-sidenav-map-reduce:before{content:"\\F164"}.fonticon-sidenav-search:before{content:"\\F165"}.fonticon-sidenav-show-function:before{content:"\\F166"}.fonticon-sidenav-update-function:before{content:"\\F167"}.fonticon-sitemap:before{content:"\\F168"}.fonticon-stats:before{content:"\\F169"}.fonticon-support:before{content:"\\F16A"}.fonticon-swap-arrows:before{content:"\\F16B"}.fonticon-table:before{content:"\\F16C"}.fonticon-trash:before{content:"\\F16D"}.fonticon-up:before{content:"\\F16E"}.fonticon-up-1:before{content:"\\F16F"}.fonticon-up-circled:before{content:"\\F170"}.fonticon-up-dir:before{content:"\\F171"}.fonticon-up-open:before{content:"\\F172"}.fonticon-user:before{content:"\\F173"}.fonticon-users:before{content:"\\F174"}.fonticon-vertical-ellipsis:before{content:"\\F175"}.fonticon-wrench:before{content:"\\F176"}.fonticon-wrench2:before{content:"\\F177"}.ace_scrollbar-h{right:0!important;height:15px!important}body .ace-idle-fingers .ace_marker-layer .ace_selection{background:#015f6f}body .ace-idle-fingers .ace_gutter{background:#3a3a3a}body .ace-idle-fingers{background-color:#4d4d4d}body .ace-idle-fingers .ace_cursor{color:#fff}body .ace-idle-fingers.ace_multiselect .ace_selection.ace_start{box-shadow:0 0 3px 0 #4d4d4d}body .ace-idle-fingers .ace_marker-layer .ace_active-line{background:#000;opacity:.4}body .ace-idle-fingers .ace_constant{color:#72cdf4}body .ace-idle-fingers .ace_boolean{color:#ff6532}body .ace-idle-fingers .ace_string{color:#29be9d}body .ace-idle-fingers .ace_collab.ace_user1{color:#4d4d4d}.loader{background:url('+n(285)+") 50% no-repeat;min-height:100px}#main{position:relative;overflow:hidden;height:100%}#global-notifications{position:fixed;top:0;display:block;z-index:100000;width:100%}#app-container{height:100%;position:relative;overflow:hidden}@media screen and (max-height:600px){#primary-navbar{overflow-y:auto}}@media screen and (min-height:600px){#primary-navbar{overflow-y:hidden}}#primary-navbar{z-index:5;height:100%;left:0;top:0;bottom:0;position:absolute;width:220px;background-color:#3a2c2b}.closeMenu #primary-navbar{width:64px;overflow-x:hidden}#primary-navbar .version-footer{color:#fff;font-size:10px;text-align:center;background-color:#3a2c2b}.closeMenu #primary-navbar .version-footer{display:none}#primary-navbar #user-create-admin{font-size:12px}.closeMenu #primary-navbar .navbar{width:64px}#primary-navbar .navbar .burger{padding:22px 0 22px 18px;position:fixed;z-index:100;top:0;background-color:#3a2c2b;width:220px}.closeMenu #primary-navbar .navbar .burger{width:64px}#primary-navbar .navbar .burger div{height:4px;width:24px;border-radius:2;background-color:#af2d24;margin:2px 0}#primary-navbar .navbar .burger:hover div{background-color:#e33f3b}#primary-navbar .navbar .bottom-container{position:fixed;bottom:10px}#primary-navbar .navbar .bottom-container .brand{box-sizing:content-box;font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0;margin:20px 0 0;width:199px;height:50px;padding:10px;float:none;background:#3a2c2b}#primary-navbar .navbar .bottom-container .brand .icon{box-sizing:content-box;background:url("+n(286)+") no-repeat 23px 0;background-size:150px;display:block;height:100%;width:100%;margin-top:10px}.closeMenu #primary-navbar .navbar .bottom-container .brand{width:43px}.closeMenu #primary-navbar .navbar .bottom-container .brand .icon{background:url("+n(287)+') no-repeat 3px 0;background-size:40px}#primary-navbar .navbar .bottom-container #footer-nav-links{width:100%;margin:0;background:#3a2c2b}#primary-navbar .navbar .bottom-container #footer-nav-links li{width:100%;text-align:center}#primary-navbar .navbar .bottom-container #footer-nav-links li a{font-size:10px;color:#e33f3b;padding:0;text-shadow:none;width:100%}#primary-navbar .navbar .bottom-container #footer-nav-links li.active a,#primary-navbar .navbar .bottom-container #footer-nav-links li:hover a{text-decoration:underline;color:#af2d24}#primary-navbar .navbar nav{margin-top:64px}#primary-navbar .navbar nav .nav{margin:0}#primary-navbar .navbar nav .nav li{padding:0;font-size:16px;letter-spacing:1px;line-height:24px;width:220px;font-weight:400;font-family:helvetica;box-sizing:border-box;background-color:#af2d24;border-bottom:1px solid #3a2c2b;height:48px;min-height:48px;position:relative}.closeMenu #primary-navbar .navbar nav .nav li{width:64px}#primary-navbar .navbar nav .nav li.active,#primary-navbar .navbar nav .nav li:hover{background-color:#e33f3b}#primary-navbar .navbar nav .nav li.active a,#primary-navbar .navbar nav .nav li:hover a{box-shadow:none}#primary-navbar .navbar nav .nav li:hover .fonticon:before{color:#fff}#primary-navbar .navbar nav .nav li.active .fonticon:before,#primary-navbar .navbar nav .nav li:hover .fonticon:before{text-shadow:2px 2px rgba(0,0,0,.2);color:#fff}#primary-navbar .navbar nav .nav li a{padding:12px 25px 12px 60px;background-color:transparent;color:#fff;text-shadow:1px 2px transparent;height:48px;display:flex}#primary-navbar .navbar nav .nav li a .fonticon{position:relative}#primary-navbar .navbar nav .nav li a .fonticon:before{position:absolute;left:-41px;font-size:24px;color:#3a2c2b;text-shadow:2px 2px transparent}.closeMenu #primary-navbar .navbar nav .nav li a{color:transparent}.closeMenu #primary-navbar .navbar nav .nav li a span{display:none}#primary-navbar .navbar nav ul#footer-nav-links li{background-color:#3a2c2b;border-top:1px solid #e33f3b;border-bottom:none}#primary-navbar .navbar nav ul#footer-nav-links li.active,#primary-navbar .navbar nav ul#footer-nav-links li:hover{background-color:#e33f3b;border-top:1px solid #e33f3b}#primary-navbar .navbar nav ul#footer-nav-links li.active a,#primary-navbar .navbar nav ul#footer-nav-links li:hover a{color:#fff}#primary-navbar .navbar nav ul#footer-nav-links li a{color:#e33f3b}#primary-navbar .navbar nav ul#bottom-nav-links{margin-top:0;padding-bottom:136px}#primary-navbar .navbar nav ul#bottom-nav-links li{background-color:#554d4c}#primary-navbar .navbar nav ul#bottom-nav-links li.active,#primary-navbar .navbar nav ul#bottom-nav-links li:hover{background-color:#e33f3b}#primary-navbar .navbar nav ul#bottom-nav-links li a.fonticon{position:relative}#primary-navbar .navbar nav ul#bottom-nav-links li a.fonticon:before{top:-5px;left:-40px;font-size:22px}.bottom-shadow-border{border-bottom:1px solid #999;box-shadow:0 6px 0 0 rgba(0,0,0,.1)}.bottom-left-shadow-border{border-bottom:1px solid #999;border-left:1px solid #999;box-shadow:-6px 6px 0 0 rgba(0,0,0,.1)}#dashboard{position:relative;left:220px;padding-left:0;background-color:#f2f2f2;height:100%;width:100%}.closeMenu #dashboard{left:64px}.wrapper{position:relative;overflow:hidden;height:100%}.one-pane #dashboard-content{top:64px}.one-pane #dashboard-content .view{padding-bottom:30px}.two-pane .inner{padding-bottom:64px}#sidebar-content{width:330px;background-color:#fff;margin-top:6px}#sidebar-content>div.inner{display:block}#sidebar-content .nav-list:last-child{margin-bottom:30px}.scrollable{height:auto;overflow-y:auto;overflow-x:hidden;width:100%;position:absolute;padding:0;left:0;right:0;top:0;bottom:0}.pusher{overflow:hidden;position:relative;height:100%;left:0;padding-right:220px}.closeMenu .pusher{padding-right:64px}.right-header-wrapper{overflow-x:hidden;height:64px}.with-sidebar .right-header-wrapper{box-shadow:-7px 0 rgba(0,0,0,.1)}.header-wrapper{border-bottom:1px solid #999;box-shadow:0 6px 0 0 rgba(0,0,0,.1);position:absolute;left:0;right:0}#app-container>div{position:relative;height:100%}.dashboard-upper-menu,.topmenu-defaults{height:70px;padding:12px 10px 0;box-sizing:border-box}.dashboard-upper-menu{border-left:1px solid #999;right:0;left:550px;position:fixed;display:block;background-color:#cbcbcb}.closeMenu .dashboard-upper-menu{left:394px}#dashboard-lower-content{padding:20px;background-color:#f1f1f1;position:relative}#dashboard-content>div{padding:15px}#dashboard-content.row-fluid{margin-left:0}.with-sidebar #dashboard-content{border-left:1px solid #999;box-shadow:-6px 0 rgba(0,0,0,.1);width:auto;padding:15px;bottom:0;top:64px;position:fixed;left:550px;right:0;box-sizing:border-box}.closeMenu .with-sidebar #dashboard-content{left:394px}.with-tabs-sidebar #dashboard-content{overflow:hidden}#dashboard-content>div.inner{display:block}.sidenav{padding:0}.sidenav header{width:330px;border-bottom:1px solid #d3d7db}.sidenav .nav-list .divider{border:none}.sidenav .nav-list>li>a:hover{background-color:#af2d24;color:#fff}.sidenav .nav-list li.active>a{color:#af2d24}.sidenav .nav-list>li>a{color:#333;padding:10px 13px 10px 24px;border-bottom:1px solid #d3d7db}.sidenav .nav-list>li>a span{margin-right:8px;width:14px;display:inline-block;text-align:center}.sidenav .nav-list a{display:block;padding:10px 5px 5px 15px;color:#767f89}.sidenav .nav-list a .divider{background:none;color:#ccc;padding:0 2px}.sidenav .nav-list .nav-header{padding:0;text-shadow:none;color:#333}.sidenav .nav-list .nav-header>span:hover{color:#e33f3b}.row-fluid.content-area{background-color:#f2f2f2}.two-pane .content-area{height:100%;top:64px;position:relative}.two-pane #right-content{border-left:1px solid #999;box-shadow:-6px 0 rgba(0,0,0,.1)}.two-pane #right-content .view{padding:0 20px 40px}.two-pane .right-header-wrapper{border-left:1px solid #999;box-shadow:-6px 0 rgba(0,0,0,.1)}.two-pane .right-header-wrapper .faux-header__searchboxwrapper{display:none}.notification-wrapper{opacity:0;height:0}input[type=password],input[type=text]{border-radius:0;padding:12px;border:1px solid #ccc;height:auto;font-size:16px;margin-top:0}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=checkbox],input[type=file],input[type=radio],select{margin:0 0 1em}.btn-group>.btn+.dropdown-toggle,.btn-group>.btn:first-child,.btn-group>.btn:last-child,.btn-group>.dropdown-toggle{border-radius:0;background-image:none;text-shadow:none}button:focus{outline:0!important}.btn{box-shadow:none;border-radius:0;background-image:none;text-shadow:none;background-repeat:no-repeat;padding:10px;margin-top:0}.btn .icon{margin-right:.2em}.btn.btn-small{padding:5px 10px}.btn.btn-small .icon{margin-right:0;font-size:inherit}.btn.btn-mini{padding:3px 8px}.btn.btn-mini .icon{margin-right:0;font-size:inherit}.btn-primary{background:#e33f3b}.btn.btn-danger{background-color:red;color:#fff}.btn.btn-danger:hover{background-color:#e73d34;color:#fff}.btn-secondary,.btn.btn-info{background-color:#0082bf;color:#fff}.btn-secondary:hover,.btn.btn-info:hover{background-color:#e73d34}.btn-primary a:visited{color:#fff}.form-actions{background:none;border:none}.input-append .add-on,.input-prepend .add-on{font-size:18px;padding:14px 5px 30px}.input-append .btn .icon,.input-prepend .btn .icon{font-size:16px;margin-right:0}.form-inline input[type=password],.form-inline input[type=text],.input-prepend input[class*=span],.row-fluid .input-append [class*=span]{width:auto}.checkbox label{display:inline-block;padding-left:30px}label{margin-right:15px;padding-left:0;display:block;cursor:pointer;position:relative;font-size:14px}label.inline{display:inline-block}.help-block{font-size:12px}a.help-link:hover{text-decoration:none}input[type=text].error{border:1px solid red}form.view-query-save,form.view-query-update{max-width:100%}.custom-inputs input[type=checkbox],.custom-inputs input[type=radio]{display:none}.custom-inputs .checkbox label:before{border-radius:12px;background-color:hsla(0,0%,100%,.1);border:2px solid hsla(0,0%,100%,.1);transition:.2s linear,box-shadow .2s linear;-moz-transition:linear .2s,box-shadow linear .2s;-webkit-transition:.2s linear,box-shadow .2s linear}.custom-inputs .controls>.checkbox:first-child,.custom-inputs .controls>.radio:first-child{padding-top:15px}.custom-inputs .checkbox.inline,.custom-inputs .radio.inline{display:inline-block;padding-top:15px;margin-bottom:12px;vertical-align:middle}.custom-inputs input[type=checkbox]+label:hover:before{border:2px solid #fff;transition:.2s linear,box-shadow .2s linear;-moz-transition:linear .2s,box-shadow linear .2s;-webkit-transition:.2s linear,box-shadow .2s linear}.custom-inputs input[type=checkbox]:disabled+label:hover:before{border:none}.custom-inputs input[type=checkbox]:checked+label:before{content:"\\F143";font-family:fauxtonicon5;font-size:12px;background-color:inherit;border:2px solid #7c8085;color:#e33f3b;text-align:center;line-height:19px;box-shadow:none;display:inline-block}.custom-inputs label:before{content:"";display:inline-block;width:22px;height:22px;margin-right:10px;position:absolute;left:0;bottom:0;background-color:#7c8085}.custom-inputs .radio label:before{border-radius:8px}.custom-inputs input[type=radio]:checked+label:before{content:"\\2022";color:#f3f3f3;font-size:30px;text-align:center;line-height:18px}.custom-inputs label.drop-down:before{display:none}div.add-dropdown{position:absolute;top:2px;right:0}div.add-dropdown .dropdown-menu{left:-110px;padding-bottom:0;width:148px;min-width:0;top:38px;box-shadow:2px 2px rgba(0,0,0,.2)}div.add-dropdown .dropdown-menu.arrow:before{right:4px}div.add-dropdown .dropdown-menu a{background-color:#202326;color:hsla(0,0%,100%,.8)}div.add-dropdown .dropdown-menu a:hover{background-color:#af2d24;color:#fff}div.add-dropdown .dropdown-menu li a{padding:10px 15px 10px 12px}div.add-dropdown .dropdown-toggle{border-top:none!important;text-decoration:none}div.add-dropdown>a{border-bottom:none;text-decoration:none;font-size:16px}input.errorHighlight{-webkit-animation:errorBlinkBG 1s;animation:errorBlinkBG 1s}.two-sides-toggle-button{font-size:15px;padding:11px}.two-sides-toggle-button button.btn{padding:10px 15px;background-color:#fff;color:#888}.two-sides-toggle-button button.btn.active:first-child{border-right-radius:10px}.two-sides-toggle-button button.btn:hover{background-color:#e73d34;color:#fff;box-shadow:none}.two-sides-toggle-button button.btn.active{background-color:#f1f1f1;color:#af2d24;box-shadow:none}.two-sides-toggle-button button.btn.active:hover{background-color:#f1f1f1;color:#af2d24}.pagination{margin:20px 0}ul.pagination{display:inline-block;*display:inline;*zoom:1;margin-left:0;margin-bottom:0;border-radius:0;box-shadow:0 1px 2px rgba(0,0,0,.05)}ul.pagination>li{display:inline}ul.pagination>li>a,ul.pagination>li>span{float:left;padding:4px 12px;line-height:20px;text-decoration:none;background-color:#fff;border:1px solid #ddd;border-left-width:0}ul.pagination>.active>a,ul.pagination>.active>span,ul.pagination>li>a:focus,ul.pagination>li>a:hover{background-color:#f5f5f5}ul.pagination>.active>a,ul.pagination>.active>span{color:#999;cursor:default}ul.pagination>.disabled>a,ul.pagination>.disabled>a:focus,ul.pagination>.disabled>a:hover,ul.pagination>.disabled>span{color:#999;background-color:transparent;cursor:default}ul.pagination>li:first-child>a,ul.pagination>li:first-child>span{border-left-width:1px;-webkit-border-top-left-radius:0;-moz-border-radius-topleft:0;border-bottom-left-radius:0;border-top-left-radius:0}ul.pagination>li:last-child>a,ul.pagination>li:last-child>span{-webkit-border-top-right-radius:0;-moz-border-radius-topright:0;border-bottom-right-radius:0;border-top-right-radius:0}.pagination-centered{text-align:center}.pagination-right{text-align:right}.pagination-large>li>a,.pagination-large>li>span{padding:11px 19px;font-size:17.5px}.pagination-large>li:first-child>a,.pagination-large>li:first-child>span{-webkit-border-top-left-radius:6px;-moz-border-radius-topleft:6px;border-bottom-left-radius:6px;border-top-left-radius:6px}.pagination-large>li:last-child>a,.pagination-large>li:last-child>span{-webkit-border-top-right-radius:6px;-moz-border-radius-topright:6px;border-bottom-right-radius:6px;border-top-right-radius:6px}.pagination-mini>li:first-child>a,.pagination-mini>li:first-child>span,.pagination-small>li:first-child>a,.pagination-small>li:first-child>span{-webkit-border-top-left-radius:3px;-moz-border-radius-topleft:3px;border-bottom-left-radius:3px;border-top-left-radius:3px}.pagination-mini>li:last-child>a,.pagination-mini>li:last-child>span,.pagination-small>li:last-child>a,.pagination-small>li:last-child>span{-webkit-border-top-right-radius:3px;-moz-border-radius-topright:3px;border-bottom-right-radius:3px;border-top-right-radius:3px}.pagination-small>li>a,.pagination-small>li>span{padding:2px 10px;font-size:11.9px}.pagination-mini>li>a,.pagination-mini>li>span{padding:0 6px;font-size:10.5px}.hide-tray{display:none}.show-tray{display:block!important}.tray{border-bottom:1px solid #999;border-left:1px solid #999;box-shadow:-6px 6px 0 0 rgba(0,0,0,.1);display:none;position:absolute;right:5px;top:55px;z-index:11;background-color:#333;color:#fff;margin:0}.tray .add-on{font-size:16px;background:none;padding:0;margin:10px 0;border:none;display:block;text-align:left;color:#fff;text-shadow:none;height:auto;line-height:1em}.tray input[type=text],.tray textarea{border-radius:5px;background-color:#666;padding:8px;border:none;color:#eee;font-size:13px}.tray input[type=text]:focus,.tray input[type=text]:hover,.tray textarea:focus,.tray textarea:hover{border:2px solid #fff}.tray input[type=text],.tray textarea{box-shadow:none;border-radius:5px;background-color:hsla(0,0%,100%,.1);padding:8px;border:2px solid hsla(0,0%,100%,.1);color:hsla(0,0%,100%,.8);font-size:13px}.tray form input:-moz-placeholder,.tray input:-ms-input-placeholder,.tray input:-webkit-input-placeholder{color:hsla(0,0%,100%,.4)}.tray:before{content:\'\';position:absolute;top:-25px;border-color:transparent transparent #333;border-style:solid;border-width:15px;width:0;height:0}#header-lookahead .dropdown-menu li.active{width:100%}.fade{transition:opacity .25s ease-in-out;-moz-transition:opacity .25s ease-in-out;-webkit-transition:opacity .25s ease-in-out}.fadeIn{opacity:1}.fadeOut{opacity:0}@-webkit-keyframes errorBlinkBG{0%{background:#e33f3b}to{background:#fff}}@keyframes errorBlinkBG{0%{background:#e33f3b}to{background:#fff}}@-webkit-keyframes slideDown{0%{opacity:0;max-height:0}to{opacity:1;max-height:1000px}}@keyframes slideDown{0%{opacity:0;max-height:0}to{opacity:1;max-height:1000px}}@-webkit-keyframes slideUp{0%{max-height:1000px;opacity:1}to{max-height:0;opacity:0}}@keyframes slideUp{0%{max-height:1000px;opacity:1}to{max-height:0;opacity:0}}.highlight{-webkit-animation:highlight-element 2.5s 1;-moz-animation:highlight-element 2.5s 1}@-webkit-keyframes highlight-element{0%{background-color:#bbb}to{background-color:#f1f1f1}}.fade-enter{opacity:0;transition:opacity .25s}.fade-enter.fade-enter-active{opacity:1}.fade-leave{opacity:1;transition:opacity .25s}.fade-leave.fade-leave-active{opacity:0}.slow-fade-enter{opacity:0;transition:opacity .75s}.slow-fade-enter.slow-fade-enter-active{opacity:1}.slow-fade-leave{opacity:1;transition:opacity .75s}.slow-fade-leave.slow-fade-leave-active{opacity:0}body #dashboard #notification-center-btn{border:0;background-color:#f2f2f2;border-left:1px solid #ccc;font-size:24px;color:#666;padding:0;cursor:pointer;-ms-flex:0 0 auto;flex:0 0 auto}body #dashboard #notification-center-btn>div{padding:17px 16px 16px}body #dashboard #notification-center-btn:hover{color:#af2d24}#notification-center .notification-center-panel{z-index:12;-webkit-transform:translate(306px);transform:translate(306px);position:fixed;box-shadow:0 6px 5px 4px rgba(0,0,0,.1);top:0;right:0;width:300px;height:100%;-webkit-transition:all .3s ease-out;transition:all .3s ease-out;background-color:#333;color:#ddd}#notification-center .notification-center-panel.visible{-webkit-transform:translate(0);transform:translate(0)}#notification-center .notification-center-panel header{-ms-flex:0 0 auto;flex:0 0 auto;padding:16px}#notification-center .notification-center-panel header h1{font-size:16px;line-height:20px;margin:0;color:#fff;font-weight:400}#notification-center .notification-center-panel header .fonticon-bell{-ms-flex:0 0 30px;flex:0 0 30px}#notification-center .notification-center-panel header button{-ms-flex:0 0 46px;flex:0 0 46px;background-color:transparent;border:0;margin:-18px -16px -14px;font-size:21px;color:#ddd}#notification-center .notification-center-panel .notification-filter{-ms-flex:0 0 29px;flex:0 0 29px;list-style:none;margin:0;font-size:13px}#notification-center .notification-center-panel .notification-filter li{text-align:center;margin-right:1px;background-color:#444;padding:4px 0 3px;cursor:pointer}#notification-center .notification-center-panel .notification-filter li.selected{background-color:#555}#notification-center .notification-center-panel .notification-filter .fonticon{font-size:16px}#notification-center .notification-center-panel .notification-filter .fonticon-ok-circled{font-size:14px}#notification-center .notification-center-panel .notification-list{margin:15px 0 0;list-style-type:none}#notification-center .notification-center-panel .notification-list li{margin:0 16px;line-height:16px;font-size:12px;overflow:hidden;border-bottom:1px solid #222}#notification-center .notification-center-panel .notification-list li.no-notifications{color:#999;margin-top:25px;border-bottom:0}#notification-center .notification-center-panel .notification-list li>div{padding:10px 0 15px}#notification-center .notification-center-panel .notification-list li span{-ms-flex:0 0 30px;flex:0 0 30px}#notification-center .notification-center-panel .notification-list li button{-ms-flex:0 0 22px;flex:0 0 22px;color:#ddd;background:transparent;border:0;height:20px;margin-top:-4px;margin-left:6px}#notification-center .notification-center-panel .notification-list li p{margin-bottom:0}#notification-center .notification-center-panel .notification-list .fonticon{font-size:15px}#notification-center .notification-center-panel .notification-list .fonticon-ok-circled{font-size:13px}#notification-center .notification-center-panel .notification-list a{color:#fff;text-decoration:underline}#notification-center .notification-center-panel .notification-list .notification-actions{font-size:11px;margin-top:2px}#notification-center .notification-center-panel .notification-list .notification-actions span.divider{color:#444;padding:0 5px}#notification-center .notification-center-panel .notification-list .time-elapsed{color:#565656}#notification-center .notification-center-panel .notification-list .copy{color:#049cdb;text-decoration:none}#notification-center .notification-center-panel .notification-list .copy:hover{color:#e33f3b;text-decoration:underline}#notification-center .notification-center-panel footer{border-top:1px solid #555;-ms-flex:0 0 auto;flex:0 0 auto;text-align:center;padding:4px}#notification-center .fonticon-ok-circled{color:#448c11}#notification-center .fonticon-attention-circled{color:#c45b55}#notification-center .fonticon-info-circled{color:#329898}#notification-center .notification-page-mask{z-index:-1;position:fixed;top:0;right:0;bottom:0;left:0;opacity:0;-webkit-transition:all .3s ease-out;transition:all .3s ease-out}#notification-center .notification-page-mask.visible{z-index:10;opacity:.3;background-color:#000}@-webkit-keyframes in{0%{max-height:0}to{max-height:1000px}}@-webkit-keyframes out{0%{max-height:1000px}to{max-height:0}}@keyframes in{0%{max-height:0}to{max-height:1000px}}@keyframes out{0%{max-height:1000px}to{max-height:0}}*,:after,:before{box-sizing:border-box}body,html{height:100%}body{font-size:16px;line-height:1.3;padding-bottom:0;color:#333;background-color:#f2f2f2}h2,h3,h4{font-weight:600}a{-webkit-transition:all .25s linear;transition:all .25s linear}a:focus,button:focus{outline:0}.table input[type=checkbox]{margin:0 0 0 8px}a,a:active,a:visited{color:#e33f3b}a:hover{color:#af2d24}.page-header{border-bottom:1px solid #e3e3e3;margin-bottom:10px}.page-header h3{text-transform:capitalize;margin-bottom:0}.nav-tabs>li{margin-right:2px}.nav-tabs>li>a{cursor:pointer;color:#333;border-color:#eee #eee #ddd;text-decoration:none;background-color:#eee;border-radius:0;border-left:none;border-right:none}.nav-tabs>li>a:focus,.nav-tabs>li>a:hover{background-color:#e33f3b;border-top:1px solid #e33f3b;color:#fff}.well select{margin:0}.well .controls-group{margin-bottom:8px}.well .controls-group:first-child,.well .controls-group:last-child{margin-top:24px}.well .controls-row{margin-bottom:8px}.well .row-fluid{margin:0}.well .row-fluid .row-fluid:last-child .well-item{border:none}.well .well-item{color:#666;font-size:12px;border-bottom:1px solid #e5e5e5;padding:8px 4px}.well .well-item strong{font-size:16px}table.table{table-layout:fixed}table tr td{word-wrap:break-word}table tr td.select{width:20px}thead{border-bottom:2px solid #e33f3b}tbody{padding-top:10px}.table-condensed td{padding:18px 5px}.table-striped tbody>tr:nth-child(odd)>td,.table-striped tbody>tr:nth-child(odd)>th{background-color:#f7f7f7}table.databases{clear:both}.nav-tabs>li>a .fonticon:before{margin-right:6px;font-size:16px}.global-notification.alert{padding-left:20px;padding-top:20px;min-height:64px;margin-bottom:auto;text-shadow:none;box-shadow:0 4px 0 rgba(0,0,0,.45);border-radius:0;border-bottom:1px solid #3a2c2b;box-shadow:0 4px 0 0 rgba(0,0,0,.4)}.global-notification.alert a,.global-notification.alert a:hover{color:#cecece;text-decoration:underline}.global-notification.alert a.js-dismiss{color:#fff}.global-notification.alert a.js-dismiss :hover{color:hsla(0,0%,100%,.4)}.global-notification.alert-success{background-color:#448c11;color:#cbdfbd}.global-notification.alert-success h4{color:#cbdfbd}.global-notification.alert-danger,.global-notification.alert-error{background-color:#222;color:#ff0c35}.global-notification.alert-danger h4,.global-notification.alert-error h4{color:#ff0c35}.global-notification.alert-info{background-color:#329898;color:#fff}.global-notification.alert-info h4{color:#fff}.notification-icon{padding-right:8px}#dashboard-upper-content .tab-content{padding-top:70px}#dashboard-upper-content .well{padding:20px;border-radius:0;box-shadow:none}#dashboard-content .scrollable{height:auto;overflow-y:auto;overflow-x:hidden;width:100%;position:absolute;padding:0;left:0;right:0;top:0;bottom:0}.result-tools{border-bottom:1px solid #999;padding:10px 0;float:left;width:100%;margin-bottom:10px}#db-views-tabs-nav{position:fixed;z-index:1;margin-top:19px;margin-bottom:0;padding:0 20px}.db-views-smaller{max-width:500px}.select>a{display:block;padding:5px 15px 5px 5px;border:1px solid #989898;position:relative;background-color:#fff;color:#666}.select>a:after{content:\'\';width:0;height:0;border-left:7px solid transparent;border-right:7px solid transparent;border-top:7px solid #989898;position:absolute;right:9px;top:12px}.select>a:before{content:\'\';border-left:1px solid #989898;height:30px;position:absolute;right:30px;top:0}.view.show{color:gray}div.spinner{position:absolute;left:50%;top:50%}.header-icon{font-size:20px}.header-icon:before{float:left;margin:10px 6px 0 0}.js-filter-form .help-block{padding:5px 0}.js-filter-form .icon{font-size:16px}#dashboard>header{background-color:#f1f1f1;height:64px}#dashboard>header>div{height:65px;border-bottom:1px solid #999;box-shadow:0 6px 0 0 rgba(0,0,0,.1);position:absolute;width:100%;z-index:2}body #dashboard .two-panel-header #breadcrumbs{-ms-flex:0 0 331px;flex:0 0 331px}.with-sidebar #breadcrumbs{border-right:1px solid #999;width:331px}.with-sidebar #breadcrumbs .active{width:244px}body #dashboard .flex-body#breadcrumbs{overflow:hidden}#breadcrumbs{height:64px}#breadcrumbs .header-left>div{display:inline-block}#breadcrumbs .breadcrumb-back-link{border-right:1px solid #ccc}#breadcrumbs .breadcrumb-back-link a{font-size:20px;margin-top:1px}#breadcrumbs .breadcrumb{margin-bottom:0;background-color:transparent;padding:0}#breadcrumbs .breadcrumb li{padding:22px 10px;color:#e33f3b;font-size:24px;text-shadow:none}#breadcrumbs .breadcrumb li:first-child{font-size:24px}#breadcrumbs .breadcrumb li:first-child a,.two-pane #breadcrumbs .breadcrumb li:first-child,.with-sidebar #breadcrumbs .breadcrumb li:first-child{float:left}#breadcrumbs .breadcrumb li.active{color:#333;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#breadcrumbs .breadcrumb li.divider{font-size:14px;color:#ccc;padding:20px 0;width:10px}#breadcrumbs .breadcrumb li a{text-decoration:none;color:#e33f3b}#breadcrumbs .breadcrumb .fonticon-right-open{position:absolute}#breadcrumbs .breadcrumb .fonticon-right-open.divider{padding:23px 0}#breadcrumbs .breadcrumb .fonticon-right-open+li{text-overflow:inherit;overflow:auto;width:auto;margin-left:14px}.header-left{position:relative}.header-right .well{padding:0;margin:0}.faux-header__searchboxwrapper{overflow:visible;height:64px;width:235px}.faux-header__searchboxcontainer{height:64px;overflow:visible;position:absolute;padding:12px}.faux-header__searchboxcontainer .Select-control,.faux-header__searchboxcontainer .Select-menu-outer{width:210px}#right-header .faux-header__searchboxcontainer .Select-menu-outer{min-width:210px;max-width:450px;width:auto}#right-header .faux-header__searchboxcontainer .Select-menu-outer>div>div{padding-right:25px}.Select div.Select-control{border-radius:initial;border:none}.Select .Select-menu-outer{border-radius:inherit;border:none}.Select-option{color:#fff;background-color:#333}.Select-option:hover,.Select .is-focused{background-color:#e33f3b}.Select-option:last-child{border-radius:initial}.Select .is-focused:not(.is-open)>.Select-control{box-shadow:transparent}.Select .Select-menu{max-height:291px;background-color:#333}footer.pagination-footer{background-color:#fff;border-top:1px solid #ccc;height:50px;overflow:hidden;font-size:14px}footer.pagination-footer .pagination{box-shadow:none;margin:0;height:50px;border-left:1px solid #ccc}footer.pagination-footer .pagination li{display:inline-block}footer.pagination-footer .pagination li a{padding:15px 10px 15px 15px;border:none}footer.pagination-footer .page-controls{float:left}footer.pagination-footer .current-databases,footer.pagination-footer .current-docs{float:right;margin:17px 20px}footer.pagination-footer .documents-pagination{float:right}footer.pagination-footer #per-page{float:right;top:2px}footer.pagination-footer #per-page #select-per-page{margin-top:10px}#right-content footer.pagination-footer{bottom:64px}#primary-nav-right-shadow{position:absolute;top:0;right:0;bottom:0;background-color:rgba(0,0,0,.1);width:6px;z-index:6}.modal-title{font-size:22px;margin:0;line-height:30px}.modal-footer{background-color:transparent;border-top:none;color:#666}.modal-footer a{color:#666}.modal-header{border-bottom:1px solid #666}.simple-header{font-weight:400;font-size:15pt;border-bottom:1px solid #ccc;margin-bottom:30px;margin-top:0}@media (max-width:730px){.closeMenu .one-pane .faux-header__searchboxwrapper{display:none}}@media (max-width:1000px){.closeMenu .with-sidebar .faux-header__searchboxwrapper{display:none}}@media (max-width:875px){body:not(.closeMenu) .one-pane .faux-header__searchboxwrapper{display:none}}@media (max-width:1285px){body:not(.closeMenu) .with-sidebar .faux-header__searchboxwrapper{display:none}}body .control-toggle-include-docs span{margin-left:0}body .control-toggle-include-docs span:before{content:"Include Docs"}@media (max-width:1177px){body.closeMenu .with-sidebar .two-panel-header .control-toggle-include-docs span:before{content:" Docs"}body.closeMenu .with-sidebar .two-panel-header .right-header button i:before{margin:2px 0 0}}@media (max-width:1120px){body.closeMenu .with-sidebar .two-panel-header .control-toggle-include-docs span:before{content:"Docs"}body.closeMenu .with-sidebar .two-panel-header button:not(.control-toggle-include-docs) span{display:none}body.closeMenu .with-sidebar .two-panel-header button i:before{float:none}body.closeMenu .with-sidebar .two-panel-header .right-header button i:before{margin:2px 0 0}body.closeMenu .with-sidebar .two-panel-header #query-options-tray:before{right:130px}body.closeMenu .with-sidebar .two-panel-header .api-bar-tray:before{right:68px}}@media (max-width:1339px){body:not(.closeMenu) .with-sidebar .two-panel-header .control-toggle-include-docs span:before{content:"Docs"}body:not(.closeMenu) .with-sidebar .two-panel-header .right-header button i:before{margin:2px 0 0}}@media (max-width:1090px){body:not(.closeMenu) .with-sidebar .two-panel-header .control-toggle-include-docs span:before{content:"Docs"}body:not(.closeMenu) .with-sidebar .two-panel-header button:not(.control-toggle-include-docs) span{display:none}body:not(.closeMenu) .with-sidebar .two-panel-header button i:before{float:none}body:not(.closeMenu) .with-sidebar .two-panel-header .right-header button i:before{margin:2px 0 0}}.capitalize{text-transform:capitalize}.fauxton-table-list a.db-actions,.fauxton-table-list a.db-actions:visited{color:#e33f3b;border:1px solid #e3e3e3;padding:5px 7px;border-radius:6px;text-decoration:none;font-size:19px}.fauxton-table-list td{vertical-align:middle}',""]);
},function(e,t){e.exports=function(){var e=[];return e.toString=function(){for(var e=[],t=0;t<this.length;t++){var n=this[t];n[2]?e.push("@media "+n[2]+"{"+n[1]+"}"):e.push(n[1])}return e.join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var r={},i=0;i<this.length;i++){var o=this[i][0];"number"==typeof o&&(r[o]=!0)}for(i=0;i<t.length;i++){var a=t[i];"number"==typeof a[0]&&r[a[0]]||(n&&!a[2]?a[2]=n:n&&(a[2]="("+a[2]+") and ("+n+")"),e.push(a))}},e}},function(e,t,n){e.exports=n.p+"dashboard.assets/fonts/fontawesome-webfont.eot"},276,function(e,t,n){e.exports=n.p+"dashboard.assets/fonts/fontawesome-webfont.woff"},function(e,t,n){e.exports=n.p+"dashboard.assets/fonts/fontawesome-webfont.ttf"},function(e,t,n){e.exports=n.p+"dashboard.assets/img/fontawesome-webfont.svg"},function(e,t,n){e.exports=n.p+"dashboard.assets/fonts/fauxtonicon5.eot"},function(e,t,n){e.exports=n.p+"dashboard.assets/fonts/fauxtonicon5.woff"},function(e,t,n){e.exports=n.p+"dashboard.assets/fonts/fauxtonicon5.ttf"},function(e,t,n){e.exports=n.p+"dashboard.assets/img/fauxtonicon5.svg"},function(e,t,n){e.exports=n.p+"dashboard.assets/img/loader.gif"},function(e,t,n){e.exports=n.p+"dashboard.assets/img/CouchDB-negative-logo.png"},function(e,t,n){e.exports=n.p+"dashboard.assets/img/couchdb-logo.png"},function(e,t,n){function r(e,t){for(var n=0;n<e.length;n++){var r=e[n],i=p[r.id];if(i){i.refs++;for(var o=0;o<i.parts.length;o++)i.parts[o](r.parts[o]);for(;o<r.parts.length;o++)i.parts.push(u(r.parts[o],t))}else{for(var a=[],o=0;o<r.parts.length;o++)a.push(u(r.parts[o],t));p[r.id]={id:r.id,refs:1,parts:a}}}}function i(e){for(var t=[],n={},r=0;r<e.length;r++){var i=e[r],o=i[0],a=i[1],s=i[2],l=i[3],u={css:a,media:s,sourceMap:l};n[o]?n[o].parts.push(u):t.push(n[o]={id:o,parts:[u]})}return t}function o(e,t){var n=m(),r=y[y.length-1];if("top"===e.insertAt)r?r.nextSibling?n.insertBefore(t,r.nextSibling):n.appendChild(t):n.insertBefore(t,n.firstChild),y.push(t);else{if("bottom"!==e.insertAt)throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");n.appendChild(t)}}function a(e){e.parentNode.removeChild(e);var t=y.indexOf(e);t>=0&&y.splice(t,1)}function s(e){var t=document.createElement("style");return t.type="text/css",o(e,t),t}function l(e){var t=document.createElement("link");return t.rel="stylesheet",o(e,t),t}function u(e,t){var n,r,i;if(t.singleton){var o=b++;n=v||(v=s(t)),r=c.bind(null,n,o,!1),i=c.bind(null,n,o,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=l(t),r=f.bind(null,n),i=function(){a(n),n.href&&URL.revokeObjectURL(n.href)}):(n=s(t),r=d.bind(null,n),i=function(){a(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else i()}}function c(e,t,n,r){var i=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=w(t,i);else{var o=document.createTextNode(i),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(o,a[t]):e.appendChild(o)}}function d(e,t){var n=t.css,r=t.media;if(r&&e.setAttribute("media",r),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}function f(e,t){var n=t.css,r=t.sourceMap;r&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var i=new Blob([n],{type:"text/css"}),o=e.href;e.href=URL.createObjectURL(i),o&&URL.revokeObjectURL(o)}var p={},h=function(e){var t;return function(){return"undefined"==typeof t&&(t=e.apply(this,arguments)),t}},g=h(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),m=h(function(){return document.head||document.getElementsByTagName("head")[0]}),v=null,b=0,y=[];e.exports=function(e,t){if("object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");t=t||{},"undefined"==typeof t.singleton&&(t.singleton=g()),"undefined"==typeof t.insertAt&&(t.insertAt="bottom");var n=i(e);return r(n,t),function(e){for(var o=[],a=0;a<n.length;a++){var s=n[a],l=p[s.id];l.refs--,o.push(l)}if(e){var u=i(e);r(u,t)}for(var a=0;a<o.length;a++){var l=o[a];if(0===l.refs){for(var c=0;c<l.parts.length;c++)l.parts[c]();delete p[l.id]}}}};var w=function(){var e=[];return function(t,n){return e[t]=n,e.filter(Boolean).join("\n")}}()},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(290),o=r(i),a=n(665),s=r(a),l=n(668),u=r(l),c=n(689),d=r(c),f=n(803),p=r(f),h=n(817),g=r(h),m=n(826),v=r(m),b=n(829),y=r(b),w=n(839),x=r(w),_=n(845),E=r(_),C=n(848),k=r(C),S=n(857),A=r(S),T=n(866),D=r(T),N=n(876),F=r(N);t["default"]=[o["default"],s["default"],u["default"],d["default"],p["default"],g["default"],v["default"],y["default"],x["default"],E["default"],k["default"],A["default"],D["default"],F["default"]]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(84),o=r(i),a=n(99),s=r(a),l=n(106),u=(r(l),n(291)),c=(r(u),n(573)),d=r(c),f=n(574),p=(r(f),n(658)),h=r(p),g=n(661),m=r(g),v=n(293),b=r(v),y=n(296),w=r(y),x=n(662);n(663);var E=s["default"].addon();E.initialize=function(){s["default"].RouteObject.on("beforeEstablish",function(e){m["default"].setNavbarActiveLink(_.result(e,"selectedHeader")),e.setComponent("#api-navbar",b["default"].ApiBarController,{buttonVisible:!0,contentVisible:!1});var t=e.get("apiUrl");if(t?w["default"].updateAPIBar({buttonVisible:!0,contentVisible:!1,endpoint:t[0],docURL:t[1]}):w["default"].hideAPIBarButton(),e.get("hideNotificationCenter")||e.setComponent("#notification-center-btn",d["default"].NotificationCenterButton),!e.overrideBreadcrumbs){s["default"].masterLayout.removeView("#breadcrumbs");var n=e.get("crumbs");n.length&&e.setComponent("#breadcrumbs",x.Breadcrumbs,{crumbs:n})}});var e=$("#primary-navbar")[0];e&&h["default"].renderNavBar(e);var t=$("#notifications")[0];t&&d["default"].renderNotificationController(t);var n=new E.VersionInfo;n.fetch().then(function(){m["default"].setNavbarVersionInfo(n.get("version"))})},E.VersionInfo=Backbone.Model.extend({url:function(){return o["default"].host}}),t["default"]=E},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(84),o=r(i),a=n(99),s=r(a),l=n(292),u=(r(l),n(293)),c=r(u),d=n(296),f=r(d),p=n(556),h=r(p);n(554);var g=s["default"].addon();g.LeftHeader=s["default"].View.extend({className:"header-left",template:"addons/fauxton/templates/header_left",initialize:function(e){this.crumbs=e.crumbs||[],this.dbName=e.databaseName},updateCrumbs:function(e){_.isEqual(this.crumbs,e)||(this.crumbs=e,this.breadcrumbs&&this.breadcrumbs.update(e))},unselectLastBreadcrumb:function(){this.breadcrumbs.unselectLastBreadcrumb()},beforeRender:function(){this.setUpCrumbs(),this.setUpDropDownMenu()},setUpCrumbs:function(){this.breadcrumbs=this.insertView("#header-breadcrumbs",new g.Breadcrumbs({crumbs:this.crumbs}))},getModififyDbLinks:function(){var e=f["default"].showDeleteDatabaseModal;return h["default"].getModifyDatabaseLinks(this.dbName,e)},setUpDropDownMenu:function(){var e=h["default"].getNewButtonLinks(this.dbName);e=this.getModififyDbLinks().concat(e),this.dropdown=this.insertView("#header-dropdown-menu",new g.MenuDropDownReact({links:e}))}}),g.MenuDropDownReact=s["default"].View.extend({initialize:function(e){this.options=e},afterRender:function(){c["default"].renderMenuDropDown(this.el,this.options)},cleanup:function(){c["default"].removeMenuDropDown(this.el)}}),g.Breadcrumbs=s["default"].View.extend({className:"breadcrumb pull-left",tagName:"ul",template:"addons/fauxton/templates/breadcrumbs",serialize:function(){var e=_.clone(this.crumbs),t=function(t,n){var r=""!==e[n+1].name;return n<e.length&&t.name&&r};return{toggleDisabled:this.toggleDisabled,crumbs:e,nextCrumbHasLabel:t}},unselectLastBreadcrumb:function(){this.toggleDisabled||this.$(".js-enabled").removeClass("js-enabled")},update:function(e){this.crumbs=e,this.render()},initialize:function(e){this.crumbs=e.crumbs,this.toggleDisabled=e.toggleDisabled||!1}}),g.Tray=s["default"].View.extend({events:{},initTray:function(e){this.toggleTrayBtnSelector=_.has(e,"toggleTrayBtnSelector")?e.toggleTrayBtnSelector:null,this.onShowTray=_.has(e,"onShowTray")?e.onShowTray:null,_.isNull(this.toggleTrayBtnSelector)||(this.events["click "+this.toggleTrayBtnSelector]="toggleTray"),_.bind(this.toggleTray,this),_.bind(this.trayVisible,this),_.bind(this.hideTray,this),_.bind(this.showTray,this),this.trayId="tray-"+this.cid;var t=this;$("body").on("click."+this.trayId,function(e){var n=$(e.target);t.trayVisible()&&(!_.isNull(t.toggleTrayBtnSelector)&&n.closest(t.toggleTrayBtnSelector).length||n.closest(".tray").length||t.hideTray())}),s["default"].Events.on(s["default"].constants.EVENTS.TRAY_OPENED,this.onTrayOpenEvent,this)},cleanup:function(){$("body").off("click."+this.trayId)},onTrayOpenEvent:function(e){_.has(e,"trayId")&&e.trayId!==this.trayId&&this.trayVisible()&&this.hideTray()},toggleTray:function(e){e.preventDefault(),this.trayVisible()?this.hideTray():this.showTray()},hideTray:function(){var e=this.$(".tray");e.velocity("reverse",s["default"].constants.MISC.TRAY_TOGGLE_SPEED,function(){e.hide()}),_.isNull(this.toggleTrayBtnSelector)||this.$(this.toggleTrayBtnSelector).removeClass("enabled")},showTray:function(){this.$(".tray").velocity("transition.slideDownIn",s["default"].constants.MISC.TRAY_TOGGLE_SPEED),_.isNull(this.toggleTrayBtnSelector)||this.$(this.toggleTrayBtnSelector).addClass("enabled"),_.isNull(this.onShowTray)||this.onShowTray(),s["default"].Events.trigger(s["default"].constants.EVENTS.TRAY_OPENED,{trayId:this.trayId})},trayVisible:function(){return this.$(".tray").is(":visible")}}),g.ModalView=s["default"].View.extend({disableLoader:!0,initialize:function(e){_.bindAll(this)},afterRender:function(){var e=this;this.$(".modal").on("shown",function(){e.$("input:text:visible:first").focus()})},showModal:function(){this._showModal&&this._showModal(),this.clear_error_msg(),this.$(".modal").modal(),$(".modal-backdrop").css("z-index",s["default"].constants.MISC.MODAL_BACKDROP_Z_INDEX)},hideModal:function(){this.$(".modal").modal("hide")},set_error_msg:function(e){var t;t="string"==typeof e?e:JSON.parse(e.responseText).reason,this.$("#modal-error").text(t).removeClass("hide")},clear_error_msg:function(){this.$("#modal-error").text(" ").addClass("hide")},serialize:function(){return this.model?this.model.toJSON():{}}}),g.Typeahead=s["default"].View.extend({initialize:function(e){this.source=e.source,this.onUpdateEventName=e.onUpdateEventName},afterRender:function(){var e=this.onUpdateEventName;this.$el.typeahead({source:this.source,updater:function(t){return s["default"].Events.trigger(e,t),t}})}}),g.DbSearchTypeahead=g.Typeahead.extend({initialize:function(e){this.dbLimit=e.dbLimit||30,e.filter&&(this.resultFilter=e.resultFilter),_.bindAll(this)},getURL:function(e,t){return e=encodeURIComponent(e),[o["default"].host,"/_all_dbs?startkey=%22",e,"%22&endkey=%22",e,encodeURIComponent("香"),"%22&limit=",t].join("")},source:function(e,t){var n=this.getURL(e,this.dbLimit),r=this.resultFilter;this.ajaxReq&&this.ajaxReq.abort(),this.ajaxReq=$.ajax({cache:!1,url:n,dataType:"json",success:function(e){r&&(e=r(e)),t(e)}})}});var m;s["default"].RouteObject.on("beforeEstablish",function(e){if(!e.disableLoader){var t={lines:16,length:8,width:4,radius:12,color:"#333",speed:1,trail:10,shadow:!1};if(m)return;$(".spinner").length||$('<div class="spinner"></div>').appendTo("#app-container"),m=new Spinner(t).spin(),$(".spinner").append(m.el)}});var v=function(){m&&(m.stop(),m=null,$(".spinner").remove())},b=function(e){var t=y[e];t&&(t.stop(),$(e).find(".spinner").remove(),delete y[e])},y={};s["default"].RouteObject.on("beforeRender",function(e,t,n){if(v(),!t.disableLoader){var r=_.extend({lines:16,length:8,width:4,radius:12,color:"#333",speed:1,trail:10,shadow:!1},t.loaderStyles),i=new Spinner(r).spin();$('<div class="spinner"></div>').appendTo(n).append(i.el),y[n]=i}}),s["default"].RouteObject.on("afterRender",function(e,t,n){b(n)}),s["default"].RouteObject.on("viewHasRendered",function(e,t){b(t),v()}),t["default"]=g},function(e,t){"use strict";!function(e,t,n){function r(e){return u(arguments,function(t,r){e[t]===n&&(e[t]=r)}),e}function i(e){return u(arguments,function(t,n){e[w][o(e,t)||t]=n}),e}function o(e,t){var r,i,o=e[w];if(o[t]!==n)return t;for(t=t.charAt(0).toUpperCase()+t.slice(1),i=0;i<B[f];i++)if(r=B[i]+t,o[r]!==n)return r}function a(e,t){var n,r=[v,t,~~(100*e)].join("-"),i="{"+v+":"+e+"}";if(!j[r]){for(n=0;n<B[f];n++)try{$.insertRule("@"+(B[n]&&"-"+B[n].toLowerCase()+"-"||"")+"keyframes "+r+"{0%{"+v+":1}"+t+"%"+i+"to"+i+"}",$.cssRules[f])}catch(o){}j[r]=1}return r}function s(e,t,n){return n&&!n[A]&&s(e,n),e.insertBefore(t,n||null),e}function l(e){var n=t.createElement(e||"div");return u(arguments,function(e,t){n[e]=t}),n}function u(e,t){for(var n=~~((e[f]-1)/2),r=1;r<=n;r++)t(e[2*r-1],e[2*r])}var c,d="width",f="length",p="radius",h="lines",g="trail",m="color",v="opacity",b="speed",y="shadow",w="style",x="height",_="left",E="top",C="px",k="childNodes",S="firstChild",A="parentNode",T="position",D="relative",N="absolute",F="animation",M="transform",O="Origin",L="Timeout",P="coord",I="#000",R=w+"Sheets",B="webkit0Moz0ms0O".split(0),j={};s(t.getElementsByTagName("head")[0],l(w));var $=t[R][t[R][f]-1],V=function(e){this.opts=r(e||{},h,12,g,100,f,7,d,5,p,10,m,I,v,.25,b,1)},U=V.prototype={spin:function(t){var n=this,r=n.el=n[h](n.opts);if(t&&s(t,i(r,_,~~(t.offsetWidth/2)+C,E,~~(t.offsetHeight/2)+C),t[S]),!c){var o=n.opts,a=0,l=20/o[b],u=(1-o[v])/(l*o[g]/100),d=l/o[h];!function f(){a++;for(var t=o[h];t;t--){var i=Math.max(1-(a+t*d)%l*u,o[v]);n[v](r,o[h]-t,i,o)}n[L]=n.el&&e["set"+L](f,50)}()}return n},stop:function(){var t=this,r=t.el;return e["clear"+L](t[L]),r&&r[A]&&r[A].removeChild(r),t.el=n,t}};U[h]=function(e){function t(t,n){return i(l(),T,N,d,e[f]+e[d]+C,x,e[d]+C,"background",t,"boxShadow",n,M+O,_,M,"rotate("+~~(360/e[h]*u)+"deg) translate("+e[p]+C+",0)","borderRadius","100em")}for(var n,r=i(l(),T,D),o=a(e[v],e[g]),u=0;u<e[h];u++)n=i(l(),T,N,E,1+~(e[d]/2)+C,M,"translate3d(0,0,0)",F,o+" "+1/e[b]+"s linear infinite "+(1/e[h]/e[b]*u-1/e[b])+"s"),e[y]&&s(n,i(t(I,"0 0 4px "+I),E,2+C)),s(r,s(n,t(e[m],"0 0 1px rgba(0,0,0,.1)")));return r},U[v]=function(e,t,n){e[k][t][w][v]=n};var W="behavior",q="url(#default#VML)",H="group0roundrect0fill0stroke".split(0);!function(){var e,t=i(l(H[0]),W,q);if(!o(t,M)&&t.adj){for(e=0;e<H[f];e++)$.addRule(H[e],W+":"+q);U[h]=function(){function e(e,n,a){s(u,s(i(t(),"rotation",360/r[h]*e+"deg",_,~~n),s(i(l(H[1],"arcsize",1),d,o,x,r[d],_,r[p],E,-r[d]/2,"filter",a),l(H[2],m,r[m],v,r[v]),l(H[3],v,0))))}function t(){return i(l(H[0],P+"size",a+" "+a,P+O,-o+" "+-o),d,a,x,a)}var n,r=this.opts,o=r[f]+r[d],a=2*o,u=t(),c=~(r[f]+r[p]+r[d])+C;if(r[y])for(n=1;n<=r[h];n++)e(n,-2,"progid:DXImage"+M+".Microsoft.Blur(pixel"+p+"=2,make"+y+"=1,"+y+v+"=.3)");for(n=1;n<=r[h];n++)e(n);return s(i(l(),"margin",c+" 0 0 "+c,T,D),u)},U[v]=function(e,t,n,r){r=r[y]&&r[h]||0,e[S][k][t+r][S][S][v]=n}}else c=o(t,F)}(),e.Spinner=V}(window,document)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t,n){var r=d["default"].createClass({displayName:"WrappingElement",componentDidMount:function(){t.forEach(function(e){e.on("change",this.onChange,this)}.bind(this))},componentWillUnmount:function(){t.forEach(function(e){e.off("change",this.onChange)}.bind(this))},getInitialState:function(){return n(this.props)},onChange:function(){this.isMounted()&&this.setState(n(this.props))},handleStoresChanged:function(){this.isMounted()&&this.setState(n(this.props))},render:function(){return d["default"].createElement(e,o({},this.state,this.props))}});return r}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=n(84),s=r(a),l=n(99),u=r(l),c=n(106),d=r(c),f=n(137),p=r(f),h=n(294),g=r(h),m=n(296),v=r(m),b=n(297),y=r(b),w=n(556),x=r(w),E=n(557),C=r(E),k=n(299),S=n(558),A=r(S),T=n(565),D=r(T),N=g["default"].componentStore,F=d["default"].createClass({displayName:"BadgeList",propTypes:{elements:d["default"].PropTypes.array.isRequired,removeBadge:d["default"].PropTypes.func.isRequired},getDefaultProps:function(){return{getLabel:function(e){return e},getId:function(e){return e}}},getBadges:function(){return this.props.elements.map(function(e,t){return d["default"].createElement(M,{label:this.props.getLabel(e),key:t,id:e,remove:this.removeBadge})}.bind(this))},removeBadge:function(e,t){this.props.removeBadge(e,t)},render:function(){return d["default"].createElement("ul",{className:"component-badgelist"},this.getBadges())}}),M=d["default"].createClass({displayName:"Badge",propTypes:{label:d["default"].PropTypes.string.isRequired,remove:d["default"].PropTypes.func.isRequired},remove:function(e){e.preventDefault(),this.props.remove(this.props.label,this.props.id)},render:function(){return d["default"].createElement("li",{className:"component-badge"},d["default"].createElement("span",{className:"label label-info"},this.props.label),d["default"].createElement("a",{href:"#",className:"label label-info remove-filter",onClick:this.remove,"data-bypass":"true"},"×"))}}),O=d["default"].createClass({displayName:"ToggleHeaderButton",getDefaultProps:function(){return{innerClasses:"",fonticon:"",containerClasses:"",selected:!1,title:"",disabled:!1,toggleCallback:null,text:"",iconDefaultClass:"icon"}},render:function(){var e=this.props,t=e.iconDefaultClass,n=e.fonticon,r=e.innerClasses,i=e.selected,o=e.containerClasses,a=e.title,s=e.disabled,l=e.text,u=e.toggleCallback,c=i?"js-headerbar-togglebutton-selected":"";return d["default"].createElement("button",{title:a,disabled:s,onClick:u,className:"button "+o+" "+c},d["default"].createElement("i",{className:t+" "+n+" "+r}),d["default"].createElement("span",null,l))}}),L=d["default"].createClass({displayName:"BulkActionComponent",propTypes:{hasSelectedItem:d["default"].PropTypes.bool.isRequired,removeItem:d["default"].PropTypes.func.isRequired,selectAll:d["default"].PropTypes.func,toggleSelect:d["default"].PropTypes.func.isRequired,isChecked:d["default"].PropTypes.bool.isRequired,disabled:d["default"].PropTypes.bool},getDefaultProps:function(){return{disabled:!1,title:"Select rows that can be...",bulkIcon:"fonticon-trash",buttonTitle:"Delete all selected",dropdownContentText:"Deleted",enableOverlay:!1}},render:function(){return d["default"].createElement("div",{className:"bulk-action-component"},d["default"].createElement("div",{className:"bulk-action-component-selector-group"},this.getMasterSelector(),this.getMultiSelectOptions()))},getMultiSelectOptions:function(){return this.props.hasSelectedItem?d["default"].createElement("button",{onClick:this.props.removeItem,className:"fonticon "+this.props.bulkIcon,title:this.props.buttonTitle}):null},getPopupContent:function(){return d["default"].createElement("ul",{className:"bulk-action-component-popover-actions"},d["default"].createElement("li",{onClick:this.selectAll},d["default"].createElement("i",{className:"icon fonticon-cancel"})," ",this.props.dropdownContentText))},selectAll:function(){this.refs.bulkActionPopover.hide(),this.props.selectAll()},getOverlay:function(){return d["default"].createElement(k.OverlayTrigger,{ref:"bulkActionPopover",trigger:"click",placement:"bottom",rootClose:!0,overlay:d["default"].createElement(k.Popover,{id:"bulk-action-component-popover",title:this.props.title},this.getPopupContent())},d["default"].createElement("div",{className:"arrow-button"},d["default"].createElement("i",{className:"fonticon fonticon-play"})))},getMasterSelector:function(){return d["default"].createElement("div",{className:"bulk-action-component-panel"},d["default"].createElement("input",{type:"checkbox",checked:this.props.isChecked,onChange:this.props.toggleSelect,disabled:this.props.disabled}),this.props.enableOverlay?d["default"].createElement("div",{className:"separator"}):null,this.props.enableOverlay?this.getOverlay():null)}}),P=d["default"].createClass({displayName:"StyledSelect",propTypes:{selectValue:d["default"].PropTypes.string.isRequired,selectId:d["default"].PropTypes.string.isRequired,selectChange:d["default"].PropTypes.func.isRequired},render:function(){return d["default"].createElement("div",{className:"styled-select"},d["default"].createElement("label",{htmlFor:this.props.selectId},d["default"].createElement("i",{className:"fonticon-down-dir"}),d["default"].createElement("select",{value:this.props.selectValue,id:this.props.selectId,className:this.props.selectValue,onChange:this.props.selectChange},this.props.selectContent)))}}),I=d["default"].createClass({displayName:"CodeEditorPanel",getDefaultProps:function(){return{id:"code-editor",className:"",defaultCode:"",title:"",docLink:"",allowZenMode:!0,blur:function(){}}},getInitialState:function(){return this.getStoreState()},getStoreState:function(){return{zenModeEnabled:!1,code:this.props.defaultCode}},componentWillReceiveProps:function(e){e.defaultCode!==this.props.defaultCode&&this.setState({code:e.defaultCode})},ignorableErrors:["Missing name in function declaration.","['{a}'] is better written in dot notation."],getZenModeIcon:function(){if(this.props.allowZenMode)return d["default"].createElement("span",{className:"fonticon fonticon-resize-full zen-editor-icon",title:"Enter Zen mode",onClick:this.enterZenMode})},getDocIcon:function(){if(this.props.docLink)return d["default"].createElement("a",{className:"help-link","data-bypass":"true",href:this.props.docLink,target:"_blank"},d["default"].createElement("i",{className:"icon-question-sign"}))},getZenModeOverlay:function(){if(this.state.zenModeEnabled)return d["default"].createElement(j,{defaultCode:this.state.code,mode:this.props.mode,ignorableErrors:this.ignorableErrors,onExit:this.exitZenMode})},enterZenMode:function(){this.setState({zenModeEnabled:!0,code:this.refs.codeEditor.getValue()})},exitZenMode:function(e){this.setState({zenModeEnabled:!1}),this.getEditor().setValue(e)},getEditor:function(){return this.refs.codeEditor},getValue:function(){return this.getEditor().getValue()},beautify:function(e){this.setState({code:e}),this.getEditor().setValue(e)},update:function(){this.getEditor().setValue(this.state.code)},render:function(){var e="control-group";return this.props.className&&(e+=" "+this.props.className),d["default"].createElement("div",{className:e},d["default"].createElement("label",null,d["default"].createElement("span",null,this.props.title),this.getDocIcon(),this.getZenModeIcon()),d["default"].createElement(R,{id:this.props.id,ref:"codeEditor",mode:"javascript",defaultCode:this.state.code,showGutter:!0,ignorableErrors:this.ignorableErrors,setHeightToLineCount:!0,blur:this.props.blur}),d["default"].createElement(V,{code:this.state.code,beautifiedCode:this.beautify}),this.getZenModeOverlay())}});n(568),n(570),n(572);var R=d["default"].createClass({displayName:"CodeEditor",getDefaultProps:function(){return{id:"code-editor",mode:"javascript",theme:"idle_fingers",fontSize:13,defaultCode:"",showGutter:!0,highlightActiveLine:!0,showPrintMargin:!1,autoScrollEditorIntoView:!0,autoFocus:!1,stringEditModalEnabled:!1,setHeightToLineCount:!1,maxLines:10,editorCommands:[],notifyUnsavedChanges:!1,ignorableErrors:[],change:function(){},blur:function(){}}},getInitialState:function(){return{originalCode:this.props.defaultCode,stringEditModalVisible:!1,stringEditIconVisible:!1,stringEditIconStyle:{},stringEditModalValue:""}},hasChanged:function(){return!_.isEqual(this.state.originalCode,this.getValue())},clearChanges:function(){this.setState({originalCode:this.getValue()})},setupAce:function(e,t){this.editor=D["default"].edit(p["default"].findDOMNode(this.refs.ace)),this.editor.$blockScrolling=1/0,t&&this.setValue(e.defaultCode),this.editor.setShowPrintMargin(e.showPrintMargin),this.editor.autoScrollEditorIntoView=e.autoScrollEditorIntoView,this.editor.setOption("highlightActiveLine",this.props.highlightActiveLine),this.props.setHeightToLineCount&&this.setHeightToLineCount(),this.props.ignorableErrors&&this.removeIgnorableAnnotations(),this.addCommands(),this.editor.getSession().setMode("ace/mode/"+e.mode),this.editor.setTheme("ace/theme/"+e.theme),this.editor.setFontSize(e.fontSize),this.editor.getSession().setTabSize(2),this.editor.getSession().setUseSoftTabs(!0),this.props.autoFocus&&this.editor.focus()},addCommands:function(){_.each(this.props.editorCommands,function(e){this.editor.commands.addCommand(e)},this)},setupEvents:function(){this.editor.on("blur",_.bind(this.onBlur,this)),this.editor.on("change",_.bind(this.onContentChange,this)),this.props.stringEditModalEnabled&&(this.editor.on("changeSelection",_.bind(this.showHideEditStringGutterIcon,this)),this.editor.getSession().on("changeBackMarker",_.bind(this.showHideEditStringGutterIcon,this)),this.editor.getSession().on("changeScrollTop",_.bind(this.updateEditStringGutterIconPosition,this))),this.props.notifyUnsavedChanges&&($(window).on("beforeunload.editor_"+this.props.id,_.bind(this.quitWarningMsg)),u["default"].beforeUnload("editor_"+this.props.id,_.bind(this.quitWarningMsg,this)))},onBlur:function(){this.props.blur(this.getValue())},onContentChange:function(){this.props.setHeightToLineCount&&this.setHeightToLineCount(),this.props.change(this.getValue())},quitWarningMsg:function(){if(this.hasChanged())return"Your changes have not been saved. Click Cancel to return to the document, or OK to proceed."},removeEvents:function(){this.props.notifyUnsavedChanges&&($(window).off("beforeunload.editor_"+this.props.id),u["default"].removeBeforeUnload("editor_"+this.props.id))},setHeightToLineCount:function(){var e=this.editor.getSession().getDocument().getLength(),t=e>this.props.maxLines?this.props.maxLines:e;this.editor.setOptions({maxLines:t})},componentDidMount:function(){this.setupAce(this.props,!0),this.setupEvents(),this.props.autoFocus&&this.editor.focus()},componentWillUnmount:function(){this.removeEvents(),this.editor.destroy()},componentWillReceiveProps:function(e){this.setupAce(e,!1)},getAnnotations:function(){return this.editor.getSession().getAnnotations()},isIgnorableError:function(e){return _.contains(this.props.ignorableErrors,e)},removeIgnorableAnnotations:function(){var e=this.isIgnorableError;this.editor.getSession().on("changeAnnotation",function(){var t=this.editor.getSession().getAnnotations(),n=_.reduce(t,function(t,n){return e(n.raw)||t.push(n),t},[]);t.length!==n.length&&this.editor.getSession().setAnnotations(n)}.bind(this))},showHideEditStringGutterIcon:function(e){return this.hasErrors()||!this.parseLineForStringMatch()?(this.setState({stringEditIconVisible:!1}),!1):(this.setState({stringEditIconVisible:!0,stringEditIconStyle:{top:this.getGutterIconPosition()}}),!0)},updateEditStringGutterIconPosition:function(){this.state.stringEditIconVisible&&this.setState({stringEditIconStyle:{top:this.getGutterIconPosition()}})},getGutterIconPosition:function(){var e=this.getRowHeight(),t=this.editor.session.getScrollTop(),n=e*this.documentToScreenRow(this.getSelectionStart().row)-t;return n+"px"},parseLineForStringMatch:function(){var e=this.getSelectionStart().row,t=this.getSelectionEnd().row;if(e>=0&&t>=0&&e===t&&this.isRowExpanded(e)){var n=this.getLine(e),r=n.match(/^([ \t]*)("[a-zA-Z0-9_]*["|']: )?(["|'].*",?[ \t]*)$/);if(r)return r}return!1},openStringEditModal:function(){var e=this.parseLineForStringMatch(),t=e[3],n=t.length-1;","===t.substring(t.length-1)&&(n=t.length-2),t=t.substring(1,n),this.setState({stringEditModalVisible:!0,stringEditModalValue:t})},saveStringEditModal:function(e){var t=this.parseLineForStringMatch(),n=t[1]||"",r=t[2]||"",i=t[3],o="";","===i.substring(i.length-1)&&(o=","),this.replaceCurrentLine(n+r+JSON.stringify(e)+o+"\n"),this.closeStringEditModal()},closeStringEditModal:function(){this.setState({stringEditModalVisible:!1})},hasErrors:function(){return!_.every(this.getAnnotations(),function(e){return this.isIgnorableError(e.raw)},this)},setReadOnly:function(e){this.editor.setReadOnly(e)},setValue:function(e,t){t=t?t:-1,this.editor.setValue(e,t)},getValue:function(){return this.editor.getValue()},getEditor:function(){return this},getLine:function(e){return this.editor.session.getLine(e)},getSelectionStart:function(){return this.editor.getSelectionRange().start},getSelectionEnd:function(){return this.editor.getSelectionRange().end},getRowHeight:function(){return this.editor.renderer.layerConfig.lineHeight},isRowExpanded:function(e){return!this.editor.getSession().isRowFolded(e)},documentToScreenRow:function(e){return this.editor.getSession().documentToScreenRow(e,0)},replaceCurrentLine:function(e){this.editor.getSelection().selectLine(),this.editor.insert(e),this.editor.getSelection().moveCursorUp()},render:function(){return d["default"].createElement("div",null,d["default"].createElement("div",{ref:"ace",className:"js-editor",id:this.props.id}),d["default"].createElement("button",{ref:"stringEditIcon",className:"btn string-edit",title:"Edit string",disabled:!this.state.stringEditIconVisible,style:this.state.stringEditIconStyle,onClick:this.openStringEditModal},d["default"].createElement("i",{className:"icon icon-edit"})),d["default"].createElement(B,{ref:"stringEditModal",visible:this.state.stringEditModalVisible,value:this.state.stringEditModalValue,onSave:this.saveStringEditModal,onClose:this.closeStringEditModal}))}}),B=d["default"].createClass({displayName:"StringEditModal",propTypes:{value:d["default"].PropTypes.string.isRequired,visible:d["default"].PropTypes.bool.isRequired,onClose:d["default"].PropTypes.func.isRequired,onSave:d["default"].PropTypes.func.isRequired},getDefaultProps:function(){return{visible:!1,onClose:function(){},onSave:function(){}}},componentDidMount:function(){this.props.visible&&this.initEditor(this.props.value)},componentDidUpdate:function(e){if(this.props.visible){var t="";!e.visible&&this.props.visible&&(t=x["default"].parseJSON(this.props.value)),this.initEditor(t)}},initEditor:function(e){this.editor=D["default"].edit(p["default"].findDOMNode(this.refs.stringEditor)),this.editor.$blockScrolling=1/0,this.editor.setShowPrintMargin(!1),this.editor.setOption("highlightActiveLine",!0),this.editor.setTheme("ace/theme/idle_fingers"),this.editor.setValue(e,-1)},closeModal:function(){this.props.onClose()},save:function(){this.props.onSave(this.editor.getValue())},render:function(){return d["default"].createElement(k.Modal,{dialogClassName:"string-editor-modal",show:this.props.visible,onHide:this.closeModal},d["default"].createElement(k.Modal.Header,{closeButton:!0},d["default"].createElement(k.Modal.Title,null,"Edit Value ",d["default"].createElement("span",{id:"string-edit-header"}))),d["default"].createElement(k.Modal.Body,null,d["default"].createElement("div",{id:"modal-error",className:"hide alert alert-error"}),d["default"].createElement("div",{id:"string-editor-wrapper"},d["default"].createElement("div",{ref:"stringEditor",className:"doc-code"}))),d["default"].createElement(k.Modal.Footer,null,d["default"].createElement("a",{className:"cancel-link",onClick:this.closeModal},"Cancel"),d["default"].createElement("button",{id:"string-edit-save-btn",onClick:this.save,className:"btn btn-success save"},d["default"].createElement("i",{className:"fonticon-circle-check"})," Modify Text")))}}),j=d["default"].createClass({displayName:"ZenModeOverlay",getDefaultProps:function(){return{mode:"javascript",defaultCode:"",ignorableErrors:[],onExit:null,highlightActiveLine:!1}},themes:{dark:"idle_fingers",light:"dawn"},getInitialState:function(){
return this.getStoreState()},getStoreState:function(){return{theme:this.getZenTheme(),code:this.props.defaultCode}},getZenTheme:function(){var e=s["default"].utils.localStorageGet("zenTheme");return _.isUndefined(e)?"dark":e},onChange:function(){this.setState(this.getStoreState())},componentDidMount:function(){$(p["default"].findDOMNode(this.refs.exit)).tooltip({placement:"left"}),$(p["default"].findDOMNode(this.refs.theme)).tooltip({placement:"left"})},exitZenMode:function(){this.props.onExit(this.getValue())},getValue:function(){return this.refs.ace.getValue()},toggleTheme:function(){var e="dark"===this.state.theme?"light":"dark";this.setState({theme:e,code:this.getValue()}),s["default"].utils.localStorageSet("zenTheme",e)},setValue:function(e,t){t=t?t:-1,this.editor.setValue(e,t)},render:function(){var e="full-page-editor-modal-wrapper zen-theme-"+this.state.theme,t=[{name:"close",bindKey:{win:"ESC",mac:"ESC"},exec:this.exitZenMode}];return d["default"].createElement("div",{className:e},d["default"].createElement("div",{className:"zen-mode-controls"},d["default"].createElement("ul",null,d["default"].createElement("li",null,d["default"].createElement("span",{ref:"exit",className:"fonticon fonticon-resize-small js-exit-zen-mode","data-toggle":"tooltip","data-container":".zen-mode-controls .tooltips",title:"Exit zen mode (`esc`)",onClick:this.exitZenMode})),d["default"].createElement("li",null,d["default"].createElement("span",{ref:"theme",className:"fonticon fonticon-picture js-toggle-theme","data-toggle":"tooltip","data-container":".zen-mode-controls .tooltips",title:"Switch zen theme",onClick:this.toggleTheme}))),d["default"].createElement("div",{className:"tooltips"})),d["default"].createElement(R,{ref:"ace",autoFocus:!0,theme:this.themes[this.state.theme],defaultCode:this.props.defaultCode,editorCommands:t,ignorableErrors:this.props.ignorableErrors,highlightActiveLine:this.props.highlightActiveLine}))}}),V=d["default"].createClass({displayName:"Beautify",noOfLines:function(){return this.props.code.split(/\r\n|\r|\n/).length},canBeautify:function(){return 1===this.noOfLines()},addTooltip:function(){this.canBeautify&&$(".beautify-tooltip").tooltip({placement:"right"})},componentDidMount:function(){this.addTooltip()},beautify:function(e){e.preventDefault();var t=(0,C["default"])(this.props.code);this.props.beautifiedCode(t),$(".beautify-tooltip").tooltip("hide")},render:function(){return this.canBeautify()?d["default"].createElement("button",{onClick:this.beautify,className:"beautify beautify_map btn btn-primary btn-small beautify-tooltip",type:"button","data-toggle":"tooltip",title:"Reformat your minified code to make edits to it."},"beautify this code"):null}}),U=d["default"].createClass({displayName:"PaddedBorderedBox",render:function(){return d["default"].createElement("div",{className:"bordered-box"},d["default"].createElement("div",{className:"padded-box"},this.props.children))}}),W=d["default"].createClass({displayName:"Document",propTypes:{docIdentifier:d["default"].PropTypes.string.isRequired,docChecked:d["default"].PropTypes.func.isRequired,truncate:d["default"].PropTypes.bool,maxRows:d["default"].PropTypes.number},getDefaultProps:function(){return{truncate:!0,maxRows:500}},onChange:function(e){e.preventDefault(),this.props.docChecked(this.props.doc.id,this.props.doc._rev)},getUrlFragment:function(){return this.props.children?d["default"].createElement("div",{className:"doc-edit-symbol pull-right",title:"Edit document"},this.props.children):""},getExtensionIcons:function(){var e=u["default"].getExtensions("DocList:icons");return _.map(e,function(e,t){return d["default"].createElement(e,{doc:this.props.doc,key:t})},this)},getCheckbox:function(){return this.props.isDeletable?d["default"].createElement("div",{className:"checkbox inline"},d["default"].createElement("input",{id:"checkbox-"+this.props.docIdentifier,checked:this.props.checked,"data-checked":this.props.checked,type:"checkbox",onChange:this.onChange,className:"js-row-select"}),d["default"].createElement("label",{onClick:this.onChange,className:"label-checkbox-doclist",htmlFor:"checkbox-"+this.props.docIdentifier})):d["default"].createElement("div",{className:"checkbox-dummy"})},onDoubleClick:function(e){this.props.onDoubleClick(this.props.docIdentifier,this.props.doc,e)},getDocContent:function(){if(_.isEmpty(this.props.docContent))return null;var e=this.props.docContent,t=!1;if(this.props.truncate){var n=x["default"].truncateDoc(this.props.docContent,this.props.maxRows);t=n.isTruncated,e=n.content}return d["default"].createElement("div",{className:"doc-data"},d["default"].createElement("pre",{className:"prettyprint"},e),t?d["default"].createElement("div",{className:"doc-content-truncated"},"(truncated)"):null)},render:function(){return d["default"].createElement("div",{"data-id":this.props.docIdentifier,onDoubleClick:this.onDoubleClick,className:"doc-row"},d["default"].createElement("div",{className:"custom-inputs"},this.getCheckbox()),d["default"].createElement("div",{className:"doc-item"},d["default"].createElement("header",null,d["default"].createElement("span",{className:"header-keylabel"},this.props.keylabel),d["default"].createElement("span",{className:"header-doc-id"},this.props.header?'"'+this.props.header+'"':null),this.getUrlFragment(),d["default"].createElement("div",{className:"doc-item-extension-icons pull-right"},this.getExtensionIcons())),this.getDocContent()),d["default"].createElement("div",{className:"clearfix"}))}}),q=d["default"].createClass({displayName:"LoadLines",render:function(){return d["default"].createElement("div",{className:"loading-lines"},d["default"].createElement("div",{id:"line1"}," "),d["default"].createElement("div",{id:"line2"}," "),d["default"].createElement("div",{id:"line3"}," "),d["default"].createElement("div",{id:"line4"}," "))}}),H=d["default"].createClass({displayName:"ConfirmButton",propTypes:{showIcon:d["default"].PropTypes.bool,id:d["default"].PropTypes.string,customIcon:d["default"].PropTypes.string,style:d["default"].PropTypes.object,buttonType:d["default"].PropTypes.string,"data-id":d["default"].PropTypes.string,onClick:d["default"].PropTypes.func,disabled:d["default"].PropTypes.bool},getDefaultProps:function(){return{disabled:!1,showIcon:!0,customIcon:"fonticon-ok-circled",buttonType:"btn-success",style:{},"data-id":null,onClick:function(){}}},getIcon:function(){return this.props.showIcon?d["default"].createElement("i",{className:"icon "+this.props.customIcon}):null},render:function(){var e=this.props,t=e.onClick,n=e.buttonType,r=e.id,i=e.style,o=e.text,a=e.disabled;return d["default"].createElement("button",{onClick:t,type:"submit",disabled:a,"data-id":this.props["data-id"],className:"btn save "+n,id:r,style:i},this.getIcon(),o)}}),z=d["default"].createClass({displayName:"MenuDropDown",getDefaultProps:function(){return{icon:"fonticon-plus-circled"}},createSectionLinks:function(e){return e?e.map(function(e,t){return this.createEntry(e,t)}.bind(this)):null},createEntry:function(e,t){return d["default"].createElement("li",{key:t},d["default"].createElement("a",{className:e.icon?"icon "+e.icon:"","data-bypass":e.external?"true":"",href:e.url,onClick:e.onClick,target:e.external?"_blank":""},e.title))},createSectionTitle:function(e){return e?d["default"].createElement("li",{className:"header-label"},e):null},createSection:function(){return this.props.links.map(function(e,t){return e.title&&e.links?[this.createSectionTitle(e.title),this.createSectionLinks(e.links)]:this.createEntry(e,"el"+t)}.bind(this))},render:function(){return d["default"].createElement("div",{className:"dropdown"},d["default"].createElement("a",{className:"dropdown-toggle icon "+this.props.icon,"data-toggle":"dropdown",href:"#","data-bypass":"true"}),d["default"].createElement("ul",{className:"dropdown-menu arrow",role:"menu","aria-labelledby":"dLabel"},this.createSection()))}}),G=d["default"].createClass({displayName:"TrayContents",getChildren:function(){var e="tray show-tray "+this.props.className;return d["default"].createElement("div",{key:1,id:this.props.id,className:e},this.props.children)},render:function(){return d["default"].createElement(A["default"],{transitionName:"tray",transitionAppear:!0,component:"div",transitionAppearTimeout:500,transitionEnterTimeout:500,transitionLeaveTimeout:300},this.getChildren())}}),K=d["default"].createClass({displayName:"TrayWrapper",getDefaultProps:function(){return{className:""}},renderChildren:function(){return d["default"].Children.map(this.props.children,function(e,t){var n=this,r={};return Object.keys(this.props).filter(function(e){return n.props.hasOwnProperty(e)}).map(function(e){return r[e]=n.props[e]}),d["default"].cloneElement(e,r)}.bind(this))},render:function(){return d["default"].createElement("div",null,this.renderChildren())}}),Y=d["default"].createClass({displayName:"APIBar",propTypes:{buttonVisible:d["default"].PropTypes.bool.isRequired,contentVisible:d["default"].PropTypes.bool.isRequired,docURL:d["default"].PropTypes.string,endpoint:d["default"].PropTypes.string},showCopiedMessage:function(){u["default"].addNotification({msg:"The API URL has been copied to the clipboard.",type:"success",clear:!0})},getDocIcon:function(){return this.props.docURL?d["default"].createElement("a",{className:"help-link","data-bypass":"true",href:this.props.docURL,target:"_blank"},d["default"].createElement("i",{className:"icon icon-question-sign"})):null},getTray:function(){return this.props.contentVisible?d["default"].createElement(G,{className:"tray show-tray api-bar-tray"},d["default"].createElement("div",{className:"input-prepend input-append"},d["default"].createElement("span",{className:"add-on"},"API URL",this.getDocIcon()),d["default"].createElement(y["default"].ClipboardWithTextField,{onClipBoardClick:this.showCopiedMessage,text:"Copy URL",textToCopy:this.props.endpoint,showCopyIcon:!1,uniqueKey:"clipboard-apiurl"}),d["default"].createElement("div",{className:"add-on"},d["default"].createElement("a",{"data-bypass":"true",href:this.props.endpoint,target:"_blank",className:"btn"},"View JSON")))):null},toggleTrayVisibility:function(){v["default"].toggleApiBarVisibility(!this.props.contentVisible)},componentDidMount:function(){$("body").on("click.APIBar",function(e){$(".show-tray.api-bar-tray").length&&0===$(e.target).closest(".api-bar-tray,.control-toggle-api-url").length&&v["default"].toggleApiBarVisibility(!1)}.bind(this))},componentWillUnmount:function(){$("body").off("click.APIBar")},render:function(){return this.props.buttonVisible&&this.props.endpoint?d["default"].createElement("div",null,d["default"].createElement(O,{containerClasses:"header-control-box control-toggle-api-url",title:"API URL",fonticon:"fonticon-link",text:"API",toggleCallback:this.toggleTrayVisibility}),this.getTray()):null}}),X=d["default"].createClass({displayName:"ApiBarController",getWrap:function(){return i(K,[N],function(){return{buttonVisible:N.getIsAPIBarButtonVisible(),contentVisible:N.getIsAPIBarVisible(),endpoint:N.getEndpoint(),docURL:N.getDocURL()}})},render:function(){var e=this.getWrap();return d["default"].createElement(e,null,d["default"].createElement(Y,{buttonVisible:!0,contentVisible:!1}))}}),Q=d["default"].createClass({displayName:"DeleteDatabaseModal",getInitialState:function(){return{inputValue:"",disableSubmit:!0}},propTypes:{showHide:d["default"].PropTypes.func.isRequired,modalProps:d["default"].PropTypes.object},close:function(e){e&&e.preventDefault(),this.setState({inputValue:"",disableSubmit:!0}),this.props.showHide({showModal:!1})},open:function(){this.props.showHide({showModal:!0})},getDatabaseName:function(){return this.props.modalProps.dbId.trim()},onInputChange:function(e){var t=encodeURIComponent(e.target.value.trim());this.setState({inputValue:t}),this.setState({disableSubmit:t!==this.getDatabaseName()})},onDeleteClick:function(e){e.preventDefault(),v["default"].deleteDatabase(this.getDatabaseName())},onInputKeypress:function(e){13===e.keyCode&&this.state.disableSubmit!==!0&&v["default"].deleteDatabase(this.getDatabaseName())},render:function(){var e=this.props.modalProps.isSystemDatabase,t=this.props.modalProps.showDeleteModal,n=this.props.modalProps.dbId,r=e?d["default"].createElement("p",{style:{color:"#d14"},className:"warning"},d["default"].createElement("b",null,"You are about to delete a system database, be careful!")):null;return d["default"].createElement(k.Modal,{dialogClassName:"delete-db-modal",show:t,onHide:this.close},d["default"].createElement(k.Modal.Header,{closeButton:!0},d["default"].createElement(k.Modal.Title,null,"Delete Database")),d["default"].createElement(k.Modal.Body,null,r,d["default"].createElement("p",null,"Warning: This action will permanently delete ",d["default"].createElement("code",null,n),". To confirm the deletion of the database and all of the database's documents, you must enter the database's name."),d["default"].createElement("input",{type:"text",className:"input-block-level",onKeyUp:this.onInputKeypress,onChange:this.onInputChange,autoFocus:!0})),d["default"].createElement(k.Modal.Footer,null,d["default"].createElement("a",{href:"#",onClick:this.close,"data-bypass":"true",className:"cancel-link"},"Cancel"),d["default"].createElement("button",{disabled:this.state.disableSubmit,onClick:this.onDeleteClick,className:"btn btn-danger delete"},d["default"].createElement("i",{className:"icon fonticon-cancel-circled"})," Delete")))}}),J=function(e){var t=e.selected,n=e.text,r=e.onChange,i=e.iconClass,o=t?"tab-element-checked":"";return d["default"].createElement("li",{className:"component-tab-element "+o},d["default"].createElement("label",null,d["default"].createElement("div",{className:"tab-element-indicator-wrapper"},d["default"].createElement("div",{className:"tab-element-indicator"})),d["default"].createElement("div",{className:"tab-element-content"},d["default"].createElement("i",{className:i}),d["default"].createElement("input",{type:"radio",value:n,checked:t,onChange:r}),n)))};J.propTypes={selected:d["default"].PropTypes.bool.isRequired,text:d["default"].PropTypes.string.isRequired,onChange:d["default"].PropTypes.func.isRequired,iconClass:d["default"].PropTypes.string};var Z=function(e){var t=e.children;return d["default"].createElement("ul",{className:"component-tab-element-wrapper"},t)};t["default"]={BadgeList:F,Badge:M,BulkActionComponent:L,ConfirmButton:H,ToggleHeaderButton:O,StyledSelect:P,CodeEditorPanel:I,CodeEditor:R,StringEditModal:B,ZenModeOverlay:j,Beautify:V,PaddedBorderedBox:U,Document:W,LoadLines:q,MenuDropDown:z,TrayContents:G,TrayWrapper:K,connectToStores:i,ApiBarController:X,renderMenuDropDown:function(e,t){p["default"].render(d["default"].createElement(z,{icon:"fonticon-vertical-ellipsis",links:t.links}),e)},removeMenuDropDown:function(e){p["default"].unmountComponentAtNode(e)},DeleteDatabaseModal:Q,TabElement:J,TabElementWrapper:Z}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(99),o=r(i),a=n(84),s=r(a),l=n(295),u=r(l),c={};c.ComponentStore=o["default"].Store.extend({initialize:function(){this.reset()},reset:function(){this._apiBarVisible=!1,this._apiBarButtonVisible=!0,this._endpoint="",this._docURL=o["default"].constants.DOC_URLS.GENERAL},updateAPIBar:function(e){this._apiBarVisible=e.contentVisible,this._apiBarButtonVisible=e.buttonVisible,this._endpoint=e.endpoint,this._docURL=e.docURL},setVisibleButton:function(e){this._apiBarButtonVisible=e},setApiBarVisible:function(e){this._apiBarVisible=e},getEndpoint:function(){return this._endpoint},getDocURL:function(){return this._docURL},getIsAPIBarButtonVisible:function(){return this._apiBarButtonVisible},getIsAPIBarVisible:function(){return this._apiBarVisible},dispatch:function(e){switch(e.type){case u["default"].CMPNTS_SHOW_API_BAR_BUTTON:this.setVisibleButton(!0);break;case u["default"].CMPNTS_HIDE_API_BAR_BUTTON:this.setVisibleButton(!1);break;case u["default"].CMPNTS_SET_API_BAR_CONTENT_VISIBLE_STATE:this.setApiBarVisible(e.options);break;case u["default"].CMPNTS_UPDATE_API_BAR:this.updateAPIBar(e.options);break;default:return}this.triggerChange()}}),c.DeleteDbModalStore=o["default"].Store.extend({initialize:function(){this.reset()},reset:function(){this._deleteModal={showDeleteModal:!1,dbId:"",isSystemDatabase:!1}},setDeleteModal:function(e){e.isSystemDatabase=s["default"].utils.isSystemDatabase(e.dbId),this._deleteModal=e},getShowDeleteDatabaseModal:function(){return this._deleteModal},dispatch:function(e){switch(e.type){case u["default"].CMPNTS_DATABASES_SHOWDELETE_MODAL:this.setDeleteModal(e.options);break;default:return}this.triggerChange()}}),c.deleteDbModalStore=new c.DeleteDbModalStore,c.deleteDbModalStore.dispatchToken=o["default"].dispatcher.register(c.deleteDbModalStore.dispatch),c.componentStore=new c.ComponentStore,c.componentStore.dispatchToken=o["default"].dispatcher.register(c.componentStore.dispatch),t["default"]=c},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]={CMPNTS_SHOW_API_BAR_BUTTON:"CMPNTS_SHOW_API_BAR_BUTTON",CMPNTS_HIDE_API_BAR_BUTTON:"CMPNTS_HIDE_API_BAR_BUTTON",CMPNTS_UPDATE_API_BAR:"CMPNTS_UPDATE_API_BAR",CMPNTS_SET_API_BAR_CONTENT_VISIBLE_STATE:"CMPNTS_SET_API_BAR_CONTENT_VISIBLE_STATE",CMPNTS_DATABASES_SHOWDELETE_MODAL:"CMPNTS_DATABASES_SHOWDELETE_MODAL"}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){d["default"].dispatch({type:p["default"].CMPNTS_SHOW_API_BAR_BUTTON})}function o(){d["default"].dispatch({type:p["default"].CMPNTS_HIDE_API_BAR_BUTTON})}function a(e){d["default"].dispatch({type:p["default"].CMPNTS_SET_API_BAR_CONTENT_VISIBLE_STATE,options:e})}function s(e){d["default"].dispatch({type:p["default"].CMPNTS_UPDATE_API_BAR,options:e})}function l(e){d["default"].dispatch({type:p["default"].CMPNTS_DATABASES_SHOWDELETE_MODAL,options:e})}function u(e){var t=d["default"].urls("databaseBaseURL","server",e,"");$.ajax({url:t,dataType:"json",type:"DELETE"}).then(function(){this.showDeleteDatabaseModal({showModal:!0}),d["default"].addNotification({msg:"The database <code>"+_.escape(e)+"</code> has been deleted.",clear:!0,escape:!1}),Backbone.history.loadUrl(d["default"].urls("allDBs","app"))}.bind(this)).fail(function(e,t,n){d["default"].addNotification({msg:"Could not delete the database, reason "+n+".",type:"error",clear:!0})})}Object.defineProperty(t,"__esModule",{value:!0});var c=n(99),d=r(c),f=n(295),p=r(f);t["default"]={deleteDatabase:u,showDeleteDatabaseModal:l,showAPIBarButton:i,hideAPIBarButton:o,toggleApiBarVisibility:a,updateAPIBar:s}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){return"./dashboard.assets/ZeroClipboard.swf"}Object.defineProperty(t,"__esModule",{value:!0});var o=n(84),a=(r(o),n(99)),s=r(a),l=n(106),u=r(l),c=n(137),d=r(c),f=n(298),p=r(f),h=n(299);n(553),n(554),n(555);var g=u["default"].createClass({displayName:"Clipboard",propTypes:function(){return{text:u["default"].PropTypes.string.isRequired,displayType:u["default"].PropTypes.string.oneOf(["icon","text"])}},getDefaultProps:function(){return{displayType:"icon",textDisplay:"Copy",onClipboardClick:function(){},title:"Copy to clipboard"}},componentWillMount:function(){p["default"].config({swfPath:i()})},getClipboardElement:function(){return"icon"===this.props.displayType?u["default"].createElement("i",{className:"fontawesome icon-paste"}):this.props.textDisplay},componentDidMount:function(){var e=d["default"].findDOMNode(this);this.clipboard=new p["default"](e),this.clipboard.on("ready",function(){this.clipboard.on("copy",function(){this.props.onClipboardClick()}.bind(this))}.bind(this)),this.clipboard.on("error",function(e){console.log('ZeroClipboard error of type "'+e.name+'": '+e.message)})},onClick:function(e){e.preventDefault()},render:function(){return u["default"].createElement("a",{href:"#",onClick:this.onClick,ref:"copy",className:"copy clipboard-copy-element","data-clipboard-text":this.props.text,"data-bypass":"true",title:this.props.title},this.getClipboardElement())}}),m=u["default"].createClass({displayName:"ClipboardWithTextField",propTypes:{onClipBoardClick:u["default"].PropTypes.func.isRequired,textToCopy:u["default"].PropTypes.string.isRequired,uniqueKey:u["default"].PropTypes.string.isRequired,showCopyIcon:u["default"].PropTypes.bool},getDefaultProps:function(){return{showCopyIcon:!0,text:"Copy"}},componentWillMount:function(){p["default"].config({swfPath:i()})},componentDidMount:function(){var e=d["default"].findDOMNode(this.refs["copy-text-"+this.props.uniqueKey]);this.clipboard=new p["default"](e),this.clipboard.on("ready",function(){this.clipboard.on("copy",function(){this.props.onClipBoardClick()}.bind(this))}.bind(this))},getCopyIcon:function(){return this.props.showCopyIcon?u["default"].createElement("i",{className:"fontawesome icon-paste"}):null},render:function(){return u["default"].createElement("p",{key:this.props.uniqueKey},u["default"].createElement("input",{type:"text",className:"input-xxlarge text-field-to-copy",readOnly:!0,value:this.props.textToCopy}),u["default"].createElement("a",{id:"copy-text-"+this.props.uniqueKey,className:"btn copy-button clipboard-copy-element","data-clipboard-text":this.props.textToCopy,"data-bypass":"true",ref:"copy-text-"+this.props.uniqueKey,title:"Copy to clipboard"},this.getCopyIcon()," ",this.props.text))}}),v=u["default"].createClass({displayName:"CodeFormat",getDefaultProps:function(){return{lang:"js"}},getClasses:function(){var e={js:"lang-js"},t="prettyprint";return _.has(e,this.props.lang)&&(t+=" "+e[this.props.lang]),t},componentDidMount:function(){prettyPrint()},render:function(){var e=JSON.stringify(this.props.code,null," ");return u["default"].createElement("div",null,u["default"].createElement("pre",{className:this.getClasses()},e))}}),b=0,y=u["default"].createClass({displayName:"Tray",propTypes:{onAutoHide:u["default"].PropTypes.func},getDefaultProps:function(){return{onAutoHide:function(){}}},getInitialState:function(){return{show:!1,internalid:b++}},toggle:function(e){this.state.show?this.hide(e):this.show(e)},setVisible:function(e,t){this.state.show&&!e?this.hide(t):!this.state.show&&e&&this.show(t)},componentDidMount:function(){$("body").on("click.Tray-"+this.state.internalid,function(e){var t=$(e.target);this.state.show&&0===t.closest(".tray").length&&(this.hide(),this.props.onAutoHide())}.bind(this))},componentWillUnmount:function(){$("body").off("click.Tray-"+this.state.internalid)},show:function(e){this.setState({show:!0}),$(d["default"].findDOMNode(this.refs.myself)).velocity("transition.slideDownIn",s["default"].constants.MISC.TRAY_TOGGLE_SPEED,function(){e&&e(!0)})},hide:function(e){$(d["default"].findDOMNode(this.refs.myself)).velocity("reverse",s["default"].constants.MISC.TRAY_TOGGLE_SPEED,function(){this.setState({show:!1}),e&&e(!1)}.bind(this))},render:function(){var e=this.state.show?{display:"block",opacity:1}:{display:"none",opacity:0},t=this.props.className||"";return t+=" tray",u["default"].createElement("div",{ref:"myself",style:e,className:t},this.props.children)}}),w=u["default"].createClass({displayName:"Pagination",getDefaultProps:function(){return{perPage:s["default"].constants.MISC.DEFAULT_PAGE_SIZE,onClick:null,page:1,total:0,urlPrefix:"",urlSuffix:"",maxNavPages:10}},getVisiblePages:function(e,t){var n,r;if(t<this.props.maxNavPages)n=1,r=t+1;else{var i=Math.floor(this.props.maxNavPages/2);n=e-i,r=e+i,n<=1&&(n=1,r=this.props.maxNavPages+1),r>t+1&&(n=t-(this.props.maxNavPages-1),r=t+1)}return{from:n,to:r}},createItemsForPage:function(e){return _.range(e.from,e.to).map(function(e){return u["default"].createElement("li",{key:e,className:this.props.page===e?"active":null},this.getLink(e,e))}.bind(this))},getLink:function(e,t){return this.props.onClick?u["default"].createElement("a",{onClick:this.props.onClick.bind(null,e),dangerouslySetInnerHTML:{__html:t}}):u["default"].createElement("a",{href:this.props.urlPrefix+e+this.props.urlSuffix,dangerouslySetInnerHTML:{__html:t}})},getTotalPages:function(){return 0===this.props.total?1:Math.ceil(this.props.total/this.props.perPage)},render:function(){var e=this.getTotalPages(),t=this.getVisiblePages(this.props.page,e),n=this.createItemsForPage(t),r=Math.max(this.props.page-1,1),i=Math.min(this.props.page+1,e);return u["default"].createElement("ul",{className:"pagination"},u["default"].createElement("li",{className:1===this.props.page?"disabled":null},this.getLink(r,"&laquo;")),n,u["default"].createElement("li",{className:this.props.page<e?null:"disabled"},this.getLink(i,"&raquo;")))}}),x=u["default"].createClass({displayName:"ConfirmationModal",propTypes:{visible:u["default"].PropTypes.bool.isRequired,text:u["default"].PropTypes.oneOfType([u["default"].PropTypes.string,u["default"].PropTypes.element]).isRequired,onClose:u["default"].PropTypes.func.isRequired,onSubmit:u["default"].PropTypes.func.isRequired},getDefaultProps:function(){return{visible:!1,title:"Please confirm",text:"",successButtonLabel:"Okay",buttonClass:"btn-success",onClose:function(){},onSubmit:function(){}}},close:function(e){e&&e.preventDefault(),this.props.onClose()},render:function(){var e=u["default"].createElement("p",null,this.props.text);_.isString(this.props.text)||(e=this.props.text);var t="btn "+this.props.buttonClass;return u["default"].createElement(h.Modal,{dialogClassName:"confirmation-modal",show:this.props.visible,onHide:this.close},u["default"].createElement(h.Modal.Header,{closeButton:!0},u["default"].createElement(h.Modal.Title,null,this.props.title)),u["default"].createElement(h.Modal.Body,null,e),u["default"].createElement(h.Modal.Footer,null,u["default"].createElement("a",{href:"#","data-bypass":"true",className:"cancel-link",onClick:this.close},"Cancel"),u["default"].createElement("button",{className:t,onClick:this.props.onSubmit},u["default"].createElement("i",{className:"fonticon-ok-circled"})," ",this.props.successButtonLabel)))}});t["default"]={Clipboard:g,ClipboardWithTextField:m,CodeFormat:v,Tray:y,Pagination:w,ConfirmationModal:x}},function(e,t,n){var r;/*!
	 * ZeroClipboard
	 * The ZeroClipboard library provides an easy way to copy text to the clipboard using an invisible Adobe Flash movie and a JavaScript interface.
	 * Copyright (c) 2009-2014 Jon Rohan, James M. Greene
	 * Licensed MIT
	 * http://zeroclipboard.org/
	 * v2.2.0
	 */
!function(i,o){"use strict";var a,s,l,u=i,c=u.document,d=u.navigator,f=u.setTimeout,p=u.clearTimeout,h=u.setInterval,g=u.clearInterval,m=u.getComputedStyle,v=u.encodeURIComponent,b=u.ActiveXObject,y=u.Error,w=u.Number.parseInt||u.parseInt,x=u.Number.parseFloat||u.parseFloat,_=u.Number.isNaN||u.isNaN,E=u.Date.now,C=u.Object.keys,k=u.Object.defineProperty,S=u.Object.prototype.hasOwnProperty,A=u.Array.prototype.slice,T=function(){var e=function(e){return e};if("function"==typeof u.wrap&&"function"==typeof u.unwrap)try{var t=c.createElement("div"),n=u.unwrap(t);1===t.nodeType&&n&&1===n.nodeType&&(e=u.unwrap)}catch(r){}return e}(),D=function(e){return A.call(e,0)},N=function(){var e,t,n,r,i,a,s=D(arguments),l=s[0]||{};for(e=1,t=s.length;e<t;e++)if(null!=(n=s[e]))for(r in n)S.call(n,r)&&(i=l[r],a=n[r],l!==a&&a!==o&&(l[r]=a));return l},F=function(e){var t,n,r,i;if("object"!=typeof e||null==e||"number"==typeof e.nodeType)t=e;else if("number"==typeof e.length)for(t=[],n=0,r=e.length;n<r;n++)S.call(e,n)&&(t[n]=F(e[n]));else{t={};for(i in e)S.call(e,i)&&(t[i]=F(e[i]))}return t},M=function(e,t){for(var n={},r=0,i=t.length;r<i;r++)t[r]in e&&(n[t[r]]=e[t[r]]);return n},O=function(e,t){var n={};for(var r in e)t.indexOf(r)===-1&&(n[r]=e[r]);return n},L=function(e){if(e)for(var t in e)S.call(e,t)&&delete e[t];return e},P=function(e,t){if(e&&1===e.nodeType&&e.ownerDocument&&t&&(1===t.nodeType&&t.ownerDocument&&t.ownerDocument===e.ownerDocument||9===t.nodeType&&!t.ownerDocument&&t===e.ownerDocument))do{if(e===t)return!0;e=e.parentNode}while(e);return!1},I=function(e){var t;return"string"==typeof e&&e&&(t=e.split("#")[0].split("?")[0],t=e.slice(0,e.lastIndexOf("/")+1)),t},R=function(e){var t,n;return"string"==typeof e&&e&&(n=e.match(/^(?:|[^:@]*@|.+\)@(?=http[s]?|file)|.+?\s+(?: at |@)(?:[^:\(]+ )*[\(]?)((?:http[s]?|file):\/\/[\/]?.+?\/[^:\)]*?)(?::\d+)(?::\d+)?/),n&&n[1]?t=n[1]:(n=e.match(/\)@((?:http[s]?|file):\/\/[\/]?.+?\/[^:\)]*?)(?::\d+)(?::\d+)?/),n&&n[1]&&(t=n[1]))),t},B=function(){var e,t;try{throw new y}catch(n){t=n}return t&&(e=t.sourceURL||t.fileName||R(t.stack)),e},j=function(){var e,t,n;if(c.currentScript&&(e=c.currentScript.src))return e;if(t=c.getElementsByTagName("script"),1===t.length)return t[0].src||o;if("readyState"in t[0])for(n=t.length;n--;)if("interactive"===t[n].readyState&&(e=t[n].src))return e;return"loading"===c.readyState&&(e=t[t.length-1].src)?e:(e=B())?e:o},$=function(){var e,t,n,r=c.getElementsByTagName("script");for(e=r.length;e--;){if(!(n=r[e].src)){t=null;break}if(n=I(n),null==t)t=n;else if(t!==n){t=null;break}}return t||o},V=function(){var e=I(j())||$()||"";return e+"ZeroClipboard.swf"},U=function(){return null==i.opener&&(!!i.top&&i!=i.top||!!i.parent&&i!=i.parent)}(),W={bridge:null,version:"0.0.0",pluginType:"unknown",disabled:null,outdated:null,sandboxed:null,unavailable:null,degraded:null,deactivated:null,overdue:null,ready:null},q="11.0.0",H={},z={},G=null,K=0,Y=0,X={ready:"Flash communication is established",error:{"flash-disabled":"Flash is disabled or not installed. May also be attempting to run Flash in a sandboxed iframe, which is impossible.","flash-outdated":"Flash is too outdated to support ZeroClipboard","flash-sandboxed":"Attempting to run Flash in a sandboxed iframe, which is impossible","flash-unavailable":"Flash is unable to communicate bidirectionally with JavaScript","flash-degraded":"Flash is unable to preserve data fidelity when communicating with JavaScript","flash-deactivated":"Flash is too outdated for your browser and/or is configured as click-to-activate.\nThis may also mean that the ZeroClipboard SWF object could not be loaded, so please check your `swfPath` configuration and/or network connectivity.\nMay also be attempting to run Flash in a sandboxed iframe, which is impossible.","flash-overdue":"Flash communication was established but NOT within the acceptable time limit","version-mismatch":"ZeroClipboard JS version number does not match ZeroClipboard SWF version number","clipboard-error":"At least one error was thrown while ZeroClipboard was attempting to inject your data into the clipboard","config-mismatch":"ZeroClipboard configuration does not match Flash's reality","swf-not-found":"The ZeroClipboard SWF object could not be loaded, so please check your `swfPath` configuration and/or network connectivity"}},Q=["flash-unavailable","flash-degraded","flash-overdue","version-mismatch","config-mismatch","clipboard-error"],J=["flash-disabled","flash-outdated","flash-sandboxed","flash-unavailable","flash-degraded","flash-deactivated","flash-overdue"],Z=new RegExp("^flash-("+J.map(function(e){return e.replace(/^flash-/,"")}).join("|")+")$"),ee=new RegExp("^flash-("+J.slice(1).map(function(e){return e.replace(/^flash-/,"")}).join("|")+")$"),te={swfPath:V(),trustedDomains:i.location.host?[i.location.host]:[],cacheBust:!0,forceEnhancedClipboard:!1,flashLoadTimeout:3e4,autoActivate:!0,bubbleEvents:!0,containerId:"global-zeroclipboard-html-bridge",containerClass:"global-zeroclipboard-container",swfObjectId:"global-zeroclipboard-flash-bridge",hoverClass:"zeroclipboard-is-hover",activeClass:"zeroclipboard-is-active",forceHandCursor:!1,title:null,zIndex:999999999},ne=function(e){if("object"==typeof e&&null!==e)for(var t in e)if(S.call(e,t))if(/^(?:forceHandCursor|title|zIndex|bubbleEvents)$/.test(t))te[t]=e[t];else if(null==W.bridge)if("containerId"===t||"swfObjectId"===t){if(!ve(e[t]))throw new Error("The specified `"+t+"` value is not valid as an HTML4 Element ID");te[t]=e[t]}else te[t]=e[t];{if("string"!=typeof e||!e)return F(te);if(S.call(te,e))return te[e]}},re=function(){return Ye(),{browser:M(d,["userAgent","platform","appName"]),flash:O(W,["bridge"]),zeroclipboard:{version:Qe.version,config:Qe.config()}}},ie=function(){return!!(W.disabled||W.outdated||W.sandboxed||W.unavailable||W.degraded||W.deactivated)},oe=function(e,t){var n,r,i,s={};if("string"==typeof e&&e)i=e.toLowerCase().split(/\s+/);else if("object"==typeof e&&e&&"undefined"==typeof t)for(n in e)S.call(e,n)&&"string"==typeof n&&n&&"function"==typeof e[n]&&Qe.on(n,e[n]);if(i&&i.length){for(n=0,r=i.length;n<r;n++)e=i[n].replace(/^on/,""),s[e]=!0,H[e]||(H[e]=[]),H[e].push(t);if(s.ready&&W.ready&&Qe.emit({type:"ready"}),s.error){for(n=0,r=J.length;n<r;n++)if(W[J[n].replace(/^flash-/,"")]===!0){Qe.emit({type:"error",name:J[n]});break}a!==o&&Qe.version!==a&&Qe.emit({type:"error",name:"version-mismatch",jsVersion:Qe.version,swfVersion:a})}}return Qe},ae=function(e,t){var n,r,i,o,a;if(0===arguments.length)o=C(H);else if("string"==typeof e&&e)o=e.split(/\s+/);else if("object"==typeof e&&e&&"undefined"==typeof t)for(n in e)S.call(e,n)&&"string"==typeof n&&n&&"function"==typeof e[n]&&Qe.off(n,e[n]);if(o&&o.length)for(n=0,r=o.length;n<r;n++)if(e=o[n].toLowerCase().replace(/^on/,""),a=H[e],a&&a.length)if(t)for(i=a.indexOf(t);i!==-1;)a.splice(i,1),i=a.indexOf(t,i);else a.length=0;return Qe},se=function(e){var t;return t="string"==typeof e&&e?F(H[e])||null:F(H)},le=function(e){var t,n,r;if(e=be(e),e&&!ke(e))return"ready"===e.type&&W.overdue===!0?Qe.emit({type:"error",name:"flash-overdue"}):(t=N({},e),Ee.call(this,t),"copy"===e.type&&(r=Oe(z),n=r.data,G=r.formatMap),n)},ue=function(){var e=W.sandboxed;if(Ye(),"boolean"!=typeof W.ready&&(W.ready=!1),W.sandboxed!==e&&W.sandboxed===!0)W.ready=!1,Qe.emit({type:"error",name:"flash-sandboxed"});else if(!Qe.isFlashUnusable()&&null===W.bridge){var t=te.flashLoadTimeout;"number"==typeof t&&t>=0&&(K=f(function(){"boolean"!=typeof W.deactivated&&(W.deactivated=!0),W.deactivated===!0&&Qe.emit({type:"error",name:"flash-deactivated"})},t)),W.overdue=!1,Fe()}},ce=function(){Qe.clearData(),Qe.blur(),Qe.emit("destroy"),Me(),Qe.off()},de=function(e,t){var n;if("object"==typeof e&&e&&"undefined"==typeof t)n=e,Qe.clearData();else{if("string"!=typeof e||!e)return;n={},n[e]=t}for(var r in n)"string"==typeof r&&r&&S.call(n,r)&&"string"==typeof n[r]&&n[r]&&(z[r]=n[r])},fe=function(e){"undefined"==typeof e?(L(z),G=null):"string"==typeof e&&S.call(z,e)&&delete z[e]},pe=function(e){return"undefined"==typeof e?F(z):"string"==typeof e&&S.call(z,e)?z[e]:void 0},he=function(e){if(e&&1===e.nodeType){s&&(Ve(s,te.activeClass),s!==e&&Ve(s,te.hoverClass)),s=e,$e(e,te.hoverClass);var t=e.getAttribute("title")||te.title;if("string"==typeof t&&t){var n=Ne(W.bridge);n&&n.setAttribute("title",t)}var r=te.forceHandCursor===!0||"pointer"===Ue(e,"cursor");Ge(r),ze()}},ge=function(){var e=Ne(W.bridge);e&&(e.removeAttribute("title"),e.style.left="0px",e.style.top="-9999px",e.style.width="1px",e.style.height="1px"),s&&(Ve(s,te.hoverClass),Ve(s,te.activeClass),s=null)},me=function(){return s||null},ve=function(e){return"string"==typeof e&&e&&/^[A-Za-z][A-Za-z0-9_:\-\.]*$/.test(e)},be=function(e){var t;if("string"==typeof e&&e?(t=e,e={}):"object"==typeof e&&e&&"string"==typeof e.type&&e.type&&(t=e.type),t){t=t.toLowerCase(),!e.target&&(/^(copy|aftercopy|_click)$/.test(t)||"error"===t&&"clipboard-error"===e.name)&&(e.target=l),N(e,{type:t,target:e.target||s||null,relatedTarget:e.relatedTarget||null,currentTarget:W&&W.bridge||null,timeStamp:e.timeStamp||E()||null});var n=X[e.type];return"error"===e.type&&e.name&&n&&(n=n[e.name]),n&&(e.message=n),"ready"===e.type&&N(e,{target:null,version:W.version}),"error"===e.type&&(Z.test(e.name)&&N(e,{target:null,minimumVersion:q}),ee.test(e.name)&&N(e,{version:W.version})),"copy"===e.type&&(e.clipboardData={setData:Qe.setData,clearData:Qe.clearData}),"aftercopy"===e.type&&(e=Le(e,G)),e.target&&!e.relatedTarget&&(e.relatedTarget=ye(e.target)),we(e)}},ye=function(e){var t=e&&e.getAttribute&&e.getAttribute("data-clipboard-target");return t?c.getElementById(t):null},we=function(e){if(e&&/^_(?:click|mouse(?:over|out|down|up|move))$/.test(e.type)){var t=e.target,n="_mouseover"===e.type&&e.relatedTarget?e.relatedTarget:o,r="_mouseout"===e.type&&e.relatedTarget?e.relatedTarget:o,i=We(t),a=u.screenLeft||u.screenX||0,s=u.screenTop||u.screenY||0,l=c.body.scrollLeft+c.documentElement.scrollLeft,d=c.body.scrollTop+c.documentElement.scrollTop,f=i.left+("number"==typeof e._stageX?e._stageX:0),p=i.top+("number"==typeof e._stageY?e._stageY:0),h=f-l,g=p-d,m=a+h,v=s+g,b="number"==typeof e.movementX?e.movementX:0,y="number"==typeof e.movementY?e.movementY:0;delete e._stageX,delete e._stageY,N(e,{srcElement:t,fromElement:n,toElement:r,screenX:m,screenY:v,pageX:f,pageY:p,clientX:h,clientY:g,x:h,y:g,movementX:b,movementY:y,offsetX:0,offsetY:0,layerX:0,layerY:0})}return e},xe=function(e){var t=e&&"string"==typeof e.type&&e.type||"";return!/^(?:(?:before)?copy|destroy)$/.test(t)},_e=function(e,t,n,r){r?f(function(){e.apply(t,n)},0):e.apply(t,n)},Ee=function(e){if("object"==typeof e&&e&&e.type){var t=xe(e),n=H["*"]||[],r=H[e.type]||[],i=n.concat(r);if(i&&i.length){var o,a,s,l,c,d=this;for(o=0,a=i.length;o<a;o++)s=i[o],l=d,"string"==typeof s&&"function"==typeof u[s]&&(s=u[s]),"object"==typeof s&&s&&"function"==typeof s.handleEvent&&(l=s,s=s.handleEvent),"function"==typeof s&&(c=N({},e),_e(s,l,[c],t))}return this}},Ce=function(e){var t=null;return(U===!1||e&&"error"===e.type&&e.name&&Q.indexOf(e.name)!==-1)&&(t=!1),t},ke=function(e){var t=e.target||s||null,n="swf"===e._source;switch(delete e._source,e.type){case"error":var r="flash-sandboxed"===e.name||Ce(e);"boolean"==typeof r&&(W.sandboxed=r),J.indexOf(e.name)!==-1?N(W,{disabled:"flash-disabled"===e.name,outdated:"flash-outdated"===e.name,unavailable:"flash-unavailable"===e.name,degraded:"flash-degraded"===e.name,deactivated:"flash-deactivated"===e.name,overdue:"flash-overdue"===e.name,ready:!1}):"version-mismatch"===e.name&&(a=e.swfVersion,N(W,{disabled:!1,outdated:!1,unavailable:!1,degraded:!1,deactivated:!1,overdue:!1,ready:!1})),He();break;case"ready":a=e.swfVersion;var i=W.deactivated===!0;N(W,{disabled:!1,outdated:!1,sandboxed:!1,unavailable:!1,degraded:!1,deactivated:!1,overdue:i,ready:!i}),He();break;case"beforecopy":l=t;break;case"copy":var o,u,c=e.relatedTarget;!z["text/html"]&&!z["text/plain"]&&c&&(u=c.value||c.outerHTML||c.innerHTML)&&(o=c.value||c.textContent||c.innerText)?(e.clipboardData.clearData(),e.clipboardData.setData("text/plain",o),u!==o&&e.clipboardData.setData("text/html",u)):!z["text/plain"]&&e.target&&(o=e.target.getAttribute("data-clipboard-text"))&&(e.clipboardData.clearData(),e.clipboardData.setData("text/plain",o));break;case"aftercopy":Se(e),Qe.clearData(),t&&t!==je()&&t.focus&&t.focus();break;case"_mouseover":Qe.focus(t),te.bubbleEvents===!0&&n&&(t&&t!==e.relatedTarget&&!P(e.relatedTarget,t)&&Ae(N({},e,{type:"mouseenter",bubbles:!1,cancelable:!1})),Ae(N({},e,{type:"mouseover"})));break;case"_mouseout":Qe.blur(),te.bubbleEvents===!0&&n&&(t&&t!==e.relatedTarget&&!P(e.relatedTarget,t)&&Ae(N({},e,{type:"mouseleave",bubbles:!1,cancelable:!1})),Ae(N({},e,{type:"mouseout"})));break;case"_mousedown":$e(t,te.activeClass),te.bubbleEvents===!0&&n&&Ae(N({},e,{type:e.type.slice(1)}));break;case"_mouseup":Ve(t,te.activeClass),te.bubbleEvents===!0&&n&&Ae(N({},e,{type:e.type.slice(1)}));break;case"_click":l=null,te.bubbleEvents===!0&&n&&Ae(N({},e,{type:e.type.slice(1)}));break;case"_mousemove":te.bubbleEvents===!0&&n&&Ae(N({},e,{type:e.type.slice(1)}))}if(/^_(?:click|mouse(?:over|out|down|up|move))$/.test(e.type))return!0},Se=function(e){if(e.errors&&e.errors.length>0){var t=F(e);N(t,{type:"error",name:"clipboard-error"}),delete t.success,f(function(){Qe.emit(t)},0)}},Ae=function(e){if(e&&"string"==typeof e.type&&e){var t,n=e.target||null,r=n&&n.ownerDocument||c,i={view:r.defaultView||u,canBubble:!0,cancelable:!0,detail:"click"===e.type?1:0,button:"number"==typeof e.which?e.which-1:"number"==typeof e.button?e.button:r.createEvent?0:1},o=N(i,e);n&&r.createEvent&&n.dispatchEvent&&(o=[o.type,o.canBubble,o.cancelable,o.view,o.detail,o.screenX,o.screenY,o.clientX,o.clientY,o.ctrlKey,o.altKey,o.shiftKey,o.metaKey,o.button,o.relatedTarget],t=r.createEvent("MouseEvents"),t.initMouseEvent&&(t.initMouseEvent.apply(t,o),t._source="js",n.dispatchEvent(t)))}},Te=function(){var e=te.flashLoadTimeout;if("number"==typeof e&&e>=0){var t=Math.min(1e3,e/10),n=te.swfObjectId+"_fallbackContent";Y=h(function(){var e=c.getElementById(n);qe(e)&&(He(),W.deactivated=null,Qe.emit({type:"error",name:"swf-not-found"}))},t)}},De=function(){var e=c.createElement("div");return e.id=te.containerId,e.className=te.containerClass,e.style.position="absolute",e.style.left="0px",e.style.top="-9999px",e.style.width="1px",e.style.height="1px",e.style.zIndex=""+Ke(te.zIndex),e},Ne=function(e){for(var t=e&&e.parentNode;t&&"OBJECT"===t.nodeName&&t.parentNode;)t=t.parentNode;return t||null},Fe=function(){var e,t=W.bridge,n=Ne(t);if(!t){var r=Be(u.location.host,te),i="never"===r?"none":"all",o=Ie(N({jsVersion:Qe.version},te)),a=te.swfPath+Pe(te.swfPath,te);n=De();var s=c.createElement("div");n.appendChild(s),c.body.appendChild(n);var l=c.createElement("div"),d="activex"===W.pluginType;l.innerHTML='<object id="'+te.swfObjectId+'" name="'+te.swfObjectId+'" width="100%" height="100%" '+(d?'classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"':'type="application/x-shockwave-flash" data="'+a+'"')+">"+(d?'<param name="movie" value="'+a+'"/>':"")+'<param name="allowScriptAccess" value="'+r+'"/><param name="allowNetworking" value="'+i+'"/><param name="menu" value="false"/><param name="wmode" value="transparent"/><param name="flashvars" value="'+o+'"/><div id="'+te.swfObjectId+'_fallbackContent">&nbsp;</div></object>',t=l.firstChild,l=null,T(t).ZeroClipboard=Qe,n.replaceChild(t,s),Te()}return t||(t=c[te.swfObjectId],t&&(e=t.length)&&(t=t[e-1]),!t&&n&&(t=n.firstChild)),W.bridge=t||null,t},Me=function(){var e=W.bridge;if(e){var t=Ne(e);t&&("activex"===W.pluginType&&"readyState"in e?(e.style.display="none",function n(){if(4===e.readyState){for(var r in e)"function"==typeof e[r]&&(e[r]=null);e.parentNode&&e.parentNode.removeChild(e),t.parentNode&&t.parentNode.removeChild(t)}else f(n,10)}()):(e.parentNode&&e.parentNode.removeChild(e),t.parentNode&&t.parentNode.removeChild(t))),He(),W.ready=null,W.bridge=null,W.deactivated=null,a=o}},Oe=function(e){var t={},n={};if("object"==typeof e&&e){for(var r in e)if(r&&S.call(e,r)&&"string"==typeof e[r]&&e[r])switch(r.toLowerCase()){case"text/plain":case"text":case"air:text":case"flash:text":t.text=e[r],n.text=r;break;case"text/html":case"html":case"air:html":case"flash:html":t.html=e[r],n.html=r;break;case"application/rtf":case"text/rtf":case"rtf":case"richtext":case"air:rtf":case"flash:rtf":t.rtf=e[r],n.rtf=r}return{data:t,formatMap:n}}},Le=function(e,t){if("object"!=typeof e||!e||"object"!=typeof t||!t)return e;var n={};for(var r in e)if(S.call(e,r))if("errors"===r){n[r]=e[r]?e[r].slice():[];for(var i=0,o=n[r].length;i<o;i++)n[r][i].format=t[n[r][i].format]}else if("success"!==r&&"data"!==r)n[r]=e[r];else{n[r]={};var a=e[r];for(var s in a)s&&S.call(a,s)&&S.call(t,s)&&(n[r][t[s]]=a[s])}return n},Pe=function(e,t){var n=null==t||t&&t.cacheBust===!0;return n?(e.indexOf("?")===-1?"?":"&")+"noCache="+E():""},Ie=function(e){var t,n,r,i,o="",a=[];if(e.trustedDomains&&("string"==typeof e.trustedDomains?i=[e.trustedDomains]:"object"==typeof e.trustedDomains&&"length"in e.trustedDomains&&(i=e.trustedDomains)),i&&i.length)for(t=0,n=i.length;t<n;t++)if(S.call(i,t)&&i[t]&&"string"==typeof i[t]){if(r=Re(i[t]),!r)continue;if("*"===r){a.length=0,a.push(r);break}a.push.apply(a,[r,"//"+r,u.location.protocol+"//"+r])}return a.length&&(o+="trustedOrigins="+v(a.join(","))),e.forceEnhancedClipboard===!0&&(o+=(o?"&":"")+"forceEnhancedClipboard=true"),"string"==typeof e.swfObjectId&&e.swfObjectId&&(o+=(o?"&":"")+"swfObjectId="+v(e.swfObjectId)),"string"==typeof e.jsVersion&&e.jsVersion&&(o+=(o?"&":"")+"jsVersion="+v(e.jsVersion)),o},Re=function(e){if(null==e||""===e)return null;if(e=e.replace(/^\s+|\s+$/g,""),""===e)return null;var t=e.indexOf("//");e=t===-1?e:e.slice(t+2);var n=e.indexOf("/");return e=n===-1?e:t===-1||0===n?null:e.slice(0,n),e&&".swf"===e.slice(-4).toLowerCase()?null:e||null},Be=function(){var e=function(e){var t,n,r,i=[];if("string"==typeof e&&(e=[e]),"object"!=typeof e||!e||"number"!=typeof e.length)return i;for(t=0,n=e.length;t<n;t++)if(S.call(e,t)&&(r=Re(e[t]))){if("*"===r){i.length=0,i.push("*");break}i.indexOf(r)===-1&&i.push(r)}return i};return function(t,n){var r=Re(n.swfPath);null===r&&(r=t);var i=e(n.trustedDomains),o=i.length;if(o>0){if(1===o&&"*"===i[0])return"always";if(i.indexOf(t)!==-1)return 1===o&&t===r?"sameDomain":"always"}return"never"}}(),je=function(){try{return c.activeElement}catch(e){return null}},$e=function(e,t){var n,r,i,o=[];if("string"==typeof t&&t&&(o=t.split(/\s+/)),e&&1===e.nodeType&&o.length>0)if(e.classList)for(n=0,r=o.length;n<r;n++)e.classList.add(o[n]);else if(e.hasOwnProperty("className")){for(i=" "+e.className+" ",n=0,r=o.length;n<r;n++)i.indexOf(" "+o[n]+" ")===-1&&(i+=o[n]+" ");e.className=i.replace(/^\s+|\s+$/g,"")}return e},Ve=function(e,t){var n,r,i,o=[];if("string"==typeof t&&t&&(o=t.split(/\s+/)),e&&1===e.nodeType&&o.length>0)if(e.classList&&e.classList.length>0)for(n=0,r=o.length;n<r;n++)e.classList.remove(o[n]);else if(e.className){for(i=(" "+e.className+" ").replace(/[\r\n\t]/g," "),n=0,r=o.length;n<r;n++)i=i.replace(" "+o[n]+" "," ");e.className=i.replace(/^\s+|\s+$/g,"")}return e},Ue=function(e,t){var n=m(e,null).getPropertyValue(t);return"cursor"!==t||n&&"auto"!==n||"A"!==e.nodeName?n:"pointer"},We=function(e){var t={left:0,top:0,width:0,height:0};if(e.getBoundingClientRect){var n=e.getBoundingClientRect(),r=u.pageXOffset,i=u.pageYOffset,o=c.documentElement.clientLeft||0,a=c.documentElement.clientTop||0,s=0,l=0;if("relative"===Ue(c.body,"position")){var d=c.body.getBoundingClientRect(),f=c.documentElement.getBoundingClientRect();s=d.left-f.left||0,l=d.top-f.top||0}t.left=n.left+r-o-s,t.top=n.top+i-a-l,t.width="width"in n?n.width:n.right-n.left,t.height="height"in n?n.height:n.bottom-n.top}return t},qe=function(e){if(!e)return!1;var t=m(e,null),n=x(t.height)>0,r=x(t.width)>0,i=x(t.top)>=0,o=x(t.left)>=0,a=n&&r&&i&&o,s=a?null:We(e),l="none"!==t.display&&"collapse"!==t.visibility&&(a||!!s&&(n||s.height>0)&&(r||s.width>0)&&(i||s.top>=0)&&(o||s.left>=0));return l},He=function(){p(K),K=0,g(Y),Y=0},ze=function(){var e;if(s&&(e=Ne(W.bridge))){var t=We(s);N(e.style,{width:t.width+"px",height:t.height+"px",top:t.top+"px",left:t.left+"px",zIndex:""+Ke(te.zIndex)})}},Ge=function(e){W.ready===!0&&(W.bridge&&"function"==typeof W.bridge.setHandCursor?W.bridge.setHandCursor(e):W.ready=!1)},Ke=function(e){if(/^(?:auto|inherit)$/.test(e))return e;var t;return"number"!=typeof e||_(e)?"string"==typeof e&&(t=Ke(w(e,10))):t=e,"number"==typeof t?t:"auto"},Ye=function(e){var t,n,r,o=W.sandboxed,a=null;if(e=e===!0,U===!1)a=!1;else{try{n=i.frameElement||null}catch(s){r={name:s.name,message:s.message}}if(n&&1===n.nodeType&&"IFRAME"===n.nodeName)try{a=n.hasAttribute("sandbox")}catch(s){a=null}else{try{t=document.domain||null}catch(s){t=null}(null===t||r&&"SecurityError"===r.name&&/(^|[\s\(\[@])sandbox(es|ed|ing|[\s\.,!\)\]@]|$)/.test(r.message.toLowerCase()))&&(a=!0)}}return W.sandboxed=a,o===a||e||Xe(b),a},Xe=function(e){function t(e){var t=e.match(/[\d]+/g);return t.length=3,t.join(".")}function n(e){return!!e&&(e=e.toLowerCase())&&(/^(pepflashplayer\.dll|libpepflashplayer\.so|pepperflashplayer\.plugin)$/.test(e)||"chrome.plugin"===e.slice(-13))}function r(e){e&&(s=!0,e.version&&(c=t(e.version)),!c&&e.description&&(c=t(e.description)),e.filename&&(u=n(e.filename)))}var i,o,a,s=!1,l=!1,u=!1,c="";if(d.plugins&&d.plugins.length)i=d.plugins["Shockwave Flash"],r(i),d.plugins["Shockwave Flash 2.0"]&&(s=!0,c="2.0.0.11");else if(d.mimeTypes&&d.mimeTypes.length)a=d.mimeTypes["application/x-shockwave-flash"],i=a&&a.enabledPlugin,r(i);else if("undefined"!=typeof e){l=!0;try{o=new e("ShockwaveFlash.ShockwaveFlash.7"),s=!0,c=t(o.GetVariable("$version"))}catch(f){try{o=new e("ShockwaveFlash.ShockwaveFlash.6"),s=!0,c="6.0.21"}catch(p){try{o=new e("ShockwaveFlash.ShockwaveFlash"),s=!0,c=t(o.GetVariable("$version"))}catch(h){l=!1}}}}W.disabled=s!==!0,W.outdated=c&&x(c)<x(q),W.version=c||"0.0.0",W.pluginType=u?"pepper":l?"activex":s?"netscape":"unknown"};Xe(b),Ye(!0);var Qe=function(){return this instanceof Qe?void("function"==typeof Qe._createClient&&Qe._createClient.apply(this,D(arguments))):new Qe};k(Qe,"version",{value:"2.2.0",writable:!1,configurable:!0,enumerable:!0}),Qe.config=function(){return ne.apply(this,D(arguments))},Qe.state=function(){return re.apply(this,D(arguments))},Qe.isFlashUnusable=function(){return ie.apply(this,D(arguments))},Qe.on=function(){return oe.apply(this,D(arguments))},Qe.off=function(){return ae.apply(this,D(arguments))},Qe.handlers=function(){return se.apply(this,D(arguments))},Qe.emit=function(){return le.apply(this,D(arguments))},Qe.create=function(){return ue.apply(this,D(arguments))},Qe.destroy=function(){return ce.apply(this,D(arguments))},Qe.setData=function(){return de.apply(this,D(arguments))},Qe.clearData=function(){return fe.apply(this,D(arguments))},Qe.getData=function(){return pe.apply(this,D(arguments))},Qe.focus=Qe.activate=function(){return he.apply(this,D(arguments))},Qe.blur=Qe.deactivate=function(){return ge.apply(this,D(arguments))},Qe.activeElement=function(){return me.apply(this,D(arguments))};var Je=0,Ze={},et=0,tt={},nt={};N(te,{autoActivate:!0});var rt=function(e){var t=this;t.id=""+Je++,Ze[t.id]={instance:t,elements:[],handlers:{}},e&&t.clip(e),Qe.on("*",function(e){return t.emit(e)}),Qe.on("destroy",function(){t.destroy()}),Qe.create()},it=function(e,t){var n,r,i,s={},l=Ze[this.id],u=l&&l.handlers;if(!l)throw new Error("Attempted to add new listener(s) to a destroyed ZeroClipboard client instance");if("string"==typeof e&&e)i=e.toLowerCase().split(/\s+/);else if("object"==typeof e&&e&&"undefined"==typeof t)for(n in e)S.call(e,n)&&"string"==typeof n&&n&&"function"==typeof e[n]&&this.on(n,e[n]);if(i&&i.length){for(n=0,r=i.length;n<r;n++)e=i[n].replace(/^on/,""),s[e]=!0,u[e]||(u[e]=[]),u[e].push(t);if(s.ready&&W.ready&&this.emit({type:"ready",client:this}),s.error){for(n=0,r=J.length;n<r;n++)if(W[J[n].replace(/^flash-/,"")]){this.emit({type:"error",name:J[n],client:this});break}a!==o&&Qe.version!==a&&this.emit({type:"error",name:"version-mismatch",jsVersion:Qe.version,swfVersion:a})}}return this},ot=function(e,t){var n,r,i,o,a,s=Ze[this.id],l=s&&s.handlers;if(!l)return this;if(0===arguments.length)o=C(l);else if("string"==typeof e&&e)o=e.split(/\s+/);else if("object"==typeof e&&e&&"undefined"==typeof t)for(n in e)S.call(e,n)&&"string"==typeof n&&n&&"function"==typeof e[n]&&this.off(n,e[n]);if(o&&o.length)for(n=0,r=o.length;n<r;n++)if(e=o[n].toLowerCase().replace(/^on/,""),a=l[e],a&&a.length)if(t)for(i=a.indexOf(t);i!==-1;)a.splice(i,1),i=a.indexOf(t,i);else a.length=0;return this},at=function(e){var t=null,n=Ze[this.id]&&Ze[this.id].handlers;return n&&(t="string"==typeof e&&e?n[e]?n[e].slice(0):[]:F(n)),t},st=function(e){if(ft.call(this,e)){"object"==typeof e&&e&&"string"==typeof e.type&&e.type&&(e=N({},e));var t=N({},be(e),{client:this});pt.call(this,t)}return this},lt=function(e){if(!Ze[this.id])throw new Error("Attempted to clip element(s) to a destroyed ZeroClipboard client instance");e=ht(e);for(var t=0;t<e.length;t++)if(S.call(e,t)&&e[t]&&1===e[t].nodeType){e[t].zcClippingId?tt[e[t].zcClippingId].indexOf(this.id)===-1&&tt[e[t].zcClippingId].push(this.id):(e[t].zcClippingId="zcClippingId_"+et++,tt[e[t].zcClippingId]=[this.id],te.autoActivate===!0&&gt(e[t]));var n=Ze[this.id]&&Ze[this.id].elements;n.indexOf(e[t])===-1&&n.push(e[t])}return this},ut=function(e){var t=Ze[this.id];if(!t)return this;var n,r=t.elements;e="undefined"==typeof e?r.slice(0):ht(e);for(var i=e.length;i--;)if(S.call(e,i)&&e[i]&&1===e[i].nodeType){for(n=0;(n=r.indexOf(e[i],n))!==-1;)r.splice(n,1);var o=tt[e[i].zcClippingId];if(o){for(n=0;(n=o.indexOf(this.id,n))!==-1;)o.splice(n,1);0===o.length&&(te.autoActivate===!0&&mt(e[i]),delete e[i].zcClippingId)}}return this},ct=function(){var e=Ze[this.id];return e&&e.elements?e.elements.slice(0):[]},dt=function(){Ze[this.id]&&(this.unclip(),this.off(),delete Ze[this.id])},ft=function(e){if(!e||!e.type)return!1;if(e.client&&e.client!==this)return!1;var t=Ze[this.id],n=t&&t.elements,r=!!n&&n.length>0,i=!e.target||r&&n.indexOf(e.target)!==-1,o=e.relatedTarget&&r&&n.indexOf(e.relatedTarget)!==-1,a=e.client&&e.client===this;return!(!t||!(i||o||a))},pt=function(e){var t=Ze[this.id];if("object"==typeof e&&e&&e.type&&t){var n=xe(e),r=t&&t.handlers["*"]||[],i=t&&t.handlers[e.type]||[],o=r.concat(i);if(o&&o.length){var a,s,l,c,d,f=this;for(a=0,s=o.length;a<s;a++)l=o[a],c=f,"string"==typeof l&&"function"==typeof u[l]&&(l=u[l]),"object"==typeof l&&l&&"function"==typeof l.handleEvent&&(c=l,l=l.handleEvent),"function"==typeof l&&(d=N({},e),_e(l,c,[d],n))}}},ht=function(e){return"string"==typeof e&&(e=[]),"number"!=typeof e.length?[e]:e},gt=function(e){if(e&&1===e.nodeType){var t=function(e){(e||(e=u.event))&&("js"!==e._source&&(e.stopImmediatePropagation(),e.preventDefault()),delete e._source)},n=function(n){(n||(n=u.event))&&(t(n),Qe.focus(e))};e.addEventListener("mouseover",n,!1),e.addEventListener("mouseout",t,!1),e.addEventListener("mouseenter",t,!1),e.addEventListener("mouseleave",t,!1),e.addEventListener("mousemove",t,!1),nt[e.zcClippingId]={mouseover:n,mouseout:t,mouseenter:t,mouseleave:t,mousemove:t}}},mt=function(e){if(e&&1===e.nodeType){var t=nt[e.zcClippingId];if("object"==typeof t&&t){for(var n,r,i=["move","leave","enter","out","over"],o=0,a=i.length;o<a;o++)n="mouse"+i[o],r=t[n],"function"==typeof r&&e.removeEventListener(n,r,!1);delete nt[e.zcClippingId]}}};Qe._createClient=function(){rt.apply(this,D(arguments))},Qe.prototype.on=function(){return it.apply(this,D(arguments))},Qe.prototype.off=function(){return ot.apply(this,D(arguments))},Qe.prototype.handlers=function(){return at.apply(this,D(arguments))},Qe.prototype.emit=function(){return st.apply(this,D(arguments))},Qe.prototype.clip=function(){return lt.apply(this,D(arguments))},Qe.prototype.unclip=function(){return ut.apply(this,D(arguments))},Qe.prototype.elements=function(){return ct.apply(this,D(arguments))},Qe.prototype.destroy=function(){return dt.apply(this,D(arguments))},Qe.prototype.setText=function(e){if(!Ze[this.id])throw new Error("Attempted to set pending clipboard data from a destroyed ZeroClipboard client instance");return Qe.setData("text/plain",e),this},Qe.prototype.setHtml=function(e){if(!Ze[this.id])throw new Error("Attempted to set pending clipboard data from a destroyed ZeroClipboard client instance");return Qe.setData("text/html",e),this},Qe.prototype.setRichText=function(e){if(!Ze[this.id])throw new Error("Attempted to set pending clipboard data from a destroyed ZeroClipboard client instance");return Qe.setData("application/rtf",e),this},Qe.prototype.setData=function(){if(!Ze[this.id])throw new Error("Attempted to set pending clipboard data from a destroyed ZeroClipboard client instance");return Qe.setData.apply(this,D(arguments)),this},Qe.prototype.clearData=function(){if(!Ze[this.id])throw new Error("Attempted to clear pending clipboard data from a destroyed ZeroClipboard client instance");return Qe.clearData.apply(this,D(arguments)),this},Qe.prototype.getData=function(){if(!Ze[this.id])throw new Error("Attempted to get pending clipboard data from a destroyed ZeroClipboard client instance");return Qe.getData.apply(this,D(arguments))},r=function(){return Qe}.call(t,n,t,e),!(r!==o&&(e.exports=r))}(function(){return this||window}())},function(e,t,n){"use strict";var r=n(300)["default"],i=n(301)["default"];t.__esModule=!0;var o=n(302),a=r(o),s=n(304),l=r(s),u=n(305),c=r(u),d=n(306),f=r(d),p=n(332),h=r(p);t.Accordion=h["default"];var g=n(336),m=r(g);t.Alert=m["default"];var v=n(337),b=r(v);t.Badge=b["default"];var y=n(338),w=r(y);t.Breadcrumb=w["default"];var x=n(339),_=r(x);t.BreadcrumbItem=_["default"];var E=n(349),C=r(E);t.Button=C["default"];var k=n(352),S=r(k);t.ButtonGroup=S["default"];var A=n(354),T=r(A);t.ButtonInput=T["default"];var D=n(358),N=r(D);t.ButtonToolbar=N["default"];var F=n(359),M=r(F);t.Carousel=M["default"];var O=n(361),L=r(O);t.CarouselItem=L["default"];var P=n(363),I=r(P);t.Clearfix=I["default"];var R=n(364),B=r(R);t.Col=B["default"];var j=n(365),$=r(j);t.CollapsibleNav=$["default"];var V=n(381),U=r(V);t.Dropdown=U["default"];var W=n(467),q=r(W);t.DropdownButton=q["default"];var H=n(357),z=r(H);t.Glyphicon=z["default"];var G=n(469),K=r(G);t.Grid=K["default"];var Y=n(470),X=r(Y);t.Image=X["default"];var Q=n(471),J=r(Q);t.Input=J["default"];var Z=n(474),ee=r(Z);t.Interpolate=ee["default"];var te=n(475),ne=r(te);t.Jumbotron=ne["default"];var re=n(476),ie=r(re);t.Label=ie["default"];var oe=n(477),ae=r(oe);t.ListGroup=ae["default"];var se=n(478),le=r(se);t.ListGroupItem=le["default"];var ue=n(479),ce=r(ue);t.MenuItem=ce["default"];var de=n(480),fe=r(de);t.Media=fe["default"];var pe=n(487),he=r(pe);t.Modal=he["default"];var ge=n(494),me=r(ge);t.ModalBody=me["default"];var ve=n(497),be=r(ve);t.ModalFooter=be["default"];var ye=n(495),we=r(ye);t.ModalHeader=we["default"];var xe=n(496),_e=r(xe);t.ModalTitle=_e["default"];var Ee=n(514),Ce=r(Ee);t.Nav=Ce["default"];var ke=n(515),Se=r(ke);t.Navbar=Se["default"];var Ae=n(517),Te=r(Ae);t.NavBrand=Te["default"];var De=n(518),Ne=r(De);t.NavbarBrand=Ne["default"];var Fe=n(522),Me=r(Fe);t.NavDropdown=Me["default"];var Oe=n(523),Le=r(Oe);t.NavItem=Le["default"];var Pe=n(524),Ie=r(Pe);t.Overlay=Ie["default"];var Re=n(533),Be=r(Re);t.OverlayTrigger=Be["default"];var je=n(534),$e=r(je);t.PageHeader=$e["default"];var Ve=n(535),Ue=r(Ve);t.PageItem=Ue["default"];var We=n(536),qe=r(We);t.Pager=qe["default"];var He=n(537),ze=r(He);t.Pagination=ze["default"];var Ge=n(540),Ke=r(Ge);t.Panel=Ke["default"];var Ye=n(333),Xe=r(Ye);t.PanelGroup=Xe["default"];var Qe=n(541),Je=r(Qe);t.Popover=Je["default"];var Ze=n(542),et=r(Ze);t.ProgressBar=et["default"];var tt=n(543),nt=r(tt);t.ResponsiveEmbed=nt["default"];var rt=n(544),it=r(rt);t.Row=it["default"];
var ot=n(340),at=r(ot);t.SafeAnchor=at["default"];var st=n(545),lt=r(st);t.SplitButton=lt["default"];var ut=n(547),ct=r(ut);t.Tab=ct["default"];var dt=n(548),ft=r(dt);t.Table=ft["default"];var pt=n(549),ht=r(pt);t.Tabs=ht["default"];var gt=n(550),mt=r(gt);t.Thumbnail=mt["default"];var vt=n(551),bt=r(vt);t.Tooltip=bt["default"];var yt=n(552),wt=r(yt);t.Well=wt["default"];var xt=n(366),_t=r(xt);t.Collapse=_t["default"];var Et=n(492),Ct=r(Et);t.Fade=Ct["default"];var kt=n(472),St=i(kt);t.FormControls=St;var At={bootstrapUtils:f["default"],childrenValueInputValidation:a["default"],createChainedFunction:l["default"],ValidComponentChildren:c["default"]};t.utils=At},function(e,t){"use strict";t["default"]=function(e){return e&&e.__esModule?e:{"default":e}},t.__esModule=!0},function(e,t){"use strict";t["default"]=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t},t.__esModule=!0},function(e,t,n){"use strict";function r(e,t,n){var r=l["default"]("children","value")(e,t,n);return r||(r=a["default"].PropTypes.node(e,t,n)),r}var i=n(300)["default"];t.__esModule=!0,t["default"]=r;var o=n(106),a=i(o),s=n(303),l=i(s);e.exports=t["default"]},function(e,t){"use strict";function n(){function e(e,t){var r=n.map(function(t){return e[t]}).reduce(function(e,t){return e+(void 0!==t?1:0)},0);if(r>1){var i=n[0],o=n.slice(1),a=o.join(", ")+" and "+i;return new Error("Invalid prop '"+t+"', only one of the following may be provided: "+a)}}for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return e}t.__esModule=!0,t["default"]=n,e.exports=t["default"]},function(e,t){"use strict";function n(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter(function(e){return null!=e}).reduce(function(e,t){if("function"!=typeof t)throw new Error("Invalid Argument Type, must only provide functions, undefined, or null.");return null===e?t:function(){for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];e.apply(this,r),t.apply(this,r)}},null)}t.__esModule=!0,t["default"]=n,e.exports=t["default"]},function(e,t,n){"use strict";function r(e,t,n){var r=0;return d["default"].Children.map(e,function(e){if(d["default"].isValidElement(e)){var i=r;return r++,t.call(n,e,i)}return e})}function i(e,t,n){var r=0;return d["default"].Children.forEach(e,function(e){d["default"].isValidElement(e)&&(t.call(n,e,r),r++)})}function o(e){var t=0;return d["default"].Children.forEach(e,function(e){d["default"].isValidElement(e)&&t++}),t}function a(e){var t=!1;return d["default"].Children.forEach(e,function(e){!t&&d["default"].isValidElement(e)&&(t=!0)}),t}function s(e,t){var n=void 0;return i(e,function(r,i){!n&&t(r,i,e)&&(n=r)}),n}function l(e,t,n){var r=0,i=[];return d["default"].Children.forEach(e,function(e){d["default"].isValidElement(e)&&(t.call(n,e,r)&&i.push(e),r++)}),i}var u=n(300)["default"];t.__esModule=!0;var c=n(106),d=u(c);t["default"]={map:r,forEach:i,numberOf:o,find:s,findValidComponents:l,hasValidComponent:a},e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n[n.length-1];return"function"==typeof i?e.apply(void 0,n):function(t){return e.apply(void 0,n.concat([t]))}}}function i(e,t){return void 0===e&&(e={}),(e.bsClass||"").trim()?void 0:d["default"](!1),e.bsClass+(t?"-"+t:"")}var o=n(307)["default"],a=n(300)["default"];t.__esModule=!0;var s=n(106),l=n(323),u=a(l),c=n(330),d=a(c),f=n(331),p=(a(f),r(function(e,t){var n=t.propTypes||(t.propTypes={}),r=t.defaultProps||(t.defaultProps={});return n.bsClass=s.PropTypes.string,r.bsClass=e,t}));t.bsClass=p;var h=r(function(e,t,n){"string"!=typeof t&&(n=t,t=void 0);var r=n.STYLES||[],i=n.propTypes||{};e.forEach(function(e){r.indexOf(e)===-1&&r.push(e)});var a=s.PropTypes.oneOf(r);if(n.STYLES=a._values=r,n.propTypes=o({},i,{bsStyle:a}),void 0!==t){var l=n.defaultProps||(n.defaultProps={});l.bsStyle=t}return n});t.bsStyles=h;var g=r(function(e,t,n){"string"!=typeof t&&(n=t,t=void 0);var r=n.SIZES||[],i=n.propTypes||{};e.forEach(function(e){r.indexOf(e)===-1&&r.push(e)});var a=r.reduce(function(e,t){return u["default"].SIZES[t]&&u["default"].SIZES[t]!==t&&e.push(u["default"].SIZES[t]),e.concat(t)},[]),l=s.PropTypes.oneOf(a);if(l._values=a,n.SIZES=r,n.propTypes=o({},i,{bsSize:l}),void 0!==t){var c=n.defaultProps||(n.defaultProps={});c.bsSize=t}return n});t.bsSizes=g,t["default"]={prefix:i,getClassSet:function(e){var t={},n=i(e);if(n){var r=void 0;t[n]=!0,e.bsSize&&(r=u["default"].SIZES[e.bsSize]||r),r&&(t[i(e,r)]=!0),e.bsStyle&&(0===e.bsStyle.indexOf(i(e))?t[e.bsStyle]=!0:t[i(e,e.bsStyle)]=!0)}return t},addStyle:function(e,t){h(t,e)}};var m=r;t._curry=m},function(e,t,n){"use strict";var r=n(308)["default"];t["default"]=r||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},t.__esModule=!0},function(e,t,n){e.exports={"default":n(309),__esModule:!0}},function(e,t,n){n(310),e.exports=n(313).Object.assign},function(e,t,n){var r=n(311);r(r.S+r.F,"Object",{assign:n(316)})},function(e,t,n){var r=n(312),i=n(313),o=n(314),a="prototype",s=function(e,t,n){var l,u,c,d=e&s.F,f=e&s.G,p=e&s.S,h=e&s.P,g=e&s.B,m=e&s.W,v=f?i:i[t]||(i[t]={}),b=f?r:p?r[t]:(r[t]||{})[a];f&&(n=t);for(l in n)u=!d&&b&&l in b,u&&l in v||(c=u?b[l]:n[l],v[l]=f&&"function"!=typeof b[l]?n[l]:g&&u?o(c,r):m&&b[l]==c?function(e){var t=function(t){return this instanceof e?new e(t):e(t)};return t[a]=e[a],t}(c):h&&"function"==typeof c?o(Function.call,c):c,h&&((v[a]||(v[a]={}))[l]=c))};s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,e.exports=s},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t){var n=e.exports={version:"1.2.6"};"number"==typeof __e&&(__e=n)},function(e,t,n){var r=n(315);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,n){var r=n(317),i=n(318),o=n(320);e.exports=n(322)(function(){var e=Object.assign,t={},n={},r=Symbol(),i="abcdefghijklmnopqrst";return t[r]=7,i.split("").forEach(function(e){n[e]=e}),7!=e({},t)[r]||Object.keys(e({},n)).join("")!=i})?function(e,t){for(var n=i(e),a=arguments,s=a.length,l=1,u=r.getKeys,c=r.getSymbols,d=r.isEnum;s>l;)for(var f,p=o(a[l++]),h=c?u(p).concat(c(p)):u(p),g=h.length,m=0;g>m;)d.call(p,f=h[m++])&&(n[f]=p[f]);return n}:Object.assign},function(e,t){var n=Object;e.exports={create:n.create,getProto:n.getPrototypeOf,isEnum:{}.propertyIsEnumerable,getDesc:n.getOwnPropertyDescriptor,setDesc:n.defineProperty,setDescs:n.defineProperties,getKeys:n.keys,getNames:n.getOwnPropertyNames,getSymbols:n.getOwnPropertySymbols,each:[].forEach}},function(e,t,n){var r=n(319);e.exports=function(e){return Object(r(e))}},function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on  "+e);return e}},function(e,t,n){var r=n(321);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t){e.exports=function(e){try{return!!e()}catch(t){return!0}}},function(e,t,n){"use strict";var r=n(308)["default"],i=n(324)["default"],o=n(326)["default"];t.__esModule=!0;var a=function(e){return r(i({values:function(){var e=this;return o(this).map(function(t){return e[t]})}}),e)},s={SIZES:{large:"lg",medium:"md",small:"sm",xsmall:"xs",lg:"lg",md:"md",sm:"sm",xs:"xs"},GRID_COLUMNS:12},l=a({LARGE:"large",MEDIUM:"medium",SMALL:"small",XSMALL:"xsmall"});t.Sizes=l;var u=a({SUCCESS:"success",WARNING:"warning",DANGER:"danger",INFO:"info"});t.State=u;var c="default";t.DEFAULT=c;var d="primary";t.PRIMARY=d;var f="link";t.LINK=f;var p="inverse";t.INVERSE=p,t["default"]=s},function(e,t,n){e.exports={"default":n(325),__esModule:!0}},function(e,t,n){var r=n(317);e.exports=function(e,t){return r.create(e,t)}},function(e,t,n){e.exports={"default":n(327),__esModule:!0}},function(e,t,n){n(328),e.exports=n(313).Object.keys},function(e,t,n){var r=n(318);n(329)("keys",function(e){return function(t){return e(r(t))}})},function(e,t,n){var r=n(311),i=n(313),o=n(322);e.exports=function(e,t){var n=(i.Object||{})[e]||Object[e],a={};a[e]=t(n),r(r.S+r.F*o(function(){n(1)}),"Object",a)}},function(e,t,n){"use strict";var r=function(e,t,n,r,i,o,a,s){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,i,o,a,s],c=0;l=new Error(t.replace(/%s/g,function(){return u[c++]})),l.name="Invariant Violation"}throw l.framesToPop=1,l}};e.exports=r},function(e,t,n){"use strict";var r=function(){};e.exports=r},function(e,t,n){"use strict";var r=n(307)["default"],i=n(300)["default"];t.__esModule=!0;var o=n(106),a=i(o),s=n(333),l=i(s),u=a["default"].createClass({displayName:"Accordion",render:function(){return a["default"].createElement(l["default"],r({},this.props,{accordion:!0}),this.props.children)}});t["default"]=u,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(334)["default"],i=n(307)["default"],o=n(300)["default"];t.__esModule=!0;var a=n(106),s=o(a),l=n(335),u=o(l),c=n(306),d=o(c),f=n(305),p=o(f),h=s["default"].createClass({displayName:"PanelGroup",propTypes:{accordion:s["default"].PropTypes.bool,activeKey:s["default"].PropTypes.any,className:s["default"].PropTypes.string,children:s["default"].PropTypes.node,defaultActiveKey:s["default"].PropTypes.any,onSelect:s["default"].PropTypes.func},getDefaultProps:function(){return{accordion:!1}},getInitialState:function(){var e=this.props.defaultActiveKey;return{activeKey:e}},render:function(){var e=d["default"].getClassSet(this.props),t=this.props,n=t.className,o=r(t,["className"]);return this.props.accordion&&(o.role="tablist"),s["default"].createElement("div",i({},o,{className:u["default"](n,e),onSelect:null}),p["default"].map(o.children,this.renderPanel))},renderPanel:function(e,t){var n=null!=this.props.activeKey?this.props.activeKey:this.state.activeKey,r={bsStyle:e.props.bsStyle||this.props.bsStyle,key:e.key?e.key:t,ref:e.ref};return this.props.accordion&&(r.headerRole="tab",r.panelRole="tabpanel",r.collapsible=!0,r.expanded=e.props.eventKey===n,r.onSelect=this.handleSelect),a.cloneElement(e,r)},shouldComponentUpdate:function(){return!this._isChanging},handleSelect:function(e,t){e.preventDefault(),this.props.onSelect&&(this._isChanging=!0,this.props.onSelect(t),this._isChanging=!1),this.state.activeKey===t&&(t=null),this.setState({activeKey:t})}});t["default"]=c.bsClass("panel-group",h),e.exports=t["default"]},function(e,t){"use strict";t["default"]=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n},t.__esModule=!0},function(e,t,n){var r,i;/*!
	  Copyright (c) 2016 Jed Watson.
	  Licensed under the MIT License (MIT), see
	  http://jedwatson.github.io/classnames
	*/
!function(){"use strict";function n(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var i=typeof r;if("string"===i||"number"===i)e.push(r);else if(Array.isArray(r))e.push(n.apply(null,r));else if("object"===i)for(var a in r)o.call(r,a)&&r[a]&&e.push(a)}}return e.join(" ")}var o={}.hasOwnProperty;"undefined"!=typeof e&&e.exports?e.exports=n:(r=[],i=function(){return n}.apply(t,r),!(void 0!==i&&(e.exports=i)))}()},function(e,t,n){"use strict";var r=n(307)["default"],i=n(300)["default"];t.__esModule=!0;var o=n(106),a=i(o),s=n(335),l=i(s),u=n(306),c=i(u),d=n(323),f=a["default"].createClass({displayName:"Alert",propTypes:{onDismiss:a["default"].PropTypes.func,dismissAfter:a["default"].PropTypes.number,closeLabel:a["default"].PropTypes.string},getDefaultProps:function(){return{closeLabel:"Close Alert"}},renderDismissButton:function(){return a["default"].createElement("button",{type:"button",className:"close",onClick:this.props.onDismiss,"aria-hidden":"true",tabIndex:"-1"},a["default"].createElement("span",null,"×"))},renderSrOnlyDismissButton:function(){return a["default"].createElement("button",{type:"button",className:"close sr-only",onClick:this.props.onDismiss},this.props.closeLabel)},render:function(){var e=c["default"].getClassSet(this.props),t=!!this.props.onDismiss;return e[c["default"].prefix(this.props,"dismissable")]=t,a["default"].createElement("div",r({},this.props,{role:"alert",className:l["default"](this.props.className,e)}),t?this.renderDismissButton():null,this.props.children,t?this.renderSrOnlyDismissButton():null)},componentDidMount:function(){this.props.dismissAfter&&this.props.onDismiss&&(this.dismissTimer=setTimeout(this.props.onDismiss,this.props.dismissAfter))},componentWillUnmount:function(){clearTimeout(this.dismissTimer)}});t["default"]=u.bsStyles(d.State.values(),d.State.INFO,u.bsClass("alert",f)),e.exports=t["default"]},function(e,t,n){"use strict";var r=n(307)["default"],i=n(300)["default"];t.__esModule=!0;var o=n(106),a=i(o),s=n(305),l=i(s),u=n(335),c=i(u),d=n(306),f=i(d),p=a["default"].createClass({displayName:"Badge",propTypes:{pullRight:a["default"].PropTypes.bool},getDefaultProps:function(){return{pullRight:!1,bsClass:"badge"}},hasContent:function(){return l["default"].hasValidComponent(this.props.children)||a["default"].Children.count(this.props.children)>1||"string"==typeof this.props.children||"number"==typeof this.props.children},render:function(){var e,t=(e={"pull-right":this.props.pullRight},e[f["default"].prefix(this.props)]=this.hasContent(),e);return a["default"].createElement("span",r({},this.props,{className:c["default"](this.props.className,t)}),this.props.children)}});t["default"]=p,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(334)["default"],i=n(307)["default"],o=n(300)["default"];t.__esModule=!0;var a=n(106),s=o(a),l=n(335),u=o(l),c=n(305),d=o(c),f=n(339),p=o(f),h=s["default"].createClass({displayName:"Breadcrumb",propTypes:{bsClass:s["default"].PropTypes.string},getDefaultProps:function(){return{bsClass:"breadcrumb"}},render:function(){var e=this.props,t=e.className,n=r(e,["className"]);return s["default"].createElement("ol",i({},n,{role:"navigation","aria-label":"breadcrumbs",className:u["default"](t,this.props.bsClass)}),d["default"].map(this.props.children,this.renderBreadcrumbItem))},renderBreadcrumbItem:function(e,t){return a.cloneElement(e,{key:e.key||t})}});h.Item=p["default"],t["default"]=h,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(334)["default"],i=n(307)["default"],o=n(300)["default"];t.__esModule=!0;var a=n(335),s=o(a),l=n(106),u=o(l),c=n(340),d=o(c),f=u["default"].createClass({displayName:"BreadcrumbItem",propTypes:{active:u["default"].PropTypes.bool,id:u["default"].PropTypes.oneOfType([u["default"].PropTypes.string,u["default"].PropTypes.number]),linkId:u["default"].PropTypes.oneOfType([u["default"].PropTypes.string,u["default"].PropTypes.number]),href:u["default"].PropTypes.string,title:u["default"].PropTypes.node,target:u["default"].PropTypes.string},getDefaultProps:function(){return{active:!1}},render:function(){var e=this.props,t=e.active,n=e.className,o=e.id,a=e.linkId,l=e.children,c=e.href,f=e.title,p=e.target,h=r(e,["active","className","id","linkId","children","href","title","target"]),g={href:c,title:f,target:p,id:a};return u["default"].createElement("li",{id:o,className:s["default"](n,{active:t})},t?u["default"].createElement("span",h,l):u["default"].createElement(d["default"],i({},h,g),l))}});t["default"]=f,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(341)["default"],i=n(348)["default"],o=n(307)["default"],a=n(300)["default"];t.__esModule=!0;var s=n(106),l=a(s),u=n(304),c=a(u),d=function(e){function t(n){i(this,t),e.call(this,n),this.handleClick=this.handleClick.bind(this)}return r(t,e),t.prototype.handleClick=function(e){void 0===this.props.href&&e.preventDefault()},t.prototype.render=function(){return l["default"].createElement("a",o({role:this.props.href?void 0:"button"},this.props,{onClick:c["default"](this.props.onClick,this.handleClick),href:this.props.href||""}))},t}(l["default"].Component);t["default"]=d,d.propTypes={href:l["default"].PropTypes.string,onClick:l["default"].PropTypes.func},e.exports=t["default"]},function(e,t,n){"use strict";var r=n(324)["default"],i=n(342)["default"];t["default"]=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=r(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(i?i(e,t):e.__proto__=t)},t.__esModule=!0},function(e,t,n){e.exports={"default":n(343),__esModule:!0}},function(e,t,n){n(344),e.exports=n(313).Object.setPrototypeOf},function(e,t,n){var r=n(311);r(r.S,"Object",{setPrototypeOf:n(345).set})},function(e,t,n){var r=n(317).getDesc,i=n(346),o=n(347),a=function(e,t){if(o(e),!i(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,i){try{i=n(314)(Function.call,r(Object.prototype,"__proto__").set,2),i(e,[]),t=!(e instanceof Array)}catch(o){t=!0}return function(e,n){return a(e,n),t?e.__proto__=n:i(e,n),e}}({},!1):void 0),check:a}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){var r=n(346);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t){"use strict";t["default"]=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},t.__esModule=!0},function(e,t,n){"use strict";var r=n(307)["default"],i=n(300)["default"];t.__esModule=!0;var o=n(106),a=i(o),s=n(335),l=i(s),u=n(350),c=i(u),d=n(306),f=i(d),p=n(323),h=["button","reset","submit"],g=p.State.values().concat(p.DEFAULT,p.PRIMARY,p.LINK),m=a["default"].createClass({displayName:"Button",propTypes:{active:a["default"].PropTypes.bool,disabled:a["default"].PropTypes.bool,block:a["default"].PropTypes.bool,navItem:a["default"].PropTypes.bool,navDropdown:a["default"].PropTypes.bool,componentClass:c["default"],href:a["default"].PropTypes.string,target:a["default"].PropTypes.string,type:a["default"].PropTypes.oneOf(h)},getDefaultProps:function(){return{active:!1,block:!1,disabled:!1,navItem:!1,navDropdown:!1}},render:function(){var e,t=this.props.navDropdown?{}:f["default"].getClassSet(this.props),n=void 0,i=f["default"].prefix(this.props,"block");return t=r((e={active:this.props.active},e[i]=this.props.block,e),t),this.props.navItem?this.renderNavItem(t):(n=this.props.href||this.props.target||this.props.navDropdown?"renderAnchor":"renderButton",this[n](t))},renderAnchor:function(e){var t=this.props.componentClass||"a",n=this.props.href||"#";return e.disabled=this.props.disabled,a["default"].createElement(t,r({},this.props,{href:n,className:l["default"](this.props.className,e),role:"button"}),this.props.children)},renderButton:function(e){var t=this.props.componentClass||"button";return a["default"].createElement(t,r({},this.props,{type:this.props.type||"button",className:l["default"](this.props.className,e)}),this.props.children)},renderNavItem:function(e){var t={active:this.props.active};return a["default"].createElement("li",{className:l["default"](t)},this.renderAnchor(e))}});m.types=h,t["default"]=d.bsStyles(g,p.DEFAULT,d.bsSizes([p.Sizes.LARGE,p.Sizes.SMALL,p.Sizes.XSMALL],d.bsClass("btn",m))),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t,n){var r=s.errMsg(e,t,n,". Expected an Element `type`");if("function"!=typeof e[t]){if(a["default"].isValidElement(e[t]))return new Error(r+", not an actual Element");if("string"!=typeof e[t])return new Error(r+" such as a tag name or return value of React.createClass(...)")}}t.__esModule=!0;var o=n(106),a=r(o),s=n(351);t["default"]=s.createChainableTypeChecker(i),e.exports=t["default"]},function(e,t){"use strict";function n(e,t,n,r){return"Invalid prop '"+t+"' of value '"+e[t]+"'"+(" supplied to '"+n+"'"+r)}function r(e){function t(t,n,r,i){return i=i||"<<anonymous>>",null!=n[r]?e(n,r,i):t?new Error("Required prop '"+r+"' was not specified in '"+i+"'."):void 0}var n=t.bind(null,!1);return n.isRequired=t.bind(null,!0),n}t.__esModule=!0,t.errMsg=n,t.createChainableTypeChecker=r},function(e,t,n){"use strict";var r=n(307)["default"],i=n(300)["default"];t.__esModule=!0;var o=n(106),a=i(o),s=n(335),l=i(s),u=n(306),c=i(u),d=n(353),f=i(d),p=n(349),h=i(p),g=a["default"].createClass({displayName:"ButtonGroup",propTypes:{vertical:a["default"].PropTypes.bool,justified:a["default"].PropTypes.bool,block:f["default"](a["default"].PropTypes.bool,function(e){if(e.block&&!e.vertical)return new Error("The block property requires the vertical property to be set to have any effect")})},getDefaultProps:function(){return{block:!1,justified:!1,vertical:!1}},render:function(){var e=c["default"].getClassSet(this.props);return e[c["default"].prefix(this.props)]=!this.props.vertical,e[c["default"].prefix(this.props,"vertical")]=this.props.vertical,e[c["default"].prefix(this.props,"justified")]=this.props.justified,e[c["default"].prefix(h["default"].defaultProps,"block")]=this.props.block,a["default"].createElement("div",r({},this.props,{className:l["default"](this.props.className,e)}),this.props.children)}});t["default"]=u.bsClass("btn-group",g),e.exports=t["default"]},function(e,t,n){"use strict";function r(){function e(e,t,r){for(var i=0;i<n.length;i++){var o=n[i](e,t,r);if(void 0!==o&&null!==o)return o}}for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];if(void 0===n)throw new Error("No validations provided");if(n.some(function(e){return"function"!=typeof e}))throw new Error("Invalid arguments, must be functions");if(0===n.length)throw new Error("No validations provided");return i.createChainableTypeChecker(e)}t.__esModule=!0,t["default"]=r;var i=n(351);e.exports=t["default"]},function(e,t,n){"use strict";var r=n(341)["default"],i=n(348)["default"],o=n(334)["default"],a=n(307)["default"],s=n(300)["default"];t.__esModule=!0;var l=n(106),u=s(l),c=n(349),d=s(c),f=n(355),p=s(f),h=n(356),g=s(h),m=n(302),v=s(m),b=function(e){function t(){i(this,t),e.apply(this,arguments)}return r(t,e),t.prototype.renderFormGroup=function(e){var t=this.props,n=(t.bsStyle,t.value,o(t,["bsStyle","value"]));return u["default"].createElement(p["default"],n,e)},t.prototype.renderInput=function(){var e=this.props,t=e.children,n=e.value,r=o(e,["children","value"]),i=t?t:n;return u["default"].createElement(d["default"],a({},r,{componentClass:"input",ref:"input",key:"input",value:i}))},t}(g["default"]);b.types=d["default"].types,b.defaultProps={type:"button"},b.propTypes={type:u["default"].PropTypes.oneOf(b.types),bsStyle:function(){return null},children:v["default"],value:v["default"]},t["default"]=b,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(341)["default"],i=n(348)["default"],o=n(300)["default"];t.__esModule=!0;var a=n(106),s=o(a),l=n(335),u=o(l),c=function(e){function t(){i(this,t),e.apply(this,arguments)}return r(t,e),t.prototype.render=function(){var e={"form-group":!this.props.standalone,"form-group-lg":!this.props.standalone&&"large"===this.props.bsSize,"form-group-sm":!this.props.standalone&&"small"===this.props.bsSize,"has-feedback":this.props.hasFeedback,"has-success":"success"===this.props.bsStyle,"has-warning":"warning"===this.props.bsStyle,"has-error":"error"===this.props.bsStyle};return s["default"].createElement("div",{className:u["default"](e,this.props.groupClassName)},this.props.children)},t}(s["default"].Component);c.defaultProps={hasFeedback:!1,standalone:!1},c.propTypes={standalone:s["default"].PropTypes.bool,hasFeedback:s["default"].PropTypes.bool,bsSize:function(e){return e.standalone&&void 0!==e.bsSize?new Error("bsSize will not be used when `standalone` is set."):s["default"].PropTypes.oneOf(["small","medium","large"]).apply(null,arguments)},bsStyle:s["default"].PropTypes.oneOf(["success","warning","error"]),groupClassName:s["default"].PropTypes.string},t["default"]=c,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(341)["default"],i=n(348)["default"],o=n(307)["default"],a=n(300)["default"];t.__esModule=!0;var s=n(335),l=a(s),u=n(106),c=a(u),d=n(355),f=a(d),p=n(357),h=a(p),g=function(e){function t(){i(this,t),e.apply(this,arguments)}return r(t,e),t.prototype.getInputDOMNode=function(){return this.refs.input},t.prototype.getValue=function(){if("static"===this.props.type)return this.props.value;if(this.props.type)return"select"===this.props.type&&this.props.multiple?this.getSelectedOptions():this.getInputDOMNode().value;throw new Error("Cannot use getValue without specifying input type.")},t.prototype.getChecked=function(){return this.getInputDOMNode().checked},t.prototype.getSelectedOptions=function(){var e=[];return Array.prototype.forEach.call(this.getInputDOMNode().getElementsByTagName("option"),function(t){if(t.selected){var n=t.getAttribute("value")||t.innerHtml;e.push(n)}}),e},t.prototype.isCheckboxOrRadio=function(){return"checkbox"===this.props.type||"radio"===this.props.type},t.prototype.isFile=function(){return"file"===this.props.type},t.prototype.renderInputGroup=function(e){var t=this.props.addonBefore?c["default"].createElement("span",{className:"input-group-addon",key:"addonBefore"},this.props.addonBefore):null,n=this.props.addonAfter?c["default"].createElement("span",{className:"input-group-addon",key:"addonAfter"},this.props.addonAfter):null,r=this.props.buttonBefore?c["default"].createElement("span",{className:"input-group-btn"},this.props.buttonBefore):null,i=this.props.buttonAfter?c["default"].createElement("span",{className:"input-group-btn"},this.props.buttonAfter):null,o=void 0;switch(this.props.bsSize){case"small":o="input-group-sm";break;case"large":o="input-group-lg"}return t||n||r||i?c["default"].createElement("div",{className:l["default"](o,"input-group"),key:"input-group"},t,r,e,n,i):e},t.prototype.renderIcon=function(){if(!this.props.hasFeedback)return null;if(this.props.feedbackIcon)return c["default"].cloneElement(this.props.feedbackIcon,{formControlFeedback:!0});switch(this.props.bsStyle){case"success":return c["default"].createElement(h["default"],{formControlFeedback:!0,glyph:"ok",key:"icon"});case"warning":return c["default"].createElement(h["default"],{formControlFeedback:!0,glyph:"warning-sign",key:"icon"});case"error":return c["default"].createElement(h["default"],{formControlFeedback:!0,glyph:"remove",key:"icon"});default:return c["default"].createElement("span",{className:"form-control-feedback",key:"icon"})}},t.prototype.renderHelp=function(){return this.props.help?c["default"].createElement("span",{className:"help-block",key:"help"},this.props.help):null},t.prototype.renderCheckboxAndRadioWrapper=function(e){var t={checkbox:"checkbox"===this.props.type,radio:"radio"===this.props.type};return c["default"].createElement("div",{className:l["default"](t),key:"checkboxRadioWrapper"},e)},t.prototype.renderWrapper=function(e){return this.props.wrapperClassName?c["default"].createElement("div",{className:this.props.wrapperClassName,key:"wrapper"},e):e},t.prototype.renderLabel=function(e){var t={"control-label":!this.isCheckboxOrRadio()};return t[this.props.labelClassName]=this.props.labelClassName,this.props.label?c["default"].createElement("label",{htmlFor:this.props.id,className:l["default"](t),key:"label"},e,this.props.label):e},t.prototype.renderInput=function(){if(!this.props.type)return this.props.children;switch(this.props.type){case"select":return c["default"].createElement("select",o({},this.props,{className:l["default"](this.props.className,"form-control"),ref:"input",key:"input"}),this.props.children);case"textarea":return c["default"].createElement("textarea",o({},this.props,{className:l["default"](this.props.className,"form-control"),ref:"input",key:"input"}));case"static":return c["default"].createElement("p",o({},this.props,{className:l["default"](this.props.className,"form-control-static"),ref:"input",key:"input"}),this.props.value);default:var e=this.isCheckboxOrRadio()||this.isFile()?"":"form-control";return c["default"].createElement("input",o({},this.props,{className:l["default"](this.props.className,e),ref:"input",key:"input"}))}},t.prototype.renderFormGroup=function(e){return c["default"].createElement(f["default"],this.props,e)},t.prototype.renderChildren=function(){return this.isCheckboxOrRadio()?this.renderWrapper([this.renderCheckboxAndRadioWrapper(this.renderLabel(this.renderInput())),this.renderHelp()]):[this.renderLabel(),this.renderWrapper([this.renderInputGroup(this.renderInput()),this.renderIcon(),this.renderHelp()])]},t.prototype.render=function(){var e=this.renderChildren();return this.renderFormGroup(e)},t}(c["default"].Component);g.propTypes={type:c["default"].PropTypes.string,label:c["default"].PropTypes.node,help:c["default"].PropTypes.node,addonBefore:c["default"].PropTypes.node,addonAfter:c["default"].PropTypes.node,buttonBefore:c["default"].PropTypes.node,buttonAfter:c["default"].PropTypes.node,bsSize:c["default"].PropTypes.oneOf(["small","medium","large"]),bsStyle:c["default"].PropTypes.oneOf(["success","warning","error"]),hasFeedback:c["default"].PropTypes.bool,feedbackIcon:c["default"].PropTypes.node,id:c["default"].PropTypes.oneOfType([c["default"].PropTypes.string,c["default"].PropTypes.number]),groupClassName:c["default"].PropTypes.string,wrapperClassName:c["default"].PropTypes.string,labelClassName:c["default"].PropTypes.string,multiple:c["default"].PropTypes.bool,disabled:c["default"].PropTypes.bool,value:c["default"].PropTypes.any},g.defaultProps={disabled:!1,hasFeedback:!1,multiple:!1},t["default"]=g,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(307)["default"],i=n(300)["default"];t.__esModule=!0;var o=n(106),a=i(o),s=n(335),l=i(s),u=a["default"].createClass({displayName:"Glyphicon",propTypes:{bsClass:a["default"].PropTypes.string,glyph:a["default"].PropTypes.string.isRequired,formControlFeedback:a["default"].PropTypes.bool},getDefaultProps:function(){return{bsClass:"glyphicon",formControlFeedback:!1}},render:function(){var e,t=l["default"](this.props.className,(e={},e[this.props.bsClass]=!0,e["glyphicon-"+this.props.glyph]=!0,e["form-control-feedback"]=this.props.formControlFeedback,e));return a["default"].createElement("span",r({},this.props,{className:t}),this.props.children)}});t["default"]=u,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(307)["default"],i=n(300)["default"];t.__esModule=!0;var o=n(106),a=i(o),s=n(335),l=i(s),u=n(306),c=i(u),d=n(349),f=i(d),p=a["default"].createClass({displayName:"ButtonToolbar",propTypes:{bsSize:f["default"].propTypes.bsSize},getDefaultProps:function(){return{bsClass:"btn-toolbar"}},render:function(){var e=c["default"].getClassSet(this.props);return a["default"].createElement("div",r({},this.props,{role:"toolbar",className:l["default"](this.props.className,e)}),this.props.children)}});t["default"]=p,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(307)["default"],i=n(308)["default"],o=n(300)["default"];t.__esModule=!0;var a=n(106),s=o(a),l=n(335),u=o(l),c=n(305),d=o(c),f=n(357),p=o(f),h=n(306),g=o(h),m=n(360),v=o(m),b=n(361),y=o(b),w=s["default"].createClass({displayName:"Carousel",propTypes:{slide:s["default"].PropTypes.bool,indicators:s["default"].PropTypes.bool,interval:s["default"].PropTypes.number,controls:s["default"].PropTypes.bool,pauseOnHover:s["default"].PropTypes.bool,wrap:s["default"].PropTypes.bool,onSelect:s["default"].PropTypes.func,onSlideEnd:s["default"].PropTypes.func,activeIndex:s["default"].PropTypes.number,defaultActiveIndex:s["default"].PropTypes.number,direction:s["default"].PropTypes.oneOf(["prev","next"]),prevIcon:s["default"].PropTypes.node,nextIcon:s["default"].PropTypes.node},getDefaultProps:function(){return{bsClass:"carousel",slide:!0,interval:5e3,pauseOnHover:!0,wrap:!0,indicators:!0,controls:!0,prevIcon:s["default"].createElement(p["default"],{glyph:"chevron-left"}),nextIcon:s["default"].createElement(p["default"],{glyph:"chevron-right"})}},getInitialState:function(){return{activeIndex:null==this.props.defaultActiveIndex?0:this.props.defaultActiveIndex,previousActiveIndex:null,direction:null}},getDirection:function(e,t){return e===t?null:e>t?"prev":"next"},componentWillReceiveProps:function(e){var t=this.getActiveIndex();null!=e.activeIndex&&e.activeIndex!==t&&(clearTimeout(this.timeout),this.setState({previousActiveIndex:t,direction:null!=e.direction?e.direction:this.getDirection(t,e.activeIndex)}))},componentDidMount:function(){this.waitForNext()},componentWillUnmount:function(){clearTimeout(this.timeout)},next:function(e){e&&e.preventDefault();var t=this.getActiveIndex()+1,n=d["default"].numberOf(this.props.children);if(t>n-1){if(!this.props.wrap)return;t=0}this.handleSelect(t,"next")},prev:function(e){e&&e.preventDefault();var t=this.getActiveIndex()-1;if(t<0){if(!this.props.wrap)return;t=d["default"].numberOf(this.props.children)-1}this.handleSelect(t,"prev")},pause:function(){this.isPaused=!0,clearTimeout(this.timeout)},play:function(){this.isPaused=!1,this.waitForNext()},waitForNext:function(){!this.isPaused&&this.props.slide&&this.props.interval&&null==this.props.activeIndex&&(this.timeout=setTimeout(this.next,this.props.interval))},handleMouseOver:function(){this.props.pauseOnHover&&this.pause()},handleMouseOut:function(){this.isPaused&&this.play()},render:function(){var e,t=(e={},e[g["default"].prefix(this.props)]=!0,e.slide=this.props.slide,e);return s["default"].createElement("div",r({},this.props,{className:u["default"](this.props.className,t),onMouseOver:this.handleMouseOver,onMouseOut:this.handleMouseOut}),this.props.indicators?this.renderIndicators():null,s["default"].createElement("div",{ref:"inner",className:g["default"].prefix(this.props,"inner")},d["default"].map(this.props.children,this.renderItem)),this.props.controls?this.renderControls():null)},renderPrev:function(){var e="left "+g["default"].prefix(this.props,"control");return s["default"].createElement("a",{className:e,href:"#prev",key:0,onClick:this.prev},this.props.prevIcon)},renderNext:function(){var e="right "+g["default"].prefix(this.props,"control");return s["default"].createElement("a",{className:e,href:"#next",key:1,onClick:this.next},this.props.nextIcon)},renderControls:function(){if(!this.props.wrap){var e=this.getActiveIndex(),t=d["default"].numberOf(this.props.children);return[0!==e?this.renderPrev():null,e!==t-1?this.renderNext():null]}return[this.renderPrev(),this.renderNext()]},renderIndicator:function(e,t){var n=t===this.getActiveIndex()?"active":null;return s["default"].createElement("li",{key:t,className:n,onClick:this.handleSelect.bind(this,t,null)})},renderIndicators:function(){var e=this,t=[];return d["default"].forEach(this.props.children,function(n,r){t.push(e.renderIndicator(n,r)," ")},this),s["default"].createElement("ol",{className:g["default"].prefix(this.props,"indicators")},t)},getActiveIndex:function(){return null!=this.props.activeIndex?this.props.activeIndex:this.state.activeIndex},handleItemAnimateOutEnd:function(){var e=this;this.setState({previousActiveIndex:null,direction:null},function(){e.waitForNext(),e.props.onSlideEnd&&e.props.onSlideEnd()})},renderItem:function(e,t){var n=this.getActiveIndex(),r=t===n,i=null!=this.state.previousActiveIndex&&this.state.previousActiveIndex===t&&this.props.slide;return a.cloneElement(e,{active:r,ref:e.ref,key:e.key?e.key:t,index:t,animateOut:i,animateIn:r&&null!=this.state.previousActiveIndex&&this.props.slide,direction:this.state.direction,onAnimateOutEnd:i?this.handleItemAnimateOutEnd:null})},handleSelect:function(e,t){if(clearTimeout(this.timeout),this.isMounted()){var n=this.getActiveIndex();if(t=t||this.getDirection(n,e),this.props.onSelect&&this.props.onSelect(e,t),null==this.props.activeIndex&&e!==n){if(null!=this.state.previousActiveIndex)return;this.setState({activeIndex:e,previousActiveIndex:n,direction:t})}}}});w=i(w,{Caption:v["default"],Item:y["default"]}),t["default"]=w,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(307)["default"],i=n(300)["default"];t.__esModule=!0;var o=n(106),a=i(o),s=n(335),l=i(s),u=n(350),c=i(u),d=a["default"].createClass({displayName:"Carousel.Caption",propTypes:{componentClass:c["default"]},getDefaultProps:function(){return{componentClass:"div"}},render:function(){var e=this.props.componentClass;return a["default"].createElement(e,r({},this.props,{className:l["default"](this.props.className,"carousel-caption")}),this.props.children)}});t["default"]=d,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(307)["default"],i=n(300)["default"];t.__esModule=!0;var o=n(335),a=i(o),s=n(106),l=i(s),u=n(137),c=i(u),d=n(362),f=i(d),p=n(306),h=i(p),g=l["default"].createClass({displayName:"CarouselItem",propTypes:{direction:l["default"].PropTypes.oneOf(["prev","next"]),onAnimateOutEnd:l["default"].PropTypes.func,active:l["default"].PropTypes.bool,animateIn:l["default"].PropTypes.bool,animateOut:l["default"].PropTypes.bool,caption:l["default"].PropTypes.node,index:l["default"].PropTypes.number},getInitialState:function(){return{direction:null}},getDefaultProps:function(){return{bsStyle:"carousel",active:!1,animateIn:!1,animateOut:!1}},handleAnimateOutEnd:function(){this.props.onAnimateOutEnd&&this.isMounted()&&this.props.onAnimateOutEnd(this.props.index)},componentWillReceiveProps:function(e){this.props.active!==e.active&&this.setState({direction:null})},componentDidUpdate:function(e){!this.props.active&&e.active&&f["default"].addEndEventListener(c["default"].findDOMNode(this),this.handleAnimateOutEnd),this.props.active!==e.active&&setTimeout(this.startAnimation,20)},startAnimation:function(){this.isMounted()&&this.setState({direction:"prev"===this.props.direction?"right":"left"})},render:function(){var e={item:!0,active:this.props.active&&!this.props.animateIn||this.props.animateOut,next:this.props.active&&this.props.animateIn&&"next"===this.props.direction,prev:this.props.active&&this.props.animateIn&&"prev"===this.props.direction};return this.state.direction&&(this.props.animateIn||this.props.animateOut)&&(e[this.state.direction]=!0),l["default"].createElement("div",r({},this.props,{className:a["default"](this.props.className,e)}),this.props.children,this.props.caption?this.renderCaption():null)},renderCaption:function(){var e=h["default"].prefix(this.props,"caption");return l["default"].createElement("div",{className:e},this.props.caption)}});t["default"]=g,e.exports=t["default"]},function(e,t){"use strict";function n(){var e=document.createElement("div"),t=e.style;"AnimationEvent"in window||delete a.animationend.animation,"TransitionEvent"in window||delete a.transitionend.transition;for(var n in a){var r=a[n];for(var i in r)if(i in t){s.push(r[i]);break}}}function r(e,t,n){e.addEventListener(t,n,!1)}function i(e,t,n){e.removeEventListener(t,n,!1)}t.__esModule=!0;var o=!("undefined"==typeof window||!window.document||!window.document.createElement),a={transitionend:{transition:"transitionend",WebkitTransition:"webkitTransitionEnd",MozTransition:"mozTransitionEnd",OTransition:"oTransitionEnd",msTransition:"MSTransitionEnd"},animationend:{animation:"animationend",WebkitAnimation:"webkitAnimationEnd",MozAnimation:"mozAnimationEnd",OAnimation:"oAnimationEnd",msAnimation:"MSAnimationEnd"}},s=[];o&&n();var l={addEndEventListener:function(e,t){return 0===s.length?void window.setTimeout(t,0):void s.forEach(function(n){r(e,n,t)})},removeEndEventListener:function(e,t){0!==s.length&&s.forEach(function(n){i(e,n,t)})}};t["default"]=l,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(307)["default"],i=n(326)["default"],o=n(300)["default"];t.__esModule=!0;var a=n(106),s=o(a),l=n(335),u=o(l),c=n(323),d=o(c),f=n(350),p=o(f),h=s["default"].createClass({displayName:"Clearfix",propTypes:{componentClass:p["default"],visibleXsBlock:s["default"].PropTypes.bool,visibleSmBlock:s["default"].PropTypes.bool,visibleMdBlock:s["default"].PropTypes.bool,visibleLgBlock:s["default"].PropTypes.bool},getDefaultProps:function(){return{componentClass:"div"}},render:function(){var e=this,t=this.props.componentClass,n={};return i(d["default"].SIZES).forEach(function(t){var r=d["default"].SIZES[t];n["visible-"+r+"-block"]=e.props["visible"+r.charAt(0).toUpperCase()+r.slice(1)+"Block"]},this),s["default"].createElement(t,r({},this.props,{className:u["default"](this.props.className,"clearfix",n)}),this.props.children)}});t["default"]=h,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(307)["default"],i=n(326)["default"],o=n(300)["default"];t.__esModule=!0;var a=n(106),s=o(a),l=n(335),u=o(l),c=n(323),d=o(c),f=n(350),p=o(f),h=s["default"].createClass({displayName:"Col",propTypes:{xs:s["default"].PropTypes.number,sm:s["default"].PropTypes.number,md:s["default"].PropTypes.number,lg:s["default"].PropTypes.number,xsHidden:s["default"].PropTypes.bool,smHidden:s["default"].PropTypes.bool,mdHidden:s["default"].PropTypes.bool,lgHidden:s["default"].PropTypes.bool,xsOffset:s["default"].PropTypes.number,smOffset:s["default"].PropTypes.number,mdOffset:s["default"].PropTypes.number,lgOffset:s["default"].PropTypes.number,xsPush:s["default"].PropTypes.number,smPush:s["default"].PropTypes.number,mdPush:s["default"].PropTypes.number,lgPush:s["default"].PropTypes.number,xsPull:s["default"].PropTypes.number,smPull:s["default"].PropTypes.number,mdPull:s["default"].PropTypes.number,lgPull:s["default"].PropTypes.number,componentClass:p["default"]},getDefaultProps:function(){return{componentClass:"div"}},render:function(){var e=this,t=this.props.componentClass,n={};return i(d["default"].SIZES).forEach(function(t){var r=d["default"].SIZES[t],i=r,o=r+"-";e.props[i]&&(n["col-"+o+e.props[i]]=!0),n["hidden-"+r]=e.props[r+"Hidden"],i=r+"Offset",o=r+"-offset-",e.props[i]>=0&&(n["col-"+o+e.props[i]]=!0),i=r+"Push",o=r+"-push-",e.props[i]>=0&&(n["col-"+o+e.props[i]]=!0),i=r+"Pull",o=r+"-pull-",e.props[i]>=0&&(n["col-"+o+e.props[i]]=!0)},this),s["default"].createElement(t,r({},this.props,{className:u["default"](this.props.className,n)}),this.props.children)}});t["default"]=h,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(300)["default"];t.__esModule=!0;var i=n(106),o=r(i),a=n(366),s=r(a),l=n(335),u=r(l),c=n(380),d=r(c),f=n(305),p=r(f),h=n(304),g=r(h),m=o["default"].createClass({displayName:"CollapsibleNav",propTypes:{onSelect:o["default"].PropTypes.func,activeHref:o["default"].PropTypes.string,activeKey:o["default"].PropTypes.any,collapsible:o["default"].PropTypes.bool,expanded:o["default"].PropTypes.bool,eventKey:o["default"].PropTypes.any},getDefaultProps:function(){return{collapsible:!1,expanded:!1}},render:function(){var e=this.props.collapsible?"navbar-collapse":null,t=this.props.collapsible?this.renderCollapsibleNavChildren:this.renderChildren,n=o["default"].createElement("div",{eventKey:this.props.eventKey,className:u["default"](this.props.className,e)
},p["default"].map(this.props.children,t));return this.props.collapsible?o["default"].createElement(s["default"],{"in":this.props.expanded},n):n},getChildActiveProp:function(e){return!!e.props.active||(null!=this.props.activeKey&&e.props.eventKey===this.props.activeKey||(null!=this.props.activeHref&&e.props.href===this.props.activeHref||e.props.active))},renderChildren:function(e,t){var n=e.key?e.key:t;return i.cloneElement(e,{activeKey:this.props.activeKey,activeHref:this.props.activeHref,ref:"nocollapse_"+n,key:n,navItem:!0})},renderCollapsibleNavChildren:function(e,t){var n=e.key?e.key:t;return i.cloneElement(e,{active:this.getChildActiveProp(e),activeKey:this.props.activeKey,activeHref:this.props.activeHref,onSelect:g["default"](e.props.onSelect,this.props.onSelect),ref:"collapsible_"+n,key:n,navItem:!0})}});t["default"]=d["default"].wrapper(m,"CollapsibleNav","Navbar.Collapse","http://react-bootstrap.github.io/components.html#navbars"),e.exports=t["default"]},function(e,t,n){"use strict";function r(e,t){var n=t["offset"+w(e)],r=_[e];return n+parseInt(u["default"](t,r[0]),10)+parseInt(u["default"](t,r[1]),10)}var i=n(341)["default"],o=n(348)["default"],a=n(307)["default"],s=n(300)["default"];t.__esModule=!0;var l=n(367),u=s(l),c=n(106),d=s(c),f=n(335),p=s(f),h=n(375),g=s(h),m=n(379),v=s(m),b=n(304),y=s(b),w=function(e){return e[0].toUpperCase()+e.substr(1)},x=function(e){return e.offsetHeight},_={height:["marginTop","marginBottom"],width:["marginLeft","marginRight"]},E=function(e){function t(n,r){o(this,t),e.call(this,n,r),this.onEnterListener=this.handleEnter.bind(this),this.onEnteringListener=this.handleEntering.bind(this),this.onEnteredListener=this.handleEntered.bind(this),this.onExitListener=this.handleExit.bind(this),this.onExitingListener=this.handleExiting.bind(this)}return i(t,e),t.prototype.render=function(){var e=y["default"](this.onEnterListener,this.props.onEnter),t=y["default"](this.onEnteringListener,this.props.onEntering),n=y["default"](this.onEnteredListener,this.props.onEntered),r=y["default"](this.onExitListener,this.props.onExit),i=y["default"](this.onExitingListener,this.props.onExiting);return d["default"].createElement(g["default"],a({ref:"transition"},this.props,{"aria-expanded":this.props.role?this.props["in"]:null,className:p["default"](this.props.className,{width:"width"===this._dimension()}),exitedClassName:"collapse",exitingClassName:"collapsing",enteredClassName:"collapse in",enteringClassName:"collapsing",onEnter:e,onEntering:t,onEntered:n,onExit:r,onExiting:i,onExited:this.props.onExited}),this.props.children)},t.prototype.handleEnter=function(e){var t=this._dimension();e.style[t]="0"},t.prototype.handleEntering=function(e){var t=this._dimension();e.style[t]=this._getScrollDimensionValue(e,t)},t.prototype.handleEntered=function(e){var t=this._dimension();e.style[t]=null},t.prototype.handleExit=function(e){var t=this._dimension();e.style[t]=this.props.getDimensionValue(t,e)+"px"},t.prototype.handleExiting=function(e){var t=this._dimension();x(e),e.style[t]="0"},t.prototype._dimension=function(){return"function"==typeof this.props.dimension?this.props.dimension():this.props.dimension},t.prototype._getTransitionInstance=function(){return this.refs.transition},t.prototype._getScrollDimensionValue=function(e,t){return e["scroll"+w(t)]+"px"},t}(d["default"].Component);E.propTypes={"in":d["default"].PropTypes.bool,unmountOnExit:d["default"].PropTypes.bool,transitionAppear:d["default"].PropTypes.bool,timeout:d["default"].PropTypes.number,duration:v["default"](d["default"].PropTypes.number,"Use `timeout`."),onEnter:d["default"].PropTypes.func,onEntering:d["default"].PropTypes.func,onEntered:d["default"].PropTypes.func,onExit:d["default"].PropTypes.func,onExiting:d["default"].PropTypes.func,onExited:d["default"].PropTypes.func,dimension:d["default"].PropTypes.oneOfType([d["default"].PropTypes.oneOf(["height","width"]),d["default"].PropTypes.func]),getDimensionValue:d["default"].PropTypes.func,role:d["default"].PropTypes.string},E.defaultProps={"in":!1,timeout:300,unmountOnExit:!1,transitionAppear:!1,dimension:"height",getDimensionValue:r},t["default"]=E,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(368),i=n(370),o=n(372),a=n(374),s=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var l="",u=t;if("string"==typeof t){if(void 0===n)return e.style[r(t)]||o(e).getPropertyValue(i(t));(u={})[t]=n}for(var c in u)s.call(u,c)&&(u[c]||0===u[c]?l+=i(c)+":"+u[c]+";":a(e,i(c)));e.style.cssText+=";"+l}},function(e,t,n){"use strict";var r=n(369),i=/^-ms-/;e.exports=function(e){return r(e.replace(i,"ms-"))}},function(e,t){"use strict";var n=/-(.)/g;e.exports=function(e){return e.replace(n,function(e,t){return t.toUpperCase()})}},function(e,t,n){"use strict";var r=n(371),i=/^ms-/;e.exports=function(e){return r(e).replace(i,"-ms-")}},function(e,t){"use strict";var n=/([A-Z])/g;e.exports=function(e){return e.replace(n,"-$1").toLowerCase()}},function(e,t,n){"use strict";var r=n(373),i=n(368),o=r.interopRequireDefault(i),a=/^(top|right|bottom|left)$/,s=/^([+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|))(?!px)[a-z%]+$/i;e.exports=function(e){if(!e)throw new TypeError("No Element passed to `getComputedStyle()`");var t=e.ownerDocument;return"defaultView"in t?t.defaultView.opener?e.ownerDocument.defaultView.getComputedStyle(e,null):window.getComputedStyle(e,null):{getPropertyValue:function(t){var n=e.style;t=(0,o["default"])(t),"float"==t&&(t="styleFloat");var r=e.currentStyle[t]||null;if(null==r&&n&&n[t]&&(r=n[t]),s.test(r)&&!a.test(t)){var i=n.left,l=e.runtimeStyle,u=l&&l.left;u&&(l.left=e.currentStyle.left),n.left="fontSize"===t?"1em":r,r=n.pixelLeft+"px",n.left=i,u&&(l.left=u)}return r}}}},function(e,t,n){var r,i,o;!function(n,a){i=[t],r=a,o="function"==typeof r?r.apply(t,i):r,!(void 0!==o&&(e.exports=o))}(this,function(e){var t=e;t.interopRequireDefault=function(e){return e&&e.__esModule?e:{"default":e}},t._extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}})},function(e,t){"use strict";e.exports=function(e,t){return"removeProperty"in e.style?e.style.removeProperty(t):e.style.removeAttribute(t)}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function l(){}Object.defineProperty(t,"__esModule",{value:!0}),t.EXITING=t.ENTERED=t.ENTERING=t.EXITED=t.UNMOUNTED=void 0;var u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),d=n(106),f=r(d),p=n(137),h=r(p),g=n(376),m=r(g),v=n(378),b=r(v),y=n(335),w=r(y),x=m["default"].end,_=t.UNMOUNTED=0,E=t.EXITED=1,C=t.ENTERING=2,k=t.ENTERED=3,S=t.EXITING=4,A=function(e){function t(e,n){o(this,t);var r=a(this,Object.getPrototypeOf(t).call(this,e,n)),i=void 0;return i=e["in"]?e.transitionAppear?E:k:e.unmountOnExit?_:E,r.state={status:i},r.nextCallback=null,r}return s(t,e),c(t,[{key:"componentDidMount",value:function(){this.props.transitionAppear&&this.props["in"]&&this.performEnter(this.props)}},{key:"componentWillReceiveProps",value:function(e){e["in"]&&this.props.unmountOnExit?this.state.status===_&&this.setState({status:E}):this._needsUpdate=!0}},{key:"componentDidUpdate",value:function(){var e=this.state.status;return this.props.unmountOnExit&&e===E?void(this.props["in"]?this.performEnter(this.props):this.setState({status:_})):void(this._needsUpdate&&(this._needsUpdate=!1,this.props["in"]?e===S?this.performEnter(this.props):e===E&&this.performEnter(this.props):e!==C&&e!==k||this.performExit(this.props)))}},{key:"componentWillUnmount",value:function(){this.cancelNextCallback()}},{key:"performEnter",value:function(e){var t=this;this.cancelNextCallback();var n=h["default"].findDOMNode(this);e.onEnter(n),this.safeSetState({status:C},function(){t.props.onEntering(n),t.onTransitionEnd(n,function(){t.safeSetState({status:k},function(){t.props.onEntered(n)})})})}},{key:"performExit",value:function(e){var t=this;this.cancelNextCallback();var n=h["default"].findDOMNode(this);e.onExit(n),this.safeSetState({status:S},function(){t.props.onExiting(n),t.onTransitionEnd(n,function(){t.safeSetState({status:E},function(){t.props.onExited(n)})})})}},{key:"cancelNextCallback",value:function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)}},{key:"safeSetState",value:function(e,t){this.setState(e,this.setNextCallback(t))}},{key:"setNextCallback",value:function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback}},{key:"onTransitionEnd",value:function(e,t){this.setNextCallback(t),e?((0,b["default"])(e,x,this.nextCallback),setTimeout(this.nextCallback,this.props.timeout)):setTimeout(this.nextCallback,0)}},{key:"render",value:function(){var e=this.state.status;if(e===_)return null;var n=this.props,r=n.children,o=n.className,a=i(n,["children","className"]);Object.keys(t.propTypes).forEach(function(e){return delete a[e]});var s=void 0;e===E?s=this.props.exitedClassName:e===C?s=this.props.enteringClassName:e===k?s=this.props.enteredClassName:e===S&&(s=this.props.exitingClassName);var l=f["default"].Children.only(r);return f["default"].cloneElement(l,u({},a,{className:(0,w["default"])(l.props.className,o,s)}))}}]),t}(f["default"].Component);A.propTypes={"in":f["default"].PropTypes.bool,unmountOnExit:f["default"].PropTypes.bool,transitionAppear:f["default"].PropTypes.bool,timeout:f["default"].PropTypes.number,exitedClassName:f["default"].PropTypes.string,exitingClassName:f["default"].PropTypes.string,enteredClassName:f["default"].PropTypes.string,enteringClassName:f["default"].PropTypes.string,onEnter:f["default"].PropTypes.func,onEntering:f["default"].PropTypes.func,onEntered:f["default"].PropTypes.func,onExit:f["default"].PropTypes.func,onExiting:f["default"].PropTypes.func,onExited:f["default"].PropTypes.func},A.displayName="Transition",A.defaultProps={"in":!1,unmountOnExit:!1,transitionAppear:!1,timeout:5e3,onEnter:l,onEntering:l,onEntered:l,onExit:l,onExiting:l,onExited:l},t["default"]=A},function(e,t,n){"use strict";function r(){var e,t="",n={O:"otransitionend",Moz:"transitionend",Webkit:"webkitTransitionEnd",ms:"MSTransitionEnd"},r=document.createElement("div");for(var i in n)if(u.call(n,i)&&void 0!==r.style[i+"TransitionProperty"]){t="-"+i.toLowerCase()+"-",e=n[i];break}return e||void 0===r.style.transitionProperty||(e="transitionend"),{end:e,prefix:t}}var i,o,a,s,l=n(377),u=Object.prototype.hasOwnProperty,c="transform",d={};l&&(d=r(),c=d.prefix+c,a=d.prefix+"transition-property",o=d.prefix+"transition-duration",s=d.prefix+"transition-delay",i=d.prefix+"transition-timing-function"),e.exports={transform:c,end:d.end,property:a,timing:i,delay:s,duration:o}},function(e,t){"use strict";e.exports=!("undefined"==typeof window||!window.document||!window.document.createElement)},function(e,t,n){"use strict";var r=n(377),i=function(){};r&&(i=function(){return document.addEventListener?function(e,t,n,r){return e.addEventListener(t,n,r||!1)}:document.attachEvent?function(e,t,n){return e.attachEvent("on"+t,n)}:void 0}()),e.exports=i},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){return function(n,r,i){if(null!=n[r]){var o='"'+r+'" property of "'+i+'" has been deprecated.\n'+t;l[o]||(s["default"](!1,o),l[o]=!0)}return e(n,r,i)}}function o(){l={}}t.__esModule=!0,t["default"]=i;var a=n(331),s=r(a),l={};i._resetWarned=o,e.exports=t["default"]},function(e,t,n){"use strict";function r(e,t,n){var r=void 0;"object"==typeof e?r=e.message:(r=e+" is deprecated. Use "+t+" instead.",n&&(r+="\nYou can read more about it at "+n)),l[r]||(l[r]=!0)}var i=n(341)["default"],o=n(348)["default"],a=n(300)["default"];t.__esModule=!0;var s=n(331),l=(a(s),{});r.wrapper=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),a=1;a<t;a++)n[a-1]=arguments[a];return function(e){function t(){o(this,t),e.apply(this,arguments)}return i(t,e),t.prototype.componentWillMount=function(){if(r.apply(void 0,n),e.prototype.componentWillMount){for(var t,i=arguments.length,o=Array(i),a=0;a<i;a++)o[a]=arguments[a];(t=e.prototype.componentWillMount).call.apply(t,[this].concat(o))}},t}(e)},t["default"]=r,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(341)["default"],i=n(348)["default"],o=n(307)["default"],a=n(300)["default"];t.__esModule=!0;var s=n(335),l=a(s),u=n(382),c=a(u),d=n(384),f=a(d),p=n(385),h=a(p),g=n(386),m=a(g),v=n(439),b=a(v),y=n(106),w=a(y),x=n(137),_=a(x),E=n(353),C=a(E),k=n(350),S=a(k),A=n(454),T=a(A),D=n(455),N=a(D),F=n(306),M=a(F),O=n(352),L=a(O),P=n(458),I=a(P),R=n(464),B=a(R),j=n(304),$=a(j),V=n(465),U=a(V),W=n(305),q=a(W),H="toggle-btn",z=B["default"].defaultProps.bsRole,G=I["default"].defaultProps.bsRole,K=function(e){function t(n){i(this,t),e.call(this,n),this.Toggle=B["default"],this.toggleOpen=this.toggleOpen.bind(this),this.handleClick=this.handleClick.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleClose=this.handleClose.bind(this),this.extractChildren=this.extractChildren.bind(this),this.refineMenu=this.refineMenu.bind(this),this.refineToggle=this.refineToggle.bind(this),this.childExtractors=[{key:"toggle",matches:function(e){return e.props.bsRole===z},refine:this.refineToggle},{key:"menu",exclusive:!0,matches:function(e){return e.props.bsRole===G},refine:this.refineMenu}],this.state={},this.lastOpenEventType=null}return r(t,e),t.prototype.componentDidMount=function(){this.focusNextOnOpen()},t.prototype.componentWillUpdate=function(e){!e.open&&this.props.open&&(this._focusInDropdown=f["default"](_["default"].findDOMNode(this.refs.menu),c["default"](document)))},t.prototype.componentDidUpdate=function(e){this.props.open&&!e.open&&this.focusNextOnOpen(),!this.props.open&&e.open&&this._focusInDropdown&&(this._focusInDropdown=!1,this.focus())},t.prototype.render=function(){var e,t=this.extractChildren(),n=this.props.componentClass,r=b["default"](this.props,["id","bsClass","role"]),i=M["default"].prefix(this.props),a=(e={open:this.props.open,disabled:this.props.disabled},e[i]=!this.props.dropup,e.dropup=this.props.dropup,e);return w["default"].createElement(n,o({},r,{className:l["default"](this.props.className,a)}),t)},t.prototype.toggleOpen=function(){var e=arguments.length<=0||void 0===arguments[0]?null:arguments[0],t=!this.props.open;t&&(this.lastOpenEventType=e),this.props.onToggle&&this.props.onToggle(t)},t.prototype.handleClick=function(){this.props.disabled||this.toggleOpen("click")},t.prototype.handleKeyDown=function(e){if(!this.props.disabled)switch(e.keyCode){case h["default"].codes.down:this.props.open?this.refs.menu.focusNext&&this.refs.menu.focusNext():this.toggleOpen("keydown"),e.preventDefault();break;case h["default"].codes.esc:case h["default"].codes.tab:this.handleClose(e)}},t.prototype.handleClose=function(){this.props.open&&this.toggleOpen()},t.prototype.focusNextOnOpen=function(){var e=this.refs.menu;e.focusNext&&("keydown"!==this.lastOpenEventType&&"menuitem"!==this.props.role||e.focusNext())},t.prototype.focus=function(){var e=_["default"].findDOMNode(this.refs[H]);e&&e.focus&&e.focus()},t.prototype.extractChildren=function(){var e=this,t=!!this.props.open,n={};return q["default"].map(this.props.children,function(r){var i=m["default"](e.childExtractors,function(e){return e.matches(r)});if(i){if(n[i.key])return!1;n[i.key]=i.exclusive,r=i.refine(r,t)}return r})},t.prototype.refineMenu=function(e,t){var n={ref:"menu",open:t,labelledBy:this.props.id,pullRight:this.props.pullRight,bsClass:this.props.bsClass};return n.onClose=$["default"](e.props.onClose,this.props.onClose,this.handleClose),n.onSelect=$["default"](e.props.onSelect,this.props.onSelect,this.handleClose),y.cloneElement(e,n,e.props.children)},t.prototype.refineToggle=function(e,t){var n={open:t,id:this.props.id,ref:H,role:this.props.role};return n.onClick=$["default"](e.props.onClick,this.handleClick),n.onKeyDown=$["default"](e.props.onKeyDown,this.handleKeyDown),y.cloneElement(e,n,e.props.children)},t}(w["default"].Component);K.Toggle=B["default"],K.TOGGLE_REF=H,K.TOGGLE_ROLE=z,K.MENU_ROLE=G,K.defaultProps={componentClass:L["default"],bsClass:"dropdown"},K.propTypes={bsClass:w["default"].PropTypes.string,dropup:w["default"].PropTypes.bool,id:T["default"](w["default"].PropTypes.oneOfType([w["default"].PropTypes.string,w["default"].PropTypes.number])),componentClass:S["default"],children:C["default"](U["default"].requiredRoles(z,G),U["default"].exclusiveRoles(G)),disabled:w["default"].PropTypes.bool,pullRight:w["default"].PropTypes.bool,open:w["default"].PropTypes.bool,onClose:w["default"].PropTypes.func,onToggle:w["default"].PropTypes.func,onSelect:w["default"].PropTypes.func,role:w["default"].PropTypes.string},K=N["default"](K,{open:"onToggle"}),K.Toggle=B["default"],K.Menu=I["default"],t["default"]=K,e.exports=t["default"]},function(e,t,n){"use strict";function r(){var e=void 0===arguments[0]?document:arguments[0];try{return e.activeElement}catch(t){}}var i=n(373);t.__esModule=!0,t["default"]=r;var o=n(383);i.interopRequireDefault(o);e.exports=t["default"]},function(e,t){"use strict";function n(e){return e&&e.ownerDocument||document}t.__esModule=!0,t["default"]=n,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(377),i=function(){var e=r&&document.documentElement;return e&&e.contains?function(e,t){return e.contains(t)}:e&&e.compareDocumentPosition?function(e,t){return e===t||!!(16&e.compareDocumentPosition(t))}:function(e,t){if(t)do if(t===e)return!0;while(t=t.parentNode);return!1}}();e.exports=i},function(e,t){t=e.exports=function(e){if(e&&"object"==typeof e){var t=e.which||e.keyCode||e.charCode;t&&(e=t)}if("number"==typeof e)return o[e];var i=String(e),a=n[i.toLowerCase()];if(a)return a;var a=r[i.toLowerCase()];return a?a:1===i.length?i.charCodeAt(0):void 0};var n=t.code=t.codes={backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,"pause/break":19,"caps lock":20,esc:27,space:32,"page up":33,"page down":34,end:35,home:36,left:37,up:38,right:39,down:40,insert:45,"delete":46,command:91,"left command":91,"right command":93,"numpad *":106,"numpad +":107,"numpad -":109,"numpad .":110,"numpad /":111,"num lock":144,"scroll lock":145,"my computer":182,"my calculator":183,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},r=t.aliases={windows:91,"⇧":16,"⌥":18,"⌃":17,"⌘":91,ctl:17,control:17,option:18,pause:19,"break":19,caps:20,"return":13,escape:27,spc:32,pgup:33,pgdn:34,ins:45,del:46,cmd:91};/*!
	 * Programatically add the following
	 */
for(i=97;i<123;i++)n[String.fromCharCode(i)]=i-32;for(var i=48;i<58;i++)n[i-48]=i;for(i=1;i<13;i++)n["f"+i]=i+111;for(i=0;i<10;i++)n["numpad "+i]=i+96;var o=t.names=t.title={};for(i in n)o[n[i]]=i;for(var a in r)n[a]=r[a]},function(e,t,n){var r=n(387),i=n(412),o=i(r);e.exports=o},[887,388,411],[888,389,396],[889,390],[890,391],function(e,t,n){function r(e){if(a.unindexedChars&&o(e)){for(var t=-1,n=e.length,r=Object(e);++t<n;)r[t]=e.charAt(t);return r}return i(e)?e:Object(e)}var i=n(392),o=n(393),a=n(395);e.exports=r},function(e,t){function n(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}e.exports=n},function(e,t,n){function r(e){return"string"==typeof e||i(e)&&s.call(e)==o}var i=n(394),o="[object String]",a=Object.prototype,s=a.toString;e.exports=r},function(e,t){function n(e){return!!e&&"object"==typeof e}e.exports=n},function(e,t){var n=Array.prototype,r=Error.prototype,i=Object.prototype,o=i.propertyIsEnumerable,a=n.splice,s={};!function(e){var t=function(){this.x=e},n={0:e,length:e},i=[];t.prototype={valueOf:e,y:e};for(var l in new t)i.push(l);s.enumErrorProps=o.call(r,"message")||o.call(r,"name"),s.enumPrototypes=o.call(t,"prototype"),s.nonEnumShadows=!/valueOf/.test(i),s.ownLast="x"!=i[0],s.spliceObjects=(a.call(n,0,1),!n[0]),s.unindexedChars="x"[0]+Object("x")[0]!="xx"}(1,0),e.exports=s},function(e,t,n){var r=n(397),i=n(401),o=n(392),a=n(405),s=n(395),l=r(Object,"keys"),u=l?function(e){var t=null==e?void 0:e.constructor;return"function"==typeof t&&t.prototype===e||("function"==typeof e?s.enumPrototypes:i(e))?a(e):o(e)?l(e):[]}:a;e.exports=u},[891,398],function(e,t,n){function r(e){return null!=e&&(i(e)?d.test(u.call(e)):a(e)&&(o(e)?d:s).test(e))}var i=n(399),o=n(400),a=n(394),s=/^\[object .+?Constructor\]$/,l=Object.prototype,u=Function.prototype.toString,c=l.hasOwnProperty,d=RegExp("^"+u.call(c).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=r},[892,392],function(e,t){var n=function(){try{Object({toString:0}+"")}catch(e){return function(){return!1}}return function(e){return"function"!=typeof e.toString&&"string"==typeof(e+"")}}();e.exports=n},[893,402,404],[894,403],function(e,t,n){function r(e){return function(t){return null==t?void 0:i(t)[e]}}var i=n(391);e.exports=r},function(e,t){function n(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}var r=9007199254740991;e.exports=n},function(e,t,n){function r(e){for(var t=u(e),n=t.length,r=n&&e.length,c=!!r&&s(r)&&(o(e)||i(e)||l(e)),f=-1,p=[];++f<n;){var h=t[f];(c&&a(h,r)||d.call(e,h))&&p.push(h)}return p}var i=n(406),o=n(407),a=n(408),s=n(404),l=n(393),u=n(409),c=Object.prototype,d=c.hasOwnProperty;e.exports=r},[895,401,394],[896,397,404,394],function(e,t){function n(e,t){return e="number"==typeof e||r.test(e)?+e:-1,t=null==t?i:t,e>-1&&e%1==0&&e<t}var r=/^\d+$/,i=9007199254740991;e.exports=n},function(e,t,n){function r(e){if(null==e)return[];c(e)||(e=Object(e));var t=e.length;t=t&&u(t)&&(a(e)||o(e)||d(e))&&t||0;for(var n=e.constructor,r=-1,i=s(n)&&n.prototype||C,p=i===e,h=Array(t),g=t>0,v=f.enumErrorProps&&(e===E||e instanceof Error),b=f.enumPrototypes&&s(e);++r<t;)h[r]=r+"";for(var w in e)b&&"prototype"==w||v&&("message"==w||"name"==w)||g&&l(w,t)||"constructor"==w&&(p||!S.call(e,w))||h.push(w);if(f.nonEnumShadows&&e!==C){var D=e===k?x:e===E?m:A.call(e),N=T[D]||T[y];for(D==y&&(i=C),t=_.length;t--;){w=_[t];var F=N[w];p&&F||(F?!S.call(e,w):e[w]===i[w])||h.push(w)}}return h}var i=n(410),o=n(406),a=n(407),s=n(399),l=n(408),u=n(404),c=n(392),d=n(393),f=n(395),p="[object Array]",h="[object Boolean]",g="[object Date]",m="[object Error]",v="[object Function]",b="[object Number]",y="[object Object]",w="[object RegExp]",x="[object String]",_=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],E=Error.prototype,C=Object.prototype,k=String.prototype,S=C.hasOwnProperty,A=C.toString,T={};T[p]=T[g]=T[b]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0},T[h]=T[x]={constructor:!0,toString:!0,valueOf:!0},T[m]=T[v]=T[w]={constructor:!0,toString:!0},T[y]={constructor:!0},i(_,function(e){for(var t in T)if(S.call(T,t)){var n=T[t];n[e]=S.call(n,e)}}),e.exports=r},function(e,t){function n(e,t){for(var n=-1,r=e.length;++n<r&&t(e[n],n,e)!==!1;);return e}e.exports=n},[897,402,404,391],function(e,t,n){function r(e,t){return function(n,r,l){if(r=i(r,l,3),s(n)){var u=a(n,r,t);return u>-1?n[u]:void 0}return o(n,r,e)}}var i=n(413),o=n(437),a=n(438),s=n(407);e.exports=r},[898,414,426,433,434,435],function(e,t,n){function r(e){var t=o(e);if(1==t.length&&t[0][2]){var n=t[0][0],r=t[0][1];return function(e){return null!=e&&(e=a(e),e[n]===r&&(void 0!==r||n in e))}}return function(e){return i(e,t)}}var i=n(415),o=n(423),a=n(391);e.exports=r},[899,416,391],[900,417,392,394],function(e,t,n){function r(e,t,n,r,p,m,v){var b=s(e),y=s(t),w=d,x=d;b||(w=g.call(e),w==c?w=f:w!=f&&(b=u(e))),y||(x=g.call(t),x==c?x=f:x!=f&&(y=u(t)));var _=w==f&&!l(e),E=x==f&&!l(t),C=w==x;if(C&&!b&&!_)return o(e,t,w);if(!p){var k=_&&h.call(e,"__wrapped__"),S=E&&h.call(t,"__wrapped__");if(k||S)return n(k?e.value():e,S?t.value():t,r,p,m,v)}if(!C)return!1;m||(m=[]),v||(v=[]);for(var A=m.length;A--;)if(m[A]==e)return v[A]==t;m.push(e),v.push(t);var T=(b?i:a)(e,t,n,r,p,m,v);return m.pop(),v.pop(),T}var i=n(418),o=n(420),a=n(421),s=n(407),l=n(400),u=n(422),c="[object Arguments]",d="[object Array]",f="[object Object]",p=Object.prototype,h=p.hasOwnProperty,g=p.toString;e.exports=r},[901,419],function(e,t){function n(e,t){for(var n=-1,r=e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}e.exports=n},function(e,t){function n(e,t,n){switch(n){case r:case i:return+e==+t;case o:return e.name==t.name&&e.message==t.message;case a:return e!=+e?t!=+t:e==+t;case s:case l:return e==t+""}return!1}var r="[object Boolean]",i="[object Date]",o="[object Error]",a="[object Number]",s="[object RegExp]",l="[object String]";e.exports=n},[902,396],[903,404,394],[904,424,425],[905,392],[906,396,391],[907,427,416,428,407,429,424,430,391,431],function(e,t,n){function r(e,t,n){if(null!=e){e=i(e),void 0!==n&&n in e&&(t=[n]);for(var r=0,o=t.length;null!=e&&r<o;)e=i(e)[t[r++]];return r&&r==o?e:void 0}}var i=n(391);e.exports=r},function(e,t){function n(e,t,n){var r=-1,i=e.length;t=null==t?0:+t||0,t<0&&(t=-t>i?0:i+t),n=void 0===n||n>i?i:+n||0,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r<i;)o[r]=e[r+t];return o}e.exports=n},[908,407,391],function(e,t){function n(e){var t=e?e.length:0;return t?e[t-1]:void 0}e.exports=n},[909,432,407],function(e,t){function n(e){return null==e?"":e+""}e.exports=n},[910,434],function(e,t){function n(e){return e}e.exports=n},[911,403,436,429],[912,427,431],function(e,t){function n(e,t,n,r){var i;return n(e,function(e,n,o){if(t(e,n,o))return i=r?n:e,!1}),i}e.exports=n},function(e,t){function n(e,t,n){for(var r=e.length,i=n?r:-1;n?i--:++i<r;)if(t(e[i],i,e))return i;return-1}e.exports=n},[913,440,441,448,433,409,450,451,453],function(e,t){function n(e,t){for(var n=-1,r=e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}e.exports=n},[914,442,444,445],[915,443],function(e,t){function n(e,t,n){for(var r=e.length,i=t+(n?0:-1);n?i--:++i<r;){var o=e[i];if(o!==o)return i}return-1}e.exports=n},[916,392],[917,446,397],[918,447,397],[919,392],[920,449,406,407,401,394],function(e,t){function n(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}e.exports=n},[921,391],[922,452],[923,389,409],function(e,t){function n(e,t){if("function"!=typeof e)throw new TypeError(r);return t=i(void 0===t?e.length-1:+t||0,0),function(){for(var n=arguments,r=-1,o=i(n.length-t,0),a=Array(o);++r<o;)a[r]=n[t+r];switch(t){case 0:return e.call(this,a);case 1:return e.call(this,n[0],a);case 2:return e.call(this,n[0],n[1],a)}var s=Array(t+1);for(r=-1;++r<t;)s[r]=n[r];return s[t]=a,e.apply(this,s)}}var r="Expected a function",i=Math.max;e.exports=n},function(e,t){"use strict";function n(e){return function(t,n,r){return null==t[n]?new Error("The prop '"+n+"' is required to make '"+r+"' accessible for users using assistive technologies such as screen readers"):e(t,n,r)}}t.__esModule=!0,t["default"]=n,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t,n,r,i){n&&(e._notifying=!0,n.call.apply(n,[e,r].concat(i)),e._notifying=!1),e._values[t]=r,e.isMounted()&&e.forceUpdate()}t.__esModule=!0;var o=n(456),a=r(o),s={shouldComponentUpdate:function(){return!this._notifying}};t["default"]=(0,a["default"])([s],i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}function i(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function a(e,t){function n(r,i){function a(e,n){var r=p.getLinkName(e),o=this.props[i[e]];r&&l(this.props,r)&&!o&&(o=this.props[r].requestChange);for(var a=arguments.length,s=Array(a>2?a-2:0),u=2;u<a;u++)s[u-2]=arguments[u];t(this,e,o,n,s)}function l(e,t){return void 0!==e[t]}var c,f=arguments.length<=2||void 0===arguments[2]?[]:arguments[2],h=r.displayName||r.name||"Component",g=p.getType(r).propTypes,m=p.isReactComponent(r);c=p.uncontrolledPropTypes(i,g,h),(0,d["default"])(m||!f.length,"[uncontrollable] stateless function components cannot pass through methods becasue they have no associated instances. Check component: "+h+", attempting to pass through methods: "+f.join(", ")),f=p.transform(f,function(e,t){e[t]=function(){var e;return(e=this.refs.inner)[t].apply(e,arguments)}},{});var v=u["default"].createClass(s({displayName:"Uncontrolled("+h+")",mixins:e,propTypes:c},f,{componentWillMount:function(){var e=this.props,t=Object.keys(i);this._values=p.transform(t,function(t,n){t[n]=e[p.defaultKey(n)]},{})},componentWillReceiveProps:function(e){var t=this,n=this.props,r=Object.keys(i);r.forEach(function(r){void 0===p.getValue(e,r)&&void 0!==p.getValue(n,r)&&(t._values[r]=e[p.defaultKey(r)])})},render:function(){var e=this,t={},n=this.props,c=(n.valueLink,n.checkedLink,o(n,["valueLink","checkedLink"]));return p.each(i,function(n,r){var i=p.getLinkName(r),o=e.props[r];i&&!l(e.props,r)&&l(e.props,i)&&(o=e.props[i].value),t[r]=void 0!==o?o:e._values[r],t[n]=a.bind(e,r)}),t=s({},c,t,{ref:m?"inner":null}),u["default"].createElement(r,t)}}));return v.ControlledComponent=r,v.deferControlTo=function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],r=arguments[2];return n(e,s({},i,t),r)},v}return n}t.__esModule=!0;var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};t["default"]=a;var l=n(106),u=i(l),c=n(330),d=i(c),f=n(457),p=r(f);e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t,n){return function(r,i){if(void 0!==r[i])return r[e]?t&&t(r,i,n):new Error("You have provided a `"+i+"` prop to `"+n+"` without an `"+e+"` handler. This will render a read-only field. If the field should be mutable use `"+c(i)+"`. Otherwise, set `"+e+"`")}}function o(e,t,n){var r={};return r}function a(e){return y[0]>=15||0===y[0]&&y[1]>=13?e:e.type}function s(e,t){var n=u(t);return n&&!l(e,t)&&l(e,n)?e[n].value:e[t]}function l(e,t){return void 0!==e[t]}function u(e){return"value"===e?"valueLink":"checked"===e?"checkedLink":null}function c(e){return"default"+e.charAt(0).toUpperCase()+e.substr(1)}function d(e,t,n){return function(){for(var r=arguments.length,i=Array(r),o=0;o<r;o++)i[o]=arguments[o];t&&t.call.apply(t,[e].concat(i)),n&&n.call.apply(n,[e].concat(i))}}function f(e,t,n){return p(e,t.bind(null,n=n||(Array.isArray(e)?[]:{}))),n}function p(e,t,n){if(Array.isArray(e))return e.forEach(t,n);for(var r in e)g(e,r)&&t.call(n,e[r],r,e)}function h(e){return!!(e&&e.prototype&&e.prototype.isReactComponent)}function g(e,t){return!!e&&Object.prototype.hasOwnProperty.call(e,t)}t.__esModule=!0,t.version=void 0,t.customPropType=i,t.uncontrolledPropTypes=o,t.getType=a,t.getValue=s,t.getLinkName=u,t.defaultKey=c,t.chain=d,t.transform=f,t.each=p,t.isReactComponent=h,t.has=g;var m=n(106),v=r(m),b=n(330),y=(r(b),t.version=v["default"].version.split(".").map(parseFloat))},function(e,t,n){"use strict";var r=n(341)["default"],i=n(348)["default"],o=n(334)["default"],a=n(307)["default"],s=n(300)["default"];t.__esModule=!0;var l=n(385),u=s(l),c=n(106),d=s(c),f=n(137),p=s(f),h=n(335),g=s(h),m=n(306),v=s(m),b=n(459),y=s(b),w=n(305),x=s(w),_=n(304),E=s(_),C=function(e){function t(n){i(this,t),e.call(this,n),this.focusNext=this.focusNext.bind(this),this.focusPrevious=this.focusPrevious.bind(this),this.getFocusableMenuItems=this.getFocusableMenuItems.bind(this),this.getItemsAndActiveIndex=this.getItemsAndActiveIndex.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this)}return r(t,e),t.prototype.handleKeyDown=function(e){switch(e.keyCode){case u["default"].codes.down:this.focusNext(),e.preventDefault();break;case u["default"].codes.up:this.focusPrevious(),e.preventDefault();break;case u["default"].codes.esc:case u["default"].codes.tab:this.props.onClose(e)}},t.prototype.focusNext=function(){var e=this.getItemsAndActiveIndex(),t=e.items,n=e.activeItemIndex;if(0!==t.length)return n===t.length-1?void t[0].focus():void t[n+1].focus()},t.prototype.focusPrevious=function(){var e=this.getItemsAndActiveIndex(),t=e.items,n=e.activeItemIndex;return 0===n?void t[t.length-1].focus():void t[n-1].focus()},t.prototype.getItemsAndActiveIndex=function(){var e=this.getFocusableMenuItems(),t=document.activeElement,n=e.indexOf(t);return{items:e,activeItemIndex:n}},t.prototype.getFocusableMenuItems=function(){var e=p["default"].findDOMNode(this);return void 0===e?[]:[].slice.call(e.querySelectorAll('[tabIndex="-1"]'),0)},t.prototype.render=function(){var e,t=this,n=this.props,r=n.children,i=n.onSelect,s=n.pullRight,l=n.className,u=n.labelledBy,c=n.open,f=n.onClose,p=o(n,["children","onSelect","pullRight","className","labelledBy","open","onClose"]),h=x["default"].map(r,function(e){var n=e.props||{};return d["default"].cloneElement(e,{onKeyDown:E["default"](n.onKeyDown,t.handleKeyDown),onSelect:E["default"](n.onSelect,i)},n.children)}),m=(e={},e[v["default"].prefix(this.props,"menu")]=!0,e[v["default"].prefix(this.props,"menu-right")]=s,e),b=d["default"].createElement("ul",a({className:g["default"](l,m),role:"menu","aria-labelledby":u},p),h);return c&&(b=d["default"].createElement(y["default"],{noWrap:!0,onRootClose:f},b)),b},t}(d["default"].Component);C.defaultProps={bsRole:"menu",bsClass:"dropdown",pullRight:!1},C.propTypes={open:d["default"].PropTypes.bool,pullRight:d["default"].PropTypes.bool,onClose:d["default"].PropTypes.func,labelledBy:d["default"].PropTypes.oneOfType([d["default"].PropTypes.string,d["default"].PropTypes.number]),onSelect:d["default"].PropTypes.func},t["default"]=C,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function l(e){return 0===e.button}function u(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function c(){var e=_+"_"+E++;return{id:e,suppressRootClose:function(t){t.nativeEvent[e]=!0}}}Object.defineProperty(t,"__esModule",{value:!0});var d=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),f=n(106),p=r(f),h=n(137),g=r(h),m=n(460),v=r(m),b=n(462),y=r(b),w=n(463),x=r(w),_="__click_was_inside",E=0,C=function(e){function t(e){o(this,t);var n=a(this,Object.getPrototypeOf(t).call(this,e));n.handleDocumentMouse=n.handleDocumentMouse.bind(n),n.handleDocumentKeyUp=n.handleDocumentKeyUp.bind(n);var r=c(),i=r.id,s=r.suppressRootClose;return n._suppressRootId=i,n._suppressRootCloseHandler=s,n}return s(t,e),d(t,[{key:"bindRootCloseHandlers",value:function(){var e=(0,x["default"])(this);this._onDocumentMouseListener=(0,v["default"])(e,this.props.event,this.handleDocumentMouse),this._onDocumentKeyupListener=(0,v["default"])(e,"keyup",this.handleDocumentKeyUp)}},{key:"handleDocumentMouse",value:function(e){e[this._suppressRootId]||this.props.disabled||u(e)||!l(e)||this.props.onRootClose&&this.props.onRootClose()}},{key:"handleDocumentKeyUp",value:function(e){27===e.keyCode&&this.props.onRootClose&&this.props.onRootClose()}},{key:"unbindRootCloseHandlers",value:function(){this._onDocumentMouseListener&&this._onDocumentMouseListener.remove(),this._onDocumentKeyupListener&&this._onDocumentKeyupListener.remove()}},{key:"componentDidMount",value:function(){this.bindRootCloseHandlers()}},{key:"render",value:function(){var e=this.props,t=e.event,n=e.noWrap,r=e.children,o=p["default"].Children.only(r),a="click"==t?"onClick":"onMouseDown";return n?p["default"].cloneElement(o,i({},a,(0,y["default"])(this._suppressRootCloseHandler,o.props[a]))):p["default"].createElement("div",i({},a,this._suppressRootCloseHandler),o)}},{key:"getWrappedDOMNode",value:function(){var e=g["default"].findDOMNode(this);return this.props.noWrap?e:e.firstChild}},{key:"componentWillUnmount",value:function(){this.unbindRootCloseHandlers()}}]),t}(p["default"].Component);t["default"]=C,C.displayName="RootCloseWrapper",C.propTypes={onRootClose:p["default"].PropTypes.func,disabled:p["default"].PropTypes.bool,noWrap:p["default"].PropTypes.bool,event:p["default"].PropTypes.oneOf(["click","mousedown"])},C.defaultProps={event:"click"},e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=function(e,t,n){return(0,o["default"])(e,t,n),{remove:function(){(0,s["default"])(e,t,n)}}};var i=n(378),o=r(i),a=n(461),s=r(a);e.exports=t["default"]},function(e,t,n){"use strict";var r=n(377),i=function(){};r&&(i=function(){return document.addEventListener?function(e,t,n,r){return e.removeEventListener(t,n,r||!1)}:document.attachEvent?function(e,t,n){return e.detachEvent("on"+t,n)}:void 0}()),e.exports=i},function(e,t){"use strict";function n(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter(function(e){return null!=e}).reduce(function(e,t){if("function"!=typeof t)throw new Error("Invalid Argument Type, must only provide functions, undefined, or null.");return null===e?t:function(){for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];e.apply(this,r),t.apply(this,r)}},null)}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=n,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=function(e){return(0,s["default"])(o["default"].findDOMNode(e))};var i=n(137),o=r(i),a=n(383),s=r(a);e.exports=t["default"]},function(e,t,n){"use strict";var r=n(341)["default"],i=n(348)["default"],o=n(307)["default"],a=n(300)["default"];t.__esModule=!0;var s=n(106),l=a(s),u=n(335),c=a(u),d=n(349),f=a(d),p=n(340),h=a(p),g=l["default"].createElement("span",null," ",l["default"].createElement("span",{className:"caret"})),m=function(e){function t(){i(this,t),e.apply(this,arguments)}return r(t,e),t.prototype.render=function(){var e=this.props.noCaret?null:g,t={"dropdown-toggle":!0},n=this.props.useAnchor?h["default"]:f["default"];return l["default"].createElement(n,o({},this.props,{className:c["default"](t,this.props.className),type:"button","aria-haspopup":!0,"aria-expanded":this.props.open}),this.props.children||this.props.title,e)},t}(l["default"].Component);t["default"]=m,m.defaultProps={open:!1,useAnchor:!1,bsRole:"toggle"},m.propTypes={bsRole:l["default"].PropTypes.string,noCaret:l["default"].PropTypes.bool,open:l["default"].PropTypes.bool,title:l["default"].PropTypes.string,useAnchor:l["default"].PropTypes.bool},m.isToggle=!0,m.titleProp="title",m.onClickProp="onClick",e.exports=t["default"]},function(e,t,n){"use strict";var r=n(300)["default"];t.__esModule=!0;var i=n(351),o=n(466),a=r(o);t["default"]={requiredRoles:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return i.createChainableTypeChecker(function(e,n,r){var i=void 0,o=a["default"](e.children),s=function(e,t){return e===t.props.bsRole};if(t.every(function(e){return!!o.some(function(t){return s(e,t)})||(i=e,!1)}),i)return new Error("(children) "+r+" - Missing a required child with bsRole: "+i+". "+(r+" must have at least one child of each of the following bsRoles: "+t.join(", ")))})},exclusiveRoles:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return i.createChainableTypeChecker(function(e,n,r){var i=a["default"](e.children),o=void 0;if(t.every(function(e){var t=i.filter(function(t){return t.props.bsRole===e});return!(t.length>1)||(o=e,!1)}),o)return new Error("(children) "+r+" - Duplicate children detected of bsRole: "+o+". Only one child each allowed with the following bsRoles: "+t.join(", "))})}},e.exports=t["default"]},function(e,t,n){"use strict";function r(e){var t=[];return void 0===e?t:(a["default"].forEach(e,function(e){t.push(e)}),t)}var i=n(300)["default"];t.__esModule=!0,t["default"]=r;var o=n(305),a=i(o);e.exports=t["default"]},function(e,t,n){"use strict";var r=n(341)["default"],i=n(348)["default"],o=n(307)["default"],a=n(334)["default"],s=n(326)["default"],l=n(300)["default"];t.__esModule=!0;var u=n(106),c=l(u),d=n(381),f=l(d),p=n(439),h=l(p),g=n(468),m=l(g),v=n(349),b=l(v),y=function(e){function t(){i(this,t),e.apply(this,arguments)}return r(t,e),t.prototype.render=function(){var e=this.props,t=e.bsStyle,n=e.bsSize,r=e.disabled,i=this.props,l=i.title,u=i.children,d=a(i,["title","children"]),p=m["default"](d,s(f["default"].ControlledComponent.propTypes)),g=h["default"](d,s(f["default"].ControlledComponent.propTypes));return c["default"].createElement(f["default"],o({},p,{bsSize:n,bsStyle:t}),c["default"].createElement(f["default"].Toggle,o({},g,{disabled:r}),l),c["default"].createElement(f["default"].Menu,null,u))},t}(c["default"].Component);y.propTypes=o({disabled:c["default"].PropTypes.bool,bsStyle:b["default"].propTypes.bsStyle,bsSize:b["default"].propTypes.bsSize,noCaret:c["default"].PropTypes.bool,title:c["default"].PropTypes.node.isRequired},f["default"].propTypes),y.defaultProps={disabled:!1,pullRight:!1,dropup:!1,navItem:!1,noCaret:!1},t["default"]=y,e.exports=t["default"]},function(e,t,n){var r=n(448),i=n(433),o=n(450),a=n(451),s=n(453),l=s(function(e,t){return null==e?{}:"function"==typeof t[0]?a(e,i(t[0],t[1],3)):o(e,r(t))});e.exports=l},function(e,t,n){"use strict";var r=n(307)["default"],i=n(300)["default"];t.__esModule=!0;var o=n(106),a=i(o),s=n(335),l=i(s),u=n(350),c=i(u),d=a["default"].createClass({displayName:"Grid",propTypes:{fluid:a["default"].PropTypes.bool,componentClass:c["default"]},getDefaultProps:function(){return{componentClass:"div",fluid:!1}},render:function(){var e=this.props.componentClass,t=this.props.fluid?"container-fluid":"container";return a["default"].createElement(e,r({},this.props,{className:l["default"](this.props.className,t)}),this.props.children)}});t["default"]=d,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(307)["default"],i=n(300)["default"];t.__esModule=!0;var o=n(106),a=i(o),s=n(335),l=i(s),u=a["default"].createClass({displayName:"Image",propTypes:{responsive:a["default"].PropTypes.bool,rounded:a["default"].PropTypes.bool,circle:a["default"].PropTypes.bool,thumbnail:a["default"].PropTypes.bool},getDefaultProps:function(){return{responsive:!1,rounded:!1,circle:!1,thumbnail:!1}},render:function(){var e={"img-responsive":this.props.responsive,"img-rounded":this.props.rounded,"img-circle":this.props.circle,"img-thumbnail":this.props.thumbnail};return a["default"].createElement("img",r({},this.props,{className:l["default"](this.props.className,e)}))}});t["default"]=u,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(341)["default"],i=n(348)["default"],o=n(300)["default"],a=n(301)["default"];t.__esModule=!0;var s=n(106),l=o(s),u=n(356),c=o(u),d=n(472),f=a(d),p=n(380),h=o(p),g=function(e){function t(){i(this,t),e.apply(this,arguments)}return r(t,e),t.prototype.render=function(){return"static"===this.props.type?(h["default"]("Input type=static","FormControls.Static"),l["default"].createElement(f.Static,this.props)):e.prototype.render.call(this)},t}(c["default"]);g.propTypes={type:l["default"].PropTypes.string},t["default"]=g,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(300)["default"];t.__esModule=!0;var i=n(473),o=r(i);t.Static=o["default"]},function(e,t,n){"use strict";var r=n(341)["default"],i=n(348)["default"],o=n(334)["default"],a=n(307)["default"],s=n(300)["default"];t.__esModule=!0;var l=n(106),u=s(l),c=n(335),d=s(c),f=n(356),p=s(f),h=n(302),g=s(h),m=n(350),v=s(m),b=function(e){function t(){i(this,t),e.apply(this,arguments)}return r(t,e),t.prototype.getValue=function(){var e=this.props,t=e.children,n=e.value;return t?t:n},t.prototype.renderInput=function(){var e=this.props,t=e.componentClass,n=o(e,["componentClass"]);return u["default"].createElement(t,a({},n,{className:d["default"](n.className,"form-control-static"),ref:"input",key:"input"}),this.getValue())},t}(p["default"]);b.propTypes={value:g["default"],componentClass:v["default"],children:g["default"]},b.defaultProps={componentClass:"p"},t["default"]=b,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(307)["default"],i=n(300)["default"];t.__esModule=!0;var o=n(106),a=i(o),s=n(305),l=i(s),u=/\%\((.+?)\)s/,c=a["default"].createClass({displayName:"Interpolate",propTypes:{component:a["default"].PropTypes.node,format:a["default"].PropTypes.string,unsafe:a["default"].PropTypes.bool},getDefaultProps:function(){return{component:"span",unsafe:!1}},render:function(){var e=l["default"].hasValidComponent(this.props.children)||"string"==typeof this.props.children?this.props.children:this.props.format,t=this.props.component,n=this.props.unsafe===!0,i=r({},this.props);if(delete i.children,delete i.format,delete i.component,delete i.unsafe,n){var o=e.split(u).reduce(function(e,t,n){var r=void 0;if(n%2===0?r=t:(r=i[t],delete i[t]),a["default"].isValidElement(r))throw new Error("cannot interpolate a React component into unsafe text");return e+=r},"");return i.dangerouslySetInnerHTML={__html:o},a["default"].createElement(t,i)}var s=e.split(u).reduce(function(e,t,n){var r=void 0;if(n%2===0){if(0===t.length)return e;r=t}else r=i[t],delete i[t];return e.push(r),e},[]);return a["default"].createElement(t,i,s)}});t["default"]=c,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(307)["default"],i=n(300)["default"];t.__esModule=!0;var o=n(106),a=i(o),s=n(335),l=i(s),u=n(350),c=i(u),d=a["default"].createClass({displayName:"Jumbotron",propTypes:{componentClass:c["default"]},getDefaultProps:function(){return{componentClass:"div"}},render:function(){var e=this.props.componentClass;return a["default"].createElement(e,r({},this.props,{className:l["default"](this.props.className,"jumbotron")}),this.props.children)}});t["default"]=d,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(341)["default"],i=n(348)["default"],o=n(307)["default"],a=n(300)["default"];t.__esModule=!0;var s=n(106),l=a(s),u=n(335),c=a(u),d=n(306),f=a(d),p=n(323),h=function(e){function t(){i(this,n),e.apply(this,arguments)}r(t,e),t.prototype.render=function(){var e=f["default"].getClassSet(this.props);return l["default"].createElement("span",o({},this.props,{className:c["default"](this.props.className,e)}),this.props.children)};var n=t;return t=d.bsStyles(p.State.values().concat(p.DEFAULT,p.PRIMARY),p.DEFAULT)(t)||t,t=d.bsClass("label")(t)||t}(l["default"].Component);t["default"]=h,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(341)["default"],i=n(348)["default"],o=n(307)["default"],a=n(300)["default"];t.__esModule=!0;var s=n(106),l=a(s),u=n(478),c=a(u),d=n(335),f=a(d),p=n(305),h=a(p),g=function(e){function t(){i(this,t),e.apply(this,arguments)}return r(t,e),t.prototype.render=function(){var e=this,t=h["default"].map(this.props.children,function(e,t){return s.cloneElement(e,{key:e.key?e.key:t})});if(this.areCustomChildren(t)){var n=this.props.componentClass;return l["default"].createElement(n,o({},this.props,{className:f["default"](this.props.className,"list-group")}),t)}var r=!1;return this.props.children?h["default"].forEach(this.props.children,function(t){e.isAnchorOrButton(t.props)&&(r=!0)}):r=!0,r?this.renderDiv(t):this.renderUL(t)},t.prototype.isAnchorOrButton=function(e){return e.href||e.onClick},t.prototype.areCustomChildren=function(e){var t=!1;return h["default"].forEach(e,function(e){e.type!==c["default"]&&(t=!0)},this),t},t.prototype.renderUL=function(e){var t=h["default"].map(e,function(e){return s.cloneElement(e,{listItem:!0})});return l["default"].createElement("ul",o({},this.props,{className:f["default"](this.props.className,"list-group")}),t)},t.prototype.renderDiv=function(e){return l["default"].createElement("div",o({},this.props,{className:f["default"](this.props.className,"list-group")}),e)},t}(l["default"].Component);g.defaultProps={componentClass:"div"},g.propTypes={className:l["default"].PropTypes.string,componentClass:l["default"].PropTypes.oneOf(["ul","div"]),id:l["default"].PropTypes.oneOfType([l["default"].PropTypes.string,l["default"].PropTypes.number])},t["default"]=g,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(341)["default"],i=n(348)["default"],o=n(307)["default"],a=n(300)["default"];t.__esModule=!0;var s=n(106),l=a(s),u=n(306),c=a(u),d=n(323),f=n(335),p=a(f),h=function(e){function t(){i(this,t),e.apply(this,arguments)}return r(t,e),t.prototype.render=function(){var e=c["default"].getClassSet(this.props);return e.active=this.props.active,e.disabled=this.props.disabled,this.props.href?this.renderAnchor(e):this.props.onClick?this.renderButton(e):this.props.listItem?this.renderLi(e):this.renderSpan(e)},t.prototype.renderLi=function(e){return l["default"].createElement("li",o({},this.props,{className:p["default"](this.props.className,e)}),this.props.header?this.renderStructuredContent():this.props.children)},t.prototype.renderAnchor=function(e){return l["default"].createElement("a",o({},this.props,{className:p["default"](this.props.className,e)}),this.props.header?this.renderStructuredContent():this.props.children)},t.prototype.renderButton=function(e){return l["default"].createElement("button",o({type:"button"},this.props,{className:p["default"](this.props.className,e)}),this.props.header?this.renderStructuredContent():this.props.children)},t.prototype.renderSpan=function(e){return l["default"].createElement("span",o({},this.props,{className:p["default"](this.props.className,e)}),this.props.header?this.renderStructuredContent():this.props.children)},t.prototype.renderStructuredContent=function(){var e=void 0,t=c["default"].prefix(this.props,"heading");e=l["default"].isValidElement(this.props.header)?s.cloneElement(this.props.header,{key:"header",className:p["default"](this.props.header.props.className,t)}):l["default"].createElement("h4",{key:"header",
className:t},this.props.header);var n=l["default"].createElement("p",{key:"content",className:c["default"].prefix(this.props,"text")},this.props.children);return[e,n]},t}(l["default"].Component);h.propTypes={className:l["default"].PropTypes.string,active:l["default"].PropTypes.any,disabled:l["default"].PropTypes.any,header:l["default"].PropTypes.node,listItem:l["default"].PropTypes.bool,onClick:l["default"].PropTypes.func,eventKey:l["default"].PropTypes.any,href:l["default"].PropTypes.string,target:l["default"].PropTypes.string},h.defaultTypes={listItem:!1},t["default"]=u.bsStyles(d.State.values(),u.bsClass("list-group-item",h)),e.exports=t["default"]},function(e,t,n){"use strict";var r=n(341)["default"],i=n(348)["default"],o=n(334)["default"],a=n(307)["default"],s=n(300)["default"];t.__esModule=!0;var l=n(335),u=s(l),c=n(106),d=s(c),f=n(306),p=s(f),h=n(353),g=s(h),m=n(340),v=s(m),b=n(304),y=s(b),w=function(e){function t(n){i(this,t),e.call(this,n),this.handleClick=this.handleClick.bind(this)}return r(t,e),t.prototype.handleClick=function(e){this.props.href&&!this.props.disabled||e.preventDefault(),this.props.disabled||this.props.onSelect&&this.props.onSelect(e,this.props.eventKey)},t.prototype.render=function(){if(this.props.divider)return d["default"].createElement("li",{role:"separator",className:u["default"]("divider",this.props.className),style:this.props.style});if(this.props.header){var e=p["default"].prefix(this.props,"header");return d["default"].createElement("li",{role:"heading",className:u["default"](e,this.props.className),style:this.props.style},this.props.children)}var t=this.props,n=t.className,r=t.style,i=t.onClick,s=o(t,["className","style","onClick"]),l={disabled:this.props.disabled,active:this.props.active};return d["default"].createElement("li",{role:"presentation",className:u["default"](n,l),style:r},d["default"].createElement(v["default"],a({},s,{role:"menuitem",tabIndex:"-1",onClick:y["default"](i,this.handleClick)})))},t}(d["default"].Component);w.propTypes={active:d["default"].PropTypes.bool,disabled:d["default"].PropTypes.bool,divider:g["default"](d["default"].PropTypes.bool,function(e){if(e.divider&&e.children)return new Error("Children will not be rendered for dividers")}),eventKey:d["default"].PropTypes.any,header:d["default"].PropTypes.bool,href:d["default"].PropTypes.string,target:d["default"].PropTypes.string,title:d["default"].PropTypes.string,onClick:d["default"].PropTypes.func,onKeyDown:d["default"].PropTypes.func,onSelect:d["default"].PropTypes.func,id:d["default"].PropTypes.oneOfType([d["default"].PropTypes.string,d["default"].PropTypes.number])},w.defaultProps={divider:!1,disabled:!1,header:!1},t["default"]=f.bsClass("dropdown",w),e.exports=t["default"]},function(e,t,n){"use strict";var r=n(334)["default"],i=n(307)["default"],o=n(308)["default"],a=n(300)["default"];t.__esModule=!0;var s=n(106),l=a(s),u=n(350),c=a(u),d=n(335),f=a(d),p=n(481),h=a(p),g=n(482),m=a(g),v=n(483),b=a(v),y=n(484),w=a(y),x=n(485),_=a(x),E=n(486),C=a(E),k=l["default"].createClass({displayName:"Media",propTypes:{componentClass:c["default"]},getDefaultProps:function(){return{componentClass:"div"}},render:function(){var e=this.props,t=e.componentClass,n=e.className,o=r(e,["componentClass","className"]);return l["default"].createElement(t,i({},o,{className:f["default"](n,"media")}))}});k=o(k,{Heading:h["default"],Body:m["default"],Left:b["default"],Right:w["default"],List:_["default"],ListItem:C["default"]}),t["default"]=k,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(334)["default"],i=n(307)["default"],o=n(300)["default"];t.__esModule=!0;var a=n(106),s=o(a),l=n(350),u=o(l),c=n(335),d=o(c),f=s["default"].createClass({displayName:"Media.Heading",propTypes:{componentClass:u["default"]},getDefaultProps:function(){return{componentClass:"h4"}},render:function(){var e=this.props,t=e.componentClass,n=e.className,o=r(e,["componentClass","className"]);return s["default"].createElement(t,i({},o,{className:d["default"](n,"media-heading")}))}});t["default"]=f,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(334)["default"],i=n(307)["default"],o=n(300)["default"];t.__esModule=!0;var a=n(106),s=o(a),l=n(350),u=o(l),c=n(335),d=o(c),f=s["default"].createClass({displayName:"Media.Body",propTypes:{componentClass:u["default"]},getDefaultProps:function(){return{componentClass:"div"}},render:function(){var e=this.props,t=e.componentClass,n=e.className,o=r(e,["componentClass","className"]);return s["default"].createElement(t,i({},o,{className:d["default"](n,"media-body")}))}});t["default"]=f,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(334)["default"],i=n(307)["default"],o=n(300)["default"];t.__esModule=!0;var a=n(106),s=o(a),l=n(335),u=o(l),c=s["default"].createClass({displayName:"Media.Left",propTypes:{align:s["default"].PropTypes.oneOf(["top","middle","bottom"])},render:function(){var e,t=this.props,n=t.align,o=t.className,a=r(t,["align","className"]),l=u["default"](o,"media-left",(e={},e["media-"+n]=Boolean(n),e));return s["default"].createElement("div",i({},a,{className:l}))}});t["default"]=c,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(334)["default"],i=n(307)["default"],o=n(300)["default"];t.__esModule=!0;var a=n(106),s=o(a),l=n(335),u=o(l),c=s["default"].createClass({displayName:"Media.Right",propTypes:{align:s["default"].PropTypes.oneOf(["top","middle","bottom"])},render:function(){var e,t=this.props,n=t.align,o=t.className,a=r(t,["align","className"]),l=u["default"](o,"media-right",(e={},e["media-"+n]=Boolean(n),e));return s["default"].createElement("div",i({},a,{className:l}))}});t["default"]=c,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(334)["default"],i=n(307)["default"],o=n(300)["default"];t.__esModule=!0;var a=n(106),s=o(a),l=n(335),u=o(l),c=s["default"].createClass({displayName:"Media.List",render:function(){var e=this.props,t=e.className,n=r(e,["className"]);return s["default"].createElement("ul",i({},n,{className:u["default"](t,"media-list")}))}});t["default"]=c,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(334)["default"],i=n(307)["default"],o=n(300)["default"];t.__esModule=!0;var a=n(106),s=o(a),l=n(335),u=o(l),c=s["default"].createClass({displayName:"Media.ListItem",render:function(){var e=this.props,t=e.className,n=r(e,["className"]);return s["default"].createElement("li",i({},n,{className:u["default"](t,"media")}))}});t["default"]=c,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(307)["default"],i=n(334)["default"],o=n(326)["default"],a=n(300)["default"];t.__esModule=!0;var s=n(335),l=a(s),u=n(106),c=a(u),d=n(137),f=a(d),p=n(306),h=a(p),g=n(323),m=n(488),v=a(m),b=n(377),y=a(b),w=n(383),x=a(w),_=n(489),E=a(_),C=n(350),k=a(C),S=n(492),A=a(S),T=n(493),D=a(T),N=n(494),F=a(N),M=n(495),O=a(M),L=n(496),P=a(L),I=n(497),R=a(I),B=n(498),j=a(B),$=n(510),V=a($),U=n(468),W=a(U),q=c["default"].createClass({displayName:"Modal",propTypes:r({},j["default"].propTypes,D["default"].propTypes,{backdrop:c["default"].PropTypes.oneOf(["static",!0,!1]),keyboard:c["default"].PropTypes.bool,animation:c["default"].PropTypes.bool,dialogComponent:k["default"],autoFocus:c["default"].PropTypes.bool,enforceFocus:c["default"].PropTypes.bool,bsStyle:c["default"].PropTypes.string,show:c["default"].PropTypes.bool,onHide:c["default"].PropTypes.func,onEnter:c["default"].PropTypes.func,onEntering:c["default"].PropTypes.func,onEntered:c["default"].PropTypes.func,onExit:c["default"].PropTypes.func,onExiting:c["default"].PropTypes.func,onExited:c["default"].PropTypes.func}),childContextTypes:{$bs_onModalHide:c["default"].PropTypes.func},getDefaultProps:function(){return r({},j["default"].defaultProps,{bsClass:"modal",animation:!0,dialogComponent:D["default"]})},getInitialState:function(){return{modalStyles:{}}},getChildContext:function(){return{$bs_onModalHide:this.props.onHide}},componentWillUnmount:function(){E["default"].off(window,"resize",this.handleWindowResize)},render:function(){var e=this,t=this.props,n=t.className,a=(t.children,t.dialogClassName),s=t.animation,u=i(t,["className","children","dialogClassName","animation"]),d=this.state.modalStyles,f={"in":u.show&&!s},p=u.dialogComponent,g=W["default"](u,o(j["default"].propTypes).concat(["onExit","onExiting","onEnter","onEntered"])),m=c["default"].createElement(p,r({key:"modal",ref:function(t){return e._modal=t}},u,{style:d,className:l["default"](n,f),dialogClassName:a,onClick:u.backdrop===!0?this.handleDialogClick:null}),this.props.children);return c["default"].createElement(j["default"],r({},g,{show:u.show,ref:function(t){e._wrapper=t&&t.refs.modal,e._backdrop=t&&t.refs.backdrop},onEntering:this._onShow,onExited:this._onHide,backdropClassName:l["default"](h["default"].prefix(u,"backdrop"),f),containerClassName:h["default"].prefix(u,"open"),transition:s?A["default"]:void 0,dialogTransitionTimeout:q.TRANSITION_DURATION,backdropTransitionTimeout:q.BACKDROP_TRANSITION_DURATION}),m)},_onShow:function(){if(E["default"].on(window,"resize",this.handleWindowResize),this.setState(this._getStyles()),this.props.onEntering){var e;(e=this.props).onEntering.apply(e,arguments)}},_onHide:function(){if(E["default"].off(window,"resize",this.handleWindowResize),this.props.onExited){var e;(e=this.props).onExited.apply(e,arguments)}},handleDialogClick:function(e){e.target===e.currentTarget&&this.props.onHide()},handleWindowResize:function(){this.setState(this._getStyles())},_getStyles:function(){if(!y["default"])return{};var e=f["default"].findDOMNode(this._modal),t=x["default"](e),n=e.scrollHeight,r=V["default"](f["default"].findDOMNode(this.props.container||t.body)),i=n>t.documentElement.clientHeight;return{modalStyles:{paddingRight:r&&!i?v["default"]():void 0,paddingLeft:!r&&i?v["default"]():void 0}}}});q.Body=F["default"],q.Header=O["default"],q.Title=P["default"],q.Footer=R["default"],q.Dialog=D["default"],q.TRANSITION_DURATION=300,q.BACKDROP_TRANSITION_DURATION=150,t["default"]=p.bsSizes([g.Sizes.LARGE,g.Sizes.SMALL],p.bsClass("modal",q)),e.exports=t["default"]},function(e,t,n){"use strict";var r,i=n(377);e.exports=function(e){if((!r||e)&&i){var t=document.createElement("div");t.style.position="absolute",t.style.top="-9999px",t.style.width="50px",t.style.height="50px",t.style.overflow="scroll",document.body.appendChild(t),r=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return r}},function(e,t,n){"use strict";var r=n(378),i=n(461),o=n(490);e.exports={on:r,off:i,filter:o}},function(e,t,n){"use strict";var r=n(384),i=n(491);e.exports=function(e,t){return function(n){var o=n.currentTarget,a=n.target,s=i(o,e);s.some(function(e){return r(e,a)})&&t.call(this,n)}}},function(e,t){"use strict";var n=/^[\w-]*$/,r=Function.prototype.bind.call(Function.prototype.call,[].slice);e.exports=function(e,t){var i,o="#"===t[0],a="."===t[0],s=o||a?t.slice(1):t,l=n.test(s);return l?o?(e=e.getElementById?e:document,(i=e.getElementById(s))?[i]:[]):r(e.getElementsByClassName&&a?e.getElementsByClassName(s):e.getElementsByTagName(t)):r(e.querySelectorAll(t))}},function(e,t,n){"use strict";var r=n(341)["default"],i=n(348)["default"],o=n(307)["default"],a=n(300)["default"];t.__esModule=!0;var s=n(106),l=a(s),u=n(335),c=a(u),d=n(375),f=a(d),p=n(379),h=a(p),g=function(e){function t(){i(this,t),e.apply(this,arguments)}return r(t,e),t.prototype.render=function(){var e=this.props.timeout||this.props.duration;return l["default"].createElement(f["default"],o({},this.props,{timeout:e,className:c["default"](this.props.className,"fade"),enteredClassName:"in",enteringClassName:"in"}),this.props.children)},t}(l["default"].Component);g.propTypes={"in":l["default"].PropTypes.bool,unmountOnExit:l["default"].PropTypes.bool,transitionAppear:l["default"].PropTypes.bool,timeout:l["default"].PropTypes.number,duration:h["default"](l["default"].PropTypes.number,"Use `timeout`."),onEnter:l["default"].PropTypes.func,onEntering:l["default"].PropTypes.func,onEntered:l["default"].PropTypes.func,onExit:l["default"].PropTypes.func,onExiting:l["default"].PropTypes.func,onExited:l["default"].PropTypes.func},g.defaultProps={"in":!1,timeout:300,unmountOnExit:!1,transitionAppear:!1},t["default"]=g,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(307)["default"],i=n(300)["default"];t.__esModule=!0;var o=n(106),a=i(o),s=n(335),l=i(s),u=n(306),c=i(u),d=n(323),f=a["default"].createClass({displayName:"ModalDialog",propTypes:{dialogClassName:a["default"].PropTypes.string},render:function(){var e=r({display:"block"},this.props.style),t=c["default"].prefix(this.props),n=c["default"].getClassSet(this.props);return delete n[t],n[c["default"].prefix(this.props,"dialog")]=!0,a["default"].createElement("div",r({},this.props,{title:null,tabIndex:"-1",role:"dialog",style:e,className:l["default"](this.props.className,t)}),a["default"].createElement("div",{className:l["default"](this.props.dialogClassName,n)},a["default"].createElement("div",{className:c["default"].prefix(this.props,"content"),role:"document"},this.props.children)))}});t["default"]=u.bsSizes([d.Sizes.LARGE,d.Sizes.SMALL],u.bsClass("modal",f)),e.exports=t["default"]},function(e,t,n){"use strict";var r=n(341)["default"],i=n(348)["default"],o=n(307)["default"],a=n(300)["default"];t.__esModule=!0;var s=n(106),l=a(s),u=n(335),c=a(u),d=n(306),f=a(d),p=function(e){function t(){i(this,t),e.apply(this,arguments)}return r(t,e),t.prototype.render=function(){return l["default"].createElement("div",o({},this.props,{className:c["default"](this.props.className,f["default"].prefix(this.props,"body"))}),this.props.children)},t}(l["default"].Component);t["default"]=d.bsClass("modal",p),e.exports=t["default"]},function(e,t,n){"use strict";var r=n(341)["default"],i=n(348)["default"],o=n(334)["default"],a=n(307)["default"],s=n(300)["default"];t.__esModule=!0;var l=n(106),u=s(l),c=n(335),d=s(c),f=n(306),p=s(f),h=n(304),g=s(h),m=function(e){function t(){i(this,t),e.apply(this,arguments)}return r(t,e),t.prototype.render=function(){var e=this.props,t=e["aria-label"],n=o(e,["aria-label"]),r=g["default"](this.context.$bs_onModalHide,this.props.onHide);return u["default"].createElement("div",a({},n,{className:d["default"](this.props.className,p["default"].prefix(this.props,"header"))}),this.props.closeButton&&u["default"].createElement("button",{type:"button",className:"close","aria-label":t,onClick:r},u["default"].createElement("span",{"aria-hidden":"true"},"×")),this.props.children)},t}(u["default"].Component);m.propTypes={"aria-label":u["default"].PropTypes.string,bsClass:u["default"].PropTypes.string,closeButton:u["default"].PropTypes.bool,onHide:u["default"].PropTypes.func},m.contextTypes={$bs_onModalHide:u["default"].PropTypes.func},m.defaultProps={"aria-label":"Close",closeButton:!1},t["default"]=f.bsClass("modal",m),e.exports=t["default"]},function(e,t,n){"use strict";var r=n(341)["default"],i=n(348)["default"],o=n(307)["default"],a=n(300)["default"];t.__esModule=!0;var s=n(106),l=a(s),u=n(335),c=a(u),d=n(306),f=a(d),p=function(e){function t(){i(this,t),e.apply(this,arguments)}return r(t,e),t.prototype.render=function(){return l["default"].createElement("h4",o({},this.props,{className:c["default"](this.props.className,f["default"].prefix(this.props,"title"))}),this.props.children)},t}(l["default"].Component);t["default"]=d.bsClass("modal",p),e.exports=t["default"]},function(e,t,n){"use strict";var r=n(341)["default"],i=n(348)["default"],o=n(307)["default"],a=n(300)["default"];t.__esModule=!0;var s=n(106),l=a(s),u=n(335),c=a(u),d=n(306),f=a(d),p=function(e){function t(){i(this,t),e.apply(this,arguments)}return r(t,e),t.prototype.render=function(){return l["default"].createElement("div",o({},this.props,{className:c["default"](this.props.className,f["default"].prefix(this.props,"footer"))}),this.props.children)},t}(l["default"].Component);p.propTypes={bsClass:l["default"].PropTypes.string},p.defaultProps={bsClass:"modal"},t["default"]=d.bsClass("modal",p),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=n(106),a=r(o),s=n(499),l=r(s),u=n(500),c=r(u),d=n(502),f=r(d),p=n(503),h=r(p),g=n(505),m=r(g),v=n(463),b=r(v),y=n(460),w=r(y),x=n(513),_=r(x),E=n(377),C=r(E),k=n(382),S=r(k),A=n(384),T=r(A),D=n(504),N=r(D),F=new m["default"],M=a["default"].createClass({displayName:"Modal",propTypes:i({},h["default"].propTypes,{show:a["default"].PropTypes.bool,container:a["default"].PropTypes.oneOfType([c["default"],a["default"].PropTypes.func]),onShow:a["default"].PropTypes.func,onHide:a["default"].PropTypes.func,backdrop:a["default"].PropTypes.oneOfType([a["default"].PropTypes.bool,a["default"].PropTypes.oneOf(["static"])]),onEscapeKeyUp:a["default"].PropTypes.func,onBackdropClick:a["default"].PropTypes.func,backdropStyle:a["default"].PropTypes.object,backdropClassName:a["default"].PropTypes.string,containerClassName:a["default"].PropTypes.string,keyboard:a["default"].PropTypes.bool,transition:f["default"],dialogTransitionTimeout:a["default"].PropTypes.number,backdropTransitionTimeout:a["default"].PropTypes.number,autoFocus:a["default"].PropTypes.bool,enforceFocus:a["default"].PropTypes.bool,onEnter:a["default"].PropTypes.func,onEntering:a["default"].PropTypes.func,onEntered:a["default"].PropTypes.func,onExit:a["default"].PropTypes.func,onExiting:a["default"].PropTypes.func,onExited:a["default"].PropTypes.func}),getDefaultProps:function(){var e=function(){};return{show:!1,backdrop:!0,keyboard:!0,autoFocus:!0,enforceFocus:!0,onHide:e}},getInitialState:function(){return{exited:!this.props.show}},render:function(){var e=this.props,t=e.show,n=e.container,r=e.children,i=e.transition,s=e.backdrop,l=e.dialogTransitionTimeout,u=e.className,c=e.style,d=e.onExit,f=e.onExiting,p=e.onEnter,g=e.onEntering,m=e.onEntered,v=a["default"].Children.only(r),b=t||i&&!this.state.exited;if(!b)return null;var y=v.props,w=y.role,x=y.tabIndex;return void 0!==w&&void 0!==x||(v=(0,o.cloneElement)(v,{role:void 0===w?"document":w,tabIndex:null==x?"-1":x})),i&&(v=a["default"].createElement(i,{transitionAppear:!0,unmountOnExit:!0,"in":t,timeout:l,onExit:d,onExiting:f,onExited:this.handleHidden,onEnter:p,onEntering:g,onEntered:m},v)),a["default"].createElement(h["default"],{ref:this.setMountNode,container:n},a["default"].createElement("div",{ref:"modal",role:w||"dialog",style:c,className:u},s&&this.renderBackdrop(),v))},renderBackdrop:function(){var e=this.props,t=e.transition,n=e.backdropTransitionTimeout,r=a["default"].createElement("div",{ref:"backdrop",style:this.props.backdropStyle,className:this.props.backdropClassName,onClick:this.handleBackdropClick});return t&&(r=a["default"].createElement(t,{transitionAppear:!0,"in":this.props.show,timeout:n},r)),r},componentWillReceiveProps:function(e){e.show?this.setState({exited:!1}):e.transition||this.setState({exited:!0})},componentWillUpdate:function(e){!this.props.show&&e.show&&this.checkForFocus()},componentDidMount:function(){this.props.show&&this.onShow()},componentDidUpdate:function(e){var t=this.props.transition;!e.show||this.props.show||t?!e.show&&this.props.show&&this.onShow():this.onHide()},componentWillUnmount:function(){var e=this.props,t=e.show,n=e.transition;(t||n&&!this.state.exited)&&this.onHide()},onShow:function(){var e=(0,b["default"])(this),t=(0,N["default"])(this.props.container,e.body);F.add(this,t,this.props.containerClassName),this._onDocumentKeyupListener=(0,w["default"])(e,"keyup",this.handleDocumentKeyUp),this._onFocusinListener=(0,_["default"])(this.enforceFocus),this.focus(),this.props.onShow&&this.props.onShow()},onHide:function(){F.remove(this),this._onDocumentKeyupListener.remove(),this._onFocusinListener.remove(),this.restoreLastFocus()},setMountNode:function(e){this.mountNode=e?e.getMountNode():e},handleHidden:function(){if(this.setState({exited:!0}),this.onHide(),this.props.onExited){var e;(e=this.props).onExited.apply(e,arguments)}},handleBackdropClick:function(e){e.target===e.currentTarget&&(this.props.onBackdropClick&&this.props.onBackdropClick(e),this.props.backdrop===!0&&this.props.onHide())},handleDocumentKeyUp:function(e){this.props.keyboard&&27===e.keyCode&&this.isTopModal()&&(this.props.onEscapeKeyUp&&this.props.onEscapeKeyUp(e),this.props.onHide())},checkForFocus:function(){C["default"]&&(this.lastFocus=(0,S["default"])())},focus:function(){var e=this.props.autoFocus,t=this.getDialogElement(),n=(0,S["default"])((0,b["default"])(this)),r=n&&(0,T["default"])(t,n);t&&e&&!r&&(this.lastFocus=n,t.hasAttribute("tabIndex")||(t.setAttribute("tabIndex",-1),(0,l["default"])(!1,'The modal content node does not accept focus. For the benefit of assistive technologies, the tabIndex of the node is being set to "-1".')),t.focus())},restoreLastFocus:function(){this.lastFocus&&this.lastFocus.focus&&(this.lastFocus.focus(),this.lastFocus=null)},enforceFocus:function O(){var O=this.props.enforceFocus;if(O&&this.isMounted()&&this.isTopModal()){var e=(0,S["default"])((0,b["default"])(this)),t=this.getDialogElement();t&&t!==e&&!(0,T["default"])(t,e)&&t.focus()}},getDialogElement:function(){var e=this.refs.modal;return e&&e.lastChild},isTopModal:function(){return F.isTopModal(this)}});M.manager=F,t["default"]=M,e.exports=t["default"]},331,function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t,n,r,i){var a=e[t],l="undefined"==typeof a?"undefined":o(a);return s["default"].isValidElement(a)?new Error("Invalid "+r+" `"+i+"` of type ReactElement "+("supplied to `"+n+"`, expected a ReactComponent or a ")+"DOMElement. You can usually obtain a ReactComponent or DOMElement from a ReactElement by attaching a ref to it."):"object"===l&&"function"==typeof a.render||1===a.nodeType?null:new Error("Invalid "+r+" `"+i+"` of value `"+a+"` "+("supplied to `"+n+"`, expected a ReactComponent or a ")+"DOMElement.")}t.__esModule=!0;var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},a=n(106),s=r(a),l=n(501),u=r(l);t["default"]=(0,u["default"])(i)},function(e,t){"use strict";function n(e){function t(t,n,r,i,o,a){var s=i||"<<anonymous>>",l=a||r;if(null==n[r])return t?new Error("Required "+o+" `"+l+"` was not specified "+("in `"+s+"`.")):null;for(var u=arguments.length,c=Array(u>6?u-6:0),d=6;d<u;d++)c[d-6]=arguments[d];return e.apply(void 0,[n,r,s,o,l].concat(c))}var n=t.bind(null,!1);return n.isRequired=t.bind(null,!0),n}t.__esModule=!0,t["default"]=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t,n,r,i){var a=e[t],l="undefined"==typeof a?"undefined":o(a);return s["default"].isValidElement(a)?new Error("Invalid "+r+" `"+i+"` of type ReactElement "+("supplied to `"+n+"`, expected an element type (a string ")+"or a ReactClass)."):"function"!==l&&"string"!==l?new Error("Invalid "+r+" `"+i+"` of value `"+a+"` "+("supplied to `"+n+"`, expected an element type (a string ")+"or a ReactClass)."):null}t.__esModule=!0;var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},a=n(106),s=r(a),l=n(501),u=r(l);t["default"]=(0,u["default"])(i)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(106),o=r(i),a=n(137),s=r(a),l=n(500),u=r(l),c=n(463),d=r(c),f=n(504),p=r(f),h=o["default"].createClass({displayName:"Portal",propTypes:{container:o["default"].PropTypes.oneOfType([u["default"],o["default"].PropTypes.func])},componentDidMount:function(){this._renderOverlay()},componentDidUpdate:function(){this._renderOverlay()},componentWillReceiveProps:function(e){this._overlayTarget&&e.container!==this.props.container&&(this._portalContainerNode.removeChild(this._overlayTarget),this._portalContainerNode=(0,p["default"])(e.container,(0,d["default"])(this).body),this._portalContainerNode.appendChild(this._overlayTarget))},componentWillUnmount:function(){this._unrenderOverlay(),this._unmountOverlayTarget()},_mountOverlayTarget:function(){this._overlayTarget||(this._overlayTarget=document.createElement("div"),this._portalContainerNode=(0,p["default"])(this.props.container,(0,d["default"])(this).body),this._portalContainerNode.appendChild(this._overlayTarget))},_unmountOverlayTarget:function(){this._overlayTarget&&(this._portalContainerNode.removeChild(this._overlayTarget),this._overlayTarget=null),this._portalContainerNode=null},_renderOverlay:function(){var e=this.props.children?o["default"].Children.only(this.props.children):null;null!==e?(this._mountOverlayTarget(),this._overlayInstance=s["default"].unstable_renderSubtreeIntoContainer(this,e,this._overlayTarget)):(this._unrenderOverlay(),this._unmountOverlayTarget())},_unrenderOverlay:function(){this._overlayTarget&&(s["default"].unmountComponentAtNode(this._overlayTarget),this._overlayInstance=null)},render:function(){return null},getMountNode:function(){return this._overlayTarget},getOverlayDOMNode:function(){if(!this.isMounted())throw new Error("getOverlayDOMNode(): A component must be mounted to have a DOM node.");return this._overlayInstance?this._overlayInstance.getWrappedDOMNode?this._overlayInstance.getWrappedDOMNode():s["default"].findDOMNode(this._overlayInstance):null}});t["default"]=h,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){return e="function"==typeof e?e():e,a["default"].findDOMNode(e)||t}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=i;var o=n(137),a=r(o);e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){var n=-1;return e.some(function(e,r){if(t(e,r))return n=r,!0}),n}function a(e,t){return o(e,function(e){return e.modals.indexOf(t)!==-1})}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(367),u=r(l),c=n(506),d=r(c),f=n(488),p=r(f),h=n(510),g=r(h),m=n(512),v=function(){function e(){var t=arguments.length<=0||void 0===arguments[0]||arguments[0];i(this,e),this.hideSiblingNodes=t,this.modals=[],this.containers=[],this.data=[]}return s(e,[{key:"add",value:function(e,t,n){var r=this.modals.indexOf(e),i=this.containers.indexOf(t);if(r!==-1)return r;if(r=this.modals.length,this.modals.push(e),this.hideSiblingNodes&&(0,m.hideSiblings)(t,e.mountNode),i!==-1)return this.data[i].modals.push(e),r;var o={modals:[e],classes:n?n.split(/\s+/):[],style:{overflow:t.style.overflow,paddingRight:t.style.paddingRight}},a={overflow:"hidden"};return o.overflowing=(0,g["default"])(t),o.overflowing&&(a.paddingRight=parseInt((0,u["default"])(t,"paddingRight")||0,10)+(0,p["default"])()+"px"),(0,u["default"])(t,a),o.classes.forEach(d["default"].addClass.bind(null,t)),this.containers.push(t),this.data.push(o),r}},{key:"remove",value:function(e){var t=this.modals.indexOf(e);if(t!==-1){var n=a(this.data,e),r=this.data[n],i=this.containers[n];r.modals.splice(r.modals.indexOf(e),1),this.modals.splice(t,1),0===r.modals.length?(Object.keys(r.style).forEach(function(e){return i.style[e]=r.style[e]}),r.classes.forEach(d["default"].removeClass.bind(null,i)),this.hideSiblingNodes&&(0,m.showSiblings)(i,e.mountNode),this.containers.splice(n,1),this.data.splice(n,1)):this.hideSiblingNodes&&(0,m.ariaHidden)(!1,r.modals[r.modals.length-1].mountNode)}}},{key:"isTopModal",value:function(e){return!!this.modals.length&&this.modals[this.modals.length-1]===e}}]),e}();t["default"]=v,e.exports=t["default"]},function(e,t,n){"use strict";e.exports={addClass:n(507),removeClass:n(509),hasClass:n(508)}},function(e,t,n){"use strict";var r=n(508);e.exports=function(e,t){e.classList?e.classList.add(t):r(e)||(e.className=e.className+" "+t)}},function(e,t){"use strict";e.exports=function(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+e.className+" ").indexOf(" "+t+" ")!==-1}},function(e,t){"use strict";e.exports=function(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){return e&&"body"===e.tagName.toLowerCase()}function o(e){var t=(0,c["default"])(e),n=(0,l["default"])(t),r=n.innerWidth;if(!r){var i=t.documentElement.getBoundingClientRect();r=i.right-Math.abs(i.left)}return t.body.clientWidth<r}function a(e){var t=(0,l["default"])(e);return t||i(e)?o(e):e.scrollHeight>e.clientHeight}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=a;var s=n(511),l=r(s),u=n(383),c=r(u);e.exports=t["default"]},function(e,t){"use strict";e.exports=function(e){return e===e.window?e:9===e.nodeType&&(e.defaultView||e.parentWindow)}},function(e,t){"use strict";function n(e,t){t&&(e?t.setAttribute("aria-hidden","true"):t.removeAttribute("aria-hidden"))}function r(e,t){s(e,t,function(e){return n(!0,e)})}function i(e,t){s(e,t,function(e){return n(!1,e)})}Object.defineProperty(t,"__esModule",{value:!0}),t.ariaHidden=n,t.hideSiblings=r,t.showSiblings=i;var o=["template","script","style"],a=function(e){var t=e.nodeType,n=e.tagName;return 1===t&&o.indexOf(n.toLowerCase())===-1},s=function(e,t,n){t=[].concat(t),[].forEach.call(e.children,function(e){t.indexOf(e)===-1&&a(e)&&n(e)})}},function(e,t){"use strict";function n(e){var t=!document.addEventListener,n=void 0;return t?(document.attachEvent("onfocusin",e),n=function(){return document.detachEvent("onfocusin",e)}):(document.addEventListener("focus",e,!0),n=function(){return document.removeEventListener("focus",e,!0)}),{remove:n}}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=n,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(341)["default"],i=n(348)["default"],o=n(307)["default"],a=n(300)["default"];t.__esModule=!0;var s=n(106),l=a(s),u=n(335),c=a(u),d=n(353),f=a(d),p=n(379),h=a(p),g=n(306),m=a(g),v=n(305),b=a(v),y=n(304),w=a(y),x=n(366),_=a(x),E=function(e){function t(){i(this,t),e.apply(this,arguments)}return r(t,e),t.prototype.render=function(){var e=this.props,t=e.className,n=e.ulClassName,r=e.id,i=e.ulId,a=null!=this.props.navbar?this.props.navbar:this.context.$bs_navbar,s=m["default"].getClassSet(this.props);if(s[m["default"].prefix(this.props,"stacked")]=this.props.stacked,s[m["default"].prefix(this.props,"justified")]=this.props.justified,a){var u=this.context.$bs_navbar_bsClass||"navbar",d=null!=this.props.right?this.props.right:this.props.pullRight;s[m["default"].prefix({bsClass:u},"nav")]=!0,s[m["default"].prefix({bsClass:u},"right")]=d,s[m["default"].prefix({bsClass:u},"left")]=this.props.pullLeft}else s["pull-right"]=this.props.pullRight,s["pull-left"]=this.props.pullLeft;var f=l["default"].createElement("ul",o({ref:"ul"},this.props,{id:i||r,role:"tabs"===this.props.bsStyle?"tablist":null,className:c["default"](t,n,s)}),b["default"].map(this.props.children,this.renderNavItem,this));return this.context.$bs_deprecated_navbar&&this.props.collapsible&&(f=l["default"].createElement(_["default"],{"in":this.props.expanded,className:a?"navbar-collapse":void 0},l["default"].createElement("div",null,f))),f},t.prototype.getChildActiveProp=function(e){return!!e.props.active||(null!=this.props.activeKey&&e.props.eventKey===this.props.activeKey||(null!=this.props.activeHref&&e.props.href===this.props.activeHref||e.props.active));
},t.prototype.renderNavItem=function(e,t){return s.cloneElement(e,{role:"tabs"===this.props.bsStyle?"tab":null,active:this.getChildActiveProp(e),activeKey:this.props.activeKey,activeHref:this.props.activeHref,onSelect:w["default"](e.props.onSelect,this.props.onSelect),key:e.key?e.key:t,navItem:!0})},t}(l["default"].Component);E.propTypes={activeHref:l["default"].PropTypes.string,activeKey:l["default"].PropTypes.any,stacked:l["default"].PropTypes.bool,justified:f["default"](l["default"].PropTypes.bool,function(e){var t=e.justified,n=e.navbar;return t&&n?Error("justified navbar `Nav`s are not supported"):null}),onSelect:l["default"].PropTypes.func,className:l["default"].PropTypes.string,id:l["default"].PropTypes.oneOfType([l["default"].PropTypes.string,l["default"].PropTypes.number]),ulClassName:h["default"](l["default"].PropTypes.string,"The wrapping `<nav>` has been removed you can use `className` now"),ulId:h["default"](l["default"].PropTypes.string,"The wrapping `<nav>` has been removed you can use `id` now"),navbar:l["default"].PropTypes.bool,eventKey:l["default"].PropTypes.any,pullRight:l["default"].PropTypes.bool,pullLeft:l["default"].PropTypes.bool,right:h["default"](l["default"].PropTypes.bool,"Use the `pullRight` prop instead"),expanded:l["default"].PropTypes.bool,collapsible:h["default"](l["default"].PropTypes.bool,"Use `Navbar.Collapse` instead, to create collapsible Navbars")},E.contextTypes={$bs_navbar:l["default"].PropTypes.bool,$bs_navbar_bsClass:l["default"].PropTypes.string,$bs_deprecated_navbar:l["default"].PropTypes.bool},E.defaultProps={justified:!1,pullRight:!1,pullLeft:!1,stacked:!1},t["default"]=g.bsClass("nav",g.bsStyles(["tabs","pills"],E)),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){var t=e.props;return R(t,"brand")||R(t,"toggleButton")||R(t,"toggleNavKey")||R(t,"navExpanded")||R(t,"defaultNavExpanded")||x["default"].findValidComponents(t.children,function(e){return"brand"===e.props.bsRole}).length>0}function i(e,t,n){var r=function(e,n){var r,i=e.componentClass,s=e.className,l=o(e,["componentClass","className"]),c=n.$bs_navbar_bsClass,d=void 0===c?"navbar":c;return u["default"].createElement(i,a({},l,{className:p["default"](s,P["default"].prefix({bsClass:d},t),(r={},r[P["default"].prefix({bsClass:d},"right")]=l.pullRight,r[P["default"].prefix({bsClass:d},"left")]=l.pullLeft,r))}))};return r.displayName=n,r.propTypes={componentClass:g["default"],pullRight:u["default"].PropTypes.bool,pullLeft:u["default"].PropTypes.bool},r.defaultProps={componentClass:e,pullRight:!1,pullLeft:!1},r.contextTypes={$bs_navbar_bsClass:l.PropTypes.string},r}var o=n(334)["default"],a=n(307)["default"],s=n(300)["default"];t.__esModule=!0;var l=n(106),u=s(l),c=n(455),d=s(c),f=n(335),p=s(f),h=n(350),g=s(h),m=n(379),v=s(m),b=n(380),y=s(b),w=n(305),x=s(w),_=n(469),E=s(_),C=n(516),k=s(C),S=n(518),A=s(S),T=n(519),D=s(T),N=n(520),F=s(N),M=n(521),O=s(M),L=n(306),P=s(L),I=n(323),R=function(e,t){return e&&{}.hasOwnProperty.call(e,t)},B=u["default"].createClass({displayName:"Navbar",propTypes:{fixedTop:u["default"].PropTypes.bool,fixedBottom:u["default"].PropTypes.bool,staticTop:u["default"].PropTypes.bool,inverse:u["default"].PropTypes.bool,fluid:u["default"].PropTypes.bool,componentClass:g["default"],onToggle:u["default"].PropTypes.func,expanded:u["default"].PropTypes.bool,navExpanded:v["default"](u["default"].PropTypes.bool,"Use `expanded` and `defaultExpanded` instead.")},childContextTypes:{$bs_navbar:l.PropTypes.bool,$bs_navbar_bsClass:l.PropTypes.string,$bs_navbar_onToggle:l.PropTypes.func,$bs_navbar_expanded:l.PropTypes.bool},getDefaultProps:function(){return{componentClass:"nav",fixedTop:!1,fixedBottom:!1,staticTop:!1,inverse:!1,fluid:!1}},getChildContext:function(){return{$bs_navbar:!0,$bs_navbar_bsClass:this.props.bsClass,$bs_navbar_onToggle:this.handleToggle,$bs_navbar_expanded:this.props.expanded}},handleToggle:function(){this.props.onToggle(!this.props.expanded)},isNavExpanded:function(){return!!this.props.expanded},render:function(){if(r(this))return y["default"]({message:"Rendering a deprecated version of the Navbar due to the use of deprecated props. Please use the new Navbar api, and remove `toggleButton`, `toggleNavKey`, `brand`, `navExpanded`, `defaultNavExpanded` props or the use of the `<NavBrand>` component outside of a `<Navbar.Header>`. \n\nfor more details see: http://react-bootstrap.github.io/components.html#navbars"}),u["default"].createElement(k["default"],this.props);var e=this.props,t=e.fixedTop,n=e.fixedBottom,i=e.staticTop,s=e.inverse,l=e.componentClass,c=e.fluid,d=e.className,f=e.children,h=o(e,["fixedTop","fixedBottom","staticTop","inverse","componentClass","fluid","className","children"]);void 0===h.role&&"nav"!==l&&(h.role="navigation"),s&&(h.bsStyle=I.INVERSE);var g=P["default"].getClassSet(h);return g[P["default"].prefix(this.props,"fixed-top")]=t,g[P["default"].prefix(this.props,"fixed-bottom")]=n,g[P["default"].prefix(this.props,"static-top")]=i,u["default"].createElement(l,a({},h,{className:p["default"](d,g)}),u["default"].createElement(E["default"],{fluid:c},f))}}),j=[I.DEFAULT,I.INVERSE];B=L.bsStyles(j,I.DEFAULT,L.bsClass("navbar",d["default"](B,{expanded:"onToggle"}))),B.Brand=A["default"],B.Header=D["default"],B.Toggle=F["default"],B.Collapse=O["default"],B.Form=i("div","form","NavbarForm"),B.Text=i("p","text","NavbarText"),B.Link=i("a","link","NavbarLink"),t["default"]=B,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(334)["default"],i=n(307)["default"],o=n(300)["default"];t.__esModule=!0;var a=n(106),s=o(a),l=n(335),u=o(l),c=n(379),d=o(c),f=n(350),p=o(f),h=n(469),g=o(h),m=n(517),v=o(m),b=n(306),y=o(b),w=n(323),x=n(304),_=o(x),E=n(305),C=o(E),k=s["default"].createClass({displayName:"Navbar",propTypes:{fixedTop:s["default"].PropTypes.bool,fixedBottom:s["default"].PropTypes.bool,staticTop:s["default"].PropTypes.bool,inverse:s["default"].PropTypes.bool,fluid:s["default"].PropTypes.bool,role:s["default"].PropTypes.string,componentClass:p["default"],brand:d["default"](s["default"].PropTypes.node,"Use the `NavBrand` component."),toggleButton:s["default"].PropTypes.node,toggleNavKey:s["default"].PropTypes.oneOfType([s["default"].PropTypes.string,s["default"].PropTypes.number]),onToggle:s["default"].PropTypes.func,navExpanded:s["default"].PropTypes.bool,defaultNavExpanded:s["default"].PropTypes.bool},childContextTypes:{$bs_deprecated_navbar:s["default"].PropTypes.bool},getChildContext:function(){return{$bs_deprecated_navbar:!0}},getDefaultProps:function(){return{role:"navigation",componentClass:"nav",fixedTop:!1,fixedBottom:!1,staticTop:!1,inverse:!1,fluid:!1,defaultNavExpanded:!1}},getInitialState:function(){return{navExpanded:this.props.defaultNavExpanded}},shouldComponentUpdate:function(){return!this._isChanging},handleToggle:function(){this.props.onToggle&&(this._isChanging=!0,this.props.onToggle(),this._isChanging=!1),this.setState({navExpanded:!this.state.navExpanded})},isNavExpanded:function(){return null!=this.props.navExpanded?this.props.navExpanded:this.state.navExpanded},hasNavBrandChild:function(){return C["default"].findValidComponents(this.props.children,function(e){return"brand"===e.props.bsRole}).length>0},render:function(){var e=this.props,t=e.brand,n=e.toggleButton,o=e.toggleNavKey,a=(e.fixedTop,e.fixedBottom,e.staticTop,e.inverse,e.componentClass),l=e.fluid,c=e.className,d=e.children,f=r(e,["brand","toggleButton","toggleNavKey","fixedTop","fixedBottom","staticTop","inverse","componentClass","fluid","className","children"]);void 0===f.role&&"nav"!==a&&(f.role="navigation");var p=y["default"].getClassSet(this.props);p[y["default"].prefix(this.props,"fixed-top")]=this.props.fixedTop,p[y["default"].prefix(this.props,"fixed-bottom")]=this.props.fixedBottom,p[y["default"].prefix(this.props,"static-top")]=this.props.staticTop,p[y["default"].prefix(this.props,w.INVERSE)]=this.props.inverse,p[y["default"].prefix(this.props,w.DEFAULT)]=!this.props.inverse;var h=(t||n||null!=o)&&!this.hasNavBrandChild();return s["default"].createElement(a,i({},f,{className:u["default"](c,p)}),s["default"].createElement(g["default"],{fluid:l},h?this.renderBrandHeader():null,C["default"].map(d,this.renderChild)))},renderBrandHeader:function(){var e=this.props.brand;return e&&(e=s["default"].createElement(v["default"],null,e)),this.renderHeader(e)},renderHeader:function(e){var t=this.props.toggleButton||null!=this.props.toggleNavKey,n=y["default"].prefix(this.props,"header");return s["default"].createElement("div",{className:n},e,t?this.renderToggleButton():null)},renderChild:function(e,t){var n=null!=e.key?e.key:t;if("brand"===e.props.bsRole)return s["default"].cloneElement(this.renderHeader(e),{key:n});var r=this.props.toggleNavKey,i=null!=r&&r===e.props.eventKey;return s["default"].cloneElement(e,{navbar:!0,collapsible:i,expanded:i&&this.isNavExpanded(),key:n})},renderToggleButton:function(){var e=this.props.toggleButton,t=y["default"].prefix(this.props,"toggle");if(s["default"].isValidElement(e))return s["default"].cloneElement(e,{className:u["default"](e.props.className,t),onClick:_["default"](this.handleToggle,e.props.onClick)});var n=void 0;return n=null!=e?e:[s["default"].createElement("span",{className:"sr-only",key:0},"Toggle navigation"),s["default"].createElement("span",{className:"icon-bar",key:1}),s["default"].createElement("span",{className:"icon-bar",key:2}),s["default"].createElement("span",{className:"icon-bar",key:3})],s["default"].createElement("button",{type:"button",onClick:this.handleToggle,className:t},n)}}),S=[w.DEFAULT,w.INVERSE];t["default"]=b.bsStyles(S,w.DEFAULT,b.bsClass("navbar",k)),e.exports=t["default"]},function(e,t,n){"use strict";var r=n(300)["default"];t.__esModule=!0;var i=n(518),o=r(i),a=n(380),s=r(a);t["default"]=s["default"].wrapper(o["default"],{message:"The `NavBrand` component has been renamed to: `NavbarBrand`. Please use that component instead; this alias will be removed in an upcoming release"}),e.exports=t["default"]},function(e,t,n){"use strict";var r=n(341)["default"],i=n(348)["default"],o=n(334)["default"],a=n(307)["default"],s=n(300)["default"];t.__esModule=!0;var l=n(106),u=s(l),c=n(335),d=s(c),f=n(306),p=s(f),h=function(e){function t(){i(this,t),e.apply(this,arguments)}return r(t,e),t.prototype.render=function(){var e=this.props,t=e.className,n=e.children,r=o(e,["className","children"]),i=this.context.$bs_navbar_bsClass,s=void 0===i?"navbar":i,l=p["default"].prefix({bsClass:s},"brand");return u["default"].isValidElement(n)?u["default"].cloneElement(n,{className:d["default"](n.props.className,t,l)}):u["default"].createElement("span",a({},r,{className:d["default"](t,l)}),n)},t}(u["default"].Component);h.contextTypes={$bs_navbar_bsClass:u["default"].PropTypes.string},t["default"]=h,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(334)["default"],i=n(307)["default"],o=n(300)["default"];t.__esModule=!0;var a=n(106),s=o(a),l=n(335),u=o(l),c=n(306),d=o(c),f=s["default"].createClass({displayName:"NavbarHeader",contextTypes:{$bs_navbar_bsClass:a.PropTypes.string},render:function(){var e=this.props,t=e.className,n=r(e,["className"]),o=this.context.$bs_navbar_bsClass,a=void 0===o?"navbar":o,l=d["default"].prefix({bsClass:a},"header");return s["default"].createElement("div",i({},n,{className:u["default"](t,l)}))}});t["default"]=f,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(307)["default"],i=n(334)["default"],o=n(300)["default"];t.__esModule=!0;var a=n(335),s=o(a),l=n(106),u=o(l),c=n(306),d=o(c),f=n(304),p=o(f),h=u["default"].createClass({displayName:"NavbarToggle",propTypes:{onClick:u["default"].PropTypes.func,children:l.PropTypes.node},contextTypes:{$bs_navbar_bsClass:l.PropTypes.string,$bs_navbar_onToggle:l.PropTypes.func},render:function(){var e=this.props,t=e.onClick,n=e.className,o=e.children,a=i(e,["onClick","className","children"]),l=this.context,c=l.$bs_navbar_bsClass,f=void 0===c?"navbar":c,h=l.$bs_navbar_onToggle,g=r({type:"button"},a,{onClick:p["default"](t,h),className:s["default"](n,d["default"].prefix({bsClass:f},"toggle"))});return o?u["default"].createElement("button",g,o):u["default"].createElement("button",g,u["default"].createElement("span",{className:"sr-only"},"Toggle navigation"),u["default"].createElement("span",{className:"icon-bar"}),u["default"].createElement("span",{className:"icon-bar"}),u["default"].createElement("span",{className:"icon-bar"}))}});t["default"]=h,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(334)["default"],i=n(307)["default"],o=n(300)["default"];t.__esModule=!0;var a=n(106),s=o(a),l=n(306),u=o(l),c=n(366),d=o(c),f=s["default"].createClass({displayName:"NavbarCollapse",contextTypes:{$bs_navbar_bsClass:a.PropTypes.string,$bs_navbar_expanded:a.PropTypes.bool},render:function(){var e=this.props,t=e.children,n=r(e,["children"]),o=this.context,a=o.$bs_navbar_bsClass,l=void 0===a?"navbar":a,c=o.$bs_navbar_expanded;return s["default"].createElement(d["default"],i({"in":c},n),s["default"].createElement("div",{className:u["default"].prefix({bsClass:l},"collapse")},t))}});t["default"]=f,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(341)["default"],i=n(348)["default"],o=n(307)["default"],a=n(334)["default"],s=n(300)["default"];t.__esModule=!0;var l=n(106),u=s(l),c=n(381),d=s(c),f=function(e){function t(){i(this,t),e.apply(this,arguments)}return r(t,e),t.prototype.render=function(){var e=this.props,t=e.children,n=e.title,r=e.noCaret,i=a(e,["children","title","noCaret"]);return u["default"].createElement(d["default"],o({},i,{componentClass:"li"}),u["default"].createElement(d["default"].Toggle,{useAnchor:!0,disabled:i.disabled,noCaret:r},n),u["default"].createElement(d["default"].Menu,null,t))},t}(u["default"].Component);f.propTypes=o({noCaret:u["default"].PropTypes.bool,title:u["default"].PropTypes.node.isRequired},d["default"].propTypes),t["default"]=f,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(334)["default"],i=n(307)["default"],o=n(300)["default"];t.__esModule=!0;var a=n(106),s=o(a),l=n(335),u=o(l),c=n(340),d=o(c),f=n(304),p=o(f),h=s["default"].createClass({displayName:"NavItem",propTypes:{linkId:s["default"].PropTypes.string,onSelect:s["default"].PropTypes.func,active:s["default"].PropTypes.bool,disabled:s["default"].PropTypes.bool,href:s["default"].PropTypes.string,onClick:s["default"].PropTypes.func,role:s["default"].PropTypes.string,title:s["default"].PropTypes.node,eventKey:s["default"].PropTypes.any,target:s["default"].PropTypes.string,"aria-controls":s["default"].PropTypes.string},getDefaultProps:function(){return{active:!1,disabled:!1}},render:function(){var e=this.props,t=e.role,n=e.linkId,o=e.disabled,a=e.active,l=e.href,c=e.onClick,f=e.title,h=e.target,g=e.children,m=e.tabIndex,v=e["aria-controls"],b=r(e,["role","linkId","disabled","active","href","onClick","title","target","children","tabIndex","aria-controls"]),y={active:a,disabled:o},w={role:t,href:l,onClick:p["default"](c,this.handleClick),title:f,target:h,tabIndex:m,id:n};return t||"#"!==l?"tab"===t&&(w["aria-selected"]=a):w.role="button",s["default"].createElement("li",i({},b,{role:"presentation",className:u["default"](b.className,y)}),s["default"].createElement(d["default"],i({},w,{"aria-controls":v}),g))},handleClick:function(e){this.props.onSelect&&(e.preventDefault(),this.props.disabled||this.props.onSelect(this.props.eventKey,this.props.href,this.props.target))}});t["default"]=h,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(341)["default"],i=n(348)["default"],o=n(307)["default"],a=n(334)["default"],s=n(300)["default"];t.__esModule=!0;var l=n(106),u=s(l),c=n(525),d=s(c),f=n(350),p=s(f),h=n(492),g=s(h),m=n(335),v=s(m),b=function(e){function t(){i(this,t),e.apply(this,arguments)}return r(t,e),t.prototype.render=function(){var e=this.props,t=e.children,n=e.animation,r=a(e,["children","animation"]);return n===!0&&(n=g["default"]),n===!1&&(n=null),n||(t=l.cloneElement(t,{className:v["default"]("in",t.props.className)})),u["default"].createElement(d["default"],o({},r,{transition:n}),t)},t}(u["default"].Component);b.propTypes=o({},d["default"].propTypes,{show:u["default"].PropTypes.bool,rootClose:u["default"].PropTypes.bool,onHide:u["default"].PropTypes.func,animation:u["default"].PropTypes.oneOfType([u["default"].PropTypes.bool,p["default"]]),onEnter:u["default"].PropTypes.func,onEntering:u["default"].PropTypes.func,onEntered:u["default"].PropTypes.func,onExit:u["default"].PropTypes.func,onExiting:u["default"].PropTypes.func,onExited:u["default"].PropTypes.func}),b.defaultProps={animation:g["default"],rootClose:!1,show:!1},t["default"]=b,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(106),d=r(c),f=n(503),p=r(f),h=n(526),g=r(h),m=n(459),v=r(m),b=n(502),y=r(b),w=function(e){function t(e,n){o(this,t);var r=a(this,Object.getPrototypeOf(t).call(this,e,n));return r.state={exited:!e.show},r.onHiddenListener=r.handleHidden.bind(r),r}return s(t,e),u(t,[{key:"componentWillReceiveProps",value:function(e){e.show?this.setState({exited:!1}):e.transition||this.setState({exited:!0})}},{key:"render",value:function(){var e=this.props,t=e.container,n=e.containerPadding,r=e.target,o=e.placement,a=e.shouldUpdatePosition,s=e.rootClose,l=e.children,u=e.transition,c=i(e,["container","containerPadding","target","placement","shouldUpdatePosition","rootClose","children","transition"]),f=c.show||u&&!this.state.exited;if(!f)return null;var h=l;if(h=d["default"].createElement(g["default"],{container:t,containerPadding:n,target:r,placement:o,shouldUpdatePosition:a},h),u){var m=c.onExit,b=c.onExiting,y=c.onEnter,w=c.onEntering,x=c.onEntered;h=d["default"].createElement(u,{"in":c.show,transitionAppear:!0,onExit:m,onExiting:b,onExited:this.onHiddenListener,onEnter:y,onEntering:w,onEntered:x},h)}return s&&(h=d["default"].createElement(v["default"],{onRootClose:c.onHide},h)),d["default"].createElement(p["default"],{container:t},h)}},{key:"handleHidden",value:function(){if(this.setState({exited:!0}),this.props.onExited){var e;(e=this.props).onExited.apply(e,arguments)}}}]),t}(d["default"].Component);w.propTypes=l({},p["default"].propTypes,g["default"].propTypes,{show:d["default"].PropTypes.bool,rootClose:d["default"].PropTypes.bool,onHide:function(e){var t=d["default"].PropTypes.func;e.rootClose&&(t=t.isRequired);for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return t.apply(void 0,[e].concat(r))},transition:y["default"],onEnter:d["default"].PropTypes.func,onEntering:d["default"].PropTypes.func,onEntered:d["default"].PropTypes.func,onExit:d["default"].PropTypes.func,onExiting:d["default"].PropTypes.func,onExited:d["default"].PropTypes.func}),t["default"]=w,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(335),d=r(c),f=n(106),p=r(f),h=n(137),g=r(h),m=n(500),v=r(m),b=n(527),y=r(b),w=n(504),x=r(w),_=n(463),E=r(_),C=function(e){function t(e,n){o(this,t);var r=a(this,Object.getPrototypeOf(t).call(this,e,n));return r.state={positionLeft:0,positionTop:0,arrowOffsetLeft:null,arrowOffsetTop:null},r._needsFlush=!1,r._lastTarget=null,r}return s(t,e),u(t,[{key:"componentDidMount",value:function(){this.updatePosition(this.getTarget())}},{key:"componentWillReceiveProps",value:function(){this._needsFlush=!0}},{key:"componentDidUpdate",value:function(e){this._needsFlush&&(this._needsFlush=!1,this.maybeUpdatePosition(this.props.placement!==e.placement))}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=i(e,["children","className"]),o=this.state,a=o.positionLeft,s=o.positionTop,u=i(o,["positionLeft","positionTop"]);delete r.target,delete r.container,delete r.containerPadding,delete r.shouldUpdatePosition;var c=p["default"].Children.only(t);return(0,f.cloneElement)(c,l({},r,u,{positionLeft:a,positionTop:s,className:(0,d["default"])(n,c.props.className),style:l({},c.props.style,{left:a,top:s})}))}},{key:"getTarget",value:function(){var e=this.props.target,t="function"==typeof e?e():e;return t&&g["default"].findDOMNode(t)||null}},{key:"maybeUpdatePosition",value:function(e){var t=this.getTarget();(this.props.shouldUpdatePosition||t!==this._lastTarget||e)&&this.updatePosition(t)}},{key:"updatePosition",value:function(e){if(this._lastTarget=e,!e)return void this.setState({positionLeft:0,positionTop:0,arrowOffsetLeft:null,arrowOffsetTop:null});var t=g["default"].findDOMNode(this),n=(0,x["default"])(this.props.container,(0,E["default"])(this).body);this.setState((0,y["default"])(this.props.placement,t,e,n,this.props.containerPadding))}}]),t}(p["default"].Component);C.propTypes={target:p["default"].PropTypes.oneOfType([v["default"],p["default"].PropTypes.func]),container:p["default"].PropTypes.oneOfType([v["default"],p["default"].PropTypes.func]),containerPadding:p["default"].PropTypes.number,placement:p["default"].PropTypes.oneOf(["top","right","bottom","left"]),shouldUpdatePosition:p["default"].PropTypes.bool},C.displayName="Position",C.defaultProps={containerPadding:0,placement:"right",shouldUpdatePosition:!1},t["default"]=C,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){var t=void 0,n=void 0,r=void 0;if("BODY"===e.tagName)t=window.innerWidth,n=window.innerHeight,r=(0,p["default"])((0,g["default"])(e).documentElement)||(0,p["default"])(e);else{var i=(0,u["default"])(e);t=i.width,n=i.height,r=(0,p["default"])(e)}return{width:t,height:n,scroll:r}}function o(e,t,n,r){var o=i(n),a=o.scroll,s=o.height,l=e-r-a,u=e+r-a+t;return l<0?-l:u>s?s-u:0}function a(e,t,n,r){var o=i(n),a=o.width,s=e-r,l=e+r+t;return s<0?-s:l>a?a-l:0}function s(e,t,n,r,i){var s="BODY"===r.tagName?(0,u["default"])(n):(0,d["default"])(n,r),l=(0,u["default"])(t),c=l.height,f=l.width,p=void 0,h=void 0,g=void 0,m=void 0;if("left"===e||"right"===e){h=s.top+(s.height-c)/2,p="left"===e?s.left-f:s.left+s.width;var v=o(h,c,r,i);h+=v,m=50*(1-2*v/c)+"%",g=void 0}else{if("top"!==e&&"bottom"!==e)throw new Error('calcOverlayPosition(): No such placement of "'+e+'" found.');p=s.left+(s.width-f)/2,h="top"===e?s.top-c:s.top+s.height;var b=a(p,f,r,i);p+=b,g=50*(1-2*b/f)+"%",m=void 0}return{positionLeft:p,positionTop:h,arrowOffsetLeft:g,arrowOffsetTop:m}}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=s;var l=n(528),u=r(l),c=n(529),d=r(c),f=n(531),p=r(f),h=n(463),g=r(h);e.exports=t["default"]},function(e,t,n){"use strict";var r=n(384),i=n(511),o=n(383);e.exports=function(e){var t=o(e),n=i(t),a=t&&t.documentElement,s={top:0,left:0,height:0,width:0};if(t)return r(a,e)?(void 0!==e.getBoundingClientRect&&(s=e.getBoundingClientRect()),(s.width||s.height)&&(s={top:s.top+(n.pageYOffset||a.scrollTop)-(a.clientTop||0),left:s.left+(n.pageXOffset||a.scrollLeft)-(a.clientLeft||0),width:(null==s.width?e.offsetWidth:s.width)||0,height:(null==s.height?e.offsetHeight:s.height)||0}),s):s}},function(e,t,n){"use strict";function r(e){return e.nodeName&&e.nodeName.toLowerCase()}function i(e,t){var n,i={top:0,left:0};return"fixed"===(0,g["default"])(e,"position")?n=e.getBoundingClientRect():(t=t||(0,u["default"])(e),n=(0,s["default"])(e),"html"!==r(t)&&(i=(0,s["default"])(t)),i.top+=parseInt((0,g["default"])(t,"borderTopWidth"),10)-(0,d["default"])(t)||0,i.left+=parseInt((0,g["default"])(t,"borderLeftWidth"),10)-(0,p["default"])(t)||0),o._extends({},n,{top:n.top-i.top-(parseInt((0,g["default"])(e,"marginTop"),10)||0),left:n.left-i.left-(parseInt((0,g["default"])(e,"marginLeft"),10)||0)})}var o=n(373);t.__esModule=!0,t["default"]=i;var a=n(528),s=o.interopRequireDefault(a),l=n(530),u=o.interopRequireDefault(l),c=n(531),d=o.interopRequireDefault(c),f=n(532),p=o.interopRequireDefault(f),h=n(367),g=o.interopRequireDefault(h);e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e.nodeName&&e.nodeName.toLowerCase()}function i(e){for(var t=(0,s["default"])(e),n=e&&e.offsetParent;n&&"html"!==r(e)&&"static"===(0,u["default"])(n,"position");)n=n.offsetParent;return n||t.documentElement}var o=n(373);t.__esModule=!0,t["default"]=i;var a=n(383),s=o.interopRequireDefault(a),l=n(367),u=o.interopRequireDefault(l);e.exports=t["default"]},function(e,t,n){"use strict";var r=n(511);e.exports=function(e,t){var n=r(e);return void 0===t?n?"pageYOffset"in n?n.pageYOffset:n.document.documentElement.scrollTop:e.scrollTop:void(n?n.scrollTo("pageXOffset"in n?n.pageXOffset:n.document.documentElement.scrollLeft,t):e.scrollTop=t)}},function(e,t,n){"use strict";var r=n(511);e.exports=function(e,t){var n=r(e);return void 0===t?n?"pageXOffset"in n?n.pageXOffset:n.document.documentElement.scrollLeft:e.scrollLeft:void(n?n.scrollTo(t,"pageYOffset"in n?n.pageYOffset:n.document.documentElement.scrollTop):e.scrollLeft=t)}},function(e,t,n){"use strict";function r(e,t){return Array.isArray(t)?t.indexOf(e)>=0:e===t}var i=n(307)["default"],o=n(326)["default"],a=n(300)["default"];t.__esModule=!0;var s=n(384),l=a(s),u=n(468),c=a(u),d=n(106),f=a(d),p=n(137),h=a(p),g=n(331),m=(a(g),n(524)),v=a(m),b=n(304),y=a(b),w=f["default"].createClass({displayName:"OverlayTrigger",propTypes:i({},v["default"].propTypes,{trigger:f["default"].PropTypes.oneOfType([f["default"].PropTypes.oneOf(["click","hover","focus"]),f["default"].PropTypes.arrayOf(f["default"].PropTypes.oneOf(["click","hover","focus"]))]),delay:f["default"].PropTypes.number,delayShow:f["default"].PropTypes.number,delayHide:f["default"].PropTypes.number,defaultOverlayShown:f["default"].PropTypes.bool,overlay:f["default"].PropTypes.node.isRequired,onBlur:f["default"].PropTypes.func,onClick:f["default"].PropTypes.func,onFocus:f["default"].PropTypes.func,onMouseEnter:f["default"].PropTypes.func,onMouseLeave:f["default"].PropTypes.func,target:function(){},onHide:function(){},show:function(){}}),getDefaultProps:function(){return{defaultOverlayShown:!1,trigger:["hover","focus"]}},getInitialState:function(){return{isOverlayShown:this.props.defaultOverlayShown}},show:function(){this.setState({isOverlayShown:!0})},hide:function(){this.setState({isOverlayShown:!1})},toggle:function(){this.state.isOverlayShown?this.hide():this.show()},componentWillMount:function(){this.handleMouseOver=this.handleMouseOverOut.bind(null,this.handleDelayedShow),this.handleMouseOut=this.handleMouseOverOut.bind(null,this.handleDelayedHide)},componentDidMount:function(){this._mountNode=document.createElement("div"),this.renderOverlay()},renderOverlay:function(){h["default"].unstable_renderSubtreeIntoContainer(this,this._overlay,this._mountNode)},componentWillUnmount:function(){h["default"].unmountComponentAtNode(this._mountNode),this._mountNode=null,clearTimeout(this._hoverShowDelay),clearTimeout(this._hoverHideDelay)},componentDidUpdate:function(){this._mountNode&&this.renderOverlay()},getOverlayTarget:function(){return h["default"].findDOMNode(this)},getOverlay:function(){var e=i({},c["default"](this.props,o(v["default"].propTypes)),{show:this.state.isOverlayShown,onHide:this.hide,target:this.getOverlayTarget,onExit:this.props.onExit,onExiting:this.props.onExiting,onExited:this.props.onExited,onEnter:this.props.onEnter,onEntering:this.props.onEntering,onEntered:this.props.onEntered}),t=d.cloneElement(this.props.overlay,{placement:e.placement,container:e.container});return f["default"].createElement(v["default"],e,t)},render:function(){var e=f["default"].Children.only(this.props.children),t=e.props,n={"aria-describedby":this.props.overlay.props.id};return this._overlay=this.getOverlay(),n.onClick=y["default"](t.onClick,this.props.onClick),r("click",this.props.trigger)&&(n.onClick=y["default"](this.toggle,n.onClick)),r("hover",this.props.trigger)&&(n.onMouseOver=y["default"](this.handleMouseOver,this.props.onMouseOver,t.onMouseOver),n.onMouseOut=y["default"](this.handleMouseOut,this.props.onMouseOut,t.onMouseOut)),r("focus",this.props.trigger)&&(n.onFocus=y["default"](this.handleDelayedShow,this.props.onFocus,t.onFocus),n.onBlur=y["default"](this.handleDelayedHide,this.props.onBlur,t.onBlur)),d.cloneElement(e,n)},handleDelayedShow:function(){var e=this;if(null!=this._hoverHideDelay)return clearTimeout(this._hoverHideDelay),void(this._hoverHideDelay=null);if(!this.state.isOverlayShown&&null==this._hoverShowDelay){var t=null!=this.props.delayShow?this.props.delayShow:this.props.delay;return t?void(this._hoverShowDelay=setTimeout(function(){e._hoverShowDelay=null,e.show()},t)):void this.show()}},handleDelayedHide:function(){var e=this;if(null!=this._hoverShowDelay)return clearTimeout(this._hoverShowDelay),void(this._hoverShowDelay=null);if(this.state.isOverlayShown&&null==this._hoverHideDelay){var t=null!=this.props.delayHide?this.props.delayHide:this.props.delay;return t?void(this._hoverHideDelay=setTimeout(function(){e._hoverHideDelay=null,e.hide()},t)):void this.hide()}},handleMouseOverOut:function(e,t){var n=t.currentTarget,r=t.relatedTarget||t.nativeEvent.toElement;r&&(r===n||l["default"](n,r))||e(t)}});t["default"]=w,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(307)["default"],i=n(300)["default"];t.__esModule=!0;var o=n(106),a=i(o),s=n(335),l=i(s),u=a["default"].createClass({displayName:"PageHeader",render:function(){return a["default"].createElement("div",r({},this.props,{className:l["default"](this.props.className,"page-header")}),a["default"].createElement("h1",null,this.props.children))}});t["default"]=u,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(307)["default"],i=n(300)["default"];t.__esModule=!0;var o=n(106),a=i(o),s=n(335),l=i(s),u=n(340),c=i(u),d=a["default"].createClass({displayName:"PageItem",propTypes:{href:a["default"].PropTypes.string,target:a["default"].PropTypes.string,
title:a["default"].PropTypes.string,disabled:a["default"].PropTypes.bool,previous:a["default"].PropTypes.bool,next:a["default"].PropTypes.bool,onSelect:a["default"].PropTypes.func,eventKey:a["default"].PropTypes.any},getDefaultProps:function(){return{disabled:!1,previous:!1,next:!1}},render:function(){var e={disabled:this.props.disabled,previous:this.props.previous,next:this.props.next};return a["default"].createElement("li",r({},this.props,{className:l["default"](this.props.className,e)}),a["default"].createElement(c["default"],{href:this.props.href,title:this.props.title,target:this.props.target,onClick:this.handleSelect},this.props.children))},handleSelect:function(e){(this.props.onSelect||this.props.disabled)&&(e.preventDefault(),this.props.disabled||this.props.onSelect(this.props.eventKey,this.props.href,this.props.target))}});t["default"]=d,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(307)["default"],i=n(300)["default"];t.__esModule=!0;var o=n(106),a=i(o),s=n(335),l=i(s),u=n(305),c=i(u),d=n(304),f=i(d),p=a["default"].createClass({displayName:"Pager",propTypes:{onSelect:a["default"].PropTypes.func},render:function(){return a["default"].createElement("ul",r({},this.props,{className:l["default"](this.props.className,"pager")}),c["default"].map(this.props.children,this.renderPageItem))},renderPageItem:function(e,t){return o.cloneElement(e,{onSelect:f["default"](e.props.onSelect,this.props.onSelect),key:e.key?e.key:t})}});t["default"]=p,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(307)["default"],i=n(300)["default"];t.__esModule=!0;var o=n(106),a=i(o),s=n(335),l=i(s),u=n(306),c=i(u),d=n(538),f=i(d),p=n(350),h=i(p),g=n(340),m=i(g),v=a["default"].createClass({displayName:"Pagination",propTypes:{activePage:a["default"].PropTypes.number,items:a["default"].PropTypes.number,maxButtons:a["default"].PropTypes.number,boundaryLinks:a["default"].PropTypes.bool,ellipsis:a["default"].PropTypes.oneOfType([a["default"].PropTypes.bool,a["default"].PropTypes.node]),first:a["default"].PropTypes.oneOfType([a["default"].PropTypes.bool,a["default"].PropTypes.node]),last:a["default"].PropTypes.oneOfType([a["default"].PropTypes.bool,a["default"].PropTypes.node]),prev:a["default"].PropTypes.oneOfType([a["default"].PropTypes.bool,a["default"].PropTypes.node]),next:a["default"].PropTypes.oneOfType([a["default"].PropTypes.bool,a["default"].PropTypes.node]),onSelect:a["default"].PropTypes.func,buttonComponentClass:h["default"]},getDefaultProps:function(){return{activePage:1,items:1,maxButtons:0,first:!1,last:!1,prev:!1,next:!1,ellipsis:!0,boundaryLinks:!1,buttonComponentClass:m["default"],bsClass:"pagination"}},renderPageButtons:function(){var e=[],t=void 0,n=void 0,r=void 0,i=this.props,o=i.maxButtons,s=i.activePage,l=i.items,u=i.onSelect,c=i.ellipsis,d=i.buttonComponentClass,p=i.boundaryLinks;if(o){var h=s-parseInt(o/2,10);t=h>1?h:1,r=t+o<=l,r?n=t+o-1:(n=l,t=l-o+1,t<1&&(t=1))}else t=1,n=l;for(var g=t;g<=n;g++)e.push(a["default"].createElement(f["default"],{key:g,eventKey:g,active:g===s,onSelect:u,buttonComponentClass:d},g));return p&&c&&1!==t&&(e.unshift(a["default"].createElement(f["default"],{key:"ellipsisFirst",disabled:!0,buttonComponentClass:d},a["default"].createElement("span",{"aria-label":"More"},this.props.ellipsis===!0?"…":this.props.ellipsis))),e.unshift(a["default"].createElement(f["default"],{key:1,eventKey:1,active:!1,onSelect:u,buttonComponentClass:d},"1"))),o&&r&&c&&(e.push(a["default"].createElement(f["default"],{key:"ellipsis",disabled:!0,buttonComponentClass:d},a["default"].createElement("span",{"aria-label":"More"},this.props.ellipsis===!0?"…":this.props.ellipsis))),p&&n!==l&&e.push(a["default"].createElement(f["default"],{key:l,eventKey:l,active:!1,onSelect:u,buttonComponentClass:d},l))),e},renderPrev:function(){return this.props.prev?a["default"].createElement(f["default"],{key:"prev",eventKey:this.props.activePage-1,disabled:1===this.props.activePage,onSelect:this.props.onSelect,buttonComponentClass:this.props.buttonComponentClass},a["default"].createElement("span",{"aria-label":"Previous"},this.props.prev===!0?"‹":this.props.prev)):null},renderNext:function(){return this.props.next?a["default"].createElement(f["default"],{key:"next",eventKey:this.props.activePage+1,disabled:this.props.activePage>=this.props.items,onSelect:this.props.onSelect,buttonComponentClass:this.props.buttonComponentClass},a["default"].createElement("span",{"aria-label":"Next"},this.props.next===!0?"›":this.props.next)):null},renderFirst:function(){return this.props.first?a["default"].createElement(f["default"],{key:"first",eventKey:1,disabled:1===this.props.activePage,onSelect:this.props.onSelect,buttonComponentClass:this.props.buttonComponentClass},a["default"].createElement("span",{"aria-label":"First"},this.props.first===!0?"«":this.props.first)):null},renderLast:function(){return this.props.last?a["default"].createElement(f["default"],{key:"last",eventKey:this.props.items,disabled:this.props.activePage>=this.props.items,onSelect:this.props.onSelect,buttonComponentClass:this.props.buttonComponentClass},a["default"].createElement("span",{"aria-label":"Last"},this.props.last===!0?"»":this.props.last)):null},render:function(){return a["default"].createElement("ul",r({},this.props,{className:l["default"](this.props.className,c["default"].getClassSet(this.props))}),this.renderFirst(),this.renderPrev(),this.renderPageButtons(),this.renderNext(),this.renderLast())}});t["default"]=u.bsClass("pagination",v),e.exports=t["default"]},function(e,t,n){"use strict";var r=n(334)["default"],i=n(307)["default"],o=n(300)["default"];t.__esModule=!0;var a=n(106),s=o(a),l=n(335),u=o(l),c=n(539),d=o(c),f=n(350),p=o(f),h=s["default"].createClass({displayName:"PaginationButton",propTypes:{className:s["default"].PropTypes.string,eventKey:s["default"].PropTypes.oneOfType([s["default"].PropTypes.string,s["default"].PropTypes.number]),onSelect:s["default"].PropTypes.func,disabled:s["default"].PropTypes.bool,active:s["default"].PropTypes.bool,buttonComponentClass:p["default"]},getDefaultProps:function(){return{active:!1,disabled:!1}},handleClick:function(e){if(!this.props.disabled&&this.props.onSelect){var t=d["default"](this.props.eventKey);this.props.onSelect(e,t)}},render:function(){var e={active:this.props.active,disabled:this.props.disabled},t=this.props,n=t.className,o=r(t,["className"]),a=this.props.buttonComponentClass;return s["default"].createElement("li",{className:u["default"](n,e)},s["default"].createElement(a,i({},o,{onClick:this.handleClick})))}});t["default"]=h,e.exports=t["default"]},function(e,t){"use strict";function n(e){var t=!1;return{eventKey:e,preventSelection:function(){t=!0},isSelectionPrevented:function(){return t}}}t.__esModule=!0,t["default"]=n,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(334)["default"],i=n(307)["default"],o=n(300)["default"];t.__esModule=!0;var a=n(106),s=o(a),l=n(335),u=o(l),c=n(306),d=o(c),f=n(323),p=n(366),h=o(p),g=s["default"].createClass({displayName:"Panel",propTypes:{collapsible:s["default"].PropTypes.bool,onSelect:s["default"].PropTypes.func,header:s["default"].PropTypes.node,id:s["default"].PropTypes.oneOfType([s["default"].PropTypes.string,s["default"].PropTypes.number]),footer:s["default"].PropTypes.node,defaultExpanded:s["default"].PropTypes.bool,expanded:s["default"].PropTypes.bool,eventKey:s["default"].PropTypes.any,headerRole:s["default"].PropTypes.string,panelRole:s["default"].PropTypes.string,onEnter:h["default"].propTypes.onEnter,onEntering:h["default"].propTypes.onEntering,onEntered:h["default"].propTypes.onEntered,onExit:h["default"].propTypes.onExit,onExiting:h["default"].propTypes.onExiting,onExited:h["default"].propTypes.onExited},getDefaultProps:function(){return{defaultExpanded:!1}},getInitialState:function(){return{expanded:this.props.defaultExpanded}},handleSelect:function(e){e.selected=!0,this.props.onSelect?this.props.onSelect(e,this.props.eventKey):e.preventDefault(),e.selected&&this.handleToggle()},handleToggle:function(){this.setState({expanded:!this.state.expanded})},isExpanded:function(){return null!=this.props.expanded?this.props.expanded:this.state.expanded},render:function(){var e=this.props,t=e.headerRole,n=e.panelRole,o=r(e,["headerRole","panelRole"]);return s["default"].createElement("div",i({},o,{className:u["default"](this.props.className,d["default"].getClassSet(this.props)),id:this.props.collapsible?null:this.props.id,onSelect:null}),this.renderHeading(t),this.props.collapsible?this.renderCollapsibleBody(n):this.renderBody(),this.renderFooter())},renderCollapsibleBody:function(e){var t={onEnter:this.props.onEnter,onEntering:this.props.onEntering,onEntered:this.props.onEntered,onExit:this.props.onExit,onExiting:this.props.onExiting,onExited:this.props.onExited,"in":this.isExpanded()},n={className:d["default"].prefix(this.props,"collapse"),id:this.props.id,ref:"panel","aria-hidden":!this.isExpanded()};return e&&(n.role=e),s["default"].createElement(h["default"],t,s["default"].createElement("div",n,this.renderBody()))},renderBody:function(){function e(){return{key:u.length}}function t(t){u.push(a.cloneElement(t,e()))}function n(t){u.push(s["default"].createElement("div",i({className:f},e()),t))}function r(){0!==c.length&&(n(c),c=[])}var o=this,l=this.props.children,u=[],c=[],f=d["default"].prefix(this.props,"body");return Array.isArray(l)&&0!==l.length?(l.forEach(function(e){o.shouldRenderFill(e)?(r(),t(e)):c.push(e)}),r()):this.shouldRenderFill(l)?t(l):n(l),u},shouldRenderFill:function(e){return s["default"].isValidElement(e)&&null!=e.props.fill},renderHeading:function(e){var t=this.props.header;if(!t)return null;if(!s["default"].isValidElement(t)||Array.isArray(t))t=this.props.collapsible?this.renderCollapsibleTitle(t,e):t;else{var n=u["default"](d["default"].prefix(this.props,"title"),t.props.className);t=this.props.collapsible?a.cloneElement(t,{className:n,children:this.renderAnchor(t.props.children,e)}):a.cloneElement(t,{className:n})}return s["default"].createElement("div",{className:d["default"].prefix(this.props,"heading")},t)},renderAnchor:function(e,t){return s["default"].createElement("a",{href:"#"+(this.props.id||""),"aria-controls":this.props.collapsible?this.props.id:null,className:this.isExpanded()?null:"collapsed","aria-expanded":this.isExpanded(),"aria-selected":this.isExpanded(),onClick:this.handleSelect,role:t},e)},renderCollapsibleTitle:function(e,t){return s["default"].createElement("h4",{className:d["default"].prefix(this.props,"title"),role:"presentation"},this.renderAnchor(e,t))},renderFooter:function(){return this.props.footer?s["default"].createElement("div",{className:d["default"].prefix(this.props,"footer")},this.props.footer):null}}),m=f.State.values().concat(f.DEFAULT,f.PRIMARY);t["default"]=c.bsStyles(m,f.DEFAULT,c.bsClass("panel",g)),e.exports=t["default"]},function(e,t,n){"use strict";var r=n(307)["default"],i=n(300)["default"];t.__esModule=!0;var o=n(106),a=i(o),s=n(335),l=i(s),u=n(306),c=i(u),d=n(454),f=i(d),p=a["default"].createClass({displayName:"Popover",propTypes:{id:f["default"](a["default"].PropTypes.oneOfType([a["default"].PropTypes.string,a["default"].PropTypes.number])),placement:a["default"].PropTypes.oneOf(["top","right","bottom","left"]),positionLeft:a["default"].PropTypes.number,positionTop:a["default"].PropTypes.number,arrowOffsetLeft:a["default"].PropTypes.oneOfType([a["default"].PropTypes.number,a["default"].PropTypes.string]),arrowOffsetTop:a["default"].PropTypes.oneOfType([a["default"].PropTypes.number,a["default"].PropTypes.string]),title:a["default"].PropTypes.node},getDefaultProps:function(){return{placement:"right",bsClass:"popover"}},render:function(){var e,t=(e={},e[c["default"].prefix(this.props)]=!0,e[this.props.placement]=!0,e),n=r({left:this.props.positionLeft,top:this.props.positionTop,display:"block"},this.props.style),i={left:this.props.arrowOffsetLeft,top:this.props.arrowOffsetTop};return a["default"].createElement("div",r({role:"tooltip"},this.props,{className:l["default"](this.props.className,t),style:n,title:null}),a["default"].createElement("div",{className:"arrow",style:i}),this.props.title?this.renderTitle():null,a["default"].createElement("div",{className:c["default"].prefix(this.props,"content")},this.props.children))},renderTitle:function(){return a["default"].createElement("h3",{className:c["default"].prefix(this.props,"title")},this.props.title)}});t["default"]=p,e.exports=t["default"]},function(e,t,n){"use strict";function r(e,t,n){if(e[t]){var r=function(){var r=void 0,i=void 0;return c["default"].Children.forEach(e[t],function(e){e.type!==w&&(i=e.type.displayName?e.type.displayName:e.type,r=new Error("Children of "+n+" can contain only ProgressBar components. Found "+i))}),{v:r}}();if("object"==typeof r)return r.v}}var i=n(341)["default"],o=n(348)["default"],a=n(307)["default"],s=n(334)["default"],l=n(300)["default"];t.__esModule=!0;var u=n(106),c=l(u),d=n(474),f=l(d),p=n(306),h=l(p),g=n(323),m=n(335),v=l(m),b=n(305),y=l(b),w=function(e){function t(){o(this,t),e.apply(this,arguments)}return i(t,e),t.prototype.getPercentage=function(e,t,n){var r=1e3;return Math.round((e-t)/(n-t)*100*r)/r},t.prototype.render=function(){if(this.props.isChild)return this.renderProgressBar();var e=void 0;return e=this.props.children?y["default"].map(this.props.children,this.renderChildBar):this.renderProgressBar(),c["default"].createElement("div",a({},this.props,{className:v["default"](this.props.className,"progress"),min:null,max:null,label:null,"aria-valuetext":null}),e)},t.prototype.renderChildBar=function(e,t){return u.cloneElement(e,{isChild:!0,key:e.key?e.key:t})},t.prototype.renderProgressBar=function(){var e,t=this.props,n=t.className,r=t.label,i=t.now,o=t.min,l=t.max,u=t.style,d=s(t,["className","label","now","min","max","style"]),f=this.getPercentage(i,o,l);"string"==typeof r&&(r=this.renderLabel(f)),this.props.srOnly&&(r=c["default"].createElement("span",{className:"sr-only"},r));var p=v["default"](n,h["default"].getClassSet(this.props),(e={active:this.props.active},e[h["default"].prefix(this.props,"striped")]=this.props.active||this.props.striped,e));return c["default"].createElement("div",a({},d,{className:p,role:"progressbar",style:a({width:f+"%"},u),"aria-valuenow":this.props.now,"aria-valuemin":this.props.min,"aria-valuemax":this.props.max}),r)},t.prototype.renderLabel=function(e){var t=this.props.interpolateClass||f["default"];return c["default"].createElement(t,{now:this.props.now,min:this.props.min,max:this.props.max,percent:e,bsStyle:this.props.bsStyle},this.props.label)},t}(c["default"].Component);w.propTypes=a({},w.propTypes,{min:u.PropTypes.number,now:u.PropTypes.number,max:u.PropTypes.number,label:u.PropTypes.node,srOnly:u.PropTypes.bool,striped:u.PropTypes.bool,active:u.PropTypes.bool,children:r,className:c["default"].PropTypes.string,interpolateClass:u.PropTypes.node,isChild:u.PropTypes.bool}),w.defaultProps=a({},w.defaultProps,{min:0,max:100,active:!1,isChild:!1,srOnly:!1,striped:!1}),t["default"]=p.bsStyles(g.State.values(),p.bsClass("progress-bar",w)),e.exports=t["default"]},function(e,t,n){"use strict";var r=n(341)["default"],i=n(348)["default"],o=n(307)["default"],a=n(334)["default"],s=n(300)["default"];t.__esModule=!0;var l=n(335),u=s(l),c=n(106),d=s(c),f=n(331),p=(s(f),function(e){function t(){i(this,t),e.apply(this,arguments)}return r(t,e),t.prototype.render=function(){var e=this.props,t=e.bsClass,n=e.className,r=e.a16by9,i=e.a4by3,s=e.children,l=a(e,["bsClass","className","a16by9","a4by3","children"]),f={"embed-responsive-16by9":r,"embed-responsive-4by3":i};return d["default"].createElement("div",{className:u["default"](t,f)},c.cloneElement(s,o({},l,{className:u["default"](n,"embed-responsive-item")})))},t}(d["default"].Component));p.defaultProps={bsClass:"embed-responsive",a16by9:!1,a4by3:!1},p.propTypes={bsClass:c.PropTypes.string,children:c.PropTypes.element.isRequired,a16by9:c.PropTypes.bool,a4by3:c.PropTypes.bool},t["default"]=p,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(307)["default"],i=n(300)["default"];t.__esModule=!0;var o=n(106),a=i(o),s=n(335),l=i(s),u=n(350),c=i(u),d=a["default"].createClass({displayName:"Row",propTypes:{componentClass:c["default"]},getDefaultProps:function(){return{componentClass:"div"}},render:function(){var e=this.props.componentClass;return a["default"].createElement(e,r({},this.props,{className:l["default"](this.props.className,"row")}),this.props.children)}});t["default"]=d,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(341)["default"],i=n(348)["default"],o=n(307)["default"],a=n(334)["default"],s=n(326)["default"],l=n(300)["default"];t.__esModule=!0;var u=n(106),c=l(u),d=n(349),f=l(d),p=n(381),h=l(p),g=n(546),m=l(g),v=n(439),b=l(v),y=n(468),w=l(y),x=function(e){function t(){i(this,t),e.apply(this,arguments)}return r(t,e),t.prototype.render=function(){var e=this.props,t=e.children,n=e.title,r=e.onClick,i=e.target,l=e.href,u=e.toggleLabel,d=e.bsSize,p=e.bsStyle,g=a(e,["children","title","onClick","target","href","toggleLabel","bsSize","bsStyle"]),v=g.disabled,y=w["default"](g,s(h["default"].ControlledComponent.propTypes)),x=b["default"](g,s(h["default"].ControlledComponent.propTypes));return c["default"].createElement(h["default"],y,c["default"].createElement(f["default"],o({},x,{onClick:r,bsStyle:p,bsSize:d,disabled:v,target:i,href:l}),n),c["default"].createElement(m["default"],{"aria-label":u||n,bsStyle:p,bsSize:d,disabled:v}),c["default"].createElement(h["default"].Menu,null,t))},t}(c["default"].Component);x.propTypes=o({},h["default"].propTypes,{bsStyle:f["default"].propTypes.bsStyle,onClick:function(){},target:c["default"].PropTypes.string,href:c["default"].PropTypes.string,title:c["default"].PropTypes.node.isRequired,toggleLabel:c["default"].PropTypes.string}),x.defaultProps={disabled:!1,dropup:!1,pullRight:!1},x.Toggle=m["default"],t["default"]=x,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(341)["default"],i=n(348)["default"],o=n(307)["default"],a=n(300)["default"];t.__esModule=!0;var s=n(106),l=a(s),u=n(464),c=a(u),d=function(e){function t(){i(this,t),e.apply(this,arguments)}return r(t,e),t.prototype.render=function(){return l["default"].createElement(c["default"],o({},this.props,{useAnchor:!1,noCaret:!1}))},t}(l["default"].Component);t["default"]=d,d.defaultProps=c["default"].defaultProps,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(307)["default"],i=n(300)["default"];t.__esModule=!0;var o=n(106),a=i(o),s=n(137),l=i(s),u=n(335),c=i(u),d=n(306),f=i(d),p=n(362),h=i(p),g=a["default"].createClass({displayName:"Tab",propTypes:{active:a["default"].PropTypes.bool,animation:a["default"].PropTypes.bool,onAnimateOutEnd:a["default"].PropTypes.func,disabled:a["default"].PropTypes.bool,title:a["default"].PropTypes.node,tabClassName:a["default"].PropTypes.string},getDefaultProps:function(){return{bsClass:"tab",animation:!0}},getInitialState:function(){return{animateIn:!1,animateOut:!1}},componentWillReceiveProps:function(e){this.props.animation&&(this.state.animateIn||!e.active||this.props.active?this.state.animateOut||e.active||!this.props.active||this.setState({animateOut:!0}):this.setState({animateIn:!0}))},componentDidUpdate:function(){this.state.animateIn&&setTimeout(this.startAnimateIn,0),this.state.animateOut&&h["default"].addEndEventListener(l["default"].findDOMNode(this),this.stopAnimateOut)},startAnimateIn:function(){this.isMounted()&&this.setState({animateIn:!1})},stopAnimateOut:function(){this.isMounted()&&(this.setState({animateOut:!1}),this.props.onAnimateOutEnd&&this.props.onAnimateOutEnd())},render:function(){var e,t=(e={},e[f["default"].prefix(this.props,"pane")]=!0,e.fade=!0,e.active=this.props.active||this.state.animateOut,e["in"]=this.props.active&&!this.state.animateIn,e);return a["default"].createElement("div",r({},this.props,{title:void 0,role:"tabpanel","aria-hidden":!this.props.active,className:c["default"](this.props.className,t)}),this.props.children)}});t["default"]=g,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(307)["default"],i=n(300)["default"];t.__esModule=!0;var o=n(106),a=i(o),s=n(335),l=i(s),u=a["default"].createClass({displayName:"Table",propTypes:{striped:a["default"].PropTypes.bool,bordered:a["default"].PropTypes.bool,condensed:a["default"].PropTypes.bool,hover:a["default"].PropTypes.bool,responsive:a["default"].PropTypes.bool},getDefaultProps:function(){return{bordered:!1,condensed:!1,hover:!1,responsive:!1,striped:!1}},render:function(){var e={table:!0,"table-striped":this.props.striped,"table-bordered":this.props.bordered,"table-condensed":this.props.condensed,"table-hover":this.props.hover},t=a["default"].createElement("table",r({},this.props,{className:l["default"](this.props.className,e)}),this.props.children);return this.props.responsive?a["default"].createElement("div",{className:"table-responsive"},t):t}});t["default"]=u,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){var t=void 0;return N["default"].forEach(e,function(e){null==t&&(t=e.props.eventKey)}),t}function i(e,t,n,r){function i(){var t=n.indexOf(s);return s=r?n[Math.min(o,t+1)]:n[Math.max(0,t-1)],O(e,function(e){return e.props.eventKey===s})}for(var o=n.length-1,a=n[r?Math.max(o,0):0],s=t,l=i();l.props.eventKey!==a&&l.props.disabled;)l=i();return l.props.disabled?t:l.props.eventKey}var o=n(307)["default"],a=n(334)["default"],s=n(326)["default"],l=n(300)["default"];t.__esModule=!0;var u=n(335),c=l(u),d=n(106),f=l(d),p=n(137),h=l(p),g=n(364),m=l(g),v=n(514),b=l(v),y=n(523),w=l(y),x=n(323),_=l(x),E=n(385),C=l(E),k=n(304),S=l(k),A=n(306),T=l(A),D=n(305),N=l(D),F=function(e,t){return t.props.id?t.props.id:e.id&&e.id+"___pane___"+t.props.eventKey},M=function(e,t){return t.props.id?t.props.id+"___tab":e.id&&e.id+"___tab___"+t.props.eventKey},O=N["default"].find,L=f["default"].createClass({displayName:"Tabs",propTypes:{activeKey:f["default"].PropTypes.any,defaultActiveKey:f["default"].PropTypes.any,bsStyle:f["default"].PropTypes.oneOf(["tabs","pills"]),animation:f["default"].PropTypes.bool,id:f["default"].PropTypes.oneOfType([f["default"].PropTypes.string,f["default"].PropTypes.number]),onSelect:f["default"].PropTypes.func,position:f["default"].PropTypes.oneOf(["top","left","right"]),tabWidth:f["default"].PropTypes.oneOfType([f["default"].PropTypes.number,f["default"].PropTypes.object]),paneWidth:f["default"].PropTypes.oneOfType([f["default"].PropTypes.number,f["default"].PropTypes.object]),standalone:f["default"].PropTypes.bool},getDefaultProps:function(){return{bsClass:"tab",animation:!0,tabWidth:2,position:"top",standalone:!1}},getInitialState:function(){var e=null!=this.props.defaultActiveKey?this.props.defaultActiveKey:r(this.props.children);return{activeKey:e,previousActiveKey:null}},componentWillReceiveProps:function(e){var t=this;null!=e.activeKey&&e.activeKey!==this.props.activeKey&&!function(){var n=t.props.activeKey;f["default"].Children.forEach(e.children,function(e){if(f["default"].isValidElement(e)&&e.props.eventKey===n)return void t.setState({previousActiveKey:n})})}()},componentDidUpdate:function(){var e=this._tabs,t=this._eventKeys().indexOf(this.getActiveKey());if(this._needsRefocus&&(this._needsRefocus=!1,e&&t!==-1)){var n=h["default"].findDOMNode(e[t]);n&&n.firstChild.focus()}},handlePaneAnimateOutEnd:function(){this.setState({previousActiveKey:null})},render:function(){var e=this.props,t=e.id,n=e.className,r=e.style,i=e.position,s=e.bsStyle,l=e.tabWidth,u=e.paneWidth,d=e.standalone,p=e.children,h=a(e,["id","className","style","position","bsStyle","tabWidth","paneWidth","standalone","children"]),g="left"===i||"right"===i;null==s&&(s=g?"pills":"tabs");var v={id:t,className:n,style:r},y=o({},h,{bsStyle:s,bsClass:void 0,stacked:g,activeKey:this.getActiveKey(),onSelect:this.handleSelect,ref:"tabs",role:"tablist"}),w=N["default"].map(p,this.renderTab),x={className:T["default"].prefix(this.props,"content"),ref:"panes"},_=N["default"].map(p,this.renderPane);if(g){d||(v.className=c["default"](v.className,"clearfix"));var E=this.getColProps({tabWidth:l,paneWidth:u}),C=E.tabsColProps,k=E.panesColProps,S=f["default"].createElement(m["default"],o({componentClass:b["default"]},y,C),w),A=f["default"].createElement(m["default"],o({},x,k),_);return"left"===i?f["default"].createElement("div",v,S,A):f["default"].createElement("div",v,A,S)}return f["default"].createElement("div",v,f["default"].createElement(b["default"],y,w),f["default"].createElement("div",x,_))},getActiveKey:function(){return void 0!==this.props.activeKey?this.props.activeKey:this.state.activeKey},renderPane:function(e,t){var n=this.state.previousActiveKey,r=e.props.eventKey===this.getActiveKey(),i=null==n,o=null!=n&&e.props.eventKey===n;return d.cloneElement(e,{active:r&&(i||!this.props.animation),id:F(this.props,e),"aria-labelledby":M(this.props,e),key:e.key?e.key:t,animation:this.props.animation,onAnimateOutEnd:o?this.handlePaneAnimateOutEnd:null})},renderTab:function(e,t){var n=this;if(null==e.props.title)return null;var r=e.props,i=r.eventKey,o=r.title,a=r.disabled,s=r.onKeyDown,l=r.tabClassName,u=r.tabIndex,c=void 0===u?0:u,d=this.getActiveKey()===i;return f["default"].createElement(w["default"],{linkId:M(this.props,e),ref:function(e){return(n._tabs||(n._tabs=[]))[t]=e},"aria-controls":F(this.props,e),onKeyDown:S["default"](this.handleKeyDown,s),eventKey:i,tabIndex:d?c:-1,disabled:a,className:l},o)},getColProps:function(e){var t=e.tabWidth,n=e.paneWidth,r=void 0;r=t instanceof Object?t:{xs:t};var i=void 0;return null==n?(i={},s(r).forEach(function(e){i[e]=_["default"].GRID_COLUMNS-r[e]})):i=n instanceof Object?n:{xs:n},{tabsColProps:r,panesColProps:i}},shouldComponentUpdate:function(){return!this._isChanging},handleSelect:function(e){if(this.props.onSelect)return this._isChanging=!0,this.props.onSelect(e),void(this._isChanging=!1);var t=this.getActiveKey();e!==t&&this.setState({activeKey:e,previousActiveKey:t})},handleKeyDown:function(e){var t=this._eventKeys(),n=this.getActiveKey()||t[0],r=void 0;switch(e.keyCode){case C["default"].codes.left:case C["default"].codes.up:r=i(this.props.children,n,t,!1),r&&r!==n&&(e.preventDefault(),this.handleSelect(r),this._needsRefocus=!0);break;case C["default"].codes.right:case C["default"].codes.down:r=i(this.props.children,n,t,!0),r&&r!==n&&(e.preventDefault(),this.handleSelect(r),this._needsRefocus=!0)}},_eventKeys:function(){var e=[];return N["default"].forEach(this.props.children,function(t){var n=t.props.eventKey;return e.push(n)}),e}});t["default"]=L,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(307)["default"],i=n(300)["default"];t.__esModule=!0;var o=n(106),a=i(o),s=n(335),l=i(s),u=n(340),c=i(u),d=n(306),f=i(d),p=a["default"].createClass({displayName:"Thumbnail",propTypes:{alt:a["default"].PropTypes.string,href:a["default"].PropTypes.string,src:a["default"].PropTypes.string},render:function(){var e=f["default"].getClassSet(this.props);return this.props.href?a["default"].createElement(c["default"],r({},this.props,{href:this.props.href,className:l["default"](this.props.className,e)}),a["default"].createElement("img",{src:this.props.src,alt:this.props.alt})):this.props.children?a["default"].createElement("div",r({},this.props,{className:l["default"](this.props.className,e)}),a["default"].createElement("img",{src:this.props.src,alt:this.props.alt}),a["default"].createElement("div",{className:"caption"},this.props.children)):a["default"].createElement("div",r({},this.props,{className:l["default"](this.props.className,e)}),a["default"].createElement("img",{src:this.props.src,alt:this.props.alt}))}});t["default"]=d.bsClass("thumbnail",p),e.exports=t["default"]},function(e,t,n){"use strict";var r=n(307)["default"],i=n(300)["default"];t.__esModule=!0;var o=n(106),a=i(o),s=n(335),l=i(s),u=n(306),c=i(u),d=n(454),f=i(d),p=a["default"].createClass({displayName:"Tooltip",propTypes:{id:f["default"](a["default"].PropTypes.oneOfType([a["default"].PropTypes.string,a["default"].PropTypes.number])),placement:a["default"].PropTypes.oneOf(["top","right","bottom","left"]),positionLeft:a["default"].PropTypes.number,positionTop:a["default"].PropTypes.number,arrowOffsetLeft:a["default"].PropTypes.oneOfType([a["default"].PropTypes.number,a["default"].PropTypes.string]),arrowOffsetTop:a["default"].PropTypes.oneOfType([a["default"].PropTypes.number,a["default"].PropTypes.string]),title:a["default"].PropTypes.node},getDefaultProps:function(){return{bsClass:"tooltip",placement:"right"}},render:function(){var e,t=(e={},e[c["default"].prefix(this.props)]=!0,e[this.props.placement]=!0,e),n=r({left:this.props.positionLeft,top:this.props.positionTop},this.props.style),i={left:this.props.arrowOffsetLeft,top:this.props.arrowOffsetTop};return a["default"].createElement("div",r({role:"tooltip"},this.props,{className:l["default"](this.props.className,t),style:n}),a["default"].createElement("div",{className:c["default"].prefix(this.props,"arrow"),style:i}),a["default"].createElement("div",{className:c["default"].prefix(this.props,"inner")},this.props.children))}});t["default"]=p,e.exports=t["default"]},function(e,t,n){"use strict";var r=n(341)["default"],i=n(348)["default"],o=n(307)["default"],a=n(300)["default"];t.__esModule=!0;var s=n(106),l=a(s),u=n(335),c=a(u),d=n(306),f=a(d),p=n(323),h=function(e){function t(){i(this,n),e.apply(this,arguments)}r(t,e),t.prototype.render=function(){var e=f["default"].getClassSet(this.props);return l["default"].createElement("div",o({},this.props,{className:c["default"](this.props.className,e)}),this.props.children)};var n=t;return t=d.bsSizes([p.Sizes.LARGE,p.Sizes.SMALL])(t)||t,t=d.bsClass("well")(t)||t}(l["default"].Component);t["default"]=h,e.exports=t["default"]},function(e,t,n){var r,i;!function(e){function t(e){var t=e.length,r=n.type(e);return"function"!==r&&!n.isWindow(e)&&(!(1!==e.nodeType||!t)||("array"===r||0===t||"number"==typeof t&&t>0&&t-1 in e))}if(!e.jQuery){var n=function(e,t){return new n.fn.init(e,t)};n.isWindow=function(e){return null!=e&&e==e.window},n.type=function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?i[a.call(e)]||"object":typeof e},n.isArray=Array.isArray||function(e){return"array"===n.type(e)},n.isPlainObject=function(e){var t;if(!e||"object"!==n.type(e)||e.nodeType||n.isWindow(e))return!1;try{if(e.constructor&&!o.call(e,"constructor")&&!o.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(r){return!1}for(t in e);return void 0===t||o.call(e,t)},n.each=function(e,n,r){var i,o=0,a=e.length,s=t(e);if(r){if(s)for(;o<a&&(i=n.apply(e[o],r),i!==!1);o++);else for(o in e)if(i=n.apply(e[o],r),i===!1)break}else if(s)for(;o<a&&(i=n.call(e[o],o,e[o]),i!==!1);o++);else for(o in e)if(i=n.call(e[o],o,e[o]),i===!1)break;return e},n.data=function(e,t,i){if(void 0===i){var o=e[n.expando],a=o&&r[o];if(void 0===t)return a;if(a&&t in a)return a[t]}else if(void 0!==t){var o=e[n.expando]||(e[n.expando]=++n.uuid);return r[o]=r[o]||{},r[o][t]=i,i}},n.removeData=function(e,t){var i=e[n.expando],o=i&&r[i];o&&n.each(t,function(e,t){delete o[t]})},n.extend=function(){var e,t,r,i,o,a,s=arguments[0]||{},l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[l]||{},l++),"object"!=typeof s&&"function"!==n.type(s)&&(s={}),l===u&&(s=this,l--);l<u;l++)if(null!=(o=arguments[l]))for(i in o)e=s[i],r=o[i],s!==r&&(c&&r&&(n.isPlainObject(r)||(t=n.isArray(r)))?(t?(t=!1,a=e&&n.isArray(e)?e:[]):a=e&&n.isPlainObject(e)?e:{},s[i]=n.extend(c,a,r)):void 0!==r&&(s[i]=r));return s},n.queue=function(e,r,i){function o(e,n){var r=n||[];return null!=e&&(t(Object(e))?!function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;)e[i++]=t[r++];if(n!==n)for(;void 0!==t[r];)e[i++]=t[r++];return e.length=i,e}(r,"string"==typeof e?[e]:e):[].push.call(r,e)),r}if(e){r=(r||"fx")+"queue";var a=n.data(e,r);return i?(!a||n.isArray(i)?a=n.data(e,r,o(i)):a.push(i),a):a||[]}},n.dequeue=function(e,t){n.each(e.nodeType?[e]:e,function(e,r){t=t||"fx";var i=n.queue(r,t),o=i.shift();
"inprogress"===o&&(o=i.shift()),o&&("fx"===t&&i.unshift("inprogress"),o.call(r,function(){n.dequeue(r,t)}))})},n.fn=n.prototype={init:function(e){if(e.nodeType)return this[0]=e,this;throw new Error("Not a DOM node.")},offset:function(){var t=this[0].getBoundingClientRect?this[0].getBoundingClientRect():{top:0,left:0};return{top:t.top+(e.pageYOffset||document.scrollTop||0)-(document.clientTop||0),left:t.left+(e.pageXOffset||document.scrollLeft||0)-(document.clientLeft||0)}},position:function(){function e(){for(var e=this.offsetParent||document;e&&"html"===!e.nodeType.toLowerCase&&"static"===e.style.position;)e=e.offsetParent;return e||document}var t=this[0],e=e.apply(t),r=this.offset(),i=/^(?:body|html)$/i.test(e.nodeName)?{top:0,left:0}:n(e).offset();return r.top-=parseFloat(t.style.marginTop)||0,r.left-=parseFloat(t.style.marginLeft)||0,e.style&&(i.top+=parseFloat(e.style.borderTopWidth)||0,i.left+=parseFloat(e.style.borderLeftWidth)||0),{top:r.top-i.top,left:r.left-i.left}}};var r={};n.expando="velocity"+(new Date).getTime(),n.uuid=0;for(var i={},o=i.hasOwnProperty,a=i.toString,s="Boolean Number String Function Array Date RegExp Object Error".split(" "),l=0;l<s.length;l++)i["[object "+s[l]+"]"]=s[l].toLowerCase();n.fn.init.prototype=n.fn,e.Velocity={Utilities:n}}}(window),function(o){"object"==typeof e&&"object"==typeof e.exports?e.exports=o():(r=o,i="function"==typeof r?r.call(t,n,t,e):r,!(void 0!==i&&(e.exports=i)))}(function(){return function(e,t,n,r){function i(e){for(var t=-1,n=e?e.length:0,r=[];++t<n;){var i=e[t];i&&r.push(i)}return r}function o(e){return g.isWrapped(e)?e=[].slice.call(e):g.isNode(e)&&(e=[e]),e}function a(e){var t=f.data(e,"velocity");return null===t?r:t}function s(e){return function(t){return Math.round(t*e)*(1/e)}}function l(e,n,r,i){function o(e,t){return 1-3*t+3*e}function a(e,t){return 3*t-6*e}function s(e){return 3*e}function l(e,t,n){return((o(t,n)*e+a(t,n))*e+s(t))*e}function u(e,t,n){return 3*o(t,n)*e*e+2*a(t,n)*e+s(t)}function c(t,n){for(var i=0;i<g;++i){var o=u(n,e,r);if(0===o)return n;var a=l(n,e,r)-t;n-=a/o}return n}function d(){for(var t=0;t<y;++t)E[t]=l(t*w,e,r)}function f(t,n,i){var o,a,s=0;do a=n+(i-n)/2,o=l(a,e,r)-t,o>0?i=a:n=a;while(Math.abs(o)>v&&++s<b);return a}function p(t){for(var n=0,i=1,o=y-1;i!=o&&E[i]<=t;++i)n+=w;--i;var a=(t-E[i])/(E[i+1]-E[i]),s=n+a*w,l=u(s,e,r);return l>=m?c(t,s):0==l?s:f(t,n,n+w)}function h(){C=!0,e==n&&r==i||d()}var g=4,m=.001,v=1e-7,b=10,y=11,w=1/(y-1),x="Float32Array"in t;if(4!==arguments.length)return!1;for(var _=0;_<4;++_)if("number"!=typeof arguments[_]||isNaN(arguments[_])||!isFinite(arguments[_]))return!1;e=Math.min(e,1),r=Math.min(r,1),e=Math.max(e,0),r=Math.max(r,0);var E=x?new Float32Array(y):new Array(y),C=!1,k=function(t){return C||h(),e===n&&r===i?t:0===t?0:1===t?1:l(p(t),n,i)};k.getControlPoints=function(){return[{x:e,y:n},{x:r,y:i}]};var S="generateBezier("+[e,n,r,i]+")";return k.toString=function(){return S},k}function u(e,t){var n=e;return g.isString(e)?y.Easings[e]||(n=!1):n=g.isArray(e)&&1===e.length?s.apply(null,e):g.isArray(e)&&2===e.length?w.apply(null,e.concat([t])):!(!g.isArray(e)||4!==e.length)&&l.apply(null,e),n===!1&&(n=y.Easings[y.defaults.easing]?y.defaults.easing:b),n}function c(e){if(e){var t=(new Date).getTime(),n=y.State.calls.length;n>1e4&&(y.State.calls=i(y.State.calls));for(var o=0;o<n;o++)if(y.State.calls[o]){var s=y.State.calls[o],l=s[0],u=s[2],p=s[3],h=!!p,m=null;p||(p=y.State.calls[o][3]=t-16);for(var v=Math.min((t-p)/u.duration,1),b=0,w=l.length;b<w;b++){var _=l[b],C=_.element;if(a(C)){var k=!1;if(u.display!==r&&null!==u.display&&"none"!==u.display){if("flex"===u.display){var S=["-webkit-box","-moz-box","-ms-flexbox","-webkit-flex"];f.each(S,function(e,t){x.setPropertyValue(C,"display",t)})}x.setPropertyValue(C,"display",u.display)}u.visibility!==r&&"hidden"!==u.visibility&&x.setPropertyValue(C,"visibility",u.visibility);for(var A in _)if("element"!==A){var T,D=_[A],N=g.isString(D.easing)?y.Easings[D.easing]:D.easing;if(1===v)T=D.endValue;else{var F=D.endValue-D.startValue;if(T=D.startValue+F*N(v,u,F),!h&&T===D.currentValue)continue}if(D.currentValue=T,"tween"===A)m=T;else{if(x.Hooks.registered[A]){var M=x.Hooks.getRoot(A),O=a(C).rootPropertyValueCache[M];O&&(D.rootPropertyValue=O)}var L=x.setPropertyValue(C,A,D.currentValue+(0===parseFloat(T)?"":D.unitType),D.rootPropertyValue,D.scrollData);x.Hooks.registered[A]&&(x.Normalizations.registered[M]?a(C).rootPropertyValueCache[M]=x.Normalizations.registered[M]("extract",null,L[1]):a(C).rootPropertyValueCache[M]=L[1]),"transform"===L[0]&&(k=!0)}}u.mobileHA&&a(C).transformCache.translate3d===r&&(a(C).transformCache.translate3d="(0px, 0px, 0px)",k=!0),k&&x.flushTransformCache(C)}}u.display!==r&&"none"!==u.display&&(y.State.calls[o][2].display=!1),u.visibility!==r&&"hidden"!==u.visibility&&(y.State.calls[o][2].visibility=!1),u.progress&&u.progress.call(s[1],s[1],v,Math.max(0,p+u.duration-t),p,m),1===v&&d(o)}}y.State.isTicking&&E(c)}function d(e,t){if(!y.State.calls[e])return!1;for(var n=y.State.calls[e][0],i=y.State.calls[e][1],o=y.State.calls[e][2],s=y.State.calls[e][4],l=!1,u=0,c=n.length;u<c;u++){var d=n[u].element;if(t||o.loop||("none"===o.display&&x.setPropertyValue(d,"display",o.display),"hidden"===o.visibility&&x.setPropertyValue(d,"visibility",o.visibility)),o.loop!==!0&&(f.queue(d)[1]===r||!/\.velocityQueueEntryFlag/i.test(f.queue(d)[1]))&&a(d)){a(d).isAnimating=!1,a(d).rootPropertyValueCache={};var p=!1;f.each(x.Lists.transforms3D,function(e,t){var n=/^scale/.test(t)?1:0,i=a(d).transformCache[t];a(d).transformCache[t]!==r&&new RegExp("^\\("+n+"[^.]").test(i)&&(p=!0,delete a(d).transformCache[t])}),o.mobileHA&&(p=!0,delete a(d).transformCache.translate3d),p&&x.flushTransformCache(d),x.Values.removeClass(d,"velocity-animating")}if(!t&&o.complete&&!o.loop&&u===c-1)try{o.complete.call(i,i)}catch(h){setTimeout(function(){throw h},1)}s&&o.loop!==!0&&s(i),a(d)&&o.loop===!0&&!t&&(f.each(a(d).tweensContainer,function(e,t){/^rotate/.test(e)&&360===parseFloat(t.endValue)&&(t.endValue=0,t.startValue=360),/^backgroundPosition/.test(e)&&100===parseFloat(t.endValue)&&"%"===t.unitType&&(t.endValue=0,t.startValue=100)}),y(d,"reverse",{loop:!0,delay:o.delay})),o.queue!==!1&&f.dequeue(d,o.queue)}y.State.calls[e]=!1;for(var g=0,m=y.State.calls.length;g<m;g++)if(y.State.calls[g]!==!1){l=!0;break}l===!1&&(y.State.isTicking=!1,delete y.State.calls,y.State.calls=[])}var f,p=function(){if(n.documentMode)return n.documentMode;for(var e=7;e>4;e--){var t=n.createElement("div");if(t.innerHTML="<!--[if IE "+e+"]><span></span><![endif]-->",t.getElementsByTagName("span").length)return t=null,e}return r}(),h=function(){var e=0;return t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||function(t){var n,r=(new Date).getTime();return n=Math.max(0,16-(r-e)),e=r+n,setTimeout(function(){t(r+n)},n)}}(),g={isString:function(e){return"string"==typeof e},isArray:Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},isFunction:function(e){return"[object Function]"===Object.prototype.toString.call(e)},isNode:function(e){return e&&e.nodeType},isNodeList:function(e){return"object"==typeof e&&/^\[object (HTMLCollection|NodeList|Object)\]$/.test(Object.prototype.toString.call(e))&&e.length!==r&&(0===e.length||"object"==typeof e[0]&&e[0].nodeType>0)},isWrapped:function(e){return e&&(e.jquery||t.Zepto&&t.Zepto.zepto.isZ(e))},isSVG:function(e){return t.SVGElement&&e instanceof t.SVGElement},isEmptyObject:function(e){for(var t in e)return!1;return!0}},m=!1;if(e.fn&&e.fn.jquery?(f=e,m=!0):f=t.Velocity.Utilities,p<=8&&!m)throw new Error("Velocity: IE8 and below require jQuery to be loaded before Velocity.");if(p<=7)return void(jQuery.fn.velocity=jQuery.fn.animate);var v=400,b="swing",y={State:{isMobile:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),isAndroid:/Android/i.test(navigator.userAgent),isGingerbread:/Android 2\.3\.[3-7]/i.test(navigator.userAgent),isChrome:t.chrome,isFirefox:/Firefox/i.test(navigator.userAgent),prefixElement:n.createElement("div"),prefixMatches:{},scrollAnchor:null,scrollPropertyLeft:null,scrollPropertyTop:null,isTicking:!1,calls:[]},CSS:{},Utilities:f,Redirects:{},Easings:{},Promise:t.Promise,defaults:{queue:"",duration:v,easing:b,begin:r,complete:r,progress:r,display:r,visibility:r,loop:!1,delay:!1,mobileHA:!0,_cacheValues:!0},init:function(e){f.data(e,"velocity",{isSVG:g.isSVG(e),isAnimating:!1,computedStyle:null,tweensContainer:null,rootPropertyValueCache:{},transformCache:{}})},hook:null,mock:!1,version:{major:1,minor:2,patch:2},debug:!1};t.pageYOffset!==r?(y.State.scrollAnchor=t,y.State.scrollPropertyLeft="pageXOffset",y.State.scrollPropertyTop="pageYOffset"):(y.State.scrollAnchor=n.documentElement||n.body.parentNode||n.body,y.State.scrollPropertyLeft="scrollLeft",y.State.scrollPropertyTop="scrollTop");var w=function(){function e(e){return-e.tension*e.x-e.friction*e.v}function t(t,n,r){var i={x:t.x+r.dx*n,v:t.v+r.dv*n,tension:t.tension,friction:t.friction};return{dx:i.v,dv:e(i)}}function n(n,r){var i={dx:n.v,dv:e(n)},o=t(n,.5*r,i),a=t(n,.5*r,o),s=t(n,r,a),l=1/6*(i.dx+2*(o.dx+a.dx)+s.dx),u=1/6*(i.dv+2*(o.dv+a.dv)+s.dv);return n.x=n.x+l*r,n.v=n.v+u*r,n}return function r(e,t,i){var o,a,s,l={x:-1,v:0,tension:null,friction:null},u=[0],c=0,d=1e-4,f=.016;for(e=parseFloat(e)||500,t=parseFloat(t)||20,i=i||null,l.tension=e,l.friction=t,o=null!==i,o?(c=r(e,t),a=c/i*f):a=f;;)if(s=n(s||l,a),u.push(1+s.x),c+=16,!(Math.abs(s.x)>d&&Math.abs(s.v)>d))break;return o?function(e){return u[e*(u.length-1)|0]}:c}}();y.Easings={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},spring:function(e){return 1-Math.cos(4.5*e*Math.PI)*Math.exp(6*-e)}},f.each([["ease",[.25,.1,.25,1]],["ease-in",[.42,0,1,1]],["ease-out",[0,0,.58,1]],["ease-in-out",[.42,0,.58,1]],["easeInSine",[.47,0,.745,.715]],["easeOutSine",[.39,.575,.565,1]],["easeInOutSine",[.445,.05,.55,.95]],["easeInQuad",[.55,.085,.68,.53]],["easeOutQuad",[.25,.46,.45,.94]],["easeInOutQuad",[.455,.03,.515,.955]],["easeInCubic",[.55,.055,.675,.19]],["easeOutCubic",[.215,.61,.355,1]],["easeInOutCubic",[.645,.045,.355,1]],["easeInQuart",[.895,.03,.685,.22]],["easeOutQuart",[.165,.84,.44,1]],["easeInOutQuart",[.77,0,.175,1]],["easeInQuint",[.755,.05,.855,.06]],["easeOutQuint",[.23,1,.32,1]],["easeInOutQuint",[.86,0,.07,1]],["easeInExpo",[.95,.05,.795,.035]],["easeOutExpo",[.19,1,.22,1]],["easeInOutExpo",[1,0,0,1]],["easeInCirc",[.6,.04,.98,.335]],["easeOutCirc",[.075,.82,.165,1]],["easeInOutCirc",[.785,.135,.15,.86]]],function(e,t){y.Easings[t[0]]=l.apply(null,t[1])});var x=y.CSS={RegEx:{isHex:/^#([A-f\d]{3}){1,2}$/i,valueUnwrap:/^[A-z]+\((.*)\)$/i,wrappedValueAlreadyExtracted:/[0-9.]+ [0-9.]+ [0-9.]+( [0-9.]+)?/,valueSplit:/([A-z]+\(.+\))|(([A-z0-9#-.]+?)(?=\s|$))/gi},Lists:{colors:["fill","stroke","stopColor","color","backgroundColor","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","outlineColor"],transformsBase:["translateX","translateY","scale","scaleX","scaleY","skewX","skewY","rotateZ"],transforms3D:["transformPerspective","translateZ","scaleZ","rotateX","rotateY"]},Hooks:{templates:{textShadow:["Color X Y Blur","black 0px 0px 0px"],boxShadow:["Color X Y Blur Spread","black 0px 0px 0px 0px"],clip:["Top Right Bottom Left","0px 0px 0px 0px"],backgroundPosition:["X Y","0% 0%"],transformOrigin:["X Y Z","50% 50% 0px"],perspectiveOrigin:["X Y","50% 50%"]},registered:{},register:function(){for(var e=0;e<x.Lists.colors.length;e++){var t="color"===x.Lists.colors[e]?"0 0 0 1":"255 255 255 1";x.Hooks.templates[x.Lists.colors[e]]=["Red Green Blue Alpha",t]}var n,r,i;if(p)for(n in x.Hooks.templates){r=x.Hooks.templates[n],i=r[0].split(" ");var o=r[1].match(x.RegEx.valueSplit);"Color"===i[0]&&(i.push(i.shift()),o.push(o.shift()),x.Hooks.templates[n]=[i.join(" "),o.join(" ")])}for(n in x.Hooks.templates){r=x.Hooks.templates[n],i=r[0].split(" ");for(var e in i){var a=n+i[e],s=e;x.Hooks.registered[a]=[n,s]}}},getRoot:function(e){var t=x.Hooks.registered[e];return t?t[0]:e},cleanRootPropertyValue:function(e,t){return x.RegEx.valueUnwrap.test(t)&&(t=t.match(x.RegEx.valueUnwrap)[1]),x.Values.isCSSNullValue(t)&&(t=x.Hooks.templates[e][1]),t},extractValue:function(e,t){var n=x.Hooks.registered[e];if(n){var r=n[0],i=n[1];return t=x.Hooks.cleanRootPropertyValue(r,t),t.toString().match(x.RegEx.valueSplit)[i]}return t},injectValue:function(e,t,n){var r=x.Hooks.registered[e];if(r){var i,o,a=r[0],s=r[1];return n=x.Hooks.cleanRootPropertyValue(a,n),i=n.toString().match(x.RegEx.valueSplit),i[s]=t,o=i.join(" ")}return n}},Normalizations:{registered:{clip:function(e,t,n){switch(e){case"name":return"clip";case"extract":var r;return x.RegEx.wrappedValueAlreadyExtracted.test(n)?r=n:(r=n.toString().match(x.RegEx.valueUnwrap),r=r?r[1].replace(/,(\s+)?/g," "):n),r;case"inject":return"rect("+n+")"}},blur:function(e,t,n){switch(e){case"name":return y.State.isFirefox?"filter":"-webkit-filter";case"extract":var r=parseFloat(n);if(!r&&0!==r){var i=n.toString().match(/blur\(([0-9]+[A-z]+)\)/i);r=i?i[1]:0}return r;case"inject":return parseFloat(n)?"blur("+n+")":"none"}},opacity:function(e,t,n){if(p<=8)switch(e){case"name":return"filter";case"extract":var r=n.toString().match(/alpha\(opacity=(.*)\)/i);return n=r?r[1]/100:1;case"inject":return t.style.zoom=1,parseFloat(n)>=1?"":"alpha(opacity="+parseInt(100*parseFloat(n),10)+")"}else switch(e){case"name":return"opacity";case"extract":return n;case"inject":return n}}},register:function(){p<=9||y.State.isGingerbread||(x.Lists.transformsBase=x.Lists.transformsBase.concat(x.Lists.transforms3D));for(var e=0;e<x.Lists.transformsBase.length;e++)!function(){var t=x.Lists.transformsBase[e];x.Normalizations.registered[t]=function(e,n,i){switch(e){case"name":return"transform";case"extract":return a(n)===r||a(n).transformCache[t]===r?/^scale/i.test(t)?1:0:a(n).transformCache[t].replace(/[()]/g,"");case"inject":var o=!1;switch(t.substr(0,t.length-1)){case"translate":o=!/(%|px|em|rem|vw|vh|\d)$/i.test(i);break;case"scal":case"scale":y.State.isAndroid&&a(n).transformCache[t]===r&&i<1&&(i=1),o=!/(\d)$/i.test(i);break;case"skew":o=!/(deg|\d)$/i.test(i);break;case"rotate":o=!/(deg|\d)$/i.test(i)}return o||(a(n).transformCache[t]="("+i+")"),a(n).transformCache[t]}}}();for(var e=0;e<x.Lists.colors.length;e++)!function(){var t=x.Lists.colors[e];x.Normalizations.registered[t]=function(e,n,i){switch(e){case"name":return t;case"extract":var o;if(x.RegEx.wrappedValueAlreadyExtracted.test(i))o=i;else{var a,s={black:"rgb(0, 0, 0)",blue:"rgb(0, 0, 255)",gray:"rgb(128, 128, 128)",green:"rgb(0, 128, 0)",red:"rgb(255, 0, 0)",white:"rgb(255, 255, 255)"};/^[A-z]+$/i.test(i)?a=s[i]!==r?s[i]:s.black:x.RegEx.isHex.test(i)?a="rgb("+x.Values.hexToRgb(i).join(" ")+")":/^rgba?\(/i.test(i)||(a=s.black),o=(a||i).toString().match(x.RegEx.valueUnwrap)[1].replace(/,(\s+)?/g," ")}return p<=8||3!==o.split(" ").length||(o+=" 1"),o;case"inject":return p<=8?4===i.split(" ").length&&(i=i.split(/\s+/).slice(0,3).join(" ")):3===i.split(" ").length&&(i+=" 1"),(p<=8?"rgb":"rgba")+"("+i.replace(/\s+/g,",").replace(/\.(\d)+(?=,)/g,"")+")"}}}()}},Names:{camelCase:function(e){return e.replace(/-(\w)/g,function(e,t){return t.toUpperCase()})},SVGAttribute:function(e){var t="width|height|x|y|cx|cy|r|rx|ry|x1|x2|y1|y2";return(p||y.State.isAndroid&&!y.State.isChrome)&&(t+="|transform"),new RegExp("^("+t+")$","i").test(e)},prefixCheck:function(e){if(y.State.prefixMatches[e])return[y.State.prefixMatches[e],!0];for(var t=["","Webkit","Moz","ms","O"],n=0,r=t.length;n<r;n++){var i;if(i=0===n?e:t[n]+e.replace(/^\w/,function(e){return e.toUpperCase()}),g.isString(y.State.prefixElement.style[i]))return y.State.prefixMatches[e]=i,[i,!0]}return[e,!1]}},Values:{hexToRgb:function(e){var t,n=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,r=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i;return e=e.replace(n,function(e,t,n,r){return t+t+n+n+r+r}),t=r.exec(e),t?[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]:[0,0,0]},isCSSNullValue:function(e){return 0==e||/^(none|auto|transparent|(rgba\(0, ?0, ?0, ?0\)))$/i.test(e)},getUnitType:function(e){return/^(rotate|skew)/i.test(e)?"deg":/(^(scale|scaleX|scaleY|scaleZ|alpha|flexGrow|flexHeight|zIndex|fontWeight)$)|((opacity|red|green|blue|alpha)$)/i.test(e)?"":"px"},getDisplayType:function(e){var t=e&&e.tagName.toString().toLowerCase();return/^(b|big|i|small|tt|abbr|acronym|cite|code|dfn|em|kbd|strong|samp|var|a|bdo|br|img|map|object|q|script|span|sub|sup|button|input|label|select|textarea)$/i.test(t)?"inline":/^(li)$/i.test(t)?"list-item":/^(tr)$/i.test(t)?"table-row":/^(table)$/i.test(t)?"table":/^(tbody)$/i.test(t)?"table-row-group":"block"},addClass:function(e,t){e.classList?e.classList.add(t):e.className+=(e.className.length?" ":"")+t},removeClass:function(e,t){e.classList?e.classList.remove(t):e.className=e.className.toString().replace(new RegExp("(^|\\s)"+t.split(" ").join("|")+"(\\s|$)","gi")," ")}},getPropertyValue:function(e,n,i,o){function s(e,n){function i(){u&&x.setPropertyValue(e,"display","none")}var l=0;if(p<=8)l=f.css(e,n);else{var u=!1;if(/^(width|height)$/.test(n)&&0===x.getPropertyValue(e,"display")&&(u=!0,x.setPropertyValue(e,"display",x.Values.getDisplayType(e))),!o){if("height"===n&&"border-box"!==x.getPropertyValue(e,"boxSizing").toString().toLowerCase()){var c=e.offsetHeight-(parseFloat(x.getPropertyValue(e,"borderTopWidth"))||0)-(parseFloat(x.getPropertyValue(e,"borderBottomWidth"))||0)-(parseFloat(x.getPropertyValue(e,"paddingTop"))||0)-(parseFloat(x.getPropertyValue(e,"paddingBottom"))||0);return i(),c}if("width"===n&&"border-box"!==x.getPropertyValue(e,"boxSizing").toString().toLowerCase()){var d=e.offsetWidth-(parseFloat(x.getPropertyValue(e,"borderLeftWidth"))||0)-(parseFloat(x.getPropertyValue(e,"borderRightWidth"))||0)-(parseFloat(x.getPropertyValue(e,"paddingLeft"))||0)-(parseFloat(x.getPropertyValue(e,"paddingRight"))||0);return i(),d}}var h;h=a(e)===r?t.getComputedStyle(e,null):a(e).computedStyle?a(e).computedStyle:a(e).computedStyle=t.getComputedStyle(e,null),"borderColor"===n&&(n="borderTopColor"),l=9===p&&"filter"===n?h.getPropertyValue(n):h[n],""!==l&&null!==l||(l=e.style[n]),i()}if("auto"===l&&/^(top|right|bottom|left)$/i.test(n)){var g=s(e,"position");("fixed"===g||"absolute"===g&&/top|left/i.test(n))&&(l=f(e).position()[n]+"px")}return l}var l;if(x.Hooks.registered[n]){var u=n,c=x.Hooks.getRoot(u);i===r&&(i=x.getPropertyValue(e,x.Names.prefixCheck(c)[0])),x.Normalizations.registered[c]&&(i=x.Normalizations.registered[c]("extract",e,i)),l=x.Hooks.extractValue(u,i)}else if(x.Normalizations.registered[n]){var d,h;d=x.Normalizations.registered[n]("name",e),"transform"!==d&&(h=s(e,x.Names.prefixCheck(d)[0]),x.Values.isCSSNullValue(h)&&x.Hooks.templates[n]&&(h=x.Hooks.templates[n][1])),l=x.Normalizations.registered[n]("extract",e,h)}if(!/^[\d-]/.test(l))if(a(e)&&a(e).isSVG&&x.Names.SVGAttribute(n))if(/^(height|width)$/i.test(n))try{l=e.getBBox()[n]}catch(g){l=0}else l=e.getAttribute(n);else l=s(e,x.Names.prefixCheck(n)[0]);return x.Values.isCSSNullValue(l)&&(l=0),y.debug>=2&&console.log("Get "+n+": "+l),l},setPropertyValue:function(e,n,r,i,o){var s=n;if("scroll"===n)o.container?o.container["scroll"+o.direction]=r:"Left"===o.direction?t.scrollTo(r,o.alternateValue):t.scrollTo(o.alternateValue,r);else if(x.Normalizations.registered[n]&&"transform"===x.Normalizations.registered[n]("name",e))x.Normalizations.registered[n]("inject",e,r),s="transform",r=a(e).transformCache[n];else{if(x.Hooks.registered[n]){var l=n,u=x.Hooks.getRoot(n);i=i||x.getPropertyValue(e,u),r=x.Hooks.injectValue(l,r,i),n=u}if(x.Normalizations.registered[n]&&(r=x.Normalizations.registered[n]("inject",e,r),n=x.Normalizations.registered[n]("name",e)),s=x.Names.prefixCheck(n)[0],p<=8)try{e.style[s]=r}catch(c){y.debug&&console.log("Browser does not support ["+r+"] for ["+s+"]")}else a(e)&&a(e).isSVG&&x.Names.SVGAttribute(n)?e.setAttribute(n,r):e.style[s]=r;y.debug>=2&&console.log("Set "+n+" ("+s+"): "+r)}return[s,r]},flushTransformCache:function(e){function t(t){return parseFloat(x.getPropertyValue(e,t))}var n="";if((p||y.State.isAndroid&&!y.State.isChrome)&&a(e).isSVG){var r={translate:[t("translateX"),t("translateY")],skewX:[t("skewX")],skewY:[t("skewY")],scale:1!==t("scale")?[t("scale"),t("scale")]:[t("scaleX"),t("scaleY")],rotate:[t("rotateZ"),0,0]};f.each(a(e).transformCache,function(e){/^translate/i.test(e)?e="translate":/^scale/i.test(e)?e="scale":/^rotate/i.test(e)&&(e="rotate"),r[e]&&(n+=e+"("+r[e].join(" ")+") ",delete r[e])})}else{var i,o;f.each(a(e).transformCache,function(t){return i=a(e).transformCache[t],"transformPerspective"===t?(o=i,!0):(9===p&&"rotateZ"===t&&(t="rotate"),void(n+=t+i+" "))}),o&&(n="perspective"+o+" "+n)}x.setPropertyValue(e,"transform",n)}};x.Hooks.register(),x.Normalizations.register(),y.hook=function(e,t,n){var i=r;return e=o(e),f.each(e,function(e,o){if(a(o)===r&&y.init(o),n===r)i===r&&(i=y.CSS.getPropertyValue(o,t));else{var s=y.CSS.setPropertyValue(o,t,n);"transform"===s[0]&&y.CSS.flushTransformCache(o),i=s}}),i};var _=function(){function e(){return s?A.promise||null:l}function i(){function e(e){function d(e,t){var n=r,i=r,a=r;return g.isArray(e)?(n=e[0],!g.isArray(e[1])&&/^[\d-]/.test(e[1])||g.isFunction(e[1])||x.RegEx.isHex.test(e[1])?a=e[1]:(g.isString(e[1])&&!x.RegEx.isHex.test(e[1])||g.isArray(e[1]))&&(i=t?e[1]:u(e[1],s.duration),e[2]!==r&&(a=e[2]))):n=e,t||(i=i||s.easing),g.isFunction(n)&&(n=n.call(o,C,E)),g.isFunction(a)&&(a=a.call(o,C,E)),[n||0,i,a]}function p(e,t){var n,r;return r=(t||"0").toString().toLowerCase().replace(/[%A-z]+$/,function(e){return n=e,""}),n||(n=x.Values.getUnitType(e)),[r,n]}function v(){var e={myParent:o.parentNode||n.body,position:x.getPropertyValue(o,"position"),fontSize:x.getPropertyValue(o,"fontSize")},r=e.position===L.lastPosition&&e.myParent===L.lastParent,i=e.fontSize===L.lastFontSize;L.lastParent=e.myParent,L.lastPosition=e.position,L.lastFontSize=e.fontSize;var s=100,l={};if(i&&r)l.emToPx=L.lastEmToPx,l.percentToPxWidth=L.lastPercentToPxWidth,l.percentToPxHeight=L.lastPercentToPxHeight;else{var u=a(o).isSVG?n.createElementNS("http://www.w3.org/2000/svg","rect"):n.createElement("div");y.init(u),e.myParent.appendChild(u),f.each(["overflow","overflowX","overflowY"],function(e,t){y.CSS.setPropertyValue(u,t,"hidden")}),y.CSS.setPropertyValue(u,"position",e.position),y.CSS.setPropertyValue(u,"fontSize",e.fontSize),y.CSS.setPropertyValue(u,"boxSizing","content-box"),f.each(["minWidth","maxWidth","width","minHeight","maxHeight","height"],function(e,t){y.CSS.setPropertyValue(u,t,s+"%")}),y.CSS.setPropertyValue(u,"paddingLeft",s+"em"),l.percentToPxWidth=L.lastPercentToPxWidth=(parseFloat(x.getPropertyValue(u,"width",null,!0))||1)/s,l.percentToPxHeight=L.lastPercentToPxHeight=(parseFloat(x.getPropertyValue(u,"height",null,!0))||1)/s,l.emToPx=L.lastEmToPx=(parseFloat(x.getPropertyValue(u,"paddingLeft"))||1)/s,e.myParent.removeChild(u)}return null===L.remToPx&&(L.remToPx=parseFloat(x.getPropertyValue(n.body,"fontSize"))||16),null===L.vwToPx&&(L.vwToPx=parseFloat(t.innerWidth)/100,L.vhToPx=parseFloat(t.innerHeight)/100),l.remToPx=L.remToPx,l.vwToPx=L.vwToPx,l.vhToPx=L.vhToPx,y.debug>=1&&console.log("Unit ratios: "+JSON.stringify(l),o),l}if(s.begin&&0===C)try{s.begin.call(h,h)}catch(w){setTimeout(function(){throw w},1)}if("scroll"===T){var _,k,S,D=/^x$/i.test(s.axis)?"Left":"Top",N=parseFloat(s.offset)||0;s.container?g.isWrapped(s.container)||g.isNode(s.container)?(s.container=s.container[0]||s.container,_=s.container["scroll"+D],S=_+f(o).position()[D.toLowerCase()]+N):s.container=null:(_=y.State.scrollAnchor[y.State["scrollProperty"+D]],k=y.State.scrollAnchor[y.State["scrollProperty"+("Left"===D?"Top":"Left")]],S=f(o).offset()[D.toLowerCase()]+N),l={scroll:{rootPropertyValue:!1,startValue:_,currentValue:_,endValue:S,unitType:"",easing:s.easing,scrollData:{container:s.container,direction:D,alternateValue:k}},element:o},y.debug&&console.log("tweensContainer (scroll): ",l.scroll,o)}else if("reverse"===T){if(!a(o).tweensContainer)return void f.dequeue(o,s.queue);"none"===a(o).opts.display&&(a(o).opts.display="auto"),"hidden"===a(o).opts.visibility&&(a(o).opts.visibility="visible"),a(o).opts.loop=!1,a(o).opts.begin=null,a(o).opts.complete=null,b.easing||delete s.easing,b.duration||delete s.duration,s=f.extend({},a(o).opts,s);var F=f.extend(!0,{},a(o).tweensContainer);for(var M in F)if("element"!==M){var O=F[M].startValue;F[M].startValue=F[M].currentValue=F[M].endValue,F[M].endValue=O,g.isEmptyObject(b)||(F[M].easing=s.easing),y.debug&&console.log("reverse tweensContainer ("+M+"): "+JSON.stringify(F[M]),o)}l=F}else if("start"===T){var F;a(o).tweensContainer&&a(o).isAnimating===!0&&(F=a(o).tweensContainer),f.each(m,function(e,t){if(RegExp("^"+x.Lists.colors.join("$|^")+"$").test(e)){var n=d(t,!0),i=n[0],o=n[1],a=n[2];if(x.RegEx.isHex.test(i)){for(var s=["Red","Green","Blue"],l=x.Values.hexToRgb(i),u=a?x.Values.hexToRgb(a):r,c=0;c<s.length;c++){var f=[l[c]];o&&f.push(o),u!==r&&f.push(u[c]),m[e+s[c]]=f}delete m[e]}}});for(var I in m){var R=d(m[I]),B=R[0],j=R[1],$=R[2];I=x.Names.camelCase(I);var V=x.Hooks.getRoot(I),U=!1;if(a(o).isSVG||"tween"===V||x.Names.prefixCheck(V)[1]!==!1||x.Normalizations.registered[V]!==r){(s.display!==r&&null!==s.display&&"none"!==s.display||s.visibility!==r&&"hidden"!==s.visibility)&&/opacity|filter/.test(I)&&!$&&0!==B&&($=0),s._cacheValues&&F&&F[I]?($===r&&($=F[I].endValue+F[I].unitType),U=a(o).rootPropertyValueCache[V]):x.Hooks.registered[I]?$===r?(U=x.getPropertyValue(o,V),$=x.getPropertyValue(o,I,U)):U=x.Hooks.templates[V][1]:$===r&&($=x.getPropertyValue(o,I));var W,q,H,z=!1;if(W=p(I,$),$=W[0],H=W[1],W=p(I,B),B=W[0].replace(/^([+-\/*])=/,function(e,t){return z=t,""}),q=W[1],$=parseFloat($)||0,B=parseFloat(B)||0,"%"===q&&(/^(fontSize|lineHeight)$/.test(I)?(B/=100,q="em"):/^scale/.test(I)?(B/=100,q=""):/(Red|Green|Blue)$/i.test(I)&&(B=B/100*255,q="")),/[\/*]/.test(z))q=H;else if(H!==q&&0!==$)if(0===B)q=H;else{i=i||v();var G=/margin|padding|left|right|width|text|word|letter/i.test(I)||/X$/.test(I)||"x"===I?"x":"y";switch(H){case"%":$*="x"===G?i.percentToPxWidth:i.percentToPxHeight;break;case"px":break;default:$*=i[H+"ToPx"]}switch(q){case"%":$*=1/("x"===G?i.percentToPxWidth:i.percentToPxHeight);break;case"px":break;default:$*=1/i[q+"ToPx"]}}switch(z){case"+":B=$+B;break;case"-":B=$-B;break;case"*":B=$*B;break;case"/":B=$/B}l[I]={rootPropertyValue:U,startValue:$,currentValue:$,endValue:B,unitType:q,easing:j},y.debug&&console.log("tweensContainer ("+I+"): "+JSON.stringify(l[I]),o)}else y.debug&&console.log("Skipping ["+V+"] due to a lack of browser support.")}l.element=o}l.element&&(x.Values.addClass(o,"velocity-animating"),P.push(l),""===s.queue&&(a(o).tweensContainer=l,a(o).opts=s),a(o).isAnimating=!0,C===E-1?(y.State.calls.push([P,h,s,null,A.resolver]),y.State.isTicking===!1&&(y.State.isTicking=!0,c())):C++)}var i,o=this,s=f.extend({},y.defaults,b),l={};switch(a(o)===r&&y.init(o),parseFloat(s.delay)&&s.queue!==!1&&f.queue(o,s.queue,function(e){y.velocityQueueEntryFlag=!0,a(o).delayTimer={setTimeout:setTimeout(e,parseFloat(s.delay)),next:e}}),s.duration.toString().toLowerCase()){case"fast":s.duration=200;break;case"normal":s.duration=v;break;case"slow":s.duration=600;break;default:s.duration=parseFloat(s.duration)||1}y.mock!==!1&&(y.mock===!0?s.duration=s.delay=1:(s.duration*=parseFloat(y.mock)||1,s.delay*=parseFloat(y.mock)||1)),s.easing=u(s.easing,s.duration),s.begin&&!g.isFunction(s.begin)&&(s.begin=null),s.progress&&!g.isFunction(s.progress)&&(s.progress=null),s.complete&&!g.isFunction(s.complete)&&(s.complete=null),s.display!==r&&null!==s.display&&(s.display=s.display.toString().toLowerCase(),"auto"===s.display&&(s.display=y.CSS.Values.getDisplayType(o))),s.visibility!==r&&null!==s.visibility&&(s.visibility=s.visibility.toString().toLowerCase()),s.mobileHA=s.mobileHA&&y.State.isMobile&&!y.State.isGingerbread,s.queue===!1?s.delay?setTimeout(e,s.delay):e():f.queue(o,s.queue,function(t,n){return n===!0?(A.promise&&A.resolver(h),!0):(y.velocityQueueEntryFlag=!0,void e(t))}),""!==s.queue&&"fx"!==s.queue||"inprogress"===f.queue(o)[0]||f.dequeue(o)}var s,l,p,h,m,b,w=arguments[0]&&(arguments[0].p||f.isPlainObject(arguments[0].properties)&&!arguments[0].properties.names||g.isString(arguments[0].properties));if(g.isWrapped(this)?(s=!1,p=0,h=this,l=this):(s=!0,p=1,h=w?arguments[0].elements||arguments[0].e:arguments[0]),h=o(h)){w?(m=arguments[0].properties||arguments[0].p,b=arguments[0].options||arguments[0].o):(m=arguments[p],b=arguments[p+1]);var E=h.length,C=0;if(!/^(stop|finish|finishAll)$/i.test(m)&&!f.isPlainObject(b)){var k=p+1;b={};for(var S=k;S<arguments.length;S++)g.isArray(arguments[S])||!/^(fast|normal|slow)$/i.test(arguments[S])&&!/^\d/.test(arguments[S])?g.isString(arguments[S])||g.isArray(arguments[S])?b.easing=arguments[S]:g.isFunction(arguments[S])&&(b.complete=arguments[S]):b.duration=arguments[S]}var A={promise:null,resolver:null,rejecter:null};s&&y.Promise&&(A.promise=new y.Promise(function(e,t){A.resolver=e,A.rejecter=t}));var T;switch(m){case"scroll":T="scroll";break;case"reverse":T="reverse";break;case"finish":case"finishAll":case"stop":f.each(h,function(e,t){a(t)&&a(t).delayTimer&&(clearTimeout(a(t).delayTimer.setTimeout),a(t).delayTimer.next&&a(t).delayTimer.next(),delete a(t).delayTimer),"finishAll"!==m||b!==!0&&!g.isString(b)||(f.each(f.queue(t,g.isString(b)?b:""),function(e,t){g.isFunction(t)&&t()}),f.queue(t,g.isString(b)?b:"",[]))});var D=[];return f.each(y.State.calls,function(e,t){t&&f.each(t[1],function(n,i){var o=b===r?"":b;return o!==!0&&t[2].queue!==o&&(b!==r||t[2].queue!==!1)||void f.each(h,function(n,r){r===i&&((b===!0||g.isString(b))&&(f.each(f.queue(r,g.isString(b)?b:""),function(e,t){g.isFunction(t)&&t(null,!0)}),f.queue(r,g.isString(b)?b:"",[])),"stop"===m?(a(r)&&a(r).tweensContainer&&o!==!1&&f.each(a(r).tweensContainer,function(e,t){t.endValue=t.currentValue}),D.push(e)):"finish"!==m&&"finishAll"!==m||(t[2].duration=1))})})}),"stop"===m&&(f.each(D,function(e,t){d(t,!0)}),A.promise&&A.resolver(h)),e();default:if(!f.isPlainObject(m)||g.isEmptyObject(m)){if(g.isString(m)&&y.Redirects[m]){var N=f.extend({},b),F=N.duration,M=N.delay||0;return N.backwards===!0&&(h=f.extend(!0,[],h).reverse()),f.each(h,function(e,t){parseFloat(N.stagger)?N.delay=M+parseFloat(N.stagger)*e:g.isFunction(N.stagger)&&(N.delay=M+N.stagger.call(t,e,E)),N.drag&&(N.duration=parseFloat(F)||(/^(callout|transition)/.test(m)?1e3:v),N.duration=Math.max(N.duration*(N.backwards?1-e/E:(e+1)/E),.75*N.duration,200)),y.Redirects[m].call(t,t,N||{},e,E,h,A.promise?A:r)}),e()}var O="Velocity: First argument ("+m+") was not a property map, a known action, or a registered redirect. Aborting.";return A.promise?A.rejecter(new Error(O)):console.log(O),e()}T="start"}var L={lastParent:null,lastPosition:null,lastFontSize:null,lastPercentToPxWidth:null,lastPercentToPxHeight:null,lastEmToPx:null,remToPx:null,vwToPx:null,vhToPx:null},P=[];f.each(h,function(e,t){g.isNode(t)&&i.call(t)});var I,N=f.extend({},y.defaults,b);if(N.loop=parseInt(N.loop),I=2*N.loop-1,N.loop)for(var R=0;R<I;R++){var B={delay:N.delay,progress:N.progress};R===I-1&&(B.display=N.display,B.visibility=N.visibility,B.complete=N.complete),_(h,"reverse",B)}return e()}};y=f.extend(_,y),y.animate=_;var E=t.requestAnimationFrame||h;return y.State.isMobile||n.hidden===r||n.addEventListener("visibilitychange",function(){n.hidden?(E=function(e){return setTimeout(function(){e(!0)},16)},c()):E=t.requestAnimationFrame||h}),e.Velocity=y,e!==t&&(e.fn.velocity=_,e.fn.velocity.defaults=y.defaults),f.each(["Down","Up"],function(e,t){y.Redirects["slide"+t]=function(e,n,i,o,a,s){var l=f.extend({},n),u=l.begin,c=l.complete,d={height:"",marginTop:"",marginBottom:"",paddingTop:"",paddingBottom:""},p={};l.display===r&&(l.display="Down"===t?"inline"===y.CSS.Values.getDisplayType(e)?"inline-block":"block":"none"),
l.begin=function(){u&&u.call(a,a);for(var n in d){p[n]=e.style[n];var r=y.CSS.getPropertyValue(e,n);d[n]="Down"===t?[r,0]:[0,r]}p.overflow=e.style.overflow,e.style.overflow="hidden"},l.complete=function(){for(var t in p)e.style[t]=p[t];c&&c.call(a,a),s&&s.resolver(a)},y(e,d,l)}}),f.each(["In","Out"],function(e,t){y.Redirects["fade"+t]=function(e,n,i,o,a,s){var l=f.extend({},n),u={opacity:"In"===t?1:0},c=l.complete;i!==o-1?l.complete=l.begin=null:l.complete=function(){c&&c.call(a,a),s&&s.resolver(a)},l.display===r&&(l.display="In"===t?"auto":"none"),y(this,u,l)}}),y}(window.jQuery||window.Zepto||window,window,document)})},function(e,t,n){!function(t){e.exports=t()}(function(){return function(e,t,n,r){function i(e,t){var n=[];return!(!e||!t)&&(a.each([e,t],function(e,t){var r=[];a.each(t,function(e,t){for(;t.toString().length<5;)t="0"+t;r.push(t)}),n.push(r.join(""))}),parseFloat(n[0])>parseFloat(n[1]))}if(!e.Velocity||!e.Velocity.Utilities)return void(t.console&&console.log("Velocity UI Pack: Velocity must be loaded first. Aborting."));var o=e.Velocity,a=o.Utilities,s=o.version,l={major:1,minor:1,patch:0};if(i(l,s)){var u="Velocity UI Pack: You need to update Velocity (jquery.velocity.js) to a newer version. Visit http://github.com/julianshapiro/velocity.";throw alert(u),new Error(u)}o.RegisterEffect=o.RegisterUI=function(e,t){function n(e,t,n,r){var i,s=0;a.each(e.nodeType?[e]:e,function(e,t){r&&(n+=e*r),i=t.parentNode,a.each(["height","paddingTop","paddingBottom","marginTop","marginBottom"],function(e,n){s+=parseFloat(o.CSS.getPropertyValue(t,n))})}),o.animate(i,{height:("In"===t?"+":"-")+"="+s},{queue:!1,easing:"ease-in-out",duration:n*("In"===t?.6:1)})}return o.Redirects[e]=function(i,s,l,u,c,d){function f(){s.display!==r&&"none"!==s.display||!/Out$/.test(e)||a.each(c.nodeType?[c]:c,function(e,t){o.CSS.setPropertyValue(t,"display","none")}),s.complete&&s.complete.call(c,c),d&&d.resolver(c||i)}var p=l===u-1;"function"==typeof t.defaultDuration?t.defaultDuration=t.defaultDuration.call(c,c):t.defaultDuration=parseFloat(t.defaultDuration);for(var h=0;h<t.calls.length;h++){var g=t.calls[h],m=g[0],v=s.duration||t.defaultDuration||1e3,b=g[1],y=g[2]||{},w={};if(w.duration=v*(b||1),w.queue=s.queue||"",w.easing=y.easing||"ease",w.delay=parseFloat(y.delay)||0,w._cacheValues=y._cacheValues||!0,0===h){if(w.delay+=parseFloat(s.delay)||0,0===l&&(w.begin=function(){s.begin&&s.begin.call(c,c);var t=e.match(/(In|Out)$/);t&&"In"===t[0]&&m.opacity!==r&&a.each(c.nodeType?[c]:c,function(e,t){o.CSS.setPropertyValue(t,"opacity",0)}),s.animateParentHeight&&t&&n(c,t[0],v+w.delay,s.stagger)}),null!==s.display)if(s.display!==r&&"none"!==s.display)w.display=s.display;else if(/In$/.test(e)){var x=o.CSS.Values.getDisplayType(i);w.display="inline"===x?"inline-block":x}s.visibility&&"hidden"!==s.visibility&&(w.visibility=s.visibility)}h===t.calls.length-1&&(w.complete=function(){if(t.reset){for(var e in t.reset){var n=t.reset[e];o.CSS.Hooks.registered[e]!==r||"string"!=typeof n&&"number"!=typeof n||(t.reset[e]=[t.reset[e],t.reset[e]])}var a={duration:0,queue:!1};p&&(a.complete=f),o.animate(i,t.reset,a)}else p&&f()},"hidden"===s.visibility&&(w.visibility=s.visibility)),o.animate(i,m,w)}},o},o.RegisterEffect.packagedEffects={"callout.bounce":{defaultDuration:550,calls:[[{translateY:-30},.25],[{translateY:0},.125],[{translateY:-15},.125],[{translateY:0},.25]]},"callout.shake":{defaultDuration:800,calls:[[{translateX:-11},.125],[{translateX:11},.125],[{translateX:-11},.125],[{translateX:11},.125],[{translateX:-11},.125],[{translateX:11},.125],[{translateX:-11},.125],[{translateX:0},.125]]},"callout.flash":{defaultDuration:1100,calls:[[{opacity:[0,"easeInOutQuad",1]},.25],[{opacity:[1,"easeInOutQuad"]},.25],[{opacity:[0,"easeInOutQuad"]},.25],[{opacity:[1,"easeInOutQuad"]},.25]]},"callout.pulse":{defaultDuration:825,calls:[[{scaleX:1.1,scaleY:1.1},.5,{easing:"easeInExpo"}],[{scaleX:1,scaleY:1},.5]]},"callout.swing":{defaultDuration:950,calls:[[{rotateZ:15},.2],[{rotateZ:-10},.2],[{rotateZ:5},.2],[{rotateZ:-5},.2],[{rotateZ:0},.2]]},"callout.tada":{defaultDuration:1e3,calls:[[{scaleX:.9,scaleY:.9,rotateZ:-3},.1],[{scaleX:1.1,scaleY:1.1,rotateZ:3},.1],[{scaleX:1.1,scaleY:1.1,rotateZ:-3},.1],["reverse",.125],["reverse",.125],["reverse",.125],["reverse",.125],["reverse",.125],[{scaleX:1,scaleY:1,rotateZ:0},.2]]},"transition.fadeIn":{defaultDuration:500,calls:[[{opacity:[1,0]}]]},"transition.fadeOut":{defaultDuration:500,calls:[[{opacity:[0,1]}]]},"transition.flipXIn":{defaultDuration:700,calls:[[{opacity:[1,0],transformPerspective:[800,800],rotateY:[0,-55]}]],reset:{transformPerspective:0}},"transition.flipXOut":{defaultDuration:700,calls:[[{opacity:[0,1],transformPerspective:[800,800],rotateY:55}]],reset:{transformPerspective:0,rotateY:0}},"transition.flipYIn":{defaultDuration:800,calls:[[{opacity:[1,0],transformPerspective:[800,800],rotateX:[0,-45]}]],reset:{transformPerspective:0}},"transition.flipYOut":{defaultDuration:800,calls:[[{opacity:[0,1],transformPerspective:[800,800],rotateX:25}]],reset:{transformPerspective:0,rotateX:0}},"transition.flipBounceXIn":{defaultDuration:900,calls:[[{opacity:[.725,0],transformPerspective:[400,400],rotateY:[-10,90]},.5],[{opacity:.8,rotateY:10},.25],[{opacity:1,rotateY:0},.25]],reset:{transformPerspective:0}},"transition.flipBounceXOut":{defaultDuration:800,calls:[[{opacity:[.9,1],transformPerspective:[400,400],rotateY:-10},.5],[{opacity:0,rotateY:90},.5]],reset:{transformPerspective:0,rotateY:0}},"transition.flipBounceYIn":{defaultDuration:850,calls:[[{opacity:[.725,0],transformPerspective:[400,400],rotateX:[-10,90]},.5],[{opacity:.8,rotateX:10},.25],[{opacity:1,rotateX:0},.25]],reset:{transformPerspective:0}},"transition.flipBounceYOut":{defaultDuration:800,calls:[[{opacity:[.9,1],transformPerspective:[400,400],rotateX:-15},.5],[{opacity:0,rotateX:90},.5]],reset:{transformPerspective:0,rotateX:0}},"transition.swoopIn":{defaultDuration:850,calls:[[{opacity:[1,0],transformOriginX:["100%","50%"],transformOriginY:["100%","100%"],scaleX:[1,0],scaleY:[1,0],translateX:[0,-700],translateZ:0}]],reset:{transformOriginX:"50%",transformOriginY:"50%"}},"transition.swoopOut":{defaultDuration:850,calls:[[{opacity:[0,1],transformOriginX:["50%","100%"],transformOriginY:["100%","100%"],scaleX:0,scaleY:0,translateX:-700,translateZ:0}]],reset:{transformOriginX:"50%",transformOriginY:"50%",scaleX:1,scaleY:1,translateX:0}},"transition.whirlIn":{defaultDuration:850,calls:[[{opacity:[1,0],transformOriginX:["50%","50%"],transformOriginY:["50%","50%"],scaleX:[1,0],scaleY:[1,0],rotateY:[0,160]},1,{easing:"easeInOutSine"}]]},"transition.whirlOut":{defaultDuration:750,calls:[[{opacity:[0,"easeInOutQuint",1],transformOriginX:["50%","50%"],transformOriginY:["50%","50%"],scaleX:0,scaleY:0,rotateY:160},1,{easing:"swing"}]],reset:{scaleX:1,scaleY:1,rotateY:0}},"transition.shrinkIn":{defaultDuration:750,calls:[[{opacity:[1,0],transformOriginX:["50%","50%"],transformOriginY:["50%","50%"],scaleX:[1,1.5],scaleY:[1,1.5],translateZ:0}]]},"transition.shrinkOut":{defaultDuration:600,calls:[[{opacity:[0,1],transformOriginX:["50%","50%"],transformOriginY:["50%","50%"],scaleX:1.3,scaleY:1.3,translateZ:0}]],reset:{scaleX:1,scaleY:1}},"transition.expandIn":{defaultDuration:700,calls:[[{opacity:[1,0],transformOriginX:["50%","50%"],transformOriginY:["50%","50%"],scaleX:[1,.625],scaleY:[1,.625],translateZ:0}]]},"transition.expandOut":{defaultDuration:700,calls:[[{opacity:[0,1],transformOriginX:["50%","50%"],transformOriginY:["50%","50%"],scaleX:.5,scaleY:.5,translateZ:0}]],reset:{scaleX:1,scaleY:1}},"transition.bounceIn":{defaultDuration:800,calls:[[{opacity:[1,0],scaleX:[1.05,.3],scaleY:[1.05,.3]},.4],[{scaleX:.9,scaleY:.9,translateZ:0},.2],[{scaleX:1,scaleY:1},.5]]},"transition.bounceOut":{defaultDuration:800,calls:[[{scaleX:.95,scaleY:.95},.35],[{scaleX:1.1,scaleY:1.1,translateZ:0},.35],[{opacity:[0,1],scaleX:.3,scaleY:.3},.3]],reset:{scaleX:1,scaleY:1}},"transition.bounceUpIn":{defaultDuration:800,calls:[[{opacity:[1,0],translateY:[-30,1e3]},.6,{easing:"easeOutCirc"}],[{translateY:10},.2],[{translateY:0},.2]]},"transition.bounceUpOut":{defaultDuration:1e3,calls:[[{translateY:20},.2],[{opacity:[0,"easeInCirc",1],translateY:-1e3},.8]],reset:{translateY:0}},"transition.bounceDownIn":{defaultDuration:800,calls:[[{opacity:[1,0],translateY:[30,-1e3]},.6,{easing:"easeOutCirc"}],[{translateY:-10},.2],[{translateY:0},.2]]},"transition.bounceDownOut":{defaultDuration:1e3,calls:[[{translateY:-20},.2],[{opacity:[0,"easeInCirc",1],translateY:1e3},.8]],reset:{translateY:0}},"transition.bounceLeftIn":{defaultDuration:750,calls:[[{opacity:[1,0],translateX:[30,-1250]},.6,{easing:"easeOutCirc"}],[{translateX:-10},.2],[{translateX:0},.2]]},"transition.bounceLeftOut":{defaultDuration:750,calls:[[{translateX:30},.2],[{opacity:[0,"easeInCirc",1],translateX:-1250},.8]],reset:{translateX:0}},"transition.bounceRightIn":{defaultDuration:750,calls:[[{opacity:[1,0],translateX:[-30,1250]},.6,{easing:"easeOutCirc"}],[{translateX:10},.2],[{translateX:0},.2]]},"transition.bounceRightOut":{defaultDuration:750,calls:[[{translateX:-30},.2],[{opacity:[0,"easeInCirc",1],translateX:1250},.8]],reset:{translateX:0}},"transition.slideUpIn":{defaultDuration:900,calls:[[{opacity:[1,0],translateY:[0,20],translateZ:0}]]},"transition.slideUpOut":{defaultDuration:900,calls:[[{opacity:[0,1],translateY:-20,translateZ:0}]],reset:{translateY:0}},"transition.slideDownIn":{defaultDuration:900,calls:[[{opacity:[1,0],translateY:[0,-20],translateZ:0}]]},"transition.slideDownOut":{defaultDuration:900,calls:[[{opacity:[0,1],translateY:20,translateZ:0}]],reset:{translateY:0}},"transition.slideLeftIn":{defaultDuration:1e3,calls:[[{opacity:[1,0],translateX:[0,-20],translateZ:0}]]},"transition.slideLeftOut":{defaultDuration:1050,calls:[[{opacity:[0,1],translateX:-20,translateZ:0}]],reset:{translateX:0}},"transition.slideRightIn":{defaultDuration:1e3,calls:[[{opacity:[1,0],translateX:[0,20],translateZ:0}]]},"transition.slideRightOut":{defaultDuration:1050,calls:[[{opacity:[0,1],translateX:20,translateZ:0}]],reset:{translateX:0}},"transition.slideUpBigIn":{defaultDuration:850,calls:[[{opacity:[1,0],translateY:[0,75],translateZ:0}]]},"transition.slideUpBigOut":{defaultDuration:800,calls:[[{opacity:[0,1],translateY:-75,translateZ:0}]],reset:{translateY:0}},"transition.slideDownBigIn":{defaultDuration:850,calls:[[{opacity:[1,0],translateY:[0,-75],translateZ:0}]]},"transition.slideDownBigOut":{defaultDuration:800,calls:[[{opacity:[0,1],translateY:75,translateZ:0}]],reset:{translateY:0}},"transition.slideLeftBigIn":{defaultDuration:800,calls:[[{opacity:[1,0],translateX:[0,-75],translateZ:0}]]},"transition.slideLeftBigOut":{defaultDuration:750,calls:[[{opacity:[0,1],translateX:-75,translateZ:0}]],reset:{translateX:0}},"transition.slideRightBigIn":{defaultDuration:800,calls:[[{opacity:[1,0],translateX:[0,75],translateZ:0}]]},"transition.slideRightBigOut":{defaultDuration:750,calls:[[{opacity:[0,1],translateX:75,translateZ:0}]],reset:{translateX:0}},"transition.perspectiveUpIn":{defaultDuration:800,calls:[[{opacity:[1,0],transformPerspective:[800,800],transformOriginX:[0,0],transformOriginY:["100%","100%"],rotateX:[0,-180]}]],reset:{transformPerspective:0,transformOriginX:"50%",transformOriginY:"50%"}},"transition.perspectiveUpOut":{defaultDuration:850,calls:[[{opacity:[0,1],transformPerspective:[800,800],transformOriginX:[0,0],transformOriginY:["100%","100%"],rotateX:-180}]],reset:{transformPerspective:0,transformOriginX:"50%",transformOriginY:"50%",rotateX:0}},"transition.perspectiveDownIn":{defaultDuration:800,calls:[[{opacity:[1,0],transformPerspective:[800,800],transformOriginX:[0,0],transformOriginY:[0,0],rotateX:[0,180]}]],reset:{transformPerspective:0,transformOriginX:"50%",transformOriginY:"50%"}},"transition.perspectiveDownOut":{defaultDuration:850,calls:[[{opacity:[0,1],transformPerspective:[800,800],transformOriginX:[0,0],transformOriginY:[0,0],rotateX:180}]],reset:{transformPerspective:0,transformOriginX:"50%",transformOriginY:"50%",rotateX:0}},"transition.perspectiveLeftIn":{defaultDuration:950,calls:[[{opacity:[1,0],transformPerspective:[2e3,2e3],transformOriginX:[0,0],transformOriginY:[0,0],rotateY:[0,-180]}]],reset:{transformPerspective:0,transformOriginX:"50%",transformOriginY:"50%"}},"transition.perspectiveLeftOut":{defaultDuration:950,calls:[[{opacity:[0,1],transformPerspective:[2e3,2e3],transformOriginX:[0,0],transformOriginY:[0,0],rotateY:-180}]],reset:{transformPerspective:0,transformOriginX:"50%",transformOriginY:"50%",rotateY:0}},"transition.perspectiveRightIn":{defaultDuration:950,calls:[[{opacity:[1,0],transformPerspective:[2e3,2e3],transformOriginX:["100%","100%"],transformOriginY:[0,0],rotateY:[0,180]}]],reset:{transformPerspective:0,transformOriginX:"50%",transformOriginY:"50%"}},"transition.perspectiveRightOut":{defaultDuration:950,calls:[[{opacity:[0,1],transformPerspective:[2e3,2e3],transformOriginX:["100%","100%"],transformOriginY:[0,0],rotateY:180}]],reset:{transformPerspective:0,transformOriginX:"50%",transformOriginY:"50%",rotateY:0}}};for(var c in o.RegisterEffect.packagedEffects)o.RegisterEffect(c,o.RegisterEffect.packagedEffects[c]);o.RunSequence=function(e){var t=a.extend(!0,[],e);t.length>1&&(a.each(t.reverse(),function(e,n){var r=t[e+1];if(r){var i=n.o||n.options,s=r.o||r.options,l=i&&i.sequenceQueue===!1?"begin":"complete",u=s&&s[l],c={};c[l]=function(){var e=r.e||r.elements,t=e.nodeType?[e]:e;u&&u.call(t,t),o(n)},r.o?r.o=a.extend({},s,c):r.options=a.extend({},s,c)}}),t.reverse()),o(t[0])}}(window.jQuery||window.Zepto||window,window,document)})},function(e,t,n){e.exports=n.p+"dashboard.assets/ZeroClipboard.swf"},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){return _.isArray(e)?e[1]:e}function o(e){var t=p["default"].getExtensions("sidebar:links"),n="#"+p["default"].urls("databaseBaseURL","app",e),r=_.reduce(t,function(e,t){return e.push({title:t.title,url:n+"/"+t.url,icon:"fonticon-plus-circled"}),e},[{title:"New Doc",url:n+"/new",icon:"fonticon-plus-circled"},{title:"New View",url:n+"/new_view",icon:"fonticon-plus-circled"},a(e)]);return[{title:"Add New",links:r}]}function a(e){var t="#"+p["default"].urls("databaseBaseURL","app",e);return{title:d["default"].i18n.en_US["new-mango-index"],url:t+"/_index",icon:"fonticon-plus-circled"}}function s(e){return JSON.parse('"'+e+'"')}function l(e,t){return[{title:"Replicate Database",icon:"fonticon-replicate",url:p["default"].urls("replication","app",e)},{title:"Delete",icon:"fonticon-trash",onClick:function(){t({showDeleteModal:!0,dbId:e})}}]}function u(e,t){var n=e.split("\n"),r=!1;return n.length>t&&(r=!0,n=n.slice(0,t),e=n.join("\n")),{isTruncated:r,content:e}}Object.defineProperty(t,"__esModule",{value:!0});var c=n(84),d=r(c),f=n(99),p=r(f);t["default"]={getSeqNum:i,getNewButtonLinks:o,getModifyDatabaseLinks:l,parseJSON:s,truncateDoc:u}},function(e,t,n){var r,i;!function(){function n(e,t){"use strict";var n=new o(e,t);return n.beautify()}function o(e,t){"use strict";function n(e,t){var n=0;e&&(n=e.indentation_level,n+=e.var_line&&e.var_line_reindented?1:0,!l()&&e.line_indent_level>n&&(n=e.line_indent_level));var r={mode:t,parent:e,last_text:e?e.last_text:"",last_word:e?e.last_word:"",var_line:!1,var_line_tainted:!1,var_line_reindented:!1,in_html_comment:!1,multiline_frame:!1,if_block:!1,do_block:!1,do_while:!1,in_case_statement:!1,in_case:!1,case_body:!1,indentation_level:n,line_indent_level:e?e.line_indent_level:n,start_line_index:G.length,had_comment:!1,ternary_depth:0};return r}function r(){return{text:[]}}function i(e){if(e=void 0!==e&&e,G.length)for(o(G[G.length-1],e);e&&G.length>1&&0===G[G.length-1].text.length;)G.pop(),o(G[G.length-1],e)}function o(e){for(;e.text.length&&(" "===e.text[e.text.length-1]||e.text[e.text.length-1]===J||e.text[e.text.length-1]===be);)e.text.pop()}function a(e){return e.replace(/^\s+|\s+$/g,"")}function s(e){e=e.replace(/\x0d/g,"");for(var t=[],n=e.indexOf("\n");n!==-1;)t.push(e.substring(0,n)),e=e.substring(n+1),n=e.indexOf("\n");return e.length&&t.push(e),t}function l(){var e=G[G.length-1];return 0===e.text.length}function u(){if(l()){if(1===G.length)return!0;var e=G[G.length-2];return 0===e.text.length}return!1}function c(e){if(e=void 0!==e&&e,ve.wrap_line_length&&!e){var t=G[G.length-1],n=0;t.text.length>0&&(n=t.text.join("").length+K.length+(de?1:0),n>=ve.wrap_line_length&&(e=!0))}(ve.preserve_newlines&&ue||e)&&!l()&&(d(!1,!0),w(Z.mode)||x(Z.mode)||(ce=!0))}function d(e,t){if(ce=!1,de=!1,!t&&";"!==Z.last_text)for(;Z.mode===me.Statement&&!Z.if_block&&!Z.do_block;)_();1===G.length&&l()||!e&&l()||(Z.multiline_frame=!0,G.push(r()))}function f(){if(l()){var e=G[G.length-1];if(ve.keep_array_indentation&&w(Z.mode)&&ue){e.text.push("");for(var t=0;t<he.length;t+=1)e.text.push(he[t])}else be&&e.text.push(be),p(Z.indentation_level+(Z.var_line&&Z.var_line_reindented?1:0)+(ce?1:0))}}function p(e){if(G.length>1){var t=G[G.length-1];Z.line_indent_level=e;for(var n=0;n<e;n+=1)t.text.push(J)}}function h(){var e=G[G.length-1];if(de&&e.text.length){var t=e.text[e.text.length-1];" "!==t&&t!==J&&e.text.push(" ")}}function g(e){e=e||K,f(),ce=!1,h(),de=!1,G[G.length-1].text.push(e)}function m(){Z.indentation_level+=1}function v(){Z.indentation_level>0&&(!Z.parent||Z.indentation_level>Z.parent.indentation_level)&&(Z.indentation_level-=1)}function b(e){if(!e.multiline_frame)for(var t,n=e.start_line_index,r=0;n<G.length;)t=G[n],n++,0!==t.text.length&&(r=be&&t.text[0]===be?1:0,t.text[r]===J&&t.text.splice(r,1))}function y(e){Z?(te.push(Z),ee=Z):ee=n(null,e),Z=n(ee,e)}function w(e){return e===me.ArrayLiteral}function x(e){return A(e,[me.Expression,me.ForInitializer,me.Conditional])}function _(){te.length>0&&(ee=Z,Z=te.pop())}function E(){return Z.mode===me.ObjectLiteral&&":"===Z.last_text&&0===Z.ternary_depth}function C(){return("do"===Z.last_text||"else"===Z.last_text&&"if"!==K||"TK_END_EXPR"===X&&(ee.mode===me.ForInitializer||ee.mode===me.Conditional))&&(c(A(K,["do","for","if","while"])),y(me.Statement),l()&&(m(),ce=!1),!0)}function k(e,t){for(var n=0;n<e.length;n++){var r=a(e[n]);if(r.charAt(0)!==t)return!1}return!0}function S(e){return A(e,["case","return","do","if","throw","else"])}function A(e,t){for(var n=0;n<t.length;n+=1)if(t[n]===e)return!0;return!1}function T(e){for(var t,n=!1,r="",i=0,o="",a=0;n||i<e.length;)if(t=e.charAt(i),i++,n){if(n=!1,"x"===t)o=e.substr(i,2),i+=2;else{if("u"!==t){r+="\\"+t;continue}o=e.substr(i,4),i+=4}if(!o.match(/^[0123456789abcdefABCDEF]+$/))return e;if(a=parseInt(o,16),a>=0&&a<32){r+="x"===t?"\\x"+o:"\\u"+o;continue}if(34===a||39===a||92===a)r+="\\"+String.fromCharCode(a);else{if("x"===t&&a>126&&a<=255)return e;r+=String.fromCharCode(a)}}else"\\"===t?n=!0:r+=t;return r}function D(e){for(var t=oe,n=z.charAt(t);A(n,ne)&&n!==e;){if(t++,t>=fe)return!1;n=z.charAt(t)}return n===e}function N(){var e;if(pe=0,oe>=fe)return["","TK_EOF"];ue=!1,he=[];var t=z.charAt(oe);for(oe+=1;A(t,ne);){if("\n"===t?(pe+=1,he=[]):pe&&(t===J?he.push(J):"\r"!==t&&he.push(" ")),oe>=fe)return["","TK_EOF"];t=z.charAt(oe),oe+=1}if(A(t,re)){if(oe<fe)for(;A(z.charAt(oe),re)&&(t+=z.charAt(oe),oe+=1,oe!==fe););if(oe!==fe&&t.match(/^[0-9]+[Ee]$/)&&("-"===z.charAt(oe)||"+"===z.charAt(oe))){var n=z.charAt(oe);oe+=1;var r=N();return t+=n+r[0],[t,"TK_WORD"]}return"in"===t?[t,"TK_OPERATOR"]:[t,"TK_WORD"]}if("("===t||"["===t)return[t,"TK_START_EXPR"];if(")"===t||"]"===t)return[t,"TK_END_EXPR"];if("{"===t)return[t,"TK_START_BLOCK"];if("}"===t)return[t,"TK_END_BLOCK"];if(";"===t)return[t,"TK_SEMICOLON"];if("/"===t){var i="",o=!0;if("*"===z.charAt(oe)){if(oe+=1,oe<fe)for(;oe<fe&&("*"!==z.charAt(oe)||!z.charAt(oe+1)||"/"!==z.charAt(oe+1))&&(t=z.charAt(oe),i+=t,"\n"!==t&&"\r"!==t||(o=!1),oe+=1,!(oe>=fe)););return oe+=2,o&&0===pe?["/*"+i+"*/","TK_INLINE_COMMENT"]:["/*"+i+"*/","TK_BLOCK_COMMENT"]}if("/"===z.charAt(oe)){for(i=t;"\r"!==z.charAt(oe)&&"\n"!==z.charAt(oe)&&(i+=z.charAt(oe),oe+=1,!(oe>=fe)););return[i,"TK_COMMENT"]}}if("'"===t||'"'===t||("/"===t||ve.e4x&&"<"===t&&z.slice(oe-1).match(/^<([-a-zA-Z:0-9_.]+|{[^{}]*}|!\[CDATA\[[\s\S]*?\]\])\s*([-a-zA-Z:0-9_.]+=('[^']*'|"[^"]*"|{[^{}]*})\s*)*\/?\s*>/))&&("TK_WORD"===X&&S(Z.last_text)||"TK_END_EXPR"===X&&A(ee.mode,[me.Conditional,me.ForInitializer])||A(X,["TK_COMMENT","TK_START_EXPR","TK_START_BLOCK","TK_END_BLOCK","TK_OPERATOR","TK_EQUALS","TK_EOF","TK_SEMICOLON","TK_COMMA"]))){var s=t,l=!1,u=!1;if(e=t,oe<fe)if("/"===s){for(var c=!1;l||c||z.charAt(oe)!==s;)if(e+=z.charAt(oe),l?l=!1:(l="\\"===z.charAt(oe),"["===z.charAt(oe)?c=!0:"]"===z.charAt(oe)&&(c=!1)),oe+=1,oe>=fe)return[e,"TK_STRING"]}else if(ve.e4x&&"<"===s){var d=/<(\/?)([-a-zA-Z:0-9_.]+|{[^{}]*}|!\[CDATA\[[\s\S]*?\]\])\s*([-a-zA-Z:0-9_.]+=('[^']*'|"[^"]*"|{[^{}]*})\s*)*(\/?)\s*>/g,f=z.slice(oe-1),p=d.exec(f);if(p&&0===p.index){for(var h=p[2],g=0;p;){var m=!!p[1],v=p[2],b=!!p[p.length-1]||"![CDATA["===v.slice(0,8);if(v!==h||b||(m?--g:++g),g<=0)break;p=d.exec(f)}var y=p?p.index+p[0].length:f.length;return oe+=y-1,[f.slice(0,y),"TK_STRING"]}}else for(;l||z.charAt(oe)!==s;)if(e+=z.charAt(oe),l?("x"!==z.charAt(oe)&&"u"!==z.charAt(oe)||(u=!0),l=!1):l="\\"===z.charAt(oe),oe+=1,oe>=fe)return[e,"TK_STRING"];if(oe+=1,e+=s,u&&ve.unescape_strings&&(e=T(e)),"/"===s)for(;oe<fe&&A(z.charAt(oe),re);)e+=z.charAt(oe),oe+=1;return[e,"TK_STRING"]}if("#"===t){if(1===G.length&&0===G[0].text.length&&"!"===z.charAt(oe)){for(e=t;oe<fe&&"\n"!==t;)t=z.charAt(oe),e+=t,oe+=1;return[a(e)+"\n","TK_UNKNOWN"]}var w="#";if(oe<fe&&A(z.charAt(oe),se)){do t=z.charAt(oe),w+=t,oe+=1;while(oe<fe&&"#"!==t&&"="!==t);return"#"===t||("["===z.charAt(oe)&&"]"===z.charAt(oe+1)?(w+="[]",oe+=2):"{"===z.charAt(oe)&&"}"===z.charAt(oe+1)&&(w+="{}",oe+=2)),[w,"TK_WORD"]}}if("<"===t&&"<!--"===z.substring(oe-1,oe+3)){for(oe+=3,t="<!--";"\n"!==z.charAt(oe)&&oe<fe;)t+=z.charAt(oe),oe++;return Z.in_html_comment=!0,[t,"TK_COMMENT"]}if("-"===t&&Z.in_html_comment&&"-->"===z.substring(oe-1,oe+2))return Z.in_html_comment=!1,oe+=2,["-->","TK_COMMENT"];if("."===t)return[t,"TK_DOT"];if(A(t,ie)){for(;oe<fe&&A(t+z.charAt(oe),ie)&&(t+=z.charAt(oe),oe+=1,!(oe>=fe)););return","===t?[t,"TK_COMMA"]:"="===t?[t,"TK_EQUALS"]:[t,"TK_OPERATOR"]}return[t,"TK_UNKNOWN"]}function F(){C();var e=me.Expression;if("["===K){if("TK_WORD"===X||")"===Z.last_text)return A(Z.last_text,ae)&&(de=!0),y(e),g(),m(),void(ve.space_in_paren&&(de=!0));e=me.ArrayLiteral,w(Z.mode)&&("["!==Z.last_text&&(","!==Z.last_text||"]"!==Q&&"}"!==Q)||ve.keep_array_indentation||d())}else"for"===Z.last_text?e=me.ForInitializer:A(Z.last_text,["if","while"])&&(e=me.Conditional);";"===Z.last_text||"TK_START_BLOCK"===X?d():"TK_END_EXPR"===X||"TK_START_EXPR"===X||"TK_END_BLOCK"===X||"."===Z.last_text?(c(ue),ce=!1):"TK_WORD"!==X&&"TK_OPERATOR"!==X?de=!0:"function"===Z.last_word||"typeof"===Z.last_word?ve.jslint_happy&&(de=!0):(A(Z.last_text,ae)||"catch"===Z.last_text)&&ve.space_before_conditional&&(de=!0),"("===K&&("TK_EQUALS"!==X&&"TK_OPERATOR"!==X||E()||c()),y(e),g(),ve.space_in_paren&&(de=!0),m()}function M(){for(;Z.mode===me.Statement;)_();"]"===K&&w(Z.mode)&&Z.multiline_frame&&!ve.keep_array_indentation&&d(),Z.multiline_frame&&c(),ve.space_in_paren&&("TK_START_EXPR"===X?(i(),de=!1):de=!0),"]"===K&&ve.keep_array_indentation?(g(),_()):(_(),g()),b(ee),Z.do_while&&ee.mode===me.Conditional&&(ee.mode=me.Expression,Z.do_block=!1,Z.do_while=!1)}function O(){y(me.BlockStatement);var e=D("}"),t=e&&"function"===Z.last_word&&"TK_END_EXPR"===X;"expand"===ve.brace_style?"TK_OPERATOR"!==X&&(t||"TK_EQUALS"===X||S(Z.last_text)&&"else"!==Z.last_text)?de=!0:d():"TK_OPERATOR"!==X&&"TK_START_EXPR"!==X?"TK_START_BLOCK"===X?d():de=!0:w(ee.mode)&&","===Z.last_text&&("}"===Q?de=!0:d()),g(),m()}function L(){for(;Z.mode===me.Statement;)_();var e="TK_START_BLOCK"===X;"expand"===ve.brace_style?e||d():e||(w(Z.mode)&&ve.keep_array_indentation?(ve.keep_array_indentation=!1,d(),ve.keep_array_indentation=!0):d()),_(),g()}function P(){if(C()||!ue||x(Z.mode)||"TK_OPERATOR"===X&&"--"!==Z.last_text&&"++"!==Z.last_text||"TK_EQUALS"===X||!ve.preserve_newlines&&"var"===Z.last_text||d(),Z.do_block&&!Z.do_while){if("while"===K)return de=!0,g(),de=!0,void(Z.do_while=!0);d(),Z.do_block=!1}if(Z.if_block&&"else"!==K){for(;Z.mode===me.Statement;)_();Z.if_block=!1}if("case"===K||"default"===K&&Z.in_case_statement)return d(),(Z.case_body||ve.jslint_happy)&&(v(),Z.case_body=!1),g(),Z.in_case=!0,void(Z.in_case_statement=!0);if("function"===K&&(Z.var_line&&"TK_EQUALS"!==X&&(Z.var_line_reindented=!0),(A(Z.last_text,["}",";"])||l()&&!A(Z.last_text,["{",":","=",","]))&&(u()||Z.had_comment||(d(),d(!0))),"TK_WORD"===X?"get"===Z.last_text||"set"===Z.last_text||"new"===Z.last_text||"return"===Z.last_text?de=!0:d():"TK_OPERATOR"===X||"="===Z.last_text?de=!0:x(Z.mode)||d()),"TK_COMMA"!==X&&"TK_START_EXPR"!==X&&"TK_EQUALS"!==X&&"TK_OPERATOR"!==X||E()||c(),"function"===K)return g(),void(Z.last_word=K);if(le="NONE","TK_END_BLOCK"===X?A(K,["else","catch","finally"])?"expand"===ve.brace_style||"end-expand"===ve.brace_style?le="NEWLINE":(le="SPACE",de=!0):le="NEWLINE":"TK_SEMICOLON"===X&&Z.mode===me.BlockStatement?le="NEWLINE":"TK_SEMICOLON"===X&&x(Z.mode)?le="SPACE":"TK_STRING"===X?le="NEWLINE":"TK_WORD"===X?le="SPACE":"TK_START_BLOCK"===X?le="NEWLINE":"TK_END_EXPR"===X&&(de=!0,le="NEWLINE"),A(K,ae)&&")"!==Z.last_text&&(le="else"===Z.last_text?"SPACE":"NEWLINE"),A(K,["else","catch","finally"]))if("TK_END_BLOCK"!==X||"expand"===ve.brace_style||"end-expand"===ve.brace_style)d();else{i(!0);var e=G[G.length-1];"}"!==e.text[e.text.length-1]&&d(),de=!0}else"NEWLINE"===le?S(Z.last_text)?de=!0:"TK_END_EXPR"!==X?"TK_START_EXPR"===X&&"var"===K||":"===Z.last_text||("if"===K&&"else"===Z.last_word&&"{"!==Z.last_text?de=!0:(Z.var_line=!1,Z.var_line_reindented=!1,d())):A(K,ae)&&")"!==Z.last_text&&(Z.var_line=!1,Z.var_line_reindented=!1,d()):w(Z.mode)&&","===Z.last_text&&"}"===Q?d():"SPACE"===le&&(de=!0);g(),Z.last_word=K,"var"===K&&(Z.var_line=!0,Z.var_line_reindented=!1,Z.var_line_tainted=!1),"do"===K&&(Z.do_block=!0),"if"===K&&(Z.if_block=!0)}function I(){for(C()&&(de=!1);Z.mode===me.Statement&&!Z.if_block&&!Z.do_block;)_();g(),Z.var_line=!1,Z.var_line_reindented=!1,Z.mode===me.ObjectLiteral&&(Z.mode=me.BlockStatement)}function R(){C()?de=!0:"TK_WORD"===X?de=!0:"TK_COMMA"===X||"TK_START_EXPR"===X||"TK_EQUALS"===X||"TK_OPERATOR"===X?E()||c():d(),g()}function B(){Z.var_line&&(Z.var_line_tainted=!0),de=!0,g(),de=!0}function j(){return Z.var_line?((x(Z.mode)||"TK_END_BLOCK"===X)&&(Z.var_line_tainted=!1),Z.var_line&&(Z.var_line_reindented=!0),g(),void(Z.var_line_tainted?(Z.var_line_tainted=!1,d()):de=!0)):void("TK_END_BLOCK"===X&&Z.mode!==me.Expression?(g(),Z.mode===me.ObjectLiteral&&"}"===Z.last_text?d():de=!0):Z.mode===me.ObjectLiteral?(g(),d()):(g(),de=!0))}function $(){var e=!0,t=!0;return S(Z.last_text)?(de=!0,void g()):"*"!==K||"TK_DOT"!==X||Q.match(/^\d+$/)?":"===K&&Z.in_case?(Z.case_body=!0,m(),g(),d(),void(Z.in_case=!1)):"::"===K?void g():(!ue||"--"!==K&&"++"!==K||d(),A(K,["--","++","!"])||A(K,["-","+"])&&(A(X,["TK_START_BLOCK","TK_START_EXPR","TK_EQUALS","TK_OPERATOR"])||A(Z.last_text,ae)||","===Z.last_text)?(e=!1,t=!1,";"===Z.last_text&&x(Z.mode)&&(e=!0),"TK_WORD"===X&&A(Z.last_text,ae)&&(e=!0),Z.mode!==me.BlockStatement&&Z.mode!==me.Statement||"{"!==Z.last_text&&";"!==Z.last_text||d()):":"===K?0===Z.ternary_depth?(Z.mode===me.BlockStatement&&(Z.mode=me.ObjectLiteral),e=!1):Z.ternary_depth-=1:"?"===K&&(Z.ternary_depth+=1),de=de||e,g(),void(de=t)):void g()}function V(){var e,t=s(K),n=!1;for(d(!1,!0),t.length>1&&k(t.slice(1),"*")&&(n=!0),g(t[0]),e=1;e<t.length;e++)d(!1,!0),n?g(" "+a(t[e])):G[G.length-1].text.push(t[e]);d(!1,!0)}function U(){de=!0,g(),de=!0}function W(){ue?d(!1,!0):i(!0),de=!0,g(),d(!1,!0)}function q(){S(Z.last_text)?de=!0:c(")"===Z.last_text&&ve.break_chained_methods),g()}function H(){g(),"\n"===K[K.length-1]&&d()}var z,G,K,Y,X,Q,J,Z,ee,te,ne,re,ie,oe,ae,se,le,ue,ce,de,fe,pe,he,ge,me,ve,be="";for(ne="\n\r\t ".split(""),re="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_$".split(""),se="0123456789".split(""),ie="+ - * / % & ++ -- = += -= *= /= %= == === != !== > < >= <= >> << >>> >>>= >>= <<= && &= | || ! !! , : ? ^ ^= |= ::",ie+=" <%= <% %> <?= <? ?>",ie=ie.split(" "),ae="continue,try,throw,return,var,if,switch,case,default,for,while,break,function".split(","),me={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"},ge={TK_START_EXPR:F,TK_END_EXPR:M,TK_START_BLOCK:O,TK_END_BLOCK:L,TK_WORD:P,TK_SEMICOLON:I,TK_STRING:R,TK_EQUALS:B,TK_OPERATOR:$,TK_COMMA:j,TK_BLOCK_COMMENT:V,TK_INLINE_COMMENT:U,TK_COMMENT:W,TK_DOT:q,TK_UNKNOWN:H},t=t?t:{},ve={},void 0!==t.space_after_anon_function&&void 0===t.jslint_happy&&(t.jslint_happy=t.space_after_anon_function),void 0!==t.braces_on_own_line&&(ve.brace_style=t.braces_on_own_line?"expand":"collapse"),ve.brace_style=t.brace_style?t.brace_style:ve.brace_style?ve.brace_style:"collapse","expand-strict"===ve.brace_style&&(ve.brace_style="expand"),ve.indent_size=t.indent_size?parseInt(t.indent_size,10):4,ve.indent_char=t.indent_char?t.indent_char:" ",ve.preserve_newlines=void 0===t.preserve_newlines||t.preserve_newlines,ve.break_chained_methods=void 0!==t.break_chained_methods&&t.break_chained_methods,ve.max_preserve_newlines=void 0===t.max_preserve_newlines?0:parseInt(t.max_preserve_newlines,10),ve.space_in_paren=void 0!==t.space_in_paren&&t.space_in_paren,ve.jslint_happy=void 0!==t.jslint_happy&&t.jslint_happy,ve.keep_array_indentation=void 0!==t.keep_array_indentation&&t.keep_array_indentation,ve.space_before_conditional=void 0===t.space_before_conditional||t.space_before_conditional,ve.unescape_strings=void 0!==t.unescape_strings&&t.unescape_strings,ve.wrap_line_length=void 0===t.wrap_line_length?0:parseInt(t.wrap_line_length,10),ve.e4x=void 0!==t.e4x&&t.e4x,t.indent_with_tabs&&(ve.indent_char="\t",ve.indent_size=1),J="";ve.indent_size>0;)J+=ve.indent_char,ve.indent_size-=1;for(;e&&(" "===e.charAt(0)||"\t"===e.charAt(0));)be+=e.charAt(0),e=e.substring(1);z=e,fe=e.length,X="TK_START_BLOCK",Q="",G=[r()],ce=!1,de=!1,he=[],te=[],y(me.BlockStatement),oe=0,this.beautify=function(){for(var e,t,n,r;;){if(e=N(),K=e[0],Y=e[1],"TK_EOF"===Y)break;if(n=ve.keep_array_indentation&&w(Z.mode),ue=pe>0,n)for(t=0;t<pe;t+=1)d(t>0);else if(ve.max_preserve_newlines&&pe>ve.max_preserve_newlines&&(pe=ve.max_preserve_newlines),ve.preserve_newlines&&pe>1)for(d(),t=1;t<pe;t+=1)d(!0);ge[Y](),"TK_INLINE_COMMENT"!==Y&&"TK_COMMENT"!==Y&&"TK_BLOCK_COMMENT"!==Y&&"TK_UNKNOWN"!==Y&&(Q=Z.last_text,X=Y,Z.last_text=K),Z.had_comment="TK_INLINE_COMMENT"===Y||"TK_COMMENT"===Y||"TK_BLOCK_COMMENT"===Y}r=G[0].text.join("");for(var i=1;i<G.length;i++)r+="\n"+G[i].text.join("");return r=r.replace(/[\r\n ]+$/,"")}}r=[],i=function(){return n}.apply(t,r),!(void 0!==i&&(e.exports=i))}()},function(e,t,n){e.exports=n(559)},function(e,t,n){"use strict";function r(e){var t="transition"+e+"Timeout",n="transition"+e;return function(e){if(e[n]){if(null==e[t])return new Error(t+" wasn't supplied to ReactCSSTransitionGroup: this can cause unreliable animations and won't be supported in a future version of React. See https://fb.me/react-animation-transition-group-timeout for more information.");if("number"!=typeof e[t])return new Error(t+" must be a number (in milliseconds)")}}}var i=n(108),o=n(107),a=n(560),s=n(562),l=o.createClass({displayName:"ReactCSSTransitionGroup",propTypes:{transitionName:s.propTypes.name,transitionAppear:o.PropTypes.bool,transitionEnter:o.PropTypes.bool,transitionLeave:o.PropTypes.bool,transitionAppearTimeout:r("Appear"),transitionEnterTimeout:r("Enter"),transitionLeaveTimeout:r("Leave")},getDefaultProps:function(){return{transitionAppear:!1,transitionEnter:!0,transitionLeave:!0}},_wrapChild:function(e){return o.createElement(s,{name:this.props.transitionName,appear:this.props.transitionAppear,
enter:this.props.transitionEnter,leave:this.props.transitionLeave,appearTimeout:this.props.transitionAppearTimeout,enterTimeout:this.props.transitionEnterTimeout,leaveTimeout:this.props.transitionLeaveTimeout},e)},render:function(){return o.createElement(a,i({},this.props,{childFactory:this._wrapChild}))}});e.exports=l},function(e,t,n){"use strict";var r=n(108),i=n(107),o=n(561),a=n(115),s=i.createClass({displayName:"ReactTransitionGroup",propTypes:{component:i.PropTypes.any,childFactory:i.PropTypes.func},getDefaultProps:function(){return{component:"span",childFactory:a.thatReturnsArgument}},getInitialState:function(){return{children:o.getChildMapping(this.props.children)}},componentWillMount:function(){this.currentlyTransitioningKeys={},this.keysToEnter=[],this.keysToLeave=[]},componentDidMount:function(){var e=this.state.children;for(var t in e)e[t]&&this.performAppear(t)},componentWillReceiveProps:function(e){var t=o.getChildMapping(e.children),n=this.state.children;this.setState({children:o.mergeChildMappings(n,t)});var r;for(r in t){var i=n&&n.hasOwnProperty(r);!t[r]||i||this.currentlyTransitioningKeys[r]||this.keysToEnter.push(r)}for(r in n){var a=t&&t.hasOwnProperty(r);!n[r]||a||this.currentlyTransitioningKeys[r]||this.keysToLeave.push(r)}},componentDidUpdate:function(){var e=this.keysToEnter;this.keysToEnter=[],e.forEach(this.performEnter);var t=this.keysToLeave;this.keysToLeave=[],t.forEach(this.performLeave)},performAppear:function(e){this.currentlyTransitioningKeys[e]=!0;var t=this.refs[e];t.componentWillAppear?t.componentWillAppear(this._handleDoneAppearing.bind(this,e)):this._handleDoneAppearing(e)},_handleDoneAppearing:function(e){var t=this.refs[e];t.componentDidAppear&&t.componentDidAppear(),delete this.currentlyTransitioningKeys[e];var n=o.getChildMapping(this.props.children);n&&n.hasOwnProperty(e)||this.performLeave(e)},performEnter:function(e){this.currentlyTransitioningKeys[e]=!0;var t=this.refs[e];t.componentWillEnter?t.componentWillEnter(this._handleDoneEntering.bind(this,e)):this._handleDoneEntering(e)},_handleDoneEntering:function(e){var t=this.refs[e];t.componentDidEnter&&t.componentDidEnter(),delete this.currentlyTransitioningKeys[e];var n=o.getChildMapping(this.props.children);n&&n.hasOwnProperty(e)||this.performLeave(e)},performLeave:function(e){this.currentlyTransitioningKeys[e]=!0;var t=this.refs[e];t.componentWillLeave?t.componentWillLeave(this._handleDoneLeaving.bind(this,e)):this._handleDoneLeaving(e)},_handleDoneLeaving:function(e){var t=this.refs[e];t.componentDidLeave&&t.componentDidLeave(),delete this.currentlyTransitioningKeys[e];var n=o.getChildMapping(this.props.children);n&&n.hasOwnProperty(e)?this.performEnter(e):this.setState(function(t){var n=r({},t.children);return delete n[e],{children:n}})},render:function(){var e=[];for(var t in this.state.children){var n=this.state.children[t];n&&e.push(i.cloneElement(this.props.childFactory(n),{ref:t,key:t}))}return i.createElement(this.props.component,this.props,e)}});e.exports=s},function(e,t,n){"use strict";var r=n(228),i={getChildMapping:function(e){return e?r(e):e},mergeChildMappings:function(e,t){function n(n){return t.hasOwnProperty(n)?t[n]:e[n]}e=e||{},t=t||{};var r={},i=[];for(var o in e)t.hasOwnProperty(o)?i.length&&(r[o]=i,i=[]):i.push(o);var a,s={};for(var l in t){if(r.hasOwnProperty(l))for(a=0;a<r[l].length;a++){var u=r[l][a];s[r[l][a]]=n(u)}s[l]=n(l)}for(a=0;a<i.length;a++)s[i[a]]=n(i[a]);return s}};e.exports=i},function(e,t,n){"use strict";var r=n(107),i=n(138),o=n(563),a=n(564),s=n(136),l=17,u=r.createClass({displayName:"ReactCSSTransitionGroupChild",propTypes:{name:r.PropTypes.oneOfType([r.PropTypes.string,r.PropTypes.shape({enter:r.PropTypes.string,leave:r.PropTypes.string,active:r.PropTypes.string}),r.PropTypes.shape({enter:r.PropTypes.string,enterActive:r.PropTypes.string,leave:r.PropTypes.string,leaveActive:r.PropTypes.string,appear:r.PropTypes.string,appearActive:r.PropTypes.string})]).isRequired,appear:r.PropTypes.bool,enter:r.PropTypes.bool,leave:r.PropTypes.bool,appearTimeout:r.PropTypes.number,enterTimeout:r.PropTypes.number,leaveTimeout:r.PropTypes.number},transition:function(e,t,n){var r=i.findDOMNode(this);if(!r)return void(t&&t());var s=this.props.name[e]||this.props.name+"-"+e,l=this.props.name[e+"Active"]||s+"-active",u=null,c=function(e){e&&e.target!==r||(clearTimeout(u),o.removeClass(r,s),o.removeClass(r,l),a.removeEndEventListener(r,c),t&&t())};o.addClass(r,s),this.queueClass(l),n?(u=setTimeout(c,n),this.transitionTimeouts.push(u)):a.addEndEventListener(r,c)},queueClass:function(e){this.classNameQueue.push(e),this.timeout||(this.timeout=setTimeout(this.flushClassNameQueue,l))},flushClassNameQueue:function(){this.isMounted()&&this.classNameQueue.forEach(o.addClass.bind(o,i.findDOMNode(this))),this.classNameQueue.length=0,this.timeout=null},componentWillMount:function(){this.classNameQueue=[],this.transitionTimeouts=[]},componentWillUnmount:function(){this.timeout&&clearTimeout(this.timeout),this.transitionTimeouts.forEach(function(e){clearTimeout(e)})},componentWillAppear:function(e){this.props.appear?this.transition("appear",e,this.props.appearTimeout):e()},componentWillEnter:function(e){this.props.enter?this.transition("enter",e,this.props.enterTimeout):e()},componentWillLeave:function(e){this.props.leave?this.transition("leave",e,this.props.leaveTimeout):e()},render:function(){return s(this.props.children)}});e.exports=u},function(e,t,n){"use strict";function r(e,t){for(var n=e;n.parentNode;)n=n.parentNode;var r=n.querySelectorAll(t);return Array.prototype.indexOf.call(r,e)!==-1}var i=n(111),o={addClass:function(e,t){return/\s/.test(t)?i(!1):void 0,t&&(e.classList?e.classList.add(t):o.hasClass(e,t)||(e.className=e.className+" "+t)),e},removeClass:function(e,t){return/\s/.test(t)?i(!1):void 0,t&&(e.classList?e.classList.remove(t):o.hasClass(e,t)&&(e.className=e.className.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,""))),e},conditionClass:function(e,t,n){return(n?o.addClass:o.removeClass)(e,t)},hasClass:function(e,t){return/\s/.test(t)?i(!1):void 0,e.classList?!!t&&e.classList.contains(t):(" "+e.className+" ").indexOf(" "+t+" ")>-1},matchesSelector:function(e,t){var n=e.matches||e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector||function(t){return r(e,t)};return n.call(e,t)}};e.exports=o},function(e,t,n){"use strict";function r(){var e=s("animationend"),t=s("transitionend");e&&l.push(e),t&&l.push(t)}function i(e,t,n){e.addEventListener(t,n,!1)}function o(e,t,n){e.removeEventListener(t,n,!1)}var a=n(152),s=n(209),l=[];a.canUseDOM&&r();var u={addEndEventListener:function(e,t){return 0===l.length?void window.setTimeout(t,0):void l.forEach(function(n){i(e,n,t)})},removeEndEventListener:function(e,t){0!==l.length&&l.forEach(function(n){o(e,n,t)})}};e.exports=u},function(e,t,n){!function(){function e(e){var t=n;e&&(n[e]||(n[e]={}),t=n[e]),t.define&&t.define.packaged||(r.original=t.define,t.define=r,t.define.packaged=!0),t.acequire&&t.acequire.packaged||(o.original=t.acequire,t.acequire=o,t.acequire.packaged=!0)}var t="ace",n=function(){return this}();if(n||"undefined"==typeof window||(n=window),t||"undefined"==typeof acequirejs){var r=function(e,t,n){return"string"!=typeof e?void(r.original?r.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace())):(2==arguments.length&&(n=t),void(r.modules[e]||(r.payloads[e]=n,r.modules[e]=null)))};r.modules={},r.payloads={};var i=function(e,t,n){if("string"==typeof t){var r=s(e,t);if(void 0!=r)return n&&n(),r}else if("[object Array]"===Object.prototype.toString.call(t)){for(var i=[],a=0,l=t.length;a<l;++a){var u=s(e,t[a]);if(void 0==u&&o.original)return;i.push(u)}return n&&n.apply(null,i)||!0}},o=function(e,t){var n=i("",e,t);return void 0==n&&o.original?o.original.apply(this,arguments):n},a=function(e,t){if(t.indexOf("!")!==-1){var n=t.split("!");return a(e,n[0])+"!"+a(e,n[1])}if("."==t.charAt(0)){var r=e.split("/").slice(0,-1).join("/");for(t=r+"/"+t;t.indexOf(".")!==-1&&i!=t;){var i=t;t=t.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return t},s=function(e,t){t=a(e,t);var n=r.modules[t];if(!n){if(n=r.payloads[t],"function"==typeof n){var o={},s={id:t,uri:"",exports:o,packaged:!0},l=function(e,n){return i(t,e,n)},u=n(l,o,s);o=u||s.exports,r.modules[t]=o,delete r.payloads[t]}n=r.modules[t]=o||n}return n};e(t)}}(),ace.define("ace/lib/regexp",["require","exports","module"],function(e,t,n){"use strict";function r(e){return(e.global?"g":"")+(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.extended?"x":"")+(e.sticky?"y":"")}function i(e,t,n){if(Array.prototype.indexOf)return e.indexOf(t,n);for(var r=n||0;r<e.length;r++)if(e[r]===t)return r;return-1}var o={exec:RegExp.prototype.exec,test:RegExp.prototype.test,match:String.prototype.match,replace:String.prototype.replace,split:String.prototype.split},a=void 0===o.exec.call(/()??/,"")[1],s=function(){var e=/^/g;return o.test.call(e,""),!e.lastIndex}();s&&a||(RegExp.prototype.exec=function(e){var t,n,l=o.exec.apply(this,arguments);if("string"==typeof e&&l){if(!a&&l.length>1&&i(l,"")>-1&&(n=RegExp(this.source,o.replace.call(r(this),"g","")),o.replace.call(e.slice(l.index),n,function(){for(var e=1;e<arguments.length-2;e++)void 0===arguments[e]&&(l[e]=void 0)})),this._xregexp&&this._xregexp.captureNames)for(var u=1;u<l.length;u++)t=this._xregexp.captureNames[u-1],t&&(l[t]=l[u]);!s&&this.global&&!l[0].length&&this.lastIndex>l.index&&this.lastIndex--}return l},s||(RegExp.prototype.test=function(e){var t=o.exec.call(this,e);return t&&this.global&&!t[0].length&&this.lastIndex>t.index&&this.lastIndex--,!!t}))}),ace.define("ace/lib/es5-shim",["require","exports","module"],function(e,t,n){function r(){}function i(e){try{return Object.defineProperty(e,"sentinel",{}),"sentinel"in e}catch(t){}}function o(e){return e=+e,e!==e?e=0:0!==e&&e!==1/0&&e!==-(1/0)&&(e=(e>0||-1)*Math.floor(Math.abs(e))),e}Function.prototype.bind||(Function.prototype.bind=function(e){var t=this;if("function"!=typeof t)throw new TypeError("Function.prototype.bind called on incompatible "+t);var n=h.call(arguments,1),i=function(){if(this instanceof i){var r=t.apply(this,n.concat(h.call(arguments)));return Object(r)===r?r:this}return t.apply(e,n.concat(h.call(arguments)))};return t.prototype&&(r.prototype=t.prototype,i.prototype=new r,r.prototype=null),i});var a,s,l,u,c,d=Function.prototype.call,f=Array.prototype,p=Object.prototype,h=f.slice,g=d.bind(p.toString),m=d.bind(p.hasOwnProperty);if((c=m(p,"__defineGetter__"))&&(a=d.bind(p.__defineGetter__),s=d.bind(p.__defineSetter__),l=d.bind(p.__lookupGetter__),u=d.bind(p.__lookupSetter__)),2!=[1,2].splice(0).length)if(function(){function e(e){var t=new Array(e+2);return t[0]=t[1]=0,t}var t,n=[];if(n.splice.apply(n,e(20)),n.splice.apply(n,e(26)),t=n.length,n.splice(5,0,"XXX"),t+1==n.length,t+1==n.length)return!0}()){var v=Array.prototype.splice;Array.prototype.splice=function(e,t){return arguments.length?v.apply(this,[void 0===e?0:e,void 0===t?this.length-e:t].concat(h.call(arguments,2))):[]}}else Array.prototype.splice=function(e,t){var n=this.length;e>0?e>n&&(e=n):void 0==e?e=0:e<0&&(e=Math.max(n+e,0)),e+t<n||(t=n-e);var r=this.slice(e,e+t),i=h.call(arguments,2),o=i.length;if(e===n)o&&this.push.apply(this,i);else{var a=Math.min(t,n-e),s=e+a,l=s+o-a,u=n-s,c=n-a;if(l<s)for(var d=0;d<u;++d)this[l+d]=this[s+d];else if(l>s)for(d=u;d--;)this[l+d]=this[s+d];if(o&&e===c)this.length=c,this.push.apply(this,i);else for(this.length=c+o,d=0;d<o;++d)this[e+d]=i[d]}return r};Array.isArray||(Array.isArray=function(e){return"[object Array]"==g(e)});var b=Object("a"),y="a"!=b[0]||!(0 in b);if(Array.prototype.forEach||(Array.prototype.forEach=function(e){var t=I(this),n=y&&"[object String]"==g(this)?this.split(""):t,r=arguments[1],i=-1,o=n.length>>>0;if("[object Function]"!=g(e))throw new TypeError;for(;++i<o;)i in n&&e.call(r,n[i],i,t)}),Array.prototype.map||(Array.prototype.map=function(e){var t=I(this),n=y&&"[object String]"==g(this)?this.split(""):t,r=n.length>>>0,i=Array(r),o=arguments[1];if("[object Function]"!=g(e))throw new TypeError(e+" is not a function");for(var a=0;a<r;a++)a in n&&(i[a]=e.call(o,n[a],a,t));return i}),Array.prototype.filter||(Array.prototype.filter=function(e){var t,n=I(this),r=y&&"[object String]"==g(this)?this.split(""):n,i=r.length>>>0,o=[],a=arguments[1];if("[object Function]"!=g(e))throw new TypeError(e+" is not a function");for(var s=0;s<i;s++)s in r&&(t=r[s],e.call(a,t,s,n)&&o.push(t));return o}),Array.prototype.every||(Array.prototype.every=function(e){var t=I(this),n=y&&"[object String]"==g(this)?this.split(""):t,r=n.length>>>0,i=arguments[1];if("[object Function]"!=g(e))throw new TypeError(e+" is not a function");for(var o=0;o<r;o++)if(o in n&&!e.call(i,n[o],o,t))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(e){var t=I(this),n=y&&"[object String]"==g(this)?this.split(""):t,r=n.length>>>0,i=arguments[1];if("[object Function]"!=g(e))throw new TypeError(e+" is not a function");for(var o=0;o<r;o++)if(o in n&&e.call(i,n[o],o,t))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(e){var t=I(this),n=y&&"[object String]"==g(this)?this.split(""):t,r=n.length>>>0;if("[object Function]"!=g(e))throw new TypeError(e+" is not a function");if(!r&&1==arguments.length)throw new TypeError("reduce of empty array with no initial value");var i,o=0;if(arguments.length>=2)i=arguments[1];else for(;;){if(o in n){i=n[o++];break}if(++o>=r)throw new TypeError("reduce of empty array with no initial value")}for(;o<r;o++)o in n&&(i=e.call(void 0,i,n[o],o,t));return i}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(e){var t=I(this),n=y&&"[object String]"==g(this)?this.split(""):t,r=n.length>>>0;if("[object Function]"!=g(e))throw new TypeError(e+" is not a function");if(!r&&1==arguments.length)throw new TypeError("reduceRight of empty array with no initial value");var i,o=r-1;if(arguments.length>=2)i=arguments[1];else for(;;){if(o in n){i=n[o--];break}if(--o<0)throw new TypeError("reduceRight of empty array with no initial value")}do o in this&&(i=e.call(void 0,i,n[o],o,t));while(o--);return i}),Array.prototype.indexOf&&[0,1].indexOf(1,2)==-1||(Array.prototype.indexOf=function(e){var t=y&&"[object String]"==g(this)?this.split(""):I(this),n=t.length>>>0;if(!n)return-1;var r=0;for(arguments.length>1&&(r=o(arguments[1])),r=r>=0?r:Math.max(0,n+r);r<n;r++)if(r in t&&t[r]===e)return r;return-1}),Array.prototype.lastIndexOf&&[0,1].lastIndexOf(0,-3)==-1||(Array.prototype.lastIndexOf=function(e){var t=y&&"[object String]"==g(this)?this.split(""):I(this),n=t.length>>>0;if(!n)return-1;var r=n-1;for(arguments.length>1&&(r=Math.min(r,o(arguments[1]))),r=r>=0?r:n-Math.abs(r);r>=0;r--)if(r in t&&e===t[r])return r;return-1}),Object.getPrototypeOf||(Object.getPrototypeOf=function(e){return e.__proto__||(e.constructor?e.constructor.prototype:p)}),!Object.getOwnPropertyDescriptor){var w="Object.getOwnPropertyDescriptor called on a non-object: ";Object.getOwnPropertyDescriptor=function(e,t){if("object"!=typeof e&&"function"!=typeof e||null===e)throw new TypeError(w+e);if(m(e,t)){var n,r,i;if(n={enumerable:!0,configurable:!0},c){var o=e.__proto__;e.__proto__=p;var r=l(e,t),i=u(e,t);if(e.__proto__=o,r||i)return r&&(n.get=r),i&&(n.set=i),n}return n.value=e[t],n}}}if(Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(e){return Object.keys(e)}),!Object.create){var x;x=null===Object.prototype.__proto__?function(){return{__proto__:null}}:function(){var e={};for(var t in e)e[t]=null;return e.constructor=e.hasOwnProperty=e.propertyIsEnumerable=e.isPrototypeOf=e.toLocaleString=e.toString=e.valueOf=e.__proto__=null,e},Object.create=function(e,t){var n;if(null===e)n=x();else{if("object"!=typeof e)throw new TypeError("typeof prototype["+typeof e+"] != 'object'");var r=function(){};r.prototype=e,n=new r,n.__proto__=e}return void 0!==t&&Object.defineProperties(n,t),n}}if(Object.defineProperty){var _=i({}),E="undefined"==typeof document||i(document.createElement("div"));if(!_||!E)var C=Object.defineProperty}if(!Object.defineProperty||C){var k="Property description must be an object: ",S="Object.defineProperty called on non-object: ",A="getters & setters can not be defined on this javascript engine";Object.defineProperty=function(e,t,n){if("object"!=typeof e&&"function"!=typeof e||null===e)throw new TypeError(S+e);if("object"!=typeof n&&"function"!=typeof n||null===n)throw new TypeError(k+n);if(C)try{return C.call(Object,e,t,n)}catch(r){}if(m(n,"value"))if(c&&(l(e,t)||u(e,t))){var i=e.__proto__;e.__proto__=p,delete e[t],e[t]=n.value,e.__proto__=i}else e[t]=n.value;else{if(!c)throw new TypeError(A);m(n,"get")&&a(e,t,n.get),m(n,"set")&&s(e,t,n.set)}return e}}Object.defineProperties||(Object.defineProperties=function(e,t){for(var n in t)m(t,n)&&Object.defineProperty(e,n,t[n]);return e}),Object.seal||(Object.seal=function(e){return e}),Object.freeze||(Object.freeze=function(e){return e});try{Object.freeze(function(){})}catch(T){Object.freeze=function(e){return function(t){return"function"==typeof t?t:e(t)}}(Object.freeze)}if(Object.preventExtensions||(Object.preventExtensions=function(e){return e}),Object.isSealed||(Object.isSealed=function(e){return!1}),Object.isFrozen||(Object.isFrozen=function(e){return!1}),Object.isExtensible||(Object.isExtensible=function(e){if(Object(e)===e)throw new TypeError;for(var t="";m(e,t);)t+="?";e[t]=!0;var n=m(e,t);return delete e[t],n}),!Object.keys){var D=!0,N=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],F=N.length;for(var M in{toString:null})D=!1;Object.keys=function R(e){if("object"!=typeof e&&"function"!=typeof e||null===e)throw new TypeError("Object.keys called on a non-object");var R=[];for(var t in e)m(e,t)&&R.push(t);if(D)for(var n=0,r=F;n<r;n++){var i=N[n];m(e,i)&&R.push(i)}return R}}Date.now||(Date.now=function(){return(new Date).getTime()});var O="\t\n\x0B\f\r   ᠎             　\u2028\u2029\ufeff";if(!String.prototype.trim||O.trim()){O="["+O+"]";var L=new RegExp("^"+O+O+"*"),P=new RegExp(O+O+"*$");String.prototype.trim=function(){return String(this).replace(L,"").replace(P,"")}}var I=function(e){if(null==e)throw new TypeError("can't convert "+e+" to object");return Object(e)}}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/regexp","ace/lib/es5-shim"],function(e,t,n){"use strict";e("./regexp"),e("./es5-shim")}),ace.define("ace/lib/dom",["require","exports","module"],function(e,t,n){"use strict";var r="http://www.w3.org/1999/xhtml";return t.getDocumentHead=function(e){return e||(e=document),e.head||e.getElementsByTagName("head")[0]||e.documentElement},t.createElement=function(e,t){return document.createElementNS?document.createElementNS(t||r,e):document.createElement(e)},t.hasCssClass=function(e,t){var n=(e.className||"").split(/\s+/g);return n.indexOf(t)!==-1},t.addCssClass=function(e,n){t.hasCssClass(e,n)||(e.className+=" "+n)},t.removeCssClass=function(e,t){for(var n=e.className.split(/\s+/g);;){var r=n.indexOf(t);if(r==-1)break;n.splice(r,1)}e.className=n.join(" ")},t.toggleCssClass=function(e,t){for(var n=e.className.split(/\s+/g),r=!0;;){var i=n.indexOf(t);if(i==-1)break;r=!1,n.splice(i,1)}return r&&n.push(t),e.className=n.join(" "),r},t.setCssClass=function(e,n,r){r?t.addCssClass(e,n):t.removeCssClass(e,n)},t.hasCssString=function(e,t){var n,r=0;if(t=t||document,t.createStyleSheet&&(n=t.styleSheets)){for(;r<n.length;)if(n[r++].owningElement.id===e)return!0}else if(n=t.getElementsByTagName("style"))for(;r<n.length;)if(n[r++].id===e)return!0;return!1},t.importCssString=function(e,n,r){if(r=r||document,n&&t.hasCssString(n,r))return null;var i;n&&(e+="\n/*# sourceURL=ace/css/"+n+" */"),r.createStyleSheet?(i=r.createStyleSheet(),i.cssText=e,n&&(i.owningElement.id=n)):(i=t.createElement("style"),i.appendChild(r.createTextNode(e)),n&&(i.id=n),t.getDocumentHead(r).appendChild(i))},t.importCssStylsheet=function(e,n){if(n.createStyleSheet)n.createStyleSheet(e);else{var r=t.createElement("link");r.rel="stylesheet",r.href=e,t.getDocumentHead(n).appendChild(r)}},t.getInnerWidth=function(e){return parseInt(t.computedStyle(e,"paddingLeft"),10)+parseInt(t.computedStyle(e,"paddingRight"),10)+e.clientWidth},t.getInnerHeight=function(e){return parseInt(t.computedStyle(e,"paddingTop"),10)+parseInt(t.computedStyle(e,"paddingBottom"),10)+e.clientHeight},t.scrollbarWidth=function(e){var n=t.createElement("ace_inner");n.style.width="100%",n.style.minWidth="0px",n.style.height="200px",n.style.display="block";var r=t.createElement("ace_outer"),i=r.style;i.position="absolute",i.left="-10000px",i.overflow="hidden",i.width="200px",i.minWidth="0px",i.height="150px",i.display="block",r.appendChild(n);var o=e.documentElement;o.appendChild(r);var a=n.offsetWidth;i.overflow="scroll";var s=n.offsetWidth;return a==s&&(s=r.clientWidth),o.removeChild(r),a-s},"undefined"==typeof document?void(t.importCssString=function(){}):(void 0!==window.pageYOffset?(t.getPageScrollTop=function(){return window.pageYOffset},t.getPageScrollLeft=function(){return window.pageXOffset}):(t.getPageScrollTop=function(){return document.body.scrollTop},t.getPageScrollLeft=function(){return document.body.scrollLeft}),window.getComputedStyle?t.computedStyle=function(e,t){return t?(window.getComputedStyle(e,"")||{})[t]||"":window.getComputedStyle(e,"")||{}}:t.computedStyle=function(e,t){return t?e.currentStyle[t]:e.currentStyle},t.setInnerHtml=function(e,t){var n=e.cloneNode(!1);return n.innerHTML=t,e.parentNode.replaceChild(n,e),n},"textContent"in document.documentElement?(t.setInnerText=function(e,t){e.textContent=t},t.getInnerText=function(e){return e.textContent}):(t.setInnerText=function(e,t){e.innerText=t},t.getInnerText=function(e){return e.innerText}),void(t.getParentWindow=function(e){return e.defaultView||e.parentWindow}))}),ace.define("ace/lib/oop",["require","exports","module"],function(e,t,n){"use strict";t.inherits=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})},t.mixin=function(e,t){for(var n in t)e[n]=t[n];return e},t.implement=function(e,n){t.mixin(e,n)}}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/oop"],function(e,t,n){"use strict";e("./fixoldbrowsers");var r=e("./oop"),i=function(){var e,t,n={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,"super":8,meta:8,command:8,cmd:8},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9","-13":"NumpadEnter",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"},PRINTABLE_KEYS:{32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}};for(t in n.FUNCTION_KEYS)e=n.FUNCTION_KEYS[t].toLowerCase(),n[e]=parseInt(t,10);for(t in n.PRINTABLE_KEYS)e=n.PRINTABLE_KEYS[t].toLowerCase(),n[e]=parseInt(t,10);return r.mixin(n,n.MODIFIER_KEYS),r.mixin(n,n.PRINTABLE_KEYS),r.mixin(n,n.FUNCTION_KEYS),n.enter=n["return"],n.escape=n.esc,n.del=n["delete"],n[173]="-",function(){for(var e=["cmd","ctrl","alt","shift"],t=Math.pow(2,e.length);t--;)n.KEY_MODS[t]=e.filter(function(e){return t&n.KEY_MODS[e]}).join("-")+"-"}(),n.KEY_MODS[0]="",n.KEY_MODS[-1]="input-",n}();r.mixin(t,i),t.keyCodeToString=function(e){var t=i[e];return"string"!=typeof t&&(t=String.fromCharCode(e)),t.toLowerCase()}}),ace.define("ace/lib/useragent",["require","exports","module"],function(e,t,n){"use strict";if(t.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},t.getOS=function(){return t.isMac?t.OS.MAC:t.isLinux?t.OS.LINUX:t.OS.WINDOWS},"object"==typeof navigator){var r=(navigator.platform.match(/mac|win|linux/i)||["other"])[0].toLowerCase(),i=navigator.userAgent;t.isWin="win"==r,t.isMac="mac"==r,t.isLinux="linux"==r,t.isIE="Microsoft Internet Explorer"==navigator.appName||navigator.appName.indexOf("MSAppHost")>=0?parseFloat((i.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((i.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),t.isOldIE=t.isIE&&t.isIE<9,t.isGecko=t.isMozilla=(window.Controllers||window.controllers)&&"Gecko"===window.navigator.product,t.isOldGecko=t.isGecko&&parseInt((i.match(/rv\:(\d+)/)||[])[1],10)<4,t.isOpera=window.opera&&"[object Opera]"==Object.prototype.toString.call(window.opera),t.isWebKit=parseFloat(i.split("WebKit/")[1])||void 0,t.isChrome=parseFloat(i.split(" Chrome/")[1])||void 0,t.isAIR=i.indexOf("AdobeAIR")>=0,t.isIPad=i.indexOf("iPad")>=0,t.isTouchPad=i.indexOf("TouchPad")>=0,t.isChromeOS=i.indexOf(" CrOS ")>=0}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,t,n){"use strict";function r(e,t,n){var r=u(t);if(!a.isMac&&s){if(s.OSKey&&(r|=8),s.altGr){if(3==(3&r))return;s.altGr=0}if(18===n||17===n){var i="location"in t?t.location:t.keyLocation;if(17===n&&1===i)1==s[n]&&(l=t.timeStamp);else if(18===n&&3===r&&2===i){var c=t.timeStamp-l;c<50&&(s.altGr=!0)}}}if(n in o.MODIFIER_KEYS&&(n=-1),8&r&&n>=91&&n<=93&&(n=-1),!r&&13===n){var i="location"in t?t.location:t.keyLocation;if(3===i&&(e(t,r,-n),t.defaultPrevented))return}if(a.isChromeOS&&8&r){if(e(t,r,n),t.defaultPrevented)return;r&=-9}return!!(r||n in o.FUNCTION_KEYS||n in o.PRINTABLE_KEYS)&&e(t,r,n)}function i(){s=Object.create(null),s.count=0,s.lastT=0}var o=e("./keys"),a=e("./useragent"),s=null,l=0;t.addListener=function(e,t,n){if(e.addEventListener)return e.addEventListener(t,n,!1);if(e.attachEvent){var r=function(){n.call(e,window.event)};n._wrapper=r,e.attachEvent("on"+t,r)}},t.removeListener=function(e,t,n){return e.removeEventListener?e.removeEventListener(t,n,!1):void(e.detachEvent&&e.detachEvent("on"+t,n._wrapper||n))},t.stopEvent=function(e){return t.stopPropagation(e),t.preventDefault(e),!1},t.stopPropagation=function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},t.preventDefault=function(e){e.preventDefault?e.preventDefault():e.returnValue=!1},t.getButton=function(e){return"dblclick"==e.type?0:"contextmenu"==e.type||a.isMac&&e.ctrlKey&&!e.altKey&&!e.shiftKey?2:e.preventDefault?e.button:{1:0,2:2,4:1}[e.button]},t.capture=function(e,n,r){function i(e){n&&n(e),r&&r(e),t.removeListener(document,"mousemove",n,!0),t.removeListener(document,"mouseup",i,!0),t.removeListener(document,"dragstart",i,!0)}return t.addListener(document,"mousemove",n,!0),t.addListener(document,"mouseup",i,!0),t.addListener(document,"dragstart",i,!0),i},t.addTouchMoveListener=function(e,n){if("ontouchmove"in e){var r,i;t.addListener(e,"touchstart",function(e){var t=e.changedTouches[0];r=t.clientX,i=t.clientY}),t.addListener(e,"touchmove",function(e){var t=1,o=e.changedTouches[0];e.wheelX=-(o.clientX-r)/t,e.wheelY=-(o.clientY-i)/t,r=o.clientX,i=o.clientY,n(e)})}},t.addMouseWheelListener=function(e,n){"onmousewheel"in e?t.addListener(e,"mousewheel",function(e){var t=8;void 0!==e.wheelDeltaX?(e.wheelX=-e.wheelDeltaX/t,e.wheelY=-e.wheelDeltaY/t):(e.wheelX=0,e.wheelY=-e.wheelDelta/t),n(e)}):"onwheel"in e?t.addListener(e,"wheel",function(e){var t=.35;switch(e.deltaMode){case e.DOM_DELTA_PIXEL:e.wheelX=e.deltaX*t||0,e.wheelY=e.deltaY*t||0;break;case e.DOM_DELTA_LINE:case e.DOM_DELTA_PAGE:e.wheelX=5*(e.deltaX||0),e.wheelY=5*(e.deltaY||0)}n(e)}):t.addListener(e,"DOMMouseScroll",function(e){e.axis&&e.axis==e.HORIZONTAL_AXIS?(e.wheelX=5*(e.detail||0),e.wheelY=0):(e.wheelX=0,e.wheelY=5*(e.detail||0)),n(e)})},t.addMultiMouseDownListener=function(e,n,r,i){var o,s,l,u=0,c={2:"dblclick",3:"tripleclick",4:"quadclick"};t.addListener(e,"mousedown",function(e){if(0!==t.getButton(e)?u=0:e.detail>1?(u++,u>4&&(u=1)):u=1,a.isIE){var d=Math.abs(e.clientX-o)>5||Math.abs(e.clientY-s)>5;l&&!d||(u=1),l&&clearTimeout(l),l=setTimeout(function(){l=null},n[u-1]||600),1==u&&(o=e.clientX,s=e.clientY)}if(e._clicks=u,r[i]("mousedown",e),u>4)u=0;else if(u>1)return r[i](c[u],e)}),a.isOldIE&&t.addListener(e,"dblclick",function(e){u=2,l&&clearTimeout(l),l=setTimeout(function(){l=null},n[u-1]||600),r[i]("mousedown",e),r[i](c[u],e)})};var u=!a.isMac||!a.isOpera||"KeyboardEvent"in window?function(e){return 0|(e.ctrlKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.metaKey?8:0)}:function(e){return 0|(e.metaKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.ctrlKey?8:0)};if(t.getModifierString=function(e){return o.KEY_MODS[u(e)]},t.addCommandKeyListener=function(e,n){var o=t.addListener;if(a.isOldGecko||a.isOpera&&!("KeyboardEvent"in window)){var l=null;o(e,"keydown",function(e){l=e.keyCode}),o(e,"keypress",function(e){return r(n,e,l)})}else{var u=null;o(e,"keydown",function(e){var t=e.keyCode;s[t]=(s[t]||0)+1,91==t||92==t?s.OSKey=!0:s.OSKey&&e.timeStamp-s.lastT>200&&1==s.count&&i(),1==s[t]&&s.count++,s.lastT=e.timeStamp;var o=r(n,e,t);return u=e.defaultPrevented,o}),o(e,"keypress",function(e){u&&(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)&&(t.stopEvent(e),u=null)}),o(e,"keyup",function(e){var t=e.keyCode;s[t]?s.count=Math.max(s.count-1,0):i(),91!=t&&92!=t||(s.OSKey=!1),s[t]=null}),s||(i(),o(window,"focus",i))}},"object"==typeof window&&window.postMessage&&!a.isOldIE){var c=1;t.nextTick=function(e,n){n=n||window;var r="zero-timeout-message-"+c;t.addListener(n,"message",function i(o){o.data==r&&(t.stopPropagation(o),t.removeListener(n,"message",i),e())}),n.postMessage(r,"*")}}t.nextFrame="object"==typeof window&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),t.nextFrame?t.nextFrame=t.nextFrame.bind(window):t.nextFrame=function(e){setTimeout(e,17)}}),ace.define("ace/lib/lang",["require","exports","module"],function(e,t,n){"use strict";t.last=function(e){return e[e.length-1]},t.stringReverse=function(e){return e.split("").reverse().join("")},t.stringRepeat=function(e,t){for(var n="";t>0;)1&t&&(n+=e),(t>>=1)&&(e+=e);return n};var r=/^\s\s*/,i=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(r,"")},t.stringTrimRight=function(e){return e.replace(i,"")},t.copyObject=function(e){var t={};for(var n in e)t[n]=e[n];return t},t.copyArray=function(e){for(var t=[],n=0,r=e.length;n<r;n++)e[n]&&"object"==typeof e[n]?t[n]=this.copyObject(e[n]):t[n]=e[n];return t},t.deepCopy=function o(e){if("object"!=typeof e||!e)return e;var t;if(Array.isArray(e)){t=[];for(var n=0;n<e.length;n++)t[n]=o(e[n]);return t}var r=e.constructor;if(r===RegExp)return e;t=r();for(var n in e)t[n]=o(e[n]);return t},t.arrayToMap=function(e){for(var t={},n=0;n<e.length;n++)t[e[n]]=1;return t},t.createMap=function(e){var t=Object.create(null);for(var n in e)t[n]=e[n];return t},t.arrayRemove=function(e,t){for(var n=0;n<=e.length;n++)t===e[n]&&e.splice(n,1)},t.escapeRegExp=function(e){return e.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},t.escapeHTML=function(e){return e.replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},t.getMatchOffsets=function(e,t){var n=[];return e.replace(t,function(e){n.push({offset:arguments[arguments.length-2],length:e.length})}),n},t.deferredCall=function(e){var t=null,n=function(){t=null,e()},r=function(e){return r.cancel(),t=setTimeout(n,e||0),r};return r.schedule=r,r.call=function(){return this.cancel(),e(),r},r.cancel=function(){
return clearTimeout(t),t=null,r},r.isPending=function(){return t},r},t.delayedCall=function(e,t){var n=null,r=function(){n=null,e()},i=function(e){null==n&&(n=setTimeout(r,e||t))};return i.delay=function(e){n&&clearTimeout(n),n=setTimeout(r,e||t)},i.schedule=i,i.call=function(){this.cancel(),e()},i.cancel=function(){n&&clearTimeout(n),n=null},i.isPending=function(){return n},i}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom","ace/lib/lang"],function(e,t,n){"use strict";var r=e("../lib/event"),i=e("../lib/useragent"),o=e("../lib/dom"),a=e("../lib/lang"),s=i.isChrome<18,l=i.isIE,u=function(e,t){function n(e){if(!g){if(g=!0,T)t=0,n=e?0:d.value.length-1;else var t=e?2:1,n=2;try{d.setSelectionRange(t,n)}catch(r){}g=!1}}function u(){g||(d.value=f,i.isWebKit&&x.schedule())}function c(){clearTimeout(V),V=setTimeout(function(){m&&(d.style.cssText=m,m=""),null==t.renderer.$keepTextAreaAtCursor&&(t.renderer.$keepTextAreaAtCursor=!0,t.renderer.$moveTextAreaToCursor())},i.isOldIE?200:0)}var d=o.createElement("textarea");d.className="ace_text-input",i.isTouchPad&&d.setAttribute("x-palm-disable-auto-cap",!0),d.setAttribute("wrap","off"),d.setAttribute("autocorrect","off"),d.setAttribute("autocapitalize","off"),d.setAttribute("spellcheck",!1),d.style.opacity="0",i.isOldIE&&(d.style.top="-1000px"),e.insertBefore(d,e.firstChild);var f="",p=!1,h=!1,g=!1,m="",v=!0;try{var b=document.activeElement===d}catch(y){}r.addListener(d,"blur",function(e){t.onBlur(e),b=!1}),r.addListener(d,"focus",function(e){b=!0,t.onFocus(e),n()}),this.focus=function(){if(m)return d.focus();var e=d.style.top;d.style.position="fixed",d.style.top="-1000px",d.focus(),setTimeout(function(){d.style.position="","-1000px"==d.style.top&&(d.style.top=e)},0)},this.blur=function(){d.blur()},this.isFocused=function(){return b};var w=a.delayedCall(function(){b&&n(v)}),x=a.delayedCall(function(){g||(d.value=f,b&&n())});i.isWebKit||t.addEventListener("changeSelection",function(){t.selection.isEmpty()!=v&&(v=!v,w.schedule())}),u(),b&&t.onFocus();var _=function(e){return 0===e.selectionStart&&e.selectionEnd===e.value.length};if(!d.setSelectionRange&&d.createTextRange&&(d.setSelectionRange=function(e,t){var n=this.createTextRange();n.collapse(!0),n.moveStart("character",e),n.moveEnd("character",t),n.select()},_=function(e){try{var t=e.ownerDocument.selection.createRange()}catch(n){}return!(!t||t.parentElement()!=e)&&t.text==e.value}),i.isOldIE){var E=!1,C=function(e){if(!E){var t=d.value;if(!g&&t&&t!=f){if(e&&t==f[0])return k.schedule();N(t),E=!0,u(),E=!1}}},k=a.delayedCall(C);r.addListener(d,"propertychange",C);var S={13:1,27:1};r.addListener(d,"keyup",function(e){return!g||d.value&&!S[e.keyCode]||setTimeout(j,0),(d.value.charCodeAt(0)||0)<129?k.call():void(g?B():R())}),r.addListener(d,"keydown",function(e){k.schedule(50)})}var A=function(e){p?p=!1:_(d)?(t.selectAll(),n()):T&&n(t.selection.isEmpty())},T=null;this.setInputHandler=function(e){T=e},this.getInputHandler=function(){return T};var D=!1,N=function(e){T&&(e=T(e),T=null),h?(n(),e&&t.onPaste(e),h=!1):e==f.charAt(0)?D?t.execCommand("del",{source:"ace"}):t.execCommand("backspace",{source:"ace"}):(e.substring(0,2)==f?e=e.substr(2):e.charAt(0)==f.charAt(0)?e=e.substr(1):e.charAt(e.length-1)==f.charAt(0)&&(e=e.slice(0,-1)),e.charAt(e.length-1)==f.charAt(0)&&(e=e.slice(0,-1)),e&&t.onTextInput(e)),D&&(D=!1)},F=function(e){if(!g){var t=d.value;N(t),u()}},M=function(e,t){var n=e.clipboardData||window.clipboardData;if(n&&!s){var r=l?"Text":"text/plain";return t?n.setData(r,t)!==!1:n.getData(r)}},O=function(e,i){var o=t.getCopyText();return o?void(M(e,o)?(i?t.onCut():t.onCopy(),r.preventDefault(e)):(p=!0,d.value=o,d.select(),setTimeout(function(){p=!1,u(),n(),i?t.onCut():t.onCopy()}))):r.preventDefault(e)},L=function(e){O(e,!0)},P=function(e){O(e,!1)},I=function(e){var o=M(e);"string"==typeof o?(o&&t.onPaste(o,e),i.isIE&&setTimeout(n),r.preventDefault(e)):(d.value="",h=!0)};r.addCommandKeyListener(d,t.onCommandKey.bind(t)),r.addListener(d,"select",A),r.addListener(d,"input",F),r.addListener(d,"cut",L),r.addListener(d,"copy",P),r.addListener(d,"paste",I),"oncut"in d&&"oncopy"in d&&"onpaste"in d||r.addListener(e,"keydown",function(e){if((!i.isMac||e.metaKey)&&e.ctrlKey)switch(e.keyCode){case 67:P(e);break;case 86:I(e);break;case 88:L(e)}});var R=function(e){g||!t.onCompositionStart||t.$readOnly||(g={},t.onCompositionStart(),setTimeout(B,0),t.on("mousedown",j),t.selection.isEmpty()||(t.insert(""),t.session.markUndoGroup(),t.selection.clearSelection()),t.session.markUndoGroup())},B=function(){if(g&&t.onCompositionUpdate&&!t.$readOnly){var e=d.value.replace(/\x01/g,"");if(g.lastValue!==e&&(t.onCompositionUpdate(e),g.lastValue&&t.undo(),g.lastValue=e,g.lastValue)){var n=t.selection.getRange();t.insert(g.lastValue),t.session.markUndoGroup(),g.range=t.selection.getRange(),t.selection.setRange(n),t.selection.clearSelection()}}},j=function(e){if(t.onCompositionEnd&&!t.$readOnly){var n=g;g=!1;var r=setTimeout(function(){r=null;var e=d.value.replace(/\x01/g,"");g||(e==n.lastValue?u():!n.lastValue&&e&&(u(),N(e)))});T=function(e){return r&&clearTimeout(r),e=e.replace(/\x01/g,""),e==n.lastValue?"":(n.lastValue&&r&&t.undo(),e)},t.onCompositionEnd(),t.removeListener("mousedown",j),"compositionend"==e.type&&n.range&&t.selection.setRange(n.range)}},$=a.delayedCall(B,50);r.addListener(d,"compositionstart",R),i.isGecko?r.addListener(d,"text",function(){$.schedule()}):(r.addListener(d,"keyup",function(){$.schedule()}),r.addListener(d,"keydown",function(){$.schedule()})),r.addListener(d,"compositionend",j),this.getElement=function(){return d},this.setReadOnly=function(e){d.readOnly=e},this.onContextMenu=function(e){D=!0,n(t.selection.isEmpty()),t._emit("nativecontextmenu",{target:t,domEvent:e}),this.moveToMouse(e,!0)},this.moveToMouse=function(e,n){if(n||!i.isOldIE){m||(m=d.style.cssText),d.style.cssText=(n?"z-index:100000;":"")+"height:"+d.style.height+";"+(i.isIE?"opacity:0.1;":"");var a=t.container.getBoundingClientRect(),s=o.computedStyle(t.container),l=a.top+(parseInt(s.borderTopWidth)||0),u=a.left+(parseInt(a.borderLeftWidth)||0),f=a.bottom-l-d.clientHeight-2,p=function(e){d.style.left=e.clientX-u-2+"px",d.style.top=Math.min(e.clientY-l-2,f)+"px"};p(e),"mousedown"==e.type&&(t.renderer.$keepTextAreaAtCursor&&(t.renderer.$keepTextAreaAtCursor=null),i.isWin&&!i.isOldIE&&r.capture(t.container,p,c))}},this.onContextMenuClose=c;var V,U=function(e){t.textInput.onContextMenu(e),c()};r.addListener(t.renderer.scroller,"contextmenu",U),r.addListener(d,"contextmenu",U)};t.TextInput=u}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(e,t,n){"use strict";function r(e){e.$clickSelection=null;var t=e.editor;t.setDefaultHandler("mousedown",this.onMouseDown.bind(e)),t.setDefaultHandler("dblclick",this.onDoubleClick.bind(e)),t.setDefaultHandler("tripleclick",this.onTripleClick.bind(e)),t.setDefaultHandler("quadclick",this.onQuadClick.bind(e)),t.setDefaultHandler("mousewheel",this.onMouseWheel.bind(e)),t.setDefaultHandler("touchmove",this.onTouchMove.bind(e));var n=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];n.forEach(function(t){e[t]=this[t]},this),e.selectByLines=this.extendSelectionBy.bind(e,"getLineRange"),e.selectByWords=this.extendSelectionBy.bind(e,"getWordRange")}function i(e,t,n,r){return Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2))}function o(e,t){if(e.start.row==e.end.row)var n=2*t.column-e.start.column-e.end.column;else if(e.start.row!=e.end.row-1||e.start.column||e.end.column)var n=2*t.row-e.start.row-e.end.row;else var n=t.column-4;return n<0?{cursor:e.start,anchor:e.end}:{cursor:e.end,anchor:e.start}}var a=(e("../lib/dom"),e("../lib/event"),e("../lib/useragent"),0);(function(){this.onMouseDown=function(e){var t=e.inSelection(),n=e.getDocumentPosition();this.mousedownEvent=e;var r=this.editor,i=e.getButton();if(0!==i){var o=r.getSelectionRange(),a=o.isEmpty();return r.$blockScrolling++,a&&r.selection.moveToPosition(n),r.$blockScrolling--,void r.textInput.onContextMenu(e.domEvent)}return this.mousedownEvent.time=Date.now(),!t||r.isFocused()||(r.focus(),!this.$focusTimout||this.$clickSelection||r.inMultiSelectMode)?(this.captureMouse(e),this.startSelect(n,e.domEvent._clicks>1),e.preventDefault()):(this.setState("focusWait"),void this.captureMouse(e))},this.startSelect=function(e,t){e=e||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var n=this.editor;n.$blockScrolling++,this.mousedownEvent.getShiftKey()?n.selection.selectToPosition(e):t||n.selection.moveToPosition(e),t||this.select(),n.renderer.scroller.setCapture&&n.renderer.scroller.setCapture(),n.setStyle("ace_selecting"),this.setState("select"),n.$blockScrolling--},this.select=function(){var e,t=this.editor,n=t.renderer.screenToTextCoordinates(this.x,this.y);if(t.$blockScrolling++,this.$clickSelection){var r=this.$clickSelection.comparePoint(n);if(r==-1)e=this.$clickSelection.end;else if(1==r)e=this.$clickSelection.start;else{var i=o(this.$clickSelection,n);n=i.cursor,e=i.anchor}t.selection.setSelectionAnchor(e.row,e.column)}t.selection.selectToPosition(n),t.$blockScrolling--,t.renderer.scrollCursorIntoView()},this.extendSelectionBy=function(e){var t,n=this.editor,r=n.renderer.screenToTextCoordinates(this.x,this.y),i=n.selection[e](r.row,r.column);if(n.$blockScrolling++,this.$clickSelection){var a=this.$clickSelection.comparePoint(i.start),s=this.$clickSelection.comparePoint(i.end);if(a==-1&&s<=0)t=this.$clickSelection.end,i.end.row==r.row&&i.end.column==r.column||(r=i.start);else if(1==s&&a>=0)t=this.$clickSelection.start,i.start.row==r.row&&i.start.column==r.column||(r=i.end);else if(a==-1&&1==s)r=i.end,t=i.start;else{var l=o(this.$clickSelection,r);r=l.cursor,t=l.anchor}n.selection.setSelectionAnchor(t.row,t.column)}n.selection.selectToPosition(r),n.$blockScrolling--,n.renderer.scrollCursorIntoView()},this.selectEnd=this.selectAllEnd=this.selectByWordsEnd=this.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting"),this.editor.renderer.scroller.releaseCapture&&this.editor.renderer.scroller.releaseCapture()},this.focusWait=function(){var e=i(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),t=Date.now();(e>a||t-this.mousedownEvent.time>this.$focusTimout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},this.onDoubleClick=function(e){var t=e.getDocumentPosition(),n=this.editor,r=n.session,i=r.getBracketRange(t);i?(i.isEmpty()&&(i.start.column--,i.end.column++),this.setState("select")):(i=n.selection.getWordRange(t.row,t.column),this.setState("selectByWords")),this.$clickSelection=i,this.select()},this.onTripleClick=function(e){var t=e.getDocumentPosition(),n=this.editor;this.setState("selectByLines");var r=n.getSelectionRange();r.isMultiLine()&&r.contains(t.row,t.column)?(this.$clickSelection=n.selection.getLineRange(r.start.row),this.$clickSelection.end=n.selection.getLineRange(r.end.row).end):this.$clickSelection=n.selection.getLineRange(t.row),this.select()},this.onQuadClick=function(e){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState("selectAll")},this.onMouseWheel=function(e){if(!e.getAccelKey()){e.getShiftKey()&&e.wheelY&&!e.wheelX&&(e.wheelX=e.wheelY,e.wheelY=0);var t=e.domEvent.timeStamp,n=t-(this.$lastScrollTime||0),r=this.editor,i=r.renderer.isScrollableBy(e.wheelX*e.speed,e.wheelY*e.speed);return i||n<200?(this.$lastScrollTime=t,r.renderer.scrollBy(e.wheelX*e.speed,e.wheelY*e.speed),e.stop()):void 0}},this.onTouchMove=function(e){var t=e.domEvent.timeStamp,n=t-(this.$lastScrollTime||0),r=this.editor,i=r.renderer.isScrollableBy(e.wheelX*e.speed,e.wheelY*e.speed);if(i||n<200)return this.$lastScrollTime=t,r.renderer.scrollBy(e.wheelX*e.speed,e.wheelY*e.speed),e.stop()}}).call(r.prototype),t.DefaultHandlers=r}),ace.define("ace/tooltip",["require","exports","module","ace/lib/oop","ace/lib/dom"],function(e,t,n){"use strict";function r(e){this.isOpen=!1,this.$element=null,this.$parentNode=e}var i=(e("./lib/oop"),e("./lib/dom"));(function(){this.$init=function(){return this.$element=i.createElement("div"),this.$element.className="ace_tooltip",this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},this.getElement=function(){return this.$element||this.$init()},this.setText=function(e){i.setInnerText(this.getElement(),e)},this.setHtml=function(e){this.getElement().innerHTML=e},this.setPosition=function(e,t){this.getElement().style.left=e+"px",this.getElement().style.top=t+"px"},this.setClassName=function(e){i.addCssClass(this.getElement(),e)},this.show=function(e,t,n){null!=e&&this.setText(e),null!=t&&null!=n&&this.setPosition(t,n),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},this.hide=function(){this.isOpen&&(this.getElement().style.display="none",this.isOpen=!1)},this.getHeight=function(){return this.getElement().offsetHeight},this.getWidth=function(){return this.getElement().offsetWidth}}).call(r.prototype),t.Tooltip=r}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event","ace/tooltip"],function(e,t,n){"use strict";function r(e){function t(){var t=d.getDocumentPosition().row,i=l.$annotations[t];if(!i)return n();var o=a.session.getLength();if(t==o){var s=a.renderer.pixelToScreenCoordinates(0,d.y).row,c=d.$pos;if(s>a.session.documentToScreenRow(c.row,c.column))return n()}if(f!=i)if(f=i.text.join("<br/>"),u.setHtml(f),u.show(),a.on("mousewheel",n),e.$tooltipFollowsMouse)r(d);else{var p=d.domEvent.target,h=p.getBoundingClientRect(),g=u.getElement().style;g.left=h.right+"px",g.top=h.bottom+"px"}}function n(){c&&(c=clearTimeout(c)),f&&(u.hide(),f=null,a.removeEventListener("mousewheel",n))}function r(e){u.setPosition(e.x,e.y)}var a=e.editor,l=a.renderer.$gutterLayer,u=new i(a.container);e.editor.setDefaultHandler("guttermousedown",function(t){if(a.isFocused()&&0==t.getButton()){var n=l.getRegion(t);if("foldWidgets"!=n){var r=t.getDocumentPosition().row,i=a.session.selection;if(t.getShiftKey())i.selectTo(r,0);else{if(2==t.domEvent.detail)return a.selectAll(),t.preventDefault();e.$clickSelection=a.selection.getLineRange(r)}return e.setState("selectByLines"),e.captureMouse(t),t.preventDefault()}}});var c,d,f;e.editor.setDefaultHandler("guttermousemove",function(i){var a=i.domEvent.target||i.domEvent.srcElement;return o.hasCssClass(a,"ace_fold-widget")?n():(f&&e.$tooltipFollowsMouse&&r(i),d=i,void(c||(c=setTimeout(function(){c=null,d&&!e.isMousePressed?t():n()},50))))}),s.addListener(a.renderer.$gutter,"mouseout",function(e){d=null,f&&!c&&(c=setTimeout(function(){c=null,n()},50))}),a.on("changeSession",n)}function i(e){l.call(this,e)}var o=e("../lib/dom"),a=e("../lib/oop"),s=e("../lib/event"),l=e("../tooltip").Tooltip;a.inherits(i,l),function(){this.setPosition=function(e,t){var n=window.innerWidth||document.documentElement.clientWidth,r=window.innerHeight||document.documentElement.clientHeight,i=this.getWidth(),o=this.getHeight();e+=15,t+=15,e+i>n&&(e-=e+i-n),t+o>r&&(t-=20+o),l.prototype.setPosition.call(this,e,t)}}.call(i.prototype),t.GutterHandler=r}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,t,n){"use strict";var r=e("../lib/event"),i=e("../lib/useragent"),o=t.MouseEvent=function(e,t){this.domEvent=e,this.editor=t,this.x=this.clientX=e.clientX,this.y=this.clientY=e.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1};(function(){this.stopPropagation=function(){r.stopPropagation(this.domEvent),this.propagationStopped=!0},this.preventDefault=function(){r.preventDefault(this.domEvent),this.defaultPrevented=!0},this.stop=function(){this.stopPropagation(),this.preventDefault()},this.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},this.inSelection=function(){if(null!==this.$inSelection)return this.$inSelection;var e=this.editor,t=e.getSelectionRange();if(t.isEmpty())this.$inSelection=!1;else{var n=this.getDocumentPosition();this.$inSelection=t.contains(n.row,n.column)}return this.$inSelection},this.getButton=function(){return r.getButton(this.domEvent)},this.getShiftKey=function(){return this.domEvent.shiftKey},this.getAccelKey=i.isMac?function(){return this.domEvent.metaKey}:function(){return this.domEvent.ctrlKey}}).call(o.prototype)}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(e,t,n){"use strict";function r(e){function t(e,t){var n=Date.now(),r=!t||e.row!=t.row,o=!t||e.column!=t.column;if(!T||r||o)m.$blockScrolling+=1,m.moveCursorToPosition(e),m.$blockScrolling-=1,T=n,D={x:w,y:x};else{var a=i(D.x,D.y,w,x);a>c?T=null:n-T>=u&&(m.renderer.scrollCursorIntoView(),T=null)}}function n(e,t){var n=Date.now(),r=m.renderer.layerConfig.lineHeight,i=m.renderer.layerConfig.characterWidth,o=m.renderer.scroller.getBoundingClientRect(),a={x:{left:w-o.left,right:o.right-w},y:{top:x-o.top,bottom:o.bottom-x}},s=Math.min(a.x.left,a.x.right),u=Math.min(a.y.top,a.y.bottom),c={row:e.row,column:e.column};s/i<=2&&(c.column+=a.x.left<a.x.right?-3:2),u/r<=1&&(c.row+=a.y.top<a.y.bottom?-1:1);var d=e.row!=c.row,f=e.column!=c.column,p=!t||e.row!=t.row;d||f&&!p?A?n-A>=l&&m.renderer.scrollCursorIntoView(c):A=n:A=null}function r(){var e=C;C=m.renderer.screenToTextCoordinates(w,x),t(C,e),n(C,e)}function d(){E=m.selection.toOrientedRange(),y=m.session.addMarker(E,"ace_selection",m.getSelectionStyle()),m.clearSelection(),m.isFocused()&&m.renderer.$cursorLayer.setBlinking(!1),clearInterval(_),r(),_=setInterval(r,20),F=0,a.addListener(document,"mousemove",p)}function f(){clearInterval(_),m.session.removeMarker(y),y=null,m.$blockScrolling+=1,m.selection.fromOrientedRange(E),m.$blockScrolling-=1,m.isFocused()&&!S&&m.renderer.$cursorLayer.setBlinking(!m.getReadOnly()),E=null,C=null,F=0,A=null,T=null,a.removeListener(document,"mousemove",p)}function p(){null==M&&(M=setTimeout(function(){null!=M&&y&&f()},20))}function h(e){var t=e.types;return!t||Array.prototype.some.call(t,function(e){return"text/plain"==e||"Text"==e})}function g(e){var t=["copy","copymove","all","uninitialized"],n=["move","copymove","linkmove","all","uninitialized"],r=s.isMac?e.altKey:e.ctrlKey,i="uninitialized";try{i=e.dataTransfer.effectAllowed.toLowerCase()}catch(e){}var o="none";return r&&t.indexOf(i)>=0?o="copy":n.indexOf(i)>=0?o="move":t.indexOf(i)>=0&&(o="copy"),o}var m=e.editor,v=o.createElement("img");v.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",s.isOpera&&(v.style.cssText="width:1px;height:1px;position:fixed;top:0;left:0;z-index:2147483647;opacity:0;");var b=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];b.forEach(function(t){e[t]=this[t]},this),m.addEventListener("mousedown",this.onMouseDown.bind(e));var y,w,x,_,E,C,k,S,A,T,D,N=m.container,F=0;this.onDragStart=function(e){if(this.cancelDrag||!N.draggable){var t=this;return setTimeout(function(){t.startSelect(),t.captureMouse(e)},0),e.preventDefault()}E=m.getSelectionRange();var n=e.dataTransfer;n.effectAllowed=m.getReadOnly()?"copy":"copyMove",s.isOpera&&(m.container.appendChild(v),v.scrollTop=0),n.setDragImage&&n.setDragImage(v,0,0),s.isOpera&&m.container.removeChild(v),n.clearData(),n.setData("Text",m.session.getTextRange()),S=!0,this.setState("drag")},this.onDragEnd=function(e){if(N.draggable=!1,S=!1,this.setState(null),!m.getReadOnly()){var t=e.dataTransfer.dropEffect;k||"move"!=t||m.session.remove(m.getSelectionRange()),m.renderer.$cursorLayer.setBlinking(!0)}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(e){if(!m.getReadOnly()&&h(e.dataTransfer))return w=e.clientX,x=e.clientY,y||d(),F++,e.dataTransfer.dropEffect=k=g(e),a.preventDefault(e)},this.onDragOver=function(e){if(!m.getReadOnly()&&h(e.dataTransfer))return w=e.clientX,x=e.clientY,y||(d(),F++),null!==M&&(M=null),e.dataTransfer.dropEffect=k=g(e),a.preventDefault(e)},this.onDragLeave=function(e){if(F--,F<=0&&y)return f(),k=null,a.preventDefault(e)},this.onDrop=function(e){if(C){var t=e.dataTransfer;if(S)switch(k){case"move":E=E.contains(C.row,C.column)?{start:C,end:C}:m.moveText(E,C);break;case"copy":E=m.moveText(E,C,!0)}else{var n=t.getData("Text");E={start:C,end:m.session.insert(C,n)},m.focus(),k=null}return f(),a.preventDefault(e)}},a.addListener(N,"dragstart",this.onDragStart.bind(e)),a.addListener(N,"dragend",this.onDragEnd.bind(e)),a.addListener(N,"dragenter",this.onDragEnter.bind(e)),a.addListener(N,"dragover",this.onDragOver.bind(e)),a.addListener(N,"dragleave",this.onDragLeave.bind(e)),a.addListener(N,"drop",this.onDrop.bind(e));var M=null}function i(e,t,n,r){return Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2))}var o=e("../lib/dom"),a=e("../lib/event"),s=e("../lib/useragent"),l=200,u=200,c=5;(function(){this.dragWait=function(){var e=Date.now()-this.mousedownEvent.time;e>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var e=this.editor.container;e.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(e){this.editor.renderer.$cursorLayer.setBlinking(!this.editor.getReadOnly()),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var e=this.editor,t=e.container;t.draggable=!0,e.renderer.$cursorLayer.setBlinking(!1),e.setStyle("ace_dragging");var n=s.isWin?"default":"move";e.renderer.setCursorStyle(n),this.setState("dragReady")},this.onMouseDrag=function(e){var t=this.editor.container;if(s.isIE&&"dragReady"==this.state){var n=i(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);n>3&&t.dragDrop()}if("dragWait"===this.state){var n=i(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);n>0&&(t.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(e){if(this.$dragEnabled){this.mousedownEvent=e;var t=this.editor,n=e.inSelection(),r=e.getButton(),i=e.domEvent.detail||1;if(1===i&&0===r&&n){if(e.editor.inMultiSelectMode&&(e.getAccelKey()||e.getShiftKey()))return;this.mousedownEvent.time=Date.now();var o=e.domEvent.target||e.domEvent.srcElement;if("unselectable"in o&&(o.unselectable="on"),t.getDragDelay()){if(s.isWebKit){this.cancelDrag=!0;var a=t.container;a.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(e,this.onMouseDrag.bind(this)),e.defaultPrevented=!0}}}}).call(r.prototype),t.DragdropHandler=r}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(e,t,n){"use strict";var r=e("./dom");t.get=function(e,t){var n=new XMLHttpRequest;n.open("GET",e,!0),n.onreadystatechange=function(){4===n.readyState&&t(n.responseText)},n.send(null)},t.loadScript=function(e,t){var n=r.getDocumentHead(),i=document.createElement("script");i.src=e,n.appendChild(i),i.onload=i.onreadystatechange=function(e,n){!n&&i.readyState&&"loaded"!=i.readyState&&"complete"!=i.readyState||(i=i.onload=i.onreadystatechange=null,n||t())}},t.qualifyURL=function(e){var t=document.createElement("a");return t.href=e,t.href}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(e,t,n){"use strict";var r={},i=function(){this.propagationStopped=!0},o=function(){this.defaultPrevented=!0};r._emit=r._dispatchEvent=function(e,t){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var n=this._eventRegistry[e]||[],r=this._defaultHandlers[e];if(n.length||r){"object"==typeof t&&t||(t={}),t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=i),t.preventDefault||(t.preventDefault=o),n=n.slice();for(var a=0;a<n.length&&(n[a](t,this),!t.propagationStopped);a++);return r&&!t.defaultPrevented?r(t,this):void 0}},r._signal=function(e,t){var n=(this._eventRegistry||{})[e];if(n){n=n.slice();for(var r=0;r<n.length;r++)n[r](t,this)}},r.once=function(e,t){var n=this;t&&this.addEventListener(e,function r(){n.removeEventListener(e,r),t.apply(null,arguments)})},r.setDefaultHandler=function(e,t){var n=this._defaultHandlers;if(n||(n=this._defaultHandlers={_disabled_:{}}),n[e]){var r=n[e],i=n._disabled_[e];i||(n._disabled_[e]=i=[]),i.push(r);var o=i.indexOf(t);o!=-1&&i.splice(o,1)}n[e]=t},r.removeDefaultHandler=function(e,t){var n=this._defaultHandlers;if(n){var r=n._disabled_[e];if(n[e]==t){n[e];r&&this.setDefaultHandler(e,r.pop())}else if(r){var i=r.indexOf(t);i!=-1&&r.splice(i,1)}}},r.on=r.addEventListener=function(e,t,n){this._eventRegistry=this._eventRegistry||{};var r=this._eventRegistry[e];return r||(r=this._eventRegistry[e]=[]),r.indexOf(t)==-1&&r[n?"unshift":"push"](t),t},r.off=r.removeListener=r.removeEventListener=function(e,t){this._eventRegistry=this._eventRegistry||{};var n=this._eventRegistry[e];if(n){var r=n.indexOf(t);r!==-1&&n.splice(r,1)}},r.removeAllListeners=function(e){this._eventRegistry&&(this._eventRegistry[e]=[])},t.EventEmitter=r}),ace.define("ace/lib/app_config",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,n){"no use strict";function r(e){"undefined"!=typeof console&&console.warn&&console.warn.apply(console,arguments)}function i(e,t){var n=new Error(e);n.data=t,"object"==typeof console&&console.error&&console.error(n),setTimeout(function(){throw n})}var o=e("./oop"),a=e("./event_emitter").EventEmitter,s={setOptions:function(e){Object.keys(e).forEach(function(t){this.setOption(t,e[t])},this)},getOptions:function(e){var t={};return e?Array.isArray(e)||(t=e,e=Object.keys(t)):e=Object.keys(this.$options),e.forEach(function(e){t[e]=this.getOption(e)},this),t},setOption:function(e,t){if(this["$"+e]!==t){var n=this.$options[e];if(!n)return r('misspelled option "'+e+'"');if(n.forwardTo)return this[n.forwardTo]&&this[n.forwardTo].setOption(e,t);n.handlesSet||(this["$"+e]=t),n&&n.set&&n.set.call(this,t)}},getOption:function(e){var t=this.$options[e];return t?t.forwardTo?this[t.forwardTo]&&this[t.forwardTo].getOption(e):t&&t.get?t.get.call(this):this["$"+e]:r('misspelled option "'+e+'"')}},l=function(){this.$defaultOptions={}};(function(){o.implement(this,a),this.defineOptions=function(e,t,n){return e.$options||(this.$defaultOptions[t]=e.$options={}),Object.keys(n).forEach(function(t){var r=n[t];"string"==typeof r&&(r={forwardTo:r}),r.name||(r.name=t),e.$options[r.name]=r,"initialValue"in r&&(e["$"+r.name]=r.initialValue)}),o.implement(e,s),this},this.resetOptions=function(e){Object.keys(e.$options).forEach(function(t){var n=e.$options[t];"value"in n&&e.setOption(t,n.value)})},this.setDefaultValue=function(e,t,n){var r=this.$defaultOptions[e]||(this.$defaultOptions[e]={});r[t]&&(r.forwardTo?this.setDefaultValue(r.forwardTo,t,n):r[t].value=n)},this.setDefaultValues=function(e,t){Object.keys(t).forEach(function(n){this.setDefaultValue(e,n,t[n])},this)},this.warn=r,this.reportError=i}).call(l.prototype),t.AppConfig=l}),ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/lib/net","ace/lib/app_config"],function(e,t,r){"no use strict";function i(i){if(c.packaged=i||e.packaged||r.packaged||u.define&&n(566).packaged,!u.document)return"";for(var a={},s="",l=document.currentScript||document._currentScript,d=l&&l.ownerDocument||document,f=d.getElementsByTagName("script"),p=0;p<f.length;p++){var h=f[p],g=h.src||h.getAttribute("src");if(g){for(var m=h.attributes,v=0,b=m.length;v<b;v++){var y=m[v];0===y.name.indexOf("data-ace-")&&(a[o(y.name.replace(/^data-ace-/,""))]=y.value)}var w=g.match(/^(.*)\/ace(\-\w+)?\.js(\?|$)/);w&&(s=w[1])}}s&&(a.base=a.base||s,a.packaged=!0),a.basePath=a.base,a.workerPath=a.workerPath||a.base,a.modePath=a.modePath||a.base,a.themePath=a.themePath||a.base,delete a.base;for(var x in a)"undefined"!=typeof a[x]&&t.set(x,a[x])}function o(e){return e.replace(/-(.)/g,function(e,t){return t.toUpperCase()})}var a=e("./lib/lang"),s=(e("./lib/oop"),e("./lib/net")),l=e("./lib/app_config").AppConfig;r.exports=t=new l;var u=function(){return this||"undefined"!=typeof window&&window}(),c={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{}};t.get=function(e){if(!c.hasOwnProperty(e))throw new Error("Unknown config key: "+e);return c[e]},t.set=function(e,t){if(!c.hasOwnProperty(e))throw new Error("Unknown config key: "+e);c[e]=t},t.all=function(){return a.copyObject(c)},t.moduleUrl=function(e,t){if(c.$moduleUrls[e])return c.$moduleUrls[e];var n=e.split("/");t=t||n[n.length-2]||"";var r="snippets"==t?"/":"-",i=n[n.length-1];if("worker"==t&&"-"==r){var o=new RegExp("^"+t+"[\\-_]|[\\-_]"+t+"$","g");i=i.replace(o,"")}(!i||i==t)&&n.length>1&&(i=n[n.length-2]);var a=c[t+"Path"];return null==a?a=c.basePath:"/"==r&&(t=r=""),a&&"/"!=a.slice(-1)&&(a+="/"),a+t+r+i+this.get("suffix")},t.setModuleUrl=function(e,t){return c.$moduleUrls[e]=t},t.$loading={},t.loadModule=function(n,r){var i,o;Array.isArray(n)&&(o=n[0],n=n[1]);try{i=e(n)}catch(a){}if(i&&!t.$loading[n])return r&&r(i);if(t.$loading[n]||(t.$loading[n]=[]),t.$loading[n].push(r),!(t.$loading[n].length>1)){var l=function(){e([n],function(e){t._emit("load.module",{name:n,module:e});var r=t.$loading[n];t.$loading[n]=null,r.forEach(function(t){t&&t(e)})})};return t.get("packaged")?void s.loadScript(t.moduleUrl(n,o),l):l()}},i(!0),t.init=i}),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/config"],function(e,t,n){"use strict";var r=e("../lib/event"),i=e("../lib/useragent"),o=e("./default_handlers").DefaultHandlers,a=e("./default_gutter_handler").GutterHandler,s=e("./mouse_event").MouseEvent,l=e("./dragdrop_handler").DragdropHandler,u=e("../config"),c=function(e){var t=this;this.editor=e,new o(this),new a(this),new l(this);var n=function(t){document.hasFocus&&document.hasFocus()||window.focus(),e.focus(),e.isFocused()||window.focus()},s=e.renderer.getMouseEventTarget();r.addListener(s,"click",this.onMouseEvent.bind(this,"click")),r.addListener(s,"mousemove",this.onMouseMove.bind(this,"mousemove")),r.addMultiMouseDownListener(s,[400,300,250],this,"onMouseEvent"),e.renderer.scrollBarV&&(r.addMultiMouseDownListener(e.renderer.scrollBarV.inner,[400,300,250],this,"onMouseEvent"),r.addMultiMouseDownListener(e.renderer.scrollBarH.inner,[400,300,250],this,"onMouseEvent"),i.isIE&&(r.addListener(e.renderer.scrollBarV.element,"mousedown",n),r.addListener(e.renderer.scrollBarH.element,"mousedown",n))),r.addMouseWheelListener(e.container,this.onMouseWheel.bind(this,"mousewheel")),r.addTouchMoveListener(e.container,this.onTouchMove.bind(this,"touchmove"));var u=e.renderer.$gutter;r.addListener(u,"mousedown",this.onMouseEvent.bind(this,"guttermousedown")),r.addListener(u,"click",this.onMouseEvent.bind(this,"gutterclick")),r.addListener(u,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick")),r.addListener(u,"mousemove",this.onMouseEvent.bind(this,"guttermousemove")),r.addListener(s,"mousedown",n),r.addListener(u,"mousedown",function(t){return e.focus(),r.preventDefault(t)}),e.on("mousemove",function(n){if(!t.state&&!t.$dragDelay&&t.$dragEnabled){var r=e.renderer.screenToTextCoordinates(n.x,n.y),i=e.session.selection.getRange(),o=e.renderer;!i.isEmpty()&&i.insideStart(r.row,r.column)?o.setCursorStyle("default"):o.setCursorStyle("")}})};(function(){this.onMouseEvent=function(e,t){this.editor._emit(e,new s(t,this.editor))},this.onMouseMove=function(e,t){var n=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;n&&n.length&&this.editor._emit(e,new s(t,this.editor))},this.onMouseWheel=function(e,t){var n=new s(t,this.editor);
n.speed=2*this.$scrollSpeed,n.wheelX=t.wheelX,n.wheelY=t.wheelY,this.editor._emit(e,n)},this.onTouchMove=function(e,t){var n=new s(t,this.editor);n.speed=1,n.wheelX=t.wheelX,n.wheelY=t.wheelY,this.editor._emit(e,n)},this.setState=function(e){this.state=e},this.captureMouse=function(e,t){this.x=e.x,this.y=e.y,this.isMousePressed=!0;var n=this.editor.renderer;n.$keepTextAreaAtCursor&&(n.$keepTextAreaAtCursor=null);var o=this,a=function(e){if(e){if(i.isWebKit&&!e.which&&o.releaseMouse)return o.releaseMouse();o.x=e.clientX,o.y=e.clientY,t&&t(e),o.mouseEvent=new s(e,o.editor),o.$mouseMoved=!0}},l=function(e){clearInterval(c),u(),o[o.state+"End"]&&o[o.state+"End"](e),o.state="",null==n.$keepTextAreaAtCursor&&(n.$keepTextAreaAtCursor=!0,n.$moveTextAreaToCursor()),o.isMousePressed=!1,o.$onCaptureMouseMove=o.releaseMouse=null,e&&o.onMouseEvent("mouseup",e)},u=function(){o[o.state]&&o[o.state](),o.$mouseMoved=!1};if(i.isOldIE&&"dblclick"==e.domEvent.type)return setTimeout(function(){l(e)});o.$onCaptureMouseMove=a,o.releaseMouse=r.capture(this.editor.container,a,l);var c=setInterval(u,20)},this.releaseMouse=null,this.cancelContextMenu=function(){var e=function(t){t&&t.domEvent&&"contextmenu"!=t.domEvent.type||(this.editor.off("nativecontextmenu",e),t&&t.domEvent&&r.stopEvent(t.domEvent))}.bind(this);setTimeout(e,10),this.editor.on("nativecontextmenu",e)}}).call(c.prototype),u.defineOptions(c.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:i.isMac?150:0},dragEnabled:{initialValue:!0},focusTimout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),t.MouseHandler=c}),ace.define("ace/mouse/fold_handler",["require","exports","module"],function(e,t,n){"use strict";function r(e){e.on("click",function(t){var n=t.getDocumentPosition(),r=e.session,i=r.getFoldAt(n.row,n.column,1);i&&(t.getAccelKey()?r.removeFold(i):r.expandFold(i),t.stop())}),e.on("gutterclick",function(t){var n=e.renderer.$gutterLayer.getRegion(t);if("foldWidgets"==n){var r=t.getDocumentPosition().row,i=e.session;i.foldWidgets&&i.foldWidgets[r]&&e.session.onFoldWidgetClick(r,t),e.isFocused()||e.focus(),t.stop()}}),e.on("gutterdblclick",function(t){var n=e.renderer.$gutterLayer.getRegion(t);if("foldWidgets"==n){var r=t.getDocumentPosition().row,i=e.session,o=i.getParentFoldRangeData(r,!0),a=o.range||o.firstRange;if(a){r=a.start.row;var s=i.getFoldAt(r,i.getLine(r).length,1);s?i.removeFold(s):(i.addFold("...",a),e.renderer.scrollCursorIntoView({row:a.start.row,column:0}))}t.stop()}})}t.FoldHandler=r}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(e,t,n){"use strict";var r=e("../lib/keys"),i=e("../lib/event"),o=function(e){this.$editor=e,this.$data={editor:e},this.$handlers=[],this.setDefaultHandler(e.commands)};(function(){this.setDefaultHandler=function(e){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=e,this.addKeyboardHandler(e,0)},this.setKeyboardHandler=function(e){var t=this.$handlers;if(t[t.length-1]!=e){for(;t[t.length-1]&&t[t.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(t[t.length-1]);this.addKeyboardHandler(e,1)}},this.addKeyboardHandler=function(e,t){if(e){"function"!=typeof e||e.handleKeyboard||(e.handleKeyboard=e);var n=this.$handlers.indexOf(e);n!=-1&&this.$handlers.splice(n,1),void 0==t?this.$handlers.push(e):this.$handlers.splice(t,0,e),n==-1&&e.attach&&e.attach(this.$editor)}},this.removeKeyboardHandler=function(e){var t=this.$handlers.indexOf(e);return t!=-1&&(this.$handlers.splice(t,1),e.detach&&e.detach(this.$editor),!0)},this.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},this.getStatusText=function(){var e=this.$data,t=e.editor;return this.$handlers.map(function(n){return n.getStatusText&&n.getStatusText(t,e)||""}).filter(Boolean).join(" ")},this.$callKeyboardHandlers=function(e,t,n,r){for(var o,a=!1,s=this.$editor.commands,l=this.$handlers.length;l--&&(o=this.$handlers[l].handleKeyboard(this.$data,e,t,n,r),!(o&&o.command&&(a="null"==o.command||s.exec(o.command,this.$editor,o.args,r),a&&r&&e!=-1&&1!=o.passEvent&&1!=o.command.passEvent&&i.stopEvent(r),a))););return a||e!=-1||(o={command:"insertstring"},a=s.exec("insertstring",this.$editor,t)),a&&this.$editor._signal("keyboardActivity",o),a},this.onCommandKey=function(e,t,n){var i=r.keyCodeToString(n);this.$callKeyboardHandlers(t,i,n,e)},this.onTextInput=function(e){this.$callKeyboardHandlers(-1,e)}}).call(o.prototype),t.KeyBinding=o}),ace.define("ace/range",["require","exports","module"],function(e,t,n){"use strict";var r=function(e,t){return e.row-t.row||e.column-t.column},i=function(e,t,n,r){this.start={row:e,column:t},this.end={row:n,column:r}};(function(){this.isEqual=function(e){return this.start.row===e.start.row&&this.end.row===e.end.row&&this.start.column===e.start.column&&this.end.column===e.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(e,t){return 0==this.compare(e,t)},this.compareRange=function(e){var t,n=e.end,r=e.start;return t=this.compare(n.row,n.column),1==t?(t=this.compare(r.row,r.column),1==t?2:0==t?1:0):t==-1?-2:(t=this.compare(r.row,r.column),t==-1?-1:1==t?42:0)},this.comparePoint=function(e){return this.compare(e.row,e.column)},this.containsRange=function(e){return 0==this.comparePoint(e.start)&&0==this.comparePoint(e.end)},this.intersects=function(e){var t=this.compareRange(e);return t==-1||0==t||1==t},this.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},this.isStart=function(e,t){return this.start.row==e&&this.start.column==t},this.setStart=function(e,t){"object"==typeof e?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},this.setEnd=function(e,t){"object"==typeof e?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},this.inside=function(e,t){return 0==this.compare(e,t)&&(!this.isEnd(e,t)&&!this.isStart(e,t))},this.insideStart=function(e,t){return 0==this.compare(e,t)&&!this.isEnd(e,t)},this.insideEnd=function(e,t){return 0==this.compare(e,t)&&!this.isStart(e,t)},this.compare=function(e,t){return this.isMultiLine()||e!==this.start.row?e<this.start.row?-1:e>this.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0:t<this.start.column?-1:t>this.end.column?1:0},this.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},this.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.clipRows=function(e,t){if(this.end.row>t)var n={row:t+1,column:0};else if(this.end.row<e)var n={row:e,column:0};if(this.start.row>t)var r={row:t+1,column:0};else if(this.start.row<e)var r={row:e,column:0};return i.fromPoints(r||this.start,n||this.end)},this.extend=function(e,t){var n=this.compare(e,t);if(0==n)return this;if(n==-1)var r={row:e,column:t};else var o={row:e,column:t};return i.fromPoints(r||this.start,o||this.end)},this.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},this.isMultiLine=function(){return this.start.row!==this.end.row},this.clone=function(){return i.fromPoints(this.start,this.end)},this.collapseRows=function(){return 0==this.end.column?new i(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new i(this.start.row,0,this.end.row,0)},this.toScreenRange=function(e){var t=e.documentToScreenPosition(this.start),n=e.documentToScreenPosition(this.end);return new i(t.row,t.column,n.row,n.column)},this.moveBy=function(e,t){this.start.row+=e,this.start.column+=t,this.end.row+=e,this.end.column+=t}}).call(i.prototype),i.fromPoints=function(e,t){return new i(e.row,e.column,t.row,t.column)},i.comparePoints=r,i.comparePoints=function(e,t){return e.row-t.row||e.column-t.column},t.Range=i}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./lib/lang"),o=e("./lib/event_emitter").EventEmitter,a=e("./range").Range,s=function(e){this.session=e,this.doc=e.getDocument(),this.clearSelection(),this.lead=this.selectionLead=this.doc.createAnchor(0,0),this.anchor=this.selectionAnchor=this.doc.createAnchor(0,0);var t=this;this.lead.on("change",function(e){t._emit("changeCursor"),t.$isEmpty||t._emit("changeSelection"),t.$keepDesiredColumnOnChange||e.old.column==e.value.column||(t.$desiredColumn=null)}),this.selectionAnchor.on("change",function(){t.$isEmpty||t._emit("changeSelection")})};(function(){r.implement(this,o),this.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},this.isMultiLine=function(){return!this.isEmpty()&&this.getRange().isMultiLine()},this.getCursor=function(){return this.lead.getPosition()},this.setSelectionAnchor=function(e,t){this.anchor.setPosition(e,t),this.$isEmpty&&(this.$isEmpty=!1,this._emit("changeSelection"))},this.getSelectionAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},this.getSelectionLead=function(){return this.lead.getPosition()},this.shiftSelection=function(e){if(this.$isEmpty)return void this.moveCursorTo(this.lead.row,this.lead.column+e);var t=this.getSelectionAnchor(),n=this.getSelectionLead(),r=this.isBackwards();r&&0===t.column||this.setSelectionAnchor(t.row,t.column+e),(r||0!==n.column)&&this.$moveSelection(function(){this.moveCursorTo(n.row,n.column+e)})},this.isBackwards=function(){var e=this.anchor,t=this.lead;return e.row>t.row||e.row==t.row&&e.column>t.column},this.getRange=function(){var e=this.anchor,t=this.lead;return this.isEmpty()?a.fromPoints(t,t):this.isBackwards()?a.fromPoints(t,e):a.fromPoints(e,t)},this.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},this.selectAll=function(){var e=this.doc.getLength()-1;this.setSelectionAnchor(0,0),this.moveCursorTo(e,this.doc.getLine(e).length)},this.setRange=this.setSelectionRange=function(e,t){t?(this.setSelectionAnchor(e.end.row,e.end.column),this.selectTo(e.start.row,e.start.column)):(this.setSelectionAnchor(e.start.row,e.start.column),this.selectTo(e.end.row,e.end.column)),this.getRange().isEmpty()&&(this.$isEmpty=!0),this.$desiredColumn=null},this.$moveSelection=function(e){var t=this.lead;this.$isEmpty&&this.setSelectionAnchor(t.row,t.column),e.call(this)},this.selectTo=function(e,t){this.$moveSelection(function(){this.moveCursorTo(e,t)})},this.selectToPosition=function(e){this.$moveSelection(function(){this.moveCursorToPosition(e)})},this.moveTo=function(e,t){this.clearSelection(),this.moveCursorTo(e,t)},this.moveToPosition=function(e){this.clearSelection(),this.moveCursorToPosition(e)},this.selectUp=function(){this.$moveSelection(this.moveCursorUp)},this.selectDown=function(){this.$moveSelection(this.moveCursorDown)},this.selectRight=function(){this.$moveSelection(this.moveCursorRight)},this.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},this.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},this.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},this.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},this.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},this.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},this.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},this.getWordRange=function(e,t){if("undefined"==typeof t){var n=e||this.lead;e=n.row,t=n.column}return this.session.getWordRange(e,t)},this.selectWord=function(){this.setSelectionRange(this.getWordRange())},this.selectAWord=function(){var e=this.getCursor(),t=this.session.getAWordRange(e.row,e.column);this.setSelectionRange(t)},this.getLineRange=function(e,t){var n,r="number"==typeof e?e:this.lead.row,i=this.session.getFoldLine(r);return i?(r=i.start.row,n=i.end.row):n=r,t===!0?new a(r,0,n,this.session.getLine(n).length):new a(r,0,n+1,0)},this.selectLine=function(){this.setSelectionRange(this.getLineRange())},this.moveCursorUp=function(){this.moveCursorBy(-1,0)},this.moveCursorDown=function(){this.moveCursorBy(1,0)},this.moveCursorLeft=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,-1))this.moveCursorTo(e.start.row,e.start.column);else if(0===t.column)t.row>0&&this.moveCursorTo(t.row-1,this.doc.getLine(t.row-1).length);else{var n=this.session.getTabSize();this.session.isTabStop(t)&&this.doc.getLine(t.row).slice(t.column-n,t.column).split(" ").length-1==n?this.moveCursorBy(0,-n):this.moveCursorBy(0,-1)}},this.moveCursorRight=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,1))this.moveCursorTo(e.end.row,e.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0);else{var n=this.session.getTabSize(),t=this.lead;this.session.isTabStop(t)&&this.doc.getLine(t.row).slice(t.column,t.column+n).split(" ").length-1==n?this.moveCursorBy(0,n):this.moveCursorBy(0,1)}},this.moveCursorLineStart=function(){var e=this.lead.row,t=this.lead.column,n=this.session.documentToScreenRow(e,t),r=this.session.screenToDocumentPosition(n,0),i=this.session.getDisplayLine(e,null,r.row,r.column),o=i.match(/^\s*/);o[0].length==t||this.session.$useEmacsStyleLineStart||(r.column+=o[0].length),this.moveCursorToPosition(r)},this.moveCursorLineEnd=function(){var e=this.lead,t=this.session.getDocumentLastRowColumnPosition(e.row,e.column);if(this.lead.column==t.column){var n=this.session.getLine(t.row);if(t.column==n.length){var r=n.search(/\s+$/);r>0&&(t.column=r)}}this.moveCursorTo(t.row,t.column)},this.moveCursorFileEnd=function(){var e=this.doc.getLength()-1,t=this.doc.getLine(e).length;this.moveCursorTo(e,t)},this.moveCursorFileStart=function(){this.moveCursorTo(0,0)},this.moveCursorLongWordRight=function(){var e,t=this.lead.row,n=this.lead.column,r=this.doc.getLine(t),i=r.substring(n);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var o=this.session.getFoldAt(t,n,1);return o?void this.moveCursorTo(o.end.row,o.end.column):((e=this.session.nonTokenRe.exec(i))&&(n+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,i=r.substring(n)),n>=r.length?(this.moveCursorTo(t,r.length),this.moveCursorRight(),void(t<this.doc.getLength()-1&&this.moveCursorWordRight())):((e=this.session.tokenRe.exec(i))&&(n+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),void this.moveCursorTo(t,n)))},this.moveCursorLongWordLeft=function(){var e,t=this.lead.row,n=this.lead.column;if(e=this.session.getFoldAt(t,n,-1))return void this.moveCursorTo(e.start.row,e.start.column);var r=this.session.getFoldStringAt(t,n,-1);null==r&&(r=this.doc.getLine(t).substring(0,n));var o,a=i.stringReverse(r);return this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,(o=this.session.nonTokenRe.exec(a))&&(n-=this.session.nonTokenRe.lastIndex,a=a.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),n<=0?(this.moveCursorTo(t,0),this.moveCursorLeft(),void(t>0&&this.moveCursorWordLeft())):((o=this.session.tokenRe.exec(a))&&(n-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),void this.moveCursorTo(t,n))},this.$shortWordEndIndex=function(e){var t,n,r=0,i=/\s/,o=this.session.tokenRe;if(o.lastIndex=0,t=this.session.tokenRe.exec(e))r=this.session.tokenRe.lastIndex;else{for(;(n=e[r])&&i.test(n);)r++;if(r<1)for(o.lastIndex=0;(n=e[r])&&!o.test(n);)if(o.lastIndex=0,r++,i.test(n)){if(r>2){r--;break}for(;(n=e[r])&&i.test(n);)r++;if(r>2)break}}return o.lastIndex=0,r},this.moveCursorShortWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),r=n.substring(t),i=this.session.getFoldAt(e,t,1);if(i)return this.moveCursorTo(i.end.row,i.end.column);if(t==n.length){var o=this.doc.getLength();do e++,r=this.doc.getLine(e);while(e<o&&/^\s*$/.test(r));/^\s+/.test(r)||(r=""),t=0}var a=this.$shortWordEndIndex(r);this.moveCursorTo(e,t+a)},this.moveCursorShortWordLeft=function(){var e,t=this.lead.row,n=this.lead.column;if(e=this.session.getFoldAt(t,n,-1))return this.moveCursorTo(e.start.row,e.start.column);var r=this.session.getLine(t).substring(0,n);if(0===n){do t--,r=this.doc.getLine(t);while(t>0&&/^\s*$/.test(r));n=r.length,/\s+$/.test(r)||(r="")}var o=i.stringReverse(r),a=this.$shortWordEndIndex(o);return this.moveCursorTo(t,n-a)},this.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},this.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},this.moveCursorBy=function(e,t){var n=this.session.documentToScreenPosition(this.lead.row,this.lead.column);0===t&&(this.$desiredColumn?n.column=this.$desiredColumn:this.$desiredColumn=n.column);var r=this.session.screenToDocumentPosition(n.row+e,n.column);0!==e&&0===t&&r.row===this.lead.row&&r.column===this.lead.column&&this.session.lineWidgets&&this.session.lineWidgets[r.row]&&(r.row>0||e>0)&&r.row++,this.moveCursorTo(r.row,r.column+t,0===t)},this.moveCursorToPosition=function(e){this.moveCursorTo(e.row,e.column)},this.moveCursorTo=function(e,t,n){var r=this.session.getFoldAt(e,t,1);r&&(e=r.start.row,t=r.start.column),this.$keepDesiredColumnOnChange=!0,this.lead.setPosition(e,t),this.$keepDesiredColumnOnChange=!1,n||(this.$desiredColumn=null)},this.moveCursorToScreen=function(e,t,n){var r=this.session.screenToDocumentPosition(e,t);this.moveCursorTo(r.row,r.column,n)},this.detach=function(){this.lead.detach(),this.anchor.detach(),this.session=this.doc=null},this.fromOrientedRange=function(e){this.setSelectionRange(e,e.cursor==e.start),this.$desiredColumn=e.desiredColumn||this.$desiredColumn},this.toOrientedRange=function(e){var t=this.getRange();return e?(e.start.column=t.start.column,e.start.row=t.start.row,e.end.column=t.end.column,e.end.row=t.end.row):e=t,e.cursor=this.isBackwards()?e.start:e.end,e.desiredColumn=this.$desiredColumn,e},this.getRangeOfMovements=function(e){var t=this.getCursor();try{e.call(null,this);var n=this.getCursor();return a.fromPoints(t,n)}catch(r){return a.fromPoints(t,t)}finally{this.moveCursorToPosition(t)}},this.toJSON=function(){if(this.rangeCount)var e=this.ranges.map(function(e){var t=e.clone();return t.isBackwards=e.cursor==e.start,t});else{var e=this.getRange();e.isBackwards=this.isBackwards()}return e},this.fromJSON=function(e){if(void 0==e.start){if(this.rangeList){this.toSingleRange(e[0]);for(var t=e.length;t--;){var n=a.fromPoints(e[t].start,e[t].end);e[t].isBackwards&&(n.cursor=n.start),this.addRange(n,!0)}return}e=e[0]}this.rangeList&&this.toSingleRange(e),this.setSelectionRange(e,e.isBackwards)},this.isEqual=function(e){if((e.length||this.rangeCount)&&e.length!=this.rangeCount)return!1;if(!e.length||!this.ranges)return this.getRange().isEqual(e);for(var t=this.ranges.length;t--;)if(!this.ranges[t].isEqual(e[t]))return!1;return!0}}).call(s.prototype),t.Selection=s}),ace.define("ace/tokenizer",["require","exports","module","ace/config"],function(e,t,n){"use strict";var r=e("./config"),i=2e3,o=function(e){this.states=e,this.regExps={},this.matchMappings={};for(var t in this.states){for(var n=this.states[t],r=[],i=0,o=this.matchMappings[t]={defaultToken:"text"},a="g",s=[],l=0;l<n.length;l++){var u=n[l];if(u.defaultToken&&(o.defaultToken=u.defaultToken),u.caseInsensitive&&(a="gi"),null!=u.regex){u.regex instanceof RegExp&&(u.regex=u.regex.toString().slice(1,-1));var c=u.regex,d=new RegExp("(?:("+c+")|(.))").exec("a").length-2;Array.isArray(u.token)?1==u.token.length||1==d?u.token=u.token[0]:d-1!=u.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:u,groupCount:d-1}),u.token=u.token[0]):(u.tokenArray=u.token,u.token=null,u.onMatch=this.$arrayTokens):"function"!=typeof u.token||u.onMatch||(d>1?u.onMatch=this.$applyToken:u.onMatch=u.token),d>1&&(/\\\d/.test(u.regex)?c=u.regex.replace(/\\([0-9]+)/g,function(e,t){return"\\"+(parseInt(t,10)+i+1)}):(d=1,c=this.removeCapturingGroups(u.regex)),u.splitRegex||"string"==typeof u.token||s.push(u)),o[i]=l,i+=d,r.push(c),u.onMatch||(u.onMatch=null)}}r.length||(o[0]=0,r.push("$")),s.forEach(function(e){e.splitRegex=this.createSplitterRegexp(e.regex,a)},this),this.regExps[t]=new RegExp("("+r.join(")|(")+")|($)",a)}};(function(){this.$setMaxTokenCount=function(e){i=0|e},this.$applyToken=function(e){var t=this.splitRegex.exec(e).slice(1),n=this.token.apply(this,t);if("string"==typeof n)return[{type:n,value:e}];for(var r=[],i=0,o=n.length;i<o;i++)t[i]&&(r[r.length]={type:n[i],value:t[i]});return r},this.$arrayTokens=function(e){if(!e)return[];var t=this.splitRegex.exec(e);if(!t)return"text";for(var n=[],r=this.tokenArray,i=0,o=r.length;i<o;i++)t[i+1]&&(n[n.length]={type:r[i],value:t[i+1]});return n},this.removeCapturingGroups=function(e){var t=e.replace(/\[(?:\\.|[^\]])*?\]|\\.|\(\?[:=!]|(\()/g,function(e,t){return t?"(?:":e});return t},this.createSplitterRegexp=function(e,t){if(e.indexOf("(?=")!=-1){var n=0,r=!1,i={};e.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(e,t,o,a,s,l){return r?r="]"!=s:s?r=!0:a?(n==i.stack&&(i.end=l+1,i.stack=-1),n--):o&&(n++,1!=o.length&&(i.stack=n,i.start=l)),e}),null!=i.end&&/^\)*$/.test(e.substr(i.end))&&(e=e.substring(0,i.start)+e.substr(i.end))}return"^"!=e.charAt(0)&&(e="^"+e),"$"!=e.charAt(e.length-1)&&(e+="$"),new RegExp(e,(t||"").replace("g",""))},this.getLineTokens=function(e,t){if(t&&"string"!=typeof t){var n=t.slice(0);t=n[0],"#tmp"===t&&(n.shift(),t=n.shift())}else var n=[];var r=t||"start",o=this.states[r];o||(r="start",o=this.states[r]);var a=this.matchMappings[r],s=this.regExps[r];s.lastIndex=0;for(var l,u=[],c=0,d=0,f={type:null,value:""};l=s.exec(e);){var p=a.defaultToken,h=null,g=l[0],m=s.lastIndex;if(m-g.length>c){var v=e.substring(c,m-g.length);f.type==p?f.value+=v:(f.type&&u.push(f),f={type:p,value:v})}for(var b=0;b<l.length-2;b++)if(void 0!==l[b+1]){h=o[a[b]],p=h.onMatch?h.onMatch(g,r,n):h.token,h.next&&(r="string"==typeof h.next?h.next:h.next(r,n),o=this.states[r],o||(this.reportError("state doesn't exist",r),r="start",o=this.states[r]),a=this.matchMappings[r],c=m,s=this.regExps[r],s.lastIndex=m);break}if(g)if("string"==typeof p)h&&h.merge===!1||f.type!==p?(f.type&&u.push(f),f={type:p,value:g}):f.value+=g;else if(p){f.type&&u.push(f),f={type:null,value:""};for(var b=0;b<p.length;b++)u.push(p[b])}if(c==e.length)break;if(c=m,d++>i){for(d>2*e.length&&this.reportError("infinite loop with in ace tokenizer",{startState:t,line:e});c<e.length;)f.type&&u.push(f),f={value:e.substring(c,c+=2e3),type:"overflow"};r="start",n=[];break}}return f.type&&u.push(f),n.length>1&&n[0]!==r&&n.unshift("#tmp",r),{tokens:u,state:n.length?n:r}},this.reportError=r.reportError}).call(o.prototype),t.Tokenizer=o}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"],function(e,t,n){"use strict";var r=e("../lib/lang"),i=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}};(function(){this.addRules=function(e,t){if(t)for(var n in e){for(var r=e[n],i=0;i<r.length;i++){var o=r[i];(o.next||o.onMatch)&&("string"==typeof o.next&&0!==o.next.indexOf(t)&&(o.next=t+o.next),o.nextState&&0!==o.nextState.indexOf(t)&&(o.nextState=t+o.nextState))}this.$rules[t+n]=r}else for(var n in e)this.$rules[n]=e[n]},this.getRules=function(){return this.$rules},this.embedRules=function(e,t,n,i,o){var a="function"==typeof e?(new e).getRules():e;if(i)for(var s=0;s<i.length;s++)i[s]=t+i[s];else{i=[];for(var l in a)i.push(t+l)}if(this.addRules(a,t),n)for(var u=Array.prototype[o?"push":"unshift"],s=0;s<i.length;s++)u.apply(this.$rules[i[s]],r.deepCopy(n));this.$embeds||(this.$embeds=[]),this.$embeds.push(t)},this.getEmbeds=function(){return this.$embeds};var e=function(e,t){return("start"!=e||t.length)&&t.unshift(this.nextState,e),this.nextState},t=function(e,t){return t.shift(),t.shift()||"start"};this.normalizeRules=function(){function n(o){var a=i[o];a.processed=!0;for(var s=0;s<a.length;s++){var l=a[s];!l.regex&&l.start&&(l.regex=l.start,l.next||(l.next=[]),l.next.push({defaultToken:l.token},{token:l.token+".end",regex:l.end||l.start,next:"pop"}),l.token=l.token+".start",l.push=!0);var u=l.next||l.push;if(u&&Array.isArray(u)){var c=l.stateName;c||(c=l.token,"string"!=typeof c&&(c=c[0]||""),i[c]&&(c+=r++)),i[c]=u,l.next=c,n(c)}else"pop"==u&&(l.next=t);if(l.push&&(l.nextState=l.next||l.push,l.next=e,delete l.push),l.rules)for(var d in l.rules)i[d]?i[d].push&&i[d].push.apply(i[d],l.rules[d]):i[d]=l.rules[d];if(l.include||"string"==typeof l)var f=l.include||l,p=i[f];else Array.isArray(l)&&(p=l);if(p){var h=[s,1].concat(p);l.noEscape&&(h=h.filter(function(e){return!e.next})),a.splice.apply(a,h),s--,p=null}l.keywordMap&&(l.token=this.createKeywordMapper(l.keywordMap,l.defaultToken||"text",l.caseInsensitive),delete l.defaultToken)}}var r=0,i=this.$rules;Object.keys(i).forEach(n,this)},this.createKeywordMapper=function(e,t,n,r){var i=Object.create(null);return Object.keys(e).forEach(function(t){var o=e[t];n&&(o=o.toLowerCase());for(var a=o.split(r||"|"),s=a.length;s--;)i[a[s]]=t}),Object.getPrototypeOf(i)&&(i.__proto__=null),this.$keywordList=Object.keys(i),e=null,n?function(e){return i[e.toLowerCase()]||t}:function(e){return i[e]||t}},this.getKeywords=function(){return this.$keywords}}).call(i.prototype),t.TextHighlightRules=i}),ace.define("ace/mode/behaviour",["require","exports","module"],function(e,t,n){"use strict";var r=function(){this.$behaviours={}};(function(){this.add=function(e,t,n){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[e]:this.$behaviours[e]={}}this.$behaviours[e][t]=n},this.addBehaviours=function(e){for(var t in e)for(var n in e[t])this.add(t,n,e[t][n])},this.remove=function(e){this.$behaviours&&this.$behaviours[e]&&delete this.$behaviours[e]},this.inherit=function(e,t){if("function"==typeof e)var n=(new e).getBehaviours(t);else var n=e.getBehaviours(t);this.addBehaviours(n)},this.getBehaviours=function(e){if(e){for(var t={},n=0;n<e.length;n++)this.$behaviours[e[n]]&&(t[e[n]]=this.$behaviours[e[n]]);return t}return this.$behaviours}}).call(r.prototype),t.Behaviour=r}),ace.define("ace/unicode",["require","exports","module"],function(e,t,n){"use strict";function r(e){var n=/\w{4}/g;for(var r in e)t.packages[r]=e[r].replace(n,"\\u$&")}t.packages={},r({L:"0041-005A0061-007A00AA00B500BA00C0-00D600D8-00F600F8-02C102C6-02D102E0-02E402EC02EE0370-037403760377037A-037D03860388-038A038C038E-03A103A3-03F503F7-0481048A-05250531-055605590561-058705D0-05EA05F0-05F20621-064A066E066F0671-06D306D506E506E606EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA07F407F507FA0800-0815081A082408280904-0939093D09500958-0961097109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E460E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EC60EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10A0-10C510D0-10FA10FC1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317D717DC1820-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541AA71B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C7D1CE9-1CEC1CEE-1CF11D00-1DBF1E00-1F151F18-1F1D1F20-1F451F48-1F4D1F50-1F571F591F5B1F5D1F5F-1F7D1F80-1FB41FB6-1FBC1FBE1FC2-1FC41FC6-1FCC1FD0-1FD31FD6-1FDB1FE0-1FEC1FF2-1FF41FF6-1FFC2071207F2090-209421022107210A-211321152119-211D212421262128212A-212D212F-2139213C-213F2145-2149214E218321842C00-2C2E2C30-2C5E2C60-2CE42CEB-2CEE2D00-2D252D30-2D652D6F2D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE2E2F300530063031-3035303B303C3041-3096309D-309F30A1-30FA30FC-30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A48CA4D0-A4FDA500-A60CA610-A61FA62AA62BA640-A65FA662-A66EA67F-A697A6A0-A6E5A717-A71FA722-A788A78BA78CA7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2A9CFAA00-AA28AA40-AA42AA44-AA4BAA60-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADB-AADDABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB00-FB06FB13-FB17FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF21-FF3AFF41-FF5AFF66-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC",Ll:"0061-007A00AA00B500BA00DF-00F600F8-00FF01010103010501070109010B010D010F01110113011501170119011B011D011F01210123012501270129012B012D012F01310133013501370138013A013C013E014001420144014601480149014B014D014F01510153015501570159015B015D015F01610163016501670169016B016D016F0171017301750177017A017C017E-0180018301850188018C018D019201950199-019B019E01A101A301A501A801AA01AB01AD01B001B401B601B901BA01BD-01BF01C601C901CC01CE01D001D201D401D601D801DA01DC01DD01DF01E101E301E501E701E901EB01ED01EF01F001F301F501F901FB01FD01FF02010203020502070209020B020D020F02110213021502170219021B021D021F02210223022502270229022B022D022F02310233-0239023C023F0240024202470249024B024D024F-02930295-02AF037103730377037B-037D039003AC-03CE03D003D103D5-03D703D903DB03DD03DF03E103E303E503E703E903EB03ED03EF-03F303F503F803FB03FC0430-045F04610463046504670469046B046D046F04710473047504770479047B047D047F0481048B048D048F04910493049504970499049B049D049F04A104A304A504A704A904AB04AD04AF04B104B304B504B704B904BB04BD04BF04C204C404C604C804CA04CC04CE04CF04D104D304D504D704D904DB04DD04DF04E104E304E504E704E904EB04ED04EF04F104F304F504F704F904FB04FD04FF05010503050505070509050B050D050F05110513051505170519051B051D051F0521052305250561-05871D00-1D2B1D62-1D771D79-1D9A1E011E031E051E071E091E0B1E0D1E0F1E111E131E151E171E191E1B1E1D1E1F1E211E231E251E271E291E2B1E2D1E2F1E311E331E351E371E391E3B1E3D1E3F1E411E431E451E471E491E4B1E4D1E4F1E511E531E551E571E591E5B1E5D1E5F1E611E631E651E671E691E6B1E6D1E6F1E711E731E751E771E791E7B1E7D1E7F1E811E831E851E871E891E8B1E8D1E8F1E911E931E95-1E9D1E9F1EA11EA31EA51EA71EA91EAB1EAD1EAF1EB11EB31EB51EB71EB91EBB1EBD1EBF1EC11EC31EC51EC71EC91ECB1ECD1ECF1ED11ED31ED51ED71ED91EDB1EDD1EDF1EE11EE31EE51EE71EE91EEB1EED1EEF1EF11EF31EF51EF71EF91EFB1EFD1EFF-1F071F10-1F151F20-1F271F30-1F371F40-1F451F50-1F571F60-1F671F70-1F7D1F80-1F871F90-1F971FA0-1FA71FB0-1FB41FB61FB71FBE1FC2-1FC41FC61FC71FD0-1FD31FD61FD71FE0-1FE71FF2-1FF41FF61FF7210A210E210F2113212F21342139213C213D2146-2149214E21842C30-2C5E2C612C652C662C682C6A2C6C2C712C732C742C76-2C7C2C812C832C852C872C892C8B2C8D2C8F2C912C932C952C972C992C9B2C9D2C9F2CA12CA32CA52CA72CA92CAB2CAD2CAF2CB12CB32CB52CB72CB92CBB2CBD2CBF2CC12CC32CC52CC72CC92CCB2CCD2CCF2CD12CD32CD52CD72CD92CDB2CDD2CDF2CE12CE32CE42CEC2CEE2D00-2D25A641A643A645A647A649A64BA64DA64FA651A653A655A657A659A65BA65DA65FA663A665A667A669A66BA66DA681A683A685A687A689A68BA68DA68FA691A693A695A697A723A725A727A729A72BA72DA72F-A731A733A735A737A739A73BA73DA73FA741A743A745A747A749A74BA74DA74FA751A753A755A757A759A75BA75DA75FA761A763A765A767A769A76BA76DA76FA771-A778A77AA77CA77FA781A783A785A787A78CFB00-FB06FB13-FB17FF41-FF5A",
Lu:"0041-005A00C0-00D600D8-00DE01000102010401060108010A010C010E01100112011401160118011A011C011E01200122012401260128012A012C012E01300132013401360139013B013D013F0141014301450147014A014C014E01500152015401560158015A015C015E01600162016401660168016A016C016E017001720174017601780179017B017D018101820184018601870189-018B018E-0191019301940196-0198019C019D019F01A001A201A401A601A701A901AC01AE01AF01B1-01B301B501B701B801BC01C401C701CA01CD01CF01D101D301D501D701D901DB01DE01E001E201E401E601E801EA01EC01EE01F101F401F6-01F801FA01FC01FE02000202020402060208020A020C020E02100212021402160218021A021C021E02200222022402260228022A022C022E02300232023A023B023D023E02410243-02460248024A024C024E03700372037603860388-038A038C038E038F0391-03A103A3-03AB03CF03D2-03D403D803DA03DC03DE03E003E203E403E603E803EA03EC03EE03F403F703F903FA03FD-042F04600462046404660468046A046C046E04700472047404760478047A047C047E0480048A048C048E04900492049404960498049A049C049E04A004A204A404A604A804AA04AC04AE04B004B204B404B604B804BA04BC04BE04C004C104C304C504C704C904CB04CD04D004D204D404D604D804DA04DC04DE04E004E204E404E604E804EA04EC04EE04F004F204F404F604F804FA04FC04FE05000502050405060508050A050C050E05100512051405160518051A051C051E0520052205240531-055610A0-10C51E001E021E041E061E081E0A1E0C1E0E1E101E121E141E161E181E1A1E1C1E1E1E201E221E241E261E281E2A1E2C1E2E1E301E321E341E361E381E3A1E3C1E3E1E401E421E441E461E481E4A1E4C1E4E1E501E521E541E561E581E5A1E5C1E5E1E601E621E641E661E681E6A1E6C1E6E1E701E721E741E761E781E7A1E7C1E7E1E801E821E841E861E881E8A1E8C1E8E1E901E921E941E9E1EA01EA21EA41EA61EA81EAA1EAC1EAE1EB01EB21EB41EB61EB81EBA1EBC1EBE1EC01EC21EC41EC61EC81ECA1ECC1ECE1ED01ED21ED41ED61ED81EDA1EDC1EDE1EE01EE21EE41EE61EE81EEA1EEC1EEE1EF01EF21EF41EF61EF81EFA1EFC1EFE1F08-1F0F1F18-1F1D1F28-1F2F1F38-1F3F1F48-1F4D1F591F5B1F5D1F5F1F68-1F6F1FB8-1FBB1FC8-1FCB1FD8-1FDB1FE8-1FEC1FF8-1FFB21022107210B-210D2110-211221152119-211D212421262128212A-212D2130-2133213E213F214521832C00-2C2E2C602C62-2C642C672C692C6B2C6D-2C702C722C752C7E-2C802C822C842C862C882C8A2C8C2C8E2C902C922C942C962C982C9A2C9C2C9E2CA02CA22CA42CA62CA82CAA2CAC2CAE2CB02CB22CB42CB62CB82CBA2CBC2CBE2CC02CC22CC42CC62CC82CCA2CCC2CCE2CD02CD22CD42CD62CD82CDA2CDC2CDE2CE02CE22CEB2CEDA640A642A644A646A648A64AA64CA64EA650A652A654A656A658A65AA65CA65EA662A664A666A668A66AA66CA680A682A684A686A688A68AA68CA68EA690A692A694A696A722A724A726A728A72AA72CA72EA732A734A736A738A73AA73CA73EA740A742A744A746A748A74AA74CA74EA750A752A754A756A758A75AA75CA75EA760A762A764A766A768A76AA76CA76EA779A77BA77DA77EA780A782A784A786A78BFF21-FF3A",Lt:"01C501C801CB01F21F88-1F8F1F98-1F9F1FA8-1FAF1FBC1FCC1FFC",Lm:"02B0-02C102C6-02D102E0-02E402EC02EE0374037A0559064006E506E607F407F507FA081A0824082809710E460EC610FC17D718431AA71C78-1C7D1D2C-1D611D781D9B-1DBF2071207F2090-20942C7D2D6F2E2F30053031-3035303B309D309E30FC-30FEA015A4F8-A4FDA60CA67FA717-A71FA770A788A9CFAA70AADDFF70FF9EFF9F",Lo:"01BB01C0-01C3029405D0-05EA05F0-05F20621-063F0641-064A066E066F0671-06D306D506EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA0800-08150904-0939093D09500958-096109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E450E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10D0-10FA1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317DC1820-18421844-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C771CE9-1CEC1CEE-1CF12135-21382D30-2D652D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE3006303C3041-3096309F30A1-30FA30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A014A016-A48CA4D0-A4F7A500-A60BA610-A61FA62AA62BA66EA6A0-A6E5A7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2AA00-AA28AA40-AA42AA44-AA4BAA60-AA6FAA71-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADBAADCABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF66-FF6FFF71-FF9DFFA0-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC",M:"0300-036F0483-04890591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DE-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0903093C093E-094E0951-0955096209630981-098309BC09BE-09C409C709C809CB-09CD09D709E209E30A01-0A030A3C0A3E-0A420A470A480A4B-0A4D0A510A700A710A750A81-0A830ABC0ABE-0AC50AC7-0AC90ACB-0ACD0AE20AE30B01-0B030B3C0B3E-0B440B470B480B4B-0B4D0B560B570B620B630B820BBE-0BC20BC6-0BC80BCA-0BCD0BD70C01-0C030C3E-0C440C46-0C480C4A-0C4D0C550C560C620C630C820C830CBC0CBE-0CC40CC6-0CC80CCA-0CCD0CD50CD60CE20CE30D020D030D3E-0D440D46-0D480D4A-0D4D0D570D620D630D820D830DCA0DCF-0DD40DD60DD8-0DDF0DF20DF30E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F3E0F3F0F71-0F840F860F870F90-0F970F99-0FBC0FC6102B-103E1056-1059105E-10601062-10641067-106D1071-10741082-108D108F109A-109D135F1712-17141732-1734175217531772177317B6-17D317DD180B-180D18A91920-192B1930-193B19B0-19C019C819C91A17-1A1B1A55-1A5E1A60-1A7C1A7F1B00-1B041B34-1B441B6B-1B731B80-1B821BA1-1BAA1C24-1C371CD0-1CD21CD4-1CE81CED1CF21DC0-1DE61DFD-1DFF20D0-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66F-A672A67CA67DA6F0A6F1A802A806A80BA823-A827A880A881A8B4-A8C4A8E0-A8F1A926-A92DA947-A953A980-A983A9B3-A9C0AA29-AA36AA43AA4CAA4DAA7BAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE3-ABEAABECABEDFB1EFE00-FE0FFE20-FE26",Mn:"0300-036F0483-04870591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DF-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0902093C0941-0948094D0951-095509620963098109BC09C1-09C409CD09E209E30A010A020A3C0A410A420A470A480A4B-0A4D0A510A700A710A750A810A820ABC0AC1-0AC50AC70AC80ACD0AE20AE30B010B3C0B3F0B41-0B440B4D0B560B620B630B820BC00BCD0C3E-0C400C46-0C480C4A-0C4D0C550C560C620C630CBC0CBF0CC60CCC0CCD0CE20CE30D41-0D440D4D0D620D630DCA0DD2-0DD40DD60E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F71-0F7E0F80-0F840F860F870F90-0F970F99-0FBC0FC6102D-10301032-10371039103A103D103E10581059105E-10601071-1074108210851086108D109D135F1712-17141732-1734175217531772177317B7-17BD17C617C9-17D317DD180B-180D18A91920-19221927192819321939-193B1A171A181A561A58-1A5E1A601A621A65-1A6C1A73-1A7C1A7F1B00-1B031B341B36-1B3A1B3C1B421B6B-1B731B801B811BA2-1BA51BA81BA91C2C-1C331C361C371CD0-1CD21CD4-1CE01CE2-1CE81CED1DC0-1DE61DFD-1DFF20D0-20DC20E120E5-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66FA67CA67DA6F0A6F1A802A806A80BA825A826A8C4A8E0-A8F1A926-A92DA947-A951A980-A982A9B3A9B6-A9B9A9BCAA29-AA2EAA31AA32AA35AA36AA43AA4CAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE5ABE8ABEDFB1EFE00-FE0FFE20-FE26",Mc:"0903093E-09400949-094C094E0982098309BE-09C009C709C809CB09CC09D70A030A3E-0A400A830ABE-0AC00AC90ACB0ACC0B020B030B3E0B400B470B480B4B0B4C0B570BBE0BBF0BC10BC20BC6-0BC80BCA-0BCC0BD70C01-0C030C41-0C440C820C830CBE0CC0-0CC40CC70CC80CCA0CCB0CD50CD60D020D030D3E-0D400D46-0D480D4A-0D4C0D570D820D830DCF-0DD10DD8-0DDF0DF20DF30F3E0F3F0F7F102B102C10311038103B103C105610571062-10641067-106D108310841087-108C108F109A-109C17B617BE-17C517C717C81923-19261929-192B193019311933-193819B0-19C019C819C91A19-1A1B1A551A571A611A631A641A6D-1A721B041B351B3B1B3D-1B411B431B441B821BA11BA61BA71BAA1C24-1C2B1C341C351CE11CF2A823A824A827A880A881A8B4-A8C3A952A953A983A9B4A9B5A9BAA9BBA9BD-A9C0AA2FAA30AA33AA34AA4DAA7BABE3ABE4ABE6ABE7ABE9ABEAABEC",Me:"0488048906DE20DD-20E020E2-20E4A670-A672",N:"0030-003900B200B300B900BC-00BE0660-066906F0-06F907C0-07C90966-096F09E6-09EF09F4-09F90A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BF20C66-0C6F0C78-0C7E0CE6-0CEF0D66-0D750E50-0E590ED0-0ED90F20-0F331040-10491090-10991369-137C16EE-16F017E0-17E917F0-17F91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C5920702074-20792080-20892150-21822185-21892460-249B24EA-24FF2776-27932CFD30073021-30293038-303A3192-31953220-32293251-325F3280-328932B1-32BFA620-A629A6E6-A6EFA830-A835A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19",Nd:"0030-00390660-066906F0-06F907C0-07C90966-096F09E6-09EF0A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BEF0C66-0C6F0CE6-0CEF0D66-0D6F0E50-0E590ED0-0ED90F20-0F291040-10491090-109917E0-17E91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C59A620-A629A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19",Nl:"16EE-16F02160-21822185-218830073021-30293038-303AA6E6-A6EF",No:"00B200B300B900BC-00BE09F4-09F90BF0-0BF20C78-0C7E0D70-0D750F2A-0F331369-137C17F0-17F920702074-20792080-20892150-215F21892460-249B24EA-24FF2776-27932CFD3192-31953220-32293251-325F3280-328932B1-32BFA830-A835",P:"0021-00230025-002A002C-002F003A003B003F0040005B-005D005F007B007D00A100AB00B700BB00BF037E0387055A-055F0589058A05BE05C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F3A-0F3D0F850FD0-0FD4104A-104F10FB1361-13681400166D166E169B169C16EB-16ED1735173617D4-17D617D8-17DA1800-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD32010-20272030-20432045-20512053-205E207D207E208D208E2329232A2768-277527C527C627E6-27EF2983-299829D8-29DB29FC29FD2CF9-2CFC2CFE2CFF2E00-2E2E2E302E313001-30033008-30113014-301F3030303D30A030FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFD3EFD3FFE10-FE19FE30-FE52FE54-FE61FE63FE68FE6AFE6BFF01-FF03FF05-FF0AFF0C-FF0FFF1AFF1BFF1FFF20FF3B-FF3DFF3FFF5BFF5DFF5F-FF65",Pd:"002D058A05BE140018062010-20152E172E1A301C303030A0FE31FE32FE58FE63FF0D",Ps:"0028005B007B0F3A0F3C169B201A201E2045207D208D23292768276A276C276E27702772277427C527E627E827EA27EC27EE2983298529872989298B298D298F299129932995299729D829DA29FC2E222E242E262E283008300A300C300E3010301430163018301A301DFD3EFE17FE35FE37FE39FE3BFE3DFE3FFE41FE43FE47FE59FE5BFE5DFF08FF3BFF5BFF5FFF62",Pe:"0029005D007D0F3B0F3D169C2046207E208E232A2769276B276D276F27712773277527C627E727E927EB27ED27EF298429862988298A298C298E2990299229942996299829D929DB29FD2E232E252E272E293009300B300D300F3011301530173019301B301E301FFD3FFE18FE36FE38FE3AFE3CFE3EFE40FE42FE44FE48FE5AFE5CFE5EFF09FF3DFF5DFF60FF63",Pi:"00AB2018201B201C201F20392E022E042E092E0C2E1C2E20",Pf:"00BB2019201D203A2E032E052E0A2E0D2E1D2E21",Pc:"005F203F20402054FE33FE34FE4D-FE4FFF3F",Po:"0021-00230025-0027002A002C002E002F003A003B003F0040005C00A100B700BF037E0387055A-055F058905C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F850FD0-0FD4104A-104F10FB1361-1368166D166E16EB-16ED1735173617D4-17D617D8-17DA1800-18051807-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD3201620172020-20272030-2038203B-203E2041-20432047-205120532055-205E2CF9-2CFC2CFE2CFF2E002E012E06-2E082E0B2E0E-2E162E182E192E1B2E1E2E1F2E2A-2E2E2E302E313001-3003303D30FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFE10-FE16FE19FE30FE45FE46FE49-FE4CFE50-FE52FE54-FE57FE5F-FE61FE68FE6AFE6BFF01-FF03FF05-FF07FF0AFF0CFF0EFF0FFF1AFF1BFF1FFF20FF3CFF61FF64FF65",S:"0024002B003C-003E005E0060007C007E00A2-00A900AC00AE-00B100B400B600B800D700F702C2-02C502D2-02DF02E5-02EB02ED02EF-02FF03750384038503F604820606-0608060B060E060F06E906FD06FE07F609F209F309FA09FB0AF10B700BF3-0BFA0C7F0CF10CF20D790E3F0F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-139917DB194019E0-19FF1B61-1B6A1B74-1B7C1FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE20442052207A-207C208A-208C20A0-20B8210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B2140-2144214A-214D214F2190-2328232B-23E82400-24262440-244A249C-24E92500-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE27C0-27C427C7-27CA27CC27D0-27E527F0-29822999-29D729DC-29FB29FE-2B4C2B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F309B309C319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A700-A716A720A721A789A78AA828-A82BA836-A839AA77-AA79FB29FDFCFDFDFE62FE64-FE66FE69FF04FF0BFF1C-FF1EFF3EFF40FF5CFF5EFFE0-FFE6FFE8-FFEEFFFCFFFD",Sm:"002B003C-003E007C007E00AC00B100D700F703F60606-060820442052207A-207C208A-208C2140-2144214B2190-2194219A219B21A021A321A621AE21CE21CF21D221D421F4-22FF2308-230B23202321237C239B-23B323DC-23E125B725C125F8-25FF266F27C0-27C427C7-27CA27CC27D0-27E527F0-27FF2900-29822999-29D729DC-29FB29FE-2AFF2B30-2B442B47-2B4CFB29FE62FE64-FE66FF0BFF1C-FF1EFF5CFF5EFFE2FFE9-FFEC",Sc:"002400A2-00A5060B09F209F309FB0AF10BF90E3F17DB20A0-20B8A838FDFCFE69FF04FFE0FFE1FFE5FFE6",Sk:"005E006000A800AF00B400B802C2-02C502D2-02DF02E5-02EB02ED02EF-02FF0375038403851FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE309B309CA700-A716A720A721A789A78AFF3EFF40FFE3",So:"00A600A700A900AE00B000B60482060E060F06E906FD06FE07F609FA0B700BF3-0BF80BFA0C7F0CF10CF20D790F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-1399194019E0-19FF1B61-1B6A1B74-1B7C210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B214A214C214D214F2195-2199219C-219F21A121A221A421A521A7-21AD21AF-21CD21D021D121D321D5-21F32300-2307230C-231F2322-2328232B-237B237D-239A23B4-23DB23E2-23E82400-24262440-244A249C-24E92500-25B625B8-25C025C2-25F72600-266E2670-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE2800-28FF2B00-2B2F2B452B462B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A828-A82BA836A837A839AA77-AA79FDFDFFE4FFE8FFEDFFEEFFFCFFFD",Z:"002000A01680180E2000-200A20282029202F205F3000",Zs:"002000A01680180E2000-200A202F205F3000",Zl:"2028",Zp:"2029",C:"0000-001F007F-009F00AD03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-0605061C061D0620065F06DD070E070F074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17B417B517DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF200B-200F202A-202E2060-206F20722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-F8FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFD-FF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFFBFFFEFFFF",Cc:"0000-001F007F-009F",Cf:"00AD0600-060306DD070F17B417B5200B-200F202A-202E2060-2064206A-206FFEFFFFF9-FFFB",Co:"E000-F8FF",Cs:"D800-DFFF",Cn:"03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-05FF06040605061C061D0620065F070E074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF2065-206920722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-D7FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFDFEFEFF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFF8FFFEFFFF"})}),ace.define("ace/token_iterator",["require","exports","module"],function(e,t,n){"use strict";var r=function(e,t,n){this.$session=e,this.$row=t,this.$rowTokens=e.getTokens(t);var r=e.getTokenAt(t,n);this.$tokenIndex=r?r.index:-1};(function(){this.stepBackward=function(){for(this.$tokenIndex-=1;this.$tokenIndex<0;){if(this.$row-=1,this.$row<0)return this.$row=0,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=this.$rowTokens.length-1}return this.$rowTokens[this.$tokenIndex]},this.stepForward=function(){this.$tokenIndex+=1;for(var e;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,e||(e=this.$session.getLength()),this.$row>=e)return this.$row=e-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},this.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},this.getCurrentTokenRow=function(){return this.$row},this.getCurrentTokenColumn=function(){var e=this.$rowTokens,t=this.$tokenIndex,n=e[t].start;if(void 0!==n)return n;for(n=0;t>0;)t-=1,n+=e[t].value.length;return n},this.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}}}).call(r.prototype),t.TokenIterator=r}),ace.define("ace/mode/text",["require","exports","module","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],function(e,t,n){"use strict";var r=e("../tokenizer").Tokenizer,i=e("./text_highlight_rules").TextHighlightRules,o=e("./behaviour").Behaviour,a=e("../unicode"),s=e("../lib/lang"),l=e("../token_iterator").TokenIterator,u=e("../range").Range,c=function(){this.HighlightRules=i,this.$behaviour=new o};(function(){this.tokenRe=new RegExp("^["+a.packages.L+a.packages.Mn+a.packages.Mc+a.packages.Nd+a.packages.Pc+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+a.packages.L+a.packages.Mn+a.packages.Mc+a.packages.Nd+a.packages.Pc+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules,this.$tokenizer=new r(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(e,t,n,r){function i(e){for(var t=n;t<=r;t++)e(o.getLine(t),t)}var o=t.doc,a=!0,l=!0,u=1/0,c=t.getTabSize(),d=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var f=this.lineCommentStart.map(s.escapeRegExp).join("|"),p=this.lineCommentStart[0];else var f=s.escapeRegExp(this.lineCommentStart),p=this.lineCommentStart;f=new RegExp("^(\\s*)(?:"+f+") ?"),d=t.getUseSoftTabs();var h=function(e,t){var n=e.match(f);if(n){var r=n[1].length,i=n[0].length;b(e,r,i)||" "!=n[0][i-1]||i--,o.removeInLine(t,r,i)}},g=p+" ",m=function(e,t){a&&!/\S/.test(e)||(b(e,u,u)?o.insertInLine({row:t,column:u},g):o.insertInLine({row:t,column:u},p))},v=function(e,t){return f.test(e)},b=function(e,t,n){for(var r=0;t--&&" "==e.charAt(t);)r++;if(r%c!=0)return!1;for(var r=0;" "==e.charAt(n++);)r++;return c>2?r%c!=c-1:r%c==0}}else{if(!this.blockComment)return!1;var p=this.blockComment.start,y=this.blockComment.end,f=new RegExp("^(\\s*)(?:"+s.escapeRegExp(p)+")"),w=new RegExp("(?:"+s.escapeRegExp(y)+")\\s*$"),m=function(e,t){v(e,t)||a&&!/\S/.test(e)||(o.insertInLine({row:t,column:e.length},y),o.insertInLine({row:t,column:u},p))},h=function(e,t){var n;(n=e.match(w))&&o.removeInLine(t,e.length-n[0].length,e.length),(n=e.match(f))&&o.removeInLine(t,n[1].length,n[0].length)},v=function(e,n){if(f.test(e))return!0;for(var r=t.getTokens(n),i=0;i<r.length;i++)if("comment"===r[i].type)return!0}}var x=1/0;i(function(e,t){var n=e.search(/\S/);n!==-1?(n<u&&(u=n),l&&!v(e,t)&&(l=!1)):x>e.length&&(x=e.length)}),u==1/0&&(u=x,a=!1,l=!1),d&&u%c!=0&&(u=Math.floor(u/c)*c),i(l?h:m)},this.toggleBlockComment=function(e,t,n,r){var i=this.blockComment;if(i){!i.start&&i[0]&&(i=i[0]);var o,a,s=new l(t,r.row,r.column),c=s.getCurrentToken(),d=(t.selection,t.selection.toOrientedRange());if(c&&/comment/.test(c.type)){for(var f,p;c&&/comment/.test(c.type);){var h=c.value.indexOf(i.start);if(h!=-1){var g=s.getCurrentTokenRow(),m=s.getCurrentTokenColumn()+h;f=new u(g,m,g,m+i.start.length);break}c=s.stepBackward()}for(var s=new l(t,r.row,r.column),c=s.getCurrentToken();c&&/comment/.test(c.type);){var h=c.value.indexOf(i.end);if(h!=-1){var g=s.getCurrentTokenRow(),m=s.getCurrentTokenColumn()+h;p=new u(g,m,g,m+i.end.length);break}c=s.stepForward()}p&&t.remove(p),f&&(t.remove(f),o=f.start.row,a=-i.start.length)}else a=i.start.length,o=n.start.row,t.insert(n.end,i.end),t.insert(n.start,i.start);d.start.row==o&&(d.start.column+=a),d.end.row==o&&(d.end.column+=a),t.selection.fromOrientedRange(d)}},this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.autoOutdent=function(e,t,n){},this.$getIndent=function(e){return e.match(/^\s*/)[0]},this.createWorker=function(e){return null},this.createModeDelegates=function(e){this.$embeds=[],this.$modes={};for(var t in e)e[t]&&(this.$embeds.push(t),this.$modes[t]=new e[t]);for(var n=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],t=0;t<n.length;t++)!function(e){var r=n[t],i=e[r];e[n[t]]=function(){return this.$delegator(r,arguments,i)}}(this)},this.$delegator=function(e,t,n){var r=t[0];"string"!=typeof r&&(r=r[0]);for(var i=0;i<this.$embeds.length;i++)if(this.$modes[this.$embeds[i]]){var o=r.split(this.$embeds[i]);if(!o[0]&&o[1]){t[0]=o[1];var a=this.$modes[this.$embeds[i]];return a[e].apply(a,t)}}var s=n.apply(this,t);return n?s:void 0},this.transformAction=function(e,t,n,r,i){if(this.$behaviour){var o=this.$behaviour.getBehaviours();for(var a in o)if(o[a][t]){var s=o[a][t].apply(this,arguments);if(s)return s}}},this.getKeywords=function(e){if(!this.completionKeywords){var t=this.$tokenizer.rules,n=[];for(var r in t)for(var i=t[r],o=0,a=i.length;o<a;o++)if("string"==typeof i[o].token)/keyword|support|storage/.test(i[o].token)&&n.push(i[o].regex);else if("object"==typeof i[o].token)for(var s=0,l=i[o].token.length;s<l;s++)if(/keyword|support|storage/.test(i[o].token[s])){var r=i[o].regex.match(/\(.+?\)/g)[s];n.push(r.substr(1,r.length-2))}this.completionKeywords=n}return e?n.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(e,t,n,r){var i=this.$keywordList||this.$createKeywordList();return i.map(function(e){return{name:e,value:e,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(c.prototype),t.Mode=c}),ace.define("ace/apply_delta",["require","exports","module"],function(e,t,n){"use strict";t.applyDelta=function(e,t,n){var r=t.start.row,i=t.start.column,o=e[r]||"";switch(t.action){case"insert":var a=t.lines;if(1===a.length)e[r]=o.substring(0,i)+t.lines[0]+o.substring(i);else{var s=[r,1].concat(t.lines);e.splice.apply(e,s),e[r]=o.substring(0,i)+e[r],e[r+t.lines.length-1]+=o.substring(i)}break;case"remove":var l=t.end.column,u=t.end.row;r===u?e[r]=o.substring(0,i)+o.substring(l):e.splice(r,u-r+1,o.substring(0,i)+e[u].substring(l))}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./lib/event_emitter").EventEmitter,o=t.Anchor=function(e,t,n){this.$onChange=this.onChange.bind(this),this.attach(e),"undefined"==typeof n?this.setPosition(t.row,t.column):this.setPosition(t,n)};(function(){function e(e,t,n){var r=n?e.column<=t.column:e.column<t.column;return e.row<t.row||e.row==t.row&&r}function t(t,n,r){var i="insert"==t.action,o=(i?1:-1)*(t.end.row-t.start.row),a=(i?1:-1)*(t.end.column-t.start.column),s=t.start,l=i?s:t.end;return e(n,s,r)?{row:n.row,column:n.column}:e(l,n,!r)?{row:n.row+o,column:n.column+(n.row==l.row?a:0)}:{row:s.row,column:s.column}}r.implement(this,i),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.$insertRight=!1,this.onChange=function(e){if(!(e.start.row==e.end.row&&e.start.row!=this.row||e.start.row>this.row)){var n=t(e,{row:this.row,column:this.column},this.$insertRight);this.setPosition(n.row,n.column,!0)}},this.setPosition=function(e,t,n){var r;if(r=n?{row:e,column:t}:this.$clipPositionToDocument(e,t),this.row!=r.row||this.column!=r.column){var i={row:this.row,column:this.column};this.row=r.row,this.column=r.column,this._signal("change",{old:i,value:r})}},this.detach=function(){this.document.removeEventListener("change",this.$onChange)},this.attach=function(e){this.document=e||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(e,t){var n={};return e>=this.document.getLength()?(n.row=Math.max(0,this.document.getLength()-1),n.column=this.document.getLine(n.row).length):e<0?(n.row=0,n.column=0):(n.row=e,n.column=Math.min(this.document.getLine(n.row).length,Math.max(0,t))),t<0&&(n.column=0),n}}).call(o.prototype)}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./apply_delta").applyDelta,o=e("./lib/event_emitter").EventEmitter,a=e("./range").Range,s=e("./anchor").Anchor,l=function(e){this.$lines=[""],0===e.length?this.$lines=[""]:Array.isArray(e)?this.insertMergedLines({row:0,column:0},e):this.insert({row:0,column:0},e)};(function(){r.implement(this,o),this.setValue=function(e){var t=this.getLength()-1;this.remove(new a(0,0,t,this.getLine(t).length)),this.insert({row:0,column:0},e)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(e,t){return new s(this,e,t)},0==="aaa".split(/a/).length?this.$split=function(e){return e.replace(/\r\n|\r/g,"\n").split("\n")}:this.$split=function(e){return e.split(/\r\n|\r|\n/)},this.$detectNewLine=function(e){var t=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:"\n",this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(e){this.$newLineMode!==e&&(this.$newLineMode=e,this._signal("changeNewLineMode"))},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(e){return"\r\n"==e||"\r"==e||"\n"==e},this.getLine=function(e){return this.$lines[e]||""},this.getLines=function(e,t){return this.$lines.slice(e,t+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(e){return this.getLinesForRange(e).join(this.getNewLineCharacter())},this.getLinesForRange=function(e){var t;if(e.start.row===e.end.row)t=[this.getLine(e.start.row).substring(e.start.column,e.end.column)];else{t=this.getLines(e.start.row,e.end.row),t[0]=(t[0]||"").substring(e.start.column);var n=t.length-1;e.end.row-e.start.row==n&&(t[n]=t[n].substring(0,e.end.column))}return t},this.insertLines=function(e,t){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(e,t)},this.removeLines=function(e,t){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(e,t)},this.insertNewLine=function(e){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(e,["",""])},this.insert=function(e,t){return this.getLength()<=1&&this.$detectNewLine(t),this.insertMergedLines(e,this.$split(t))},this.insertInLine=function(e,t){var n=this.clippedPos(e.row,e.column),r=this.pos(e.row,e.column+t.length);
return this.applyDelta({start:n,end:r,action:"insert",lines:[t]},!0),this.clonePos(r)},this.clippedPos=function(e,t){var n=this.getLength();void 0===e?e=n:e<0?e=0:e>=n&&(e=n-1,t=void 0);var r=this.getLine(e);return void 0==t&&(t=r.length),t=Math.min(Math.max(t,0),r.length),{row:e,column:t}},this.clonePos=function(e){return{row:e.row,column:e.column}},this.pos=function(e,t){return{row:e,column:t}},this.$clipPosition=function(e){var t=this.getLength();return e.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):(e.row=Math.max(0,e.row),e.column=Math.min(Math.max(e.column,0),this.getLine(e.row).length)),e},this.insertFullLines=function(e,t){e=Math.min(Math.max(e,0),this.getLength());var n=0;e<this.getLength()?(t=t.concat([""]),n=0):(t=[""].concat(t),e--,n=this.$lines[e].length),this.insertMergedLines({row:e,column:n},t)},this.insertMergedLines=function(e,t){var n=this.clippedPos(e.row,e.column),r={row:n.row+t.length-1,column:(1==t.length?n.column:0)+t[t.length-1].length};return this.applyDelta({start:n,end:r,action:"insert",lines:t}),this.clonePos(r)},this.remove=function(e){var t=this.clippedPos(e.start.row,e.start.column),n=this.clippedPos(e.end.row,e.end.column);return this.applyDelta({start:t,end:n,action:"remove",lines:this.getLinesForRange({start:t,end:n})}),this.clonePos(t)},this.removeInLine=function(e,t,n){var r=this.clippedPos(e,t),i=this.clippedPos(e,n);return this.applyDelta({start:r,end:i,action:"remove",lines:this.getLinesForRange({start:r,end:i})},!0),this.clonePos(r)},this.removeFullLines=function(e,t){e=Math.min(Math.max(0,e),this.getLength()-1),t=Math.min(Math.max(0,t),this.getLength()-1);var n=t==this.getLength()-1&&e>0,r=t<this.getLength()-1,i=n?e-1:e,o=n?this.getLine(i).length:0,s=r?t+1:t,l=r?0:this.getLine(s).length,u=new a(i,o,s,l),c=this.$lines.slice(e,t+1);return this.applyDelta({start:u.start,end:u.end,action:"remove",lines:this.getLinesForRange(u)}),c},this.removeNewLine=function(e){e<this.getLength()-1&&e>=0&&this.applyDelta({start:this.pos(e,this.getLine(e).length),end:this.pos(e+1,0),action:"remove",lines:["",""]})},this.replace=function(e,t){if(e instanceof a||(e=a.fromPoints(e.start,e.end)),0===t.length&&e.isEmpty())return e.start;if(t==this.getTextRange(e))return e.end;this.remove(e);var n;return n=t?this.insert(e.start,t):e.start},this.applyDeltas=function(e){for(var t=0;t<e.length;t++)this.applyDelta(e[t])},this.revertDeltas=function(e){for(var t=e.length-1;t>=0;t--)this.revertDelta(e[t])},this.applyDelta=function(e,t){var n="insert"==e.action;(n?e.lines.length<=1&&!e.lines[0]:!a.comparePoints(e.start,e.end))||(n&&e.lines.length>2e4&&this.$splitAndapplyLargeDelta(e,2e4),i(this.$lines,e,t),this._signal("change",e))},this.$splitAndapplyLargeDelta=function(e,t){for(var n=e.lines,r=n.length,i=e.start.row,o=e.start.column,a=0,s=0;;){a=s,s+=t-1;var l=n.slice(a,s);if(s>r){e.lines=l,e.start.row=i+a,e.start.column=o;break}l.push(""),this.applyDelta({start:this.pos(i+a,o),end:this.pos(i+s,o=0),action:e.action,lines:l},!0)}},this.revertDelta=function(e){this.applyDelta({start:this.clonePos(e.start),end:this.clonePos(e.end),action:"insert"==e.action?"remove":"insert",lines:e.lines.slice()})},this.indexToPosition=function(e,t){for(var n=this.$lines||this.getAllLines(),r=this.getNewLineCharacter().length,i=t||0,o=n.length;i<o;i++)if(e-=n[i].length+r,e<0)return{row:i,column:e+n[i].length+r};return{row:o-1,column:n[o-1].length}},this.positionToIndex=function(e,t){for(var n=this.$lines||this.getAllLines(),r=this.getNewLineCharacter().length,i=0,o=Math.min(e.row,n.length),a=t||0;a<o;++a)i+=n[a].length+r;return i+e.column}}).call(l.prototype),t.Document=l}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./lib/event_emitter").EventEmitter,o=function(e,t){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=e;var n=this;this.$worker=function(){if(n.running){for(var e=new Date,t=n.currentLine,r=-1,i=n.doc,o=t;n.lines[t];)t++;var a=i.getLength(),s=0;for(n.running=!1;t<a;){n.$tokenizeRow(t),r=t;do t++;while(n.lines[t]);if(s++,s%5===0&&new Date-e>20){n.running=setTimeout(n.$worker,20);break}}n.currentLine=t,o<=r&&n.fireUpdateEvent(o,r)}}};(function(){r.implement(this,i),this.setTokenizer=function(e){this.tokenizer=e,this.lines=[],this.states=[],this.start(0)},this.setDocument=function(e){this.doc=e,this.lines=[],this.states=[],this.stop()},this.fireUpdateEvent=function(e,t){var n={first:e,last:t};this._signal("update",{data:n})},this.start=function(e){this.currentLine=Math.min(e||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},this.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},this.$updateOnChange=function(e){var t=e.start.row,n=e.end.row-t;if(0===n)this.lines[t]=null;else if("remove"==e.action)this.lines.splice(t,n+1,null),this.states.splice(t,n+1,null);else{var r=Array(n+1);r.unshift(t,1),this.lines.splice.apply(this.lines,r),this.states.splice.apply(this.states,r)}this.currentLine=Math.min(t,this.currentLine,this.doc.getLength()),this.stop()},this.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},this.getTokens=function(e){return this.lines[e]||this.$tokenizeRow(e)},this.getState=function(e){return this.currentLine==e&&this.$tokenizeRow(e),this.states[e]||"start"},this.$tokenizeRow=function(e){var t=this.doc.getLine(e),n=this.states[e-1],r=this.tokenizer.getLineTokens(t,n,e);return this.states[e]+""!=r.state+""?(this.states[e]=r.state,this.lines[e+1]=null,this.currentLine>e+1&&(this.currentLine=e+1)):this.currentLine==e&&(this.currentLine=e+1),this.lines[e]=r.tokens}}).call(o.prototype),t.BackgroundTokenizer=o}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(e,t,n){"use strict";var r=e("./lib/lang"),i=(e("./lib/oop"),e("./range").Range),o=function(e,t,n){this.setRegexp(e),this.clazz=t,this.type=n||"text"};(function(){this.MAX_RANGES=500,this.setRegexp=function(e){this.regExp+""!=e+""&&(this.regExp=e,this.cache=[])},this.update=function(e,t,n,o){if(this.regExp)for(var a=o.firstRow,s=o.lastRow,l=a;l<=s;l++){var u=this.cache[l];null==u&&(u=r.getMatchOffsets(n.getLine(l),this.regExp),u.length>this.MAX_RANGES&&(u=u.slice(0,this.MAX_RANGES)),u=u.map(function(e){return new i(l,e.offset,l,e.offset+e.length)}),this.cache[l]=u.length?u:"");for(var c=u.length;c--;)t.drawSingleLineMarker(e,u[c].toScreenRange(n),this.clazz,o)}}}).call(o.prototype),t.SearchHighlight=o}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(e,t,n){"use strict";function r(e,t){this.foldData=e,Array.isArray(t)?this.folds=t:t=this.folds=[t];var n=t[t.length-1];this.range=new i(t[0].start.row,t[0].start.column,n.end.row,n.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(e){e.setFoldLine(this)},this)}var i=e("../range").Range;(function(){this.shiftRow=function(e){this.start.row+=e,this.end.row+=e,this.folds.forEach(function(t){t.start.row+=e,t.end.row+=e})},this.addFold=function(e){if(e.sameRow){if(e.start.row<this.startRow||e.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(e),this.folds.sort(function(e,t){return-e.range.compareEnd(t.start.row,t.start.column)}),this.range.compareEnd(e.start.row,e.start.column)>0?(this.end.row=e.end.row,this.end.column=e.end.column):this.range.compareStart(e.end.row,e.end.column)<0&&(this.start.row=e.start.row,this.start.column=e.start.column)}else if(e.start.row==this.end.row)this.folds.push(e),this.end.row=e.end.row,this.end.column=e.end.column;else{if(e.end.row!=this.start.row)throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");this.folds.unshift(e),this.start.row=e.start.row,this.start.column=e.start.column}e.foldLine=this},this.containsRow=function(e){return e>=this.start.row&&e<=this.end.row},this.walk=function(e,t,n){var r,i,o,a=0,s=this.folds,l=!0;null==t&&(t=this.end.row,n=this.end.column);for(var u=0;u<s.length;u++){if(r=s[u],i=r.range.compareStart(t,n),i==-1)return void e(null,t,n,a,l);if(o=e(null,r.start.row,r.start.column,a,l),o=!o&&e(r.placeholder,r.start.row,r.start.column,a),o||0===i)return;l=!r.sameRow,a=r.end.column}e(null,t,n,a,l)},this.getNextFoldTo=function(e,t){for(var n,r,i=0;i<this.folds.length;i++){if(n=this.folds[i],r=n.range.compareEnd(e,t),r==-1)return{fold:n,kind:"after"};if(0===r)return{fold:n,kind:"inside"}}return null},this.addRemoveChars=function(e,t,n){var r,i,o=this.getNextFoldTo(e,t);if(o)if(r=o.fold,"inside"==o.kind&&r.start.column!=t&&r.start.row!=e)window.console&&window.console.log(e,t,r);else if(r.start.row==e){i=this.folds;var a=i.indexOf(r);for(0===a&&(this.start.column+=n),a;a<i.length;a++){if(r=i[a],r.start.column+=n,!r.sameRow)return;r.end.column+=n}this.end.column+=n}},this.split=function(e,t){var n=this.getNextFoldTo(e,t);if(!n||"inside"==n.kind)return null;var i=n.fold,o=this.folds,a=this.foldData,s=o.indexOf(i),l=o[s-1];this.end.row=l.end.row,this.end.column=l.end.column,o=o.splice(s,o.length-s);var u=new r(a,o);return a.splice(a.indexOf(this)+1,0,u),u},this.merge=function(e){for(var t=e.folds,n=0;n<t.length;n++)this.addFold(t[n]);var r=this.foldData;r.splice(r.indexOf(e),1)},this.toString=function(){var e=[this.range.toString()+": ["];return this.folds.forEach(function(t){e.push("  "+t.toString())}),e.push("]"),e.join("\n")},this.idxToPosition=function(e){for(var t=0,n=0;n<this.folds.length;n++){var r=this.folds[n];if(e-=r.start.column-t,e<0)return{row:r.start.row,column:r.start.column+e};if(e-=r.placeholder.length,e<0)return r.start;t=r.end.column}return{row:this.end.row,column:this.end.column+e}}}).call(r.prototype),t.FoldLine=r}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("./range").Range,i=r.comparePoints,o=function(){this.ranges=[]};(function(){this.comparePoints=i,this.pointIndex=function(e,t,n){for(var r=this.ranges,o=n||0;o<r.length;o++){var a=r[o],s=i(e,a.end);if(!(s>0)){var l=i(e,a.start);return 0===s?t&&0!==l?-o-2:o:l>0||0===l&&!t?o:-o-1}}return-o-1},this.add=function(e){var t=!e.isEmpty(),n=this.pointIndex(e.start,t);n<0&&(n=-n-1);var r=this.pointIndex(e.end,t,n);return r<0?r=-r-1:r++,this.ranges.splice(n,r-n,e)},this.addList=function(e){for(var t=[],n=e.length;n--;)t.push.call(t,this.add(e[n]));return t},this.substractPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges.splice(t,1)},this.merge=function(){var e=[],t=this.ranges;t=t.sort(function(e,t){return i(e.start,t.start)});for(var n,r=t[0],o=1;o<t.length;o++){n=r,r=t[o];var a=i(n.end,r.start);a<0||(0!=a||n.isEmpty()||r.isEmpty())&&(i(n.end,r.end)<0&&(n.end.row=r.end.row,n.end.column=r.end.column),t.splice(o,1),e.push(r),r=n,o--)}return this.ranges=t,e},this.contains=function(e,t){return this.pointIndex({row:e,column:t})>=0},this.containsPoint=function(e){return this.pointIndex(e)>=0},this.rangeAtPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges[t]},this.clipRows=function(e,t){var n=this.ranges;if(n[0].start.row>t||n[n.length-1].start.row<e)return[];var r=this.pointIndex({row:e,column:0});r<0&&(r=-r-1);var i=this.pointIndex({row:t,column:0},r);i<0&&(i=-i-1);for(var o=[],a=r;a<i;a++)o.push(n[a]);return o},this.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},this.attach=function(e){this.session&&this.detach(),this.session=e,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},this.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},this.$onChange=function(e){if("insert"==e.action)var t=e.start,n=e.end;else var n=e.start,t=e.end;for(var r=t.row,i=n.row,o=i-r,a=-t.column+n.column,s=this.ranges,l=0,u=s.length;l<u;l++){var c=s[l];if(!(c.end.row<r)){if(c.start.row>r)break;if(c.start.row==r&&c.start.column>=t.column&&(c.start.column==t.column&&this.$insertRight||(c.start.column+=a,c.start.row+=o)),c.end.row==r&&c.end.column>=t.column){if(c.end.column==t.column&&this.$insertRight)continue;c.end.column==t.column&&a>0&&l<u-1&&c.end.column>c.start.column&&c.end.column==s[l+1].start.column&&(c.end.column-=a),c.end.column+=a,c.end.row+=o}}}if(0!=o&&l<u)for(;l<u;l++){var c=s[l];c.start.row+=o,c.end.row+=o}}}).call(o.prototype),t.RangeList=o}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range","ace/range_list","ace/lib/oop"],function(e,t,n){"use strict";function r(e,t){e.row-=t.row,0==e.row&&(e.column-=t.column)}function i(e,t){r(e.start,t),r(e.end,t)}function o(e,t){0==e.row&&(e.column+=t.column),e.row+=t.row}function a(e,t){o(e.start,t),o(e.end,t)}var s=(e("../range").Range,e("../range_list").RangeList),l=e("../lib/oop"),u=t.Fold=function(e,t){this.foldLine=null,this.placeholder=t,this.range=e,this.start=e.start,this.end=e.end,this.sameRow=e.start.row==e.end.row,this.subFolds=this.ranges=[]};l.inherits(u,s),function(){this.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},this.setFoldLine=function(e){this.foldLine=e,this.subFolds.forEach(function(t){t.setFoldLine(e)})},this.clone=function(){var e=this.range.clone(),t=new u(e,this.placeholder);return this.subFolds.forEach(function(e){t.subFolds.push(e.clone())}),t.collapseChildren=this.collapseChildren,t},this.addSubFold=function(e){if(!this.range.isEqual(e)){if(!this.range.containsRange(e))throw new Error("A fold can't intersect already existing fold"+e.range+this.range);i(e,this.start);for(var t=e.start.row,n=e.start.column,r=0,o=-1;r<this.subFolds.length&&(o=this.subFolds[r].range.compare(t,n),1==o);r++);var a=this.subFolds[r];if(0==o)return a.addSubFold(e);for(var t=e.range.end.row,n=e.range.end.column,s=r,o=-1;s<this.subFolds.length&&(o=this.subFolds[s].range.compare(t,n),1==o);s++);this.subFolds[s];if(0==o)throw new Error("A fold can't intersect already existing fold"+e.range+this.range);this.subFolds.splice(r,s-r,e);return e.setFoldLine(this.foldLine),e}},this.restoreRange=function(e){return a(e,this.start)}}.call(u.prototype)}),ace.define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator"],function(e,t,n){"use strict";function r(){this.getFoldAt=function(e,t,n){var r=this.getFoldLine(e);if(!r)return null;for(var i=r.folds,o=0;o<i.length;o++){var a=i[o];if(a.range.contains(e,t)){if(1==n&&a.range.isEnd(e,t))continue;if(n==-1&&a.range.isStart(e,t))continue;return a}}},this.getFoldsInRange=function(e){var t=e.start,n=e.end,r=this.$foldData,i=[];t.column+=1,n.column-=1;for(var o=0;o<r.length;o++){var a=r[o].range.compareRange(e);if(2!=a){if(a==-2)break;for(var s=r[o].folds,l=0;l<s.length;l++){var u=s[l];if(a=u.range.compareRange(e),a==-2)break;if(2!=a){if(42==a)break;i.push(u)}}}}return t.column-=1,n.column+=1,i},this.getFoldsInRangeList=function(e){if(Array.isArray(e)){var t=[];e.forEach(function(e){t=t.concat(this.getFoldsInRange(e))},this)}else var t=this.getFoldsInRange(e);return t},this.getAllFolds=function(){for(var e=[],t=this.$foldData,n=0;n<t.length;n++)for(var r=0;r<t[n].folds.length;r++)e.push(t[n].folds[r]);return e},this.getFoldStringAt=function(e,t,n,r){if(r=r||this.getFoldLine(e),!r)return null;for(var i,o,a={end:{column:0}},s=0;s<r.folds.length;s++){o=r.folds[s];var l=o.range.compareEnd(e,t);if(l==-1){i=this.getLine(o.start.row).substring(a.end.column,o.start.column);break}if(0===l)return null;a=o}return i||(i=this.getLine(o.start.row).substring(a.end.column)),n==-1?i.substring(0,t-a.end.column):1==n?i.substring(t-a.end.column):i},this.getFoldLine=function(e,t){var n=this.$foldData,r=0;for(t&&(r=n.indexOf(t)),r==-1&&(r=0),r;r<n.length;r++){var i=n[r];if(i.start.row<=e&&i.end.row>=e)return i;if(i.end.row>e)return null}return null},this.getNextFoldLine=function(e,t){var n=this.$foldData,r=0;for(t&&(r=n.indexOf(t)),r==-1&&(r=0),r;r<n.length;r++){var i=n[r];if(i.end.row>=e)return i}return null},this.getFoldedRowCount=function(e,t){for(var n=this.$foldData,r=t-e+1,i=0;i<n.length;i++){var o=n[i],a=o.end.row,s=o.start.row;if(a>=t){s<t&&(s>=e?r-=t-s:r=0);break}a>=e&&(r-=s>=e?a-s:a-e+1)}return r},this.$addFoldLine=function(e){return this.$foldData.push(e),this.$foldData.sort(function(e,t){return e.start.row-t.start.row}),e},this.addFold=function(e,t){var n,r=this.$foldData,i=!1;e instanceof a?n=e:(n=new a(t,e),n.collapseChildren=t.collapseChildren),this.$clipRangeToDocument(n.range);var s=n.start.row,l=n.start.column,u=n.end.row,c=n.end.column;if(!(s<u||s==u&&l<=c-2))throw new Error("The range has to be at least 2 characters width");var d=this.getFoldAt(s,l,1),f=this.getFoldAt(u,c,-1);if(d&&f==d)return d.addSubFold(n);d&&!d.range.isStart(s,l)&&this.removeFold(d),f&&!f.range.isEnd(u,c)&&this.removeFold(f);var p=this.getFoldsInRange(n.range);p.length>0&&(this.removeFolds(p),p.forEach(function(e){n.addSubFold(e)}));for(var h=0;h<r.length;h++){var g=r[h];if(u==g.start.row){g.addFold(n),i=!0;break}if(s==g.end.row){if(g.addFold(n),i=!0,!n.sameRow){var m=r[h+1];if(m&&m.start.row==u){g.merge(m);break}}break}if(u<=g.start.row)break}return i||(g=this.$addFoldLine(new o(this.$foldData,n))),this.$useWrapMode?this.$updateWrapData(g.start.row,g.start.row):this.$updateRowLengthCache(g.start.row,g.start.row),this.$modified=!0,this._signal("changeFold",{data:n,action:"add"}),n},this.addFolds=function(e){e.forEach(function(e){this.addFold(e)},this)},this.removeFold=function(e){var t=e.foldLine,n=t.start.row,r=t.end.row,i=this.$foldData,o=t.folds;if(1==o.length)i.splice(i.indexOf(t),1);else if(t.range.isEnd(e.end.row,e.end.column))o.pop(),t.end.row=o[o.length-1].end.row,t.end.column=o[o.length-1].end.column;else if(t.range.isStart(e.start.row,e.start.column))o.shift(),t.start.row=o[0].start.row,t.start.column=o[0].start.column;else if(e.sameRow)o.splice(o.indexOf(e),1);else{var a=t.split(e.start.row,e.start.column);o=a.folds,o.shift(),a.start.row=o[0].start.row,a.start.column=o[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(n,r):this.$updateRowLengthCache(n,r)),this.$modified=!0,this._signal("changeFold",{data:e,action:"remove"})},this.removeFolds=function(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n]);t.forEach(function(e){this.removeFold(e)},this),this.$modified=!0},this.expandFold=function(e){this.removeFold(e),e.subFolds.forEach(function(t){e.restoreRange(t),this.addFold(t)},this),e.collapseChildren>0&&this.foldAll(e.start.row+1,e.end.row,e.collapseChildren-1),e.subFolds=[]},this.expandFolds=function(e){e.forEach(function(e){this.expandFold(e)},this)},this.unfold=function(e,t){var n,r;if(null==e?(n=new i(0,0,this.getLength(),0),t=!0):n="number"==typeof e?new i(e,0,e,this.getLine(e).length):"row"in e?i.fromPoints(e,e):e,r=this.getFoldsInRangeList(n),t)this.removeFolds(r);else for(var o=r;o.length;)this.expandFolds(o),o=this.getFoldsInRangeList(n);if(r.length)return r},this.isRowFolded=function(e,t){return!!this.getFoldLine(e,t)},this.getRowFoldEnd=function(e,t){var n=this.getFoldLine(e,t);return n?n.end.row:e},this.getRowFoldStart=function(e,t){var n=this.getFoldLine(e,t);return n?n.start.row:e},this.getFoldDisplayLine=function(e,t,n,r,i){null==r&&(r=e.start.row),null==i&&(i=0),null==t&&(t=e.end.row),null==n&&(n=this.getLine(t).length);var o=this.doc,a="";return e.walk(function(e,t,n,s){if(!(t<r)){if(t==r){if(n<i)return;s=Math.max(i,s)}a+=null!=e?e:o.getLine(t).substring(s,n)}},t,n),a},this.getDisplayLine=function(e,t,n,r){var i=this.getFoldLine(e);if(i)return this.getFoldDisplayLine(i,e,t,n,r);var o;return o=this.doc.getLine(e),o.substring(r||0,t||o.length)},this.$cloneFoldData=function(){var e=[];return e=this.$foldData.map(function(t){var n=t.folds.map(function(e){return e.clone()});return new o(e,n)})},this.toggleFold=function(e){var t,n,r=this.selection,i=r.getRange();if(i.isEmpty()){var o=i.start;if(t=this.getFoldAt(o.row,o.column))return void this.expandFold(t);(n=this.findMatchingBracket(o))?1==i.comparePoint(n)?i.end=n:(i.start=n,i.start.column++,i.end.column--):(n=this.findMatchingBracket({row:o.row,column:o.column+1}))?(1==i.comparePoint(n)?i.end=n:i.start=n,i.start.column++):i=this.getCommentFoldRange(o.row,o.column)||i}else{var a=this.getFoldsInRange(i);if(e&&a.length)return void this.expandFolds(a);1==a.length&&(t=a[0])}if(t||(t=this.getFoldAt(i.start.row,i.start.column)),t&&t.range.toString()==i.toString())return void this.expandFold(t);var s="...";if(!i.isMultiLine()){if(s=this.getTextRange(i),s.length<4)return;s=s.trim().substring(0,2)+".."}this.addFold(s,i)},this.getCommentFoldRange=function(e,t,n){var r=new s(this,e,t),o=r.getCurrentToken();if(o&&/^comment|string/.test(o.type)){var a=new i,l=new RegExp(o.type.replace(/\..*/,"\\."));if(1!=n){do o=r.stepBackward();while(o&&l.test(o.type));r.stepForward()}if(a.start.row=r.getCurrentTokenRow(),a.start.column=r.getCurrentTokenColumn()+2,r=new s(this,e,t),n!=-1){do o=r.stepForward();while(o&&l.test(o.type));o=r.stepBackward()}else o=r.getCurrentToken();return a.end.row=r.getCurrentTokenRow(),a.end.column=r.getCurrentTokenColumn()+o.value.length-2,a}},this.foldAll=function(e,t,n){void 0==n&&(n=1e5);var r=this.foldWidgets;if(r){t=t||this.getLength(),e=e||0;for(var i=e;i<t;i++)if(null==r[i]&&(r[i]=this.getFoldWidget(i)),"start"==r[i]){var o=this.getFoldWidgetRange(i);if(o&&o.isMultiLine()&&o.end.row<=t&&o.start.row>=e){i=o.end.row;try{var a=this.addFold("...",o);a&&(a.collapseChildren=n)}catch(s){}}}}},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(e){if(!this.$foldStyles[e])throw new Error("invalid fold style: "+e+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=e){this.$foldStyle=e,"manual"==e&&this.unfold();var t=this.$foldMode;this.$setFolding(null),this.$setFolding(t)}},this.$setFolding=function(e){if(this.$foldMode!=e){if(this.$foldMode=e,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),!e||"manual"==this.$foldStyle)return void(this.foldWidgets=null);this.foldWidgets=[],this.getFoldWidget=e.getFoldWidget.bind(e,this,this.$foldStyle),this.getFoldWidgetRange=e.getFoldWidgetRange.bind(e,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets),this.on("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets)}},this.getParentFoldRangeData=function(e,t){var n=this.foldWidgets;if(!n||t&&n[e])return{};for(var r,i=e-1;i>=0;){var o=n[i];if(null==o&&(o=n[i]=this.getFoldWidget(i)),"start"==o){var a=this.getFoldWidgetRange(i);if(r||(r=a),a&&a.end.row>=e)break}i--}return{range:i!==-1&&a,firstRange:r}},this.onFoldWidgetClick=function(e,t){t=t.domEvent;var n={children:t.shiftKey,all:t.ctrlKey||t.metaKey,siblings:t.altKey},r=this.$toggleFoldWidget(e,n);if(!r){var i=t.target||t.srcElement;i&&/ace_fold-widget/.test(i.className)&&(i.className+=" ace_invalid")}},this.$toggleFoldWidget=function(e,t){if(this.getFoldWidget){var n=this.getFoldWidget(e),r=this.getLine(e),i="end"===n?-1:1,o=this.getFoldAt(e,i===-1?0:r.length,i);if(o)return void(t.children||t.all?this.removeFold(o):this.expandFold(o));var a=this.getFoldWidgetRange(e,!0);if(a&&!a.isMultiLine()&&(o=this.getFoldAt(a.start.row,a.start.column,1),o&&a.isEqual(o.range)))return void this.removeFold(o);if(t.siblings){var s=this.getParentFoldRangeData(e);if(s.range)var l=s.range.start.row+1,u=s.range.end.row;this.foldAll(l,u,t.all?1e4:0)}else t.children?(u=a?a.end.row:this.getLength(),this.foldAll(e+1,u,t.all?1e4:0)):a&&(t.all&&(a.collapseChildren=1e4),this.addFold("...",a));return a}},this.toggleFoldWidget=function(e){var t=this.selection.getCursor().row;t=this.getRowFoldStart(t);var n=this.$toggleFoldWidget(t,{});if(!n){var r=this.getParentFoldRangeData(t,!0);if(n=r.range||r.firstRange){t=n.start.row;var i=this.getFoldAt(t,this.getLine(t).length,1);i?this.removeFold(i):this.addFold("...",n)}}},this.updateFoldWidgets=function(e){var t=e.start.row,n=e.end.row-t;if(0===n)this.foldWidgets[t]=null;else if("remove"==e.action)this.foldWidgets.splice(t,n+1,null);else{var r=Array(n+1);r.unshift(t,1),this.foldWidgets.splice.apply(this.foldWidgets,r)}},this.tokenizerUpdateFoldWidgets=function(e){var t=e.data;t.first!=t.last&&this.foldWidgets.length>t.first&&this.foldWidgets.splice(t.first,this.foldWidgets.length)}}var i=e("../range").Range,o=e("./fold_line").FoldLine,a=e("./fold").Fold,s=e("../token_iterator").TokenIterator;t.Folding=r}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(e,t,n){"use strict";function r(){this.findMatchingBracket=function(e,t){if(0==e.column)return null;var n=t||this.getLine(e.row).charAt(e.column-1);if(""==n)return null;var r=n.match(/([\(\[\{])|([\)\]\}])/);return r?r[1]?this.$findClosingBracket(r[1],e):this.$findOpeningBracket(r[2],e):null},this.getBracketRange=function(e){var t,n=this.getLine(e.row),r=!0,i=n.charAt(e.column-1),a=i&&i.match(/([\(\[\{])|([\)\]\}])/);if(a||(i=n.charAt(e.column),e={row:e.row,column:e.column+1},a=i&&i.match(/([\(\[\{])|([\)\]\}])/),r=!1),!a)return null;if(a[1]){var s=this.$findClosingBracket(a[1],e);if(!s)return null;t=o.fromPoints(e,s),r||(t.end.column++,t.start.column--),t.cursor=t.end}else{var s=this.$findOpeningBracket(a[2],e);if(!s)return null;t=o.fromPoints(s,e),r||(t.start.column++,t.end.column--),t.cursor=t.start}return t},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{"},this.$findOpeningBracket=function(e,t,n){var r=this.$brackets[e],o=1,a=new i(this,t.row,t.column),s=a.getCurrentToken();if(s||(s=a.stepForward()),s){n||(n=new RegExp("(\\.?"+s.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)")+")+"));for(var l=t.column-a.getCurrentTokenColumn()-2,u=s.value;;){for(;l>=0;){var c=u.charAt(l);if(c==r){if(o-=1,0==o)return{row:a.getCurrentTokenRow(),column:l+a.getCurrentTokenColumn()}}else c==e&&(o+=1);l-=1}do s=a.stepBackward();while(s&&!n.test(s.type));if(null==s)break;u=s.value,l=u.length-1}return null}},this.$findClosingBracket=function(e,t,n){var r=this.$brackets[e],o=1,a=new i(this,t.row,t.column),s=a.getCurrentToken();if(s||(s=a.stepForward()),s){n||(n=new RegExp("(\\.?"+s.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)")+")+"));for(var l=t.column-a.getCurrentTokenColumn();;){for(var u=s.value,c=u.length;l<c;){var d=u.charAt(l);if(d==r){if(o-=1,0==o)return{row:a.getCurrentTokenRow(),column:l+a.getCurrentTokenColumn()}}else d==e&&(o+=1);l+=1}do s=a.stepForward();while(s&&!n.test(s.type));if(null==s)break;l=0}return null}}}var i=e("../token_iterator").TokenIterator,o=e("../range").Range;t.BracketMatch=r}),ace.define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/document","ace/background_tokenizer","ace/search_highlight","ace/edit_session/folding","ace/edit_session/bracket_match"],function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./lib/lang"),o=e("./config"),a=e("./lib/event_emitter").EventEmitter,s=e("./selection").Selection,l=e("./mode/text").Mode,u=e("./range").Range,c=e("./document").Document,d=e("./background_tokenizer").BackgroundTokenizer,f=e("./search_highlight").SearchHighlight,p=function(e,t){this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$foldData=[],this.$foldData.toString=function(){return this.join("\n")},this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),"object"==typeof e&&e.getLine||(e=new c(e)),this.setDocument(e),this.selection=new s(this),o.resetOptions(this),this.setMode(t),o._signal("session",this)};(function(){function e(e){return!(e<4352)&&(e>=4352&&e<=4447||e>=4515&&e<=4519||e>=4602&&e<=4607||e>=9001&&e<=9002||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12283||e>=12288&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12589||e>=12593&&e<=12686||e>=12688&&e<=12730||e>=12736&&e<=12771||e>=12784&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=13054||e>=13056&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=55216&&e<=55238||e>=55243&&e<=55291||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=65281&&e<=65376||e>=65504&&e<=65510)}r.implement(this,a),this.setDocument=function(e){this.doc&&this.doc.removeListener("change",this.$onChange),this.doc=e,e.on("change",this.$onChange),this.bgTokenizer&&this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},this.getDocument=function(){return this.doc},this.$resetRowCache=function(e){if(!e)return this.$docRowCache=[],void(this.$screenRowCache=[]);var t=this.$docRowCache.length,n=this.$getRowCacheIndex(this.$docRowCache,e)+1;t>n&&(this.$docRowCache.splice(n,t),this.$screenRowCache.splice(n,t))},this.$getRowCacheIndex=function(e,t){for(var n=0,r=e.length-1;n<=r;){var i=n+r>>1,o=e[i];if(t>o)n=i+1;else{if(!(t<o))return i;r=i-1}}return n-1},this.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.bgTokenizer&&this.bgTokenizer.start(0)},this.onChangeFold=function(e){var t=e.data;this.$resetRowCache(t.start.row)},this.onChange=function(e){this.$modified=!0,this.$resetRowCache(e.start.row);var t=this.$updateInternalDataOnChange(e);this.$fromUndo||!this.$undoManager||e.ignore||(this.$deltasDoc.push(e),t&&0!=t.length&&this.$deltasFold.push({action:"removeFolds",folds:t}),this.$informUndoManager.schedule()),this.bgTokenizer&&this.bgTokenizer.$updateOnChange(e),this._signal("change",e)},this.setValue=function(e){this.doc.setValue(e),this.selection.moveTo(0,0),this.$resetRowCache(0),this.$deltas=[],this.$deltasDoc=[],this.$deltasFold=[],this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},this.getValue=this.toString=function(){return this.doc.getValue()},this.getSelection=function(){return this.selection},this.getState=function(e){return this.bgTokenizer.getState(e)},this.getTokens=function(e){return this.bgTokenizer.getTokens(e)},this.getTokenAt=function(e,t){var n,r=this.bgTokenizer.getTokens(e),i=0;if(null==t)o=r.length-1,i=this.getLine(e).length;else for(var o=0;o<r.length&&(i+=r[o].value.length,!(i>=t));o++);return(n=r[o])?(n.index=o,n.start=i-n.value.length,n):null},this.setUndoManager=function(e){if(this.$undoManager=e,this.$deltas=[],this.$deltasDoc=[],this.$deltasFold=[],this.$informUndoManager&&this.$informUndoManager.cancel(),e){var t=this;this.$syncInformUndoManager=function(){t.$informUndoManager.cancel(),t.$deltasFold.length&&(t.$deltas.push({group:"fold",deltas:t.$deltasFold}),t.$deltasFold=[]),t.$deltasDoc.length&&(t.$deltas.push({group:"doc",deltas:t.$deltasDoc}),t.$deltasDoc=[]),t.$deltas.length>0&&e.execute({action:"aceupdate",args:[t.$deltas,t],merge:t.mergeUndoDeltas}),t.mergeUndoDeltas=!1,t.$deltas=[]},this.$informUndoManager=i.delayedCall(this.$syncInformUndoManager)}},this.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},this.$defaultUndoManager={undo:function(){},redo:function(){},reset:function(){}},this.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},this.getTabString=function(){return this.getUseSoftTabs()?i.stringRepeat(" ",this.getTabSize()):"\t"},this.setUseSoftTabs=function(e){this.setOption("useSoftTabs",e)},this.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},this.setTabSize=function(e){
this.setOption("tabSize",e)},this.getTabSize=function(){return this.$tabSize},this.isTabStop=function(e){return this.$useSoftTabs&&e.column%this.$tabSize===0},this.$overwrite=!1,this.setOverwrite=function(e){this.setOption("overwrite",e)},this.getOverwrite=function(){return this.$overwrite},this.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},this.addGutterDecoration=function(e,t){this.$decorations[e]||(this.$decorations[e]=""),this.$decorations[e]+=" "+t,this._signal("changeBreakpoint",{})},this.removeGutterDecoration=function(e,t){this.$decorations[e]=(this.$decorations[e]||"").replace(" "+t,""),this._signal("changeBreakpoint",{})},this.getBreakpoints=function(){return this.$breakpoints},this.setBreakpoints=function(e){this.$breakpoints=[];for(var t=0;t<e.length;t++)this.$breakpoints[e[t]]="ace_breakpoint";this._signal("changeBreakpoint",{})},this.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},this.setBreakpoint=function(e,t){void 0===t&&(t="ace_breakpoint"),t?this.$breakpoints[e]=t:delete this.$breakpoints[e],this._signal("changeBreakpoint",{})},this.clearBreakpoint=function(e){delete this.$breakpoints[e],this._signal("changeBreakpoint",{})},this.addMarker=function(e,t,n,r){var i=this.$markerId++,o={range:e,type:n||"line",renderer:"function"==typeof n?n:null,clazz:t,inFront:!!r,id:i};return r?(this.$frontMarkers[i]=o,this._signal("changeFrontMarker")):(this.$backMarkers[i]=o,this._signal("changeBackMarker")),i},this.addDynamicMarker=function(e,t){if(e.update){var n=this.$markerId++;return e.id=n,e.inFront=!!t,t?(this.$frontMarkers[n]=e,this._signal("changeFrontMarker")):(this.$backMarkers[n]=e,this._signal("changeBackMarker")),e}},this.removeMarker=function(e){var t=this.$frontMarkers[e]||this.$backMarkers[e];if(t){var n=t.inFront?this.$frontMarkers:this.$backMarkers;t&&(delete n[e],this._signal(t.inFront?"changeFrontMarker":"changeBackMarker"))}},this.getMarkers=function(e){return e?this.$frontMarkers:this.$backMarkers},this.highlight=function(e){if(!this.$searchHighlight){var t=new f(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(t)}this.$searchHighlight.setRegexp(e)},this.highlightLines=function(e,t,n,r){"number"!=typeof t&&(n=t,t=e),n||(n="ace_step");var i=new u(e,0,t,1/0);return i.id=this.addMarker(i,n,"fullLine",r),i},this.setAnnotations=function(e){this.$annotations=e,this._signal("changeAnnotation",{})},this.getAnnotations=function(){return this.$annotations||[]},this.clearAnnotations=function(){this.setAnnotations([])},this.$detectNewLine=function(e){var t=e.match(/^.*?(\r?\n)/m);t?this.$autoNewLine=t[1]:this.$autoNewLine="\n"},this.getWordRange=function(e,t){var n=this.getLine(e),r=!1;if(t>0&&(r=!!n.charAt(t-1).match(this.tokenRe)),r||(r=!!n.charAt(t).match(this.tokenRe)),r)var i=this.tokenRe;else if(/^\s+$/.test(n.slice(t-1,t+1)))var i=/\s/;else var i=this.nonTokenRe;var o=t;if(o>0){do o--;while(o>=0&&n.charAt(o).match(i));o++}for(var a=t;a<n.length&&n.charAt(a).match(i);)a++;return new u(e,o,e,a)},this.getAWordRange=function(e,t){for(var n=this.getWordRange(e,t),r=this.getLine(n.end.row);r.charAt(n.end.column).match(/[ \t]/);)n.end.column+=1;return n},this.setNewLineMode=function(e){this.doc.setNewLineMode(e)},this.getNewLineMode=function(){return this.doc.getNewLineMode()},this.setUseWorker=function(e){this.setOption("useWorker",e)},this.getUseWorker=function(){return this.$useWorker},this.onReloadTokenizer=function(e){var t=e.data;this.bgTokenizer.start(t.first),this._signal("tokenizerUpdate",e)},this.$modes={},this.$mode=null,this.$modeId=null,this.setMode=function(e,t){if(e&&"object"==typeof e){if(e.getTokenizer)return this.$onChangeMode(e);var n=e,r=n.path}else r=e||"ace/mode/text";return this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new l),this.$modes[r]&&!n?(this.$onChangeMode(this.$modes[r]),void(t&&t())):(this.$modeId=r,o.loadModule(["mode",r],function(e){return this.$modeId!==r?t&&t():(this.$modes[r]&&!n?this.$onChangeMode(this.$modes[r]):e&&e.Mode&&(e=new e.Mode(n),n||(this.$modes[r]=e,e.$id=r),this.$onChangeMode(e)),void(t&&t()))}.bind(this)),void(this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)))},this.$onChangeMode=function(e,t){if(t||(this.$modeId=e.$id),this.$mode!==e){this.$mode=e,this.$stopWorker(),this.$useWorker&&this.$startWorker();var n=e.getTokenizer();if(void 0!==n.addEventListener){var r=this.onReloadTokenizer.bind(this);n.addEventListener("update",r)}if(this.bgTokenizer)this.bgTokenizer.setTokenizer(n);else{this.bgTokenizer=new d(n);var i=this;this.bgTokenizer.addEventListener("update",function(e){i._signal("tokenizerUpdate",e)})}this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=e.tokenRe,this.nonTokenRe=e.nonTokenRe,t||(e.attachToSession&&e.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(e.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode"))}},this.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},this.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(e){o.warn("Could not load worker",e),this.$worker=null}},this.getMode=function(){return this.$mode},this.$scrollTop=0,this.setScrollTop=function(e){this.$scrollTop===e||isNaN(e)||(this.$scrollTop=e,this._signal("changeScrollTop",e))},this.getScrollTop=function(){return this.$scrollTop},this.$scrollLeft=0,this.setScrollLeft=function(e){this.$scrollLeft===e||isNaN(e)||(this.$scrollLeft=e,this._signal("changeScrollLeft",e))},this.getScrollLeft=function(){return this.$scrollLeft},this.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},this.getLineWidgetMaxWidth=function(){if(null!=this.lineWidgetsWidth)return this.lineWidgetsWidth;var e=0;return this.lineWidgets.forEach(function(t){t&&t.screenWidth>e&&(e=t.screenWidth)}),this.lineWidgetWidth=e},this.$computeWidth=function(e){if(this.$modified||e){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var t=this.doc.getAllLines(),n=this.$rowLengthCache,r=0,i=0,o=this.$foldData[i],a=o?o.start.row:1/0,s=t.length,l=0;l<s;l++){if(l>a){if(l=o.end.row+1,l>=s)break;o=this.$foldData[i++],a=o?o.start.row:1/0}null==n[l]&&(n[l]=this.$getStringScreenWidth(t[l])[0]),n[l]>r&&(r=n[l])}this.screenWidth=r}},this.getLine=function(e){return this.doc.getLine(e)},this.getLines=function(e,t){return this.doc.getLines(e,t)},this.getLength=function(){return this.doc.getLength()},this.getTextRange=function(e){return this.doc.getTextRange(e||this.selection.getRange())},this.insert=function(e,t){return this.doc.insert(e,t)},this.remove=function(e){return this.doc.remove(e)},this.removeFullLines=function(e,t){return this.doc.removeFullLines(e,t)},this.undoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=null,r=e.length-1;r!=-1;r--){var i=e[r];"doc"==i.group?(this.doc.revertDeltas(i.deltas),n=this.$getUndoSelection(i.deltas,!0,n)):i.deltas.forEach(function(e){this.addFolds(e.folds)},this)}return this.$fromUndo=!1,n&&this.$undoSelect&&!t&&this.selection.setSelectionRange(n),n}},this.redoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=null,r=0;r<e.length;r++){var i=e[r];"doc"==i.group&&(this.doc.applyDeltas(i.deltas),n=this.$getUndoSelection(i.deltas,!1,n))}return this.$fromUndo=!1,n&&this.$undoSelect&&!t&&this.selection.setSelectionRange(n),n}},this.setUndoSelect=function(e){this.$undoSelect=e},this.$getUndoSelection=function(e,t,n){function r(e){return t?"insert"!==e.action:"insert"===e.action}var i,o,a=e[0],s=!1;r(a)?(i=u.fromPoints(a.start,a.end),s=!0):(i=u.fromPoints(a.start,a.start),s=!1);for(var l=1;l<e.length;l++)a=e[l],r(a)?(o=a.start,i.compare(o.row,o.column)==-1&&i.setStart(o),o=a.end,1==i.compare(o.row,o.column)&&i.setEnd(o),s=!0):(o=a.start,i.compare(o.row,o.column)==-1&&(i=u.fromPoints(a.start,a.start)),s=!1);if(null!=n){0===u.comparePoints(n.start,i.start)&&(n.start.column+=i.end.column-i.start.column,n.end.column+=i.end.column-i.start.column);var c=n.compareRange(i);1==c?i.setStart(n.start):c==-1&&i.setEnd(n.end)}return i},this.replace=function(e,t){return this.doc.replace(e,t)},this.moveText=function(e,t,n){var r=this.getTextRange(e),i=this.getFoldsInRange(e),o=u.fromPoints(t,t);if(!n){this.remove(e);var a=e.start.row-e.end.row,s=a?-e.end.column:e.start.column-e.end.column;s&&(o.start.row==e.end.row&&o.start.column>e.end.column&&(o.start.column+=s),o.end.row==e.end.row&&o.end.column>e.end.column&&(o.end.column+=s)),a&&o.start.row>=e.end.row&&(o.start.row+=a,o.end.row+=a)}if(o.end=this.insert(o.start,r),i.length){var l=e.start,c=o.start,a=c.row-l.row,s=c.column-l.column;this.addFolds(i.map(function(e){return e=e.clone(),e.start.row==l.row&&(e.start.column+=s),e.end.row==l.row&&(e.end.column+=s),e.start.row+=a,e.end.row+=a,e}))}return o},this.indentRows=function(e,t,n){n=n.replace(/\t/g,this.getTabString());for(var r=e;r<=t;r++)this.doc.insertInLine({row:r,column:0},n)},this.outdentRows=function(e){for(var t=e.collapseRows(),n=new u(0,0,0,0),r=this.getTabSize(),i=t.start.row;i<=t.end.row;++i){var o=this.getLine(i);n.start.row=i,n.end.row=i;for(var a=0;a<r&&" "==o.charAt(a);++a);a<r&&"\t"==o.charAt(a)?(n.start.column=a,n.end.column=a+1):(n.start.column=0,n.end.column=a),this.remove(n)}},this.$moveLines=function(e,t,n){if(e=this.getRowFoldStart(e),t=this.getRowFoldEnd(t),n<0){var r=this.getRowFoldStart(e+n);if(r<0)return 0;var i=r-e}else if(n>0){var r=this.getRowFoldEnd(t+n);if(r>this.doc.getLength()-1)return 0;var i=r-t}else{e=this.$clipRowToDocument(e),t=this.$clipRowToDocument(t);var i=t-e+1}var o=new u(e,0,t,Number.MAX_VALUE),a=this.getFoldsInRange(o).map(function(e){return e=e.clone(),e.start.row+=i,e.end.row+=i,e}),s=0==n?this.doc.getLines(e,t):this.doc.removeFullLines(e,t);return this.doc.insertFullLines(e+i,s),a.length&&this.addFolds(a),i},this.moveLinesUp=function(e,t){return this.$moveLines(e,t,-1)},this.moveLinesDown=function(e,t){return this.$moveLines(e,t,1)},this.duplicateLines=function(e,t){return this.$moveLines(e,t,0)},this.$clipRowToDocument=function(e){return Math.max(0,Math.min(e,this.doc.getLength()-1))},this.$clipColumnToRow=function(e,t){return t<0?0:Math.min(this.doc.getLine(e).length,t)},this.$clipPositionToDocument=function(e,t){if(t=Math.max(0,t),e<0)e=0,t=0;else{var n=this.doc.getLength();e>=n?(e=n-1,t=this.doc.getLine(n-1).length):t=Math.min(this.doc.getLine(e).length,t)}return{row:e,column:t}},this.$clipRangeToDocument=function(e){e.start.row<0?(e.start.row=0,e.start.column=0):e.start.column=this.$clipColumnToRow(e.start.row,e.start.column);var t=this.doc.getLength()-1;return e.end.row>t?(e.end.row=t,e.end.column=this.doc.getLine(t).length):e.end.column=this.$clipColumnToRow(e.end.row,e.end.column),e},this.$wrapLimit=80,this.$useWrapMode=!1,this.$wrapLimitRange={min:null,max:null},this.setUseWrapMode=function(e){if(e!=this.$useWrapMode){if(this.$useWrapMode=e,this.$modified=!0,this.$resetRowCache(0),e){var t=this.getLength();this.$wrapData=Array(t),this.$updateWrapData(0,t-1)}this._signal("changeWrapMode")}},this.getUseWrapMode=function(){return this.$useWrapMode},this.setWrapLimitRange=function(e,t){this.$wrapLimitRange.min===e&&this.$wrapLimitRange.max===t||(this.$wrapLimitRange={min:e,max:t},this.$modified=!0,this.$useWrapMode&&this._signal("changeWrapMode"))},this.adjustWrapLimit=function(e,t){var n=this.$wrapLimitRange;n.max<0&&(n={min:t,max:t});var r=this.$constrainWrapLimit(e,n.min,n.max);return r!=this.$wrapLimit&&r>1&&(this.$wrapLimit=r,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0)},this.$constrainWrapLimit=function(e,t,n){return t&&(e=Math.max(t,e)),n&&(e=Math.min(n,e)),e},this.getWrapLimit=function(){return this.$wrapLimit},this.setWrapLimit=function(e){this.setWrapLimitRange(e,e)},this.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},this.$updateInternalDataOnChange=function(e){var t=this.$useWrapMode,n=e.action,r=e.start,i=e.end,o=r.row,a=i.row,s=a-o,l=null;if(this.$updating=!0,0!=s)if("remove"===n){this[t?"$wrapData":"$rowLengthCache"].splice(o,s);var u=this.$foldData;l=this.getFoldsInRange(e),this.removeFolds(l);var c=this.getFoldLine(i.row),d=0;if(c){c.addRemoveChars(i.row,i.column,r.column-i.column),c.shiftRow(-s);var f=this.getFoldLine(o);f&&f!==c&&(f.merge(c),c=f),d=u.indexOf(c)+1}for(d;d<u.length;d++){var c=u[d];c.start.row>=i.row&&c.shiftRow(-s)}a=o}else{var p=Array(s);p.unshift(o,0);var h=t?this.$wrapData:this.$rowLengthCache;h.splice.apply(h,p);var u=this.$foldData,c=this.getFoldLine(o),d=0;if(c){var g=c.range.compareInside(r.row,r.column);0==g?(c=c.split(r.row,r.column),c&&(c.shiftRow(s),c.addRemoveChars(a,0,i.column-r.column))):g==-1&&(c.addRemoveChars(o,0,i.column-r.column),c.shiftRow(s)),d=u.indexOf(c)+1}for(d;d<u.length;d++){var c=u[d];c.start.row>=o&&c.shiftRow(s)}}else{s=Math.abs(e.start.column-e.end.column),"remove"===n&&(l=this.getFoldsInRange(e),this.removeFolds(l),s=-s);var c=this.getFoldLine(o);c&&c.addRemoveChars(o,r.column,s)}return t&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,t?this.$updateWrapData(o,a):this.$updateRowLengthCache(o,a),l},this.$updateRowLengthCache=function(e,t,n){this.$rowLengthCache[e]=null,this.$rowLengthCache[t]=null},this.$updateWrapData=function(e,t){var n,r,i=this.doc.getAllLines(),o=this.getTabSize(),a=this.$wrapData,l=this.$wrapLimit,u=e;for(t=Math.min(t,i.length-1);u<=t;)r=this.getFoldLine(u,r),r?(n=[],r.walk(function(e,t,r,o){var a;if(null!=e){a=this.$getDisplayTokens(e,n.length),a[0]=s;for(var l=1;l<a.length;l++)a[l]=c}else a=this.$getDisplayTokens(i[t].substring(o,r),n.length);n=n.concat(a)}.bind(this),r.end.row,i[r.end.row].length+1),a[r.start.row]=this.$computeWrapSplits(n,l,o),u=r.end.row+1):(n=this.$getDisplayTokens(i[u]),a[u]=this.$computeWrapSplits(n,l,o),u++)};var t=1,n=2,s=3,c=4,p=9,h=10,g=11,m=12;this.$computeWrapSplits=function(e,t,r){function i(){var t=0;if(0===b)return t;if(v)for(var n=0;n<e.length;n++){var i=e[n];if(i==h)t+=1;else{if(i!=g){if(i==m)continue;break}t+=r}}return f&&v!==!1&&(t+=r),Math.min(t,b)}function o(t){var n=e.slice(u,t),r=n.length;n.join("").replace(/12/g,function(){r-=1}).replace(/2/g,function(){r-=1}),a.length||(y=i(),a.indent=y),d+=r,a.push(d),u=t}if(0==e.length)return[];for(var a=[],l=e.length,u=0,d=0,f=this.$wrapAsCode,v=this.$indentedSoftWrap,b=t<=Math.max(2*r,8)||v===!1?0:Math.floor(t/2),y=0;l-u>t-y;){var w=u+t-y;if(e[w-1]>=h&&e[w]>=h)o(w);else if(e[w]!=s&&e[w]!=c){for(var x=Math.max(w-(t-(t>>2)),u-1);w>x&&e[w]<s;)w--;if(f){for(;w>x&&e[w]<s;)w--;for(;w>x&&e[w]==p;)w--}else for(;w>x&&e[w]<h;)w--;w>x?o(++w):(w=u+t,e[w]==n&&w--,o(w-y))}else{for(w;w!=u-1&&e[w]!=s;w--);if(w>u){o(w);continue}for(w=u+t;w<e.length&&e[w]==c;w++);if(w==e.length)break;o(w)}}return a},this.$getDisplayTokens=function(r,i){var o,a=[];i=i||0;for(var s=0;s<r.length;s++){var l=r.charCodeAt(s);if(9==l){o=this.getScreenTabSize(a.length+i),a.push(g);for(var u=1;u<o;u++)a.push(m)}else 32==l?a.push(h):l>39&&l<48||l>57&&l<64?a.push(p):l>=4352&&e(l)?a.push(t,n):a.push(t)}return a},this.$getStringScreenWidth=function(t,n,r){if(0==n)return[0,0];null==n&&(n=1/0),r=r||0;var i,o;for(o=0;o<t.length&&(i=t.charCodeAt(o),r+=9==i?this.getScreenTabSize(r):i>=4352&&e(i)?2:1,!(r>n));o++);return[r,o]},this.lineWidgets=null,this.getRowLength=function(e){if(this.lineWidgets)var t=this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0;else t=0;return this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1+t:1+t},this.getRowLineCount=function(e){return this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1:1},this.getRowWrapIndent=function(e){if(this.$useWrapMode){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE),n=this.$wrapData[t.row];return n.length&&n[0]<t.column?n.indent:0}return 0},this.getScreenLastRowColumn=function(e){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE);return this.documentToScreenColumn(t.row,t.column)},this.getDocumentLastRowColumn=function(e,t){var n=this.documentToScreenRow(e,t);return this.getScreenLastRowColumn(n)},this.getDocumentLastRowColumnPosition=function(e,t){var n=this.documentToScreenRow(e,t);return this.screenToDocumentPosition(n,Number.MAX_VALUE/10)},this.getRowSplitData=function(e){return this.$useWrapMode?this.$wrapData[e]:void 0},this.getScreenTabSize=function(e){return this.$tabSize-e%this.$tabSize},this.screenToDocumentRow=function(e,t){return this.screenToDocumentPosition(e,t).row},this.screenToDocumentColumn=function(e,t){return this.screenToDocumentPosition(e,t).column},this.screenToDocumentPosition=function(e,t){if(e<0)return{row:0,column:0};var n,r,i=0,o=0,a=0,s=0,l=this.$screenRowCache,u=this.$getRowCacheIndex(l,e),c=l.length;if(c&&u>=0)var a=l[u],i=this.$docRowCache[u],d=e>l[c-1];else var d=!c;for(var f=this.getLength()-1,p=this.getNextFoldLine(i),h=p?p.start.row:1/0;a<=e&&(s=this.getRowLength(i),!(a+s>e||i>=f));)a+=s,i++,i>h&&(i=p.end.row+1,p=this.getNextFoldLine(i,p),h=p?p.start.row:1/0),d&&(this.$docRowCache.push(i),this.$screenRowCache.push(a));if(p&&p.start.row<=i)n=this.getFoldDisplayLine(p),i=p.start.row;else{if(a+s<=e||i>f)return{row:f,column:this.getLine(f).length};n=this.getLine(i),p=null}var g=0;if(this.$useWrapMode){var m=this.$wrapData[i];if(m){var v=Math.floor(e-a);r=m[v],v>0&&m.length&&(g=m.indent,o=m[v-1]||m[m.length-1],n=n.substring(o))}}return o+=this.$getStringScreenWidth(n,t-g)[1],this.$useWrapMode&&o>=r&&(o=r-1),p?p.idxToPosition(o):{row:i,column:o}},this.documentToScreenPosition=function(e,t){if("undefined"==typeof t)var n=this.$clipPositionToDocument(e.row,e.column);else n=this.$clipPositionToDocument(e,t);e=n.row,t=n.column;var r=0,i=null,o=null;o=this.getFoldAt(e,t,1),o&&(e=o.start.row,t=o.start.column);var a,s=0,l=this.$docRowCache,u=this.$getRowCacheIndex(l,e),c=l.length;if(c&&u>=0)var s=l[u],r=this.$screenRowCache[u],d=e>l[c-1];else var d=!c;for(var f=this.getNextFoldLine(s),p=f?f.start.row:1/0;s<e;){if(s>=p){if(a=f.end.row+1,a>e)break;f=this.getNextFoldLine(a,f),p=f?f.start.row:1/0}else a=s+1;r+=this.getRowLength(s),s=a,d&&(this.$docRowCache.push(s),this.$screenRowCache.push(r))}var h="";f&&s>=p?(h=this.getFoldDisplayLine(f,e,t),i=f.start.row):(h=this.getLine(e).substring(0,t),i=e);var g=0;if(this.$useWrapMode){var m=this.$wrapData[i];if(m){for(var v=0;h.length>=m[v];)r++,v++;h=h.substring(m[v-1]||0,h.length),g=v>0?m.indent:0}}return{row:r,column:g+this.$getStringScreenWidth(h)[0]}},this.documentToScreenColumn=function(e,t){return this.documentToScreenPosition(e,t).column},this.documentToScreenRow=function(e,t){return this.documentToScreenPosition(e,t).row},this.getScreenLength=function(){var e=0,t=null;if(this.$useWrapMode)for(var n=this.$wrapData.length,r=0,i=0,t=this.$foldData[i++],o=t?t.start.row:1/0;r<n;){var a=this.$wrapData[r];e+=a?a.length+1:1,r++,r>o&&(r=t.end.row+1,t=this.$foldData[i++],o=t?t.start.row:1/0)}else{e=this.getLength();for(var s=this.$foldData,i=0;i<s.length;i++)t=s[i],e-=t.end.row-t.start.row}return this.lineWidgets&&(e+=this.$getWidgetScreenLength()),e},this.$setFontMetrics=function(e){this.$enableVarChar&&(this.$getStringScreenWidth=function(t,n,r){if(0===n)return[0,0];n||(n=1/0),r=r||0;var i,o;for(o=0;o<t.length&&(i=t.charAt(o),r+="\t"===i?this.getScreenTabSize(r):e.getCharacterWidth(i),!(r>n));o++);return[r,o]})},this.destroy=function(){this.bgTokenizer&&(this.bgTokenizer.setDocument(null),this.bgTokenizer=null),this.$stopWorker()}}).call(p.prototype),e("./edit_session/folding").Folding.call(p.prototype),e("./edit_session/bracket_match").BracketMatch.call(p.prototype),o.defineOptions(p.prototype,"session",{wrap:{set:function(e){if(e&&"off"!=e?"free"==e?e=!0:"printMargin"==e?e=-1:"string"==typeof e&&(e=parseInt(e,10)||!1):e=!1,this.$wrap!=e)if(this.$wrap=e,e){var t="number"==typeof e?e:null;this.setWrapLimitRange(t,t),this.setUseWrapMode(!0)}else this.setUseWrapMode(!1)},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(e){e="auto"==e?"text"!=this.$mode.type:"text"!=e,e!=this.$wrapAsCode&&(this.$wrapAsCode=e,this.$useWrapMode&&(this.$modified=!0,this.$resetRowCache(0),this.$updateWrapData(0,this.getLength()-1)))},initialValue:"auto"},indentedSoftWrap:{initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(e){this.$useWorker=e,this.$stopWorker(),e&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(e){isNaN(e)||this.$tabSize===e||(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=e,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},overwrite:{set:function(e){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(e){this.doc.setNewLineMode(e)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(e){this.setMode(e)},get:function(){return this.$modeId}}}),t.EditSession=p}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(e,t,n){"use strict";var r=e("./lib/lang"),i=e("./lib/oop"),o=e("./range").Range,a=function(){this.$options={}};(function(){this.set=function(e){return i.mixin(this.$options,e),this},this.getOptions=function(){return r.copyObject(this.$options)},this.setOptions=function(e){this.$options=e},this.find=function(e){var t=this.$options,n=this.$matchIterator(e,t);if(!n)return!1;var r=null;return n.forEach(function(e,n,i){if(e.start)r=e;else{var a=e.offset+(i||0);if(r=new o(n,a,n,a+e.length),!e.length&&t.start&&t.start.start&&0!=t.skipCurrent&&r.isEqual(t.start))return r=null,!1}return!0}),r},this.findAll=function(e){var t=this.$options;if(!t.needle)return[];this.$assembleRegExp(t);var n=t.range,i=n?e.getLines(n.start.row,n.end.row):e.doc.getAllLines(),a=[],s=t.re;if(t.$isMultiLine){var l,u=s.length,c=i.length-u;e:for(var d=s.offset||0;d<=c;d++){for(var f=0;f<u;f++)if(i[d+f].search(s[f])==-1)continue e;var p=i[d],h=i[d+u-1],g=p.length-p.match(s[0])[0].length,m=h.match(s[u-1])[0].length;l&&l.end.row===d&&l.end.column>g||(a.push(l=new o(d,g,d+u-1,m)),u>2&&(d=d+u-2))}}else for(var v=0;v<i.length;v++)for(var b=r.getMatchOffsets(i[v],s),f=0;f<b.length;f++){var y=b[f];a.push(new o(v,y.offset,v,y.offset+y.length))}if(n){for(var w=n.start.column,x=n.start.column,v=0,f=a.length-1;v<f&&a[v].start.column<w&&a[v].start.row==n.start.row;)v++;for(;v<f&&a[f].end.column>x&&a[f].end.row==n.end.row;)f--;for(a=a.slice(v,f+1),v=0,f=a.length;v<f;v++)a[v].start.row+=n.start.row,a[v].end.row+=n.start.row}return a},this.replace=function(e,t){var n=this.$options,r=this.$assembleRegExp(n);if(n.$isMultiLine)return t;if(r){var i=r.exec(e);if(!i||i[0].length!=e.length)return null;if(t=e.replace(r,t),n.preserveCase){t=t.split("");for(var o=Math.min(e.length,e.length);o--;){var a=e[o];a&&a.toLowerCase()!=a?t[o]=t[o].toUpperCase():t[o]=t[o].toLowerCase()}t=t.join("")}return t}},this.$matchIterator=function(e,t){var n=this.$assembleRegExp(t);if(!n)return!1;var i;if(t.$isMultiLine)var a=n.length,s=function(t,r,s){var l=t.search(n[0]);if(l!=-1){for(var u=1;u<a;u++)if(t=e.getLine(r+u),t.search(n[u])==-1)return;var c=t.match(n[a-1])[0].length,d=new o(r,l,r+a-1,c);return 1==n.offset?(d.start.row--,d.start.column=Number.MAX_VALUE):s&&(d.start.column+=s),!!i(d)||void 0}};else if(t.backwards)var s=function(e,t,o){for(var a=r.getMatchOffsets(e,n),s=a.length-1;s>=0;s--)if(i(a[s],t,o))return!0};else var s=function(e,t,o){for(var a=r.getMatchOffsets(e,n),s=0;s<a.length;s++)if(i(a[s],t,o))return!0};var l=this.$lineIterator(e,t);return{forEach:function(e){i=e,l.forEach(s)}}},this.$assembleRegExp=function(e,t){if(e.needle instanceof RegExp)return e.re=e.needle;var n=e.needle;if(!e.needle)return e.re=!1;e.regExp||(n=r.escapeRegExp(n)),e.wholeWord&&(n="\\b"+n+"\\b");var i=e.caseSensitive?"gm":"gmi";if(e.$isMultiLine=!t&&/[\n\r]/.test(n),e.$isMultiLine)return e.re=this.$assembleMultilineRegExp(n,i);try{var o=new RegExp(n,i)}catch(a){o=!1}return e.re=o},this.$assembleMultilineRegExp=function(e,t){for(var n=e.replace(/\r\n|\r|\n/g,"$\n^").split("\n"),r=[],i=0;i<n.length;i++)try{r.push(new RegExp(n[i],t))}catch(o){return!1}return""==n[0]?(r.shift(),r.offset=1):r.offset=0,r},this.$lineIterator=function(e,t){var n=1==t.backwards,r=0!=t.skipCurrent,i=t.range,o=t.start;o||(o=i?i[n?"end":"start"]:e.selection.getRange()),o.start&&(o=o[r!=n?"end":"start"]);var a=i?i.start.row:0,s=i?i.end.row:e.getLength()-1,l=n?function(n){var r=o.row,i=e.getLine(r).substring(0,o.column);if(!n(i,r)){for(r--;r>=a;r--)if(n(e.getLine(r),r))return;if(0!=t.wrap)for(r=s,a=o.row;r>=a;r--)if(n(e.getLine(r),r))return}}:function(n){var r=o.row,i=e.getLine(r).substr(o.column);if(!n(i,r,o.column)){for(r+=1;r<=s;r++)if(n(e.getLine(r),r))return;if(0!=t.wrap)for(r=a,s=o.row;r<=s;r++)if(n(e.getLine(r),r))return}};return{forEach:l}}}).call(a.prototype),t.Search=a}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,t,n){"use strict";function r(e,t){this.platform=t||(a.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(e),this.$singleCommand=!0}function i(e,t){r.call(this,e,t),this.$singleCommand=!1}var o=e("../lib/keys"),a=e("../lib/useragent"),s=o.KEY_MODS;i.prototype=r.prototype,function(){function e(e){return"object"==typeof e&&e.bindKey&&e.bindKey.position||0}this.addCommand=function(e){this.commands[e.name]&&this.removeCommand(e),this.commands[e.name]=e,e.bindKey&&this._buildKeyHash(e)},this.removeCommand=function(e,t){var n=e&&("string"==typeof e?e:e.name);e=this.commands[n],t||delete this.commands[n];var r=this.commandKeyBinding;for(var i in r){var o=r[i];if(o==e)delete r[i];else if(Array.isArray(o)){var a=o.indexOf(e);a!=-1&&(o.splice(a,1),1==o.length&&(r[i]=o[0]))}}},this.bindKey=function(e,t,n){if("object"==typeof e&&(void 0==n&&(n=e.position),e=e[this.platform]),e)return"function"==typeof t?this.addCommand({exec:t,bindKey:e,name:t.name||e}):void e.split("|").forEach(function(e){var r="";if(e.indexOf(" ")!=-1){var i=e.split(/\s+/);e=i.pop(),i.forEach(function(e){var t=this.parseKeys(e),n=s[t.hashId]+t.key;r+=(r?" ":"")+n,this._addCommandToBinding(r,"chainKeys")},this),r+=" "}var o=this.parseKeys(e),a=s[o.hashId]+o.key;this._addCommandToBinding(r+a,t,n)},this)},this._addCommandToBinding=function(t,n,r){var i,o=this.commandKeyBinding;if(n)if(!o[t]||this.$singleCommand)o[t]=n;else{Array.isArray(o[t])?(i=o[t].indexOf(n))!=-1&&o[t].splice(i,1):o[t]=[o[t]],"number"!=typeof r&&(r=r||n.isDefault?-100:e(n));var a=o[t];for(i=0;i<a.length;i++){var s=a[i],l=e(s);if(l>r)break}a.splice(i,0,n)}else delete o[t]},this.addCommands=function(e){e&&Object.keys(e).forEach(function(t){var n=e[t];if(n){if("string"==typeof n)return this.bindKey(n,t);"function"==typeof n&&(n={exec:n}),"object"==typeof n&&(n.name||(n.name=t),this.addCommand(n))}},this)},this.removeCommands=function(e){Object.keys(e).forEach(function(t){this.removeCommand(e[t])},this)},this.bindKeys=function(e){Object.keys(e).forEach(function(t){this.bindKey(t,e[t])},this)},this._buildKeyHash=function(e){this.bindKey(e.bindKey,e)},this.parseKeys=function(e){var t=e.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(e){return e}),n=t.pop(),r=o[n];if(o.FUNCTION_KEYS[r])n=o.FUNCTION_KEYS[r].toLowerCase();else{if(!t.length)return{key:n,hashId:-1};if(1==t.length&&"shift"==t[0])return{key:n.toUpperCase(),hashId:-1}}for(var i=0,a=t.length;a--;){var s=o.KEY_MODS[t[a]];if(null==s)return"undefined"!=typeof console&&console.error("invalid modifier "+t[a]+" in "+e),!1;i|=s}return{key:n,hashId:i}},this.findKeyCommand=function(e,t){var n=s[e]+t;return this.commandKeyBinding[n]},this.handleKeyboard=function(e,t,n,r){if(!(r<0)){var i=s[t]+n,o=this.commandKeyBinding[i];return e.$keyChain&&(e.$keyChain+=" "+i,o=this.commandKeyBinding[e.$keyChain]||o),!o||"chainKeys"!=o&&"chainKeys"!=o[o.length-1]?(e.$keyChain&&(t&&4!=t||1!=n.length?(t==-1||r>0)&&(e.$keyChain=""):e.$keyChain=e.$keyChain.slice(0,-i.length-1)),{command:o}):(e.$keyChain=e.$keyChain||i,{command:"null"})}},this.getStatusText=function(e,t){return t.$keyChain||""}}.call(r.prototype),t.HashHandler=r,t.MultiHashHandler=i}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../keyboard/hash_handler").MultiHashHandler,o=e("../lib/event_emitter").EventEmitter,a=function(e,t){i.call(this,t,e),this.byName=this.commands,this.setDefaultHandler("exec",function(e){return e.command.exec(e.editor,e.args||{})})};r.inherits(a,i),function(){r.implement(this,o),this.exec=function(e,t,n){if(Array.isArray(e)){for(var r=e.length;r--;)if(this.exec(e[r],t,n))return!0;return!1}if("string"==typeof e&&(e=this.commands[e]),!e)return!1;if(t&&t.$readOnly&&!e.readOnly)return!1;var i={editor:t,command:e,args:n};return i.returnValue=this._emit("exec",i),this._signal("afterExec",i),i.returnValue!==!1},this.toggleRecording=function(e){if(!this.$inReplay)return e&&e._emit("changeStatus"),this.recording?(this.macro.pop(),this.removeEventListener("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(e){this.macro.push([e.command,e.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},this.replay=function(e){if(!this.$inReplay&&this.macro){if(this.recording)return this.toggleRecording(e);try{this.$inReplay=!0,this.macro.forEach(function(t){"string"==typeof t?this.exec(t,e):this.exec(t[0],e,t[1])},this)}finally{this.$inReplay=!1}}},this.trimMacro=function(e){return e.map(function(e){return"string"!=typeof e[0]&&(e[0]=e[0].name),e[1]||(e=e[0]),e})}}.call(a.prototype),t.CommandManager=a}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(e,t,n){"use strict";function r(e,t){return{win:e,mac:t}}var i=e("../lib/lang"),o=e("../config"),a=e("../range").Range;t.commands=[{name:"showSettingsMenu",bindKey:r("Ctrl-,","Command-,"),exec:function(e){o.loadModule("ace/ext/settings_menu",function(t){t.init(e),e.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",bindKey:r("Alt-E","Ctrl-E"),exec:function(e){o.loadModule("ace/ext/error_marker",function(t){t.showErrorMarker(e,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",bindKey:r("Alt-Shift-E","Ctrl-Shift-E"),exec:function(e){o.loadModule("ace/ext/error_marker",function(t){t.showErrorMarker(e,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",bindKey:r("Ctrl-A","Command-A"),exec:function(e){e.selectAll()},readOnly:!0},{name:"centerselection",bindKey:r(null,"Ctrl-L"),exec:function(e){e.centerSelection()},readOnly:!0},{name:"gotoline",bindKey:r("Ctrl-L","Command-L"),exec:function(e){var t=parseInt(prompt("Enter line number:"),10);isNaN(t)||e.gotoLine(t)},readOnly:!0},{name:"fold",bindKey:r("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(e){e.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:r("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(e){e.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",bindKey:r("F2","F2"),exec:function(e){e.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",bindKey:r("Alt-F2","Alt-F2"),exec:function(e){e.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",bindKey:r(null,"Ctrl-Command-Option-0"),
exec:function(e){e.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",bindKey:r("Alt-0","Command-Option-0"),exec:function(e){e.session.foldAll(),e.session.unfold(e.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",bindKey:r("Alt-Shift-0","Command-Option-Shift-0"),exec:function(e){e.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",bindKey:r("Ctrl-K","Command-G"),exec:function(e){e.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",bindKey:r("Ctrl-Shift-K","Command-Shift-G"),exec:function(e){e.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",bindKey:r("Alt-K","Ctrl-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findNext()},readOnly:!0},{name:"selectOrFindPrevious",bindKey:r("Alt-Shift-K","Ctrl-Shift-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findPrevious()},readOnly:!0},{name:"find",bindKey:r("Ctrl-F","Command-F"),exec:function(e){o.loadModule("ace/ext/searchbox",function(t){t.Search(e)})},readOnly:!0},{name:"overwrite",bindKey:"Insert",exec:function(e){e.toggleOverwrite()},readOnly:!0},{name:"selecttostart",bindKey:r("Ctrl-Shift-Home","Command-Shift-Up"),exec:function(e){e.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",bindKey:r("Ctrl-Home","Command-Home|Command-Up"),exec:function(e){e.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",bindKey:r("Shift-Up","Shift-Up"),exec:function(e){e.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",bindKey:r("Up","Up|Ctrl-P"),exec:function(e,t){e.navigateUp(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",bindKey:r("Ctrl-Shift-End","Command-Shift-Down"),exec:function(e){e.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",bindKey:r("Ctrl-End","Command-End|Command-Down"),exec:function(e){e.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",bindKey:r("Shift-Down","Shift-Down"),exec:function(e){e.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",bindKey:r("Down","Down|Ctrl-N"),exec:function(e,t){e.navigateDown(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",bindKey:r("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(e){e.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",bindKey:r("Ctrl-Left","Option-Left"),exec:function(e){e.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",bindKey:r("Alt-Shift-Left","Command-Shift-Left"),exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",bindKey:r("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(e){e.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",bindKey:r("Shift-Left","Shift-Left"),exec:function(e){e.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",bindKey:r("Left","Left|Ctrl-B"),exec:function(e,t){e.navigateLeft(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",bindKey:r("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(e){e.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",bindKey:r("Ctrl-Right","Option-Right"),exec:function(e){e.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",bindKey:r("Alt-Shift-Right","Command-Shift-Right"),exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",bindKey:r("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(e){e.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",bindKey:r("Shift-Right","Shift-Right"),exec:function(e){e.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",bindKey:r("Right","Right|Ctrl-F"),exec:function(e,t){e.navigateRight(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",bindKey:"Shift-PageDown",exec:function(e){e.selectPageDown()},readOnly:!0},{name:"pagedown",bindKey:r(null,"Option-PageDown"),exec:function(e){e.scrollPageDown()},readOnly:!0},{name:"gotopagedown",bindKey:r("PageDown","PageDown|Ctrl-V"),exec:function(e){e.gotoPageDown()},readOnly:!0},{name:"selectpageup",bindKey:"Shift-PageUp",exec:function(e){e.selectPageUp()},readOnly:!0},{name:"pageup",bindKey:r(null,"Option-PageUp"),exec:function(e){e.scrollPageUp()},readOnly:!0},{name:"gotopageup",bindKey:"PageUp",exec:function(e){e.gotoPageUp()},readOnly:!0},{name:"scrollup",bindKey:r("Ctrl-Up",null),exec:function(e){e.renderer.scrollBy(0,-2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",bindKey:r("Ctrl-Down",null),exec:function(e){e.renderer.scrollBy(0,2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",bindKey:"Shift-Home",exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",bindKey:"Shift-End",exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",bindKey:r("Ctrl-Alt-E","Command-Option-E"),exec:function(e){e.commands.toggleRecording(e)},readOnly:!0},{name:"replaymacro",bindKey:r("Ctrl-Shift-E","Command-Shift-E"),exec:function(e){e.commands.replay(e)},readOnly:!0},{name:"jumptomatching",bindKey:r("Ctrl-P","Ctrl-P"),exec:function(e){e.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",bindKey:r("Ctrl-Shift-P","Ctrl-Shift-P"),exec:function(e){e.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",bindKey:r("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(e){e.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",bindKey:r(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",exec:function(e){},readOnly:!0},{name:"cut",exec:function(e){var t=e.getSelectionRange();e._emit("cut",t),e.selection.isEmpty()||(e.session.remove(t),e.clearSelection())},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",exec:function(e,t){e.$handlePaste(t)},scrollIntoView:"cursor"},{name:"removeline",bindKey:r("Ctrl-D","Command-D"),exec:function(e){e.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",bindKey:r("Ctrl-Shift-D","Command-Shift-D"),exec:function(e){e.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",bindKey:r("Ctrl-Alt-S","Command-Alt-S"),exec:function(e){e.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",bindKey:r("Ctrl-/","Command-/"),exec:function(e){e.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",bindKey:r("Ctrl-Shift-/","Command-Shift-/"),exec:function(e){e.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",bindKey:r("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(e){e.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",bindKey:r("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(e){e.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",bindKey:r("Ctrl-H","Command-Option-F"),exec:function(e){o.loadModule("ace/ext/searchbox",function(t){t.Search(e,!0)})}},{name:"undo",bindKey:r("Ctrl-Z","Command-Z"),exec:function(e){e.undo()}},{name:"redo",bindKey:r("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(e){e.redo()}},{name:"copylinesup",bindKey:r("Alt-Shift-Up","Command-Option-Up"),exec:function(e){e.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",bindKey:r("Alt-Up","Option-Up"),exec:function(e){e.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",bindKey:r("Alt-Shift-Down","Command-Option-Down"),exec:function(e){e.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",bindKey:r("Alt-Down","Option-Down"),exec:function(e){e.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",bindKey:r("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(e){e.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",bindKey:r("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(e){e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",bindKey:r("Shift-Delete",null),exec:function(e){return!!e.selection.isEmpty()&&void e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",bindKey:r("Alt-Backspace","Command-Backspace"),exec:function(e){e.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",bindKey:r("Alt-Delete","Ctrl-K"),exec:function(e){e.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",bindKey:r("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(e){e.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",bindKey:r("Ctrl-Delete","Alt-Delete"),exec:function(e){e.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",bindKey:r("Shift-Tab","Shift-Tab"),exec:function(e){e.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",bindKey:r("Tab","Tab"),exec:function(e){e.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",bindKey:r("Ctrl-[","Ctrl-["),exec:function(e){e.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",bindKey:r("Ctrl-]","Ctrl-]"),exec:function(e){e.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",exec:function(e,t){e.insert(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",exec:function(e,t){e.insert(i.stringRepeat(t.text||"",t.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",bindKey:r(null,"Ctrl-O"),exec:function(e){e.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",bindKey:r("Ctrl-T","Ctrl-T"),exec:function(e){e.transposeLetters()},multiSelectAction:function(e){e.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",bindKey:r("Ctrl-U","Ctrl-U"),exec:function(e){e.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",bindKey:r("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(e){e.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"expandtoline",bindKey:r("Ctrl-Shift-L","Command-Shift-L"),exec:function(e){var t=e.selection.getRange();t.start.column=t.end.column=0,t.end.row++,e.selection.setRange(t,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"joinlines",bindKey:r(null,null),exec:function(e){for(var t=e.selection.isBackwards(),n=t?e.selection.getSelectionLead():e.selection.getSelectionAnchor(),r=t?e.selection.getSelectionAnchor():e.selection.getSelectionLead(),o=e.session.doc.getLine(n.row).length,s=e.session.doc.getTextRange(e.selection.getRange()),l=s.replace(/\n\s*/," ").length,u=e.session.doc.getLine(n.row),c=n.row+1;c<=r.row+1;c++){var d=i.stringTrimLeft(i.stringTrimRight(e.session.doc.getLine(c)));0!==d.length&&(d=" "+d),u+=d}r.row+1<e.session.doc.getLength()-1&&(u+=e.session.doc.getNewLineCharacter()),e.clearSelection(),e.session.doc.replace(new a(n.row,0,r.row+2,0),u),l>0?(e.selection.moveCursorTo(n.row,n.column),e.selection.selectTo(n.row,n.column+l)):(o=e.session.doc.getLine(n.row).length>o?o+1:o,e.selection.moveCursorTo(n.row,o))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",bindKey:r(null,null),exec:function(e){var t=e.session.doc.getLength()-1,n=e.session.doc.getLine(t).length,r=e.selection.rangeList.ranges,i=[];r.length<1&&(r=[e.selection.getRange()]);for(var o=0;o<r.length;o++)o==r.length-1&&(r[o].end.row===t&&r[o].end.column===n||i.push(new a(r[o].end.row,r[o].end.column,t,n))),0===o?0===r[o].start.row&&0===r[o].start.column||i.push(new a(0,0,r[o].start.row,r[o].start.column)):i.push(new a(r[o-1].end.row,r[o-1].end.column,r[o].start.row,r[o].start.column));e.exitMultiSelectMode(),e.clearSelection();for(var o=0;o<i.length;o++)e.selection.addRange(i[o],!1)},readOnly:!0,scrollIntoView:"none"}]}),ace.define("ace/editor",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator"],function(e,t,n){"use strict";e("./lib/fixoldbrowsers");var r=e("./lib/oop"),i=e("./lib/dom"),o=e("./lib/lang"),a=e("./lib/useragent"),s=e("./keyboard/textinput").TextInput,l=e("./mouse/mouse_handler").MouseHandler,u=e("./mouse/fold_handler").FoldHandler,c=e("./keyboard/keybinding").KeyBinding,d=e("./edit_session").EditSession,f=e("./search").Search,p=e("./range").Range,h=e("./lib/event_emitter").EventEmitter,g=e("./commands/command_manager").CommandManager,m=e("./commands/default_commands").commands,v=e("./config"),b=e("./token_iterator").TokenIterator,y=function(e,t){var n=e.getContainerElement();this.container=n,this.renderer=e,this.commands=new g(a.isMac?"mac":"win",m),this.textInput=new s(e.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.keyBinding=new c(this),this.$mouseHandler=new l(this),new u(this),this.$blockScrolling=0,this.$search=(new f).set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=o.delayedCall(function(){this._signal("input",{}),this.session&&this.session.bgTokenizer&&this.session.bgTokenizer.scheduleStart()}.bind(this)),this.on("change",function(e,t){t._$emitInputEvent.schedule(31)}),this.setSession(t||new d("")),v.resetOptions(this),v._signal("editor",this)};(function(){r.implement(this,h),this.$initOperationListeners=function(){this.selections=[],this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0),this.$opResetTimer=o.delayedCall(this.endOperation.bind(this)),this.on("change",function(){this.curOp||this.startOperation(),this.curOp.docChanged=!0}.bind(this),!0),this.on("changeSelection",function(){this.curOp||this.startOperation(),this.curOp.selectionChanged=!0}.bind(this),!0)},this.curOp=null,this.prevOp={},this.startOperation=function(e){if(this.curOp){if(!e||this.curOp.command)return;this.prevOp=this.curOp}e||(this.previousCommand=null,e={}),this.$opResetTimer.schedule(),this.curOp={command:e.command||{},args:e.args,scrollTop:this.renderer.scrollTop},this.curOp.command.name&&void 0!==this.curOp.command.scrollIntoView&&this.$blockScrolling++},this.endOperation=function(e){if(this.curOp){if(e&&e.returnValue===!1)return this.curOp=null;this._signal("beforeEndOperation");var t=this.curOp.command;t.name&&this.$blockScrolling>0&&this.$blockScrolling--;var n=t&&t.scrollIntoView;if(n){switch(n){case"center-animate":n="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var r=this.selection.getRange(),i=this.renderer.layerConfig;(r.start.row>=i.lastRow||r.end.row<=i.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead)}"animate"==n&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.prevOp=this.curOp,this.curOp=null}},this.$mergeableCommands=["backspace","del","insertstring"],this.$historyTracker=function(e){if(this.$mergeUndoDeltas){var t=this.prevOp,n=this.$mergeableCommands,r=t.command&&e.command.name==t.command.name;if("insertstring"==e.command.name){var i=e.args;void 0===this.mergeNextCommand&&(this.mergeNextCommand=!0),r=r&&this.mergeNextCommand&&(!/\s/.test(i)||/\s/.test(t.args)),this.mergeNextCommand=!0}else r=r&&n.indexOf(e.command.name)!==-1;"always"!=this.$mergeUndoDeltas&&Date.now()-this.sequenceStartTime>2e3&&(r=!1),r?this.session.mergeUndoDeltas=!0:n.indexOf(e.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},this.setKeyboardHandler=function(e,t){if(e&&"string"==typeof e){this.$keybindingId=e;var n=this;v.loadModule(["keybinding",e],function(r){n.$keybindingId==e&&n.keyBinding.setKeyboardHandler(r&&r.handler),t&&t()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(e),t&&t()},this.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},this.setSession=function(e){if(this.session!=e){this.curOp&&this.endOperation(),this.curOp={};var t=this.session;if(t){this.session.removeEventListener("change",this.$onDocumentChange),this.session.removeEventListener("changeMode",this.$onChangeMode),this.session.removeEventListener("tokenizerUpdate",this.$onTokenizerUpdate),this.session.removeEventListener("changeTabSize",this.$onChangeTabSize),this.session.removeEventListener("changeWrapLimit",this.$onChangeWrapLimit),this.session.removeEventListener("changeWrapMode",this.$onChangeWrapMode),this.session.removeEventListener("onChangeFold",this.$onChangeFold),this.session.removeEventListener("changeFrontMarker",this.$onChangeFrontMarker),this.session.removeEventListener("changeBackMarker",this.$onChangeBackMarker),this.session.removeEventListener("changeBreakpoint",this.$onChangeBreakpoint),this.session.removeEventListener("changeAnnotation",this.$onChangeAnnotation),this.session.removeEventListener("changeOverwrite",this.$onCursorChange),this.session.removeEventListener("changeScrollTop",this.$onScrollTopChange),this.session.removeEventListener("changeScrollLeft",this.$onScrollLeftChange);var n=this.session.getSelection();n.removeEventListener("changeCursor",this.$onCursorChange),n.removeEventListener("changeSelection",this.$onSelectionChange)}this.session=e,e?(this.$onDocumentChange=this.onDocumentChange.bind(this),e.addEventListener("change",this.$onDocumentChange),this.renderer.setSession(e),this.$onChangeMode=this.onChangeMode.bind(this),e.addEventListener("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),e.addEventListener("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),e.addEventListener("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),e.addEventListener("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),e.addEventListener("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),e.addEventListener("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.addEventListener("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.addEventListener("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.addEventListener("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.addEventListener("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.addEventListener("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.addEventListener("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.addEventListener("changeScrollLeft",this.$onScrollLeftChange),this.selection=e.getSelection(),this.selection.addEventListener("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.addEventListener("changeSelection",this.$onSelectionChange),this.onChangeMode(),this.$blockScrolling+=1,this.onCursorChange(),this.$blockScrolling-=1,this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(e)),this._signal("changeSession",{session:e,oldSession:t}),this.curOp=null,t&&t._signal("changeEditor",{oldEditor:this}),e&&e._signal("changeEditor",{editor:this})}},this.getSession=function(){return this.session},this.setValue=function(e,t){return this.session.doc.setValue(e),t?1==t?this.navigateFileEnd():t==-1&&this.navigateFileStart():this.selectAll(),e},this.getValue=function(){return this.session.getValue()},this.getSelection=function(){return this.selection},this.resize=function(e){this.renderer.onResize(e)},this.setTheme=function(e,t){this.renderer.setTheme(e,t)},this.getTheme=function(){return this.renderer.getTheme()},this.setStyle=function(e){this.renderer.setStyle(e)},this.unsetStyle=function(e){this.renderer.unsetStyle(e)},this.getFontSize=function(){return this.getOption("fontSize")||i.computedStyle(this.container,"fontSize")},this.setFontSize=function(e){this.setOption("fontSize",e)},this.$highlightBrackets=function(){if(this.session.$bracketHighlight&&(this.session.removeMarker(this.session.$bracketHighlight),this.session.$bracketHighlight=null),!this.$highlightPending){var e=this;this.$highlightPending=!0,setTimeout(function(){e.$highlightPending=!1;var t=e.session;if(t&&t.bgTokenizer){var n=t.findMatchingBracket(e.getCursorPosition());if(n)var r=new p(n.row,n.column,n.row,n.column+1);else if(t.$mode.getMatching)var r=t.$mode.getMatching(e.session);r&&(t.$bracketHighlight=t.addMarker(r,"ace_bracket","text"))}},50)}},this.$highlightTags=function(){if(!this.$highlightTagPending){var e=this;this.$highlightTagPending=!0,setTimeout(function(){e.$highlightTagPending=!1;var t=e.session;if(t&&t.bgTokenizer){var n=e.getCursorPosition(),r=new b(e.session,n.row,n.column),i=r.getCurrentToken();if(!i||!/\b(?:tag-open|tag-name)/.test(i.type))return t.removeMarker(t.$tagHighlight),void(t.$tagHighlight=null);if(i.type.indexOf("tag-open")==-1||(i=r.stepForward())){var o=i.value,a=0,s=r.stepBackward();if("<"==s.value){do s=i,i=r.stepForward(),i&&i.value===o&&i.type.indexOf("tag-name")!==-1&&("<"===s.value?a++:"</"===s.value&&a--);while(i&&a>=0)}else{do i=s,s=r.stepBackward(),i&&i.value===o&&i.type.indexOf("tag-name")!==-1&&("<"===s.value?a++:"</"===s.value&&a--);while(s&&a<=0);r.stepForward()}if(!i)return t.removeMarker(t.$tagHighlight),void(t.$tagHighlight=null);var l=r.getCurrentTokenRow(),u=r.getCurrentTokenColumn(),c=new p(l,u,l,u+i.value.length);t.$tagHighlight&&0!==c.compareRange(t.$backMarkers[t.$tagHighlight].range)&&(t.removeMarker(t.$tagHighlight),t.$tagHighlight=null),c&&!t.$tagHighlight&&(t.$tagHighlight=t.addMarker(c,"ace_bracket","text"))}}},50)}},this.focus=function(){var e=this;setTimeout(function(){e.textInput.focus()}),this.textInput.focus()},this.isFocused=function(){return this.textInput.isFocused()},this.blur=function(){this.textInput.blur()},this.onFocus=function(e){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",e))},this.onBlur=function(e){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",e))},this.$cursorChange=function(){this.renderer.updateCursor()},this.onDocumentChange=function(e){var t=this.session.$useWrapMode,n=e.start.row==e.end.row?e.end.row:1/0;this.renderer.updateLines(e.start.row,n,t),this._signal("change",e),this.$cursorChange(),this.$updateHighlightActiveLine()},this.onTokenizerUpdate=function(e){var t=e.data;this.renderer.updateLines(t.first,t.last)},this.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},this.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},this.onCursorChange=function(){this.$cursorChange(),this.$blockScrolling||(v.warn("Automatically scrolling cursor into view after selection change","this will be disabled in the next version","set editor.$blockScrolling = Infinity to disable this message"),this.renderer.scrollCursorIntoView()),this.$highlightBrackets(),this.$highlightTags(),this.$updateHighlightActiveLine(),this._signal("changeSelection")},this.$updateHighlightActiveLine=function(){var e,t=this.getSession();if(this.$highlightActiveLine&&("line"==this.$selectionStyle&&this.selection.isMultiLine()||(e=this.getCursorPosition()),!this.renderer.$maxLines||1!==this.session.getLength()||this.renderer.$minLines>1||(e=!1)),t.$highlightLineMarker&&!e)t.removeMarker(t.$highlightLineMarker.id),t.$highlightLineMarker=null;else if(!t.$highlightLineMarker&&e){var n=new p(e.row,e.column,e.row,1/0);n.id=t.addMarker(n,"ace_active-line","screenLine"),t.$highlightLineMarker=n}else e&&(t.$highlightLineMarker.start.row=e.row,t.$highlightLineMarker.end.row=e.row,t.$highlightLineMarker.start.column=e.column,t._signal("changeBackMarker"))},this.onSelectionChange=function(e){var t=this.session;if(t.$selectionMarker&&t.removeMarker(t.$selectionMarker),t.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var n=this.selection.getRange(),r=this.getSelectionStyle();t.$selectionMarker=t.addMarker(n,"ace_selection",r)}var i=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(i),this._signal("changeSelection")},this.$getSelectionHighLightRegexp=function(){var e=this.session,t=this.getSelectionRange();if(!t.isEmpty()&&!t.isMultiLine()){var n=t.start.column-1,r=t.end.column+1,i=e.getLine(t.start.row),o=i.length,a=i.substring(Math.max(n,0),Math.min(r,o));if(!(n>=0&&/^[\w\d]/.test(a)||r<=o&&/[\w\d]$/.test(a))&&(a=i.substring(t.start.column,t.end.column),/^[\w\d]+$/.test(a))){var s=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:a});return s}}},this.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},this.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},this.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},this.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},this.onChangeMode=function(e){this.renderer.updateText(),this._emit("changeMode",e)},this.onChangeWrapLimit=function(){this.renderer.updateFull()},this.onChangeWrapMode=function(){this.renderer.onResize(!0)},this.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},this.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},this.getCopyText=function(){var e=this.getSelectedText();return this._signal("copy",e),e},this.onCopy=function(){this.commands.exec("copy",this)},this.onCut=function(){this.commands.exec("cut",this)},this.onPaste=function(e,t){var n={text:e,event:t};this.commands.exec("paste",this,n)},this.$handlePaste=function(e){"string"==typeof e&&(e={text:e}),this._signal("paste",e);var t=e.text;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)this.insert(t);else{var n=t.split(/\r\n|\r|\n/),r=this.selection.rangeList.ranges;if(n.length>r.length||n.length<2||!n[1])return this.commands.exec("insertstring",this,t);for(var i=r.length;i--;){var o=r[i];o.isEmpty()||this.session.remove(o),this.session.insert(o.start,n[i])}}},this.execCommand=function(e,t){return this.commands.exec(e,this,t)},this.insert=function(e,t){var n=this.session,r=n.getMode(),i=this.getCursorPosition();if(this.getBehavioursEnabled()&&!t){var o=r.transformAction(n.getState(i.row),"insertion",this,n,e);o&&(e!==o.text&&(this.session.mergeUndoDeltas=!1,this.$mergeNextCommand=!1),e=o.text)}if("\t"==e&&(e=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()){var a=new p.fromPoints(i,i);a.end.column+=e.length,this.session.remove(a)}}else{var a=this.getSelectionRange();i=this.session.remove(a),this.clearSelection()}if("\n"==e||"\r\n"==e){var s=n.getLine(i.row);if(i.column>s.search(/\S|$/)){var l=s.substr(i.column).search(/\S|$/);n.doc.removeInLine(i.row,i.column,i.column+l)}}this.clearSelection();var u=i.column,c=n.getState(i.row),s=n.getLine(i.row),d=r.checkOutdent(c,s,e);n.insert(i,e);if(o&&o.selection&&(2==o.selection.length?this.selection.setSelectionRange(new p(i.row,u+o.selection[0],i.row,u+o.selection[1])):this.selection.setSelectionRange(new p(i.row+o.selection[0],o.selection[1],i.row+o.selection[2],o.selection[3]))),n.getDocument().isNewLine(e)){var f=r.getNextLineIndent(c,s.slice(0,i.column),n.getTabString());n.insert({row:i.row+1,column:0},f)}d&&r.autoOutdent(c,n,i.row)},this.onTextInput=function(e){this.keyBinding.onTextInput(e)},this.onCommandKey=function(e,t,n){this.keyBinding.onCommandKey(e,t,n)},this.setOverwrite=function(e){this.session.setOverwrite(e)},this.getOverwrite=function(){return this.session.getOverwrite()},this.toggleOverwrite=function(){this.session.toggleOverwrite()},this.setScrollSpeed=function(e){this.setOption("scrollSpeed",e)},this.getScrollSpeed=function(){return this.getOption("scrollSpeed")},this.setDragDelay=function(e){this.setOption("dragDelay",e)},this.getDragDelay=function(){return this.getOption("dragDelay")},this.setSelectionStyle=function(e){this.setOption("selectionStyle",e)},this.getSelectionStyle=function(){return this.getOption("selectionStyle")},this.setHighlightActiveLine=function(e){this.setOption("highlightActiveLine",e)},this.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.setHighlightSelectedWord=function(e){this.setOption("highlightSelectedWord",e)},this.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},this.setAnimatedScroll=function(e){this.renderer.setAnimatedScroll(e)},this.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},this.setShowInvisibles=function(e){this.renderer.setShowInvisibles(e)},this.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},this.setDisplayIndentGuides=function(e){this.renderer.setDisplayIndentGuides(e)},this.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},this.setShowPrintMargin=function(e){this.renderer.setShowPrintMargin(e)},this.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},this.setPrintMarginColumn=function(e){this.renderer.setPrintMarginColumn(e)},this.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},this.setReadOnly=function(e){this.setOption("readOnly",e)},this.getReadOnly=function(){return this.getOption("readOnly")},this.setBehavioursEnabled=function(e){this.setOption("behavioursEnabled",e)},this.getBehavioursEnabled=function(){
return this.getOption("behavioursEnabled")},this.setWrapBehavioursEnabled=function(e){this.setOption("wrapBehavioursEnabled",e)},this.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},this.setShowFoldWidgets=function(e){this.setOption("showFoldWidgets",e)},this.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.remove=function(e){this.selection.isEmpty()&&("left"==e?this.selection.selectLeft():this.selection.selectRight());var t=this.getSelectionRange();if(this.getBehavioursEnabled()){var n=this.session,r=n.getState(t.start.row),i=n.getMode().transformAction(r,"deletion",this,n,t);if(0===t.end.column){var o=n.getTextRange(t);if("\n"==o[o.length-1]){var a=n.getLine(t.end.row);/^\s+$/.test(a)&&(t.end.column=a.length)}}i&&(t=i)}this.session.remove(t),this.clearSelection()},this.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var e=this.getSelectionRange();e.start.column==e.end.column&&e.start.row==e.end.row&&(e.end.column=0,e.end.row++),this.session.remove(e),this.clearSelection()},this.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var e=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(e)},this.transposeLetters=function(){if(this.selection.isEmpty()){var e=this.getCursorPosition(),t=e.column;if(0!==t){var n,r,i=this.session.getLine(e.row);t<i.length?(n=i.charAt(t)+i.charAt(t-1),r=new p(e.row,t-1,e.row,t+1)):(n=i.charAt(t-1)+i.charAt(t-2),r=new p(e.row,t-2,e.row,t)),this.session.replace(r,n)}}},this.toLowerCase=function(){var e=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var t=this.getSelectionRange(),n=this.session.getTextRange(t);this.session.replace(t,n.toLowerCase()),this.selection.setSelectionRange(e)},this.toUpperCase=function(){var e=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var t=this.getSelectionRange(),n=this.session.getTextRange(t);this.session.replace(t,n.toUpperCase()),this.selection.setSelectionRange(e)},this.indent=function(){var e=this.session,t=this.getSelectionRange();if(t.start.row<t.end.row){var n=this.$getSelectedRows();return void e.indentRows(n.first,n.last,"\t")}if(t.start.column<t.end.column){var r=e.getTextRange(t);if(!/^\s+$/.test(r)){var n=this.$getSelectedRows();return void e.indentRows(n.first,n.last,"\t")}}var i=e.getLine(t.start.row),a=t.start,s=e.getTabSize(),l=e.documentToScreenColumn(a.row,a.column);if(this.session.getUseSoftTabs())var u=s-l%s,c=o.stringRepeat(" ",u);else{for(var u=l%s;" "==i[t.start.column]&&u;)t.start.column--,u--;this.selection.setSelectionRange(t),c="\t"}return this.insert(c)},this.blockIndent=function(){var e=this.$getSelectedRows();this.session.indentRows(e.first,e.last,"\t")},this.blockOutdent=function(){var e=this.session.getSelection();this.session.outdentRows(e.getRange())},this.sortLines=function(){var e=this.$getSelectedRows(),t=this.session,n=[];for(i=e.first;i<=e.last;i++)n.push(t.getLine(i));n.sort(function(e,t){return e.toLowerCase()<t.toLowerCase()?-1:e.toLowerCase()>t.toLowerCase()?1:0});for(var r=new p(0,0,0,0),i=e.first;i<=e.last;i++){var o=t.getLine(i);r.start.row=i,r.end.row=i,r.end.column=o.length,t.replace(r,n[i-e.first])}},this.toggleCommentLines=function(){var e=this.session.getState(this.getCursorPosition().row),t=this.$getSelectedRows();this.session.getMode().toggleCommentLines(e,this.session,t.first,t.last)},this.toggleBlockComment=function(){var e=this.getCursorPosition(),t=this.session.getState(e.row),n=this.getSelectionRange();this.session.getMode().toggleBlockComment(t,this.session,n,e)},this.getNumberAt=function(e,t){var n=/[\-]?[0-9]+(?:\.[0-9]+)?/g;n.lastIndex=0;for(var r=this.session.getLine(e);n.lastIndex<t;){var i=n.exec(r);if(i.index<=t&&i.index+i[0].length>=t){var o={value:i[0],start:i.index,end:i.index+i[0].length};return o}}return null},this.modifyNumber=function(e){var t=this.selection.getCursor().row,n=this.selection.getCursor().column,r=new p(t,n-1,t,n),i=this.session.getTextRange(r);if(!isNaN(parseFloat(i))&&isFinite(i)){var o=this.getNumberAt(t,n);if(o){var a=o.value.indexOf(".")>=0?o.start+o.value.indexOf(".")+1:o.end,s=o.start+o.value.length-a,l=parseFloat(o.value);l*=Math.pow(10,s),e*=a!==o.end&&n<a?Math.pow(10,o.end-n-1):Math.pow(10,o.end-n),l+=e,l/=Math.pow(10,s);var u=l.toFixed(s),c=new p(t,o.start,t,o.end);this.session.replace(c,u),this.moveCursorTo(t,Math.max(o.start+1,n+u.length-o.value.length))}}},this.removeLines=function(){var e=this.$getSelectedRows();this.session.removeFullLines(e.first,e.last),this.clearSelection()},this.duplicateSelection=function(){var e=this.selection,t=this.session,n=e.getRange(),r=e.isBackwards();if(n.isEmpty()){var i=n.start.row;t.duplicateLines(i,i)}else{var o=r?n.start:n.end,a=t.insert(o,t.getTextRange(n),!1);n.start=o,n.end=a,e.setSelectionRange(n,r)}},this.moveLinesDown=function(){this.$moveLines(1,!1)},this.moveLinesUp=function(){this.$moveLines(-1,!1)},this.moveText=function(e,t,n){return this.session.moveText(e,t,n)},this.copyLinesUp=function(){this.$moveLines(-1,!0)},this.copyLinesDown=function(){this.$moveLines(1,!0)},this.$moveLines=function(e,t){var n,r,i=this.selection;if(!i.inMultiSelectMode||this.inVirtualSelectionMode){var o=i.toOrientedRange();n=this.$getSelectedRows(o),r=this.session.$moveLines(n.first,n.last,t?0:e),t&&e==-1&&(r=0),o.moveBy(r,0),i.fromOrientedRange(o)}else{var a=i.rangeList.ranges;i.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var s=0,l=0,u=a.length,c=0;c<u;c++){var d=c;a[c].moveBy(s,0),n=this.$getSelectedRows(a[c]);for(var f=n.first,p=n.last;++c<u;){l&&a[c].moveBy(l,0);var h=this.$getSelectedRows(a[c]);if(t&&h.first!=p)break;if(!t&&h.first>p+1)break;p=h.last}for(c--,s=this.session.$moveLines(f,p,t?0:e),t&&e==-1&&(d=c+1);d<=c;)a[d].moveBy(s,0),d++;t||(s=0),l+=s}i.fromOrientedRange(i.ranges[0]),i.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},this.$getSelectedRows=function(e){return e=(e||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(e.start.row),last:this.session.getRowFoldEnd(e.end.row)}},this.onCompositionStart=function(e){this.renderer.showComposition(this.getCursorPosition())},this.onCompositionUpdate=function(e){this.renderer.setCompositionText(e)},this.onCompositionEnd=function(){this.renderer.hideComposition()},this.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},this.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},this.isRowVisible=function(e){return e>=this.getFirstVisibleRow()&&e<=this.getLastVisibleRow()},this.isRowFullyVisible=function(e){return e>=this.renderer.getFirstFullyVisibleRow()&&e<=this.renderer.getLastFullyVisibleRow()},this.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},this.$moveByPage=function(e,t){var n=this.renderer,r=this.renderer.layerConfig,i=e*Math.floor(r.height/r.lineHeight);this.$blockScrolling++,t===!0?this.selection.$moveSelection(function(){this.moveCursorBy(i,0)}):t===!1&&(this.selection.moveCursorBy(i,0),this.selection.clearSelection()),this.$blockScrolling--;var o=n.scrollTop;n.scrollBy(0,i*r.lineHeight),null!=t&&n.scrollCursorIntoView(null,.5),n.animateScrolling(o)},this.selectPageDown=function(){this.$moveByPage(1,!0)},this.selectPageUp=function(){this.$moveByPage(-1,!0)},this.gotoPageDown=function(){this.$moveByPage(1,!1)},this.gotoPageUp=function(){this.$moveByPage(-1,!1)},this.scrollPageDown=function(){this.$moveByPage(1)},this.scrollPageUp=function(){this.$moveByPage(-1)},this.scrollToRow=function(e){this.renderer.scrollToRow(e)},this.scrollToLine=function(e,t,n,r){this.renderer.scrollToLine(e,t,n,r)},this.centerSelection=function(){var e=this.getSelectionRange(),t={row:Math.floor(e.start.row+(e.end.row-e.start.row)/2),column:Math.floor(e.start.column+(e.end.column-e.start.column)/2)};this.renderer.alignCursor(t,.5)},this.getCursorPosition=function(){return this.selection.getCursor()},this.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},this.getSelectionRange=function(){return this.selection.getRange()},this.selectAll=function(){this.$blockScrolling+=1,this.selection.selectAll(),this.$blockScrolling-=1},this.clearSelection=function(){this.selection.clearSelection()},this.moveCursorTo=function(e,t){this.selection.moveCursorTo(e,t)},this.moveCursorToPosition=function(e){this.selection.moveCursorToPosition(e)},this.jumpToMatching=function(e,t){var n=this.getCursorPosition(),r=new b(this.session,n.row,n.column),i=r.getCurrentToken(),o=i||r.stepForward();if(o){var a,s,l=!1,u={},c=n.column-o.start,d={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(o.value.match(/[{}()\[\]]/g)){for(;c<o.value.length&&!l;c++)if(d[o.value[c]])switch(s=d[o.value[c]]+"."+o.type.replace("rparen","lparen"),isNaN(u[s])&&(u[s]=0),o.value[c]){case"(":case"[":case"{":u[s]++;break;case")":case"]":case"}":u[s]--,u[s]===-1&&(a="bracket",l=!0)}}else o&&o.type.indexOf("tag-name")!==-1&&(isNaN(u[o.value])&&(u[o.value]=0),"<"===i.value?u[o.value]++:"</"===i.value&&u[o.value]--,u[o.value]===-1&&(a="tag",l=!0));l||(i=o,o=r.stepForward(),c=0)}while(o&&!l);if(a){var f,h;if("bracket"===a)f=this.session.getBracketRange(n),f||(f=new p(r.getCurrentTokenRow(),r.getCurrentTokenColumn()+c-1,r.getCurrentTokenRow(),r.getCurrentTokenColumn()+c-1),h=f.start,(t||h.row===n.row&&Math.abs(h.column-n.column)<2)&&(f=this.session.getBracketRange(h)));else if("tag"===a){if(!o||o.type.indexOf("tag-name")===-1)return;var g=o.value;if(f=new p(r.getCurrentTokenRow(),r.getCurrentTokenColumn()-2,r.getCurrentTokenRow(),r.getCurrentTokenColumn()-2),0===f.compare(n.row,n.column)){l=!1;do o=i,i=r.stepBackward(),i&&(i.type.indexOf("tag-close")!==-1&&f.setEnd(r.getCurrentTokenRow(),r.getCurrentTokenColumn()+1),o.value===g&&o.type.indexOf("tag-name")!==-1&&("<"===i.value?u[g]++:"</"===i.value&&u[g]--,0===u[g]&&(l=!0)));while(i&&!l)}o&&o.type.indexOf("tag-name")&&(h=f.start,h.row==n.row&&Math.abs(h.column-n.column)<2&&(h=f.end))}h=f&&f.cursor||h,h&&(e?f&&t?this.selection.setRange(f):f&&f.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(h.row,h.column):this.selection.moveTo(h.row,h.column))}}},this.gotoLine=function(e,t,n){this.selection.clearSelection(),this.session.unfold({row:e-1,column:t||0}),this.$blockScrolling+=1,this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(e-1,t||0),this.$blockScrolling-=1,this.isRowFullyVisible(e-1)||this.scrollToLine(e-1,!0,n)},this.navigateTo=function(e,t){this.selection.moveTo(e,t)},this.navigateUp=function(e){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var t=this.selection.anchor.getPosition();return this.moveCursorToPosition(t)}this.selection.clearSelection(),this.selection.moveCursorBy(-e||-1,0)},this.navigateDown=function(e){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var t=this.selection.anchor.getPosition();return this.moveCursorToPosition(t)}this.selection.clearSelection(),this.selection.moveCursorBy(e||1,0)},this.navigateLeft=function(e){if(this.selection.isEmpty())for(e=e||1;e--;)this.selection.moveCursorLeft();else{var t=this.getSelectionRange().start;this.moveCursorToPosition(t)}this.clearSelection()},this.navigateRight=function(e){if(this.selection.isEmpty())for(e=e||1;e--;)this.selection.moveCursorRight();else{var t=this.getSelectionRange().end;this.moveCursorToPosition(t)}this.clearSelection()},this.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},this.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},this.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},this.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},this.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},this.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},this.replace=function(e,t){t&&this.$search.set(t);var n=this.$search.find(this.session),r=0;return n?(this.$tryReplace(n,e)&&(r=1),null!==n&&(this.selection.setSelectionRange(n),this.renderer.scrollSelectionIntoView(n.start,n.end)),r):r},this.replaceAll=function(e,t){t&&this.$search.set(t);var n=this.$search.findAll(this.session),r=0;if(!n.length)return r;this.$blockScrolling+=1;var i=this.getSelectionRange();this.selection.moveTo(0,0);for(var o=n.length-1;o>=0;--o)this.$tryReplace(n[o],e)&&r++;return this.selection.setSelectionRange(i),this.$blockScrolling-=1,r},this.$tryReplace=function(e,t){var n=this.session.getTextRange(e);return t=this.$search.replace(n,t),null!==t?(e.end=this.session.replace(e,t),e):null},this.getLastSearchOptions=function(){return this.$search.getOptions()},this.find=function(e,t,n){t||(t={}),"string"==typeof e||e instanceof RegExp?t.needle=e:"object"==typeof e&&r.mixin(t,e);var i=this.selection.getRange();null==t.needle&&(e=this.session.getTextRange(i)||this.$search.$options.needle,e||(i=this.session.getWordRange(i.start.row,i.start.column),e=this.session.getTextRange(i)),this.$search.set({needle:e})),this.$search.set(t),t.start||this.$search.set({start:i});var o=this.$search.find(this.session);return t.preventScroll?o:o?(this.revealRange(o,n),o):(t.backwards?i.start=i.end:i.end=i.start,void this.selection.setRange(i))},this.findNext=function(e,t){this.find({skipCurrent:!0,backwards:!1},e,t)},this.findPrevious=function(e,t){this.find(e,{skipCurrent:!0,backwards:!0},t)},this.revealRange=function(e,t){this.$blockScrolling+=1,this.session.unfold(e),this.selection.setSelectionRange(e),this.$blockScrolling-=1;var n=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(e.start,e.end,.5),t!==!1&&this.renderer.animateScrolling(n)},this.undo=function(){this.$blockScrolling++,this.session.getUndoManager().undo(),this.$blockScrolling--,this.renderer.scrollCursorIntoView(null,.5)},this.redo=function(){this.$blockScrolling++,this.session.getUndoManager().redo(),this.$blockScrolling--,this.renderer.scrollCursorIntoView(null,.5)},this.destroy=function(){this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy()},this.setAutoScrollEditorIntoView=function(e){if(e){var t,n=this,r=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var i=this.$scrollAnchor;i.style.cssText="position:absolute",this.container.insertBefore(i,this.container.firstChild);var o=this.on("changeSelection",function(){r=!0}),a=this.renderer.on("beforeRender",function(){r&&(t=n.renderer.container.getBoundingClientRect())}),s=this.renderer.on("afterRender",function(){if(r&&t&&(n.isFocused()||n.searchBox&&n.searchBox.isFocused())){var e=n.renderer,o=e.$cursorLayer.$pixelPos,a=e.layerConfig,s=o.top-a.offset;r=o.top>=0&&s+t.top<0||!(o.top<a.height&&o.top+t.top+a.lineHeight>window.innerHeight)&&null,null!=r&&(i.style.top=s+"px",i.style.left=o.left+"px",i.style.height=a.lineHeight+"px",i.scrollIntoView(r)),r=t=null}});this.setAutoScrollEditorIntoView=function(e){e||(delete this.setAutoScrollEditorIntoView,this.removeEventListener("changeSelection",o),this.renderer.removeEventListener("afterRender",s),this.renderer.removeEventListener("beforeRender",a))}}},this.$resetCursorStyle=function(){var e=this.$cursorStyle||"ace",t=this.renderer.$cursorLayer;t&&(t.setSmoothBlinking(/smooth/.test(e)),t.isBlinking=!this.$readOnly&&"wide"!=e,i.setCssClass(t.element,"ace_slim-cursors",/slim/.test(e)))}}).call(y.prototype),v.defineOptions(y.prototype,"editor",{selectionStyle:{set:function(e){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:e})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(e){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(e){this.$resetCursorStyle()},initialValue:!1},cursorStyle:{set:function(e){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},autoScrollEditorIntoView:{set:function(e){this.setAutoScrollEditorIntoView(e)}},hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",showLineNumbers:"renderer",showGutter:"renderer",displayIndentGuides:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"}),t.Editor=y}),ace.define("ace/undomanager",["require","exports","module"],function(e,t,n){"use strict";var r=function(){this.reset()};(function(){function e(e){return{action:e.action,start:e.start,end:e.end,lines:1==e.lines.length?null:e.lines,text:1==e.lines.length?e.lines[0]:null}}function t(e){return{action:e.action,start:e.start,end:e.end,lines:e.lines||[e.text]}}function n(e,t){for(var n=new Array(e.length),r=0;r<e.length;r++){for(var i=e[r],o={group:i.group,deltas:new Array(i.length)},a=0;a<i.deltas.length;a++){var s=i.deltas[a];o.deltas[a]=t(s)}n[r]=o}return n}this.execute=function(e){var t=e.args[0];this.$doc=e.args[1],e.merge&&this.hasUndo()&&(this.dirtyCounter--,t=this.$undoStack.pop().concat(t)),this.$undoStack.push(t),this.$redoStack=[],this.dirtyCounter<0&&(this.dirtyCounter=NaN),this.dirtyCounter++},this.undo=function(e){var t=this.$undoStack.pop(),n=null;return t&&(n=this.$doc.undoChanges(t,e),this.$redoStack.push(t),this.dirtyCounter--),n},this.redo=function(e){var t=this.$redoStack.pop(),n=null;return t&&(n=this.$doc.redoChanges(this.$deserializeDeltas(t),e),this.$undoStack.push(t),this.dirtyCounter++),n},this.reset=function(){this.$undoStack=[],this.$redoStack=[],this.dirtyCounter=0},this.hasUndo=function(){return this.$undoStack.length>0},this.hasRedo=function(){return this.$redoStack.length>0},this.markClean=function(){this.dirtyCounter=0},this.isClean=function(){return 0===this.dirtyCounter},this.$serializeDeltas=function(t){return n(t,e)},this.$deserializeDeltas=function(e){return n(e,t)}}).call(r.prototype),t.UndoManager=r}),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter"],function(e,t,n){"use strict";var r=e("../lib/dom"),i=e("../lib/oop"),o=e("../lib/lang"),a=e("../lib/event_emitter").EventEmitter,s=function(e){this.element=r.createElement("div"),this.element.className="ace_layer ace_gutter-layer",e.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$cells=[]};(function(){i.implement(this,a),this.setSession=function(e){this.session&&this.session.removeEventListener("change",this.$updateAnnotations),this.session=e,e&&e.on("change",this.$updateAnnotations)},this.addGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(e,t)},this.removeGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(e,t)},this.setAnnotations=function(e){this.$annotations=[];for(var t=0;t<e.length;t++){var n=e[t],r=n.row,i=this.$annotations[r];i||(i=this.$annotations[r]={text:[]});var a=n.text;a=a?o.escapeHTML(a):n.html||"",i.text.indexOf(a)===-1&&i.text.push(a);var s=n.type;"error"==s?i.className=" ace_error":"warning"==s&&" ace_error"!=i.className?i.className=" ace_warning":"info"!=s||i.className||(i.className=" ace_info")}},this.$updateAnnotations=function(e){if(this.$annotations.length){var t=e.start.row,n=e.end.row-t;if(0===n);else if("remove"==e.action)this.$annotations.splice(t,n+1,null);else{var r=new Array(n+1);r.unshift(t,1),this.$annotations.splice.apply(this.$annotations,r)}}},this.update=function(e){for(var t=this.session,n=e.firstRow,i=Math.min(e.lastRow+e.gutterOffset,t.getLength()-1),o=t.getNextFoldLine(n),a=o?o.start.row:1/0,s=this.$showFoldWidgets&&t.foldWidgets,l=t.$breakpoints,u=t.$decorations,c=t.$firstLineNumber,d=0,f=t.gutterRenderer||this.$renderer,p=null,h=-1,g=n;;){if(g>a&&(g=o.end.row+1,o=t.getNextFoldLine(g,o),a=o?o.start.row:1/0),g>i){for(;this.$cells.length>h+1;)p=this.$cells.pop(),this.element.removeChild(p.element);break}p=this.$cells[++h],p||(p={element:null,textNode:null,foldWidget:null},p.element=r.createElement("div"),p.textNode=document.createTextNode(""),p.element.appendChild(p.textNode),this.element.appendChild(p.element),this.$cells[h]=p);var m="ace_gutter-cell ";l[g]&&(m+=l[g]),u[g]&&(m+=u[g]),this.$annotations[g]&&(m+=this.$annotations[g].className),p.element.className!=m&&(p.element.className=m);var v=t.getRowLength(g)*e.lineHeight+"px";if(v!=p.element.style.height&&(p.element.style.height=v),s){var b=s[g];null==b&&(b=s[g]=t.getFoldWidget(g))}if(b){p.foldWidget||(p.foldWidget=r.createElement("span"),p.element.appendChild(p.foldWidget));var m="ace_fold-widget ace_"+b;m+="start"==b&&g==a&&g<o.end.row?" ace_closed":" ace_open",p.foldWidget.className!=m&&(p.foldWidget.className=m);var v=e.lineHeight+"px";p.foldWidget.style.height!=v&&(p.foldWidget.style.height=v)}else p.foldWidget&&(p.element.removeChild(p.foldWidget),p.foldWidget=null);var y=d=f?f.getText(t,g):g+c;y!=p.textNode.data&&(p.textNode.data=y),g++}this.element.style.height=e.minHeight+"px",(this.$fixedWidth||t.$useWrapMode)&&(d=t.getLength()+c);var w=f?f.getWidth(t,d,e):d.toString().length*e.characterWidth,x=this.$padding||this.$computePadding();w+=x.left+x.right,w===this.gutterWidth||isNaN(w)||(this.gutterWidth=w,this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._emit("changeGutterWidth",w))},this.$fixedWidth=!1,this.$showLineNumbers=!0,this.$renderer="",this.setShowLineNumbers=function(e){this.$renderer=!e&&{getWidth:function(){return""},getText:function(){return""}}},this.getShowLineNumbers=function(){return this.$showLineNumbers},this.$showFoldWidgets=!0,this.setShowFoldWidgets=function(e){e?r.addCssClass(this.element,"ace_folding-enabled"):r.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=e,this.$padding=null},this.getShowFoldWidgets=function(){return this.$showFoldWidgets},this.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var e=r.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=parseInt(e.paddingLeft)+1||0,this.$padding.right=parseInt(e.paddingRight)||0,this.$padding},this.getRegion=function(e){var t=this.$padding||this.$computePadding(),n=this.element.getBoundingClientRect();return e.x<t.left+n.left?"markers":this.$showFoldWidgets&&e.x>n.right-t.right?"foldWidgets":void 0}}).call(s.prototype),t.Gutter=s}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(e,t,n){"use strict";var r=e("../range").Range,i=e("../lib/dom"),o=function(e){this.element=i.createElement("div"),this.element.className="ace_layer ace_marker-layer",e.appendChild(this.element)};(function(){function e(e,t,n,r){return(e?1:0)|(t?2:0)|(n?4:0)|(r?8:0)}this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setMarkers=function(e){this.markers=e},this.update=function(e){var e=e||this.config;if(e){this.config=e;var t=[];for(var n in this.markers){var r=this.markers[n];if(r.range){var i=r.range.clipRows(e.firstRow,e.lastRow);if(!i.isEmpty())if(i=i.toScreenRange(this.session),r.renderer){var o=this.$getTop(i.start.row,e),a=this.$padding+i.start.column*e.characterWidth;r.renderer(t,i,a,o,e)}else"fullLine"==r.type?this.drawFullLineMarker(t,i,r.clazz,e):"screenLine"==r.type?this.drawScreenLineMarker(t,i,r.clazz,e):i.isMultiLine()?"text"==r.type?this.drawTextMarker(t,i,r.clazz,e):this.drawMultiLineMarker(t,i,r.clazz,e):this.drawSingleLineMarker(t,i,r.clazz+" ace_start ace_br15",e)}else r.update(t,this,this.session,e)}this.element.innerHTML=t.join("")}},this.$getTop=function(e,t){return(e-t.firstRowScreen)*t.lineHeight},this.drawTextMarker=function(t,n,i,o,a){for(var s=this.session,l=n.start.row,u=n.end.row,c=l,d=0,f=0,p=s.getScreenLastRowColumn(c),h=new r(c,n.start.column,c,f);c<=u;c++)h.start.row=h.end.row=c,h.start.column=c==l?n.start.column:s.getRowWrapIndent(c),h.end.column=p,d=f,f=p,p=c+1<u?s.getScreenLastRowColumn(c+1):c==u?0:n.end.column,this.drawSingleLineMarker(t,h,i+(c==l?" ace_start":"")+" ace_br"+e(c==l||c==l+1&&n.start.column,d<f,f>p,c==u),o,c==u?0:1,a)},this.drawMultiLineMarker=function(e,t,n,r,i){var o=this.$padding,a=r.lineHeight,s=this.$getTop(t.start.row,r),l=o+t.start.column*r.characterWidth;i=i||"",e.push("<div class='",n," ace_br1 ace_start' style='","height:",a,"px;","right:0;","top:",s,"px;","left:",l,"px;",i,"'></div>"),s=this.$getTop(t.end.row,r);var u=t.end.column*r.characterWidth;if(e.push("<div class='",n," ace_br12' style='","height:",a,"px;","width:",u,"px;","top:",s,"px;","left:",o,"px;",i,"'></div>"),a=(t.end.row-t.start.row-1)*r.lineHeight,!(a<=0)){s=this.$getTop(t.start.row+1,r);var c=(t.start.column?1:0)|(t.end.column?0:8);e.push("<div class='",n,c?" ace_br"+c:"","' style='","height:",a,"px;","right:0;","top:",s,"px;","left:",o,"px;",i,"'></div>")}},this.drawSingleLineMarker=function(e,t,n,r,i,o){var a=r.lineHeight,s=(t.end.column+(i||0)-t.start.column)*r.characterWidth,l=this.$getTop(t.start.row,r),u=this.$padding+t.start.column*r.characterWidth;e.push("<div class='",n,"' style='","height:",a,"px;","width:",s,"px;","top:",l,"px;","left:",u,"px;",o||"","'></div>")},this.drawFullLineMarker=function(e,t,n,r,i){var o=this.$getTop(t.start.row,r),a=r.lineHeight;t.start.row!=t.end.row&&(a+=this.$getTop(t.end.row,r)-o),e.push("<div class='",n,"' style='","height:",a,"px;","top:",o,"px;","left:0;right:0;",i||"","'></div>")},this.drawScreenLineMarker=function(e,t,n,r,i){var o=this.$getTop(t.start.row,r),a=r.lineHeight;e.push("<div class='",n,"' style='","height:",a,"px;","top:",o,"px;","left:0;right:0;",i||"","'></div>")}}).call(o.prototype),t.Marker=o}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/dom"),o=e("../lib/lang"),a=(e("../lib/useragent"),e("../lib/event_emitter").EventEmitter),s=function(e){this.element=i.createElement("div"),this.element.className="ace_layer ace_text-layer",e.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this)};(function(){r.implement(this,a),this.EOF_CHAR="¶",this.EOL_CHAR_LF="¬",this.EOL_CHAR_CRLF="¤",this.EOL_CHAR=this.EOL_CHAR_LF,this.TAB_CHAR="—",this.SPACE_CHAR="·",this.$padding=0,this.$updateEolChar=function(){var e="\n"==this.session.doc.getNewLineCharacter()?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=e)return this.EOL_CHAR=e,!0},this.setPadding=function(e){this.$padding=e,this.element.style.padding="0 "+e+"px"},this.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},this.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},this.$setFontMetrics=function(e){this.$fontMetrics=e,this.$fontMetrics.on("changeCharacterSize",function(e){this._signal("changeCharacterSize",e)}.bind(this)),this.$pollSizeChanges()},this.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},this.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},this.setSession=function(e){this.session=e,e&&this.$computeTabString()},this.showInvisibles=!1,this.setShowInvisibles=function(e){return this.showInvisibles!=e&&(this.showInvisibles=e,this.$computeTabString(),!0)},this.displayIndentGuides=!0,this.setDisplayIndentGuides=function(e){return this.displayIndentGuides!=e&&(this.displayIndentGuides=e,this.$computeTabString(),!0)},this.$tabStrings=[],this.onChangeTabSize=this.$computeTabString=function(){var e=this.session.getTabSize();this.tabSize=e;for(var t=this.$tabStrings=[0],n=1;n<e+1;n++)this.showInvisibles?t.push("<span class='ace_invisible ace_invisible_tab'>"+o.stringRepeat(this.TAB_CHAR,n)+"</span>"):t.push(o.stringRepeat(" ",n));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var r="ace_indent-guide",i="",a="";if(this.showInvisibles){r+=" ace_invisible",i=" ace_invisible_space",a=" ace_invisible_tab";var s=o.stringRepeat(this.SPACE_CHAR,this.tabSize),l=o.stringRepeat(this.TAB_CHAR,this.tabSize)}else var s=o.stringRepeat(" ",this.tabSize),l=s;this.$tabStrings[" "]="<span class='"+r+i+"'>"+s+"</span>",this.$tabStrings["\t"]="<span class='"+r+a+"'>"+l+"</span>"}},this.updateLines=function(e,t,n){this.config.lastRow==e.lastRow&&this.config.firstRow==e.firstRow||this.scrollLines(e),this.config=e;for(var r=Math.max(t,e.firstRow),i=Math.min(n,e.lastRow),o=this.element.childNodes,a=0,s=e.firstRow;s<r;s++){var l=this.session.getFoldLine(s);if(l){if(l.containsRow(r)){r=l.start.row;break}s=l.end.row}a++}for(var s=r,l=this.session.getNextFoldLine(s),u=l?l.start.row:1/0;;){if(s>u&&(s=l.end.row+1,l=this.session.getNextFoldLine(s,l),u=l?l.start.row:1/0),s>i)break;var c=o[a++];if(c){var d=[];this.$renderLine(d,s,!this.$useLineGroups(),s==u&&l),c.style.height=e.lineHeight*this.session.getRowLength(s)+"px",c.innerHTML=d.join("")}s++}},this.scrollLines=function(e){var t=this.config;if(this.config=e,!t||t.lastRow<e.firstRow)return this.update(e);if(e.lastRow<t.firstRow)return this.update(e);var n=this.element;if(t.firstRow<e.firstRow)for(var r=this.session.getFoldedRowCount(t.firstRow,e.firstRow-1);r>0;r--)n.removeChild(n.firstChild);if(t.lastRow>e.lastRow)for(var r=this.session.getFoldedRowCount(e.lastRow+1,t.lastRow);r>0;r--)n.removeChild(n.lastChild);if(e.firstRow<t.firstRow){var i=this.$renderLinesFragment(e,e.firstRow,t.firstRow-1);n.firstChild?n.insertBefore(i,n.firstChild):n.appendChild(i)}if(e.lastRow>t.lastRow){var i=this.$renderLinesFragment(e,t.lastRow+1,e.lastRow);n.appendChild(i)}},this.$renderLinesFragment=function(e,t,n){for(var r=this.element.ownerDocument.createDocumentFragment(),o=t,a=this.session.getNextFoldLine(o),s=a?a.start.row:1/0;;){if(o>s&&(o=a.end.row+1,a=this.session.getNextFoldLine(o,a),s=a?a.start.row:1/0),o>n)break;var l=i.createElement("div"),u=[];if(this.$renderLine(u,o,!1,o==s&&a),l.innerHTML=u.join(""),this.$useLineGroups())l.className="ace_line_group",r.appendChild(l),l.style.height=e.lineHeight*this.session.getRowLength(o)+"px";else for(;l.firstChild;)r.appendChild(l.firstChild);o++}return r},this.update=function(e){this.config=e;for(var t=[],n=e.firstRow,r=e.lastRow,i=n,o=this.session.getNextFoldLine(i),a=o?o.start.row:1/0;;){if(i>a&&(i=o.end.row+1,
o=this.session.getNextFoldLine(i,o),a=o?o.start.row:1/0),i>r)break;this.$useLineGroups()&&t.push("<div class='ace_line_group' style='height:",e.lineHeight*this.session.getRowLength(i),"px'>"),this.$renderLine(t,i,!1,i==a&&o),this.$useLineGroups()&&t.push("</div>"),i++}this.element.innerHTML=t.join("")},this.$textToken={text:!0,rparen:!0,lparen:!0},this.$renderToken=function(e,t,n,r){var i=this,a=/\t|&|<|>|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\u3000\uFEFF\uFFF9-\uFFFC])|[\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3000-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]/g,s=function(e,n,r,a,s){if(n)return i.showInvisibles?"<span class='ace_invisible ace_invisible_space'>"+o.stringRepeat(i.SPACE_CHAR,e.length)+"</span>":e;if("&"==e)return"&#38;";if("<"==e)return"&#60;";if(">"==e)return"&#62;";if("\t"==e){var l=i.session.getScreenTabSize(t+a);return t+=l-1,i.$tabStrings[l]}if("　"==e){var u=i.showInvisibles?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",c=i.showInvisibles?i.SPACE_CHAR:"";return t+=1,"<span class='"+u+"' style='width:"+2*i.config.characterWidth+"px'>"+c+"</span>"}return r?"<span class='ace_invisible ace_invisible_space ace_invalid'>"+i.SPACE_CHAR+"</span>":(t+=1,"<span class='ace_cjk' style='width:"+2*i.config.characterWidth+"px'>"+e+"</span>")},l=r.replace(a,s);if(this.$textToken[n.type])e.push(l);else{var u="ace_"+n.type.replace(/\./g," ace_"),c="";"fold"==n.type&&(c=" style='width:"+n.value.length*this.config.characterWidth+"px;' "),e.push("<span class='",u,"'",c,">",l,"</span>")}return t+r.length},this.renderIndentGuide=function(e,t,n){var r=t.search(this.$indentGuideRe);return r<=0||r>=n?t:" "==t[0]?(r-=r%this.tabSize,e.push(o.stringRepeat(this.$tabStrings[" "],r/this.tabSize)),t.substr(r)):"\t"==t[0]?(e.push(o.stringRepeat(this.$tabStrings["\t"],r)),t.substr(r)):t},this.$renderWrappedLine=function(e,t,n,r){for(var i=0,a=0,s=n[0],l=0,u=0;u<t.length;u++){var c=t[u],d=c.value;if(0==u&&this.displayIndentGuides){if(i=d.length,d=this.renderIndentGuide(e,d,s),!d)continue;i-=d.length}if(i+d.length<s)l=this.$renderToken(e,l,c,d),i+=d.length;else{for(;i+d.length>=s;)l=this.$renderToken(e,l,c,d.substring(0,s-i)),d=d.substring(s-i),i=s,r||e.push("</div>","<div class='ace_line' style='height:",this.config.lineHeight,"px'>"),e.push(o.stringRepeat(" ",n.indent)),a++,l=0,s=n[a]||Number.MAX_VALUE;0!=d.length&&(i+=d.length,l=this.$renderToken(e,l,c,d))}}},this.$renderSimpleLine=function(e,t){var n=0,r=t[0],i=r.value;this.displayIndentGuides&&(i=this.renderIndentGuide(e,i)),i&&(n=this.$renderToken(e,n,r,i));for(var o=1;o<t.length;o++)r=t[o],i=r.value,n=this.$renderToken(e,n,r,i)},this.$renderLine=function(e,t,n,r){if(r||0==r||(r=this.session.getFoldLine(t)),r)var i=this.$getFoldLineTokens(t,r);else var i=this.session.getTokens(t);if(n||e.push("<div class='ace_line' style='height:",this.config.lineHeight*(this.$useLineGroups()?1:this.session.getRowLength(t)),"px'>"),i.length){var o=this.session.getRowSplitData(t);o&&o.length?this.$renderWrappedLine(e,i,o,n):this.$renderSimpleLine(e,i)}this.showInvisibles&&(r&&(t=r.end.row),e.push("<span class='ace_invisible ace_invisible_eol'>",t==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,"</span>")),n||e.push("</div>")},this.$getFoldLineTokens=function(e,t){function n(e,t,n){for(var r=0,o=0;o+e[r].value.length<t;)if(o+=e[r].value.length,r++,r==e.length)return;if(o!=t){var a=e[r].value.substring(t-o);a.length>n-t&&(a=a.substring(0,n-t)),i.push({type:e[r].type,value:a}),o=t+a.length,r+=1}for(;o<n&&r<e.length;){var a=e[r].value;a.length+o>n?i.push({type:e[r].type,value:a.substring(0,n-o)}):i.push(e[r]),o+=a.length,r+=1}}var r=this.session,i=[],o=r.getTokens(e);return t.walk(function(e,t,a,s,l){null!=e?i.push({type:"fold",value:e}):(l&&(o=r.getTokens(t)),o.length&&n(o,s,a))},t.end.row,this.session.getLine(t.end.row).length),i},this.$useLineGroups=function(){return this.session.getUseWrapMode()},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$measureNode&&this.$measureNode.parentNode.removeChild(this.$measureNode),delete this.$measureNode}}).call(s.prototype),t.Text=s}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(e,t,n){"use strict";var r,i=e("../lib/dom"),o=function(e){this.element=i.createElement("div"),this.element.className="ace_layer ace_cursor-layer",e.appendChild(this.element),void 0===r&&(r=!("opacity"in this.element.style)),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),i.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=(r?this.$updateVisibility:this.$updateOpacity).bind(this)};(function(){this.$updateVisibility=function(e){for(var t=this.cursors,n=t.length;n--;)t[n].style.visibility=e?"":"hidden"},this.$updateOpacity=function(e){for(var t=this.cursors,n=t.length;n--;)t[n].style.opacity=e?"":"0"},this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setBlinking=function(e){e!=this.isBlinking&&(this.isBlinking=e,this.restartTimer())},this.setBlinkInterval=function(e){e!=this.blinkInterval&&(this.blinkInterval=e,this.restartTimer())},this.setSmoothBlinking=function(e){e==this.smoothBlinking||r||(this.smoothBlinking=e,i.setCssClass(this.element,"ace_smooth-blinking",e),this.$updateCursors(!0),this.$updateCursors=this.$updateOpacity.bind(this),this.restartTimer())},this.addCursor=function(){var e=i.createElement("div");return e.className="ace_cursor",this.element.appendChild(e),this.cursors.push(e),e},this.removeCursor=function(){if(this.cursors.length>1){var e=this.cursors.pop();return e.parentNode.removeChild(e),e}},this.hideCursor=function(){this.isVisible=!1,i.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.showCursor=function(){this.isVisible=!0,i.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.restartTimer=function(){var e=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.smoothBlinking&&i.removeCssClass(this.element,"ace_smooth-blinking"),e(!0),this.isBlinking&&this.blinkInterval&&this.isVisible){this.smoothBlinking&&setTimeout(function(){i.addCssClass(this.element,"ace_smooth-blinking")}.bind(this));var t=function(){this.timeoutId=setTimeout(function(){e(!1)},.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval(function(){e(!0),t()},this.blinkInterval),t()}},this.getPixelPosition=function(e,t){if(!this.config||!this.session)return{left:0,top:0};e||(e=this.session.selection.getCursor());var n=this.session.documentToScreenPosition(e),r=this.$padding+n.column*this.config.characterWidth,i=(n.row-(t?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:r,top:i}},this.update=function(e){this.config=e;var t=this.session.$selectionMarkers,n=0,r=0;void 0!==t&&0!==t.length||(t=[{cursor:null}]);for(var n=0,i=t.length;n<i;n++){var o=this.getPixelPosition(t[n].cursor,!0);if(!((o.top>e.height+e.offset||o.top<0)&&n>1)){var a=(this.cursors[r++]||this.addCursor()).style;this.drawCursor?this.drawCursor(a,o,e,t[n],this.session):(a.left=o.left+"px",a.top=o.top+"px",a.width=e.characterWidth+"px",a.height=e.lineHeight+"px")}}for(;this.cursors.length>r;)this.removeCursor();var s=this.session.getOverwrite();this.$setOverwrite(s),this.$pixelPos=o,this.restartTimer()},this.drawCursor=null,this.$setOverwrite=function(e){e!=this.overwrite&&(this.overwrite=e,e?i.addCssClass(this.element,"ace_overwrite-cursors"):i.removeCssClass(this.element,"ace_overwrite-cursors"))},this.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)}}).call(o.prototype),t.Cursor=o}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./lib/dom"),o=e("./lib/event"),a=e("./lib/event_emitter").EventEmitter,s=function(e){this.element=i.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+this.classSuffix,this.inner=i.createElement("div"),this.inner.className="ace_scrollbar-inner",this.element.appendChild(this.inner),e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,o.addListener(this.element,"scroll",this.onScroll.bind(this)),o.addListener(this.element,"mousedown",o.preventDefault)};(function(){r.implement(this,a),this.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e}}).call(s.prototype);var l=function(e,t){s.call(this,e),this.scrollTop=0,t.$scrollbarWidth=this.width=i.scrollbarWidth(e.ownerDocument),this.inner.style.width=this.element.style.width=(this.width||15)+5+"px"};r.inherits(l,s),function(){this.classSuffix="-v",this.onScroll=function(){this.skipEvent||(this.scrollTop=this.element.scrollTop,this._emit("scroll",{data:this.scrollTop})),this.skipEvent=!1},this.getWidth=function(){return this.isVisible?this.width:0},this.setHeight=function(e){this.element.style.height=e+"px"},this.setInnerHeight=function(e){this.inner.style.height=e+"px"},this.setScrollHeight=function(e){this.inner.style.height=e+"px"},this.setScrollTop=function(e){this.scrollTop!=e&&(this.skipEvent=!0,this.scrollTop=this.element.scrollTop=e)}}.call(l.prototype);var u=function(e,t){s.call(this,e),this.scrollLeft=0,this.height=t.$scrollbarWidth,this.inner.style.height=this.element.style.height=(this.height||15)+5+"px"};r.inherits(u,s),function(){this.classSuffix="-h",this.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},this.getHeight=function(){return this.isVisible?this.height:0},this.setWidth=function(e){this.element.style.width=e+"px"},this.setInnerWidth=function(e){this.inner.style.width=e+"px"},this.setScrollWidth=function(e){this.inner.style.width=e+"px"},this.setScrollLeft=function(e){this.scrollLeft!=e&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=e)}}.call(u.prototype),t.ScrollBar=l,t.ScrollBarV=l,t.ScrollBarH=u,t.VScrollBar=l,t.HScrollBar=u}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(e,t,n){"use strict";var r=e("./lib/event"),i=function(e,t){this.onRender=e,this.pending=!1,this.changes=0,this.window=t||window};(function(){this.schedule=function(e){if(this.changes=this.changes|e,!this.pending&&this.changes){this.pending=!0;var t=this;r.nextFrame(function(){t.pending=!1;for(var e;e=t.changes;)t.changes=0,t.onRender(e)},this.window)}}}).call(i.prototype),t.RenderLoop=i}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"],function(e,t,n){var r=e("../lib/oop"),i=e("../lib/dom"),o=e("../lib/lang"),a=e("../lib/useragent"),s=e("../lib/event_emitter").EventEmitter,l=0,u=t.FontMetrics=function(e,t){this.el=i.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=i.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=i.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),e.appendChild(this.el),l||this.$testFractionalRect(),this.$measureNode.innerHTML=o.stringRepeat("X",l),this.$characterSize={width:0,height:0},this.checkForSizeChanges()};(function(){r.implement(this,s),this.$characterSize={width:0,height:0},this.$testFractionalRect=function(){var e=i.createElement("div");this.$setMeasureNodeStyles(e.style),e.style.width="0.2px",document.documentElement.appendChild(e);var t=e.getBoundingClientRect().width;l=t>0&&t<1?50:100,e.parentNode.removeChild(e)},this.$setMeasureNodeStyles=function(e,t){e.width=e.height="auto",e.left=e.top="0px",e.visibility="hidden",e.position="absolute",e.whiteSpace="pre",a.isIE<8?e["font-family"]="inherit":e.font="inherit",e.overflow=t?"hidden":"visible"},this.checkForSizeChanges=function(){var e=this.$measureSizes();if(e&&(this.$characterSize.width!==e.width||this.$characterSize.height!==e.height)){this.$measureNode.style.fontWeight="bold";var t=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=e,this.charSizes=Object.create(null),this.allowBoldFonts=t&&t.width===e.width&&t.height===e.height,this._emit("changeCharacterSize",{data:e})}},this.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer)return this.$pollSizeChangesTimer;var e=this;return this.$pollSizeChangesTimer=setInterval(function(){e.checkForSizeChanges()},500)},this.setPolling=function(e){e?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},this.$measureSizes=function(){if(50===l){var e=null;try{e=this.$measureNode.getBoundingClientRect()}catch(t){e={width:0,height:0}}var n={height:e.height,width:e.width/l}}else var n={height:this.$measureNode.clientHeight,width:this.$measureNode.clientWidth/l};return 0===n.width||0===n.height?null:n},this.$measureCharWidth=function(e){this.$main.innerHTML=o.stringRepeat(e,l);var t=this.$main.getBoundingClientRect();return t.width/l},this.getCharacterWidth=function(e){var t=this.charSizes[e];return void 0===t&&(t=this.charSizes[e]=this.$measureCharWidth(e)/this.$characterSize.width),t},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)}}).call(u.prototype)}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/config","ace/lib/useragent","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter"],function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./lib/dom"),o=e("./config"),a=e("./lib/useragent"),s=e("./layer/gutter").Gutter,l=e("./layer/marker").Marker,u=e("./layer/text").Text,c=e("./layer/cursor").Cursor,d=e("./scrollbar").HScrollBar,f=e("./scrollbar").VScrollBar,p=e("./renderloop").RenderLoop,h=e("./layer/font_metrics").FontMetrics,g=e("./lib/event_emitter").EventEmitter,m='.ace_editor {\tposition: relative;\toverflow: hidden;\tfont: 12px/normal \'Monaco\', \'Menlo\', \'Ubuntu Mono\', \'Consolas\', \'source-code-pro\', monospace;\tdirection: ltr;\t}\t.ace_scroller {\tposition: absolute;\toverflow: hidden;\ttop: 0;\tbottom: 0;\tbackground-color: inherit;\t-ms-user-select: none;\t-moz-user-select: none;\t-webkit-user-select: none;\tuser-select: none;\tcursor: text;\t}\t.ace_content {\tposition: absolute;\t-moz-box-sizing: border-box;\t-webkit-box-sizing: border-box;\tbox-sizing: border-box;\tmin-width: 100%;\t}\t.ace_dragging .ace_scroller:before{\tposition: absolute;\ttop: 0;\tleft: 0;\tright: 0;\tbottom: 0;\tcontent: \'\';\tbackground: rgba(250, 250, 250, 0.01);\tz-index: 1000;\t}\t.ace_dragging.ace_dark .ace_scroller:before{\tbackground: rgba(0, 0, 0, 0.01);\t}\t.ace_selecting, .ace_selecting * {\tcursor: text !important;\t}\t.ace_gutter {\tposition: absolute;\toverflow : hidden;\twidth: auto;\ttop: 0;\tbottom: 0;\tleft: 0;\tcursor: default;\tz-index: 4;\t-ms-user-select: none;\t-moz-user-select: none;\t-webkit-user-select: none;\tuser-select: none;\t}\t.ace_gutter-active-line {\tposition: absolute;\tleft: 0;\tright: 0;\t}\t.ace_scroller.ace_scroll-left {\tbox-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;\t}\t.ace_gutter-cell {\tpadding-left: 19px;\tpadding-right: 6px;\tbackground-repeat: no-repeat;\t}\t.ace_gutter-cell.ace_error {\tbackground-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");\tbackground-repeat: no-repeat;\tbackground-position: 2px center;\t}\t.ace_gutter-cell.ace_warning {\tbackground-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");\tbackground-position: 2px center;\t}\t.ace_gutter-cell.ace_info {\tbackground-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");\tbackground-position: 2px center;\t}\t.ace_dark .ace_gutter-cell.ace_info {\tbackground-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");\t}\t.ace_scrollbar {\tposition: absolute;\tright: 0;\tbottom: 0;\tz-index: 6;\t}\t.ace_scrollbar-inner {\tposition: absolute;\tcursor: text;\tleft: 0;\ttop: 0;\t}\t.ace_scrollbar-v{\toverflow-x: hidden;\toverflow-y: scroll;\ttop: 0;\t}\t.ace_scrollbar-h {\toverflow-x: scroll;\toverflow-y: hidden;\tleft: 0;\t}\t.ace_print-margin {\tposition: absolute;\theight: 100%;\t}\t.ace_text-input {\tposition: absolute;\tz-index: 0;\twidth: 0.5em;\theight: 1em;\topacity: 0;\tbackground: transparent;\t-moz-appearance: none;\tappearance: none;\tborder: none;\tresize: none;\toutline: none;\toverflow: hidden;\tfont: inherit;\tpadding: 0 1px;\tmargin: 0 -1px;\ttext-indent: -1em;\t-ms-user-select: text;\t-moz-user-select: text;\t-webkit-user-select: text;\tuser-select: text;\twhite-space: pre!important;\t}\t.ace_text-input.ace_composition {\tbackground: inherit;\tcolor: inherit;\tz-index: 1000;\topacity: 1;\ttext-indent: 0;\t}\t.ace_layer {\tz-index: 1;\tposition: absolute;\toverflow: hidden;\tword-wrap: normal;\twhite-space: pre;\theight: 100%;\twidth: 100%;\t-moz-box-sizing: border-box;\t-webkit-box-sizing: border-box;\tbox-sizing: border-box;\tpointer-events: none;\t}\t.ace_gutter-layer {\tposition: relative;\twidth: auto;\ttext-align: right;\tpointer-events: auto;\t}\t.ace_text-layer {\tfont: inherit !important;\t}\t.ace_cjk {\tdisplay: inline-block;\ttext-align: center;\t}\t.ace_cursor-layer {\tz-index: 4;\t}\t.ace_cursor {\tz-index: 4;\tposition: absolute;\t-moz-box-sizing: border-box;\t-webkit-box-sizing: border-box;\tbox-sizing: border-box;\tborder-left: 2px solid;\ttransform: translatez(0);\t}\t.ace_slim-cursors .ace_cursor {\tborder-left-width: 1px;\t}\t.ace_overwrite-cursors .ace_cursor {\tborder-left-width: 0;\tborder-bottom: 1px solid;\t}\t.ace_hidden-cursors .ace_cursor {\topacity: 0.2;\t}\t.ace_smooth-blinking .ace_cursor {\t-webkit-transition: opacity 0.18s;\ttransition: opacity 0.18s;\t}\t.ace_editor.ace_multiselect .ace_cursor {\tborder-left-width: 1px;\t}\t.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {\tposition: absolute;\tz-index: 3;\t}\t.ace_marker-layer .ace_selection {\tposition: absolute;\tz-index: 5;\t}\t.ace_marker-layer .ace_bracket {\tposition: absolute;\tz-index: 6;\t}\t.ace_marker-layer .ace_active-line {\tposition: absolute;\tz-index: 2;\t}\t.ace_marker-layer .ace_selected-word {\tposition: absolute;\tz-index: 4;\t-moz-box-sizing: border-box;\t-webkit-box-sizing: border-box;\tbox-sizing: border-box;\t}\t.ace_line .ace_fold {\t-moz-box-sizing: border-box;\t-webkit-box-sizing: border-box;\tbox-sizing: border-box;\tdisplay: inline-block;\theight: 11px;\tmargin-top: -2px;\tvertical-align: middle;\tbackground-image:\turl("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),\turl("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");\tbackground-repeat: no-repeat, repeat-x;\tbackground-position: center center, top left;\tcolor: transparent;\tborder: 1px solid black;\tborder-radius: 2px;\tcursor: pointer;\tpointer-events: auto;\t}\t.ace_dark .ace_fold {\t}\t.ace_fold:hover{\tbackground-image:\turl("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),\turl("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");\t}\t.ace_tooltip {\tbackground-color: #FFF;\tbackground-image: -webkit-linear-gradient(top, transparent, rgba(0, 0, 0, 0.1));\tbackground-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));\tborder: 1px solid gray;\tborder-radius: 1px;\tbox-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);\tcolor: black;\tmax-width: 100%;\tpadding: 3px 4px;\tposition: fixed;\tz-index: 999999;\t-moz-box-sizing: border-box;\t-webkit-box-sizing: border-box;\tbox-sizing: border-box;\tcursor: default;\twhite-space: pre;\tword-wrap: break-word;\tline-height: normal;\tfont-style: normal;\tfont-weight: normal;\tletter-spacing: normal;\tpointer-events: none;\t}\t.ace_folding-enabled > .ace_gutter-cell {\tpadding-right: 13px;\t}\t.ace_fold-widget {\t-moz-box-sizing: border-box;\t-webkit-box-sizing: border-box;\tbox-sizing: border-box;\tmargin: 0 -12px 0 1px;\tdisplay: none;\twidth: 11px;\tvertical-align: top;\tbackground-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");\tbackground-repeat: no-repeat;\tbackground-position: center;\tborder-radius: 3px;\tborder: 1px solid transparent;\tcursor: pointer;\t}\t.ace_folding-enabled .ace_fold-widget {\tdisplay: inline-block;   \t}\t.ace_fold-widget.ace_end {\tbackground-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");\t}\t.ace_fold-widget.ace_closed {\tbackground-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");\t}\t.ace_fold-widget:hover {\tborder: 1px solid rgba(0, 0, 0, 0.3);\tbackground-color: rgba(255, 255, 255, 0.2);\tbox-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);\t}\t.ace_fold-widget:active {\tborder: 1px solid rgba(0, 0, 0, 0.4);\tbackground-color: rgba(0, 0, 0, 0.05);\tbox-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);\t}\t.ace_dark .ace_fold-widget {\tbackground-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");\t}\t.ace_dark .ace_fold-widget.ace_end {\tbackground-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");\t}\t.ace_dark .ace_fold-widget.ace_closed {\tbackground-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");\t}\t.ace_dark .ace_fold-widget:hover {\tbox-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\tbackground-color: rgba(255, 255, 255, 0.1);\t}\t.ace_dark .ace_fold-widget:active {\tbox-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\t}\t.ace_fold-widget.ace_invalid {\tbackground-color: #FFB4B4;\tborder-color: #DE5555;\t}\t.ace_fade-fold-widgets .ace_fold-widget {\t-webkit-transition: opacity 0.4s ease 0.05s;\ttransition: opacity 0.4s ease 0.05s;\topacity: 0;\t}\t.ace_fade-fold-widgets:hover .ace_fold-widget {\t-webkit-transition: opacity 0.05s ease 0.05s;\ttransition: opacity 0.05s ease 0.05s;\topacity:1;\t}\t.ace_underline {\ttext-decoration: underline;\t}\t.ace_bold {\tfont-weight: bold;\t}\t.ace_nobold .ace_bold {\tfont-weight: normal;\t}\t.ace_italic {\tfont-style: italic;\t}\t.ace_error-marker {\tbackground-color: rgba(255, 0, 0,0.2);\tposition: absolute;\tz-index: 9;\t}\t.ace_highlight-marker {\tbackground-color: rgba(255, 255, 0,0.2);\tposition: absolute;\tz-index: 8;\t}\t.ace_br1 {border-top-left-radius    : 3px;}\t.ace_br2 {border-top-right-radius   : 3px;}\t.ace_br3 {border-top-left-radius    : 3px; border-top-right-radius:    3px;}\t.ace_br4 {border-bottom-right-radius: 3px;}\t.ace_br5 {border-top-left-radius    : 3px; border-bottom-right-radius: 3px;}\t.ace_br6 {border-top-right-radius   : 3px; border-bottom-right-radius: 3px;}\t.ace_br7 {border-top-left-radius    : 3px; border-top-right-radius:    3px; border-bottom-right-radius: 3px;}\t.ace_br8 {border-bottom-left-radius : 3px;}\t.ace_br9 {border-top-left-radius    : 3px; border-bottom-left-radius:  3px;}\t.ace_br10{border-top-right-radius   : 3px; border-bottom-left-radius:  3px;}\t.ace_br11{border-top-left-radius    : 3px; border-top-right-radius:    3px; border-bottom-left-radius:  3px;}\t.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius:  3px;}\t.ace_br13{border-top-left-radius    : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius:  3px;}\t.ace_br14{border-top-right-radius   : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius:  3px;}\t.ace_br15{border-top-left-radius    : 3px; border-top-right-radius:    3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\t';i.importCssString(m,"ace_editor.css");var v=function(e,t){var n=this;this.container=e||i.createElement("div"),this.$keepTextAreaAtCursor=!a.isOldIE,i.addCssClass(this.container,"ace_editor"),this.setTheme(t),this.$gutter=i.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.scroller=i.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=i.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new s(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new l(this.content);var r=this.$textLayer=new u(this.content);this.canvas=r.element,this.$markerFront=new l(this.content),this.$cursorLayer=new c(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new f(this.container,this),this.scrollBarH=new d(this.container,this),this.scrollBarV.addEventListener("scroll",function(e){n.$scrollAnimation||n.session.setScrollTop(e.data-n.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(e){n.$scrollAnimation||n.session.setScrollLeft(e.data-n.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new h(this.container,500),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.addEventListener("changeCharacterSize",function(e){n.updateCharacterSize(),n.onResize(!0,n.gutterWidth,n.$size.width,n.$size.height),n._signal("changeCharacterSize",e)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$loop=new p(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),o.resetOptions(this),o._emit("renderer",this)};(function(){this.CHANGE_CURSOR=1,this.CHANGE_MARKER=2,this.CHANGE_GUTTER=4,this.CHANGE_SCROLL=8,this.CHANGE_LINES=16,this.CHANGE_TEXT=32,this.CHANGE_SIZE=64,this.CHANGE_MARKER_BACK=128,this.CHANGE_MARKER_FRONT=256,this.CHANGE_FULL=512,this.CHANGE_H_SCROLL=1024,r.implement(this,g),this.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin()},this.setSession=function(e){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=e,e&&this.scrollMargin.top&&e.getScrollTop()<=0&&e.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(e),this.$markerBack.setSession(e),this.$markerFront.setSession(e),this.$gutterLayer.setSession(e),this.$textLayer.setSession(e),e&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},this.updateLines=function(e,t,n){if(void 0===t&&(t=1/0),this.$changedLines?(this.$changedLines.firstRow>e&&(this.$changedLines.firstRow=e),this.$changedLines.lastRow<t&&(this.$changedLines.lastRow=t)):this.$changedLines={firstRow:e,lastRow:t},this.$changedLines.lastRow<this.layerConfig.firstRow){if(!n)return;this.$changedLines.lastRow=this.layerConfig.lastRow}this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},this.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar()},this.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},this.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},this.updateFull=function(e){e?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},this.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},this.$changes=0,this.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},this.onResize=function(e,t,n,r){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=e?1:0;var i=this.container;r||(r=i.clientHeight||i.scrollHeight),n||(n=i.clientWidth||i.scrollWidth);var o=this.$updateCachedSize(e,t,n,r);if(!this.$size.scrollerHeight||!n&&!r)return this.resizing=0;e&&(this.$gutterLayer.$padding=null),
e?this.$renderChanges(o|this.$changes,!0):this.$loop.schedule(o|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarV.scrollLeft=this.scrollBarV.scrollTop=null}},this.$updateCachedSize=function(e,t,n,r){r-=this.$extraHeight||0;var i=0,o=this.$size,a={width:o.width,height:o.height,scrollerHeight:o.scrollerHeight,scrollerWidth:o.scrollerWidth};return r&&(e||o.height!=r)&&(o.height=r,i|=this.CHANGE_SIZE,o.scrollerHeight=o.height,this.$horizScroll&&(o.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",i|=this.CHANGE_SCROLL),n&&(e||o.width!=n)&&(i|=this.CHANGE_SIZE,o.width=n,null==t&&(t=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=t,this.scrollBarH.element.style.left=this.scroller.style.left=t+"px",o.scrollerWidth=Math.max(0,n-t-this.scrollBarV.getWidth()),this.scrollBarH.element.style.right=this.scroller.style.right=this.scrollBarV.getWidth()+"px",this.scroller.style.bottom=this.scrollBarH.getHeight()+"px",(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||e)&&(i|=this.CHANGE_FULL)),o.$dirty=!n||!r,i&&this._signal("resize",a),i},this.onGutterResize=function(){var e=this.$showGutter?this.$gutter.offsetWidth:0;e!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,e,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):(this.$computeLayerConfig(),this.$loop.schedule(this.CHANGE_MARKER))},this.adjustWrapLimit=function(){var e=this.$size.scrollerWidth-2*this.$padding,t=Math.floor(e/this.characterWidth);return this.session.adjustWrapLimit(t,this.$showPrintMargin&&this.$printMarginColumn)},this.setAnimatedScroll=function(e){this.setOption("animatedScroll",e)},this.getAnimatedScroll=function(){return this.$animatedScroll},this.setShowInvisibles=function(e){this.setOption("showInvisibles",e)},this.getShowInvisibles=function(){return this.getOption("showInvisibles")},this.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},this.setDisplayIndentGuides=function(e){this.setOption("displayIndentGuides",e)},this.setShowPrintMargin=function(e){this.setOption("showPrintMargin",e)},this.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},this.setPrintMarginColumn=function(e){this.setOption("printMarginColumn",e)},this.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},this.getShowGutter=function(){return this.getOption("showGutter")},this.setShowGutter=function(e){return this.setOption("showGutter",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.$updateGutterLineHighlight=function(){var e=this.$cursorLayer.$pixelPos,t=this.layerConfig.lineHeight;if(this.session.getUseWrapMode()){var n=this.session.selection.getCursor();n.column=0,e=this.$cursorLayer.getPixelPosition(n,!0),t*=this.session.getRowLength(n.row)}this.$gutterLineHighlight.style.top=e.top-this.layerConfig.offset+"px",this.$gutterLineHighlight.style.height=t+"px"},this.$updatePrintMargin=function(){if(this.$showPrintMargin||this.$printMarginEl){if(!this.$printMarginEl){var e=i.createElement("div");e.className="ace_layer ace_print-margin-layer",this.$printMarginEl=i.createElement("div"),this.$printMarginEl.className="ace_print-margin",e.appendChild(this.$printMarginEl),this.content.insertBefore(e,this.content.firstChild)}var t=this.$printMarginEl.style;t.left=this.characterWidth*this.$printMarginColumn+this.$padding+"px",t.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},this.getContainerElement=function(){return this.container},this.getMouseEventTarget=function(){return this.scroller},this.getTextAreaContainer=function(){return this.container},this.$moveTextAreaToCursor=function(){if(this.$keepTextAreaAtCursor){var e=this.layerConfig,t=this.$cursorLayer.$pixelPos.top,n=this.$cursorLayer.$pixelPos.left;t-=e.offset;var r=this.textarea.style,i=this.lineHeight;if(t<0||t>e.height-i)return void(r.top=r.left="0");var o=this.characterWidth;if(this.$composition){var a=this.textarea.value.replace(/^\x01+/,"");o*=this.session.$getStringScreenWidth(a)[0]+2,i+=2}n-=this.scrollLeft,n>this.$size.scrollerWidth-o&&(n=this.$size.scrollerWidth-o),n+=this.gutterWidth,r.height=i+"px",r.width=o+"px",r.left=Math.min(n,this.$size.scrollerWidth-o)+"px",r.top=Math.min(t,this.$size.height-i)+"px"}},this.getFirstVisibleRow=function(){return this.layerConfig.firstRow},this.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(0===this.layerConfig.offset?0:1)},this.getLastFullyVisibleRow=function(){var e=Math.floor((this.layerConfig.height+this.layerConfig.offset)/this.layerConfig.lineHeight);return this.layerConfig.firstRow-1+e},this.getLastVisibleRow=function(){return this.layerConfig.lastRow},this.$padding=null,this.setPadding=function(e){this.$padding=e,this.$textLayer.setPadding(e),this.$cursorLayer.setPadding(e),this.$markerFront.setPadding(e),this.$markerBack.setPadding(e),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},this.setScrollMargin=function(e,t,n,r){var i=this.scrollMargin;i.top=0|e,i.bottom=0|t,i.right=0|r,i.left=0|n,i.v=i.top+i.bottom,i.h=i.left+i.right,i.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-i.top),this.updateFull()},this.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},this.setHScrollBarAlwaysVisible=function(e){this.setOption("hScrollBarAlwaysVisible",e)},this.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},this.setVScrollBarAlwaysVisible=function(e){this.setOption("vScrollBarAlwaysVisible",e)},this.$updateScrollBarV=function(){var e=this.layerConfig.maxHeight,t=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(e-=(t-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>e-t&&(e=this.scrollTop+t,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(e+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},this.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},this.$frozen=!1,this.freeze=function(){this.$frozen=!0},this.unfreeze=function(){this.$frozen=!1},this.$renderChanges=function(e,t){if(this.$changes&&(e|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!e&&!t)return void(this.$changes|=e);if(this.$size.$dirty)return this.$changes|=e,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender");var n=this.layerConfig;if(e&this.CHANGE_FULL||e&this.CHANGE_SIZE||e&this.CHANGE_TEXT||e&this.CHANGE_LINES||e&this.CHANGE_SCROLL||e&this.CHANGE_H_SCROLL){if(e|=this.$computeLayerConfig(),n.firstRow!=this.layerConfig.firstRow&&n.firstRowScreen==this.layerConfig.firstRowScreen){var r=this.scrollTop+(n.firstRow-this.layerConfig.firstRow)*this.lineHeight;r>0&&(this.scrollTop=r,e|=this.CHANGE_SCROLL,e|=this.$computeLayerConfig())}n=this.layerConfig,this.$updateScrollBarV(),e&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),this.$gutterLayer.element.style.marginTop=-n.offset+"px",this.content.style.marginTop=-n.offset+"px",this.content.style.width=n.width+2*this.$padding+"px",this.content.style.height=n.minHeight+"px"}return e&this.CHANGE_H_SCROLL&&(this.content.style.marginLeft=-this.scrollLeft+"px",this.scroller.className=this.scrollLeft<=0?"ace_scroller":"ace_scroller ace_scroll-left"),e&this.CHANGE_FULL?(this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),this.$highlightGutterLine&&this.$updateGutterLineHighlight(),void this._signal("afterRender")):e&this.CHANGE_SCROLL?(e&this.CHANGE_TEXT||e&this.CHANGE_LINES?this.$textLayer.update(n):this.$textLayer.scrollLines(n),this.$showGutter&&this.$gutterLayer.update(n),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$highlightGutterLine&&this.$updateGutterLineHighlight(),this.$moveTextAreaToCursor(),void this._signal("afterRender")):(e&this.CHANGE_TEXT?(this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n)):e&this.CHANGE_LINES?(this.$updateLines()||e&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(n):(e&this.CHANGE_TEXT||e&this.CHANGE_GUTTER)&&this.$showGutter&&this.$gutterLayer.update(n),e&this.CHANGE_CURSOR&&(this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),this.$highlightGutterLine&&this.$updateGutterLineHighlight()),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(n),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(n),void this._signal("afterRender"))},this.$autosize=function(){var e=this.session.getScreenLength()*this.lineHeight,t=this.$maxLines*this.lineHeight,n=Math.max((this.$minLines||1)*this.lineHeight,Math.min(t,e))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(n+=this.scrollBarH.getHeight());var r=e>t;if(n!=this.desiredHeight||this.$size.height!=this.desiredHeight||r!=this.$vScroll){r!=this.$vScroll&&(this.$vScroll=r,this.scrollBarV.setVisible(r));var i=this.container.clientWidth;this.container.style.height=n+"px",this.$updateCachedSize(!0,this.$gutterWidth,i,n),this.desiredHeight=n,this._signal("autosize")}},this.$computeLayerConfig=function(){var e=this.session,t=this.$size,n=t.height<=2*this.lineHeight,r=this.session.getScreenLength(),i=r*this.lineHeight,o=this.$getLongestLine(),a=!n&&(this.$hScrollBarAlwaysVisible||t.scrollerWidth-o-2*this.$padding<0),s=this.$horizScroll!==a;s&&(this.$horizScroll=a,this.scrollBarH.setVisible(a));var l=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var u=this.scrollTop%this.lineHeight,c=t.scrollerHeight+this.lineHeight,d=!this.$maxLines&&this.$scrollPastEnd?(t.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;i+=d;var f=this.scrollMargin;this.session.setScrollTop(Math.max(-f.top,Math.min(this.scrollTop,i-t.scrollerHeight+f.bottom))),this.session.setScrollLeft(Math.max(-f.left,Math.min(this.scrollLeft,o+2*this.$padding-t.scrollerWidth+f.right)));var p=!n&&(this.$vScrollBarAlwaysVisible||t.scrollerHeight-i+d<0||this.scrollTop>f.top),h=l!==p;h&&(this.$vScroll=p,this.scrollBarV.setVisible(p));var g,m,v=Math.ceil(c/this.lineHeight)-1,b=Math.max(0,Math.round((this.scrollTop-u)/this.lineHeight)),y=b+v,w=this.lineHeight;b=e.screenToDocumentRow(b,0);var x=e.getFoldLine(b);x&&(b=x.start.row),g=e.documentToScreenRow(b,0),m=e.getRowLength(b)*w,y=Math.min(e.screenToDocumentRow(y,0),e.getLength()-1),c=t.scrollerHeight+e.getRowLength(y)*w+m,u=this.scrollTop-g*w;var _=0;return this.layerConfig.width!=o&&(_=this.CHANGE_H_SCROLL),(s||h)&&(_=this.$updateCachedSize(!0,this.gutterWidth,t.width,t.height),this._signal("scrollbarVisibilityChanged"),h&&(o=this.$getLongestLine())),this.layerConfig={width:o,padding:this.$padding,firstRow:b,firstRowScreen:g,lastRow:y,lineHeight:w,characterWidth:this.characterWidth,minHeight:c,maxHeight:i,offset:u,gutterOffset:Math.max(0,Math.ceil((u+t.height-t.scrollerHeight)/w)),height:this.$size.scrollerHeight},_},this.$updateLines=function(){var e=this.$changedLines.firstRow,t=this.$changedLines.lastRow;this.$changedLines=null;var n=this.layerConfig;if(!(e>n.lastRow+1||t<n.firstRow))return t===1/0?(this.$showGutter&&this.$gutterLayer.update(n),void this.$textLayer.update(n)):(this.$textLayer.updateLines(n,e,t),!0)},this.$getLongestLine=function(){var e=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(e+=1),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(e*this.characterWidth))},this.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},this.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},this.addGutterDecoration=function(e,t){this.$gutterLayer.addGutterDecoration(e,t)},this.removeGutterDecoration=function(e,t){this.$gutterLayer.removeGutterDecoration(e,t)},this.updateBreakpoints=function(e){this.$loop.schedule(this.CHANGE_GUTTER)},this.setAnnotations=function(e){this.$gutterLayer.setAnnotations(e),this.$loop.schedule(this.CHANGE_GUTTER)},this.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},this.hideCursor=function(){this.$cursorLayer.hideCursor()},this.showCursor=function(){this.$cursorLayer.showCursor()},this.scrollSelectionIntoView=function(e,t,n){this.scrollCursorIntoView(e,n),this.scrollCursorIntoView(t,n)},this.scrollCursorIntoView=function(e,t,n){if(0!==this.$size.scrollerHeight){var r=this.$cursorLayer.getPixelPosition(e),i=r.left,o=r.top,a=n&&n.top||0,s=n&&n.bottom||0,l=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;l+a>o?(t&&(o-=t*this.$size.scrollerHeight),0===o&&(o=-this.scrollMargin.top),this.session.setScrollTop(o)):l+this.$size.scrollerHeight-s<o+this.lineHeight&&(t&&(o+=t*this.$size.scrollerHeight),this.session.setScrollTop(o+this.lineHeight-this.$size.scrollerHeight));var u=this.scrollLeft;u>i?(i<this.$padding+2*this.layerConfig.characterWidth&&(i=-this.scrollMargin.left),this.session.setScrollLeft(i)):u+this.$size.scrollerWidth<i+this.characterWidth?this.session.setScrollLeft(Math.round(i+this.characterWidth-this.$size.scrollerWidth)):u<=this.$padding&&i-u<this.characterWidth&&this.session.setScrollLeft(0)}},this.getScrollTop=function(){return this.session.getScrollTop()},this.getScrollLeft=function(){return this.session.getScrollLeft()},this.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},this.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},this.scrollToRow=function(e){this.session.setScrollTop(e*this.lineHeight)},this.alignCursor=function(e,t){"number"==typeof e&&(e={row:e,column:0});var n=this.$cursorLayer.getPixelPosition(e),r=this.$size.scrollerHeight-this.lineHeight,i=n.top-r*(t||0);return this.session.setScrollTop(i),i},this.STEPS=8,this.$calcSteps=function(e,t){var n=0,r=this.STEPS,i=[],o=function(e,t,n){return n*(Math.pow(e-1,3)+1)+t};for(n=0;n<r;++n)i.push(o(n/this.STEPS,e,t-e));return i},this.scrollToLine=function(e,t,n,r){var i=this.$cursorLayer.getPixelPosition({row:e,column:0}),o=i.top;t&&(o-=this.$size.scrollerHeight/2);var a=this.scrollTop;this.session.setScrollTop(o),n!==!1&&this.animateScrolling(a,r)},this.animateScrolling=function(e,t){var n=this.scrollTop;if(this.$animatedScroll){var r=this;if(e!=n){if(this.$scrollAnimation){var i=this.$scrollAnimation.steps;if(i.length&&(e=i[0],e==n))return}var o=r.$calcSteps(e,n);this.$scrollAnimation={from:e,to:n,steps:o},clearInterval(this.$timer),r.session.setScrollTop(o.shift()),r.session.$scrollTop=n,this.$timer=setInterval(function(){o.length?(r.session.setScrollTop(o.shift()),r.session.$scrollTop=n):null!=n?(r.session.$scrollTop=-1,r.session.setScrollTop(n),n=null):(r.$timer=clearInterval(r.$timer),r.$scrollAnimation=null,t&&t())},10)}}},this.scrollToY=function(e){this.scrollTop!==e&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=e)},this.scrollToX=function(e){this.scrollLeft!==e&&(this.scrollLeft=e),this.$loop.schedule(this.CHANGE_H_SCROLL)},this.scrollTo=function(e,t){this.session.setScrollTop(t),this.session.setScrollLeft(t)},this.scrollBy=function(e,t){t&&this.session.setScrollTop(this.session.getScrollTop()+t),e&&this.session.setScrollLeft(this.session.getScrollLeft()+e)},this.isScrollableBy=function(e,t){return t<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||(t>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||(e<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||(e>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right||void 0)))},this.pixelToScreenCoordinates=function(e,t){var n=this.scroller.getBoundingClientRect(),r=(e+this.scrollLeft-n.left-this.$padding)/this.characterWidth,i=Math.floor((t+this.scrollTop-n.top)/this.lineHeight),o=Math.round(r);return{row:i,column:o,side:r-o>0?1:-1}},this.screenToTextCoordinates=function(e,t){var n=this.scroller.getBoundingClientRect(),r=Math.round((e+this.scrollLeft-n.left-this.$padding)/this.characterWidth),i=(t+this.scrollTop-n.top)/this.lineHeight;return this.session.screenToDocumentPosition(i,Math.max(r,0))},this.textToScreenCoordinates=function(e,t){var n=this.scroller.getBoundingClientRect(),r=this.session.documentToScreenPosition(e,t),i=this.$padding+Math.round(r.column*this.characterWidth),o=r.row*this.lineHeight;return{pageX:n.left+i-this.scrollLeft,pageY:n.top+o-this.scrollTop}},this.visualizeFocus=function(){i.addCssClass(this.container,"ace_focus")},this.visualizeBlur=function(){i.removeCssClass(this.container,"ace_focus")},this.showComposition=function(e){this.$composition||(this.$composition={keepTextAreaAtCursor:this.$keepTextAreaAtCursor,cssText:this.textarea.style.cssText}),this.$keepTextAreaAtCursor=!0,i.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor()},this.setCompositionText=function(e){this.$moveTextAreaToCursor()},this.hideComposition=function(){this.$composition&&(i.removeCssClass(this.textarea,"ace_composition"),this.$keepTextAreaAtCursor=this.$composition.keepTextAreaAtCursor,this.textarea.style.cssText=this.$composition.cssText,this.$composition=null)},this.setTheme=function(e,t){function n(n){if(r.$themeId!=e)return t&&t();if(n.cssClass){i.importCssString(n.cssText,n.cssClass,r.container.ownerDocument),r.theme&&i.removeCssClass(r.container,r.theme.cssClass);var o="padding"in n?n.padding:"padding"in(r.theme||{})?4:r.$padding;r.$padding&&o!=r.$padding&&r.setPadding(o),r.$theme=n.cssClass,r.theme=n,i.addCssClass(r.container,n.cssClass),i.setCssClass(r.container,"ace_dark",n.isDark),r.$size&&(r.$size.width=0,r.$updateSizeAsync()),r._dispatchEvent("themeLoaded",{theme:n}),t&&t()}}var r=this;if(this.$themeId=e,r._dispatchEvent("themeChange",{theme:e}),e&&"string"!=typeof e)n(e);else{var a=e||this.$options.theme.initialValue;o.loadModule(["theme",a],n)}},this.getTheme=function(){return this.$themeId},this.setStyle=function(e,t){i.setCssClass(this.container,e,t!==!1)},this.unsetStyle=function(e){i.removeCssClass(this.container,e)},this.setCursorStyle=function(e){this.scroller.style.cursor!=e&&(this.scroller.style.cursor=e)},this.setMouseCursor=function(e){this.scroller.style.cursor=e},this.destroy=function(){this.$textLayer.destroy(),this.$cursorLayer.destroy()}}).call(v.prototype),o.defineOptions(v.prototype,"renderer",{animatedScroll:{initialValue:!1},showInvisibles:{set:function(e){this.$textLayer.setShowInvisibles(e)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(e){"number"==typeof e&&(this.$printMarginColumn=e),this.$showPrintMargin=!!e,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(e){this.$gutter.style.display=e?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},fadeFoldWidgets:{set:function(e){i.setCssClass(this.$gutter,"ace_fade-fold-widgets",e)},initialValue:!1},showFoldWidgets:{set:function(e){this.$gutterLayer.setShowFoldWidgets(e)},initialValue:!0},showLineNumbers:{set:function(e){this.$gutterLayer.setShowLineNumbers(e),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(e){this.$textLayer.setDisplayIndentGuides(e)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightGutterLine:{set:function(e){return this.$gutterLineHighlight?(this.$gutterLineHighlight.style.display=e?"":"none",void(this.$cursorLayer.$pixelPos&&this.$updateGutterLineHighlight())):(this.$gutterLineHighlight=i.createElement("div"),this.$gutterLineHighlight.className="ace_gutter-active-line",void this.$gutter.appendChild(this.$gutterLineHighlight))},initialValue:!1,value:!0},hScrollBarAlwaysVisible:{set:function(e){this.$hScrollBarAlwaysVisible&&this.$horizScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(e){this.$vScrollBarAlwaysVisible&&this.$vScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(e){"number"==typeof e&&(e+="px"),this.container.style.fontSize=e,this.updateFontSize()},initialValue:12},fontFamily:{set:function(e){this.container.style.fontFamily=e,this.updateFontSize()}},maxLines:{set:function(e){this.updateFull()}},minLines:{set:function(e){this.updateFull()}},scrollPastEnd:{set:function(e){e=+e||0,this.$scrollPastEnd!=e&&(this.$scrollPastEnd=e,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(e){this.$gutterLayer.$fixedWidth=!!e,this.$loop.schedule(this.CHANGE_GUTTER)}},theme:{set:function(e){this.setTheme(e)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0}}),t.VirtualRenderer=v}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(e,t,r){"use strict";var i=e("../lib/oop"),o=e("../lib/net"),a=e("../lib/event_emitter").EventEmitter,s=e("../config"),l=function(t,r,i,o){if(this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),e.nameToUrl&&!e.toUrl&&(e.toUrl=e.nameToUrl),s.get("packaged")||!e.toUrl)o=o||s.moduleUrl(r.id,"worker");else{var a=this.$normalizePath;o=o||a(e.toUrl("ace/worker/worker.js",null,"_"));var l={};t.forEach(function(t){l[t]=a(e.toUrl(t,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}try{var u=r.src,c=n(567),d=new c([u],{type:"application/javascript"}),f=(window.URL||window.webkitURL).createObjectURL(d);this.$worker=new Worker(f)}catch(p){if(!(p instanceof window.DOMException))throw p;var d=this.$workerBlob(o),h=window.URL||window.webkitURL,g=h.createObjectURL(d);this.$worker=new Worker(g),h.revokeObjectURL(g)}this.$worker.postMessage({init:!0,tlns:l,module:r.id,classname:i}),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){i.implement(this,a),this.onMessage=function(e){var t=e.data;switch(t.type){case"event":this._signal(t.name,{data:t.data});break;case"call":var n=this.callbacks[t.id];n&&(n(t.data),delete this.callbacks[t.id]);break;case"error":this.reportError(t.data);break;case"log":window.console&&console.log&&console.log.apply(console,t.data)}},this.reportError=function(e){window.console&&console.error&&console.error(e)},this.$normalizePath=function(e){return o.qualifyURL(e)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(e,t){this.$worker.postMessage({command:e,args:t})},this.call=function(e,t,n){if(n){var r=this.callbackId++;this.callbacks[r]=n,t.push(r)}this.send(e,t)},this.emit=function(e,t){try{this.$worker.postMessage({event:e,data:{data:t.data}})}catch(n){console.error(n.stack)}},this.attachToDocument=function(e){this.$doc&&this.terminate(),this.$doc=e,this.call("setValue",[e.getValue()]),e.on("change",this.changeListener)},this.changeListener=function(e){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),"insert"==e.action?this.deltaQueue.push(e.start,e.lines):this.deltaQueue.push(e.start,e.end)},this.$sendDeltaQueue=function(){var e=this.deltaQueue;e&&(this.deltaQueue=null,e.length>50&&e.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:e}))},this.$workerBlob=function(e){var t="importScripts('"+o.qualifyURL(e)+"');";try{return new Blob([t],{type:"application/javascript"})}catch(n){var r=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,i=new r;return i.append(t),i.getBlob("application/javascript")}}}).call(l.prototype);var u=function(e,t,n){this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.callbackId=1,this.callbacks={},this.messageBuffer=[];var r=null,i=!1,o=Object.create(a),l=this;this.$worker={},this.$worker.terminate=function(){},this.$worker.postMessage=function(e){l.messageBuffer.push(e),r&&(i?setTimeout(u):u())},this.setEmitSync=function(e){i=e};var u=function(){var e=l.messageBuffer.shift();e.command?r[e.command].apply(r,e.args):e.event&&o._signal(e.event,e.data)};o.postMessage=function(e){l.onMessage({data:e})},o.callback=function(e,t){this.postMessage({type:"call",id:t,data:e})},o.emit=function(e,t){this.postMessage({type:"event",name:e,data:t})},s.loadModule(["worker",t],function(e){for(r=new e[n](o);l.messageBuffer.length;)u()})};u.prototype=l.prototype,t.UIWorkerClient=u,t.WorkerClient=l}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(e,t,n){"use strict";var r=e("./range").Range,i=e("./lib/event_emitter").EventEmitter,o=e("./lib/oop"),a=function(e,t,n,r,i,o){var a=this;this.length=t,this.session=e,this.doc=e.getDocument(),this.mainClass=i,this.othersClass=o,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate),this.$others=r,this.$onCursorChange=function(){setTimeout(function(){a.onCursorChange()})},this.$pos=n;var s=e.getUndoManager().$undoStack||e.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=s.length,this.setup(),e.selection.on("changeCursor",this.$onCursorChange)};(function(){o.implement(this,i),this.setup=function(){var e=this,t=this.doc,n=this.session;this.selectionBefore=n.selection.toJSON(),n.selection.inMultiSelectMode&&n.selection.toSingleRange(),this.pos=t.createAnchor(this.$pos.row,this.$pos.column);var i=this.pos;i.$insertRight=!0,i.detach(),i.markerId=n.addMarker(new r(i.row,i.column,i.row,i.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(n){var r=t.createAnchor(n.row,n.column);r.$insertRight=!0,r.detach(),e.others.push(r)}),n.setUndoSelect(!1)},this.showOtherMarkers=function(){if(!this.othersActive){var e=this.session,t=this;this.othersActive=!0,this.others.forEach(function(n){n.markerId=e.addMarker(new r(n.row,n.column,n.row,n.column+t.length),t.othersClass,null,!1)})}},this.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var e=0;e<this.others.length;e++)this.session.removeMarker(this.others[e].markerId)}},this.onUpdate=function(e){if(this.$updating)return this.updateAnchors(e);var t=e;if(t.start.row===t.end.row&&t.start.row===this.pos.row){this.$updating=!0;var n="insert"===e.action?t.end.column-t.start.column:t.start.column-t.end.column,i=t.start.column>=this.pos.column&&t.start.column<=this.pos.column+this.length+1,o=t.start.column-this.pos.column;if(this.updateAnchors(e),i&&(this.length+=n),i&&!this.session.$fromUndo)if("insert"===e.action)for(var a=this.others.length-1;a>=0;a--){var s=this.others[a],l={row:s.row,column:s.column+o};this.doc.insertMergedLines(l,e.lines)}else if("remove"===e.action)for(var a=this.others.length-1;a>=0;a--){var s=this.others[a],l={row:s.row,column:s.column+o};this.doc.remove(new r(l.row,l.column,l.row,l.column-n))}this.$updating=!1,this.updateMarkers()}},this.updateAnchors=function(e){this.pos.onChange(e);for(var t=this.others.length;t--;)this.others[t].onChange(e);this.updateMarkers()},this.updateMarkers=function(){if(!this.$updating){var e=this,t=this.session,n=function(n,i){t.removeMarker(n.markerId),n.markerId=t.addMarker(new r(n.row,n.column,n.row,n.column+e.length),i,null,!1)};n(this.pos,this.mainClass);for(var i=this.others.length;i--;)n(this.others[i],this.othersClass)}},this.onCursorChange=function(e){if(!this.$updating&&this.session){var t=this.session.selection.getCursor();t.row===this.pos.row&&t.column>=this.pos.column&&t.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",e)):(this.hideOtherMarkers(),this._emit("cursorLeave",e))}},this.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.removeEventListener("change",this.$onUpdate),this.session.selection.removeEventListener("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},this.cancel=function(){if(this.$undoStackDepth!==-1){for(var e=this.session.getUndoManager(),t=(e.$undoStack||e.$undostack).length-this.$undoStackDepth,n=0;n<t;n++)e.undo(!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}}}).call(a.prototype),t.PlaceHolder=a}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,t,n){function r(e,t){return e.row==t.row&&e.column==t.column}function i(e){var t=e.domEvent,n=t.altKey,i=t.shiftKey,s=t.ctrlKey,l=e.getAccelKey(),u=e.getButton();if(s&&a.isMac&&(u=t.button),e.editor.inMultiSelectMode&&2==u)return void e.editor.textInput.onContextMenu(e.domEvent);if(!s&&!n&&!l)return void(0===u&&e.editor.inMultiSelectMode&&e.editor.exitMultiSelectMode());if(0===u){var c,d=e.editor,f=d.selection,p=d.inMultiSelectMode,h=e.getDocumentPosition(),g=f.getCursor(),m=e.inSelection()||f.isEmpty()&&r(h,g),v=e.x,b=e.y,y=function(e){v=e.clientX,b=e.clientY},w=d.session,x=d.renderer.pixelToScreenCoordinates(v,b),_=x;if(d.$mouseHandler.$enableJumpToDef)s&&n||l&&n?c=i?"block":"add":n&&d.$blockSelectEnabled&&(c="block");else if(l&&!n){if(c="add",!p&&i)return}else n&&d.$blockSelectEnabled&&(c="block");if(c&&a.isMac&&t.ctrlKey&&d.$mouseHandler.cancelContextMenu(),"add"==c){if(!p&&m)return;if(!p){var E=f.toOrientedRange();d.addSelectionMarker(E)}var C=f.rangeList.rangeAtPoint(h);d.$blockScrolling++,d.inVirtualSelectionMode=!0,i&&(C=null,E=f.ranges[0]||E,d.removeSelectionMarker(E)),d.once("mouseup",function(){var e=f.toOrientedRange();C&&e.isEmpty()&&r(C.cursor,e.cursor)?f.substractPoint(e.cursor):(i?f.substractPoint(E.cursor):E&&(d.removeSelectionMarker(E),f.addRange(E)),f.addRange(e)),d.$blockScrolling--,d.inVirtualSelectionMode=!1})}else if("block"==c){e.stop(),d.inVirtualSelectionMode=!0;var k,S=[],A=function(){var e=d.renderer.pixelToScreenCoordinates(v,b),t=w.screenToDocumentPosition(e.row,e.column);r(_,e)&&r(t,f.lead)||(_=e,d.$blockScrolling++,d.selection.moveToPosition(t),d.renderer.scrollCursorIntoView(),d.removeSelectionMarkers(S),S=f.rectangularRangeBlock(_,x),d.$mouseHandler.$clickSelection&&1==S.length&&S[0].isEmpty()&&(S[0]=d.$mouseHandler.$clickSelection.clone()),S.forEach(d.addSelectionMarker,d),d.updateSelectionMarkers(),d.$blockScrolling--)};d.$blockScrolling++,p&&!l?f.toSingleRange():!p&&l&&(k=f.toOrientedRange(),d.addSelectionMarker(k)),i?x=w.documentToScreenPosition(f.lead):f.moveToPosition(h),d.$blockScrolling--,_={row:-1,column:-1};var T=function(e){clearInterval(N),d.removeSelectionMarkers(S),S.length||(S=[f.toOrientedRange()]),d.$blockScrolling++,k&&(d.removeSelectionMarker(k),f.toSingleRange(k));for(var t=0;t<S.length;t++)f.addRange(S[t]);d.inVirtualSelectionMode=!1,d.$mouseHandler.$clickSelection=null,d.$blockScrolling--},D=A;o.capture(d.container,y,T);var N=setInterval(function(){D()},20);return e.preventDefault()}}}var o=e("../lib/event"),a=e("../lib/useragent");t.onMouseDown=i}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(e,t,n){
t.defaultCommands=[{name:"addCursorAbove",exec:function(e){e.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",exec:function(e){e.selectMoreLines(1)},bindKey:{win:"Ctrl-Alt-Down",mac:"Ctrl-Alt-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorAboveSkipCurrent",exec:function(e){e.selectMoreLines(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Up",mac:"Ctrl-Alt-Shift-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelowSkipCurrent",exec:function(e){e.selectMoreLines(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Down",mac:"Ctrl-Alt-Shift-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreBefore",exec:function(e){e.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",exec:function(e){e.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",exec:function(e){e.selectMore(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Left",mac:"Ctrl-Alt-Shift-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextAfter",exec:function(e){e.selectMore(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Right",mac:"Ctrl-Alt-Shift-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"splitIntoLines",exec:function(e){e.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"alignCursors",exec:function(e){e.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",exec:function(e){e.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],t.multiSelectCommands=[{name:"singleSelection",bindKey:"esc",exec:function(e){e.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(e){return e&&e.inMultiSelectMode}}];var r=e("../keyboard/hash_handler").HashHandler;t.keyboardHandler=new r(t.multiSelectCommands)}),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],function(e,t,n){function r(e,t,n){return g.$options.wrap=!0,g.$options.needle=t,g.$options.backwards=n==-1,g.find(e)}function i(e,t){return e.row==t.row&&e.column==t.column}function o(e){e.$multiselectOnSessionChange||(e.$onAddRange=e.$onAddRange.bind(e),e.$onRemoveRange=e.$onRemoveRange.bind(e),e.$onMultiSelect=e.$onMultiSelect.bind(e),e.$onSingleSelect=e.$onSingleSelect.bind(e),e.$multiselectOnSessionChange=t.onSessionChange.bind(e),e.$checkMultiselectChange=e.$checkMultiselectChange.bind(e),e.$multiselectOnSessionChange(e),e.on("changeSession",e.$multiselectOnSessionChange),e.on("mousedown",c),e.commands.addCommands(p.defaultCommands),a(e))}function a(e){function t(t){r&&(e.renderer.setMouseCursor(""),r=!1)}var n=e.textInput.getElement(),r=!1;d.addListener(n,"keydown",function(n){var i=18==n.keyCode&&!(n.ctrlKey||n.shiftKey||n.metaKey);e.$blockSelectEnabled&&i?r||(e.renderer.setMouseCursor("crosshair"),r=!0):r&&t()}),d.addListener(n,"keyup",t),d.addListener(n,"blur",t)}var s=e("./range_list").RangeList,l=e("./range").Range,u=e("./selection").Selection,c=e("./mouse/multi_select_handler").onMouseDown,d=e("./lib/event"),f=e("./lib/lang"),p=e("./commands/multi_select_commands");t.commands=p.defaultCommands.concat(p.multiSelectCommands);var h=e("./search").Search,g=new h,m=e("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(m.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(e,t){if(e){if(!this.inMultiSelectMode&&0===this.rangeCount){var n=this.toOrientedRange();if(this.rangeList.add(n),this.rangeList.add(e),2!=this.rangeList.ranges.length)return this.rangeList.removeAll(),t||this.fromOrientedRange(e);this.rangeList.removeAll(),this.rangeList.add(n),this.$onAddRange(n)}e.cursor||(e.cursor=e.end);var r=this.rangeList.add(e);return this.$onAddRange(e),r.length&&this.$onRemoveRange(r),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),t||this.fromOrientedRange(e)}},this.toSingleRange=function(e){e=e||this.ranges[0];var t=this.rangeList.removeAll();t.length&&this.$onRemoveRange(t),e&&this.fromOrientedRange(e)},this.substractPoint=function(e){var t=this.rangeList.substractPoint(e);if(t)return this.$onRemoveRange(t),t[0]},this.mergeOverlappingRanges=function(){var e=this.rangeList.merge();e.length?this.$onRemoveRange(e):this.ranges[0]&&this.fromOrientedRange(this.ranges[0])},this.$onAddRange=function(e){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(e),this._signal("addRange",{range:e})},this.$onRemoveRange=function(e){if(this.rangeCount=this.rangeList.ranges.length,1==this.rangeCount&&this.inMultiSelectMode){var t=this.rangeList.ranges.pop();e.push(t),this.rangeCount=0}for(var n=e.length;n--;){var r=this.ranges.indexOf(e[n]);this.ranges.splice(r,1)}this._signal("removeRange",{ranges:e}),0===this.rangeCount&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),t=t||this.ranges[0],t&&!t.isEqual(this.getRange())&&this.fromOrientedRange(t)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new s,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){if(this.rangeCount>1){var e=this.rangeList.ranges,t=e[e.length-1],n=l.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(n,t.cursor==t.start)}else{var n=this.getRange(),r=this.isBackwards(),i=n.start.row,o=n.end.row;if(i==o){if(r)var a=n.end,s=n.start;else var a=n.start,s=n.end;return this.addRange(l.fromPoints(s,s)),void this.addRange(l.fromPoints(a,a))}var u=[],c=this.getLineRange(i,!0);c.start.column=n.start.column,u.push(c);for(var d=i+1;d<o;d++)u.push(this.getLineRange(d,!0));c=this.getLineRange(o,!0),c.end.column=n.end.column,u.push(c),u.forEach(this.addRange,this)}},this.toggleBlockSelection=function(){if(this.rangeCount>1){var e=this.rangeList.ranges,t=e[e.length-1],n=l.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(n,t.cursor==t.start)}else{var r=this.session.documentToScreenPosition(this.selectionLead),i=this.session.documentToScreenPosition(this.selectionAnchor),o=this.rectangularRangeBlock(r,i);o.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(e,t,n){var r=[],o=e.column<t.column;if(o)var a=e.column,s=t.column;else var a=t.column,s=e.column;var u=e.row<t.row;if(u)var c=e.row,d=t.row;else var c=t.row,d=e.row;a<0&&(a=0),c<0&&(c=0),c==d&&(n=!0);for(var f=c;f<=d;f++){var p=l.fromPoints(this.session.screenToDocumentPosition(f,a),this.session.screenToDocumentPosition(f,s));if(p.isEmpty()){if(h&&i(p.end,h))break;var h=p.end}p.cursor=o?p.start:p.end,r.push(p)}if(u&&r.reverse(),!n){for(var g=r.length-1;r[g].isEmpty()&&g>0;)g--;if(g>0)for(var m=0;r[m].isEmpty();)m++;for(var v=g;v>=m;v--)r[v].isEmpty()&&r.splice(v,1)}return r}}.call(u.prototype);var v=e("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(e){e.cursor||(e.cursor=e.end);var t=this.getSelectionStyle();return e.marker=this.session.addMarker(e,"ace_selection",t),this.session.$selectionMarkers.push(e),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,e},this.removeSelectionMarker=function(e){if(e.marker){this.session.removeMarker(e.marker);var t=this.session.$selectionMarkers.indexOf(e);t!=-1&&this.session.$selectionMarkers.splice(t,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(e){for(var t=this.session.$selectionMarkers,n=e.length;n--;){var r=e[n];if(r.marker){this.session.removeMarker(r.marker);var i=t.indexOf(r);i!=-1&&t.splice(i,1)}}this.session.selectionMarkerCount=t.length},this.$onAddRange=function(e){this.addSelectionMarker(e.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(e){this.removeSelectionMarkers(e.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(e){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(p.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(e){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(p.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(e){var t=e.command,n=e.editor;if(n.multiSelect){if(t.multiSelectAction)"forEach"==t.multiSelectAction?r=n.forEachSelection(t,e.args):"forEachLine"==t.multiSelectAction?r=n.forEachSelection(t,e.args,!0):"single"==t.multiSelectAction?(n.exitMultiSelectMode(),r=t.exec(n,e.args||{})):r=t.multiSelectAction(n,e.args||{});else{var r=t.exec(n,e.args||{});n.multiSelect.addRange(n.multiSelect.toOrientedRange()),n.multiSelect.mergeOverlappingRanges()}return r}},this.forEachSelection=function(e,t,n){if(!this.inVirtualSelectionMode){var r,i=n&&n.keepOrder,o=1==n||n&&n.$byLines,a=this.session,s=this.selection,l=s.rangeList,c=(i?s:l).ranges;if(!c.length)return e.exec?e.exec(this,t||{}):e(this,t||{});var d=s._eventRegistry;s._eventRegistry={};var f=new u(a);this.inVirtualSelectionMode=!0;for(var p=c.length;p--;){if(o)for(;p>0&&c[p].start.row==c[p-1].end.row;)p--;f.fromOrientedRange(c[p]),f.index=p,this.selection=a.selection=f;var h=e.exec?e.exec(this,t||{}):e(this,t||{});r||void 0===h||(r=h),f.toOrientedRange(c[p])}f.detach(),this.selection=a.selection=s,this.inVirtualSelectionMode=!1,s._eventRegistry=d,s.mergeOverlappingRanges();var g=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),g&&g.from==g.to&&this.renderer.animateScrolling(g.from),r}},this.exitMultiSelectMode=function(){this.inMultiSelectMode&&!this.inVirtualSelectionMode&&this.multiSelect.toSingleRange()},this.getSelectedText=function(){var e="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var t=this.multiSelect.rangeList.ranges,n=[],r=0;r<t.length;r++)n.push(this.session.getTextRange(t[r]));var i=this.session.getDocument().getNewLineCharacter();e=n.join(i),e.length==(n.length-1)*i.length&&(e="")}else this.selection.isEmpty()||(e=this.session.getTextRange(this.getSelectionRange()));return e},this.$checkMultiselectChange=function(e,t){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var n=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&t==this.multiSelect.anchor)return;var r=t==this.multiSelect.anchor?n.cursor==n.start?n.end:n.start:n.cursor;r.row==t.row&&this.session.$clipPositionToDocument(r.row,r.column).column==t.column||this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange())}},this.findAll=function(e,t,n){if(t=t||{},t.needle=e||t.needle,void 0==t.needle){var r=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();t.needle=this.session.getTextRange(r)}this.$search.set(t);var i=this.$search.findAll(this.session);if(!i.length)return 0;this.$blockScrolling+=1;var o=this.multiSelect;n||o.toSingleRange(i[0]);for(var a=i.length;a--;)o.addRange(i[a],!0);return r&&o.rangeList.rangeAtPoint(r.start)&&o.addRange(r,!0),this.$blockScrolling-=1,i.length},this.selectMoreLines=function(e,t){var n=this.selection.toOrientedRange(),r=n.cursor==n.end,i=this.session.documentToScreenPosition(n.cursor);this.selection.$desiredColumn&&(i.column=this.selection.$desiredColumn);var o=this.session.screenToDocumentPosition(i.row+e,i.column);if(n.isEmpty())var a=o;else var s=this.session.documentToScreenPosition(r?n.end:n.start),a=this.session.screenToDocumentPosition(s.row+e,s.column);if(r){var u=l.fromPoints(o,a);u.cursor=u.start}else{var u=l.fromPoints(a,o);u.cursor=u.end}if(u.desiredColumn=i.column,this.selection.inMultiSelectMode){if(t)var c=n.cursor}else this.selection.addRange(n);this.selection.addRange(u),c&&this.selection.substractPoint(c)},this.transposeSelections=function(e){for(var t=this.session,n=t.multiSelect,r=n.ranges,i=r.length;i--;){var o=r[i];if(o.isEmpty()){var a=t.getWordRange(o.start.row,o.start.column);o.start.row=a.start.row,o.start.column=a.start.column,o.end.row=a.end.row,o.end.column=a.end.column}}n.mergeOverlappingRanges();for(var s=[],i=r.length;i--;){var o=r[i];s.unshift(t.getTextRange(o))}e<0?s.unshift(s.pop()):s.push(s.shift());for(var i=r.length;i--;){var o=r[i],a=o.clone();t.replace(o,s[i]),o.start.row=a.start.row,o.start.column=a.start.column}},this.selectMore=function(e,t,n){var i=this.session,o=i.multiSelect,a=o.toOrientedRange();if(!a.isEmpty()||(a=i.getWordRange(a.start.row,a.start.column),a.cursor=e==-1?a.start:a.end,this.multiSelect.addRange(a),!n)){var s=i.getTextRange(a),l=r(i,s,e);l&&(l.cursor=e==-1?l.start:l.end,this.$blockScrolling+=1,this.session.unfold(l),this.multiSelect.addRange(l),this.$blockScrolling-=1,this.renderer.scrollCursorIntoView(null,.5)),t&&this.multiSelect.substractPoint(a.cursor)}},this.alignCursors=function(){var e=this.session,t=e.multiSelect,n=t.ranges,r=-1,i=n.filter(function(e){return e.cursor.row==r||void(r=e.cursor.row)});if(n.length&&i.length!=n.length-1){i.forEach(function(e){t.substractPoint(e.cursor)});var o=0,a=1/0,s=n.map(function(t){var n=t.cursor,r=e.getLine(n.row),i=r.substr(n.column).search(/\S/g);return i==-1&&(i=0),n.column>o&&(o=n.column),i<a&&(a=i),i});n.forEach(function(t,n){var r=t.cursor,i=o-r.column,u=s[n]-a;i>u?e.insert(r,f.stringRepeat(" ",i-u)):e.remove(new l(r.row,r.column,r.row,r.column-i+u)),t.start.column=t.end.column=o,t.start.row=t.end.row=r.row,t.cursor=t.end}),t.fromOrientedRange(n[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var u=this.selection.getRange(),c=u.start.row,d=u.end.row,p=c==d;if(p){var h,g=this.session.getLength();do h=this.session.getLine(d);while(/[=:]/.test(h)&&++d<g);do h=this.session.getLine(c);while(/[=:]/.test(h)&&--c>0);c<0&&(c=0),d>=g&&(d=g-1)}var m=this.session.removeFullLines(c,d);m=this.$reAlignText(m,p),this.session.insert({row:c,column:0},m.join("\n")+"\n"),p||(u.start.column=0,u.end.column=m[m.length-1].length),this.selection.setRange(u)}},this.$reAlignText=function(e,t){function n(e){return f.stringRepeat(" ",e)}function r(e){return e[2]?n(a)+e[2]+n(s-e[2].length+l)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}function i(e){return e[2]?n(a+s-e[2].length)+e[2]+n(l," ")+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}function o(e){return e[2]?n(a)+e[2]+n(l)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}var a,s,l,u=!0,c=!0;return e.map(function(e){var t=e.match(/(\s*)(.*?)(\s*)([=:].*)/);return t?null==a?(a=t[1].length,s=t[2].length,l=t[3].length,t):(a+s+l!=t[1].length+t[2].length+t[3].length&&(c=!1),a!=t[1].length&&(u=!1),a>t[1].length&&(a=t[1].length),s<t[2].length&&(s=t[2].length),l>t[3].length&&(l=t[3].length),t):[e]}).map(t?r:u?c?i:r:o)}}).call(v.prototype),t.onSessionChange=function(e){var t=e.session;t&&!t.multiSelect&&(t.$selectionMarkers=[],t.selection.$initRangeList(),t.multiSelect=t.selection),this.multiSelect=t&&t.multiSelect;var n=e.oldSession;n&&(n.multiSelect.off("addRange",this.$onAddRange),n.multiSelect.off("removeRange",this.$onRemoveRange),n.multiSelect.off("multiSelect",this.$onMultiSelect),n.multiSelect.off("singleSelect",this.$onSingleSelect),n.multiSelect.lead.off("change",this.$checkMultiselectChange),n.multiSelect.anchor.off("change",this.$checkMultiselectChange)),t&&(t.multiSelect.on("addRange",this.$onAddRange),t.multiSelect.on("removeRange",this.$onRemoveRange),t.multiSelect.on("multiSelect",this.$onMultiSelect),t.multiSelect.on("singleSelect",this.$onSingleSelect),t.multiSelect.lead.on("change",this.$checkMultiselectChange),t.multiSelect.anchor.on("change",this.$checkMultiselectChange)),t&&this.inMultiSelectMode!=t.selection.inMultiSelectMode&&(t.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},t.MultiSelect=o,e("./config").defineOptions(v.prototype,"editor",{enableMultiselect:{set:function(e){o(this),e?(this.on("changeSession",this.$multiselectOnSessionChange),this.on("mousedown",c)):(this.off("changeSession",this.$multiselectOnSessionChange),this.off("mousedown",c))},value:!0},enableBlockSelect:{set:function(e){this.$blockSelectEnabled=e},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../../range").Range,i=t.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);return this.foldingStartMarker.test(r)?"start":"markbeginend"==t&&this.foldingStopMarker&&this.foldingStopMarker.test(r)?"end":""},this.getFoldWidgetRange=function(e,t,n){return null},this.indentationBlock=function(e,t,n){var i=/\S/,o=e.getLine(t),a=o.search(i);if(a!=-1){for(var s=n||o.length,l=e.getLength(),u=t,c=t;++t<l;){var d=e.getLine(t).search(i);if(d!=-1){if(d<=a)break;c=t}}if(c>u){var f=e.getLine(c).length;return new r(u,s,c,f)}}},this.openingBracketBlock=function(e,t,n,i,o){var a={row:n,column:i+1},s=e.$findClosingBracket(t,a,o);if(s){var l=e.foldWidgets[s.row];return null==l&&(l=e.getFoldWidget(s.row)),"start"==l&&s.row>a.row&&(s.row--,s.column=e.getLine(s.row).length),r.fromPoints(a,s)}},this.closingBracketBlock=function(e,t,n,i,o){var a={row:n,column:i},s=e.$findOpeningBracket(t,a);if(s)return s.column++,a.column--,r.fromPoints(s,a)}}).call(i.prototype)}),ace.define("ace/theme/textmate",["require","exports","module","ace/lib/dom"],function(e,t,n){"use strict";t.isDark=!1,t.cssClass="ace-tm",t.cssText='.ace-tm .ace_gutter {\tbackground: #f0f0f0;\tcolor: #333;\t}\t.ace-tm .ace_print-margin {\twidth: 1px;\tbackground: #e8e8e8;\t}\t.ace-tm .ace_fold {\tbackground-color: #6B72E6;\t}\t.ace-tm {\tbackground-color: #FFFFFF;\tcolor: black;\t}\t.ace-tm .ace_cursor {\tcolor: black;\t}\t.ace-tm .ace_invisible {\tcolor: rgb(191, 191, 191);\t}\t.ace-tm .ace_storage,\t.ace-tm .ace_keyword {\tcolor: blue;\t}\t.ace-tm .ace_constant {\tcolor: rgb(197, 6, 11);\t}\t.ace-tm .ace_constant.ace_buildin {\tcolor: rgb(88, 72, 246);\t}\t.ace-tm .ace_constant.ace_language {\tcolor: rgb(88, 92, 246);\t}\t.ace-tm .ace_constant.ace_library {\tcolor: rgb(6, 150, 14);\t}\t.ace-tm .ace_invalid {\tbackground-color: rgba(255, 0, 0, 0.1);\tcolor: red;\t}\t.ace-tm .ace_support.ace_function {\tcolor: rgb(60, 76, 114);\t}\t.ace-tm .ace_support.ace_constant {\tcolor: rgb(6, 150, 14);\t}\t.ace-tm .ace_support.ace_type,\t.ace-tm .ace_support.ace_class {\tcolor: rgb(109, 121, 222);\t}\t.ace-tm .ace_keyword.ace_operator {\tcolor: rgb(104, 118, 135);\t}\t.ace-tm .ace_string {\tcolor: rgb(3, 106, 7);\t}\t.ace-tm .ace_comment {\tcolor: rgb(76, 136, 107);\t}\t.ace-tm .ace_comment.ace_doc {\tcolor: rgb(0, 102, 255);\t}\t.ace-tm .ace_comment.ace_doc.ace_tag {\tcolor: rgb(128, 159, 191);\t}\t.ace-tm .ace_constant.ace_numeric {\tcolor: rgb(0, 0, 205);\t}\t.ace-tm .ace_variable {\tcolor: rgb(49, 132, 149);\t}\t.ace-tm .ace_xml-pe {\tcolor: rgb(104, 104, 91);\t}\t.ace-tm .ace_entity.ace_name.ace_function {\tcolor: #0000A2;\t}\t.ace-tm .ace_heading {\tcolor: rgb(12, 7, 255);\t}\t.ace-tm .ace_list {\tcolor:rgb(185, 6, 144);\t}\t.ace-tm .ace_meta.ace_tag {\tcolor:rgb(0, 22, 142);\t}\t.ace-tm .ace_string.ace_regex {\tcolor: rgb(255, 0, 0)\t}\t.ace-tm .ace_marker-layer .ace_selection {\tbackground: rgb(181, 213, 255);\t}\t.ace-tm.ace_multiselect .ace_selection.ace_start {\tbox-shadow: 0 0 3px 0px white;\t}\t.ace-tm .ace_marker-layer .ace_step {\tbackground: rgb(252, 255, 0);\t}\t.ace-tm .ace_marker-layer .ace_stack {\tbackground: rgb(164, 229, 101);\t}\t.ace-tm .ace_marker-layer .ace_bracket {\tmargin: -1px 0 0 -1px;\tborder: 1px solid rgb(192, 192, 192);\t}\t.ace-tm .ace_marker-layer .ace_active-line {\tbackground: rgba(0, 0, 0, 0.07);\t}\t.ace-tm .ace_gutter-active-line {\tbackground-color : #dcdcdc;\t}\t.ace-tm .ace_marker-layer .ace_selected-word {\tbackground: rgb(250, 250, 255);\tborder: 1px solid rgb(200, 200, 250);\t}\t.ace-tm .ace_indent-guide {\tbackground: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;\t}\t';var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass)}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/range"],function(e,t,n){"use strict";function r(e){this.session=e,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}var i=(e("./lib/oop"),e("./lib/dom"));e("./range").Range;(function(){this.getRowLength=function(e){var t;return t=this.lineWidgets?this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0:0,this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1+t:1+t},this.$getWidgetScreenLength=function(){var e=0;return this.lineWidgets.forEach(function(t){t&&t.rowCount&&!t.hidden&&(e+=t.rowCount)}),e},this.$onChangeEditor=function(e){this.attach(e.editor)},this.attach=function(e){e&&e.widgetManager&&e.widgetManager!=this&&e.widgetManager.detach(),this.editor!=e&&(this.detach(),this.editor=e,e&&(e.widgetManager=this,e.renderer.on("beforeRender",this.measureWidgets),e.renderer.on("afterRender",this.renderWidgets)))},this.detach=function(e){var t=this.editor;if(t){this.editor=null,t.widgetManager=null,t.renderer.off("beforeRender",this.measureWidgets),t.renderer.off("afterRender",this.renderWidgets);var n=this.session.lineWidgets;n&&n.forEach(function(e){e&&e.el&&e.el.parentNode&&(e._inDocument=!1,e.el.parentNode.removeChild(e.el))})}},this.updateOnFold=function(e,t){var n=t.lineWidgets;if(n&&e.action){for(var r=e.data,i=r.start.row,o=r.end.row,a="add"==e.action,s=i+1;s<o;s++)n[s]&&(n[s].hidden=a);n[o]&&(a?n[i]?n[o].hidden=a:n[i]=n[o]:(n[i]==n[o]&&(n[i]=void 0),n[o].hidden=a))}},this.updateOnChange=function(e){var t=this.session.lineWidgets;if(t){var n=e.start.row,r=e.end.row-n;if(0===r);else if("remove"==e.action){var i=t.splice(n+1,r);i.forEach(function(e){e&&this.removeLineWidget(e)},this),this.$updateRows()}else{var o=new Array(r);o.unshift(n,0),t.splice.apply(t,o),this.$updateRows()}}},this.$updateRows=function(){var e=this.session.lineWidgets;if(e){var t=!0;e.forEach(function(e,n){if(e)for(t=!1,e.row=n;e.$oldWidget;)e.$oldWidget.row=n,e=e.$oldWidget}),t&&(this.session.lineWidgets=null)}},this.addLineWidget=function(e){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var t=this.session.lineWidgets[e.row];t&&(e.$oldWidget=t,t.el&&t.el.parentNode&&(t.el.parentNode.removeChild(t.el),t._inDocument=!1)),this.session.lineWidgets[e.row]=e,e.session=this.session;var n=this.editor.renderer;e.html&&!e.el&&(e.el=i.createElement("div"),e.el.innerHTML=e.html),e.el&&(i.addCssClass(e.el,"ace_lineWidgetContainer"),e.el.style.position="absolute",e.el.style.zIndex=5,n.container.appendChild(e.el),e._inDocument=!0),e.coverGutter||(e.el.style.zIndex=3),e.pixelHeight||(e.pixelHeight=e.el.offsetHeight),null==e.rowCount&&(e.rowCount=e.pixelHeight/n.layerConfig.lineHeight);var r=this.session.getFoldAt(e.row,0);if(e.$fold=r,r){var o=this.session.lineWidgets;e.row!=r.end.row||o[r.start.row]?e.hidden=!0:o[r.start.row]=e}return this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows(),this.renderWidgets(null,n),this.onWidgetChanged(e),e},this.removeLineWidget=function(e){if(e._inDocument=!1,e.session=null,e.el&&e.el.parentNode&&e.el.parentNode.removeChild(e.el),e.editor&&e.editor.destroy)try{e.editor.destroy()}catch(t){}if(this.session.lineWidgets){var n=this.session.lineWidgets[e.row];if(n==e)this.session.lineWidgets[e.row]=e.$oldWidget,e.$oldWidget&&this.onWidgetChanged(e.$oldWidget);else for(;n;){if(n.$oldWidget==e){n.$oldWidget=e.$oldWidget;break}n=n.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows()},this.getWidgetsAtRow=function(e){for(var t=this.session.lineWidgets,n=t&&t[e],r=[];n;)r.push(n),n=n.$oldWidget;return r},this.onWidgetChanged=function(e){this.session._changedWidgets.push(e),this.editor&&this.editor.renderer.updateFull()},this.measureWidgets=function(e,t){var n=this.session._changedWidgets,r=t.layerConfig;if(n&&n.length){for(var i=1/0,o=0;o<n.length;o++){var a=n[o];if(a&&a.el&&a.session==this.session){if(!a._inDocument){if(this.session.lineWidgets[a.row]!=a)continue;a._inDocument=!0,t.container.appendChild(a.el)}a.h=a.el.offsetHeight,a.fixedWidth||(a.w=a.el.offsetWidth,a.screenWidth=Math.ceil(a.w/r.characterWidth));var s=a.h/r.lineHeight;a.coverLine&&(s-=this.session.getRowLineCount(a.row),s<0&&(s=0)),a.rowCount!=s&&(a.rowCount=s,a.row<i&&(i=a.row))}}i!=1/0&&(this.session._emit("changeFold",{data:{start:{row:i}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},this.renderWidgets=function(e,t){var n=t.layerConfig,r=this.session.lineWidgets;if(r){for(var i=Math.min(this.firstRow,n.firstRow),o=Math.max(this.lastRow,n.lastRow,r.length);i>0&&!r[i];)i--;this.firstRow=n.firstRow,this.lastRow=n.lastRow,t.$cursorLayer.config=n;for(var a=i;a<=o;a++){var s=r[a];if(s&&s.el)if(s.hidden)s.el.style.top=-100-(s.pixelHeight||0)+"px";else{s._inDocument||(s._inDocument=!0,t.container.appendChild(s.el));var l=t.$cursorLayer.getPixelPosition({row:a,column:0},!0).top;s.coverLine||(l+=n.lineHeight*this.session.getRowLineCount(s.row)),s.el.style.top=l-n.offset+"px";var u=s.coverGutter?0:t.gutterWidth;s.fixedWidth||(u-=t.scrollLeft),s.el.style.left=u+"px",s.fullWidth&&s.screenWidth&&(s.el.style.minWidth=n.width+2*n.padding+"px"),s.fixedWidth?s.el.style.right=t.scrollBar.getWidth()+"px":s.el.style.right=""}}}}}).call(r.prototype),t.LineWidgets=r}),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range"],function(e,t,n){"use strict";function r(e,t,n){for(var r=0,i=e.length-1;r<=i;){var o=r+i>>1,a=n(t,e[o]);if(a>0)r=o+1;else{if(!(a<0))return o;i=o-1}}return-(r+1)}function i(e,t,n){var i=e.getAnnotations().sort(s.comparePoints);if(i.length){var o=r(i,{row:t,column:-1},s.comparePoints);o<0&&(o=-o-1),o>=i.length?o=n>0?0:i.length-1:0===o&&n<0&&(o=i.length-1);var a=i[o];if(a&&n){if(a.row===t){do a=i[o+=n];while(a&&a.row===t);if(!a)return i.slice()}var l=[];t=a.row;do l[n<0?"unshift":"push"](a),a=i[o+=n];while(a&&a.row==t);return l.length&&l}}}var o=e("../line_widgets").LineWidgets,a=e("../lib/dom"),s=e("../range").Range;t.showErrorMarker=function(e,t){var n=e.session;n.widgetManager||(n.widgetManager=new o(n),n.widgetManager.attach(e));var r=e.getCursorPosition(),s=r.row,l=n.widgetManager.getWidgetsAtRow(s).filter(function(e){return"errorMarker"==e.type})[0];l?l.destroy():s-=t;var u,c=i(n,s,t);if(c){var d=c[0];r.column=(d.pos&&"number"!=typeof d.column?d.pos.sc:d.column)||0,r.row=d.row,u=e.renderer.$gutterLayer.$annotations[r.row]}else{if(l)return;u={text:["Looks good!"],className:"ace_ok"}}e.session.unfold(r.row),e.selection.moveToPosition(r);var f={row:r.row,fixedWidth:!0,coverGutter:!0,el:a.createElement("div"),type:"errorMarker"},p=f.el.appendChild(a.createElement("div")),h=f.el.appendChild(a.createElement("div"));h.className="error_widget_arrow "+u.className;var g=e.renderer.$cursorLayer.getPixelPosition(r).left;h.style.left=g+e.renderer.gutterWidth-5+"px",f.el.className="error_widget_wrapper",p.className="error_widget "+u.className,p.innerHTML=u.text.join("<br>"),p.appendChild(a.createElement("div"));var m=function(e,t,n){if(0===t&&("esc"===n||"return"===n))return f.destroy(),{command:"null"}};f.destroy=function(){e.$mouseHandler.isMousePressed||(e.keyBinding.removeKeyboardHandler(m),n.widgetManager.removeLineWidget(f),e.off("changeSelection",f.destroy),e.off("changeSession",f.destroy),e.off("mouseup",f.destroy),e.off("change",f.destroy))},e.keyBinding.addKeyboardHandler(m),e.on("changeSelection",f.destroy),e.on("changeSession",f.destroy),e.on("mouseup",f.destroy),e.on("change",f.destroy),e.session.widgetManager.addLineWidget(f),f.el.onmousedown=e.focus.bind(e),e.renderer.scrollCursorIntoView(null,.5,{bottom:f.el.offsetHeight})},a.importCssString("\t    .error_widget_wrapper {\t        background: inherit;\t        color: inherit;\t        border:none\t    }\t    .error_widget {\t        border-top: solid 2px;\t        border-bottom: solid 2px;\t        margin: 5px 0;\t        padding: 10px 40px;\t        white-space: pre-wrap;\t    }\t    .error_widget.ace_error, .error_widget_arrow.ace_error{\t        border-color: #ff5a5a\t    }\t    .error_widget.ace_warning, .error_widget_arrow.ace_warning{\t        border-color: #F1D817\t    }\t    .error_widget.ace_info, .error_widget_arrow.ace_info{\t        border-color: #5a5a5a\t    }\t    .error_widget.ace_ok, .error_widget_arrow.ace_ok{\t        border-color: #5aaa5a\t    }\t    .error_widget_arrow {\t        position: absolute;\t        border: solid 5px;\t        border-top-color: transparent!important;\t        border-right-color: transparent!important;\t        border-left-color: transparent!important;\t        top: -5px;\t    }\t","")}),ace.define("ace/ace",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/dom","ace/lib/event","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config"],function(e,t,n){"use strict";e("./lib/fixoldbrowsers");var r=e("./lib/dom"),i=e("./lib/event"),o=e("./editor").Editor,a=e("./edit_session").EditSession,s=e("./undomanager").UndoManager,l=e("./virtual_renderer").VirtualRenderer;e("./worker/worker_client"),e("./keyboard/hash_handler"),e("./placeholder"),e("./multi_select"),e("./mode/folding/fold_mode"),e("./theme/textmate"),e("./ext/error_marker"),t.config=e("./config"),t.acequire=e,t.edit=function(e){if("string"==typeof e){var n=e;if(e=document.getElementById(n),!e)throw new Error("ace.edit can't find div #"+n)}if(e&&e.env&&e.env.editor instanceof o)return e.env.editor;var a="";if(e&&/input|textarea/i.test(e.tagName)){var s=e;a=s.value,e=r.createElement("pre"),s.parentNode.replaceChild(e,s)}else e&&(a=r.getInnerText(e),e.innerHTML="");var u=t.createEditSession(a),c=new o(new l(e));c.setSession(u);var d={document:u,editor:c,onResize:c.resize.bind(c,null)};return s&&(d.textarea=s),i.addListener(window,"resize",d.onResize),c.on("destroy",function(){i.removeListener(window,"resize",d.onResize),d.editor.container.env=null}),c.container.env=c.env=d,c},t.createEditSession=function(e,t){var n=new a(e,t);return n.setUndoManager(new s),n},t.EditSession=a,t.UndoManager=s,t.version="1.2.2"}),function(){ace.acequire(["ace/ace"],function(e){e&&e.config.init(!0),window.ace||(window.ace=e);for(var t in e)e.hasOwnProperty(t)&&(window.ace[t]=e[t])})}(),e.exports=window.ace.acequire("ace/ace")},function(e,t){e.exports=function(){throw new Error("define cannot be used indirect")}},function(e,t){(function(t){function n(){if(t.Blob)try{return new Blob(["asdf"],{type:"text/plain"
}),Blob}catch(e){}var n=t.WebKitBlobBuilder||t.MozBlobBuilder||t.MSBlobBuilder;return function(e,t){var r=new n,i=t.endings,o=t.type;if(i)for(var a=0,s=e.length;a<s;++a)r.append(e[a],i);else for(var a=0,s=e.length;a<s;++a)r.append(e[a]);return o?r.getBlob(o):r.getBlob()}}e.exports=n()}).call(t,function(){return this}())},function(e,t,n){ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,o=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},o.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}]}};r.inherits(o,i),o.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},o.getStartRule=function(e){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:e}},o.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=o}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function r(){var e=s.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var r="/"==e.charAt(1)?2:1;return 1==r?(t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++):2==r&&t==this.nextState&&(n[1]--,(!n[1]||n[1]<0)&&(n.shift(),n.shift())),[{type:"meta.tag.punctuation."+(1==r?"":"end-")+"tag-open.xml",value:e.slice(0,r)},{type:"meta.tag.tag-name.xml",value:e.substr(r)}]},regex:"</?"+e,next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),2==e.length&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,{token:"entity.other.attribute-name.xml",regex:e},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},n,{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[n,{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]}],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}var i=e("../lib/oop"),o=e("./doc_comment_highlight_rules").DocCommentHighlightRules,a=e("./text_highlight_rules").TextHighlightRules,s="[a-zA-Z\\$_¡-][a-zA-Z\\d\\$_¡-]*\\b",l=function(e){var t=this.createKeywordMapper({"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},"identifier"),n="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",i="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)";this.$rules={no_regex:[{token:"comment",regex:"\\/\\/",next:"line_comment"},o.getStartRule("doc-start"),{token:"comment",regex:/\/\*/,next:"comment"},{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0[xX][0-9a-fA-F]+\b/},{token:"constant.numeric",regex:/[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/},{token:["storage.type","punctuation.operator","support.function","punctuation.operator","entity.name.function","text","keyword.operator"],regex:"("+s+")(\\.)(prototype)(\\.)("+s+")(\\s*)(=)",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+s+")(\\.)("+s+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+s+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+s+")(\\.)("+s+")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","entity.name.function","text","paren.lparen"],regex:"(function)(\\s+)("+s+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","paren.lparen"],regex:"("+s+")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"(?:"+n+")\\b",next:"start"},{token:["support.constant"],regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/},{token:t,regex:s},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+s+")(\\.)("+s+")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:s},{regex:"",token:"empty",next:"no_regex"}],start:[o.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment_regex_allowed"},{token:"comment",regex:"\\/\\/",next:"line_comment_regex_allowed"},{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],function_arguments:[{token:"variable.parameter",regex:s},{token:"punctuation.operator",regex:"[, ]+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],comment_regex_allowed:[o.getTagRule(),{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment",caseInsensitive:!0}],comment:[o.getTagRule(),{token:"comment",regex:"\\*\\/",next:"no_regex"},{defaultToken:"comment",caseInsensitive:!0}],line_comment_regex_allowed:[o.getTagRule(),{token:"comment",regex:"$|^",next:"start"},{defaultToken:"comment",caseInsensitive:!0}],line_comment:[o.getTagRule(),{token:"comment",regex:"$|^",next:"no_regex"},{defaultToken:"comment",caseInsensitive:!0}],qqstring:[{token:"constant.language.escape",regex:i},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:i},{token:"string",regex:"\\\\$",next:"qstring"},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},e&&e.noES6||(this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){return this.next="{"==e?this.nextState:"","{"==e&&n.length?(n.unshift("start",t),"paren"):"}"==e&&n.length&&(n.shift(),this.next=n.shift(),this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)?"paren.quasi.end":"{"==e?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:i},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]}),e&&e.noJSX||r.call(this)),this.embedRules(o,"doc-",[o.getEndRule("no_regex")]),this.normalizeRules()};i.inherits(l,a),t.JavaScriptHighlightRules=l}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var o=i[1].length,a=e.findMatchingBracket({row:t,column:o});if(!a||a.row==t)return 0;var s=this.$getIndent(e.getLine(a.row));e.replace(new r(t,0,t,o-1),s)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){"use strict";var r,i=e("../../lib/oop"),o=e("../behaviour").Behaviour,a=e("../../token_iterator").TokenIterator,s=e("../../lib/lang"),l=["text","paren.rparen","punctuation.operator"],u=["text","paren.rparen","punctuation.operator","comment"],c={},d=function(e){var t=-1;return e.multiSelect&&(t=e.selection.index,c.rangeCount!=e.multiSelect.rangeCount&&(c={rangeCount:e.multiSelect.rangeCount})),c[t]?r=c[t]:void(r=c[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""})},f=function(e,t,n,r){var i=e.end.row-e.start.row;return{text:n+t+r,selection:[0,e.start.column+1,i,e.end.column+(i?0:1)]}},p=function(){this.add("braces","insertion",function(e,t,n,i,o){var a=n.getCursorPosition(),l=i.doc.getLine(a.row);if("{"==o){d(n);var u=n.getSelectionRange(),c=i.doc.getTextRange(u);if(""!==c&&"{"!==c&&n.getWrapBehavioursEnabled())return f(u,c,"{","}");if(p.isSaneInsertion(n,i))return/[\]\}\)]/.test(l[a.column])||n.inMultiSelectMode?(p.recordAutoInsert(n,i,"}"),{text:"{}",selection:[1,1]}):(p.recordMaybeInsert(n,i,"{"),{text:"{",selection:[1,1]})}else if("}"==o){d(n);var h=l.substring(a.column,a.column+1);if("}"==h){var g=i.$findOpeningBracket("}",{column:a.column+1,row:a.row});if(null!==g&&p.isAutoInsertedClosing(a,l,o))return p.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else{if("\n"==o||"\r\n"==o){d(n);var m="";p.isMaybeInsertedClosing(a,l)&&(m=s.stringRepeat("}",r.maybeInsertedBrackets),p.clearMaybeInsertedClosing());var h=l.substring(a.column,a.column+1);if("}"===h){var v=i.findMatchingBracket({row:a.row,column:a.column+1},"}");if(!v)return null;var b=this.$getIndent(i.getLine(v.row))}else{if(!m)return void p.clearMaybeInsertedClosing();var b=this.$getIndent(l)}var y=b+i.getTabString();return{text:"\n"+y+"\n"+b+m,selection:[1,y.length,1,y.length]}}p.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(e,t,n,i,o){var a=i.doc.getTextRange(o);if(!o.isMultiLine()&&"{"==a){d(n);var s=i.doc.getLine(o.start.row),l=s.substring(o.end.column,o.end.column+1);if("}"==l)return o.end.column++,o;r.maybeInsertedBrackets--}}),this.add("parens","insertion",function(e,t,n,r,i){if("("==i){d(n);var o=n.getSelectionRange(),a=r.doc.getTextRange(o);if(""!==a&&n.getWrapBehavioursEnabled())return f(o,a,"(",")");if(p.isSaneInsertion(n,r))return p.recordAutoInsert(n,r,")"),{text:"()",selection:[1,1]}}else if(")"==i){d(n);var s=n.getCursorPosition(),l=r.doc.getLine(s.row),u=l.substring(s.column,s.column+1);if(")"==u){var c=r.$findOpeningBracket(")",{column:s.column+1,row:s.row});if(null!==c&&p.isAutoInsertedClosing(s,l,i))return p.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(e,t,n,r,i){var o=r.doc.getTextRange(i);if(!i.isMultiLine()&&"("==o){d(n);var a=r.doc.getLine(i.start.row),s=a.substring(i.start.column+1,i.start.column+2);if(")"==s)return i.end.column++,i}}),this.add("brackets","insertion",function(e,t,n,r,i){if("["==i){d(n);var o=n.getSelectionRange(),a=r.doc.getTextRange(o);if(""!==a&&n.getWrapBehavioursEnabled())return f(o,a,"[","]");if(p.isSaneInsertion(n,r))return p.recordAutoInsert(n,r,"]"),{text:"[]",selection:[1,1]}}else if("]"==i){d(n);var s=n.getCursorPosition(),l=r.doc.getLine(s.row),u=l.substring(s.column,s.column+1);if("]"==u){var c=r.$findOpeningBracket("]",{column:s.column+1,row:s.row});if(null!==c&&p.isAutoInsertedClosing(s,l,i))return p.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(e,t,n,r,i){var o=r.doc.getTextRange(i);if(!i.isMultiLine()&&"["==o){d(n);var a=r.doc.getLine(i.start.row),s=a.substring(i.start.column+1,i.start.column+2);if("]"==s)return i.end.column++,i}}),this.add("string_dquotes","insertion",function(e,t,n,r,i){if('"'==i||"'"==i){d(n);var o=i,a=n.getSelectionRange(),s=r.doc.getTextRange(a);if(""!==s&&"'"!==s&&'"'!=s&&n.getWrapBehavioursEnabled())return f(a,s,o,o);if(!s){var l=n.getCursorPosition(),u=r.doc.getLine(l.row),c=u.substring(l.column-1,l.column),p=u.substring(l.column,l.column+1),h=r.getTokenAt(l.row,l.column),g=r.getTokenAt(l.row,l.column+1);if("\\"==c&&h&&/escape/.test(h.type))return null;var m,v=h&&/string|escape/.test(h.type),b=!g||/string|escape/.test(g.type);if(p==o)m=v!==b;else{if(v&&!b)return null;if(v&&b)return null;var y=r.$mode.tokenRe;y.lastIndex=0;var w=y.test(c);y.lastIndex=0;var x=y.test(c);if(w||x)return null;if(p&&!/[\s;,.})\]\\]/.test(p))return null;m=!0}return{text:m?o+o:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var o=r.doc.getTextRange(i);if(!i.isMultiLine()&&('"'==o||"'"==o)){d(n);var a=r.doc.getLine(i.start.row),s=a.substring(i.start.column+1,i.start.column+2);if(s==o)return i.end.column++,i}})};p.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),r=new a(t,n.row,n.column);if(!this.$matchTokenType(r.getCurrentToken()||"text",l)){var i=new a(t,n.row,n.column+1);if(!this.$matchTokenType(i.getCurrentToken()||"text",l))return!1}return r.stepForward(),r.getCurrentTokenRow()!==n.row||this.$matchTokenType(r.getCurrentToken()||"text",u)},p.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},p.recordAutoInsert=function(e,t,n){var i=e.getCursorPosition(),o=t.doc.getLine(i.row);this.isAutoInsertedClosing(i,o,r.autoInsertedLineEnd[0])||(r.autoInsertedBrackets=0),r.autoInsertedRow=i.row,r.autoInsertedLineEnd=n+o.substr(i.column),r.autoInsertedBrackets++},p.recordMaybeInsert=function(e,t,n){var i=e.getCursorPosition(),o=t.doc.getLine(i.row);this.isMaybeInsertedClosing(i,o)||(r.maybeInsertedBrackets=0),r.maybeInsertedRow=i.row,r.maybeInsertedLineStart=o.substr(0,i.column)+n,r.maybeInsertedLineEnd=o.substr(i.column),r.maybeInsertedBrackets++},p.isAutoInsertedClosing=function(e,t,n){return r.autoInsertedBrackets>0&&e.row===r.autoInsertedRow&&n===r.autoInsertedLineEnd[0]&&t.substr(e.column)===r.autoInsertedLineEnd},p.isMaybeInsertedClosing=function(e,t){return r.maybeInsertedBrackets>0&&e.row===r.maybeInsertedRow&&t.substr(e.column)===r.maybeInsertedLineEnd&&t.substr(0,e.column)==r.maybeInsertedLineStart},p.popAutoInsertedClosing=function(){r.autoInsertedLineEnd=r.autoInsertedLineEnd.substr(1),r.autoInsertedBrackets--},p.clearMaybeInsertedClosing=function(){r&&(r.maybeInsertedBrackets=0,r.maybeInsertedRow=-1)},i.inherits(p,o),t.CstyleBehaviour=p}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,o=e("./fold_mode").FoldMode,a=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(a,o),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var o=i.match(this.foldingStartMarker);if(o){var a=o.index;if(o[1])return this.openingBracketBlock(e,o[1],n,a);var s=e.getCommentFoldRange(n,a+o[0].length,1);return s&&!s.isMultiLine()&&(r?s=this.getSectionRange(e,n):"all"!=t&&(s=null)),s}if("markbegin"!==t){var o=i.match(this.foldingStopMarker);if(o){var a=o.index+o[0].length;return o[1]?this.closingBracketBlock(e,o[1],n,a):e.getCommentFoldRange(n,a,-1)}}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),o=t,a=n.length;t+=1;for(var s=t,l=e.getLength();++t<l;){n=e.getLine(t);var u=n.search(/\S/);if(u!==-1){if(r>u)break;var c=this.getFoldWidgetRange(e,"all",t);if(c){if(c.start.row<=o)break;if(c.isMultiLine())t=c.end.row;else if(r==u)break}s=t}}return new i(o,a,s,e.getLine(s).length)},this.getCommentRegionBlock=function(e,t,n){for(var r=t.search(/\s*$/),o=e.getLength(),a=n,s=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,l=1;++n<o;){t=e.getLine(n);var u=s.exec(t);if(u&&(u[1]?l--:l++,!l))break}var c=n;if(c>a)return new i(a,r,c,t.length)}}.call(a.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(e,t,r){"use strict";var i=e("../lib/oop"),o=e("./text").Mode,a=e("./javascript_highlight_rules").JavaScriptHighlightRules,s=e("./matching_brace_outdent").MatchingBraceOutdent,l=(e("../range").Range,e("../worker/worker_client").WorkerClient),u=e("./behaviour/cstyle").CstyleBehaviour,c=e("./folding/cstyle").FoldMode,d=function(){this.HighlightRules=a,this.$outdent=new s,this.$behaviour=new u,this.foldingRules=new c};i.inherits(d,o),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),o=i.tokens,a=i.state;if(o.length&&"comment"==o[o.length-1].type)return r;if("start"==e||"no_regex"==e){var s=t.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);s&&(r+=n)}else if("doc-start"==e){if("start"==a||"no_regex"==a)return"";var s=t.match(/^\s*(\/?)\*/);s&&(s[1]&&(r+=" "),r+="* ")}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new l(["ace"],n(569),"JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript"}.call(d.prototype),t.Mode=d})},function(e,t){e.exports.id="ace/mode/javascript_worker",e.exports.src='"no use strict";(function(window){function resolveModuleId(id,paths){for(var testPath=id,tail="";testPath;){var alias=paths[testPath];if("string"==typeof alias)return alias+tail;if(alias)return alias.location.replace(/\\/*$/,"/")+(tail||alias.main||alias.name);if(alias===!1)return"";var i=testPath.lastIndexOf("/");if(-1===i)break;tail=testPath.substr(i)+tail,testPath=testPath.slice(0,i)}return id}if(!(void 0!==window.window&&window.document||window.acequire&&window.define)){window.console||(window.console=function(){var msgs=Array.prototype.slice.call(arguments,0);postMessage({type:"log",data:msgs})},window.console.error=window.console.warn=window.console.log=window.console.trace=window.console),window.window=window,window.ace=window,window.onerror=function(message,file,line,col,err){postMessage({type:"error",data:{message:message,data:err.data,file:file,line:line,col:col,stack:err.stack}})},window.normalizeModule=function(parentId,moduleName){if(-1!==moduleName.indexOf("!")){var chunks=moduleName.split("!");return window.normalizeModule(parentId,chunks[0])+"!"+window.normalizeModule(parentId,chunks[1])}if("."==moduleName.charAt(0)){var base=parentId.split("/").slice(0,-1).join("/");for(moduleName=(base?base+"/":"")+moduleName;-1!==moduleName.indexOf(".")&&previous!=moduleName;){var previous=moduleName;moduleName=moduleName.replace(/^\\.\\//,"").replace(/\\/\\.\\//,"/").replace(/[^\\/]+\\/\\.\\.\\//,"")}}return moduleName},window.acequire=function acequire(parentId,id){if(id||(id=parentId,parentId=null),!id.charAt)throw Error("worker.js acequire() accepts only (parentId, id) as arguments");id=window.normalizeModule(parentId,id);var module=window.acequire.modules[id];if(module)return module.initialized||(module.initialized=!0,module.exports=module.factory().exports),module.exports;if(!window.acequire.tlns)return console.log("unable to load "+id);var path=resolveModuleId(id,window.acequire.tlns);return".js"!=path.slice(-3)&&(path+=".js"),window.acequire.id=id,window.acequire.modules[id]={},importScripts(path),window.acequire(parentId,id)},window.acequire.modules={},window.acequire.tlns={},window.define=function(id,deps,factory){if(2==arguments.length?(factory=deps,"string"!=typeof id&&(deps=id,id=window.acequire.id)):1==arguments.length&&(factory=id,deps=[],id=window.acequire.id),"function"!=typeof factory)return window.acequire.modules[id]={exports:factory,initialized:!0},void 0;deps.length||(deps=["require","exports","module"]);var req=function(childId){return window.acequire(id,childId)};window.acequire.modules[id]={exports:{},factory:function(){var module=this,returnExports=factory.apply(this,deps.map(function(dep){switch(dep){case"require":return req;case"exports":return module.exports;case"module":return module;default:return req(dep)}}));return returnExports&&(module.exports=returnExports),module}}},window.define.amd={},acequire.tlns={},window.initBaseUrls=function(topLevelNamespaces){for(var i in topLevelNamespaces)acequire.tlns[i]=topLevelNamespaces[i]},window.initSender=function(){var EventEmitter=window.acequire("ace/lib/event_emitter").EventEmitter,oop=window.acequire("ace/lib/oop"),Sender=function(){};return function(){oop.implement(this,EventEmitter),this.callback=function(data,callbackId){postMessage({type:"call",id:callbackId,data:data})},this.emit=function(name,data){postMessage({type:"event",name:name,data:data})}}.call(Sender.prototype),new Sender};var main=window.main=null,sender=window.sender=null;window.onmessage=function(e){var msg=e.data;if(msg.event&&sender)sender._signal(msg.event,msg.data);else if(msg.command)if(main[msg.command])main[msg.command].apply(main,msg.args);else{if(!window[msg.command])throw Error("Unknown command:"+msg.command);window[msg.command].apply(window,msg.args)}else if(msg.init){window.initBaseUrls(msg.tlns),acequire("ace/lib/es5-shim"),sender=window.sender=window.initSender();var clazz=acequire(msg.module)[msg.classname];main=window.main=new clazz(sender)}}}})(this),ace.define("ace/lib/oop",["require","exports","module"],function(acequire,exports){"use strict";exports.inherits=function(ctor,superCtor){ctor.super_=superCtor,ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:!1,writable:!0,configurable:!0}})},exports.mixin=function(obj,mixin){for(var key in mixin)obj[key]=mixin[key];return obj},exports.implement=function(proto,mixin){exports.mixin(proto,mixin)}}),ace.define("ace/range",["require","exports","module"],function(acequire,exports){"use strict";var comparePoints=function(p1,p2){return p1.row-p2.row||p1.column-p2.column},Range=function(startRow,startColumn,endRow,endColumn){this.start={row:startRow,column:startColumn},this.end={row:endRow,column:endColumn}};(function(){this.isEqual=function(range){return this.start.row===range.start.row&&this.end.row===range.end.row&&this.start.column===range.start.column&&this.end.column===range.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(row,column){return 0==this.compare(row,column)},this.compareRange=function(range){var cmp,end=range.end,start=range.start;return cmp=this.compare(end.row,end.column),1==cmp?(cmp=this.compare(start.row,start.column),1==cmp?2:0==cmp?1:0):-1==cmp?-2:(cmp=this.compare(start.row,start.column),-1==cmp?-1:1==cmp?42:0)},this.comparePoint=function(p){return this.compare(p.row,p.column)},this.containsRange=function(range){return 0==this.comparePoint(range.start)&&0==this.comparePoint(range.end)},this.intersects=function(range){var cmp=this.compareRange(range);return-1==cmp||0==cmp||1==cmp},this.isEnd=function(row,column){return this.end.row==row&&this.end.column==column},this.isStart=function(row,column){return this.start.row==row&&this.start.column==column},this.setStart=function(row,column){"object"==typeof row?(this.start.column=row.column,this.start.row=row.row):(this.start.row=row,this.start.column=column)},this.setEnd=function(row,column){"object"==typeof row?(this.end.column=row.column,this.end.row=row.row):(this.end.row=row,this.end.column=column)},this.inside=function(row,column){return 0==this.compare(row,column)?this.isEnd(row,column)||this.isStart(row,column)?!1:!0:!1},this.insideStart=function(row,column){return 0==this.compare(row,column)?this.isEnd(row,column)?!1:!0:!1},this.insideEnd=function(row,column){return 0==this.compare(row,column)?this.isStart(row,column)?!1:!0:!1},this.compare=function(row,column){return this.isMultiLine()||row!==this.start.row?this.start.row>row?-1:row>this.end.row?1:this.start.row===row?column>=this.start.column?0:-1:this.end.row===row?this.end.column>=column?0:1:0:this.start.column>column?-1:column>this.end.column?1:0},this.compareStart=function(row,column){return this.start.row==row&&this.start.column==column?-1:this.compare(row,column)},this.compareEnd=function(row,column){return this.end.row==row&&this.end.column==column?1:this.compare(row,column)},this.compareInside=function(row,column){return this.end.row==row&&this.end.column==column?1:this.start.row==row&&this.start.column==column?-1:this.compare(row,column)},this.clipRows=function(firstRow,lastRow){if(this.end.row>lastRow)var end={row:lastRow+1,column:0};else if(firstRow>this.end.row)var end={row:firstRow,column:0};if(this.start.row>lastRow)var start={row:lastRow+1,column:0};else if(firstRow>this.start.row)var start={row:firstRow,column:0};return Range.fromPoints(start||this.start,end||this.end)},this.extend=function(row,column){var cmp=this.compare(row,column);if(0==cmp)return this;if(-1==cmp)var start={row:row,column:column};else var end={row:row,column:column};return Range.fromPoints(start||this.start,end||this.end)},this.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},this.isMultiLine=function(){return this.start.row!==this.end.row},this.clone=function(){return Range.fromPoints(this.start,this.end)},this.collapseRows=function(){return 0==this.end.column?new Range(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new Range(this.start.row,0,this.end.row,0)},this.toScreenRange=function(session){var screenPosStart=session.documentToScreenPosition(this.start),screenPosEnd=session.documentToScreenPosition(this.end);return new Range(screenPosStart.row,screenPosStart.column,screenPosEnd.row,screenPosEnd.column)},this.moveBy=function(row,column){this.start.row+=row,this.start.column+=column,this.end.row+=row,this.end.column+=column}}).call(Range.prototype),Range.fromPoints=function(start,end){return new Range(start.row,start.column,end.row,end.column)},Range.comparePoints=comparePoints,Range.comparePoints=function(p1,p2){return p1.row-p2.row||p1.column-p2.column},exports.Range=Range}),ace.define("ace/apply_delta",["require","exports","module"],function(acequire,exports){"use strict";exports.applyDelta=function(docLines,delta){var row=delta.start.row,startColumn=delta.start.column,line=docLines[row]||"";switch(delta.action){case"insert":var lines=delta.lines;if(1===lines.length)docLines[row]=line.substring(0,startColumn)+delta.lines[0]+line.substring(startColumn);else{var args=[row,1].concat(delta.lines);docLines.splice.apply(docLines,args),docLines[row]=line.substring(0,startColumn)+docLines[row],docLines[row+delta.lines.length-1]+=line.substring(startColumn)}break;case"remove":var endColumn=delta.end.column,endRow=delta.end.row;row===endRow?docLines[row]=line.substring(0,startColumn)+line.substring(endColumn):docLines.splice(row,endRow-row+1,line.substring(0,startColumn)+docLines[endRow].substring(endColumn))}}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(acequire,exports){"use strict";var EventEmitter={},stopPropagation=function(){this.propagationStopped=!0},preventDefault=function(){this.defaultPrevented=!0};EventEmitter._emit=EventEmitter._dispatchEvent=function(eventName,e){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var listeners=this._eventRegistry[eventName]||[],defaultHandler=this._defaultHandlers[eventName];if(listeners.length||defaultHandler){"object"==typeof e&&e||(e={}),e.type||(e.type=eventName),e.stopPropagation||(e.stopPropagation=stopPropagation),e.preventDefault||(e.preventDefault=preventDefault),listeners=listeners.slice();for(var i=0;listeners.length>i&&(listeners[i](e,this),!e.propagationStopped);i++);return defaultHandler&&!e.defaultPrevented?defaultHandler(e,this):void 0}},EventEmitter._signal=function(eventName,e){var listeners=(this._eventRegistry||{})[eventName];if(listeners){listeners=listeners.slice();for(var i=0;listeners.length>i;i++)listeners[i](e,this)}},EventEmitter.once=function(eventName,callback){var _self=this;callback&&this.addEventListener(eventName,function newCallback(){_self.removeEventListener(eventName,newCallback),callback.apply(null,arguments)})},EventEmitter.setDefaultHandler=function(eventName,callback){var handlers=this._defaultHandlers;if(handlers||(handlers=this._defaultHandlers={_disabled_:{}}),handlers[eventName]){var old=handlers[eventName],disabled=handlers._disabled_[eventName];disabled||(handlers._disabled_[eventName]=disabled=[]),disabled.push(old);var i=disabled.indexOf(callback);-1!=i&&disabled.splice(i,1)}handlers[eventName]=callback},EventEmitter.removeDefaultHandler=function(eventName,callback){var handlers=this._defaultHandlers;if(handlers){var disabled=handlers._disabled_[eventName];if(handlers[eventName]==callback)handlers[eventName],disabled&&this.setDefaultHandler(eventName,disabled.pop());else if(disabled){var i=disabled.indexOf(callback);-1!=i&&disabled.splice(i,1)}}},EventEmitter.on=EventEmitter.addEventListener=function(eventName,callback,capturing){this._eventRegistry=this._eventRegistry||{};var listeners=this._eventRegistry[eventName];return listeners||(listeners=this._eventRegistry[eventName]=[]),-1==listeners.indexOf(callback)&&listeners[capturing?"unshift":"push"](callback),callback},EventEmitter.off=EventEmitter.removeListener=EventEmitter.removeEventListener=function(eventName,callback){this._eventRegistry=this._eventRegistry||{};var listeners=this._eventRegistry[eventName];if(listeners){var index=listeners.indexOf(callback);-1!==index&&listeners.splice(index,1)}},EventEmitter.removeAllListeners=function(eventName){this._eventRegistry&&(this._eventRegistry[eventName]=[])},exports.EventEmitter=EventEmitter}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(acequire,exports){"use strict";var oop=acequire("./lib/oop"),EventEmitter=acequire("./lib/event_emitter").EventEmitter,Anchor=exports.Anchor=function(doc,row,column){this.$onChange=this.onChange.bind(this),this.attach(doc),column===void 0?this.setPosition(row.row,row.column):this.setPosition(row,column)};(function(){function $pointsInOrder(point1,point2,equalPointsInOrder){var bColIsAfter=equalPointsInOrder?point1.column<=point2.column:point1.column<point2.column;return point1.row<point2.row||point1.row==point2.row&&bColIsAfter}function $getTransformedPoint(delta,point,moveIfEqual){var deltaIsInsert="insert"==delta.action,deltaRowShift=(deltaIsInsert?1:-1)*(delta.end.row-delta.start.row),deltaColShift=(deltaIsInsert?1:-1)*(delta.end.column-delta.start.column),deltaStart=delta.start,deltaEnd=deltaIsInsert?deltaStart:delta.end;return $pointsInOrder(point,deltaStart,moveIfEqual)?{row:point.row,column:point.column}:$pointsInOrder(deltaEnd,point,!moveIfEqual)?{row:point.row+deltaRowShift,column:point.column+(point.row==deltaEnd.row?deltaColShift:0)}:{row:deltaStart.row,column:deltaStart.column}}oop.implement(this,EventEmitter),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.$insertRight=!1,this.onChange=function(delta){if(!(delta.start.row==delta.end.row&&delta.start.row!=this.row||delta.start.row>this.row)){var point=$getTransformedPoint(delta,{row:this.row,column:this.column},this.$insertRight);this.setPosition(point.row,point.column,!0)}},this.setPosition=function(row,column,noClip){var pos;if(pos=noClip?{row:row,column:column}:this.$clipPositionToDocument(row,column),this.row!=pos.row||this.column!=pos.column){var old={row:this.row,column:this.column};this.row=pos.row,this.column=pos.column,this._signal("change",{old:old,value:pos})}},this.detach=function(){this.document.removeEventListener("change",this.$onChange)},this.attach=function(doc){this.document=doc||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(row,column){var pos={};return row>=this.document.getLength()?(pos.row=Math.max(0,this.document.getLength()-1),pos.column=this.document.getLine(pos.row).length):0>row?(pos.row=0,pos.column=0):(pos.row=row,pos.column=Math.min(this.document.getLine(pos.row).length,Math.max(0,column))),0>column&&(pos.column=0),pos}}).call(Anchor.prototype)}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(acequire,exports){"use strict";var oop=acequire("./lib/oop"),applyDelta=acequire("./apply_delta").applyDelta,EventEmitter=acequire("./lib/event_emitter").EventEmitter,Range=acequire("./range").Range,Anchor=acequire("./anchor").Anchor,Document=function(textOrLines){this.$lines=[""],0===textOrLines.length?this.$lines=[""]:Array.isArray(textOrLines)?this.insertMergedLines({row:0,column:0},textOrLines):this.insert({row:0,column:0},textOrLines)};(function(){oop.implement(this,EventEmitter),this.setValue=function(text){var len=this.getLength()-1;this.remove(new Range(0,0,len,this.getLine(len).length)),this.insert({row:0,column:0},text)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(row,column){return new Anchor(this,row,column)},this.$split=0==="aaa".split(/a/).length?function(text){return text.replace(/\\r\\n|\\r/g,"\\n").split("\\n")}:function(text){return text.split(/\\r\\n|\\r|\\n/)},this.$detectNewLine=function(text){var match=text.match(/^.*?(\\r\\n|\\r|\\n)/m);this.$autoNewLine=match?match[1]:"\\n",this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\\r\\n";case"unix":return"\\n";default:return this.$autoNewLine||"\\n"}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(newLineMode){this.$newLineMode!==newLineMode&&(this.$newLineMode=newLineMode,this._signal("changeNewLineMode"))},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(text){return"\\r\\n"==text||"\\r"==text||"\\n"==text},this.getLine=function(row){return this.$lines[row]||""},this.getLines=function(firstRow,lastRow){return this.$lines.slice(firstRow,lastRow+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(range){return this.getLinesForRange(range).join(this.getNewLineCharacter())},this.getLinesForRange=function(range){var lines;if(range.start.row===range.end.row)lines=[this.getLine(range.start.row).substring(range.start.column,range.end.column)];else{lines=this.getLines(range.start.row,range.end.row),lines[0]=(lines[0]||"").substring(range.start.column);var l=lines.length-1;range.end.row-range.start.row==l&&(lines[l]=lines[l].substring(0,range.end.column))}return lines},this.insertLines=function(row,lines){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(row,lines)},this.removeLines=function(firstRow,lastRow){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(firstRow,lastRow)},this.insertNewLine=function(position){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, [\'\', \'\']) instead."),this.insertMergedLines(position,["",""])},this.insert=function(position,text){return 1>=this.getLength()&&this.$detectNewLine(text),this.insertMergedLines(position,this.$split(text))},this.insertInLine=function(position,text){var start=this.clippedPos(position.row,position.column),end=this.pos(position.row,position.column+text.length);return this.applyDelta({start:start,end:end,action:"insert",lines:[text]},!0),this.clonePos(end)},this.clippedPos=function(row,column){var length=this.getLength();void 0===row?row=length:0>row?row=0:row>=length&&(row=length-1,column=void 0);var line=this.getLine(row);return void 0==column&&(column=line.length),column=Math.min(Math.max(column,0),line.length),{row:row,column:column}},this.clonePos=function(pos){return{row:pos.row,column:pos.column}},this.pos=function(row,column){return{row:row,column:column}},this.$clipPosition=function(position){var length=this.getLength();return position.row>=length?(position.row=Math.max(0,length-1),position.column=this.getLine(length-1).length):(position.row=Math.max(0,position.row),position.column=Math.min(Math.max(position.column,0),this.getLine(position.row).length)),position},this.insertFullLines=function(row,lines){row=Math.min(Math.max(row,0),this.getLength());var column=0;this.getLength()>row?(lines=lines.concat([""]),column=0):(lines=[""].concat(lines),row--,column=this.$lines[row].length),this.insertMergedLines({row:row,column:column},lines)},this.insertMergedLines=function(position,lines){var start=this.clippedPos(position.row,position.column),end={row:start.row+lines.length-1,column:(1==lines.length?start.column:0)+lines[lines.length-1].length};return this.applyDelta({start:start,end:end,action:"insert",lines:lines}),this.clonePos(end)},this.remove=function(range){var start=this.clippedPos(range.start.row,range.start.column),end=this.clippedPos(range.end.row,range.end.column);return this.applyDelta({start:start,end:end,action:"remove",lines:this.getLinesForRange({start:start,end:end})}),this.clonePos(start)},this.removeInLine=function(row,startColumn,endColumn){var start=this.clippedPos(row,startColumn),end=this.clippedPos(row,endColumn);return this.applyDelta({start:start,end:end,action:"remove",lines:this.getLinesForRange({start:start,end:end})},!0),this.clonePos(start)},this.removeFullLines=function(firstRow,lastRow){firstRow=Math.min(Math.max(0,firstRow),this.getLength()-1),lastRow=Math.min(Math.max(0,lastRow),this.getLength()-1);var deleteFirstNewLine=lastRow==this.getLength()-1&&firstRow>0,deleteLastNewLine=this.getLength()-1>lastRow,startRow=deleteFirstNewLine?firstRow-1:firstRow,startCol=deleteFirstNewLine?this.getLine(startRow).length:0,endRow=deleteLastNewLine?lastRow+1:lastRow,endCol=deleteLastNewLine?0:this.getLine(endRow).length,range=new Range(startRow,startCol,endRow,endCol),deletedLines=this.$lines.slice(firstRow,lastRow+1);return this.applyDelta({start:range.start,end:range.end,action:"remove",lines:this.getLinesForRange(range)}),deletedLines},this.removeNewLine=function(row){this.getLength()-1>row&&row>=0&&this.applyDelta({start:this.pos(row,this.getLine(row).length),end:this.pos(row+1,0),action:"remove",lines:["",""]})},this.replace=function(range,text){if(range instanceof Range||(range=Range.fromPoints(range.start,range.end)),0===text.length&&range.isEmpty())return range.start;if(text==this.getTextRange(range))return range.end;this.remove(range);var end;return end=text?this.insert(range.start,text):range.start},this.applyDeltas=function(deltas){for(var i=0;deltas.length>i;i++)this.applyDelta(deltas[i])},this.revertDeltas=function(deltas){for(var i=deltas.length-1;i>=0;i--)this.revertDelta(deltas[i])},this.applyDelta=function(delta,doNotValidate){var isInsert="insert"==delta.action;(isInsert?1>=delta.lines.length&&!delta.lines[0]:!Range.comparePoints(delta.start,delta.end))||(isInsert&&delta.lines.length>2e4&&this.$splitAndapplyLargeDelta(delta,2e4),applyDelta(this.$lines,delta,doNotValidate),this._signal("change",delta))},this.$splitAndapplyLargeDelta=function(delta,MAX){for(var lines=delta.lines,l=lines.length,row=delta.start.row,column=delta.start.column,from=0,to=0;;){from=to,to+=MAX-1;var chunk=lines.slice(from,to);if(to>l){delta.lines=chunk,delta.start.row=row+from,delta.start.column=column;break}chunk.push(""),this.applyDelta({start:this.pos(row+from,column),end:this.pos(row+to,column=0),action:delta.action,lines:chunk},!0)}},this.revertDelta=function(delta){this.applyDelta({start:this.clonePos(delta.start),end:this.clonePos(delta.end),action:"insert"==delta.action?"remove":"insert",lines:delta.lines.slice()})},this.indexToPosition=function(index,startRow){for(var lines=this.$lines||this.getAllLines(),newlineLength=this.getNewLineCharacter().length,i=startRow||0,l=lines.length;l>i;i++)if(index-=lines[i].length+newlineLength,0>index)return{row:i,column:index+lines[i].length+newlineLength};return{row:l-1,column:lines[l-1].length}},this.positionToIndex=function(pos,startRow){for(var lines=this.$lines||this.getAllLines(),newlineLength=this.getNewLineCharacter().length,index=0,row=Math.min(pos.row,lines.length),i=startRow||0;row>i;++i)index+=lines[i].length+newlineLength;return index+pos.column}}).call(Document.prototype),exports.Document=Document}),ace.define("ace/lib/lang",["require","exports","module"],function(acequire,exports){"use strict";exports.last=function(a){return a[a.length-1]},exports.stringReverse=function(string){return string.split("").reverse().join("")},exports.stringRepeat=function(string,count){for(var result="";count>0;)1&count&&(result+=string),(count>>=1)&&(string+=string);return result};var trimBeginRegexp=/^\\s\\s*/,trimEndRegexp=/\\s\\s*$/;exports.stringTrimLeft=function(string){return string.replace(trimBeginRegexp,"")},exports.stringTrimRight=function(string){return string.replace(trimEndRegexp,"")},exports.copyObject=function(obj){var copy={};for(var key in obj)copy[key]=obj[key];return copy},exports.copyArray=function(array){for(var copy=[],i=0,l=array.length;l>i;i++)copy[i]=array[i]&&"object"==typeof array[i]?this.copyObject(array[i]):array[i];return copy},exports.deepCopy=function deepCopy(obj){if("object"!=typeof obj||!obj)return obj;var copy;if(Array.isArray(obj)){copy=[];for(var key=0;obj.length>key;key++)copy[key]=deepCopy(obj[key]);return copy}var cons=obj.constructor;if(cons===RegExp)return obj;copy=cons();for(var key in obj)copy[key]=deepCopy(obj[key]);return copy},exports.arrayToMap=function(arr){for(var map={},i=0;arr.length>i;i++)map[arr[i]]=1;return map},exports.createMap=function(props){var map=Object.create(null);for(var i in props)map[i]=props[i];return map},exports.arrayRemove=function(array,value){for(var i=0;array.length>=i;i++)value===array[i]&&array.splice(i,1)},exports.escapeRegExp=function(str){return str.replace(/([.*+?^${}()|[\\]\\/\\\\])/g,"\\\\$1")},exports.escapeHTML=function(str){return str.replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/\'/g,"&#39;").replace(/</g,"&#60;")},exports.getMatchOffsets=function(string,regExp){var matches=[];return string.replace(regExp,function(str){matches.push({offset:arguments[arguments.length-2],length:str.length})}),matches},exports.deferredCall=function(fcn){var timer=null,callback=function(){timer=null,fcn()},deferred=function(timeout){return deferred.cancel(),timer=setTimeout(callback,timeout||0),deferred};return deferred.schedule=deferred,deferred.call=function(){return this.cancel(),fcn(),deferred},deferred.cancel=function(){return clearTimeout(timer),timer=null,deferred},deferred.isPending=function(){return timer},deferred},exports.delayedCall=function(fcn,defaultTimeout){var timer=null,callback=function(){timer=null,fcn()},_self=function(timeout){null==timer&&(timer=setTimeout(callback,timeout||defaultTimeout))};return _self.delay=function(timeout){timer&&clearTimeout(timer),timer=setTimeout(callback,timeout||defaultTimeout)},_self.schedule=_self,_self.call=function(){this.cancel(),fcn()},_self.cancel=function(){timer&&clearTimeout(timer),timer=null},_self.isPending=function(){return timer},_self}}),ace.define("ace/worker/mirror",["require","exports","module","ace/range","ace/document","ace/lib/lang"],function(acequire,exports){"use strict";acequire("../range").Range;var Document=acequire("../document").Document,lang=acequire("../lib/lang"),Mirror=exports.Mirror=function(sender){this.sender=sender;var doc=this.doc=new Document(""),deferredUpdate=this.deferredUpdate=lang.delayedCall(this.onUpdate.bind(this)),_self=this;sender.on("change",function(e){var data=e.data;if(data[0].start)doc.applyDeltas(data);else for(var i=0;data.length>i;i+=2){if(Array.isArray(data[i+1]))var d={action:"insert",start:data[i],lines:data[i+1]};else var d={action:"remove",start:data[i],end:data[i+1]};doc.applyDelta(d,!0)}return _self.$timeout?deferredUpdate.schedule(_self.$timeout):(_self.onUpdate(),void 0)})};(function(){this.$timeout=500,this.setTimeout=function(timeout){this.$timeout=timeout},this.setValue=function(value){this.doc.setValue(value),this.deferredUpdate.schedule(this.$timeout)},this.getValue=function(callbackId){this.sender.callback(this.doc.getValue(),callbackId)},this.onUpdate=function(){},this.isPending=function(){return this.deferredUpdate.isPending()}}).call(Mirror.prototype)}),ace.define("ace/mode/javascript/jshint",["require","exports","module"],function(acequire,exports,module){module.exports=function outer(modules,cache,entry){function newRequire(name,jumped){if(!cache[name]){if(!modules[name]){var currentRequire="function"==typeof acequire&&acequire;if(!jumped&&currentRequire)return currentRequire(name,!0);if(previousRequire)return previousRequire(name,!0);var err=Error("Cannot find module \'"+name+"\'");throw err.code="MODULE_NOT_FOUND",err}var m=cache[name]={exports:{}};modules[name][0].call(m.exports,function(x){var id=modules[name][1][x];return newRequire(id?id:x)},m,m.exports,outer,modules,cache,entry)}return cache[name].exports}for(var previousRequire="function"==typeof acequire&&acequire,i=0;entry.length>i;i++)newRequire(entry[i]);return newRequire(entry[0])}({"/node_modules/browserify/node_modules/events/events.js":[function(_dereq_,module){function EventEmitter(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function isFunction(arg){return"function"==typeof arg}function isNumber(arg){return"number"==typeof arg}function isObject(arg){return"object"==typeof arg&&null!==arg}function isUndefined(arg){return void 0===arg}module.exports=EventEmitter,EventEmitter.EventEmitter=EventEmitter,EventEmitter.prototype._events=void 0,EventEmitter.prototype._maxListeners=void 0,EventEmitter.defaultMaxListeners=10,EventEmitter.prototype.setMaxListeners=function(n){if(!isNumber(n)||0>n||isNaN(n))throw TypeError("n must be a positive number");return this._maxListeners=n,this},EventEmitter.prototype.emit=function(type){var er,handler,len,args,i,listeners;if(this._events||(this._events={}),"error"===type&&(!this._events.error||isObject(this._events.error)&&!this._events.error.length)){if(er=arguments[1],er instanceof Error)throw er;throw TypeError(\'Uncaught, unspecified "error" event.\')}if(handler=this._events[type],isUndefined(handler))return!1;if(isFunction(handler))switch(arguments.length){case 1:handler.call(this);break;case 2:handler.call(this,arguments[1]);break;case 3:handler.call(this,arguments[1],arguments[2]);break;default:for(len=arguments.length,args=Array(len-1),i=1;len>i;i++)args[i-1]=arguments[i];handler.apply(this,args)}else if(isObject(handler)){for(len=arguments.length,args=Array(len-1),i=1;len>i;i++)args[i-1]=arguments[i];for(listeners=handler.slice(),len=listeners.length,i=0;len>i;i++)listeners[i].apply(this,args)}return!0},EventEmitter.prototype.addListener=function(type,listener){var m;if(!isFunction(listener))throw TypeError("listener must be a function");if(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",type,isFunction(listener.listener)?listener.listener:listener),this._events[type]?isObject(this._events[type])?this._events[type].push(listener):this._events[type]=[this._events[type],listener]:this._events[type]=listener,isObject(this._events[type])&&!this._events[type].warned){var m;m=isUndefined(this._maxListeners)?EventEmitter.defaultMaxListeners:this._maxListeners,m&&m>0&&this._events[type].length>m&&(this._events[type].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[type].length),"function"==typeof console.trace&&console.trace())}return this},EventEmitter.prototype.on=EventEmitter.prototype.addListener,EventEmitter.prototype.once=function(type,listener){function g(){this.removeListener(type,g),fired||(fired=!0,listener.apply(this,arguments))}if(!isFunction(listener))throw TypeError("listener must be a function");var fired=!1;return g.listener=listener,this.on(type,g),this},EventEmitter.prototype.removeListener=function(type,listener){var list,position,length,i;if(!isFunction(listener))throw TypeError("listener must be a function");if(!this._events||!this._events[type])return this;if(list=this._events[type],length=list.length,position=-1,list===listener||isFunction(list.listener)&&list.listener===listener)delete this._events[type],this._events.removeListener&&this.emit("removeListener",type,listener);else if(isObject(list)){for(i=length;i-->0;)if(list[i]===listener||list[i].listener&&list[i].listener===listener){position=i;break}if(0>position)return this;1===list.length?(list.length=0,delete this._events[type]):list.splice(position,1),this._events.removeListener&&this.emit("removeListener",type,listener)}return this},EventEmitter.prototype.removeAllListeners=function(type){var key,listeners;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[type]&&delete this._events[type],this;if(0===arguments.length){for(key in this._events)"removeListener"!==key&&this.removeAllListeners(key);return this.removeAllListeners("removeListener"),this._events={},this\n}if(listeners=this._events[type],isFunction(listeners))this.removeListener(type,listeners);else for(;listeners.length;)this.removeListener(type,listeners[listeners.length-1]);return delete this._events[type],this},EventEmitter.prototype.listeners=function(type){var ret;return ret=this._events&&this._events[type]?isFunction(this._events[type])?[this._events[type]]:this._events[type].slice():[]},EventEmitter.listenerCount=function(emitter,type){var ret;return ret=emitter._events&&emitter._events[type]?isFunction(emitter._events[type])?1:emitter._events[type].length:0}},{}],"/node_modules/jshint/data/ascii-identifier-data.js":[function(_dereq_,module){for(var identifierStartTable=[],i=0;128>i;i++)identifierStartTable[i]=36===i||i>=65&&90>=i||95===i||i>=97&&122>=i;for(var identifierPartTable=[],i=0;128>i;i++)identifierPartTable[i]=identifierStartTable[i]||i>=48&&57>=i;module.exports={asciiIdentifierStartTable:identifierStartTable,asciiIdentifierPartTable:identifierPartTable}},{}],"/node_modules/jshint/lodash.js":[function(_dereq_,module,exports){(function(global){(function(){function baseFindIndex(array,predicate,fromRight){for(var length=array.length,index=fromRight?length:-1;fromRight?index--:length>++index;)if(predicate(array[index],index,array))return index;return-1}function baseIndexOf(array,value,fromIndex){if(value!==value)return indexOfNaN(array,fromIndex);for(var index=fromIndex-1,length=array.length;length>++index;)if(array[index]===value)return index;return-1}function baseIsFunction(value){return"function"==typeof value||!1}function baseToString(value){return"string"==typeof value?value:null==value?"":value+""}function indexOfNaN(array,fromIndex,fromRight){for(var length=array.length,index=fromIndex+(fromRight?0:-1);fromRight?index--:length>++index;){var other=array[index];if(other!==other)return index}return-1}function isObjectLike(value){return!!value&&"object"==typeof value}function lodash(){}function arrayCopy(source,array){var index=-1,length=source.length;for(array||(array=Array(length));length>++index;)array[index]=source[index];return array}function arrayEach(array,iteratee){for(var index=-1,length=array.length;length>++index&&iteratee(array[index],index,array)!==!1;);return array}function arrayFilter(array,predicate){for(var index=-1,length=array.length,resIndex=-1,result=[];length>++index;){var value=array[index];predicate(value,index,array)&&(result[++resIndex]=value)}return result}function arrayMap(array,iteratee){for(var index=-1,length=array.length,result=Array(length);length>++index;)result[index]=iteratee(array[index],index,array);return result}function arrayMax(array){for(var index=-1,length=array.length,result=NEGATIVE_INFINITY;length>++index;){var value=array[index];value>result&&(result=value)}return result}function arraySome(array,predicate){for(var index=-1,length=array.length;length>++index;)if(predicate(array[index],index,array))return!0;return!1}function assignWith(object,source,customizer){var props=keys(source);push.apply(props,getSymbols(source));for(var index=-1,length=props.length;length>++index;){var key=props[index],value=object[key],result=customizer(value,source[key],key,object,source);(result===result?result===value:value!==value)&&(value!==undefined||key in object)||(object[key]=result)}return object}function baseCopy(source,props,object){object||(object={});for(var index=-1,length=props.length;length>++index;){var key=props[index];object[key]=source[key]}return object}function baseCallback(func,thisArg,argCount){var type=typeof func;return"function"==type?thisArg===undefined?func:bindCallback(func,thisArg,argCount):null==func?identity:"object"==type?baseMatches(func):thisArg===undefined?property(func):baseMatchesProperty(func,thisArg)}function baseClone(value,isDeep,customizer,key,object,stackA,stackB){var result;if(customizer&&(result=object?customizer(value,key,object):customizer(value)),result!==undefined)return result;if(!isObject(value))return value;var isArr=isArray(value);if(isArr){if(result=initCloneArray(value),!isDeep)return arrayCopy(value,result)}else{var tag=objToString.call(value),isFunc=tag==funcTag;if(tag!=objectTag&&tag!=argsTag&&(!isFunc||object))return cloneableTags[tag]?initCloneByTag(value,tag,isDeep):object?value:{};if(result=initCloneObject(isFunc?{}:value),!isDeep)return baseAssign(result,value)}stackA||(stackA=[]),stackB||(stackB=[]);for(var length=stackA.length;length--;)if(stackA[length]==value)return stackB[length];return stackA.push(value),stackB.push(result),(isArr?arrayEach:baseForOwn)(value,function(subValue,key){result[key]=baseClone(subValue,isDeep,customizer,key,value,stackA,stackB)}),result}function baseFilter(collection,predicate){var result=[];return baseEach(collection,function(value,index,collection){predicate(value,index,collection)&&result.push(value)}),result}function baseForIn(object,iteratee){return baseFor(object,iteratee,keysIn)}function baseForOwn(object,iteratee){return baseFor(object,iteratee,keys)}function baseGet(object,path,pathKey){if(null!=object){pathKey!==undefined&&pathKey in toObject(object)&&(path=[pathKey]);for(var index=-1,length=path.length;null!=object&&length>++index;)var result=object=object[path[index]];return result}}function baseIsEqual(value,other,customizer,isLoose,stackA,stackB){if(value===other)return 0!==value||1/value==1/other;var valType=typeof value,othType=typeof other;return"function"!=valType&&"object"!=valType&&"function"!=othType&&"object"!=othType||null==value||null==other?value!==value&&other!==other:baseIsEqualDeep(value,other,baseIsEqual,customizer,isLoose,stackA,stackB)}function baseIsEqualDeep(object,other,equalFunc,customizer,isLoose,stackA,stackB){var objIsArr=isArray(object),othIsArr=isArray(other),objTag=arrayTag,othTag=arrayTag;objIsArr||(objTag=objToString.call(object),objTag==argsTag?objTag=objectTag:objTag!=objectTag&&(objIsArr=isTypedArray(object))),othIsArr||(othTag=objToString.call(other),othTag==argsTag?othTag=objectTag:othTag!=objectTag&&(othIsArr=isTypedArray(other)));var objIsObj=objTag==objectTag,othIsObj=othTag==objectTag,isSameTag=objTag==othTag;if(isSameTag&&!objIsArr&&!objIsObj)return equalByTag(object,other,objTag);if(!isLoose){var valWrapped=objIsObj&&hasOwnProperty.call(object,"__wrapped__"),othWrapped=othIsObj&&hasOwnProperty.call(other,"__wrapped__");if(valWrapped||othWrapped)return equalFunc(valWrapped?object.value():object,othWrapped?other.value():other,customizer,isLoose,stackA,stackB)}if(!isSameTag)return!1;stackA||(stackA=[]),stackB||(stackB=[]);for(var length=stackA.length;length--;)if(stackA[length]==object)return stackB[length]==other;stackA.push(object),stackB.push(other);var result=(objIsArr?equalArrays:equalObjects)(object,other,equalFunc,customizer,isLoose,stackA,stackB);return stackA.pop(),stackB.pop(),result}function baseIsMatch(object,props,values,strictCompareFlags,customizer){for(var index=-1,length=props.length,noCustomizer=!customizer;length>++index;)if(noCustomizer&&strictCompareFlags[index]?values[index]!==object[props[index]]:!(props[index]in object))return!1;for(index=-1;length>++index;){var key=props[index],objValue=object[key],srcValue=values[index];if(noCustomizer&&strictCompareFlags[index])var result=objValue!==undefined||key in object;else result=customizer?customizer(objValue,srcValue,key):undefined,result===undefined&&(result=baseIsEqual(srcValue,objValue,customizer,!0));if(!result)return!1}return!0}function baseMatches(source){var props=keys(source),length=props.length;if(!length)return constant(!0);if(1==length){var key=props[0],value=source[key];if(isStrictComparable(value))return function(object){return null==object?!1:object[key]===value&&(value!==undefined||key in toObject(object))}}for(var values=Array(length),strictCompareFlags=Array(length);length--;)value=source[props[length]],values[length]=value,strictCompareFlags[length]=isStrictComparable(value);return function(object){return null!=object&&baseIsMatch(toObject(object),props,values,strictCompareFlags)}}function baseMatchesProperty(path,value){var isArr=isArray(path),isCommon=isKey(path)&&isStrictComparable(value),pathKey=path+"";return path=toPath(path),function(object){if(null==object)return!1;var key=pathKey;if(object=toObject(object),!(!isArr&&isCommon||key in object)){if(object=1==path.length?object:baseGet(object,baseSlice(path,0,-1)),null==object)return!1;key=last(path),object=toObject(object)}return object[key]===value?value!==undefined||key in object:baseIsEqual(value,object[key],null,!0)}}function baseMerge(object,source,customizer,stackA,stackB){if(!isObject(object))return object;var isSrcArr=isLength(source.length)&&(isArray(source)||isTypedArray(source));if(!isSrcArr){var props=keys(source);push.apply(props,getSymbols(source))}return arrayEach(props||source,function(srcValue,key){if(props&&(key=srcValue,srcValue=source[key]),isObjectLike(srcValue))stackA||(stackA=[]),stackB||(stackB=[]),baseMergeDeep(object,source,key,baseMerge,customizer,stackA,stackB);else{var value=object[key],result=customizer?customizer(value,srcValue,key,object,source):undefined,isCommon=result===undefined;isCommon&&(result=srcValue),!isSrcArr&&result===undefined||!isCommon&&(result===result?result===value:value!==value)||(object[key]=result)}}),object}function baseMergeDeep(object,source,key,mergeFunc,customizer,stackA,stackB){for(var length=stackA.length,srcValue=source[key];length--;)if(stackA[length]==srcValue)return object[key]=stackB[length],undefined;var value=object[key],result=customizer?customizer(value,srcValue,key,object,source):undefined,isCommon=result===undefined;isCommon&&(result=srcValue,isLength(srcValue.length)&&(isArray(srcValue)||isTypedArray(srcValue))?result=isArray(value)?value:getLength(value)?arrayCopy(value):[]:isPlainObject(srcValue)||isArguments(srcValue)?result=isArguments(value)?toPlainObject(value):isPlainObject(value)?value:{}:isCommon=!1),stackA.push(srcValue),stackB.push(result),isCommon?object[key]=mergeFunc(result,srcValue,customizer,stackA,stackB):(result===result?result!==value:value===value)&&(object[key]=result)}function baseProperty(key){return function(object){return null==object?undefined:object[key]}}function basePropertyDeep(path){var pathKey=path+"";return path=toPath(path),function(object){return baseGet(object,path,pathKey)}}function baseSlice(array,start,end){var index=-1,length=array.length;start=null==start?0:+start||0,0>start&&(start=-start>length?0:length+start),end=end===undefined||end>length?length:+end||0,0>end&&(end+=length),length=start>end?0:end-start>>>0,start>>>=0;for(var result=Array(length);length>++index;)result[index]=array[index+start];return result}function baseSome(collection,predicate){var result;return baseEach(collection,function(value,index,collection){return result=predicate(value,index,collection),!result}),!!result}function baseValues(object,props){for(var index=-1,length=props.length,result=Array(length);length>++index;)result[index]=object[props[index]];return result}function binaryIndex(array,value,retHighest){var low=0,high=array?array.length:low;if("number"==typeof value&&value===value&&HALF_MAX_ARRAY_LENGTH>=high){for(;high>low;){var mid=low+high>>>1,computed=array[mid];(retHighest?value>=computed:value>computed)?low=mid+1:high=mid}return high}return binaryIndexBy(array,value,identity,retHighest)}function binaryIndexBy(array,value,iteratee,retHighest){value=iteratee(value);for(var low=0,high=array?array.length:0,valIsNaN=value!==value,valIsUndef=value===undefined;high>low;){var mid=floor((low+high)/2),computed=iteratee(array[mid]),isReflexive=computed===computed;if(valIsNaN)var setLow=isReflexive||retHighest;else setLow=valIsUndef?isReflexive&&(retHighest||computed!==undefined):retHighest?value>=computed:value>computed;setLow?low=mid+1:high=mid}return nativeMin(high,MAX_ARRAY_INDEX)}function bindCallback(func,thisArg,argCount){if("function"!=typeof func)return identity;if(thisArg===undefined)return func;switch(argCount){case 1:return function(value){return func.call(thisArg,value)};case 3:return function(value,index,collection){return func.call(thisArg,value,index,collection)};case 4:return function(accumulator,value,index,collection){return func.call(thisArg,accumulator,value,index,collection)};case 5:return function(value,other,key,object,source){return func.call(thisArg,value,other,key,object,source)}}return function(){return func.apply(thisArg,arguments)}}function bufferClone(buffer){return bufferSlice.call(buffer,0)}function createAssigner(assigner){return restParam(function(object,sources){var index=-1,length=null==object?0:sources.length,customizer=length>2&&sources[length-2],guard=length>2&&sources[2],thisArg=length>1&&sources[length-1];for("function"==typeof customizer?(customizer=bindCallback(customizer,thisArg,5),length-=2):(customizer="function"==typeof thisArg?thisArg:null,length-=customizer?1:0),guard&&isIterateeCall(sources[0],sources[1],guard)&&(customizer=3>length?null:customizer,length=1);length>++index;){var source=sources[index];source&&assigner(object,source,customizer)}return object})}function createBaseEach(eachFunc,fromRight){return function(collection,iteratee){var length=collection?getLength(collection):0;if(!isLength(length))return eachFunc(collection,iteratee);for(var index=fromRight?length:-1,iterable=toObject(collection);(fromRight?index--:length>++index)&&iteratee(iterable[index],index,iterable)!==!1;);return collection}}function createBaseFor(fromRight){return function(object,iteratee,keysFunc){for(var iterable=toObject(object),props=keysFunc(object),length=props.length,index=fromRight?length:-1;fromRight?index--:length>++index;){var key=props[index];if(iteratee(iterable[key],key,iterable)===!1)break}return object}}function createFindIndex(fromRight){return function(array,predicate,thisArg){return array&&array.length?(predicate=getCallback(predicate,thisArg,3),baseFindIndex(array,predicate,fromRight)):-1}}function createForEach(arrayFunc,eachFunc){return function(collection,iteratee,thisArg){return"function"==typeof iteratee&&thisArg===undefined&&isArray(collection)?arrayFunc(collection,iteratee):eachFunc(collection,bindCallback(iteratee,thisArg,3))}}function equalArrays(array,other,equalFunc,customizer,isLoose,stackA,stackB){var index=-1,arrLength=array.length,othLength=other.length,result=!0;if(arrLength!=othLength&&!(isLoose&&othLength>arrLength))return!1;for(;result&&arrLength>++index;){var arrValue=array[index],othValue=other[index];if(result=undefined,customizer&&(result=isLoose?customizer(othValue,arrValue,index):customizer(arrValue,othValue,index)),result===undefined)if(isLoose)for(var othIndex=othLength;othIndex--&&(othValue=other[othIndex],!(result=arrValue&&arrValue===othValue||equalFunc(arrValue,othValue,customizer,isLoose,stackA,stackB))););else result=arrValue&&arrValue===othValue||equalFunc(arrValue,othValue,customizer,isLoose,stackA,stackB)}return!!result}function equalByTag(object,other,tag){switch(tag){case boolTag:case dateTag:return+object==+other;case errorTag:return object.name==other.name&&object.message==other.message;case numberTag:return object!=+object?other!=+other:0==object?1/object==1/other:object==+other;case regexpTag:case stringTag:return object==other+""}return!1}function equalObjects(object,other,equalFunc,customizer,isLoose,stackA,stackB){var objProps=keys(object),objLength=objProps.length,othProps=keys(other),othLength=othProps.length;if(objLength!=othLength&&!isLoose)return!1;for(var skipCtor=isLoose,index=-1;objLength>++index;){var key=objProps[index],result=isLoose?key in other:hasOwnProperty.call(other,key);if(result){var objValue=object[key],othValue=other[key];result=undefined,customizer&&(result=isLoose?customizer(othValue,objValue,key):customizer(objValue,othValue,key)),result===undefined&&(result=objValue&&objValue===othValue||equalFunc(objValue,othValue,customizer,isLoose,stackA,stackB))}if(!result)return!1;skipCtor||(skipCtor="constructor"==key)}if(!skipCtor){var objCtor=object.constructor,othCtor=other.constructor;if(objCtor!=othCtor&&"constructor"in object&&"constructor"in other&&!("function"==typeof objCtor&&objCtor instanceof objCtor&&"function"==typeof othCtor&&othCtor instanceof othCtor))return!1}return!0}function getCallback(func,thisArg,argCount){var result=lodash.callback||callback;return result=result===callback?baseCallback:result,argCount?result(func,thisArg,argCount):result}function getIndexOf(collection,target,fromIndex){var result=lodash.indexOf||indexOf;return result=result===indexOf?baseIndexOf:result,collection?result(collection,target,fromIndex):result}function initCloneArray(array){var length=array.length,result=new array.constructor(length);return length&&"string"==typeof array[0]&&hasOwnProperty.call(array,"index")&&(result.index=array.index,result.input=array.input),result}function initCloneObject(object){var Ctor=object.constructor;return"function"==typeof Ctor&&Ctor instanceof Ctor||(Ctor=Object),new Ctor}function initCloneByTag(object,tag,isDeep){var Ctor=object.constructor;switch(tag){case arrayBufferTag:return bufferClone(object);case boolTag:case dateTag:return new Ctor(+object);case float32Tag:case float64Tag:case int8Tag:case int16Tag:case int32Tag:case uint8Tag:case uint8ClampedTag:case uint16Tag:case uint32Tag:var buffer=object.buffer;return new Ctor(isDeep?bufferClone(buffer):buffer,object.byteOffset,object.length);case numberTag:case stringTag:return new Ctor(object);case regexpTag:var result=new Ctor(object.source,reFlags.exec(object));result.lastIndex=object.lastIndex}return result}function isIndex(value,length){return value=+value,length=null==length?MAX_SAFE_INTEGER:length,value>-1&&0==value%1&&length>value}function isIterateeCall(value,index,object){if(!isObject(object))return!1;var type=typeof index;if("number"==type)var length=getLength(object),prereq=isLength(length)&&isIndex(index,length);else prereq="string"==type&&index in object;if(prereq){var other=object[index];return value===value?value===other:other!==other}return!1}function isKey(value,object){var type=typeof value;if("string"==type&&reIsPlainProp.test(value)||"number"==type)return!0;if(isArray(value))return!1;var result=!reIsDeepProp.test(value);return result||null!=object&&value in toObject(object)}function isLength(value){return"number"==typeof value&&value>-1&&0==value%1&&MAX_SAFE_INTEGER>=value}function isStrictComparable(value){return value===value&&(0===value?1/value>0:!isObject(value))}function shimIsPlainObject(value){var Ctor;if(lodash.support,!isObjectLike(value)||objToString.call(value)!=objectTag||!hasOwnProperty.call(value,"constructor")&&(Ctor=value.constructor,"function"==typeof Ctor&&!(Ctor instanceof Ctor)))return!1;var result;return baseForIn(value,function(subValue,key){result=key}),result===undefined||hasOwnProperty.call(value,result)}function shimKeys(object){for(var props=keysIn(object),propsLength=props.length,length=propsLength&&object.length,support=lodash.support,allowIndexes=length&&isLength(length)&&(isArray(object)||support.nonEnumArgs&&isArguments(object)),index=-1,result=[];propsLength>++index;){var key=props[index];(allowIndexes&&isIndex(key,length)||hasOwnProperty.call(object,key))&&result.push(key)}return result}function toObject(value){return isObject(value)?value:Object(value)}function toPath(value){if(isArray(value))return value;var result=[];return baseToString(value).replace(rePropName,function(match,number,quote,string){result.push(quote?string.replace(reEscapeChar,"$1"):number||match)}),result}function indexOf(array,value,fromIndex){var length=array?array.length:0;if(!length)return-1;if("number"==typeof fromIndex)fromIndex=0>fromIndex?nativeMax(length+fromIndex,0):fromIndex;else if(fromIndex){var index=binaryIndex(array,value),other=array[index];return(value===value?value===other:other!==other)?index:-1}return baseIndexOf(array,value,fromIndex||0)}function last(array){var length=array?array.length:0;return length?array[length-1]:undefined}function slice(array,start,end){var length=array?array.length:0;return length?(end&&"number"!=typeof end&&isIterateeCall(array,start,end)&&(start=0,end=length),baseSlice(array,start,end)):[]}function unzip(array){for(var index=-1,length=(array&&array.length&&arrayMax(arrayMap(array,getLength)))>>>0,result=Array(length);length>++index;)result[index]=arrayMap(array,baseProperty(index));return result}function includes(collection,target,fromIndex,guard){var length=collection?getLength(collection):0;return isLength(length)||(collection=values(collection),length=collection.length),length?(fromIndex="number"!=typeof fromIndex||guard&&isIterateeCall(target,fromIndex,guard)?0:0>fromIndex?nativeMax(length+fromIndex,0):fromIndex||0,"string"==typeof collection||!isArray(collection)&&isString(collection)?length>fromIndex&&collection.indexOf(target,fromIndex)>-1:getIndexOf(collection,target,fromIndex)>-1):!1}function reject(collection,predicate,thisArg){var func=isArray(collection)?arrayFilter:baseFilter;return predicate=getCallback(predicate,thisArg,3),func(collection,function(value,index,collection){return!predicate(value,index,collection)})}function some(collection,predicate,thisArg){var func=isArray(collection)?arraySome:baseSome;return thisArg&&isIterateeCall(collection,predicate,thisArg)&&(predicate=null),("function"!=typeof predicate||thisArg!==undefined)&&(predicate=getCallback(predicate,thisArg,3)),func(collection,predicate)}function restParam(func,start){if("function"!=typeof func)throw new TypeError(FUNC_ERROR_TEXT);return start=nativeMax(start===undefined?func.length-1:+start||0,0),function(){for(var args=arguments,index=-1,length=nativeMax(args.length-start,0),rest=Array(length);length>++index;)rest[index]=args[start+index];switch(start){case 0:return func.call(this,rest);case 1:return func.call(this,args[0],rest);case 2:return func.call(this,args[0],args[1],rest)}var otherArgs=Array(start+1);for(index=-1;start>++index;)otherArgs[index]=args[index];return otherArgs[start]=rest,func.apply(this,otherArgs)}}function clone(value,isDeep,customizer,thisArg){return isDeep&&"boolean"!=typeof isDeep&&isIterateeCall(value,isDeep,customizer)?isDeep=!1:"function"==typeof isDeep&&(thisArg=customizer,customizer=isDeep,isDeep=!1),customizer="function"==typeof customizer&&bindCallback(customizer,thisArg,1),baseClone(value,isDeep,customizer)}function isArguments(value){var length=isObjectLike(value)?value.length:undefined;return isLength(length)&&objToString.call(value)==argsTag}function isEmpty(value){if(null==value)return!0;var length=getLength(value);return isLength(length)&&(isArray(value)||isString(value)||isArguments(value)||isObjectLike(value)&&isFunction(value.splice))?!length:!keys(value).length}function isObject(value){var type=typeof value;return"function"==type||!!value&&"object"==type}function isNative(value){return null==value?!1:objToString.call(value)==funcTag?reIsNative.test(fnToString.call(value)):isObjectLike(value)&&reIsHostCtor.test(value)}function isNumber(value){return"number"==typeof value||isObjectLike(value)&&objToString.call(value)==numberTag}function isString(value){return"string"==typeof value||isObjectLike(value)&&objToString.call(value)==stringTag}function isTypedArray(value){return isObjectLike(value)&&isLength(value.length)&&!!typedArrayTags[objToString.call(value)]}function toPlainObject(value){return baseCopy(value,keysIn(value))}function has(object,path){if(null==object)return!1;var result=hasOwnProperty.call(object,path);return result||isKey(path)||(path=toPath(path),object=1==path.length?object:baseGet(object,baseSlice(path,0,-1)),path=last(path),result=null!=object&&hasOwnProperty.call(object,path)),result}function keysIn(object){if(null==object)return[];isObject(object)||(object=Object(object));var length=object.length;length=length&&isLength(length)&&(isArray(object)||support.nonEnumArgs&&isArguments(object))&&length||0;for(var Ctor=object.constructor,index=-1,isProto="function"==typeof Ctor&&Ctor.prototype===object,result=Array(length),skipIndexes=length>0;length>++index;)result[index]=index+"";for(var key in object)skipIndexes&&isIndex(key,length)||"constructor"==key&&(isProto||!hasOwnProperty.call(object,key))||result.push(key);return result}function values(object){return baseValues(object,keys(object))}function escapeRegExp(string){return string=baseToString(string),string&&reHasRegExpChars.test(string)?string.replace(reRegExpChars,"\\\\$&"):string}function callback(func,thisArg,guard){return guard&&isIterateeCall(func,thisArg,guard)&&(thisArg=null),baseCallback(func,thisArg)}function constant(value){return function(){return value}}function identity(value){return value}function property(path){return isKey(path)?baseProperty(path):basePropertyDeep(path)}var undefined,VERSION="3.7.0",FUNC_ERROR_TEXT="Expected a function",argsTag="[object Arguments]",arrayTag="[object Array]",boolTag="[object Boolean]",dateTag="[object Date]",errorTag="[object Error]",funcTag="[object Function]",mapTag="[object Map]",numberTag="[object Number]",objectTag="[object Object]",regexpTag="[object RegExp]",setTag="[object Set]",stringTag="[object String]",weakMapTag="[object WeakMap]",arrayBufferTag="[object ArrayBuffer]",float32Tag="[object Float32Array]",float64Tag="[object Float64Array]",int8Tag="[object Int8Array]",int16Tag="[object Int16Array]",int32Tag="[object Int32Array]",uint8Tag="[object Uint8Array]",uint8ClampedTag="[object Uint8ClampedArray]",uint16Tag="[object Uint16Array]",uint32Tag="[object Uint32Array]",reIsDeepProp=/\\.|\\[(?:[^[\\]]+|(["\'])(?:(?!\\1)[^\\n\\\\]|\\\\.)*?)\\1\\]/,reIsPlainProp=/^\\w*$/,rePropName=/[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|(["\'])((?:(?!\\2)[^\\n\\\\]|\\\\.)*?)\\2)\\]/g,reRegExpChars=/[.*+?^${}()|[\\]\\/\\\\]/g,reHasRegExpChars=RegExp(reRegExpChars.source),reEscapeChar=/\\\\(\\\\)?/g,reFlags=/\\w*$/,reIsHostCtor=/^\\[object .+?Constructor\\]$/,typedArrayTags={};typedArrayTags[float32Tag]=typedArrayTags[float64Tag]=typedArrayTags[int8Tag]=typedArrayTags[int16Tag]=typedArrayTags[int32Tag]=typedArrayTags[uint8Tag]=typedArrayTags[uint8ClampedTag]=typedArrayTags[uint16Tag]=typedArrayTags[uint32Tag]=!0,typedArrayTags[argsTag]=typedArrayTags[arrayTag]=typedArrayTags[arrayBufferTag]=typedArrayTags[boolTag]=typedArrayTags[dateTag]=typedArrayTags[errorTag]=typedArrayTags[funcTag]=typedArrayTags[mapTag]=typedArrayTags[numberTag]=typedArrayTags[objectTag]=typedArrayTags[regexpTag]=typedArrayTags[setTag]=typedArrayTags[stringTag]=typedArrayTags[weakMapTag]=!1;var cloneableTags={};cloneableTags[argsTag]=cloneableTags[arrayTag]=cloneableTags[arrayBufferTag]=cloneableTags[boolTag]=cloneableTags[dateTag]=cloneableTags[float32Tag]=cloneableTags[float64Tag]=cloneableTags[int8Tag]=cloneableTags[int16Tag]=cloneableTags[int32Tag]=cloneableTags[numberTag]=cloneableTags[objectTag]=cloneableTags[regexpTag]=cloneableTags[stringTag]=cloneableTags[uint8Tag]=cloneableTags[uint8ClampedTag]=cloneableTags[uint16Tag]=cloneableTags[uint32Tag]=!0,cloneableTags[errorTag]=cloneableTags[funcTag]=cloneableTags[mapTag]=cloneableTags[setTag]=cloneableTags[weakMapTag]=!1;var objectTypes={"function":!0,object:!0},freeExports=objectTypes[typeof exports]&&exports&&!exports.nodeType&&exports,freeModule=objectTypes[typeof module]&&module&&!module.nodeType&&module,freeGlobal=freeExports&&freeModule&&"object"==typeof global&&global&&global.Object&&global,freeSelf=objectTypes[typeof self]&&self&&self.Object&&self,freeWindow=objectTypes[typeof window]&&window&&window.Object&&window,moduleExports=freeModule&&freeModule.exports===freeExports&&freeExports,root=freeGlobal||freeWindow!==(this&&this.window)&&freeWindow||freeSelf||this,arrayProto=Array.prototype,objectProto=Object.prototype,fnToString=Function.prototype.toString,hasOwnProperty=objectProto.hasOwnProperty,objToString=objectProto.toString,reIsNative=RegExp("^"+escapeRegExp(objToString).replace(/toString|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,"$1.*?")+"$"),ArrayBuffer=isNative(ArrayBuffer=root.ArrayBuffer)&&ArrayBuffer,bufferSlice=isNative(bufferSlice=ArrayBuffer&&new ArrayBuffer(0).slice)&&bufferSlice,floor=Math.floor,getOwnPropertySymbols=isNative(getOwnPropertySymbols=Object.getOwnPropertySymbols)&&getOwnPropertySymbols,getPrototypeOf=isNative(getPrototypeOf=Object.getPrototypeOf)&&getPrototypeOf,push=arrayProto.push,preventExtensions=isNative(Object.preventExtensions=Object.preventExtensions)&&preventExtensions,propertyIsEnumerable=objectProto.propertyIsEnumerable,Uint8Array=isNative(Uint8Array=root.Uint8Array)&&Uint8Array,Float64Array=function(){try{var func=isNative(func=root.Float64Array)&&func,result=new func(new ArrayBuffer(10),0,1)&&func}catch(e){}return result}(),nativeAssign=function(){var object={1:0},func=preventExtensions&&isNative(func=Object.assign)&&func;try{func(preventExtensions(object),"xo")}catch(e){}return!object[1]&&func}(),nativeIsArray=isNative(nativeIsArray=Array.isArray)&&nativeIsArray,nativeKeys=isNative(nativeKeys=Object.keys)&&nativeKeys,nativeMax=Math.max,nativeMin=Math.min,NEGATIVE_INFINITY=Number.NEGATIVE_INFINITY,MAX_ARRAY_LENGTH=Math.pow(2,32)-1,MAX_ARRAY_INDEX=MAX_ARRAY_LENGTH-1,HALF_MAX_ARRAY_LENGTH=MAX_ARRAY_LENGTH>>>1,FLOAT64_BYTES_PER_ELEMENT=Float64Array?Float64Array.BYTES_PER_ELEMENT:0,MAX_SAFE_INTEGER=Math.pow(2,53)-1,support=lodash.support={};(function(x){var Ctor=function(){this.x=x},props=[];Ctor.prototype={valueOf:x,y:x};for(var key in new Ctor)props.push(key);support.funcDecomp=/\\bthis\\b/.test(function(){return this}),support.funcNames="string"==typeof Function.name;try{support.nonEnumArgs=!propertyIsEnumerable.call(arguments,1)}catch(e){support.nonEnumArgs=!0}})(1,0);var baseAssign=nativeAssign||function(object,source){return null==source?object:baseCopy(source,getSymbols(source),baseCopy(source,keys(source),object))},baseEach=createBaseEach(baseForOwn),baseFor=createBaseFor();bufferSlice||(bufferClone=ArrayBuffer&&Uint8Array?function(buffer){var byteLength=buffer.byteLength,floatLength=Float64Array?floor(byteLength/FLOAT64_BYTES_PER_ELEMENT):0,offset=floatLength*FLOAT64_BYTES_PER_ELEMENT,result=new ArrayBuffer(byteLength);if(floatLength){var view=new Float64Array(result,0,floatLength);view.set(new Float64Array(buffer,0,floatLength))}return byteLength!=offset&&(view=new Uint8Array(result,offset),view.set(new Uint8Array(buffer,offset))),result}:constant(null));var getLength=baseProperty("length"),getSymbols=getOwnPropertySymbols?function(object){return getOwnPropertySymbols(toObject(object))}:constant([]),findLastIndex=createFindIndex(!0),zip=restParam(unzip),forEach=createForEach(arrayEach,baseEach),isArray=nativeIsArray||function(value){return isObjectLike(value)&&isLength(value.length)&&objToString.call(value)==arrayTag},isFunction=baseIsFunction(/x/)||Uint8Array&&!baseIsFunction(Uint8Array)?function(value){return objToString.call(value)==funcTag}:baseIsFunction,isPlainObject=getPrototypeOf?function(value){if(!value||objToString.call(value)!=objectTag)return!1;var valueOf=value.valueOf,objProto=isNative(valueOf)&&(objProto=getPrototypeOf(valueOf))&&getPrototypeOf(objProto);return objProto?value==objProto||getPrototypeOf(value)==objProto:shimIsPlainObject(value)}:shimIsPlainObject,assign=createAssigner(function(object,source,customizer){return customizer?assignWith(object,source,customizer):baseAssign(object,source)}),keys=nativeKeys?function(object){if(object)var Ctor=object.constructor,length=object.length;return"function"==typeof Ctor&&Ctor.prototype===object||"function"!=typeof object&&isLength(length)?shimKeys(object):isObject(object)?nativeKeys(object):[]}:shimKeys,merge=createAssigner(baseMerge);lodash.assign=assign,lodash.callback=callback,lodash.constant=constant,lodash.forEach=forEach,lodash.keys=keys,lodash.keysIn=keysIn,lodash.merge=merge,lodash.property=property,lodash.reject=reject,lodash.restParam=restParam,lodash.slice=slice,lodash.toPlainObject=toPlainObject,lodash.unzip=unzip,lodash.values=values,lodash.zip=zip,lodash.each=forEach,lodash.extend=assign,lodash.iteratee=callback,lodash.clone=clone,lodash.escapeRegExp=escapeRegExp,lodash.findLastIndex=findLastIndex,lodash.has=has,lodash.identity=identity,lodash.includes=includes,lodash.indexOf=indexOf,lodash.isArguments=isArguments,lodash.isArray=isArray,lodash.isEmpty=isEmpty,lodash.isFunction=isFunction,lodash.isNative=isNative,lodash.isNumber=isNumber,lodash.isObject=isObject,lodash.isPlainObject=isPlainObject,lodash.isString=isString,lodash.isTypedArray=isTypedArray,lodash.last=last,lodash.some=some,lodash.any=some,lodash.contains=includes,lodash.include=includes,lodash.VERSION=VERSION,freeExports&&freeModule?moduleExports?(freeModule.exports=lodash)._=lodash:freeExports._=lodash:root._=lodash\n}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],"/node_modules/jshint/src/jshint.js":[function(_dereq_,module,exports){var _=_dereq_("../lodash"),events=_dereq_("events"),vars=_dereq_("./vars.js"),messages=_dereq_("./messages.js"),Lexer=_dereq_("./lex.js").Lexer,reg=_dereq_("./reg.js"),state=_dereq_("./state.js").state,style=_dereq_("./style.js"),options=_dereq_("./options.js"),scopeManager=_dereq_("./scope-manager.js"),JSHINT=function(){"use strict";function checkOption(name,t){return name=name.trim(),/^[+-]W\\d{3}$/g.test(name)?!0:-1!==options.validNames.indexOf(name)||"jslint"===t.type||_.has(options.removed,name)?!0:(error("E001",t,name),!1)}function isString(obj){return"[object String]"===Object.prototype.toString.call(obj)}function isIdentifier(tkn,value){return tkn?tkn.identifier&&tkn.value===value?!0:!1:!1}function isReserved(token){if(!token.reserved)return!1;var meta=token.meta;if(meta&&meta.isFutureReservedWord&&state.inES5()){if(!meta.es5)return!1;if(meta.strictOnly&&!state.option.strict&&!state.isStrict())return!1;if(token.isProperty)return!1}return!0}function supplant(str,data){return str.replace(/\\{([^{}]*)\\}/g,function(a,b){var r=data[b];return"string"==typeof r||"number"==typeof r?r:a})}function combine(dest,src){Object.keys(src).forEach(function(name){_.has(JSHINT.blacklist,name)||(dest[name]=src[name])})}function processenforceall(){if(state.option.enforceall){for(var enforceopt in options.bool.enforcing)void 0!==state.option[enforceopt]||options.noenforceall[enforceopt]||(state.option[enforceopt]=!0);for(var relaxopt in options.bool.relaxing)void 0===state.option[relaxopt]&&(state.option[relaxopt]=!1)}}function assume(){processenforceall(),state.option.esversion||state.option.moz||(state.option.esversion=state.option.es3?3:state.option.esnext?6:5),state.inES5()&&combine(predefined,vars.ecmaIdentifiers[5]),state.inES6()&&combine(predefined,vars.ecmaIdentifiers[6]),state.option.module&&(state.option.strict===!0&&(state.option.strict="global"),state.inES6()||warning("W134",state.tokens.next,"module",6)),state.option.couch&&combine(predefined,vars.couch),state.option.qunit&&combine(predefined,vars.qunit),state.option.rhino&&combine(predefined,vars.rhino),state.option.shelljs&&(combine(predefined,vars.shelljs),combine(predefined,vars.node)),state.option.typed&&combine(predefined,vars.typed),state.option.phantom&&(combine(predefined,vars.phantom),state.option.strict===!0&&(state.option.strict="global")),state.option.prototypejs&&combine(predefined,vars.prototypejs),state.option.node&&(combine(predefined,vars.node),combine(predefined,vars.typed),state.option.strict===!0&&(state.option.strict="global")),state.option.devel&&combine(predefined,vars.devel),state.option.dojo&&combine(predefined,vars.dojo),state.option.browser&&(combine(predefined,vars.browser),combine(predefined,vars.typed)),state.option.browserify&&(combine(predefined,vars.browser),combine(predefined,vars.typed),combine(predefined,vars.browserify),state.option.strict===!0&&(state.option.strict="global")),state.option.nonstandard&&combine(predefined,vars.nonstandard),state.option.jasmine&&combine(predefined,vars.jasmine),state.option.jquery&&combine(predefined,vars.jquery),state.option.mootools&&combine(predefined,vars.mootools),state.option.worker&&combine(predefined,vars.worker),state.option.wsh&&combine(predefined,vars.wsh),state.option.globalstrict&&state.option.strict!==!1&&(state.option.strict="global"),state.option.yui&&combine(predefined,vars.yui),state.option.mocha&&combine(predefined,vars.mocha)}function quit(code,line,chr){var percentage=Math.floor(100*(line/state.lines.length)),message=messages.errors[code].desc;throw{name:"JSHintError",line:line,character:chr,message:message+" ("+percentage+"% scanned).",raw:message,code:code}}function removeIgnoredMessages(){var ignored=state.ignoredLines;_.isEmpty(ignored)||(JSHINT.errors=_.reject(JSHINT.errors,function(err){return ignored[err.line]}))}function warning(code,t,a,b,c,d){var ch,l,w,msg;if(/^W\\d{3}$/.test(code)){if(state.ignored[code])return;msg=messages.warnings[code]}else/E\\d{3}/.test(code)?msg=messages.errors[code]:/I\\d{3}/.test(code)&&(msg=messages.info[code]);return t=t||state.tokens.next||{},"(end)"===t.id&&(t=state.tokens.curr),l=t.line||0,ch=t.from||0,w={id:"(error)",raw:msg.desc,code:msg.code,evidence:state.lines[l-1]||"",line:l,character:ch,scope:JSHINT.scope,a:a,b:b,c:c,d:d},w.reason=supplant(msg.desc,w),JSHINT.errors.push(w),removeIgnoredMessages(),JSHINT.errors.length>=state.option.maxerr&&quit("E043",l,ch),w}function warningAt(m,l,ch,a,b,c,d){return warning(m,{line:l,from:ch},a,b,c,d)}function error(m,t,a,b,c,d){warning(m,t,a,b,c,d)}function errorAt(m,l,ch,a,b,c,d){return error(m,{line:l,from:ch},a,b,c,d)}function addInternalSrc(elem,src){var i;return i={id:"(internal)",elem:elem,value:src},JSHINT.internals.push(i),i}function doOption(){var nt=state.tokens.next,body=nt.body.match(/(-\\s+)?[^\\s,:]+(?:\\s*:\\s*(-\\s+)?[^\\s,]+)?/g)||[],predef={};if("globals"===nt.type){body.forEach(function(g,idx){g=g.split(":");var key=(g[0]||"").trim(),val=(g[1]||"").trim();if("-"===key||!key.length){if(idx>0&&idx===body.length-1)return;return error("E002",nt),void 0}"-"===key.charAt(0)?(key=key.slice(1),val=!1,JSHINT.blacklist[key]=key,delete predefined[key]):predef[key]="true"===val}),combine(predefined,predef);for(var key in predef)_.has(predef,key)&&(declared[key]=nt)}"exported"===nt.type&&body.forEach(function(e,idx){if(!e.length){if(idx>0&&idx===body.length-1)return;return error("E002",nt),void 0}state.funct["(scope)"].addExported(e)}),"members"===nt.type&&(membersOnly=membersOnly||{},body.forEach(function(m){var ch1=m.charAt(0),ch2=m.charAt(m.length-1);ch1!==ch2||\'"\'!==ch1&&"\'"!==ch1||(m=m.substr(1,m.length-2).replace(\'\\\\"\',\'"\')),membersOnly[m]=!1}));var numvals=["maxstatements","maxparams","maxdepth","maxcomplexity","maxerr","maxlen","indent"];("jshint"===nt.type||"jslint"===nt.type)&&(body.forEach(function(g){g=g.split(":");var key=(g[0]||"").trim(),val=(g[1]||"").trim();if(checkOption(key,nt))if(numvals.indexOf(key)>=0)if("false"!==val){if(val=+val,"number"!=typeof val||!isFinite(val)||0>=val||Math.floor(val)!==val)return error("E032",nt,g[1].trim()),void 0;state.option[key]=val}else state.option[key]="indent"===key?4:!1;else{if("validthis"===key)return state.funct["(global)"]?void error("E009"):"true"!==val&&"false"!==val?void error("E002",nt):(state.option.validthis="true"===val,void 0);if("quotmark"!==key)if("shadow"!==key)if("unused"!==key)if("latedef"!==key)if("ignore"!==key)if("strict"!==key){"module"===key&&(hasParsedCode(state.funct)||error("E055",state.tokens.next,"module"));var esversions={es3:3,es5:5,esnext:6};if(!_.has(esversions,key)){if("esversion"===key){switch(val){case"5":state.inES5(!0)&&warning("I003");case"3":case"6":state.option.moz=!1,state.option.esversion=+val;break;case"2015":state.option.moz=!1,state.option.esversion=6;break;default:error("E002",nt)}return hasParsedCode(state.funct)||error("E055",state.tokens.next,"esversion"),void 0}var match=/^([+-])(W\\d{3})$/g.exec(key);if(match)return state.ignored[match[2]]="-"===match[1],void 0;var tn;return"true"===val||"false"===val?("jslint"===nt.type?(tn=options.renamed[key]||key,state.option[tn]="true"===val,void 0!==options.inverted[tn]&&(state.option[tn]=!state.option[tn])):state.option[key]="true"===val,"newcap"===key&&(state.option["(explicitNewcap)"]=!0),void 0):(error("E002",nt),void 0)}switch(val){case"true":state.option.moz=!1,state.option.esversion=esversions[key];break;case"false":state.option.moz||(state.option.esversion=5);break;default:error("E002",nt)}}else switch(val){case"true":state.option.strict=!0;break;case"false":state.option.strict=!1;break;case"func":case"global":case"implied":state.option.strict=val;break;default:error("E002",nt)}else switch(val){case"line":state.ignoredLines[nt.line]=!0,removeIgnoredMessages();break;default:error("E002",nt)}else switch(val){case"true":state.option.latedef=!0;break;case"false":state.option.latedef=!1;break;case"nofunc":state.option.latedef="nofunc";break;default:error("E002",nt)}else switch(val){case"true":state.option.unused=!0;break;case"false":state.option.unused=!1;break;case"vars":case"strict":state.option.unused=val;break;default:error("E002",nt)}else switch(val){case"true":state.option.shadow=!0;break;case"outer":state.option.shadow="outer";break;case"false":case"inner":state.option.shadow="inner";break;default:error("E002",nt)}else switch(val){case"true":case"false":state.option.quotmark="true"===val;break;case"double":case"single":state.option.quotmark=val;break;default:error("E002",nt)}}}),assume())}function peek(p){var t,i=p||0,j=lookahead.length;if(j>i)return lookahead[i];for(;i>=j;)t=lookahead[j],t||(t=lookahead[j]=lex.token()),j+=1;return t||"(end)"!==state.tokens.next.id?t:state.tokens.next}function peekIgnoreEOL(){var t,i=0;do t=peek(i++);while("(endline)"===t.id);return t}function advance(id,t){switch(state.tokens.curr.id){case"(number)":"."===state.tokens.next.id&&warning("W005",state.tokens.curr);break;case"-":("-"===state.tokens.next.id||"--"===state.tokens.next.id)&&warning("W006");break;case"+":("+"===state.tokens.next.id||"++"===state.tokens.next.id)&&warning("W007")}for(id&&state.tokens.next.id!==id&&(t?"(end)"===state.tokens.next.id?error("E019",t,t.id):error("E020",state.tokens.next,id,t.id,t.line,state.tokens.next.value):("(identifier)"!==state.tokens.next.type||state.tokens.next.value!==id)&&warning("W116",state.tokens.next,id,state.tokens.next.value)),state.tokens.prev=state.tokens.curr,state.tokens.curr=state.tokens.next;;){if(state.tokens.next=lookahead.shift()||lex.token(),state.tokens.next||quit("E041",state.tokens.curr.line),"(end)"===state.tokens.next.id||"(error)"===state.tokens.next.id)return;if(state.tokens.next.check&&state.tokens.next.check(),state.tokens.next.isSpecial)"falls through"===state.tokens.next.type?state.tokens.curr.caseFallsThrough=!0:doOption();else if("(endline)"!==state.tokens.next.id)break}}function isInfix(token){return token.infix||!token.identifier&&!token.template&&!!token.led}function isEndOfExpr(){var curr=state.tokens.curr,next=state.tokens.next;return";"===next.id||"}"===next.id||":"===next.id?!0:isInfix(next)===isInfix(curr)||"yield"===curr.id&&state.inMoz()?curr.line!==startLine(next):!1}function isBeginOfExpr(prev){return!prev.left&&"unary"!==prev.arity}function expression(rbp,initial){var left,isArray=!1,isObject=!1,isLetExpr=!1;state.nameStack.push(),initial||"let"!==state.tokens.next.value||"("!==peek(0).value||(state.inMoz()||warning("W118",state.tokens.next,"let expressions"),isLetExpr=!0,state.funct["(scope)"].stack(),advance("let"),advance("("),state.tokens.prev.fud(),advance(")")),"(end)"===state.tokens.next.id&&error("E006",state.tokens.curr);var isDangerous=state.option.asi&&state.tokens.prev.line!==startLine(state.tokens.curr)&&_.contains(["]",")"],state.tokens.prev.id)&&_.contains(["[","("],state.tokens.curr.id);if(isDangerous&&warning("W014",state.tokens.curr,state.tokens.curr.id),advance(),initial&&(state.funct["(verb)"]=state.tokens.curr.value,state.tokens.curr.beginsStmt=!0),initial===!0&&state.tokens.curr.fud)left=state.tokens.curr.fud();else for(state.tokens.curr.nud?left=state.tokens.curr.nud():error("E030",state.tokens.curr,state.tokens.curr.id);(state.tokens.next.lbp>rbp||"(template)"===state.tokens.next.type)&&!isEndOfExpr();)isArray="Array"===state.tokens.curr.value,isObject="Object"===state.tokens.curr.value,left&&(left.value||left.first&&left.first.value)&&("new"!==left.value||left.first&&left.first.value&&"."===left.first.value)&&(isArray=!1,left.value!==state.tokens.curr.value&&(isObject=!1)),advance(),isArray&&"("===state.tokens.curr.id&&")"===state.tokens.next.id&&warning("W009",state.tokens.curr),isObject&&"("===state.tokens.curr.id&&")"===state.tokens.next.id&&warning("W010",state.tokens.curr),left&&state.tokens.curr.led?left=state.tokens.curr.led(left):error("E033",state.tokens.curr,state.tokens.curr.id);return isLetExpr&&state.funct["(scope)"].unstack(),state.nameStack.pop(),left}function startLine(token){return token.startLine||token.line}function nobreaknonadjacent(left,right){left=left||state.tokens.curr,right=right||state.tokens.next,state.option.laxbreak||left.line===startLine(right)||warning("W014",right,right.value)}function nolinebreak(t){t=t||state.tokens.curr,t.line!==startLine(state.tokens.next)&&warning("E022",t,t.value)}function nobreakcomma(left,right){left.line!==startLine(right)&&(state.option.laxcomma||(comma.first&&(warning("I001"),comma.first=!1),warning("W014",left,right.value)))}function comma(opts){if(opts=opts||{},opts.peek?nobreakcomma(state.tokens.prev,state.tokens.curr):(nobreakcomma(state.tokens.curr,state.tokens.next),advance(",")),state.tokens.next.identifier&&(!opts.property||!state.inES5()))switch(state.tokens.next.value){case"break":case"case":case"catch":case"continue":case"default":case"do":case"else":case"finally":case"for":case"if":case"in":case"instanceof":case"return":case"switch":case"throw":case"try":case"var":case"let":case"while":case"with":return error("E024",state.tokens.next,state.tokens.next.value),!1}if("(punctuator)"===state.tokens.next.type)switch(state.tokens.next.value){case"}":case"]":case",":if(opts.allowTrailing)return!0;case")":return error("E024",state.tokens.next,state.tokens.next.value),!1}return!0}function symbol(s,p){var x=state.syntax[s];return x&&"object"==typeof x||(state.syntax[s]=x={id:s,lbp:p,value:s}),x}function delim(s){var x=symbol(s,0);return x.delim=!0,x}function stmt(s,f){var x=delim(s);return x.identifier=x.reserved=!0,x.fud=f,x}function blockstmt(s,f){var x=stmt(s,f);return x.block=!0,x}function reserveName(x){var c=x.id.charAt(0);return(c>="a"&&"z">=c||c>="A"&&"Z">=c)&&(x.identifier=x.reserved=!0),x}function prefix(s,f){var x=symbol(s,150);return reserveName(x),x.nud="function"==typeof f?f:function(){return this.arity="unary",this.right=expression(150),("++"===this.id||"--"===this.id)&&(state.option.plusplus?warning("W016",this,this.id):!this.right||this.right.identifier&&!isReserved(this.right)||"."===this.right.id||"["===this.right.id||warning("W017",this),this.right&&this.right.isMetaProperty?error("E031",this):this.right&&this.right.identifier&&state.funct["(scope)"].block.modify(this.right.value,this)),this},x}function type(s,f){var x=delim(s);return x.type=s,x.nud=f,x}function reserve(name,func){var x=type(name,func);return x.identifier=!0,x.reserved=!0,x}function FutureReservedWord(name,meta){var x=type(name,meta&&meta.nud||function(){return this});return meta=meta||{},meta.isFutureReservedWord=!0,x.value=name,x.identifier=!0,x.reserved=!0,x.meta=meta,x}function reservevar(s,v){return reserve(s,function(){return"function"==typeof v&&v(this),this})}function infix(s,f,p,w){var x=symbol(s,p);return reserveName(x),x.infix=!0,x.led=function(left){return w||nobreaknonadjacent(state.tokens.prev,state.tokens.curr),"in"!==s&&"instanceof"!==s||"!"!==left.id||warning("W018",left,"!"),"function"==typeof f?f(left,this):(this.left=left,this.right=expression(p),this)},x}function application(s){var x=symbol(s,42);return x.led=function(left){return nobreaknonadjacent(state.tokens.prev,state.tokens.curr),this.left=left,this.right=doFunction({type:"arrow",loneArg:left}),this},x}function relation(s,f){var x=symbol(s,100);return x.led=function(left){nobreaknonadjacent(state.tokens.prev,state.tokens.curr),this.left=left;var right=this.right=expression(100);return isIdentifier(left,"NaN")||isIdentifier(right,"NaN")?warning("W019",this):f&&f.apply(this,[left,right]),left&&right||quit("E041",state.tokens.curr.line),"!"===left.id&&warning("W018",left,"!"),"!"===right.id&&warning("W018",right,"!"),this},x}function isPoorRelation(node){return node&&("(number)"===node.type&&0===+node.value||"(string)"===node.type&&""===node.value||"null"===node.type&&!state.option.eqnull||"true"===node.type||"false"===node.type||"undefined"===node.type)}function isTypoTypeof(left,right,state){var values;return state.option.notypeof?!1:left&&right?(values=state.inES6()?typeofValues.es6:typeofValues.es3,"(identifier)"===right.type&&"typeof"===right.value&&"(string)"===left.type?!_.contains(values,left.value):!1):!1}function isGlobalEval(left,state){var isGlobal=!1;return"this"===left.type&&null===state.funct["(context)"]?isGlobal=!0:"(identifier)"===left.type&&(state.option.node&&"global"===left.value?isGlobal=!0:!state.option.browser||"window"!==left.value&&"document"!==left.value||(isGlobal=!0)),isGlobal}function findNativePrototype(left){function walkPrototype(obj){return"object"==typeof obj?"prototype"===obj.right?obj:walkPrototype(obj.left):void 0}function walkNative(obj){for(;!obj.identifier&&"object"==typeof obj.left;)obj=obj.left;return obj.identifier&&natives.indexOf(obj.value)>=0?obj.value:void 0}var natives=["Array","ArrayBuffer","Boolean","Collator","DataView","Date","DateTimeFormat","Error","EvalError","Float32Array","Float64Array","Function","Infinity","Intl","Int16Array","Int32Array","Int8Array","Iterator","Number","NumberFormat","Object","RangeError","ReferenceError","RegExp","StopIteration","String","SyntaxError","TypeError","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray","URIError"],prototype=walkPrototype(left);return prototype?walkNative(prototype):void 0}function checkLeftSideAssign(left,assignToken,options){var allowDestructuring=options&&options.allowDestructuring;if(assignToken=assignToken||left,state.option.freeze){var nativeObject=findNativePrototype(left);nativeObject&&warning("W121",left,nativeObject)}return left.identifier&&!left.isMetaProperty&&state.funct["(scope)"].block.reassign(left.value,left),"."===left.id?((!left.left||"arguments"===left.left.value&&!state.isStrict())&&warning("E031",assignToken),state.nameStack.set(state.tokens.prev),!0):"{"===left.id||"["===left.id?(allowDestructuring&&state.tokens.curr.left.destructAssign?state.tokens.curr.left.destructAssign.forEach(function(t){t.id&&state.funct["(scope)"].block.modify(t.id,t.token)}):"{"!==left.id&&left.left?"arguments"!==left.left.value||state.isStrict()||warning("E031",assignToken):warning("E031",assignToken),"["===left.id&&state.nameStack.set(left.right),!0):left.isMetaProperty?(error("E031",assignToken),!0):left.identifier&&!isReserved(left)?("exception"===state.funct["(scope)"].labeltype(left.value)&&warning("W022",left),state.nameStack.set(left),!0):(left===state.syntax["function"]&&warning("W023",state.tokens.curr),!1)}function assignop(s,f,p){var x=infix(s,"function"==typeof f?f:function(left,that){return that.left=left,left&&checkLeftSideAssign(left,that,{allowDestructuring:!0})?(that.right=expression(10),that):(error("E031",that),void 0)},p);return x.exps=!0,x.assign=!0,x}function bitwise(s,f,p){var x=symbol(s,p);return reserveName(x),x.led="function"==typeof f?f:function(left){return state.option.bitwise&&warning("W016",this,this.id),this.left=left,this.right=expression(p),this},x}function bitwiseassignop(s){return assignop(s,function(left,that){return state.option.bitwise&&warning("W016",that,that.id),left&&checkLeftSideAssign(left,that)?(that.right=expression(10),that):(error("E031",that),void 0)},20)}function suffix(s){var x=symbol(s,150);return x.led=function(left){return state.option.plusplus?warning("W016",this,this.id):left.identifier&&!isReserved(left)||"."===left.id||"["===left.id||warning("W017",this),left.isMetaProperty?error("E031",this):left&&left.identifier&&state.funct["(scope)"].block.modify(left.value,left),this.left=left,this},x}function optionalidentifier(fnparam,prop,preserve){if(state.tokens.next.identifier){preserve||advance();var curr=state.tokens.curr,val=state.tokens.curr.value;return isReserved(curr)?prop&&state.inES5()?val:fnparam&&"undefined"===val?val:(warning("W024",state.tokens.curr,state.tokens.curr.id),val):val}}function identifier(fnparam,prop){var i=optionalidentifier(fnparam,prop,!1);if(i)return i;if("..."===state.tokens.next.value){if(state.inES6(!0)||warning("W119",state.tokens.next,"spread/rest operator","6"),advance(),checkPunctuator(state.tokens.next,"..."))for(warning("E024",state.tokens.next,"...");checkPunctuator(state.tokens.next,"...");)advance();return state.tokens.next.identifier?identifier(fnparam,prop):(warning("E024",state.tokens.curr,"..."),void 0)}error("E030",state.tokens.next,state.tokens.next.value),";"!==state.tokens.next.id&&advance()}function reachable(controlToken){var t,i=0;if(";"===state.tokens.next.id&&!controlToken.inBracelessBlock)for(;;){do t=peek(i),i+=1;while("(end)"!==t.id&&"(comment)"===t.id);if(t.reach)return;if("(endline)"!==t.id){if("function"===t.id){state.option.latedef===!0&&warning("W026",t);break}warning("W027",t,t.value,controlToken.value);break}}}function parseFinalSemicolon(){if(";"!==state.tokens.next.id){if(state.tokens.next.isUnclosed)return advance();var sameLine=startLine(state.tokens.next)===state.tokens.curr.line&&"(end)"!==state.tokens.next.id,blockEnd=checkPunctuator(state.tokens.next,"}");sameLine&&!blockEnd?errorAt("E058",state.tokens.curr.line,state.tokens.curr.character):state.option.asi||(blockEnd&&!state.option.lastsemic||!sameLine)&&warningAt("W033",state.tokens.curr.line,state.tokens.curr.character)}else advance(";")}function statement(){var r,i=indent,t=state.tokens.next,hasOwnScope=!1;if(";"===t.id)return advance(";"),void 0;var res=isReserved(t);if(res&&t.meta&&t.meta.isFutureReservedWord&&":"===peek().id&&(warning("W024",t,t.id),res=!1),t.identifier&&!res&&":"===peek().id&&(advance(),advance(":"),hasOwnScope=!0,state.funct["(scope)"].stack(),state.funct["(scope)"].block.addBreakLabel(t.value,{token:state.tokens.curr}),state.tokens.next.labelled||"{"===state.tokens.next.value||warning("W028",state.tokens.next,t.value,state.tokens.next.value),state.tokens.next.label=t.value,t=state.tokens.next),"{"===t.id){var iscase="case"===state.funct["(verb)"]&&":"===state.tokens.curr.value;return block(!0,!0,!1,!1,iscase),void 0}return r=expression(0,!0),!r||r.identifier&&"function"===r.value||"(punctuator)"===r.type&&r.left&&r.left.identifier&&"function"===r.left.value||state.isStrict()||"global"!==state.option.strict||warning("E007"),t.block||(state.option.expr||r&&r.exps?state.option.nonew&&r&&r.left&&"("===r.id&&"new"===r.left.id&&warning("W031",t):warning("W030",state.tokens.curr),parseFinalSemicolon()),indent=i,hasOwnScope&&state.funct["(scope)"].unstack(),r}function statements(){for(var p,a=[];!state.tokens.next.reach&&"(end)"!==state.tokens.next.id;)";"===state.tokens.next.id?(p=peek(),(!p||"("!==p.id&&"["!==p.id)&&warning("W032"),advance(";")):a.push(statement());return a}function directives(){for(var i,p,pn;"(string)"===state.tokens.next.id;){if(p=peek(0),"(endline)"===p.id){i=1;do pn=peek(i++);while("(endline)"===pn.id);if(";"===pn.id)p=pn;else{if("["===pn.value||"."===pn.value)break;state.option.asi&&"("!==pn.value||warning("W033",state.tokens.next)}}else{if("."===p.id||"["===p.id)break;";"!==p.id&&warning("W033",p)}advance();var directive=state.tokens.curr.value;(state.directive[directive]||"use strict"===directive&&"implied"===state.option.strict)&&warning("W034",state.tokens.curr,directive),state.directive[directive]=!0,";"===p.id&&advance(";")}state.isStrict()&&(state.option["(explicitNewcap)"]||(state.option.newcap=!0),state.option.undef=!0)}function block(ordinary,stmt,isfunc,isfatarrow,iscase){var a,m,t,line,d,b=inblock,old_indent=indent;inblock=ordinary,t=state.tokens.next;var metrics=state.funct["(metrics)"];if(metrics.nestedBlockDepth+=1,metrics.verifyMaxNestedBlockDepthPerFunction(),"{"===state.tokens.next.id){if(advance("{"),state.funct["(scope)"].stack(),line=state.tokens.curr.line,"}"!==state.tokens.next.id){for(indent+=state.option.indent;!ordinary&&state.tokens.next.from>indent;)indent+=state.option.indent;if(isfunc){m={};for(d in state.directive)_.has(state.directive,d)&&(m[d]=state.directive[d]);directives(),state.option.strict&&state.funct["(context)"]["(global)"]&&(m["use strict"]||state.isStrict()||warning("E007"))}a=statements(),metrics.statementCount+=a.length,indent-=state.option.indent}advance("}",t),isfunc&&(state.funct["(scope)"].validateParams(),m&&(state.directive=m)),state.funct["(scope)"].unstack(),indent=old_indent}else if(ordinary)state.funct["(noblockscopedvar)"]="for"!==state.tokens.next.id,state.funct["(scope)"].stack(),(!stmt||state.option.curly)&&warning("W116",state.tokens.next,"{",state.tokens.next.value),state.tokens.next.inBracelessBlock=!0,indent+=state.option.indent,a=[statement()],indent-=state.option.indent,state.funct["(scope)"].unstack(),delete state.funct["(noblockscopedvar)"];else if(isfunc){if(state.funct["(scope)"].stack(),m={},!stmt||isfatarrow||state.inMoz()||error("W118",state.tokens.curr,"function closure expressions"),!stmt)for(d in state.directive)_.has(state.directive,d)&&(m[d]=state.directive[d]);expression(10),state.option.strict&&state.funct["(context)"]["(global)"]&&(m["use strict"]||state.isStrict()||warning("E007")),state.funct["(scope)"].unstack()}else error("E021",state.tokens.next,"{",state.tokens.next.value);switch(state.funct["(verb)"]){case"break":case"continue":case"return":case"throw":if(iscase)break;default:state.funct["(verb)"]=null}return inblock=b,!ordinary||!state.option.noempty||a&&0!==a.length||warning("W035",state.tokens.prev),metrics.nestedBlockDepth-=1,a}function countMember(m){membersOnly&&"boolean"!=typeof membersOnly[m]&&warning("W036",state.tokens.curr,m),"number"==typeof member[m]?member[m]+=1:member[m]=1}function comprehensiveArrayExpression(){var res={};res.exps=!0,state.funct["(comparray)"].stack();var reversed=!1;return"for"!==state.tokens.next.value&&(reversed=!0,state.inMoz()||warning("W116",state.tokens.next,"for",state.tokens.next.value),state.funct["(comparray)"].setState("use"),res.right=expression(10)),advance("for"),"each"===state.tokens.next.value&&(advance("each"),state.inMoz()||warning("W118",state.tokens.curr,"for each")),advance("("),state.funct["(comparray)"].setState("define"),res.left=expression(130),_.contains(["in","of"],state.tokens.next.value)?advance():error("E045",state.tokens.curr),state.funct["(comparray)"].setState("generate"),expression(10),advance(")"),"if"===state.tokens.next.value&&(advance("if"),advance("("),state.funct["(comparray)"].setState("filter"),res.filter=expression(10),advance(")")),reversed||(state.funct["(comparray)"].setState("use"),res.right=expression(10)),advance("]"),state.funct["(comparray)"].unstack(),res}function isMethod(){return state.funct["(statement)"]&&"class"===state.funct["(statement)"].type||state.funct["(context)"]&&"class"===state.funct["(context)"]["(verb)"]}function isPropertyName(token){return token.identifier||"(string)"===token.id||"(number)"===token.id}function propertyName(preserveOrToken){var id,preserve=!0;return"object"==typeof preserveOrToken?id=preserveOrToken:(preserve=preserveOrToken,id=optionalidentifier(!1,!0,preserve)),id?"object"==typeof id&&("(string)"===id.id||"(identifier)"===id.id?id=id.value:"(number)"===id.id&&(id=""+id.value)):"(string)"===state.tokens.next.id?(id=state.tokens.next.value,preserve||advance()):"(number)"===state.tokens.next.id&&(id=""+state.tokens.next.value,preserve||advance()),"hasOwnProperty"===id&&warning("W001"),id}function functionparams(options){function addParam(addParamArgs){state.funct["(scope)"].addParam.apply(state.funct["(scope)"],addParamArgs)}var next,ident,t,paramsIds=[],tokens=[],pastDefault=!1,pastRest=!1,arity=0,loneArg=options&&options.loneArg;if(loneArg&&loneArg.identifier===!0)return state.funct["(scope)"].addParam(loneArg.value,loneArg),{arity:1,params:[loneArg.value]};if(next=state.tokens.next,options&&options.parsedOpening||advance("("),")"===state.tokens.next.id)return advance(")"),void 0;for(;;){arity++;var currentParams=[];if(_.contains(["{","["],state.tokens.next.id)){tokens=destructuringPattern();for(t in tokens)t=tokens[t],t.id&&(paramsIds.push(t.id),currentParams.push([t.id,t.token]))}else if(checkPunctuator(state.tokens.next,"...")&&(pastRest=!0),ident=identifier(!0))paramsIds.push(ident),currentParams.push([ident,state.tokens.curr]);else for(;!checkPunctuators(state.tokens.next,[",",")"]);)advance();if(pastDefault&&"="!==state.tokens.next.id&&error("W138",state.tokens.current),"="===state.tokens.next.id&&(state.inES6()||warning("W119",state.tokens.next,"default parameters","6"),advance("="),pastDefault=!0,expression(10)),currentParams.forEach(addParam),","!==state.tokens.next.id)return advance(")",next),{arity:arity,params:paramsIds};pastRest&&warning("W131",state.tokens.next),comma()}}function functor(name,token,overwrites){var funct={"(name)":name,"(breakage)":0,"(loopage)":0,"(tokens)":{},"(properties)":{},"(catch)":!1,"(global)":!1,"(line)":null,"(character)":null,"(metrics)":null,"(statement)":null,"(context)":null,"(scope)":null,"(comparray)":null,"(generator)":null,"(arrow)":null,"(params)":null};return token&&_.extend(funct,{"(line)":token.line,"(character)":token.character,"(metrics)":createMetrics(token)}),_.extend(funct,overwrites),funct["(context)"]&&(funct["(scope)"]=funct["(context)"]["(scope)"],funct["(comparray)"]=funct["(context)"]["(comparray)"]),funct}function isFunctor(token){return"(scope)"in token}function hasParsedCode(funct){return funct["(global)"]&&!funct["(verb)"]}function doTemplateLiteral(left){function end(){if(state.tokens.curr.template&&state.tokens.curr.tail&&state.tokens.curr.context===ctx)return!0;var complete=state.tokens.next.template&&state.tokens.next.tail&&state.tokens.next.context===ctx;return complete&&advance(),complete||state.tokens.next.isUnclosed}var ctx=this.context,noSubst=this.noSubst,depth=this.depth;if(!noSubst)for(;!end();)!state.tokens.next.template||state.tokens.next.depth>depth?expression(0):advance();return{id:"(template)",type:"(template)",tag:left}}function doFunction(options){var f,token,name,statement,classExprBinding,isGenerator,isArrow,ignoreLoopFunc,oldOption=state.option,oldIgnored=state.ignored;options&&(name=options.name,statement=options.statement,classExprBinding=options.classExprBinding,isGenerator="generator"===options.type,isArrow="arrow"===options.type,ignoreLoopFunc=options.ignoreLoopFunc),state.option=Object.create(state.option),state.ignored=Object.create(state.ignored),state.funct=functor(name||state.nameStack.infer(),state.tokens.next,{"(statement)":statement,"(context)":state.funct,"(arrow)":isArrow,"(generator)":isGenerator}),f=state.funct,token=state.tokens.curr,token.funct=state.funct,functions.push(state.funct),state.funct["(scope)"].stack("functionouter");var internallyAccessibleName=name||classExprBinding;internallyAccessibleName&&state.funct["(scope)"].block.add(internallyAccessibleName,classExprBinding?"class":"function",state.tokens.curr,!1),state.funct["(scope)"].stack("functionparams");var paramsInfo=functionparams(options);return paramsInfo?(state.funct["(params)"]=paramsInfo.params,state.funct["(metrics)"].arity=paramsInfo.arity,state.funct["(metrics)"].verifyMaxParametersPerFunction()):state.funct["(metrics)"].arity=0,isArrow&&(state.inES6(!0)||warning("W119",state.tokens.curr,"arrow function syntax (=>)","6"),options.loneArg||advance("=>")),block(!1,!0,!0,isArrow),!state.option.noyield&&isGenerator&&"yielded"!==state.funct["(generator)"]&&warning("W124",state.tokens.curr),state.funct["(metrics)"].verifyMaxStatementsPerFunction(),state.funct["(metrics)"].verifyMaxComplexityPerFunction(),state.funct["(unusedOption)"]=state.option.unused,state.option=oldOption,state.ignored=oldIgnored,state.funct["(last)"]=state.tokens.curr.line,state.funct["(lastcharacter)"]=state.tokens.curr.character,state.funct["(scope)"].unstack(),state.funct["(scope)"].unstack(),state.funct=state.funct["(context)"],ignoreLoopFunc||state.option.loopfunc||!state.funct["(loopage)"]||f["(isCapturing)"]&&warning("W083",token),f}function createMetrics(functionStartToken){return{statementCount:0,nestedBlockDepth:-1,ComplexityCount:1,arity:0,verifyMaxStatementsPerFunction:function(){state.option.maxstatements&&this.statementCount>state.option.maxstatements&&warning("W071",functionStartToken,this.statementCount)\n},verifyMaxParametersPerFunction:function(){_.isNumber(state.option.maxparams)&&this.arity>state.option.maxparams&&warning("W072",functionStartToken,this.arity)},verifyMaxNestedBlockDepthPerFunction:function(){state.option.maxdepth&&this.nestedBlockDepth>0&&this.nestedBlockDepth===state.option.maxdepth+1&&warning("W073",null,this.nestedBlockDepth)},verifyMaxComplexityPerFunction:function(){var max=state.option.maxcomplexity,cc=this.ComplexityCount;max&&cc>max&&warning("W074",functionStartToken,cc)}}}function increaseComplexityCount(){state.funct["(metrics)"].ComplexityCount+=1}function checkCondAssignment(expr){var id,paren;switch(expr&&(id=expr.id,paren=expr.paren,","===id&&(expr=expr.exprs[expr.exprs.length-1])&&(id=expr.id,paren=paren||expr.paren)),id){case"=":case"+=":case"-=":case"*=":case"%=":case"&=":case"|=":case"^=":case"/=":paren||state.option.boss||warning("W084")}}function checkProperties(props){if(state.inES5())for(var name in props)props[name]&&props[name].setterToken&&!props[name].getterToken&&warning("W078",props[name].setterToken)}function metaProperty(name,c){if(checkPunctuator(state.tokens.next,".")){var left=state.tokens.curr.id;advance(".");var id=identifier();return state.tokens.curr.isMetaProperty=!0,name!==id?error("E057",state.tokens.prev,left,id):c(),state.tokens.curr}}function destructuringPattern(options){var isAssignment=options&&options.assignment;return state.inES6()||warning("W104",state.tokens.curr,isAssignment?"destructuring assignment":"destructuring binding","6"),destructuringPatternRecursive(options)}function destructuringPatternRecursive(options){var ids,identifiers=[],openingParsed=options&&options.openingParsed,isAssignment=options&&options.assignment,recursiveOptions=isAssignment?{assignment:isAssignment}:null,firstToken=openingParsed?state.tokens.curr:state.tokens.next,nextInnerDE=function(){var ident;if(checkPunctuators(state.tokens.next,["[","{"])){ids=destructuringPatternRecursive(recursiveOptions);for(var id in ids)id=ids[id],identifiers.push({id:id.id,token:id.token})}else if(checkPunctuator(state.tokens.next,","))identifiers.push({id:null,token:state.tokens.curr});else{if(!checkPunctuator(state.tokens.next,"(")){var is_rest=checkPunctuator(state.tokens.next,"...");if(isAssignment){var identifierToken=is_rest?peek(0):state.tokens.next;identifierToken.identifier||warning("E030",identifierToken,identifierToken.value);var assignTarget=expression(155);assignTarget&&(checkLeftSideAssign(assignTarget),assignTarget.identifier&&(ident=assignTarget.value))}else ident=identifier();return ident&&identifiers.push({id:ident,token:state.tokens.curr}),is_rest}advance("("),nextInnerDE(),advance(")")}return!1},assignmentProperty=function(){var id;checkPunctuator(state.tokens.next,"[")?(advance("["),expression(10),advance("]"),advance(":"),nextInnerDE()):"(string)"===state.tokens.next.id||"(number)"===state.tokens.next.id?(advance(),advance(":"),nextInnerDE()):(id=identifier(),checkPunctuator(state.tokens.next,":")?(advance(":"),nextInnerDE()):id&&(isAssignment&&checkLeftSideAssign(state.tokens.curr),identifiers.push({id:id,token:state.tokens.curr})))};if(checkPunctuator(firstToken,"[")){openingParsed||advance("["),checkPunctuator(state.tokens.next,"]")&&warning("W137",state.tokens.curr);for(var element_after_rest=!1;!checkPunctuator(state.tokens.next,"]");)nextInnerDE()&&!element_after_rest&&checkPunctuator(state.tokens.next,",")&&(warning("W130",state.tokens.next),element_after_rest=!0),checkPunctuator(state.tokens.next,"=")&&(checkPunctuator(state.tokens.prev,"...")?advance("]"):advance("="),"undefined"===state.tokens.next.id&&warning("W080",state.tokens.prev,state.tokens.prev.value),expression(10)),checkPunctuator(state.tokens.next,"]")||advance(",");advance("]")}else if(checkPunctuator(firstToken,"{")){for(openingParsed||advance("{"),checkPunctuator(state.tokens.next,"}")&&warning("W137",state.tokens.curr);!checkPunctuator(state.tokens.next,"}")&&(assignmentProperty(),checkPunctuator(state.tokens.next,"=")&&(advance("="),"undefined"===state.tokens.next.id&&warning("W080",state.tokens.prev,state.tokens.prev.value),expression(10)),checkPunctuator(state.tokens.next,"}")||(advance(","),!checkPunctuator(state.tokens.next,"}"))););advance("}")}return identifiers}function destructuringPatternMatch(tokens,value){var first=value.first;first&&_.zip(tokens,Array.isArray(first)?first:[first]).forEach(function(val){var token=val[0],value=val[1];token&&value?token.first=value:token&&token.first&&!value&&warning("W080",token.first,token.first.value)})}function blockVariableStatement(type,statement,context){var tokens,lone,value,letblock,prefix=context&&context.prefix,inexport=context&&context.inexport,isLet="let"===type,isConst="const"===type;for(state.inES6()||warning("W104",state.tokens.curr,type,"6"),isLet&&"("===state.tokens.next.value?(state.inMoz()||warning("W118",state.tokens.next,"let block"),advance("("),state.funct["(scope)"].stack(),letblock=!0):state.funct["(noblockscopedvar)"]&&error("E048",state.tokens.curr,isConst?"Const":"Let"),statement.first=[];;){var names=[];_.contains(["{","["],state.tokens.next.value)?(tokens=destructuringPattern(),lone=!1):(tokens=[{id:identifier(),token:state.tokens.curr}],lone=!0),!prefix&&isConst&&"="!==state.tokens.next.id&&warning("E012",state.tokens.curr,state.tokens.curr.value);for(var t in tokens)tokens.hasOwnProperty(t)&&(t=tokens[t],state.funct["(scope)"].block.isGlobal()&&predefined[t.id]===!1&&warning("W079",t.token,t.id),t.id&&!state.funct["(noblockscopedvar)"]&&(state.funct["(scope)"].addlabel(t.id,{type:type,token:t.token}),names.push(t.token),lone&&inexport&&state.funct["(scope)"].setExported(t.token.value,t.token)));if("="===state.tokens.next.id&&(advance("="),prefix||"undefined"!==state.tokens.next.id||warning("W080",state.tokens.prev,state.tokens.prev.value),!prefix&&"="===peek(0).id&&state.tokens.next.identifier&&warning("W120",state.tokens.next,state.tokens.next.value),value=expression(prefix?120:10),lone?tokens[0].first=value:destructuringPatternMatch(names,value)),statement.first=statement.first.concat(names),","!==state.tokens.next.id)break;comma()}return letblock&&(advance(")"),block(!0,!0),statement.block=!0,state.funct["(scope)"].unstack()),statement}function classdef(isStatement){return state.inES6()||warning("W104",state.tokens.curr,"class","6"),isStatement?(this.name=identifier(),state.funct["(scope)"].addlabel(this.name,{type:"class",token:state.tokens.curr})):state.tokens.next.identifier&&"extends"!==state.tokens.next.value?(this.name=identifier(),this.namedExpr=!0):this.name=state.nameStack.infer(),classtail(this),this}function classtail(c){var wasInClassBody=state.inClassBody;"extends"===state.tokens.next.value&&(advance("extends"),c.heritage=expression(10)),state.inClassBody=!0,advance("{"),c.body=classbody(c),advance("}"),state.inClassBody=wasInClassBody}function classbody(c){for(var name,isStatic,isGenerator,getset,computed,props=Object.create(null),staticProps=Object.create(null),i=0;"}"!==state.tokens.next.id;++i)if(name=state.tokens.next,isStatic=!1,isGenerator=!1,getset=null,";"!==name.id){if("*"===name.id&&(isGenerator=!0,advance("*"),name=state.tokens.next),"["===name.id)name=computedPropertyName(),computed=!0;else{if(!isPropertyName(name)){warning("W052",state.tokens.next,state.tokens.next.value||state.tokens.next.type),advance();continue}advance(),computed=!1,name.identifier&&"static"===name.value&&(checkPunctuator(state.tokens.next,"*")&&(isGenerator=!0,advance("*")),(isPropertyName(state.tokens.next)||"["===state.tokens.next.id)&&(computed="["===state.tokens.next.id,isStatic=!0,name=state.tokens.next,"["===state.tokens.next.id?name=computedPropertyName():advance())),!name.identifier||"get"!==name.value&&"set"!==name.value||(isPropertyName(state.tokens.next)||"["===state.tokens.next.id)&&(computed="["===state.tokens.next.id,getset=name,name=state.tokens.next,"["===state.tokens.next.id?name=computedPropertyName():advance())}if(!checkPunctuator(state.tokens.next,"(")){for(error("E054",state.tokens.next,state.tokens.next.value);"}"!==state.tokens.next.id&&!checkPunctuator(state.tokens.next,"(");)advance();"("!==state.tokens.next.value&&doFunction({statement:c})}if(computed||(getset?saveAccessor(getset.value,isStatic?staticProps:props,name.value,name,!0,isStatic):("constructor"===name.value?state.nameStack.set(c):state.nameStack.set(name),saveProperty(isStatic?staticProps:props,name.value,name,!0,isStatic))),getset&&"constructor"===name.value){var propDesc="get"===getset.value?"class getter method":"class setter method";error("E049",name,propDesc,"constructor")}else"prototype"===name.value&&error("E049",name,"class method","prototype");propertyName(name),doFunction({statement:c,type:isGenerator?"generator":null,classExprBinding:c.namedExpr?c.name:null})}else warning("W032"),advance(";");checkProperties(props)}function saveProperty(props,name,tkn,isClass,isStatic){var msg=["key","class method","static class method"];msg=msg[(isClass||!1)+(isStatic||!1)],tkn.identifier&&(name=tkn.value),props[name]&&"__proto__"!==name?warning("W075",state.tokens.next,msg,name):props[name]=Object.create(null),props[name].basic=!0,props[name].basictkn=tkn}function saveAccessor(accessorType,props,name,tkn,isClass,isStatic){var flagName="get"===accessorType?"getterToken":"setterToken",msg="";isClass?(isStatic&&(msg+="static "),msg+=accessorType+"ter method"):msg="key",state.tokens.curr.accessorType=accessorType,state.nameStack.set(tkn),props[name]?(props[name].basic||props[name][flagName])&&"__proto__"!==name&&warning("W075",state.tokens.next,msg,name):props[name]=Object.create(null),props[name][flagName]=tkn}function computedPropertyName(){advance("["),state.inES6()||warning("W119",state.tokens.curr,"computed property names","6");var value=expression(10);return advance("]"),value}function checkPunctuators(token,values){return"(punctuator)"===token.type?_.contains(values,token.value):!1}function checkPunctuator(token,value){return"(punctuator)"===token.type&&token.value===value}function destructuringAssignOrJsonValue(){var block=lookupBlockType();block.notJson?(!state.inES6()&&block.isDestAssign&&warning("W104",state.tokens.curr,"destructuring assignment","6"),statements()):(state.option.laxbreak=!0,state.jsonMode=!0,jsonValue())}function jsonValue(){function jsonObject(){var o={},t=state.tokens.next;if(advance("{"),"}"!==state.tokens.next.id)for(;;){if("(end)"===state.tokens.next.id)error("E026",state.tokens.next,t.line);else{if("}"===state.tokens.next.id){warning("W094",state.tokens.curr);break}","===state.tokens.next.id?error("E028",state.tokens.next):"(string)"!==state.tokens.next.id&&warning("W095",state.tokens.next,state.tokens.next.value)}if(o[state.tokens.next.value]===!0?warning("W075",state.tokens.next,"key",state.tokens.next.value):"__proto__"===state.tokens.next.value&&!state.option.proto||"__iterator__"===state.tokens.next.value&&!state.option.iterator?warning("W096",state.tokens.next,state.tokens.next.value):o[state.tokens.next.value]=!0,advance(),advance(":"),jsonValue(),","!==state.tokens.next.id)break;advance(",")}advance("}")}function jsonArray(){var t=state.tokens.next;if(advance("["),"]"!==state.tokens.next.id)for(;;){if("(end)"===state.tokens.next.id)error("E027",state.tokens.next,t.line);else{if("]"===state.tokens.next.id){warning("W094",state.tokens.curr);break}","===state.tokens.next.id&&error("E028",state.tokens.next)}if(jsonValue(),","!==state.tokens.next.id)break;advance(",")}advance("]")}switch(state.tokens.next.id){case"{":jsonObject();break;case"[":jsonArray();break;case"true":case"false":case"null":case"(number)":case"(string)":advance();break;case"-":advance("-"),advance("(number)");break;default:error("E003",state.tokens.next)}}var api,declared,functions,inblock,indent,lookahead,lex,member,membersOnly,predefined,stack,urls,bang={"<":!0,"<=":!0,"==":!0,"===":!0,"!==":!0,"!=":!0,">":!0,">=":!0,"+":!0,"-":!0,"*":!0,"/":!0,"%":!0},functionicity=["closure","exception","global","label","outer","unused","var"],extraModules=[],emitter=new events.EventEmitter,typeofValues={};typeofValues.legacy=["xml","unknown"],typeofValues.es3=["undefined","boolean","number","string","function","object"],typeofValues.es3=typeofValues.es3.concat(typeofValues.legacy),typeofValues.es6=typeofValues.es3.concat("symbol"),type("(number)",function(){return this}),type("(string)",function(){return this}),state.syntax["(identifier)"]={type:"(identifier)",lbp:0,identifier:!0,nud:function(){var v=this.value;return"=>"===state.tokens.next.id?this:(state.funct["(comparray)"].check(v)||state.funct["(scope)"].block.use(v,state.tokens.curr),this)},led:function(){error("E033",state.tokens.next,state.tokens.next.value)}};var baseTemplateSyntax={lbp:0,identifier:!1,template:!0};state.syntax["(template)"]=_.extend({type:"(template)",nud:doTemplateLiteral,led:doTemplateLiteral,noSubst:!1},baseTemplateSyntax),state.syntax["(template middle)"]=_.extend({type:"(template middle)",middle:!0,noSubst:!1},baseTemplateSyntax),state.syntax["(template tail)"]=_.extend({type:"(template tail)",tail:!0,noSubst:!1},baseTemplateSyntax),state.syntax["(no subst template)"]=_.extend({type:"(template)",nud:doTemplateLiteral,led:doTemplateLiteral,noSubst:!0,tail:!0},baseTemplateSyntax),type("(regexp)",function(){return this}),delim("(endline)"),delim("(begin)"),delim("(end)").reach=!0,delim("(error)").reach=!0,delim("}").reach=!0,delim(")"),delim("]"),delim(\'"\').reach=!0,delim("\'").reach=!0,delim(";"),delim(":").reach=!0,delim("#"),reserve("else"),reserve("case").reach=!0,reserve("catch"),reserve("default").reach=!0,reserve("finally"),reservevar("arguments",function(x){state.isStrict()&&state.funct["(global)"]&&warning("E008",x)}),reservevar("eval"),reservevar("false"),reservevar("Infinity"),reservevar("null"),reservevar("this",function(x){state.isStrict()&&!isMethod()&&!state.option.validthis&&(state.funct["(statement)"]&&state.funct["(name)"].charAt(0)>"Z"||state.funct["(global)"])&&warning("W040",x)}),reservevar("true"),reservevar("undefined"),assignop("=","assign",20),assignop("+=","assignadd",20),assignop("-=","assignsub",20),assignop("*=","assignmult",20),assignop("/=","assigndiv",20).nud=function(){error("E014")},assignop("%=","assignmod",20),bitwiseassignop("&="),bitwiseassignop("|="),bitwiseassignop("^="),bitwiseassignop("<<="),bitwiseassignop(">>="),bitwiseassignop(">>>="),infix(",",function(left,that){var expr;if(that.exprs=[left],state.option.nocomma&&warning("W127"),!comma({peek:!0}))return that;for(;;){if(!(expr=expression(10)))break;if(that.exprs.push(expr),","!==state.tokens.next.value||!comma())break}return that},10,!0),infix("?",function(left,that){return increaseComplexityCount(),that.left=left,that.right=expression(10),advance(":"),that["else"]=expression(10),that},30);var orPrecendence=40;infix("||",function(left,that){return increaseComplexityCount(),that.left=left,that.right=expression(orPrecendence),that},orPrecendence),infix("&&","and",50),bitwise("|","bitor",70),bitwise("^","bitxor",80),bitwise("&","bitand",90),relation("==",function(left,right){var eqnull=state.option.eqnull&&("null"===(left&&left.value)||"null"===(right&&right.value));switch(!0){case!eqnull&&state.option.eqeqeq:this.from=this.character,warning("W116",this,"===","==");break;case isPoorRelation(left):warning("W041",this,"===",left.value);break;case isPoorRelation(right):warning("W041",this,"===",right.value);break;case isTypoTypeof(right,left,state):warning("W122",this,right.value);break;case isTypoTypeof(left,right,state):warning("W122",this,left.value)}return this}),relation("===",function(left,right){return isTypoTypeof(right,left,state)?warning("W122",this,right.value):isTypoTypeof(left,right,state)&&warning("W122",this,left.value),this}),relation("!=",function(left,right){var eqnull=state.option.eqnull&&("null"===(left&&left.value)||"null"===(right&&right.value));return!eqnull&&state.option.eqeqeq?(this.from=this.character,warning("W116",this,"!==","!=")):isPoorRelation(left)?warning("W041",this,"!==",left.value):isPoorRelation(right)?warning("W041",this,"!==",right.value):isTypoTypeof(right,left,state)?warning("W122",this,right.value):isTypoTypeof(left,right,state)&&warning("W122",this,left.value),this}),relation("!==",function(left,right){return isTypoTypeof(right,left,state)?warning("W122",this,right.value):isTypoTypeof(left,right,state)&&warning("W122",this,left.value),this}),relation("<"),relation(">"),relation("<="),relation(">="),bitwise("<<","shiftleft",120),bitwise(">>","shiftright",120),bitwise(">>>","shiftrightunsigned",120),infix("in","in",120),infix("instanceof","instanceof",120),infix("+",function(left,that){var right;return that.left=left,that.right=right=expression(130),left&&right&&"(string)"===left.id&&"(string)"===right.id?(left.value+=right.value,left.character=right.character,!state.option.scripturl&&reg.javascriptURL.test(left.value)&&warning("W050",left),left):that},130),prefix("+","num"),prefix("+++",function(){return warning("W007"),this.arity="unary",this.right=expression(150),this}),infix("+++",function(left){return warning("W007"),this.left=left,this.right=expression(130),this},130),infix("-","sub",130),prefix("-","neg"),prefix("---",function(){return warning("W006"),this.arity="unary",this.right=expression(150),this}),infix("---",function(left){return warning("W006"),this.left=left,this.right=expression(130),this},130),infix("*","mult",140),infix("/","div",140),infix("%","mod",140),suffix("++"),prefix("++","preinc"),state.syntax["++"].exps=!0,suffix("--"),prefix("--","predec"),state.syntax["--"].exps=!0,prefix("delete",function(){var p=expression(10);return p?("."!==p.id&&"["!==p.id&&warning("W051"),this.first=p,p.identifier&&!state.isStrict()&&(p.forgiveUndef=!0),this):this}).exps=!0,prefix("~",function(){return state.option.bitwise&&warning("W016",this,"~"),this.arity="unary",this.right=expression(150),this}),prefix("...",function(){return state.inES6(!0)||warning("W119",this,"spread/rest operator","6"),state.tokens.next.identifier||"(string)"===state.tokens.next.type||checkPunctuators(state.tokens.next,["[","("])||error("E030",state.tokens.next,state.tokens.next.value),expression(150),this}),prefix("!",function(){return this.arity="unary",this.right=expression(150),this.right||quit("E041",this.line||0),bang[this.right.id]===!0&&warning("W018",this,"!"),this}),prefix("typeof",function(){var p=expression(150);return this.first=this.right=p,p||quit("E041",this.line||0,this.character||0),p.identifier&&(p.forgiveUndef=!0),this}),prefix("new",function(){var mp=metaProperty("target",function(){state.inES6(!0)||warning("W119",state.tokens.prev,"new.target","6");for(var inFunction,c=state.funct;c&&(inFunction=!c["(global)"],c["(arrow)"]);)c=c["(context)"];inFunction||warning("W136",state.tokens.prev,"new.target")});if(mp)return mp;var i,c=expression(155);if(c&&"function"!==c.id)if(c.identifier)switch(c["new"]=!0,c.value){case"Number":case"String":case"Boolean":case"Math":case"JSON":warning("W053",state.tokens.prev,c.value);break;case"Symbol":state.inES6()&&warning("W053",state.tokens.prev,c.value);break;case"Function":state.option.evil||warning("W054");break;case"Date":case"RegExp":case"this":break;default:"function"!==c.id&&(i=c.value.substr(0,1),state.option.newcap&&("A">i||i>"Z")&&!state.funct["(scope)"].isPredefined(c.value)&&warning("W055",state.tokens.curr))}else"."!==c.id&&"["!==c.id&&"("!==c.id&&warning("W056",state.tokens.curr);else state.option.supernew||warning("W057",this);return"("===state.tokens.next.id||state.option.supernew||warning("W058",state.tokens.curr,state.tokens.curr.value),this.first=this.right=c,this}),state.syntax["new"].exps=!0,prefix("void").exps=!0,infix(".",function(left,that){var m=identifier(!1,!0);return"string"==typeof m&&countMember(m),that.left=left,that.right=m,m&&"hasOwnProperty"===m&&"="===state.tokens.next.value&&warning("W001"),!left||"arguments"!==left.value||"callee"!==m&&"caller"!==m?state.option.evil||!left||"document"!==left.value||"write"!==m&&"writeln"!==m||warning("W060",left):state.option.noarg?warning("W059",left,m):state.isStrict()&&error("E008"),state.option.evil||"eval"!==m&&"execScript"!==m||isGlobalEval(left,state)&&warning("W061"),that},160,!0),infix("(",function(left,that){state.option.immed&&left&&!left.immed&&"function"===left.id&&warning("W062");var n=0,p=[];if(left&&"(identifier)"===left.type&&left.value.match(/^[A-Z]([A-Z0-9_$]*[a-z][A-Za-z0-9_$]*)?$/)&&-1==="Array Number String Boolean Date Object Error Symbol".indexOf(left.value)&&("Math"===left.value?warning("W063",left):state.option.newcap&&warning("W064",left)),")"!==state.tokens.next.id)for(;p[p.length]=expression(10),n+=1,","===state.tokens.next.id;)comma();return advance(")"),"object"==typeof left&&(state.inES5()||"parseInt"!==left.value||1!==n||warning("W065",state.tokens.curr),state.option.evil||("eval"===left.value||"Function"===left.value||"execScript"===left.value?(warning("W061",left),p[0]&&"(string)"===[0].id&&addInternalSrc(left,p[0].value)):!p[0]||"(string)"!==p[0].id||"setTimeout"!==left.value&&"setInterval"!==left.value?!p[0]||"(string)"!==p[0].id||"."!==left.value||"window"!==left.left.value||"setTimeout"!==left.right&&"setInterval"!==left.right||(warning("W066",left),addInternalSrc(left,p[0].value)):(warning("W066",left),addInternalSrc(left,p[0].value))),left.identifier||"."===left.id||"["===left.id||"=>"===left.id||"("===left.id||"&&"===left.id||"||"===left.id||"?"===left.id||state.inES6()&&left["(name)"]||warning("W067",that)),that.left=left,that},155,!0).exps=!0,prefix("(",function(){var pn1,ret,triggerFnExpr,first,last,pn=state.tokens.next,i=-1,parens=1,opening=state.tokens.curr,preceeding=state.tokens.prev,isNecessary=!state.option.singleGroups;do"("===pn.value?parens+=1:")"===pn.value&&(parens-=1),i+=1,pn1=pn,pn=peek(i);while((0!==parens||")"!==pn1.value)&&";"!==pn.value&&"(end)"!==pn.type);if("function"===state.tokens.next.id&&(triggerFnExpr=state.tokens.next.immed=!0),"=>"===pn.value)return doFunction({type:"arrow",parsedOpening:!0});var exprs=[];if(")"!==state.tokens.next.id)for(;exprs.push(expression(10)),","===state.tokens.next.id;)state.option.nocomma&&warning("W127"),comma();return advance(")",this),state.option.immed&&exprs[0]&&"function"===exprs[0].id&&"("!==state.tokens.next.id&&"."!==state.tokens.next.id&&"["!==state.tokens.next.id&&warning("W068",this),exprs.length?(exprs.length>1?(ret=Object.create(state.syntax[","]),ret.exprs=exprs,first=exprs[0],last=exprs[exprs.length-1],isNecessary||(isNecessary=preceeding.assign||preceeding.delim)):(ret=first=last=exprs[0],isNecessary||(isNecessary=opening.beginsStmt&&("{"===ret.id||triggerFnExpr||isFunctor(ret))||triggerFnExpr&&(!isEndOfExpr()||"}"!==state.tokens.prev.id)||isFunctor(ret)&&!isEndOfExpr()||"{"===ret.id&&"=>"===preceeding.id||"(number)"===ret.type&&checkPunctuator(pn,".")&&/^\\d+$/.test(ret.value))),ret&&(!isNecessary&&(first.left||first.right||ret.exprs)&&(isNecessary=!isBeginOfExpr(preceeding)&&first.lbp<=preceeding.lbp||!isEndOfExpr()&&last.lbp<state.tokens.next.lbp),isNecessary||warning("W126",opening),ret.paren=!0),ret):void 0}),application("=>"),infix("[",function(left,that){var s,e=expression(10);return e&&"(string)"===e.type&&(state.option.evil||"eval"!==e.value&&"execScript"!==e.value||isGlobalEval(left,state)&&warning("W061"),countMember(e.value),!state.option.sub&&reg.identifier.test(e.value)&&(s=state.syntax[e.value],s&&isReserved(s)||warning("W069",state.tokens.prev,e.value))),advance("]",that),e&&"hasOwnProperty"===e.value&&"="===state.tokens.next.value&&warning("W001"),that.left=left,that.right=e,that},160,!0),prefix("[",function(){var blocktype=lookupBlockType();if(blocktype.isCompArray)return state.option.esnext||state.inMoz()||warning("W118",state.tokens.curr,"array comprehension"),comprehensiveArrayExpression();if(blocktype.isDestAssign)return this.destructAssign=destructuringPattern({openingParsed:!0,assignment:!0}),this;var b=state.tokens.curr.line!==startLine(state.tokens.next);for(this.first=[],b&&(indent+=state.option.indent,state.tokens.next.from===indent+state.option.indent&&(indent+=state.option.indent));"(end)"!==state.tokens.next.id;){for(;","===state.tokens.next.id;){if(!state.option.elision){if(state.inES5()){warning("W128");do advance(",");while(","===state.tokens.next.id);continue}warning("W070")}advance(",")}if("]"===state.tokens.next.id)break;if(this.first.push(expression(10)),","!==state.tokens.next.id)break;if(comma({allowTrailing:!0}),"]"===state.tokens.next.id&&!state.inES5()){warning("W070",state.tokens.curr);break}}return b&&(indent-=state.option.indent),advance("]",this),this}),function(x){x.nud=function(){var b,f,i,p,t,nextVal,isGeneratorMethod=!1,props=Object.create(null);b=state.tokens.curr.line!==startLine(state.tokens.next),b&&(indent+=state.option.indent,state.tokens.next.from===indent+state.option.indent&&(indent+=state.option.indent));var blocktype=lookupBlockType();if(blocktype.isDestAssign)return this.destructAssign=destructuringPattern({openingParsed:!0,assignment:!0}),this;for(;"}"!==state.tokens.next.id;){if(nextVal=state.tokens.next.value,!state.tokens.next.identifier||","!==peekIgnoreEOL().id&&"}"!==peekIgnoreEOL().id)if(":"===peek().id||"get"!==nextVal&&"set"!==nextVal){if("*"===state.tokens.next.value&&"(punctuator)"===state.tokens.next.type?(state.inES6()||warning("W104",state.tokens.next,"generator functions","6"),advance("*"),isGeneratorMethod=!0):isGeneratorMethod=!1,"["===state.tokens.next.id)i=computedPropertyName(),state.nameStack.set(i);else if(state.nameStack.set(state.tokens.next),i=propertyName(),saveProperty(props,i,state.tokens.next),"string"!=typeof i)break;"("===state.tokens.next.value?(state.inES6()||warning("W104",state.tokens.curr,"concise methods","6"),doFunction({type:isGeneratorMethod?"generator":null})):(advance(":"),expression(10))}else advance(nextVal),state.inES5()||error("E034"),i=propertyName(),i||state.inES6()||error("E035"),i&&saveAccessor(nextVal,props,i,state.tokens.curr),t=state.tokens.next,f=doFunction(),p=f["(params)"],"get"===nextVal&&i&&p?warning("W076",t,p[0],i):"set"!==nextVal||!i||p&&1===p.length||warning("W077",t,i);else state.inES6()||warning("W104",state.tokens.next,"object short notation","6"),i=propertyName(!0),saveProperty(props,i,state.tokens.next),expression(10);if(countMember(i),","!==state.tokens.next.id)break;comma({allowTrailing:!0,property:!0}),","===state.tokens.next.id?warning("W070",state.tokens.curr):"}"!==state.tokens.next.id||state.inES5()||warning("W070",state.tokens.curr)}return b&&(indent-=state.option.indent),advance("}",this),checkProperties(props),this},x.fud=function(){error("E036",state.tokens.curr)}}(delim("{"));var conststatement=stmt("const",function(context){return blockVariableStatement("const",this,context)});conststatement.exps=!0;var letstatement=stmt("let",function(context){return blockVariableStatement("let",this,context)});letstatement.exps=!0;var varstatement=stmt("var",function(context){var tokens,lone,value,prefix=context&&context.prefix,inexport=context&&context.inexport,implied=context&&context.implied,report=!(context&&context.ignore);for(this.first=[];;){var names=[];_.contains(["{","["],state.tokens.next.value)?(tokens=destructuringPattern(),lone=!1):(tokens=[{id:identifier(),token:state.tokens.curr}],lone=!0),prefix&&implied||!report||!state.option.varstmt||warning("W132",this),this.first=this.first.concat(names);for(var t in tokens)tokens.hasOwnProperty(t)&&(t=tokens[t],!implied&&state.funct["(global)"]&&(predefined[t.id]===!1?warning("W079",t.token,t.id):state.option.futurehostile===!1&&(!state.inES5()&&vars.ecmaIdentifiers[5][t.id]===!1||!state.inES6()&&vars.ecmaIdentifiers[6][t.id]===!1)&&warning("W129",t.token,t.id)),t.id&&("for"===implied?(state.funct["(scope)"].has(t.id)||report&&warning("W088",t.token,t.id),state.funct["(scope)"].block.use(t.id,t.token)):(state.funct["(scope)"].addlabel(t.id,{type:"var",token:t.token}),lone&&inexport&&state.funct["(scope)"].setExported(t.id,t.token)),names.push(t.token)));if("="===state.tokens.next.id&&(state.nameStack.set(state.tokens.curr),advance("="),prefix||!report||state.funct["(loopage)"]||"undefined"!==state.tokens.next.id||warning("W080",state.tokens.prev,state.tokens.prev.value),"="===peek(0).id&&state.tokens.next.identifier&&(!prefix&&report&&!state.funct["(params)"]||-1===state.funct["(params)"].indexOf(state.tokens.next.value))&&warning("W120",state.tokens.next,state.tokens.next.value),value=expression(prefix?120:10),lone?tokens[0].first=value:destructuringPatternMatch(names,value)),","!==state.tokens.next.id)break;comma()}return this});varstatement.exps=!0,blockstmt("class",function(){return classdef.call(this,!0)}),blockstmt("function",function(context){var inexport=context&&context.inexport,generator=!1;"*"===state.tokens.next.value&&(advance("*"),state.inES6({strict:!0})?generator=!0:warning("W119",state.tokens.curr,"function*","6")),inblock&&warning("W082",state.tokens.curr);var i=optionalidentifier();return state.funct["(scope)"].addlabel(i,{type:"function",token:state.tokens.curr}),void 0===i?warning("W025"):inexport&&state.funct["(scope)"].setExported(i,state.tokens.prev),doFunction({name:i,statement:this,type:generator?"generator":null,ignoreLoopFunc:inblock}),"("===state.tokens.next.id&&state.tokens.next.line===state.tokens.curr.line&&error("E039"),this}),prefix("function",function(){var generator=!1;"*"===state.tokens.next.value&&(state.inES6()||warning("W119",state.tokens.curr,"function*","6"),advance("*"),generator=!0);var i=optionalidentifier();return doFunction({name:i,type:generator?"generator":null}),this}),blockstmt("if",function(){var t=state.tokens.next;increaseComplexityCount(),state.condition=!0,advance("(");var expr=expression(0);checkCondAssignment(expr);var forinifcheck=null;state.option.forin&&state.forinifcheckneeded&&(state.forinifcheckneeded=!1,forinifcheck=state.forinifchecks[state.forinifchecks.length-1],forinifcheck.type="(punctuator)"===expr.type&&"!"===expr.value?"(negative)":"(positive)"),advance(")",t),state.condition=!1;var s=block(!0,!0);return forinifcheck&&"(negative)"===forinifcheck.type&&s&&s[0]&&"(identifier)"===s[0].type&&"continue"===s[0].value&&(forinifcheck.type="(negative-with-continue)"),"else"===state.tokens.next.id&&(advance("else"),"if"===state.tokens.next.id||"switch"===state.tokens.next.id?statement():block(!0,!0)),this}),blockstmt("try",function(){function doCatch(){if(advance("catch"),advance("("),state.funct["(scope)"].stack("catchparams"),checkPunctuators(state.tokens.next,["[","{"])){var tokens=destructuringPattern();_.each(tokens,function(token){token.id&&state.funct["(scope)"].addParam(token.id,token,"exception")})}else"(identifier)"!==state.tokens.next.type?warning("E030",state.tokens.next,state.tokens.next.value):state.funct["(scope)"].addParam(identifier(),state.tokens.curr,"exception");"if"===state.tokens.next.value&&(state.inMoz()||warning("W118",state.tokens.curr,"catch filter"),advance("if"),expression(0)),advance(")"),block(!1),state.funct["(scope)"].unstack()}var b;for(block(!0);"catch"===state.tokens.next.id;)increaseComplexityCount(),b&&!state.inMoz()&&warning("W118",state.tokens.next,"multiple catch blocks"),doCatch(),b=!0;return"finally"===state.tokens.next.id?(advance("finally"),block(!0),void 0):(b||error("E021",state.tokens.next,"catch",state.tokens.next.value),this)}),blockstmt("while",function(){var t=state.tokens.next;return state.funct["(breakage)"]+=1,state.funct["(loopage)"]+=1,increaseComplexityCount(),advance("("),checkCondAssignment(expression(0)),advance(")",t),block(!0,!0),state.funct["(breakage)"]-=1,state.funct["(loopage)"]-=1,this}).labelled=!0,blockstmt("with",function(){var t=state.tokens.next;return state.isStrict()?error("E010",state.tokens.curr):state.option.withstmt||warning("W085",state.tokens.curr),advance("("),expression(0),advance(")",t),block(!0,!0),this}),blockstmt("switch",function(){var t=state.tokens.next,g=!1,noindent=!1;\nfor(state.funct["(breakage)"]+=1,advance("("),checkCondAssignment(expression(0)),advance(")",t),t=state.tokens.next,advance("{"),state.tokens.next.from===indent&&(noindent=!0),noindent||(indent+=state.option.indent),this.cases=[];;)switch(state.tokens.next.id){case"case":switch(state.funct["(verb)"]){case"yield":case"break":case"case":case"continue":case"return":case"switch":case"throw":break;default:state.tokens.curr.caseFallsThrough||warning("W086",state.tokens.curr,"case")}advance("case"),this.cases.push(expression(0)),increaseComplexityCount(),g=!0,advance(":"),state.funct["(verb)"]="case";break;case"default":switch(state.funct["(verb)"]){case"yield":case"break":case"continue":case"return":case"throw":break;default:this.cases.length&&(state.tokens.curr.caseFallsThrough||warning("W086",state.tokens.curr,"default"))}advance("default"),g=!0,advance(":");break;case"}":return noindent||(indent-=state.option.indent),advance("}",t),state.funct["(breakage)"]-=1,state.funct["(verb)"]=void 0,void 0;case"(end)":return error("E023",state.tokens.next,"}"),void 0;default:if(indent+=state.option.indent,g)switch(state.tokens.curr.id){case",":return error("E040"),void 0;case":":g=!1,statements();break;default:return error("E025",state.tokens.curr),void 0}else{if(":"!==state.tokens.curr.id)return error("E021",state.tokens.next,"case",state.tokens.next.value),void 0;advance(":"),error("E024",state.tokens.curr,":"),statements()}indent-=state.option.indent}return this}).labelled=!0,stmt("debugger",function(){return state.option.debug||warning("W087",this),this}).exps=!0,function(){var x=stmt("do",function(){state.funct["(breakage)"]+=1,state.funct["(loopage)"]+=1,increaseComplexityCount(),this.first=block(!0,!0),advance("while");var t=state.tokens.next;return advance("("),checkCondAssignment(expression(0)),advance(")",t),state.funct["(breakage)"]-=1,state.funct["(loopage)"]-=1,this});x.labelled=!0,x.exps=!0}(),blockstmt("for",function(){var s,t=state.tokens.next,letscope=!1,foreachtok=null;"each"===t.value&&(foreachtok=t,advance("each"),state.inMoz()||warning("W118",state.tokens.curr,"for each")),increaseComplexityCount(),advance("(");var nextop,comma,initializer,i=0,inof=["in","of"],level=0;checkPunctuators(state.tokens.next,["{","["])&&++level;do{if(nextop=peek(i),++i,checkPunctuators(nextop,["{","["])?++level:checkPunctuators(nextop,["}","]"])&&--level,0>level)break;0===level&&(!comma&&checkPunctuator(nextop,",")?comma=nextop:!initializer&&checkPunctuator(nextop,"=")&&(initializer=nextop))}while(level>0||!_.contains(inof,nextop.value)&&";"!==nextop.value&&"(end)"!==nextop.type);if(_.contains(inof,nextop.value)){state.inES6()||"of"!==nextop.value||warning("W104",nextop,"for of","6");var ok=!(initializer||comma);if(initializer&&error("W133",comma,nextop.value,"initializer is forbidden"),comma&&error("W133",comma,nextop.value,"more than one ForBinding"),"var"===state.tokens.next.id?(advance("var"),state.tokens.curr.fud({prefix:!0})):"let"===state.tokens.next.id||"const"===state.tokens.next.id?(advance(state.tokens.next.id),letscope=!0,state.funct["(scope)"].stack(),state.tokens.curr.fud({prefix:!0})):Object.create(varstatement).fud({prefix:!0,implied:"for",ignore:!ok}),advance(nextop.value),expression(20),advance(")",t),"in"===nextop.value&&state.option.forin&&(state.forinifcheckneeded=!0,void 0===state.forinifchecks&&(state.forinifchecks=[]),state.forinifchecks.push({type:"(none)"})),state.funct["(breakage)"]+=1,state.funct["(loopage)"]+=1,s=block(!0,!0),"in"===nextop.value&&state.option.forin){if(state.forinifchecks&&state.forinifchecks.length>0){var check=state.forinifchecks.pop();(s&&s.length>0&&("object"!=typeof s[0]||"if"!==s[0].value)||"(positive)"===check.type&&s.length>1||"(negative)"===check.type)&&warning("W089",this)}state.forinifcheckneeded=!1}state.funct["(breakage)"]-=1,state.funct["(loopage)"]-=1}else{if(foreachtok&&error("E045",foreachtok),";"!==state.tokens.next.id)if("var"===state.tokens.next.id)advance("var"),state.tokens.curr.fud();else if("let"===state.tokens.next.id)advance("let"),letscope=!0,state.funct["(scope)"].stack(),state.tokens.curr.fud();else for(;expression(0,"for"),","===state.tokens.next.id;)comma();if(nolinebreak(state.tokens.curr),advance(";"),state.funct["(loopage)"]+=1,";"!==state.tokens.next.id&&checkCondAssignment(expression(0)),nolinebreak(state.tokens.curr),advance(";"),";"===state.tokens.next.id&&error("E021",state.tokens.next,")",";"),")"!==state.tokens.next.id)for(;expression(0,"for"),","===state.tokens.next.id;)comma();advance(")",t),state.funct["(breakage)"]+=1,block(!0,!0),state.funct["(breakage)"]-=1,state.funct["(loopage)"]-=1}return letscope&&state.funct["(scope)"].unstack(),this}).labelled=!0,stmt("break",function(){var v=state.tokens.next.value;return state.option.asi||nolinebreak(this),";"===state.tokens.next.id||state.tokens.next.reach||state.tokens.curr.line!==startLine(state.tokens.next)?0===state.funct["(breakage)"]&&warning("W052",state.tokens.next,this.value):(state.funct["(scope)"].funct.hasBreakLabel(v)||warning("W090",state.tokens.next,v),this.first=state.tokens.next,advance()),reachable(this),this}).exps=!0,stmt("continue",function(){var v=state.tokens.next.value;return 0===state.funct["(breakage)"]&&warning("W052",state.tokens.next,this.value),state.funct["(loopage)"]||warning("W052",state.tokens.next,this.value),state.option.asi||nolinebreak(this),";"===state.tokens.next.id||state.tokens.next.reach||state.tokens.curr.line===startLine(state.tokens.next)&&(state.funct["(scope)"].funct.hasBreakLabel(v)||warning("W090",state.tokens.next,v),this.first=state.tokens.next,advance()),reachable(this),this}).exps=!0,stmt("return",function(){return this.line===startLine(state.tokens.next)?";"===state.tokens.next.id||state.tokens.next.reach||(this.first=expression(0),!this.first||"(punctuator)"!==this.first.type||"="!==this.first.value||this.first.paren||state.option.boss||warningAt("W093",this.first.line,this.first.character)):"(punctuator)"===state.tokens.next.type&&["[","{","+","-"].indexOf(state.tokens.next.value)>-1&&nolinebreak(this),reachable(this),this}).exps=!0,function(x){x.exps=!0,x.lbp=25}(prefix("yield",function(){var prev=state.tokens.prev;state.inES6(!0)&&!state.funct["(generator)"]?"(catch)"===state.funct["(name)"]&&state.funct["(context)"]["(generator)"]||error("E046",state.tokens.curr,"yield"):state.inES6()||warning("W104",state.tokens.curr,"yield","6"),state.funct["(generator)"]="yielded";var delegatingYield=!1;return"*"===state.tokens.next.value&&(delegatingYield=!0,advance("*")),this.line!==startLine(state.tokens.next)&&state.inMoz()?state.option.asi||nolinebreak(this):((delegatingYield||";"!==state.tokens.next.id&&!state.option.asi&&!state.tokens.next.reach&&state.tokens.next.nud)&&(nobreaknonadjacent(state.tokens.curr,state.tokens.next),this.first=expression(10),"(punctuator)"!==this.first.type||"="!==this.first.value||this.first.paren||state.option.boss||warningAt("W093",this.first.line,this.first.character)),state.inMoz()&&")"!==state.tokens.next.id&&(prev.lbp>30||!prev.assign&&!isEndOfExpr()||"yield"===prev.id)&&error("E050",this)),this})),stmt("throw",function(){return nolinebreak(this),this.first=expression(20),reachable(this),this}).exps=!0,stmt("import",function(){if(state.inES6()||warning("W119",state.tokens.curr,"import","6"),"(string)"===state.tokens.next.type)return advance("(string)"),this;if(state.tokens.next.identifier){if(this.name=identifier(),state.funct["(scope)"].addlabel(this.name,{type:"const",token:state.tokens.curr}),","!==state.tokens.next.value)return advance("from"),advance("(string)"),this;advance(",")}if("*"===state.tokens.next.id)advance("*"),advance("as"),state.tokens.next.identifier&&(this.name=identifier(),state.funct["(scope)"].addlabel(this.name,{type:"const",token:state.tokens.curr}));else for(advance("{");;){if("}"===state.tokens.next.value){advance("}");break}var importName;if("default"===state.tokens.next.type?(importName="default",advance("default")):importName=identifier(),"as"===state.tokens.next.value&&(advance("as"),importName=identifier()),state.funct["(scope)"].addlabel(importName,{type:"const",token:state.tokens.curr}),","!==state.tokens.next.value){if("}"===state.tokens.next.value){advance("}");break}error("E024",state.tokens.next,state.tokens.next.value);break}advance(",")}return advance("from"),advance("(string)"),this}).exps=!0,stmt("export",function(){var token,identifier,ok=!0;if(state.inES6()||(warning("W119",state.tokens.curr,"export","6"),ok=!1),state.funct["(scope)"].block.isGlobal()||(error("E053",state.tokens.curr),ok=!1),"*"===state.tokens.next.value)return advance("*"),advance("from"),advance("(string)"),this;if("default"===state.tokens.next.type){state.nameStack.set(state.tokens.next),advance("default");var exportType=state.tokens.next.id;return("function"===exportType||"class"===exportType)&&(this.block=!0),token=peek(),expression(10),identifier=token.value,this.block&&(state.funct["(scope)"].addlabel(identifier,{type:exportType,token:token}),state.funct["(scope)"].setExported(identifier,token)),this}if("{"===state.tokens.next.value){advance("{");for(var exportedTokens=[];;){if(state.tokens.next.identifier||error("E030",state.tokens.next,state.tokens.next.value),advance(),exportedTokens.push(state.tokens.curr),"as"===state.tokens.next.value&&(advance("as"),state.tokens.next.identifier||error("E030",state.tokens.next,state.tokens.next.value),advance()),","!==state.tokens.next.value){if("}"===state.tokens.next.value){advance("}");break}error("E024",state.tokens.next,state.tokens.next.value);break}advance(",")}return"from"===state.tokens.next.value?(advance("from"),advance("(string)")):ok&&exportedTokens.forEach(function(token){state.funct["(scope)"].setExported(token.value,token)}),this}if("var"===state.tokens.next.id)advance("var"),state.tokens.curr.fud({inexport:!0});else if("let"===state.tokens.next.id)advance("let"),state.tokens.curr.fud({inexport:!0});else if("const"===state.tokens.next.id)advance("const"),state.tokens.curr.fud({inexport:!0});else if("function"===state.tokens.next.id)this.block=!0,advance("function"),state.syntax["function"].fud({inexport:!0});else if("class"===state.tokens.next.id){this.block=!0,advance("class");var classNameToken=state.tokens.next;state.syntax["class"].fud(),state.funct["(scope)"].setExported(classNameToken.value,classNameToken)}else error("E024",state.tokens.next,state.tokens.next.value);return this}).exps=!0,FutureReservedWord("abstract"),FutureReservedWord("boolean"),FutureReservedWord("byte"),FutureReservedWord("char"),FutureReservedWord("class",{es5:!0,nud:classdef}),FutureReservedWord("double"),FutureReservedWord("enum",{es5:!0}),FutureReservedWord("export",{es5:!0}),FutureReservedWord("extends",{es5:!0}),FutureReservedWord("final"),FutureReservedWord("float"),FutureReservedWord("goto"),FutureReservedWord("implements",{es5:!0,strictOnly:!0}),FutureReservedWord("import",{es5:!0}),FutureReservedWord("int"),FutureReservedWord("interface",{es5:!0,strictOnly:!0}),FutureReservedWord("long"),FutureReservedWord("native"),FutureReservedWord("package",{es5:!0,strictOnly:!0}),FutureReservedWord("private",{es5:!0,strictOnly:!0}),FutureReservedWord("protected",{es5:!0,strictOnly:!0}),FutureReservedWord("public",{es5:!0,strictOnly:!0}),FutureReservedWord("short"),FutureReservedWord("static",{es5:!0,strictOnly:!0}),FutureReservedWord("super",{es5:!0}),FutureReservedWord("synchronized"),FutureReservedWord("transient"),FutureReservedWord("volatile");var lookupBlockType=function(){var pn,pn1,prev,i=-1,bracketStack=0,ret={};checkPunctuators(state.tokens.curr,["[","{"])&&(bracketStack+=1);do{if(prev=-1===i?state.tokens.curr:pn,pn=-1===i?state.tokens.next:peek(i),pn1=peek(i+1),i+=1,checkPunctuators(pn,["[","{"])?bracketStack+=1:checkPunctuators(pn,["]","}"])&&(bracketStack-=1),1===bracketStack&&pn.identifier&&"for"===pn.value&&!checkPunctuator(prev,".")){ret.isCompArray=!0,ret.notJson=!0;break}if(0===bracketStack&&checkPunctuators(pn,["}","]"])){if("="===pn1.value){ret.isDestAssign=!0,ret.notJson=!0;break}if("."===pn1.value){ret.notJson=!0;break}}checkPunctuator(pn,";")&&(ret.isBlock=!0,ret.notJson=!0)}while(bracketStack>0&&"(end)"!==pn.id);return ret},arrayComprehension=function(){function declare(v){var l=_current.variables.filter(function(elt){return elt.value===v?(elt.undef=!1,v):void 0}).length;return 0!==l}function use(v){var l=_current.variables.filter(function(elt){return elt.value!==v||elt.undef?void 0:(elt.unused===!0&&(elt.unused=!1),v)}).length;return 0===l}var _current,CompArray=function(){this.mode="use",this.variables=[]},_carrays=[];return{stack:function(){_current=new CompArray,_carrays.push(_current)},unstack:function(){_current.variables.filter(function(v){v.unused&&warning("W098",v.token,v.raw_text||v.value),v.undef&&state.funct["(scope)"].block.use(v.value,v.token)}),_carrays.splice(-1,1),_current=_carrays[_carrays.length-1]},setState:function(s){_.contains(["use","define","generate","filter"],s)&&(_current.mode=s)},check:function(v){return _current?_current&&"use"===_current.mode?(use(v)&&_current.variables.push({funct:state.funct,token:state.tokens.curr,value:v,undef:!0,unused:!1}),!0):_current&&"define"===_current.mode?(declare(v)||_current.variables.push({funct:state.funct,token:state.tokens.curr,value:v,undef:!1,unused:!0}),!0):_current&&"generate"===_current.mode?(state.funct["(scope)"].block.use(v,state.tokens.curr),!0):_current&&"filter"===_current.mode?(use(v)&&state.funct["(scope)"].block.use(v,state.tokens.curr),!0):!1:void 0}}},escapeRegex=function(str){return str.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g,"\\\\$&")},itself=function(s,o,g){function each(obj,cb){obj&&(Array.isArray(obj)||"object"!=typeof obj||(obj=Object.keys(obj)),obj.forEach(cb))}var i,k,x,reIgnoreStr,reIgnore,optionKeys,newOptionObj={},newIgnoredObj={};o=_.clone(o),state.reset(),o&&o.scope?JSHINT.scope=o.scope:(JSHINT.errors=[],JSHINT.undefs=[],JSHINT.internals=[],JSHINT.blacklist={},JSHINT.scope="(main)"),predefined=Object.create(null),combine(predefined,vars.ecmaIdentifiers[3]),combine(predefined,vars.reservedVars),combine(predefined,g||{}),declared=Object.create(null);var exported=Object.create(null);if(o)for(each(o.predef||null,function(item){var slice,prop;"-"===item[0]?(slice=item.slice(1),JSHINT.blacklist[slice]=slice,delete predefined[slice]):(prop=Object.getOwnPropertyDescriptor(o.predef,item),predefined[item]=prop?prop.value:!1)}),each(o.exported||null,function(item){exported[item]=!0}),delete o.predef,delete o.exported,optionKeys=Object.keys(o),x=0;optionKeys.length>x;x++)if(/^-W\\d{3}$/g.test(optionKeys[x]))newIgnoredObj[optionKeys[x].slice(1)]=!0;else{var optionKey=optionKeys[x];newOptionObj[optionKey]=o[optionKey],("esversion"===optionKey&&5===o[optionKey]||"es5"===optionKey&&o[optionKey])&&warning("I003"),"newcap"===optionKeys[x]&&o[optionKey]===!1&&(newOptionObj["(explicitNewcap)"]=!0)}state.option=newOptionObj,state.ignored=newIgnoredObj,state.option.indent=state.option.indent||4,state.option.maxerr=state.option.maxerr||50,indent=1;var scopeManagerInst=scopeManager(state,predefined,exported,declared);if(scopeManagerInst.on("warning",function(ev){warning.apply(null,[ev.code,ev.token].concat(ev.data))}),scopeManagerInst.on("error",function(ev){error.apply(null,[ev.code,ev.token].concat(ev.data))}),state.funct=functor("(global)",null,{"(global)":!0,"(scope)":scopeManagerInst,"(comparray)":arrayComprehension(),"(metrics)":createMetrics(state.tokens.next)}),functions=[state.funct],urls=[],stack=null,member={},membersOnly=null,inblock=!1,lookahead=[],!isString(s)&&!Array.isArray(s))return errorAt("E004",0),!1;api={get isJSON(){return state.jsonMode},getOption:function(name){return state.option[name]||null},getCache:function(name){return state.cache[name]},setCache:function(name,value){state.cache[name]=value},warn:function(code,data){warningAt.apply(null,[code,data.line,data.char].concat(data.data))},on:function(names,listener){names.split(" ").forEach(function(name){emitter.on(name,listener)}.bind(this))}},emitter.removeAllListeners(),(extraModules||[]).forEach(function(func){func(api)}),state.tokens.prev=state.tokens.curr=state.tokens.next=state.syntax["(begin)"],o&&o.ignoreDelimiters&&(Array.isArray(o.ignoreDelimiters)||(o.ignoreDelimiters=[o.ignoreDelimiters]),o.ignoreDelimiters.forEach(function(delimiterPair){delimiterPair.start&&delimiterPair.end&&(reIgnoreStr=escapeRegex(delimiterPair.start)+"[\\\\s\\\\S]*?"+escapeRegex(delimiterPair.end),reIgnore=RegExp(reIgnoreStr,"ig"),s=s.replace(reIgnore,function(match){return match.replace(/./g," ")}))})),lex=new Lexer(s),lex.on("warning",function(ev){warningAt.apply(null,[ev.code,ev.line,ev.character].concat(ev.data))}),lex.on("error",function(ev){errorAt.apply(null,[ev.code,ev.line,ev.character].concat(ev.data))}),lex.on("fatal",function(ev){quit("E041",ev.line,ev.from)}),lex.on("Identifier",function(ev){emitter.emit("Identifier",ev)}),lex.on("String",function(ev){emitter.emit("String",ev)}),lex.on("Number",function(ev){emitter.emit("Number",ev)}),lex.start();for(var name in o)_.has(o,name)&&checkOption(name,state.tokens.curr);assume(),combine(predefined,g||{}),comma.first=!0;try{switch(advance(),state.tokens.next.id){case"{":case"[":destructuringAssignOrJsonValue();break;default:directives(),state.directive["use strict"]&&"global"!==state.option.strict&&warning("W097",state.tokens.prev),statements()}"(end)"!==state.tokens.next.id&&quit("E041",state.tokens.curr.line),state.funct["(scope)"].unstack()}catch(err){if(!err||"JSHintError"!==err.name)throw err;var nt=state.tokens.next||{};JSHINT.errors.push({scope:"(main)",raw:err.raw,code:err.code,reason:err.message,line:err.line||nt.line,character:err.character||nt.from},null)}if("(main)"===JSHINT.scope)for(o=o||{},i=0;JSHINT.internals.length>i;i+=1)k=JSHINT.internals[i],o.scope=k.elem,itself(k.value,o,g);return 0===JSHINT.errors.length};return itself.addModule=function(func){extraModules.push(func)},itself.addModule(style.register),itself.data=function(){var fu,f,i,j,n,globals,data={functions:[],options:state.option};itself.errors.length&&(data.errors=itself.errors),state.jsonMode&&(data.json=!0);var impliedGlobals=state.funct["(scope)"].getImpliedGlobals();for(impliedGlobals.length>0&&(data.implieds=impliedGlobals),urls.length>0&&(data.urls=urls),globals=state.funct["(scope)"].getUsedOrDefinedGlobals(),globals.length>0&&(data.globals=globals),i=1;functions.length>i;i+=1){for(f=functions[i],fu={},j=0;functionicity.length>j;j+=1)fu[functionicity[j]]=[];for(j=0;functionicity.length>j;j+=1)0===fu[functionicity[j]].length&&delete fu[functionicity[j]];fu.name=f["(name)"],fu.param=f["(params)"],fu.line=f["(line)"],fu.character=f["(character)"],fu.last=f["(last)"],fu.lastcharacter=f["(lastcharacter)"],fu.metrics={complexity:f["(metrics)"].ComplexityCount,parameters:f["(metrics)"].arity,statements:f["(metrics)"].statementCount},data.functions.push(fu)}var unuseds=state.funct["(scope)"].getUnuseds();unuseds.length>0&&(data.unused=unuseds);for(n in member)if("number"==typeof member[n]){data.member=member;break}return data},itself.jshint=itself,itself}();"object"==typeof exports&&exports&&(exports.JSHINT=JSHINT)},{"../lodash":"/node_modules/jshint/lodash.js","./lex.js":"/node_modules/jshint/src/lex.js","./messages.js":"/node_modules/jshint/src/messages.js","./options.js":"/node_modules/jshint/src/options.js","./reg.js":"/node_modules/jshint/src/reg.js","./scope-manager.js":"/node_modules/jshint/src/scope-manager.js","./state.js":"/node_modules/jshint/src/state.js","./style.js":"/node_modules/jshint/src/style.js","./vars.js":"/node_modules/jshint/src/vars.js",events:"/node_modules/browserify/node_modules/events/events.js"}],"/node_modules/jshint/src/lex.js":[function(_dereq_,module,exports){"use strict";function asyncTrigger(){var _checks=[];return{push:function(fn){_checks.push(fn)},check:function(){for(var check=0;_checks.length>check;++check)_checks[check]();_checks.splice(0,_checks.length)}}}function Lexer(source){var lines=source;"string"==typeof lines&&(lines=lines.replace(/\\r\\n/g,"\\n").replace(/\\r/g,"\\n").split("\\n")),lines[0]&&"#!"===lines[0].substr(0,2)&&(-1!==lines[0].indexOf("node")&&(state.option.node=!0),lines[0]=""),this.emitter=new events.EventEmitter,this.source=source,this.setLines(lines),this.prereg=!0,this.line=0,this.char=1,this.from=1,this.input="",this.inComment=!1,this.context=[],this.templateStarts=[];for(var i=0;state.option.indent>i;i+=1)state.tab+=" ";this.ignoreLinterErrors=!1}var _=_dereq_("../lodash"),events=_dereq_("events"),reg=_dereq_("./reg.js"),state=_dereq_("./state.js").state,unicodeData=_dereq_("../data/ascii-identifier-data.js"),asciiIdentifierStartTable=unicodeData.asciiIdentifierStartTable,asciiIdentifierPartTable=unicodeData.asciiIdentifierPartTable,Token={Identifier:1,Punctuator:2,NumericLiteral:3,StringLiteral:4,Comment:5,Keyword:6,NullLiteral:7,BooleanLiteral:8,RegExp:9,TemplateHead:10,TemplateMiddle:11,TemplateTail:12,NoSubstTemplate:13},Context={Block:1,Template:2};Lexer.prototype={_lines:[],inContext:function(ctxType){return this.context.length>0&&this.context[this.context.length-1].type===ctxType},pushContext:function(ctxType){this.context.push({type:ctxType})},popContext:function(){return this.context.pop()},isContext:function(context){return this.context.length>0&&this.context[this.context.length-1]===context},currentContext:function(){return this.context.length>0&&this.context[this.context.length-1]},getLines:function(){return this._lines=state.lines,this._lines},setLines:function(val){this._lines=val,state.lines=this._lines},peek:function(i){return this.input.charAt(i||0)},skip:function(i){i=i||1,this.char+=i,this.input=this.input.slice(i)},on:function(names,listener){names.split(" ").forEach(function(name){this.emitter.on(name,listener)}.bind(this))},trigger:function(){this.emitter.emit.apply(this.emitter,Array.prototype.slice.call(arguments))},triggerAsync:function(type,args,checks,fn){checks.push(function(){fn()&&this.trigger(type,args)}.bind(this))},scanPunctuator:function(){var ch2,ch3,ch4,ch1=this.peek();switch(ch1){case".":if(/^[0-9]$/.test(this.peek(1)))return null;if("."===this.peek(1)&&"."===this.peek(2))return{type:Token.Punctuator,value:"..."};case"(":case")":case";":case",":case"[":case"]":case":":case"~":case"?":return{type:Token.Punctuator,value:ch1};case"{":return this.pushContext(Context.Block),{type:Token.Punctuator,value:ch1};case"}":return this.inContext(Context.Block)&&this.popContext(),{type:Token.Punctuator,value:ch1};case"#":return{type:Token.Punctuator,value:ch1};case"":return null}return ch2=this.peek(1),ch3=this.peek(2),ch4=this.peek(3),">"===ch1&&">"===ch2&&">"===ch3&&"="===ch4?{type:Token.Punctuator,value:">>>="}:"="===ch1&&"="===ch2&&"="===ch3?{type:Token.Punctuator,value:"==="}:"!"===ch1&&"="===ch2&&"="===ch3?{type:Token.Punctuator,value:"!=="}:">"===ch1&&">"===ch2&&">"===ch3?{type:Token.Punctuator,value:">>>"}:"<"===ch1&&"<"===ch2&&"="===ch3?{type:Token.Punctuator,value:"<<="}:">"===ch1&&">"===ch2&&"="===ch3?{type:Token.Punctuator,value:">>="}:"="===ch1&&">"===ch2?{type:Token.Punctuator,value:ch1+ch2}:ch1===ch2&&"+-<>&|".indexOf(ch1)>=0?{type:Token.Punctuator,value:ch1+ch2}:"<>=!+-*%&|^".indexOf(ch1)>=0?"="===ch2?{type:Token.Punctuator,value:ch1+ch2}:{type:Token.Punctuator,value:ch1}:"/"===ch1?"="===ch2?{type:Token.Punctuator,value:"/="}:{type:Token.Punctuator,value:"/"}:null},scanComments:function(){function commentToken(label,body,opt){var special=["jshint","jslint","members","member","globals","global","exported"],isSpecial=!1,value=label+body,commentType="plain";return opt=opt||{},opt.isMultiline&&(value+="*/"),body=body.replace(/\\n/g," "),"/*"===label&&reg.fallsThrough.test(body)&&(isSpecial=!0,commentType="falls through"),special.forEach(function(str){if(!isSpecial&&("//"!==label||"jshint"===str)&&(" "===body.charAt(str.length)&&body.substr(0,str.length)===str&&(isSpecial=!0,label+=str,body=body.substr(str.length)),isSpecial||" "!==body.charAt(0)||" "!==body.charAt(str.length+1)||body.substr(1,str.length)!==str||(isSpecial=!0,label=label+" "+str,body=body.substr(str.length+1)),isSpecial))switch(str){case"member":commentType="members";break;case"global":commentType="globals";break;default:var options=body.split(":").map(function(v){return v.replace(/^\\s+/,"").replace(/\\s+$/,"")});if(2===options.length)switch(options[0]){case"ignore":switch(options[1]){case"start":self.ignoringLinterErrors=!0,isSpecial=!1;break;case"end":self.ignoringLinterErrors=!1,isSpecial=!1}}commentType=str}}),{type:Token.Comment,commentType:commentType,value:value,body:body,isSpecial:isSpecial,isMultiline:opt.isMultiline||!1,isMalformed:opt.isMalformed||!1}}var ch1=this.peek(),ch2=this.peek(1),rest=this.input.substr(2),startLine=this.line,startChar=this.char,self=this;if("*"===ch1&&"/"===ch2)return this.trigger("error",{code:"E018",line:startLine,character:startChar}),this.skip(2),null;if("/"!==ch1||"*"!==ch2&&"/"!==ch2)return null;if("/"===ch2)return this.skip(this.input.length),commentToken("//",rest);var body="";if("*"===ch2){for(this.inComment=!0,this.skip(2);"*"!==this.peek()||"/"!==this.peek(1);)if(""===this.peek()){if(body+="\\n",!this.nextLine())return this.trigger("error",{code:"E017",line:startLine,character:startChar}),this.inComment=!1,commentToken("/*",body,{isMultiline:!0,isMalformed:!0})}else body+=this.peek(),this.skip();return this.skip(2),this.inComment=!1,commentToken("/*",body,{isMultiline:!0})}},scanKeyword:function(){var result=/^[a-zA-Z_$][a-zA-Z0-9_$]*/.exec(this.input),keywords=["if","in","do","var","for","new","try","let","this","else","case","void","with","enum","while","break","catch","throw","const","yield","class","super","return","typeof","delete","switch","export","import","default","finally","extends","function","continue","debugger","instanceof"];return result&&keywords.indexOf(result[0])>=0?{type:Token.Keyword,value:result[0]}:null},scanIdentifier:function(){function isNonAsciiIdentifierStart(code){return code>256}function isNonAsciiIdentifierPart(code){return code>256}function isHexDigit(str){return/^[0-9a-fA-F]$/.test(str)}function removeEscapeSequences(id){return id.replace(/\\\\u([0-9a-fA-F]{4})/g,function(m0,codepoint){return String.fromCharCode(parseInt(codepoint,16))})}var type,char,id="",index=0,readUnicodeEscapeSequence=function(){if(index+=1,"u"!==this.peek(index))return null;var code,ch1=this.peek(index+1),ch2=this.peek(index+2),ch3=this.peek(index+3),ch4=this.peek(index+4);return isHexDigit(ch1)&&isHexDigit(ch2)&&isHexDigit(ch3)&&isHexDigit(ch4)?(code=parseInt(ch1+ch2+ch3+ch4,16),asciiIdentifierPartTable[code]||isNonAsciiIdentifierPart(code)?(index+=5,"\\\\u"+ch1+ch2+ch3+ch4):null):null}.bind(this),getIdentifierStart=function(){var chr=this.peek(index),code=chr.charCodeAt(0);return 92===code?readUnicodeEscapeSequence():128>code?asciiIdentifierStartTable[code]?(index+=1,chr):null:isNonAsciiIdentifierStart(code)?(index+=1,chr):null}.bind(this),getIdentifierPart=function(){var chr=this.peek(index),code=chr.charCodeAt(0);return 92===code?readUnicodeEscapeSequence():128>code?asciiIdentifierPartTable[code]?(index+=1,chr):null:isNonAsciiIdentifierPart(code)?(index+=1,chr):null}.bind(this);if(char=getIdentifierStart(),null===char)return null;for(id=char;char=getIdentifierPart(),null!==char;)id+=char;switch(id){case"true":case"false":type=Token.BooleanLiteral;break;case"null":type=Token.NullLiteral;break;default:type=Token.Identifier}return{type:type,value:removeEscapeSequences(id),text:id,tokenLength:id.length}},scanNumericLiteral:function(){function isDecimalDigit(str){return/^[0-9]$/.test(str)}function isOctalDigit(str){return/^[0-7]$/.test(str)}function isBinaryDigit(str){return/^[01]$/.test(str)}function isHexDigit(str){return/^[0-9a-fA-F]$/.test(str)}function isIdentifierStart(ch){return"$"===ch||"_"===ch||"\\\\"===ch||ch>="a"&&"z">=ch||ch>="A"&&"Z">=ch}var bad,index=0,value="",length=this.input.length,char=this.peek(index),isAllowedDigit=isDecimalDigit,base=10,isLegacy=!1;if("."!==char&&!isDecimalDigit(char))return null;if("."!==char){for(value=this.peek(index),index+=1,char=this.peek(index),"0"===value&&(("x"===char||"X"===char)&&(isAllowedDigit=isHexDigit,base=16,index+=1,value+=char),("o"===char||"O"===char)&&(isAllowedDigit=isOctalDigit,base=8,state.inES6(!0)||this.trigger("warning",{code:"W119",line:this.line,character:this.char,data:["Octal integer literal","6"]}),index+=1,value+=char),("b"===char||"B"===char)&&(isAllowedDigit=isBinaryDigit,base=2,state.inES6(!0)||this.trigger("warning",{code:"W119",line:this.line,character:this.char,data:["Binary integer literal","6"]}),index+=1,value+=char),isOctalDigit(char)&&(isAllowedDigit=isOctalDigit,base=8,isLegacy=!0,bad=!1,index+=1,value+=char),!isOctalDigit(char)&&isDecimalDigit(char)&&(index+=1,value+=char));length>index;){if(char=this.peek(index),isLegacy&&isDecimalDigit(char))bad=!0;else if(!isAllowedDigit(char))break;value+=char,index+=1}if(isAllowedDigit!==isDecimalDigit)return!isLegacy&&2>=value.length?{type:Token.NumericLiteral,value:value,isMalformed:!0}:length>index&&(char=this.peek(index),isIdentifierStart(char))?null:{type:Token.NumericLiteral,value:value,base:base,isLegacy:isLegacy,isMalformed:!1}}if("."===char)for(value+=char,index+=1;length>index&&(char=this.peek(index),isDecimalDigit(char));)value+=char,index+=1;if("e"===char||"E"===char){if(value+=char,index+=1,char=this.peek(index),("+"===char||"-"===char)&&(value+=this.peek(index),index+=1),char=this.peek(index),!isDecimalDigit(char))return null;for(value+=char,index+=1;length>index&&(char=this.peek(index),isDecimalDigit(char));)value+=char,index+=1}return length>index&&(char=this.peek(index),isIdentifierStart(char))?null:{type:Token.NumericLiteral,value:value,base:base,isMalformed:!isFinite(value)}},scanEscapeSequence:function(checks){var allowNewLine=!1,jump=1;this.skip();var char=this.peek();switch(char){case"\'":this.triggerAsync("warning",{code:"W114",line:this.line,character:this.char,data:["\\\\\'"]},checks,function(){return state.jsonMode});break;case"b":char="\\\\b";break;case"f":char="\\\\f";break;case"n":char="\\\\n";break;case"r":char="\\\\r";break;case"t":char="\\\\t";break;case"0":char="\\\\0";var n=parseInt(this.peek(1),10);this.triggerAsync("warning",{code:"W115",line:this.line,character:this.char},checks,function(){return n>=0&&7>=n&&state.isStrict()});break;case"u":var hexCode=this.input.substr(1,4),code=parseInt(hexCode,16);isNaN(code)&&this.trigger("warning",{code:"W052",line:this.line,character:this.char,data:["u"+hexCode]}),char=String.fromCharCode(code),jump=5;break;case"v":this.triggerAsync("warning",{code:"W114",line:this.line,character:this.char,data:["\\\\v"]},checks,function(){return state.jsonMode}),char="\x0B";break;case"x":var x=parseInt(this.input.substr(1,2),16);this.triggerAsync("warning",{code:"W114",line:this.line,character:this.char,data:["\\\\x-"]},checks,function(){return state.jsonMode}),char=String.fromCharCode(x),jump=3;break;case"\\\\":char="\\\\\\\\";break;case\'"\':char=\'\\\\"\';break;case"/":break;case"":allowNewLine=!0,char=""}return{"char":char,jump:jump,allowNewLine:allowNewLine}},scanTemplateLiteral:function(checks){var tokenType,ch,value="",startLine=this.line,startChar=this.char,depth=this.templateStarts.length;if(!state.inES6(!0))return null;if("`"===this.peek())tokenType=Token.TemplateHead,this.templateStarts.push({line:this.line,"char":this.char}),depth=this.templateStarts.length,this.skip(1),this.pushContext(Context.Template);else{if(!this.inContext(Context.Template)||"}"!==this.peek())return null;tokenType=Token.TemplateMiddle}for(;"`"!==this.peek();){for(;""===(ch=this.peek());)if(value+="\\n",!this.nextLine()){var startPos=this.templateStarts.pop();return this.trigger("error",{code:"E052",line:startPos.line,character:startPos.char}),{type:tokenType,value:value,startLine:startLine,startChar:startChar,isUnclosed:!0,depth:depth,context:this.popContext()}}if("$"===ch&&"{"===this.peek(1))return value+="${",this.skip(2),{type:tokenType,value:value,startLine:startLine,startChar:startChar,isUnclosed:!1,depth:depth,context:this.currentContext()};\nif("\\\\"===ch){var escape=this.scanEscapeSequence(checks);value+=escape.char,this.skip(escape.jump)}else"`"!==ch&&(value+=ch,this.skip(1))}return tokenType=tokenType===Token.TemplateHead?Token.NoSubstTemplate:Token.TemplateTail,this.skip(1),this.templateStarts.pop(),{type:tokenType,value:value,startLine:startLine,startChar:startChar,isUnclosed:!1,depth:depth,context:this.popContext()}},scanStringLiteral:function(checks){var quote=this.peek();if(\'"\'!==quote&&"\'"!==quote)return null;this.triggerAsync("warning",{code:"W108",line:this.line,character:this.char},checks,function(){return state.jsonMode&&\'"\'!==quote});var value="",startLine=this.line,startChar=this.char,allowNewLine=!1;for(this.skip();this.peek()!==quote;)if(""===this.peek()){if(allowNewLine?(allowNewLine=!1,this.triggerAsync("warning",{code:"W043",line:this.line,character:this.char},checks,function(){return!state.option.multistr}),this.triggerAsync("warning",{code:"W042",line:this.line,character:this.char},checks,function(){return state.jsonMode&&state.option.multistr})):this.trigger("warning",{code:"W112",line:this.line,character:this.char}),!this.nextLine())return this.trigger("error",{code:"E029",line:startLine,character:startChar}),{type:Token.StringLiteral,value:value,startLine:startLine,startChar:startChar,isUnclosed:!0,quote:quote}}else{allowNewLine=!1;var char=this.peek(),jump=1;if(" ">char&&this.trigger("warning",{code:"W113",line:this.line,character:this.char,data:["<non-printable>"]}),"\\\\"===char){var parsed=this.scanEscapeSequence(checks);char=parsed.char,jump=parsed.jump,allowNewLine=parsed.allowNewLine}value+=char,this.skip(jump)}return this.skip(),{type:Token.StringLiteral,value:value,startLine:startLine,startChar:startChar,isUnclosed:!1,quote:quote}},scanRegExp:function(){var terminated,index=0,length=this.input.length,char=this.peek(),value=char,body="",flags=[],malformed=!1,isCharSet=!1,scanUnexpectedChars=function(){" ">char&&(malformed=!0,this.trigger("warning",{code:"W048",line:this.line,character:this.char})),"<"===char&&(malformed=!0,this.trigger("warning",{code:"W049",line:this.line,character:this.char,data:[char]}))}.bind(this);if(!this.prereg||"/"!==char)return null;for(index+=1,terminated=!1;length>index;)if(char=this.peek(index),value+=char,body+=char,isCharSet)"]"===char&&("\\\\"!==this.peek(index-1)||"\\\\"===this.peek(index-2))&&(isCharSet=!1),"\\\\"===char&&(index+=1,char=this.peek(index),body+=char,value+=char,scanUnexpectedChars()),index+=1;else{if("\\\\"===char){if(index+=1,char=this.peek(index),body+=char,value+=char,scanUnexpectedChars(),"/"===char){index+=1;continue}if("["===char){index+=1;continue}}if("["!==char){if("/"===char){body=body.substr(0,body.length-1),terminated=!0,index+=1;break}index+=1}else isCharSet=!0,index+=1}if(!terminated)return this.trigger("error",{code:"E015",line:this.line,character:this.from}),void this.trigger("fatal",{line:this.line,from:this.from});for(;length>index&&(char=this.peek(index),/[gim]/.test(char));)flags.push(char),value+=char,index+=1;try{RegExp(body,flags.join(""))}catch(err){malformed=!0,this.trigger("error",{code:"E016",line:this.line,character:this.char,data:[err.message]})}return{type:Token.RegExp,value:value,flags:flags,isMalformed:malformed}},scanNonBreakingSpaces:function(){return state.option.nonbsp?this.input.search(/(\\u00A0)/):-1},scanUnsafeChars:function(){return this.input.search(reg.unsafeChars)},next:function(checks){this.from=this.char;var start;if(/\\s/.test(this.peek()))for(start=this.char;/\\s/.test(this.peek());)this.from+=1,this.skip();var match=this.scanComments()||this.scanStringLiteral(checks)||this.scanTemplateLiteral(checks);return match?match:(match=this.scanRegExp()||this.scanPunctuator()||this.scanKeyword()||this.scanIdentifier()||this.scanNumericLiteral(),match?(this.skip(match.tokenLength||match.value.length),match):null)},nextLine:function(){var char;if(this.line>=this.getLines().length)return!1;this.input=this.getLines()[this.line],this.line+=1,this.char=1,this.from=1;var inputTrimmed=this.input.trim(),startsWith=function(){return _.some(arguments,function(prefix){return 0===inputTrimmed.indexOf(prefix)})},endsWith=function(){return _.some(arguments,function(suffix){return-1!==inputTrimmed.indexOf(suffix,inputTrimmed.length-suffix.length)})};if(this.ignoringLinterErrors===!0&&(startsWith("/*","//")||this.inComment&&endsWith("*/")||(this.input="")),char=this.scanNonBreakingSpaces(),char>=0&&this.trigger("warning",{code:"W125",line:this.line,character:char+1}),this.input=this.input.replace(/\\t/g,state.tab),char=this.scanUnsafeChars(),char>=0&&this.trigger("warning",{code:"W100",line:this.line,character:char}),!this.ignoringLinterErrors&&state.option.maxlen&&state.option.maxlen<this.input.length){var inComment=this.inComment||startsWith.call(inputTrimmed,"//")||startsWith.call(inputTrimmed,"/*"),shouldTriggerError=!inComment||!reg.maxlenException.test(inputTrimmed);shouldTriggerError&&this.trigger("warning",{code:"W101",line:this.line,character:this.input.length})}return!0},start:function(){this.nextLine()},token:function(){function isReserved(token,isProperty){if(!token.reserved)return!1;var meta=token.meta;if(meta&&meta.isFutureReservedWord&&state.inES5()){if(!meta.es5)return!1;if(meta.strictOnly&&!state.option.strict&&!state.isStrict())return!1;if(isProperty)return!1}return!0}for(var token,checks=asyncTrigger(),create=function(type,value,isProperty,token){var obj;if("(endline)"!==type&&"(end)"!==type&&(this.prereg=!1),"(punctuator)"===type){switch(value){case".":case")":case"~":case"#":case"]":case"++":case"--":this.prereg=!1;break;default:this.prereg=!0}obj=Object.create(state.syntax[value]||state.syntax["(error)"])}return"(identifier)"===type&&(("return"===value||"case"===value||"typeof"===value)&&(this.prereg=!0),_.has(state.syntax,value)&&(obj=Object.create(state.syntax[value]||state.syntax["(error)"]),isReserved(obj,isProperty&&"(identifier)"===type)||(obj=null))),obj||(obj=Object.create(state.syntax[type])),obj.identifier="(identifier)"===type,obj.type=obj.type||type,obj.value=value,obj.line=this.line,obj.character=this.char,obj.from=this.from,obj.identifier&&token&&(obj.raw_text=token.text||token.value),token&&token.startLine&&token.startLine!==this.line&&(obj.startLine=token.startLine),token&&token.context&&(obj.context=token.context),token&&token.depth&&(obj.depth=token.depth),token&&token.isUnclosed&&(obj.isUnclosed=token.isUnclosed),isProperty&&obj.identifier&&(obj.isProperty=isProperty),obj.check=checks.check,obj}.bind(this);;){if(!this.input.length)return this.nextLine()?create("(endline)",""):this.exhausted?null:(this.exhausted=!0,create("(end)",""));if(token=this.next(checks))switch(token.type){case Token.StringLiteral:return this.triggerAsync("String",{line:this.line,"char":this.char,from:this.from,startLine:token.startLine,startChar:token.startChar,value:token.value,quote:token.quote},checks,function(){return!0}),create("(string)",token.value,null,token);case Token.TemplateHead:return this.trigger("TemplateHead",{line:this.line,"char":this.char,from:this.from,startLine:token.startLine,startChar:token.startChar,value:token.value}),create("(template)",token.value,null,token);case Token.TemplateMiddle:return this.trigger("TemplateMiddle",{line:this.line,"char":this.char,from:this.from,startLine:token.startLine,startChar:token.startChar,value:token.value}),create("(template middle)",token.value,null,token);case Token.TemplateTail:return this.trigger("TemplateTail",{line:this.line,"char":this.char,from:this.from,startLine:token.startLine,startChar:token.startChar,value:token.value}),create("(template tail)",token.value,null,token);case Token.NoSubstTemplate:return this.trigger("NoSubstTemplate",{line:this.line,"char":this.char,from:this.from,startLine:token.startLine,startChar:token.startChar,value:token.value}),create("(no subst template)",token.value,null,token);case Token.Identifier:this.triggerAsync("Identifier",{line:this.line,"char":this.char,from:this.form,name:token.value,raw_name:token.text,isProperty:"."===state.tokens.curr.id},checks,function(){return!0});case Token.Keyword:case Token.NullLiteral:case Token.BooleanLiteral:return create("(identifier)",token.value,"."===state.tokens.curr.id,token);case Token.NumericLiteral:return token.isMalformed&&this.trigger("warning",{code:"W045",line:this.line,character:this.char,data:[token.value]}),this.triggerAsync("warning",{code:"W114",line:this.line,character:this.char,data:["0x-"]},checks,function(){return 16===token.base&&state.jsonMode}),this.triggerAsync("warning",{code:"W115",line:this.line,character:this.char},checks,function(){return state.isStrict()&&8===token.base&&token.isLegacy}),this.trigger("Number",{line:this.line,"char":this.char,from:this.from,value:token.value,base:token.base,isMalformed:token.malformed}),create("(number)",token.value);case Token.RegExp:return create("(regexp)",token.value);case Token.Comment:if(state.tokens.curr.comment=!0,token.isSpecial)return{id:"(comment)",value:token.value,body:token.body,type:token.commentType,isSpecial:token.isSpecial,line:this.line,character:this.char,from:this.from};break;case"":break;default:return create("(punctuator)",token.value)}else this.input.length&&(this.trigger("error",{code:"E024",line:this.line,character:this.char,data:[this.peek()]}),this.input="")}}},exports.Lexer=Lexer,exports.Context=Context},{"../data/ascii-identifier-data.js":"/node_modules/jshint/data/ascii-identifier-data.js","../lodash":"/node_modules/jshint/lodash.js","./reg.js":"/node_modules/jshint/src/reg.js","./state.js":"/node_modules/jshint/src/state.js",events:"/node_modules/browserify/node_modules/events/events.js"}],"/node_modules/jshint/src/messages.js":[function(_dereq_,module,exports){"use strict";var _=_dereq_("../lodash"),errors={E001:"Bad option: \'{a}\'.",E002:"Bad option value.",E003:"Expected a JSON value.",E004:"Input is neither a string nor an array of strings.",E005:"Input is empty.",E006:"Unexpected early end of program.",E007:\'Missing "use strict" statement.\',E008:"Strict violation.",E009:"Option \'validthis\' can\'t be used in a global scope.",E010:"\'with\' is not allowed in strict mode.",E011:"\'{a}\' has already been declared.",E012:"const \'{a}\' is initialized to \'undefined\'.",E013:"Attempting to override \'{a}\' which is a constant.",E014:"A regular expression literal can be confused with \'/=\'.",E015:"Unclosed regular expression.",E016:"Invalid regular expression.",E017:"Unclosed comment.",E018:"Unbegun comment.",E019:"Unmatched \'{a}\'.",E020:"Expected \'{a}\' to match \'{b}\' from line {c} and instead saw \'{d}\'.",E021:"Expected \'{a}\' and instead saw \'{b}\'.",E022:"Line breaking error \'{a}\'.",E023:"Missing \'{a}\'.",E024:"Unexpected \'{a}\'.",E025:"Missing \':\' on a case clause.",E026:"Missing \'}\' to match \'{\' from line {a}.",E027:"Missing \']\' to match \'[\' from line {a}.",E028:"Illegal comma.",E029:"Unclosed string.",E030:"Expected an identifier and instead saw \'{a}\'.",E031:"Bad assignment.",E032:"Expected a small integer or \'false\' and instead saw \'{a}\'.",E033:"Expected an operator and instead saw \'{a}\'.",E034:"get/set are ES5 features.",E035:"Missing property name.",E036:"Expected to see a statement and instead saw a block.",E037:null,E038:null,E039:"Function declarations are not invocable. Wrap the whole function invocation in parens.",E040:"Each value should have its own case label.",E041:"Unrecoverable syntax error.",E042:"Stopping.",E043:"Too many errors.",E044:null,E045:"Invalid for each loop.",E046:"A yield statement shall be within a generator function (with syntax: `function*`)",E047:null,E048:"{a} declaration not directly within block.",E049:"A {a} cannot be named \'{b}\'.",E050:"Mozilla acequires the yield expression to be parenthesized here.",E051:null,E052:"Unclosed template literal.",E053:"Export declaration must be in global scope.",E054:"Class properties must be methods. Expected \'(\' but instead saw \'{a}\'.",E055:"The \'{a}\' option cannot be set after any executable code.",E056:"\'{a}\' was used before it was declared, which is illegal for \'{b}\' variables.",E057:"Invalid meta property: \'{a}.{b}\'.",E058:"Missing semicolon."},warnings={W001:"\'hasOwnProperty\' is a really bad name.",W002:"Value of \'{a}\' may be overwritten in IE 8 and earlier.",W003:"\'{a}\' was used before it was defined.",W004:"\'{a}\' is already defined.",W005:"A dot following a number can be confused with a decimal point.",W006:"Confusing minuses.",W007:"Confusing plusses.",W008:"A leading decimal point can be confused with a dot: \'{a}\'.",W009:"The array literal notation [] is preferable.",W010:"The object literal notation {} is preferable.",W011:null,W012:null,W013:null,W014:"Bad line breaking before \'{a}\'.",W015:null,W016:"Unexpected use of \'{a}\'.",W017:"Bad operand.",W018:"Confusing use of \'{a}\'.",W019:"Use the isNaN function to compare with NaN.",W020:"Read only.",W021:"Reassignment of \'{a}\', which is is a {b}. Use \'var\' or \'let\' to declare bindings that may change.",W022:"Do not assign to the exception parameter.",W023:"Expected an identifier in an assignment and instead saw a function invocation.",W024:"Expected an identifier and instead saw \'{a}\' (a reserved word).",W025:"Missing name in function declaration.",W026:"Inner functions should be listed at the top of the outer function.",W027:"Unreachable \'{a}\' after \'{b}\'.",W028:"Label \'{a}\' on {b} statement.",W030:"Expected an assignment or function call and instead saw an expression.",W031:"Do not use \'new\' for side effects.",W032:"Unnecessary semicolon.",W033:"Missing semicolon.",W034:\'Unnecessary directive "{a}".\',W035:"Empty block.",W036:"Unexpected /*member \'{a}\'.",W037:"\'{a}\' is a statement label.",W038:"\'{a}\' used out of scope.",W039:"\'{a}\' is not allowed.",W040:"Possible strict violation.",W041:"Use \'{a}\' to compare with \'{b}\'.",W042:"Avoid EOL escaping.",W043:"Bad escaping of EOL. Use option multistr if needed.",W044:"Bad or unnecessary escaping.",W045:"Bad number \'{a}\'.",W046:"Don\'t use extra leading zeros \'{a}\'.",W047:"A trailing decimal point can be confused with a dot: \'{a}\'.",W048:"Unexpected control character in regular expression.",W049:"Unexpected escaped character \'{a}\' in regular expression.",W050:"JavaScript URL.",W051:"Variables should not be deleted.",W052:"Unexpected \'{a}\'.",W053:"Do not use {a} as a constructor.",W054:"The Function constructor is a form of eval.",W055:"A constructor name should start with an uppercase letter.",W056:"Bad constructor.",W057:"Weird construction. Is \'new\' necessary?",W058:"Missing \'()\' invoking a constructor.",W059:"Avoid arguments.{a}.",W060:"document.write can be a form of eval.",W061:"eval can be harmful.",W062:"Wrap an immediate function invocation in parens to assist the reader in understanding that the expression is the result of a function, and not the function itself.",W063:"Math is not a function.",W064:"Missing \'new\' prefix when invoking a constructor.",W065:"Missing radix parameter.",W066:"Implied eval. Consider passing a function instead of a string.",W067:"Bad invocation.",W068:"Wrapping non-IIFE function literals in parens is unnecessary.",W069:"[\'{a}\'] is better written in dot notation.",W070:"Extra comma. (it breaks older versions of IE)",W071:"This function has too many statements. ({a})",W072:"This function has too many parameters. ({a})",W073:"Blocks are nested too deeply. ({a})",W074:"This function\'s cyclomatic complexity is too high. ({a})",W075:"Duplicate {a} \'{b}\'.",W076:"Unexpected parameter \'{a}\' in get {b} function.",W077:"Expected a single parameter in set {a} function.",W078:"Setter is defined without getter.",W079:"Redefinition of \'{a}\'.",W080:"It\'s not necessary to initialize \'{a}\' to \'undefined\'.",W081:null,W082:"Function declarations should not be placed in blocks. Use a function expression or move the statement to the top of the outer function.",W083:"Don\'t make functions within a loop.",W084:"Assignment in conditional expression",W085:"Don\'t use \'with\'.",W086:"Expected a \'break\' statement before \'{a}\'.",W087:"Forgotten \'debugger\' statement?",W088:"Creating global \'for\' variable. Should be \'for (var {a} ...\'.",W089:"The body of a for in should be wrapped in an if statement to filter unwanted properties from the prototype.",W090:"\'{a}\' is not a statement label.",W091:null,W093:"Did you mean to return a conditional instead of an assignment?",W094:"Unexpected comma.",W095:"Expected a string and instead saw {a}.",W096:"The \'{a}\' key may produce unexpected results.",W097:\'Use the function form of "use strict".\',W098:"\'{a}\' is defined but never used.",W099:null,W100:"This character may get silently deleted by one or more browsers.",W101:"Line is too long.",W102:null,W103:"The \'{a}\' property is deprecated.",W104:"\'{a}\' is available in ES{b} (use \'esversion: {b}\') or Mozilla JS extensions (use moz).",W105:"Unexpected {a} in \'{b}\'.",W106:"Identifier \'{a}\' is not in camel case.",W107:"Script URL.",W108:"Strings must use doublequote.",W109:"Strings must use singlequote.",W110:"Mixed double and single quotes.",W112:"Unclosed string.",W113:"Control character in string: {a}.",W114:"Avoid {a}.",W115:"Octal literals are not allowed in strict mode.",W116:"Expected \'{a}\' and instead saw \'{b}\'.",W117:"\'{a}\' is not defined.",W118:"\'{a}\' is only available in Mozilla JavaScript extensions (use moz option).",W119:"\'{a}\' is only available in ES{b} (use \'esversion: {b}\').",W120:"You might be leaking a variable ({a}) here.",W121:"Extending prototype of native object: \'{a}\'.",W122:"Invalid typeof value \'{a}\'",W123:"\'{a}\' is already defined in outer scope.",W124:"A generator function shall contain a yield statement.",W125:"This line contains non-breaking spaces: http://jshint.com/doc/options/#nonbsp",W126:"Unnecessary grouping operator.",W127:"Unexpected use of a comma operator.",W128:"Empty array elements acequire elision=true.",W129:"\'{a}\' is defined in a future version of JavaScript. Use a different variable name to avoid migration issues.",W130:"Invalid element after rest element.",W131:"Invalid parameter after rest parameter.",W132:"`var` declarations are forbidden. Use `let` or `const` instead.",W133:"Invalid for-{a} loop left-hand-side: {b}.",W134:"The \'{a}\' option is only available when linting ECMAScript {b} code.",W135:"{a} may not be supported by non-browser environments.",W136:"\'{a}\' must be in function scope.",W137:"Empty destructuring.",W138:"Regular parameters should not come after default parameters."},info={I001:"Comma warnings can be turned off with \'laxcomma\'.",I002:null,I003:"ES5 option is now set per default"};exports.errors={},exports.warnings={},exports.info={},_.each(errors,function(desc,code){exports.errors[code]={code:code,desc:desc}}),_.each(warnings,function(desc,code){exports.warnings[code]={code:code,desc:desc}}),_.each(info,function(desc,code){exports.info[code]={code:code,desc:desc}})},{"../lodash":"/node_modules/jshint/lodash.js"}],"/node_modules/jshint/src/name-stack.js":[function(_dereq_,module){"use strict";function NameStack(){this._stack=[]}Object.defineProperty(NameStack.prototype,"length",{get:function(){return this._stack.length}}),NameStack.prototype.push=function(){this._stack.push(null)},NameStack.prototype.pop=function(){this._stack.pop()},NameStack.prototype.set=function(token){this._stack[this.length-1]=token},NameStack.prototype.infer=function(){var type,nameToken=this._stack[this.length-1],prefix="";return nameToken&&"class"!==nameToken.type||(nameToken=this._stack[this.length-2]),nameToken?(type=nameToken.type,"(string)"!==type&&"(number)"!==type&&"(identifier)"!==type&&"default"!==type?"(expression)":(nameToken.accessorType&&(prefix=nameToken.accessorType+" "),prefix+nameToken.value)):"(empty)"},module.exports=NameStack},{}],"/node_modules/jshint/src/options.js":[function(_dereq_,module,exports){"use strict";exports.bool={enforcing:{bitwise:!0,freeze:!0,camelcase:!0,curly:!0,eqeqeq:!0,futurehostile:!0,notypeof:!0,es3:!0,es5:!0,forin:!0,funcscope:!0,immed:!0,iterator:!0,newcap:!0,noarg:!0,nocomma:!0,noempty:!0,nonbsp:!0,nonew:!0,undef:!0,singleGroups:!1,varstmt:!1,enforceall:!1},relaxing:{asi:!0,multistr:!0,debug:!0,boss:!0,evil:!0,globalstrict:!0,plusplus:!0,proto:!0,scripturl:!0,sub:!0,supernew:!0,laxbreak:!0,laxcomma:!0,validthis:!0,withstmt:!0,moz:!0,noyield:!0,eqnull:!0,lastsemic:!0,loopfunc:!0,expr:!0,esnext:!0,elision:!0},environments:{mootools:!0,couch:!0,jasmine:!0,jquery:!0,node:!0,qunit:!0,rhino:!0,shelljs:!0,prototypejs:!0,yui:!0,mocha:!0,module:!0,wsh:!0,worker:!0,nonstandard:!0,browser:!0,browserify:!0,devel:!0,dojo:!0,typed:!0,phantom:!0},obsolete:{onecase:!0,regexp:!0,regexdash:!0}},exports.val={maxlen:!1,indent:!1,maxerr:!1,predef:!1,globals:!1,quotmark:!1,scope:!1,maxstatements:!1,maxdepth:!1,maxparams:!1,maxcomplexity:!1,shadow:!1,strict:!0,unused:!0,latedef:!1,ignore:!1,ignoreDelimiters:!1,esversion:5},exports.inverted={bitwise:!0,forin:!0,newcap:!0,plusplus:!0,regexp:!0,undef:!0,eqeqeq:!0,strict:!0},exports.validNames=Object.keys(exports.val).concat(Object.keys(exports.bool.relaxing)).concat(Object.keys(exports.bool.enforcing)).concat(Object.keys(exports.bool.obsolete)).concat(Object.keys(exports.bool.environments)),exports.renamed={eqeq:"eqeqeq",windows:"wsh",sloppy:"strict"},exports.removed={nomen:!0,onevar:!0,passfail:!0,white:!0,gcl:!0,smarttabs:!0,trailing:!0},exports.noenforceall={varstmt:!0,strict:!0}},{}],"/node_modules/jshint/src/reg.js":[function(_dereq_,module,exports){"use strict";exports.unsafeString=/@cc|<\\/?|script|\\]\\s*\\]|<\\s*!|&lt/i,exports.unsafeChars=/[\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/,exports.needEsc=/[\\u0000-\\u001f&<"\\/\\\\\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/,exports.needEscGlobal=/[\\u0000-\\u001f&<"\\/\\\\\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g,exports.starSlash=/\\*\\//,exports.identifier=/^([a-zA-Z_$][a-zA-Z0-9_$]*)$/,exports.javascriptURL=/^(?:javascript|jscript|ecmascript|vbscript|livescript)\\s*:/i,exports.fallsThrough=/^\\s*falls?\\sthrough\\s*$/,exports.maxlenException=/^(?:(?:\\/\\/|\\/\\*|\\*) ?)?[^ ]+$/},{}],"/node_modules/jshint/src/scope-manager.js":[function(_dereq_,module){"use strict";var _=_dereq_("../lodash"),events=_dereq_("events"),marker={},scopeManager=function(state,predefined,exported,declared){function _newScope(type){_current={"(labels)":Object.create(null),"(usages)":Object.create(null),"(breakLabels)":Object.create(null),"(parent)":_current,"(type)":type,"(params)":"functionparams"===type||"catchparams"===type?[]:null},_scopeStack.push(_current)}function warning(code,token){emitter.emit("warning",{code:code,token:token,data:_.slice(arguments,2)})}function error(code,token){emitter.emit("warning",{code:code,token:token,data:_.slice(arguments,2)})}function _setupUsages(labelName){_current["(usages)"][labelName]||(_current["(usages)"][labelName]={"(modified)":[],"(reassigned)":[],"(tokens)":[]})}function _checkForUnused(){if("functionparams"===_current["(type)"])return _checkParams(),void 0;var curentLabels=_current["(labels)"];for(var labelName in curentLabels)curentLabels[labelName]&&"exception"!==curentLabels[labelName]["(type)"]&&curentLabels[labelName]["(unused)"]&&_warnUnused(labelName,curentLabels[labelName]["(token)"],"var")}function _checkParams(){var params=_current["(params)"];if(params)for(var unused_opt,param=params.pop();param;){var label=_current["(labels)"][param];if(unused_opt=_getUnusedOption(state.funct["(unusedOption)"]),"undefined"===param)return;if(label["(unused)"])_warnUnused(param,label["(token)"],"param",state.funct["(unusedOption)"]);else if("last-param"===unused_opt)return;param=params.pop()}}function _getLabel(labelName){for(var i=_scopeStack.length-1;i>=0;--i){var scopeLabels=_scopeStack[i]["(labels)"];if(scopeLabels[labelName])return scopeLabels}}function usedSoFarInCurrentFunction(labelName){for(var i=_scopeStack.length-1;i>=0;i--){var current=_scopeStack[i];if(current["(usages)"][labelName])return current["(usages)"][labelName];if(current===_currentFunctBody)break}return!1}function _checkOuterShadow(labelName,token){if("outer"===state.option.shadow)for(var isGlobal="global"===_currentFunctBody["(type)"],isNewFunction="functionparams"===_current["(type)"],outsideCurrentFunction=!isGlobal,i=0;_scopeStack.length>i;i++){var stackItem=_scopeStack[i];isNewFunction||_scopeStack[i+1]!==_currentFunctBody||(outsideCurrentFunction=!1),outsideCurrentFunction&&stackItem["(labels)"][labelName]&&warning("W123",token,labelName),stackItem["(breakLabels)"][labelName]&&warning("W123",token,labelName)}}function _latedefWarning(type,labelName,token){state.option.latedef&&(state.option.latedef===!0&&"function"===type||"function"!==type)&&warning("W003",token,labelName)}var _current,_scopeStack=[];_newScope("global"),_current["(predefined)"]=predefined;var _currentFunctBody=_current,usedPredefinedAndGlobals=Object.create(null),impliedGlobals=Object.create(null),unuseds=[],emitter=new events.EventEmitter,_getUnusedOption=function(unused_opt){return void 0===unused_opt&&(unused_opt=state.option.unused),unused_opt===!0&&(unused_opt="last-param"),unused_opt},_warnUnused=function(name,tkn,type,unused_opt){var line=tkn.line,chr=tkn.from,raw_name=tkn.raw_text||name;unused_opt=_getUnusedOption(unused_opt);var warnable_types={vars:["var"],"last-param":["var","param"],strict:["var","param","last-param"]};unused_opt&&warnable_types[unused_opt]&&-1!==warnable_types[unused_opt].indexOf(type)&&warning("W098",{line:line,from:chr},raw_name),(unused_opt||"var"===type)&&unuseds.push({name:name,line:line,character:chr})},scopeManagerInst={on:function(names,listener){names.split(" ").forEach(function(name){emitter.on(name,listener)})},isPredefined:function(labelName){return!this.has(labelName)&&_.has(_scopeStack[0]["(predefined)"],labelName)},stack:function(type){var previousScope=_current;_newScope(type),type||"functionparams"!==previousScope["(type)"]||(_current["(isFuncBody)"]=!0,_current["(context)"]=_currentFunctBody,_currentFunctBody=_current)},unstack:function(){var i,j,subScope=_scopeStack.length>1?_scopeStack[_scopeStack.length-2]:null,isUnstackingFunctionBody=_current===_currentFunctBody,isUnstackingFunctionParams="functionparams"===_current["(type)"],isUnstackingFunctionOuter="functionouter"===_current["(type)"],currentUsages=_current["(usages)"],currentLabels=_current["(labels)"],usedLabelNameList=Object.keys(currentUsages);for(currentUsages.__proto__&&-1===usedLabelNameList.indexOf("__proto__")&&usedLabelNameList.push("__proto__"),i=0;usedLabelNameList.length>i;i++){var usedLabelName=usedLabelNameList[i],usage=currentUsages[usedLabelName],usedLabel=currentLabels[usedLabelName];if(usedLabel){var usedLabelType=usedLabel["(type)"];if(usedLabel["(useOutsideOfScope)"]&&!state.option.funcscope){var usedTokens=usage["(tokens)"];if(usedTokens)for(j=0;usedTokens.length>j;j++)usedLabel["(function)"]===usedTokens[j]["(function)"]&&error("W038",usedTokens[j],usedLabelName)}if(_current["(labels)"][usedLabelName]["(unused)"]=!1,"const"===usedLabelType&&usage["(modified)"])for(j=0;usage["(modified)"].length>j;j++)error("E013",usage["(modified)"][j],usedLabelName);if(("function"===usedLabelType||"class"===usedLabelType)&&usage["(reassigned)"])for(j=0;usage["(reassigned)"].length>j;j++)error("W021",usage["(reassigned)"][j],usedLabelName,usedLabelType)}else if(isUnstackingFunctionOuter&&(state.funct["(isCapturing)"]=!0),subScope)if(subScope["(usages)"][usedLabelName]){var subScopeUsage=subScope["(usages)"][usedLabelName];subScopeUsage["(modified)"]=subScopeUsage["(modified)"].concat(usage["(modified)"]),subScopeUsage["(tokens)"]=subScopeUsage["(tokens)"].concat(usage["(tokens)"]),subScopeUsage["(reassigned)"]=subScopeUsage["(reassigned)"].concat(usage["(reassigned)"]),subScopeUsage["(onlyUsedSubFunction)"]=!1}else subScope["(usages)"][usedLabelName]=usage,isUnstackingFunctionBody&&(subScope["(usages)"][usedLabelName]["(onlyUsedSubFunction)"]=!0);else if("boolean"==typeof _current["(predefined)"][usedLabelName]){if(delete declared[usedLabelName],usedPredefinedAndGlobals[usedLabelName]=marker,_current["(predefined)"][usedLabelName]===!1&&usage["(reassigned)"])for(j=0;usage["(reassigned)"].length>j;j++)warning("W020",usage["(reassigned)"][j])}else if(usage["(tokens)"])for(j=0;usage["(tokens)"].length>j;j++){var undefinedToken=usage["(tokens)"][j];undefinedToken.forgiveUndef||(state.option.undef&&!undefinedToken.ignoreUndef&&warning("W117",undefinedToken,usedLabelName),impliedGlobals[usedLabelName]?impliedGlobals[usedLabelName].line.push(undefinedToken.line):impliedGlobals[usedLabelName]={name:usedLabelName,line:[undefinedToken.line]})}}if(subScope||Object.keys(declared).forEach(function(labelNotUsed){_warnUnused(labelNotUsed,declared[labelNotUsed],"var")}),subScope&&!isUnstackingFunctionBody&&!isUnstackingFunctionParams&&!isUnstackingFunctionOuter){var labelNames=Object.keys(currentLabels);for(i=0;labelNames.length>i;i++){var defLabelName=labelNames[i];currentLabels[defLabelName]["(blockscoped)"]||"exception"===currentLabels[defLabelName]["(type)"]||this.funct.has(defLabelName,{excludeCurrent:!0})||(subScope["(labels)"][defLabelName]=currentLabels[defLabelName],"global"!==_currentFunctBody["(type)"]&&(subScope["(labels)"][defLabelName]["(useOutsideOfScope)"]=!0),delete currentLabels[defLabelName])}}_checkForUnused(),_scopeStack.pop(),isUnstackingFunctionBody&&(_currentFunctBody=_scopeStack[_.findLastIndex(_scopeStack,function(scope){return scope["(isFuncBody)"]||"global"===scope["(type)"]})]),_current=subScope},addParam:function(labelName,token,type){if(type=type||"param","exception"===type){var previouslyDefinedLabelType=this.funct.labeltype(labelName);previouslyDefinedLabelType&&"exception"!==previouslyDefinedLabelType&&(state.option.node||warning("W002",state.tokens.next,labelName))}if(_.has(_current["(labels)"],labelName)?_current["(labels)"][labelName].duplicated=!0:(_checkOuterShadow(labelName,token,type),_current["(labels)"][labelName]={"(type)":type,"(token)":token,"(unused)":!0},_current["(params)"].push(labelName)),_.has(_current["(usages)"],labelName)){var usage=_current["(usages)"][labelName];usage["(onlyUsedSubFunction)"]?_latedefWarning(type,labelName,token):warning("E056",token,labelName,type)}},validateParams:function(){if("global"!==_currentFunctBody["(type)"]){var isStrict=state.isStrict(),currentFunctParamScope=_currentFunctBody["(parent)"];currentFunctParamScope["(params)"]&&currentFunctParamScope["(params)"].forEach(function(labelName){var label=currentFunctParamScope["(labels)"][labelName];label&&label.duplicated&&(isStrict?warning("E011",label["(token)"],labelName):state.option.shadow!==!0&&warning("W004",label["(token)"],labelName))})}},getUsedOrDefinedGlobals:function(){var list=Object.keys(usedPredefinedAndGlobals);return usedPredefinedAndGlobals.__proto__===marker&&-1===list.indexOf("__proto__")&&list.push("__proto__"),list},getImpliedGlobals:function(){var values=_.values(impliedGlobals),hasProto=!1;return impliedGlobals.__proto__&&(hasProto=values.some(function(value){return"__proto__"===value.name}),hasProto||values.push(impliedGlobals.__proto__)),values},getUnuseds:function(){return unuseds},has:function(labelName){return Boolean(_getLabel(labelName))},labeltype:function(labelName){var scopeLabels=_getLabel(labelName);return scopeLabels?scopeLabels[labelName]["(type)"]:null},addExported:function(labelName){var globalLabels=_scopeStack[0]["(labels)"];if(_.has(declared,labelName))delete declared[labelName];else if(_.has(globalLabels,labelName))globalLabels[labelName]["(unused)"]=!1;else{for(var i=1;_scopeStack.length>i;i++){var scope=_scopeStack[i];if(scope["(type)"])break;if(_.has(scope["(labels)"],labelName)&&!scope["(labels)"][labelName]["(blockscoped)"])return scope["(labels)"][labelName]["(unused)"]=!1,void 0}exported[labelName]=!0}},setExported:function(labelName,token){this.block.use(labelName,token)\n},addlabel:function(labelName,opts){var type=opts.type,token=opts.token,isblockscoped="let"===type||"const"===type||"class"===type,isexported="global"===(isblockscoped?_current:_currentFunctBody)["(type)"]&&_.has(exported,labelName);if(_checkOuterShadow(labelName,token,type),isblockscoped){var declaredInCurrentScope=_current["(labels)"][labelName];if(declaredInCurrentScope||_current!==_currentFunctBody||"global"===_current["(type)"]||(declaredInCurrentScope=!!_currentFunctBody["(parent)"]["(labels)"][labelName]),!declaredInCurrentScope&&_current["(usages)"][labelName]){var usage=_current["(usages)"][labelName];usage["(onlyUsedSubFunction)"]?_latedefWarning(type,labelName,token):warning("E056",token,labelName,type)}declaredInCurrentScope?warning("E011",token,labelName):"outer"===state.option.shadow&&scopeManagerInst.funct.has(labelName)&&warning("W004",token,labelName),scopeManagerInst.block.add(labelName,type,token,!isexported)}else{var declaredInCurrentFunctionScope=scopeManagerInst.funct.has(labelName);!declaredInCurrentFunctionScope&&usedSoFarInCurrentFunction(labelName)&&_latedefWarning(type,labelName,token),scopeManagerInst.funct.has(labelName,{onlyBlockscoped:!0})?warning("E011",token,labelName):state.option.shadow!==!0&&declaredInCurrentFunctionScope&&"__proto__"!==labelName&&"global"!==_currentFunctBody["(type)"]&&warning("W004",token,labelName),scopeManagerInst.funct.add(labelName,type,token,!isexported),"global"===_currentFunctBody["(type)"]&&(usedPredefinedAndGlobals[labelName]=marker)}},funct:{labeltype:function(labelName,options){for(var onlyBlockscoped=options&&options.onlyBlockscoped,excludeParams=options&&options.excludeParams,currentScopeIndex=_scopeStack.length-(options&&options.excludeCurrent?2:1),i=currentScopeIndex;i>=0;i--){var current=_scopeStack[i];if(current["(labels)"][labelName]&&(!onlyBlockscoped||current["(labels)"][labelName]["(blockscoped)"]))return current["(labels)"][labelName]["(type)"];var scopeCheck=excludeParams?_scopeStack[i-1]:current;if(scopeCheck&&"functionparams"===scopeCheck["(type)"])return null}return null},hasBreakLabel:function(labelName){for(var i=_scopeStack.length-1;i>=0;i--){var current=_scopeStack[i];if(current["(breakLabels)"][labelName])return!0;if("functionparams"===current["(type)"])return!1}return!1},has:function(labelName,options){return Boolean(this.labeltype(labelName,options))},add:function(labelName,type,tok,unused){_current["(labels)"][labelName]={"(type)":type,"(token)":tok,"(blockscoped)":!1,"(function)":_currentFunctBody,"(unused)":unused}}},block:{isGlobal:function(){return"global"===_current["(type)"]},use:function(labelName,token){var paramScope=_currentFunctBody["(parent)"];paramScope&&paramScope["(labels)"][labelName]&&"param"===paramScope["(labels)"][labelName]["(type)"]&&(scopeManagerInst.funct.has(labelName,{excludeParams:!0,onlyBlockscoped:!0})||(paramScope["(labels)"][labelName]["(unused)"]=!1)),token&&(state.ignored.W117||state.option.undef===!1)&&(token.ignoreUndef=!0),_setupUsages(labelName),token&&(token["(function)"]=_currentFunctBody,_current["(usages)"][labelName]["(tokens)"].push(token))},reassign:function(labelName,token){this.modify(labelName,token),_current["(usages)"][labelName]["(reassigned)"].push(token)},modify:function(labelName,token){_setupUsages(labelName),_current["(usages)"][labelName]["(modified)"].push(token)},add:function(labelName,type,tok,unused){_current["(labels)"][labelName]={"(type)":type,"(token)":tok,"(blockscoped)":!0,"(unused)":unused}},addBreakLabel:function(labelName,opts){var token=opts.token;scopeManagerInst.funct.hasBreakLabel(labelName)?warning("E011",token,labelName):"outer"===state.option.shadow&&(scopeManagerInst.funct.has(labelName)?warning("W004",token,labelName):_checkOuterShadow(labelName,token)),_current["(breakLabels)"][labelName]=token}}};return scopeManagerInst};module.exports=scopeManager},{"../lodash":"/node_modules/jshint/lodash.js",events:"/node_modules/browserify/node_modules/events/events.js"}],"/node_modules/jshint/src/state.js":[function(_dereq_,module,exports){"use strict";var NameStack=_dereq_("./name-stack.js"),state={syntax:{},isStrict:function(){return this.directive["use strict"]||this.inClassBody||this.option.module||"implied"===this.option.strict},inMoz:function(){return this.option.moz},inES6:function(){return this.option.moz||this.option.esversion>=6},inES5:function(strict){return strict?!(this.option.esversion&&5!==this.option.esversion||this.option.moz):!this.option.esversion||this.option.esversion>=5||this.option.moz},reset:function(){this.tokens={prev:null,next:null,curr:null},this.option={},this.funct=null,this.ignored={},this.directive={},this.jsonMode=!1,this.jsonWarnings=[],this.lines=[],this.tab="",this.cache={},this.ignoredLines={},this.forinifcheckneeded=!1,this.nameStack=new NameStack,this.inClassBody=!1}};exports.state=state},{"./name-stack.js":"/node_modules/jshint/src/name-stack.js"}],"/node_modules/jshint/src/style.js":[function(_dereq_,module,exports){"use strict";exports.register=function(linter){linter.on("Identifier",function(data){linter.getOption("proto")||"__proto__"===data.name&&linter.warn("W103",{line:data.line,"char":data.char,data:[data.name,"6"]})}),linter.on("Identifier",function(data){linter.getOption("iterator")||"__iterator__"===data.name&&linter.warn("W103",{line:data.line,"char":data.char,data:[data.name]})}),linter.on("Identifier",function(data){linter.getOption("camelcase")&&data.name.replace(/^_+|_+$/g,"").indexOf("_")>-1&&!data.name.match(/^[A-Z0-9_]*$/)&&linter.warn("W106",{line:data.line,"char":data.from,data:[data.name]})}),linter.on("String",function(data){var code,quotmark=linter.getOption("quotmark");quotmark&&("single"===quotmark&&"\'"!==data.quote&&(code="W109"),"double"===quotmark&&\'"\'!==data.quote&&(code="W108"),quotmark===!0&&(linter.getCache("quotmark")||linter.setCache("quotmark",data.quote),linter.getCache("quotmark")!==data.quote&&(code="W110")),code&&linter.warn(code,{line:data.line,"char":data.char}))}),linter.on("Number",function(data){"."===data.value.charAt(0)&&linter.warn("W008",{line:data.line,"char":data.char,data:[data.value]}),"."===data.value.substr(data.value.length-1)&&linter.warn("W047",{line:data.line,"char":data.char,data:[data.value]}),/^00+/.test(data.value)&&linter.warn("W046",{line:data.line,"char":data.char,data:[data.value]})}),linter.on("String",function(data){var re=/^(?:javascript|jscript|ecmascript|vbscript|livescript)\\s*:/i;linter.getOption("scripturl")||re.test(data.value)&&linter.warn("W107",{line:data.line,"char":data.char})})}},{}],"/node_modules/jshint/src/vars.js":[function(_dereq_,module,exports){"use strict";exports.reservedVars={arguments:!1,NaN:!1},exports.ecmaIdentifiers={3:{Array:!1,Boolean:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,eval:!1,EvalError:!1,Function:!1,hasOwnProperty:!1,isFinite:!1,isNaN:!1,Math:!1,Number:!1,Object:!1,parseInt:!1,parseFloat:!1,RangeError:!1,ReferenceError:!1,RegExp:!1,String:!1,SyntaxError:!1,TypeError:!1,URIError:!1},5:{JSON:!1},6:{Map:!1,Promise:!1,Proxy:!1,Reflect:!1,Set:!1,Symbol:!1,WeakMap:!1,WeakSet:!1}},exports.browser={Audio:!1,Blob:!1,addEventListener:!1,applicationCache:!1,atob:!1,blur:!1,btoa:!1,cancelAnimationFrame:!1,CanvasGradient:!1,CanvasPattern:!1,CanvasRenderingContext2D:!1,CSS:!1,clearInterval:!1,clearTimeout:!1,close:!1,closed:!1,Comment:!1,CustomEvent:!1,DOMParser:!1,defaultStatus:!1,Document:!1,document:!1,DocumentFragment:!1,Element:!1,ElementTimeControl:!1,Event:!1,event:!1,fetch:!1,FileReader:!1,FormData:!1,focus:!1,frames:!1,getComputedStyle:!1,HTMLElement:!1,HTMLAnchorElement:!1,HTMLBaseElement:!1,HTMLBlockquoteElement:!1,HTMLBodyElement:!1,HTMLBRElement:!1,HTMLButtonElement:!1,HTMLCanvasElement:!1,HTMLCollection:!1,HTMLDirectoryElement:!1,HTMLDivElement:!1,HTMLDListElement:!1,HTMLFieldSetElement:!1,HTMLFontElement:!1,HTMLFormElement:!1,HTMLFrameElement:!1,HTMLFrameSetElement:!1,HTMLHeadElement:!1,HTMLHeadingElement:!1,HTMLHRElement:!1,HTMLHtmlElement:!1,HTMLIFrameElement:!1,HTMLImageElement:!1,HTMLInputElement:!1,HTMLIsIndexElement:!1,HTMLLabelElement:!1,HTMLLayerElement:!1,HTMLLegendElement:!1,HTMLLIElement:!1,HTMLLinkElement:!1,HTMLMapElement:!1,HTMLMenuElement:!1,HTMLMetaElement:!1,HTMLModElement:!1,HTMLObjectElement:!1,HTMLOListElement:!1,HTMLOptGroupElement:!1,HTMLOptionElement:!1,HTMLParagraphElement:!1,HTMLParamElement:!1,HTMLPreElement:!1,HTMLQuoteElement:!1,HTMLScriptElement:!1,HTMLSelectElement:!1,HTMLStyleElement:!1,HTMLTableCaptionElement:!1,HTMLTableCellElement:!1,HTMLTableColElement:!1,HTMLTableElement:!1,HTMLTableRowElement:!1,HTMLTableSectionElement:!1,HTMLTemplateElement:!1,HTMLTextAreaElement:!1,HTMLTitleElement:!1,HTMLUListElement:!1,HTMLVideoElement:!1,history:!1,Image:!1,Intl:!1,length:!1,localStorage:!1,location:!1,matchMedia:!1,MessageChannel:!1,MessageEvent:!1,MessagePort:!1,MouseEvent:!1,moveBy:!1,moveTo:!1,MutationObserver:!1,name:!1,Node:!1,NodeFilter:!1,NodeList:!1,Notification:!1,navigator:!1,onbeforeunload:!0,onblur:!0,onerror:!0,onfocus:!0,onload:!0,onresize:!0,onunload:!0,open:!1,openDatabase:!1,opener:!1,Option:!1,parent:!1,performance:!1,print:!1,Range:!1,requestAnimationFrame:!1,removeEventListener:!1,resizeBy:!1,resizeTo:!1,screen:!1,scroll:!1,scrollBy:!1,scrollTo:!1,sessionStorage:!1,setInterval:!1,setTimeout:!1,SharedWorker:!1,status:!1,SVGAElement:!1,SVGAltGlyphDefElement:!1,SVGAltGlyphElement:!1,SVGAltGlyphItemElement:!1,SVGAngle:!1,SVGAnimateColorElement:!1,SVGAnimateElement:!1,SVGAnimateMotionElement:!1,SVGAnimateTransformElement:!1,SVGAnimatedAngle:!1,SVGAnimatedBoolean:!1,SVGAnimatedEnumeration:!1,SVGAnimatedInteger:!1,SVGAnimatedLength:!1,SVGAnimatedLengthList:!1,SVGAnimatedNumber:!1,SVGAnimatedNumberList:!1,SVGAnimatedPathData:!1,SVGAnimatedPoints:!1,SVGAnimatedPreserveAspectRatio:!1,SVGAnimatedRect:!1,SVGAnimatedString:!1,SVGAnimatedTransformList:!1,SVGAnimationElement:!1,SVGCSSRule:!1,SVGCircleElement:!1,SVGClipPathElement:!1,SVGColor:!1,SVGColorProfileElement:!1,SVGColorProfileRule:!1,SVGComponentTransferFunctionElement:!1,SVGCursorElement:!1,SVGDefsElement:!1,SVGDescElement:!1,SVGDocument:!1,SVGElement:!1,SVGElementInstance:!1,SVGElementInstanceList:!1,SVGEllipseElement:!1,SVGExternalResourcesRequired:!1,SVGFEBlendElement:!1,SVGFEColorMatrixElement:!1,SVGFEComponentTransferElement:!1,SVGFECompositeElement:!1,SVGFEConvolveMatrixElement:!1,SVGFEDiffuseLightingElement:!1,SVGFEDisplacementMapElement:!1,SVGFEDistantLightElement:!1,SVGFEFloodElement:!1,SVGFEFuncAElement:!1,SVGFEFuncBElement:!1,SVGFEFuncGElement:!1,SVGFEFuncRElement:!1,SVGFEGaussianBlurElement:!1,SVGFEImageElement:!1,SVGFEMergeElement:!1,SVGFEMergeNodeElement:!1,SVGFEMorphologyElement:!1,SVGFEOffsetElement:!1,SVGFEPointLightElement:!1,SVGFESpecularLightingElement:!1,SVGFESpotLightElement:!1,SVGFETileElement:!1,SVGFETurbulenceElement:!1,SVGFilterElement:!1,SVGFilterPrimitiveStandardAttributes:!1,SVGFitToViewBox:!1,SVGFontElement:!1,SVGFontFaceElement:!1,SVGFontFaceFormatElement:!1,SVGFontFaceNameElement:!1,SVGFontFaceSrcElement:!1,SVGFontFaceUriElement:!1,SVGForeignObjectElement:!1,SVGGElement:!1,SVGGlyphElement:!1,SVGGlyphRefElement:!1,SVGGradientElement:!1,SVGHKernElement:!1,SVGICCColor:!1,SVGImageElement:!1,SVGLangSpace:!1,SVGLength:!1,SVGLengthList:!1,SVGLineElement:!1,SVGLinearGradientElement:!1,SVGLocatable:!1,SVGMPathElement:!1,SVGMarkerElement:!1,SVGMaskElement:!1,SVGMatrix:!1,SVGMetadataElement:!1,SVGMissingGlyphElement:!1,SVGNumber:!1,SVGNumberList:!1,SVGPaint:!1,SVGPathElement:!1,SVGPathSeg:!1,SVGPathSegArcAbs:!1,SVGPathSegArcRel:!1,SVGPathSegClosePath:!1,SVGPathSegCurvetoCubicAbs:!1,SVGPathSegCurvetoCubicRel:!1,SVGPathSegCurvetoCubicSmoothAbs:!1,SVGPathSegCurvetoCubicSmoothRel:!1,SVGPathSegCurvetoQuadraticAbs:!1,SVGPathSegCurvetoQuadraticRel:!1,SVGPathSegCurvetoQuadraticSmoothAbs:!1,SVGPathSegCurvetoQuadraticSmoothRel:!1,SVGPathSegLinetoAbs:!1,SVGPathSegLinetoHorizontalAbs:!1,SVGPathSegLinetoHorizontalRel:!1,SVGPathSegLinetoRel:!1,SVGPathSegLinetoVerticalAbs:!1,SVGPathSegLinetoVerticalRel:!1,SVGPathSegList:!1,SVGPathSegMovetoAbs:!1,SVGPathSegMovetoRel:!1,SVGPatternElement:!1,SVGPoint:!1,SVGPointList:!1,SVGPolygonElement:!1,SVGPolylineElement:!1,SVGPreserveAspectRatio:!1,SVGRadialGradientElement:!1,SVGRect:!1,SVGRectElement:!1,SVGRenderingIntent:!1,SVGSVGElement:!1,SVGScriptElement:!1,SVGSetElement:!1,SVGStopElement:!1,SVGStringList:!1,SVGStylable:!1,SVGStyleElement:!1,SVGSwitchElement:!1,SVGSymbolElement:!1,SVGTRefElement:!1,SVGTSpanElement:!1,SVGTests:!1,SVGTextContentElement:!1,SVGTextElement:!1,SVGTextPathElement:!1,SVGTextPositioningElement:!1,SVGTitleElement:!1,SVGTransform:!1,SVGTransformList:!1,SVGTransformable:!1,SVGURIReference:!1,SVGUnitTypes:!1,SVGUseElement:!1,SVGVKernElement:!1,SVGViewElement:!1,SVGViewSpec:!1,SVGZoomAndPan:!1,Text:!1,TextDecoder:!1,TextEncoder:!1,TimeEvent:!1,top:!1,URL:!1,WebGLActiveInfo:!1,WebGLBuffer:!1,WebGLContextEvent:!1,WebGLFramebuffer:!1,WebGLProgram:!1,WebGLRenderbuffer:!1,WebGLRenderingContext:!1,WebGLShader:!1,WebGLShaderPrecisionFormat:!1,WebGLTexture:!1,WebGLUniformLocation:!1,WebSocket:!1,window:!1,Window:!1,Worker:!1,XDomainRequest:!1,XMLHttpRequest:!1,XMLSerializer:!1,XPathEvaluator:!1,XPathException:!1,XPathExpression:!1,XPathNamespace:!1,XPathNSResolver:!1,XPathResult:!1},exports.devel={alert:!1,confirm:!1,console:!1,Debug:!1,opera:!1,prompt:!1},exports.worker={importScripts:!0,postMessage:!0,self:!0,FileReaderSync:!0},exports.nonstandard={escape:!1,unescape:!1},exports.couch={require:!1,respond:!1,getRow:!1,emit:!1,send:!1,start:!1,sum:!1,log:!1,exports:!1,module:!1,provides:!1},exports.node={__filename:!1,__dirname:!1,GLOBAL:!1,global:!1,module:!1,acequire:!1,Buffer:!0,console:!0,exports:!0,process:!0,setTimeout:!0,clearTimeout:!0,setInterval:!0,clearInterval:!0,setImmediate:!0,clearImmediate:!0},exports.browserify={__filename:!1,__dirname:!1,global:!1,module:!1,acequire:!1,Buffer:!0,exports:!0,process:!0},exports.phantom={phantom:!0,acequire:!0,WebPage:!0,console:!0,exports:!0},exports.qunit={asyncTest:!1,deepEqual:!1,equal:!1,expect:!1,module:!1,notDeepEqual:!1,notEqual:!1,notPropEqual:!1,notStrictEqual:!1,ok:!1,propEqual:!1,QUnit:!1,raises:!1,start:!1,stop:!1,strictEqual:!1,test:!1,"throws":!1},exports.rhino={defineClass:!1,deserialize:!1,gc:!1,help:!1,importClass:!1,importPackage:!1,java:!1,load:!1,loadClass:!1,Packages:!1,print:!1,quit:!1,readFile:!1,readUrl:!1,runCommand:!1,seal:!1,serialize:!1,spawn:!1,sync:!1,toint32:!1,version:!1},exports.shelljs={target:!1,echo:!1,exit:!1,cd:!1,pwd:!1,ls:!1,find:!1,cp:!1,rm:!1,mv:!1,mkdir:!1,test:!1,cat:!1,sed:!1,grep:!1,which:!1,dirs:!1,pushd:!1,popd:!1,env:!1,exec:!1,chmod:!1,config:!1,error:!1,tempdir:!1},exports.typed={ArrayBuffer:!1,ArrayBufferView:!1,DataView:!1,Float32Array:!1,Float64Array:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1},exports.wsh={ActiveXObject:!0,Enumerator:!0,GetObject:!0,ScriptEngine:!0,ScriptEngineBuildVersion:!0,ScriptEngineMajorVersion:!0,ScriptEngineMinorVersion:!0,VBArray:!0,WSH:!0,WScript:!0,XDomainRequest:!0},exports.dojo={dojo:!1,dijit:!1,dojox:!1,define:!1,require:!1},exports.jquery={$:!1,jQuery:!1},exports.mootools={$:!1,$$:!1,Asset:!1,Browser:!1,Chain:!1,Class:!1,Color:!1,Cookie:!1,Core:!1,Document:!1,DomReady:!1,DOMEvent:!1,DOMReady:!1,Drag:!1,Element:!1,Elements:!1,Event:!1,Events:!1,Fx:!1,Group:!1,Hash:!1,HtmlTable:!1,IFrame:!1,IframeShim:!1,InputValidator:!1,instanceOf:!1,Keyboard:!1,Locale:!1,Mask:!1,MooTools:!1,Native:!1,Options:!1,OverText:!1,Request:!1,Scroller:!1,Slick:!1,Slider:!1,Sortables:!1,Spinner:!1,Swiff:!1,Tips:!1,Type:!1,typeOf:!1,URI:!1,Window:!1},exports.prototypejs={$:!1,$$:!1,$A:!1,$F:!1,$H:!1,$R:!1,$break:!1,$continue:!1,$w:!1,Abstract:!1,Ajax:!1,Class:!1,Enumerable:!1,Element:!1,Event:!1,Field:!1,Form:!1,Hash:!1,Insertion:!1,ObjectRange:!1,PeriodicalExecuter:!1,Position:!1,Prototype:!1,Selector:!1,Template:!1,Toggle:!1,Try:!1,Autocompleter:!1,Builder:!1,Control:!1,Draggable:!1,Draggables:!1,Droppables:!1,Effect:!1,Sortable:!1,SortableObserver:!1,Sound:!1,Scriptaculous:!1},exports.yui={YUI:!1,Y:!1,YUI_config:!1},exports.mocha={mocha:!1,describe:!1,xdescribe:!1,it:!1,xit:!1,context:!1,xcontext:!1,before:!1,after:!1,beforeEach:!1,afterEach:!1,suite:!1,test:!1,setup:!1,teardown:!1,suiteSetup:!1,suiteTeardown:!1},exports.jasmine={jasmine:!1,describe:!1,xdescribe:!1,it:!1,xit:!1,beforeEach:!1,afterEach:!1,setFixtures:!1,loadFixtures:!1,spyOn:!1,expect:!1,runs:!1,waitsFor:!1,waits:!1,beforeAll:!1,afterAll:!1,fail:!1,fdescribe:!1,fit:!1,pending:!1}},{}]},{},["/node_modules/jshint/src/jshint.js"])}),ace.define("ace/mode/javascript_worker",["require","exports","module","ace/lib/oop","ace/worker/mirror","ace/mode/javascript/jshint"],function(acequire,exports,module){"use strict";function startRegex(arr){return RegExp("^("+arr.join("|")+")")}var oop=acequire("../lib/oop"),Mirror=acequire("../worker/mirror").Mirror,lint=acequire("./javascript/jshint").JSHINT,disabledWarningsRe=startRegex(["Bad for in variable \'(.+)\'.",\'Missing "use strict"\']),errorsRe=startRegex(["Unexpected","Expected ","Confusing (plus|minus)","\\\\{a\\\\} unterminated regular expression","Unclosed ","Unmatched ","Unbegun comment","Bad invocation","Missing space after","Missing operator at"]),infoRe=startRegex(["Expected an assignment","Bad escapement of EOL","Unexpected comma","Unexpected space","Missing radix parameter.","A leading decimal point can","\\\\[\'{a}\'\\\\] is better written in dot notation.","\'{a}\' used out of scope"]),JavaScriptWorker=exports.JavaScriptWorker=function(sender){Mirror.call(this,sender),this.setTimeout(500),this.setOptions()};oop.inherits(JavaScriptWorker,Mirror),function(){this.setOptions=function(options){this.options=options||{esnext:!0,moz:!0,devel:!0,browser:!0,node:!0,laxcomma:!0,laxbreak:!0,lastsemic:!0,onevar:!1,passfail:!1,maxerr:100,expr:!0,multistr:!0,globalstrict:!0},this.doc.getValue()&&this.deferredUpdate.schedule(100)},this.changeOptions=function(newOptions){oop.mixin(this.options,newOptions),this.doc.getValue()&&this.deferredUpdate.schedule(100)},this.isValidJS=function(str){try{eval("throw 0;"+str)}catch(e){if(0===e)return!0}return!1},this.onUpdate=function(){var value=this.doc.getValue();if(value=value.replace(/^#!.*\\n/,"\\n"),!value)return this.sender.emit("annotate",[]);var errors=[],maxErrorLevel=this.isValidJS(value)?"warning":"error";lint(value,this.options);for(var results=lint.errors,errorAdded=!1,i=0;results.length>i;i++){var error=results[i];if(error){var raw=error.raw,type="warning";if("Missing semicolon."==raw){var str=error.evidence.substr(error.character);str=str.charAt(str.search(/\\S/)),"error"==maxErrorLevel&&str&&/[\\w\\d{([\'"]/.test(str)?(error.reason=\'Missing ";" before statement\',type="error"):type="info"}else{if(disabledWarningsRe.test(raw))continue;infoRe.test(raw)?type="info":errorsRe.test(raw)?(errorAdded=!0,type=maxErrorLevel):"\'{a}\' is not defined."==raw?type="warning":"\'{a}\' is defined but never used."==raw&&(type="info")}errors.push({row:error.line-1,column:error.character-1,text:error.reason,type:type,raw:raw})}}this.sender.emit("annotate",errors)}}.call(JavaScriptWorker.prototype)}),ace.define("ace/lib/es5-shim",["require","exports","module"],function(){function Empty(){}function doesDefinePropertyWork(object){try{return Object.defineProperty(object,"sentinel",{}),"sentinel"in object}catch(exception){}}function toInteger(n){return n=+n,n!==n?n=0:0!==n&&n!==1/0&&n!==-(1/0)&&(n=(n>0||-1)*Math.floor(Math.abs(n))),n}Function.prototype.bind||(Function.prototype.bind=function(that){var target=this;if("function"!=typeof target)throw new TypeError("Function.prototype.bind called on incompatible "+target);var args=slice.call(arguments,1),bound=function(){if(this instanceof bound){var result=target.apply(this,args.concat(slice.call(arguments)));return Object(result)===result?result:this}return target.apply(that,args.concat(slice.call(arguments)))};return target.prototype&&(Empty.prototype=target.prototype,bound.prototype=new Empty,Empty.prototype=null),bound});var defineGetter,defineSetter,lookupGetter,lookupSetter,supportsAccessors,call=Function.prototype.call,prototypeOfArray=Array.prototype,prototypeOfObject=Object.prototype,slice=prototypeOfArray.slice,_toString=call.bind(prototypeOfObject.toString),owns=call.bind(prototypeOfObject.hasOwnProperty);if((supportsAccessors=owns(prototypeOfObject,"__defineGetter__"))&&(defineGetter=call.bind(prototypeOfObject.__defineGetter__),defineSetter=call.bind(prototypeOfObject.__defineSetter__),lookupGetter=call.bind(prototypeOfObject.__lookupGetter__),lookupSetter=call.bind(prototypeOfObject.__lookupSetter__)),2!=[1,2].splice(0).length)if(function(){function makeArray(l){var a=Array(l+2);return a[0]=a[1]=0,a}var lengthBefore,array=[];return array.splice.apply(array,makeArray(20)),array.splice.apply(array,makeArray(26)),lengthBefore=array.length,array.splice(5,0,"XXX"),lengthBefore+1==array.length,lengthBefore+1==array.length?!0:void 0}()){var array_splice=Array.prototype.splice;Array.prototype.splice=function(start,deleteCount){return arguments.length?array_splice.apply(this,[void 0===start?0:start,void 0===deleteCount?this.length-start:deleteCount].concat(slice.call(arguments,2))):[]}}else Array.prototype.splice=function(pos,removeCount){var length=this.length;pos>0?pos>length&&(pos=length):void 0==pos?pos=0:0>pos&&(pos=Math.max(length+pos,0)),length>pos+removeCount||(removeCount=length-pos);var removed=this.slice(pos,pos+removeCount),insert=slice.call(arguments,2),add=insert.length;if(pos===length)add&&this.push.apply(this,insert);else{var remove=Math.min(removeCount,length-pos),tailOldPos=pos+remove,tailNewPos=tailOldPos+add-remove,tailCount=length-tailOldPos,lengthAfterRemove=length-remove;if(tailOldPos>tailNewPos)for(var i=0;tailCount>i;++i)this[tailNewPos+i]=this[tailOldPos+i];else if(tailNewPos>tailOldPos)for(i=tailCount;i--;)this[tailNewPos+i]=this[tailOldPos+i];if(add&&pos===lengthAfterRemove)this.length=lengthAfterRemove,this.push.apply(this,insert);else for(this.length=lengthAfterRemove+add,i=0;add>i;++i)this[pos+i]=insert[i]}return removed};Array.isArray||(Array.isArray=function(obj){return"[object Array]"==_toString(obj)});var boxedString=Object("a"),splitString="a"!=boxedString[0]||!(0 in boxedString);if(Array.prototype.forEach||(Array.prototype.forEach=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,thisp=arguments[1],i=-1,length=self.length>>>0;if("[object Function]"!=_toString(fun))throw new TypeError;for(;length>++i;)i in self&&fun.call(thisp,self[i],i,object)}),Array.prototype.map||(Array.prototype.map=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0,result=Array(length),thisp=arguments[1];if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");for(var i=0;length>i;i++)i in self&&(result[i]=fun.call(thisp,self[i],i,object));return result}),Array.prototype.filter||(Array.prototype.filter=function(fun){var value,object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0,result=[],thisp=arguments[1];if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");for(var i=0;length>i;i++)i in self&&(value=self[i],fun.call(thisp,value,i,object)&&result.push(value));return result}),Array.prototype.every||(Array.prototype.every=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0,thisp=arguments[1];if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");for(var i=0;length>i;i++)if(i in self&&!fun.call(thisp,self[i],i,object))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0,thisp=arguments[1];if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");for(var i=0;length>i;i++)if(i in self&&fun.call(thisp,self[i],i,object))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0;if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");if(!length&&1==arguments.length)throw new TypeError("reduce of empty array with no initial value");var result,i=0;if(arguments.length>=2)result=arguments[1];else for(;;){if(i in self){result=self[i++];break}if(++i>=length)throw new TypeError("reduce of empty array with no initial value")}for(;length>i;i++)i in self&&(result=fun.call(void 0,result,self[i],i,object));return result}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0;if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");if(!length&&1==arguments.length)throw new TypeError("reduceRight of empty array with no initial value");var result,i=length-1;if(arguments.length>=2)result=arguments[1];else for(;;){if(i in self){result=self[i--];break}if(0>--i)throw new TypeError("reduceRight of empty array with no initial value")}do i in this&&(result=fun.call(void 0,result,self[i],i,object));while(i--);return result}),Array.prototype.indexOf&&-1==[0,1].indexOf(1,2)||(Array.prototype.indexOf=function(sought){var self=splitString&&"[object String]"==_toString(this)?this.split(""):toObject(this),length=self.length>>>0;if(!length)return-1;var i=0;for(arguments.length>1&&(i=toInteger(arguments[1])),i=i>=0?i:Math.max(0,length+i);length>i;i++)if(i in self&&self[i]===sought)return i;return-1}),Array.prototype.lastIndexOf&&-1==[0,1].lastIndexOf(0,-3)||(Array.prototype.lastIndexOf=function(sought){var self=splitString&&"[object String]"==_toString(this)?this.split(""):toObject(this),length=self.length>>>0;if(!length)return-1;var i=length-1;for(arguments.length>1&&(i=Math.min(i,toInteger(arguments[1]))),i=i>=0?i:length-Math.abs(i);i>=0;i--)if(i in self&&sought===self[i])return i;return-1}),Object.getPrototypeOf||(Object.getPrototypeOf=function(object){return object.__proto__||(object.constructor?object.constructor.prototype:prototypeOfObject)}),!Object.getOwnPropertyDescriptor){var ERR_NON_OBJECT="Object.getOwnPropertyDescriptor called on a non-object: ";Object.getOwnPropertyDescriptor=function(object,property){if("object"!=typeof object&&"function"!=typeof object||null===object)throw new TypeError(ERR_NON_OBJECT+object);if(owns(object,property)){var descriptor,getter,setter;if(descriptor={enumerable:!0,configurable:!0},supportsAccessors){var prototype=object.__proto__;object.__proto__=prototypeOfObject;var getter=lookupGetter(object,property),setter=lookupSetter(object,property);if(object.__proto__=prototype,getter||setter)return getter&&(descriptor.get=getter),setter&&(descriptor.set=setter),descriptor}return descriptor.value=object[property],descriptor}}}if(Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(object){return Object.keys(object)}),!Object.create){var createEmpty;createEmpty=null===Object.prototype.__proto__?function(){return{__proto__:null}}:function(){var empty={};for(var i in empty)empty[i]=null;return empty.constructor=empty.hasOwnProperty=empty.propertyIsEnumerable=empty.isPrototypeOf=empty.toLocaleString=empty.toString=empty.valueOf=empty.__proto__=null,empty},Object.create=function(prototype,properties){var object;if(null===prototype)object=createEmpty();else{if("object"!=typeof prototype)throw new TypeError("typeof prototype["+typeof prototype+"] != \'object\'");var Type=function(){};Type.prototype=prototype,object=new Type,object.__proto__=prototype}return void 0!==properties&&Object.defineProperties(object,properties),object}}if(Object.defineProperty){var definePropertyWorksOnObject=doesDefinePropertyWork({}),definePropertyWorksOnDom="undefined"==typeof document||doesDefinePropertyWork(document.createElement("div"));if(!definePropertyWorksOnObject||!definePropertyWorksOnDom)var definePropertyFallback=Object.defineProperty}if(!Object.defineProperty||definePropertyFallback){var ERR_NON_OBJECT_DESCRIPTOR="Property description must be an object: ",ERR_NON_OBJECT_TARGET="Object.defineProperty called on non-object: ",ERR_ACCESSORS_NOT_SUPPORTED="getters & setters can not be defined on this javascript engine";Object.defineProperty=function(object,property,descriptor){if("object"!=typeof object&&"function"!=typeof object||null===object)throw new TypeError(ERR_NON_OBJECT_TARGET+object);if("object"!=typeof descriptor&&"function"!=typeof descriptor||null===descriptor)throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR+descriptor);if(definePropertyFallback)try{return definePropertyFallback.call(Object,object,property,descriptor)}catch(exception){}if(owns(descriptor,"value"))if(supportsAccessors&&(lookupGetter(object,property)||lookupSetter(object,property))){var prototype=object.__proto__;object.__proto__=prototypeOfObject,delete object[property],object[property]=descriptor.value,object.__proto__=prototype}else object[property]=descriptor.value;else{if(!supportsAccessors)throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);owns(descriptor,"get")&&defineGetter(object,property,descriptor.get),owns(descriptor,"set")&&defineSetter(object,property,descriptor.set)}return object}}Object.defineProperties||(Object.defineProperties=function(object,properties){for(var property in properties)owns(properties,property)&&Object.defineProperty(object,property,properties[property]);return object}),Object.seal||(Object.seal=function(object){return object}),Object.freeze||(Object.freeze=function(object){return object});try{Object.freeze(function(){})}catch(exception){Object.freeze=function(freezeObject){return function(object){return"function"==typeof object?object:freezeObject(object)}}(Object.freeze)}if(Object.preventExtensions||(Object.preventExtensions=function(object){return object}),Object.isSealed||(Object.isSealed=function(){return!1}),Object.isFrozen||(Object.isFrozen=function(){return!1}),Object.isExtensible||(Object.isExtensible=function(object){if(Object(object)===object)throw new TypeError;for(var name="";owns(object,name);)name+="?";object[name]=!0;var returnValue=owns(object,name);return delete object[name],returnValue}),!Object.keys){var hasDontEnumBug=!0,dontEnums=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],dontEnumsLength=dontEnums.length;for(var key in{toString:null})hasDontEnumBug=!1;Object.keys=function(object){if("object"!=typeof object&&"function"!=typeof object||null===object)throw new TypeError("Object.keys called on a non-object");var keys=[];for(var name in object)owns(object,name)&&keys.push(name);if(hasDontEnumBug)for(var i=0,ii=dontEnumsLength;ii>i;i++){var dontEnum=dontEnums[i];owns(object,dontEnum)&&keys.push(dontEnum)}return keys}}Date.now||(Date.now=function(){return(new Date).getTime()});var ws="\t\\n\x0B\\f\\r   ᠎             　\\u2028\\u2029\ufeff";if(!String.prototype.trim||ws.trim()){ws="["+ws+"]";var trimBeginRegexp=RegExp("^"+ws+ws+"*"),trimEndRegexp=RegExp(ws+ws+"*$");String.prototype.trim=function(){return(this+"").replace(trimBeginRegexp,"").replace(trimEndRegexp,"")}}var toObject=function(o){if(null==o)throw new TypeError("can\'t convert "+o+" to object");return Object(o)}});';
},function(e,t,n){ace.define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,o=function(){this.$rules={start:[{token:"variable",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)'},{token:"string",regex:'"',next:"string"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:"invalid.illegal",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"invalid.illegal",regex:"\\/\\/.*$"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],string:[{token:"constant.language.escape",regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/},{token:"string",regex:'[^"\\\\]+'},{token:"string",regex:'"',next:"start"},{token:"string",regex:"",next:"start"}]}};r.inherits(o,i),t.JsonHighlightRules=o}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var o=i[1].length,a=e.findMatchingBracket({row:t,column:o});if(!a||a.row==t)return 0;var s=this.$getIndent(e.getLine(a.row));e.replace(new r(t,0,t,o-1),s)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){"use strict";var r,i=e("../../lib/oop"),o=e("../behaviour").Behaviour,a=e("../../token_iterator").TokenIterator,s=e("../../lib/lang"),l=["text","paren.rparen","punctuation.operator"],u=["text","paren.rparen","punctuation.operator","comment"],c={},d=function(e){var t=-1;return e.multiSelect&&(t=e.selection.index,c.rangeCount!=e.multiSelect.rangeCount&&(c={rangeCount:e.multiSelect.rangeCount})),c[t]?r=c[t]:void(r=c[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""})},f=function(e,t,n,r){var i=e.end.row-e.start.row;return{text:n+t+r,selection:[0,e.start.column+1,i,e.end.column+(i?0:1)]}},p=function(){this.add("braces","insertion",function(e,t,n,i,o){var a=n.getCursorPosition(),l=i.doc.getLine(a.row);if("{"==o){d(n);var u=n.getSelectionRange(),c=i.doc.getTextRange(u);if(""!==c&&"{"!==c&&n.getWrapBehavioursEnabled())return f(u,c,"{","}");if(p.isSaneInsertion(n,i))return/[\]\}\)]/.test(l[a.column])||n.inMultiSelectMode?(p.recordAutoInsert(n,i,"}"),{text:"{}",selection:[1,1]}):(p.recordMaybeInsert(n,i,"{"),{text:"{",selection:[1,1]})}else if("}"==o){d(n);var h=l.substring(a.column,a.column+1);if("}"==h){var g=i.$findOpeningBracket("}",{column:a.column+1,row:a.row});if(null!==g&&p.isAutoInsertedClosing(a,l,o))return p.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else{if("\n"==o||"\r\n"==o){d(n);var m="";p.isMaybeInsertedClosing(a,l)&&(m=s.stringRepeat("}",r.maybeInsertedBrackets),p.clearMaybeInsertedClosing());var h=l.substring(a.column,a.column+1);if("}"===h){var v=i.findMatchingBracket({row:a.row,column:a.column+1},"}");if(!v)return null;var b=this.$getIndent(i.getLine(v.row))}else{if(!m)return void p.clearMaybeInsertedClosing();var b=this.$getIndent(l)}var y=b+i.getTabString();return{text:"\n"+y+"\n"+b+m,selection:[1,y.length,1,y.length]}}p.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(e,t,n,i,o){var a=i.doc.getTextRange(o);if(!o.isMultiLine()&&"{"==a){d(n);var s=i.doc.getLine(o.start.row),l=s.substring(o.end.column,o.end.column+1);if("}"==l)return o.end.column++,o;r.maybeInsertedBrackets--}}),this.add("parens","insertion",function(e,t,n,r,i){if("("==i){d(n);var o=n.getSelectionRange(),a=r.doc.getTextRange(o);if(""!==a&&n.getWrapBehavioursEnabled())return f(o,a,"(",")");if(p.isSaneInsertion(n,r))return p.recordAutoInsert(n,r,")"),{text:"()",selection:[1,1]}}else if(")"==i){d(n);var s=n.getCursorPosition(),l=r.doc.getLine(s.row),u=l.substring(s.column,s.column+1);if(")"==u){var c=r.$findOpeningBracket(")",{column:s.column+1,row:s.row});if(null!==c&&p.isAutoInsertedClosing(s,l,i))return p.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(e,t,n,r,i){var o=r.doc.getTextRange(i);if(!i.isMultiLine()&&"("==o){d(n);var a=r.doc.getLine(i.start.row),s=a.substring(i.start.column+1,i.start.column+2);if(")"==s)return i.end.column++,i}}),this.add("brackets","insertion",function(e,t,n,r,i){if("["==i){d(n);var o=n.getSelectionRange(),a=r.doc.getTextRange(o);if(""!==a&&n.getWrapBehavioursEnabled())return f(o,a,"[","]");if(p.isSaneInsertion(n,r))return p.recordAutoInsert(n,r,"]"),{text:"[]",selection:[1,1]}}else if("]"==i){d(n);var s=n.getCursorPosition(),l=r.doc.getLine(s.row),u=l.substring(s.column,s.column+1);if("]"==u){var c=r.$findOpeningBracket("]",{column:s.column+1,row:s.row});if(null!==c&&p.isAutoInsertedClosing(s,l,i))return p.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(e,t,n,r,i){var o=r.doc.getTextRange(i);if(!i.isMultiLine()&&"["==o){d(n);var a=r.doc.getLine(i.start.row),s=a.substring(i.start.column+1,i.start.column+2);if("]"==s)return i.end.column++,i}}),this.add("string_dquotes","insertion",function(e,t,n,r,i){if('"'==i||"'"==i){d(n);var o=i,a=n.getSelectionRange(),s=r.doc.getTextRange(a);if(""!==s&&"'"!==s&&'"'!=s&&n.getWrapBehavioursEnabled())return f(a,s,o,o);if(!s){var l=n.getCursorPosition(),u=r.doc.getLine(l.row),c=u.substring(l.column-1,l.column),p=u.substring(l.column,l.column+1),h=r.getTokenAt(l.row,l.column),g=r.getTokenAt(l.row,l.column+1);if("\\"==c&&h&&/escape/.test(h.type))return null;var m,v=h&&/string|escape/.test(h.type),b=!g||/string|escape/.test(g.type);if(p==o)m=v!==b;else{if(v&&!b)return null;if(v&&b)return null;var y=r.$mode.tokenRe;y.lastIndex=0;var w=y.test(c);y.lastIndex=0;var x=y.test(c);if(w||x)return null;if(p&&!/[\s;,.})\]\\]/.test(p))return null;m=!0}return{text:m?o+o:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var o=r.doc.getTextRange(i);if(!i.isMultiLine()&&('"'==o||"'"==o)){d(n);var a=r.doc.getLine(i.start.row),s=a.substring(i.start.column+1,i.start.column+2);if(s==o)return i.end.column++,i}})};p.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),r=new a(t,n.row,n.column);if(!this.$matchTokenType(r.getCurrentToken()||"text",l)){var i=new a(t,n.row,n.column+1);if(!this.$matchTokenType(i.getCurrentToken()||"text",l))return!1}return r.stepForward(),r.getCurrentTokenRow()!==n.row||this.$matchTokenType(r.getCurrentToken()||"text",u)},p.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},p.recordAutoInsert=function(e,t,n){var i=e.getCursorPosition(),o=t.doc.getLine(i.row);this.isAutoInsertedClosing(i,o,r.autoInsertedLineEnd[0])||(r.autoInsertedBrackets=0),r.autoInsertedRow=i.row,r.autoInsertedLineEnd=n+o.substr(i.column),r.autoInsertedBrackets++},p.recordMaybeInsert=function(e,t,n){var i=e.getCursorPosition(),o=t.doc.getLine(i.row);this.isMaybeInsertedClosing(i,o)||(r.maybeInsertedBrackets=0),r.maybeInsertedRow=i.row,r.maybeInsertedLineStart=o.substr(0,i.column)+n,r.maybeInsertedLineEnd=o.substr(i.column),r.maybeInsertedBrackets++},p.isAutoInsertedClosing=function(e,t,n){return r.autoInsertedBrackets>0&&e.row===r.autoInsertedRow&&n===r.autoInsertedLineEnd[0]&&t.substr(e.column)===r.autoInsertedLineEnd},p.isMaybeInsertedClosing=function(e,t){return r.maybeInsertedBrackets>0&&e.row===r.maybeInsertedRow&&t.substr(e.column)===r.maybeInsertedLineEnd&&t.substr(0,e.column)==r.maybeInsertedLineStart},p.popAutoInsertedClosing=function(){r.autoInsertedLineEnd=r.autoInsertedLineEnd.substr(1),r.autoInsertedBrackets--},p.clearMaybeInsertedClosing=function(){r&&(r.maybeInsertedBrackets=0,r.maybeInsertedRow=-1)},i.inherits(p,o),t.CstyleBehaviour=p}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,o=e("./fold_mode").FoldMode,a=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(a,o),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var o=i.match(this.foldingStartMarker);if(o){var a=o.index;if(o[1])return this.openingBracketBlock(e,o[1],n,a);var s=e.getCommentFoldRange(n,a+o[0].length,1);return s&&!s.isMultiLine()&&(r?s=this.getSectionRange(e,n):"all"!=t&&(s=null)),s}if("markbegin"!==t){var o=i.match(this.foldingStopMarker);if(o){var a=o.index+o[0].length;return o[1]?this.closingBracketBlock(e,o[1],n,a):e.getCommentFoldRange(n,a,-1)}}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),o=t,a=n.length;t+=1;for(var s=t,l=e.getLength();++t<l;){n=e.getLine(t);var u=n.search(/\S/);if(u!==-1){if(r>u)break;var c=this.getFoldWidgetRange(e,"all",t);if(c){if(c.start.row<=o)break;if(c.isMultiLine())t=c.end.row;else if(r==u)break}s=t}}return new i(o,a,s,e.getLine(s).length)},this.getCommentRegionBlock=function(e,t,n){for(var r=t.search(/\s*$/),o=e.getLength(),a=n,s=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,l=1;++n<o;){t=e.getLine(n);var u=s.exec(t);if(u&&(u[1]?l--:l++,!l))break}var c=n;if(c>a)return new i(a,r,c,t.length)}}.call(a.prototype)}),ace.define("ace/mode/json",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/json_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle","ace/worker/worker_client"],function(e,t,r){"use strict";var i=e("../lib/oop"),o=e("./text").Mode,a=e("./json_highlight_rules").JsonHighlightRules,s=e("./matching_brace_outdent").MatchingBraceOutdent,l=e("./behaviour/cstyle").CstyleBehaviour,u=e("./folding/cstyle").FoldMode,c=e("../worker/worker_client").WorkerClient,d=function(){this.HighlightRules=a,this.$outdent=new s,this.$behaviour=new l,this.foldingRules=new u};i.inherits(d,o),function(){this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t);if("start"==e){var i=t.match(/^.*[\{\(\[]\s*$/);i&&(r+=n)}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new c(["ace"],n(571),"JsonWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/json"}.call(d.prototype),t.Mode=d})},function(e,t){e.exports.id="ace/mode/json_worker",e.exports.src='"no use strict";(function(window){function resolveModuleId(id,paths){for(var testPath=id,tail="";testPath;){var alias=paths[testPath];if("string"==typeof alias)return alias+tail;if(alias)return alias.location.replace(/\\/*$/,"/")+(tail||alias.main||alias.name);if(alias===!1)return"";var i=testPath.lastIndexOf("/");if(-1===i)break;tail=testPath.substr(i)+tail,testPath=testPath.slice(0,i)}return id}if(!(void 0!==window.window&&window.document||window.acequire&&window.define)){window.console||(window.console=function(){var msgs=Array.prototype.slice.call(arguments,0);postMessage({type:"log",data:msgs})},window.console.error=window.console.warn=window.console.log=window.console.trace=window.console),window.window=window,window.ace=window,window.onerror=function(message,file,line,col,err){postMessage({type:"error",data:{message:message,data:err.data,file:file,line:line,col:col,stack:err.stack}})},window.normalizeModule=function(parentId,moduleName){if(-1!==moduleName.indexOf("!")){var chunks=moduleName.split("!");return window.normalizeModule(parentId,chunks[0])+"!"+window.normalizeModule(parentId,chunks[1])}if("."==moduleName.charAt(0)){var base=parentId.split("/").slice(0,-1).join("/");for(moduleName=(base?base+"/":"")+moduleName;-1!==moduleName.indexOf(".")&&previous!=moduleName;){var previous=moduleName;moduleName=moduleName.replace(/^\\.\\//,"").replace(/\\/\\.\\//,"/").replace(/[^\\/]+\\/\\.\\.\\//,"")}}return moduleName},window.acequire=function acequire(parentId,id){if(id||(id=parentId,parentId=null),!id.charAt)throw Error("worker.js acequire() accepts only (parentId, id) as arguments");id=window.normalizeModule(parentId,id);var module=window.acequire.modules[id];if(module)return module.initialized||(module.initialized=!0,module.exports=module.factory().exports),module.exports;if(!window.acequire.tlns)return console.log("unable to load "+id);var path=resolveModuleId(id,window.acequire.tlns);return".js"!=path.slice(-3)&&(path+=".js"),window.acequire.id=id,window.acequire.modules[id]={},importScripts(path),window.acequire(parentId,id)},window.acequire.modules={},window.acequire.tlns={},window.define=function(id,deps,factory){if(2==arguments.length?(factory=deps,"string"!=typeof id&&(deps=id,id=window.acequire.id)):1==arguments.length&&(factory=id,deps=[],id=window.acequire.id),"function"!=typeof factory)return window.acequire.modules[id]={exports:factory,initialized:!0},void 0;deps.length||(deps=["require","exports","module"]);var req=function(childId){return window.acequire(id,childId)};window.acequire.modules[id]={exports:{},factory:function(){var module=this,returnExports=factory.apply(this,deps.map(function(dep){switch(dep){case"require":return req;case"exports":return module.exports;case"module":return module;default:return req(dep)}}));return returnExports&&(module.exports=returnExports),module}}},window.define.amd={},acequire.tlns={},window.initBaseUrls=function(topLevelNamespaces){for(var i in topLevelNamespaces)acequire.tlns[i]=topLevelNamespaces[i]},window.initSender=function(){var EventEmitter=window.acequire("ace/lib/event_emitter").EventEmitter,oop=window.acequire("ace/lib/oop"),Sender=function(){};return function(){oop.implement(this,EventEmitter),this.callback=function(data,callbackId){postMessage({type:"call",id:callbackId,data:data})},this.emit=function(name,data){postMessage({type:"event",name:name,data:data})}}.call(Sender.prototype),new Sender};var main=window.main=null,sender=window.sender=null;window.onmessage=function(e){var msg=e.data;if(msg.event&&sender)sender._signal(msg.event,msg.data);else if(msg.command)if(main[msg.command])main[msg.command].apply(main,msg.args);else{if(!window[msg.command])throw Error("Unknown command:"+msg.command);window[msg.command].apply(window,msg.args)}else if(msg.init){window.initBaseUrls(msg.tlns),acequire("ace/lib/es5-shim"),sender=window.sender=window.initSender();var clazz=acequire(msg.module)[msg.classname];main=window.main=new clazz(sender)}}}})(this),ace.define("ace/lib/oop",["require","exports","module"],function(acequire,exports){"use strict";exports.inherits=function(ctor,superCtor){ctor.super_=superCtor,ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:!1,writable:!0,configurable:!0}})},exports.mixin=function(obj,mixin){for(var key in mixin)obj[key]=mixin[key];return obj},exports.implement=function(proto,mixin){exports.mixin(proto,mixin)}}),ace.define("ace/range",["require","exports","module"],function(acequire,exports){"use strict";var comparePoints=function(p1,p2){return p1.row-p2.row||p1.column-p2.column},Range=function(startRow,startColumn,endRow,endColumn){this.start={row:startRow,column:startColumn},this.end={row:endRow,column:endColumn}};(function(){this.isEqual=function(range){return this.start.row===range.start.row&&this.end.row===range.end.row&&this.start.column===range.start.column&&this.end.column===range.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(row,column){return 0==this.compare(row,column)},this.compareRange=function(range){var cmp,end=range.end,start=range.start;return cmp=this.compare(end.row,end.column),1==cmp?(cmp=this.compare(start.row,start.column),1==cmp?2:0==cmp?1:0):-1==cmp?-2:(cmp=this.compare(start.row,start.column),-1==cmp?-1:1==cmp?42:0)},this.comparePoint=function(p){return this.compare(p.row,p.column)},this.containsRange=function(range){return 0==this.comparePoint(range.start)&&0==this.comparePoint(range.end)},this.intersects=function(range){var cmp=this.compareRange(range);return-1==cmp||0==cmp||1==cmp},this.isEnd=function(row,column){return this.end.row==row&&this.end.column==column},this.isStart=function(row,column){return this.start.row==row&&this.start.column==column},this.setStart=function(row,column){"object"==typeof row?(this.start.column=row.column,this.start.row=row.row):(this.start.row=row,this.start.column=column)},this.setEnd=function(row,column){"object"==typeof row?(this.end.column=row.column,this.end.row=row.row):(this.end.row=row,this.end.column=column)},this.inside=function(row,column){return 0==this.compare(row,column)?this.isEnd(row,column)||this.isStart(row,column)?!1:!0:!1},this.insideStart=function(row,column){return 0==this.compare(row,column)?this.isEnd(row,column)?!1:!0:!1},this.insideEnd=function(row,column){return 0==this.compare(row,column)?this.isStart(row,column)?!1:!0:!1},this.compare=function(row,column){return this.isMultiLine()||row!==this.start.row?this.start.row>row?-1:row>this.end.row?1:this.start.row===row?column>=this.start.column?0:-1:this.end.row===row?this.end.column>=column?0:1:0:this.start.column>column?-1:column>this.end.column?1:0},this.compareStart=function(row,column){return this.start.row==row&&this.start.column==column?-1:this.compare(row,column)},this.compareEnd=function(row,column){return this.end.row==row&&this.end.column==column?1:this.compare(row,column)},this.compareInside=function(row,column){return this.end.row==row&&this.end.column==column?1:this.start.row==row&&this.start.column==column?-1:this.compare(row,column)},this.clipRows=function(firstRow,lastRow){if(this.end.row>lastRow)var end={row:lastRow+1,column:0};else if(firstRow>this.end.row)var end={row:firstRow,column:0};if(this.start.row>lastRow)var start={row:lastRow+1,column:0};else if(firstRow>this.start.row)var start={row:firstRow,column:0};return Range.fromPoints(start||this.start,end||this.end)},this.extend=function(row,column){var cmp=this.compare(row,column);if(0==cmp)return this;if(-1==cmp)var start={row:row,column:column};else var end={row:row,column:column};return Range.fromPoints(start||this.start,end||this.end)},this.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},this.isMultiLine=function(){return this.start.row!==this.end.row},this.clone=function(){return Range.fromPoints(this.start,this.end)},this.collapseRows=function(){return 0==this.end.column?new Range(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new Range(this.start.row,0,this.end.row,0)},this.toScreenRange=function(session){var screenPosStart=session.documentToScreenPosition(this.start),screenPosEnd=session.documentToScreenPosition(this.end);return new Range(screenPosStart.row,screenPosStart.column,screenPosEnd.row,screenPosEnd.column)},this.moveBy=function(row,column){this.start.row+=row,this.start.column+=column,this.end.row+=row,this.end.column+=column}}).call(Range.prototype),Range.fromPoints=function(start,end){return new Range(start.row,start.column,end.row,end.column)},Range.comparePoints=comparePoints,Range.comparePoints=function(p1,p2){return p1.row-p2.row||p1.column-p2.column},exports.Range=Range}),ace.define("ace/apply_delta",["require","exports","module"],function(acequire,exports){"use strict";exports.applyDelta=function(docLines,delta){var row=delta.start.row,startColumn=delta.start.column,line=docLines[row]||"";switch(delta.action){case"insert":var lines=delta.lines;if(1===lines.length)docLines[row]=line.substring(0,startColumn)+delta.lines[0]+line.substring(startColumn);else{var args=[row,1].concat(delta.lines);docLines.splice.apply(docLines,args),docLines[row]=line.substring(0,startColumn)+docLines[row],docLines[row+delta.lines.length-1]+=line.substring(startColumn)}break;case"remove":var endColumn=delta.end.column,endRow=delta.end.row;row===endRow?docLines[row]=line.substring(0,startColumn)+line.substring(endColumn):docLines.splice(row,endRow-row+1,line.substring(0,startColumn)+docLines[endRow].substring(endColumn))}}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(acequire,exports){"use strict";var EventEmitter={},stopPropagation=function(){this.propagationStopped=!0},preventDefault=function(){this.defaultPrevented=!0};EventEmitter._emit=EventEmitter._dispatchEvent=function(eventName,e){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var listeners=this._eventRegistry[eventName]||[],defaultHandler=this._defaultHandlers[eventName];if(listeners.length||defaultHandler){"object"==typeof e&&e||(e={}),e.type||(e.type=eventName),e.stopPropagation||(e.stopPropagation=stopPropagation),e.preventDefault||(e.preventDefault=preventDefault),listeners=listeners.slice();for(var i=0;listeners.length>i&&(listeners[i](e,this),!e.propagationStopped);i++);return defaultHandler&&!e.defaultPrevented?defaultHandler(e,this):void 0}},EventEmitter._signal=function(eventName,e){var listeners=(this._eventRegistry||{})[eventName];if(listeners){listeners=listeners.slice();for(var i=0;listeners.length>i;i++)listeners[i](e,this)}},EventEmitter.once=function(eventName,callback){var _self=this;callback&&this.addEventListener(eventName,function newCallback(){_self.removeEventListener(eventName,newCallback),callback.apply(null,arguments)})},EventEmitter.setDefaultHandler=function(eventName,callback){var handlers=this._defaultHandlers;if(handlers||(handlers=this._defaultHandlers={_disabled_:{}}),handlers[eventName]){var old=handlers[eventName],disabled=handlers._disabled_[eventName];disabled||(handlers._disabled_[eventName]=disabled=[]),disabled.push(old);var i=disabled.indexOf(callback);-1!=i&&disabled.splice(i,1)}handlers[eventName]=callback},EventEmitter.removeDefaultHandler=function(eventName,callback){var handlers=this._defaultHandlers;if(handlers){var disabled=handlers._disabled_[eventName];if(handlers[eventName]==callback)handlers[eventName],disabled&&this.setDefaultHandler(eventName,disabled.pop());else if(disabled){var i=disabled.indexOf(callback);-1!=i&&disabled.splice(i,1)}}},EventEmitter.on=EventEmitter.addEventListener=function(eventName,callback,capturing){this._eventRegistry=this._eventRegistry||{};var listeners=this._eventRegistry[eventName];return listeners||(listeners=this._eventRegistry[eventName]=[]),-1==listeners.indexOf(callback)&&listeners[capturing?"unshift":"push"](callback),callback},EventEmitter.off=EventEmitter.removeListener=EventEmitter.removeEventListener=function(eventName,callback){this._eventRegistry=this._eventRegistry||{};var listeners=this._eventRegistry[eventName];if(listeners){var index=listeners.indexOf(callback);-1!==index&&listeners.splice(index,1)}},EventEmitter.removeAllListeners=function(eventName){this._eventRegistry&&(this._eventRegistry[eventName]=[])},exports.EventEmitter=EventEmitter}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(acequire,exports){"use strict";var oop=acequire("./lib/oop"),EventEmitter=acequire("./lib/event_emitter").EventEmitter,Anchor=exports.Anchor=function(doc,row,column){this.$onChange=this.onChange.bind(this),this.attach(doc),column===void 0?this.setPosition(row.row,row.column):this.setPosition(row,column)};(function(){function $pointsInOrder(point1,point2,equalPointsInOrder){var bColIsAfter=equalPointsInOrder?point1.column<=point2.column:point1.column<point2.column;return point1.row<point2.row||point1.row==point2.row&&bColIsAfter}function $getTransformedPoint(delta,point,moveIfEqual){var deltaIsInsert="insert"==delta.action,deltaRowShift=(deltaIsInsert?1:-1)*(delta.end.row-delta.start.row),deltaColShift=(deltaIsInsert?1:-1)*(delta.end.column-delta.start.column),deltaStart=delta.start,deltaEnd=deltaIsInsert?deltaStart:delta.end;return $pointsInOrder(point,deltaStart,moveIfEqual)?{row:point.row,column:point.column}:$pointsInOrder(deltaEnd,point,!moveIfEqual)?{row:point.row+deltaRowShift,column:point.column+(point.row==deltaEnd.row?deltaColShift:0)}:{row:deltaStart.row,column:deltaStart.column}}oop.implement(this,EventEmitter),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.$insertRight=!1,this.onChange=function(delta){if(!(delta.start.row==delta.end.row&&delta.start.row!=this.row||delta.start.row>this.row)){var point=$getTransformedPoint(delta,{row:this.row,column:this.column},this.$insertRight);this.setPosition(point.row,point.column,!0)}},this.setPosition=function(row,column,noClip){var pos;if(pos=noClip?{row:row,column:column}:this.$clipPositionToDocument(row,column),this.row!=pos.row||this.column!=pos.column){var old={row:this.row,column:this.column};this.row=pos.row,this.column=pos.column,this._signal("change",{old:old,value:pos})}},this.detach=function(){this.document.removeEventListener("change",this.$onChange)},this.attach=function(doc){this.document=doc||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(row,column){var pos={};return row>=this.document.getLength()?(pos.row=Math.max(0,this.document.getLength()-1),pos.column=this.document.getLine(pos.row).length):0>row?(pos.row=0,pos.column=0):(pos.row=row,pos.column=Math.min(this.document.getLine(pos.row).length,Math.max(0,column))),0>column&&(pos.column=0),pos}}).call(Anchor.prototype)}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(acequire,exports){"use strict";var oop=acequire("./lib/oop"),applyDelta=acequire("./apply_delta").applyDelta,EventEmitter=acequire("./lib/event_emitter").EventEmitter,Range=acequire("./range").Range,Anchor=acequire("./anchor").Anchor,Document=function(textOrLines){this.$lines=[""],0===textOrLines.length?this.$lines=[""]:Array.isArray(textOrLines)?this.insertMergedLines({row:0,column:0},textOrLines):this.insert({row:0,column:0},textOrLines)};(function(){oop.implement(this,EventEmitter),this.setValue=function(text){var len=this.getLength()-1;this.remove(new Range(0,0,len,this.getLine(len).length)),this.insert({row:0,column:0},text)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(row,column){return new Anchor(this,row,column)},this.$split=0==="aaa".split(/a/).length?function(text){return text.replace(/\\r\\n|\\r/g,"\\n").split("\\n")}:function(text){return text.split(/\\r\\n|\\r|\\n/)},this.$detectNewLine=function(text){var match=text.match(/^.*?(\\r\\n|\\r|\\n)/m);this.$autoNewLine=match?match[1]:"\\n",this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\\r\\n";case"unix":return"\\n";default:return this.$autoNewLine||"\\n"}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(newLineMode){this.$newLineMode!==newLineMode&&(this.$newLineMode=newLineMode,this._signal("changeNewLineMode"))},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(text){return"\\r\\n"==text||"\\r"==text||"\\n"==text},this.getLine=function(row){return this.$lines[row]||""},this.getLines=function(firstRow,lastRow){return this.$lines.slice(firstRow,lastRow+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(range){return this.getLinesForRange(range).join(this.getNewLineCharacter())},this.getLinesForRange=function(range){var lines;if(range.start.row===range.end.row)lines=[this.getLine(range.start.row).substring(range.start.column,range.end.column)];else{lines=this.getLines(range.start.row,range.end.row),lines[0]=(lines[0]||"").substring(range.start.column);var l=lines.length-1;range.end.row-range.start.row==l&&(lines[l]=lines[l].substring(0,range.end.column))}return lines},this.insertLines=function(row,lines){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(row,lines)},this.removeLines=function(firstRow,lastRow){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(firstRow,lastRow)},this.insertNewLine=function(position){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, [\'\', \'\']) instead."),this.insertMergedLines(position,["",""])},this.insert=function(position,text){return 1>=this.getLength()&&this.$detectNewLine(text),this.insertMergedLines(position,this.$split(text))},this.insertInLine=function(position,text){var start=this.clippedPos(position.row,position.column),end=this.pos(position.row,position.column+text.length);return this.applyDelta({start:start,end:end,action:"insert",lines:[text]},!0),this.clonePos(end)},this.clippedPos=function(row,column){var length=this.getLength();void 0===row?row=length:0>row?row=0:row>=length&&(row=length-1,column=void 0);var line=this.getLine(row);return void 0==column&&(column=line.length),column=Math.min(Math.max(column,0),line.length),{row:row,column:column}},this.clonePos=function(pos){return{row:pos.row,column:pos.column}},this.pos=function(row,column){return{row:row,column:column}},this.$clipPosition=function(position){var length=this.getLength();return position.row>=length?(position.row=Math.max(0,length-1),position.column=this.getLine(length-1).length):(position.row=Math.max(0,position.row),position.column=Math.min(Math.max(position.column,0),this.getLine(position.row).length)),position},this.insertFullLines=function(row,lines){row=Math.min(Math.max(row,0),this.getLength());var column=0;this.getLength()>row?(lines=lines.concat([""]),column=0):(lines=[""].concat(lines),row--,column=this.$lines[row].length),this.insertMergedLines({row:row,column:column},lines)},this.insertMergedLines=function(position,lines){var start=this.clippedPos(position.row,position.column),end={row:start.row+lines.length-1,column:(1==lines.length?start.column:0)+lines[lines.length-1].length};return this.applyDelta({start:start,end:end,action:"insert",lines:lines}),this.clonePos(end)},this.remove=function(range){var start=this.clippedPos(range.start.row,range.start.column),end=this.clippedPos(range.end.row,range.end.column);return this.applyDelta({start:start,end:end,action:"remove",lines:this.getLinesForRange({start:start,end:end})}),this.clonePos(start)},this.removeInLine=function(row,startColumn,endColumn){var start=this.clippedPos(row,startColumn),end=this.clippedPos(row,endColumn);return this.applyDelta({start:start,end:end,action:"remove",lines:this.getLinesForRange({start:start,end:end})},!0),this.clonePos(start)},this.removeFullLines=function(firstRow,lastRow){firstRow=Math.min(Math.max(0,firstRow),this.getLength()-1),lastRow=Math.min(Math.max(0,lastRow),this.getLength()-1);var deleteFirstNewLine=lastRow==this.getLength()-1&&firstRow>0,deleteLastNewLine=this.getLength()-1>lastRow,startRow=deleteFirstNewLine?firstRow-1:firstRow,startCol=deleteFirstNewLine?this.getLine(startRow).length:0,endRow=deleteLastNewLine?lastRow+1:lastRow,endCol=deleteLastNewLine?0:this.getLine(endRow).length,range=new Range(startRow,startCol,endRow,endCol),deletedLines=this.$lines.slice(firstRow,lastRow+1);return this.applyDelta({start:range.start,end:range.end,action:"remove",lines:this.getLinesForRange(range)}),deletedLines},this.removeNewLine=function(row){this.getLength()-1>row&&row>=0&&this.applyDelta({start:this.pos(row,this.getLine(row).length),end:this.pos(row+1,0),action:"remove",lines:["",""]})},this.replace=function(range,text){if(range instanceof Range||(range=Range.fromPoints(range.start,range.end)),0===text.length&&range.isEmpty())return range.start;if(text==this.getTextRange(range))return range.end;this.remove(range);var end;return end=text?this.insert(range.start,text):range.start},this.applyDeltas=function(deltas){for(var i=0;deltas.length>i;i++)this.applyDelta(deltas[i])},this.revertDeltas=function(deltas){for(var i=deltas.length-1;i>=0;i--)this.revertDelta(deltas[i])},this.applyDelta=function(delta,doNotValidate){var isInsert="insert"==delta.action;(isInsert?1>=delta.lines.length&&!delta.lines[0]:!Range.comparePoints(delta.start,delta.end))||(isInsert&&delta.lines.length>2e4&&this.$splitAndapplyLargeDelta(delta,2e4),applyDelta(this.$lines,delta,doNotValidate),this._signal("change",delta))},this.$splitAndapplyLargeDelta=function(delta,MAX){for(var lines=delta.lines,l=lines.length,row=delta.start.row,column=delta.start.column,from=0,to=0;;){from=to,to+=MAX-1;var chunk=lines.slice(from,to);if(to>l){delta.lines=chunk,delta.start.row=row+from,delta.start.column=column;break}chunk.push(""),this.applyDelta({start:this.pos(row+from,column),end:this.pos(row+to,column=0),action:delta.action,lines:chunk},!0)}},this.revertDelta=function(delta){this.applyDelta({start:this.clonePos(delta.start),end:this.clonePos(delta.end),action:"insert"==delta.action?"remove":"insert",lines:delta.lines.slice()})},this.indexToPosition=function(index,startRow){for(var lines=this.$lines||this.getAllLines(),newlineLength=this.getNewLineCharacter().length,i=startRow||0,l=lines.length;l>i;i++)if(index-=lines[i].length+newlineLength,0>index)return{row:i,column:index+lines[i].length+newlineLength};return{row:l-1,column:lines[l-1].length}},this.positionToIndex=function(pos,startRow){for(var lines=this.$lines||this.getAllLines(),newlineLength=this.getNewLineCharacter().length,index=0,row=Math.min(pos.row,lines.length),i=startRow||0;row>i;++i)index+=lines[i].length+newlineLength;return index+pos.column}}).call(Document.prototype),exports.Document=Document}),ace.define("ace/lib/lang",["require","exports","module"],function(acequire,exports){"use strict";exports.last=function(a){return a[a.length-1]},exports.stringReverse=function(string){return string.split("").reverse().join("")},exports.stringRepeat=function(string,count){for(var result="";count>0;)1&count&&(result+=string),(count>>=1)&&(string+=string);return result};var trimBeginRegexp=/^\\s\\s*/,trimEndRegexp=/\\s\\s*$/;exports.stringTrimLeft=function(string){return string.replace(trimBeginRegexp,"")},exports.stringTrimRight=function(string){return string.replace(trimEndRegexp,"")},exports.copyObject=function(obj){var copy={};for(var key in obj)copy[key]=obj[key];return copy},exports.copyArray=function(array){for(var copy=[],i=0,l=array.length;l>i;i++)copy[i]=array[i]&&"object"==typeof array[i]?this.copyObject(array[i]):array[i];return copy},exports.deepCopy=function deepCopy(obj){if("object"!=typeof obj||!obj)return obj;var copy;if(Array.isArray(obj)){copy=[];for(var key=0;obj.length>key;key++)copy[key]=deepCopy(obj[key]);return copy}var cons=obj.constructor;if(cons===RegExp)return obj;copy=cons();for(var key in obj)copy[key]=deepCopy(obj[key]);return copy},exports.arrayToMap=function(arr){for(var map={},i=0;arr.length>i;i++)map[arr[i]]=1;return map},exports.createMap=function(props){var map=Object.create(null);for(var i in props)map[i]=props[i];return map},exports.arrayRemove=function(array,value){for(var i=0;array.length>=i;i++)value===array[i]&&array.splice(i,1)},exports.escapeRegExp=function(str){return str.replace(/([.*+?^${}()|[\\]\\/\\\\])/g,"\\\\$1")},exports.escapeHTML=function(str){return str.replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/\'/g,"&#39;").replace(/</g,"&#60;")},exports.getMatchOffsets=function(string,regExp){var matches=[];return string.replace(regExp,function(str){matches.push({offset:arguments[arguments.length-2],length:str.length})}),matches},exports.deferredCall=function(fcn){var timer=null,callback=function(){timer=null,fcn()},deferred=function(timeout){return deferred.cancel(),timer=setTimeout(callback,timeout||0),deferred};return deferred.schedule=deferred,deferred.call=function(){return this.cancel(),fcn(),deferred},deferred.cancel=function(){return clearTimeout(timer),timer=null,deferred},deferred.isPending=function(){return timer},deferred},exports.delayedCall=function(fcn,defaultTimeout){var timer=null,callback=function(){timer=null,fcn()},_self=function(timeout){null==timer&&(timer=setTimeout(callback,timeout||defaultTimeout))};return _self.delay=function(timeout){timer&&clearTimeout(timer),timer=setTimeout(callback,timeout||defaultTimeout)},_self.schedule=_self,_self.call=function(){this.cancel(),fcn()},_self.cancel=function(){timer&&clearTimeout(timer),timer=null},_self.isPending=function(){return timer},_self}}),ace.define("ace/worker/mirror",["require","exports","module","ace/range","ace/document","ace/lib/lang"],function(acequire,exports){"use strict";acequire("../range").Range;var Document=acequire("../document").Document,lang=acequire("../lib/lang"),Mirror=exports.Mirror=function(sender){this.sender=sender;var doc=this.doc=new Document(""),deferredUpdate=this.deferredUpdate=lang.delayedCall(this.onUpdate.bind(this)),_self=this;sender.on("change",function(e){var data=e.data;if(data[0].start)doc.applyDeltas(data);else for(var i=0;data.length>i;i+=2){if(Array.isArray(data[i+1]))var d={action:"insert",start:data[i],lines:data[i+1]};else var d={action:"remove",start:data[i],end:data[i+1]};doc.applyDelta(d,!0)}return _self.$timeout?deferredUpdate.schedule(_self.$timeout):(_self.onUpdate(),void 0)})};(function(){this.$timeout=500,this.setTimeout=function(timeout){this.$timeout=timeout},this.setValue=function(value){this.doc.setValue(value),this.deferredUpdate.schedule(this.$timeout)},this.getValue=function(callbackId){this.sender.callback(this.doc.getValue(),callbackId)},this.onUpdate=function(){},this.isPending=function(){return this.deferredUpdate.isPending()}}).call(Mirror.prototype)}),ace.define("ace/mode/json/json_parse",["require","exports","module"],function(){"use strict";var at,ch,text,value,escapee={\'"\':\'"\',"\\\\":"\\\\","/":"/",b:"\\b",f:"\\f",n:"\\n",r:"\\r",t:"\t"},error=function(m){throw{name:"SyntaxError",message:m,at:at,text:text}},next=function(c){return c&&c!==ch&&error("Expected \'"+c+"\' instead of \'"+ch+"\'"),ch=text.charAt(at),at+=1,ch},number=function(){var number,string="";for("-"===ch&&(string="-",next("-"));ch>="0"&&"9">=ch;)string+=ch,next();if("."===ch)for(string+=".";next()&&ch>="0"&&"9">=ch;)string+=ch;if("e"===ch||"E"===ch)for(string+=ch,next(),("-"===ch||"+"===ch)&&(string+=ch,next());ch>="0"&&"9">=ch;)string+=ch,next();return number=+string,isNaN(number)?(error("Bad number"),void 0):number},string=function(){var hex,i,uffff,string="";if(\'"\'===ch)for(;next();){if(\'"\'===ch)return next(),string;if("\\\\"===ch)if(next(),"u"===ch){for(uffff=0,i=0;4>i&&(hex=parseInt(next(),16),isFinite(hex));i+=1)uffff=16*uffff+hex;string+=String.fromCharCode(uffff)}else{if("string"!=typeof escapee[ch])break;string+=escapee[ch]}else string+=ch}error("Bad string")},white=function(){for(;ch&&" ">=ch;)next()},word=function(){switch(ch){case"t":return next("t"),next("r"),next("u"),next("e"),!0;case"f":return next("f"),next("a"),next("l"),next("s"),next("e"),!1;case"n":return next("n"),next("u"),next("l"),next("l"),null}error("Unexpected \'"+ch+"\'")},array=function(){var array=[];if("["===ch){if(next("["),white(),"]"===ch)return next("]"),array;for(;ch;){if(array.push(value()),white(),"]"===ch)return next("]"),array;next(","),white()}}error("Bad array")},object=function(){var key,object={};if("{"===ch){if(next("{"),white(),"}"===ch)return next("}"),object;for(;ch;){if(key=string(),white(),next(":"),Object.hasOwnProperty.call(object,key)&&error(\'Duplicate key "\'+key+\'"\'),object[key]=value(),white(),"}"===ch)return next("}"),object;next(","),white()}}error("Bad object")};return value=function(){switch(white(),ch){case"{":return object();case"[":return array();case\'"\':return string();case"-":return number();default:return ch>="0"&&"9">=ch?number():word()}},function(source,reviver){var result;return text=source,at=0,ch=" ",result=value(),white(),ch&&error("Syntax error"),"function"==typeof reviver?function walk(holder,key){var k,v,value=holder[key];if(value&&"object"==typeof value)for(k in value)Object.hasOwnProperty.call(value,k)&&(v=walk(value,k),void 0!==v?value[k]=v:delete value[k]);return reviver.call(holder,key,value)}({"":result},""):result}}),ace.define("ace/mode/json_worker",["require","exports","module","ace/lib/oop","ace/worker/mirror","ace/mode/json/json_parse"],function(acequire,exports){"use strict";var oop=acequire("../lib/oop"),Mirror=acequire("../worker/mirror").Mirror,parse=acequire("./json/json_parse"),JsonWorker=exports.JsonWorker=function(sender){Mirror.call(this,sender),this.setTimeout(200)};oop.inherits(JsonWorker,Mirror),function(){this.onUpdate=function(){var value=this.doc.getValue(),errors=[];try{value&&parse(value)}catch(e){var pos=this.doc.indexToPosition(e.at-1);errors.push({row:pos.row,column:pos.column,text:e.message,type:"error"})}this.sender.emit("annotate",errors)}}.call(JsonWorker.prototype)}),ace.define("ace/lib/es5-shim",["require","exports","module"],function(){function Empty(){}function doesDefinePropertyWork(object){try{return Object.defineProperty(object,"sentinel",{}),"sentinel"in object}catch(exception){}}function toInteger(n){return n=+n,n!==n?n=0:0!==n&&n!==1/0&&n!==-(1/0)&&(n=(n>0||-1)*Math.floor(Math.abs(n))),n}Function.prototype.bind||(Function.prototype.bind=function(that){var target=this;if("function"!=typeof target)throw new TypeError("Function.prototype.bind called on incompatible "+target);var args=slice.call(arguments,1),bound=function(){if(this instanceof bound){var result=target.apply(this,args.concat(slice.call(arguments)));return Object(result)===result?result:this}return target.apply(that,args.concat(slice.call(arguments)))};return target.prototype&&(Empty.prototype=target.prototype,bound.prototype=new Empty,Empty.prototype=null),bound});var defineGetter,defineSetter,lookupGetter,lookupSetter,supportsAccessors,call=Function.prototype.call,prototypeOfArray=Array.prototype,prototypeOfObject=Object.prototype,slice=prototypeOfArray.slice,_toString=call.bind(prototypeOfObject.toString),owns=call.bind(prototypeOfObject.hasOwnProperty);if((supportsAccessors=owns(prototypeOfObject,"__defineGetter__"))&&(defineGetter=call.bind(prototypeOfObject.__defineGetter__),defineSetter=call.bind(prototypeOfObject.__defineSetter__),lookupGetter=call.bind(prototypeOfObject.__lookupGetter__),lookupSetter=call.bind(prototypeOfObject.__lookupSetter__)),2!=[1,2].splice(0).length)if(function(){function makeArray(l){var a=Array(l+2);return a[0]=a[1]=0,a}var lengthBefore,array=[];return array.splice.apply(array,makeArray(20)),array.splice.apply(array,makeArray(26)),lengthBefore=array.length,array.splice(5,0,"XXX"),lengthBefore+1==array.length,lengthBefore+1==array.length?!0:void 0\n}()){var array_splice=Array.prototype.splice;Array.prototype.splice=function(start,deleteCount){return arguments.length?array_splice.apply(this,[void 0===start?0:start,void 0===deleteCount?this.length-start:deleteCount].concat(slice.call(arguments,2))):[]}}else Array.prototype.splice=function(pos,removeCount){var length=this.length;pos>0?pos>length&&(pos=length):void 0==pos?pos=0:0>pos&&(pos=Math.max(length+pos,0)),length>pos+removeCount||(removeCount=length-pos);var removed=this.slice(pos,pos+removeCount),insert=slice.call(arguments,2),add=insert.length;if(pos===length)add&&this.push.apply(this,insert);else{var remove=Math.min(removeCount,length-pos),tailOldPos=pos+remove,tailNewPos=tailOldPos+add-remove,tailCount=length-tailOldPos,lengthAfterRemove=length-remove;if(tailOldPos>tailNewPos)for(var i=0;tailCount>i;++i)this[tailNewPos+i]=this[tailOldPos+i];else if(tailNewPos>tailOldPos)for(i=tailCount;i--;)this[tailNewPos+i]=this[tailOldPos+i];if(add&&pos===lengthAfterRemove)this.length=lengthAfterRemove,this.push.apply(this,insert);else for(this.length=lengthAfterRemove+add,i=0;add>i;++i)this[pos+i]=insert[i]}return removed};Array.isArray||(Array.isArray=function(obj){return"[object Array]"==_toString(obj)});var boxedString=Object("a"),splitString="a"!=boxedString[0]||!(0 in boxedString);if(Array.prototype.forEach||(Array.prototype.forEach=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,thisp=arguments[1],i=-1,length=self.length>>>0;if("[object Function]"!=_toString(fun))throw new TypeError;for(;length>++i;)i in self&&fun.call(thisp,self[i],i,object)}),Array.prototype.map||(Array.prototype.map=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0,result=Array(length),thisp=arguments[1];if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");for(var i=0;length>i;i++)i in self&&(result[i]=fun.call(thisp,self[i],i,object));return result}),Array.prototype.filter||(Array.prototype.filter=function(fun){var value,object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0,result=[],thisp=arguments[1];if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");for(var i=0;length>i;i++)i in self&&(value=self[i],fun.call(thisp,value,i,object)&&result.push(value));return result}),Array.prototype.every||(Array.prototype.every=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0,thisp=arguments[1];if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");for(var i=0;length>i;i++)if(i in self&&!fun.call(thisp,self[i],i,object))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0,thisp=arguments[1];if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");for(var i=0;length>i;i++)if(i in self&&fun.call(thisp,self[i],i,object))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0;if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");if(!length&&1==arguments.length)throw new TypeError("reduce of empty array with no initial value");var result,i=0;if(arguments.length>=2)result=arguments[1];else for(;;){if(i in self){result=self[i++];break}if(++i>=length)throw new TypeError("reduce of empty array with no initial value")}for(;length>i;i++)i in self&&(result=fun.call(void 0,result,self[i],i,object));return result}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0;if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");if(!length&&1==arguments.length)throw new TypeError("reduceRight of empty array with no initial value");var result,i=length-1;if(arguments.length>=2)result=arguments[1];else for(;;){if(i in self){result=self[i--];break}if(0>--i)throw new TypeError("reduceRight of empty array with no initial value")}do i in this&&(result=fun.call(void 0,result,self[i],i,object));while(i--);return result}),Array.prototype.indexOf&&-1==[0,1].indexOf(1,2)||(Array.prototype.indexOf=function(sought){var self=splitString&&"[object String]"==_toString(this)?this.split(""):toObject(this),length=self.length>>>0;if(!length)return-1;var i=0;for(arguments.length>1&&(i=toInteger(arguments[1])),i=i>=0?i:Math.max(0,length+i);length>i;i++)if(i in self&&self[i]===sought)return i;return-1}),Array.prototype.lastIndexOf&&-1==[0,1].lastIndexOf(0,-3)||(Array.prototype.lastIndexOf=function(sought){var self=splitString&&"[object String]"==_toString(this)?this.split(""):toObject(this),length=self.length>>>0;if(!length)return-1;var i=length-1;for(arguments.length>1&&(i=Math.min(i,toInteger(arguments[1]))),i=i>=0?i:length-Math.abs(i);i>=0;i--)if(i in self&&sought===self[i])return i;return-1}),Object.getPrototypeOf||(Object.getPrototypeOf=function(object){return object.__proto__||(object.constructor?object.constructor.prototype:prototypeOfObject)}),!Object.getOwnPropertyDescriptor){var ERR_NON_OBJECT="Object.getOwnPropertyDescriptor called on a non-object: ";Object.getOwnPropertyDescriptor=function(object,property){if("object"!=typeof object&&"function"!=typeof object||null===object)throw new TypeError(ERR_NON_OBJECT+object);if(owns(object,property)){var descriptor,getter,setter;if(descriptor={enumerable:!0,configurable:!0},supportsAccessors){var prototype=object.__proto__;object.__proto__=prototypeOfObject;var getter=lookupGetter(object,property),setter=lookupSetter(object,property);if(object.__proto__=prototype,getter||setter)return getter&&(descriptor.get=getter),setter&&(descriptor.set=setter),descriptor}return descriptor.value=object[property],descriptor}}}if(Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(object){return Object.keys(object)}),!Object.create){var createEmpty;createEmpty=null===Object.prototype.__proto__?function(){return{__proto__:null}}:function(){var empty={};for(var i in empty)empty[i]=null;return empty.constructor=empty.hasOwnProperty=empty.propertyIsEnumerable=empty.isPrototypeOf=empty.toLocaleString=empty.toString=empty.valueOf=empty.__proto__=null,empty},Object.create=function(prototype,properties){var object;if(null===prototype)object=createEmpty();else{if("object"!=typeof prototype)throw new TypeError("typeof prototype["+typeof prototype+"] != \'object\'");var Type=function(){};Type.prototype=prototype,object=new Type,object.__proto__=prototype}return void 0!==properties&&Object.defineProperties(object,properties),object}}if(Object.defineProperty){var definePropertyWorksOnObject=doesDefinePropertyWork({}),definePropertyWorksOnDom="undefined"==typeof document||doesDefinePropertyWork(document.createElement("div"));if(!definePropertyWorksOnObject||!definePropertyWorksOnDom)var definePropertyFallback=Object.defineProperty}if(!Object.defineProperty||definePropertyFallback){var ERR_NON_OBJECT_DESCRIPTOR="Property description must be an object: ",ERR_NON_OBJECT_TARGET="Object.defineProperty called on non-object: ",ERR_ACCESSORS_NOT_SUPPORTED="getters & setters can not be defined on this javascript engine";Object.defineProperty=function(object,property,descriptor){if("object"!=typeof object&&"function"!=typeof object||null===object)throw new TypeError(ERR_NON_OBJECT_TARGET+object);if("object"!=typeof descriptor&&"function"!=typeof descriptor||null===descriptor)throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR+descriptor);if(definePropertyFallback)try{return definePropertyFallback.call(Object,object,property,descriptor)}catch(exception){}if(owns(descriptor,"value"))if(supportsAccessors&&(lookupGetter(object,property)||lookupSetter(object,property))){var prototype=object.__proto__;object.__proto__=prototypeOfObject,delete object[property],object[property]=descriptor.value,object.__proto__=prototype}else object[property]=descriptor.value;else{if(!supportsAccessors)throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);owns(descriptor,"get")&&defineGetter(object,property,descriptor.get),owns(descriptor,"set")&&defineSetter(object,property,descriptor.set)}return object}}Object.defineProperties||(Object.defineProperties=function(object,properties){for(var property in properties)owns(properties,property)&&Object.defineProperty(object,property,properties[property]);return object}),Object.seal||(Object.seal=function(object){return object}),Object.freeze||(Object.freeze=function(object){return object});try{Object.freeze(function(){})}catch(exception){Object.freeze=function(freezeObject){return function(object){return"function"==typeof object?object:freezeObject(object)}}(Object.freeze)}if(Object.preventExtensions||(Object.preventExtensions=function(object){return object}),Object.isSealed||(Object.isSealed=function(){return!1}),Object.isFrozen||(Object.isFrozen=function(){return!1}),Object.isExtensible||(Object.isExtensible=function(object){if(Object(object)===object)throw new TypeError;for(var name="";owns(object,name);)name+="?";object[name]=!0;var returnValue=owns(object,name);return delete object[name],returnValue}),!Object.keys){var hasDontEnumBug=!0,dontEnums=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],dontEnumsLength=dontEnums.length;for(var key in{toString:null})hasDontEnumBug=!1;Object.keys=function(object){if("object"!=typeof object&&"function"!=typeof object||null===object)throw new TypeError("Object.keys called on a non-object");var keys=[];for(var name in object)owns(object,name)&&keys.push(name);if(hasDontEnumBug)for(var i=0,ii=dontEnumsLength;ii>i;i++){var dontEnum=dontEnums[i];owns(object,dontEnum)&&keys.push(dontEnum)}return keys}}Date.now||(Date.now=function(){return(new Date).getTime()});var ws="\t\\n\x0B\\f\\r   ᠎             　\\u2028\\u2029\ufeff";if(!String.prototype.trim||ws.trim()){ws="["+ws+"]";var trimBeginRegexp=RegExp("^"+ws+ws+"*"),trimEndRegexp=RegExp(ws+ws+"*$");String.prototype.trim=function(){return(this+"").replace(trimBeginRegexp,"").replace(trimEndRegexp,"")}}var toObject=function(o){if(null==o)throw new TypeError("can\'t convert "+o+" to object");return Object(o)}});';
},function(e,t){ace.define("ace/theme/idle_fingers",["require","exports","module","ace/lib/dom"],function(e,t,n){t.isDark=!0,t.cssClass="ace-idle-fingers",t.cssText=".ace-idle-fingers .ace_gutter {\tbackground: #3b3b3b;\tcolor: rgb(153,153,153)\t}\t.ace-idle-fingers .ace_print-margin {\twidth: 1px;\tbackground: #3b3b3b\t}\t.ace-idle-fingers {\tbackground-color: #323232;\tcolor: #FFFFFF\t}\t.ace-idle-fingers .ace_cursor {\tcolor: #91FF00\t}\t.ace-idle-fingers .ace_marker-layer .ace_selection {\tbackground: rgba(90, 100, 126, 0.88)\t}\t.ace-idle-fingers.ace_multiselect .ace_selection.ace_start {\tbox-shadow: 0 0 3px 0px #323232;\t}\t.ace-idle-fingers .ace_marker-layer .ace_step {\tbackground: rgb(102, 82, 0)\t}\t.ace-idle-fingers .ace_marker-layer .ace_bracket {\tmargin: -1px 0 0 -1px;\tborder: 1px solid #404040\t}\t.ace-idle-fingers .ace_marker-layer .ace_active-line {\tbackground: #353637\t}\t.ace-idle-fingers .ace_gutter-active-line {\tbackground-color: #353637\t}\t.ace-idle-fingers .ace_marker-layer .ace_selected-word {\tborder: 1px solid rgba(90, 100, 126, 0.88)\t}\t.ace-idle-fingers .ace_invisible {\tcolor: #404040\t}\t.ace-idle-fingers .ace_keyword,\t.ace-idle-fingers .ace_meta {\tcolor: #CC7833\t}\t.ace-idle-fingers .ace_constant,\t.ace-idle-fingers .ace_constant.ace_character,\t.ace-idle-fingers .ace_constant.ace_character.ace_escape,\t.ace-idle-fingers .ace_constant.ace_other,\t.ace-idle-fingers .ace_support.ace_constant {\tcolor: #6C99BB\t}\t.ace-idle-fingers .ace_invalid {\tcolor: #FFFFFF;\tbackground-color: #FF0000\t}\t.ace-idle-fingers .ace_fold {\tbackground-color: #CC7833;\tborder-color: #FFFFFF\t}\t.ace-idle-fingers .ace_support.ace_function {\tcolor: #B83426\t}\t.ace-idle-fingers .ace_variable.ace_parameter {\tfont-style: italic\t}\t.ace-idle-fingers .ace_string {\tcolor: #A5C261\t}\t.ace-idle-fingers .ace_string.ace_regexp {\tcolor: #CCCC33\t}\t.ace-idle-fingers .ace_comment {\tfont-style: italic;\tcolor: #BC9458\t}\t.ace-idle-fingers .ace_meta.ace_tag {\tcolor: #FFE5BB\t}\t.ace-idle-fingers .ace_entity.ace_name {\tcolor: #FFC66D\t}\t.ace-idle-fingers .ace_collab.ace_user1 {\tcolor: #323232;\tbackground-color: #FFF980\t}\t.ace-idle-fingers .ace_indent-guide {\tbackground: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMwMjLyZYiPj/8PAAreAwAI1+g0AAAAAElFTkSuQmCC) right repeat-y\t}";var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass)})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(84),o=(r(i),n(99)),a=(r(o),n(106)),s=r(a),l=n(137),u=r(l),c=n(574),d=r(c),f=n(576),p=r(f),h=n(297),g=r(h),m=n(577),v=r(m);n(553),n(554);var b=p["default"].notificationStore,y=g["default"].Clipboard,w=v["default"].VelocityComponent,x=s["default"].createClass({displayName:"NotificationController",getInitialState:function(){return this.getStoreState()},getStoreState:function(){return{notificationCenterVisible:b.isNotificationCenterVisible(),notificationCenterFilter:b.getNotificationFilter(),notifications:b.getNotifications()}},componentDidMount:function(){b.on("change",this.onChange,this)},componentWillUnmount:function(){b.off("change",this.onChange)},onChange:function(){this.isMounted()&&this.setState(this.getStoreState())},render:function(){return s["default"].createElement("div",null,s["default"].createElement(E,{notifications:this.state.notifications}),s["default"].createElement(S,{visible:this.state.notificationCenterVisible,filter:this.state.notificationCenterFilter,notifications:this.state.notifications}))}}),E=s["default"].createClass({displayName:"GlobalNotifications",propTypes:{notifications:s["default"].PropTypes.array.isRequired},componentDidMount:function(){$(document).on("keydown.notificationClose",this.onKeyDown)},componentWillUnmount:function(){$(document).off("keydown.notificationClose",this.onKeyDown)},onKeyDown:function(e){var t=e.keyCode||e.which;27===t&&d["default"].hideAllVisibleNotifications()},getNotifications:function(){return this.props.notifications.length?_.map(this.props.notifications,function(e,t){if(e.visible)return s["default"].createElement(C,{notificationId:e.notificationId,isHiding:e.isHiding,key:t,msg:e.msg,type:e.type,escape:e.escape,onStartHide:d["default"].startHidingNotification,onHideComplete:d["default"].hideNotification})},this):null},render:function(){return s["default"].createElement("div",{id:"global-notifications"},this.getNotifications())}}),C=s["default"].createClass({displayName:"Notification",propTypes:{msg:s["default"].PropTypes.string.isRequired,onStartHide:s["default"].PropTypes.func.isRequired,onHideComplete:s["default"].PropTypes.func.isRequired,type:s["default"].PropTypes.oneOf(["error","info","success"]),escape:s["default"].PropTypes.bool,isHiding:s["default"].PropTypes.bool.isRequired,visibleTime:s["default"].PropTypes.number},getDefaultProps:function(){return{type:"info",visibleTime:8e3,escape:!0,slideInTime:200,slideOutTime:200}},componentWillUnmount:function(){this.timeout&&window.clearTimeout(this.timeout)},getInitialState:function(){return{animation:{opacity:0,minHeight:0}}},componentDidMount:function(){this.setState({animation:{opacity:this.props.isHiding?0:1,minHeight:this.props.isHiding?0:u["default"].findDOMNode(this.refs.notification).offsetHeight}}),this.timeout=setTimeout(function(){this.hide()}.bind(this),this.props.visibleTime)},componentDidUpdate:function(e){!e.isHiding&&this.props.isHiding&&this.setState({animation:{opacity:0,minHeight:0}})},getHeight:function(){return $(u["default"].findDOMNode(this)).outerHeight(!0)},hide:function(e){e&&e.preventDefault(),this.props.onStartHide(this.props.notificationId)},getMsg:function(){var e=this.props.escape?_.escape(this.props.msg):this.props.msg;return{__html:e}},onAnimationComplete:function(){this.props.isHiding&&this.props.onHideComplete(this.props.notificationId)},render:function(){var e={error:"fonticon-attention-circled",info:"fonticon-info-circled",success:"fonticon-ok-circled"};return s["default"].createElement(w,{animation:this.state.animation,runOnMount:!0,duration:this.props.slideInTime,complete:this.onAnimationComplete},s["default"].createElement("div",{className:"notification-wrapper"},s["default"].createElement("div",{className:"global-notification alert alert-"+this.props.type,ref:"notification"},s["default"].createElement("a",{"data-bypass":!0,href:"#",onClick:this.hide},s["default"].createElement("i",{className:"pull-right fonticon-cancel"})),s["default"].createElement("i",{className:"notification-icon "+e[this.props.type]}),s["default"].createElement("span",{dangerouslySetInnerHTML:this.getMsg()}))))}}),k=s["default"].createClass({displayName:"NotificationCenterButton",getInitialState:function(){return{visible:!0}},hide:function(){this.setState({visible:!1})},show:function(){this.setState({visible:!0})},render:function(){var e="fonticon fonticon-bell"+(this.state.visible?"":" hide");return s["default"].createElement("div",{className:e,onClick:d["default"].showNotificationCenter})}}),S=s["default"].createClass({displayName:"NotificationCenterPanel",propTypes:{visible:s["default"].PropTypes.bool.isRequired,filter:s["default"].PropTypes.string.isRequired,notifications:s["default"].PropTypes.array.isRequired},getNotifications:function(){return this.props.notifications.length?_.map(this.props.notifications,function(e){return s["default"].createElement(A,{isVisible:this.props.visible,item:e,filter:this.props.filter,key:e.notificationId})},this):s["default"].createElement("li",{className:"no-notifications"},"No notifications.")},render:function(){var e="notification-center-panel flex-layout flex-col";this.props.visible&&(e+=" visible");var t={all:"flex-body",success:"flex-body",error:"flex-body",info:"flex-body"};t[this.props.filter]+=" selected";var n="notification-page-mask"+(this.props.visible?" visible":"");return s["default"].createElement("div",{id:"notification-center"},s["default"].createElement("div",{className:e},s["default"].createElement("header",{className:"flex-layout flex-row"},s["default"].createElement("span",{className:"fonticon fonticon-bell"}),s["default"].createElement("h1",{className:"flex-body"},"Notifications"),s["default"].createElement("button",{type:"button",onClick:d["default"].hideNotificationCenter},"×")),s["default"].createElement("ul",{className:"notification-filter flex-layout flex-row"},s["default"].createElement("li",{className:t.all,title:"All notifications","data-filter":"all",onClick:d["default"].selectNotificationFilter.bind(this,"all")},"All"),s["default"].createElement("li",{className:t.success,title:"Success notifications","data-filter":"success",onClick:d["default"].selectNotificationFilter.bind(this,"success")},s["default"].createElement("span",{className:"fonticon fonticon-ok-circled"})),s["default"].createElement("li",{className:t.error,title:"Error notifications","data-filter":"error",onClick:d["default"].selectNotificationFilter.bind(this,"error")},s["default"].createElement("span",{className:"fonticon fonticon-attention-circled"})),s["default"].createElement("li",{className:t.info,title:"Info notifications","data-filter":"info",onClick:d["default"].selectNotificationFilter.bind(this,"info")},s["default"].createElement("span",{className:"fonticon fonticon-info-circled"}))),s["default"].createElement("div",{className:"flex-body"},s["default"].createElement("ul",{className:"notification-list"},this.getNotifications())),s["default"].createElement("footer",null,s["default"].createElement("input",{type:"button",value:"Clear All",className:"btn btn-small btn-info",onClick:d["default"].clearAllNotifications}))),s["default"].createElement("div",{className:n,onClick:d["default"].hideNotificationCenter}))}}),A=s["default"].createClass({displayName:"NotificationPanelRow",propTypes:{item:s["default"].PropTypes.object.isRequired,filter:s["default"].PropTypes.string.isRequired,transitionSpeed:s["default"].PropTypes.number},getDefaultProps:function(){return{transitionSpeed:300}},clearNotification:function(){var e=this.props.item.notificationId;this.hide(function(){d["default"].clearSingleNotification(e)})},componentDidMount:function(){this.setState({elementHeight:this.getHeight()})},componentDidUpdate:function(e){!e.isVisible&&this.props.isVisible&&this.setState({elementHeight:this.getHeight()});var t=!0;return"all"!==this.props.filter&&(t=this.props.item.type===this.props.filter),t?void $(u["default"].findDOMNode(this)).velocity({opacity:1,height:this.state.elementHeight},this.props.transitionSpeed):void this.hide()},getHeight:function(){return $(u["default"].findDOMNode(this)).outerHeight(!0)},hide:function(e){$(u["default"].findDOMNode(this)).velocity({opacity:0,height:0},this.props.transitionSpeed,function(){e&&e()})},render:function(){var e={success:"fonticon-ok-circled",error:"fonticon-attention-circled",info:"fonticon-info-circled"},t=this.props.item.time.fromNow(),n="fonticon "+e[this.props.item.type],r="all"!==this.props.filter&&this.props.filter!==this.props.item.type;return s["default"].createElement("li",{"aria-hidden":r},s["default"].createElement("div",{className:"flex-layout flex-row"},s["default"].createElement("span",{className:n}),s["default"].createElement("div",{className:"flex-body"},s["default"].createElement("p",null,this.props.item.cleanMsg),s["default"].createElement("div",{className:"notification-actions"},s["default"].createElement("span",{className:"time-elapsed"},t),s["default"].createElement("span",{className:"divider"},"|"),s["default"].createElement(y,{text:this.props.item.cleanMsg,displayType:"text"}))),s["default"].createElement("button",{type:"button",onClick:this.clearNotification},"×")))}});t["default"]={NotificationController:x,NotificationCenterButton:k,NotificationCenterPanel:S,NotificationPanelRow:A,Notification:C,renderNotificationController:function(e){return u["default"].render(s["default"].createElement(x,null),e)}}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){h["default"].dispatch({type:m["default"].ADD_NOTIFICATION,options:{info:e}})}function o(){h["default"].dispatch({type:m["default"].SHOW_NOTIFICATION_CENTER})}function a(){h["default"].dispatch({type:m["default"].HIDE_NOTIFICATION_CENTER})}function s(){h["default"].dispatch({type:m["default"].CLEAR_ALL_NOTIFICATIONS})}function l(e){h["default"].dispatch({type:m["default"].CLEAR_SINGLE_NOTIFICATION,options:{notificationId:e}})}function u(e){h["default"].dispatch({type:m["default"].SELECT_NOTIFICATION_FILTER,options:{filter:e}})}function c(e){h["default"].dispatch({type:m["default"].START_HIDING_NOTIFICATION,options:{notificationId:e}})}function d(e){h["default"].dispatch({type:m["default"].HIDE_NOTIFICATION,options:{notificationId:e}})}function f(){h["default"].dispatch({type:m["default"].HIDE_ALL_NOTIFICATIONS})}Object.defineProperty(t,"__esModule",{value:!0});var p=n(99),h=r(p),g=n(575),m=r(g);t["default"]={addNotification:i,showNotificationCenter:o,hideNotificationCenter:a,clearAllNotifications:s,clearSingleNotification:l,selectNotificationFilter:u,startHidingNotification:c,hideNotification:d,hideAllVisibleNotifications:f}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]={ADD_NOTIFICATION:"ADD_NOTIFICATION",SHOW_NOTIFICATION_CENTER:"SHOW_NOTIFICATION_CENTER",HIDE_NOTIFICATION_CENTER:"HIDE_NOTIFICATION_CENTER",CLEAR_SINGLE_NOTIFICATION:"CLEAR_SINGLE_NOTIFICATION",CLEAR_ALL_NOTIFICATIONS:"CLEAR_ALL_NOTIFICATIONS",SELECT_NOTIFICATION_FILTER:"SELECT_NOTIFICATION_FILTER",START_HIDING_NOTIFICATION:"START_HIDING_NOTIFICATION",HIDE_NOTIFICATION:"HIDE_NOTIFICATION",HIDE_ALL_NOTIFICATIONS:"HIDE_ALL_NOTIFICATIONS"}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(99),o=r(i),a=n(84),s=r(a),l=n(575),u=r(l),c=n(98),d=r(c),f={},p=0,h=["success","error","info"];f.NotificationStore=o["default"].Store.extend({initialize:function(){this.reset()},reset:function(){this._notifications=[],this._notificationCenterVisible=!1,this._selectedNotificationFilter="all"},isNotificationCenterVisible:function(){return this._notificationCenterVisible},addNotification:function(e){return _.isEmpty(e.type)||!_.contains(h,e.type)?void console.warn("Invalid message type: ",e):(e.notificationId=++p,e.cleanMsg=s["default"].utils.stripHTML(e.msg),e.time=(0,d["default"])(),e.visible=!0,e.isHiding=!1,e.clear&&this._notifications.forEach(function(e){e.visible&&(e.isHiding=!0)}),void this._notifications.unshift(e))},getNotifications:function(){return this._notifications},clearNotification:function(e){this._notifications=_.without(this._notifications,_.findWhere(this._notifications,{notificationId:e}))},clearNotifications:function(){this._notifications=[]},hideNotification:function(e){var t=_.findWhere(this._notifications,{notificationId:e});t.visible=!1,t.isHiding=!1},hideAllNotifications:function(){this._notifications.forEach(function(e){e.visible&&(e.isHiding=!0)})},startHidingNotification:function(e){var t=_.findWhere(this._notifications,{notificationId:e});t.isHiding=!0},getNotificationFilter:function(){return this._selectedNotificationFilter},setNotificationFilter:function(e){return!_.isEmpty(e)&&_.contains(h,e)||"all"===e?void(this._selectedNotificationFilter=e):void console.warn("Invalid notification filter: ",e)},dispatch:function(e){switch(e.type){case u["default"].ADD_NOTIFICATION:this.addNotification(e.options.info),this.triggerChange();break;case u["default"].CLEAR_ALL_NOTIFICATIONS:this.clearNotifications(),this.triggerChange();break;case u["default"].CLEAR_SINGLE_NOTIFICATION:this.clearNotification(e.options.notificationId);break;case u["default"].START_HIDING_NOTIFICATION:this.startHidingNotification(e.options.notificationId),this.triggerChange();break;case u["default"].HIDE_NOTIFICATION:this.hideNotification(e.options.notificationId),this.triggerChange();break;case u["default"].HIDE_ALL_NOTIFICATIONS:this.hideAllNotifications(),this.triggerChange();break;case u["default"].SHOW_NOTIFICATION_CENTER:this._notificationCenterVisible=!0,this.triggerChange();break;case u["default"].HIDE_NOTIFICATION_CENTER:this._notificationCenterVisible=!1,this.triggerChange();break;case u["default"].SELECT_NOTIFICATION_FILTER:this.setNotificationFilter(e.options.filter),this.triggerChange();break;default:return}}}),f.notificationStore=new f.NotificationStore,f.notificationStore.dispatchToken=o["default"].dispatcher.register(f.notificationStore.dispatch),t["default"]=f},function(e,t,n){e.exports={VelocityComponent:n(578),VelocityTransitionGroup:n(623),velocityHelpers:n(657)}},function(e,t,n){var r={isEqual:n(579),keys:n(586),omit:n(604)},i=n(106),o=n(137),a=n(622),s=i.createClass({displayName:"VelocityComponent",propTypes:{animation:i.PropTypes.any,children:i.PropTypes.element.isRequired,runOnMount:i.PropTypes.bool,targetQuerySelector:i.PropTypes.string},getDefaultProps:function(){return{animation:null,runOnMount:!1,targetQuerySelector:null}},componentDidMount:function(){this.runAnimation(),this.props.runOnMount!==!0&&this._finishAnimation()},componentWillUpdate:function(e,t){r.isEqual(e.animation,this.props.animation)||(this._stopAnimation(),this._scheduleAnimation())},componentWillUnmount:function(){this._stopAnimation()},runAnimation:function(e){if(e=e||{},this._shouldRunAnimation=!1,this.isMounted()&&null!=this.props.animation){e.stop?a(this._getDOMTarget(),"stop",!0):e.finish&&a(this._getDOMTarget(),"finishAll",!0);var t=r.omit(this.props,r.keys(this.constructor.propTypes));a(this._getDOMTarget(),this.props.animation,t)}},_scheduleAnimation:function(){this._shouldRunAnimation||(this._shouldRunAnimation=!0,setTimeout(this.runAnimation,0))},_getDOMTarget:function(){var e=o.findDOMNode(this);return"children"===this.props.targetQuerySelector?e.children:null!=this.props.targetQuerySelector?e.querySelectorAll(this.props.targetQuerySelector):e},_finishAnimation:function(){a(this._getDOMTarget(),"finishAll",!0)},_stopAnimation:function(){a(this._getDOMTarget(),"stop",!0)},render:function(){return this.props.children}});e.exports=s},function(e,t,n){function r(e,t,n,r){n="function"==typeof n?o(n,r,3):void 0;var a=n?n(e,t):void 0;return void 0===a?i(e,t,n):!!a}var i=n(580),o=n(602);e.exports=r},[900,581,590,591],function(e,t,n){function r(e,t,n,r,f,g,m){var v=s(e),b=s(t),y=c,w=c;v||(y=h.call(e),y==u?y=d:y!=d&&(v=l(e))),b||(w=h.call(t),w==u?w=d:w!=d&&(b=l(t)));var x=y==d,_=w==d,E=y==w;if(E&&!v&&!x)return o(e,t,y);if(!f){var C=x&&p.call(e,"__wrapped__"),k=_&&p.call(t,"__wrapped__");if(C||k)return n(C?e.value():e,k?t.value():t,r,f,g,m)}if(!E)return!1;g||(g=[]),m||(m=[]);for(var S=g.length;S--;)if(g[S]==e)return m[S]==t;g.push(e),m.push(t);var A=(v?i:a)(e,t,n,r,f,g,m);return g.pop(),m.pop(),A}var i=n(582),o=n(584),a=n(585),s=n(598),l=n(601),u="[object Arguments]",c="[object Array]",d="[object Object]",f=Object.prototype,p=f.hasOwnProperty,h=f.toString;e.exports=r},[901,583],419,420,[902,586],function(e,t,n){var r=n(587),i=n(592),o=n(590),a=n(596),s=r(Object,"keys"),l=s?function(e){var t=null==e?void 0:e.constructor;return"function"==typeof t&&t.prototype===e||"function"!=typeof e&&i(e)?a(e):o(e)?s(e):[]}:a;e.exports=l},[891,588],function(e,t,n){function r(e){return null!=e&&(i(e)?c.test(l.call(e)):o(e)&&a.test(e))}var i=n(589),o=n(591),a=/^\[object .+?Constructor\]$/,s=Object.prototype,l=Function.prototype.toString,u=s.hasOwnProperty,c=RegExp("^"+l.call(u).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=r},[892,590],392,394,[893,593,595],[894,594],function(e,t){function n(e){return function(t){return null==t?void 0:t[e]}}e.exports=n},404,function(e,t,n){function r(e){for(var t=l(e),n=t.length,r=n&&e.length,u=!!r&&s(r)&&(o(e)||i(e)),d=-1,f=[];++d<n;){var p=t[d];(u&&a(p,r)||c.call(e,p))&&f.push(p)}return f}var i=n(597),o=n(598),a=n(599),s=n(595),l=n(600),u=Object.prototype,c=u.hasOwnProperty;e.exports=r},[895,592,591],[896,587,595,591],408,function(e,t,n){function r(e){if(null==e)return[];l(e)||(e=Object(e));var t=e.length;t=t&&s(t)&&(o(e)||i(e))&&t||0;for(var n=e.constructor,r=-1,u="function"==typeof n&&n.prototype===e,d=Array(t),f=t>0;++r<t;)d[r]=r+"";for(var p in e)f&&a(p,t)||"constructor"==p&&(u||!c.call(e,p))||d.push(p);return d}var i=n(597),o=n(598),a=n(599),s=n(595),l=n(590),u=Object.prototype,c=u.hasOwnProperty;e.exports=r},[903,595,591],[910,603],434,[913,605,606,613,602,600,615,617,621],440,[914,607,609,610],[915,608],443,[916,590],[917,611,587],[918,612,587],[919,590],[920,614,597,598,592,591],449,[921,616],function(e,t,n){function r(e){return i(e)?e:Object(e)}var i=n(590);e.exports=r},[922,618],[923,619,600],[889,620],[890,616],453,function(e,t,n){if("undefined"!=typeof window){var r=window.jQuery||window.Zepto||window;e.exports=r.Velocity?r.Velocity:n(553)}else{var i=function(){};i.velocityReactServerShim=!0,e.exports=i}},function(e,t,n){var r={each:n(624),extend:n(631),forEach:n(625),isEqual:n(579),keys:n(586),omit:n(604),pluck:n(638)},i=n(106),o=n(137),a=n(656),s=n(622),l="undefined"!=typeof window&&(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){window.setTimeout(e,0)});l="undefined"!=typeof window&&l.bind(window);var u=i.createClass({displayName:"VelocityTransitionGroupChild",propTypes:{children:i.PropTypes.element.isRequired,willAppearFunc:i.PropTypes.func.isRequired,willEnterFunc:i.PropTypes.func.isRequired,willLeaveFunc:i.PropTypes.func.isRequired},componentWillAppear:function(e){this.props.willAppearFunc(o.findDOMNode(this),e)},componentWillEnter:function(e){this.props.willEnterFunc(o.findDOMNode(this),e)},componentWillLeave:function(e){this.props.willLeaveFunc(o.findDOMNode(this),e)},render:function(){return i.Children.only(this.props.children)}}),c=i.createClass({displayName:"VelocityTransitionGroup",statics:{disabledForTest:!1},propTypes:{runOnMount:i.PropTypes.bool,enter:i.PropTypes.any,leave:i.PropTypes.any,children:i.PropTypes.any,enterHideStyle:i.PropTypes.object,enterShowStyle:i.PropTypes.object},getDefaultProps:function(){return{runOnMount:!1,enter:null,leave:null,enterHideStyle:{display:"none"},enterShowStyle:{display:""}}},componentWillMount:function(){this._scheduled=!1,this._entering=[],this._leaving=[]},componentWillUnmount:function(){this._entering=[],this._leaving=[]},render:function(){var e=r.omit(this.props,r.keys(this.constructor.propTypes));return this.constructor.disabledForTest||s.velocityReactServerShim||(e.childFactory=this._wrapChild),i.createElement(a,e,this.props.children)},childWillAppear:function(e,t){if(this.props.runOnMount)this.childWillEnter(e,t);else{this._finishAnimation(e,this.props.enter);var n=this;window.setTimeout(function(){n.isMounted()&&t()},0)}},childWillEnter:function(e,t){this._shortCircuitAnimation(this.props.enter,t)||(this._finishAnimation(e,this.props.leave,{begin:void 0,complete:void 0}),r.forEach(this.props.enterHideStyle,function(t,n){s.CSS.setPropertyValue(e,n,t)}),this._entering.push({node:e,doneFn:t}),this._schedule())},childWillLeave:function(e,t){this._shortCircuitAnimation(this.props.leave,t)||(this._leaving.push({node:e,doneFn:t}),this._schedule())},_shortCircuitAnimation:function(e,t){return!(!document.hidden&&null!=this._parseAnimationProp(e).animation)&&(this.isMounted()&&t(),!0)},_schedule:function(){this._scheduled||(this._scheduled=!0,l(this._runAnimations))},_runAnimations:function(){this._scheduled=!1,this._runAnimation(!0,this._entering,this.props.enter),this._runAnimation(!1,this._leaving,this.props.leave),this._entering=[],this._leaving=[]},_parseAnimationProp:function(e){var t,n,i;return"string"==typeof e?(t=e,i=null,n={}):(t=null!=e?e.animation:null,i=null!=e?e.style:null,n=r.omit(e,"animation","style")),{animation:t,style:i,opts:n}},_runAnimation:function(e,t,n){if(this.isMounted()&&0!==t.length){var i=r.pluck(t,"node"),o=r.pluck(t,"doneFn"),a=this._parseAnimationProp(n),u=a.animation,c=a.style,d=a.opts;e&&(r.isEqual(this.props.enterShowStyle,{display:""})&&(/^(fade|slide)/.test(u)||/In$/.test(u))||(c=r.extend({},this.props.enterShowStyle,c))),null!=c&&r.each(c,function(e,t){s.hook(i,t,e)});var f=this,p=function(){f.isMounted()&&o.map(function(e){e()})};e?(p(),p=null):s(i,"stop");var h;if(p&&d.complete){var g=d.complete;h=function(){p(),g.apply(this,arguments)}}else h=p||d.complete;l(function(){s(i,u,r.extend({},d,{complete:h}))})}},_finishAnimation:function(e,t,n){var i=this._parseAnimationProp(t),o=i.animation,a=i.style,l=r.extend({},i.opts,n);null!=a&&r.each(a,function(t,n){s.hook(e,n,t)}),null!=o&&(s(e,o,l),s(e,"finishAll",!0))},_wrapChild:function(e){return i.createElement(u,{willAppearFunc:this.childWillAppear,willEnterFunc:this.childWillEnter,willLeaveFunc:this.childWillLeave},e)}});e.exports=c},function(e,t,n){e.exports=n(625)},function(e,t,n){var r=n(626),i=n(627),o=n(630),a=o(r,i);e.exports=a},410,[887,628,629],[888,619,586],[897,593,595,616],function(e,t,n){function r(e,t){return function(n,r,a){return"function"==typeof r&&void 0===a&&o(n)?e(n,r):t(n,i(r,a,3))}}var i=n(602),o=n(598);e.exports=r},function(e,t,n){e.exports=n(632)},function(e,t,n){var r=n(633),i=n(634),o=n(636),a=o(function(e,t,n){return n?r(e,t,n):i(e,t)});e.exports=a},function(e,t,n){function r(e,t,n){for(var r=-1,o=i(t),a=o.length;++r<a;){var s=o[r],l=e[s],u=n(l,t[s],s,e,t);(u===u?u===l:l!==l)&&(void 0!==l||s in e)||(e[s]=u)}return e}var i=n(586);e.exports=r},function(e,t,n){function r(e,t){return null==t?e:i(t,o(t),e)}var i=n(635),o=n(586);e.exports=r},function(e,t){function n(e,t,n){n||(n={});for(var r=-1,i=t.length;++r<i;){var o=t[r];n[o]=e[o]}return n}e.exports=n},function(e,t,n){function r(e){return a(function(t,n){var r=-1,a=null==t?0:n.length,s=a>2?n[a-2]:void 0,l=a>2?n[2]:void 0,u=a>1?n[a-1]:void 0;for("function"==typeof s?(s=i(s,u,5),a-=2):(s="function"==typeof u?u:void 0,a-=s?1:0),l&&o(n[0],n[1],l)&&(s=a<3?void 0:s,a=1);++r<a;){var c=n[r];c&&e(t,c,s)}return t})}var i=n(602),o=n(637),a=n(621);e.exports=r},function(e,t,n){function r(e,t,n){if(!a(n))return!1;var r=typeof t;if("number"==r?i(n)&&o(t,n.length):"string"==r&&t in n){var s=n[t];return e===e?e===s:s!==s}return!1}var i=n(592),o=n(599),a=n(590);e.exports=r},function(e,t,n){function r(e,t){return i(e,o(t))}var i=n(639),o=n(653);e.exports=r},function(e,t,n){function r(e,t,n){var r=s(e)?i:a;return t=o(t,n,3),r(e,t)}var i=n(605),o=n(640),a=n(655),s=n(598);e.exports=r},[898,641,646,602,603,653],function(e,t,n){function r(e){var t=o(e);if(1==t.length&&t[0][2]){var n=t[0][0],r=t[0][1];return function(e){return null!=e&&(e[n]===r&&(void 0!==r||n in a(e)))}}return function(e){return i(e,t)}}var i=n(642),o=n(643),a=n(616);e.exports=r},[899,580,616],[904,644,645],[905,590],[906,586,616],[907,647,580,648,598,649,644,650,616,651],function(e,t,n){function r(e,t,n){if(null!=e){void 0!==n&&n in i(e)&&(t=[n]);for(var r=0,o=t.length;null!=e&&r<o;)e=e[t[r++]];return r&&r==o?e:void 0}}var i=n(616);e.exports=r},428,[908,598,616],430,[909,652,598],432,[911,594,654,649],[912,647,651],function(e,t,n){function r(e,t){var n=-1,r=o(e)?Array(e.length):[];return i(e,function(e,i,o){r[++n]=t(e,i,o)}),r}var i=n(627),o=n(592);e.exports=r},function(e,t,n){e.exports=n(560)},function(e,t,n){function r(e,t){i.isObject(e)&&(t=e,e="");var n="VelocityHelper.animation."+a++ +e;if(o.velocityReactServerShim)return n;if(void 0===o.RegisterEffect)throw"Velocity.RegisterEffect not found. You need to require('velocity-animate/velocity.ui') at a top level for UI Pack.";return o.RegisterEffect(n,t),n}var i={isObject:n(590)},o=n(622),a=0;e.exports={registerEffect:r}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(84),o=(r(i),n(99)),a=r(o),s=n(106),l=r(s),u=n(137),c=r(u),d=n(659),f=r(d),p=n(661),h=r(p),g=f["default"].navBarStore,m=l["default"].createClass({displayName:"Footer",render:function(){var e=this.props.version;return e?l["default"].createElement("div",{className:"version-footer"},"Fauxton on "," ",l["default"].createElement("a",{href:"http://couchdb.apache.org/"},"Apache CouchDB")," "," v. ",e):null}}),v=l["default"].createClass({displayName:"Burger",render:function(){return l["default"].createElement("div",{className:"burger",onClick:this.props.toggleMenu},l["default"].createElement("div",null),l["default"].createElement("div",null),l["default"].createElement("div",null))}}),b=l["default"].createClass({displayName:"NavLink",render:function(){var e=this.props.link,t=this.props.active===e.title?"active":"";return l["default"].createElement("li",{"data-nav-name":e.title,className:t},l["default"].createElement("a",{href:e.href,target:e.target?"_blank":null,"data-bypass":e.target?"true":null},l["default"].createElement("i",{className:e.icon+" fonticon "}),l["default"].createElement("span",{dangerouslySetInnerHTML:{__html:e.title}})))}}),y=l["default"].createClass({displayName:"NavBar",getStoreState:function(){return{navLinks:g.getNavLinks(),bottomNavLinks:g.getBottomNavLinks(),footerNavLinks:g.getFooterNavLinks(),activeLink:g.getActiveLink(),version:g.getVersion(),isMinimized:g.isMinimized(),isNavBarVisible:g.isNavBarVisible()}},getInitialState:function(){return this.getStoreState()},createLinks:function(e){return _.map(e,function(e,t){return l["default"].createElement(b,{key:t,link:e,active:this.state.activeLink})},this)},onChange:function(){this.setState(this.getStoreState())},setMenuState:function(){$("body").toggleClass("closeMenu",this.state.isMinimized),a["default"].Events.trigger(a["default"].constants.EVENTS.NAVBAR_SIZE_CHANGED,this.state.isMinimized)},componentDidMount:function(){g.on("change",this.onChange,this),this.setMenuState()},componentDidUpdate:function(){this.setMenuState()},componentWillUnmount:function(){g.off("change",this.onChange)},toggleMenu:function(){h["default"].toggleNavbarMenu()},render:function(){if(!this.state.isNavBarVisible)return $("#primary-navbar").hide(),null;$("#primary-navbar").show();var e=this.createLinks(this.state.navLinks),t=this.createLinks(this.state.bottomNavLinks),n=this.createLinks(this.state.footerNavLinks);return l["default"].createElement("div",{className:"navbar"},l["default"].createElement(v,{toggleMenu:this.toggleMenu}),l["default"].createElement("nav",{id:"main_navigation"},l["default"].createElement("ul",{id:"nav-links",className:"nav"},e),l["default"].createElement("div",{id:"bottom-nav"},l["default"].createElement("ul",{id:"bottom-nav-links",className:"nav"},t))),l["default"].createElement("div",{id:"primary-nav-right-shadow"}),l["default"].createElement("div",{className:"bottom-container"},l["default"].createElement("div",{className:"brand"},l["default"].createElement("div",{className:"icon"},"Apache Fauxton")),l["default"].createElement(m,{version:this.state.version}),l["default"].createElement("div",{id:"footer-links"},l["default"].createElement("ul",{id:"footer-nav-links",className:"nav"},n))))}});t["default"]={renderNavBar:function(e){c["default"].render(l["default"].createElement(y,null),e)},NavBar:y,Burger:v}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(84),o=r(i),a=n(99),s=r(a),l=n(660),u=r(l),c={};c.NavBarStore=s["default"].Store.extend({initialize:function(){this.reset()},reset:function(){this._activeLink=null,this._version=null,this._navLinks=[],this._footerNavLinks=[],this._bottomNavLinks=[],this._navBarVisible=!0},isNavBarVisible:function(){return this._navBarVisible},showNavBar:function(){this._navBarVisible=!0},hideNavBar:function(){this._navBarVisible=!1},addLink:function(e){return e.top&&!e.bottomNav?void this._navLinks.unshift(e):e.top&&e.bottomNav?void this._bottomNavLinks.unshift(e):e.bottomNav?void this._bottomNavLinks.push(e):e.footerNav?void this._footerNavLinks.push(e):void this._navLinks.push(e);
},removeLink:function(e){var t=this.getLinkSection(e),n=0,r=_.filter(t,function(t){return t.id===e.id||(n++,!1)});r.length&&t.splice(n,1)},getNavLinks:function(){return this._navLinks},getBottomNavLinks:function(){return this._bottomNavLinks},getFooterNavLinks:function(){return this._footerNavLinks},toggleMenu:function(){o["default"].utils.localStorageSet(s["default"].constants.LOCAL_STORAGE.SIDEBAR_MINIMIZED,!this.isMinimized())},getLinkSection:function(e){var t=this._navLinks;return e.bottomNav&&(t=this._bottomNavLinks),e.footerNav&&(t=this._footerNavLinks),t},updateLink:function(e){var t=void 0,n=this.getLinkSection(e);t=_.find(n,function(t){return t.id===e.id}),t&&(t.title=e.title,t.href=e.href)},getVersion:function(){return this._version},setVersion:function(e){this._version=e},getActiveLink:function(){return this._activeLink},setActiveLink:function(e){this._activeLink=e},isMinimized:function d(){var d=o["default"].utils.localStorageGet(s["default"].constants.LOCAL_STORAGE.SIDEBAR_MINIMIZED);return!_.isUndefined(d)&&d},dispatch:function(e){switch(e.type){case u["default"].ADD_NAVBAR_LINK:this.addLink(e.link);break;case u["default"].TOGGLE_NAVBAR_MENU:this.toggleMenu();break;case u["default"].UPDATE_NAVBAR_LINK:this.updateLink(e.link);break;case u["default"].CLEAR_NAVBAR_LINK:this.reset();break;case u["default"].REMOVE_NAVBAR_LINK:this.removeLink(e.link);break;case u["default"].NAVBAR_SET_VERSION_INFO:this.setVersion(e.version);break;case u["default"].NAVBAR_ACTIVE_LINK:this.setActiveLink(e.name);break;case u["default"].NAVBAR_HIDE:this.hideNavBar();break;case u["default"].NAVBAR_SHOW:this.showNavBar();break;default:return}this.triggerChange()}}),c.navBarStore=new c.NavBarStore,c.navBarStore.dispatchToken=s["default"].dispatcher.register(c.navBarStore.dispatch),t["default"]=c},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]={ADD_NAVBAR_LINK:"ADD_NAVBAR_LINK",TOGGLE_NAVBAR_MENU:"TOGGLE_NAVBAR_MENU",UPDATE_NAVBAR_LINK:"UPDATE_NAVBAR_LINK",CLEAR_NAVBAR_LINK:"CLEAR_NAVBAR_LINK",REMOVE_NAVBAR_LINK:"REMOVE_NAVBAR_LINK",NAVBAR_SET_VERSION_INFO:"NAVBAR_SET_VERSION_INFO",NAVBAR_ACTIVE_LINK:"NAVBAR_ACTIVE_LINK",NAVBAR_HIDE:"NAVBAR_HIDE",NAVBAR_SHOW:"NAVBAR_SHOW"}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(84),o=(r(i),n(99)),a=r(o),s=n(660),l=r(s);t["default"]={toggleNavbarMenu:function(){a["default"].dispatch({type:l["default"].TOGGLE_NAVBAR_MENU})},addHeaderLink:function(e){a["default"].dispatch({type:l["default"].ADD_NAVBAR_LINK,link:e})},removeHeaderLink:function(e){a["default"].dispatch({type:l["default"].REMOVE_NAVBAR_LINK,link:e})},setNavbarVersionInfo:function(e){a["default"].dispatch({type:l["default"].NAVBAR_SET_VERSION_INFO,version:e})},setNavbarActiveLink:function(e){a["default"].dispatch({type:l["default"].NAVBAR_ACTIVE_LINK,name:e})},showNavBar:function(){a["default"].dispatch({type:l["default"].NAVBAR_SHOW})},hideNavBar:function(){a["default"].dispatch({type:l["default"].NAVBAR_HIDE})}}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){var t=e.length-1;return e.map(function(e,n){var r=[a["default"].createElement(u,{key:n},e.name)];return e.link&&(r=[a["default"].createElement(u,{key:n},a["default"].createElement("a",{className:"faux-header__breadcrumbs-link",href:e.link},e.name))]),e.name?(n<t&&r.push(a["default"].createElement(c,null)),r):r})}Object.defineProperty(t,"__esModule",{value:!0}),t.Breadcrumbs=void 0;var o=n(106),a=r(o),s=n(137),l=(r(s),t.Breadcrumbs=function(e){var t=e.crumbs;return a["default"].createElement("div",{className:"faux-header__breadcrumbs"},i(t))});l.propTypes={crumbs:a["default"].PropTypes.array.isRequired};var u=function(e){var t=e.children;return a["default"].createElement("div",{className:"faux-header__breadcrumbs-element"},t)},c=function(){return a["default"].createElement("div",{className:"fonticon-right-open faux-header__breadcrumbs-divider"})}},function(e,t,n){var r=n(664);"string"==typeof r&&(r=[[e.id,r,""]]);n(288)(r,{});r.locals&&(e.exports=r.locals)},function(e,t,n){t=e.exports=n(275)(),t.push([e.id,'.clearfix{*zoom:1}.clearfix:after,.clearfix:before{display:table;content:"";line-height:0}.clearfix:after{clear:both}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.input-block-level{display:block;width:100%;min-height:30px;box-sizing:border-box}.api-bar-tray{padding:16px 20px}.api-bar-tray input[type=text].text-field-to-copy{border-radius:5px 0 0 5px}.api-bar-tray .input-append.input-prepend{margin-bottom:0}.api-bar-tray .input-append.input-prepend .btn{background-color:#af2d24;color:#fff;margin-left:-1px;padding:10px 10px 9px;border:none;line-height:1.5em}.api-bar-tray .input-append.input-prepend .btn:hover,.api-bar-tray .input-append.input-prepend .zeroclipboard-is-hover{background-color:#cbcbcb}.api-bar-tray .input-append.input-prepend .icon-question-sign{margin-left:3px}.api-bar-tray:before{right:80px}.clipboard-copy-element i:before{margin-right:0}a.clipboard-copy-element:hover{text-decoration:none}',""])},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(666);var r={};r.initialize=function(){},t["default"]=r},function(e,t,n){var r=n(667);"string"==typeof r&&(r=[[e.id,r,""]]);n(288)(r,{});r.locals&&(e.exports=r.locals)},function(e,t,n){t=e.exports=n(275)(),t.push([e.id,'.header-control-box{color:#666;font-size:13px;line-height:33px;padding:12px 20px;height:64px;background-color:transparent;border:none;border-left:1px solid #ccc;text-decoration:none}.header-control-box .icon{font-size:20px}.header-control-box .icon:before{float:left;margin:10px 0 0}.header-control-box span{margin-left:6px}.header-control-box .icon.fontawesome:before{margin:6px 6px 0 0}.header-control-square{height:64px;width:64px;float:left}.header-control-square .icon:before{margin:0;float:none}.header-control-box:hover .icon,.header-control-box:hover span,.js-headerbar-togglebutton-selected .icon,.js-headerbar-togglebutton-selected span{color:#e33f3b}button.control-toggle-alternative-header{float:left;border-right:1px solid #ccc;border-left:none}button.control-toggle-alternative-header.js-headerbar-togglebutton-selected{border-right:none}.styled-select{width:200px}.styled-select label{margin:0}.styled-select select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#e6e6e6;border:1px solid #b3b3b3;width:200px;text-indent:4px;height:46px;padding-right:35px}.styled-select select:-moz-focusring{color:transparent;text-shadow:0 0 0 #000}.styled-select select::-ms-expand{display:none}.styled-select i{position:absolute;right:10px;top:12px;pointer-events:none}.clearfix{*zoom:1}.clearfix:after,.clearfix:before{display:table;content:"";line-height:0}.clearfix:after{clear:both}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.input-block-level{display:block;width:100%;min-height:30px;box-sizing:border-box}#doc-list{padding:30px 12px 0}#doc-list .custom-inputs{display:none}#doc-list div.doc-row{margin-bottom:20px}#doc-list div.doc-row .doc-item{vertical-align:top;position:relative;box-shadow:3px 4px 0 rgba(0,0,0,.3)}#doc-list div.doc-row .doc-item .doc-data,#doc-list div.doc-row .doc-item header{border-bottom:1px solid #2a2a2a;border-left:1px solid #000;border-right:1px solid #000}#doc-list div.doc-row .doc-item header{font-weight:700;position:relative;padding:20px;background-color:#3a3a3a;border-top:1px solid #000}#doc-list div.doc-row .doc-item header .header-doc-id{color:#e33f3b;margin-left:10px}#doc-list div.doc-row .doc-item header .fonticon-pencil,#doc-list div.doc-row .doc-item header .header-keylabel{color:#909090}#doc-list div.doc-row .doc-item header .doc-edit-symbol{top:-3px;position:relative}#doc-list div.doc-row .doc-item header .fonticon-pencil{font-size:20px}#doc-list div.doc-row .doc-item header .fonticon-pencil:hover{color:#e33f3b}.view #doc-list{padding-top:12px}.show-select #doc-list{padding:0 0 30px}.show-select #doc-list .custom-inputs{display:block;float:left}.show-select .checkbox.inline{padding-top:32px;padding-left:0}.show-select .checkbox.inline label{padding-left:23px}.show-select .checkbox-dummy{width:20px;height:20px;padding-left:23px;margin-right:15px}.show-select .doc-item{width:auto;overflow:hidden}.show-select label.label-checkbox-doclist{-webkit-user-select:none;height:1px;width:1px}.show-select input[type=checkbox]+label:before{background-color:#efefef;border:2px solid #999}.show-select input[type=checkbox]+label:hover:before{border:2px solid #ccc}.show-select input[type=checkbox]:checked+label:before{border:2px solid #000;background-color:#3a3a3a}.doc-content-truncated{background-color:#4d4d4d;color:#bbb;padding:10px;font-size:13px;margin:0}.loading-lines{display:block;width:80px;margin-left:auto;margin-right:auto}.loading-lines div{background-color:#e33f3b;width:10px;height:1px;float:left;animation:height-change .8s infinite linear;-webkit-animation:height-change .8s infinite linear}#line2{animation-delay:.1s;-webkit-animation-delay:.1s}#line2,#line3{margin-left:3px}#line3{animation-delay:.2s;-webkit-animation-delay:.2s}#line4{animation-delay:.3s;-webkit-animation-delay:.3s;margin-left:3px}@-webkit-keyframes height-change{0%{height:1px}50%{height:30px}to{height:1px}}@keyframes height-change{0%{height:1px}50%{height:30px}to{height:1px}}.zen-editor-icon{float:right;font-size:13px;margin-top:3px}.full-page-editor-modal-wrapper{position:fixed;padding:110px;top:0;right:0;bottom:0;left:0;margin:0;width:100%;z-index:1025}.full-page-editor-modal-wrapper.zen-theme-dark{background-color:#323232}.full-page-editor-modal-wrapper.zen-theme-light{background-color:#fff}.full-page-editor-modal-wrapper>div{height:100%}.full-page-editor-modal-wrapper>div.zen-mode-controls{height:96px}.full-page-editor-modal-wrapper .ace_editor{height:100%;font-size:15px;line-height:25px;background-color:inherit}.full-page-editor-modal-wrapper .ace_editor .ace_gutter,.full-page-editor-modal-wrapper .ace_editor .ace_gutter-active-line{background-color:inherit}.zen-theme-light .zen-mode-controls{color:#999}.zen-mode-controls{position:absolute;right:30px;top:30px;font-size:20px;color:#fff}.zen-mode-controls .tooltips,.zen-mode-controls .zen-mode-controls-wrapper{position:relative;float:left}.zen-mode-controls ul{float:right;list-style-type:none}.zen-mode-controls .tooltip{margin-right:20px;min-width:140px}.zen-mode-controls span{cursor:pointer;width:23px;height:23px;margin:10px;display:inline-block}html body .ace_editor .ace_marker-layer .ace_selection{background-color:rgba(29,151,215,.5)}#bulk-action-component-popover{font-size:13px}#bulk-action-component-popover i.icon{margin-right:10px}#bulk-action-component-popover ul{margin:inherit}#bulk-action-component-popover li{padding:14px 15px;line-height:0;cursor:pointer;list-style-type:none}#bulk-action-component-popover li.disabled{color:#ccc;cursor:default}#bulk-action-component-popover li.disabled:hover{background-color:inherit}#bulk-action-component-popover li:hover{background-color:#fbcece}#bulk-action-component-popover li:last-child{-webkit-border-bottom-right-radius:5px;-webkit-border-bottom-left-radius:5px;-moz-border-radius-bottomright:5px;-moz-border-radius-bottomleft:5px;border-bottom-right-radius:5px;border-bottom-left-radius:5px}#bulk-action-component-popover .popover-title{margin:-1px}#bulk-action-component-popover .popover{left:10px!important}#bulk-action-component-popover .popover .arrow{margin-left:-39px}#bulk-action-component-popover .popover-content{padding:0}.bulk-action-component{min-height:43px}.bulk-action-component button{height:26px;width:26px;background-color:#f2f2f2;border:1px solid #aaa;margin-left:7px}.bulk-action-component .fonticon-trash:before{font-size:12px;margin-left:2px;margin-top:1px}.bulk-action-component .separator{border-left:1px solid #aaa;margin:5px 0;height:15px}.bulk-action-component .bulk-action-component-selector-group .fonticon{font-size:8px;color:#505050;padding:3px 0}.bulk-action-component .bulk-action-component-panel{border:1px solid #aaa;position:relative;float:left}.bulk-action-component .bulk-action-component-panel input[type=checkbox]{margin:6px}.bulk-action-component .bulk-action-component-panel div.arrow-button{height:24px;width:24px;transform:rotate(90deg);cursor:pointer}.bulk-action-component .bulk-action-component-panel div.arrow-button i{margin-left:10px}ul.component-badgelist{margin:0;display:inline-block}ul.component-badgelist li{list-style-type:none;float:left;margin-left:5px}.modal .cancel-link{margin:0 15px;font-size:14px;color:#4d4d4d}.modal .cancel-link:hover{color:#af2d24;cursor:pointer}.component-tab-element-wrapper{margin-left:0;padding-left:0;margin-bottom:0;height:60px;background-color:#cbcbcb;padding-left:20px;overflow:hidden;width:100%;min-width:770px}.component-tab-list-element{list-style-type:none}.component-tab-element{background-color:#eee;margin-top:10px;margin-right:5px;margin-bottom:-1px;float:left;list-style-type:none;line-height:40px;transition:all .25s linear}.component-tab-element input{display:none}.component-tab-element label{margin-right:0;margin-bottom:0;line-height:25px;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.component-tab-element .tab-element-content{padding:8px 12px 12px}.component-tab-element .tab-element-indicator-wrapper{height:5px}.component-tab-element .tab-element-indicator{height:0;transition:all .25s linear}.component-tab-element.tab-element-checked .tab-element-indicator{height:5px;background-color:#af2d24}.component-tab-element.tab-element-checked{background-color:#fff}.component-tab-element.tab-element-checked .tab-element-content{font-weight:700}.component-tab-element:hover{background-color:#fff;color:#af2d24}.component-tab-element.tab-element-checked .tab-element-content:hover,.component-tab-element.tab-element-checked:hover{color:initial}.component-tab-element:hover .tab-element-indicator{height:5px;background-color:#af2d24}.header-left #header-dropdown-menu{top:0;height:64px;border-left:1px solid #ccc;padding:20px 0}.header-left #header-dropdown-menu .dropdown{font-size:20px}.header-left #header-dropdown-menu .dropdown .dropdown-toggle{padding:10px 16px;color:#555}.header-left #header-dropdown-menu .dropdown .dropdown-toggle:before{width:10px}.header-left #header-dropdown-menu .dropdown .dropdown-toggle:hover{color:#e33f3b}.header-left #header-dropdown-menu .dropdown-menu{left:-115px;top:34px}.faux-header__breadcrumbs{display:-ms-flexbox;display:flex}.faux-header__breadcrumbs-element{margin:0 4px;color:#333;padding:18px 10px;font-size:24px;text-shadow:none}.faux-header__breadcrumbs-link:hover{text-decoration:none;cursor:hand}.faux-header__breadcrumbs-divider{width:13px;padding-top:22px;font-size:20px}.faux-header__controlbox-backlink{border-right:1px solid #ccc;padding-left:10px;padding-right:2px}',""])},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(84),o=r(i),a=n(99),s=r(a),l=n(669),u=r(l);n(687),u["default"].initialize=function(){s["default"].addHeaderLink({href:"#/_all_dbs",title:"Databases",icon:"fonticon-database",className:"databases"})},u["default"].databaseUrl=function(e){var t=_.isObject(e)?e.id:e,n=o["default"].utils.safeURLName(t);return["/database/",n,"/_all_docs?limit="+u["default"].DocLimit].join("")},s["default"].registerUrls("changes",{server:function(e,t){return o["default"].host+"/"+e+"/_changes"+t},app:function(e,t){return"/database/"+e+"/_changes"+t},apiurl:function(e,t){return window.location.origin+"/"+e+"/_changes"+t}}),s["default"].registerUrls("allDBs",{app:function(){return"_all_dbs"}}),s["default"].registerUrls("databaseBaseURL",{server:function(e){return window.location.origin+"/"+e},app:function(e){return"/database/"+e}}),s["default"].registerUrls("permissions",{server:function(e){return o["default"].host+"/"+e+"/_security"},app:function(e){return"/database/"+e+"/permissions"},apiurl:function(e){return window.location.origin+"/"+e+"/_security"}}),t["default"]=u["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(84),o=(r(i),n(99)),a=r(o),s=n(670),l=r(s),u=n(674),c=r(u),d=n(677),f=r(d),p=a["default"].RouteObject.extend({layout:"one_pane",crumbs:[{name:"Databases"}],routes:{"":"allDatabases","index.html":"allDatabases","_all_dbs(:params)":"allDatabases"},roles:["fx_loggedIn"],selectedHeader:"Databases",disableLoader:!0,initialize:function(){this.databases=new l["default"].List},allDatabases:function(){c["default"].init(this.databases),this.setComponent("#right-header",f["default"].RightDatabasesHeader),this.setComponent("#dashboard-content",f["default"].DatabasesController),this.setComponent("#footer",f["default"].DatabasePagination)},apiUrl:function(){return[this.databases.url("apiurl"),this.databases.documentation()]}});l["default"].RouteObjects=[p],t["default"]=l["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(84),o=r(i),a=n(99),s=r(a),l=n(671),u=r(l),c=s["default"].addon();c.DocLimit=100,c.Model=s["default"].Model.extend({initialize:function(e){this.status=new c.Status({database:this})},documentation:function(){return s["default"].constants.DOC_URLS.ALL_DBS},buildAllDocs:function(e){return this.allDocs=new u["default"].AllDocs(null,{database:this,params:e}),this.allDocs},isNew:function(){return!1},isSystemDatabase:function(){return o["default"].utils.isSystemDatabase(this.id)},url:function(e){return"index"===e?"/database/"+this.safeID()+"/_all_docs":"web-index"===e?"#/database/"+this.safeID()+"/_all_docs?limit="+c.DocLimit:"apiurl"===e?window.location.origin+"/database/"+this.safeID()+"/_all_docs":"changes"===e?s["default"].urls("changes","app",this.safeID(),"?descending=true&limit=100&include_docs=true"):"changes-apiurl"===e?s["default"].urls("changes","apiurl",this.safeID(),"?descending=true&limit=100&include_docs=true"):"app"===e?"/database/"+this.safeID():o["default"].host+"/"+this.safeID()},safeName:function(){return o["default"].utils.safeURLName(this.get("name"))},safeID:function(){return o["default"].utils.safeURLName(this.id)},buildChanges:function(e){return e.limit||(e.limit=100),this.changes=new c.Changes({database:this,params:e}),this.changes}}),c.Changes=s["default"].Collection.extend({initialize:function(e){this.database=e.database,this.params=e.params},documentation:function(){return s["default"].constants.DOC_URLS.CHANGES},url:function(e){var t="";return this.params&&(t="?"+$.param(this.params)),e||(e="server"),s["default"].urls("changes",e,this.database.safeID(),t)},parse:function(e){return this.last_seq=e.last_seq,e.results}}),c.Status=s["default"].Model.extend({url:function(){return o["default"].host+"/"+this.database.safeID()},initialize:function(e){this.database=e.database,this.loadSuccess=!1},numDocs:function(){return this.get("doc_count")},numDeletedDocs:function(){return this.get("doc_del_count")},isGraveYard:function(){return this.numDeletedDocs()>this.numDocs()},updateSeq:function d(e){var d=this.get("update_seq");return e||"number"==typeof d?d:d?d[0]:0},dataSize:function(){return this.get("other")?this.get("other").data_size:this.get("data_size")?this.get("data_size"):this.get("disk_size")?this.get("disk_size"):0},parse:function(e){return this.loadSuccess=!0,e},hasDataSize:function(){return this.get("other")||this.get("data_size")||this.get("disk_size")}}),c.List=s["default"].Collection.extend({model:c.Model,documentation:function(){return s["default"].constants.DOC_URLS.ALL_DBS},getDatabaseNames:function(){return _.map(this.toArray(),function(e){return e.get("name")})},cache:{expires:60},url:function(e){return"apiurl"===e?window.location.origin+"/_all_dbs":o["default"].host+"/_all_dbs"},parse:function(e){return _.map(e,function(e){return{id:o["default"].utils.safeURLName(e),name:e}})},paginated:function(e,t){var n=(e-1)*t,r=e*t;return this.slice(n,r)}}),t["default"]=c},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(84),o=r(i),a=n(99),s=r(a),l=n(672),u=r(l),c=n(673),d=r(c);u["default"].UUID=s["default"].Model.extend({initialize:function(e){e=_.extend({count:1},e),this.count=e.count},url:function(){return o["default"].host+"/_uuids?count="+this.count},next:function(){return this.get("uuids").pop()}}),u["default"].QueryParams=function(){var e=function(e,t){var n=_.clone(e);return _.each(["startkey","endkey","key"],function(e){_.has(n,e)&&(n[e]=t(n[e]))}),n};return{parse:function(t){return e(t,JSON.parse)},stringify:function(t){return e(t,JSON.stringify)}}}(),u["default"].DdocInfo=s["default"].Model.extend({idAttribute:"_id",documentation:function(){return s["default"].constants.DOC_URLS.GENERAL},initialize:function(e,t){this.database=t.database},url:function(e){return e||(e="server"),s["default"].urls("designDocs",e,this.database.safeID(),this.safeID())},safeID:function(){var e=this.id.replace(/^_design\//,"");return"_design/"+o["default"].utils.safeURLName(e)}}),u["default"].MangoIndex=u["default"].Doc.extend({idAttribute:"ddoc",getId:function(){return this.id?this.id:"_all_docs"},isNew:function(){return!0},isDeletable:function(){return"special"!==this.get("type")},isBulkDeletable:function(){return this.isDeletable()},isFromView:function(){return!1},url:function(){var e=this.database.safeID();return s["default"].urls("mango","index-server",e)}}),u["default"].MangoIndexCollection=d["default"].extend({model:u["default"].MangoIndex,initialize:function(e,t){var n=s["default"].constants.MISC.DEFAULT_PAGE_SIZE;this.database=t.database,this.params=_.extend({limit:n},t.params)},collectionType:"MangoIndex",url:function(){return this.urlRef.apply(this,arguments)},updateSeq:function(){return!1},isEditable:function(){return!1},parse:function(e){return e.indexes},urlRef:function(e,t){var n=this.database.safeID(),r="";return e||(e="index-server"),s["default"].urls("mango",e,n,r)}}),u["default"].MangoDoc=u["default"].Doc.extend({isMangoDoc:function(){return!0}}),u["default"].MangoDocumentCollection=d["default"].extend({model:u["default"].MangoDoc,collectionType:"MangoDocumentCollection",initialize:function(e,t){var n=s["default"].constants.MISC.DEFAULT_PAGE_SIZE;this.database=t.database,this.params=_.extend({limit:n},t.params),this.paging=_.defaults(t.paging||{},{defaultParams:_.defaults({},t.params),hasNext:!1,hasPrevious:!1,params:{},pageSize:s["default"].constants.MISC.DEFAULT_PAGE_SIZE,direction:void 0}),this.paging.params=_.clone(this.paging.defaultParams)},url:function(){return this.urlRef.apply(this,arguments)},updateSeq:function(){return!1},isEditable:function(){return!0},setQuery:function(e){return this.query=e,this},pageSizeReset:function(e,t){var n=_.defaults(t||{},{fetch:!0});if(this.paging.direction=void 0,this.paging.pageSize=e,this.paging.params=this.paging.defaultParams,this.paging.params.limit=e,n.fetch)return this.fetch()},_iterate:function(e,t){_.defaults(t||{},{fetch:!0});return this.paging.params=this.calculateParams(this.paging.params,e,this.paging.pageSize),this.fetch()},getPaginatedQuery:function(){var e=JSON.parse(JSON.stringify(this.query));return!this.paging.direction&&this.paging.params.limit>0&&(this.paging.direction="fetch",this.paging.params.limit=this.paging.params.limit+1),e.limit||(e.limit=this.paging.params.limit),e.skip||(e.skip=this.paging.params.skip),e},fetch:function(){var e=this.urlRef(),t=s["default"].Deferred(),n=this.getPaginatedQuery();return $.ajax({type:"POST",url:e,contentType:"application/json",dataType:"json",data:JSON.stringify(n)}).then(function(e){this.handleResponse(e,t)}.bind(this)).fail(function(e){t.reject(e.responseJSON)}.bind(this)),t},parse:function(e){var t=e.docs;this.paging.hasNext=this.paging.hasPrevious=!1,this.viewMeta={total_rows:e.total_rows,offset:e.offset,update_seq:e.update_seq};var n=this.paging.defaultParams.skip||0;return this.paging.params.skip>n&&(this.paging.hasPrevious=!0),t.length===this.paging.pageSize+1&&(this.paging.hasNext=!0,t.pop(),this.viewMeta.total_rows=this.viewMeta.total_rows-1),t},handleResponse:function(e,t){var n=this.parse(e);this.reset(n),t.resolve()},urlRef:function(e){var t=this.database.safeID(),n="";return e||(e="query-server"),s["default"].urls("mango",e,t,n)}}),u["default"].NewDoc=u["default"].Doc.extend({fetch:function(){var e=new u["default"].UUID,t=this.deferred=$.Deferred(),n=this;return e.fetch().done(function(){n.set("_id",e.next()),t.resolve()}),t.promise()}}),u["default"].BulkDeleteDoc=s["default"].Model.extend({idAttribute:"_id"}),u["default"].BulkDeleteDocCollection=s["default"].Collection.extend({model:u["default"].BulkDeleteDoc,sync:function(){},initialize:function(e,t){this.databaseId=t.databaseId},url:function(){return o["default"].host+"/"+this.databaseId+"/_bulk_docs"},bulkDelete:function(){var e=this.createPayload(this.toJSON()),t=s["default"].Deferred(),n=this;return $.ajax({type:"POST",url:this.url(),contentType:"application/json",dataType:"json",data:JSON.stringify(e)}).then(function(e){n.handleResponse(e,t)}).fail(function(){var e=_.reduce(n.toArray(),function(e,t){return e.push(t.id),e},[]);n.trigger("error",e),t.reject(e)}),t},handleResponse:function(e,t){var n=_.reduce(e,function(e,t){return t.error&&e.errorIds.push(t.id),t.error||e.successIds.push(t.id),e},{errorIds:[],successIds:[]});this.removeDocuments(n.successIds),n.errorIds.length&&this.trigger("error",n.errorIds),_.isEmpty(n.successIds)?t.reject(n.errorIds):t.resolve(n),this.trigger("updated")},removeDocuments:function(e){var t=!1;_.each(e,function(e){/_design/.test(e)&&(t=!0),this.remove(this.get(e))},this),t&&s["default"].triggerRouteEvent("reloadDesignDocs"),this.trigger("removed",e)},createPayload:function(e){var t=e;return{docs:t}}}),u["default"].MangoBulkDeleteDocCollection=u["default"].BulkDeleteDocCollection.extend({url:function(){return o["default"].host+"/"+this.databaseId+"/_index/_bulk_delete"},createPayload:function(e){var t=e.filter(function(e){return"_all_docs"!==e._id}).map(function(e){return e._id});return{docids:t}}}),u["default"].IndexCollection=d["default"].extend({model:u["default"].Doc,documentation:function(){return s["default"].constants.DOC_URLS.GENERAL},initialize:function(e,t){this.database=t.database,this.params=_.extend({limit:20,reduce:!1},t.params),this.idxType="_view",this.view=t.view,this.design=t.design.replace("_design/",""),this.perPageLimit=t.perPageLimit||20,this.params.limit||(this.params.limit=this.perPageLimit)},isEditable:function(){return!this.params.reduce},urlRef:function(e,t){var n="";if(t)n=_.isEmpty(t)?"":"?"+$.param(t);else if(this.params){var r=u["default"].QueryParams.stringify(this.params);n="?"+$.param(r)}e||(e="server");var i=this.database.safeID(),a=o["default"].utils.safeURLName(this.design),l=o["default"].utils.safeURLName(this.view),c=s["default"].urls("view",e,i,a,l);return c+n},url:function(){return this.urlRef.apply(this,arguments)},totalRows:function(){return this.params.reduce?"unknown_reduce":this.viewMeta.total_rows||"unknown"},updateSeq:function(){return!!this.viewMeta&&(this.viewMeta.update_seq||!1)},simple:function(){var e=this.map(function(e){return{_id:e.id,key:e.get("key"),value:e.get("value")}});return new u["default"].IndexCollection(e,{database:this.database,params:this.params,view:this.view,design:this.design})},parse:function(e){e.rows;return this.endTime=(new Date).getTime(),this.requestDuration=this.endTime-this.startTime,d["default"].prototype.parse.apply(this,arguments)},buildAllDocs:function(){this.fetch()},fetch:function(){return this.startTime=(new Date).getTime(),d["default"].prototype.fetch.call(this)},allDocs:function(){return this.models},requestDurationInString:function(){var e,t,n,r,i,o=this.requestDuration;for(t=Math.floor(o/1e3),n=Math.floor(t/60),t=(t%60).toString(),t.length<2&&(t="0"+t),r=Math.floor(n/60).toString(),r.length<2&&(r="0"+r),n=(n%60).toString(),n.length<2&&(n="0"+n),i=r+":"+n+":"+t,e=(o%1e3).toString();e.length<3;)e="0"+e;return i+="."+e}}),t["default"]=u["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(84),o=r(i),a=n(99),s=r(a),l=n(673),u=r(l),c=s["default"].addon();c.Doc=s["default"].Model.extend({idAttribute:"_id",documentation:function(){return s["default"].constants.DOC_URLS.GENERAL},url:function(e){void 0===e&&(e="server");var t=this.safeID();t||(t="");var n=this.fetchConflicts?"?conflicts=true":"";return s["default"].urls("document",e,this.getDatabase().safeID(),t,n)},initialize:function(e,t){this.collection&&this.collection.database?this.database=this.collection.database:t.database&&(this.database=t.database),t.fetchConflicts&&(this.fetchConflicts=!0)},getDatabase:function(){return this.database?this.database:this.collection.database},validate:function(e,t){if(this.id&&this.id!==e._id&&this.get("_rev"))return"Cannot change a documents id."},docType:function(){return o["default"].utils.getDocTypeFromId(this.id)},isBulkDeletable:function(){return!!this.id&&!!this.get("_rev")},isDeletable:function(){return!!this.id},isFromView:function(){return!this.id},isMangoDoc:function(){return!!this.isDdoc()&&("query"===this.get("language")||!(!this.get("doc")||"query"!==this.get("doc").language))},isDdoc:function(){return"design doc"===this.docType()},setDdocView:function(e,t,n){if(!this.isDdoc())return!1;var r=this.get("views"),i=r[e]||{};return n?i.reduce=n:delete i.reduce,i.map=t,r[e]=i,this.set({views:r}),!0},removeDdocView:function(e){if(!this.isDdoc())return!1;var t=this.get("views");delete t[e],this.set({views:t})},dDocModel:function(){if(!this.isDdoc())return!1;var e=this.get("doc");return e?(e._rev=this.get("_rev"),new c.Doc(e,{database:this.database})):this},safeID:function(){return o["default"].utils.getSafeIdForDoc(this.id)},destroy:function(){var e=this.url()+"?rev="+this.get("_rev");return $.ajax({url:e,dataType:"json",type:"DELETE"})},parse:function(e){return e.rev&&(e._rev=e.rev,delete e.rev),e.id&&_.isUndefined(this.id)&&(e._id=e.id),e.ok&&(delete e.id,delete e.ok),e},prettyJSON:function(){var e=this.get("doc")?this.get("doc"):this.attributes;return JSON.stringify(e,null,"  ")},copy:function(e){return $.ajax({type:"COPY",url:"/"+this.database.safeID()+"/"+this.safeID(),headers:{Destination:e}})},isNewDoc:function(){return!this.get("_rev")}}),c.AllDocs=u["default"].extend({model:c.Doc,documentation:function(){return s["default"].constants.DOC_URLS.GENERAL},initialize:function(e,t){this.viewMeta=t.viewMeta,this.database=t.database,this.params=_.clone(t.params),this.on("remove",this.decrementTotalRows,this),this.perPageLimit=t.perPageLimit||20,this.params.limit||(this.params.limit=this.perPageLimit)},isEditable:function(){return!0},urlRef:function(e,t){var n="";return t?n=_.isEmpty(t)?"":"?"+$.param(t):this.params&&(n="?"+$.param(this.params)),_.isUndefined(e)&&(e="server"),s["default"].urls("allDocs",e,this.database.safeID(),n)},url:function(){return this.urlRef.apply(this,arguments)},simple:function(){var e=this.map(function(e){return{_id:e.id,_rev:e.get("_rev")}});return new c.AllDocs(e,{database:this.database,params:this.params})},totalRows:function(){return this.viewMeta.total_rows||"unknown"},decrementTotalRows:function(){this.viewMeta.total_rows&&(this.viewMeta.total_rows=this.viewMeta.total_rows-1,this.trigger("totalRows:decrement"))},updateSeq:function(){return!!this.viewMeta&&(this.viewMeta.update_seq||!1)},parse:function(e){var t=e.rows,n=_.filter(t,function(e){return e.value});return e.rows=_.map(n,function(e){var t={_id:e.id,_rev:e.value.rev,value:e.value,key:e.key};return e.doc&&(t.doc=e.doc),t}),u["default"].prototype.parse.call(this,e);
},clone:function(){return new this.constructor(this.models,{database:this.database,params:this.params,paging:this.paging})}}),t["default"]=c},function(e,t,n){var r,i;!function(o,a){"use strict";r=[n(89),n(91),n(86)],i=function(e,t,n){return a(o,null,e,t,n.param)}.apply(t,r),!(void 0!==i&&(e.exports=i))}(void 0,function(e,t,n,r,i){"use strict";var o=r.Collection.extend({constructor:function(){r.Collection.apply(this,arguments),this.configure.apply(this,arguments)},configure:function(e,t){var r=n.result(this,"url").split("?")[1]||"";this.paging=n.defaults(t.paging||{},{defaultParams:n.defaults({},t.params,this._parseQueryString(r)),hasNext:!1,hasPrevious:!1,params:{},pageSize:20,direction:void 0}),this.paging.params=n.clone(this.paging.defaultParams),this.updateUrlQuery(this.paging.defaultParams)},calculateParams:function(e,t,r){var i=n.clone(e);return i.skip=(parseInt(e.skip,10)||0)+t,this.paging.defaultParams.limit&&(i.limit=Math.min(this.paging.defaultParams.limit,i.limit)),i.limit=r+1,i.skip=Math.max(i.skip,0),i},pageSizeReset:function(e,t){var r=n.defaults(t||{},{fetch:!0});if(this.paging.direction=void 0,this.paging.pageSize=e,this.paging.params=this.paging.defaultParams,this.paging.params.limit=e,this.updateUrlQuery(this.paging.params),r.fetch)return this.fetch()},_parseQueryString:function(e){var t=decodeURI(e).split(/&/);return n.reduce(t,function(e,t){var n=t.split(/=/);return 2===n.length&&(e[n[0]]=n[1]),e},{})},_iterate:function(e,t){var r=n.defaults(t||{},{fetch:!0});if(this.paging.params=this.calculateParams(this.paging.params,e,this.paging.pageSize),this.updateUrlQuery(this.paging.params),r.fetch)return this.fetch({reset:!0})},next:function(e){return this.paging.direction="next",this._iterate(this.paging.pageSize,e)},previous:function(e){return this.paging.direction="previous",this._iterate(0-this.paging.pageSize,e)},shouldStringify:function(e){try{return JSON.parse(e),!1}catch(t){return!0}},updateUrlQuery:function(e){var t=n.result(this,"url").split("?")[0];n.each(["startkey","endkey","key"],function(t){n.has(e,t)&&this.shouldStringify(e[t])&&(e[t]=JSON.stringify(e[t]))},this),this.url=t+"?"+i(e)},fetch:function(){return!this.paging.direction&&this.paging.params.limit>0&&(this.paging.direction="fetch",this.paging.params.limit=this.paging.params.limit+1,this.updateUrlQuery(this.paging.params)),r.Collection.prototype.fetch.apply(this,arguments)},parse:function(e){var t=e.rows;this.paging.hasNext=this.paging.hasPrevious=!1,this.viewMeta={total_rows:e.total_rows,offset:e.offset,update_seq:e.update_seq};var n=this.paging.defaultParams.skip||0;return this.paging.params.skip>n&&(this.paging.hasPrevious=!0),t.length===this.paging.pageSize+1&&(this.paging.hasNext=!0,t.pop(),this.viewMeta.total_rows=this.viewMeta.total_rows-1),t},hasNext:function(){return this.paging.hasNext},hasPrevious:function(){return this.paging.hasPrevious}});return t&&(t.setAjax=function(e){r.ajax=e},t.PagingCollection=o),o})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(84),o=r(i),a=n(99),s=r(a),l=n(675),u=r(l),c=n(676),d=r(c),f=n(670),p=r(f);t["default"]={init:function(e){var t=o["default"].getParams(),n=t.page?parseInt(t.page,10):1,r=s["default"].constants.MISC.DEFAULT_PAGE_SIZE;this.setStartLoading(),s["default"].when(e.fetch({cache:!1})).then(function(){e.paginated(n,r).length||s["default"].dispatch({type:d["default"].DATABASES_INIT,options:{collection:[],backboneCollection:e,page:n}});var t=0;_.each(e.paginated(n,r),function(i){i.status.fetchOnce().always(function(){t++,t<e.paginated(n,r).length||s["default"].dispatch({type:d["default"].DATABASES_INIT,options:{collection:e.paginated(n,r),backboneCollection:e,page:n}})})})}.bind(this))},setPage:function(e){s["default"].dispatch({type:d["default"].DATABASES_SETPAGE,options:{page:e}})},setStartLoading:function(){s["default"].dispatch({type:d["default"].DATABASES_STARTLOADING})},setLoadComplete:function(){s["default"].dispatch({type:d["default"].DATABASES_LOADCOMPLETE})},createNewDatabase:function(e){if(_.isNull(e)||0===e.trim().length)return void s["default"].addNotification({msg:"Please enter a valid database name",type:"error",clear:!0});e=e.trim(),s["default"].dispatch({type:d["default"].DATABASES_SET_PROMPT_VISIBLE,options:{visible:!1}});var t=u["default"].databasesStore.obtainNewDatabaseModel(e);s["default"].addNotification({msg:"Creating database."}),t.save().done(function(){s["default"].addNotification({msg:"Database created successfully",type:"success",clear:!0});var t=s["default"].urls("allDocs","app",o["default"].utils.safeURLName(e),"?limit="+p["default"].DocLimit);o["default"].router.navigate(t,{trigger:!0})}).error(function(e){var t=JSON.parse(e.responseText).reason;s["default"].addNotification({msg:"Create database failed: "+t,type:"error",clear:!0})})},jumpToDatabase:function(e){if(!_.isNull(e)&&0!==e.trim().length){if(e=e.trim(),u["default"].databasesStore.doesDatabaseExist(e)){var t=s["default"].urls("allDocs","app",o["default"].utils.safeURLName(e),"");return setTimeout(function(){s["default"].navigate(t)})}s["default"].addNotification({msg:"Database does not exist.",type:"error"})}}}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(84),o=(r(i),n(99)),a=r(o),s=n(676),l=r(s),u=n(670),c=(r(u),a["default"].Store.extend({initialize:function(){this.reset()},reset:function(){this._collection=new Backbone.Collection,this._loading=!1,this._promptVisible=!1},init:function(e,t){this._collection=e,this._backboneCollection=t},setPage:function(e){this._page=e},getPage:function(){return this._page?this._page:1},isLoading:function(){return this._loading},setLoading:function(e){this._loading=e},isPromptVisible:function(){return this._promptVisible},setPromptVisible:function(e){this._promptVisible=e},obtainNewDatabaseModel:function(e,t){return new this._backboneCollection.model({id:e,name:e})},getCollection:function(){return this._collection},getDatabaseNames:function(){return this._backboneCollection&&this._backboneCollection.length?this._backboneCollection.toJSON().map(function(e,t){return e.name}):[]},getDatabaseNamesForDropDown:function(){return this.getDatabaseNames().map(function(e){return{value:e,label:e}})},doesDatabaseExist:function(e){return this.getDatabaseNames().indexOf(e)>=0},dispatch:function(e){switch(e.type){case l["default"].DATABASES_INIT:this.init(e.options.collection,e.options.backboneCollection),this.setPage(e.options.page),this.setLoading(!1);break;case l["default"].DATABASES_SETPAGE:this.setPage(e.options.page);break;case l["default"].DATABASES_SET_PROMPT_VISIBLE:this.setPromptVisible(e.options.visible);break;case l["default"].DATABASES_STARTLOADING:this.setLoading(!0);break;case l["default"].DATABASES_LOADCOMPLETE:this.setLoading(!1);break;default:return}this.triggerChange()}})),d=new c;d.dispatchToken=a["default"].dispatcher.register(d.dispatch.bind(d)),t["default"]={databasesStore:d}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]={DATABASES_INIT:"DATABASES_INIT",DATABASES_SETPAGE:"DATABASES_SETPAGE",DATABASES_SET_PROMPT_VISIBLE:"DATABASES_SET_PROMPT_VISIBLE",DATABASES_STARTLOADING:"DATABASES_STARTLOADING",DATABASES_LOADCOMPLETE:"DATABASES_LOADCOMPLETE"}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(84),u=r(l),c=n(99),d=r(c),f=n(106),p=r(f),h=n(137),g=r(h),m=n(293),v=r(m),b=n(294),y=r(b),w=n(296),x=r(w),E=n(297),C=r(E),k=n(675),S=r(k),A=n(670),T=(r(A),n(674)),D=r(T),N=n(94),F=r(N),M=n(678),O=r(M),L=v["default"].ToggleHeaderButton,P=S["default"].databasesStore,I=y["default"].deleteDbModalStore,R=v["default"].DeleteDatabaseModal,B=p["default"].createClass({displayName:"DatabasesController",getStoreState:function(){return{collection:P.getCollection(),loading:P.isLoading(),showDeleteDatabaseModal:I.getShowDeleteDatabaseModal()}},getInitialState:function(){return this.getStoreState()},componentDidMount:function(){P.on("change",this.onChange,this),I.on("change",this.onChange,this)},componentWillUnmount:function(){P.off("change",this.onChange,this),I.off("change",this.onChange,this)},onChange:function(){this.isMounted()&&this.setState(this.getStoreState())},render:function(){var e=this.state.collection,t=this.state.loading;return p["default"].createElement(j,{showDeleteDatabaseModal:this.state.showDeleteDatabaseModal,body:e,loading:t})}}),j=p["default"].createClass({displayName:"DatabaseTable",createRows:function(){return _.map(this.props.body,function(e,t){return p["default"].createElement(V,{row:e,key:t})})},getExtensionColumns:function(){var e=d["default"].getExtensions("DatabaseTable:head");return _.map(e,function(e,t){return p["default"].createElement(e,{key:t})})},showDeleteDatabaseModal:function(e){x["default"].showDeleteDatabaseModal({showDeleteModal:!this.props.showDeleteDatabaseModal.showDeleteModal})},render:function(){if(this.props.loading)return p["default"].createElement("div",{className:"view"},p["default"].createElement(v["default"].LoadLines,null));var e=this.createRows();return p["default"].createElement("div",{className:"view"},p["default"].createElement(R,{showHide:this.showDeleteDatabaseModal,modalProps:this.props.showDeleteDatabaseModal}),p["default"].createElement("table",{className:"table table-striped fauxton-table-list databases"},p["default"].createElement("thead",null,p["default"].createElement("tr",null,p["default"].createElement("th",null,"Name"),p["default"].createElement("th",null,"Size"),p["default"].createElement("th",null,"# of Docs"),p["default"].createElement("th",null,"Update Seq"),this.getExtensionColumns(),p["default"].createElement("th",null,"Actions"))),p["default"].createElement("tbody",null,e)))}}),V=p["default"].createClass({displayName:"DatabaseRow",propTypes:{row:p["default"].PropTypes.object},renderGraveyard:function(e){return e.status.isGraveYard()?p["default"].createElement(U,{row:e}):null},getExtensionColumns:function(e){var t=d["default"].getExtensions("DatabaseTable:databaseRow");return _.map(t,function(t,n){return p["default"].createElement(t,{row:e,key:n})})},showDeleteDatabaseModal:function(e){x["default"].showDeleteDatabaseModal({showDeleteModal:!0,dbId:e})},render:function(){var e=this.props.row;if(!e||!e.get)return p["default"].createElement("span",null);var t=e.get("name");if(!e.status.loadSuccess)return p["default"].createElement("tr",null,p["default"].createElement("td",null,t),p["default"].createElement("td",{colSpan:"4",className:"database-load-fail"},"This database failed to load."));var n=u["default"].utils.safeURLName(t),r=F["default"].formatSize(e.status.dataSize());return p["default"].createElement("tr",null,p["default"].createElement("td",null,p["default"].createElement("a",{href:"#/database/"+n+"/_all_docs"},t)),p["default"].createElement("td",null,r),p["default"].createElement("td",null,e.status.numDocs()," ",this.renderGraveyard(e)),p["default"].createElement("td",null,e.status.updateSeq()),this.getExtensionColumns(e),p["default"].createElement("td",{className:"database-actions"},p["default"].createElement("a",{className:"db-actions btn fonticon-replicate set-replication-start",title:"Replicate "+t,href:"#/replication/"+n}),p["default"].createElement("a",{className:"db-actions btn icon-lock set-permissions",title:"Set permissions for "+t,href:"#/database/"+n+"/permissions"}),p["default"].createElement("a",{className:"db-actions btn icon-trash",onClick:this.showDeleteDatabaseModal.bind(this,t),title:"Delete "+t,"data-bypass":"true"})))}}),U=p["default"].createClass({displayName:"GraveyardInfo",componentDidMount:function(){$(g["default"].findDOMNode(this.refs.myself)).tooltip()},render:function(){var e=this.props.row,t="This database has just "+e.status.numDocs()+" docs and "+e.status.numDeletedDocs()+" deleted docs";return p["default"].createElement("i",{className:"js-db-graveyard icon icon-exclamation-sign",ref:"myself",title:t})}}),W=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state=n.getStoreState(),n}return a(t,e),s(t,[{key:"getStoreState",value:function(){return{databaseList:P.getDatabaseNamesForDropDown()}}},{key:"componentDidMount",value:function(){P.on("change",this.onChange,this)}},{key:"componentWillUnmount",value:function(){P.off("change",this.onChange)}},{key:"onChange",value:function(){this.setState(this.getStoreState())}},{key:"render",value:function(){var e=this.state.databaseList;return p["default"].createElement("div",{className:"header-right right-db-header flex-layout flex-row"},p["default"].createElement(H,{databaseList:e}),p["default"].createElement(q,null))}}]),t}(p["default"].Component),q=p["default"].createClass({displayName:"AddDatabaseWidget",onTrayToggle:function(e){e.preventDefault(),this.setState({isPromptVisible:!this.state.isPromptVisible}),this.refs.newDbTray.toggle(function(e){e&&g["default"].findDOMNode(this.refs.newDbName).focus()}.bind(this))},onKeyUpInInput:function(e){13===e.which&&this.onAddDatabase()},getInitialState:function(){return{isPromptVisible:!1}},onAddDatabase:function(){var e=g["default"].findDOMNode(this.refs.newDbName).value;D["default"].createNewDatabase(e)},render:function(){var e="header-control-box add-new-database-btn";return p["default"].createElement("div",null,p["default"].createElement(L,{selected:this.state.isPromptVisible,toggleCallback:this.onTrayToggle,containerClasses:e,title:"Create Database",fonticon:"fonticon-new-database",text:"Create Database"}),p["default"].createElement(C["default"].Tray,{ref:"newDbTray",className:"new-database-tray"},p["default"].createElement("span",{className:"add-on"},"Create Database"),p["default"].createElement("input",{id:"js-new-database-name",type:"text",onKeyUp:this.onKeyUpInInput,ref:"newDbName",className:"input-xxlarge",placeholder:"Name of database"}),p["default"].createElement("a",{className:"btn",id:"js-create-database",onClick:this.onAddDatabase},"Create")))}}),H=function(e){var t=e.databaseList;return p["default"].createElement("div",{"data-name":"jump-to-db",className:"faux-header__searchboxwrapper"},p["default"].createElement("div",{className:"faux-header__searchboxcontainer"},p["default"].createElement(O["default"],{placeholder:"Database name",options:t,clearable:!1,onChange:function(e){var t=e.value;D["default"].jumpToDatabase(t)}})))};H.propTypes={databaseList:p["default"].PropTypes.array.isRequired};var z=p["default"].createClass({displayName:"DatabasePagination",getDefaultProps:function(){return{linkPath:"_all_dbs"}},getStoreState:function(){return{databaseNames:P.getDatabaseNames(),page:P.getPage()}},getInitialState:function(){return this.getStoreState()},componentDidMount:function(){P.on("change",this.onChange,this)},componentWillUnmount:function(){P.off("change",this.onChange,this)},onChange:function(){this.setState(this.getStoreState())},render:function(){var e=this.state.page,t=this.props.total||this.state.databaseNames.length,n="#/"+this.props.linkPath+"?page=",r=1+(e-1)*d["default"].constants.MISC.DEFAULT_PAGE_SIZE,i=Math.min(t,e*d["default"].constants.MISC.DEFAULT_PAGE_SIZE);return p["default"].createElement("footer",{className:"all-db-footer pagination-footer"},p["default"].createElement("div",{id:"database-pagination"},p["default"].createElement(C["default"].Pagination,{page:e,total:t,urlPrefix:n})),p["default"].createElement("div",{className:"current-databases"},"Showing ",r,"–",i," of ",t," databases."))}});t["default"]={DatabasesController:B,DatabaseTable:j,DatabaseRow:V,RightDatabasesHeader:W,GraveyardInfo:U,AddDatabaseWidget:q,JumpToDatabaseWidget:H,DatabasePagination:z}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e){return"string"==typeof e?e:"object"==typeof e?JSON.stringify(e):e||0===e?String(e):""}Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l=n(106),u=r(l),c=n(137),d=r(c),f=n(679),p=r(f),h=n(335),g=r(h),m=n(680),v=r(m),b=n(682),y=r(b),w=n(683),x=r(w),_=n(684),E=r(_),C=n(685),k=r(C),S=n(686),A=r(S),T=u["default"].PropTypes.oneOfType([u["default"].PropTypes.string,u["default"].PropTypes.node]),D=1,N=u["default"].createClass({displayName:"Select",propTypes:{addLabelText:u["default"].PropTypes.string,"aria-label":u["default"].PropTypes.string,"aria-labelledby":u["default"].PropTypes.string,autoBlur:u["default"].PropTypes.bool,autofocus:u["default"].PropTypes.bool,autosize:u["default"].PropTypes.bool,backspaceRemoves:u["default"].PropTypes.bool,backspaceToRemoveMessage:u["default"].PropTypes.string,className:u["default"].PropTypes.string,clearAllText:T,clearValueText:T,clearable:u["default"].PropTypes.bool,delimiter:u["default"].PropTypes.string,disabled:u["default"].PropTypes.bool,escapeClearsValue:u["default"].PropTypes.bool,filterOption:u["default"].PropTypes.func,filterOptions:u["default"].PropTypes.any,ignoreAccents:u["default"].PropTypes.bool,ignoreCase:u["default"].PropTypes.bool,inputProps:u["default"].PropTypes.object,inputRenderer:u["default"].PropTypes.func,instanceId:u["default"].PropTypes.string,isLoading:u["default"].PropTypes.bool,joinValues:u["default"].PropTypes.bool,labelKey:u["default"].PropTypes.string,matchPos:u["default"].PropTypes.string,matchProp:u["default"].PropTypes.string,menuBuffer:u["default"].PropTypes.number,menuContainerStyle:u["default"].PropTypes.object,menuRenderer:u["default"].PropTypes.func,menuStyle:u["default"].PropTypes.object,multi:u["default"].PropTypes.bool,name:u["default"].PropTypes.string,noResultsText:T,onBlur:u["default"].PropTypes.func,onBlurResetsInput:u["default"].PropTypes.bool,onChange:u["default"].PropTypes.func,onClose:u["default"].PropTypes.func,onCloseResetsInput:u["default"].PropTypes.bool,onFocus:u["default"].PropTypes.func,onInputChange:u["default"].PropTypes.func,onInputKeyDown:u["default"].PropTypes.func,onMenuScrollToBottom:u["default"].PropTypes.func,onOpen:u["default"].PropTypes.func,onValueClick:u["default"].PropTypes.func,openAfterFocus:u["default"].PropTypes.bool,openOnFocus:u["default"].PropTypes.bool,optionClassName:u["default"].PropTypes.string,optionComponent:u["default"].PropTypes.func,optionRenderer:u["default"].PropTypes.func,options:u["default"].PropTypes.array,pageSize:u["default"].PropTypes.number,placeholder:T,required:u["default"].PropTypes.bool,resetValue:u["default"].PropTypes.any,scrollMenuIntoView:u["default"].PropTypes.bool,searchable:u["default"].PropTypes.bool,simpleValue:u["default"].PropTypes.bool,style:u["default"].PropTypes.object,tabIndex:u["default"].PropTypes.string,tabSelectsValue:u["default"].PropTypes.bool,value:u["default"].PropTypes.any,valueComponent:u["default"].PropTypes.func,valueKey:u["default"].PropTypes.string,valueRenderer:u["default"].PropTypes.func,wrapperStyle:u["default"].PropTypes.object},statics:{Async:x["default"],Creatable:E["default"]},getDefaultProps:function(){return{addLabelText:'Add "{label}"?',autosize:!0,backspaceRemoves:!0,backspaceToRemoveMessage:"Press backspace to remove {label}",clearable:!0,clearAllText:"Clear all",clearValueText:"Clear value",delimiter:",",disabled:!1,escapeClearsValue:!0,filterOptions:v["default"],ignoreAccents:!0,ignoreCase:!0,inputProps:{},isLoading:!1,joinValues:!1,labelKey:"label",matchPos:"any",matchProp:"any",menuBuffer:0,menuRenderer:y["default"],multi:!1,noResultsText:"No results found",onBlurResetsInput:!0,onCloseResetsInput:!0,openAfterFocus:!1,optionComponent:k["default"],pageSize:5,placeholder:"Select...",required:!1,scrollMenuIntoView:!0,searchable:!0,simpleValue:!1,tabSelectsValue:!0,valueComponent:A["default"],valueKey:"value"}},getInitialState:function(){return{inputValue:"",isFocused:!1,isOpen:!1,isPseudoFocused:!1,required:!1}},componentWillMount:function(){this._instancePrefix="react-select-"+(this.props.instanceId||++D)+"-";var e=this.getValueArray(this.props.value);this.props.required&&this.setState({required:this.handleRequired(e[0],this.props.multi)})},componentDidMount:function(){this.props.autofocus&&this.focus()},componentWillReceiveProps:function(e){var t=this.getValueArray(e.value,e);e.required&&this.setState({required:this.handleRequired(t[0],e.multi)})},componentWillUpdate:function(e,t){if(t.isOpen!==this.state.isOpen){this.toggleTouchOutsideEvent(t.isOpen);var n=t.isOpen?e.onOpen:e.onClose;n&&n()}},componentDidUpdate:function(e,t){if(this.menu&&this.focused&&this.state.isOpen&&!this.hasScrolledToOption){var n=d["default"].findDOMNode(this.focused),r=d["default"].findDOMNode(this.menu);r.scrollTop=n.offsetTop,this.hasScrolledToOption=!0}else this.state.isOpen||(this.hasScrolledToOption=!1);if(this._scrollToFocusedOptionOnUpdate&&this.focused&&this.menu){this._scrollToFocusedOptionOnUpdate=!1;var i=d["default"].findDOMNode(this.focused),o=d["default"].findDOMNode(this.menu),a=i.getBoundingClientRect(),s=o.getBoundingClientRect();(a.bottom>s.bottom||a.top<s.top)&&(o.scrollTop=i.offsetTop+i.clientHeight-o.offsetHeight)}if(this.props.scrollMenuIntoView&&this.menuContainer){var l=this.menuContainer.getBoundingClientRect();window.innerHeight<l.bottom+this.props.menuBuffer&&window.scrollBy(0,l.bottom+this.props.menuBuffer-window.innerHeight)}e.disabled!==this.props.disabled&&(this.setState({isFocused:!1}),this.closeMenu())},componentWillUnmount:function(){document.removeEventListener("touchstart",this.handleTouchOutside)},toggleTouchOutsideEvent:function(e){e?document.addEventListener("touchstart",this.handleTouchOutside):document.removeEventListener("touchstart",this.handleTouchOutside)},handleTouchOutside:function(e){this.wrapper&&!this.wrapper.contains(e.target)&&this.closeMenu()},focus:function(){this.input&&(this.input.focus(),this.props.openAfterFocus&&this.setState({isOpen:!0}))},blurInput:function(){this.input&&this.input.blur()},handleTouchMove:function(e){this.dragging=!0},handleTouchStart:function(e){this.dragging=!1},handleTouchEnd:function(e){this.dragging||this.handleMouseDown(e)},handleTouchEndClearValue:function(e){this.dragging||this.clearValue(e)},handleMouseDown:function(e){if(!(this.props.disabled||"mousedown"===e.type&&0!==e.button)&&"INPUT"!==e.target.tagName){if(e.stopPropagation(),e.preventDefault(),!this.props.searchable)return this.focus(),this.setState({isOpen:!this.state.isOpen});if(this.state.isFocused){this.focus();var t=this.input;"function"==typeof t.getInput&&(t=t.getInput()),t.value="",this.setState({isOpen:!0,isPseudoFocused:!1})}else this._openAfterFocus=!0,this.focus()}},handleMouseDownOnArrow:function(e){this.props.disabled||"mousedown"===e.type&&0!==e.button||this.state.isOpen&&(e.stopPropagation(),e.preventDefault(),this.closeMenu())},handleMouseDownOnMenu:function(e){this.props.disabled||"mousedown"===e.type&&0!==e.button||(e.stopPropagation(),e.preventDefault(),this._openAfterFocus=!0,this.focus())},closeMenu:function(){this.props.onCloseResetsInput?this.setState({isOpen:!1,isPseudoFocused:this.state.isFocused&&!this.props.multi,inputValue:""}):this.setState({isOpen:!1,isPseudoFocused:this.state.isFocused&&!this.props.multi,inputValue:this.state.inputValue}),this.hasScrolledToOption=!1},handleInputFocus:function(e){var t=this.state.isOpen||this._openAfterFocus||this.props.openOnFocus;this.props.onFocus&&this.props.onFocus(e),this.setState({isFocused:!0,isOpen:t}),this._openAfterFocus=!1},handleInputBlur:function(e){if(this.menu&&(this.menu===document.activeElement||this.menu.contains(document.activeElement)))return void this.focus();this.props.onBlur&&this.props.onBlur(e);var t={isFocused:!1,isOpen:!1,isPseudoFocused:!1};this.props.onBlurResetsInput&&(t.inputValue=""),this.setState(t)},handleInputChange:function(e){var t=e.target.value;if(this.state.inputValue!==e.target.value&&this.props.onInputChange){var n=this.props.onInputChange(t);null!=n&&"object"!=typeof n&&(t=""+n)}this.setState({isOpen:!0,isPseudoFocused:!1,inputValue:t})},handleKeyDown:function(e){if(!(this.props.disabled||"function"==typeof this.props.onInputKeyDown&&(this.props.onInputKeyDown(e),e.defaultPrevented))){switch(e.keyCode){case 8:return void(!this.state.inputValue&&this.props.backspaceRemoves&&(e.preventDefault(),this.popValue()));case 9:if(e.shiftKey||!this.state.isOpen||!this.props.tabSelectsValue)return;return void this.selectFocusedOption();case 13:if(!this.state.isOpen)return;e.stopPropagation(),this.selectFocusedOption();break;case 27:this.state.isOpen?(this.closeMenu(),e.stopPropagation()):this.props.clearable&&this.props.escapeClearsValue&&(this.clearValue(e),e.stopPropagation());break;case 38:this.focusPreviousOption();break;case 40:this.focusNextOption();break;case 33:this.focusPageUpOption();break;case 34:this.focusPageDownOption();break;case 35:this.focusEndOption();break;case 36:this.focusStartOption();break;default:return}e.preventDefault()}},handleValueClick:function(e,t){this.props.onValueClick&&this.props.onValueClick(e,t)},handleMenuScroll:function(e){if(this.props.onMenuScrollToBottom){var t=e.target;t.scrollHeight>t.offsetHeight&&!(t.scrollHeight-t.offsetHeight-t.scrollTop)&&this.props.onMenuScrollToBottom()}},handleRequired:function(e,t){return!e||(t?0===e.length:0===Object.keys(e).length)},getOptionLabel:function(e){return e[this.props.labelKey]},getValueArray:function(e,t){var n=this,r="object"==typeof t?t:this.props;if(r.multi){if("string"==typeof e&&(e=e.split(r.delimiter)),!Array.isArray(e)){if(null===e||void 0===e)return[];e=[e]}return e.map(function(e){return n.expandValue(e,r)}).filter(function(e){return e})}var i=this.expandValue(e,r);return i?[i]:[]},expandValue:function(e,t){if("string"!=typeof e&&"number"!=typeof e)return e;var n=t.options,r=t.valueKey;if(n)for(var i=0;i<n.length;i++)if(n[i][r]===e)return n[i]},setValue:function(e){var t=this;if(this.props.autoBlur&&this.blurInput(),this.props.onChange){if(this.props.required){var n=this.handleRequired(e,this.props.multi);this.setState({required:n})}this.props.simpleValue&&e&&(e=this.props.multi?e.map(function(e){return e[t.props.valueKey]}).join(this.props.delimiter):e[this.props.valueKey]),this.props.onChange(e)}},selectValue:function(e){var t=this;this.hasScrolledToOption=!1,this.props.multi?this.setState({inputValue:"",focusedIndex:null},function(){t.addValue(e)}):this.setState({isOpen:!1,inputValue:"",isPseudoFocused:this.state.isFocused},function(){t.setValue(e)})},addValue:function(e){var t=this.getValueArray(this.props.value);this.setValue(t.concat(e))},popValue:function(){var e=this.getValueArray(this.props.value);e.length&&e[e.length-1].clearableValue!==!1&&this.setValue(e.slice(0,e.length-1))},removeValue:function(e){var t=this.getValueArray(this.props.value);this.setValue(t.filter(function(t){return t!==e})),this.focus()},clearValue:function(e){e&&"mousedown"===e.type&&0!==e.button||(e.stopPropagation(),e.preventDefault(),this.setValue(this.getResetValue()),this.setState({isOpen:!1,inputValue:""},this.focus))},getResetValue:function(){return void 0!==this.props.resetValue?this.props.resetValue:this.props.multi?[]:null},focusOption:function(e){this.setState({focusedOption:e})},focusNextOption:function(){this.focusAdjacentOption("next")},focusPreviousOption:function(){this.focusAdjacentOption("previous")},focusPageUpOption:function(){this.focusAdjacentOption("page_up")},focusPageDownOption:function(){this.focusAdjacentOption("page_down")},focusStartOption:function(){this.focusAdjacentOption("start")},focusEndOption:function(){this.focusAdjacentOption("end")},focusAdjacentOption:function(e){var t=this._visibleOptions.map(function(e,t){return{option:e,index:t}}).filter(function(e){return!e.option.disabled});if(this._scrollToFocusedOptionOnUpdate=!0,!this.state.isOpen)return void this.setState({isOpen:!0,inputValue:"",focusedOption:this._focusedOption||t["next"===e?0:t.length-1].option});if(t.length){for(var n=-1,r=0;r<t.length;r++)if(this._focusedOption===t[r].option){n=r;break}if("next"===e&&n!==-1)n=(n+1)%t.length;else if("previous"===e)n>0?n-=1:n=t.length-1;else if("start"===e)n=0;else if("end"===e)n=t.length-1;else if("page_up"===e){var i=n-this.props.pageSize;n=i<0?0:i}else if("page_down"===e){var i=n+this.props.pageSize;n=i>t.length-1?t.length-1:i}n===-1&&(n=0),this.setState({focusedIndex:t[n].index,focusedOption:t[n].option})}},getFocusedOption:function(){return this._focusedOption},getInputValue:function(){return this.state.inputValue},selectFocusedOption:function(){if(this._focusedOption)return this.selectValue(this._focusedOption)},renderLoading:function(){if(this.props.isLoading)return u["default"].createElement("span",{className:"Select-loading-zone","aria-hidden":"true"},u["default"].createElement("span",{className:"Select-loading"}))},renderValue:function(e,t){var n=this,r=this.props.valueRenderer||this.getOptionLabel,i=this.props.valueComponent;if(!e.length)return this.state.inputValue?null:u["default"].createElement("div",{className:"Select-placeholder"},this.props.placeholder);var o=this.props.onValueClick?this.handleValueClick:null;return this.props.multi?e.map(function(e,t){return u["default"].createElement(i,{id:n._instancePrefix+"-value-"+t,instancePrefix:n._instancePrefix,disabled:n.props.disabled||e.clearableValue===!1,key:"value-"+t+"-"+e[n.props.valueKey],onClick:o,onRemove:n.removeValue,value:e},r(e,t),u["default"].createElement("span",{className:"Select-aria-only"}," "))}):this.state.inputValue?void 0:(t&&(o=null),u["default"].createElement(i,{id:this._instancePrefix+"-value-item",disabled:this.props.disabled,instancePrefix:this._instancePrefix,onClick:o,value:e[0]},r(e[0])))},renderInput:function(e,t){var n=this;if(this.props.inputRenderer)return this.props.inputRenderer();var r,a=(0,g["default"])("Select-input",this.props.inputProps.className),l=!!this.state.isOpen,c=(0,g["default"])((r={},o(r,this._instancePrefix+"-list",l),o(r,this._instancePrefix+"-backspace-remove-message",this.props.multi&&!this.props.disabled&&this.state.isFocused&&!this.state.inputValue),r)),d=s({},this.props.inputProps,{role:"combobox","aria-expanded":""+l,"aria-owns":c,"aria-haspopup":""+l,"aria-activedescendant":l?this._instancePrefix+"-option-"+t:this._instancePrefix+"-value","aria-labelledby":this.props["aria-labelledby"],"aria-label":this.props["aria-label"],className:a,tabIndex:this.props.tabIndex,onBlur:this.handleInputBlur,onChange:this.handleInputChange,onFocus:this.handleInputFocus,ref:function(e){return n.input=e},required:this.state.required,value:this.state.inputValue});if(this.props.disabled||!this.props.searchable){var f=this.props.inputProps,h=(f.inputClassName,i(f,["inputClassName"]));return u["default"].createElement("div",s({},h,{role:"combobox","aria-expanded":l,"aria-owns":l?this._instancePrefix+"-list":this._instancePrefix+"-value",
"aria-activedescendant":l?this._instancePrefix+"-option-"+t:this._instancePrefix+"-value",className:a,tabIndex:this.props.tabIndex||0,onBlur:this.handleInputBlur,onFocus:this.handleInputFocus,ref:function(e){return n.input=e},"aria-readonly":""+!!this.props.disabled,style:{border:0,width:1,display:"inline-block"}}))}return this.props.autosize?u["default"].createElement(p["default"],s({},d,{minWidth:"5px"})):u["default"].createElement("div",{className:a},u["default"].createElement("input",d))},renderClear:function(){if(this.props.clearable&&this.props.value&&0!==this.props.value&&(!this.props.multi||this.props.value.length)&&!this.props.disabled&&!this.props.isLoading)return u["default"].createElement("span",{className:"Select-clear-zone",title:this.props.multi?this.props.clearAllText:this.props.clearValueText,"aria-label":this.props.multi?this.props.clearAllText:this.props.clearValueText,onMouseDown:this.clearValue,onTouchStart:this.handleTouchStart,onTouchMove:this.handleTouchMove,onTouchEnd:this.handleTouchEndClearValue},u["default"].createElement("span",{className:"Select-clear",dangerouslySetInnerHTML:{__html:"&times;"}}))},renderArrow:function(){return u["default"].createElement("span",{className:"Select-arrow-zone",onMouseDown:this.handleMouseDownOnArrow},u["default"].createElement("span",{className:"Select-arrow",onMouseDown:this.handleMouseDownOnArrow}))},filterOptions:function F(e){var t=this.state.inputValue,n=this.props.options||[];if(this.props.filterOptions){var F="function"==typeof this.props.filterOptions?this.props.filterOptions:v["default"];return F(n,t,e,{filterOption:this.props.filterOption,ignoreAccents:this.props.ignoreAccents,ignoreCase:this.props.ignoreCase,labelKey:this.props.labelKey,matchPos:this.props.matchPos,matchProp:this.props.matchProp,valueKey:this.props.valueKey})}return n},renderMenu:function(e,t,n){return e&&e.length?this.props.menuRenderer({focusedOption:n,focusOption:this.focusOption,instancePrefix:this._instancePrefix,labelKey:this.props.labelKey,onFocus:this.focusOption,onSelect:this.selectValue,optionClassName:this.props.optionClassName,optionComponent:this.props.optionComponent,optionRenderer:this.props.optionRenderer||this.getOptionLabel,options:e,selectValue:this.selectValue,valueArray:t,valueKey:this.props.valueKey}):this.props.noResultsText?u["default"].createElement("div",{className:"Select-noresults"},this.props.noResultsText):null},renderHiddenField:function(e){var t=this;if(this.props.name){if(this.props.joinValues){var n=e.map(function(e){return a(e[t.props.valueKey])}).join(this.props.delimiter);return u["default"].createElement("input",{type:"hidden",ref:function(e){return t.value=e},name:this.props.name,value:n,disabled:this.props.disabled})}return e.map(function(e,n){return u["default"].createElement("input",{key:"hidden."+n,type:"hidden",ref:"value"+n,name:t.props.name,value:a(e[t.props.valueKey]),disabled:t.props.disabled})})}},getFocusableOptionIndex:function(e){var t=this._visibleOptions;if(!t.length)return null;var n=this.state.focusedOption||e;if(n&&!n.disabled){var r=t.indexOf(n);if(r!==-1)return r}for(var i=0;i<t.length;i++)if(!t[i].disabled)return i;return null},renderOuter:function(e,t,n){var r=this,i=this.renderMenu(e,t,n);return i?u["default"].createElement("div",{ref:function(e){return r.menuContainer=e},className:"Select-menu-outer",style:this.props.menuContainerStyle},u["default"].createElement("div",{ref:function(e){return r.menu=e},role:"listbox",className:"Select-menu",id:this._instancePrefix+"-list",style:this.props.menuStyle,onScroll:this.handleMenuScroll,onMouseDown:this.handleMouseDownOnMenu},i)):null},render:function(){var e=this,t=this.getValueArray(this.props.value),n=this._visibleOptions=this.filterOptions(this.props.multi?this.getValueArray(this.props.value):null),r=this.state.isOpen;this.props.multi&&!n.length&&t.length&&!this.state.inputValue&&(r=!1);var i=this.getFocusableOptionIndex(t[0]),o=null;o=null!==i?this._focusedOption=n[i]:this._focusedOption=null;var a=(0,g["default"])("Select",this.props.className,{"Select--multi":this.props.multi,"Select--single":!this.props.multi,"is-disabled":this.props.disabled,"is-focused":this.state.isFocused,"is-loading":this.props.isLoading,"is-open":r,"is-pseudo-focused":this.state.isPseudoFocused,"is-searchable":this.props.searchable,"has-value":t.length}),s=null;return this.props.multi&&!this.props.disabled&&t.length&&!this.state.inputValue&&this.state.isFocused&&this.props.backspaceRemoves&&(s=u["default"].createElement("span",{id:this._instancePrefix+"-backspace-remove-message",className:"Select-aria-only","aria-live":"assertive"},this.props.backspaceToRemoveMessage.replace("{label}",t[t.length-1][this.props.labelKey]))),u["default"].createElement("div",{ref:function(t){return e.wrapper=t},className:a,style:this.props.wrapperStyle},this.renderHiddenField(t),u["default"].createElement("div",{ref:function(t){return e.control=t},className:"Select-control",style:this.props.style,onKeyDown:this.handleKeyDown,onMouseDown:this.handleMouseDown,onTouchEnd:this.handleTouchEnd,onTouchStart:this.handleTouchStart,onTouchMove:this.handleTouchMove},u["default"].createElement("span",{className:"Select-multi-value-wrapper",id:this._instancePrefix+"-value"},this.renderValue(t,r),this.renderInput(t,i)),s,this.renderLoading(),this.renderClear(),this.renderArrow()),r?this.renderOuter(n,this.props.multi?null:t,o):null)}});t["default"]=N,e.exports=t["default"]},function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(106),o={position:"absolute",top:0,left:0,visibility:"hidden",height:0,overflow:"scroll",whiteSpace:"pre"},a=i.createClass({displayName:"AutosizeInput",propTypes:{className:i.PropTypes.string,defaultValue:i.PropTypes.any,inputClassName:i.PropTypes.string,inputStyle:i.PropTypes.object,minWidth:i.PropTypes.oneOfType([i.PropTypes.number,i.PropTypes.string]),onChange:i.PropTypes.func,placeholder:i.PropTypes.string,placeholderIsMinWidth:i.PropTypes.bool,style:i.PropTypes.object,value:i.PropTypes.any},getDefaultProps:function(){return{minWidth:1}},getInitialState:function(){return{inputWidth:this.props.minWidth}},componentDidMount:function(){this.copyInputStyles(),this.updateInputWidth()},componentDidUpdate:function(){this.updateInputWidth()},copyInputStyles:function(){if(this.isMounted()&&window.getComputedStyle){var e=window.getComputedStyle(this.refs.input);if(e){var t=this.refs.sizer;if(t.style.fontSize=e.fontSize,t.style.fontFamily=e.fontFamily,t.style.fontWeight=e.fontWeight,t.style.fontStyle=e.fontStyle,t.style.letterSpacing=e.letterSpacing,this.props.placeholder){var n=this.refs.placeholderSizer;n.style.fontSize=e.fontSize,n.style.fontFamily=e.fontFamily,n.style.fontWeight=e.fontWeight,n.style.fontStyle=e.fontStyle,n.style.letterSpacing=e.letterSpacing}}}},updateInputWidth:function(){if(this.isMounted()&&"undefined"!=typeof this.refs.sizer.scrollWidth){var e=void 0;e=this.props.placeholder&&(!this.props.value||this.props.value&&this.props.placeholderIsMinWidth)?Math.max(this.refs.sizer.scrollWidth,this.refs.placeholderSizer.scrollWidth)+2:this.refs.sizer.scrollWidth+2,e<this.props.minWidth&&(e=this.props.minWidth),e!==this.state.inputWidth&&this.setState({inputWidth:e})}},getInput:function(){return this.refs.input},focus:function(){this.refs.input.focus()},blur:function(){this.refs.input.blur()},select:function(){this.refs.input.select()},render:function(){var e=this.props.defaultValue||this.props.value||"",t=this.props.style||{};t.display||(t.display="inline-block");var n=r({},this.props.inputStyle);n.width=this.state.inputWidth+"px",n.boxSizing="content-box";var a=r({},this.props);return a.className=this.props.inputClassName,a.style=n,delete a.inputClassName,delete a.inputStyle,delete a.minWidth,delete a.placeholderIsMinWidth,i.createElement("div",{className:this.props.className,style:t},i.createElement("input",r({},a,{ref:"input"})),i.createElement("div",{ref:"sizer",style:o},e),this.props.placeholder?i.createElement("div",{ref:"placeholderSizer",style:o},this.props.placeholder):null)}});e.exports=a},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t,n,r){var i=this;return r.ignoreAccents&&(t=(0,a["default"])(t)),r.ignoreCase&&(t=t.toLowerCase()),n&&(n=n.map(function(e){return e[r.valueKey]})),e.filter(function(e){if(n&&n.indexOf(e[r.valueKey])>-1)return!1;if(r.filterOption)return r.filterOption.call(i,e,t);if(!t)return!0;var o=String(e[r.valueKey]),s=String(e[r.labelKey]);return r.ignoreAccents&&("label"!==r.matchProp&&(o=(0,a["default"])(o)),"value"!==r.matchProp&&(s=(0,a["default"])(s))),r.ignoreCase&&("label"!==r.matchProp&&(o=o.toLowerCase()),"value"!==r.matchProp&&(s=s.toLowerCase())),"start"===r.matchPos?"label"!==r.matchProp&&o.substr(0,t.length)===t||"value"!==r.matchProp&&s.substr(0,t.length)===t:"label"!==r.matchProp&&o.indexOf(t)>=0||"value"!==r.matchProp&&s.indexOf(t)>=0})}var o=n(681),a=r(o);e.exports=i},function(e,t){"use strict";var n=[{base:"A",letters:/[\u0041\u24B6\uFF21\u00C0\u00C1\u00C2\u1EA6\u1EA4\u1EAA\u1EA8\u00C3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\u00C4\u01DE\u1EA2\u00C5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F]/g},{base:"AA",letters:/[\uA732]/g},{base:"AE",letters:/[\u00C6\u01FC\u01E2]/g},{base:"AO",letters:/[\uA734]/g},{base:"AU",letters:/[\uA736]/g},{base:"AV",letters:/[\uA738\uA73A]/g},{base:"AY",letters:/[\uA73C]/g},{base:"B",letters:/[\u0042\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181]/g},{base:"C",letters:/[\u0043\u24B8\uFF23\u0106\u0108\u010A\u010C\u00C7\u1E08\u0187\u023B\uA73E]/g},{base:"D",letters:/[\u0044\u24B9\uFF24\u1E0A\u010E\u1E0C\u1E10\u1E12\u1E0E\u0110\u018B\u018A\u0189\uA779]/g},{base:"DZ",letters:/[\u01F1\u01C4]/g},{base:"Dz",letters:/[\u01F2\u01C5]/g},{base:"E",letters:/[\u0045\u24BA\uFF25\u00C8\u00C9\u00CA\u1EC0\u1EBE\u1EC4\u1EC2\u1EBC\u0112\u1E14\u1E16\u0114\u0116\u00CB\u1EBA\u011A\u0204\u0206\u1EB8\u1EC6\u0228\u1E1C\u0118\u1E18\u1E1A\u0190\u018E]/g},{base:"F",letters:/[\u0046\u24BB\uFF26\u1E1E\u0191\uA77B]/g},{base:"G",letters:/[\u0047\u24BC\uFF27\u01F4\u011C\u1E20\u011E\u0120\u01E6\u0122\u01E4\u0193\uA7A0\uA77D\uA77E]/g},{base:"H",letters:/[\u0048\u24BD\uFF28\u0124\u1E22\u1E26\u021E\u1E24\u1E28\u1E2A\u0126\u2C67\u2C75\uA78D]/g},{base:"I",letters:/[\u0049\u24BE\uFF29\u00CC\u00CD\u00CE\u0128\u012A\u012C\u0130\u00CF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197]/g},{base:"J",letters:/[\u004A\u24BF\uFF2A\u0134\u0248]/g},{base:"K",letters:/[\u004B\u24C0\uFF2B\u1E30\u01E8\u1E32\u0136\u1E34\u0198\u2C69\uA740\uA742\uA744\uA7A2]/g},{base:"L",letters:/[\u004C\u24C1\uFF2C\u013F\u0139\u013D\u1E36\u1E38\u013B\u1E3C\u1E3A\u0141\u023D\u2C62\u2C60\uA748\uA746\uA780]/g},{base:"LJ",letters:/[\u01C7]/g},{base:"Lj",letters:/[\u01C8]/g},{base:"M",letters:/[\u004D\u24C2\uFF2D\u1E3E\u1E40\u1E42\u2C6E\u019C]/g},{base:"N",letters:/[\u004E\u24C3\uFF2E\u01F8\u0143\u00D1\u1E44\u0147\u1E46\u0145\u1E4A\u1E48\u0220\u019D\uA790\uA7A4]/g},{base:"NJ",letters:/[\u01CA]/g},{base:"Nj",letters:/[\u01CB]/g},{base:"O",letters:/[\u004F\u24C4\uFF2F\u00D2\u00D3\u00D4\u1ED2\u1ED0\u1ED6\u1ED4\u00D5\u1E4C\u022C\u1E4E\u014C\u1E50\u1E52\u014E\u022E\u0230\u00D6\u022A\u1ECE\u0150\u01D1\u020C\u020E\u01A0\u1EDC\u1EDA\u1EE0\u1EDE\u1EE2\u1ECC\u1ED8\u01EA\u01EC\u00D8\u01FE\u0186\u019F\uA74A\uA74C]/g},{base:"OI",letters:/[\u01A2]/g},{base:"OO",letters:/[\uA74E]/g},{base:"OU",letters:/[\u0222]/g},{base:"P",letters:/[\u0050\u24C5\uFF30\u1E54\u1E56\u01A4\u2C63\uA750\uA752\uA754]/g},{base:"Q",letters:/[\u0051\u24C6\uFF31\uA756\uA758\u024A]/g},{base:"R",letters:/[\u0052\u24C7\uFF32\u0154\u1E58\u0158\u0210\u0212\u1E5A\u1E5C\u0156\u1E5E\u024C\u2C64\uA75A\uA7A6\uA782]/g},{base:"S",letters:/[\u0053\u24C8\uFF33\u1E9E\u015A\u1E64\u015C\u1E60\u0160\u1E66\u1E62\u1E68\u0218\u015E\u2C7E\uA7A8\uA784]/g},{base:"T",letters:/[\u0054\u24C9\uFF34\u1E6A\u0164\u1E6C\u021A\u0162\u1E70\u1E6E\u0166\u01AC\u01AE\u023E\uA786]/g},{base:"TZ",letters:/[\uA728]/g},{base:"U",letters:/[\u0055\u24CA\uFF35\u00D9\u00DA\u00DB\u0168\u1E78\u016A\u1E7A\u016C\u00DC\u01DB\u01D7\u01D5\u01D9\u1EE6\u016E\u0170\u01D3\u0214\u0216\u01AF\u1EEA\u1EE8\u1EEE\u1EEC\u1EF0\u1EE4\u1E72\u0172\u1E76\u1E74\u0244]/g},{base:"V",letters:/[\u0056\u24CB\uFF36\u1E7C\u1E7E\u01B2\uA75E\u0245]/g},{base:"VY",letters:/[\uA760]/g},{base:"W",letters:/[\u0057\u24CC\uFF37\u1E80\u1E82\u0174\u1E86\u1E84\u1E88\u2C72]/g},{base:"X",letters:/[\u0058\u24CD\uFF38\u1E8A\u1E8C]/g},{base:"Y",letters:/[\u0059\u24CE\uFF39\u1EF2\u00DD\u0176\u1EF8\u0232\u1E8E\u0178\u1EF6\u1EF4\u01B3\u024E\u1EFE]/g},{base:"Z",letters:/[\u005A\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762]/g},{base:"a",letters:/[\u0061\u24D0\uFF41\u1E9A\u00E0\u00E1\u00E2\u1EA7\u1EA5\u1EAB\u1EA9\u00E3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\u00E4\u01DF\u1EA3\u00E5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250]/g},{base:"aa",letters:/[\uA733]/g},{base:"ae",letters:/[\u00E6\u01FD\u01E3]/g},{base:"ao",letters:/[\uA735]/g},{base:"au",letters:/[\uA737]/g},{base:"av",letters:/[\uA739\uA73B]/g},{base:"ay",letters:/[\uA73D]/g},{base:"b",letters:/[\u0062\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253]/g},{base:"c",letters:/[\u0063\u24D2\uFF43\u0107\u0109\u010B\u010D\u00E7\u1E09\u0188\u023C\uA73F\u2184]/g},{base:"d",letters:/[\u0064\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\uA77A]/g},{base:"dz",letters:/[\u01F3\u01C6]/g},{base:"e",letters:/[\u0065\u24D4\uFF45\u00E8\u00E9\u00EA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\u00EB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u025B\u01DD]/g},{base:"f",letters:/[\u0066\u24D5\uFF46\u1E1F\u0192\uA77C]/g},{base:"g",letters:/[\u0067\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\u1D79\uA77F]/g},{base:"h",letters:/[\u0068\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265]/g},{base:"hv",letters:/[\u0195]/g},{base:"i",letters:/[\u0069\u24D8\uFF49\u00EC\u00ED\u00EE\u0129\u012B\u012D\u00EF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131]/g},{base:"j",letters:/[\u006A\u24D9\uFF4A\u0135\u01F0\u0249]/g},{base:"k",letters:/[\u006B\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3]/g},{base:"l",letters:/[\u006C\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u017F\u0142\u019A\u026B\u2C61\uA749\uA781\uA747]/g},{base:"lj",letters:/[\u01C9]/g},{base:"m",letters:/[\u006D\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F]/g},{base:"n",letters:/[\u006E\u24DD\uFF4E\u01F9\u0144\u00F1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5]/g},{base:"nj",letters:/[\u01CC]/g},{base:"o",letters:/[\u006F\u24DE\uFF4F\u00F2\u00F3\u00F4\u1ED3\u1ED1\u1ED7\u1ED5\u00F5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\u00F6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\u00F8\u01FF\u0254\uA74B\uA74D\u0275]/g},{base:"oi",letters:/[\u01A3]/g},{base:"ou",letters:/[\u0223]/g},{base:"oo",letters:/[\uA74F]/g},{base:"p",letters:/[\u0070\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755]/g},{base:"q",letters:/[\u0071\u24E0\uFF51\u024B\uA757\uA759]/g},{base:"r",letters:/[\u0072\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783]/g},{base:"s",letters:/[\u0073\u24E2\uFF53\u00DF\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B]/g},{base:"t",letters:/[\u0074\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787]/g},{base:"tz",letters:/[\uA729]/g},{base:"u",letters:/[\u0075\u24E4\uFF55\u00F9\u00FA\u00FB\u0169\u1E79\u016B\u1E7B\u016D\u00FC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289]/g},{base:"v",letters:/[\u0076\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C]/g},{base:"vy",letters:/[\uA761]/g},{base:"w",letters:/[\u0077\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73]/g},{base:"x",letters:/[\u0078\u24E7\uFF58\u1E8B\u1E8D]/g},{base:"y",letters:/[\u0079\u24E8\uFF59\u1EF3\u00FD\u0177\u1EF9\u0233\u1E8F\u00FF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF]/g},{base:"z",letters:/[\u007A\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763]/g}];e.exports=function(e){for(var t=0;t<n.length;t++)e=e.replace(n[t].letters,n[t].base);return e}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){var t=e.focusedOption,n=e.instancePrefix,r=(e.labelKey,e.onFocus),i=e.onSelect,o=e.optionClassName,s=e.optionComponent,u=e.optionRenderer,c=e.options,d=e.valueArray,f=e.valueKey,p=s;return c.map(function(e,s){var c=d&&d.indexOf(e)>-1,h=e===t,g=h?"focused":null,m=(0,a["default"])(o,{"Select-option":!0,"is-selected":c,"is-focused":h,"is-disabled":e.disabled});return l["default"].createElement(p,{className:m,instancePrefix:n,isDisabled:e.disabled,isFocused:h,isSelected:c,key:"option-"+s+"-"+e[f],onFocus:r,onSelect:i,option:e,optionIndex:s,ref:g},u(e,s))})}var o=n(335),a=r(o),s=n(106),l=r(s);e.exports=i},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){return e&&"object"!=typeof e&&(e={}),e?e:null}function o(e,t,n){e&&(e[t]=n)}function a(e,t){if(e)for(var n=t.length;n>=0;--n){var r=t.slice(0,n);if(e[r]&&(t===r||e[r].complete))return e[r]}}function s(e,t){if(e&&"function"==typeof e.then)return e.then(function(e){t(null,e)},function(e){t(e)})}var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=n(106),c=r(u),d=n(678),f=r(d),p=n(681),h=r(p),g=0,m=c["default"].PropTypes.oneOfType([c["default"].PropTypes.string,c["default"].PropTypes.node]),v=c["default"].createClass({displayName:"Async",propTypes:{cache:c["default"].PropTypes.any,ignoreAccents:c["default"].PropTypes.bool,ignoreCase:c["default"].PropTypes.bool,isLoading:c["default"].PropTypes.bool,loadOptions:c["default"].PropTypes.func.isRequired,loadingPlaceholder:c["default"].PropTypes.string,minimumInput:c["default"].PropTypes.number,noResultsText:m,onInputChange:c["default"].PropTypes.func,placeholder:m,searchPromptText:m,searchingText:c["default"].PropTypes.string},getDefaultProps:function(){return{cache:!0,ignoreAccents:!0,ignoreCase:!0,loadingPlaceholder:"Loading...",minimumInput:0,searchingText:"Searching...",searchPromptText:"Type to search"}},getInitialState:function(){return{cache:i(this.props.cache),isLoading:!1,options:[]}},componentWillMount:function(){this._lastInput=""},componentDidMount:function(){this.loadOptions("")},componentWillReceiveProps:function(e){e.cache!==this.props.cache&&this.setState({cache:i(e.cache)})},focus:function(){this.select.focus()},resetState:function(){this._currentRequestId=-1,this.setState({isLoading:!1,options:[]})},getResponseHandler:function(e){var t=this,n=this._currentRequestId=g++;return function(r,i){if(r)throw r;t.isMounted()&&(o(t.state.cache,e,i),n===t._currentRequestId&&t.setState({isLoading:!1,options:i&&i.options||[]}))}},loadOptions:function(e){if(this.props.onInputChange){var t=this.props.onInputChange(e);null!=t&&(e=""+t)}if(this.props.ignoreAccents&&(e=(0,h["default"])(e)),this.props.ignoreCase&&(e=e.toLowerCase()),this._lastInput=e,e.length<this.props.minimumInput)return this.resetState();var n=a(this.state.cache,e);if(n)return this.setState({options:n.options});this.setState({isLoading:!0});var r=this.getResponseHandler(e),i=s(this.props.loadOptions(e,r),r);return i?i.then(function(){return e}):e},render:function(){var e=this,t=this.props.noResultsText,n=this.state,r=n.isLoading,i=n.options;this.props.isLoading&&(r=!0);var o=r?this.props.loadingPlaceholder:this.props.placeholder;return r?t=this.props.searchingText:!i.length&&this._lastInput.length<this.props.minimumInput&&(t=this.props.searchPromptText),c["default"].createElement(f["default"],l({},this.props,{ref:function(t){return e.select=t},isLoading:r,noResultsText:t,onInputChange:this.loadOptions,options:i,placeholder:o}))}});e.exports=v},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function o(e){var t=e.option,n=e.options,r=e.labelKey,i=e.valueKey;return 0===n.filter(function(e){return e[r]===t[r]||e[i]===t[i]}).length}function a(e){var t=e.label;return!!t}function s(e){var t=e.label,n=e.labelKey,r=e.valueKey,i={};return i[r]=t,i[n]=t,i.className="Select-create-option-placeholder",i}function l(e){return'Create option "'+e+'"'}function u(e){var t=e.keyCode;switch(t){case 9:case 13:case 188:return!0}return!1}var c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},d=n(106),f=r(d),p=n(678),h=r(p),g=n(680),m=r(g),v=n(682),b=r(v),y=f["default"].createClass({displayName:"CreatableSelect",propTypes:{filterOptions:f["default"].PropTypes.any,isOptionUnique:f["default"].PropTypes.func,isValidNewOption:f["default"].PropTypes.func,menuRenderer:f["default"].PropTypes.any,newOptionCreator:f["default"].PropTypes.func,promptTextCreator:f["default"].PropTypes.func,shouldKeyDownEventCreateNewOption:f["default"].PropTypes.func},statics:{isOptionUnique:o,isValidNewOption:a,newOptionCreator:s,promptTextCreator:l,shouldKeyDownEventCreateNewOption:u},getDefaultProps:function(){return{filterOptions:m["default"],isOptionUnique:o,isValidNewOption:a,menuRenderer:b["default"],newOptionCreator:s,promptTextCreator:l,shouldKeyDownEventCreateNewOption:u}},createNewOption:function(){var e=this.props,t=e.isValidNewOption,n=e.newOptionCreator,r=(e.shouldKeyDownEventCreateNewOption,this.select.props),i=r.labelKey,o=r.options,a=r.valueKey,s=this.select.getInputValue();if(t({label:s})){var l=n({label:s,labelKey:i,valueKey:a}),u=this.isOptionUnique({option:l});u&&(o.unshift(l),this.select.selectValue(l))}},filterOptions:function w(){var e=this.props,w=e.filterOptions,t=e.isValidNewOption,n=e.promptTextCreator,r=w.apply(void 0,arguments),i=this.select?this.select.getInputValue():"";if(t({label:i})){var o=this.props.newOptionCreator,a=this.select.props,s=a.labelKey,l=a.options,u=a.valueKey,c=o({label:i,labelKey:s,valueKey:u}),d=this.isOptionUnique({option:c,options:l});if(d){var f=n(i);this._createPlaceholderOption=o({label:f,labelKey:s,valueKey:u}),r.unshift(this._createPlaceholderOption)}}return r},isOptionUnique:function x(e){var t=e.option,n=e.options;if(!this.select)return!1;var x=this.props.isOptionUnique,r=this.select.props,i=r.labelKey,o=r.valueKey;return n=n||this.select.filterOptions(),x({labelKey:i,option:t,options:n,valueKey:o})},menuRenderer:function _(e){var _=this.props.menuRenderer;return _(c({},e,{onSelect:this.onOptionSelect}))},onInputKeyDown:function(e){var t=this.props.shouldKeyDownEventCreateNewOption,n=this.select.getFocusedOption();n&&n===this._createPlaceholderOption&&t({keyCode:e.keyCode})&&(this.createNewOption(),e.preventDefault())},onOptionSelect:function(e,t){e===this._createPlaceholderOption?this.createNewOption():this.select.selectValue(e)},render:function(){var e=this,t=this.props,n=(t.newOptionCreator,t.shouldKeyDownEventCreateNewOption,i(t,["newOptionCreator","shouldKeyDownEventCreateNewOption"]));return f["default"].createElement(h["default"],c({},n,{allowCreate:!0,filterOptions:this.filterOptions,menuRenderer:this.menuRenderer,onInputKeyDown:this.onInputKeyDown,ref:function(t){return e.select=t}}))}});e.exports=y},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}var i=n(106),o=r(i),a=n(335),s=r(a),l=o["default"].createClass({displayName:"Option",propTypes:{children:o["default"].PropTypes.node,className:o["default"].PropTypes.string,instancePrefix:o["default"].PropTypes.string.isRequired,isDisabled:o["default"].PropTypes.bool,isFocused:o["default"].PropTypes.bool,isSelected:o["default"].PropTypes.bool,onFocus:o["default"].PropTypes.func,onSelect:o["default"].PropTypes.func,onUnfocus:o["default"].PropTypes.func,option:o["default"].PropTypes.object.isRequired,optionIndex:o["default"].PropTypes.number},blockEvent:function(e){e.preventDefault(),e.stopPropagation(),"A"===e.target.tagName&&"href"in e.target&&(e.target.target?window.open(e.target.href,e.target.target):window.location.href=e.target.href)},handleMouseDown:function(e){e.preventDefault(),e.stopPropagation(),this.props.onSelect(this.props.option,e)},handleMouseEnter:function(e){this.onFocus(e)},handleMouseMove:function(e){this.onFocus(e)},handleTouchEnd:function(e){this.dragging||this.handleMouseDown(e)},handleTouchMove:function(e){this.dragging=!0},handleTouchStart:function(e){this.dragging=!1},onFocus:function(e){this.props.isFocused||this.props.onFocus(this.props.option,e)},render:function(){var e=this.props,t=e.option,n=e.instancePrefix,r=e.optionIndex,i=(0,s["default"])(this.props.className,t.className);return t.disabled?o["default"].createElement("div",{className:i,onMouseDown:this.blockEvent,onClick:this.blockEvent},this.props.children):o["default"].createElement("div",{className:i,style:t.style,role:"option",onMouseDown:this.handleMouseDown,onMouseEnter:this.handleMouseEnter,onMouseMove:this.handleMouseMove,onTouchStart:this.handleTouchStart,onTouchMove:this.handleTouchMove,onTouchEnd:this.handleTouchEnd,id:n+"-option-"+r,title:t.title},this.props.children)}});e.exports=l},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}var i=n(106),o=r(i),a=n(335),s=r(a),l=o["default"].createClass({displayName:"Value",propTypes:{children:o["default"].PropTypes.node,disabled:o["default"].PropTypes.bool,id:o["default"].PropTypes.string,onClick:o["default"].PropTypes.func,onRemove:o["default"].PropTypes.func,value:o["default"].PropTypes.object.isRequired},handleMouseDown:function(e){if("mousedown"!==e.type||0===e.button)return this.props.onClick?(e.stopPropagation(),void this.props.onClick(this.props.value,e)):void(this.props.value.href&&e.stopPropagation())},onRemove:function(e){e.preventDefault(),e.stopPropagation(),this.props.onRemove(this.props.value)},handleTouchEndRemove:function(e){this.dragging||this.onRemove(e)},handleTouchMove:function(e){this.dragging=!0},handleTouchStart:function(e){this.dragging=!1},renderRemoveIcon:function(){if(!this.props.disabled&&this.props.onRemove)return o["default"].createElement("span",{className:"Select-value-icon","aria-hidden":"true",onMouseDown:this.onRemove,onTouchEnd:this.handleTouchEndRemove,onTouchStart:this.handleTouchStart,onTouchMove:this.handleTouchMove},"×")},renderLabel:function(){var e="Select-value-label";return this.props.onClick||this.props.value.href?o["default"].createElement("a",{className:e,href:this.props.value.href,target:this.props.value.target,onMouseDown:this.handleMouseDown,onTouchEnd:this.handleMouseDown},this.props.children):o["default"].createElement("span",{className:e,role:"option","aria-selected":"true",id:this.props.id},this.props.children)},render:function(){return o["default"].createElement("div",{className:(0,s["default"])("Select-value",this.props.value.className),style:this.props.value.style,title:this.props.value.title},this.renderRemoveIcon(),this.renderLabel())}});e.exports=l},function(e,t,n){var r=n(688);"string"==typeof r&&(r=[[e.id,r,""]]);n(288)(r,{});r.locals&&(e.exports=r.locals)},function(e,t,n){t=e.exports=n(275)(),t.push([e.id,'.clearfix{*zoom:1}.clearfix:after,.clearfix:before{display:table;content:"";line-height:0}.clearfix:after{clear:both}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.input-block-level{display:block;width:100%;min-height:30px;box-sizing:border-box}.tools .nav{margin-bottom:10px}.new-database-tray{padding:16px 20px 28px}.new-database-tray:before{right:206px}.new-database-tray input.input-xxlarge{margin-bottom:0;width:250px;border-radius:5px 0 0 5px}.new-database-tray a.btn{color:#fff;background-color:#e33f3b;margin-left:0;line-height:1.5em;border:0;padding:10px 10px 9px;font-size:14px;border-radius:0 5px 5px 0}.new-database-tray a.btn:hover{background-color:#cbcbcb;color:#fff}#database-pagination{float:right}.database-load-fail{color:#999;height:49px}.database-actions>*{margin-right:10px}',""])},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){return e||(e=""),e}Object.defineProperty(t,"__esModule",{value:!0});var o=n(84),a=r(o),s=n(99),l=r(s),u=n(690),c=r(u);n(800),l["default"].registerUrls("allDocs",{server:function(e,t){return a["default"].host+"/"+e+"/_all_docs"+i(t)},app:function(e,t){return"database/"+e+"/_all_docs"+i(t)},apiurl:function(e,t){return window.location.origin+"/"+e+"/_all_docs"+i(t)}}),l["default"].registerUrls("bulk_docs",{server:function(e,t){return a["default"].host+"/"+e+"/_bulk_docs"+i(t)},app:function(e,t){return"database/"+e+"/_bulk_docs"+i(t)},apiurl:function(e,t){return window.location.origin+"/"+e+"/_bulk_docs"+i(t)}}),l["default"].registerUrls("revision-browser",{app:function(e,t){return"database/"+e+"/"+t+"/conflicts"}}),l["default"].registerUrls("designDocs",{server:function(e,t){return a["default"].host+"/"+e+"/"+t+"/_info"},app:function(e,t){return"database/"+e+"/_design/"+a["default"].utils.safeURLName(t)+"/_info"},apiurl:function(e,t){return window.location.origin+"/"+e+"/"+t+"/_info"}}),l["default"].registerUrls("view",{server:function(e,t,n){return a["default"].host+"/"+e+"/_design/"+t+"/_view/"+n},app:function(e,t){return"database/"+e+"/_design/"+t+"/_view/"},apiurl:function(e,t,n){return window.location.origin+"/"+e+"/_design/"+t+"/_view/"+n},edit:function(e,t,n){return"database/"+e+"/_design/"+t+"/_view/"+n+"/edit"},showView:function(e,t,n){return"/database/"+e+"/"+t+"/_view/"+n},fragment:function(e,t,n){return"database/"+e+t+"/_view/"+n}}),l["default"].registerUrls("document",{server:function(e,t,n){return _.isUndefined(n)&&(n=""),a["default"].host+"/"+e+"/"+t+n},attachment:function(e,t,n,r){return _.isUndefined(r)&&(r=""),a["default"].host+"/"+e+"/"+t+"/"+n+r},app:function(e,t){return"/database/"+e+"/"+t},apiurl:function(e,t){return t?window.location.origin+"/"+e+"/"+t:window.location.origin+"/"+e},"web-index":function(e,t){return"/database/"+e+"/"+t}}),l["default"].registerUrls("new",{newDocument:function(e){return"/database/"+e+"/new"},newView:function(e){return"/database/"+e+"/new_view"},addView:function(e,t){return"/database/"+e+"/new_view/"+t}}),l["default"].registerUrls("base",{server:function(e){return a["default"].host+"/"+e+"/"},app:function(e){return"/database/"+e+"/"}}),l["default"].registerUrls("mango",{"index-server":function(e,t){return t||(t=""),a["default"].host+"/"+e+"/_index"+t},"index-apiurl":function(e,t){return t||(t=""),window.location.origin+"/"+e+"/_index"+t},"index-app":function(e,t){return t||(t=""),"database/"+e+"/_index"+t},"query-server":function(e,t){return t||(t=""),a["default"].host+"/"+e+"/_find"+t},"query-apiurl":function(e,t){return t||(t=""),window.location.origin+"/"+e+"/_find"+t},"query-app":function(e,t){return t||(t=""),"database/"+e+"/_find"+t}}),t["default"]=c["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(672),o=r(i),a=n(691),s=r(a),l=n(728),u=r(l),c=n(794),d=r(c),f=n(795),p=r(f);o["default"].RouteObjects=[u["default"].DocEditorRouteObject,u["default"].RevBrowserRouteObject,s["default"],d["default"],p["default"].MangoIndexEditorAndQueryEditor],t["default"]=o["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(84),o=r(i),a=n(99),s=r(a),l=n(692),u=r(l),c=n(671),d=r(c),f=n(712),p=r(f),h=n(716),g=r(h),m=n(717),v=r(m),b=n(668),y=r(b),w=n(291),x=(r(w),
n(697)),_=r(x),E=n(695),C=r(E),k=n(720),S=r(k),A=n(721),T=r(A),D=n(722),N=r(D),F=n(723),M=(r(F),n(700)),O=r(M),L=n(724),P=r(L),I=n(727),R=r(I),B=n(296),j=r(B),V=n(709),U=r(V),W=u["default"].extend({layout:"with_tabs_sidebar",routes:{"database/:database/_all_docs(:extra)":{route:"allDocs",roles:["fx_loggedIn"]},"database/:database/_design/:ddoc/_info":{route:"designDocMetadata",roles:["fx_loggedIn"]},"database/:database/_changes":"changes"},events:{"route:reloadDesignDocs":"reloadDesignDocs"},initialize:function(e,t,n){this.initViews(n[0])},establish:function(){return[this.designDocs.fetch({reset:!0}),this.allDatabases.fetchOnce()]},initViews:function(e){this.databaseName=e,this.database=new y["default"].Model({id:this.databaseName}),this.allDatabases=this.getAllDatabases(),this.createDesignDocsCollection(),this.setComponent("#right-header",p["default"],{database:this.database}),this.addLeftHeader(),this.addSidebar()},designDocMetadata:function(e,t){this.removeComponent("#footer"),this.removeComponent("#react-headerbar"),this.removeComponent("#dashboard-upper-content");var n=new d["default"].DdocInfo({_id:"_design/"+t},{database:this.database});P["default"].fetchDesignDocInfo({ddocName:t,designDocInfo:n}),this.setComponent("#dashboard-lower-content",R["default"].DesignDocInfo),O["default"].selectNavItem("designDoc",{designDocName:t,designDocSection:"metadata"}),this.leftheader.updateCrumbs(this.getCrumbs(this.database)),U["default"].hideQueryOptions(),this.apiUrl=[n.url("apiurl"),n.documentation()]},allDocs:function(e,t){var n,r=this.createParams(t),i=r.urlParams,a=r.docParams;if(this.setComponent("#react-headerbar",N["default"].BulkDocumentHeaderController,{showIncludeAllDocs:!0}),this.setComponent("#footer",T["default"].Footer),this.leftheader.updateCrumbs(this.getCrumbs(this.database)),["_replicator","_users"].indexOf(e)>-1){a.include_docs=!0,i=r.docParams;var l=s["default"].urls("allDocs","app",e,"?"+$.param(i));s["default"].navigate(l,{trigger:!1,replace:!0})}this.database.buildAllDocs(a),n=this.database.allDocs;var u="all-docs";a.startkey&&a.startkey.indexOf("_design")>-1&&(u="design-docs"),O["default"].selectNavItem(u),j["default"].showDeleteDatabaseModal({showDeleteModal:!1,dbId:""}),this.removeComponent("#dashboard-upper-content"),a||(a={});var c=o["default"].utils.localStorageGet("include_docs_bulkdocs");window.localStorage.removeItem("include_docs_bulkdocs"),C["default"].newResultsList({collection:n,textEmptyIndex:"No Documents Found",bulkCollection:new d["default"].BulkDeleteDocCollection(c,{databaseId:this.database.safeID()})}),this.database.allDocs.paging.pageSize=_["default"].indexResultsStore.getPerPage(),this.setComponent("#dashboard-lower-content",S["default"].List),this.apiUrl=[this.database.allDocs.urlRef("apiurl",i),this.database.allDocs.documentation()],U["default"].reset({queryParams:i}),U["default"].showQueryOptions()},reloadDesignDocs:function(e){this.addSidebar(),e&&e.selectedTab&&O["default"].selectNavItem(e.selectedTab)},changes:function(){v["default"].initChanges({databaseName:this.database.id}),this.setComponent("#dashboard-upper-content",g["default"].ChangesTabContent),this.setComponent("#dashboard-lower-content",g["default"].ChangesController),this.removeComponent("#footer"),this.removeComponent("#react-headerbar"),this.viewEditor&&this.viewEditor.remove(),O["default"].selectNavItem("changes"),this.leftheader.updateCrumbs(this.getCrumbs(this.database)),U["default"].hideQueryOptions(),this.apiUrl=function(){return[s["default"].urls("changes","apiurl",this.database.id,""),this.database.documentation()]}}});t["default"]=W},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(84),o=r(i),a=n(99),s=r(a),l=n(672),u=r(l),c=n(668),d=r(c),f=n(291),p=r(f),h=n(693),g=r(h),m=n(697),v=r(m),b=n(703),y=r(b),w=n(700),x=r(w),E=n(709),C=r(E),k=s["default"].RouteObject.extend({layout:"with_tabs_sidebar",selectedHeader:"Databases",overrideBreadcrumbs:!0,createDesignDocsCollection:function(){this.designDocs=new u["default"].AllDocs(null,{database:this.database,paging:{pageSize:500},params:{startkey:"_design/",endkey:"_design0",include_docs:!0,limit:500}})},getAllDatabases:function(){return new d["default"].List},showQueryOptions:function(e,t,n){var r,i=this.designDocs.fetch({reset:!0}),o=this;i.then(function(i){var a=_.findWhere(o.designDocs.models,{id:"_design/"+t});!_.isUndefined(r=a.attributes.doc.views[n].reduce),C["default"].showQueryOptions(),C["default"].reset({queryParams:e,hasReduce:r,showReduce:!_.isUndefined(r),viewName:n,ddocName:t})})},addLeftHeader:function(){this.leftheader=this.setView("#breadcrumbs",new p["default"].LeftHeader({databaseName:this.database.safeID(),crumbs:this.getCrumbs(this.database)}))},addSidebar:function(e){var t={designDocs:this.designDocs,database:this.database};e&&(t.selectedNavItem=e),x["default"].newOptions(t),this.setComponent("#sidebar-content",y["default"].SidebarController)},getCrumbs:function(e){return[{type:"back",link:s["default"].urls("allDBs","app")},{name:e.id,className:"lookahead-tray-link"}]},ddocInfo:function(e,t,n){return{id:"_design/"+e,currView:n,designDocs:t}},createParams:function(e){var t=o["default"].getParams(e),n=u["default"].QueryParams.parse(t);g["default"].setDocumentLimit(parseInt(t.limit,10));var r=v["default"].indexResultsStore.getPerPage();return{urlParams:t,docParams:_.extend(n,{limit:r})}}});t["default"]=k},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(84),o=(r(i),n(99)),a=r(o),s=n(694),l=r(s),u=n(695),c=r(u);t["default"]={updatePerPage:function(e,t,n){a["default"].dispatch({type:l["default"].PER_PAGE_CHANGE,perPage:e}),c["default"].clearResults(),t.fetch().then(function(){c["default"].resultsListReset(),c["default"].sendMessageNewResultList({collection:t,bulkCollection:n})})},setDocumentLimit:function(e){a["default"].dispatch({type:l["default"].SET_PAGINATION_DOCUMENT_LIMIT,docLimit:e})},paginateNext:function(e,t){a["default"].dispatch({type:l["default"].PAGINATE_NEXT}),c["default"].clearResults(),e.next().then(function(){c["default"].resultsListReset(),c["default"].sendMessageNewResultList({collection:e,bulkCollection:t})})},paginatePrevious:function(e,t){a["default"].dispatch({type:l["default"].PAGINATE_PREVIOUS}),c["default"].clearResults(),e.previous().then(function(){c["default"].resultsListReset(),c["default"].sendMessageNewResultList({collection:e,bulkCollection:t})})},toggleTableViewType:function(){c["default"].togglePrioritizedTableView()}}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]={COLLECTION_CHANGED:"COLLECTION_CHANGED",PER_PAGE_CHANGE:"PER_PAGE_CHANGE",PAGINATE_NEXT:"PAGINATE_NEXT",PAGINATE_PREVIOUS:"PAGINATE_PREVIOUS",SET_PAGINATION_DOCUMENT_LIMIT:"SET_PAGINATION_DOCUMENT_LIMIT"}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(84),o=(r(i),n(99)),a=r(o),s=n(696),l=r(s),u=n(697),c=r(u),d=n(671),f=(r(d),n(700)),p=r(f),h=c["default"].indexResultsStore,g=function(e){var t="Failed to delete your document!";e&&(t="Failed to delete: "+e.join(", ")),a["default"].addNotification({msg:t,type:"error",clear:!0})};t["default"]={togglePrioritizedTableView:function(){a["default"].dispatch({type:l["default"].INDEX_RESULTS_TOGGLE_PRIORITIZED_TABLE_VIEW})},sendMessageNewResultList:function(e){a["default"].dispatch({type:l["default"].INDEX_RESULTS_NEW_RESULTS,options:e})},newResultsList:function(e){if(this.clearResults(),e.collection.fetch)return e.collection.fetch({reset:!0}).then(function(){this.resultsListReset(),this.sendMessageNewResultList(e)}.bind(this),function(e,t){var n=e.responseText?e:t,r="Bad Request";try{var i=JSON.parse(n.responseText);i.reason&&(r=i.reason)}catch(o){console.log(o)}a["default"].addNotification({msg:r,type:"error",clear:!0})})},newMangoResultsList:function(e){a["default"].dispatch({type:l["default"].INDEX_RESULTS_NEW_RESULTS,options:e})},runMangoFindQuery:function(e){var t=JSON.parse(e.queryCode),n=h.getCollection(),r=h.getBulkDocCollection();return this.clearResults(),n.setQuery(t).fetch().then(function(){this.resultsListReset(),this.newMangoResultsList({collection:n,query:e.queryCode,textEmptyIndex:"No Results Found!",bulkCollection:r})}.bind(this),function(e){a["default"].addNotification({msg:e.reason,clear:!0,type:"error"}),this.resultsListReset()}.bind(this))},reloadResultsList:function(){return"mango"===h.getTypeOfIndex()?this.newResultsList({collection:h.getCollection(),bulkCollection:h.getBulkDocCollection(),typeOfIndex:"mango"}):this.newResultsList({collection:h.getCollection(),bulkCollection:h.getBulkDocCollection()})},resultsListReset:function(){a["default"].dispatch({type:l["default"].INDEX_RESULTS_RESET})},selectDoc:function(e){a["default"].dispatch({type:l["default"].INDEX_RESULTS_SELECT_DOC,options:{_id:e._id,_rev:e._rev,_deleted:!0}})},changeField:function(e){a["default"].dispatch({type:l["default"].INDEX_RESULTS_SELECT_NEW_FIELD_IN_TABLE,options:e})},toggleAllDocuments:function(){a["default"].dispatch({type:l["default"].INDEX_RESULTS_TOOGLE_SELECT_ALL_DOCUMENTS})},clearResults:function(){a["default"].dispatch({type:l["default"].INDEX_RESULTS_CLEAR_RESULTS})},deleteSelected:function(e,t){var n=1===t?"Are you sure you want to delete this doc?":"Are you sure you want to delete these "+t+" docs?";if(0===t)return window.alert("Please select the document rows you want to delete."),!1;if(!window.confirm(n))return!1;var r=_.bind(this.reloadResultsList,this),i=[];e.bulkDelete().then(function(e){a["default"].addNotification({msg:"Successfully deleted your docs",clear:!0}),_.isEmpty(e.errorIds)||(g(e.errorIds),i=e.errorIds)},function(e){g(e),i=e}).always(function(t){r().then(function(){e.reset(i),p["default"].refresh()})})}}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]={INDEX_RESULTS_NEW_RESULTS:"INDEX_RESULTS_NEW_RESULTS",INDEX_RESULTS_RESET:"INDEX_RESULTS_RESET",INDEX_RESULTS_SELECT_DOC:"INDEX_RESULTS_SELECT_DOC",INDEX_RESULTS_CLEAR_RESULTS:"INDEX_RESULTS_CLEAR_RESULTS",INDEX_RESULTS_TOOGLE_SELECT_ALL_DOCUMENTS:"INDEX_RESULTS_TOOGLE_SELECT_ALL_DOCUMENTS",INDEX_RESULTS_SELECT_NEW_FIELD_IN_TABLE:"INDEX_RESULTS_SELECT_NEW_FIELD_IN_TABLE",INDEX_RESULTS_CLEAR_SELECTED_ITEMS:"INDEX_RESULTS_CLEAR_SELECTED_ITEMS",INDEX_RESULTS_TOGGLE_PRIORITIZED_TABLE_VIEW:"INDEX_RESULTS_TOGGLE_PRIORITIZED_TABLE_VIEW"}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(84),o=r(i),a=n(99),s=r(a),l=n(696),u=r(l),c=n(698),d=r(c),f=n(694),p=r(f),h=n(671),g=r(h),m=n(699),v=r(m),b=n(670),y=(r(b),{}),w=1e4;y.IndexResultsStore=s["default"].Store.extend({initialize:function(){this.reset()},reset:function(){this._collection=new(s["default"].Collection.extend({url:""})),this._filteredCollection=[],this._bulkDeleteDocCollection=new g["default"].BulkDeleteDocCollection([],{}),this.clearSelectedItems(),this._isLoading=!1,this._textEmptyIndex="No Documents Found",this._typeOfIndex="view",this._tableViewSelectedFields=[],this._isPrioritizedEnabled=!1,this._tableSchema=[],this._tableView=!1,this.resetPagination()},resetPagination:function(){this._pageStart=1,this._currentPage=1,this._enabled=!0,this._newView=!1,this._docLimit=_.isUndefined(this._docLimit)?w:this._docLimit,this.initPerPage()},setDocumentLimit:function(e){e?this._docLimit=e:this._docLimit=w,this.initPerPage()},canShowPrevious:function(){return!!this._enabled&&(!(!this._collection||!this._collection.hasPrevious)&&this._collection.hasPrevious())},canShowNext:function(){return this._enabled?!(this._pageStart+this._perPage>=this._docLimit)&&(!(!this._collection||!this._collection.hasNext)&&this._collection.hasNext()):this._enabled},paginateNext:function(){this._currentPage+=1,this._pageStart+=this.getPerPage(),this._collection.paging.pageSize=this.documentsLeftToFetch()},paginatePrevious:function(){this._currentPage-=1,this._pageStart=this._pageStart-this.getPerPage(),this._pageStart<1&&(this._pageStart=1),this._collection.paging.pageSize=this.getPerPage()},getCurrentPage:function(){return this._currentPage},totalDocsViewed:function(){return this._perPage*this._currentPage},documentsLeftToFetch:function x(){var x=this._docLimit-this.totalDocsViewed();return x<this.getPerPage()?x:this._perPage},getPerPage:function(){return this._perPage},initPerPage:function(){var e=s["default"].constants.MISC.DEFAULT_PAGE_SIZE;if(window.localStorage){var t=o["default"].utils.localStorageGet("fauxton:perpage");t&&(e=parseInt(t,10))}this._docLimit<e&&(e=this._docLimit),this.setPerPage(e)},setPerPage:function(e){this._perPage=e,o["default"].utils.localStorageSet("fauxton:perpage",e),this._collection&&this._collection.pageSizeReset&&this._collection.pageSizeReset(e,{fetch:!1})},getTotalRows:function(){return!!this._collection&&this._collection.length},getPageStart:function(){return this._pageStart},getPageEnd:function(){return!!this._collection&&this._pageStart+this._collection.length-1},getUpdateSeq:function(){return!!this._collection&&(!!this._collection.updateSeq&&this._collection.updateSeq())},clearSelectedItems:function(){this._bulkDeleteDocCollection.reset([])},newResults:function(e){function t(e){return e.get&&"function"==typeof e.get?"query"!==e.get("language"):"query"!==e.language}this._collection=e.collection,this._bulkDeleteDocCollection=e.bulkCollection,e.textEmptyIndex&&(this._textEmptyIndex=e.textEmptyIndex),e.typeOfIndex&&(this._typeOfIndex=e.typeOfIndex),this._cachedSelected=[],this._filteredCollection=this._collection.filter(t)},getTypeOfIndex:function(){return this._typeOfIndex},isEditable:function(e){return!!this._collection&&((!e||!this.isGhostDoc(e))&&(!(e&&!e.get("_id"))&&(!!this._collection.isEditable&&this._collection.isEditable())))},isGhostDoc:function(e){return!e||!e.attributes||!Object.keys(e.attributes).length},isDeletable:function(e){return!this.isGhostDoc(e)&&e.isDeletable()},getCollection:function(){return this._collection},getBulkDocCollection:function(){return this._bulkDeleteDocCollection},getDocContent:function(e){var t=e.toJSON();return JSON.stringify(t,null," ")},getDocId:function(e){return _.isUndefined(e.id)?e.get("key")?e.get("key").toString():"":e.id},getMangoDocContent:function(e){var t=e.toJSON();return delete t.ddoc,delete t.name,JSON.stringify(t,null," ")},getMangoDoc:function(e,t){var n;return e.get("def")&&e.get("def").fields?(n=v["default"].getIndexName(e),{content:this.getMangoDocContent(e),header:n,id:e.getId(),keylabel:"",url:e.isFromView()?e.url("app"):e.url("web-index"),isDeletable:this.isDeletable(e),isEditable:this.isEditable(e)}):{content:" ",header:n,id:this.getDocId(e)+t,keylabel:"",url:this.isEditable(e)?e.url("app"):null,isDeletable:this.isDeletable(e),isEditable:this.isEditable(e)}},getResults:function(){var e,t;return this.getIsTableView()?this.getTableViewData():(t=this._filteredCollection.map(function(e,t){return e.get("def")||this.isGhostDoc(e)?this.getMangoDoc(e,t):{content:this.getDocContent(e),id:this.getDocId(e),_rev:e.get("_rev"),header:this.getDocId(e),keylabel:e.isFromView()?"key":"id",url:this.getDocId(e)?e.url("app"):null,isDeletable:this.isDeletable(e),isEditable:this.isEditable(e)}},this),e=this.hasBulkDeletableDoc(this._filteredCollection),{displayedFields:this.getDisplayCountForTableView(),hasBulkDeletableDoc:e,results:t})},getPseudoSchema:function(e){var t=[];e.forEach(function(e){Object.keys(e).forEach(function(e){t.push(e)})}),t=_.uniq(t);var n=t.indexOf("_id");return n!==-1&&(t.splice(n,1),t.unshift("_id")),t},normalizeTableData:function(e,t){return t?e:e.map(function(e){return e.doc||e})},isIncludeDocsEnabled:function(){var e=o["default"].getParams();return!!e.include_docs},getPrioritizedFields:function(e,t){var n=e.reduce(function(e,t){return e=e.concat(Object.keys(t))},[]);return n=_.countBy(n,function(e){return e}),delete n._id,delete n.id,delete n._rev,n=Object.keys(n).reduce(function(e,t){return e.push([n[t],t]),e},[]),n=this.sortByTwoFields(n),n=n.slice(0,t),n.reduce(function(e,t){return e.push(t[1]),e},[])},sortByTwoFields:function(e){function t(e,n,r){return e[r]===n[r]?r<2?t(e,n,r+1):0:1===r?e[r]<n[r]?-1:1:e[r]<n[r]?1:-1}return e.sort(function(e,n){return t(e,n,0)})},hasIdOrRev:function(e){return e.indexOf("_id")!==-1||e.indexOf("id")!==-1||e.indexOf("_rev")!==-1},getNotSelectedFields:function(e,t){var n=_.without.bind(this,t);return n.apply(this,e)},getDisplayCountForTableView:function(){var e,t;return this.getIsTableView()&&this.isIncludeDocsEnabled()?(t=_.uniq(this._tableViewSelectedFields).length,e=this._tableSchema.length,_.contains(this._tableSchema,"_id","_rev")&&(e-=1),_.contains(this._tableSchema,"_id","_rev")&&(t+=1),{shown:t,allFieldCount:e}):null},getTableViewData:function(){function e(e,t){return"MangoIndex"!==t?e:(e.id=e.ddoc,e)}function t(e,t){if(e)return"MangoIndex"!==t&&(!!Object.keys(e).length&&!!e._id)}function n(e,t){return"MangoIndex"===t?"special"!==e.type:!!e._id&&!!e._rev}var r,i,a,a,l,u,c,d=this.getDatabase(),f=!!this._collection.view,p=this._collection.collectionType;c=this._filteredCollection.map(function(t){return e(t.toJSON(),p)});var h=this.isIncludeDocsEnabled(),g=null;if(h){c=this.normalizeTableData(c,f),i=this.getPseudoSchema(c),a=this.hasIdOrRev(i),this._isPrioritizedEnabled||(this._tableViewSelectedFields=this._cachedSelected||[]),0===this._tableViewSelectedFields.length&&(l=this.getPrioritizedFields(c,a?4:5),this._tableViewSelectedFields=l,this._cachedSelected=this._tableViewSelectedFields);var m=_.without(i,"_id","_rev","_attachment");g=this.getNotSelectedFields(this._tableViewSelectedFields,m),this._isPrioritizedEnabled&&(g=null,this._tableViewSelectedFields=m)}else i=this.getPseudoSchema(c),this._tableViewSelectedFields=_.without(i,"_id","_rev","_attachment");this._notSelectedFields=g,this._tableSchema=i;var v=d.safeID();return r=c.map(function(e){var r,i=o["default"].utils.getSafeIdForDoc(e._id||e.id);return i&&(r=s["default"].urls("document","app",v,i)),{content:e,id:e._id||e.id,_rev:e._rev,header:"",keylabel:"",url:r,isDeletable:n(e,p),isEditable:t(e,p)}}.bind(this)),u=this.hasBulkDeletableDoc(this._filteredCollection),{notSelectedFields:g,hasMetadata:this.getHasMetadata(i),selectedFields:this._tableViewSelectedFields,hasBulkDeletableDoc:u,schema:i,results:r,displayedFields:this.getDisplayCountForTableView()}},changeTableViewFields:function(e){var t=e.newSelectedRow,n=e.index;this._tableViewSelectedFields[n]=t},getHasMetadata:function(e){return _.contains(e,"_id","_rev")},hasBulkDeletableDoc:function(e){var t,n=!1,r=e.length;for(t=0;t<r;t++)if(e[t].isBulkDeletable()){n=!0;break}return n},hasResults:function(){return this.isLoading()?this.isLoading():this._collection.length>0},isLoading:function(){return this._isLoading},selectDoc:function(e,t){if(e._id&&"_all_docs"!==e._id)return this._bulkDeleteDocCollection.get(e._id)?void this._bulkDeleteDocCollection.remove(e._id):void this._bulkDeleteDocCollection.add(e)},selectAllDocuments:function(){this.deSelectCurrentCollection(),this._collection.each(function(e){e.isBulkDeletable()&&this.selectDoc({_id:e.id,_rev:e.get("_rev"),_deleted:!0})},this)},deSelectCurrentCollection:function(){this._collection.each(function(e){e.isBulkDeletable()&&this._bulkDeleteDocCollection.remove(e.id)},this)},toggleSelectAllDocuments:function(){return this.areAllDocumentsSelected()?this.deSelectCurrentCollection():this.selectAllDocuments()},togglePrioritizedTableView:function(){this._isPrioritizedEnabled=!this._isPrioritizedEnabled},areAllDocumentsSelected:function(){if(0===this._collection.length)return!1;var e=!0,t=this._bulkDeleteDocCollection.pluck("_id");return this._collection.forEach(function(n){n.isBulkDeletable()&&(_.contains(t,n.id)||(e=!1))}.bind(this)),e},getSelectedItemsLength:function(){return this._bulkDeleteDocCollection.length},getDatabase:function(){return this._collection.database},getTextEmptyIndex:function(){return this._textEmptyIndex},hasSelectedItem:function(){return this.getSelectedItemsLength()>0},toggleTableView:function(e){var t=e.enable;return t?void(this._tableView=!0):void(this._tableView=!1)},getIsTableView:function(){return this._tableView},getIsPrioritizedEnabled:function(){return this._isPrioritizedEnabled},getCurrentViewType:function(){return this._tableView?"table":"expanded"},getShowPrioritizedFieldToggler:function(){return this.isIncludeDocsEnabled()&&this.getIsTableView()},clearResultsBeforeFetch:function(){this._collection&&this._collection.reset&&this._collection.reset(),this._isLoading=!0},resultsResetFromFetch:function(){this._isLoading=!1},dispatch:function(e){switch(e.type){case u["default"].INDEX_RESULTS_NEW_RESULTS:this.newResults(e.options);break;case u["default"].INDEX_RESULTS_RESET:this.resultsResetFromFetch();break;case u["default"].INDEX_RESULTS_SELECT_DOC:this.selectDoc(e.options);break;case u["default"].INDEX_RESULTS_CLEAR_RESULTS:this.clearResultsBeforeFetch();break;case u["default"].INDEX_RESULTS_TOOGLE_SELECT_ALL_DOCUMENTS:this.toggleSelectAllDocuments();break;case u["default"].INDEX_RESULTS_SELECT_NEW_FIELD_IN_TABLE:this.changeTableViewFields(e.options);break;case u["default"].INDEX_RESULTS_TOGGLE_PRIORITIZED_TABLE_VIEW:this.togglePrioritizedTableView();break;case d["default"].TOGGLE_TABLEVIEW:this.toggleTableView(e.options);break;case p["default"].SET_PAGINATION_DOCUMENT_LIMIT:this.setDocumentLimit(e.docLimit);break;case p["default"].PAGINATE_NEXT:this.paginateNext();break;case p["default"].PAGINATE_PREVIOUS:this.paginatePrevious();break;case p["default"].PER_PAGE_CHANGE:this.resetPagination(),this.setPerPage(e.perPage);break;default:return}this.triggerChange()}}),y.indexResultsStore=new y.IndexResultsStore,y.indexResultsStore.dispatchToken=s["default"].dispatcher.register(y.indexResultsStore.dispatch),t["default"]=y},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]={TOGGLE_TABLEVIEW:"TOGGLE_TABLEVIEW"}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){var t,n=[];return n=e.get("def").fields.reduce(function(t,n,r){return 0===r?t.push(e.get("type")+": "+Object.keys(n)[0]):t.push(Object.keys(n)[0]),t},[]),n.length||(t=a["default"].getExtensions("mango:additionalIndexes")[0],n=t.createHeader(e)),n.join(", ")}Object.defineProperty(t,"__esModule",{value:!0});var o=n(99),a=r(o);t["default"]={getIndexName:i}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){e.database.safeID()!==E.getDatabaseName()&&b["default"].dispatch({type:w["default"].SIDEBAR_FETCHING}),e.designDocs.fetch().then(function(){b["default"].dispatch({type:w["default"].SIDEBAR_NEW_OPTIONS,options:e})})}function o(e){e.fetch().then(function(){b["default"].dispatch({type:w["default"].SIDEBAR_UPDATED_DESIGN_DOCS,options:{designDocs:e}})})}function a(e,t){b["default"].dispatch({type:w["default"].SIDEBAR_TOGGLE_CONTENT,designDoc:e,indexGroup:t})}function s(e,t){var n=$.extend(!0,{},{designDocName:"",designDocSection:"",indexName:""},t);n.navItem=e,b["default"].dispatch({type:w["default"].SIDEBAR_SET_SELECTED_NAV_ITEM,options:n})}function l(){b["default"].dispatch({type:w["default"].SIDEBAR_REFRESH})}function u(e,t,n,r){b["default"].dispatch({type:w["default"].SIDEBAR_SHOW_DELETE_INDEX_MODAL,options:{indexName:e,indexLabel:n,designDocName:t,onDelete:r}})}function c(){b["default"].dispatch({type:w["default"].SIDEBAR_HIDE_DELETE_INDEX_MODAL})}function d(e,t,n,r){b["default"].dispatch({type:w["default"].SIDEBAR_SHOW_CLONE_INDEX_MODAL,options:{sourceIndexName:e,sourceDesignDocName:t,onSubmit:r,indexLabel:n,cloneIndexModalTitle:"Clone "+n}})}function f(){b["default"].dispatch({type:w["default"].SIDEBAR_HIDE_CLONE_INDEX_MODAL})}function p(e){b["default"].dispatch({type:w["default"].SIDEBAR_CLONE_MODAL_DESIGN_DOC_NEW_NAME_UPDATED,options:{value:e}})}function h(e){b["default"].dispatch({type:w["default"].SIDEBAR_CLONE_MODAL_DESIGN_DOC_CHANGE,options:{value:e}})}function g(e){b["default"].dispatch({type:w["default"].SIDEBAR_CLONE_MODAL_UPDATE_INDEX_NAME,options:{value:e}})}Object.defineProperty(t,"__esModule",{value:!0});var m=n(84),v=(r(m),n(99)),b=r(v),y=n(701),w=r(y),x=n(702),_=r(x),E=_["default"].sidebarStore;t["default"]={newOptions:i,updateDesignDocs:o,toggleContent:a,selectNavItem:s,refresh:l,showDeleteIndexModal:u,hideDeleteIndexModal:c,showCloneIndexModal:d,hideCloneIndexModal:f,updateNewDesignDocName:p,selectDesignDoc:h,setNewCloneIndexName:g}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]={SIDEBAR_SET_SELECTED_NAV_ITEM:"SIDEBAR_SET_SELECTED_NAV_ITEM",SIDEBAR_NEW_OPTIONS:"SIDEBAR_NEW_OPTIONS",SIDEBAR_TOGGLE_CONTENT:"SIDEBAR_TOGGLE_CONTENT",SIDEBAR_FETCHING:"SIDEBAR_FETCHING",SIDEBAR_REFRESH:"SIDEBAR_REFRESH",SIDEBAR_SHOW_DELETE_INDEX_MODAL:"SIDEBAR_SHOW_DELETE_INDEX_MODAL",SIDEBAR_HIDE_DELETE_INDEX_MODAL:"SIDEBAR_HIDE_DELETE_INDEX_MODAL",SIDEBAR_SHOW_CLONE_INDEX_MODAL:"SIDEBAR_SHOW_CLONE_INDEX_MODAL",SIDEBAR_HIDE_CLONE_INDEX_MODAL:"SIDEBAR_HIDE_CLONE_INDEX_MODAL",SIDEBAR_CLONE_MODAL_DESIGN_DOC_CHANGE:"SIDEBAR_CLONE_MODAL_DESIGN_DOC_CHANGE",SIDEBAR_CLONE_MODAL_DESIGN_DOC_NEW_NAME_UPDATED:"SIDEBAR_CLONE_MODAL_DESIGN_DOC_NEW_NAME_UPDATED",SIDEBAR_CLONE_MODAL_UPDATE_INDEX_NAME:"SIDEBAR_CLONE_MODAL_UPDATE_INDEX_NAME",SIDEBAR_UPDATED_DESIGN_DOCS:"SIDEBAR_UPDATED_DESIGN_DOCS"}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(84),o=r(i),a=n(99),s=r(a),l=n(106),u=r(l),c=n(701),d=r(c),f={};f.SidebarStore=s["default"].Store.extend({initialize:function(){this.reset()},reset:function(){this._designDocs=new Backbone.Collection,this._selected={navItem:"all-docs",designDocName:"",designDocSection:"",indexName:""},this._loading=!0,this._toggledSections={},this._deleteIndexModalVisible=!1,this._deleteIndexModalDesignDocName="",this._deleteIndexModalText="",this._deleteIndexModalIndexName="",this._deleteIndexModalOnSubmit=function(){},this._cloneIndexModalVisible=!1,this._cloneIndexDesignDocProp="",this._cloneIndexModalTitle="",this._cloneIndexModalSelectedDesignDoc="",this._cloneIndexModalNewDesignDocName="",this._cloneIndexModalNewIndexName="",this._cloneIndexModalIndexLabel="",this._cloneIndexModalOnSubmit=function(){}},newOptions:function(e){this._database=e.database,this._designDocs=e.designDocs,this._loading=!1,e.selectedNavItem&&(this._selected={navItem:e.selectedNavItem,designDocName:"",designDocSection:"",indexName:""})},updatedDesignDocs:function(e){this._designDocs=e},isDeleteIndexModalVisible:function(){return this._deleteIndexModalVisible},getDeleteIndexModalText:function(){return this._deleteIndexModalText},getDeleteIndexModalOnSubmit:function(){return this._deleteIndexModalOnSubmit},isLoading:function(){return this._loading},getDatabase:function(){return this.isLoading()?{}:this._database},toggleContent:function(e,t){return this._toggledSections[e]?t?this.toggleIndexGroup(e,t):void(this._toggledSections[e].visible=!this._toggledSections[e].visible):void(this._toggledSections[e]={visible:!0,indexGroups:{}})},toggleIndexGroup:function(e,t){var n=this._toggledSections[e].indexGroups[t];return _.isUndefined(n)?void(this._toggledSections[e].indexGroups[t]=!0):void(this._toggledSections[e].indexGroups[t]=!n)},isVisible:function(e,t){return!!this._toggledSections[e]&&(t?this._toggledSections[e].indexGroups[t]:this._toggledSections[e].visible)},getSelected:function(){return this._selected},setSelected:function(e){this._selected={navItem:e.navItem,designDocName:e.designDocName,designDocSection:e.designDocSection,indexName:e.indexName},e.designDocName&&(_.has(this._toggledSections,e.designDocName)||(this._toggledSections[e.designDocName]={visible:!0,indexGroups:{}}),this._toggledSections[e.designDocName].visible=!0,e.designDocSection&&(this._toggledSections[e.designDocName].indexGroups[e.designDocSection]=!0))},getToggledSections:function(){return this._toggledSections},getDatabaseName:function(){return this.isLoading()?"":this._database.safeID()},getDesignDocs:function(){return this._designDocs},getAvailableDesignDocs:function(){var e=this.getDesignDocs().filter(function(e){return!e.isMangoDoc()});return _.map(e,function(e){return e.id})},getDesignDocList:function(){if(this.isLoading())return{};var e=this._designDocs.toJSON();return e=_.filter(e,function(e){return!_.has(e.doc,"language")||"query"!==e.doc.language}),e.map(function(e){return e.safeId=o["default"].utils.safeURLName(e._id.replace(/^_design\//,"")),_.extend(e,e.doc)})},showDeleteIndexModal:function(e){this._deleteIndexModalIndexName=e.indexName,this._deleteIndexModalDesignDocName=e.designDocName,this._deleteIndexModalVisible=!0,this._deleteIndexModalText=u["default"].createElement("div",null,"Are you sure you want to delete the ",u["default"].createElement("code",null,this._deleteIndexModalIndexName)," ",e.indexLabel,"?"),this._deleteIndexModalOnSubmit=e.onDelete},getDeleteIndexModalIndexName:function(){return this._deleteIndexModalIndexName},getDeleteIndexDesignDoc:function(){var e=this._designDocs.find(function(e){return"_design/"+this._deleteIndexModalDesignDocName===e.id},this);return e?e.dDocModel():null},isCloneIndexModalVisible:function(){return this._cloneIndexModalVisible},getCloneIndexModalTitle:function(){return this._cloneIndexModalTitle},showCloneIndexModal:function(e){this._cloneIndexModalIndexLabel=e.indexLabel,this._cloneIndexModalTitle=e.cloneIndexModalTitle,this._cloneIndexModalSourceIndexName=e.sourceIndexName,this._cloneIndexModalSourceDesignDocName=e.sourceDesignDocName,this._cloneIndexModalSelectedDesignDoc="_design/"+e.sourceDesignDocName,this._cloneIndexDesignDocProp="",this._cloneIndexModalVisible=!0,this._cloneIndexModalOnSubmit=e.onSubmit},getCloneIndexModalIndexLabel:function(){return this._cloneIndexModalIndexLabel},getCloneIndexModalOnSubmit:function(){return this._cloneIndexModalOnSubmit},getCloneIndexModalSourceIndexName:function(){return this._cloneIndexModalSourceIndexName},getCloneIndexModalSourceDesignDocName:function(){return this._cloneIndexModalSourceDesignDocName},getCloneIndexDesignDocProp:function(){return this._cloneIndexDesignDocProp},getCloneIndexModalSelectedDesignDoc:function(){return this._cloneIndexModalSelectedDesignDoc},getCloneIndexModalNewDesignDocName:function(){return this._cloneIndexModalNewDesignDocName},getCloneIndexModalNewIndexName:function(){return this._cloneIndexModalNewIndexName},dispatch:function(e){switch(e.type){case d["default"].SIDEBAR_SET_SELECTED_NAV_ITEM:this.setSelected(e.options);break;case d["default"].SIDEBAR_NEW_OPTIONS:this.newOptions(e.options);break;case d["default"].SIDEBAR_TOGGLE_CONTENT:this.toggleContent(e.designDoc,e.indexGroup);break;case d["default"].SIDEBAR_FETCHING:this._loading=!0;break;case d["default"].SIDEBAR_REFRESH:break;case d["default"].SIDEBAR_SHOW_DELETE_INDEX_MODAL:this.showDeleteIndexModal(e.options);break;case d["default"].SIDEBAR_HIDE_DELETE_INDEX_MODAL:this._deleteIndexModalVisible=!1;break;case d["default"].SIDEBAR_SHOW_CLONE_INDEX_MODAL:this.showCloneIndexModal(e.options);break;case d["default"].SIDEBAR_HIDE_CLONE_INDEX_MODAL:this._cloneIndexModalVisible=!1;break;case d["default"].SIDEBAR_CLONE_MODAL_DESIGN_DOC_CHANGE:this._cloneIndexModalSelectedDesignDoc=e.options.value;break;case d["default"].SIDEBAR_CLONE_MODAL_DESIGN_DOC_NEW_NAME_UPDATED:this._cloneIndexModalNewDesignDocName=e.options.value;break;case d["default"].SIDEBAR_CLONE_MODAL_UPDATE_INDEX_NAME:this._cloneIndexModalNewIndexName=e.options.value;break;case d["default"].SIDEBAR_UPDATED_DESIGN_DOCS:this.updatedDesignDocs(e.options.designDocs);break;default:return}this.triggerChange()}}),f.sidebarStore=new f.SidebarStore,f.sidebarStore.dispatchToken=s["default"].dispatcher.register(f.sidebarStore.dispatch),
t["default"]=f},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(t,"__esModule",{value:!0});var o=n(84),a=r(o),s=n(99),l=r(s),u=n(106),c=r(u),d=n(137),f=r(d),p=n(702),h=r(p),g=n(700),m=r(g),v=n(293),b=r(v),y=n(294),w=r(y),x=n(296),E=r(x),C=n(704),k=r(C),S=n(706),A=r(S),T=n(297),D=r(T),N=n(556),F=r(N),M=n(299);n(708);var O=h["default"].sidebarStore,L=b["default"].LoadLines,P=A["default"].DesignDocSelector,I=D["default"].ConfirmationModal,R=b["default"].DeleteDatabaseModal,B=w["default"].deleteDbModalStore,j=c["default"].createClass({displayName:"MainSidebar",propTypes:{selectedNavItem:c["default"].PropTypes.string.isRequired},getNewButtonLinks:function(){return F["default"].getNewButtonLinks(this.props.databaseName)},buildDocLinks:function(){var e=l["default"].urls("base","app",this.props.databaseName);return l["default"].getExtensions("docLinks").map(function(t){return c["default"].createElement("li",{key:t.url,className:this.getNavItemClass(t.url)},c["default"].createElement("a",{id:t.url,href:e+t.url},t.title))},this)},getNavItemClass:function(e){return e===this.props.selectedNavItem?"active":""},render:function(){var e=this.buildDocLinks(),t="#"+l["default"].urls("changes","app",this.props.databaseName,""),n="#"+l["default"].urls("permissions","app",this.props.databaseName),r=l["default"].urls("allDocs","app",this.props.databaseName,""),i=l["default"].urls("mango","query-app",this.props.databaseName),o=a["default"].i18n.en_US["run-query-with-mango"],s=this.getNewButtonLinks();return c["default"].createElement("ul",{className:"nav nav-list"},c["default"].createElement("li",{className:this.getNavItemClass("all-docs")},c["default"].createElement("a",{id:"all-docs",href:"#/"+r,className:"toggle-view"},"All Documents"),c["default"].createElement("div",{id:"new-all-docs-button",className:"add-dropdown"},c["default"].createElement(b["default"].MenuDropDown,{links:s}))),c["default"].createElement("li",{className:this.getNavItemClass("mango-query")},c["default"].createElement("a",{id:"mango-query",href:"#"+i,className:"toggle-view"},o)),c["default"].createElement("li",{className:this.getNavItemClass("permissions")},c["default"].createElement("a",{id:"permissions",href:n},"Permissions")),c["default"].createElement("li",{className:this.getNavItemClass("changes")},c["default"].createElement("a",{id:"changes",href:t},"Changes")),e,c["default"].createElement("li",{className:this.getNavItemClass("design-docs")},c["default"].createElement("a",{id:"design-docs",href:"#/"+r+'?startkey="_design"&endkey="_design0"',className:"toggle-view"},"Design Documents"),c["default"].createElement("div",{id:"new-design-docs-button",className:"add-dropdown"},c["default"].createElement(b["default"].MenuDropDown,{links:s}))))}}),V=c["default"].createClass({displayName:"IndexSection",propTypes:{urlNamespace:c["default"].PropTypes.string.isRequired,indexLabel:c["default"].PropTypes.string.isRequired,database:c["default"].PropTypes.object.isRequired,designDocName:c["default"].PropTypes.string.isRequired,items:c["default"].PropTypes.array.isRequired,isExpanded:c["default"].PropTypes.bool.isRequired,selectedIndex:c["default"].PropTypes.string.isRequired,onDelete:c["default"].PropTypes.func.isRequired,onClone:c["default"].PropTypes.func.isRequired},getInitialState:function(){return{placement:"bottom"}},setPlacement:function(e){var t=document.getElementById(e).getBoundingClientRect().top,n=150,r=t+n>window.innerHeight?"top":"bottom";this.setState({placement:r})},createItems:function(){var e=this.props.items.sort();return _.map(e,function(e,t){var n=l["default"].urls(this.props.urlNamespace,"app",this.props.database.id,this.props.designDocName),r=this.props.selectedIndex===e?"active":"";return c["default"].createElement("li",{className:r,key:t},c["default"].createElement("a",{id:this.props.designDocName+"_"+e,href:"#/"+n+e,className:"toggle-view"},e),c["default"].createElement(M.OverlayTrigger,{ref:"indexMenu-"+t,trigger:"click",onEnter:this.setPlacement.bind(this,this.props.designDocName+"_"+e),placement:this.state.placement,rootClose:!0,overlay:c["default"].createElement(M.Popover,{id:"index-menu-component-popover"},c["default"].createElement("ul",null,c["default"].createElement("li",{onClick:this.indexAction.bind(this,"edit",{indexName:e,onEdit:this.props.onEdit})},c["default"].createElement("span",{className:"fonticon fonticon-file-code-o"}),"Edit"),c["default"].createElement("li",{onClick:this.indexAction.bind(this,"clone",{indexName:e,onClone:this.props.onClone})},c["default"].createElement("span",{className:"fonticon fonticon-files-o"}),"Clone"),c["default"].createElement("li",{onClick:this.indexAction.bind(this,"delete",{indexName:e,onDelete:this.props.onDelete})},c["default"].createElement("span",{className:"fonticon fonticon-trash"}),"Delete")))},c["default"].createElement("span",{className:"index-menu-toggle fonticon fonticon-wrench2"})))},this)},indexAction:function(e,t,n){switch(n.preventDefault(),$("body").trigger("click"),e){case"delete":m["default"].showDeleteIndexModal(t.indexName,this.props.designDocName,this.props.indexLabel,t.onDelete);break;case"clone":m["default"].showCloneIndexModal(t.indexName,this.props.designDocName,this.props.indexLabel,t.onClone);break;case"edit":t.onEdit(this.props.database.id,this.props.designDocName,t.indexName)}},toggle:function(e){e.preventDefault();var t=!this.props.isExpanded,n=t?"show":"hide";$(f["default"].findDOMNode(this)).find(".accordion-body").collapse(n),this.props.toggle(this.props.designDocName,this.props.title)},render:function(){if(0===this.props.items.length)return null;var e="accordion-header index-group-header",t="index-list accordion-body collapse";this.props.isExpanded&&(e+=" down",t+=" in");var n=this.props.title,r=this.props.designDocName,i="nav-design-function-"+r+this.props.selector;return c["default"].createElement("li",{id:i},c["default"].createElement("a",{className:e,"data-toggle":"collapse",onClick:this.toggle},c["default"].createElement("div",{className:"fonticon-play"}),n),c["default"].createElement("ul",{className:t},this.createItems()))}}),U=c["default"].createClass({displayName:"DesignDoc",propTypes:{database:c["default"].PropTypes.object.isRequired,sidebarListTypes:c["default"].PropTypes.array.isRequired,isExpanded:c["default"].PropTypes.bool.isRequired,selectedNavInfo:c["default"].PropTypes.object.isRequired,toggledSections:c["default"].PropTypes.object.isRequired},getInitialState:function(){return{updatedSidebarListTypes:this.props.sidebarListTypes}},componentWillMount:function(){if(_.isEmpty(this.state.updatedSidebarListTypes)||_.has(this.state.updatedSidebarListTypes[0],"selector")&&"views"!==this.state.updatedSidebarListTypes[0].selector){var e=this.state.updatedSidebarListTypes;e.unshift({selector:"views",name:"Views",urlNamespace:"view",indexLabel:"view",onDelete:k["default"].deleteView,onClone:k["default"].cloneView,onEdit:k["default"].gotoEditViewPage}),this.setState({updatedSidebarListTypes:e})}},indexList:function(){return _.map(this.state.updatedSidebarListTypes,function(e,t){var n=_.has(this.props.toggledSections,e.name)&&this.props.toggledSections[e.name],r="";return this.props.selectedNavInfo.designDocSection===e.name&&(r=this.props.selectedNavInfo.indexName),c["default"].createElement(V,{icon:e.icon,isExpanded:n,urlNamespace:e.urlNamespace,indexLabel:e.indexLabel,onEdit:e.onEdit,onDelete:e.onDelete,onClone:e.onClone,selectedIndex:r,toggle:this.props.toggle,database:this.props.database,designDocName:this.props.designDocName,key:t,title:e.name,selector:e.selector,items:_.keys(this.props.designDoc[e.selector])})}.bind(this))},toggle:function(e){e.preventDefault();var t=!this.props.isExpanded,n=t?"show":"hide";$(f["default"].findDOMNode(this)).find("#"+this.props.designDocName).collapse(n),this.props.toggle(this.props.designDocName)},getNewButtonLinks:function(){var e=l["default"].urls("databaseBaseURL","app",this.props.database.id),t=this.props.designDocName,n=_.reduce(l["default"].getExtensions("sidebar:links"),function(n,r){return n.push({title:r.title,url:"#"+e+"/"+r.url+"/"+t,icon:"fonticon-plus-circled"}),n},[{title:"New View",url:"#"+l["default"].urls("new","addView",this.props.database.id,t),icon:"fonticon-plus-circled"}]);return[{title:"Add New",links:n}]},render:function(){var e=this.getNewButtonLinks(),t="design-doc-section accordion-header",n="design-doc-body accordion-body collapse";this.props.isExpanded&&(t+=" down",n+=" in");var r=this.props.designDocName,i=l["default"].urls("designDocs","app",this.props.database.id,r),o="metadata"===this.props.selectedNavInfo.designDocSection?"active":"";return c["default"].createElement("li",{className:"nav-header"},c["default"].createElement("div",{id:"sidebar-tab-"+r,className:t},c["default"].createElement("div",{id:"nav-header-"+r,onClick:this.toggle,className:"accordion-list-item"},c["default"].createElement("div",{className:"fonticon-play"}),c["default"].createElement("p",{className:"design-doc-name"},c["default"].createElement("span",{title:"_design/"+r},r))),c["default"].createElement("div",{className:"new-button add-dropdown"},c["default"].createElement(b["default"].MenuDropDown,{links:e}))),c["default"].createElement("ul",{className:n,id:this.props.designDocName},c["default"].createElement("li",{className:o},c["default"].createElement("a",{href:"#/"+i,className:"toggle-view accordion-header"},"Metadata")),this.indexList()))}}),W=c["default"].createClass({displayName:"DesignDocList",componentWillMount:function(){var e=l["default"].getExtensions("sidebar:list");this.sidebarListTypes=_.isUndefined(e)?[]:e},designDocList:function(){return _.map(this.props.designDocs,function(e,t){var n=e.safeId,r=!1,i={};_.has(this.props.toggledSections,n)&&(r=this.props.toggledSections[n].visible,i=this.props.toggledSections[n].indexGroups);var o={};return"designDoc"===this.props.selectedNav.navItem&&this.props.selectedNav.designDocName===n&&(o=this.props.selectedNav),c["default"].createElement(U,{toggle:this.props.toggle,sidebarListTypes:this.sidebarListTypes,isExpanded:r,toggledSections:i,selectedNavInfo:o,key:t,designDoc:e,designDocName:n,database:this.props.database})}.bind(this))},render:function(){return c["default"].createElement("ul",{className:"nav nav-list"},this.designDocList())}}),q=c["default"].createClass({displayName:"SidebarController",getStoreState:function(){var e;return e={database:O.getDatabase(),selectedNav:O.getSelected(),designDocs:O.getDesignDocs(),designDocList:O.getDesignDocList(),availableDesignDocIds:O.getAvailableDesignDocs(),toggledSections:O.getToggledSections(),isLoading:O.isLoading()},i(e,"database",O.getDatabase()),i(e,"deleteDbModalProperties",B.getShowDeleteDatabaseModal()),i(e,"deleteIndexModalVisible",O.isDeleteIndexModalVisible()),i(e,"deleteIndexModalText",O.getDeleteIndexModalText()),i(e,"deleteIndexModalOnSubmit",O.getDeleteIndexModalOnSubmit()),i(e,"deleteIndexModalIndexName",O.getDeleteIndexModalIndexName()),i(e,"deleteIndexModalDesignDoc",O.getDeleteIndexDesignDoc()),i(e,"cloneIndexModalVisible",O.isCloneIndexModalVisible()),i(e,"cloneIndexModalTitle",O.getCloneIndexModalTitle()),i(e,"cloneIndexModalSelectedDesignDoc",O.getCloneIndexModalSelectedDesignDoc()),i(e,"cloneIndexModalNewDesignDocName",O.getCloneIndexModalNewDesignDocName()),i(e,"cloneIndexModalOnSubmit",O.getCloneIndexModalOnSubmit()),i(e,"cloneIndexDesignDocProp",O.getCloneIndexDesignDocProp()),i(e,"cloneIndexModalNewIndexName",O.getCloneIndexModalNewIndexName()),i(e,"cloneIndexSourceIndexName",O.getCloneIndexModalSourceIndexName()),i(e,"cloneIndexSourceDesignDocName",O.getCloneIndexModalSourceDesignDocName()),i(e,"cloneIndexModalIndexLabel",O.getCloneIndexModalIndexLabel()),e},getInitialState:function(){return this.getStoreState()},componentDidMount:function(){O.on("change",this.onChange,this),B.on("change",this.onChange,this)},componentWillUnmount:function(){O.off("change",this.onChange),B.off("change",this.onChange,this)},onChange:function(){this.isMounted()&&this.setState(this.getStoreState())},showDeleteDatabaseModal:function(e){E["default"].showDeleteDatabaseModal(e)},deleteIndex:function(){var e="designDoc"===this.state.selectedNav.navItem&&"_design/"+this.state.selectedNav.designDocName===this.state.deleteIndexModalDesignDoc.id&&this.state.selectedNav.indexName===this.state.deleteIndexModalIndexName;this.state.deleteIndexModalOnSubmit({isOnIndex:e,indexName:this.state.deleteIndexModalIndexName,designDoc:this.state.deleteIndexModalDesignDoc,designDocs:this.state.designDocs,database:this.state.database})},cloneIndex:function(){this.state.cloneIndexModalOnSubmit({sourceIndexName:this.state.cloneIndexSourceIndexName,sourceDesignDocName:this.state.cloneIndexSourceDesignDocName,targetDesignDocName:this.state.cloneIndexModalSelectedDesignDoc,newDesignDocName:this.state.cloneIndexModalNewDesignDocName,newIndexName:this.state.cloneIndexModalNewIndexName,designDocs:this.state.designDocs,database:this.state.database,onComplete:m["default"].hideCloneIndexModal})},render:function(){return this.state.isLoading?c["default"].createElement(L,null):c["default"].createElement("nav",{className:"sidenav"},c["default"].createElement(j,{selectedNavItem:this.state.selectedNav.navItem,databaseName:this.state.database.id}),c["default"].createElement(W,{selectedNav:this.state.selectedNav,toggle:m["default"].toggleContent,toggledSections:this.state.toggledSections,designDocs:this.state.designDocList,database:this.state.database}),c["default"].createElement(R,{showHide:this.showDeleteDatabaseModal,modalProps:this.state.deleteDbModalProperties}),c["default"].createElement(I,{title:"Confirm Deletion",visible:this.state.deleteIndexModalVisible,text:this.state.deleteIndexModalText,onClose:m["default"].hideDeleteIndexModal,onSubmit:this.deleteIndex}),c["default"].createElement(H,{visible:this.state.cloneIndexModalVisible,title:this.state.cloneIndexModalTitle,close:m["default"].hideCloneIndexModal,submit:this.cloneIndex,designDocArray:this.state.availableDesignDocIds,selectedDesignDoc:this.state.cloneIndexModalSelectedDesignDoc,newDesignDocName:this.state.cloneIndexModalNewDesignDocName,newIndexName:this.state.cloneIndexModalNewIndexName,indexLabel:this.state.cloneIndexModalIndexLabel}))}}),H=c["default"].createClass({displayName:"CloneIndexModal",propTypes:{visible:c["default"].PropTypes.bool.isRequired,title:c["default"].PropTypes.string,close:c["default"].PropTypes.func.isRequired,submit:c["default"].PropTypes.func.isRequired,designDocArray:c["default"].PropTypes.array.isRequired,selectedDesignDoc:c["default"].PropTypes.string.isRequired,newDesignDocName:c["default"].PropTypes.string.isRequired,newIndexName:c["default"].PropTypes.string.isRequired,indexLabel:c["default"].PropTypes.string.isRequired},getDefaultProps:function(){return{title:"Clone Index",visible:!1}},submit:function(){if(this.refs.designDocSelector.validate())return""===this.props.newIndexName?void l["default"].addNotification({msg:"Please enter the new index name.",type:"error",clear:!0}):void this.props.submit()},close:function(e){e&&e.preventDefault(),this.props.close()},setNewIndexName:function(e){m["default"].setNewCloneIndexName(e.target.value)},render:function(){return c["default"].createElement(M.Modal,{dialogClassName:"clone-index-modal",show:this.props.visible,onHide:this.close},c["default"].createElement(M.Modal.Header,{closeButton:!0},c["default"].createElement(M.Modal.Title,null,this.props.title)),c["default"].createElement(M.Modal.Body,null,c["default"].createElement("form",{className:"form",method:"post",onSubmit:this.submit},c["default"].createElement("p",null,"Select the design document where the cloned ",this.props.indexLabel," will be created, and then enter a name for the cloned ",this.props.indexLabel,"."),c["default"].createElement("div",{className:"row"},c["default"].createElement(P,{ref:"designDocSelector",designDocList:this.props.designDocArray,selectedDesignDocName:this.props.selectedDesignDoc,newDesignDocName:this.props.newDesignDocName,onSelectDesignDoc:m["default"].selectDesignDoc,onChangeNewDesignDocName:m["default"].updateNewDesignDocName})),c["default"].createElement("div",{className:"clone-index-name-row"},c["default"].createElement("label",{className:"new-index-title-label",htmlFor:"new-index-name"},this.props.indexLabel," Name"),c["default"].createElement("input",{type:"text",id:"new-index-name",value:this.props.newIndexName,onChange:this.setNewIndexName,placeholder:"Enter new view name"})))),c["default"].createElement(M.Modal.Footer,null,c["default"].createElement("a",{href:"#",className:"cancel-link",onClick:this.close,"data-bypass":"true"},"Cancel"),c["default"].createElement("button",{onClick:this.submit,"data-bypass":"true",className:"btn btn-success save"},c["default"].createElement("i",{className:"icon fonticon-ok-circled"})," Clone ",this.props.indexLabel)))}});t["default"]={SidebarController:q,DesignDoc:U,CloneIndexModal:H}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){k["default"].dispatch({type:D["default"].SELECT_REDUCE_CHANGE,reduceSelectedOption:e})}function o(e){k["default"].dispatch({type:D["default"].VIEW_NAME_CHANGE,name:e})}function a(e){k["default"].dispatch({type:D["default"].EDIT_INDEX,options:e})}function s(){k["default"].dispatch({type:D["default"].CLEAR_INDEX})}function l(e){e.designDocs.fetch({reset:!0}).then(function(){this.editIndex(e)}.bind(this))}function u(e){var t=e.designDoc;t.setDdocView(e.viewName,e.map,e.reduce),k["default"].addNotification({msg:"Saving View...",type:"info",clear:!0}),e.originalDesignDocName===e.designDocId&&e.originalViewName!==e.viewName&&t.removeDdocView(e.originalViewName),t.save().then(function(){if(k["default"].addNotification({msg:"View Saved.",type:"success",clear:!0}),e.originalDesignDocName!==e.designDocId){var n=y(e.designDocs,e.originalDesignDocName);b(n,e.designDocs,"views",e.originalViewName,{onSuccess:function(){M["default"].updateDesignDocs(e.designDocs)}})}"new-doc"===e.designDocId&&c(t),k["default"].dispatch({type:D["default"].VIEW_SAVED});var r=k["default"].urls("view","showView",e.database.safeID(),t.safeID(),E["default"].utils.safeURLName(e.viewName));k["default"].navigate(r,{trigger:!0})})}function c(e){k["default"].dispatch({type:D["default"].VIEW_ADD_DESIGN_DOC,designDoc:e.toJSON()})}function d(e){function t(){if(e.isOnIndex){var t=k["default"].urls("allDocs","app",e.database.safeID(),"?limit="+k["default"].constants.DATABASES.DOCUMENT_LIMIT);k["default"].navigate(t)}M["default"].updateDesignDocs(e.designDocs),k["default"].addNotification({msg:"The <code>"+_.escape(e.indexName)+"</code> view has been deleted.",type:"info",escape:!1,clear:!0}),k["default"].dispatch({type:L["default"].SIDEBAR_HIDE_DELETE_INDEX_MODAL})}b(e.designDoc,e.designDocs,"views",e.indexName,{onSuccess:t})}function f(e){var t=w(e.designDocs,e.targetDesignDocName,e.newDesignDocName,e.database),n=t.get("views");if(n&&_.has(n,e.newIndexName))return void k["default"].addNotification({msg:"That index name is already used in this design doc. Please enter a new name.",type:"error",clear:!0});n||(n={});var r=y(e.designDocs,"_design/"+e.sourceDesignDocName),i=r.toJSON();n[e.newIndexName]=i.views[e.sourceIndexName],t.set({views:n}),t.save().then(function(){e.onComplete(),k["default"].addNotification({msg:"The index has been cloned.",type:"success",clear:!0}),M["default"].updateDesignDocs(e.designDocs)},function(t){e.onComplete();var n=JSON.parse(t.responseText).reason;k["default"].addNotification({msg:"Clone failed: "+n,type:"error",clear:!0})})}function p(e,t,n){k["default"].navigate("#"+k["default"].urls("view","edit",e,t,n))}function h(e){k["default"].dispatch({type:D["default"].VIEW_UPDATE_MAP_CODE,code:e})}function g(e){k["default"].dispatch({type:D["default"].VIEW_UPDATE_REDUCE_CODE,code:e})}function m(e){k["default"].dispatch({type:D["default"].DESIGN_DOC_CHANGE,options:{value:e}})}function v(e){k["default"].dispatch({type:D["default"].DESIGN_DOC_NEW_NAME_UPDATED,options:{value:e}})}function b(e,t,n,r,i){var o=_.extend({onSuccess:function(){},onError:function(e){var t=JSON.parse(e.responseText).reason;k["default"].addNotification({msg:"Delete failed: "+t,type:"error",clear:!0})}},i),a=e.get(n)||{};delete a[r];var s={};s[n]=a,e.set(s);var l,u=k["default"].getIndexTypePropNames(),c=_.some(u,function(t){return e.get(t)&&_.keys(e.get(t)).length>0}),d=!1;c?l=e.save():(l=e.destroy(),d=!0),l.then(function(){d&&t.remove(e.id),o.onSuccess()},o.onError)}function y(e,t){return e.find(function(e){return e.id===t}).dDocModel()}function w(e,t,n,r){if("new-doc"===t){var i={_id:"_design/"+n,views:{},language:"javascript"};return new A["default"].Doc(i,{database:r})}var o=e.find(function(e){return e.id===t});return o?o.dDocModel():null}Object.defineProperty(t,"__esModule",{value:!0});var x=n(84),E=r(x),C=n(99),k=r(C),S=n(671),A=r(S),T=n(705),D=r(T),N=n(695),F=(r(N),n(700)),M=r(F),O=n(701),L=r(O);t["default"]={helpers:{findDesignDoc:y,getDesignDoc:w},safeDeleteIndex:b,selectReduceChanged:i,changeViewName:o,editIndex:a,clearIndex:s,fetchDesignDocsBeforeEdit:l,saveView:u,addDesignDoc:c,deleteView:d,cloneView:f,gotoEditViewPage:p,updateMapCode:h,updateReduceCode:g,selectDesignDoc:m,updateNewDesignDocName:v}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]={CLEAR_INDEX:"CLEAR_INDEX",EDIT_INDEX:"EDIT_INDEX",EDIT_NEW_INDEX:"EDIT_NEW_INDEX",SELECT_REDUCE_CHANGE:"SELECT_REDUCE_CHANGE",VIEW_SAVED:"VIEW_SAVED",VIEW_CREATED:"VIEW_CREATED",DESIGN_DOC_CHANGE:"DESIGN_DOC_CHANGE",DESIGN_DOC_NEW_NAME_UPDATED:"DESIGN_DOC_NEW_NAME_UPDATED",NEW_DESIGN_DOC:"NEW_DESIGN_DOC",VIEW_NAME_CHANGE:"VIEW_NAME_CHANGE",VIEW_ADD_DESIGN_DOC:"VIEW_ADD_DESIGN_DOC",VIEW_UPDATE_MAP_CODE:"VIEW_UPDATE_MAP_CODE",VIEW_UPDATE_REDUCE_CODE:"VIEW_UPDATE_REDUCE_CODE"}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(84),o=r(i),a=n(99),s=r(a),l=n(106),u=r(l),c=n(137),d=r(c),f=n(707),p=r(f),h=n(704),g=r(h),m=n(291),v=(r(m),n(293)),b=r(v),y=p["default"].indexEditorStore,w=o["default"].helpers.getDocUrl,x=b["default"].StyledSelect,E=b["default"].CodeEditorPanel,C=b["default"].ConfirmButton,k=b["default"].LoadLines,S=u["default"].createClass({displayName:"DesignDocSelector",propTypes:{designDocList:u["default"].PropTypes.array.isRequired,onSelectDesignDoc:u["default"].PropTypes.func.isRequired,onChangeNewDesignDocName:u["default"].PropTypes.func.isRequired,selectedDesignDocName:u["default"].PropTypes.string.isRequired,newDesignDocName:u["default"].PropTypes.string.isRequired,designDocLabel:u["default"].PropTypes.string,docURL:u["default"].PropTypes.string},getDefaultProps:function(){return{designDocLabel:"Design Document"}},validate:function(){return"new-doc"!==this.props.selectedDesignDocName||""!==this.props.newDesignDocName||(s["default"].addNotification({msg:"Please name your design doc.",type:"error"}),d["default"].findDOMNode(this.refs.newDesignDoc).focus(),!1)},getDocList:function(){return _.map(this.props.designDocList,function(e){return u["default"].createElement("option",{key:e,value:e},e)})},selectDesignDoc:function(e){this.props.onSelectDesignDoc(e.target.value)},updateDesignDocName:function(e){this.props.onChangeNewDesignDocName(e.target.value)},getNewDDocField:function(){if("new-doc"===this.props.selectedDesignDocName)return u["default"].createElement("div",{id:"new-ddoc-section",className:"span5"},u["default"].createElement("label",{className:"control-label",htmlFor:"new-ddoc"},"_design/"),u["default"].createElement("div",{className:"controls"},u["default"].createElement("input",{type:"text",ref:"newDesignDoc",id:"new-ddoc",placeholder:"newDesignDoc",onChange:this.updateDesignDocName})))},getDocLink:function(){return this.props.docLink?u["default"].createElement("a",{className:"help-link","data-bypass":"true",href:this.props.docLink,target:"_blank"},u["default"].createElement("i",{className:"icon-question-sign"})):null},render:function(){return u["default"].createElement("div",{className:"design-doc-group control-group"},u["default"].createElement("div",{className:"span3"},u["default"].createElement("label",{htmlFor:"ddoc"},this.props.designDocLabel,this.getDocLink()),u["default"].createElement("div",{className:"styled-select"},u["default"].createElement("label",{htmlFor:"js-backup-list-select"},u["default"].createElement("i",{className:"fonticon-down-dir"}),u["default"].createElement("select",{id:"ddoc",onChange:this.selectDesignDoc,value:this.props.selectedDesignDocName},u["default"].createElement("optgroup",{label:"Select a document"},u["default"].createElement("option",{value:"new-doc"},"New document"),this.getDocList()))))),this.getNewDDocField())}}),A=u["default"].createClass({displayName:"ReduceEditor",getStoreState:function(){return{reduce:y.getReduce(),reduceOptions:y.reduceOptions(),reduceSelectedOption:y.reduceSelectedOption(),hasCustomReduce:y.hasCustomReduce(),hasReduce:y.hasReduce()}},getInitialState:function(){return this.getStoreState()},getOptionsList:function(){return _.map(this.state.reduceOptions,function(e,t){return u["default"].createElement("option",{key:t,value:e},e)},this)},getReduceValue:function(){return this.state.hasReduce?this.state.hasCustomReduce?this.refs.reduceEditor.getValue():this.state.reduce:null},getEditor:function(){return this.refs.reduceEditor.getEditor()},render:function(){var e,t=this.getOptionsList();return this.state.hasCustomReduce&&(e=u["default"].createElement(E,{ref:"reduceEditor",id:"reduce-function",title:"Custom Reduce function",defaultCode:this.state.reduce,allowZenMode:!1,blur:this.updateReduceCode})),u["default"].createElement("div",null,u["default"].createElement("div",{className:"control-group"},u["default"].createElement("label",{htmlFor:"reduce-function-selector"},u["default"].createElement("span",null,"Reduce (optional)"),u["default"].createElement("a",{className:"help-link","data-bypass":"true",href:w("REDUCE_FUNCS"),target:"_blank"},u["default"].createElement("i",{className:"icon-question-sign"}))),u["default"].createElement(x,{selectContent:t,selectChange:this.selectChange,selectId:"reduce-function-selector",selectValue:this.state.reduceSelectedOption})),e)},updateReduceCode:function(e){g["default"].updateReduceCode(e)},selectChange:function(e){g["default"].selectReduceChanged(e.target.value)},onChange:function(){this.isMounted()&&this.setState(this.getStoreState())},componentDidMount:function(){y.on("change",this.onChange,this)},componentWillUnmount:function(){y.off("change",this.onChange)}}),T=u["default"].createClass({displayName:"EditorController",getStoreState:function(){return{database:y.getDatabase(),isNewView:y.isNewView(),viewName:y.getViewName(),designDocs:y.getDesignDocs(),designDocList:y.getAvailableDesignDocs(),originalViewName:y.getOriginalViewName(),originalDesignDocName:y.getOriginalDesignDocName(),newDesignDoc:y.isNewDesignDoc(),designDocId:y.getDesignDocId(),newDesignDocName:y.getNewDesignDocName(),saveDesignDoc:y.getSaveDesignDoc(),map:y.getMap(),isLoading:y.isLoading()}},getInitialState:function(){return this.getStoreState()},onChange:function(){this.isMounted()&&this.setState(this.getStoreState())},componentDidMount:function(){y.on("change",this.onChange,this)},componentWillUnmount:function(){y.off("change",this.onChange)},componentDidUpdate:function(e,t){this.state.map!==t.map&&this.refs.mapEditor&&this.refs.mapEditor.update()},hasErrors:function(){var e=this.refs.mapEditor.getEditor().hasErrors(),t=!!y.hasCustomReduce()&&this.refs.reduceEditor.getEditor().hasErrors();return e||t},saveView:function(e){if(e.preventDefault(),this.refs.designDocSelector.validate())return this.hasErrors()?void s["default"].addNotification({msg:"Please fix the Javascript errors and try again.",type:"error",clear:!0}):void g["default"].saveView({database:this.state.database,newView:this.state.isNewView,viewName:this.state.viewName,designDoc:this.state.saveDesignDoc,designDocId:this.state.designDocId,newDesignDoc:this.state.newDesignDoc,originalViewName:this.state.originalViewName,originalDesignDocName:this.state.originalDesignDocName,map:this.refs.mapEditor.getValue(),reduce:this.refs.reduceEditor.getReduceValue(),designDocs:this.state.designDocs})},viewChange:function(e){g["default"].changeViewName(e.target.value)},updateMapCode:function(e){g["default"].updateMapCode(e)},render:function(){if(this.state.isLoading)return u["default"].createElement("div",{className:"define-view"},u["default"].createElement(k,null));var e=this.state.isNewView?"New View":"Edit View",t=this.state.isNewView?"Create Document and Build Index":"Save Document and Build Index",n="#"+s["default"].urls("view","showView",this.state.database.id,this.state.designDocId,this.state.viewName);return u["default"].createElement("div",{className:"define-view"},u["default"].createElement("form",{className:"form-horizontal view-query-save",onSubmit:this.saveView},u["default"].createElement("h3",{className:"simple-header"},e),u["default"].createElement("div",{className:"new-ddoc-section"},u["default"].createElement(S,{ref:"designDocSelector",designDocList:this.state.designDocList,selectedDesignDocName:this.state.designDocId,newDesignDocName:this.state.newDesignDocName,onSelectDesignDoc:g["default"].selectDesignDoc,onChangeNewDesignDocName:g["default"].updateNewDesignDocName,docLink:w("DESIGN_DOCS")})),u["default"].createElement("div",{className:"control-group"},u["default"].createElement("label",{htmlFor:"index-name"},u["default"].createElement("span",null,"Index name"),u["default"].createElement("a",{className:"help-link","data-bypass":"true",href:w("VIEW_FUNCS"),target:"_blank"},u["default"].createElement("i",{className:"icon-question-sign"}))),u["default"].createElement("input",{type:"text",id:"index-name",value:this.state.viewName,onChange:this.viewChange,placeholder:"Index name"})),u["default"].createElement(E,{id:"map-function",ref:"mapEditor",title:"Map function",docLink:w("MAP_FUNCS"),blur:this.updateMapCode,allowZenMode:!1,defaultCode:this.state.map}),u["default"].createElement(A,{ref:"reduceEditor"}),u["default"].createElement("div",{className:"padded-box"},u["default"].createElement("div",{className:"control-group"},u["default"].createElement(C,{id:"save-view",text:t}),u["default"].createElement("a",{href:n,className:"index-cancel-link"},"Cancel")))))}});t["default"]={EditorController:T,ReduceEditor:A,DesignDocSelector:S,StyledSelect:x}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(99),o=r(i),a=n(705),s=r(a),l=n(671),u=r(l),c={};c.IndexEditorStore=o["default"].Store.extend({defaultMap:"function (doc) {\n  emit(doc._id, 1);\n}",defaultReduce:"function (keys, values, rereduce) {\n  if (rereduce) {\n    return sum(values);\n  } else {\n    return values.length;\n  }\n}",initialize:function(){this.reset()},reset:function(){this._designDocs=[],this._isLoading=!0,this._view={reduce:"",map:this.defaultMap},this._database={id:"0"}},editIndex:function(e){this._database=e.database,this._newView=e.newView,this._viewName=e.viewName||"viewName",this._newDesignDoc=e.newDesignDoc||!1,this._newDesignDocName="",this._designDocs=e.designDocs,this._designDocId=e.designDocId,this._originalViewName=this._viewName,this._originalDesignDocName=e.designDocId,this.setView(),this._isLoading=!1},isLoading:function(){return this._isLoading},setView:function(){this._newView||this._newDesignDoc?this._view={reduce:"",map:this.defaultMap}:this._view=this.getDesignDoc().get("views")[this._viewName]},getDatabase:function(){return this._database},getMap:function(){return this._view.map},setMap:function(e){this._view.map=e},getReduce:function(){return this._view.reduce},setReduce:function(e){
this._view.reduce=e},getDesignDoc:function(){return this._designDocs.find(function(e){return this._designDocId==e.id},this).dDocModel()},getDesignDocs:function(){return this._designDocs},getAvailableDesignDocs:function(){var e=this.getDesignDocs().filter(function(e){return!e.isMangoDoc()});return _.map(e,function(e){return e.id})},getDesignDocId:function(){return this._designDocId},setDesignDocId:function(e){this._designDocId=e},isNewDesignDoc:function(){return this._newDesignDoc},isNewView:function(){return this._newView},getViewName:function(){return this._viewName},setViewName:function(e){this._viewName=e},hasCustomReduce:function(){return!!this.hasReduce()&&!_.contains(this.builtInReduces(),this.getReduce())},hasReduce:function(){return!!this.getReduce()},getOriginalViewName:function(){return this._originalViewName},getOriginalDesignDocName:function(){return this._originalDesignDocName},builtInReduces:function(){return["_sum","_count","_stats"]},reduceSelectedOption:function(){return this.hasReduce()?this.hasCustomReduce()?"CUSTOM":this.getReduce():"NONE"},reduceOptions:function(){return this.builtInReduces().concat(["CUSTOM","NONE"])},updateReduceFromSelect:function(e){return"NONE"===e?void this.setReduce(null):"CUSTOM"===e?void this.setReduce(this.defaultReduce):void this.setReduce(e)},addDesignDoc:function(e){this._designDocs.add(e,{merge:!0}),this._designDocId=e._id},getNewDesignDocName:function(){return this._newDesignDocName},getSaveDesignDoc:function(){if("new-doc"===this._designDocId){var e={_id:"_design/"+this._newDesignDocName,views:{},language:"javascript"};return new u["default"].Doc(e,{database:this._database})}var t=this._designDocs.find(function(e){return e.id===this._designDocId}.bind(this));return t?t.dDocModel():null},dispatch:function(e){switch(e.type){case s["default"].CLEAR_INDEX:this.reset();break;case s["default"].EDIT_INDEX:this.editIndex(e.options);break;case s["default"].VIEW_NAME_CHANGE:this.setViewName(e.name);break;case s["default"].EDIT_NEW_INDEX:this.editIndex(e.options);break;case s["default"].SELECT_REDUCE_CHANGE:this.updateReduceFromSelect(e.reduceSelectedOption);break;case s["default"].DESIGN_DOC_CHANGE:this.setDesignDocId(e.options.value);break;case s["default"].VIEW_SAVED:break;case s["default"].VIEW_CREATED:break;case s["default"].VIEW_ADD_DESIGN_DOC:this.addDesignDoc(e.designDoc),this.setView();break;case s["default"].VIEW_UPDATE_MAP_CODE:this.setMap(e.code);break;case s["default"].VIEW_UPDATE_REDUCE_CODE:this.setReduce(e.code);break;case s["default"].DESIGN_DOC_NEW_NAME_UPDATED:this._newDesignDocName=e.options.value;break;default:return}this.triggerChange()}}),c.indexEditorStore=new c.IndexEditorStore,c.indexEditorStore.dispatchToken=o["default"].dispatcher.register(c.indexEditorStore.dispatch),t["default"]=c},function(e,t){"use strict";var n=null;window.PR_SHOULD_USE_CONTINUATION=!0,function(){function e(e){function t(e){var t=e.charCodeAt(0);if(92!==t)return t;var n=e.charAt(1);return(t=d[n])?t:"0"<=n&&n<="7"?parseInt(e.substring(1),8):"u"===n||"x"===n?parseInt(e.substring(2),16):e.charCodeAt(1)}function n(e){return e<32?(e<16?"\\x0":"\\x")+e.toString(16):(e=String.fromCharCode(e),"\\"!==e&&"-"!==e&&"["!==e&&"]"!==e||(e="\\"+e),e)}function r(e){for(var r=e.substring(1,e.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),e=[],i=[],o="^"===r[0],a=o?1:0,s=r.length;a<s;++a){var l=r[a];if(/\\[bdsw]/i.test(l))e.push(l);else{var u,l=t(l);a+2<s&&"-"===r[a+1]?(u=t(r[a+2]),a+=2):u=l,i.push([l,u]),u<65||l>122||(u<65||l>90||i.push([32|Math.max(65,l),32|Math.min(u,90)]),u<97||l>122||i.push([Math.max(97,l)&-33,Math.min(u,122)&-33]))}}for(i.sort(function(e,t){return e[0]-t[0]||t[1]-e[1]}),r=[],l=[NaN,NaN],a=0;a<i.length;++a)s=i[a],s[0]<=l[1]+1?l[1]=Math.max(l[1],s[1]):r.push(l=s);for(i=["["],o&&i.push("^"),i.push.apply(i,e),a=0;a<r.length;++a)s=r[a],i.push(n(s[0])),s[1]>s[0]&&(s[1]+1>s[0]&&i.push("-"),i.push(n(s[1])));return i.push("]"),i.join("")}function i(e){for(var t=e.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),n=t.length,i=[],s=0,l=0;s<n;++s){var u=t[s];"("===u?++l:"\\"===u.charAt(0)&&(u=+u.substring(1))&&u<=l&&(i[u]=-1)}for(s=1;s<i.length;++s)-1===i[s]&&(i[s]=++o);for(l=s=0;s<n;++s)u=t[s],"("===u?(++l,void 0===i[l]&&(t[s]="(?:")):"\\"===u.charAt(0)&&(u=+u.substring(1))&&u<=l&&(t[s]="\\"+i[l]);for(l=s=0;s<n;++s)"^"===t[s]&&"^"!==t[s+1]&&(t[s]="");if(e.ignoreCase&&a)for(s=0;s<n;++s)u=t[s],e=u.charAt(0),u.length>=2&&"["===e?t[s]=r(u):"\\"!==e&&(t[s]=u.replace(/[A-Za-z]/g,function(e){return e=e.charCodeAt(0),"["+String.fromCharCode(e&-33,32|e)+"]"}));return t.join("")}for(var o=0,a=!1,s=!1,l=0,u=e.length;l<u;++l){var c=e[l];if(c.ignoreCase)s=!0;else if(/[a-z]/i.test(c.source.replace(/\\u[\da-f]{4}|\\x[\da-f]{2}|\\[^UXux]/gi,""))){a=!0,s=!1;break}}for(var d={b:8,t:9,n:10,v:11,f:12,r:13},f=[],l=0,u=e.length;l<u;++l){if(c=e[l],c.global||c.multiline)throw Error(""+c);f.push("(?:"+i(c)+")")}return RegExp(f.join("|"),s?"gi":"g")}function t(e){function t(e){switch(e.nodeType){case 1:if(i.test(e.className))break;for(var n=e.firstChild;n;n=n.nextSibling)t(n);n=e.nodeName,"BR"!==n&&"LI"!==n||(o[l]="\n",s[l<<1]=a++,s[l++<<1|1]=e);break;case 3:case 4:n=e.nodeValue,n.length&&(n=u?n.replace(/\r\n?/g,"\n"):n.replace(/[\t\n\r ]+/g," "),o[l]=n,s[l<<1]=a,a+=n.length,s[l++<<1|1]=e)}}var r,i=/(?:^|\s)nocode(?:\s|$)/,o=[],a=0,s=[],l=0;e.currentStyle?r=e.currentStyle.whiteSpace:window.getComputedStyle&&(r=document.defaultView.getComputedStyle(e,n).getPropertyValue("white-space"));var u=r&&"pre"===r.substring(0,3);return t(e),{a:o.join("").replace(/\n$/,""),c:s}}function r(e,t,n,r){t&&(e={a:t,d:e},n(e),r.push.apply(r,e.e))}function i(t,i){function o(e){for(var t=e.d,n=[t,"pln"],c=0,d=e.a.match(a)||[],f={},p=0,h=d.length;p<h;++p){var g,m=d[p],v=f[m],b=void 0;if("string"==typeof v)g=!1;else{var y=s[m.charAt(0)];if(y)b=m.match(y[1]),v=y[0];else{for(g=0;g<u;++g)if(y=i[g],b=m.match(y[1])){v=y[0];break}b||(v="pln")}!(g=v.length>=5&&"lang-"===v.substring(0,5))||b&&"string"==typeof b[1]||(g=!1,v="src"),g||(f[m]=v)}if(y=c,c+=m.length,g){g=b[1];var w=m.indexOf(g),x=w+g.length;b[2]&&(x=m.length-b[2].length,w=x-g.length),v=v.substring(5),r(t+y,m.substring(0,w),o,n),r(t+y+w,g,l(v,g),n),r(t+y+x,m.substring(x),o,n)}else n.push(t+y,v)}e.e=n}var a,s={};!function(){for(var r=t.concat(i),o=[],l={},u=0,c=r.length;u<c;++u){var d=r[u],f=d[3];if(f)for(var p=f.length;--p>=0;)s[f.charAt(p)]=d;d=d[1],f=""+d,l.hasOwnProperty(f)||(o.push(d),l[f]=n)}o.push(/[\S\s]/),a=e(o)}();var u=i.length;return o}function o(e){var t=[],r=[];e.tripleQuotedStrings?t.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,n,"'\""]):e.multiLineStrings?t.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/,n,"'\"`"]):t.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,n,"\"'"]),e.verbatimStrings&&r.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,n]);var o=e.hashComments;return o&&(e.cStyleComments?(o>1?t.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,n,"#"]):t.push(["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,n,"#"]),r.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,n])):t.push(["com",/^#[^\n\r]*/,n,"#"])),e.cStyleComments&&(r.push(["com",/^\/\/[^\n\r]*/,n]),r.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,n])),e.regexLiterals&&r.push(["lang-regex",/^(?:^^\.?|[!+-]|!=|!==|#|%|%=|&|&&|&&=|&=|\(|\*|\*=|\+=|,|-=|->|\/|\/=|:|::|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|[?@[^]|\^=|\^\^|\^\^=|{|\||\|=|\|\||\|\|=|~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\s*(\/(?=[^*\/])(?:[^\/[\\]|\\[\S\s]|\[(?:[^\\\]]|\\[\S\s])*(?:]|$))+\/)/]),(o=e.types)&&r.push(["typ",o]),e=(""+e.keywords).replace(/^ | $/g,""),e.length&&r.push(["kwd",RegExp("^(?:"+e.replace(/[\s,]+/g,"|")+")\\b"),n]),t.push(["pln",/^\s+/,n," \r\n\t "]),r.push(["lit",/^@[$_a-z][\w$@]*/i,n],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,n],["pln",/^[$_a-z][\w$@]*/i,n],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,n,"0123456789"],["pln",/^\\[\S\s]?/,n],["pun",/^.[^\s\w"-$'.\/@\\`]*/,n]),i(t,r)}function a(e,t){function r(e){switch(e.nodeType){case 1:if(a.test(e.className))break;if("BR"===e.nodeName)i(e),e.parentNode&&e.parentNode.removeChild(e);else for(e=e.firstChild;e;e=e.nextSibling)r(e);break;case 3:case 4:if(u){var t=e.nodeValue,n=t.match(s);if(n){var o=t.substring(0,n.index);e.nodeValue=o,(t=t.substring(n.index+n[0].length))&&e.parentNode.insertBefore(l.createTextNode(t),e.nextSibling),i(e),o||e.parentNode.removeChild(e)}}}}function i(e){function t(e,n){var r=n?e.cloneNode(!1):e,i=e.parentNode;if(i){var i=t(i,1),o=e.nextSibling;i.appendChild(r);for(var a=o;a;a=o)o=a.nextSibling,i.appendChild(a)}return r}for(;!e.nextSibling;)if(e=e.parentNode,!e)return;for(var n,e=t(e.nextSibling,0);(n=e.parentNode)&&1===n.nodeType;)e=n;c.push(e)}var o,a=/(?:^|\s)nocode(?:\s|$)/,s=/\r\n?|\n/,l=e.ownerDocument;e.currentStyle?o=e.currentStyle.whiteSpace:window.getComputedStyle&&(o=l.defaultView.getComputedStyle(e,n).getPropertyValue("white-space"));var u=o&&"pre"===o.substring(0,3);for(o=l.createElement("LI");e.firstChild;)o.appendChild(e.firstChild);for(var c=[o],d=0;d<c.length;++d)r(c[d]);t===(0|t)&&c[0].setAttribute("value",t);var f=l.createElement("OL");f.className="linenums";for(var p=Math.max(0,t-1|0)||0,d=0,h=c.length;d<h;++d)o=c[d],o.className="L"+(d+p)%10,o.firstChild||o.appendChild(l.createTextNode(" ")),f.appendChild(o);e.appendChild(f)}function s(e,t){for(var n=t.length;--n>=0;){var r=t[n];w.hasOwnProperty(r)?window.console&&console.warn("cannot override language handler %s",r):w[r]=e}}function l(e,t){return e&&w.hasOwnProperty(e)||(e=/^\s*</.test(t)?"default-markup":"default-code"),w[e]}function u(e){var n=e.g;try{var r=t(e.h),i=r.a;e.a=i,e.c=r.c,e.d=0,l(n,i)(e);var o=/\bMSIE\b/.test(navigator.userAgent),n=/\n/g,a=e.a,s=a.length,r=0,u=e.c,c=u.length,i=0,d=e.e,f=d.length,e=0;d[f]=s;var p,h;for(h=p=0;h<f;)d[h]!==d[h+2]?(d[p++]=d[h++],d[p++]=d[h++]):h+=2;for(f=p,h=p=0;h<f;){for(var g=d[h],m=d[h+1],v=h+2;v+2<=f&&d[v+1]===m;)v+=2;d[p++]=g,d[p++]=m,h=v}for(d.length=p;i<c;){var b,y=u[i+2]||s,w=d[e+2]||s,v=Math.min(y,w),x=u[i+1];if(1!==x.nodeType&&(b=a.substring(r,v))){o&&(b=b.replace(n,"\r")),x.nodeValue=b;var _=x.ownerDocument,E=_.createElement("SPAN");E.className=d[e+1];var C=x.parentNode;C.replaceChild(E,x),E.appendChild(x),r<y&&(u[i+1]=x=_.createTextNode(a.substring(v,y)),C.insertBefore(x,E.nextSibling))}r=v,r>=y&&(i+=2),r>=w&&(e+=2)}}catch(k){"console"in window&&console.log(k&&k.stack?k.stack:k)}}var c=["break,continue,do,else,for,if,return,while"],d=[[c,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],f=[d,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],p=[d,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"],h=[p,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"],d=[d,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],g=[c,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],m=[c,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],c=[c,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],v=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/,b=/\S/,y=o({keywords:[f,h,d,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END"+g,m,c],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),w={};s(y,["default-code"]),s(i([],[["pln",/^[^<?]+/],["dec",/^<!\w[^>]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]),s(i([["pln",/^\s+/,n," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,n,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'\/>]|\/(?=\s)))/],["pun",/^[\/<->]+/],["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css",/^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]),s(i([],[["atv",/^[\S\s]+/]]),["uq.val"]),s(o({keywords:f,hashComments:!0,cStyleComments:!0,types:v}),["c","cc","cpp","cxx","cyc","m"]),s(o({keywords:"null,true,false"}),["json"]),s(o({keywords:h,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:v}),["cs"]),s(o({keywords:p,cStyleComments:!0}),["java"]),s(o({keywords:c,hashComments:!0,multiLineStrings:!0}),["bsh","csh","sh"]),s(o({keywords:g,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py"]),s(o({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["perl","pl","pm"]),s(o({keywords:m,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb"]),s(o({keywords:d,cStyleComments:!0,regexLiterals:!0}),["js"]),s(o({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes",hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),s(i([],[["str",/^[\S\s]+/]]),["regex"]),window.prettyPrintOne=function(e,t,n){var r=document.createElement("PRE");return r.innerHTML=e,n&&a(r,n),u({g:t,i:n,h:r}),r.innerHTML},window.prettyPrint=function(e){function t(){for(var n=window.PR_SHOULD_USE_CONTINUATION?c.now()+250:1/0;f<i.length&&c.now()<n;f++){var r=i[f],o=r.className;if(o.indexOf("prettyprint")>=0){var s,l,o=o.match(p);if(l=!o){l=r;for(var h=void 0,g=l.firstChild;g;g=g.nextSibling)var m=g.nodeType,h=1===m?h?l:g:3===m&&b.test(g.nodeValue)?l:h;l=(s=h===l?void 0:h)&&"CODE"===s.tagName}for(l&&(o=s.className.match(p)),o&&(o=o[1]),l=!1,h=r.parentNode;h;h=h.parentNode)if(("pre"===h.tagName||"code"===h.tagName||"xmp"===h.tagName)&&h.className&&h.className.indexOf("prettyprint")>=0){l=!0;break}l||((l=!!(l=r.className.match(/\blinenums\b(?::(\d+))?/))&&(!l[1]||!l[1].length||+l[1]))&&a(r,l),d={g:o,h:r,i:l},u(d))}}f<i.length?setTimeout(t,250):e&&e()}for(var r=[document.getElementsByTagName("pre"),document.getElementsByTagName("code"),document.getElementsByTagName("xmp")],i=[],o=0;o<r.length;++o)for(var s=0,l=r[o].length;s<l;++s)i.push(r[o][s]);var r=n,c=Date;c.now||(c={now:function(){return+new Date}});var d,f=0,p=/\blang(?:uage)?-([\w.]+)(?!\S)/;t()},window.PR={createSimpleLexer:i,registerLangHandler:s,sourceDecorator:o,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:"com",PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:"lit",PR_NOCODE:"nocode",PR_PLAIN:"pln",PR_PUNCTUATION:"pun",PR_SOURCE:"src",PR_STRING:"str",PR_TAG:"tag",PR_TYPE:"typ"}}()},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(84),o=r(i),a=n(99),s=r(a),l=n(710),u=r(l),c=n(711),d=r(c);d["default"].queryOptionsStore;t["default"]={toggleIncludeDocs:function(){s["default"].dispatch({type:u["default"].QUERY_TOGGLE_INCLUDE_DOCS})},toggleByKeys:function(){s["default"].dispatch({type:u["default"].QUERY_TOGGLE_BY_KEYS})},toggleBetweenKeys:function(){s["default"].dispatch({type:u["default"].QUERY_TOGGLE_BETWEEN_KEYS})},toggleDescending:function(){s["default"].dispatch({type:u["default"].QUERY_TOGGLE_DESCENDING})},toggleReduce:function(){s["default"].dispatch({type:u["default"].QUERY_TOGGLE_REDUCE})},updateBetweenKeys:function(e){s["default"].dispatch({type:u["default"].QUERY_UPDATE_BETWEEN_KEYS,betweenKeys:e})},updateByKeys:function(e){s["default"].dispatch({type:u["default"].QUERY_UPDATE_BY_KEYS,byKeys:e})},updateSkip:function(e){s["default"].dispatch({type:u["default"].QUERY_UPDATE_SKIP,skip:e})},updateLimit:function(e){s["default"].dispatch({type:u["default"].QUERY_UPDATE_LIMIT,limit:e})},runQuery:function(e){var t=o["default"].utils.replaceQueryParams(e);s["default"].navigate(t)},toggleQueryBarVisibility:function(e){s["default"].dispatch({type:u["default"].QUERY_UPDATE_VISIBILITY,options:e})},updateGroupLevel:function(e){s["default"].dispatch({type:u["default"].QUERY_UPDATE_GROUP_LEVEL,groupLevel:e})},reset:function(e){s["default"].dispatch({type:u["default"].QUERY_RESET,params:e.queryParams}),e.showReduce&&s["default"].dispatch({type:u["default"].QUERY_SHOW_REDUCE})},showQueryOptions:function(){s["default"].dispatch({type:u["default"].QUERY_SHOW})},hideQueryOptions:function(){s["default"].dispatch({type:u["default"].QUERY_HIDE})}}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]={QUERY_TOGGLE_INCLUDE_DOCS:"QUERY_TOGGLE_INCLUDE_DOCS",QUERY_TOGGLE_BY_KEYS:"QUERY_TOGGLE_BY_KEYS",QUERY_TOGGLE_BETWEEN_KEYS:"QUERY_TOGGLE_BETWEEN_KEYS",QUERY_UPDATE_BETWEEN_KEYS:"QUERY_UPDATE_BETWEEN_KEYS",QUERY_UPDATE_BY_KEYS:"QUERY_UPDATE_BY_KEYS",QUERY_TOGGLE_DESCENDING:"QUERY_TOGGLE_DESCENDING",QUERY_TOGGLE_REDUCE:"QUERY_TOGGLE_REDUCE",QUERY_UPDATE_SKIP:"QUERY_UPDATE_SKIP",QUERY_UPDATE_LIMIT:"QUERY_UPDATE_LIMIT",QUERY_RESET:"QUERY_RESET",QUERY_SHOW_REDUCE:"QUERY_SHOW_REDUCE",QUERY_UPDATE_GROUP_LEVEL:"QUERY_UPDATE_GROUP_LEVEL",QUERY_UPDATE_VISIBILITY:"QUERY_UPDATE_VISIBILITY",QUERY_SHOW:"QUERY_SHOW",QUERY_HIDE:"QUERY_HIDE"}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(84),o=(r(i),n(99)),a=r(o),s=n(710),l=r(s),u={};u.QueryOptionsStore=a["default"].Store.extend({initialize:function(){this._trayVisible=!1,this.reset()},reset:function(){this._isVisible=!0,this._loading=!0,this._showByKeys=!1,this._showBetweenKeys=!1,this._includeDocs=!1,this._betweenKeys={include:!0},this._byKeys="",this._descending=!1,this._skip="",this._limit="none",this._reduce=!1,this._groupLevel="exact",this._showReduce=!1},isLoading:function(){return this._loading},isVisible:function(){return this._isVisible},hideQueryOptions:function(){this._isVisible=!1},showQueryOptions:function(){this._isVisible=!0},setTrayVisible:function(e){this._trayVisible=e},getTrayVisible:function(){return this._trayVisible},showReduce:function(){return this._showReduce},reduce:function(){return this._reduce},betweenKeys:function(){return this._betweenKeys},updateBetweenKeys:function(e){this._betweenKeys=e},updateSkip:function(e){this._skip=e},skip:function(){return this._skip},limit:function(){return this._limit},updateLimit:function(e){this._limit=e},byKeys:function(){return this._byKeys},updateByKeys:function(e){this._byKeys=e},includeDocs:function(){return this._includeDocs},descending:function(){return this._descending},groupLevel:function(){return this._groupLevel},toggleByKeys:function(){this._showByKeys=!this._showByKeys,this._showByKeys&&(this._showBetweenKeys=!1)},toggleBetweenKeys:function(){this._showBetweenKeys=!this._showBetweenKeys,this._showBetweenKeys&&(this._showByKeys=!1)},showByKeys:function(){return this._showByKeys},showBetweenKeys:function(){return this._showBetweenKeys},updateGroupLevel:function(e){this._groupLevel=e},setQueryParams:function(e){if(this.reset(),e.include_docs&&(this._includeDocs=!0),e.start_key||e.end_key){var t=!0;e.inclusive_end&&(t="true"===e.inclusive_end),this._betweenKeys={include:t},e.start_key&&(this._betweenKeys.startkey=e.start_key),e.end_key&&(this._betweenKeys.endkey=e.end_key),this._showBetweenKeys=!0}else e.keys&&(this._byKeys=e.keys,this._showByKeys=!0);e.limit&&"none"!==e.limit&&(this._limit=e.limit),e.skip&&(this._skip=e.skip),e.descending&&(this._descending=e.descending),e.reduce&&(e.group?this._groupLevel="exact":this._groupLevel=e.group_level,this._reduce=!0)},getQueryParams:function(){var e={};if(this._includeDocs&&(e.include_docs=this._includeDocs),this._showBetweenKeys){var t=this._betweenKeys;e.inclusive_end=t.include,t.startkey&&""!==t.startkey&&(e.start_key=t.startkey),t.endkey&&""!==t.endkey&&(e.end_key=t.endkey)}else this._showByKeys&&(e.keys=this._byKeys.replace(/\r?\n/g,""));return"none"!==this._limit&&(e.limit=parseInt(this._limit,10)),this._skip&&(e.skip=parseInt(this._skip,10)),this._descending&&(e.descending=this._descending),this._reduce&&(e.reduce=!0,"exact"===this._groupLevel?e.group=!0:e.group_level=this._groupLevel),e},getIncludeDocsEnabled:function(){return this._includeDocs},dispatch:function(e){switch(e.type){case l["default"].QUERY_RESET:this.setQueryParams(e.params);break;case l["default"].QUERY_TOGGLE_INCLUDE_DOCS:this._includeDocs=!this._includeDocs;break;case l["default"].QUERY_TOGGLE_DESCENDING:this._descending=!this._descending;break;case l["default"].QUERY_TOGGLE_BY_KEYS:this.toggleByKeys();break;case l["default"].QUERY_TOGGLE_BETWEEN_KEYS:this.toggleBetweenKeys();break;case l["default"].QUERY_UPDATE_BETWEEN_KEYS:this.updateBetweenKeys(e.betweenKeys);break;case l["default"].QUERY_UPDATE_BY_KEYS:this.updateByKeys(e.byKeys);break;case l["default"].QUERY_UPDATE_SKIP:this.updateSkip(e.skip);break;case l["default"].QUERY_UPDATE_LIMIT:this.updateLimit(e.limit);break;case l["default"].QUERY_SHOW_REDUCE:this._showReduce=!0;break;case l["default"].QUERY_TOGGLE_REDUCE:this._reduce=!this._reduce;break;case l["default"].QUERY_UPDATE_GROUP_LEVEL:this.updateGroupLevel(e.groupLevel);break;case l["default"].QUERY_UPDATE_VISIBILITY:this.setTrayVisible(e.options);break;case l["default"].QUERY_HIDE:this.hideQueryOptions();break;case l["default"].QUERY_SHOW:this.showQueryOptions();break;default:return}this.triggerChange()}}),u.queryOptionsStore=new u.QueryOptionsStore,u.queryOptionsStore.dispatchToken=a["default"].dispatcher.register(u.queryOptionsStore.dispatch),t["default"]=u},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(84),o=(r(i),n(99)),a=(r(o),n(291)),s=(r(a),n(671)),l=(r(s),n(670)),u=(r(l),n(106)),c=r(u),d=n(713),f=r(d),p=n(709),h=(r(p),n(714)),g=r(h),m=n(697),v=r(m),b=n(715),y=r(b),w=(v["default"].indexResultsStore,f["default"].QueryOptionsController),x=function(e){var t=e.database;return c["default"].createElement("div",{className:"header-right right-db-header flex-layout flex-row"},c["default"].createElement("div",{className:"faux-header__searchboxwrapper"},c["default"].createElement("div",{className:"faux-header__searchboxcontainer"},c["default"].createElement(g["default"],{loadOptions:y["default"].fetchAllDocsWithKey(t),database:t}))),c["default"].createElement(w,null))};x.propTypes={database:c["default"].PropTypes.object.isRequired},t["default"]=x},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(84),o=(r(i),n(99)),a=r(o),s=n(106),l=r(s),u=n(137),c=r(u),d=n(711),f=r(d),p=n(709),h=r(p),g=n(293),m=r(g),v=m["default"].connectToStores,b=m["default"].TrayWrapper,y=m["default"].ToggleHeaderButton,w=m["default"].TrayContents,x=f["default"].queryOptionsStore,_=l["default"].createClass({displayName:"MainFieldsView",propTypes:{toggleIncludeDocs:l["default"].PropTypes.func.isRequired,includeDocs:l["default"].PropTypes.bool.isRequired,reduce:l["default"].PropTypes.bool.isRequired,toggleReduce:l["default"].PropTypes.func,updateGroupLevel:l["default"].PropTypes.func,docURL:l["default"].PropTypes.string},getDefaultProps:function(){return{docURL:a["default"].constants.DOC_URLS.GENERAL}},toggleIncludeDocs:function(e){this.props.toggleIncludeDocs(e)},groupLevelChange:function(e){this.props.updateGroupLevel(e.target.value)},groupLevel:function(){return this.props.reduce?l["default"].createElement("label",{className:"drop-down inline",id:"qoGroupLevelGroup"},"Group Level",l["default"].createElement("select",{onChange:this.groupLevelChange,id:"qoGroupLevel",value:this.props.groupLevel,name:"group_level",className:"input-small"},l["default"].createElement("option",{value:"0"},"None"),l["default"].createElement("option",{value:"1"},"1"),l["default"].createElement("option",{value:"2"},"2"),l["default"].createElement("option",{value:"3"},"3"),l["default"].createElement("option",{value:"4"},"4"),l["default"].createElement("option",{value:"5"},"5"),l["default"].createElement("option",{value:"6"},"6"),l["default"].createElement("option",{value:"7"},"7"),l["default"].createElement("option",{value:"8"},"8"),l["default"].createElement("option",{value:"9"},"9"),l["default"].createElement("option",{value:"exact"},"Exact"))):null},reduce:function(){return this.props.showReduce?l["default"].createElement("span",null,l["default"].createElement("div",{className:"checkbox inline"},l["default"].createElement("input",{id:"qoReduce",name:"reduce",onChange:this.props.toggleReduce,type:"checkbox",checked:this.props.reduce}),l["default"].createElement("label",{htmlFor:"qoReduce"},"Reduce")),this.groupLevel()):null},render:function(){var e=this.props.includeDocs;return l["default"].createElement("div",{className:"query-group",id:"query-options-main-fields"},l["default"].createElement("span",{className:"add-on"},"Query Options",l["default"].createElement("a",{className:"help-link",href:this.props.docURL,target:"_blank","data-bypass":"true"},l["default"].createElement("i",{className:"icon-question-sign"}))),l["default"].createElement("div",{className:"controls-group qo-main-fields-row"},l["default"].createElement("div",{className:"row-fluid fieldsets"},l["default"].createElement("div",{className:"checkbox inline"},l["default"].createElement("input",{disabled:this.props.reduce,onChange:this.toggleIncludeDocs,id:"qoIncludeDocs",name:"include_docs",type:"checkbox",checked:e}),l["default"].createElement("label",{className:this.props.reduce?"disabled":"",htmlFor:"qoIncludeDocs",id:"qoIncludeDocsLabel"},"Include Docs")),this.reduce())))}}),E=l["default"].createClass({displayName:"KeySearchFields",toggleByKeys:function(){this.props.toggleByKeys()},toggleBetweenKeys:function(){this.props.toggleBetweenKeys()},updateBetweenKeys:function(){this.props.updateBetweenKeys({startkey:c["default"].findDOMNode(this.refs.startkey).value,endkey:c["default"].findDOMNode(this.refs.endkey).value,include:this.props.betweenKeys.include})},updateInclusiveEnd:function(){this.props.updateBetweenKeys({include:!this.props.betweenKeys.include,startkey:this.props.betweenKeys.startkey,endkey:this.props.betweenKeys.endkey})},updateByKeys:function(e){this.props.updateByKeys(e.target.value)},render:function(){var e="controls-group well js-query-keys-wrapper ",t="row-fluid js-keys-section ",n=t,r="drop-down btn ",i=r;return this.props.showByKeys||this.props.showBetweenKeys||(e+="hide"),this.props.showByKeys?r+="active":t+="hide",this.props.showBetweenKeys?i+="active":n+="hide",l["default"].createElement("div",{className:"query-group",id:"query-options-key-search"},l["default"].createElement("div",{className:"add-on"},"Keys"),l["default"].createElement("div",{className:"btn-group toggle-btns row-fluid"},l["default"].createElement("label",{style:{width:"101px"},id:"byKeys",onClick:this.toggleByKeys,className:r},"By Key(s)"),l["default"].createElement("label",{style:{width:"101px"},id:"betweenKeys",onClick:this.toggleBetweenKeys,className:i},"Between Keys")),l["default"].createElement("div",{className:e},l["default"].createElement("div",{className:t,id:"js-showKeys"},l["default"].createElement("div",{className:"controls controls-row"},l["default"].createElement("label",{htmlFor:"keys-input",className:"drop-down"},"A key, or an array of keys."),l["default"].createElement("textarea",{value:this.props.byKeys,onChange:this.updateByKeys,id:"keys-input",className:"input-xxlarge",rows:"5",type:"text",placeholder:'Enter either a single key ["123"] or an array of keys ["123", "456"].\nA key value is the first parameter emitted in a map function. For example emit("123", 1) the key is "123".'}),l["default"].createElement("div",{id:"keys-error",className:"inline-block js-keys-error"}))),l["default"].createElement("div",{className:n,id:"js-showStartEnd"},l["default"].createElement("div",{className:"controls controls-row"},l["default"].createElement("div",null,l["default"].createElement("label",{htmlFor:"startkey",className:"drop-down"},"Start key"),l["default"].createElement("input",{id:"startkey",ref:"startkey",type:"text",onChange:this.updateBetweenKeys,value:this.props.betweenKeys.startkey,placeholder:'e.g., "1234"'})),l["default"].createElement("div",null,l["default"].createElement("label",{htmlFor:"endkey",className:"drop-down"},"End key"),l["default"].createElement("input",{id:"endkey",ref:"endkey",onChange:this.updateBetweenKeys,value:this.props.betweenKeys.endkey,type:"text",placeholder:'e.g., "1234"'}),l["default"].createElement("div",{className:"controls include-end-key-row checkbox controls-row inline"},l["default"].createElement("input",{id:"qoIncludeEndKeyInResults",ref:"inclusive_end",type:"checkbox",onChange:this.updateInclusiveEnd,checked:this.props.betweenKeys.include}),l["default"].createElement("label",{htmlFor:"qoIncludeEndKeyInResults"},"Include End Key in results")))))))}}),C=l["default"].createClass({displayName:"AdditionalParams",updateSkip:function(e){e.preventDefault();var t=e.target.value;/^\d*$/.test(t)||(a["default"].addNotification({msg:"Skip can only be a number",type:"error"}),t=this.props.skip),this.props.updateSkip(t)},updateLimit:function(e){e.preventDefault(),this.props.updateLimit(e.target.value)},render:function(){return l["default"].createElement("div",{className:"query-group",id:"query-options-additional-params"},l["default"].createElement("div",{className:"add-on additionalParams"},"Additional Parameters"),l["default"].createElement("div",{className:"row-fluid fieldsets"},l["default"].createElement("div",{className:"dropdown inline"},l["default"].createElement("label",{className:"drop-down"},"Limit",l["default"].createElement("select",{id:"qoLimit",onChange:this.updateLimit,name:"limit",value:this.props.limit,className:"input-small"},l["default"].createElement("option",{value:"none"},"None"),l["default"].createElement("option",{value:5},"5"),l["default"].createElement("option",{value:10},"10"),l["default"].createElement("option",{value:20},"20"),l["default"].createElement("option",{value:30},"30"),l["default"].createElement("option",{value:50},"50"),l["default"].createElement("option",{value:100},"100"),l["default"].createElement("option",{value:500},"500"))))),l["default"].createElement("div",{className:"row-fluid fieldsets"
},l["default"].createElement("div",{className:"checkbox inline"},l["default"].createElement("input",{id:"qoDescending",type:"checkbox",onChange:this.props.toggleDescending,checked:this.props.descending}),l["default"].createElement("label",{htmlFor:"qoDescending"},"Descending")),l["default"].createElement("div",{className:"dropdown inline"},l["default"].createElement("label",{htmlFor:"qoSkip",className:"drop-down"},"Skip",l["default"].createElement("input",{value:this.props.skip,onChange:this.updateSkip,className:"input-small",type:"text",id:"qoSkip",placeholder:"# of rows"})))))}}),k=l["default"].createClass({displayName:"QueryButtons",propTypes:{onCancel:l["default"].PropTypes.func.isRequired},hideTray:function(e){this.props.onCancel()},render:function(){return l["default"].createElement("div",{className:"controls-group query-group"},l["default"].createElement("div",{id:"button-options",className:"controls controls-row"},l["default"].createElement("button",{type:"submit",className:"btn btn-success"},l["default"].createElement("i",{className:"fonticon-play icon"}),"Run Query"),l["default"].createElement("a",{onClick:this.hideTray,className:"btn btn-cancel"},"Cancel")))}}),S=l["default"].createClass({displayName:"QueryOptionsController",getStoreState:function(){return{isVisible:x.isVisible()}},getInitialState:function(){return this.getStoreState()},onChange:function(){this.setState(this.getStoreState())},componentDidMount:function(){x.on("change",this.onChange,this)},componentWillUnmount:function(){x.off("change",this.onChange)},getWrap:function(){return this.TrayWrapper||(this.TrayWrapper=v(b,[x],function(){return{includeDocs:x.includeDocs(),showBetweenKeys:x.showBetweenKeys(),showByKeys:x.showByKeys(),betweenKeys:x.betweenKeys(),byKeys:x.byKeys(),descending:x.descending(),skip:x.skip(),limit:x.limit(),showReduce:x.showReduce(),reduce:x.reduce(),groupLevel:x.groupLevel(),contentVisible:x.getTrayVisible(),queryParams:x.getQueryParams()}})),this.TrayWrapper},render:function(){if(!this.state.isVisible)return null;var e=this.getWrap();return l["default"].createElement("div",{id:"header-query-options"},l["default"].createElement("div",{id:"query-options"},l["default"].createElement(e,null,l["default"].createElement(A,{contentVisible:!1}))))}}),A=l["default"].createClass({displayName:"QueryTray",propTypes:{contentVisible:l["default"].PropTypes.bool.isRequired},runQuery:function(e){e.preventDefault(),h["default"].runQuery(this.props.queryParams),this.toggleTrayVisibility()},toggleTrayVisibility:function(){h["default"].toggleQueryBarVisibility(!this.props.contentVisible)},closeTray:function(){h["default"].toggleQueryBarVisibility(!1)},componentDidMount:function(){$("body").on("click.QueryTray",function(e){$(e.target).closest("#query-options").length||h["default"].toggleQueryBarVisibility(!1)}.bind(this))},componentWillUnmount:function(){$("body").off("click.QueryTray")},toggleIncludeDocs:function(e){h["default"].toggleIncludeDocs()},getTray:function(){return this.props.contentVisible?l["default"].createElement(w,{contentVisible:this.props.contentVisible,className:"query-options",id:"query-options-tray"},l["default"].createElement("form",{onSubmit:this.runQuery,className:"js-view-query-update custom-inputs"},l["default"].createElement(_,{includeDocs:this.props.includeDocs,toggleIncludeDocs:this.toggleIncludeDocs,showReduce:this.props.showReduce,reduce:this.props.reduce,toggleReduce:h["default"].toggleReduce,groupLevel:this.props.groupLevel,updateGroupLevel:h["default"].updateGroupLevel}),l["default"].createElement(E,{key:1,showByKeys:this.props.showByKeys,showBetweenKeys:this.props.showBetweenKeys,toggleByKeys:h["default"].toggleByKeys,toggleBetweenKeys:h["default"].toggleBetweenKeys,betweenKeys:this.props.betweenKeys,updateBetweenKeys:h["default"].updateBetweenKeys,byKeys:this.props.byKeys,updateByKeys:h["default"].updateByKeys}),l["default"].createElement(C,{descending:this.props.descending,toggleDescending:h["default"].toggleDescending,skip:this.props.skip,updateSkip:h["default"].updateSkip,updateLimit:h["default"].updateLimit,limit:this.props.limit}),l["default"].createElement(k,{onCancel:this.closeTray}))):null},render:function(){return l["default"].createElement("div",null,l["default"].createElement(y,{toggleCallback:this.toggleTrayVisibility,containerClasses:"header-control-box control-toggle-queryoptions",title:"Query Options",fonticon:"fonticon-gears",text:"Options"}),this.getTray())}});t["default"]={QueryOptionsController:S,QueryButtons:k,MainFieldsView:_,KeySearchFields:E,AdditionalParams:C,render:function(e){c["default"].render(l["default"].createElement(S,null),$(e)[0])}}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(84),o=r(i),a=n(99),s=r(a),l=n(106),u=r(l),c=n(137),d=(r(c),n(678)),f=r(d),p=function(e){var t=e.database,n=e.loadOptions;return u["default"].createElement("div",null,u["default"].createElement(f["default"].Async,{className:"jump-to-doc",name:"jump-to-doc",placeholder:"Document ID",loadOptions:n,clearable:!1,ignoreCase:!1,onChange:function(e){var n=e.value,r=s["default"].urls("document","app",o["default"].utils.safeURLName(t.id),o["default"].utils.safeURLName(n));setTimeout(function(){return s["default"].navigate(r,{trigger:!0})})}}))};p.propTypes={database:u["default"].PropTypes.object.isRequired},t["default"]=p},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(86),o=r(i),a=n(99),s=r(a);t["default"]={fetchAllDocsWithKey:function(e){return function(t,n){var r="?"+o["default"].param({startkey:JSON.stringify(t),endkey:JSON.stringify(t+"香"),limit:30}),i=s["default"].urls("allDocs","server",e.safeID(),r);o["default"].ajax({cache:!1,url:i,dataType:"json"}).then(function(e){var t=e.rows,r=t.map(function(e){return{value:e.id,label:e.id}});n(null,{options:r})})}}}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(84),u=(r(l),n(99)),c=r(u),d=n(106),f=r(d),p=n(137),h=r(p),g=n(717),m=r(g),v=n(719),b=r(v),y=n(297),w=r(y),x=n(293),E=r(x),C=n(558),k=r(C);n(708);var S=b["default"].changesStore,A=E["default"].BadgeList,T=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state=n.getStoreState(),n}return a(t,e),s(t,[{key:"getStoreState",value:function(){return{changes:S.getChanges(),loaded:S.isLoaded(),databaseName:S.getDatabaseName(),isShowingSubset:S.isShowingSubset()}}},{key:"onChange",value:function(){this.setState(this.getStoreState())}},{key:"componentDidMount",value:function(){S.on("change",this.onChange,this)}},{key:"componentWillUnmount",value:function(){S.off("change",this.onChange)}},{key:"showingSubsetMsg",value:function(){var e=this.state,t=e.isShowingSubset,n=e.changes,r="";if(t){var i=n.length;r=f["default"].createElement("p",{className:"changes-result-limit"},"Limiting results to latest ",f["default"].createElement("b",null,i)," changes.")}return r}},{key:"getRows",value:function(){var e=this.state,t=e.changes,n=e.loaded,r=e.databaseName;return!t.length&&n?f["default"].createElement("p",{className:"no-doc-changes"},"There are no document changes to display."):t.map(function(e,t){return f["default"].createElement(M,{change:e,key:t,databaseName:r})})}},{key:"render",value:function(){return f["default"].createElement("div",null,f["default"].createElement("div",{className:"js-changes-view"},this.showingSubsetMsg(),this.getRows()))}}]),t}(f["default"].Component),D=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state=n.getStoreState(),n}return a(t,e),s(t,[{key:"getStoreState",value:function(){return{filters:S.getFilters()}}},{key:"onChange",value:function(){this.setState(this.getStoreState())}},{key:"componentDidMount",value:function(){S.on("change",this.onChange,this)}},{key:"componentWillUnmount",value:function(){S.off("change",this.onChange)}},{key:"addFilter",value:function(e){_.isEmpty(e)||m["default"].addFilter(e)}},{key:"hasFilter",value:function(e){return S.hasFilter(e)}},{key:"render",value:function(){return f["default"].createElement("div",{className:"changes-header"},f["default"].createElement(N,{tooltip:this.props.tooltip,filter:function(e){return m["default"].removeFilter(e)},addFilter:this.addFilter,hasFilter:this.hasFilter}),f["default"].createElement(A,{elements:this.state.filters,removeBadge:function(e){return m["default"].removeFilter(e)}}))}}]),t}(f["default"].Component),N=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={filter:"",error:!1},n.submitForm=n.submitForm.bind(n),n}return a(t,e),s(t,[{key:"submitForm",value:function(e){var t=this;e.preventDefault(),e.stopPropagation(),this.props.hasFilter(this.state.filter)?!function(){t.setState({error:!0});var e=t;setTimeout(function(){e.setState({error:!1})},1e3)}():(this.props.addFilter(this.state.filter),this.setState({filter:"",error:!1}))}},{key:"componentDidMount",value:function(){this.focusFilterField()}},{key:"componentDidUpdate",value:function(){this.focusFilterField()}},{key:"focusFilterField",value:function(){h["default"].findDOMNode(this.refs.addItem).focus()}},{key:"inputClassNames",value:function(){var e="js-changes-filter-field";return this.state.error&&(e+=" errorHighlight"),e}},{key:"render",value:function(){var e=this;return f["default"].createElement("form",{className:"form-inline js-filter-form",onSubmit:this.submitForm},f["default"].createElement("fieldset",null,f["default"].createElement("i",{className:"fonticon-filter"}),f["default"].createElement("input",{type:"text",ref:"addItem",className:this.inputClassNames(),placeholder:"Sequence or ID",onChange:function(t){return e.setState({filter:t.target.value})},value:this.state.filter}),f["default"].createElement("button",{type:"submit",className:"btn btn-info"},"Filter"),f["default"].createElement("div",{className:"help-block"},f["default"].createElement(F,{tooltip:this.props.tooltip}))))}}]),t}(f["default"].Component);N.PropTypes={addFilter:f["default"].PropTypes.func.isRequired,hasFilter:f["default"].PropTypes.func.isRequired,tooltips:f["default"].PropTypes.string},N.defaultProps={tooltip:""};var F=function(e){function t(){return i(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),s(t,[{key:"componentDidMount",value:function(){this.props.tooltip&&$(h["default"].findDOMNode(this.refs.tooltip)).tooltip()}},{key:"render",value:function(){return this.props.tooltip?f["default"].createElement("i",{ref:"tooltip",className:"icon icon-question-sign js-filter-tooltip","data-toggle":"tooltip","data-original-title":this.props.tooltip}):null}}]),t}(f["default"].Component),M=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={codeVisible:!1},n}return a(t,e),s(t,[{key:"toggleJSON",value:function(e){e.preventDefault(),this.setState({codeVisible:!this.state.codeVisible})}},{key:"getChangesCode",value:function(){return this.state.codeVisible?f["default"].createElement(w["default"].CodeFormat,{key:"changesCodeSection",code:this.getChangeCode()}):null}},{key:"getChangeCode",value:function(){return{changes:this.props.change.changes,doc:this.props.change.doc}}},{key:"onClipboardClick",value:function(e){var t="The document ID has been copied to your clipboard.";"seq"===e&&(t="The document seq number has been copied to your clipboard."),c["default"].addNotification({msg:t,type:"info",clear:!0})}},{key:"render",value:function(){var e=this,t=this.state.codeVisible,n=this.props,r=n.change,i=n.databaseName,o="btn btn-small"+(t?" btn-secondary":" btn-info"),a="change-wrapper"+(r.isNew?" new-change-row":"");return f["default"].createElement("div",{className:a},f["default"].createElement("div",{className:"change-box","data-id":r.id},f["default"].createElement("div",{className:"row-fluid"},f["default"].createElement("div",{className:"span2"},"seq"),f["default"].createElement("div",{className:"span8 change-sequence"},r.seq),f["default"].createElement("div",{className:"span2 text-right"},f["default"].createElement(w["default"].Clipboard,{text:r.seq,onClipboardClick:function(){return e.onClipboardClick("seq")}}))),f["default"].createElement("div",{className:"row-fluid"},f["default"].createElement("div",{className:"span2"},"id"),f["default"].createElement("div",{className:"span8"},f["default"].createElement(O,{id:r.id,deleted:r.deleted,databaseName:i})),f["default"].createElement("div",{className:"span2 text-right"},f["default"].createElement(w["default"].Clipboard,{text:r.id,onClipboardClick:function(){return e.onClipboardClick("id")}}))),f["default"].createElement("div",{className:"row-fluid"},f["default"].createElement("div",{className:"span2"},"changes"),f["default"].createElement("div",{className:"span10"},f["default"].createElement("button",{type:"button",className:o,onClick:this.toggleJSON.bind(this)},t?"Close JSON":"View JSON"))),f["default"].createElement(k["default"],{transitionName:"toggle-changes-code",component:"div",className:"changesCodeSectionWrapper",transitionEnterTimeout:500,transitionLeaveTimeout:300},this.getChangesCode()),f["default"].createElement("div",{className:"row-fluid"},f["default"].createElement("div",{className:"span2"},"deleted"),f["default"].createElement("div",{className:"span10"},r.deleted?"True":"False"))))}}]),t}(f["default"].Component);M.PropTypes={change:f["default"].PropTypes.object,databaseName:f["default"].PropTypes.string.isRequired};var O=function(e){function t(){return i(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),s(t,[{key:"render",value:function(){var e=this.props,t=e.deleted,n=e.id,r=e.databaseName;if(t)return f["default"].createElement("span",{className:"js-doc-id"},n);var i="#"+c["default"].urls("document","app",r,n);return f["default"].createElement("a",{href:i,className:"js-doc-link"},n)}}]),t}(f["default"].Component);t["default"]={ChangesController:T,ChangesTabContent:D,ChangeRow:M,ChangeID:O}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i,o=n(84),a=r(o),s=n(99),l=r(s),u=n(718),c=r(u),d=n(719),f=r(d),p=n(556),h=r(p),g=f["default"].changesStore,m=6e4;t["default"]={addFilter:function(e){l["default"].dispatch({type:c["default"].ADD_CHANGES_FILTER_ITEM,filter:e})},removeFilter:function(e){l["default"].dispatch({type:c["default"].REMOVE_CHANGES_FILTER_ITEM,filter:e})},initChanges:function(e){l["default"].dispatch({type:c["default"].INIT_CHANGES,options:e}),i=null,this.getLatestChanges()},getLatestChanges:function(){var e={limit:100};i&&(e.since=g.getLastSeqNum(),e.timeout=m,e.feed="longpoll");var t=$.param(e),n=a["default"].utils.safeURLName(g.getDatabaseName()),r=l["default"].urls("changes","server",n,"?"+t);i=$.getJSON(r),i.then(this.updateChanges.bind(this))},updateChanges:function(e){var t=h["default"].getSeqNum(e.last_seq);t!==g.getLastSeqNum()&&l["default"].dispatch({type:c["default"].UPDATE_CHANGES,changes:e.results,seqNum:t})}}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]={INIT_CHANGES:"INIT_CHANGES",UPDATE_CHANGES:"UPDATE_CHANGES",ADD_CHANGES_FILTER_ITEM:"ADD_CHANGES_FILTER_ITEM",REMOVE_CHANGES_FILTER_ITEM:"REMOVE_CHANGES_FILTER_ITEM",UPDATE_CHANGES_FILTER:"UPDATE_CHANGES_FILTER",TOGGLE_CHANGES_CODE_VISIBILITY:"TOGGLE_CHANGES_CODE_VISIBILITY"}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(99),o=r(i),a=n(718),s=r(a),l=n(556),u=r(l),c=o["default"].Store.extend({initialize:function(){this.reset()},reset:function(){this._isLoaded=!1,this._filters=[],this._changes=[],this._databaseName="",this._maxChangesListed=100,this._showingSubset=!1,this._lastSequenceNum=null},initChanges:function(e){this.reset(),this._databaseName=e.databaseName},isLoaded:function(){return this._isLoaded},updateChanges:function(e,t){this._lastSequenceNum=e;var n=0===this._changes.length;_.each(this._changes,function(e){e.isNew=!1});var r=_.map(t,function(e){var t=u["default"].getSeqNum(e.seq);return{id:e.id,seq:t,deleted:!!_.has(e,"deleted")&&e.deleted,changes:e.changes,doc:e.doc,isNew:!n}});this._changes=r.concat(this._changes),this._isLoaded=!0},getChanges:function(){this._showingSubset=!1;var e=0;return _.filter(this._changes,function(t){if(e>=this._maxChangesListed)return this._showingSubset=!0,!1;var n=JSON.stringify(t),r=_.every(this._filters,function(e){return new RegExp(e,"i").test(n)});return r&&e++,r},this)},addFilter:function(e){this._filters.push(e)},removeFilter:function(e){this._filters=_.without(this._filters,e)},getFilters:function(){return this._filters},hasFilter:function(e){return _.contains(this._filters,e)},getDatabaseName:function(){return this._databaseName},isShowingSubset:function(){return this._showingSubset},setMaxChanges:function(e){this._maxChangesListed=e},getLastSeqNum:function(){return this._lastSequenceNum},dispatch:function(e){switch(e.type){case s["default"].INIT_CHANGES:this.initChanges(e.options);break;case s["default"].UPDATE_CHANGES:this.updateChanges(e.seqNum,e.changes);break;case s["default"].ADD_CHANGES_FILTER_ITEM:this.addFilter(e.filter);break;case s["default"].REMOVE_CHANGES_FILTER_ITEM:this.removeFilter(e.filter);break;default:return}this.triggerChange()}}),d={};d.changesStore=new c,d.changesStore.dispatchToken=o["default"].dispatcher.register(d.changesStore.dispatch),t["default"]=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},o=n(84),a=(r(o),n(99)),s=r(a),l=n(106),u=r(l),c=n(697),d=r(c),f=n(695),p=r(f),h=n(293),g=r(h),m=n(671),v=(r(m),n(297)),b=r(v),y=(n(299),n(678)),w=r(y),x=n(558),E=r(x);n(708);var C=g["default"].LoadLines,k=g["default"].BulkActionComponent,S=b["default"].Clipboard,A=d["default"].indexResultsStore,T=u["default"].createClass({displayName:"NoResultsScreen",propTypes:{text:u["default"].PropTypes.string.isRequired},render:function(){return u["default"].createElement("div",{className:"no-results-screen"},u["default"].createElement("div",{className:"watermark-logo"}),u["default"].createElement("h3",null,this.props.text))}}),D=u["default"].createClass({displayName:"TableRow",propTypes:{docIdentifier:u["default"].PropTypes.string.isRequired,docChecked:u["default"].PropTypes.func.isRequired,isSelected:u["default"].PropTypes.bool.isRequired,index:u["default"].PropTypes.number.isRequired,data:u["default"].PropTypes.object.isRequired},onChange:function(e){this.props.docChecked(this.props.el.id,this.props.el._rev)},getInitialState:function(){return{checked:this.props.isSelected}},getRowContents:function(e,t){var n=e.content,r=this.props.data.selectedFields.map(function(e,r){var o="tableview-data-cell-"+t+e+r+n[e],a="object"===i(n[e])?JSON.stringify(n[e],null,"  "):n[e];return u["default"].createElement("td",{key:o,title:a},a)}.bind(this));return r},maybeGetSpecialField:function(e,t){if(!this.props.data.hasMetadata)return null;var n=e.content;return u["default"].createElement("td",{className:"tableview-data-cell-id",key:"tableview-data-cell-id"+t},u["default"].createElement("div",null,this.maybeGetUrl(e.url,n._id||n.id)),u["default"].createElement("div",null,n._rev))},maybeGetUrl:function(e,t){return e?u["default"].createElement("a",{href:"#"+e},t):t},maybeGetCheckboxCell:function(e,t){return u["default"].createElement("td",{className:"tableview-checkbox-cell",key:"tableview-checkbox-cell-"+t},e.isDeletable?u["default"].createElement("input",{id:"checkbox-"+this.props.docIdentifier,checked:this.props.isSelected,type:"checkbox",onChange:this.onChange}):null)},getAdditionalInfoRow:function(e){var t=Object.keys(e._attachments||{}).length,n=null,r=null,i=Object.keys(e._conflicts||{}).length,o=null,a=null;return t&&(r=1===t?t+" Attachment":t+" Attachments",n=u["default"].createElement("div",{style:{display:"inline",marginLeft:"5px"},title:r},u["default"].createElement("i",{className:"icon fonticon-paperclip"}),t)),i&&(a=1===i?i+" Conflict":i+" Conflicts",o=u["default"].createElement("div",{className:"tableview-conflict","data-conflicts-indicator":!0,style:{display:"inline"},title:a},u["default"].createElement("i",{style:{fontSize:"17px"},className:"icon icon-code-fork"}),i)),u["default"].createElement("td",{className:"tableview-el-last"},o,n)},getCopyButton:function(e){var t=JSON.stringify(e,null,"  ");return u["default"].createElement("td",{title:t,className:"tableview-el-copy"},u["default"].createElement(S,{onClipboardClick:this.showCopiedMessage,title:t,text:t}))},showCopiedMessage:function(){s["default"].addNotification({msg:"The document content has been copied to the clipboard.",type:"success",clear:!0})},render:function(){var e=this.props.index,t=this.props.el.content,n=this.props.el;return u["default"].createElement("tr",{key:"tableview-content-row-"+e},this.maybeGetCheckboxCell(n,e),this.getCopyButton(t),this.maybeGetSpecialField(n,e),this.getRowContents(n,e),this.getAdditionalInfoRow(t))}}),N=function(e){var t=e.selectedField,n=e.notSelectedFields,r=e.index,i=n.map(function(e){return{value:e,label:e}});return u["default"].createElement("div",{className:"table-container-autocomplete"},u["default"].createElement("div",{className:"table-select-wrapper"},u["default"].createElement(w["default"],{value:t,options:i,clearable:!1,onChange:function(e){p["default"].changeField({newSelectedRow:e.value,index:r})}})))},F=u["default"].createClass({displayName:"TableView",getContentRows:function(){var e=this.props.data.results;return e.map(function(e,t){return u["default"].createElement(D,{key:"tableview-row-component-"+t,index:t,el:e,docIdentifier:e.id||"tableview-row-component-"+t,docChecked:this.props.docChecked,isSelected:this.props.isSelected(e.id),data:this.props.data})}.bind(this))},getOptionFieldRows:function(e){var t=this.props.data.notSelectedFields;return t?e.map(function(e,t){return u["default"].createElement("th",{key:"header-el-"+t},this.getDropdown(e,this.props.data.schema,t))}.bind(this)):e.map(function(e,t){return u["default"].createElement("th",{key:"header-el-"+t},e)})},getDropdown:function(e,t,n){return u["default"].createElement(N,{selectedField:e,notSelectedFields:t,index:n})},getHeader:function(){var e=this.props.data.selectedFields,t=null;this.props.data.hasMetadata&&(t=u["default"].createElement("th",{key:"header-el-metadata",title:"Metadata"},"Metadata"));var n=this.getOptionFieldRows(e),r=u["default"].createElement("th",{className:"tableview-header-el-checkbox",key:"tableview-header-el-checkbox"},this.props.isListDeletable?u["default"].createElement(k,{disabled:this.props.isLoading,removeItem:this.props.removeItem,isChecked:this.props.isChecked,hasSelectedItem:this.props.hasSelectedItem,toggleSelect:this.props.toggleSelect,title:"Select all docs that can be..."}):null);return u["default"].createElement("tr",{key:"tableview-content-row-header"},r,u["default"].createElement("th",{className:"tableview-el-copy"}),t,n,u["default"].createElement("th",{className:"tableview-el-last"}))},render:function(){var e=this.getHeader(),t=this.getContentRows();return u["default"].createElement("div",{className:"table-view-docs"},u["default"].createElement("table",{className:"table table-striped"},u["default"].createElement("thead",null,e),u["default"].createElement("tbody",null,t)))}}),M=u["default"].createClass({displayName:"ResultsScreen",onDoubleClick:function(e,t){s["default"].navigate(t.url)},getUrlFragment:function(e){return this.props.isEditable?u["default"].createElement("a",{href:e},u["default"].createElement("i",{className:"fonticon-pencil"})):null},getDocumentList:function(){var e=function(){},t=this.props.results.results;return _.map(t,function(t,n){return u["default"].createElement(g["default"].Document,{key:t.id+n,doc:t,onDoubleClick:this.props.isEditable?this.onDoubleClick:e,keylabel:t.keylabel,docContent:t.content,checked:this.props.isSelected(t.id),header:t.header,docChecked:this.props.docChecked,isDeletable:t.isDeletable,docIdentifier:t.id},t.url?this.getUrlFragment("#"+t.url):t.url)},this)},getDocumentStyleView:function(e){var t="view",n=this.props.isListDeletable;return this.props.isListDeletable&&(t+=" show-select"),u["default"].createElement("div",{className:t},u["default"].createElement("div",{className:"loading-lines-wrapper"},e),u["default"].createElement("div",{id:"doc-list"},n?u["default"].createElement(k,{removeItem:this.props.removeItem,isChecked:this.props.allDocumentsSelected,hasSelectedItem:this.props.hasSelectedItem,toggleSelect:this.toggleSelectAll,disabled:this.props.isLoading,title:"Select all docs that can be..."}):null,u["default"].createElement(E["default"],{transitionName:"slow-fade",transitionEnterTimeout:500,transitionLeaveTimeout:300},this.getDocumentList())))},getTableStyleView:function(e){return u["default"].createElement("div",null,u["default"].createElement("div",{className:"loading-lines-wrapper"},e),u["default"].createElement(F,{docChecked:this.props.docChecked,isSelected:this.props.isSelected,isListDeletable:this.props.isListDeletable,data:this.props.results,isLoading:this.props.isLoading,removeItem:this.props.removeItem,isChecked:this.props.allDocumentsSelected,hasSelectedItem:this.props.hasSelectedItem,toggleSelect:this.toggleSelectAll,title:"Select all docs that can be..."}))},render:function(){var e=null,t=this.props.isTableView;this.props.isLoading&&(e=u["default"].createElement(C,null));var n=t?this.getTableStyleView(e):this.getDocumentStyleView(e);return u["default"].createElement("div",{className:"document-result-screen"},n)},toggleSelectAll:function(){p["default"].toggleAllDocuments()},componentDidMount:function(){prettyPrint()},componentDidUpdate:function(){prettyPrint()}}),O=u["default"].createClass({displayName:"ViewResultListController",getStoreState:function(){var e=A.getSelectedItemsLength();return{hasResults:A.hasResults(),results:A.getResults(),isLoading:A.isLoading(),isEditable:A.isEditable(),textEmptyIndex:A.getTextEmptyIndex(),isTableView:A.getIsTableView(),allDocumentsSelected:A.areAllDocumentsSelected(),hasSelectedItem:!!e,selectedItemsLength:e,bulkDeleteCollection:A.getBulkDocCollection()}},isSelected:function(e){return!!this.state.bulkDeleteCollection.get(e)},removeItem:function(){p["default"].deleteSelected(this.state.bulkDeleteCollection,this.state.selectedItemsLength)},getInitialState:function(){return this.getStoreState()},componentDidMount:function(){A.on("change",this.onChange,this)},componentWillUnmount:function(){A.off("change",this.onChange)},onChange:function(){this.setState(this.getStoreState())},docChecked:function(e,t){p["default"].selectDoc({_id:e,_rev:t})},render:function(){var e=u["default"].createElement(T,{text:this.state.textEmptyIndex});return this.state.hasResults&&(e=u["default"].createElement(M,{removeItem:this.removeItem,hasSelectedItem:this.state.hasSelectedItem,allDocumentsSelected:this.state.allDocumentsSelected,isSelected:this.isSelected,isEditable:this.state.isEditable,isListDeletable:this.state.results.hasBulkDeletableDoc,docChecked:this.docChecked,isLoading:this.state.isLoading,results:this.state.results,isTableView:this.state.isTableView})),e}});t["default"]={List:O,NoResultsScreen:T,ResultsScreen:M,WrappedAutocomplete:N}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(99),o=(r(i),n(106)),a=r(o),s=n(693),l=r(s),u=n(697),c=r(u),d=c["default"].indexResultsStore,f=a["default"].createClass({displayName:"IndexPaginationController",getStoreState:function(){return{canShowPrevious:d.canShowPrevious(),canShowNext:d.canShowNext(),collection:d.getCollection(),bulkCollection:d.getBulkDocCollection()}},getInitialState:function(){return this.getStoreState()},componentDidMount:function(){d.on("change",this.onChange,this)},componentWillUnmount:function(){d.off("change",this.onChange)},onChange:function(){this.setState(this.getStoreState())},nextClicked:function(e){if(e.preventDefault(),this.state.canShowNext){var t=this.state.collection,n=this.state.bulkCollection;l["default"].paginateNext(t,n)}},previousClicked:function(e){if(e.preventDefault(),this.state.canShowPrevious){var t=this.state.collection,n=this.state.bulkCollection;l["default"].paginatePrevious(t,n)}},render:function(){var e="",t="";return this.state.canShowPrevious||(e="disabled"),this.state.canShowNext||(t="disabled"),a["default"].createElement("div",{className:"documents-pagination"},a["default"].createElement("ul",{className:"pagination"},a["default"].createElement("li",{className:e},a["default"].createElement("a",{id:"previous",onClick:this.previousClicked,className:"icon fonticon-left-open",href:"#","data-bypass":"true"})),a["default"].createElement("li",{className:t},a["default"].createElement("a",{id:"next",onClick:this.nextClicked,className:"icon fonticon-right-open",href:"#","data-bypass":"true"}))))}}),p=a["default"].createClass({displayName:"PerPageSelector",propTypes:{perPage:a["default"].PropTypes.number.isRequired,perPageChange:a["default"].PropTypes.func.isRequired,label:a["default"].PropTypes.string,options:a["default"].PropTypes.array},getDefaultProps:function(){return{label:"Documents per page: ",options:[5,10,20,30,50,100]}},perPageChange:function(e){var t=parseInt(e.target.value,10);this.props.perPageChange(t)},getOptions:function(){return _.map(this.props.options,function(e){return a["default"].createElement("option",{value:e,key:e},e)})},render:function(){return a["default"].createElement("div",{id:"per-page"},a["default"].createElement("label",{htmlFor:"select-per-page",className:"drop-down inline"},this.props.label,"  ",a["default"].createElement("select",{id:"select-per-page",onChange:this.perPageChange,value:this.props.perPage.toString(),className:"input-small"},this.getOptions())))}}),h=a["default"].createClass({displayName:"AllDocsNumberController",getStoreState:function(){return{totalRows:d.getTotalRows(),pageStart:d.getPageStart(),pageEnd:d.getPageEnd(),perPage:d.getPerPage(),prioritizedEnabled:d.getIsPrioritizedEnabled(),showPrioritizedFieldToggler:d.getShowPrioritizedFieldToggler(),displayedFields:d.getResults().displayedFields,collection:d.getCollection(),bulkCollection:d.getBulkDocCollection()}},getInitialState:function(){return this.getStoreState()},componentDidMount:function(){d.on("change",this.onChange,this)},componentWillUnmount:function(){d.off("change",this.onChange)},onChange:function(){this.setState(this.getStoreState())},getPageNumberText:function(){return 0===this.state.totalRows?a["default"].createElement("span",null,"Showing 0 documents."):a["default"].createElement("span",null,"Showing document ",this.state.pageStart," - ",this.state.pageEnd,".");
},perPageChange:function(e){var t=this.state.collection,n=this.state.bulkCollection;l["default"].updatePerPage(e,t,n)},render:function(){var e=this.state.showPrioritizedFieldToggler;return a["default"].createElement("div",{className:"footer-controls"},a["default"].createElement("div",{className:"page-controls"},e?a["default"].createElement(g,{prioritizedEnabled:this.state.prioritizedEnabled,displayedFields:this.state.displayedFields}):null),a["default"].createElement(p,{perPageChange:this.perPageChange,perPage:this.state.perPage}),a["default"].createElement("div",{className:"current-docs"},this.getPageNumberText()))}}),g=a["default"].createClass({displayName:"TableControls",propTypes:{prioritizedEnabled:a["default"].PropTypes.bool.isRequired,displayedFields:a["default"].PropTypes.object.isRequired},getAmountShownFields:function(){var e=this.props.displayedFields;return e.shown===e.allFieldCount?a["default"].createElement("div",{className:"pull-left shown-fields"},"Showing ",e.shown," columns."):a["default"].createElement("div",{className:"pull-left shown-fields"},"Showing ",e.shown," of ",e.allFieldCount," columns.")},toggleTableViewType:function(){l["default"].toggleTableViewType()},render:function(){return a["default"].createElement("div",{className:"footer-table-control"},this.getAmountShownFields(),a["default"].createElement("div",{className:"footer-doc-control-prioritized-wrapper pull-left"},a["default"].createElement("label",{htmlFor:"footer-doc-control-prioritized"},a["default"].createElement("input",{id:"footer-doc-control-prioritized",checked:this.props.prioritizedEnabled,onChange:this.toggleTableViewType,type:"checkbox"}),"Show all columns.")))}}),m=a["default"].createClass({displayName:"Footer",render:function(){return a["default"].createElement("footer",{className:"index-pagination pagination-footer"},a["default"].createElement(f,null),a["default"].createElement(h,null))}});t["default"]={AllDocsNumber:h,PerPageSelector:p,Footer:m,TableControls:g}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(84),o=(r(i),n(99)),a=(r(o),n(106)),s=r(a),l=n(723),u=r(l),c=n(293),d=r(c),f=n(697),p=r(f),h=n(695),g=(r(h),n(711)),m=r(g),v=n(558),b=(r(v),n(299)),y=p["default"].indexResultsStore,w=m["default"].queryOptionsStore,x=d["default"].ToggleHeaderButton,_=s["default"].createClass({displayName:"BulkDocumentHeaderController",getStoreState:function(){return{selectedView:y.getCurrentViewType(),isTableView:y.getIsTableView(),includeDocs:w.getIncludeDocsEnabled(),bulkDocCollection:y.getBulkDocCollection()}},getInitialState:function(){return this.getStoreState()},componentDidMount:function(){y.on("change",this.onChange,this),w.on("change",this.onChange,this)},componentWillUnmount:function(){y.off("change",this.onChange),w.off("change",this.onChange)},onChange:function(){this.setState(this.getStoreState())},render:function(){var e=this.state.isTableView;return s["default"].createElement("div",{className:"alternative-header"},s["default"].createElement(b.ButtonGroup,{className:"two-sides-toggle-button"},s["default"].createElement(b.Button,{className:e?"":"active",onClick:this.toggleTableView.bind(this,!1)},s["default"].createElement("i",{className:"fonticon-json"})," JSON"),s["default"].createElement(b.Button,{className:e?"active":"",onClick:this.toggleTableView.bind(this,!0)},s["default"].createElement("i",{className:"fonticon-table"})," Table")),this.props.showIncludeAllDocs?s["default"].createElement(x,{toggleCallback:this.toggleIncludeDocs,containerClasses:"header-control-box control-toggle-include-docs",title:"Enable/Disable include_docs",fonticon:this.state.includeDocs?"icon-check":"icon-check-empty",iconDefaultClass:"icon fontawesome",text:""}):null,"  ")},toggleIncludeDocs:function(){u["default"].toggleIncludeDocs(this.state.includeDocs,this.state.bulkDocCollection)},toggleTableView:function(e){u["default"].toggleTableView(e)}});t["default"]={BulkDocumentHeaderController:_}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(84),o=r(i),a=n(99),s=r(a),l=n(698),u=r(l),c=n(709),d=r(c);t["default"]={toggleIncludeDocs:function(e,t){var n=o["default"].getParams();e?(delete n.include_docs,delete n.conflicts):(n.include_docs=!0,n.conflicts=!0),o["default"].utils.localStorageSet("include_docs_bulkdocs",t.toJSON()),d["default"].runQuery(n)},toggleTableView:function(e){s["default"].dispatch({type:u["default"].TOGGLE_TABLEVIEW,options:{enable:e}})}}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(84),o=(r(i),n(99)),a=r(o),s=n(725),l=r(s),u=n(726),c=r(u),d=c["default"].designDocInfoStore;t["default"]={fetchDesignDocInfo:function(e){var t=e.designDocInfo;a["default"].dispatch({type:l["default"].DESIGN_FETCHING}),t.fetch().then(function(){this.monitorDesignDoc({ddocName:e.ddocName,designDocInfo:t})}.bind(this))},monitorDesignDoc:function(e){e.intervalId=window.setInterval(_.bind(this.refresh,this),5e3),a["default"].dispatch({type:l["default"].DESIGN_DOC_MONITOR,options:e})},refresh:function(){d.getDesignDocInfo().fetch().then(function(){a["default"].dispatch({type:l["default"].DESIGN_REFRESH})})},stopRefresh:function(){window.clearInterval(d.getIntervalId())}}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]={DESIGN_DOC_MONITOR:"DESIGN_DOC_MONITOR",DESIGN_FETCHING:"DESIGN_FETCHING",DESIGN_REFRESH:"DESIGN_REFRESH"}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(99),o=r(i),a=n(725),s=r(a),l={};l.DesignDocInfoStore=o["default"].Store.extend({initialize:function(){this._isLoading=!0},isLoading:function(){return this._isLoading},getDdocName:function(){return this._ddocName},getDesignDocInfo:function(){return this._designDocInfo},monitorDesignDoc:function(e){this._isLoading=!1,this._designDocInfo=e.designDocInfo,this._ddocName=e.ddocName,this._intervalId=e.intervalId},getIntervalId:function(){return this._intervalId},getViewIndex:function(){return this._isLoading?{}:this._designDocInfo.get("view_index")},dispatch:function(e){switch(e.type){case s["default"].DESIGN_FETCHING:this._isLoading=!0,this.triggerChange();break;case s["default"].DESIGN_DOC_MONITOR:this.monitorDesignDoc(e.options),this.triggerChange();break;case s["default"].DESIGN_DOC_REFRESH:this.triggerChange();break;default:return}}}),l.designDocInfoStore=new l.DesignDocInfoStore,l.designDocInfoStore.dispatchToken=o["default"].dispatcher.register(l.designDocInfoStore.dispatch),t["default"]=l},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(84),o=r(i),a=n(99),s=r(a),l=n(106),u=r(l),c=n(726),d=r(c),f=n(724),p=r(f),h=n(293),g=r(h),m=n(297),v=r(m),b=d["default"].designDocInfoStore,y=g["default"].LoadLines,w=v["default"].Clipboard,x=u["default"].createClass({displayName:"DesignDocInfo",getStoreState:function(){return{viewIndex:b.getViewIndex(),isLoading:b.isLoading(),ddocName:b.getDdocName()}},getInitialState:function(){return this.getStoreState()},componentDidMount:function(){b.on("change",this.onChange,this)},componentWillUnmount:function(){b.off("change",this.onChange),p["default"].stopRefresh()},onChange:function(){this.setState(this.getStoreState())},showCopiedMessage:function(){s["default"].addNotification({type:"success",msg:"The MD5 sha has been copied to your clipboard.",clear:!0})},render:function(){var e=o["default"].helpers.getDocUrl,t=this.state.viewIndex;if(this.state.isLoading)return u["default"].createElement(y,null);var n=t.data_size?t.data_size.toLocaleString("en"):0,r=t.disk_size?t.disk_size.toLocaleString("en"):0;return u["default"].createElement("div",{className:"metadata-page"},u["default"].createElement("header",null,u["default"].createElement("div",{className:"preheading"},"Design Document Metadata"),u["default"].createElement("h2",null,"_design/",this.state.ddocName),u["default"].createElement("p",{className:"help"},"Information about the specified design document, including the index, index size and current status of the design document and associated index information.",u["default"].createElement("a",{href:e("DESIGN_DOC_METADATA"),className:"help-link",target:"_blank","data-bypass":"true"},u["default"].createElement("i",{className:"icon-question-sign"})))),u["default"].createElement("section",{className:"container"},u["default"].createElement("h3",null,"Index Information"),u["default"].createElement("ul",null,u["default"].createElement("li",null,u["default"].createElement("span",{className:"item-title"},"Language:"),u["default"].createElement("span",{className:"capitalize"},t.language)),u["default"].createElement("li",null,u["default"].createElement("span",{className:"item-title"},"Currently being updated?"),t.updater_running?"Yes":"No"),u["default"].createElement("li",null,u["default"].createElement("span",{className:"item-title"},"Currently running compaction?"),t.compact_running?"Yes":"No"),u["default"].createElement("li",null,u["default"].createElement("span",{className:"item-title"},"Waiting for a commit?"),t.waiting_commit?"Yes":"No")),u["default"].createElement("ul",null,u["default"].createElement("li",null,u["default"].createElement("span",{className:"item-title"},"Clients waiting for the index:"),t.waiting_clients),u["default"].createElement("li",null,u["default"].createElement("span",{className:"item-title"},"Update sequence on DB:"),t.update_seq),u["default"].createElement("li",null,u["default"].createElement("span",{className:"item-title"},"Processed purge sequence:"),t.purge_seq),u["default"].createElement("li",null,u["default"].createElement("span",{className:"item-title"},"Actual data size (bytes):"),n),u["default"].createElement("li",null,u["default"].createElement("span",{className:"item-title"},"Data size on disk (bytes):"),r)),u["default"].createElement("ul",null,u["default"].createElement("li",null,u["default"].createElement("span",{className:"item-title"},"MD5 Signature:"),u["default"].createElement(w,{onClipboardClick:this.showCopiedMessage,text:t.signature})))))}});t["default"]={DesignDocInfo:x}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(84),o=(r(i),n(99)),a=r(o),s=n(556),l=(r(s),n(671)),u=r(l),c=n(668),d=r(c),f=n(729),p=r(f),h=n(731),g=r(h),m=n(733),v=r(m),b=n(754),y=r(b),w=a["default"].RouteObject.extend({layout:"doc_editor",disableLoader:!0,selectedHeader:"Databases",roles:["fx_loggedIn"],routes:{"database/:database/:doc/conflicts":"revisionBrowser"},initialize:function(e,t,n){var r=n[0];this.docId=n[1],this.database=this.database||new d["default"].Model({id:r}),this.doc=new u["default"].Doc({_id:this.docId},{database:this.database})},crumbs:function(){var e=a["default"].urls("allDocs","app",this.database.safeID());a["default"].urls("document","app",this.database.safeID(),this.docId);return[{name:this.database.safeID(),link:e},{name:this.docId+" > Conflicts"}]},apiUrl:function(){return[this.doc.url("apiurl"),this.doc.documentation()]},revisionBrowser:function(e,t){v["default"].showConfirmModal(!1,null),v["default"].initDiffEditor(e,t),this.setComponent("#dashboard-content",y["default"].DiffyController)}}),x=a["default"].RouteObject.extend({layout:"doc_editor",disableLoader:!0,selectedHeader:"Databases",roles:["fx_loggedIn"],initialize:function(e,t,n){this.databaseName=n[0],this.docId=n[1],this.database=this.database||new d["default"].Model({id:this.databaseName}),this.doc=new u["default"].NewDoc(null,{database:this.database})},routes:{"database/:database/:doc/code_editor":"codeEditor","database/:database/_design/:ddoc":"showDesignDoc","database/:database/:doc":"codeEditor","database/:database/new":"codeEditor"},crumbs:function(){},codeEditor:function(e,t){var n=a["default"].urls("allDocs","app",e);this.crumbs=[{name:e,link:n},{name:t?t:"New Document"}],this.database=new d["default"].Model({id:e}),t&&(this.doc=new u["default"].Doc({_id:t},{database:this.database,fetchConflicts:!0})),p["default"].initDocEditor({doc:this.doc,database:this.database}),this.setComponent("#dashboard-content",g["default"].DocEditorController,{database:this.database,isNewDoc:!t})},showDesignDoc:function(e,t){this.codeEditor(e,"_design/"+t)},apiUrl:function(){return[this.doc.url("apiurl"),this.doc.documentation()]}});t["default"]={DocEditorRouteObject:x,RevBrowserRouteObject:w}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){var t=e.doc;E["default"].dispatch({type:k["default"].RESET_DOC}),t.fetch().then(function(){E["default"].dispatch({type:k["default"].DOC_LOADED,options:{doc:t}}),e.onLoaded&&e.onLoaded()},function(t,n,r){404===t.status&&v("The document does not exist."),E["default"].navigate(E["default"].urls("allDocs","app",e.database.id,""))})}function o(e,t,n){t?(E["default"].addNotification({msg:"Saving document.",clear:!0}),e.save().then(function(){n(e.prettyJSON()),E["default"].navigate("#"+E["default"].urls("allDocs","app",e.database.id),{trigger:!0})}).fail(function(e){E["default"].addNotification({msg:"Save failed: "+JSON.parse(e.responseText).reason,type:"error",fade:!1,clear:!0})})):e.validationError&&"Cannot change a documents id."===e.validationError?(v("You cannot edit the _id of an existing document. Try this: Click 'Clone Document', then change the _id on the clone before saving."),delete e.validationError):v("Please fix the JSON errors and try saving again.")}function a(){E["default"].dispatch({type:k["default"].SHOW_DELETE_DOC_CONFIRMATION_MODAL})}function s(){E["default"].dispatch({type:k["default"].HIDE_DELETE_DOC_CONFIRMATION_MODAL})}function l(e){var t=e.database.safeID(),n="?rev="+e.get("_rev");$.ajax({url:E["default"].urls("document","server",t,e.safeID(),n),type:"DELETE",contentType:"application/json; charset=UTF-8",xhrFields:{withCredentials:!0},success:function(){E["default"].addNotification({msg:"Your document has been successfully deleted.",clear:!0}),E["default"].navigate(E["default"].urls("allDocs","app",t,""))},error:function(e){E["default"].addNotification({msg:"Failed to delete your document!",type:"error",clear:!0})}})}function u(){E["default"].dispatch({type:k["default"].SHOW_CLONE_DOC_MODAL})}function c(){E["default"].dispatch({type:k["default"].HIDE_CLONE_DOC_MODAL})}function d(e,t,n){var r=w["default"].utils.getSafeIdForDoc(n);c(),t.copy(r).then(function(){t.set({_id:r}),E["default"].navigate("/database/"+e.safeID()+"/"+r,{trigger:!0}),E["default"].addNotification({msg:"Document has been duplicated."})},function(e){var t="Could not duplicate document, reason: "+e.responseText+".";E["default"].addNotification({msg:t,type:"error"})})}function f(){E["default"].dispatch({type:k["default"].SHOW_UPLOAD_MODAL})}function p(){E["default"].dispatch({type:k["default"].HIDE_UPLOAD_MODAL})}function h(e){if(0===e.files.length)return void E["default"].dispatch({type:k["default"].FILE_UPLOAD_ERROR,options:{error:"Please select a file to be uploaded."}});E["default"].dispatch({type:k["default"].START_FILE_UPLOAD}),b=$.ajaxSettings.xhr();var t="?rev="+e.rev,n=e.doc.getDatabase().safeID(),r=e.doc.safeID(),o=e.files[0];$.ajax({url:E["default"].urls("document","attachment",n,r,o.name,t),type:"PUT",data:o,contentType:o.type,processData:!1,xhrFields:{withCredentials:!0},xhr:function(){return b.upload.onprogress=function(e){var t=e.loaded/e.total*100;E["default"].dispatch({type:k["default"].SET_FILE_UPLOAD_PERCENTAGE,options:{percent:t}})},b},success:function(){i({doc:e.doc,onLoaded:function(){E["default"].dispatch({type:k["default"].FILE_UPLOAD_SUCCESS}),E["default"].addNotification({msg:"Document saved successfully.",type:"success",clear:!0})}.bind(this)})},error:function(e){_.isEmpty(e.responseText)||E["default"].dispatch({type:k["default"].FILE_UPLOAD_ERROR,options:{error:JSON.parse(e.responseText).reason}})}})}function g(){b.abort()}function m(){E["default"].dispatch({type:k["default"].RESET_UPLOAD_MODAL})}function v(e){E["default"].addNotification({msg:e,type:"error",clear:!0})}Object.defineProperty(t,"__esModule",{value:!0});var b,y=n(84),w=r(y),x=n(99),E=r(x),C=n(730),k=r(C);t["default"]={initDocEditor:i,saveDoc:o,showCloneDocModal:u,hideCloneDocModal:c,cloneDoc:d,showDeleteDocModal:a,hideDeleteDocModal:s,deleteDoc:l,showUploadModal:f,hideUploadModal:p,uploadAttachment:h,cancelUpload:g,resetUploadModal:m}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]={RESET_DOC:"RESET_DOC",DOC_LOADED:"DOC_LOADED",SHOW_CLONE_DOC_MODAL:"SHOW_CLONE_DOC_MODAL",HIDE_CLONE_DOC_MODAL:"HIDE_CLONE_DOC_MODAL",SHOW_DELETE_DOC_CONFIRMATION_MODAL:"SHOW_DELETE_DOC_CONFIRMATION_MODAL",HIDE_DELETE_DOC_CONFIRMATION_MODAL:"HIDE_DELETE_DOC_CONFIRMATION_MODAL",SHOW_UPLOAD_MODAL:"SHOW_UPLOAD_MODAL",HIDE_UPLOAD_MODAL:"HIDE_UPLOAD_MODAL",RESET_UPLOAD_MODAL:"RESET_UPLOAD_MODAL",SHOW_STRING_EDIT_MODAL:"SHOW_STRING_EDIT_MODAL",HIDE_STRING_EDIT_MODAL:"HIDE_STRING_EDIT_MODAL",FILE_UPLOAD_SUCCESS:"FILE_UPLOAD_SUCCESS",FILE_UPLOAD_ERROR:"FILE_UPLOAD_ERROR",START_FILE_UPLOAD:"START_FILE_UPLOAD",SET_FILE_UPLOAD_PERCENTAGE:"SET_FILE_UPLOAD_PERCENTAGE"}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(99),o=r(i),a=n(84),s=r(a),l=n(106),u=r(l),c=n(137),d=r(c),f=n(729),p=r(f),h=n(732),g=r(h),m=n(297),v=r(m),b=n(293),y=r(b),w=n(299),x=n(94),E=r(x),C=n(671),k=r(C),S=g["default"].docEditorStore,A=u["default"].createClass({displayName:"DocEditorController",getInitialState:function(){return this.getStoreState()},getStoreState:function(){return{isLoading:S.isLoading(),doc:S.getDoc(),cloneDocModalVisible:S.isCloneDocModalVisible(),uploadModalVisible:S.isUploadModalVisible(),deleteDocModalVisible:S.isDeleteDocModalVisible(),numFilesUploaded:S.getNumFilesUploaded(),conflictCount:S.getDocConflictCount()}},getDefaultProps:function(){return{database:{},isNewDoc:!1}},getCodeEditor:function(){if(this.state.isLoading)return u["default"].createElement(y["default"].LoadLines,null);var e=JSON.stringify(this.state.doc.attributes,null,"  "),t=[{name:"save",bindKey:{win:"Ctrl-S",mac:"Ctrl-S"},exec:this.saveDoc}];return u["default"].createElement(y["default"].CodeEditor,{id:"doc-editor",ref:"docEditor",defaultCode:e,mode:"json",autoFocus:!0,editorCommands:t,notifyUnsavedChanges:!0,stringEditModalEnabled:!0})},componentDidMount:function(){S.on("change",this.onChange,this)},componentWillUnmount:function(){S.off("change",this.onChange)},componentWillUpdate:function(e,t){this.state.numFilesUploaded!==t.numFilesUploaded&&this.getEditor().setValue(JSON.stringify(t.doc.attributes,null,"  "))},onChange:function(){this.isMounted()&&this.setState(this.getStoreState())},saveDoc:function(){p["default"].saveDoc(this.state.doc,this.checkDocIsValid(),this.onSaveComplete)},onSaveComplete:function(e){this.getEditor().clearChanges()},hideDeleteDocModal:function(){p["default"].hideDeleteDocModal()},deleteDoc:function(){p["default"].hideDeleteDocModal(),p["default"].deleteDoc(this.state.doc)},getEditor:function(){return this.refs.docEditor?this.refs.docEditor.getEditor():null},checkDocIsValid:function(){if(this.getEditor().hasErrors())return!1;var e=JSON.parse(this.getEditor().getValue());return this.state.doc.clear().set(e,{validate:!0}),!this.state.doc.validationError},clearChanges:function(){this.refs.docEditor.clearChanges()},getExtensionIcons:function(){var e=o["default"].getExtensions("DocEditor:icons");return _.map(e,function(e,t){return u["default"].createElement(e,{doc:this.state.doc,key:t,database:this.props.database})},this)},getButtonRow:function(){var e=this;return!this.props.isNewDoc&&u["default"].createElement("div",null,u["default"].createElement(T,{doc:this.state.doc,isLoading:this.state.isLoading}),u["default"].createElement("div",{className:"doc-editor-extension-icons"},this.getExtensionIcons()),this.state.conflictCount?u["default"].createElement(D,{title:"Conflicts ("+this.state.conflictCount+")",iconClass:"icon-columns",className:"conflicts",onClick:function(){o["default"].navigate(o["default"].urls("revision-browser","app",e.props.database.safeID(),e.state.doc.id))}}):null,u["default"].createElement(D,{className:"upload",title:"Upload Attachment",iconClass:"icon-circle-arrow-up",onClick:p["default"].showUploadModal}),u["default"].createElement(D,{title:"Clone Document",iconClass:"icon-repeat",onClick:p["default"].showCloneDocModal}),u["default"].createElement(D,{title:"Delete",iconClass:"icon-trash",onClick:p["default"].showDeleteDocModal}))},render:function(){var e=this.props.isNewDoc?"Create Document":"Save Changes";return u["default"].createElement("div",null,u["default"].createElement("div",{id:"doc-editor-actions-panel"},u["default"].createElement("div",{className:"doc-actions-left"},u["default"].createElement("button",{className:"save-doc btn btn-success save",type:"button",onClick:this.saveDoc},u["default"].createElement("i",{className:"icon fonticon-ok-circled"})," ",e),u["default"].createElement("div",null,u["default"].createElement("a",{href:o["default"].urls("allDocs","app",this.props.database.id),className:"js-back cancel-button"},"Cancel"))),u["default"].createElement("div",{className:"alignRight"},this.getButtonRow())),u["default"].createElement("div",{className:"code-region"},u["default"].createElement("div",{className:"bgEditorGutter"}),u["default"].createElement("div",{id:"editor-container",className:"doc-code"},this.getCodeEditor())),u["default"].createElement(N,{ref:"uploadModal",visible:this.state.uploadModalVisible,doc:this.state.doc}),u["default"].createElement(F,{doc:this.state.doc,database:this.props.database,visible:this.state.cloneDocModalVisible,onSubmit:this.clearChanges}),u["default"].createElement(v["default"].ConfirmationModal,{title:"Confirm Deletion",visible:this.state.deleteDocModalVisible,text:"Are you sure you want to delete this document?",onClose:this.hideDeleteDocModal,onSubmit:this.deleteDoc,successButtonLabel:"Delete Document"}))}}),T=u["default"].createClass({displayName:"AttachmentsPanelButton",propTypes:{isLoading:u["default"].PropTypes.bool.isRequired,doc:u["default"].PropTypes.object},getDefaultProps:function(){return{isLoading:!0,doc:{}}},getAttachmentList:function(){var e=this.props.doc.database.get("id"),t=this.props.doc.get("_id");return _.map(this.props.doc.get("_attachments"),function(n,r){var i=o["default"].urls("document","attachment",e,t,s["default"].utils.safeURLName(r));return u["default"].createElement("li",{key:r},u["default"].createElement("a",{href:i,target:"_blank","data-bypass":"true"}," ",u["default"].createElement("strong",null,r),u["default"].createElement("span",{className:"attachment-delimiter"},"-"),u["default"].createElement("span",null,n.content_type,", ",E["default"].formatSize(n.length))))})},render:function(){return!(this.props.isLoading||!this.props.doc.get("_attachments"))&&u["default"].createElement("div",{className:"panel-section view-attachments-section btn-group"},u["default"].createElement("button",{className:"panel-button dropdown-toggle btn","data-bypass":"true","data-toggle":"dropdown",title:"View Attachments",id:"view-attachments-menu"},u["default"].createElement("i",{className:"icon icon-paper-clip"}),u["default"].createElement("span",{className:"button-text"},"View Attachments"),u["default"].createElement("span",{className:"caret"})),u["default"].createElement("ul",{className:"dropdown-menu",role:"menu","aria-labelledby":"view-attachments-menu"},this.getAttachmentList()))}}),D=u["default"].createClass({displayName:"PanelButton",propTypes:{title:u["default"].PropTypes.string.isRequired,onClick:u["default"].PropTypes.func.isRequired,className:u["default"].PropTypes.string},getDefaultProps:function(){return{title:"",iconClass:"",onClick:function(){},className:""}},render:function(){var e="icon "+this.props.iconClass;return u["default"].createElement("div",{className:"panel-section"},u["default"].createElement("button",{className:"panel-button "+this.props.className,title:this.props.title,onClick:this.props.onClick},u["default"].createElement("i",{className:e}),u["default"].createElement("span",null,this.props.title)))}}),N=u["default"].createClass({displayName:"UploadModal",propTypes:{visible:u["default"].PropTypes.bool.isRequired,doc:u["default"].PropTypes.object},getInitialState:function(){return this.getStoreState()},getStoreState:function(){return{inProgress:S.isUploadInProgress(),loadPercentage:S.getUploadLoadPercentage(),errorMessage:S.getFileUploadErrorMsg()}},closeModal:function(e){e&&e.preventDefault(),this.state.inProgress&&p["default"].cancelUpload(),p["default"].hideUploadModal(),p["default"].resetUploadModal()},upload:function(){p["default"].uploadAttachment({doc:this.props.doc,rev:this.props.doc.get("_rev"),files:$(d["default"].findDOMNode(this.refs.attachments))[0].files})},render:function(){var e="alert alert-error";""===this.state.errorMessage&&(e+=" hide");var t="progress progress-info";return this.state.inProgress||(t+=" hide"),u["default"].createElement(w.Modal,{dialogClassName:"upload-file-modal",show:this.props.visible,onHide:this.closeModal},u["default"].createElement(w.Modal.Header,{closeButton:!0},u["default"].createElement(w.Modal.Title,null,"Upload Attachment")),u["default"].createElement(w.Modal.Body,null,u["default"].createElement("div",{className:e},this.state.errorMessage),u["default"].createElement("div",null,u["default"].createElement("form",{ref:"uploadForm",className:"form"},u["default"].createElement("p",null,"Please select the file you want to upload as an attachment to this document. This creates a new revision of the document, so it's not necessary to save after uploading."),u["default"].createElement("input",{ref:"attachments",type:"file",name:"_attachments"}),u["default"].createElement("br",null)),u["default"].createElement("div",{className:t},u["default"].createElement("div",{className:"bar",style:{width:this.state.loadPercentage+"%"}})))),u["default"].createElement(w.Modal.Footer,null,u["default"].createElement("a",{href:"#","data-bypass":"true",className:"cancel-link",onClick:this.closeModal},"Cancel"),u["default"].createElement("button",{href:"#",id:"upload-btn","data-bypass":"true",className:"btn btn-success save",onClick:this.upload},"Upload Attachment")))}}),F=u["default"].createClass({displayName:"CloneDocModal",propTypes:{visible:u["default"].PropTypes.bool.isRequired,doc:u["default"].PropTypes.object,database:u["default"].PropTypes.object.isRequired,onSubmit:u["default"].PropTypes.func.isRequired},getInitialState:function(){return{uuid:null}},cloneDoc:function(){this.props.onSubmit&&this.props.onSubmit(),p["default"].cloneDoc(this.props.database,this.props.doc,this.state.uuid)},componentDidUpdate:function(){if(null===this.state.uuid){var e=new k["default"].UUID;e.fetch().then(function(){this.setState({uuid:e.next()})}.bind(this))}},closeModal:function(e){e&&e.preventDefault(),p["default"].hideCloneDocModal()},docIDChange:function(e){this.setState({uuid:e.target.value})},render:function(){var e=this;return null!==this.state.uuid&&u["default"].createElement(w.Modal,{dialogClassName:"clone-doc-modal",show:this.props.visible,onHide:this.closeModal},u["default"].createElement(w.Modal.Header,{closeButton:!0},u["default"].createElement(w.Modal.Title,null,"Clone Document")),u["default"].createElement(w.Modal.Body,null,u["default"].createElement("form",{className:"form",onSubmit:function(t){t.preventDefault(),e.cloneDoc()}},u["default"].createElement("p",null,"Set new document's ID:"),u["default"].createElement("input",{ref:"newDocId",type:"text",autoFocus:!0,className:"input-block-level",onChange:this.docIDChange,value:this.state.uuid}))),u["default"].createElement(w.Modal.Footer,null,u["default"].createElement("a",{href:"#","data-bypass":"true",className:"cancel-link",onClick:this.closeModal},"Cancel"),u["default"].createElement("button",{className:"btn btn-success save",onClick:this.cloneDoc},u["default"].createElement("i",{className:"fonticon-ok-circled"})," Clone Document")))}});t["default"]={DocEditorController:A,AttachmentsPanelButton:T,UploadModal:N,CloneDocModal:F}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(99),o=r(i),a=n(730),s=r(a),l={};l.DocEditorStore=o["default"].Store.extend({initialize:function(){this.reset()},reset:function(){this._doc=null,this._isLoading=!0,this._cloneDocModalVisible=!1,this._deleteDocModalVisible=!1,this._uploadModalVisible=!1,this._numFilesUploaded=0,this._fileUploadErrorMsg="",this._uploadInProgress=!1,this._fileUploadLoadPercentage=0,this._docConflictCount=null},isLoading:function(){return this._isLoading},getDocConflictCount:function(){return this._docConflictCount},docLoaded:function(e){this._isLoading=!1,this._docConflictCount=e.doc.get("_conflicts")?e.doc.get("_conflicts").length:0,e.doc.unset("_conflicts"),this._doc=e.doc},getDoc:function(){return this._doc},isCloneDocModalVisible:function(){return this._cloneDocModalVisible},showCloneDocModal:function(){this._cloneDocModalVisible=!0},hideCloneDocModal:function(){this._cloneDocModalVisible=!1},isDeleteDocModalVisible:function(){return this._deleteDocModalVisible},showDeleteDocModal:function(){this._deleteDocModalVisible=!0},hideDeleteDocModal:function(){this._deleteDocModalVisible=!1},isUploadModalVisible:function(){return this._uploadModalVisible},showUploadModal:function(){this._uploadModalVisible=!0},hideUploadModal:function(){this._uploadModalVisible=!1},getNumFilesUploaded:function(){return this._numFilesUploaded},getFileUploadErrorMsg:function(){return this._fileUploadErrorMsg},setFileUploadErrorMsg:function(e){this._uploadInProgress=!1,this._fileUploadLoadPercentage=0,this._fileUploadErrorMsg=e},isUploadInProgress:function(){return this._uploadInProgress},getUploadLoadPercentage:function(){return this._fileUploadLoadPercentage},resetUploadModal:function(){this._uploadInProgress=!1,this._fileUploadLoadPercentage=0,this._fileUploadErrorMsg=""},startFileUpload:function(){this._uploadInProgress=!0,this._fileUploadLoadPercentage=0,this._fileUploadErrorMsg=""},dispatch:function(e){switch(e.type){case s["default"].RESET_DOC:this.reset();break;case s["default"].DOC_LOADED:this.docLoaded(e.options),this.triggerChange();break;case s["default"].SHOW_CLONE_DOC_MODAL:this.showCloneDocModal(),this.triggerChange();break;case s["default"].HIDE_CLONE_DOC_MODAL:this.hideCloneDocModal(),this.triggerChange();break;case s["default"].SHOW_DELETE_DOC_CONFIRMATION_MODAL:this.showDeleteDocModal(),this.triggerChange();break;case s["default"].HIDE_DELETE_DOC_CONFIRMATION_MODAL:this.hideDeleteDocModal(),this.triggerChange();break;case s["default"].SHOW_UPLOAD_MODAL:this.showUploadModal(),this.triggerChange();break;case s["default"].HIDE_UPLOAD_MODAL:this.hideUploadModal(),this.triggerChange();break;case s["default"].FILE_UPLOAD_SUCCESS:this._numFilesUploaded++,this.triggerChange();break;case s["default"].FILE_UPLOAD_ERROR:this.setFileUploadErrorMsg(e.options.error),this.triggerChange();break;case s["default"].RESET_UPLOAD_MODAL:this.resetUploadModal(),this.triggerChange();break;case s["default"].START_FILE_UPLOAD:this.startFileUpload(),this.triggerChange();break;case s["default"].SET_FILE_UPLOAD_PERCENTAGE:this._fileUploadLoadPercentage=e.options.percent,this.triggerChange();break;default:return}}}),l.docEditorStore=new l.DocEditorStore,l.docEditorStore.dispatchToken=o["default"].dispatcher.register(l.docEditorStore.dispatch),t["default"]=l},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){var n=g["default"].urls("databaseBaseURL","server",e);_=(0,x["default"])(n);var r=$.Deferred(),i=$.Deferred();
$.when(r,i).done(function(t,n){var r=o(t.paths,t.winner,Object.keys(t.deleted)),i=r[0];return i?void _.get(n._id,{rev:i}).then(function(i){a(t,n,r,i,e)}):a(t,n,r,null,e)}),_.get(t).then(i.resolve),(0,y["default"])(_,t).then(r.resolve)}function o(e,t,n){return e.reduce(function(e,n){return n[0]!==t&&e.push(n[0]),e},[]).filter(function(e){return n.indexOf(e)===-1})}function a(e,t,n,r,i){g["default"].dispatch({type:v["default"].REV_BROWSER_REV_TREE_LOADED,options:{tree:e,doc:t,conflictDoc:r,conflictingRevs:n,databaseName:i}})}function s(e){g["default"].dispatch({type:v["default"].REV_BROWSER_DIFF_ENABLE_DIFF_VIEW,options:{enableDiff:e}})}function l(e,t){_.get(e._id,{rev:t}).then(function(t){u(e,t)})}function u(e,t){g["default"].dispatch({type:v["default"].REV_BROWSER_DIFF_DOCS_READY,options:{theirs:t,ours:e}})}function c(e,t){g["default"].dispatch({type:v["default"].REV_BROWSER_SHOW_CONFIRM_MODAL,options:{show:e,docToWin:t}})}function d(e,t,n,r){var i=o(n,r,[]),a=f(t,i);$.ajax({url:g["default"].urls("bulk_docs","server",e,""),type:"POST",contentType:"application/json; charset=UTF-8",data:JSON.stringify(a),success:function(){g["default"].addNotification({msg:"Conflicts successfully solved.",clear:!0}),c(!1,null),g["default"].navigate(g["default"].urls("allDocs","app",e,""))},error:function(e){g["default"].addNotification({msg:"Failed to delete clean up conflicts!",type:"error",clear:!0})}})}function f(e,t){var n=t.map(function(t){return{_id:e,_rev:t,_deleted:!0}});return{docs:n}}Object.defineProperty(t,"__esModule",{value:!0});var p=n(84),h=(r(p),n(99)),g=r(h),m=n(734),v=r(m),b=n(735),y=r(b),w=n(736),x=r(w),_=void 0;t["default"]={getConflictingRevs:o,selectRevAsWinner:d,buildBulkDeletePayload:f,chooseLeaves:l,dispatchDocsToDiff:u,initDiffEditor:i,dispatchData:a,toggleDiffView:s,showConfirmModal:c}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]={REV_BROWSER_REV_TREE_LOADED:"REV_TREE_LOADED",REV_BROWSER_DIFF_DOCS_READY:"REV_BROWSER_DIFF_DOCS_READY",REV_BROWSER_DIFF_ENABLE_DIFF_VIEW:"REV_BROWSER_DIFF_ENABLE_DIFF_VIEW",REV_BROWSER_SHOW_CONFIRM_MODAL:"REV_BROWSER_SHOW_CONFIRM_MODAL"}},function(e,t){e.exports=function(e,t){return e.get(t)["catch"](function(e){if("deleted"!==e.reason)throw e}).then(function(n){var r=n._rev;return e.get(t,{revs:!0,open_revs:"all"}).then(function(e){var t={},n=e.map(function(e){e=e.ok,e._deleted&&(t[e._rev]=!0);var n=e._revisions;return n.ids.map(function(e,t){return n.start-t+"-"+e})});return{paths:n,deleted:t,winner:r}})})}},function(e,t,n){(function(t,r){"use strict";function i(e){return e&&"object"==typeof e&&"default"in e?e["default"]:e}function o(e){return e instanceof ArrayBuffer||"undefined"!=typeof Blob&&e instanceof Blob}function a(e){if("function"==typeof e.slice)return e.slice(0);var t=new ArrayBuffer(e.byteLength),n=new Uint8Array(t),r=new Uint8Array(e);return n.set(r),t}function s(e){if(e instanceof ArrayBuffer)return a(e);var t=e.size,n=e.type;return"function"==typeof e.slice?e.slice(0,t,n):e.webkitSlice(0,t,n)}function l(e){var t=Object.getPrototypeOf(e);if(null===t)return!0;var n=t.constructor;return"function"==typeof n&&n instanceof n&&Or.call(n)==Lr}function u(e){var t,n,r;if(!e||"object"!=typeof e)return e;if(Array.isArray(e)){for(t=[],n=0,r=e.length;n<r;n++)t[n]=u(e[n]);return t}if(e instanceof Date)return e.toISOString();if(o(e))return s(e);if(!l(e))return e;t={};for(n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var i=u(e[n]);"undefined"!=typeof i&&(t[n]=i)}return t}function c(e){var t=!1;return kr(function(n){if(t)throw new Error("once called more than once");t=!0,e.apply(this,n)})}function d(e){return kr(function(n){n=u(n);var r,i=this,o="function"==typeof n[n.length-1]&&n.pop();o&&(r=function(e,n){t.nextTick(function(){o(e,n)})});var a=new Mr(function(t,r){var o;try{var a=c(function(e,n){e?r(e):t(n)});n.push(a),o=e.apply(i,n),o&&"function"==typeof o.then&&t(o)}catch(s){r(s)}});return r&&a.then(function(e){r(null,e)},r),a})}function f(e,t){function n(e,t,n){if(Pr.enabled){for(var r=[e._db_name,t],i=0;i<n.length-1;i++)r.push(n[i]);Pr.apply(null,r);var o=n[n.length-1];n[n.length-1]=function(n,r){var i=[e._db_name,t];i=i.concat(n?["error",n]:["success",r]),Pr.apply(null,i),o(n,r)}}}return d(kr(function(r){if(this._closed)return Mr.reject(new Error("database is closed"));if(this._destroyed)return Mr.reject(new Error("database is destroyed"));var i=this;return n(i,e,r),this.taskqueue.isReady?t.apply(this,r):new Mr(function(t,n){i.taskqueue.addTask(function(o){o?n(o):t(i[e].apply(i,r))})})}))}function p(e,t){for(var n={},r=0,i=t.length;r<i;r++){var o=t[r];o in e&&(n[o]=e[o])}return n}function h(e){return e}function g(e){return[{ok:e}]}function m(e,t,n){function r(){var e=[];f.forEach(function(t){t.docs.forEach(function(n){e.push({id:t.id,docs:[n]})})}),n(null,{results:e})}function i(){++d===c&&r()}function o(e,t,n){f[e]={id:t,docs:n},i()}function a(){if(!(v>=m.length)){var e=Math.min(v+Ir,m.length),t=m.slice(v,e);s(t,v),v+=t.length}}function s(n,r){n.forEach(function(n,i){var s=r+i,l=u[n],c=p(l[0],["atts_since","attachments"]);c.open_revs=l.map(function(e){return e.rev}),c.open_revs=c.open_revs.filter(h);var d=h;0===c.open_revs.length&&(delete c.open_revs,d=g),["revs","attachments","binary","ajax"].forEach(function(e){e in t&&(c[e]=t[e])}),e.get(n,c,function(e,t){var r;r=e?[{error:e}]:d(t),o(s,n,r),a()})})}var l=t.docs,u={};l.forEach(function(e){e.id in u?u[e.id].push(e):u[e.id]=[e]});var c=Object.keys(u).length,d=0,f=new Array(c),m=Object.keys(u),v=0;a()}function v(){return"undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage&&"undefined"!=typeof chrome.storage.local}function b(){return yr}function y(e){v()?chrome.storage.onChanged.addListener(function(t){null!=t.db_name&&e.emit(t.dbName.newValue)}):b()&&("undefined"!=typeof addEventListener?addEventListener("storage",function(t){e.emit(t.key)}):window.attachEvent("storage",function(t){e.emit(t.key)}))}function w(){Sr.EventEmitter.call(this),this._listeners={},y(this)}function x(e){if("undefined"!==console&&e in console){var t=Array.prototype.slice.call(arguments,1);console[e].apply(console,t)}}function _(e,t){var n=6e5;e=parseInt(e,10)||0,t=parseInt(t,10),t!==t||t<=e?t=(e||1)<<1:t+=1,t>n&&(e=n>>1,t=n);var r=Math.random(),i=t-e;return~~(i*r+e)}function E(e){var t=0;return e||(t=2e3),_(e,t)}function C(e,t){x("info","The above "+e+" is totally normal. "+t)}function k(e){Error.call(this,e.reason),this.status=e.status,this.name=e.error,this.message=e.reason,this.error=!0}function S(e,t){function n(t){for(var n in e)"function"!=typeof e[n]&&(this[n]=e[n]);void 0!==t&&(this.reason=t)}return n.prototype=k.prototype,new n(t)}function A(e){if("object"!=typeof e){var t=e;e=Hr,e.data=t}return"error"in e&&"conflict"===e.error&&(e.name="conflict",e.status=409),"name"in e||(e.name=e.error||"unknown"),"status"in e||(e.status=500),"message"in e||(e.message=e.message||e.reason),e}function T(e,t,n){try{return!e(t,n)}catch(r){var i="Filter function threw: "+r.toString();return S(Yr,i)}}function D(e){var t={},n=e.filter&&"function"==typeof e.filter;return t.query=e.query_params,function(r){r.doc||(r.doc={});var i=n&&T(e.filter,r.doc,t);if("object"==typeof i)return i;if(i)return!1;if(e.include_docs){if(!e.attachments)for(var o in r.doc._attachments)r.doc._attachments.hasOwnProperty(o)&&(r.doc._attachments[o].stub=!0)}else delete r.doc;return!0}}function N(e){for(var t=[],n=0,r=e.length;n<r;n++)t=t.concat(e[n]);return t}function F(e){var t;if(e?"string"!=typeof e?t=S(Vr):/^_/.test(e)&&!/^_(design|local)/.test(e)&&(t=S(Wr)):t=S(Ur),t)throw t}function M(e,t){return"listenerCount"in e?e.listenerCount(t):Sr.EventEmitter.listenerCount(e,t)}function O(e){if(!e)return null;var t=e.split("/");return 2===t.length?t:1===t.length?[e,e]:null}function L(e){var t=O(e);return t?t.join("/"):null}function P(e){for(var t=ii.exec(e),n={},r=14;r--;){var i=ti[r],o=t[r]||"",a=["user","password"].indexOf(i)!==-1;n[i]=a?decodeURIComponent(o):o}return n[ni]={},n[ti[12]].replace(ri,function(e,t,r){t&&(n[ni][t]=r)}),n}function I(e,t,n){return new Mr(function(r,i){e.get(t,function(o,a){if(o){if(404!==o.status)return i(o);a={}}var s=a._rev,l=n(a);return l?(l._id=t,l._rev=s,void r(R(e,l,n))):r({updated:!1,rev:s})})})}function R(e,t,n){return e.put(t).then(function(e){return{updated:!0,rev:e.rev}},function(r){if(409!==r.status)throw r;return I(e,t._id,n)})}function B(e){return 0|Math.random()*e}function j(e,t){t=t||oi.length;var n="",r=-1;if(e){for(;++r<e;)n+=oi[B(t)];return n}for(;++r<36;)switch(r){case 8:case 13:case 18:case 23:n+="-";break;case 19:n+=oi[3&B(16)|8];break;default:n+=oi[B(16)]}return n}function $(e){for(var t,n,r,i,o=e.rev_tree.slice();i=o.pop();){var a=i.ids,s=a[2],l=i.pos;if(s.length)for(var u=0,c=s.length;u<c;u++)o.push({pos:l+1,ids:s[u]});else{var d=!!a[1].deleted,f=a[0];t&&!(r!==d?r:n!==l?n<l:t<f)||(t=f,n=l,r=d)}}return n+"-"+t}function V(e,t){for(var n,r=e.slice();n=r.pop();)for(var i=n.pos,o=n.ids,a=o[2],s=t(0===a.length,i,o[0],n.ctx,o[1]),l=0,u=a.length;l<u;l++)r.push({pos:i+1,ids:a[l],ctx:s})}function U(e,t){return e.pos-t.pos}function W(e){var t=[];V(e,function(e,n,r,i,o){e&&t.push({rev:n+"-"+r,pos:n,opts:o})}),t.sort(U).reverse();for(var n=0,r=t.length;n<r;n++)delete t[n].pos;return t}function q(e){for(var t=$(e),n=W(e.rev_tree),r=[],i=0,o=n.length;i<o;i++){var a=n[i];a.rev===t||a.opts.deleted||r.push(a.rev)}return r}function H(e){var t=[];return V(e.rev_tree,function(e,n,r,i,o){"available"!==o.status||e||(t.push(n+"-"+r),o.status="missing")}),t}function z(e){for(var t,n=[],r=e.slice();t=r.pop();){var i=t.pos,o=t.ids,a=o[0],s=o[1],l=o[2],u=0===l.length,c=t.history?t.history.slice():[];c.push({id:a,opts:s}),u&&n.push({pos:i+1-c.length,ids:c});for(var d=0,f=l.length;d<f;d++)r.push({pos:i+1,ids:l[d],history:c})}return n.reverse()}function G(e,t){return e.pos-t.pos}function K(e,t,n){for(var r,i=0,o=e.length;i<o;)r=i+o>>>1,n(e[r],t)<0?i=r+1:o=r;return i}function Y(e,t,n){var r=K(e,t,n);e.splice(r,0,t)}function X(e,t){for(var n,r,i=t,o=e.length;i<o;i++){var a=e[i],s=[a.id,a.opts,[]];r?(r[2].push(s),r=s):n=r=s}return n}function Q(e,t){return e[0]<t[0]?-1:1}function J(e,t){for(var n=[{tree1:e,tree2:t}],r=!1;n.length>0;){var i=n.pop(),o=i.tree1,a=i.tree2;(o[1].status||a[1].status)&&(o[1].status="available"===o[1].status||"available"===a[1].status?"available":"missing");for(var s=0;s<a[2].length;s++)if(o[2][0]){for(var l=!1,u=0;u<o[2].length;u++)o[2][u][0]===a[2][s][0]&&(n.push({tree1:o[2][u],tree2:a[2][s]}),l=!0);l||(r="new_branch",Y(o[2],a[2][s],Q))}else r="new_leaf",o[2][0]=a[2][s]}return{conflicts:r,tree:e}}function Z(e,t,n){var r,i=[],o=!1,a=!1;if(!e.length)return{tree:[t],conflicts:"new_leaf"};for(var s=0,l=e.length;s<l;s++){var u=e[s];if(u.pos===t.pos&&u.ids[0]===t.ids[0])r=J(u.ids,t.ids),i.push({pos:u.pos,ids:r.tree}),o=o||r.conflicts,a=!0;else if(n!==!0){var c=u.pos<t.pos?u:t,d=u.pos<t.pos?t:u,f=d.pos-c.pos,p=[],h=[];for(h.push({ids:c.ids,diff:f,parent:null,parentIdx:null});h.length>0;){var g=h.pop();if(0!==g.diff)for(var m=g.ids[2],v=0,b=m.length;v<b;v++)h.push({ids:m[v],diff:g.diff-1,parent:g.ids,parentIdx:v});else g.ids[0]===d.ids[0]&&p.push(g)}var y=p[0];y?(r=J(y.ids,d.ids),y.parent[2][y.parentIdx]=r.tree,i.push({pos:c.pos,ids:c.ids}),o=o||r.conflicts,a=!0):i.push(u)}else i.push(u)}return a||i.push(t),i.sort(G),{tree:i,conflicts:o||"internal_node"}}function ee(e,t){for(var n,r=z(e),i={},o=0,a=r.length;o<a;o++){for(var s=r[o],l=s.ids,u=Math.max(0,l.length-t),c={pos:s.pos+u,ids:X(l,u)},d=0;d<u;d++){var f=s.pos+d+"-"+l[d].id;i[f]=!0}n=n?Z(n,c,!0).tree:[c]}return V(n,function(e,t,n){delete i[t+"-"+n]}),{tree:n,revs:Object.keys(i)}}function te(e,t,n){var r=Z(e,t),i=ee(r.tree,n);return{tree:i.tree,stemmedRevs:i.revs,conflicts:r.conflicts}}function ne(e,t){for(var n,r=e.slice(),i=t.split("-"),o=parseInt(i[0],10),a=i[1];n=r.pop();){if(n.pos===o&&n.ids[0]===a)return!0;for(var s=n.ids[2],l=0,u=s.length;l<u;l++)r.push({pos:n.pos+1,ids:s[l]})}return!1}function re(e){return e.ids}function ie(e,t){t||(t=$(e));for(var n,r=t.substring(t.indexOf("-")+1),i=e.rev_tree.map(re);n=i.pop();){if(n[0]===r)return!!n[1].deleted;i=i.concat(n[2])}}function oe(e){return/^_local/.test(e)}function ae(e){return Ar("return "+e+";",{})}function se(e){return new Function("doc",["var emitted = false;","var emit = function (a, b) {","  emitted = true;","};","var view = "+e+";","view(doc);","if (emitted) {","  return true;","}"].join("\n"))}function le(e,t){try{e.emit("change",t)}catch(n){x("error",'Error in .on("change", function):',n)}}function ue(e,t,n){function r(){i.cancel()}Sr.EventEmitter.call(this);var i=this;this.db=e,t=t?u(t):{};var o=t.complete=c(function(t,n){t?M(i,"error")>0&&i.emit("error",t):i.emit("complete",n),i.removeAllListeners(),e.removeListener("destroyed",r)});n&&(i.on("complete",function(e){n(null,e)}),i.on("error",n)),e.once("destroyed",r),t.onChange=function(e){t.isCancelled||(le(i,e),i.startSeq&&i.startSeq<=e.seq&&(i.startSeq=!1))};var a=new Mr(function(e,n){t.complete=function(t,r){t?n(t):e(r)}});i.once("cancel",function(){e.removeListener("destroyed",r),t.complete(null,{status:"cancelled"})}),this.then=a.then.bind(a),this["catch"]=a["catch"].bind(a),this.then(function(e){o(null,e)},o),e.taskqueue.isReady?i.doChanges(t):e.taskqueue.addTask(function(){i.isCancelled?i.emit("cancel"):i.doChanges(t)})}function ce(e,t,n){var r=[{rev:e._rev}];"all_docs"===n.style&&(r=W(t.rev_tree).map(function(e){return{rev:e.rev}}));var i={id:t.id,changes:r,doc:e};return ie(t,e._rev)&&(i.deleted=!0),n.conflicts&&(i.doc._conflicts=q(t),i.doc._conflicts.length||delete i.doc._conflicts),i}function de(e,t){return e<t?-1:e>t?1:0}function fe(e,t){for(var n=0;n<e.length;n++)if(t(e[n],n)===!0)return e[n]}function pe(e){return function(t,n){t||n[0]&&n[0].error?e(t||n[0]):e(null,n.length?n[0]:n)}}function he(e){for(var t=0;t<e.length;t++){var n=e[t];if(n._deleted)delete n._attachments;else if(n._attachments)for(var r=Object.keys(n._attachments),i=0;i<r.length;i++){var o=r[i];n._attachments[o]=p(n._attachments[o],["data","digest","content_type","length","revpos","stub"])}}}function ge(e,t){var n=de(e._id,t._id);if(0!==n)return n;var r=e._revisions?e._revisions.start:0,i=t._revisions?t._revisions.start:0;return de(r,i)}function me(e){var t={},n=[];return V(e,function(e,r,i,o){var a=r+"-"+i;return e&&(t[a]=0),void 0!==o&&n.push({from:o,to:a}),a}),n.reverse(),n.forEach(function(e){void 0===t[e.from]?t[e.from]=1+t[e.to]:t[e.from]=Math.min(t[e.from],1+t[e.to])}),t}function ve(e,t,n){var r="limit"in t?t.keys.slice(t.skip,t.limit+t.skip):t.skip>0?t.keys.slice(t.skip):t.keys;if(t.descending&&r.reverse(),!r.length)return e._allDocs({limit:0},n);var i={offset:t.skip};return Mr.all(r.map(function(n){var r=wr.extend({key:n,deleted:"ok"},t);return["limit","skip","keys"].forEach(function(e){delete r[e]}),new Mr(function(t,o){e._allDocs(r,function(e,r){return e?o(e):(i.total_rows=r.total_rows,void t(r.rows[0]||{key:n,error:"not_found"}))})})})).then(function(e){return i.rows=e,i})}function be(e){var n=e._compactionQueue[0],r=n.opts,i=n.callback;e.get("_local/compaction")["catch"](function(){return!1}).then(function(n){n&&n.last_seq&&(r.last_seq=n.last_seq),e._compact(r,function(n,r){n?i(n):i(null,r),t.nextTick(function(){e._compactionQueue.shift(),e._compactionQueue.length&&be(e)})})})}function ye(e){return"_"===e.charAt(0)&&e+"is not a valid attachment name, attachment names cannot start with '_'"}function we(){Sr.EventEmitter.call(this)}function xe(){this.isReady=!1,this.failed=!1,this.queue=[]}function _e(e){e&&r.debug&&x("error",e)}function Ee(e,t){function n(){o.emit("destroyed",i)}function r(){e.removeListener("destroyed",n),e.emit("destroyed",e)}var i=t.originalName,o=e.constructor,a=o._destructionListeners;e.once("destroyed",n),a.has(i)||a.set(i,[]),a.get(i).push(r)}function Ce(e,t,n){if(!(this instanceof Ce))return new Ce(e,t,n);var r=this;if("function"!=typeof t&&"undefined"!=typeof t||(n=t,t={}),e&&"object"==typeof e&&(t=e,e=void 0),"undefined"==typeof n)n=_e;else{var i=n;n=function(){return x("warn","Using a callback for new PouchDB()is deprecated."),i.apply(null,arguments)}}e=e||t.name,t=u(t),delete t.name,this.__opts=t;var o=n;r.auto_compaction=t.auto_compaction,r.prefix=Ce.prefix,we.call(r),r.taskqueue=new xe;var a=new Mr(function(i,o){n=function(e,t){return e?o(e):(delete t.then,void i(t))},t=u(t);var a,s;return function(){try{if("string"!=typeof e)throw s=new Error("Missing/invalid DB name"),s.code=400,s;var n=(t.prefix||"")+e;if(a=Ce.parseAdapter(n,t),t.originalName=e,t.name=a.name,t.adapter=t.adapter||a.adapter,r._adapter=t.adapter,xr("pouchdb:adapter")("Picked adapter: "+t.adapter),r._db_name=e,!Ce.adapters[t.adapter])throw s=new Error("Adapter is missing"),s.code=404,s;if(!Ce.adapters[t.adapter].valid())throw s=new Error("Invalid Adapter"),s.code=404,s}catch(i){r.taskqueue.fail(i)}}(),s?o(s):(r.adapter=t.adapter,r.replicate={},r.replicate.from=function(e,t,n){return r.constructor.replicate(e,r,t,n)},r.replicate.to=function(e,t,n){return r.constructor.replicate(r,e,t,n)},r.sync=function(e,t,n){return r.constructor.sync(r,e,t,n)},r.replicate.sync=r.sync,void Ce.adapters[t.adapter].call(r,t,function(e){return e?(r.taskqueue.fail(e),void n(e)):(Ee(r,t),r.emit("created",r),Ce.emit("created",t.originalName),r.taskqueue.ready(r),void n(null,r))}))});a.then(function(e){o(null,e)},o),r.then=a.then.bind(a),r["catch"]=a["catch"].bind(a)}function ke(e){Object.keys(Sr.EventEmitter.prototype).forEach(function(t){"function"==typeof Sr.EventEmitter.prototype[t]&&(e[t]=ai[t].bind(ai))});var t=e._destructionListeners=new Cr.Map;e.on("destroyed",function(e){t.get(e).forEach(function(e){e()}),t["delete"](e)})}function Se(e){return e.reduce(function(e,t){return e[t]=!0,e},{})}function Ae(e){if(!/^\d+\-./.test(e))return S(Zr);var t=e.indexOf("-"),n=e.substring(0,t),r=e.substring(t+1);return{prefix:parseInt(n,10),id:r}}function Te(e,t){for(var n=e.start-e.ids.length+1,r=e.ids,i=[r[0],t,[]],o=1,a=r.length;o<a;o++)i=[r[o],{status:"missing"},[i]];return[{pos:n,ids:i}]}function De(e,t){var n,r,i,o={status:"available"};if(e._deleted&&(o.deleted=!0),t)if(e._id||(e._id=j()),r=j(32,16).toLowerCase(),e._rev){if(i=Ae(e._rev),i.error)return i;e._rev_tree=[{pos:i.prefix,ids:[i.id,{status:"missing"},[[r,o,[]]]]}],n=i.prefix+1}else e._rev_tree=[{pos:1,ids:[r,o,[]]}],n=1;else if(e._revisions&&(e._rev_tree=Te(e._revisions,o),n=e._revisions.start,r=e._revisions.ids[0]),!e._rev_tree){if(i=Ae(e._rev),i.error)return i;n=i.prefix,r=i.id,e._rev_tree=[{pos:n,ids:[r,o,[]]}]}F(e._id),e._rev=n+"-"+r;var a={metadata:{},data:{}};for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)){var l="_"===s[0];if(l&&!ui[s]){var u=S(Kr,s);throw u.message=Kr.message+": "+s,u}l&&!ci[s]?a.metadata[s.slice(1)]=e[s]:a.data[s]=e[s]}return a}function Ne(e,t){e=e||[],t=t||{};try{return new Blob(e,t)}catch(n){if("TypeError"!==n.name)throw n;for(var r="undefined"!=typeof BlobBuilder?BlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder?MozBlobBuilder:WebKitBlobBuilder,i=new r,o=0;o<e.length;o+=1)i.append(e[o]);return i.getBlob(t.type)}}function Fe(e){for(var t=e.length,n=new ArrayBuffer(t),r=new Uint8Array(n),i=0;i<t;i++)r[i]=e.charCodeAt(i);return n}function Me(e,t){return Ne([Fe(e)],{type:t})}function Oe(e,t){return Me(di(e),t)}function Le(e){for(var t="",n=new Uint8Array(e),r=n.byteLength,i=0;i<r;i++)t+=String.fromCharCode(n[i]);return t}function Pe(e,t){if("undefined"==typeof FileReader)return t(Le((new FileReaderSync).readAsArrayBuffer(e)));var n=new FileReader,r="function"==typeof n.readAsBinaryString;n.onloadend=function(e){var n=e.target.result||"";return r?t(n):void t(Le(n))},r?n.readAsBinaryString(e):n.readAsArrayBuffer(e)}function Ie(e,t){Pe(e,function(e){t(e)})}function Re(e,t){Ie(e,function(e){t(fi(e))})}function Be(e,t){if("undefined"==typeof FileReader)return t((new FileReaderSync).readAsArrayBuffer(e));var n=new FileReader;n.onloadend=function(e){var n=e.target.result||new ArrayBuffer(0);t(n)},n.readAsArrayBuffer(e)}function je(e){return fi(e)}function $e(e,t,n){return e.webkitSlice?e.webkitSlice(t,n):e.slice(t,n)}function Ve(e,t,n,r,i){(n>0||r<t.size)&&(t=$e(t,n,r)),Be(t,function(t){e.append(t),i()})}function Ue(e,t,n,r,i){(n>0||r<t.length)&&(t=t.substring(n,r)),e.appendBinary(t),i()}function We(e,t){function n(){pi(i)}function r(){var e=c.end(!0),n=je(e);t(n),c.destroy()}function i(){var t=u*s,i=t+s;u++,u<l?d(c,e,t,i,n):d(c,e,t,i,r)}var o="string"==typeof e,a=o?e.length:e.size,s=Math.min(hi,a),l=Math.ceil(a/s),u=0,c=o?new Tr:new Tr.ArrayBuffer,d=o?Ue:Ve;i()}function qe(e){return Tr.hash(e)}function He(e){try{return di(e)}catch(t){var n=S(zr,"Attachment is not a valid base64 string");return{error:n}}}function ze(e,t,n){var r=He(e.data);return r.error?n(r.error):(e.length=r.length,"blob"===t?e.data=Me(r,e.content_type):"base64"===t?e.data=fi(r):e.data=r,void We(r,function(t){e.digest="md5-"+t,n()}))}function Ge(e,t,n){We(e.data,function(r){e.digest="md5-"+r,e.length=e.data.size||e.data.length||0,"binary"===t?Ie(e.data,function(t){e.data=t,n()}):"base64"===t?Re(e.data,function(t){e.data=t,n()}):n()})}function Ke(e,t,n){return e.stub?n():void("string"==typeof e.data?ze(e,t,n):Ge(e,t,n))}function Ye(e,t,n){function r(){o++,e.length===o&&(i?n(i):n())}if(!e.length)return n();var i,o=0;e.forEach(function(e){function n(e){i=e,a++,a===o.length&&r()}var o=e.data&&e.data._attachments?Object.keys(e.data._attachments):[],a=0;if(!o.length)return r();for(var s in e.data._attachments)e.data._attachments.hasOwnProperty(s)&&Ke(e.data._attachments[s],t,n)})}function Xe(e,t,n,r,i,o,a,s){if(ne(t.rev_tree,n.metadata.rev))return r[i]=n,o();var l=t.winningRev||$(t),u="deleted"in t?t.deleted:ie(t,l),c="deleted"in n.metadata?n.metadata.deleted:ie(n.metadata),d=/^1-/.test(n.metadata.rev);if(u&&!c&&s&&d){var f=n.data;f._rev=l,f._id=n.metadata.id,n=De(f,s)}var p=te(t.rev_tree,n.metadata.rev_tree[0],e),h=s&&(u&&c||!u&&"new_leaf"!==p.conflicts||u&&!c&&"new_branch"===p.conflicts);if(h){var g=S($r);return r[i]=g,o()}var m=n.metadata.rev;n.metadata.rev_tree=p.tree,n.stemmedRevs=p.stemmedRevs||[],t.rev_map&&(n.metadata.rev_map=t.rev_map);var v,b=$(n.metadata),y=ie(n.metadata,b),w=u===y?0:u<y?-1:1;v=m===b?y:ie(n.metadata,m),a(n,b,y,v,!0,w,i,o)}function Qe(e){return"missing"===e.metadata.rev_tree[0].ids[1].status}function Je(e,t,n,r,i,o,a,s,l){function u(e,t,n){var r=$(e.metadata),i=ie(e.metadata,r);if("was_delete"in s&&i)return o[t]=S(jr,"deleted"),n();var l=d&&Qe(e);if(l){var u=S($r);return o[t]=u,n()}var c=i?0:1;a(e,r,i,i,!1,c,t,n)}function c(){++p===h&&l&&l()}e=e||1e3;var d=s.new_edits,f=new Cr.Map,p=0,h=t.length;t.forEach(function(e,t){if(e._id&&oe(e._id)){var r=e._deleted?"_removeLocal":"_putLocal";return void n[r](e,{ctx:i},function(e,n){o[t]=e||n,c()})}var a=e.metadata.id;f.has(a)?(h--,f.get(a).push([e,t])):f.set(a,[[e,t]])}),f.forEach(function(t,n){function i(){++l<t.length?s():c()}function s(){var s=t[l],c=s[0],f=s[1];if(r.has(n))Xe(e,r.get(n),c,o,f,i,a,d);else{var p=te([],c.metadata.rev_tree[0],e);c.metadata.rev_tree=p.tree,c.stemmedRevs=p.stemmedRevs||[],u(c,f,i)}}var l=0;s()})}function Ze(e){try{return JSON.parse(e)}catch(t){return Dr.parse(e)}}function et(e){return e.length<5e4?JSON.parse(e):Ze(e)}function tt(e){try{return JSON.stringify(e)}catch(t){return Dr.stringify(e)}}function nt(e,t,n,r){try{e.apply(t,n)}catch(i){r.emit("error",i)}}function rt(e){if(!Ei.running&&Ei.queue.length){Ei.running=!0;var n=Ei.queue.shift();n.action(function(r,i){nt(n.callback,this,[r,i],e),Ei.running=!1,t.nextTick(function(){rt(e)})})}}function it(e){return function(t){var n="unknown_error";t.target&&t.target.error&&(n=t.target.error.name||t.target.error.message),e(S(Qr,n,t.type))}}function ot(e,t,n){return{data:tt(e),winningRev:t,deletedOrLocal:n?"1":"0",seq:e.seq,id:e.id}}function at(e){if(!e)return null;var t=et(e.data);return t.winningRev=e.winningRev,t.deleted="1"===e.deletedOrLocal,t.seq=e.seq,t}function st(e){if(!e)return e;var t=e._doc_id_rev.lastIndexOf(":");return e._id=e._doc_id_rev.substring(0,t-1),e._rev=e._doc_id_rev.substring(t+1),delete e._doc_id_rev,e}function lt(e,t,n,r){n?r(e?"string"!=typeof e?e:Oe(e,t):Ne([""],{type:t})):e?"string"!=typeof e?Pe(e,function(e){r(fi(e))}):r(e):r("")}function ut(e,t,n,r){function i(){++s===a.length&&r&&r()}function o(e,t){var r=e._attachments[t],o=r.digest,a=n.objectStore(bi).get(o);a.onsuccess=function(e){r.body=e.target.result.body,i()}}var a=Object.keys(e._attachments||{});if(!a.length)return r&&r();var s=0;a.forEach(function(n){t.attachments&&t.include_docs?o(e,n):(e._attachments[n].stub=!0,i())})}function ct(e,t){return Mr.all(e.map(function(e){if(e.doc&&e.doc._attachments){var n=Object.keys(e.doc._attachments);return Mr.all(n.map(function(n){var r=e.doc._attachments[n];if("body"in r){var i=r.body,o=r.content_type;return new Mr(function(a){lt(i,o,t,function(t){e.doc._attachments[n]=wr.extend(p(r,["digest","content_type"]),{data:t}),a()})})}}))}}))}function dt(e,t,n){function r(){u--,u||i()}function i(){o.length&&o.forEach(function(e){var t=l.index("digestSeq").count(IDBKeyRange.bound(e+"::",e+"::",!1,!1));t.onsuccess=function(t){var n=t.target.result;n||s["delete"](e)}})}var o=[],a=n.objectStore(vi),s=n.objectStore(bi),l=n.objectStore(yi),u=e.length;e.forEach(function(e){var n=a.index("_doc_id_rev"),i=t+"::"+e;n.getKey(i).onsuccess=function(e){var t=e.target.result;if("number"!=typeof t)return r();a["delete"](t);var n=l.index("seq").openCursor(IDBKeyRange.only(t));n.onsuccess=function(e){var t=e.target.result;if(t){var n=t.value.digestSeq.split("::")[0];o.push(n),l["delete"](t.primaryKey),t["continue"]()}else r()}}})}function ft(e,t,n){try{return{txn:e.transaction(t,n)}}catch(r){return{error:r}}}function pt(e,t,n,r,i,o,a){function s(){var e=[mi,vi,bi,xi,yi],t=ft(i,e,"readwrite");return t.error?a(t.error):(b=t.txn,b.onabort=it(a),b.ontimeout=it(a),b.oncomplete=c,y=b.objectStore(mi),w=b.objectStore(vi),x=b.objectStore(bi),_=b.objectStore(yi),void f(function(e){return e?(M=!0,a(e)):void u()}))}function l(){Je(e.revs_limit,C,r,F,b,N,p,n)}function u(){function e(){++n===C.length&&l()}function t(t){var n=at(t.target.result);n&&F.set(n.id,n),e()}if(C.length)for(var n=0,r=0,i=C.length;r<i;r++){var o=C[r];if(o._id&&oe(o._id))e();else{var a=y.get(o.metadata.id);a.onsuccess=t}}}function c(){M||(o.notify(r._meta.name),r._meta.docCount+=k,a(null,N))}function d(e,t){var n=x.get(e);n.onsuccess=function(n){if(n.target.result)t();else{var r=S(ei,"unknown stub attachment with digest "+e);r.status=412,t(r)}}}function f(e){function t(){++i===n.length&&e(r)}var n=[];if(C.forEach(function(e){e.data&&e.data._attachments&&Object.keys(e.data._attachments).forEach(function(t){var r=e.data._attachments[t];r.stub&&n.push(r.digest)})}),!n.length)return e();var r,i=0;n.forEach(function(e){d(e,function(e){e&&!r&&(r=e),t()})})}function p(e,t,n,r,i,o,a,s){k+=o,e.metadata.winningRev=t,e.metadata.deleted=n;var l=e.data;l._id=e.metadata.id,l._rev=e.metadata.rev,r&&(l._deleted=!0);var u=l._attachments&&Object.keys(l._attachments).length;return u?g(e,t,n,i,a,s):void h(e,t,n,i,a,s)}function h(e,t,n,i,o,a){function s(o){var a=e.stemmedRevs||[];i&&r.auto_compaction&&(a=a.concat(H(e.metadata))),a&&a.length&&dt(a,e.metadata.id,b),d.seq=o.target.result,delete d.rev;var s=ot(d,t,n),l=y.put(s);l.onsuccess=u}function l(e){e.preventDefault(),e.stopPropagation();var t=w.index("_doc_id_rev"),n=t.getKey(c._doc_id_rev);n.onsuccess=function(e){var t=w.put(c,e.target.result);t.onsuccess=s}}function u(){N[o]={ok:!0,id:d.id,rev:t},F.set(e.metadata.id,e.metadata),m(e,d.seq,a)}var c=e.data,d=e.metadata;c._doc_id_rev=d.id+"::"+d.rev,delete c._id,delete c._rev;var f=w.put(c);f.onsuccess=s,f.onerror=l}function g(e,t,n,r,i,o){function a(){u===c.length&&h(e,t,n,r,i,o)}function s(){u++,a()}var l=e.data,u=0,c=Object.keys(l._attachments);c.forEach(function(n){var r=e.data._attachments[n];if(r.stub)u++,a();else{var i=r.data;delete r.data,r.revpos=parseInt(t,10);var o=r.digest;v(o,i,s)}})}function m(e,t,n){function r(){++o===a.length&&n()}function i(n){var i=e.data._attachments[n].digest,o=_.put({seq:t,digestSeq:i+"::"+t});o.onsuccess=r,o.onerror=function(e){e.preventDefault(),e.stopPropagation(),r()}}var o=0,a=Object.keys(e.data._attachments||{});if(!a.length)return n();for(var s=0;s<a.length;s++)i(a[s])}function v(e,t,n){var r=x.count(e);r.onsuccess=function(r){var i=r.target.result;if(i)return n();var o={digest:e,body:t},a=x.put(o);a.onsuccess=n}}for(var b,y,w,x,_,E,C=t.docs,k=0,A=0,T=C.length;A<T;A++){var D=C[A];D._id&&oe(D._id)||(D=C[A]=De(D,n.new_edits),D.error&&!E&&(E=D))}if(E)return a(E);var N=new Array(C.length),F=new Cr.Map,M=!1,O=r._meta.blobSupport?"blob":"base64";Ye(C,O,function(e){return e?a(e):void s()})}function ht(e,t,n,r,i){try{if(e&&t)return i?IDBKeyRange.bound(t,e,!n,!1):IDBKeyRange.bound(e,t,!1,!n);if(e)return i?IDBKeyRange.upperBound(e):IDBKeyRange.lowerBound(e);if(t)return i?IDBKeyRange.lowerBound(t,!n):IDBKeyRange.upperBound(t,!n);if(r)return IDBKeyRange.only(r)}catch(o){return{error:o}}return null}function gt(e,t,n,r){return"DataError"===n.name&&0===n.code?r(null,{total_rows:e._meta.docCount,offset:t.skip,rows:[]}):void r(S(Qr,n.name,n.message))}function mt(e,t,n,r){function i(e,r){function i(t,n,r){var i=t.id+"::"+r;E.get(i).onsuccess=function(r){n.doc=st(r.target.result),e.conflicts&&(n.doc._conflicts=q(t)),ut(n.doc,e,y)}}function o(t,n,r){var o={id:r.id,key:r.id,value:{rev:n}},a=r.deleted;if("ok"===e.deleted)C.push(o),a?(o.value.deleted=!0,o.doc=null):e.include_docs&&i(r,o,n);else if(!a&&f--<=0&&(C.push(o),e.include_docs&&i(r,o,n),0===--p))return;t["continue"]()}function a(e){k=t._meta.docCount;var n=e.target.result;if(n){var r=at(n.value),i=r.winningRev;o(n,i,r)}}function s(){r(null,{total_rows:k,offset:e.skip,rows:C})}function l(){e.attachments?ct(C,e.binary).then(s):s()}var u="startkey"in e&&e.startkey,c="endkey"in e&&e.endkey,d="key"in e&&e.key,f=e.skip||0,p="number"==typeof e.limit?e.limit:-1,h=e.inclusive_end!==!1,g="descending"in e&&e.descending?"prev":null,m=ht(u,c,h,d,g);if(m&&m.error)return gt(t,e,m.error,r);var v=[mi,vi];e.attachments&&v.push(bi);var b=ft(n,v,"readonly");if(b.error)return r(b.error);var y=b.txn,w=y.objectStore(mi),x=y.objectStore(vi),_=g?w.openCursor(m,g):w.openCursor(m),E=x.index("_doc_id_rev"),C=[],k=0;y.oncomplete=l,_.onsuccess=a}function o(e,n){return 0===e.limit?n(null,{total_rows:t._meta.docCount,offset:e.skip,rows:[]}):void i(e,n)}o(e,r)}function vt(e){return new Mr(function(t){var n=Ne([""]);e.objectStore(_i).put(n,"key"),e.onabort=function(e){e.preventDefault(),e.stopPropagation(),t(!1)},e.oncomplete=function(){var e=navigator.userAgent.match(/Chrome\/(\d+)/),n=navigator.userAgent.match(/Edge\//);t(n||!e||parseInt(e[1],10)>=43)}})["catch"](function(){return!1})}function bt(e,t){var n=this;Ei.queue.push({action:function(t){yt(n,e,t)},callback:t}),rt(n.constructor)}function yt(e,n,r){function i(e){var t=e.createObjectStore(mi,{keyPath:"id"});e.createObjectStore(vi,{autoIncrement:!0}).createIndex("_doc_id_rev","_doc_id_rev",{unique:!0}),e.createObjectStore(bi,{keyPath:"digest"}),e.createObjectStore(wi,{keyPath:"id",autoIncrement:!1}),e.createObjectStore(_i),t.createIndex("deletedOrLocal","deletedOrLocal",{unique:!1}),e.createObjectStore(xi,{keyPath:"_id"});var n=e.createObjectStore(yi,{autoIncrement:!0});n.createIndex("seq","seq"),n.createIndex("digestSeq","digestSeq",{unique:!0})}function o(e,t){var n=e.objectStore(mi);n.createIndex("deletedOrLocal","deletedOrLocal",{unique:!1}),n.openCursor().onsuccess=function(e){var r=e.target.result;if(r){var i=r.value,o=ie(i);i.deletedOrLocal=o?"1":"0",n.put(i),r["continue"]()}else t()}}function a(e){e.createObjectStore(xi,{keyPath:"_id"}).createIndex("_doc_id_rev","_doc_id_rev",{unique:!0})}function s(e,t){var n=e.objectStore(xi),r=e.objectStore(mi),i=e.objectStore(vi),o=r.openCursor();o.onsuccess=function(e){var o=e.target.result;if(o){var a=o.value,s=a.id,l=oe(s),u=$(a);
if(l){var c=s+"::"+u,d=s+"::",f=s+"::~",p=i.index("_doc_id_rev"),h=IDBKeyRange.bound(d,f,!1,!1),g=p.openCursor(h);g.onsuccess=function(e){if(g=e.target.result){var t=g.value;t._doc_id_rev===c&&n.put(t),i["delete"](g.primaryKey),g["continue"]()}else r["delete"](o.primaryKey),o["continue"]()}}else o["continue"]()}else t&&t()}}function l(e){var t=e.createObjectStore(yi,{autoIncrement:!0});t.createIndex("seq","seq"),t.createIndex("digestSeq","digestSeq",{unique:!0})}function c(e,t){var n=e.objectStore(vi),r=e.objectStore(bi),i=e.objectStore(yi),o=r.count();o.onsuccess=function(e){var r=e.target.result;return r?void(n.openCursor().onsuccess=function(e){var n=e.target.result;if(!n)return t();for(var r=n.value,o=n.primaryKey,a=Object.keys(r._attachments||{}),s={},l=0;l<a.length;l++){var u=r._attachments[a[l]];s[u.digest]=!0}var c=Object.keys(s);for(l=0;l<c.length;l++){var d=c[l];i.put({seq:o,digestSeq:d+"::"+o})}n["continue"]()}):t()}}function f(e){function t(e){return e.data?at(e):(e.deleted="1"===e.deletedOrLocal,e)}var n=e.objectStore(vi),r=e.objectStore(mi),i=r.openCursor();i.onsuccess=function(e){function i(){var e=s.id+"::",t=s.id+"::",r=n.index("_doc_id_rev").openCursor(IDBKeyRange.bound(e,t)),i=0;r.onsuccess=function(e){var t=e.target.result;if(!t)return s.seq=i,o();var n=t.primaryKey;n>i&&(i=n),t["continue"]()}}function o(){var e=ot(s,s.winningRev,s.deleted),t=r.put(e);t.onsuccess=function(){a["continue"]()}}var a=e.target.result;if(a){var s=t(a.value);return s.winningRev=s.winningRev||$(s),s.seq?o():void i()}}}var p=n.name,h=null;e._meta=null,e.type=function(){return"idb"},e._id=d(function(t){t(null,e._meta.instanceId)}),e._bulkDocs=function(t,r,i){pt(n,t,r,e,h,ki,i)},e._get=function(e,t,n){function r(){n(a,{doc:i,metadata:o,ctx:s})}var i,o,a,s=t.ctx;if(!s){var l=ft(h,[mi,vi,bi],"readonly");if(l.error)return n(l.error);s=l.txn}s.objectStore(mi).get(e).onsuccess=function(e){if(o=at(e.target.result),!o)return a=S(jr,"missing"),r();if(ie(o)&&!t.rev)return a=S(jr,"deleted"),r();var n=s.objectStore(vi),l=t.rev||o.winningRev,u=o.id+"::"+l;n.index("_doc_id_rev").get(u).onsuccess=function(e){return i=e.target.result,i&&(i=st(i)),i?void r():(a=S(jr,"missing"),r())}}},e._getAttachment=function(e,t,n,r,i){var o;if(r.ctx)o=r.ctx;else{var a=ft(h,[mi,vi,bi],"readonly");if(a.error)return i(a.error);o=a.txn}var s=n.digest,l=n.content_type;o.objectStore(bi).get(s).onsuccess=function(e){var t=e.target.result.body;lt(t,l,r.binary,function(e){i(null,e)})}},e._info=function(t){if(null===h||!Ci.has(p)){var n=new Error("db isn't open");return n.id="idbNull",t(n)}var r,i,o=ft(h,[vi],"readonly");if(o.error)return t(o.error);var a=o.txn,s=a.objectStore(vi).openCursor(null,"prev");s.onsuccess=function(t){var n=t.target.result;r=n?n.key:0,i=e._meta.docCount},a.oncomplete=function(){t(null,{doc_count:i,update_seq:r,idb_attachment_format:e._meta.blobSupport?"binary":"base64"})}},e._allDocs=function(t,n){mt(t,e,h,n)},e._changes=function(t){function n(e){function n(){return u.seq!==a?e["continue"]():(l=a,u.winningRev===o._rev?i(o):void r())}function r(){var e=o._id+"::"+u.winningRev,t=v.get(e);t.onsuccess=function(e){i(st(e.target.result))}}function i(n){var r=t.processChange(n,u,t);r.seq=u.seq;var i=w(r);return"object"==typeof i?t.complete(i):(i&&(y++,d&&b.push(r),t.attachments&&t.include_docs?ut(n,t,f,function(){ct([r],t.binary).then(function(){t.onChange(r)})}):t.onChange(r)),void(y!==c&&e["continue"]()))}var o=st(e.value),a=e.key;if(s&&!s.has(o._id))return e["continue"]();var u;return(u=x.get(o._id))?n():void(m.get(o._id).onsuccess=function(e){u=at(e.target.result),x.set(o._id,u),n()})}function r(e){var t=e.target.result;t&&n(t)}function i(){var e=[mi,vi];t.attachments&&e.push(bi);var n=ft(h,e,"readonly");if(n.error)return t.complete(n.error);f=n.txn,f.onabort=it(t.complete),f.oncomplete=o,g=f.objectStore(vi),m=f.objectStore(mi),v=g.index("_doc_id_rev");var i;i=t.descending?g.openCursor(null,"prev"):g.openCursor(IDBKeyRange.lowerBound(t.since,!0)),i.onsuccess=r}function o(){function e(){t.complete(null,{results:b,last_seq:l})}!t.continuous&&t.attachments?ct(b).then(e):e()}if(t=u(t),t.continuous){var a=p+":"+j();return ki.addListener(p,a,e,t),ki.notify(p),{cancel:function(){ki.removeListener(p,a)}}}var s=t.doc_ids&&new Cr.Set(t.doc_ids);t.since=t.since||0;var l=t.since,c="limit"in t?t.limit:-1;0===c&&(c=1);var d;d="return_docs"in t?t.return_docs:!("returnDocs"in t)||t.returnDocs;var f,g,m,v,b=[],y=0,w=D(t),x=new Cr.Map;i()},e._close=function(e){return null===h?e(S(qr)):(h.close(),Ci["delete"](p),h=null,void e())},e._getRevisionTree=function(e,t){var n=ft(h,[mi],"readonly");if(n.error)return t(n.error);var r=n.txn,i=r.objectStore(mi).get(e);i.onsuccess=function(e){var n=at(e.target.result);n?t(null,n.rev_tree):t(S(jr))}},e._doCompaction=function(e,t,n){var r=[mi,vi,bi,yi],i=ft(h,r,"readwrite");if(i.error)return n(i.error);var o=i.txn,a=o.objectStore(mi);a.get(e).onsuccess=function(n){var r=at(n.target.result);V(r.rev_tree,function(e,n,r,i,o){var a=n+"-"+r;t.indexOf(a)!==-1&&(o.status="missing")}),dt(t,e,o);var i=r.winningRev,a=r.deleted;o.objectStore(mi).put(ot(r,i,a))},o.onabort=it(n),o.oncomplete=function(){n()}},e._getLocal=function(e,t){var n=ft(h,[xi],"readonly");if(n.error)return t(n.error);var r=n.txn,i=r.objectStore(xi).get(e);i.onerror=it(t),i.onsuccess=function(e){var n=e.target.result;n?(delete n._doc_id_rev,t(null,n)):t(S(jr))}},e._putLocal=function(e,t,n){"function"==typeof t&&(n=t,t={}),delete e._revisions;var r=e._rev,i=e._id;r?e._rev="0-"+(parseInt(r.split("-")[1],10)+1):e._rev="0-1";var o,a=t.ctx;if(!a){var s=ft(h,[xi],"readwrite");if(s.error)return n(s.error);a=s.txn,a.onerror=it(n),a.oncomplete=function(){o&&n(null,o)}}var l,u=a.objectStore(xi);r?(l=u.get(i),l.onsuccess=function(i){var a=i.target.result;if(a&&a._rev===r){var s=u.put(e);s.onsuccess=function(){o={ok:!0,id:e._id,rev:e._rev},t.ctx&&n(null,o)}}else n(S($r))}):(l=u.add(e),l.onerror=function(e){n(S($r)),e.preventDefault(),e.stopPropagation()},l.onsuccess=function(){o={ok:!0,id:e._id,rev:e._rev},t.ctx&&n(null,o)})},e._removeLocal=function(e,t,n){"function"==typeof t&&(n=t,t={});var r=t.ctx;if(!r){var i=ft(h,[xi],"readwrite");if(i.error)return n(i.error);r=i.txn,r.oncomplete=function(){o&&n(null,o)}}var o,a=e._id,s=r.objectStore(xi),l=s.get(a);l.onerror=it(n),l.onsuccess=function(r){var i=r.target.result;i&&i._rev===e._rev?(s["delete"](a),o={ok:!0,id:a,rev:"0-0"},t.ctx&&n(null,o)):n(S(jr))}},e._destroy=function(e,t){ki.removeAllListeners(p);var n=Si.get(p);n&&n.result&&(n.result.close(),Ci["delete"](p));var r=indexedDB.deleteDatabase(p);r.onsuccess=function(){Si["delete"](p),b()&&p in localStorage&&delete localStorage[p],t(null,{ok:!0})},r.onerror=it(t)};var g=Ci.get(p);if(g)return h=g.idb,e._meta=g.global,void t.nextTick(function(){r(null,e)});var m;m=n.storage?wt(p,n.storage):indexedDB.open(p,gi),Si.set(p,m),m.onupgradeneeded=function(e){function t(){var e=u[d-1];d++,e&&e(r,t)}var n=e.target.result;if(e.oldVersion<1)return i(n);var r=e.currentTarget.transaction;e.oldVersion<3&&a(n),e.oldVersion<4&&l(n);var u=[o,s,c,f],d=e.oldVersion;t()},m.onsuccess=function(t){h=t.target.result,h.onversionchange=function(){h.close(),Ci["delete"](p)},h.onabort=function(e){x("error","Database has a global failure",e.target.error),h.close(),Ci["delete"](p)};var n=h.transaction([wi,_i,mi],"readwrite"),i=n.objectStore(wi).get(wi),o=null,a=null,s=null;i.onsuccess=function(t){var i=function(){null!==o&&null!==a&&null!==s&&(e._meta={name:p,instanceId:s,blobSupport:o,docCount:a},Ci.set(p,{idb:h,global:e._meta}),r(null,e))},l=t.target.result||{id:wi};p+"_id"in l?(s=l[p+"_id"],i()):(s=j(),l[p+"_id"]=s,n.objectStore(wi).put(l).onsuccess=function(){i()}),li||(li=vt(n)),li.then(function(e){o=e,i()});var u=n.objectStore(mi).index("deletedOrLocal");u.count(IDBKeyRange.only("0")).onsuccess=function(e){a=e.target.result,i()}}},m.onerror=function(){var e="Failed to open indexedDB, are you in private browsing mode?";x("error",e),r(S(Qr,e))}}function wt(e,t){try{return indexedDB.open(e,{version:gi,storage:t})}catch(n){return indexedDB.open(e,gi)}}function xt(e){e.adapter("idb",bt,!0)}function _t(e){return decodeURIComponent(escape(e))}function Et(e){return e<65?e-48:e-55}function Ct(e,t,n){for(var r="";t<n;)r+=String.fromCharCode(Et(e.charCodeAt(t++))<<4|Et(e.charCodeAt(t++)));return r}function kt(e,t,n){for(var r="";t<n;)r+=String.fromCharCode(Et(e.charCodeAt(t+2))<<12|Et(e.charCodeAt(t+3))<<8|Et(e.charCodeAt(t))<<4|Et(e.charCodeAt(t+1))),t+=4;return r}function St(e,t){return"UTF-8"===t?_t(Ct(e,0,e.length)):kt(e,0,e.length)}function At(e){return"'"+e+"'"}function Tt(e){return e.replace(/\u0002/g,"").replace(/\u0001/g,"").replace(/\u0000/g,"")}function Dt(e){return e.replace(/\u0001\u0001/g,"\0").replace(/\u0001\u0002/g,"").replace(/\u0002\u0002/g,"")}function Nt(e){return delete e._id,delete e._rev,JSON.stringify(e)}function Ft(e,t,n){return e=JSON.parse(e),e._id=t,e._rev=n,e}function Mt(e){for(var t="(";e--;)t+="?",e&&(t+=",");return t+")"}function Ot(e,t,n,r,i){return"SELECT "+e+" FROM "+("string"==typeof t?t:t.join(" JOIN "))+(n?" ON "+n:"")+(r?" WHERE "+("string"==typeof r?r:r.join(" AND ")):"")+(i?" ORDER BY "+i:"")}function Lt(e,t,n){function r(){++o===e.length&&i()}function i(){if(a.length){var e="SELECT DISTINCT digest AS digest FROM "+Oi+" WHERE seq IN "+Mt(a.length);n.executeSql(e,a,function(e,t){for(var n=[],r=0;r<t.rows.length;r++)n.push(t.rows.item(r).digest);if(n.length){var i="DELETE FROM "+Oi+" WHERE seq IN ("+a.map(function(){return"?"}).join(",")+")";e.executeSql(i,a,function(e){var t="SELECT digest FROM "+Oi+" WHERE digest IN ("+n.map(function(){return"?"}).join(",")+")";e.executeSql(t,n,function(e,t){for(var r=new Cr.Set,i=0;i<t.rows.length;i++)r.add(t.rows.item(i).digest);n.forEach(function(t){r.has(t)||(e.executeSql("DELETE FROM "+Oi+" WHERE digest=?",[t]),e.executeSql("DELETE FROM "+Ni+" WHERE digest=?",[t]))})})})}})}}if(e.length){var o=0,a=[];e.forEach(function(e){var i="SELECT seq FROM "+Di+" WHERE doc_id=? AND rev=?";n.executeSql(i,[t,e],function(e,t){if(!t.rows.length)return r();var n=t.rows.item(0).seq;a.push(n),e.executeSql("DELETE FROM "+Di+" WHERE seq=?",[n],r)})})}}function Pt(e){return function(t){x("error","WebSQL threw an error",t);var n=t&&t.constructor.toString().match(/function ([^\(]+)/),r=n&&n[1]||t.type,i=t.target||t.message;e(S(Jr,i,r))}}function It(e){if("size"in e)return 1e6*e.size;var t="undefined"!=typeof navigator&&/Android/.test(navigator.userAgent);return t?5e6:1}function Rt(e,t,n,r,i,o,a){function s(){return y?a(y):(o.notify(r._name),r._docCount=-1,void a(null,w))}function l(e,t){var n="SELECT count(*) as cnt FROM "+Ni+" WHERE digest=?";b.executeSql(n,[e],function(n,r){if(0===r.rows.item(0).cnt){var i=S(ei,"unknown stub attachment with digest "+e);t(i)}else t()})}function u(e){function t(){++i===n.length&&e(r)}var n=[];if(m.forEach(function(e){e.data&&e.data._attachments&&Object.keys(e.data._attachments).forEach(function(t){var r=e.data._attachments[t];r.stub&&n.push(r.digest)})}),!n.length)return e();var r,i=0;n.forEach(function(e){l(e,function(e){e&&!r&&(r=e),t()})})}function c(e,t,n,i,o,a,s,l){function u(){function t(e,t){function r(){return++o===a.length&&t(),!1}function i(t){var i="INSERT INTO "+Oi+" (digest, seq) VALUES (?,?)",o=[n._attachments[t].digest,e];b.executeSql(i,o,r,r)}var o=0,a=Object.keys(n._attachments||{});if(!a.length)return t();for(var s=0;s<a.length;s++)i(a[s])}var n=e.data,r=i?1:0,o=n._id,a=n._rev,s=Nt(n),l="INSERT INTO "+Di+" (doc_id, rev, json, deleted) VALUES (?, ?, ?, ?);",u=[o,a,s,r];b.executeSql(l,u,function(e,n){var r=n.insertId;t(r,function(){f(e,r)})},function(){var e=Ot("seq",Di,null,"doc_id=? AND rev=?");return b.executeSql(e,[o,a],function(e,n){var i=n.rows.item(0).seq,l="UPDATE "+Di+" SET json=?, deleted=? WHERE doc_id=? AND rev=?;",u=[s,r,o,a];e.executeSql(l,u,function(e){t(i,function(){f(e,i)})})}),!1})}function c(e){h||(e?(h=e,l(h)):g===m.length&&u())}function d(e){g++,c(e)}function f(n,i){var a=e.metadata.id,u=e.stemmedRevs||[];o&&r.auto_compaction&&(u=H(e.metadata).concat(u)),u.length&&Lt(u,a,n),e.metadata.seq=i,delete e.metadata.rev;var c=o?"UPDATE "+Ti+" SET json=?, max_seq=?, winningseq=(SELECT seq FROM "+Di+" WHERE doc_id="+Ti+".id AND rev=?) WHERE id=?":"INSERT INTO "+Ti+" (id, winningseq, max_seq, json) VALUES (?,?,?,?);",d=tt(e.metadata),f=o?[d,i,t,a]:[a,i,i,d];n.executeSql(c,f,function(){w[s]={ok:!0,id:e.metadata.id,rev:t},x.set(a,e.metadata),l()})}var h=null,g=0;e.data._id=e.metadata.id,e.data._rev=e.metadata.rev;var m=Object.keys(e.data._attachments||{});i&&(e.data._deleted=!0),m.forEach(function(n){var r=e.data._attachments[n];if(r.stub)g++,c();else{var i=r.data;delete r.data,r.revpos=parseInt(t,10);var o=r.digest;p(o,i,d)}}),m.length||u()}function d(){Je(e.revs_limit,m,r,x,b,w,c,n)}function f(e){function t(){++n===m.length&&e()}if(!m.length)return e();var n=0;m.forEach(function(e){if(e._id&&oe(e._id))return t();var n=e.metadata.id;b.executeSql("SELECT json FROM "+Ti+" WHERE id = ?",[n],function(e,r){if(r.rows.length){var i=et(r.rows.item(0).json);x.set(n,i)}t()})})}function p(e,t,n){var r="SELECT digest FROM "+Ni+" WHERE digest=?";b.executeSql(r,[e],function(i,o){return o.rows.length?n():(r="INSERT INTO "+Ni+" (digest, body, escaped) VALUES (?,?,1)",void i.executeSql(r,[e,Tt(t)],function(){n()},function(){return n(),!1}))})}var h=n.new_edits,g=t.docs,m=g.map(function(e){if(e._id&&oe(e._id))return e;var t=De(e,h);return t}),v=m.filter(function(e){return e.error});if(v.length)return a(v[0]);var b,y,w=new Array(m.length),x=new Cr.Map;Ye(m,"binary",function(e){return e?a(e):void i.transaction(function(e){b=e,u(function(e){e?y=e:f(d)})},Pt(a),s)})}function Bt(e){return e.websql(e.name,e.version,e.description,e.size)}function jt(e){try{return{db:Bt(e)}}catch(t){return{error:t}}}function $t(e){var t=Li.get(e.name);return t||(t=jt(e),Li.set(e.name,t),t.db&&(t.db._sqlitePlugin="undefined"!=typeof sqlitePlugin)),t}function Vt(e,t,n,r,i){function o(){++l===s.length&&i&&i()}function a(e,i){var a=e._attachments[i],s={binary:t.binary,ctx:r};n._getAttachment(e._id,i,a,s,function(t,n){e._attachments[i]=wr.extend(p(a,["digest","content_type"]),{data:n}),o()})}var s=Object.keys(e._attachments||{});if(!s.length)return i&&i();var l=0;s.forEach(function(n){t.attachments&&t.include_docs?a(e,n):(e._attachments[n].stub=!0,o())})}function Ut(e,t){function n(){b()&&(window.localStorage["_pouch__websqldb_"+y._name]=!0),t(null,y)}function r(e,t){e.executeSql(ji),e.executeSql("ALTER TABLE "+Di+" ADD COLUMN deleted TINYINT(1) DEFAULT 0",[],function(){e.executeSql(Ri),e.executeSql("ALTER TABLE "+Ti+" ADD COLUMN local TINYINT(1) DEFAULT 0",[],function(){e.executeSql("CREATE INDEX IF NOT EXISTS 'doc-store-local-idx' ON "+Ti+" (local, id)");var n="SELECT "+Ti+".winningseq AS seq, "+Ti+".json AS metadata FROM "+Di+" JOIN "+Ti+" ON "+Di+".seq = "+Ti+".winningseq";e.executeSql(n,[],function(e,n){for(var r=[],i=[],o=0;o<n.rows.length;o++){var a=n.rows.item(o),s=a.seq,l=JSON.parse(a.metadata);ie(l)&&r.push(s),oe(l.id)&&i.push(l.id)}e.executeSql("UPDATE "+Ti+"SET local = 1 WHERE id IN "+Mt(i.length),i,function(){e.executeSql("UPDATE "+Di+" SET deleted = 1 WHERE seq IN "+Mt(r.length),r,t)})})})})}function i(e,t){var n="CREATE TABLE IF NOT EXISTS "+Fi+" (id UNIQUE, rev, json)";e.executeSql(n,[],function(){var n="SELECT "+Ti+".id AS id, "+Di+".json AS data FROM "+Di+" JOIN "+Ti+" ON "+Di+".seq = "+Ti+".winningseq WHERE local = 1";e.executeSql(n,[],function(e,n){function r(){if(!i.length)return t(e);var n=i.shift(),o=JSON.parse(n.data)._rev;e.executeSql("INSERT INTO "+Fi+" (id, rev, json) VALUES (?,?,?)",[n.id,o,n.data],function(e){e.executeSql("DELETE FROM "+Ti+" WHERE id=?",[n.id],function(e){e.executeSql("DELETE FROM "+Di+" WHERE seq=?",[n.seq],function(){r()})})})}for(var i=[],o=0;o<n.rows.length;o++)i.push(n.rows.item(o));r()})})}function o(e,t){function n(n){function r(){if(!n.length)return t(e);var i=n.shift(),o=St(i.hex,v),a=o.lastIndexOf("::"),s=o.substring(0,a),l=o.substring(a+2),u="UPDATE "+Di+" SET doc_id=?, rev=? WHERE doc_id_rev=?";e.executeSql(u,[s,l,o],function(){r()})}r()}var r="ALTER TABLE "+Di+" ADD COLUMN doc_id";e.executeSql(r,[],function(e){var t="ALTER TABLE "+Di+" ADD COLUMN rev";e.executeSql(t,[],function(e){e.executeSql(Bi,[],function(e){var t="SELECT hex(doc_id_rev) as hex FROM "+Di;e.executeSql(t,[],function(e,t){for(var r=[],i=0;i<t.rows.length;i++)r.push(t.rows.item(i));n(r)})})})})}function a(e,t){function n(e){var n="SELECT COUNT(*) AS cnt FROM "+Ni;e.executeSql(n,[],function(e,n){function r(){var n=Ot(Wi+", "+Ti+".id AS id",[Ti,Di],Ui,null,Ti+".id ");n+=" LIMIT "+a+" OFFSET "+o,o+=a,e.executeSql(n,[],function(e,n){function i(e,t){var n=o[e]=o[e]||[];n.indexOf(t)===-1&&n.push(t)}if(!n.rows.length)return t(e);for(var o={},a=0;a<n.rows.length;a++)for(var s=n.rows.item(a),l=Ft(s.data,s.id,s.rev),u=Object.keys(l._attachments||{}),c=0;c<u.length;c++){var d=l._attachments[u[c]];i(d.digest,s.seq)}var f=[];if(Object.keys(o).forEach(function(e){var t=o[e];t.forEach(function(t){f.push([e,t])})}),!f.length)return r();var p=0;f.forEach(function(t){var n="INSERT INTO "+Oi+" (digest, seq) VALUES (?,?)";e.executeSql(n,t,function(){++p===f.length&&r()})})})}var i=n.rows.item(0).cnt;if(!i)return t(e);var o=0,a=10;r()})}var r="CREATE TABLE IF NOT EXISTS "+Oi+" (digest, seq INTEGER)";e.executeSql(r,[],function(e){e.executeSql(Vi,[],function(e){e.executeSql($i,[],n)})})}function s(e,t){var n="ALTER TABLE "+Ni+" ADD COLUMN escaped TINYINT(1) DEFAULT 0";e.executeSql(n,[],t)}function l(e,t){var n="ALTER TABLE "+Ti+" ADD COLUMN max_seq INTEGER";e.executeSql(n,[],function(e){var n="UPDATE "+Ti+" SET max_seq=(SELECT MAX(seq) FROM "+Di+" WHERE doc_id=id)";e.executeSql(n,[],function(e){var n="CREATE UNIQUE INDEX IF NOT EXISTS 'doc-max-seq-idx' ON "+Ti+" (max_seq)";e.executeSql(n,[],t)})})}function c(e,t){e.executeSql('SELECT HEX("a") AS hex',[],function(e,n){var r=n.rows.item(0).hex;v=2===r.length?"UTF-8":"UTF-16",t()})}function f(){for(;_.length>0;){var e=_.pop();e(null,w)}}function p(e,t){if(0===t){var n="CREATE TABLE IF NOT EXISTS "+Mi+" (dbid, db_version INTEGER)",u="CREATE TABLE IF NOT EXISTS "+Ni+" (digest UNIQUE, escaped TINYINT(1), body BLOB)",c="CREATE TABLE IF NOT EXISTS "+Oi+" (digest, seq INTEGER)",d="CREATE TABLE IF NOT EXISTS "+Ti+" (id unique, json, winningseq, max_seq INTEGER UNIQUE)",p="CREATE TABLE IF NOT EXISTS "+Di+" (seq INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, json, deleted TINYINT(1), doc_id, rev)",h="CREATE TABLE IF NOT EXISTS "+Fi+" (id UNIQUE, rev, json)";e.executeSql(u),e.executeSql(h),e.executeSql(c,[],function(){e.executeSql($i),e.executeSql(Vi)}),e.executeSql(d,[],function(){e.executeSql(ji),e.executeSql(p,[],function(){e.executeSql(Ri),e.executeSql(Bi),e.executeSql(n,[],function(){var t="INSERT INTO "+Mi+" (db_version, dbid) VALUES (?,?)";w=j();var n=[Ai,w];e.executeSql(t,n,function(){f()})})})})}else{var g=function(){var n=t<Ai;n&&e.executeSql("UPDATE "+Mi+" SET db_version = "+Ai);var r="SELECT dbid FROM "+Mi;e.executeSql(r,[],function(e,t){w=t.rows.item(0).dbid,f()})},m=[r,i,o,a,s,l,g],v=t,b=function(e){m[v-1](e,b),v++};b(e)}}function h(){k.transaction(function(e){c(e,function(){g(e)})},Pt(t),n)}function g(e){var t="SELECT sql FROM sqlite_master WHERE tbl_name = "+Mi;e.executeSql(t,[],function(e,t){t.rows.length?/db_version/.test(t.rows.item(0).sql)?e.executeSql("SELECT db_version FROM "+Mi,[],function(e,t){var n=t.rows.item(0).db_version;p(e,n)}):e.executeSql("ALTER TABLE "+Mi+" ADD COLUMN db_version INTEGER",[],function(){p(e,1)}):p(e,0)})}function m(e,t){if(y._docCount!==-1)return t(y._docCount);var n=Ot("COUNT("+Ti+".id) AS 'num'",[Ti,Di],Ui,Di+".deleted=0");e.executeSql(n,[],function(e,n){y._docCount=n.rows.item(0).num,t(y._docCount)})}var v,y=this,w=null,x=It(e),_=[];y._docCount=-1,y._name=e.name;var E=wr.extend({},e,{version:Ii,description:e.name,size:x}),C=$t(E);if(C.error)return Pt(t)(C.error);var k=C.db;"function"!=typeof k.readTransaction&&(k.readTransaction=k.transaction),h(),y.type=function(){return"websql"},y._id=d(function(e){e(null,w)}),y._info=function(e){k.readTransaction(function(t){m(t,function(n){var r="SELECT MAX(seq) AS seq FROM "+Di;t.executeSql(r,[],function(t,r){var i=r.rows.item(0).seq||0;e(null,{doc_count:n,update_seq:i,sqlite_plugin:k._sqlitePlugin,websql_encoding:v})})})},Pt(e))},y._bulkDocs=function(t,n,r){Rt(e,t,n,y,k,Pi,r)},y._get=function(e,t,n){function r(){n(a,{doc:i,metadata:o,ctx:s})}var i,o,a,s=t.ctx;if(!s)return k.readTransaction(function(r){y._get(e,wr.extend({ctx:r},t),n)});var l,u;t.rev?(l=Ot(Wi,[Ti,Di],Ti+".id="+Di+".doc_id",[Di+".doc_id=?",Di+".rev=?"]),u=[e,t.rev]):(l=Ot(Wi,[Ti,Di],Ui,Ti+".id=?"),u=[e]),s.executeSql(l,u,function(e,n){if(!n.rows.length)return a=S(jr,"missing"),r();var s=n.rows.item(0);return o=et(s.metadata),s.deleted&&!t.rev?(a=S(jr,"deleted"),r()):(i=Ft(s.data,o.id,s.rev),void r())})},y._allDocs=function(e,t){var n,r=[],i="startkey"in e&&e.startkey,o="endkey"in e&&e.endkey,a="key"in e&&e.key,s="descending"in e&&e.descending,l="limit"in e?e.limit:-1,u="skip"in e?e.skip:0,c=e.inclusive_end!==!1,d=[],f=[];if(a!==!1)f.push(Ti+".id = ?"),d.push(a);else if(i!==!1||o!==!1){if(i!==!1&&(f.push(Ti+".id "+(s?"<=":">=")+" ?"),d.push(i)),o!==!1){var p=s?">":"<";c&&(p+="="),f.push(Ti+".id "+p+" ?"),d.push(o)}a!==!1&&(f.push(Ti+".id = ?"),d.push(a))}"ok"!==e.deleted&&f.push(Di+".deleted = 0"),k.readTransaction(function(t){m(t,function(i){if(n=i,0!==l){var o=Ot(Wi,[Ti,Di],Ui,f,Ti+".id "+(s?"DESC":"ASC"));o+=" LIMIT "+l+" OFFSET "+u,t.executeSql(o,d,function(t,n){for(var i=0,o=n.rows.length;i<o;i++){var a=n.rows.item(i),s=et(a.metadata),l=s.id,u=Ft(a.data,l,a.rev),c=u._rev,d={id:l,key:l,value:{rev:c}};if(e.include_docs&&(d.doc=u,d.doc._rev=c,e.conflicts&&(d.doc._conflicts=q(s)),Vt(d.doc,e,y,t)),a.deleted){if("ok"!==e.deleted)continue;d.value.deleted=!0,d.doc=null}r.push(d)}})}})},Pt(t),function(){t(null,{total_rows:n,offset:e.skip,rows:r})})},y._changes=function(e){function t(){var t=Ti+".json AS metadata, "+Ti+".max_seq AS maxSeq, "+Di+".json AS winningDoc, "+Di+".rev AS winningRev ",n=Ti+" JOIN "+Di,l=Ti+".id="+Di+".doc_id AND "+Ti+".winningseq="+Di+".seq",u=["maxSeq > ?"],c=[e.since];e.doc_ids&&(u.push(Ti+".id IN "+Mt(e.doc_ids.length)),c=c.concat(e.doc_ids));var d="maxSeq "+(r?"DESC":"ASC"),f=Ot(t,n,l,u,d),p=D(e);e.view||e.filter||(f+=" LIMIT "+i);var h=e.since||0;k.readTransaction(function(t){t.executeSql(f,c,function(t,n){function r(t){return function(){e.onChange(t)}}for(var l=0,u=n.rows.length;l<u;l++){var c=n.rows.item(l),d=et(c.metadata);h=c.maxSeq;var f=Ft(c.winningDoc,d.id,c.winningRev),g=e.processChange(f,d,e);g.seq=c.maxSeq;var m=p(g);if("object"==typeof m)return e.complete(m);if(m&&(s++,o&&a.push(g),e.attachments&&e.include_docs?Vt(f,e,y,t,r(g)):r(g)()),s===i)break}})},Pt(e.complete),function(){e.continuous||e.complete(null,{results:a,last_seq:h})})}if(e=u(e),e.continuous){var n=y._name+":"+j();return Pi.addListener(y._name,n,y,e),Pi.notify(y._name),{cancel:function(){Pi.removeListener(y._name,n)}}}var r=e.descending;e.since=e.since&&!r?e.since:0;var i="limit"in e?e.limit:-1;0===i&&(i=1);var o;o="return_docs"in e?e.return_docs:!("returnDocs"in e)||e.returnDocs;var a=[],s=0;t()},y._close=function(e){e()},y._getAttachment=function(e,t,n,r,i){var o,a=r.ctx,s=n.digest,l=n.content_type,u="SELECT escaped, CASE WHEN escaped = 1 THEN body ELSE HEX(body) END AS body FROM "+Ni+" WHERE digest=?";a.executeSql(u,[s],function(e,t){var n=t.rows.item(0),a=n.escaped?Dt(n.body):St(n.body,v);o=r.binary?Me(a,l):fi(a),i(null,o)})},y._getRevisionTree=function(e,t){k.readTransaction(function(n){var r="SELECT json AS metadata FROM "+Ti+" WHERE id = ?";n.executeSql(r,[e],function(e,n){if(n.rows.length){var r=et(n.rows.item(0).metadata);t(null,r.rev_tree)}else t(S(jr))})})},y._doCompaction=function(e,t,n){return t.length?void k.transaction(function(n){var r="SELECT json AS metadata FROM "+Ti+" WHERE id = ?";n.executeSql(r,[e],function(n,r){var i=et(r.rows.item(0).metadata);V(i.rev_tree,function(e,n,r,i,o){var a=n+"-"+r;t.indexOf(a)!==-1&&(o.status="missing")});var o="UPDATE "+Ti+" SET json = ? WHERE id = ?";n.executeSql(o,[tt(i),e])}),Lt(t,e,n)},Pt(n),function(){n()}):n()},y._getLocal=function(e,t){k.readTransaction(function(n){var r="SELECT json, rev FROM "+Fi+" WHERE id=?";n.executeSql(r,[e],function(n,r){if(r.rows.length){var i=r.rows.item(0),o=Ft(i.json,e,i.rev);t(null,o)}else t(S(jr))})})},y._putLocal=function(e,t,n){function r(e){var r,u;o?(r="UPDATE "+Fi+" SET rev=?, json=? WHERE id=? AND rev=?",u=[i,l,a,o]):(r="INSERT INTO "+Fi+" (id, rev, json) VALUES (?,?,?)",u=[a,i,l]),e.executeSql(r,u,function(e,r){r.rowsAffected?(s={ok:!0,id:a,rev:i},t.ctx&&n(null,s)):n(S($r))},function(){return n(S($r)),!1})}"function"==typeof t&&(n=t,t={}),delete e._revisions;var i,o=e._rev,a=e._id;i=o?e._rev="0-"+(parseInt(o.split("-")[1],10)+1):e._rev="0-1";var s,l=Nt(e);t.ctx?r(t.ctx):k.transaction(r,Pt(n),function(){s&&n(null,s)})},y._removeLocal=function(e,t,n){function r(r){var o="DELETE FROM "+Fi+" WHERE id=? AND rev=?",a=[e._id,e._rev];r.executeSql(o,a,function(r,o){return o.rowsAffected?(i={ok:!0,id:e._id,rev:"0-0"},void(t.ctx&&n(null,i))):n(S(jr))})}"function"==typeof t&&(n=t,t={});var i;t.ctx?r(t.ctx):k.transaction(r,Pt(n),function(){i&&n(null,i)})},y._destroy=function(e,t){Pi.removeAllListeners(y._name),k.transaction(function(e){var t=[Ti,Di,Ni,Mi,Fi,Oi];t.forEach(function(t){e.executeSql("DROP TABLE IF EXISTS "+t,[])})},Pt(t),function(){b()&&(delete window.localStorage["_pouch__websqldb_"+y._name],delete window.localStorage[y._name]),t(null,{ok:!0})})}}function Wt(){try{return openDatabase("_pouch_validate_websql",1,"",1),!0}catch(e){return!1}}function qt(){if("undefined"==typeof indexedDB||null===indexedDB||!/iP(hone|od|ad)/.test(navigator.userAgent))return!0;var e=b(),t="_pouch__websqldb_valid_"+navigator.userAgent;if(e&&localStorage[t])return"1"===localStorage[t];var n=Wt();return e&&(localStorage[t]=n?"1":"0"),n}function Ht(){return"undefined"!=typeof openDatabase&&("undefined"!=typeof sqlitePlugin||qt())}function zt(){return"undefined"!=typeof cordova||Ht()}function Gt(e){return function(t,n,r,i){if("undefined"!=typeof sqlitePlugin){var o=wr.extend({},e,{name:t,version:n,description:r,size:i});return sqlitePlugin.openDatabase(o)}return openDatabase(t,n,r,i)}}function Kt(e,t){var n=Gt(e),r=wr.extend({websql:n},e);"undefined"==typeof cordova||Ht()||x("error","PouchDB error: you must install a SQLite plugin in order for PouchDB to work on this platform. Options:\n - https://github.com/nolanlawson/cordova-plugin-sqlite-2\n - https://github.com/litehelpers/Cordova-sqlite-storage\n - https://github.com/Microsoft/cordova-plugin-websql"),Ut.call(this,r,t)}function Yt(e){e.adapter("websql",Kt,!0)}function Xt(){for(var e={},t=new Mr(function(t,n){e.resolve=t,e.reject=n}),n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.promise=t,Mr.resolve().then(function(){return fetch.apply(null,n)}).then(function(t){e.resolve(t)})["catch"](function(t){e.reject(t)}),e}function Qt(e,t){var n,r,i,o=new Headers,a={method:e.method,credentials:"include",headers:o};return e.json&&(o.set("Accept","application/json"),o.set("Content-Type",e.headers["Content-Type"]||"application/json")),e.body&&e.body instanceof Blob?Be(e.body,function(e){a.body=e}):e.body&&e.processData&&"string"!=typeof e.body?a.body=JSON.stringify(e.body):"body"in e?a.body=e.body:a.body=null,Object.keys(e.headers).forEach(function(t){e.headers.hasOwnProperty(t)&&o.set(t,e.headers[t])}),n=Xt(e.url,a),e.timeout>0&&(r=setTimeout(function(){n.reject(new Error("Load timeout for resource: "+e.url))},e.timeout)),n.promise.then(function(t){return i={statusCode:t.status},e.timeout>0&&clearTimeout(r),i.statusCode>=200&&i.statusCode<300?e.binary?t.blob():t.text():t.json()}).then(function(e){i.statusCode>=200&&i.statusCode<300?t(null,i,e):t(e,i)})["catch"](function(e){t(e,i)}),{abort:n.reject}}function Jt(e,t){var n,r,i=!1,o=function(){n.abort()},a=function(){i=!0,n.abort()};n=e.xhr?new e.xhr:new XMLHttpRequest;try{n.open(e.method,e.url)}catch(s){return t(new Error(s.name||"Url is invalid"))}n.withCredentials=!("withCredentials"in e)||e.withCredentials,"GET"===e.method?delete e.headers["Content-Type"]:e.json&&(e.headers.Accept="application/json",e.headers["Content-Type"]=e.headers["Content-Type"]||"application/json",e.body&&e.processData&&"string"!=typeof e.body&&(e.body=JSON.stringify(e.body))),e.binary&&(n.responseType="arraybuffer"),"body"in e||(e.body=null);for(var l in e.headers)e.headers.hasOwnProperty(l)&&n.setRequestHeader(l,e.headers[l]);return e.timeout>0&&(r=setTimeout(a,e.timeout),n.onprogress=function(){clearTimeout(r),4!==n.readyState&&(r=setTimeout(a,e.timeout))},"undefined"!=typeof n.upload&&(n.upload.onprogress=n.onprogress)),n.onreadystatechange=function(){if(4===n.readyState){var r={statusCode:n.status};if(n.status>=200&&n.status<300){var o;o=e.binary?Ne([n.response||""],{type:n.getResponseHeader("Content-Type")}):n.responseText,t(null,r,o)}else{var a={};if(i)a=new Error("ETIMEDOUT"),a.code="ETIMEDOUT";else try{a=JSON.parse(n.response)}catch(s){}a.status=n.status,t(a)}}},e.body&&e.body instanceof Blob?Be(e.body,function(e){n.send(e)}):n.send(e.body),{abort:o}}function Zt(){try{return new XMLHttpRequest,!0}catch(e){return!1}}function en(e,t){return qi||e.xhr?Jt(e,t):Qt(e,t)}function tn(){return""}function nn(e,t){function n(t,n,r){if(!e.binary&&e.json&&"string"==typeof t)try{t=JSON.parse(t)}catch(i){return r(i)}Array.isArray(t)&&(t=t.map(function(e){return e.error||e.missing?A(e):e})),e.binary&&Hi(t,n),r(null,t,n)}e=u(e);var r={method:"GET",headers:{},json:!0,processData:!0,timeout:1e4,cache:!1};return e=wr.extend(r,e),e.json&&(e.binary||(e.headers.Accept="application/json"),e.headers["Content-Type"]=e.headers["Content-Type"]||"application/json"),e.binary&&(e.encoding=null,e.json=!1),e.processData||(e.json=!1),en(e,function(r,i,o){if(r)return t(A(r));var a,s=i.headers&&i.headers["content-type"],l=o||tn();if(!e.binary&&(e.json||!e.processData)&&"object"!=typeof l&&(/json/.test(s)||/^[\s]*\{/.test(l)&&/\}[\s]*$/.test(l)))try{l=JSON.parse(l.toString())}catch(u){}i.statusCode>=200&&i.statusCode<300?n(l,i,t):(a=A(l),a.status=i.statusCode,t(a))})}function rn(e,t){var n=navigator&&navigator.userAgent?navigator.userAgent.toLowerCase():"",r=n.indexOf("safari")!==-1&&n.indexOf("chrome")===-1,i=n.indexOf("msie")!==-1,o=n.indexOf("edge")!==-1,a=r||(i||o)&&"GET"===e.method,s=!("cache"in e)||e.cache,l=/^blob:/.test(e.url);if(!l&&(a||!s)){var u=e.url.indexOf("?")!==-1;e.url+=(u?"&":"?")+"_nonce="+Date.now()}return nn(e,t)}function on(e){var t=e.doc&&e.doc._attachments;t&&Object.keys(t).forEach(function(e){var n=t[e];n.data=Oe(n.data,n.content_type)})}function an(e){return/^_design/.test(e)?"_design/"+encodeURIComponent(e.slice(8)):/^_local/.test(e)?"_local/"+encodeURIComponent(e.slice(7)):encodeURIComponent(e)}function sn(e){return e._attachments&&Object.keys(e._attachments)?Mr.all(Object.keys(e._attachments).map(function(t){var n=e._attachments[t];if(n.data&&"string"!=typeof n.data)return new Mr(function(e){Re(n.data,e)}).then(function(e){n.data=e})})):Mr.resolve()}function ln(e){var t=P(e);(t.user||t.password)&&(t.auth={username:t.user,password:t.password});var n=t.path.replace(/(^\/|\/$)/g,"").split("/");return t.db=n.pop(),t.db.indexOf("%")===-1&&(t.db=encodeURIComponent(t.db)),t.path=n.join("/"),t}function un(e,t){return cn(e,e.db+"/"+t)}function cn(e,t){var n=e.path?"/":"";return e.protocol+"://"+e.host+(e.port?":"+e.port:"")+"/"+e.path+n+t}function dn(e){return"?"+Object.keys(e).map(function(t){return t+"="+encodeURIComponent(e[t])}).join("&")}function fn(e,t){function n(e,t,n){var r=e.ajax||{},i=wr.extend(u(h),r,t);return Xi(i.method+" "+i.url),s._ajax(i,n)}function r(e,t){return new Mr(function(r,i){n(e,t,function(e,t){return e?i(e):void r(t)})})}function i(e,t){
return f(e,kr(function(e){o().then(function(){return t.apply(this,e)})["catch"](function(t){var n=e.pop();n(t)})}))}function o(){if(e.skipSetup||e.skip_setup)return Mr.resolve();if(y)return y;var t={method:"GET",url:d};return y=r({},t)["catch"](function(e){return e&&e.status&&404===e.status?(C(404,"PouchDB is just detecting if the remote exists."),r({},{method:"PUT",url:d})):Mr.reject(e)})["catch"](function(e){return!(!e||!e.status||412!==e.status)||Mr.reject(e)}),y["catch"](function(){y=null}),y}function a(e){return e.split("/").map(encodeURIComponent).join("/")}var s=this,l=ln;e.getHost&&(l=e.getHost);var c=l(e.name,e),d=un(c,"");e=u(e);var h=e.ajax||{};if(s.getUrl=function(){return d},s.getHeaders=function(){return h.headers||{}},e.auth||c.auth){var g=e.auth||c.auth,v=g.username+":"+g.password,b=fi(unescape(encodeURIComponent(v)));h.headers=h.headers||{},h.headers.Authorization="Basic "+b}s._ajax=rn;var y;setTimeout(function(){t(null,s)}),s.type=function(){return"http"},s.id=i("id",function(e){n({},{method:"GET",url:cn(c,"")},function(t,n){var r=n&&n.uuid?n.uuid+c.db:un(c,"");e(null,r)})}),s.request=i("request",function(e,t){e.url=un(c,e.url),n({},e,t)}),s.compact=i("compact",function(e,t){"function"==typeof e&&(t=e,e={}),e=u(e),n(e,{url:un(c,"_compact"),method:"POST"},function(){function n(){s.info(function(r,i){i&&!i.compact_running?t(null,{ok:!0}):setTimeout(n,e.interval||200)})}n()})}),s.bulkGet=f("bulkGet",function(e,t){function r(t){var r={};e.revs&&(r.revs=!0),e.attachments&&(r.attachments=!0),n({},{url:un(c,"_bulk_get"+dn(r)),method:"POST",body:{docs:e.docs}},t)}function i(){function n(e){return function(n,r){s[e]=r.results,++a===i&&t(null,{results:N(s)})}}for(var r=Gi,i=Math.ceil(e.docs.length/r),a=0,s=new Array(i),l=0;l<i;l++){var u=p(e,["revs","attachments"]);u.ajax=h,u.docs=e.docs.slice(l*r,Math.min(e.docs.length,(l+1)*r)),m(o,u,n(l))}}var o=this,a=cn(c,""),s=Ki[a];"boolean"!=typeof s?r(function(e,n){if(e){var r=Math.floor(e.status/100);4===r||5===r?(Ki[a]=!1,C(e.status,"PouchDB is just detecting if the remote supports the _bulk_get API."),i()):t(e)}else Ki[a]=!0,t(null,n)}):s?r(t):i()}),s._info=function(e){o().then(function(){n({},{method:"GET",url:un(c,"")},function(t,n){return t?e(t):(n.host=un(c,""),void e(null,n))})})["catch"](e)},s.get=i("get",function(e,t,n){function i(e){function n(){if(!o.length)return null;var n=o.pop(),s=i[n],l=an(e._id)+"/"+a(n)+"?rev="+e._rev;return r(t,{method:"GET",url:un(c,l),binary:!0}).then(function(e){return t.binary?e:new Mr(function(t){Re(e,t)})}).then(function(e){delete s.stub,delete s.length,s.data=e})}var i=e._attachments,o=i&&Object.keys(i);if(i&&o.length)return new Nr(n,5,{promise:Mr}).start()}function o(e){return Array.isArray(e)?Mr.all(e.map(function(e){if(e.ok)return i(e.ok)})):i(e)}"function"==typeof t&&(n=t,t={}),t=u(t);var s={};t.revs&&(s.revs=!0),t.revs_info&&(s.revs_info=!0),t.open_revs&&("all"!==t.open_revs&&(t.open_revs=JSON.stringify(t.open_revs)),s.open_revs=t.open_revs),t.rev&&(s.rev=t.rev),t.conflicts&&(s.conflicts=t.conflicts),e=an(e);var l={method:"GET",url:un(c,e+dn(s))};r(t,l).then(function(e){return Mr.resolve().then(function(){if(t.attachments)return o(e)}).then(function(){n(null,e)})})["catch"](n)}),s.remove=i("remove",function(e,t,r,i){var o;"string"==typeof t?(o={_id:e,_rev:t},"function"==typeof r&&(i=r,r={})):(o=e,"function"==typeof t?(i=t,r={}):(i=r,r=t));var a=o._rev||r.rev;n(r,{method:"DELETE",url:un(c,an(o._id))+"?rev="+a},i)}),s.getAttachment=i("getAttachment",function(e,t,r,i){"function"==typeof r&&(i=r,r={});var o=r.rev?"?rev="+r.rev:"",s=un(c,an(e))+"/"+a(t)+o;n(r,{method:"GET",url:s,binary:!0},i)}),s.removeAttachment=i("removeAttachment",function(e,t,r,i){var o=un(c,an(e)+"/"+a(t))+"?rev="+r;n({},{method:"DELETE",url:o},i)}),s.putAttachment=i("putAttachment",function(e,t,r,i,o,s){"function"==typeof o&&(s=o,o=i,i=r,r=null);var l=an(e)+"/"+a(t),u=un(c,l);if(r&&(u+="?rev="+r),"string"==typeof i){var d;try{d=di(i)}catch(f){return s(S(zr,"Attachment is not a valid base64 string"))}i=d?Me(d,o):""}var p={headers:{"Content-Type":o},method:"PUT",url:u,processData:!1,body:i,timeout:h.timeout||6e4};n({},p,s)}),s._bulkDocs=function(e,t,r){e.new_edits=t.new_edits,o().then(function(){return Mr.all(e.docs.map(sn))}).then(function(){n(t,{method:"POST",url:un(c,"_bulk_docs"),body:e},function(e,t){return e?r(e):(t.forEach(function(e){e.ok=!0}),void r(null,t))})})["catch"](r)},s.allDocs=i("allDocs",function(e,t){"function"==typeof e&&(t=e,e={}),e=u(e);var n,i={},o="GET";e.conflicts&&(i.conflicts=!0),e.descending&&(i.descending=!0),e.include_docs&&(i.include_docs=!0),e.attachments&&(i.attachments=!0),e.key&&(i.key=JSON.stringify(e.key)),e.start_key&&(e.startkey=e.start_key),e.startkey&&(i.startkey=JSON.stringify(e.startkey)),e.end_key&&(e.endkey=e.end_key),e.endkey&&(i.endkey=JSON.stringify(e.endkey)),"undefined"!=typeof e.inclusive_end&&(i.inclusive_end=!!e.inclusive_end),"undefined"!=typeof e.limit&&(i.limit=e.limit),"undefined"!=typeof e.skip&&(i.skip=e.skip);var a=dn(i);if("undefined"!=typeof e.keys){var s="keys="+encodeURIComponent(JSON.stringify(e.keys));s.length+a.length+1<=Yi?a+="&"+s:(o="POST",n={keys:e.keys})}r(e,{method:o,url:un(c,"_all_docs"+a),body:n}).then(function(n){e.include_docs&&e.attachments&&e.binary&&n.rows.forEach(on),t(null,n)})["catch"](t)}),s._changes=function(e){var t="batch_size"in e?e.batch_size:zi;e=u(e),e.timeout="timeout"in e?e.timeout:"timeout"in h?h.timeout:3e4;var r,i=e.timeout?{timeout:e.timeout-5e3}:{},a="undefined"!=typeof e.limit&&e.limit;r="return_docs"in e?e.return_docs:!("returnDocs"in e)||e.returnDocs;var s=a;if(e.style&&(i.style=e.style),(e.include_docs||e.filter&&"function"==typeof e.filter)&&(i.include_docs=!0),e.attachments&&(i.attachments=!0),e.continuous&&(i.feed="longpoll"),e.conflicts&&(i.conflicts=!0),e.descending&&(i.descending=!0),"heartbeat"in e?e.heartbeat&&(i.heartbeat=e.heartbeat):i.heartbeat=1e4,e.filter&&"string"==typeof e.filter&&(i.filter=e.filter),e.view&&"string"==typeof e.view&&(i.filter="_view",i.view=e.view),e.query_params&&"object"==typeof e.query_params)for(var l in e.query_params)e.query_params.hasOwnProperty(l)&&(i[l]=e.query_params[l]);var d,f="GET";if(e.doc_ids){i.filter="_doc_ids";var p=JSON.stringify(e.doc_ids);p.length<Yi?i.doc_ids=p:(f="POST",d={doc_ids:e.doc_ids})}var g,m,v=function(r,l){if(!e.aborted){i.since=r,"object"==typeof i.since&&(i.since=JSON.stringify(i.since)),e.descending?a&&(i.limit=s):i.limit=!a||s>t?t:s;var u={method:f,url:un(c,"_changes"+dn(i)),timeout:e.timeout,body:d};m=r,e.aborted||o().then(function(){g=n(e,u,l)})["catch"](l)}},b={results:[]},y=function(n,i){if(!e.aborted){var o=0;if(i&&i.results){o=i.results.length,b.last_seq=i.last_seq;var l={};l.query=e.query_params,i.results=i.results.filter(function(t){s--;var n=D(e)(t);return n&&(e.include_docs&&e.attachments&&e.binary&&on(t),r&&b.results.push(t),e.onChange(t)),n})}else if(n)return e.aborted=!0,void e.complete(n);i&&i.last_seq&&(m=i.last_seq);var u=a&&s<=0||i&&o<t||e.descending;(!e.continuous||a&&s<=0)&&u?e.complete(null,b):setTimeout(function(){v(m,y)},0)}};return v(e.since||0,y),{cancel:function(){e.aborted=!0,g&&g.abort()}}},s.revsDiff=i("revsDiff",function(e,t,r){"function"==typeof t&&(r=t,t={}),n(t,{method:"POST",url:un(c,"_revs_diff"),body:e},r)}),s._close=function(e){e()},s._destroy=function(e,t){n(e,{url:un(c,""),method:"DELETE"},function(e,n){return e&&e.status&&404!==e.status?t(e):void t(null,n)})}}function pn(e){e.adapter("http",fn,!1),e.adapter("https",fn,!1)}function hn(){this.promise=new Mr(function(e){e()})}function gn(e){var t,n=e.db,r=e.viewName,i=e.map,o=e.reduce,a=e.temporary,s=i.toString()+(o&&o.toString())+"undefined";if(!a&&(t=n._cachedViews=n._cachedViews||{},t[s]))return t[s];var l=n.info().then(function(e){function l(e){e.views=e.views||{};var t=r;t.indexOf("/")===-1&&(t=r+"/"+r);var n=e.views[t]=e.views[t]||{};if(!n[u])return n[u]=!0,e}var u=e.db_name+"-mrview-"+(a?"temp":qe(s));return I(n,"_local/mrviews",l).then(function(){return n.registerDependentDatabase(u).then(function(e){var r=e.db;r.auto_compaction=!0;var a={name:u,db:r,sourceDB:n,adapter:n.adapter,mapFun:i,reduceFun:o};return a.db.get("_local/lastSeq")["catch"](function(e){if(404!==e.status)throw e}).then(function(e){return a.seq=e?e.seq:0,t&&a.db.once("destroyed",function(){delete t[s]}),a})})})});return t&&(t[s]=l),l}function mn(e,t,n,r,i,o){return Ar("return ("+e.replace(/;\s*$/,"")+");",{emit:t,sum:n,log:r,isArray:i,toJSON:o})}function vn(e){return e.indexOf("/")===-1?[e,e]:e.split("/")}function bn(e){return 1===e.length&&/^1-/.test(e[0].rev)}function yn(e,t){try{e.emit("error",t)}catch(n){x("error","The user's map/reduce function threw an uncaught error.\nYou can debug this error by doing:\nmyDatabase.on('error', function (err) { debugger; });\nPlease double-check your map/reduce function."),x("error",t)}}function wn(e,t,n){try{return{output:t.apply(null,n)}}catch(r){return yn(e,r),{error:r}}}function xn(e,t){var n=Fr.collate(e.key,t.key);return 0!==n?n:Fr.collate(e.value,t.value)}function _n(e,t,n){return n=n||0,"number"==typeof t?e.slice(n,t+n):n>0?e.slice(n):e}function En(e){var t=e.value,n=t&&"object"==typeof t&&t._id||e.id;return n}function Cn(e){e.rows.forEach(function(e){var t=e.doc&&e.doc._attachments;t&&Object.keys(t).forEach(function(e){var n=t[e];t[e].data=Oe(n.data,n.content_type)})})}function kn(e){return function(t){return e.include_docs&&e.attachments&&e.binary&&Cn(t),t}}function Sn(e){var t="builtin "+e+" function requires map values to be numbers or number arrays";return new Xn(t)}function An(e){for(var t=0,n=0,r=e.length;n<r;n++){var i=e[n];if("number"!=typeof i){if(!Array.isArray(i))throw Sn("_sum");t="number"==typeof t?[t]:t;for(var o=0,a=i.length;o<a;o++){var s=i[o];if("number"!=typeof s)throw Sn("_sum");"undefined"==typeof t[o]?t.push(s):t[o]+=s}}else"number"==typeof t?t+=i:t[0]+=i}return t}function Tn(e,t,n,r){var i=t[e];"undefined"!=typeof i&&(r&&(i=encodeURIComponent(JSON.stringify(i))),n.push(e+"="+i))}function Dn(e){if("undefined"!=typeof e){var t=Number(e);return isNaN(t)||t!==parseInt(e,10)?e:t}}function Nn(e){return e.group_level=Dn(e.group_level),e.limit=Dn(e.limit),e.skip=Dn(e.skip),e}function Fn(e){if(e){if("number"!=typeof e)return new Kn('Invalid value for integer: "'+e+'"');if(e<0)return new Kn('Invalid value for positive integer: "'+e+'"')}}function Mn(e,t){var n=e.descending?"endkey":"startkey",r=e.descending?"startkey":"endkey";if("undefined"!=typeof e[n]&&"undefined"!=typeof e[r]&&Fr.collate(e[n],e[r])>0)throw new Kn("No rows can match your key range, reverse your start_key and end_key or set {descending : true}");if(t.reduce&&e.reduce!==!1){if(e.include_docs)throw new Kn("{include_docs:true} is invalid for reduce");if(e.keys&&e.keys.length>1&&!e.group&&!e.group_level)throw new Kn("Multi-key fetches for reduce views must use {group: true}")}["group_level","limit","skip"].forEach(function(t){var n=Fn(e[t]);if(n)throw n})}function On(e,t,n){var r,i=[],o="GET";if(Tn("reduce",n,i),Tn("include_docs",n,i),Tn("attachments",n,i),Tn("limit",n,i),Tn("descending",n,i),Tn("group",n,i),Tn("group_level",n,i),Tn("skip",n,i),Tn("stale",n,i),Tn("conflicts",n,i),Tn("startkey",n,i,!0),Tn("start_key",n,i,!0),Tn("endkey",n,i,!0),Tn("end_key",n,i,!0),Tn("inclusive_end",n,i),Tn("key",n,i,!0),i=i.join("&"),i=""===i?"":"?"+i,"undefined"!=typeof n.keys){var a=2e3,s="keys="+encodeURIComponent(JSON.stringify(n.keys));s.length+i.length+1<=a?i+=("?"===i[0]?"&":"?")+s:(o="POST","string"==typeof t?r={keys:n.keys}:t.keys=n.keys)}if("string"==typeof t){var l=vn(t);return e.request({method:o,url:"_design/"+l[0]+"/_view/"+l[1]+i,body:r}).then(kn(n))}return r=r||{},Object.keys(t).forEach(function(e){Array.isArray(t[e])?r[e]=t[e]:r[e]=t[e].toString()}),e.request({method:"POST",url:"_temp_view"+i,body:r}).then(kn(n))}function Ln(e,t,n){return new Mr(function(r,i){e._query(t,n,function(e,t){return e?i(e):void r(t)})})}function Pn(e){return new Mr(function(t,n){e._viewCleanup(function(e,r){return e?n(e):void t(r)})})}function In(e){return function(t){if(404===t.status)return e;throw t}}function Rn(e,t,n){function r(){return bn(c)?Mr.resolve(s):t.db.get(a)["catch"](In(s))}function i(e){return e.keys.length?t.db.allDocs({keys:e.keys,include_docs:!0}):Mr.resolve({rows:[]})}function o(e,t){for(var n=[],r={},i=0,o=t.rows.length;i<o;i++){var a=t.rows[i],s=a.doc;if(s&&(n.push(s),r[s._id]=!0,s._deleted=!u[s._id],!s._deleted)){var l=u[s._id];"value"in l&&(s.value=l.value)}}var c=Object.keys(u);return c.forEach(function(e){if(!r[e]){var t={_id:e},i=u[e];"value"in i&&(t.value=i.value),n.push(t)}}),e.keys=to(c.concat(e.keys)),n.push(e),n}var a="_local/doc_"+e,s={_id:a,keys:[]},l=n[e],u=l.indexableKeysToKeyValues,c=l.changes;return r().then(function(e){return i(e).then(function(t){return o(e,t)})})}function Bn(e,t,n){var r="_local/lastSeq";return e.db.get(r)["catch"](In({_id:r,seq:0})).then(function(r){var i=Object.keys(t);return Mr.all(i.map(function(n){return Rn(n,e,t)})).then(function(t){var i=N(t);return r.seq=n,i.push(r),e.db.bulkDocs({docs:i})})})}function jn(e){var t="string"==typeof e?e:e.name,n=no[t];return n||(n=no[t]=new hn),n}function $n(e){return eo(jn(e),function(){return Vn(e)})()}function Vn(e){function t(e,t){var n={id:i._id,key:Fr.normalizeKey(e)};"undefined"!=typeof t&&null!==t&&(n.value=Fr.normalizeKey(t)),r.push(n)}function n(t,n){return function(){return Bn(e,t,n)}}var r,i,o;if("function"==typeof e.mapFun&&2===e.mapFun.length){var a=e.mapFun;o=function(e){return a(e,t)}}else o=mn(e.mapFun.toString(),t,An,oo,Array.isArray,JSON.parse);var s=e.seq||0,l=new hn;return new Mr(function(t,a){function u(){l.finish().then(function(){e.seq=s,t()})}function c(){function t(e){a(e)}e.sourceDB.changes({conflicts:!0,include_docs:!0,style:"all_docs",since:s,limit:io}).on("complete",function(t){var a=t.results;if(!a.length)return u();for(var d={},f=0,p=a.length;f<p;f++){var h=a[f];if("_"!==h.doc._id[0]){r=[],i=h.doc,i._deleted||wn(e.sourceDB,o,[i]),r.sort(xn);for(var g,m={},v=0,b=r.length;v<b;v++){var y=r[v],w=[y.key,y.id];0===Fr.collate(y.key,g)&&w.push(v);var x=Fr.toIndexableString(w);m[x]=y,g=y.key}d[h.doc._id]={indexableKeysToKeyValues:m,changes:h.changes}}s=h.seq}return l.add(n(d,s)),a.length<io?u():c()}).on("error",t)}c()})}function Un(e,t,n){0===n.group_level&&delete n.group_level;var r,i=n.group||n.group_level;r=ao[e.reduceFun]?ao[e.reduceFun]:mn(e.reduceFun.toString(),null,An,oo,Array.isArray,JSON.parse);var o=[],a=isNaN(n.group_level)?Number.POSITIVE_INFINITY:n.group_level;t.forEach(function(e){var t=o[o.length-1],n=i?e.key:null;return i&&Array.isArray(n)&&(n=n.slice(0,a)),t&&0===Fr.collate(t.groupKey,n)?(t.keys.push([e.key,e.id]),void t.values.push(e.value)):void o.push({keys:[[e.key,e.id]],values:[e.value],groupKey:n})}),t=[];for(var s=0,l=o.length;s<l;s++){var u=o[s],c=wn(e.sourceDB,r,[u.keys,u.values,!1]);if(c.error&&c.error instanceof Xn)throw c.error;t.push({value:c.error?null:c.output,key:u.groupKey})}return{rows:_n(t,n.limit,n.skip)}}function Wn(e,t){return eo(jn(e),function(){return qn(e,t)})()}function qn(e,t){function n(t){return t.include_docs=!0,e.db.allDocs(t).then(function(e){return i=e.total_rows,e.rows.map(function(e){if("value"in e.doc&&"object"==typeof e.doc.value&&null!==e.doc.value){var t=Object.keys(e.doc.value).sort(),n=["id","key","value"];if(!(t<n||t>n))return e.doc.value}var r=Fr.parseIndexableString(e.doc._id);return{key:r[0],id:r[1],value:"value"in e.doc?e.doc.value:null}})})}function r(n){var r;if(r=o?Un(e,n,t):{total_rows:i,offset:a,rows:n},t.include_docs){var s=to(n.map(En));return e.sourceDB.allDocs({keys:s,include_docs:!0,conflicts:t.conflicts,attachments:t.attachments,binary:t.binary}).then(function(e){var t={};return e.rows.forEach(function(e){e.doc&&(t["$"+e.id]=e.doc)}),n.forEach(function(e){var n=En(e),r=t["$"+n];r&&(e.doc=r)}),r})}return r}var i,o=e.reduceFun&&t.reduce!==!1,a=t.skip||0;if("undefined"==typeof t.keys||t.keys.length||(t.limit=0,delete t.keys),"undefined"!=typeof t.keys){var s=t.keys,l=s.map(function(e){var t={startkey:Fr.toIndexableString([e]),endkey:Fr.toIndexableString([e,{}])};return n(t)});return Mr.all(l).then(N).then(r)}var u={descending:t.descending};if(t.start_key&&(t.startkey=t.start_key),t.end_key&&(t.endkey=t.end_key),"undefined"!=typeof t.startkey&&(u.startkey=t.descending?Fr.toIndexableString([t.startkey,{}]):Fr.toIndexableString([t.startkey])),"undefined"!=typeof t.endkey){var c=t.inclusive_end!==!1;t.descending&&(c=!c),u.endkey=Fr.toIndexableString(c?[t.endkey,{}]:[t.endkey])}if("undefined"!=typeof t.key){var d=Fr.toIndexableString([t.key]),f=Fr.toIndexableString([t.key,{}]);u.descending?(u.endkey=d,u.startkey=f):(u.startkey=d,u.endkey=f)}return o||("number"==typeof t.limit&&(u.limit=t.limit),u.skip=a),n(u).then(r)}function Hn(e){return e.request({method:"POST",url:"_view_cleanup"})}function zn(e){return e.get("_local/mrviews").then(function(t){var n={};Object.keys(t.views).forEach(function(e){var t=vn(e),r="_design/"+t[0],i=t[1];n[r]=n[r]||{},n[r][i]=!0});var r={keys:Object.keys(n),include_docs:!0};return e.allDocs(r).then(function(r){var i={};r.rows.forEach(function(e){var r=e.key.substring(8);Object.keys(n[e.key]).forEach(function(n){var o=r+"/"+n;t.views[o]||(o=n);var a=Object.keys(t.views[o]),s=e.doc&&e.doc.views&&e.doc.views[n];a.forEach(function(e){i[e]=i[e]||s})})});var o=Object.keys(i).filter(function(e){return!i[e]}),a=o.map(function(t){return eo(jn(t),function(){return new e.constructor(t,e.__opts).destroy()})()});return Mr.all(a).then(function(){return{ok:!0}})})},In({ok:!0}))}function Gn(e,n,r){if("http"===e.type())return On(e,n,r);if("function"==typeof e._query)return Ln(e,n,r);if("string"!=typeof n){Mn(r,n);var i={db:e,viewName:"temp_view/temp_view",map:n.map,reduce:n.reduce,temporary:!0};return ro.add(function(){return gn(i).then(function(e){function t(){return e.db.destroy()}return Zi($n(e).then(function(){return Wn(e,r)}),t)})}),ro.finish()}var o=n,a=vn(o),s=a[0],l=a[1];return e.get("_design/"+s).then(function(n){var i=n.views&&n.views[l];if(!i||"string"!=typeof i.map)throw new Yn("ddoc "+s+" has no view named "+l);Mn(r,i);var a={db:e,viewName:o,map:i.map,reduce:i.reduce};return gn(a).then(function(e){return"ok"===r.stale||"update_after"===r.stale?("update_after"===r.stale&&t.nextTick(function(){$n(e)}),Wn(e,r)):$n(e).then(function(){return Wn(e,r)})})})}function Kn(e){this.status=400,this.name="query_parse_error",this.message=e,this.error=!0;try{Error.captureStackTrace(this,Kn)}catch(t){}}function Yn(e){this.status=404,this.name="not_found",this.message=e,this.error=!0;try{Error.captureStackTrace(this,Yn)}catch(t){}}function Xn(e){this.status=500,this.name="invalid_value",this.message=e,this.error=!0;try{Error.captureStackTrace(this,Xn)}catch(t){}}function Qn(e){return/^1-/.test(e)}function Jn(e,t,n){return!e._attachments||!e._attachments[n]||e._attachments[n].digest!==t._attachments[n].digest}function Zn(e,t){var n=Object.keys(t._attachments);return Mr.all(n.map(function(n){return e.getAttachment(t._id,n,{rev:t._rev})}))}function er(e,t,n){var r="http"===t.type()&&"http"!==e.type(),i=Object.keys(n._attachments);return r?e.get(n._id).then(function(r){return Mr.all(i.map(function(i){return Jn(r,n,i)?t.getAttachment(n._id,i):e.getAttachment(r._id,i)}))})["catch"](function(e){if(404!==e.status)throw e;return Zn(t,n)}):Zn(t,n)}function tr(e){var t=[];return Object.keys(e).forEach(function(n){var r=e[n].missing;r.forEach(function(e){t.push({id:n,rev:e})})}),{docs:t,revs:!0}}function nr(e,t,n,r){function i(){var i=tr(n);if(i.docs.length)return e.bulkGet(i).then(function(n){if(r.cancelled)throw new Error("cancelled");return Mr.all(n.results.map(function(n){return Mr.all(n.docs.map(function(n){var r=n.ok;return n.error&&(d=!1),r&&r._attachments?er(t,e,r).then(function(e){var t=Object.keys(r._attachments);return e.forEach(function(e,n){var i=r._attachments[t[n]];delete i.stub,delete i.length,i.data=e}),r}):r}))})).then(function(e){c=c.concat(N(e).filter(Boolean))})})}function o(e){return e._attachments&&Object.keys(e._attachments).length>0}function a(t){return e.allDocs({keys:t,include_docs:!0}).then(function(e){if(r.cancelled)throw new Error("cancelled");e.rows.forEach(function(e){!e.deleted&&e.doc&&Qn(e.value.rev)&&!o(e.doc)&&(c.push(e.doc),delete n[e.id])})})}function s(){var e=Object.keys(n).filter(function(e){var t=n[e].missing;return 1===t.length&&Qn(t[0])});if(e.length>0)return a(e)}function l(){return{ok:d,docs:c}}n=u(n);var c=[],d=!0;return Mr.resolve().then(s).then(i).then(l)}function rr(e,t,n,r,i){return e.get(t)["catch"](function(n){if(404===n.status)return"http"===e.type()&&C(404,"PouchDB is just checking if a remote checkpoint exists."),{session_id:r,_id:t,history:[],replicator:fo,version:co};throw n}).then(function(o){if(!i.cancelled)return o.history=(o.history||[]).filter(function(e){return e.session_id!==r}),o.history.unshift({last_seq:n,session_id:r}),o.history=o.history.slice(0,po),o.version=co,o.replicator=fo,o.session_id=r,o.last_seq=n,e.put(o)["catch"](function(o){if(409===o.status)return rr(e,t,n,r,i);throw o})})}function ir(e,t,n,r){this.src=e,this.target=t,this.id=n,this.returnValue=r}function or(e,t){return e.session_id===t.session_id?{last_seq:e.last_seq,history:e.history}:ar(e.history,t.history)}function ar(e,t){var n=e[0],r=e.slice(1),i=t[0],o=t.slice(1);if(!n||0===t.length)return{last_seq:ho,history:[]};var a=n.session_id;if(sr(a,t))return{last_seq:n.last_seq,history:e};var s=i.session_id;return sr(s,r)?{last_seq:i.last_seq,history:o}:ar(r,o)}function sr(e,t){var n=t[0],r=t.slice(1);return!(!e||0===t.length)&&(e===n.session_id||sr(e,r))}function lr(e){return"number"==typeof e.status&&4===Math.floor(e.status/100)}function ur(e,t,n,r){if(e.retry===!1)return t.emit("error",n),void t.removeAllListeners();if("function"!=typeof e.back_off_function&&(e.back_off_function=E),t.emit("requestError",n),"active"===t.state||"pending"===t.state){t.emit("paused",n),t.state="stopped";var i=function(){e.current_back_off=mo},o=function(){t.removeListener("active",i)};t.once("paused",o),t.once("active",i)}e.current_back_off=e.current_back_off||mo,e.current_back_off=e.back_off_function(e.current_back_off),setTimeout(r,e.current_back_off)}function cr(e){return Object.keys(e).sort(Fr.collate).reduce(function(t,n){return t[n]=e[n],t},{})}function dr(e,t,n){var r=n.doc_ids?n.doc_ids.sort(Fr.collate):"",i=n.filter?n.filter.toString():"",o="",a="";return n.filter&&n.query_params&&(o=JSON.stringify(cr(n.query_params))),n.filter&&"_view"===n.filter&&(a=n.view.toString()),Mr.all([e.id(),t.id()]).then(function(e){var t=e[0]+e[1]+i+a+o+r;return new Mr(function(e){We(t,e)})}).then(function(e){return e=e.replace(/\//g,".").replace(/\+/g,"_"),"_local/"+e})}function fr(e,t,n,r,i){function o(){return E?Mr.resolve():dr(e,t,n).then(function(n){_=n,E=new ir(e,t,_,r)})}function a(){if(R=[],0!==x.docs.length){var e=x.docs;return t.bulkDocs({docs:e,new_edits:!1}).then(function(t){if(r.cancelled)throw h(),new Error("cancelled");var n=[],o={};t.forEach(function(e){e.error&&(i.doc_write_failures++,n.push(e),o[e.id]=e)}),I=I.concat(n),i.docs_written+=x.docs.length-n.length;var a=n.filter(function(e){return"unauthorized"!==e.name&&"forbidden"!==e.name});if(e.forEach(function(e){var t=o[e._id];t?r.emit("denied",u(t)):R.push(e)}),a.length>0){var s=new Error("bulkDocs error");throw s.other_errors=n,p("target.bulkDocs failed to write docs",s),new Error("bulkWrite partial failure")}},function(t){throw i.doc_write_failures+=e.length,t})}}function s(){if(x.error)throw new Error("There was a problem getting docs.");i.last_seq=N=x.seq;var e=u(i);return R.length&&(e.docs=R,r.emit("change",e)),S=!0,E.writeCheckpoint(x.seq,B).then(function(){if(S=!1,r.cancelled)throw h(),new Error("cancelled");x=void 0,b()})["catch"](w)}function l(){var e={};return x.changes.forEach(function(t){"_user/"!==t.id&&(e[t.id]=t.changes.map(function(e){return e.rev}))}),t.revsDiff(e).then(function(e){if(r.cancelled)throw h(),new Error("cancelled");x.diffs=e})}function c(){return nr(e,t,x.diffs,r).then(function(e){x.error=!e.ok,e.docs.forEach(function(e){delete x.diffs[e._id],i.docs_read++,x.docs.push(e)})})}function d(){if(!r.cancelled&&!x){if(0===C.length)return void f(!0);x=C.shift(),l().then(c).then(a).then(s).then(d)["catch"](function(e){p("batch processing terminated with error",e)})}}function f(e){return 0===k.changes.length?void(0!==C.length||x||((F&&$.live||A)&&(r.state="pending",r.emit("paused")),A&&h())):void((e||A||k.changes.length>=M)&&(C.push(k),k={seq:0,changes:[],docs:[]},"pending"!==r.state&&"stopped"!==r.state||(r.state="active",r.emit("active")),d()))}function p(e,t){T||(t.message||(t.message=e),i.ok=!1,i.status="aborting",i.errors.push(t),I=I.concat(t),C=[],k={seq:0,changes:[],docs:[]},h())}function h(){if(!(T||r.cancelled&&(i.status="cancelled",S))){i.status=i.status||"complete",i.end_time=new Date,i.last_seq=N,T=!0;var o=I.filter(function(e){return"unauthorized"!==e.name&&"forbidden"!==e.name});if(o.length>0){var a=I.pop();I.length>0&&(a.other_errors=I),a.result=i,ur(n,r,a,function(){fr(e,t,n,r)})}else i.errors=I,r.emit("complete",i),r.removeAllListeners()}}function g(e){if(r.cancelled)return h();var t=D(n)(e);t&&(k.seq=e.seq,k.changes.push(e),f(0===C.length&&$.live))}function m(e){if(L=!1,r.cancelled)return h();if(e.results.length>0)$.since=e.last_seq,b(),f(!0);else{var t=function(){F?($.live=!0,b()):A=!0,f(!0)};x||0!==e.results.length?t():(S=!0,E.writeCheckpoint(e.last_seq,B).then(function(){S=!1,i.last_seq=N=e.last_seq,t()})["catch"](w))}}function v(e){return L=!1,r.cancelled?h():void p("changes rejected",e)}function b(){function t(){o.cancel()}function i(){r.removeListener("cancel",t)}if(!L&&!A&&C.length<O){L=!0,r._changes&&(r.removeListener("cancel",r._abortChanges),r._changes.cancel()),r.once("cancel",t);var o=e.changes($).on("change",g);o.then(i,i),o.then(m)["catch"](v),n.retry&&(r._changes=o,r._abortChanges=t)}}function y(){o().then(function(){return r.cancelled?void h():E.getCheckpoint().then(function(e){N=e,$={since:N,limit:M,batch_size:M,style:"all_docs",doc_ids:P,return_docs:!0},n.filter&&("string"!=typeof n.filter?$.include_docs=!0:$.filter=n.filter),"heartbeat"in n&&($.heartbeat=n.heartbeat),"timeout"in n&&($.timeout=n.timeout),n.query_params&&($.query_params=n.query_params),n.view&&($.view=n.view),b()})})["catch"](function(e){p("getCheckpoint rejected with ",e)})}function w(e){throw S=!1,p("writeCheckpoint completed with error",e),e}var x,_,E,C=[],k={seq:0,changes:[],docs:[]},S=!1,A=!1,T=!1,N=0,F=n.continuous||n.live||!1,M=n.batch_size||100,O=n.batches_limit||10,L=!1,P=n.doc_ids,I=[],R=[],B=j();i=i||{ok:!0,start_time:new Date,docs_read:0,docs_written:0,doc_write_failures:0,errors:[]};var $={};return r.ready(e,t),r.cancelled?void h():(r._addedListeners||(r.once("cancel",h),"function"==typeof n.complete&&(r.once("error",n.complete),r.once("complete",function(e){n.complete(null,e)})),r._addedListeners=!0),void("undefined"==typeof n.since?y():o().then(function(){return S=!0,E.writeCheckpoint(n.since,B)}).then(function(){return S=!1,r.cancelled?void h():(N=n.since,void y())})["catch"](w)))}function pr(){Sr.EventEmitter.call(this),this.cancelled=!1,this.state="pending";var e=this,t=new Mr(function(t,n){e.once("complete",t),e.once("error",n)});e.then=function(e,n){return t.then(e,n)},e["catch"]=function(e){return t["catch"](e)},e["catch"](function(){})}function hr(e,t){var n=t.PouchConstructor;return"string"==typeof e?new n(e,t):e}function gr(e,t,n,r){if("function"==typeof n&&(r=n,n={}),"undefined"==typeof n&&(n={}),n.doc_ids&&!Array.isArray(n.doc_ids))throw S(Yr,"`doc_ids` filter parameter is not a list.");n.complete=r,n=u(n),n.continuous=n.continuous||n.live,n.retry="retry"in n&&n.retry,n.PouchConstructor=n.PouchConstructor||this;var i=new pr(n),o=hr(e,n),a=hr(t,n);return fr(o,a,n,i),i}function mr(e,t,n,r){return"function"==typeof n&&(r=n,n={}),"undefined"==typeof n&&(n={}),n=u(n),n.PouchConstructor=n.PouchConstructor||this,e=hr(e,n),t=hr(t,n),new vr(e,t,n,r)}function vr(e,t,n,r){function i(e){p.emit("change",{direction:"pull",change:e})}function o(e){p.emit("change",{direction:"push",change:e})}function a(e){p.emit("denied",{direction:"push",doc:e})}function s(e){p.emit("denied",{direction:"pull",doc:e})}function l(){p.pushPaused=!0,p.pullPaused&&p.emit("paused")}function u(){p.pullPaused=!0,p.pushPaused&&p.emit("paused")}function c(){p.pushPaused=!1,p.pullPaused&&p.emit("active",{direction:"push"})}function d(){p.pullPaused=!1,p.pushPaused&&p.emit("active",{direction:"pull"})}function f(e){return function(t,n){var r="change"===t&&(n===i||n===o),f="denied"===t&&(n===s||n===a),h="paused"===t&&(n===u||n===l),g="active"===t&&(n===d||n===c);(r||f||h||g)&&(t in m||(m[t]={}),m[t][e]=!0,2===Object.keys(m[t]).length&&p.removeAllListeners(t))}}var p=this;this.canceled=!1;var h=n.push?wr.extend({},n,n.push):n,g=n.pull?wr.extend({},n,n.pull):n;this.push=gr(e,t,h),this.pull=gr(t,e,g),this.pushPaused=!0,this.pullPaused=!0;var m={};n.live&&(this.push.on("complete",p.pull.cancel.bind(p.pull)),this.pull.on("complete",p.push.cancel.bind(p.push))),this.on("newListener",function(e){"change"===e?(p.pull.on("change",i),p.push.on("change",o)):"denied"===e?(p.pull.on("denied",s),p.push.on("denied",a)):"active"===e?(p.pull.on("active",d),p.push.on("active",c)):"paused"===e&&(p.pull.on("paused",u),p.push.on("paused",l))}),this.on("removeListener",function(e){"change"===e?(p.pull.removeListener("change",i),p.push.removeListener("change",o)):"denied"===e?(p.pull.removeListener("denied",s),p.push.removeListener("denied",a)):"active"===e?(p.pull.removeListener("active",d),p.push.removeListener("active",c)):"paused"===e&&(p.pull.removeListener("paused",u),p.push.removeListener("paused",l))}),this.pull.on("removeListener",f("pull")),this.push.on("removeListener",f("push"));var v=Mr.all([this.push,this.pull]).then(function(e){var t={push:e[0],pull:e[1]};return p.emit("complete",t),r&&r(null,t),p.removeAllListeners(),t},function(e){if(p.cancel(),r?r(e):p.emit("error",e),p.removeAllListeners(),r)throw e});this.then=function(e,t){return v.then(e,t)},this["catch"]=function(e){return v["catch"](e)}}function br(e){e.replicate=gr,e.sync=mr}var yr,wr=n(738),xr=i(n(739)),_r=i(n(742)),Er=i(n(743)),Cr=n(745),kr=i(n(746)),Sr=n(747),Ar=i(n(748)),Tr=i(n(749)),Dr=i(n(750)),Nr=i(n(751)),Fr=n(752),Mr="function"==typeof Promise?Promise:Er,Or=Function.prototype.toString,Lr=Or.call(Object),Pr=xr("pouchdb:api"),Ir=6;if(v())yr=!1;else try{localStorage.setItem("_pouch_check_localstorage",1),yr=!!localStorage.getItem("_pouch_check_localstorage")}catch(Rr){yr=!1}_r(w,Sr.EventEmitter),w.prototype.addListener=function(e,t,n,r){function i(){function e(){a=!1}if(o._listeners[t]){if(a)return void(a="waiting");a=!0;var s=p(r,["style","include_docs","attachments","conflicts","filter","doc_ids","view","since","query_params","binary"]);n.changes(s).on("change",function(e){e.seq>r.since&&!r.cancelled&&(r.since=e.seq,r.onChange(e))}).on("complete",function(){"waiting"===a&&setTimeout(function(){i()},0),a=!1}).on("error",e)}}if(!this._listeners[t]){var o=this,a=!1;this._listeners[t]=i,this.on(e,i)}},w.prototype.removeListener=function(e,t){t in this._listeners&&Sr.EventEmitter.prototype.removeListener.call(this,e,this._listeners[t])},w.prototype.notifyLocalWindows=function(e){v()?chrome.storage.local.set({dbName:e}):b()&&(localStorage[e]="a"===localStorage[e]?"b":"a")},w.prototype.notify=function(e){this.emit(e),this.notifyLocalWindows(e)},_r(k,Error),k.prototype.toString=function(){return JSON.stringify({status:this.status,name:this.name,message:this.message,reason:this.reason})};var Br=(new k({status:401,error:"unauthorized",reason:"Name or password is incorrect."}),new k({status:400,error:"bad_request",reason:"Missing JSON list of 'docs'"})),jr=new k({status:404,error:"not_found",reason:"missing"}),$r=new k({status:409,error:"conflict",reason:"Document update conflict"}),Vr=new k({
status:400,error:"bad_request",reason:"_id field must contain a string"}),Ur=new k({status:412,error:"missing_id",reason:"_id is required for puts"}),Wr=new k({status:400,error:"bad_request",reason:"Only reserved document ids may start with underscore."}),qr=new k({status:412,error:"precondition_failed",reason:"Database not open"}),Hr=new k({status:500,error:"unknown_error",reason:"Database encountered an unknown error"}),zr=new k({status:500,error:"badarg",reason:"Some query argument is invalid"}),Gr=(new k({status:400,error:"invalid_request",reason:"Request was invalid"}),new k({status:400,error:"query_parse_error",reason:"Some query parameter is invalid"})),Kr=new k({status:500,error:"doc_validation",reason:"Bad special document member"}),Yr=new k({status:400,error:"bad_request",reason:"Something wrong with the request"}),Xr=new k({status:400,error:"bad_request",reason:"Document must be a JSON object"}),Qr=(new k({status:404,error:"not_found",reason:"Database not found"}),new k({status:500,error:"indexed_db_went_bad",reason:"unknown"})),Jr=new k({status:500,error:"web_sql_went_bad",reason:"unknown"}),Zr=(new k({status:500,error:"levelDB_went_went_bad",reason:"unknown"}),new k({status:403,error:"forbidden",reason:"Forbidden by design doc validate_doc_update function"}),new k({status:400,error:"bad_request",reason:"Invalid rev format"})),ei=(new k({status:412,error:"file_exists",reason:"The database could not be created, the file already exists."}),new k({status:412,error:"missing_stub"})),ti=(new k({status:413,error:"invalid_url",reason:"Provided URL is invalid"}),["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"]),ni="queryKey",ri=/(?:^|&)([^&=]*)=?([^&]*)/g,ii=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,oi="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");_r(ue,Sr.EventEmitter),ue.prototype.cancel=function(){this.isCancelled=!0,this.db.taskqueue.isReady&&this.emit("cancel")},ue.prototype.doChanges=function(e){var t=this,n=e.complete;if(e=u(e),"live"in e&&!("continuous"in e)&&(e.continuous=e.live),e.processChange=ce,"latest"===e.since&&(e.since="now"),e.since||(e.since=0),"now"===e.since)return void this.db.info().then(function(r){return t.isCancelled?void n(null,{status:"cancelled"}):(e.since=r.update_seq,void t.doChanges(e))},n);if(e.continuous&&"now"!==e.since&&this.db.info().then(function(e){t.startSeq=e.update_seq},function(e){if("idbNull"!==e.id)throw e}),e.view&&!e.filter&&(e.filter="_view"),e.filter&&"string"==typeof e.filter&&("_view"===e.filter?e.view=L(e.view):e.filter=L(e.filter),"http"!==this.db.type()&&!e.doc_ids))return this.filterChanges(e);"descending"in e||(e.descending=!1),e.limit=0===e.limit?1:e.limit,e.complete=n;var r=this.db._changes(e);if(r&&"function"==typeof r.cancel){var i=t.cancel;t.cancel=kr(function(e){r.cancel(),i.apply(this,e)})}},ue.prototype.filterChanges=function(e){var t=this,n=e.complete;if("_view"===e.filter){if(!e.view||"string"!=typeof e.view){var r=S(Yr,"`view` filter parameter not found or invalid.");return n(r)}var i=O(e.view);this.db.get("_design/"+i[0],function(r,o){if(t.isCancelled)return n(null,{status:"cancelled"});if(r)return n(A(r));var a=o&&o.views&&o.views[i[1]]&&o.views[i[1]].map;return a?(e.filter=se(a),void t.doChanges(e)):n(S(jr,o.views?"missing json key: "+i[1]:"missing json key: views"))})}else{var o=O(e.filter);if(!o)return t.doChanges(e);this.db.get("_design/"+o[0],function(r,i){if(t.isCancelled)return n(null,{status:"cancelled"});if(r)return n(A(r));var a=i&&i.filters&&i.filters[o[1]];return a?(e.filter=ae(a),void t.doChanges(e)):n(S(jr,i&&i.filters?"missing json key: "+o[1]:"missing json key: filters"))})}},_r(we,Sr.EventEmitter),we.prototype.post=f("post",function(e,t,n){return"function"==typeof t&&(n=t,t={}),"object"!=typeof e||Array.isArray(e)?n(S(Xr)):void this.bulkDocs({docs:[e]},t,pe(n))}),we.prototype.put=f("put",kr(function(e){function t(){a||(x("warn","db.put(doc, id, rev) has been deprecated and will be removed in a future release, please use db.put({_id: id, _rev: rev}) instead"),a=!0)}var n,r,i,o,a=!1,s=e.shift(),l="_id"in s;if("object"!=typeof s||Array.isArray(s))return(o=e.pop())(S(Xr));for(;;)if(n=e.shift(),r=typeof n,"string"!==r||l?"string"!==r||!l||"_rev"in s?"object"===r?i=n:"function"===r&&(o=n):(t(),s._rev=n):(t(),s._id=n,l=!0),!e.length)break;return i=i||{},F(s._id),oe(s._id)&&"function"==typeof this._putLocal?s._deleted?this._removeLocal(s,o):this._putLocal(s,o):void this.bulkDocs({docs:[s]},i,pe(o))})),we.prototype.putAttachment=f("putAttachment",function(e,t,n,r,i){function o(e){var n="_rev"in e?parseInt(e._rev,10):0;return e._attachments=e._attachments||{},e._attachments[t]={content_type:i,data:r,revpos:++n},a.put(e)}var a=this;return"function"==typeof i&&(i=r,r=n,n=null),"undefined"==typeof i&&(i=r,r=n,n=null),a.get(e).then(function(e){if(e._rev!==n)throw S($r);return o(e)},function(t){if(t.reason===jr.message)return o({_id:e});throw t})}),we.prototype.removeAttachment=f("removeAttachment",function(e,t,n,r){var i=this;i.get(e,function(e,o){return e?void r(e):o._rev!==n?void r(S($r)):o._attachments?(delete o._attachments[t],0===Object.keys(o._attachments).length&&delete o._attachments,void i.put(o,r)):r()})}),we.prototype.remove=f("remove",function(e,t,n,r){var i;"string"==typeof t?(i={_id:e,_rev:t},"function"==typeof n&&(r=n,n={})):(i=e,"function"==typeof t?(r=t,n={}):(r=n,n=t)),n=n||{},n.was_delete=!0;var o={_id:i._id,_rev:i._rev||n.rev};return o._deleted=!0,oe(o._id)&&"function"==typeof this._removeLocal?this._removeLocal(i,r):void this.bulkDocs({docs:[o]},n,pe(r))}),we.prototype.revsDiff=f("revsDiff",function(e,t,n){function r(e,t){s.has(e)||s.set(e,{missing:[]}),s.get(e).missing.push(t)}function i(t,n){var i=e[t].slice(0);V(n,function(e,n,o,a,s){var l=n+"-"+o,u=i.indexOf(l);u!==-1&&(i.splice(u,1),"available"!==s.status&&r(t,l))}),i.forEach(function(e){r(t,e)})}"function"==typeof t&&(n=t,t={});var o=Object.keys(e);if(!o.length)return n(null,{});var a=0,s=new Cr.Map;o.map(function(t){this._getRevisionTree(t,function(r,l){if(r&&404===r.status&&"missing"===r.message)s.set(t,{missing:e[t]});else{if(r)return n(r);i(t,l)}if(++a===o.length){var u={};return s.forEach(function(e,t){u[t]=e}),n(null,u)}})},this)}),we.prototype.bulkGet=f("bulkGet",function(e,t){m(this,e,t)}),we.prototype.compactDocument=f("compactDocument",function(e,t,n){var r=this;this._getRevisionTree(e,function(i,o){if(i)return n(i);var a=me(o),s=[],l=[];Object.keys(a).forEach(function(e){a[e]>t&&s.push(e)}),V(o,function(e,t,n,r,i){var o=t+"-"+n;"available"===i.status&&s.indexOf(o)!==-1&&l.push(o)}),r._doCompaction(e,l,n)})}),we.prototype.compact=f("compact",function(e,t){"function"==typeof e&&(t=e,e={});var n=this;e=e||{},n._compactionQueue=n._compactionQueue||[],n._compactionQueue.push({opts:e,callback:t}),1===n._compactionQueue.length&&be(n)}),we.prototype._compact=function(e,t){function n(e){a.push(i.compactDocument(e.id,0))}function r(e){var n=e.last_seq;Mr.all(a).then(function(){return I(i,"_local/compaction",function(e){return(!e.last_seq||e.last_seq<n)&&(e.last_seq=n,e)})}).then(function(){t(null,{ok:!0})})["catch"](t)}var i=this,o={return_docs:!1,last_seq:e.last_seq||0},a=[];i.changes(o).on("change",n).on("complete",r).on("error",t)},we.prototype.get=f("get",function(e,t,n){function r(){var r=[],a=i.length;return a?void i.forEach(function(i){o.get(e,{rev:i,revs:t.revs,attachments:t.attachments},function(e,t){e?r.push({missing:i}):r.push({ok:t}),a--,a||n(null,r)})}):n(null,r)}if("function"==typeof t&&(n=t,t={}),"string"!=typeof e)return n(S(Vr));if(oe(e)&&"function"==typeof this._getLocal)return this._getLocal(e,n);var i=[],o=this;if(!t.open_revs)return this._get(e,t,function(e,r){if(e)return n(e);var i=r.doc,a=r.metadata,s=r.ctx;if(t.conflicts){var l=q(a);l.length&&(i._conflicts=l)}if(ie(a,i._rev)&&(i._deleted=!0),t.revs||t.revs_info){var u=z(a.rev_tree),c=fe(u,function(e){return e.ids.map(function(e){return e.id}).indexOf(i._rev.split("-")[1])!==-1}),d=c.ids.map(function(e){return e.id}).indexOf(i._rev.split("-")[1])+1,f=c.ids.length-d;if(c.ids.splice(d,f),c.ids.reverse(),t.revs&&(i._revisions={start:c.pos+c.ids.length-1,ids:c.ids.map(function(e){return e.id})}),t.revs_info){var p=c.pos+c.ids.length;i._revs_info=c.ids.map(function(e){return p--,{rev:p+"-"+e.id,status:e.opts.status}})}}if(t.attachments&&i._attachments){var h=i._attachments,g=Object.keys(h).length;if(0===g)return n(null,i);Object.keys(h).forEach(function(e){this._getAttachment(i._id,e,h[e],{rev:i._rev,binary:t.binary,ctx:s},function(t,r){var o=i._attachments[e];o.data=r,delete o.stub,delete o.length,--g||n(null,i)})},o)}else{if(i._attachments)for(var m in i._attachments)i._attachments.hasOwnProperty(m)&&(i._attachments[m].stub=!0);n(null,i)}});if("all"===t.open_revs)this._getRevisionTree(e,function(e,t){return e?n(e):(i=W(t).map(function(e){return e.rev}),void r())});else{if(!Array.isArray(t.open_revs))return n(S(Hr,"function_clause"));i=t.open_revs;for(var a=0;a<i.length;a++){var s=i[a];if("string"!=typeof s||!/^\d+-/.test(s))return n(S(Zr))}r()}}),we.prototype.getAttachment=f("getAttachment",function(e,t,n,r){var i=this;n instanceof Function&&(r=n,n={}),this._get(e,n,function(o,a){return o?r(o):a.doc._attachments&&a.doc._attachments[t]?(n.ctx=a.ctx,n.binary=!0,i._getAttachment(e,t,a.doc._attachments[t],n,r),void 0):r(S(jr))})}),we.prototype.allDocs=f("allDocs",function(e,t){if("function"==typeof e&&(t=e,e={}),e.skip="undefined"!=typeof e.skip?e.skip:0,e.start_key&&(e.startkey=e.start_key),e.end_key&&(e.endkey=e.end_key),"keys"in e){if(!Array.isArray(e.keys))return t(new TypeError("options.keys must be an array"));var n=["startkey","endkey","key"].filter(function(t){return t in e})[0];if(n)return void t(S(Gr,"Query parameter `"+n+"` is not compatible with multi-get"));if("http"!==this.type())return ve(this,e,t)}return this._allDocs(e,t)}),we.prototype.changes=function(e,t){return"function"==typeof e&&(t=e,e={}),new ue(this,e,t)},we.prototype.close=f("close",function(e){return this._closed=!0,this._close(e)}),we.prototype.info=f("info",function(e){var t=this;this._info(function(n,r){return n?e(n):(r.db_name=r.db_name||t._db_name,r.auto_compaction=!(!t.auto_compaction||"http"===t.type()),r.adapter=t.type(),void e(null,r))})}),we.prototype.id=f("id",function(e){return this._id(e)}),we.prototype.type=function(){return"function"==typeof this._type?this._type():this.adapter},we.prototype.bulkDocs=f("bulkDocs",function(e,t,n){if("function"==typeof t&&(n=t,t={}),t=t||{},Array.isArray(e)&&(e={docs:e}),!e||!e.docs||!Array.isArray(e.docs))return n(S(Br));for(var r=0;r<e.docs.length;++r)if("object"!=typeof e.docs[r]||Array.isArray(e.docs[r]))return n(S(Xr));var i;return e.docs.forEach(function(e){e._attachments&&Object.keys(e._attachments).forEach(function(e){i=i||ye(e)})}),i?n(S(Yr,i)):("new_edits"in t||("new_edits"in e?t.new_edits=e.new_edits:t.new_edits=!0),t.new_edits||"http"===this.type()||e.docs.sort(ge),he(e.docs),this._bulkDocs(e,t,function(e,r){return e?n(e):(t.new_edits||(r=r.filter(function(e){return e.error})),void n(null,r))}))}),we.prototype.registerDependentDatabase=f("registerDependentDatabase",function(e,t){function n(t){return t.dependentDbs=t.dependentDbs||{},!t.dependentDbs[e]&&(t.dependentDbs[e]=!0,t)}var r=new this.constructor(e,this.__opts);I(this,"_local/_pouch_dependentDbs",n).then(function(){t(null,{db:r})})["catch"](t)}),we.prototype.destroy=f("destroy",function(e,t){function n(){r._destroy(e,function(e,n){return e?t(e):(r._destroyed=!0,r.emit("destroyed"),void t(null,n||{ok:!0}))})}"function"==typeof e&&(t=e,e={});var r=this,i=!("use_prefix"in r)||r.use_prefix;return"http"===r.type()?n():void r.get("_local/_pouch_dependentDbs",function(e,o){if(e)return 404!==e.status?t(e):n();var a=o.dependentDbs,s=r.constructor,l=Object.keys(a).map(function(e){var t=i?e.replace(new RegExp("^"+s.prefix),""):e;return new s(t,r.__opts).destroy()});Mr.all(l).then(n,t)})}),xe.prototype.execute=function(){var e;if(this.failed)for(;e=this.queue.shift();)e(this.failed);else for(;e=this.queue.shift();)e()},xe.prototype.fail=function(e){this.failed=e,this.execute()},xe.prototype.ready=function(e){this.isReady=!0,this.db=e,this.execute()},xe.prototype.addTask=function(e){this.queue.push(e),this.failed&&this.execute()},_r(Ce,we),Ce.debug=xr,Ce.adapters={},Ce.preferredAdapters=[],Ce.prefix="_pouch_";var ai=new Sr.EventEmitter;ke(Ce),Ce.parseAdapter=function(e,t){var n,r,i=e.match(/([a-z\-]*):\/\/(.*)/);if(i){if(e=/http(s?)/.test(i[1])?i[1]+"://"+i[2]:i[2],n=i[1],!Ce.adapters[n].valid())throw"Invalid adapter";return{name:e,adapter:i[1]}}var o="idb"in Ce.adapters&&"websql"in Ce.adapters&&b()&&localStorage["_pouch__websqldb_"+Ce.prefix+e];if(t.adapter)r=t.adapter;else if("undefined"!=typeof t&&t.db)r="leveldb";else for(var a=0;a<Ce.preferredAdapters.length;++a)if(r=Ce.preferredAdapters[a],r in Ce.adapters){if(o&&"idb"===r){x("log",'PouchDB is downgrading "'+e+'" to WebSQL to avoid data loss, because it was already opened with WebSQL.');continue}break}n=Ce.adapters[r];var s=!(n&&"use_prefix"in n)||n.use_prefix;return{name:s?Ce.prefix+e:e,adapter:r}},Ce.adapter=function(e,t,n){t.valid()&&(Ce.adapters[e]=t,n&&Ce.preferredAdapters.push(e))},Ce.plugin=function(e){return"function"==typeof e?e(Ce):Object.keys(e).forEach(function(t){Ce.prototype[t]=e[t]}),Ce},Ce.defaults=function(e){function t(n,r,i){return this instanceof t?("function"!=typeof r&&"undefined"!=typeof r||(i=r,r={}),n&&"object"==typeof n&&(r=n,n=void 0),r=wr.extend({},e,r),void Ce.call(this,n,r,i)):new t(n,r,i)}return _r(t,Ce),t.preferredAdapters=Ce.preferredAdapters.slice(),Object.keys(Ce).forEach(function(e){e in t||(t[e]=Ce[e])}),t};var si="5.4.5";Ce.version=si;var li,ui=Se(["_id","_rev","_attachments","_deleted","_revisions","_revs_info","_conflicts","_deleted_conflicts","_local_seq","_rev_tree","_replication_id","_replication_state","_replication_state_time","_replication_state_reason","_replication_stats","_removed"]),ci=Se(["_attachments","_replication_id","_replication_state","_replication_state_time","_replication_state_reason","_replication_stats"]),di=function(e){return atob(e)},fi=function(e){return btoa(e)},pi=r.setImmediate||r.setTimeout,hi=32768,gi=5,mi="document-store",vi="by-sequence",bi="attach-store",yi="attach-seq-store",wi="meta-store",xi="local-store",_i="detect-blob-support",Ei={running:!1,queue:[]},Ci=new Cr.Map,ki=new w,Si=new Cr.Map;bt.valid=function(){var e="undefined"!=typeof openDatabase&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform);return!e&&"undefined"!=typeof indexedDB&&"undefined"!=typeof IDBKeyRange};var Ai=7,Ti=At("document-store"),Di=At("by-sequence"),Ni=At("attach-store"),Fi=At("local-store"),Mi=At("metadata-store"),Oi=At("attach-seq-store"),Li=new Cr.Map,Pi=new w,Ii=1,Ri="CREATE INDEX IF NOT EXISTS 'by-seq-deleted-idx' ON "+Di+" (seq, deleted)",Bi="CREATE UNIQUE INDEX IF NOT EXISTS 'by-seq-doc-id-rev' ON "+Di+" (doc_id, rev)",ji="CREATE INDEX IF NOT EXISTS 'doc-winningseq-idx' ON "+Ti+" (winningseq)",$i="CREATE INDEX IF NOT EXISTS 'attach-seq-seq-idx' ON "+Oi+" (seq)",Vi="CREATE UNIQUE INDEX IF NOT EXISTS 'attach-seq-digest-idx' ON "+Oi+" (digest, seq)",Ui=Di+".seq = "+Ti+".winningseq",Wi=Di+".seq AS seq, "+Di+".deleted AS deleted, "+Di+".json AS data, "+Di+".rev AS rev, "+Ti+".json AS metadata";Kt.valid=zt,Kt.use_prefix=!0;var qi=Zt(),Hi=function(){},zi=25,Gi=50,Ki={},Yi=1800,Xi=xr("pouchdb:http");fn.valid=function(){return!0},hn.prototype.add=function(e){return this.promise=this.promise["catch"](function(){}).then(function(){return e()}),this.promise},hn.prototype.finish=function(){return this.promise};var Qi=function(e,n){return n&&e.then(function(e){t.nextTick(function(){n(null,e)})},function(e){t.nextTick(function(){n(e)})}),e},Ji=function(e){return kr(function(t){var n=t.pop(),r=e.apply(this,t);return"function"==typeof n&&Qi(r,n),r})},Zi=function(e,t){return e.then(function(e){return t().then(function(){return e})},function(e){return t().then(function(){throw e})})},eo=function(e,t){return function(){var n=arguments,r=this;return e.add(function(){return t.apply(r,n)})}},to=function(e){for(var t={},n=0,r=e.length;n<r;n++)t["$"+e[n]]=!0;var i=Object.keys(t),o=new Array(i.length);for(n=0,r=i.length;n<r;n++)o[n]=i[n].substring(1);return o},no={},ro=new hn,io=50,oo=x.bind(null,"log"),ao={_sum:function(e,t){return An(t)},_count:function(e,t){return t.length},_stats:function(e,t){function n(e){for(var t=0,n=0,r=e.length;n<r;n++){var i=e[n];t+=i*i}return t}return{sum:An(t),min:Math.min.apply(null,t),max:Math.max.apply(null,t),count:t.length,sumsqr:n(t)}}},so=Ji(function(){var e=this;return"http"===e.type()?Hn(e):"function"==typeof e._viewCleanup?Pn(e):zn(e)}),lo=function(e,t,n){"function"==typeof t&&(n=t,t={}),t=t?Nn(t):{},"function"==typeof e&&(e={map:e});var r=this,i=Mr.resolve().then(function(){return Gn(r,e,t)});return Qi(i,n),i};_r(Kn,Error),_r(Yn,Error),_r(Xn,Error);var uo={query:lo,viewCleanup:so},co=1,fo="pouchdb",po=5,ho=0;ir.prototype.writeCheckpoint=function(e,t){var n=this;return this.updateTarget(e,t).then(function(){return n.updateSource(e,t)})},ir.prototype.updateTarget=function(e,t){return rr(this.target,this.id,e,t,this.returnValue)},ir.prototype.updateSource=function(e,t){var n=this;return this.readOnlySource?Mr.resolve(!0):rr(this.src,this.id,e,t,this.returnValue)["catch"](function(e){if(lr(e))return n.readOnlySource=!0,!0;throw e})};var go={undefined:function(e,t){return 0===Fr.collate(e.last_seq,t.last_seq)?t.last_seq:0},1:function(e,t){return or(t,e).last_seq}};ir.prototype.getCheckpoint=function(){var e=this;return e.target.get(e.id).then(function(t){return e.readOnlySource?Mr.resolve(t.last_seq):e.src.get(e.id).then(function(e){if(t.version!==e.version)return ho;var n;return n=t.version?t.version.toString():"undefined",n in go?go[n](t,e):ho},function(n){if(404===n.status&&t.last_seq)return e.src.put({_id:e.id,last_seq:ho}).then(function(){return ho},function(n){return lr(n)?(e.readOnlySource=!0,t.last_seq):ho});throw n})})["catch"](function(e){if(404!==e.status)throw e;return ho})};var mo=0;_r(pr,Sr.EventEmitter),pr.prototype.cancel=function(){this.cancelled=!0,this.state="cancelled",this.emit("cancel")},pr.prototype.ready=function(e,t){function n(){i.cancel()}function r(){e.removeListener("destroyed",n),t.removeListener("destroyed",n)}var i=this;i._readyCalled||(i._readyCalled=!0,e.once("destroyed",n),t.once("destroyed",n),i.once("complete",r))},_r(vr,Sr.EventEmitter),vr.prototype.cancel=function(){this.canceled||(this.canceled=!0,this.push.cancel(),this.pull.cancel())},Ce.plugin(xt).plugin(Yt).plugin(pn).plugin(uo).plugin(br),e.exports=Ce}).call(t,n(737),function(){return this}())},function(e,t){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function i(e){if(c===setTimeout)return setTimeout(e,0);if((c===n||!c)&&setTimeout)return c=setTimeout,setTimeout(e,0);try{return c(e,0)}catch(t){try{return c.call(null,e,0)}catch(t){return c.call(this,e,0)}}}function o(e){if(d===clearTimeout)return clearTimeout(e);if((d===r||!d)&&clearTimeout)return d=clearTimeout,clearTimeout(e);try{return d(e)}catch(t){try{return d.call(null,e)}catch(t){return d.call(this,e)}}}function a(){g&&p&&(g=!1,p.length?h=p.concat(h):m=-1,h.length&&s())}function s(){if(!g){var e=i(a);g=!0;for(var t=h.length;t;){for(p=h,h=[];++m<t;)p&&p[m].run();m=-1,t=h.length}p=null,g=!1,o(e)}}function l(e,t){this.fun=e,this.array=t}function u(){}var c,d,f=e.exports={};!function(){try{c="function"==typeof setTimeout?setTimeout:n}catch(e){c=n}try{d="function"==typeof clearTimeout?clearTimeout:r}catch(e){d=r}}();var p,h=[],g=!1,m=-1;f.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];h.push(new l(e,t)),1!==h.length||g||i(s)},l.prototype.run=function(){this.fun.apply(null,this.array)},f.title="browser",f.browser=!0,f.env={},f.argv=[],f.version="",f.versions={},f.on=u,f.addListener=u,f.once=u,f.off=u,f.removeListener=u,f.removeAllListeners=u,f.emit=u,f.binding=function(e){throw new Error("process.binding is not supported")},f.cwd=function(){return"/"},f.chdir=function(e){throw new Error("process.chdir is not supported")},f.umask=function(){return 0}},function(e,t){(function(){var e=Array.prototype.slice,t=Array.prototype.forEach,n=function(r){if("object"!=typeof r)throw r+" is not an object";var i=e.call(arguments,1);return t.call(i,function(e){if(e)for(var t in e)"object"==typeof e[t]&&r[t]?n.call(r,r[t],e[t]):r[t]=e[t]}),r};this.extend=n}).call(this)},function(e,t,n){function r(){return"WebkitAppearance"in document.documentElement.style||window.console&&(console.firebug||console.exception&&console.table)||navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31}function i(){var e=arguments,n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff),!n)return e;var r="color: "+this.color;e=[e[0],r,"color: inherit"].concat(Array.prototype.slice.call(e,1));var i=0,o=0;return e[0].replace(/%[a-z%]/g,function(e){"%%"!==e&&(i++,"%c"===e&&(o=i))}),e.splice(o,0,r),e}function o(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function a(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(n){}}function s(){var e;try{e=t.storage.debug}catch(n){}return e}function l(){try{return window.localStorage}catch(e){}}t=e.exports=n(740),t.log=o,t.formatArgs=i,t.save=a,t.load=s,t.useColors=r,t.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:l(),t.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],t.formatters.j=function(e){return JSON.stringify(e)},t.enable(s())},function(e,t,n){function r(){return t.colors[c++%t.colors.length]}function i(e){function n(){}function i(){var e=i,n=+new Date,o=n-(u||n);e.diff=o,e.prev=u,e.curr=n,u=n,null==e.useColors&&(e.useColors=t.useColors()),null==e.color&&e.useColors&&(e.color=r());var a=Array.prototype.slice.call(arguments);a[0]=t.coerce(a[0]),"string"!=typeof a[0]&&(a=["%o"].concat(a));var s=0;a[0]=a[0].replace(/%([a-z%])/g,function(n,r){if("%%"===n)return n;s++;var i=t.formatters[r];if("function"==typeof i){var o=a[s];n=i.call(e,o),a.splice(s,1),s--}return n}),"function"==typeof t.formatArgs&&(a=t.formatArgs.apply(e,a));var l=i.log||t.log||console.log.bind(console);l.apply(e,a)}n.enabled=!1,i.enabled=!0;var o=t.enabled(e)?i:n;return o.namespace=e,o}function o(e){t.save(e);for(var n=(e||"").split(/[\s,]+/),r=n.length,i=0;i<r;i++)n[i]&&(e=n[i].replace(/\*/g,".*?"),"-"===e[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))}function a(){t.enable("")}function s(e){var n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1}function l(e){return e instanceof Error?e.stack||e.message:e}t=e.exports=i,t.coerce=l,t.disable=a,t.enable=o,t.enabled=s,t.humanize=n(741),t.names=[],t.skips=[],t.formatters={};var u,c=0},function(e,t){function n(e){if(e=""+e,!(e.length>1e4)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var n=parseFloat(t[1]),r=(t[2]||"ms").toLowerCase();switch(r){case"years":case"year":case"yrs":case"yr":case"y":return n*c;case"days":case"day":case"d":return n*u;case"hours":case"hour":case"hrs":case"hr":case"h":return n*l;case"minutes":case"minute":case"mins":case"min":case"m":return n*s;case"seconds":case"second":case"secs":case"sec":case"s":return n*a;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n}}}}function r(e){return e>=u?Math.round(e/u)+"d":e>=l?Math.round(e/l)+"h":e>=s?Math.round(e/s)+"m":e>=a?Math.round(e/a)+"s":e+"ms"}function i(e){return o(e,u,"day")||o(e,l,"hour")||o(e,s,"minute")||o(e,a,"second")||e+" ms"}function o(e,t,n){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+n:Math.ceil(e/t)+" "+n+"s"}var a=1e3,s=60*a,l=60*s,u=24*l,c=365.25*u;e.exports=function(e,t){return t=t||{},"string"==typeof e?n(e):t["long"]?i(e):r(e)}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t,n){(function(t){"use strict";function r(){}function i(e){if("function"!=typeof e)throw new TypeError("resolver must be a function");this.state=b,this.queue=[],this.outcome=void 0,t.browser||(this.handled=y),e!==r&&l(this,e)}function o(e,t,n){this.promise=e,"function"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),"function"==typeof n&&(this.onRejected=n,this.callRejected=this.otherCallRejected)}function a(e,t,n){h(function(){var r;try{r=t(n)}catch(i){return g.reject(e,i)}r===e?g.reject(e,new TypeError("Cannot resolve promise with itself")):g.resolve(e,r)})}function s(e){var t=e&&e.then;if(e&&"object"==typeof e&&"function"==typeof t)return function(){t.apply(e,arguments)}}function l(e,t){function n(t){o||(o=!0,g.reject(e,t))}function r(t){o||(o=!0,g.resolve(e,t))}function i(){t(r,n)}var o=!1,a=u(i);"error"===a.status&&n(a.value)}function u(e,t){var n={};try{n.value=e(t),n.status="success"}catch(r){n.status="error",n.value=r}return n}function c(e){return e instanceof this?e:g.resolve(new this(r),e)}function d(e){var t=new this(r);return g.reject(t,e)}function f(e){function t(e,t){function r(e){a[t]=e,++s!==i||o||(o=!0,g.resolve(u,a))}n.resolve(e).then(r,function(e){o||(o=!0,g.reject(u,e))})}var n=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var i=e.length,o=!1;if(!i)return this.resolve([]);for(var a=new Array(i),s=0,l=-1,u=new this(r);++l<i;)t(e[l],l);return u}function p(e){function t(e){n.resolve(e).then(function(e){o||(o=!0,g.resolve(s,e))},function(e){o||(o=!0,g.reject(s,e))})}var n=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var i=e.length,o=!1;if(!i)return this.resolve([]);for(var a=-1,s=new this(r);++a<i;)t(e[a]);return s}var h=n(744),g={},m=["REJECTED"],v=["FULFILLED"],b=["PENDING"];if(!t.browser)var y=["UNHANDLED"];e.exports=i,i.prototype["catch"]=function(e){return this.then(null,e)},i.prototype.then=function(e,n){if("function"!=typeof e&&this.state===v||"function"!=typeof n&&this.state===m)return this;var i=new this.constructor(r);if(t.browser||this.handled===y&&(this.handled=null),this.state!==b){var s=this.state===v?e:n;a(i,s,this.outcome)}else this.queue.push(new o(i,e,n));return i},o.prototype.callFulfilled=function(e){g.resolve(this.promise,e)},o.prototype.otherCallFulfilled=function(e){a(this.promise,this.onFulfilled,e)},o.prototype.callRejected=function(e){g.reject(this.promise,e)},o.prototype.otherCallRejected=function(e){a(this.promise,this.onRejected,e)},g.resolve=function(e,t){var n=u(s,t);if("error"===n.status)return g.reject(e,n.value);var r=n.value;if(r)l(e,r);else{e.state=v,e.outcome=t;for(var i=-1,o=e.queue.length;++i<o;)e.queue[i].callFulfilled(t)}return e},g.reject=function(e,n){e.state=m,e.outcome=n,t.browser||e.handled===y&&h(function(){e.handled===y&&t.emit("unhandledRejection",n,e)});for(var r=-1,i=e.queue.length;++r<i;)e.queue[r].callRejected(n);return e},i.resolve=c,i.reject=d,i.all=f,i.race=p}).call(t,n(737))},function(e,t){(function(t){"use strict";function n(){c=!0;for(var e,t,n=d.length;n;){for(t=d,d=[],e=-1;++e<n;)t[e]();n=d.length}c=!1}function r(e){1!==d.push(e)||c||i()}var i,o=t.MutationObserver||t.WebKitMutationObserver;if(o){var a=0,s=new o(n),l=t.document.createTextNode("");s.observe(l,{characterData:!0}),i=function(){l.data=a=++a%2}}else if(t.setImmediate||"undefined"==typeof t.MessageChannel)i="document"in t&&"onreadystatechange"in t.document.createElement("script")?function(){var e=t.document.createElement("script");e.onreadystatechange=function(){n(),e.onreadystatechange=null,e.parentNode.removeChild(e),e=null},t.document.documentElement.appendChild(e)}:function(){setTimeout(n,0)};else{var u=new t.MessageChannel;u.port1.onmessage=n,i=function(){u.port2.postMessage(0)}}var c,d=[];e.exports=r}).call(t,function(){return this}())},function(e,t){"use strict";function n(){this.store={}}function r(e){if(this.store=new n,e&&Array.isArray(e))for(var t=0,r=e.length;t<r;t++)this.add(e[t])}t.Map=n,t.Set=r,n.prototype.mangle=function(e){if("string"!=typeof e)throw new TypeError("key must be a string but Got "+e);return"$"+e},n.prototype.unmangle=function(e){return e.substring(1)},n.prototype.get=function(e){var t=this.mangle(e);if(t in this.store)return this.store[t]},n.prototype.set=function(e,t){var n=this.mangle(e);return this.store[n]=t,!0},n.prototype.has=function(e){var t=this.mangle(e);return t in this.store},n.prototype["delete"]=function(e){var t=this.mangle(e);return t in this.store&&(delete this.store[t],!0)},n.prototype.forEach=function(e){for(var t=Object.keys(this.store),n=0,r=t.length;n<r;n++){var i=t[n],o=this.store[i];i=this.unmangle(i),e(o,i)}},r.prototype.add=function(e){return this.store.set(e,!0)},r.prototype.has=function(e){return this.store.has(e)},r.prototype["delete"]=function(e){return this.store["delete"](e)}},function(e,t){"use strict";function n(e){return function(){var t=arguments.length;if(t){for(var n=[],r=-1;++r<t;)n[r]=arguments[r];return e.call(this,n)}return e.call(this,[])}}e.exports=n},function(e,t){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(e){return"function"==typeof e}function i(e){return"number"==typeof e}function o(e){return"object"==typeof e&&null!==e}function a(e){return void 0===e}e.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(e){if(!i(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},n.prototype.emit=function(e){var t,n,i,s,l,u;if(this._events||(this._events={}),"error"===e&&(!this._events.error||o(this._events.error)&&!this._events.error.length)){if(t=arguments[1],t instanceof Error)throw t;var c=new Error('Uncaught, unspecified "error" event. ('+t+")");throw c.context=t,c}if(n=this._events[e],a(n))return!1;if(r(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:s=Array.prototype.slice.call(arguments,1),n.apply(this,s)}else if(o(n))for(s=Array.prototype.slice.call(arguments,1),u=n.slice(),i=u.length,l=0;l<i;l++)u[l].apply(this,s);return!0},n.prototype.addListener=function(e,t){var i;if(!r(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,r(t.listener)?t.listener:t),this._events[e]?o(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,o(this._events[e])&&!this._events[e].warned&&(i=a(this._maxListeners)?n.defaultMaxListeners:this._maxListeners,i&&i>0&&this._events[e].length>i&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace())),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(e,t){
function n(){this.removeListener(e,n),i||(i=!0,t.apply(this,arguments))}if(!r(t))throw TypeError("listener must be a function");var i=!1;return n.listener=t,this.on(e,n),this},n.prototype.removeListener=function(e,t){var n,i,a,s;if(!r(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(n=this._events[e],a=n.length,i=-1,n===t||r(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(o(n)){for(s=a;s-- >0;)if(n[s]===t||n[s].listener&&n[s].listener===t){i=s;break}if(i<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(i,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},n.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[e],r(n))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},n.prototype.listeners=function(e){var t;return t=this._events&&this._events[e]?r(this._events[e])?[this._events[e]]:this._events[e].slice():[]},n.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(r(t))return 1;if(t)return t.length}return 0},n.listenerCount=function(e,t){return e.listenerCount(t)}},function(e,t){(function(){var t={}.hasOwnProperty,n=[].slice;e.exports=function(e,r){var i,o,a,s;o=[],s=[];for(i in r)t.call(r,i)&&(a=r[i],"this"!==i&&(o.push(i),s.push(a)));return Function.apply(null,n.call(o).concat([e])).apply(r["this"],s)}}).call(this)},function(e,t,n){!function(t){e.exports=t()}(function(e){"use strict";function t(e,t,n,r,i,o){return t=y(y(t,e),y(r,o)),y(t<<i|t>>>32-i,n)}function n(e,n,r,i,o,a,s){return t(n&r|~n&i,e,n,o,a,s)}function r(e,n,r,i,o,a,s){return t(n&i|r&~i,e,n,o,a,s)}function i(e,n,r,i,o,a,s){return t(n^r^i,e,n,o,a,s)}function o(e,n,r,i,o,a,s){return t(r^(n|~i),e,n,o,a,s)}function a(e,t){var a=e[0],s=e[1],l=e[2],u=e[3];a=n(a,s,l,u,t[0],7,-680876936),u=n(u,a,s,l,t[1],12,-389564586),l=n(l,u,a,s,t[2],17,606105819),s=n(s,l,u,a,t[3],22,-1044525330),a=n(a,s,l,u,t[4],7,-176418897),u=n(u,a,s,l,t[5],12,1200080426),l=n(l,u,a,s,t[6],17,-1473231341),s=n(s,l,u,a,t[7],22,-45705983),a=n(a,s,l,u,t[8],7,1770035416),u=n(u,a,s,l,t[9],12,-1958414417),l=n(l,u,a,s,t[10],17,-42063),s=n(s,l,u,a,t[11],22,-1990404162),a=n(a,s,l,u,t[12],7,1804603682),u=n(u,a,s,l,t[13],12,-40341101),l=n(l,u,a,s,t[14],17,-1502002290),s=n(s,l,u,a,t[15],22,1236535329),a=r(a,s,l,u,t[1],5,-165796510),u=r(u,a,s,l,t[6],9,-1069501632),l=r(l,u,a,s,t[11],14,643717713),s=r(s,l,u,a,t[0],20,-373897302),a=r(a,s,l,u,t[5],5,-701558691),u=r(u,a,s,l,t[10],9,38016083),l=r(l,u,a,s,t[15],14,-660478335),s=r(s,l,u,a,t[4],20,-405537848),a=r(a,s,l,u,t[9],5,568446438),u=r(u,a,s,l,t[14],9,-1019803690),l=r(l,u,a,s,t[3],14,-187363961),s=r(s,l,u,a,t[8],20,1163531501),a=r(a,s,l,u,t[13],5,-1444681467),u=r(u,a,s,l,t[2],9,-51403784),l=r(l,u,a,s,t[7],14,1735328473),s=r(s,l,u,a,t[12],20,-1926607734),a=i(a,s,l,u,t[5],4,-378558),u=i(u,a,s,l,t[8],11,-2022574463),l=i(l,u,a,s,t[11],16,1839030562),s=i(s,l,u,a,t[14],23,-35309556),a=i(a,s,l,u,t[1],4,-1530992060),u=i(u,a,s,l,t[4],11,1272893353),l=i(l,u,a,s,t[7],16,-155497632),s=i(s,l,u,a,t[10],23,-1094730640),a=i(a,s,l,u,t[13],4,681279174),u=i(u,a,s,l,t[0],11,-358537222),l=i(l,u,a,s,t[3],16,-722521979),s=i(s,l,u,a,t[6],23,76029189),a=i(a,s,l,u,t[9],4,-640364487),u=i(u,a,s,l,t[12],11,-421815835),l=i(l,u,a,s,t[15],16,530742520),s=i(s,l,u,a,t[2],23,-995338651),a=o(a,s,l,u,t[0],6,-198630844),u=o(u,a,s,l,t[7],10,1126891415),l=o(l,u,a,s,t[14],15,-1416354905),s=o(s,l,u,a,t[5],21,-57434055),a=o(a,s,l,u,t[12],6,1700485571),u=o(u,a,s,l,t[3],10,-1894986606),l=o(l,u,a,s,t[10],15,-1051523),s=o(s,l,u,a,t[1],21,-2054922799),a=o(a,s,l,u,t[8],6,1873313359),u=o(u,a,s,l,t[15],10,-30611744),l=o(l,u,a,s,t[6],15,-1560198380),s=o(s,l,u,a,t[13],21,1309151649),a=o(a,s,l,u,t[4],6,-145523070),u=o(u,a,s,l,t[11],10,-1120210379),l=o(l,u,a,s,t[2],15,718787259),s=o(s,l,u,a,t[9],21,-343485551),e[0]=y(a,e[0]),e[1]=y(s,e[1]),e[2]=y(l,e[2]),e[3]=y(u,e[3])}function s(e){var t,n=[];for(t=0;t<64;t+=4)n[t>>2]=e.charCodeAt(t)+(e.charCodeAt(t+1)<<8)+(e.charCodeAt(t+2)<<16)+(e.charCodeAt(t+3)<<24);return n}function l(e){var t,n=[];for(t=0;t<64;t+=4)n[t>>2]=e[t]+(e[t+1]<<8)+(e[t+2]<<16)+(e[t+3]<<24);return n}function u(e){var t,n,r,i,o,l,u=e.length,c=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=u;t+=64)a(c,s(e.substring(t-64,t)));for(e=e.substring(t-64),n=e.length,r=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t<n;t+=1)r[t>>2]|=e.charCodeAt(t)<<(t%4<<3);if(r[t>>2]|=128<<(t%4<<3),t>55)for(a(c,r),t=0;t<16;t+=1)r[t]=0;return i=8*u,i=i.toString(16).match(/(.*?)(.{0,8})$/),o=parseInt(i[2],16),l=parseInt(i[1],16)||0,r[14]=o,r[15]=l,a(c,r),c}function c(e){var t,n,r,i,o,s,u=e.length,c=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=u;t+=64)a(c,l(e.subarray(t-64,t)));for(e=t-64<u?e.subarray(t-64):new Uint8Array(0),n=e.length,r=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t<n;t+=1)r[t>>2]|=e[t]<<(t%4<<3);if(r[t>>2]|=128<<(t%4<<3),t>55)for(a(c,r),t=0;t<16;t+=1)r[t]=0;return i=8*u,i=i.toString(16).match(/(.*?)(.{0,8})$/),o=parseInt(i[2],16),s=parseInt(i[1],16)||0,r[14]=o,r[15]=s,a(c,r),c}function d(e){var t,n="";for(t=0;t<4;t+=1)n+=w[e>>8*t+4&15]+w[e>>8*t&15];return n}function f(e){var t;for(t=0;t<e.length;t+=1)e[t]=d(e[t]);return e.join("")}function p(e){return/[\u0080-\uFFFF]/.test(e)&&(e=unescape(encodeURIComponent(e))),e}function h(e,t){var n,r=e.length,i=new ArrayBuffer(r),o=new Uint8Array(i);for(n=0;n<r;n+=1)o[n]=e.charCodeAt(n);return t?o:i}function g(e){return String.fromCharCode.apply(null,new Uint8Array(e))}function m(e,t,n){var r=new Uint8Array(e.byteLength+t.byteLength);return r.set(new Uint8Array(e)),r.set(new Uint8Array(t),e.byteLength),n?r:r.buffer}function v(e){var t,n=[],r=e.length;for(t=0;t<r-1;t+=2)n.push(parseInt(e.substr(t,2),16));return String.fromCharCode.apply(String,n)}function b(){this.reset()}var y=function(e,t){return e+t&4294967295},w=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];return"5d41402abc4b2a76b9719d911017c592"!==f(u("hello"))&&(y=function(e,t){var n=(65535&e)+(65535&t),r=(e>>16)+(t>>16)+(n>>16);return r<<16|65535&n}),"undefined"==typeof ArrayBuffer||ArrayBuffer.prototype.slice||!function(){function t(e,t){return e=0|e||0,e<0?Math.max(e+t,0):Math.min(e,t)}ArrayBuffer.prototype.slice=function(n,r){var i,o,a,s,l=this.byteLength,u=t(n,l),c=l;return r!==e&&(c=t(r,l)),u>c?new ArrayBuffer(0):(i=c-u,o=new ArrayBuffer(i),a=new Uint8Array(o),s=new Uint8Array(this,u,i),a.set(s),o)}}(),b.prototype.append=function(e){return this.appendBinary(p(e)),this},b.prototype.appendBinary=function(e){this._buff+=e,this._length+=e.length;var t,n=this._buff.length;for(t=64;t<=n;t+=64)a(this._hash,s(this._buff.substring(t-64,t)));return this._buff=this._buff.substring(t-64),this},b.prototype.end=function(e){var t,n,r=this._buff,i=r.length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<i;t+=1)o[t>>2]|=r.charCodeAt(t)<<(t%4<<3);return this._finish(o,i),n=f(this._hash),e&&(n=v(n)),this.reset(),n},b.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},b.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash}},b.prototype.setState=function(e){return this._buff=e.buff,this._length=e.length,this._hash=e.hash,this},b.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},b.prototype._finish=function(e,t){var n,r,i,o=t;if(e[o>>2]|=128<<(o%4<<3),o>55)for(a(this._hash,e),o=0;o<16;o+=1)e[o]=0;n=8*this._length,n=n.toString(16).match(/(.*?)(.{0,8})$/),r=parseInt(n[2],16),i=parseInt(n[1],16)||0,e[14]=r,e[15]=i,a(this._hash,e)},b.hash=function(e,t){return b.hashBinary(p(e),t)},b.hashBinary=function(e,t){var n=u(e),r=f(n);return t?v(r):r},b.ArrayBuffer=function(){this.reset()},b.ArrayBuffer.prototype.append=function(e){var t,n=m(this._buff.buffer,e,!0),r=n.length;for(this._length+=e.byteLength,t=64;t<=r;t+=64)a(this._hash,l(n.subarray(t-64,t)));return this._buff=t-64<r?new Uint8Array(n.buffer.slice(t-64)):new Uint8Array(0),this},b.ArrayBuffer.prototype.end=function(e){var t,n,r=this._buff,i=r.length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<i;t+=1)o[t>>2]|=r[t]<<(t%4<<3);return this._finish(o,i),n=f(this._hash),e&&(n=v(n)),this.reset(),n},b.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},b.ArrayBuffer.prototype.getState=function(){var e=b.prototype.getState.call(this);return e.buff=g(e.buff),e},b.ArrayBuffer.prototype.setState=function(e){return e.buff=h(e.buff,!0),b.prototype.setState.call(this,e)},b.ArrayBuffer.prototype.destroy=b.prototype.destroy,b.ArrayBuffer.prototype._finish=b.prototype._finish,b.ArrayBuffer.hash=function(e,t){var n=c(new Uint8Array(e)),r=f(n);return t?v(r):r},b})},function(e,t){"use strict";function n(e,t,n){var r=n[n.length-1];e===r.element&&(n.pop(),r=n[n.length-1]);var i=r.element,o=r.index;if(Array.isArray(i))i.push(e);else if(o===t.length-2){var a=t.pop();i[a]=e}else t.push(e)}t.stringify=function(e){var t=[];t.push({obj:e});for(var n,r,i,o,a,s,l,u,c,d,f,p="";n=t.pop();)if(r=n.obj,i=n.prefix||"",o=n.val||"",p+=i,o)p+=o;else if("object"!=typeof r)p+="undefined"==typeof r?null:JSON.stringify(r);else if(null===r)p+="null";else if(Array.isArray(r)){for(t.push({val:"]"}),a=r.length-1;a>=0;a--)s=0===a?"":",",t.push({obj:r[a],prefix:s});t.push({val:"["})}else{l=[];for(u in r)r.hasOwnProperty(u)&&l.push(u);for(t.push({val:"}"}),a=l.length-1;a>=0;a--)c=l[a],d=r[c],f=a>0?",":"",f+=JSON.stringify(c)+":",t.push({obj:d,prefix:f});t.push({val:"{"})}return p},t.parse=function(e){for(var t,r,i,o,a,s,l,u,c,d=[],f=[],p=0;;)if(t=e[p++],"}"!==t&&"]"!==t&&"undefined"!=typeof t)switch(t){case" ":case"\t":case"\n":case":":case",":break;case"n":p+=3,n(null,d,f);break;case"t":p+=3,n(!0,d,f);break;case"f":p+=4,n(!1,d,f);break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"-":for(r="",p--;;){if(i=e[p++],!/[\d\.\-e\+]/.test(i)){p--;break}r+=i}n(parseFloat(r),d,f);break;case'"':for(o="",a=void 0,s=0;;){if(l=e[p++],'"'===l&&("\\"!==a||s%2!==1))break;o+=l,a=l,"\\"===a?s++:s=0}n(JSON.parse('"'+o+'"'),d,f);break;case"[":u={element:[],index:d.length},d.push(u.element),f.push(u);break;case"{":c={element:{},index:d.length},d.push(c.element),f.push(c);break;default:throw new Error("unexpectedly reached end of input: "+t)}else{if(1===d.length)return d.pop();n(d.pop(),d,f)}}},function(e,t,n){var r,i,o;!function(n,a){i=[],r=a,o="function"==typeof r?r.apply(t,i):r,!(void 0!==o&&(e.exports=o))}(this,function(){"use strict";var e=function(){this._listeners={}};e.prototype.addEventListener=function(e,t){this._listeners[e]=this._listeners[e]||[],this._listeners[e].indexOf(t)<0&&this._listeners[e].push(t)},e.prototype.removeEventListener=function(e,t){if(this._listeners[e]){var n=this._listeners[e].indexOf(t);n>=0&&this._listeners[e].splice(n,1)}},e.prototype.dispatchEvent=function(e){if(this._listeners[e.type]&&this._listeners[e.type].length)for(var t=this._listeners[e.type].slice(),n=0,r=t.length;n<r;++n)t[n].call(this,e)};var t=function(e){return"function"==typeof e.constructor&&"GeneratorFunction"===e.constructor.name},n=function(e){return{next:function(){var t=e();return t?{value:t}:{done:!0}}}},r=function(e){var t=!1;return{next:function(){return t?{done:!0}:(t=!0,{value:e})}}},i=function(e,i){var o=typeof e;if("object"===o){if("function"==typeof e.next)return e;if("function"==typeof e.then)return r(e)}return"function"===o?t(e)?e():n(e):r(i.resolve(e))},o=function(e,t,n){this.target=e,this.type=t,this.data=n},a=function(t,n,r){if(e.call(this),"number"!=typeof n||Math.floor(n)!==n||n<1)throw new Error("Invalid concurrency");this._concurrency=n,this._options=r||{},this._options.promise=this._options.promise||Promise,this._iterator=i(t,this._options.promise),this._done=!1,this._size=0,this._promise=null,this._callbacks=null};return a.prototype=new e,a.prototype.constructor=a,a.prototype.concurrency=function(e){return"undefined"!=typeof e&&(this._concurrency=e,this.active()&&this._proceed()),this._concurrency},a.prototype.size=function(){return this._size},a.prototype.active=function(){return!!this._promise},a.prototype.promise=function(){return this._promise},a.prototype.start=function(){var e=this,t=this._options.promise;return this._promise=new t(function(t,n){e._callbacks={reject:n,resolve:t},e._proceed()}),this._promise},a.prototype._fireEvent=function(e,t){this.dispatchEvent(new o(this,e,t))},a.prototype._settle=function(e){e?this._callbacks.reject(e):this._callbacks.resolve(),this._promise=null,this._callbacks=null},a.prototype._onPooledPromiseFulfilled=function(e,t){this._size--,this.active()&&(this._fireEvent("fulfilled",{promise:e,result:t}),this._proceed())},a.prototype._onPooledPromiseRejected=function(e,t){this._size--,this.active()&&(this._fireEvent("rejected",{promise:e,error:t}),this._settle(t||new Error("Unknown error")))},a.prototype._trackPromise=function(e){var t=this;e.then(function(n){t._onPooledPromiseFulfilled(e,n)},function(n){t._onPooledPromiseRejected(e,n)})["catch"](function(e){t._settle(new Error("Promise processing failed: "+e))})},a.prototype._proceed=function(){if(!this._done){for(var e=null;this._size<this._concurrency&&!(e=this._iterator.next()).done;)this._size++,this._trackPromise(e.value);this._done=null===e||!!e.done}this._done&&0===this._size&&this._settle()},a.PromisePoolEvent=o,a.PromisePool=a,a})},function(e,t,n){"use strict";function r(e){if(null!==e)switch(typeof e){case"boolean":return e?1:0;case"number":return c(e);case"string":return e.replace(/\u0002/g,"").replace(/\u0001/g,"").replace(/\u0000/g,"");case"object":var n=Array.isArray(e),r=n?e:Object.keys(e),i=-1,o=r.length,a="";if(n)for(;++i<o;)a+=t.toIndexableString(r[i]);else for(;++i<o;){var s=r[i];a+=t.toIndexableString(s)+t.toIndexableString(e[s])}return a}return""}function i(e,t){var n,r=t,i="1"===e[t];if(i)n=0,t++;else{var o="0"===e[t];t++;var a="",s=e.substring(t,t+f),l=parseInt(s,10)+d;for(o&&(l=-l),t+=f;;){var u=e[t];if("\0"===u)break;a+=u,t++}a=a.split("."),n=1===a.length?parseInt(a,10):parseFloat(a[0]+"."+a[1]),o&&(n-=10),0!==l&&(n=parseFloat(n+"e"+l))}return{num:n,length:t-r}}function o(e,t){var n=e.pop();if(t.length){var r=t[t.length-1];n===r.element&&(t.pop(),r=t[t.length-1]);var i=r.element,o=r.index;if(Array.isArray(i))i.push(n);else if(o===e.length-2){var a=e.pop();i[a]=n}else e.push(n)}}function a(e,n){for(var r=Math.min(e.length,n.length),i=0;i<r;i++){var o=t.collate(e[i],n[i]);if(0!==o)return o}return e.length===n.length?0:e.length>n.length?1:-1}function s(e,t){return e===t?0:e>t?1:-1}function l(e,n){for(var r=Object.keys(e),i=Object.keys(n),o=Math.min(r.length,i.length),a=0;a<o;a++){var s=t.collate(r[a],i[a]);if(0!==s)return s;if(s=t.collate(e[r[a]],n[i[a]]),0!==s)return s}return r.length===i.length?0:r.length>i.length?1:-1}function u(e){var t=["boolean","number","string","object"],n=t.indexOf(typeof e);return~n?null===e?1:Array.isArray(e)?5:n<3?n+2:n+3:Array.isArray(e)?5:void 0}function c(e){if(0===e)return"1";var t=e.toExponential().split(/e\+?/),n=parseInt(t[1],10),r=e<0,i=r?"0":"2",o=(r?-n:n)-d,a=h.padLeft(o.toString(),"0",f);i+=p+a;var s=Math.abs(parseFloat(t[0]));r&&(s=10-s);var l=s.toFixed(20);return l=l.replace(/\.?0+$/,""),i+=p+l}var d=-324,f=3,p="",h=n(753);t.collate=function(e,n){if(e===n)return 0;e=t.normalizeKey(e),n=t.normalizeKey(n);var r=u(e),i=u(n);if(r-i!==0)return r-i;if(null===e)return 0;switch(typeof e){case"number":return e-n;case"boolean":return e===n?0:e<n?-1:1;case"string":return s(e,n)}return Array.isArray(e)?a(e,n):l(e,n)},t.normalizeKey=function(e){switch(typeof e){case"undefined":return null;case"number":return e===1/0||e===-(1/0)||isNaN(e)?null:e;case"object":var n=e;if(Array.isArray(e)){var r=e.length;e=new Array(r);for(var i=0;i<r;i++)e[i]=t.normalizeKey(n[i])}else{if(e instanceof Date)return e.toJSON();if(null!==e){e={};for(var o in n)if(n.hasOwnProperty(o)){var a=n[o];"undefined"!=typeof a&&(e[o]=t.normalizeKey(a))}}}}return e},t.toIndexableString=function(e){var n="\0";return e=t.normalizeKey(e),u(e)+p+r(e)+n},t.parseIndexableString=function(e){for(var t=[],n=[],r=0;;){var a=e[r++];if("\0"!==a)switch(a){case"1":t.push(null);break;case"2":t.push("1"===e[r]),r++;break;case"3":var s=i(e,r);t.push(s.num),r+=s.length;break;case"4":for(var l="";;){var u=e[r];if("\0"===u)break;l+=u,r++}l=l.replace(/\u0001\u0001/g,"\0").replace(/\u0001\u0002/g,"").replace(/\u0002\u0002/g,""),t.push(l);break;case"5":var c={element:[],index:t.length};t.push(c.element),n.push(c);break;case"6":var d={element:{},index:t.length};t.push(d.element),n.push(d);break;default:throw new Error("bad collationIndex or unexpectedly reached end of input: "+a)}else{if(1===t.length)return t.pop();o(t,n)}}}},function(e,t){"use strict";function n(e,t,n){for(var r="",i=n-e.length;r.length<i;)r+=t;return r}t.padLeft=function(e,t,r){var i=n(e,t,r);return i+e},t.padRight=function(e,t,r){var i=n(e,t,r);return e+i},t.stringLexCompare=function(e,t){var n,r=e.length,i=t.length;for(n=0;n<r;n++){if(n===i)return 1;var o=e.charAt(n),a=t.charAt(n);if(o!==a)return o<a?-1:1}return r<i?-1:0},t.intToDecimalForm=function(e){var t=e<0,n="";do{var r=t?-Math.ceil(e%10):Math.floor(e%10);n=r+n,e=t?Math.ceil(e/10):Math.floor(e/10)}while(e);return t&&"0"!==n&&(n="-"+n),n}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(99),u=(r(l),n(84)),c=r(u),d=n(106),f=r(d),p=n(137),h=r(p),g=n(733),m=r(g),v=n(755),b=r(v),y=n(293),w=r(y),x=n(299),_=n(678),E=r(_),C=n(756),k=r(C),S=n(785),A=r(S),T=n(565),D=r(T);n(791);var N="deleteConflictsHideModal",F=b["default"].revBrowserStore,M=w["default"].ConfirmButton;n(793);var O=D["default"].acequire("ace/ext/static_highlight");n(570);var L=D["default"].acequire("ace/mode/json").Mode;n(572);var P=D["default"].acequire("ace/theme/idle_fingers"),I=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state=n.getStoreState(),n}return a(t,e),s(t,[{key:"getStoreState",value:function(){return{tree:F.getRevTree(),ours:F.getOurs(),theirs:F.getTheirs(),conflictingRevs:F.getConflictingRevs(),dropdownData:F.getDropdownData(),isDiffViewEnabled:F.getIsDiffViewEnabled(),databaseName:F.getDatabaseName()}}},{key:"componentDidMount",value:function(){F.on("change",this.onChange,this)}},{key:"componentWillUnmount",value:function(){F.off("change",this.onChange)}},{key:"onChange",value:function(){this.setState(this.getStoreState())}},{key:"toggleDiffView",value:function(e){m["default"].toggleDiffView(e)}},{key:"render",value:function(){var e=this.state,t=e.tree,n=e.ours,r=e.theirs,i=(e.dropdownData,e.conflictingRevs),o=e.isDiffViewEnabled;return t?r&&i.length?f["default"].createElement("div",{className:"revision-wrapper scrollable"},f["default"].createElement($,this.state),f["default"].createElement("div",{className:"revision-view-controls"},f["default"].createElement(x.ButtonGroup,{className:"two-sides-toggle-button"},f["default"].createElement(x.Button,{style:{width:"120px"},className:o?"active":"",onClick:this.toggleDiffView.bind(this,!0)},f["default"].createElement("i",{className:"icon-columns"})," Diff"),f["default"].createElement(x.Button,{style:{width:"120px"},className:o?"":"active",onClick:this.toggleDiffView.bind(this,!1)},f["default"].createElement("i",{className:"icon-file-text"})," Document"))),o?f["default"].createElement(B,{ours:n,theirs:r}):f["default"].createElement(R,{ours:n,theirs:r})):f["default"].createElement("div",{style:{textAlign:"center",color:"#fff"}},f["default"].createElement("h2",null,"No conflicts")):null}}]),t}(f["default"].Component),R=function(e){function t(e){return i(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return a(t,e),s(t,[{key:"componentDidUpdate",value:function(){this.hightlightAfterRender()}},{key:"componentDidMount",value:function(){this.hightlightAfterRender()}},{key:"hightlightAfterRender",value:function(){var e=function(e){return JSON.stringify(e,null,"  ")},t=new L,n=h["default"].findDOMNode(this.refs.revLeftOurs),r=h["default"].findDOMNode(this.refs.revRightTheirs),i=O.render(e(this.props.ours),t,P,0,!0);n.innerHTML=i.html;var o=O.render(e(this.props.theirs),t,P,0,!0);r.innerHTML=o.html}},{key:"render",value:function(){var e=this.props,t=e.ours,n=e.theirs;return t&&n?f["default"].createElement("div",{className:"revision-split-area"},f["default"].createElement("div",{"data-id":"ours",style:{width:"50%"}},f["default"].createElement("div",{style:{marginBottom:"20px"}},t._rev," (Server-Selected Rev)"),f["default"].createElement("pre",{ref:"revLeftOurs"})),f["default"].createElement("div",{"data-id":"theirs",style:{width:"50%"}},f["default"].createElement("div",{style:{marginBottom:"20px"}},n._rev),f["default"].createElement("pre",{ref:"revRightTheirs"}))):f["default"].createElement("div",null)}}]),t}(f["default"].Component),B=function(e){var t=e.ours,n=e.theirs;if(!t||!n)return f["default"].createElement("div",null);var r=k["default"].diff(t,n),i=A["default"].format(r,t);return f["default"].createElement("div",{className:"revision-diff-area"},f["default"].createElement("div",{style:{marginTop:"30px"},dangerouslySetInnerHTML:{__html:i}}))};B.propTypes={ours:f["default"].PropTypes.object,theirs:f["default"].PropTypes.object,currentRev:f["default"].PropTypes.string};var j=function(e){var t=e.options,n=e.selected,r=e.onRevisionClick,i=e.onBackwardClick,o=e.onForwardClick;return f["default"].createElement("div",{className:"conflicting-revs-dropdown"},f["default"].createElement(U,{backward:!0,onClick:i}),f["default"].createElement("div",{style:{width:"345px",margin:"0 5px"}},f["default"].createElement(E["default"],{name:"form-field-name",value:n,options:t,clearable:!1,onChange:r})),f["default"].createElement(U,{forward:!0,onClick:o}))};j.propTypes={options:f["default"].PropTypes.array.isRequired,selected:f["default"].PropTypes.string.isRequired,onRevisionClick:f["default"].PropTypes.func.isRequired,onBackwardClick:f["default"].PropTypes.func.isRequired,onForwardClick:f["default"].PropTypes.func.isRequired};var $=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={showModal:!1},n}return a(t,e),s(t,[{key:"onRevisionClick",value:function(e){m["default"].chooseLeaves(this.props.ours,e.value)}},{key:"onForwardClick",value:function(){var e=this.props.conflictingRevs,t=e.indexOf(this.props.theirs._rev),n=e[t+1];n&&m["default"].chooseLeaves(this.props.ours,n)}},{key:"onBackwardClick",value:function(){var e=this.props.conflictingRevs,t=e.indexOf(this.props.theirs._rev),n=e[t-1];n&&m["default"].chooseLeaves(this.props.ours,n)}},{key:"selectAsWinner",value:function(e,t){t&&c["default"].utils.localStorageSet(N,!0),m["default"].selectRevAsWinner(this.props.databaseName,e._id,this.props.tree.paths,e._rev)}},{key:"onSelectAsWinnerClick",value:function(e){return c["default"].utils.localStorageGet(N)!==!0?void m["default"].showConfirmModal(!0,e):void this.selectAsWinner(e)}},{key:"render",value:function(){var e=this.props,t=e.tree,n=(e.conflictingRevs,{paddingRight:"30px"});return f["default"].createElement("div",{className:"revision-browser-controls"},f["default"].createElement(V,{onConfirm:this.selectAsWinner.bind(this)}),f["default"].createElement("table",{style:{margin:"10px 60px",width:"100%"}},f["default"].createElement("tbody",null,f["default"].createElement("tr",{style:{height:"60px"}},f["default"].createElement("td",{style:n},"Server-Selected Rev: "),f["default"].createElement("td",{style:n},f["default"].createElement("div",{style:{lineHeight:"36px",height:"36px",width:"337px",color:"#000",backgroundColor:"#ffbbbb"}},f["default"].createElement("b",{style:{paddingLeft:"10px"}},t.winner))),f["default"].createElement("td",null,f["default"].createElement(M,{onClick:this.onSelectAsWinnerClick.bind(this,this.props.ours),style:{marginRight:"10px",width:"220px"},text:"Delete Other Conflicts",buttonType:"btn-info",customIcon:"icon-trophy"}))),f["default"].createElement("tr",{style:{height:"60px"}},f["default"].createElement("td",{style:n},"Conflicting Revisions: "),f["default"].createElement("td",{style:n},f["default"].createElement(j,{onRevisionClick:this.onRevisionClick.bind(this),onForwardClick:this.onForwardClick.bind(this),onBackwardClick:this.onBackwardClick.bind(this),options:this.props.dropdownData,selected:this.props.theirs._rev})),f["default"].createElement("td",null,f["default"].createElement(M,{"data-id":"button-select-theirs",onClick:this.onSelectAsWinnerClick.bind(this,this.props.theirs),style:{marginRight:"10px",width:"220px"},text:"Select as Winner",buttonType:"btn-info",customIcon:"icon-trophy"}))))))}}]),t}(f["default"].Component);$.propTypes={tree:f["default"].PropTypes.object.isRequired,ours:f["default"].PropTypes.object.isRequired,conflictingRevs:f["default"].PropTypes.array.isRequired};var V=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state=n.getStoreState(),n}return a(t,e),s(t,[{key:"getStoreState",value:function(){return{show:F.getShowConfirmModal(),docToWin:F.getDocToWin(),checked:!1}}},{key:"componentDidMount",value:function(){F.on("change",this.onChange,this)}},{key:"componentWillUnmount",value:function(){F.off("change",this.onChange)}},{key:"onChange",value:function(){this.setState(this.getStoreState())}},{key:"close",value:function(){m["default"].showConfirmModal(!1,null)}},{key:"onDeleteConflicts",value:function(){var e=this.state.checked;this.props.onConfirm(this.state.docToWin,e)}},{key:"render",value:function(){var e=this;return f["default"].createElement(x.Modal,{dialogClassName:"delete-conflicts-modal",show:this.state.show,onHide:this.close},f["default"].createElement(x.Modal.Header,{closeButton:!1},f["default"].createElement(x.Modal.Title,null,"Solve Conflicts")),f["default"].createElement(x.Modal.Body,null,f["default"].createElement("p",null,f["default"].createElement("i",{className:"icon-warning-sign"})," Do you want to delete all conflicting revisions for this document?")),f["default"].createElement(x.Modal.Footer,null,f["default"].createElement("div",{style:{"float":"left",marginTop:"10px"}},f["default"].createElement("label",null,f["default"].createElement("input",{style:{margin:"0 5px 3px 0"},onChange:function(){e.setState({checked:!e.state.checked})},type:"checkbox"}),"Do not show this warning message again")),f["default"].createElement("a",{style:{marginRight:"10px",cursor:"pointer"},onClick:this.close,"data-bypass":"true"},"Cancel"),f["default"].createElement(M,{onClick:this.onDeleteConflicts.bind(this),text:"Delete Revisions",buttonType:"btn-danger"})))}}]),t}(f["default"].Component);V.propTypes={onConfirm:f["default"].PropTypes.func.isRequired};var U=function(e){var t=e.onClick,n=e.forward,r=(e.backward,n?"fonticon-right-open":"fonticon-left-open"),i={height:"20px",width:"11px",marginTop:"7px"};return f["default"].createElement("div",{style:i,className:r,onClick:t})};U.propTypes={onClick:f["default"].PropTypes.func.isRequired},t["default"]={DiffyController:I}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(99),o=r(i),a=n(734),s=r(a),l={};l.RevBrowserStore=o["default"].Store.extend({initialize:function(){this.reset()},reset:function(){this._revTree=null,this._ours=null,this._theirs=null,this._dropDownData=null,this._isDiffViewEnabled=!0,this._databaseName=null,this._showConfirmModal=!1,this._docToWin=null},prepareDropdownData:function(e){return e.map(function(e){return{value:e,label:e}})},getRevTree:function(){return this._revTree},getDatabaseName:function(){return this._databaseName},getOurs:function(){return this._ours},getTheirs:function(){return this._theirs},getConflictingRevs:function(){return this._conflictingRevs},getDropdownData:function(){return this._dropDownData},getIsDiffViewEnabled:function(){return this._isDiffViewEnabled},getShowConfirmModal:function(){return this._showConfirmModal},getDocToWin:function(){return this._docToWin},dispatch:function(e){switch(e.type){case s["default"].REV_BROWSER_REV_TREE_LOADED:this._revTree=e.options.tree,this._ours=e.options.doc,this._conflictingRevs=e.options.conflictingRevs,this._theirs=e.options.conflictDoc,this._dropDownData=this.prepareDropdownData(this._conflictingRevs),this._databaseName=e.options.databaseName;break;case s["default"].REV_BROWSER_DIFF_DOCS_READY:this._theirs=e.options.theirs;break;case s["default"].REV_BROWSER_DIFF_ENABLE_DIFF_VIEW:this._isDiffViewEnabled=e.options.enableDiff;break;case s["default"].REV_BROWSER_SHOW_CONFIRM_MODAL:this._showConfirmModal=e.options.show,this._docToWin=e.options.docToWin;break;default:return}this.triggerChange()}}),l.revBrowserStore=new l.RevBrowserStore,l.revBrowserStore.dispatchToken=o["default"].dispatcher.register(l.revBrowserStore.dispatch),t["default"]=l},function(e,t,n){var r=n(757),i=n(758).DiffPatcher;t.DiffPatcher=i,t.create=function(e){return new i(e)},t.dateReviver=n(763);var o;if(t.diff=function(){return o||(o=new i),o.diff.apply(o,arguments)},t.patch=function(){return o||(o=new i),o.patch.apply(o,arguments)},t.unpatch=function(){return o||(o=new i),o.unpatch.apply(o,arguments)},t.reverse=function(){return o||(o=new i),o.reverse.apply(o,arguments)},r.isBrowser)t.homepage="{{package-homepage}}",t.version="{{package-version}}";else{var a="../package.json",s=n(774)(a);t.homepage=s.homepage,t.version=s.version;var l="./formatters",u=n(774)(l);t.formatters=u,t.console=u.console}},function(e,t){t.isBrowser="undefined"!=typeof window},function(e,t,n){var r=n(759).Processor,i=n(760).Pipe,o=n(761).DiffContext,a=n(764).PatchContext,s=n(765).ReverseContext,l=n(766),u=n(767),c=n(768),d=n(770),f=n(771),p=function(e){this.processor=new r(e),this.processor.pipe(new i("diff").append(u.collectChildrenDiffFilter,l.diffFilter,d.diffFilter,f.diffFilter,u.objectsDiffFilter,c.diffFilter).shouldHaveResult()),this.processor.pipe(new i("patch").append(u.collectChildrenPatchFilter,c.collectChildrenPatchFilter,l.patchFilter,f.patchFilter,u.patchFilter,c.patchFilter).shouldHaveResult()),this.processor.pipe(new i("reverse").append(u.collectChildrenReverseFilter,c.collectChildrenReverseFilter,l.reverseFilter,f.reverseFilter,u.reverseFilter,c.reverseFilter).shouldHaveResult())};p.prototype.options=function(){return this.processor.options.apply(this.processor,arguments)},p.prototype.diff=function(e,t){return this.processor.process(new o(e,t))},p.prototype.patch=function(e,t){return this.processor.process(new a(e,t))},p.prototype.reverse=function(e){return this.processor.process(new s(e));
},p.prototype.unpatch=function(e,t){return this.patch(e,this.reverse(t))},t.DiffPatcher=p},function(e,t){var n=function(e){this.selfOptions=e||{},this.pipes={}};n.prototype.options=function(e){return e&&(this.selfOptions=e),this.selfOptions},n.prototype.pipe=function(e,t){if("string"==typeof e){if("undefined"==typeof t)return this.pipes[e];this.pipes[e]=t}if(e&&e.name){if(t=e,t.processor===this)return t;this.pipes[t.name]=t}return t.processor=this,t},n.prototype.process=function(e,t){var n=e;n.options=this.options();for(var r,i,o=t||e.pipe||"default";o;)"undefined"!=typeof n.nextAfterChildren&&(n.next=n.nextAfterChildren,n.nextAfterChildren=null),"string"==typeof o&&(o=this.pipe(o)),o.process(n),i=n,r=o,o=null,n&&n.next&&(n=n.next,o=i.nextPipe||n.pipe||r);return n.hasResult?n.result:void 0},t.Processor=n},function(e,t){var n=function(e){this.name=e,this.filters=[]};n.prototype.process=function(e){if(!this.processor)throw new Error("add this pipe to a processor before using it");for(var t=this.debug,n=this.filters.length,r=e,i=0;i<n;i++){var o=this.filters[i];if(t&&this.log("filter: "+o.filterName),o(r),"object"==typeof r&&r.exiting){r.exiting=!1;break}}!r.next&&this.resultCheck&&this.resultCheck(r)},n.prototype.log=function(e){console.log("[jsondiffpatch] "+this.name+" pipe, "+e)},n.prototype.append=function(){return this.filters.push.apply(this.filters,arguments),this},n.prototype.prepend=function(){return this.filters.unshift.apply(this.filters,arguments),this},n.prototype.indexOf=function(e){if(!e)throw new Error("a filter name is required");for(var t=0;t<this.filters.length;t++){var n=this.filters[t];if(n.filterName===e)return t}throw new Error("filter not found: "+e)},n.prototype.list=function(){for(var e=[],t=0;t<this.filters.length;t++){var n=this.filters[t];e.push(n.filterName)}return e},n.prototype.after=function(e){var t=this.indexOf(e),n=Array.prototype.slice.call(arguments,1);if(!n.length)throw new Error("a filter is required");return n.unshift(t+1,0),Array.prototype.splice.apply(this.filters,n),this},n.prototype.before=function(e){var t=this.indexOf(e),n=Array.prototype.slice.call(arguments,1);if(!n.length)throw new Error("a filter is required");return n.unshift(t,0),Array.prototype.splice.apply(this.filters,n),this},n.prototype.clear=function(){return this.filters.length=0,this},n.prototype.shouldHaveResult=function(e){if(e===!1)return void(this.resultCheck=null);if(!this.resultCheck){var t=this;return this.resultCheck=function(e){if(!e.hasResult){console.log(e);var n=new Error(t.name+" failed");throw n.noResult=!0,n}},this}},t.Pipe=n},function(e,t,n){var r=n(762).Context,i=n(763),o=function(e,t){this.left=e,this.right=t,this.pipe="diff"};o.prototype=new r,o.prototype.setResult=function(e){if(this.options.cloneDiffValues){var t="function"==typeof this.options.cloneDiffValues?this.options.cloneDiffValues:function(e){return JSON.parse(JSON.stringify(e),i)};"object"==typeof e[0]&&(e[0]=t(e[0])),"object"==typeof e[1]&&(e[1]=t(e[1]))}return r.prototype.setResult.apply(this,arguments)},t.DiffContext=o},function(e,t,n){var r=n(760).Pipe,i=function(){};i.prototype.setResult=function(e){return this.result=e,this.hasResult=!0,this},i.prototype.exit=function(){return this.exiting=!0,this},i.prototype.switchTo=function(e,t){return"string"==typeof e||e instanceof r?this.nextPipe=e:(this.next=e,t&&(this.nextPipe=t)),this},i.prototype.push=function(e,t){return e.parent=this,"undefined"!=typeof t&&(e.childName=t),e.root=this.root||this,e.options=e.options||this.options,this.children?(this.children[this.children.length-1].next=e,this.children.push(e)):(this.children=[e],this.nextAfterChildren=this.next||null,this.next=e),e.next=this,this},t.Context=i},function(e,t){e.exports=function(e,t){var n;return"string"==typeof t&&(n=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d*))?(Z|([+\-])(\d{2}):(\d{2}))$/.exec(t))?new Date(Date.UTC(+n[1],+n[2]-1,+n[3],+n[4],+n[5],+n[6],+(n[7]||0))):t}},function(e,t,n){var r=n(762).Context,i=function(e,t){this.left=e,this.delta=t,this.pipe="patch"};i.prototype=new r,t.PatchContext=i},function(e,t,n){var r=n(762).Context,i=function(e){this.delta=e,this.pipe="reverse"};i.prototype=new r,t.ReverseContext=i},function(e,t){var n="function"==typeof Array.isArray?Array.isArray:function(e){return e instanceof Array},r=function(e){if(e.left===e.right)return void e.setResult(void 0).exit();if("undefined"==typeof e.left){if("function"==typeof e.right)throw new Error("functions are not supported");return void e.setResult([e.right]).exit()}if("undefined"==typeof e.right)return void e.setResult([e.left,0,0]).exit();if("function"==typeof e.left||"function"==typeof e.right)throw new Error("functions are not supported");return e.leftType=null===e.left?"null":typeof e.left,e.rightType=null===e.right?"null":typeof e.right,e.leftType!==e.rightType?void e.setResult([e.left,e.right]).exit():"boolean"===e.leftType||"number"===e.leftType?void e.setResult([e.left,e.right]).exit():("object"===e.leftType&&(e.leftIsArray=n(e.left)),"object"===e.rightType&&(e.rightIsArray=n(e.right)),e.leftIsArray!==e.rightIsArray?void e.setResult([e.left,e.right]).exit():void 0)};r.filterName="trivial";var i=function(e){return"undefined"==typeof e.delta?void e.setResult(e.left).exit():(e.nested=!n(e.delta),e.nested?void 0:1===e.delta.length?void e.setResult(e.delta[0]).exit():2===e.delta.length?void e.setResult(e.delta[1]).exit():3===e.delta.length&&0===e.delta[2]?void e.setResult(void 0).exit():void 0)};i.filterName="trivial";var o=function(e){return"undefined"==typeof e.delta?void e.setResult(e.delta).exit():(e.nested=!n(e.delta),e.nested?void 0:1===e.delta.length?void e.setResult([e.delta[0],0,0]).exit():2===e.delta.length?void e.setResult([e.delta[1],e.delta[0]]).exit():3===e.delta.length&&0===e.delta[2]?void e.setResult([e.delta[0]]).exit():void 0)};o.filterName="trivial",t.diffFilter=r,t.patchFilter=i,t.reverseFilter=o},function(e,t,n){var r=n(761).DiffContext,i=n(764).PatchContext,o=n(765).ReverseContext,a=function(e){if(e&&e.children){for(var t,n=e.children.length,r=e.result,i=0;i<n;i++)t=e.children[i],"undefined"!=typeof t.result&&(r=r||{},r[t.childName]=t.result);r&&e.leftIsArray&&(r._t="a"),e.setResult(r).exit()}};a.filterName="collectChildren";var s=function(e){if(!e.leftIsArray&&"object"===e.leftType){var t,n,i=e.options.propertyFilter;for(t in e.left)Object.prototype.hasOwnProperty.call(e.left,t)&&(i&&!i(t,e)||(n=new r(e.left[t],e.right[t]),e.push(n,t)));for(t in e.right)Object.prototype.hasOwnProperty.call(e.right,t)&&(i&&!i(t,e)||"undefined"==typeof e.left[t]&&(n=new r((void 0),e.right[t]),e.push(n,t)));return e.children&&0!==e.children.length?void e.exit():void e.setResult(void 0).exit()}};s.filterName="objects";var l=function(e){if(e.nested&&!e.delta._t){var t,n;for(t in e.delta)n=new i(e.left[t],e.delta[t]),e.push(n,t);e.exit()}};l.filterName="objects";var u=function(e){if(e&&e.children&&!e.delta._t){for(var t,n=e.children.length,r=0;r<n;r++)t=e.children[r],Object.prototype.hasOwnProperty.call(e.left,t.childName)&&void 0===t.result?delete e.left[t.childName]:e.left[t.childName]!==t.result&&(e.left[t.childName]=t.result);e.setResult(e.left).exit()}};u.filterName="collectChildren";var c=function(e){if(e.nested&&!e.delta._t){var t,n;for(t in e.delta)n=new o(e.delta[t]),e.push(n,t);e.exit()}};c.filterName="objects";var d=function(e){if(e&&e.children&&!e.delta._t){for(var t,n=e.children.length,r={},i=0;i<n;i++)t=e.children[i],r[t.childName]!==t.result&&(r[t.childName]=t.result);e.setResult(r).exit()}};d.filterName="collectChildren",t.collectChildrenDiffFilter=a,t.objectsDiffFilter=s,t.patchFilter=l,t.collectChildrenPatchFilter=u,t.reverseFilter=c,t.collectChildrenReverseFilter=d},function(e,t,n){function r(e,t,n,r){for(var i=0;i<n;i++)for(var o=e[i],a=0;a<r;a++){var s=t[a];if(o===s)return!0}}function i(e,t,n,r,i){var o=e[n],a=t[r];if(o===a)return!0;if("object"!=typeof o||"object"!=typeof a)return!1;var s=i.objectHash;if(!s)return i.matchByPosition&&n===r;var l,u;return"number"==typeof n?(i.hashCache1=i.hashCache1||[],l=i.hashCache1[n],"undefined"==typeof l&&(i.hashCache1[n]=l=s(o,n))):l=s(o),"undefined"!=typeof l&&("number"==typeof r?(i.hashCache2=i.hashCache2||[],u=i.hashCache2[r],"undefined"==typeof u&&(i.hashCache2[r]=u=s(a,r))):u=s(a),"undefined"!=typeof u&&l===u)}var o=n(761).DiffContext,a=n(764).PatchContext,s=n(765).ReverseContext,l=n(769),u=3,c="function"==typeof Array.isArray?Array.isArray:function(e){return e instanceof Array},d="function"==typeof Array.prototype.indexOf?function(e,t){return e.indexOf(t)}:function(e,t){for(var n=e.length,r=0;r<n;r++)if(e[r]===t)return r;return-1},f=function(e){if(e.leftIsArray){var t,n,a,s,c={objectHash:e.options&&e.options.objectHash,matchByPosition:e.options&&e.options.matchByPosition},f=0,p=0,h=e.left,g=e.right,m=h.length,v=g.length;for(m>0&&v>0&&!c.objectHash&&"boolean"!=typeof c.matchByPosition&&(c.matchByPosition=!r(h,g,m,v));f<m&&f<v&&i(h,g,f,f,c);)t=f,s=new o(e.left[t],e.right[t]),e.push(s,t),f++;for(;p+f<m&&p+f<v&&i(h,g,m-1-p,v-1-p,c);)n=m-1-p,a=v-1-p,s=new o(e.left[n],e.right[a]),e.push(s,a),p++;var b;if(f+p===m){if(m===v)return void e.setResult(void 0).exit();for(b=b||{_t:"a"},t=f;t<v-p;t++)b[t]=[g[t]];return void e.setResult(b).exit()}if(f+p===v){for(b=b||{_t:"a"},t=f;t<m-p;t++)b["_"+t]=[h[t],0,0];return void e.setResult(b).exit()}delete c.hashCache1,delete c.hashCache2;var y=h.slice(f,m-p),w=g.slice(f,v-p),x=l.get(y,w,i,c),_=[];for(b=b||{_t:"a"},t=f;t<m-p;t++)d(x.indices1,t-f)<0&&(b["_"+t]=[h[t],0,0],_.push(t));var E=!0;e.options&&e.options.arrays&&e.options.arrays.detectMove===!1&&(E=!1);var C=!1;e.options&&e.options.arrays&&e.options.arrays.includeValueOnMove&&(C=!0);var k=_.length;for(t=f;t<v-p;t++){var S=d(x.indices2,t-f);if(S<0){var A=!1;if(E&&k>0)for(var T=0;T<k;T++)if(n=_[T],i(y,w,n-f,t-f,c)){b["_"+n].splice(1,2,t,u),C||(b["_"+n][0]=""),a=t,s=new o(e.left[n],e.right[a]),e.push(s,a),_.splice(T,1),A=!0;break}A||(b[t]=[g[t]])}else n=x.indices1[S]+f,a=x.indices2[S]+f,s=new o(e.left[n],e.right[a]),e.push(s,a)}e.setResult(b).exit()}};f.filterName="arrays";var p={numerically:function(e,t){return e-t},numericallyBy:function(e){return function(t,n){return t[e]-n[e]}}},h=function(e){if(e.nested&&"a"===e.delta._t){var t,n,r=e.delta,i=e.left,o=[],s=[],l=[];for(t in r)if("_t"!==t)if("_"===t[0]){if(0!==r[t][2]&&r[t][2]!==u)throw new Error("only removal or move can be applied at original array indices, invalid diff type: "+r[t][2]);o.push(parseInt(t.slice(1),10))}else 1===r[t].length?s.push({index:parseInt(t,10),value:r[t][0]}):l.push({index:parseInt(t,10),delta:r[t]});for(o=o.sort(p.numerically),t=o.length-1;t>=0;t--){n=o[t];var c=r["_"+n],d=i.splice(n,1)[0];c[2]===u&&s.push({index:c[1],value:d})}s=s.sort(p.numericallyBy("index"));var f=s.length;for(t=0;t<f;t++){var h=s[t];i.splice(h.index,0,h.value)}var g,m=l.length;if(m>0)for(t=0;t<m;t++){var v=l[t];g=new a(e.left[v.index],v.delta),e.push(g,v.index)}return e.children?void e.exit():void e.setResult(e.left).exit()}};h.filterName="arrays";var g=function(e){if(e&&e.children&&"a"===e.delta._t){for(var t,n=e.children.length,r=0;r<n;r++)t=e.children[r],e.left[t.childName]=t.result;e.setResult(e.left).exit()}};g.filterName="arraysCollectChildren";var m=function(e){if(!e.nested)return void(e.delta[2]===u&&(e.newName="_"+e.delta[1],e.setResult([e.delta[0],parseInt(e.childName.substr(1),10),u]).exit()));if("a"===e.delta._t){var t,n;for(t in e.delta)"_t"!==t&&(n=new s(e.delta[t]),e.push(n,t));e.exit()}};m.filterName="arrays";var v=function(e,t,n){if("string"==typeof t&&"_"===t[0])return parseInt(t.substr(1),10);if(c(n)&&0===n[2])return"_"+t;var r=+t;for(var i in e){var o=e[i];if(c(o))if(o[2]===u){var a=parseInt(i.substr(1),10),s=o[1];if(s===+t)return a;a<=r&&s>r?r++:a>=r&&s<r&&r--}else if(0===o[2]){var l=parseInt(i.substr(1),10);l<=r&&r++}else 1===o.length&&i<=r&&r--}return r},b=function(e){if(e&&e.children&&"a"===e.delta._t){for(var t,n=e.children.length,r={_t:"a"},i=0;i<n;i++){t=e.children[i];var o=t.newName;"undefined"==typeof o&&(o=v(e.delta,t.childName,t.result)),r[o]!==t.result&&(r[o]=t.result)}e.setResult(r).exit()}};b.filterName="arraysCollectChildren",t.diffFilter=f,t.patchFilter=h,t.collectChildrenPatchFilter=g,t.reverseFilter=m,t.collectChildrenReverseFilter=b},function(e,t){var n=function(e,t,n,r){return e[n]===t[r]},r=function(e,t,n,r){var i,o,a=e.length,s=t.length,l=[a+1];for(i=0;i<a+1;i++)for(l[i]=[s+1],o=0;o<s+1;o++)l[i][o]=0;for(l.match=n,i=1;i<a+1;i++)for(o=1;o<s+1;o++)n(e,t,i-1,o-1,r)?l[i][o]=l[i-1][o-1]+1:l[i][o]=Math.max(l[i-1][o],l[i][o-1]);return l},i=function(e,t,n,r,o,a){if(0===r||0===o)return{sequence:[],indices1:[],indices2:[]};if(e.match(t,n,r-1,o-1,a)){var s=i(e,t,n,r-1,o-1,a);return s.sequence.push(t[r-1]),s.indices1.push(r-1),s.indices2.push(o-1),s}return e[r][o-1]>e[r-1][o]?i(e,t,n,r,o-1,a):i(e,t,n,r-1,o,a)},o=function(e,t,o,a){a=a||{};var s=r(e,t,o||n,a),l=i(s,e,t,e.length,t.length,a);return"string"==typeof e&&"string"==typeof t&&(l.sequence=l.sequence.join("")),l};t.get=o},function(e,t){var n=function(e){e.left instanceof Date?(e.right instanceof Date?e.left.getTime()!==e.right.getTime()?e.setResult([e.left,e.right]):e.setResult(void 0):e.setResult([e.left,e.right]),e.exit()):e.right instanceof Date&&e.setResult([e.left,e.right]).exit()};n.filterName="dates",t.diffFilter=n},function(e,t,n){var r=2,i=60,o=null,a=function(e){if(!o){var t;if("undefined"!=typeof diff_match_patch)t="function"==typeof diff_match_patch?new diff_match_patch:new diff_match_patch.diff_match_patch;else try{var r="diff_match_patch_uncompressed",i=n(772)("./"+r);t=new i.diff_match_patch}catch(a){t=null}if(!t){if(!e)return null;var s=new Error("text diff_match_patch library not found");throw s.diff_match_patch_not_found=!0,s}o={diff:function(e,n){return t.patch_toText(t.patch_make(e,n))},patch:function(e,n){for(var r=t.patch_apply(t.patch_fromText(n),e),i=0;i<r[1].length;i++)if(!r[1][i]){var o=new Error("text patch failed");o.textPatchFailed=!0}return r[0]}}}return o},s=function(e){if("string"===e.leftType){var t=e.options&&e.options.textDiff&&e.options.textDiff.minLength||i;if(e.left.length<t||e.right.length<t)return void e.setResult([e.left,e.right]).exit();var n=a();if(!n)return void e.setResult([e.left,e.right]).exit();var o=n.diff;e.setResult([o(e.left,e.right),0,r]).exit()}};s.filterName="texts";var l=function(e){if(!e.nested&&e.delta[2]===r){var t=a(!0).patch;e.setResult(t(e.left,e.delta[0])).exit()}};l.filterName="texts";var u=function(e){var t,n,r,i,o,a,s,l,u=null,c=/^@@ +\-(\d+),(\d+) +\+(\d+),(\d+) +@@$/;for(r=e.split("\n"),t=0,n=r.length;t<n;t++){i=r[t];var d=i.slice(0,1);"@"===d?(u=c.exec(i),a=t,s=null,l=null,r[a]="@@ -"+u[3]+","+u[4]+" +"+u[1]+","+u[2]+" @@"):"+"===d?(s=t,r[t]="-"+r[t].slice(1),"+"===r[t-1].slice(0,1)&&(o=r[t],r[t]=r[t-1],r[t-1]=o)):"-"===d&&(l=t,r[t]="+"+r[t].slice(1))}return r.join("\n")},c=function(e){e.nested||e.delta[2]===r&&e.setResult([u(e.delta[0]),0,r]).exit()};c.filterName="texts",t.diffFilter=s,t.patchFilter=l,t.reverseFilter=c},function(e,t,n){function r(e){return n(i(e))}function i(e){return o[e]||function(){throw new Error("Cannot find module '"+e+"'.")}()}var o={"./diff_match_patch_uncompressed":773,"./diff_match_patch_uncompressed.js":773};r.keys=function(){return Object.keys(o)},r.resolve=i,e.exports=r,r.id=772},function(e,t){function n(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32}var r=-1,i=1,o=0;n.Diff,n.prototype.diff_main=function(e,t,n,r){"undefined"==typeof r&&(r=this.Diff_Timeout<=0?Number.MAX_VALUE:(new Date).getTime()+1e3*this.Diff_Timeout);var i=r;if(null==e||null==t)throw new Error("Null input. (diff_main)");if(e==t)return e?[[o,e]]:[];"undefined"==typeof n&&(n=!0);var a=n,s=this.diff_commonPrefix(e,t),l=e.substring(0,s);e=e.substring(s),t=t.substring(s),s=this.diff_commonSuffix(e,t);var u=e.substring(e.length-s);e=e.substring(0,e.length-s),t=t.substring(0,t.length-s);var c=this.diff_compute_(e,t,a,i);return l&&c.unshift([o,l]),u&&c.push([o,u]),this.diff_cleanupMerge(c),c},n.prototype.diff_compute_=function(e,t,n,a){var s;if(!e)return[[i,t]];if(!t)return[[r,e]];var l=e.length>t.length?e:t,u=e.length>t.length?t:e,c=l.indexOf(u);if(c!=-1)return s=[[i,l.substring(0,c)],[o,u],[i,l.substring(c+u.length)]],e.length>t.length&&(s[0][0]=s[2][0]=r),s;if(1==u.length)return[[r,e],[i,t]];l=u=null;var d=this.diff_halfMatch_(e,t);if(d){var f=d[0],p=d[1],h=d[2],g=d[3],m=d[4],v=this.diff_main(f,h,n,a),b=this.diff_main(p,g,n,a);return v.concat([[o,m]],b)}return n&&e.length>100&&t.length>100?this.diff_lineMode_(e,t,a):this.diff_bisect_(e,t,a)},n.prototype.diff_lineMode_=function(e,t,n){var a=this.diff_linesToChars_(e,t);e=a[0],t=a[1];var s=a[2],l=this.diff_bisect_(e,t,n);this.diff_charsToLines_(l,s),this.diff_cleanupSemantic(l),l.push([o,""]);for(var u=0,c=0,d=0,f="",p="";u<l.length;){switch(l[u][0]){case i:d++,p+=l[u][1];break;case r:c++,f+=l[u][1];break;case o:if(c>=1&&d>=1){var a=this.diff_main(f,p,!1,n);l.splice(u-c-d,c+d),u=u-c-d;for(var h=a.length-1;h>=0;h--)l.splice(u,0,a[h]);u+=a.length}d=0,c=0,f="",p=""}u++}return l.pop(),l},n.prototype.diff_bisect_=function(e,t,n){for(var o=e.length,a=t.length,s=Math.ceil((o+a)/2),l=s,u=2*s,c=new Array(u),d=new Array(u),f=0;f<u;f++)c[f]=-1,d[f]=-1;c[l+1]=0,d[l+1]=0;for(var p=o-a,h=p%2!=0,g=0,m=0,v=0,b=0,y=0;y<s&&!((new Date).getTime()>n);y++){for(var w=-y+g;w<=y-m;w+=2){var x,_=l+w;x=w==-y||w!=y&&c[_-1]<c[_+1]?c[_+1]:c[_-1]+1;for(var E=x-w;x<o&&E<a&&e.charAt(x)==t.charAt(E);)x++,E++;if(c[_]=x,x>o)m+=2;else if(E>a)g+=2;else if(h){var C=l+p-w;if(C>=0&&C<u&&d[C]!=-1){var k=o-d[C];if(x>=k)return this.diff_bisectSplit_(e,t,x,E,n)}}}for(var S=-y+v;S<=y-b;S+=2){var k,C=l+S;k=S==-y||S!=y&&d[C-1]<d[C+1]?d[C+1]:d[C-1]+1;for(var A=k-S;k<o&&A<a&&e.charAt(o-k-1)==t.charAt(a-A-1);)k++,A++;if(d[C]=k,k>o)b+=2;else if(A>a)v+=2;else if(!h){var _=l+p-S;if(_>=0&&_<u&&c[_]!=-1){var x=c[_],E=l+x-_;if(k=o-k,x>=k)return this.diff_bisectSplit_(e,t,x,E,n)}}}}return[[r,e],[i,t]]},n.prototype.diff_bisectSplit_=function(e,t,n,r,i){var o=e.substring(0,n),a=t.substring(0,r),s=e.substring(n),l=t.substring(r),u=this.diff_main(o,a,!1,i),c=this.diff_main(s,l,!1,i);return u.concat(c)},n.prototype.diff_linesToChars_=function(e,t){function n(e){for(var t="",n=0,o=-1,a=r.length;o<e.length-1;){o=e.indexOf("\n",n),o==-1&&(o=e.length-1);var s=e.substring(n,o+1);n=o+1,(i.hasOwnProperty?i.hasOwnProperty(s):void 0!==i[s])?t+=String.fromCharCode(i[s]):(t+=String.fromCharCode(a),i[s]=a,r[a++]=s)}return t}var r=[],i={};r[0]="";var o=n(e),a=n(t);return[o,a,r]},n.prototype.diff_charsToLines_=function(e,t){for(var n=0;n<e.length;n++){for(var r=e[n][1],i=[],o=0;o<r.length;o++)i[o]=t[r.charCodeAt(o)];e[n][1]=i.join("")}},n.prototype.diff_commonPrefix=function(e,t){if(!e||!t||e.charAt(0)!=t.charAt(0))return 0;for(var n=0,r=Math.min(e.length,t.length),i=r,o=0;n<i;)e.substring(o,i)==t.substring(o,i)?(n=i,o=n):r=i,i=Math.floor((r-n)/2+n);return i},n.prototype.diff_commonSuffix=function(e,t){if(!e||!t||e.charAt(e.length-1)!=t.charAt(t.length-1))return 0;for(var n=0,r=Math.min(e.length,t.length),i=r,o=0;n<i;)e.substring(e.length-i,e.length-o)==t.substring(t.length-i,t.length-o)?(n=i,o=n):r=i,i=Math.floor((r-n)/2+n);return i},n.prototype.diff_commonOverlap_=function(e,t){var n=e.length,r=t.length;if(0==n||0==r)return 0;n>r?e=e.substring(n-r):n<r&&(t=t.substring(0,n));var i=Math.min(n,r);if(e==t)return i;for(var o=0,a=1;;){var s=e.substring(i-a),l=t.indexOf(s);if(l==-1)return o;a+=l,0!=l&&e.substring(i-a)!=t.substring(0,a)||(o=a,a++)}},n.prototype.diff_halfMatch_=function(e,t){function n(e,t,n){for(var r,i,o,s,l=e.substring(n,n+Math.floor(e.length/4)),u=-1,c="";(u=t.indexOf(l,u+1))!=-1;){var d=a.diff_commonPrefix(e.substring(n),t.substring(u)),f=a.diff_commonSuffix(e.substring(0,n),t.substring(0,u));c.length<f+d&&(c=t.substring(u-f,u)+t.substring(u,u+d),r=e.substring(0,n-f),i=e.substring(n+d),o=t.substring(0,u-f),s=t.substring(u+d))}return 2*c.length>=e.length?[r,i,o,s,c]:null}if(this.Diff_Timeout<=0)return null;var r=e.length>t.length?e:t,i=e.length>t.length?t:e;if(r.length<4||2*i.length<r.length)return null;var o,a=this,s=n(r,i,Math.ceil(r.length/4)),l=n(r,i,Math.ceil(r.length/2));if(!s&&!l)return null;o=l?s&&s[4].length>l[4].length?s:l:s;var u,c,d,f;e.length>t.length?(u=o[0],c=o[1],d=o[2],f=o[3]):(d=o[0],f=o[1],u=o[2],c=o[3]);var p=o[4];return[u,c,d,f,p]},n.prototype.diff_cleanupSemantic=function(e){for(var t=!1,n=[],a=0,s=null,l=0,u=0,c=0,d=0,f=0;l<e.length;)e[l][0]==o?(n[a++]=l,u=d,c=f,d=0,f=0,s=e[l][1]):(e[l][0]==i?d+=e[l][1].length:f+=e[l][1].length,null!==s&&s.length<=Math.max(u,c)&&s.length<=Math.max(d,f)&&(e.splice(n[a-1],0,[r,s]),e[n[a-1]+1][0]=i,a--,a--,l=a>0?n[a-1]:-1,u=0,c=0,d=0,f=0,s=null,t=!0)),l++;for(t&&this.diff_cleanupMerge(e),this.diff_cleanupSemanticLossless(e),l=1;l<e.length;){if(e[l-1][0]==r&&e[l][0]==i){var p=e[l-1][1],h=e[l][1],g=this.diff_commonOverlap_(p,h);(g>=p.length/2||g>=h.length/2)&&(e.splice(l,0,[o,h.substring(0,g)]),e[l-1][1]=p.substring(0,p.length-g),e[l+1][1]=h.substring(g),l++),l++}l++}},n.prototype.diff_cleanupSemanticLossless=function(e){function t(e,t){if(!e||!t)return 5;var o=0;return(e.charAt(e.length-1).match(n)||t.charAt(0).match(n))&&(o++,(e.charAt(e.length-1).match(r)||t.charAt(0).match(r))&&(o++,(e.charAt(e.length-1).match(i)||t.charAt(0).match(i))&&(o++,(e.match(a)||t.match(s))&&o++))),o}for(var n=/[^a-zA-Z0-9]/,r=/\s/,i=/[\r\n]/,a=/\n\r?\n$/,s=/^\r?\n\r?\n/,l=1;l<e.length-1;){if(e[l-1][0]==o&&e[l+1][0]==o){var u=e[l-1][1],c=e[l][1],d=e[l+1][1],f=this.diff_commonSuffix(u,c);if(f){var p=c.substring(c.length-f);u=u.substring(0,u.length-f),c=p+c.substring(0,c.length-f),d=p+d}for(var h=u,g=c,m=d,v=t(u,c)+t(c,d);c.charAt(0)===d.charAt(0);){u+=c.charAt(0),c=c.substring(1)+d.charAt(0),d=d.substring(1);var b=t(u,c)+t(c,d);b>=v&&(v=b,h=u,g=c,m=d)}e[l-1][1]!=h&&(h?e[l-1][1]=h:(e.splice(l-1,1),l--),e[l][1]=g,m?e[l+1][1]=m:(e.splice(l+1,1),l--))}l++}},n.prototype.diff_cleanupEfficiency=function(e){for(var t=!1,n=[],a=0,s="",l=0,u=!1,c=!1,d=!1,f=!1;l<e.length;)e[l][0]==o?(e[l][1].length<this.Diff_EditCost&&(d||f)?(n[a++]=l,u=d,c=f,s=e[l][1]):(a=0,s=""),d=f=!1):(e[l][0]==r?f=!0:d=!0,s&&(u&&c&&d&&f||s.length<this.Diff_EditCost/2&&u+c+d+f==3)&&(e.splice(n[a-1],0,[r,s]),e[n[a-1]+1][0]=i,a--,s="",u&&c?(d=f=!0,a=0):(a--,l=a>0?n[a-1]:-1,d=f=!1),t=!0)),l++;t&&this.diff_cleanupMerge(e)},n.prototype.diff_cleanupMerge=function(e){e.push([o,""]);for(var t,n=0,a=0,s=0,l="",u="";n<e.length;)switch(e[n][0]){case i:s++,u+=e[n][1],n++;break;case r:a++,l+=e[n][1],n++;break;case o:a+s>1?(0!==a&&0!==s&&(t=this.diff_commonPrefix(u,l),0!==t&&(n-a-s>0&&e[n-a-s-1][0]==o?e[n-a-s-1][1]+=u.substring(0,t):(e.splice(0,0,[o,u.substring(0,t)]),n++),u=u.substring(t),l=l.substring(t)),t=this.diff_commonSuffix(u,l),0!==t&&(e[n][1]=u.substring(u.length-t)+e[n][1],u=u.substring(0,u.length-t),l=l.substring(0,l.length-t))),0===a?e.splice(n-a-s,a+s,[i,u]):0===s?e.splice(n-a-s,a+s,[r,l]):e.splice(n-a-s,a+s,[r,l],[i,u]),n=n-a-s+(a?1:0)+(s?1:0)+1):0!==n&&e[n-1][0]==o?(e[n-1][1]+=e[n][1],e.splice(n,1)):n++,s=0,a=0,l="",u=""}""===e[e.length-1][1]&&e.pop();var c=!1;for(n=1;n<e.length-1;)e[n-1][0]==o&&e[n+1][0]==o&&(e[n][1].substring(e[n][1].length-e[n-1][1].length)==e[n-1][1]?(e[n][1]=e[n-1][1]+e[n][1].substring(0,e[n][1].length-e[n-1][1].length),e[n+1][1]=e[n-1][1]+e[n+1][1],e.splice(n-1,1),c=!0):e[n][1].substring(0,e[n+1][1].length)==e[n+1][1]&&(e[n-1][1]+=e[n+1][1],e[n][1]=e[n][1].substring(e[n+1][1].length)+e[n+1][1],e.splice(n+1,1),c=!0)),n++;c&&this.diff_cleanupMerge(e)},n.prototype.diff_xIndex=function(e,t){var n,o=0,a=0,s=0,l=0;for(n=0;n<e.length&&(e[n][0]!==i&&(o+=e[n][1].length),e[n][0]!==r&&(a+=e[n][1].length),!(o>t));n++)s=o,l=a;return e.length!=n&&e[n][0]===r?l:l+(t-s)},n.prototype.diff_prettyHtml=function(e){for(var t=[],n=0,a=/&/g,s=/</g,l=/>/g,u=/\n/g,c=0;c<e.length;c++){var d=e[c][0],f=e[c][1],p=f.replace(a,"&amp;").replace(s,"&lt;").replace(l,"&gt;").replace(u,"&para;<br>");switch(d){case i:t[c]='<ins style="background:#e6ffe6;">'+p+"</ins>";break;case r:t[c]='<del style="background:#ffe6e6;">'+p+"</del>";break;case o:t[c]="<span>"+p+"</span>"}d!==r&&(n+=f.length)}return t.join("")},n.prototype.diff_text1=function(e){for(var t=[],n=0;n<e.length;n++)e[n][0]!==i&&(t[n]=e[n][1]);return t.join("")},n.prototype.diff_text2=function(e){for(var t=[],n=0;n<e.length;n++)e[n][0]!==r&&(t[n]=e[n][1]);return t.join("")},n.prototype.diff_levenshtein=function(e){for(var t=0,n=0,a=0,s=0;s<e.length;s++){var l=e[s][0],u=e[s][1];switch(l){case i:n+=u.length;break;case r:a+=u.length;break;case o:t+=Math.max(n,a),n=0,a=0}}return t+=Math.max(n,a)},n.prototype.diff_toDelta=function(e){for(var t=[],n=0;n<e.length;n++)switch(e[n][0]){case i:t[n]="+"+encodeURI(e[n][1]);break;case r:t[n]="-"+e[n][1].length;break;case o:t[n]="="+e[n][1].length}return t.join("\t").replace(/%20/g," ")},n.prototype.diff_fromDelta=function(e,t){for(var n=[],a=0,s=0,l=t.split(/\t/g),u=0;u<l.length;u++){var c=l[u].substring(1);switch(l[u].charAt(0)){case"+":try{n[a++]=[i,decodeURI(c)]}catch(d){throw new Error("Illegal escape in diff_fromDelta: "+c)}break;case"-":case"=":var f=parseInt(c,10);if(isNaN(f)||f<0)throw new Error("Invalid number in diff_fromDelta: "+c);var p=e.substring(s,s+=f);"="==l[u].charAt(0)?n[a++]=[o,p]:n[a++]=[r,p];break;default:if(l[u])throw new Error("Invalid diff operation in diff_fromDelta: "+l[u])}}if(s!=e.length)throw new Error("Delta length ("+s+") does not equal source text length ("+e.length+").");return n},n.prototype.match_main=function(e,t,n){if(null==e||null==t||null==n)throw new Error("Null input. (match_main)");return n=Math.max(0,Math.min(n,e.length)),e==t?0:e.length?e.substring(n,n+t.length)==t?n:this.match_bitap_(e,t,n):-1},n.prototype.match_bitap_=function(e,t,n){function r(e,r){var i=e/t.length,a=Math.abs(n-r);return o.Match_Distance?i+a/o.Match_Distance:a?1:i}if(t.length>this.Match_MaxBits)throw new Error("Pattern too long for this browser.");var i=this.match_alphabet_(t),o=this,a=this.Match_Threshold,s=e.indexOf(t,n);s!=-1&&(a=Math.min(r(0,s),a),s=e.lastIndexOf(t,n+t.length),s!=-1&&(a=Math.min(r(0,s),a)));var l=1<<t.length-1;s=-1;for(var u,c,d,f=t.length+e.length,p=0;p<t.length;p++){for(u=0,c=f;u<c;)r(p,n+c)<=a?u=c:f=c,c=Math.floor((f-u)/2+u);f=c;var h=Math.max(1,n-c+1),g=Math.min(n+c,e.length)+t.length,m=Array(g+2);m[g+1]=(1<<p)-1;for(var v=g;v>=h;v--){var b=i[e.charAt(v-1)];if(0===p?m[v]=(m[v+1]<<1|1)&b:m[v]=(m[v+1]<<1|1)&b|((d[v+1]|d[v])<<1|1)|d[v+1],m[v]&l){var y=r(p,v-1);if(y<=a){if(a=y,s=v-1,!(s>n))break;h=Math.max(1,2*n-s)}}}if(r(p+1,n)>a)break;d=m}return s},n.prototype.match_alphabet_=function(e){for(var t={},n=0;n<e.length;n++)t[e.charAt(n)]=0;for(var n=0;n<e.length;n++)t[e.charAt(n)]|=1<<e.length-n-1;return t},n.prototype.patch_addContext_=function(e,t){if(0!=t.length){for(var n=t.substring(e.start2,e.start2+e.length1),r=0;t.indexOf(n)!=t.lastIndexOf(n)&&n.length<this.Match_MaxBits-this.Patch_Margin-this.Patch_Margin;)r+=this.Patch_Margin,n=t.substring(e.start2-r,e.start2+e.length1+r);r+=this.Patch_Margin;var i=t.substring(e.start2-r,e.start2);i&&e.diffs.unshift([o,i]);var a=t.substring(e.start2+e.length1,e.start2+e.length1+r);a&&e.diffs.push([o,a]),e.start1-=i.length,e.start2-=i.length,e.length1+=i.length+a.length,e.length2+=i.length+a.length}},n.prototype.patch_make=function(e,t,a){var s,l;if("string"==typeof e&&"string"==typeof t&&"undefined"==typeof a)s=e,l=this.diff_main(s,t,!0),l.length>2&&(this.diff_cleanupSemantic(l),this.diff_cleanupEfficiency(l));else if(e&&"object"==typeof e&&"undefined"==typeof t&&"undefined"==typeof a)l=e,s=this.diff_text1(l);else if("string"==typeof e&&t&&"object"==typeof t&&"undefined"==typeof a)s=e,l=t;else{if("string"!=typeof e||"string"!=typeof t||!a||"object"!=typeof a)throw new Error("Unknown call format to patch_make.");s=e,l=a}if(0===l.length)return[];for(var u=[],c=new n.patch_obj,d=0,f=0,p=0,h=s,g=s,m=0;m<l.length;m++){var v=l[m][0],b=l[m][1];switch(d||v===o||(c.start1=f,c.start2=p),v){case i:c.diffs[d++]=l[m],c.length2+=b.length,g=g.substring(0,p)+b+g.substring(p);break;case r:c.length1+=b.length,c.diffs[d++]=l[m],g=g.substring(0,p)+g.substring(p+b.length);break;case o:b.length<=2*this.Patch_Margin&&d&&l.length!=m+1?(c.diffs[d++]=l[m],c.length1+=b.length,c.length2+=b.length):b.length>=2*this.Patch_Margin&&d&&(this.patch_addContext_(c,h),u.push(c),c=new n.patch_obj,d=0,h=g,f=p)}v!==i&&(f+=b.length),v!==r&&(p+=b.length)}return d&&(this.patch_addContext_(c,h),u.push(c)),u},n.prototype.patch_deepCopy=function(e){for(var t=[],r=0;r<e.length;r++){var i=e[r],o=new n.patch_obj;o.diffs=[];for(var a=0;a<i.diffs.length;a++)o.diffs[a]=i.diffs[a].slice();o.start1=i.start1,o.start2=i.start2,o.length1=i.length1,o.length2=i.length2,t[r]=o}return t},n.prototype.patch_apply=function(e,t){if(0==e.length)return[t,[]];e=this.patch_deepCopy(e);var n=this.patch_addPadding(e);t=n+t+n,this.patch_splitMax(e);for(var a=0,s=[],l=0;l<e.length;l++){var u,c=e[l].start2+a,d=this.diff_text1(e[l].diffs),f=-1;if(d.length>this.Match_MaxBits?(u=this.match_main(t,d.substring(0,this.Match_MaxBits),c),u!=-1&&(f=this.match_main(t,d.substring(d.length-this.Match_MaxBits),c+d.length-this.Match_MaxBits),(f==-1||u>=f)&&(u=-1))):u=this.match_main(t,d,c),u==-1)s[l]=!1,a-=e[l].length2-e[l].length1;else{s[l]=!0,a=u-c;var p;if(p=f==-1?t.substring(u,u+d.length):t.substring(u,f+this.Match_MaxBits),d==p)t=t.substring(0,u)+this.diff_text2(e[l].diffs)+t.substring(u+d.length);else{var h=this.diff_main(d,p,!1);if(d.length>this.Match_MaxBits&&this.diff_levenshtein(h)/d.length>this.Patch_DeleteThreshold)s[l]=!1;else{this.diff_cleanupSemanticLossless(h);for(var g,m=0,v=0;v<e[l].diffs.length;v++){var b=e[l].diffs[v];b[0]!==o&&(g=this.diff_xIndex(h,m)),b[0]===i?t=t.substring(0,u+g)+b[1]+t.substring(u+g):b[0]===r&&(t=t.substring(0,u+g)+t.substring(u+this.diff_xIndex(h,m+b[1].length))),b[0]!==r&&(m+=b[1].length)}}}}}return t=t.substring(n.length,t.length-n.length),[t,s]},n.prototype.patch_addPadding=function(e){for(var t=this.Patch_Margin,n="",r=1;r<=t;r++)n+=String.fromCharCode(r);for(var r=0;r<e.length;r++)e[r].start1+=t,e[r].start2+=t;var i=e[0],a=i.diffs;if(0==a.length||a[0][0]!=o)a.unshift([o,n]),i.start1-=t,i.start2-=t,i.length1+=t,i.length2+=t;else if(t>a[0][1].length){var s=t-a[0][1].length;a[0][1]=n.substring(a[0][1].length)+a[0][1],i.start1-=s,i.start2-=s,i.length1+=s,i.length2+=s}if(i=e[e.length-1],a=i.diffs,0==a.length||a[a.length-1][0]!=o)a.push([o,n]),i.length1+=t,i.length2+=t;else if(t>a[a.length-1][1].length){var s=t-a[a.length-1][1].length;a[a.length-1][1]+=n.substring(0,s),i.length1+=s,i.length2+=s}return n},n.prototype.patch_splitMax=function(e){for(var t=this.Match_MaxBits,a=0;a<e.length;a++)if(e[a].length1>t){var s=e[a];e.splice(a--,1);for(var l=s.start1,u=s.start2,c="";0!==s.diffs.length;){var d=new n.patch_obj,f=!0;for(d.start1=l-c.length,d.start2=u-c.length,""!==c&&(d.length1=d.length2=c.length,d.diffs.push([o,c]));0!==s.diffs.length&&d.length1<t-this.Patch_Margin;){var p=s.diffs[0][0],h=s.diffs[0][1];p===i?(d.length2+=h.length,u+=h.length,d.diffs.push(s.diffs.shift()),f=!1):p===r&&1==d.diffs.length&&d.diffs[0][0]==o&&h.length>2*t?(d.length1+=h.length,l+=h.length,f=!1,d.diffs.push([p,h]),s.diffs.shift()):(h=h.substring(0,t-d.length1-this.Patch_Margin),d.length1+=h.length,l+=h.length,p===o?(d.length2+=h.length,u+=h.length):f=!1,d.diffs.push([p,h]),h==s.diffs[0][1]?s.diffs.shift():s.diffs[0][1]=s.diffs[0][1].substring(h.length))}c=this.diff_text2(d.diffs),c=c.substring(c.length-this.Patch_Margin);var g=this.diff_text1(s.diffs).substring(0,this.Patch_Margin);""!==g&&(d.length1+=g.length,d.length2+=g.length,0!==d.diffs.length&&d.diffs[d.diffs.length-1][0]===o?d.diffs[d.diffs.length-1][1]+=g:d.diffs.push([o,g])),f||e.splice(++a,0,d)}}},n.prototype.patch_toText=function(e){for(var t=[],n=0;n<e.length;n++)t[n]=e[n];return t.join("")},n.prototype.patch_fromText=function(e){
var t=[];if(!e)return t;for(var a=e.split("\n"),s=0,l=/^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/;s<a.length;){var u=a[s].match(l);if(!u)throw new Error("Invalid patch string: "+a[s]);var c=new n.patch_obj;for(t.push(c),c.start1=parseInt(u[1],10),""===u[2]?(c.start1--,c.length1=1):"0"==u[2]?c.length1=0:(c.start1--,c.length1=parseInt(u[2],10)),c.start2=parseInt(u[3],10),""===u[4]?(c.start2--,c.length2=1):"0"==u[4]?c.length2=0:(c.start2--,c.length2=parseInt(u[4],10)),s++;s<a.length;){var d=a[s].charAt(0);try{var f=decodeURI(a[s].substring(1))}catch(p){throw new Error("Illegal escape in patch_fromText: "+f)}if("-"==d)c.diffs.push([r,f]);else if("+"==d)c.diffs.push([i,f]);else if(" "==d)c.diffs.push([o,f]);else{if("@"==d)break;if(""!==d)throw new Error('Invalid patch mode "'+d+'" in: '+f)}s++}}return t},n.patch_obj=function(){this.diffs=[],this.start1=null,this.start2=null,this.length1=0,this.length2=0},n.patch_obj.prototype.toString=function(){var e,t;e=0===this.length1?this.start1+",0":1==this.length1?this.start1+1:this.start1+1+","+this.length1,t=0===this.length2?this.start2+",0":1==this.length2?this.start2+1:this.start2+1+","+this.length2;for(var n,a=["@@ -"+e+" +"+t+" @@\n"],s=0;s<this.diffs.length;s++){switch(this.diffs[s][0]){case i:n="+";break;case r:n="-";break;case o:n=" "}a[s+1]=n+encodeURI(this.diffs[s][1])+"\n"}return a.join("").replace(/%20/g," ")},this.diff_match_patch=n,this.DIFF_DELETE=r,this.DIFF_INSERT=i,this.DIFF_EQUAL=o},function(e,t,n){function r(e){return n(i(e))}function i(e){return o[e]||function(){throw new Error("Cannot find module '"+e+"'.")}()}var o={"./contexts/context":762,"./contexts/context.js":762,"./contexts/diff":761,"./contexts/diff.js":761,"./contexts/patch":764,"./contexts/patch.js":764,"./contexts/reverse":765,"./contexts/reverse.js":765,"./date-reviver":763,"./date-reviver.js":763,"./diffpatcher":758,"./diffpatcher.js":758,"./environment":757,"./environment.js":757,"./filters/arrays":768,"./filters/arrays.js":768,"./filters/dates":770,"./filters/dates.js":770,"./filters/lcs":769,"./filters/lcs.js":769,"./filters/nested":767,"./filters/nested.js":767,"./filters/texts":771,"./filters/texts.js":771,"./filters/trivial":766,"./filters/trivial.js":766,"./formatters/annotated":775,"./formatters/annotated.js":775,"./formatters/base":776,"./formatters/base.js":776,"./formatters/console":777,"./formatters/console.js":777,"./formatters/html":785,"./formatters/html.js":785,"./formatters/index":786,"./formatters/index.js":786,"./formatters/jsonpatch":787,"./formatters/jsonpatch.js":787,"./main":756,"./main-formatters":789,"./main-formatters.js":789,"./main-full":790,"./main-full.js":790,"./main.js":756,"./pipe":760,"./pipe.js":760,"./processor":759,"./processor.js":759};r.keys=function(){return Object.keys(o)},r.resolve=i,e.exports=r,r.id=774},function(e,t,n){var r=n(776),i=r.BaseFormatter,o=function(){this.includeMoveDestinations=!1};o.prototype=new i,o.prototype.prepareContext=function(e){i.prototype.prepareContext.call(this,e),e.indent=function(e){this.indentLevel=(this.indentLevel||0)+("undefined"==typeof e?1:e),this.indentPad=new Array(this.indentLevel+1).join("&nbsp;&nbsp;")},e.row=function(t,n){e.out('<tr><td style="white-space: nowrap;"><pre class="jsondiffpatch-annotated-indent" style="display: inline-block">'),e.out(e.indentPad),e.out('</pre><pre style="display: inline-block">'),e.out(t),e.out('</pre></td><td class="jsondiffpatch-delta-note"><div>'),e.out(n),e.out("</div></td></tr>")}},o.prototype.typeFormattterErrorFormatter=function(e,t){e.row("",'<pre class="jsondiffpatch-error">'+t+"</pre>")},o.prototype.formatTextDiffString=function(e,t){var n=this.parseTextDiff(t);e.out('<ul class="jsondiffpatch-textdiff">');for(var r=0,i=n.length;r<i;r++){var o=n[r];e.out('<li><div class="jsondiffpatch-textdiff-location"><span class="jsondiffpatch-textdiff-line-number">'+o.location.line+'</span><span class="jsondiffpatch-textdiff-char">'+o.location.chr+'</span></div><div class="jsondiffpatch-textdiff-line">');for(var a=o.pieces,s=0,l=a.length;s<l;s++){var u=a[s];e.out('<span class="jsondiffpatch-textdiff-'+u.type+'">'+u.text+"</span>")}e.out("</div></li>")}e.out("</ul>")},o.prototype.rootBegin=function(e,t,n){e.out('<table class="jsondiffpatch-annotated-delta">'),"node"===t&&(e.row("{"),e.indent()),"array"===n&&e.row('"_t": "a",',"Array delta (member names indicate array indices)")},o.prototype.rootEnd=function(e,t){"node"===t&&(e.indent(-1),e.row("}")),e.out("</table>")},o.prototype.nodeBegin=function(e,t,n,r,i){e.row("&quot;"+t+"&quot;: {"),"node"===r&&e.indent(),"array"===i&&e.row('"_t": "a",',"Array delta (member names indicate array indices)")},o.prototype.nodeEnd=function(e,t,n,r,i,o){"node"===r&&e.indent(-1),e.row("}"+(o?"":","))},o.prototype.format_unchanged=function(){},o.prototype.format_movedestination=function(){},o.prototype.format_node=function(e,t,n){this.formatDeltaChildren(e,t,n)};var a=function(e){return'<pre style="display:inline-block">&quot;'+e+"&quot;</pre>"},s={added:function(e,t,n,r){var i=" <pre>([newValue])</pre>";return"undefined"==typeof r?"new value"+i:"number"==typeof r?"insert at index "+r+i:"add property "+a(r)+i},modified:function(e,t,n,r){var i=" <pre>([previousValue, newValue])</pre>";return"undefined"==typeof r?"modify value"+i:"number"==typeof r?"modify at index "+r+i:"modify property "+a(r)+i},deleted:function(e,t,n,r){var i=" <pre>([previousValue, 0, 0])</pre>";return"undefined"==typeof r?"delete value"+i:"number"==typeof r?"remove index "+r+i:"delete property "+a(r)+i},moved:function(e,t,n,r){return'move from <span title="(position to remove at original state)">index '+r+'</span> to <span title="(position to insert at final state)">index '+e[1]+"</span>"},textdiff:function(e,t,n,r){var i="undefined"==typeof r?"":"number"==typeof r?" at index "+r:" at property "+a(r);return"text diff"+i+', format is <a href="https://code.google.com/p/google-diff-match-patch/wiki/Unidiff">a variation of Unidiff</a>'}},l=function(e,t){var n=this.getDeltaType(t),r=s[n],i=r&&r.apply(r,Array.prototype.slice.call(arguments,1)),o=JSON.stringify(t,null,2);"textdiff"===n&&(o=o.split("\\n").join('\\n"+\n   "')),e.indent(),e.row(o,i),e.indent(-1)};o.prototype.format_added=l,o.prototype.format_modified=l,o.prototype.format_deleted=l,o.prototype.format_moved=l,o.prototype.format_textdiff=l,t.AnnotatedFormatter=o;var u;t.format=function(e,t){return u||(u=new o),u.format(e,t)}},function(e,t){var n="function"==typeof Array.isArray?Array.isArray:function(e){return e instanceof Array},r="function"==typeof Object.keys?function(e){return Object.keys(e)}:function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},i=function(e){return"_"===e.substr(0,1)?e.slice(1):e},o=function(e){return"_t"===e?-1:"_"===e.substr(0,1)?parseInt(e.slice(1),10):parseInt(e,10)+.1},a=function(e,t){return o(e)-o(t)},s=function(){};s.prototype.format=function(e,t){var n={};return this.prepareContext(n),this.recurse(n,e,t),this.finalize(n)},s.prototype.prepareContext=function(e){e.buffer=[],e.out=function(){this.buffer.push.apply(this.buffer,arguments)}},s.prototype.typeFormattterNotFound=function(e,t){throw new Error("cannot format delta type: "+t)},s.prototype.typeFormattterErrorFormatter=function(e,t){return t.toString()},s.prototype.finalize=function(e){if(n(e.buffer))return e.buffer.join("")},s.prototype.recurse=function(e,t,n,r,i,o,a){var s=t&&o,l=s?o.value:n;if("undefined"!=typeof t||"undefined"!=typeof r){var u=this.getDeltaType(t,o),c="node"===u?"a"===t._t?"array":"object":"";"undefined"!=typeof r?this.nodeBegin(e,r,i,u,c,a):this.rootBegin(e,u,c);var d;try{d=this["format_"+u]||this.typeFormattterNotFound(e,u),d.call(this,e,t,l,r,i,o)}catch(f){this.typeFormattterErrorFormatter(e,f,t,l,r,i,o),"undefined"!=typeof console&&console.error&&console.error(f.stack)}"undefined"!=typeof r?this.nodeEnd(e,r,i,u,c,a):this.rootEnd(e,u,c)}},s.prototype.formatDeltaChildren=function(e,t,n){var r=this;this.forEachDeltaKey(t,n,function(i,o,a,s){r.recurse(e,t[i],n?n[o]:void 0,i,o,a,s)})},s.prototype.forEachDeltaKey=function(e,t,o){var s,l=r(e),u="a"===e._t,c={};if("undefined"!=typeof t)for(s in t)"undefined"!=typeof e[s]||u&&"undefined"!=typeof e["_"+s]||l.push(s);for(s in e){var d=e[s];n(d)&&3===d[2]&&(c[d[1].toString()]={key:s,value:t&&t[parseInt(s.substr(1))]},this.includeMoveDestinations!==!1&&"undefined"==typeof t&&"undefined"==typeof e[d[1]]&&l.push(d[1].toString()))}u?l.sort(a):l.sort();for(var f=0,p=l.length;f<p;f++){var h=l[f];if(!u||"_t"!==h){var g=u?"number"==typeof h?h:parseInt(i(h),10):h,m=f===p-1;o(h,g,c[g],m)}}},s.prototype.getDeltaType=function(e,t){if("undefined"==typeof e)return"undefined"!=typeof t?"movedestination":"unchanged";if(n(e)){if(1===e.length)return"added";if(2===e.length)return"modified";if(3===e.length&&0===e[2])return"deleted";if(3===e.length&&2===e[2])return"textdiff";if(3===e.length&&3===e[2])return"moved"}else if("object"==typeof e)return"node";return"unknown"},s.prototype.parseTextDiff=function(e){for(var t=[],n=e.split("\n@@ "),r=0,i=n.length;r<i;r++){var o=n[r],a={pieces:[]},s=/^(?:@@ )?[-+]?(\d+),(\d+)/.exec(o).slice(1);a.location={line:s[0],chr:s[1]};for(var l=o.split("\n").slice(1),u=0,c=l.length;u<c;u++){var d=l[u];if(d.length){var f={type:"context"};"+"===d.substr(0,1)?f.type="added":"-"===d.substr(0,1)&&(f.type="deleted"),f.text=d.slice(1),a.pieces.push(f)}}t.push(a)}return t},t.BaseFormatter=s},function(e,t,n){var r=n(778),i=n(776),o=i.BaseFormatter,a={added:r.green,deleted:r.red,movedestination:r.gray,moved:r.yellow,unchanged:r.gray,error:r.white.bgRed,textDiffLine:r.gray},s=function(){this.includeMoveDestinations=!1};s.prototype=new o,s.prototype.prepareContext=function(e){o.prototype.prepareContext.call(this,e),e.indent=function(e){this.indentLevel=(this.indentLevel||0)+("undefined"==typeof e?1:e),this.indentPad=new Array(this.indentLevel+1).join("  "),this.outLine()},e.outLine=function(){this.buffer.push("\n"+(this.indentPad||""))},e.out=function(){for(var e=0,t=arguments.length;e<t;e++){var n=arguments[e].split("\n"),r=n.join("\n"+(this.indentPad||""));this.color&&this.color[0]&&(r=this.color[0](r)),this.buffer.push(r)}},e.pushColor=function(e){this.color=this.color||[],this.color.unshift(e)},e.popColor=function(){this.color=this.color||[],this.color.shift()}},s.prototype.typeFormattterErrorFormatter=function(e,t){e.pushColor(a.error),e.out("[ERROR]"+t),e.popColor()},s.prototype.formatValue=function(e,t){e.out(JSON.stringify(t,null,2))},s.prototype.formatTextDiffString=function(e,t){var n=this.parseTextDiff(t);e.indent();for(var r=0,i=n.length;r<i;r++){var o=n[r];e.pushColor(a.textDiffLine),e.out(o.location.line+","+o.location.chr+" "),e.popColor();for(var s=o.pieces,l=0,u=s.length;l<u;l++){var c=s[l];e.pushColor(a[c.type]),e.out(c.text),e.popColor()}r<i-1&&e.outLine()}e.indent(-1)},s.prototype.rootBegin=function(e,t,n){e.pushColor(a[t]),"node"===t&&(e.out("array"===n?"[":"{"),e.indent())},s.prototype.rootEnd=function(e,t,n){"node"===t&&(e.indent(-1),e.out("array"===n?"]":"}")),e.popColor()},s.prototype.nodeBegin=function(e,t,n,r,i){e.pushColor(a[r]),e.out(n+": "),"node"===r&&(e.out("array"===i?"[":"{"),e.indent())},s.prototype.nodeEnd=function(e,t,n,r,i,o){"node"===r&&(e.indent(-1),e.out("array"===i?"]":"}"+(o?"":","))),o||e.outLine(),e.popColor()},s.prototype.format_unchanged=function(e,t,n){"undefined"!=typeof n&&this.formatValue(e,n)},s.prototype.format_movedestination=function(e,t,n){"undefined"!=typeof n&&this.formatValue(e,n)},s.prototype.format_node=function(e,t,n){this.formatDeltaChildren(e,t,n)},s.prototype.format_added=function(e,t){this.formatValue(e,t[0])},s.prototype.format_modified=function(e,t){e.pushColor(a.deleted),this.formatValue(e,t[0]),e.popColor(),e.out(" => "),e.pushColor(a.added),this.formatValue(e,t[1]),e.popColor()},s.prototype.format_deleted=function(e,t){this.formatValue(e,t[0])},s.prototype.format_moved=function(e,t){e.out("==> "+t[1])},s.prototype.format_textdiff=function(e,t){this.formatTextDiffString(e,t[0])},t.ConsoleFormatter=s;var l,u=function(e,t){return l||(l=new s),l.format(e,t)};t.log=function(e,t){console.log(u(e,t))},t.format=u},function(e,t,n){"use strict";function r(e){var t=function n(){return i.apply(n,arguments)};return t._styles=e,t.__proto__=h,t}function i(){var e=arguments,t=e.length,n=0!==t&&String(arguments[0]);if(t>1)for(var r=1;r<t;r++)n+=" "+e[r];if(!f.enabled||!n)return n;for(var i=this._styles,o=0;o<i.length;o++){var a=s[i[o]];n=a.open+n.replace(a.closeRe,a.open)+a.close}return n}function o(){var e={};return Object.keys(p).forEach(function(t){e[t]={get:function(){return r([t])}}}),e}var a=n(779),s=n(780),l=n(781),u=n(783),c=n(784),d=Object.defineProperties,f=e.exports,p=function(){var e={};return s.grey=s.gray,Object.keys(s).forEach(function(t){s[t].closeRe=new RegExp(a(s[t].close),"g"),e[t]={get:function(){return r(this._styles.concat(t))}}}),e}(),h=d(function(){},p);d(f,o()),f.styles=s,f.hasColor=u,f.stripColor=l,f.supportsColor=c,void 0===f.enabled&&(f.enabled=f.supportsColor)},function(e,t){"use strict";var n=/[|\\{}()[\]^$+*?.]/g;e.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(n,"\\$&")}},function(e,t){"use strict";var n=e.exports,r={reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49]};Object.keys(r).forEach(function(e){var t=r[e],i=n[e]={};i.open="["+t[0]+"m",i.close="["+t[1]+"m"})},function(e,t,n){"use strict";var r=n(782)();e.exports=function(e){return"string"==typeof e?e.replace(r,""):e}},function(e,t){"use strict";e.exports=function(){return/\u001b\[(?:[0-9]{1,3}(?:;[0-9]{1,3})*)?[m|K]/g}},function(e,t,n){"use strict";var r=n(782),i=new RegExp(r().source);e.exports=i.test.bind(i)},function(e,t,n){(function(t){"use strict";e.exports=function(){return t.argv.indexOf("--no-color")===-1&&(t.argv.indexOf("--color")!==-1||!(t.stdout&&!t.stdout.isTTY)&&("win32"===t.platform||("COLORTERM"in{NODE_ENV:"production"}||"dumb"!=={NODE_ENV:"production"}.TERM&&!!/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test({NODE_ENV:"production"}.TERM))))}()}).call(t,n(737))},function(e,t,n){function r(e){for(var t=e,n=[[/&/g,"&amp;"],[/</g,"&lt;"],[/>/g,"&gt;"],[/'/g,"&apos;"],[/"/g,"&quot;"]],r=0;r<n.length;r++)t=t.replace(n[r][0],n[r][1]);return t}var i=n(776),o=i.BaseFormatter,a=function(){};a.prototype=new o,a.prototype.typeFormattterErrorFormatter=function(e,t){e.out('<pre class="jsondiffpatch-error">'+t+"</pre>")},a.prototype.formatValue=function(e,t){e.out("<pre>"+r(JSON.stringify(t,null,2))+"</pre>")},a.prototype.formatTextDiffString=function(e,t){var n=this.parseTextDiff(t);e.out('<ul class="jsondiffpatch-textdiff">');for(var i=0,o=n.length;i<o;i++){var a=n[i];e.out('<li><div class="jsondiffpatch-textdiff-location"><span class="jsondiffpatch-textdiff-line-number">'+a.location.line+'</span><span class="jsondiffpatch-textdiff-char">'+a.location.chr+'</span></div><div class="jsondiffpatch-textdiff-line">');for(var s=a.pieces,l=0,u=s.length;l<u;l++){var c=s[l];e.out('<span class="jsondiffpatch-textdiff-'+c.type+'">'+r(unescape(c.text))+"</span>")}e.out("</div></li>")}e.out("</ul>")};var s=function(e){e=e||document;var t=function(e){return e.textContent||e.innerText},n=function(e,t,n){for(var r=e.querySelectorAll(t),i=0,o=r.length;i<o;i++)n(r[i])},r=function(e,t){for(var n=0,r=e.children.length;n<r;n++)t(e.children[n],n)};n(e,".jsondiffpatch-arrow",function(e){var n=e.parentNode,i=e.children[0],o=i.children[1];i.style.display="none";var a,s=t(n.querySelector(".jsondiffpatch-moved-destination")),l=n.parentNode;if(r(l,function(e){e.getAttribute("data-key")===s&&(a=e)}),a)try{var u=a.offsetTop-n.offsetTop;i.setAttribute("height",Math.abs(u)+6),e.style.top=-8+(u>0?0:u)+"px";var c=u>0?"M30,0 Q-10,"+Math.round(u/2)+" 26,"+(u-4):"M30,"+-u+" Q-10,"+Math.round(-u/2)+" 26,4";o.setAttribute("d",c),i.style.display=""}catch(d){return}})};a.prototype.rootBegin=function(e,t,n){var r="jsondiffpatch-"+t+(n?" jsondiffpatch-child-node-type-"+n:"");e.out('<div class="jsondiffpatch-delta '+r+'">')},a.prototype.rootEnd=function(e){e.out("</div>"+(e.hasArrows?'<script type="text/javascript">setTimeout('+s.toString()+",10);</script>":""))},a.prototype.nodeBegin=function(e,t,n,r,i){var o="jsondiffpatch-"+r+(i?" jsondiffpatch-child-node-type-"+i:"");e.out('<li class="'+o+'" data-key="'+n+'"><div class="jsondiffpatch-property-name">'+n+"</div>")},a.prototype.nodeEnd=function(e){e.out("</li>")},a.prototype.format_unchanged=function(e,t,n){"undefined"!=typeof n&&(e.out('<div class="jsondiffpatch-value">'),this.formatValue(e,n),e.out("</div>"))},a.prototype.format_movedestination=function(e,t,n){"undefined"!=typeof n&&(e.out('<div class="jsondiffpatch-value">'),this.formatValue(e,n),e.out("</div>"))},a.prototype.format_node=function(e,t,n){var r="a"===t._t?"array":"object";e.out('<ul class="jsondiffpatch-node jsondiffpatch-node-type-'+r+'">'),this.formatDeltaChildren(e,t,n),e.out("</ul>")},a.prototype.format_added=function(e,t){e.out('<div class="jsondiffpatch-value">'),this.formatValue(e,t[0]),e.out("</div>")},a.prototype.format_modified=function(e,t){e.out('<div class="jsondiffpatch-value jsondiffpatch-left-value">'),this.formatValue(e,t[0]),e.out('</div><div class="jsondiffpatch-value jsondiffpatch-right-value">'),this.formatValue(e,t[1]),e.out("</div>")},a.prototype.format_deleted=function(e,t){e.out('<div class="jsondiffpatch-value">'),this.formatValue(e,t[0]),e.out("</div>")},a.prototype.format_moved=function(e,t){e.out('<div class="jsondiffpatch-value">'),this.formatValue(e,t[0]),e.out('</div><div class="jsondiffpatch-moved-destination">'+t[1]+"</div>"),e.out('<div class="jsondiffpatch-arrow" style="position: relative; left: -34px;">\t        <svg width="30" height="60" style="position: absolute; display: none;">\t        <defs>\t            <marker id="markerArrow" markerWidth="8" markerHeight="8" refx="2" refy="4"\t                   orient="auto" markerUnits="userSpaceOnUse">\t                <path d="M1,1 L1,7 L7,4 L1,1" style="fill: #339;" />\t            </marker>\t        </defs>\t        <path d="M30,0 Q-10,25 26,50" style="stroke: #88f; stroke-width: 2px; fill: none;\t        stroke-opacity: 0.5; marker-end: url(#markerArrow);"></path>\t        </svg>\t        </div>'),e.hasArrows=!0},a.prototype.format_textdiff=function(e,t){e.out('<div class="jsondiffpatch-value">'),this.formatTextDiffString(e,t[0]),e.out("</div>")};var l=function(e,t,n){var r=t||document.body,i="jsondiffpatch-unchanged-",o={showing:i+"showing",hiding:i+"hiding",visible:i+"visible",hidden:i+"hidden"},a=r.classList;if(a){if(!n)return a.remove(o.showing),a.remove(o.hiding),a.remove(o.visible),a.remove(o.hidden),void(e===!1&&a.add(o.hidden));e===!1?(a.remove(o.showing),a.add(o.visible),setTimeout(function(){a.add(o.hiding)},10)):(a.remove(o.hiding),a.add(o.showing),a.remove(o.hidden));var l=setInterval(function(){s(r)},100);setTimeout(function(){a.remove(o.showing),a.remove(o.hiding),e===!1?(a.add(o.hidden),a.remove(o.visible)):(a.add(o.visible),a.remove(o.hidden)),setTimeout(function(){a.remove(o.visible),clearInterval(l)},n+400)},n)}},u=function(e,t){return l(!1,e,t)};t.HtmlFormatter=a,t.showUnchanged=l,t.hideUnchanged=u;var c;t.format=function(e,t){return c||(c=new a),c.format(e,t)}},function(e,t,n){var r=n(757);if(t.base=n(776),t.html=n(785),t.annotated=n(775),t.jsonpatch=n(787),!r.isBrowser){var i="./console";t.console=n(788)(i)}},function(e,t,n){!function(){function e(){this.includeMoveDestinations=!1}function r(e){return e[e.length-1]}function i(e,t){return e.sort(t),e}function o(e){return i(e,function(e,t){var n=e.path.split("/"),i=t.path.split("/");return n.length!==i.length?n.length-i.length:f(r(n),r(i))})}function a(e,t){var n=[],r=[];return e.forEach(function(e){var i=t(e)?n:r;i.push(e)}),[n,r]}function s(e){var t=a(e,function(e){return"remove"===e.op}),n=t[0],r=t[1],i=o(n);return i.concat(r)}var l=n(776),u=l.BaseFormatter,c={added:"add",deleted:"remove",modified:"replace",moved:"moved",movedestination:"movedestination",unchanged:"unchanged",error:"error",textDiffLine:"textDiffLine"};e.prototype=new u,e.prototype.prepareContext=function(e){u.prototype.prepareContext.call(this,e),e.result=[],e.path=[],e.pushCurrentOp=function(e,t){var n={op:e,path:this.currentPath()};"undefined"!=typeof t&&(n.value=t),this.result.push(n)},e.currentPath=function(){return"/"+this.path.join("/")}},e.prototype.typeFormattterErrorFormatter=function(e,t){e.out("[ERROR]"+t)},e.prototype.rootBegin=function(){},e.prototype.rootEnd=function(){},e.prototype.nodeBegin=function(e,t,n){e.path.push(n)},e.prototype.nodeEnd=function(e){e.path.pop()},e.prototype.format_unchanged=function(e,t,n){"undefined"!=typeof n&&e.pushCurrentOp(c.unchanged,n)},e.prototype.format_movedestination=function(e,t,n){"undefined"!=typeof n&&e.pushCurrentOp(c.movedestination,n)},e.prototype.format_node=function(e,t,n){this.formatDeltaChildren(e,t,n)},e.prototype.format_added=function(e,t){e.pushCurrentOp(c.added,t[0])},e.prototype.format_modified=function(e,t){e.pushCurrentOp(c.modified,t[1])},e.prototype.format_deleted=function(e){e.pushCurrentOp(c.deleted)},e.prototype.format_moved=function(e,t){e.pushCurrentOp(c.moved,t[1])},e.prototype.format_textdiff=function(){throw"not implimented"},e.prototype.format=function(e,t){var n={};return this.prepareContext(n),this.recurse(n,e,t),n.result},t.JSONFormatter=e;var d,f=function(e,t){var n=parseInt(e,10),r=parseInt(t,10);return isNaN(n)||isNaN(r)?0:r-n},p=function(t,n){return d||(d=new e),s(d.format(t,n))};t.log=function(e,t){console.log(p(e,t))},t.format=p}()},function(e,t,n){function r(e){return n(i(e))}function i(e){return o[e]||function(){throw new Error("Cannot find module '"+e+"'.")}()}var o={"./annotated":775,"./annotated.js":775,"./base":776,"./base.js":776,"./console":777,"./console.js":777,"./html":785,"./html.js":785,"./index":786,"./index.js":786,"./jsonpatch":787,"./jsonpatch.js":787};r.keys=function(){return Object.keys(o)},r.resolve=i,e.exports=r,r.id=788},function(e,t,n){e.exports=n(786)},function(e,t,n){var r=n(757);r.isBrowser&&(window.diff_match_patch=n(773)),e.exports=n(756)},function(e,t,n){var r=n(792);"string"==typeof r&&(r=[[e.id,r,""]]);n(288)(r,{});r.locals&&(e.exports=r.locals)},function(e,t,n){t=e.exports=n(275)(),t.push([e.id,".jsondiffpatch-delta{padding:0 0 0 12px}.jsondiffpatch-delta,.jsondiffpatch-delta pre{font-family:Bitstream Vera Sans Mono,DejaVu Sans Mono,Monaco,Courier,monospace;font-size:12px;margin:0;display:inline-block}.jsondiffpatch-delta pre{padding:0}.jsondiffpatch-delta ul,ul.jsondiffpatch-delta{list-style-type:none;padding:0 0 0 20px;margin:0}.jsondiffpatch-added .jsondiffpatch-property-name,.jsondiffpatch-added .jsondiffpatch-value pre,.jsondiffpatch-modified .jsondiffpatch-right-value pre,.jsondiffpatch-textdiff-added{background:#bfb}.jsondiffpatch-deleted .jsondiffpatch-property-name,.jsondiffpatch-deleted pre,.jsondiffpatch-modified .jsondiffpatch-left-value pre,.jsondiffpatch-textdiff-deleted{background:#fbb;text-decoration:line-through}.jsondiffpatch-movedestination,.jsondiffpatch-unchanged{color:gray}.jsondiffpatch-movedestination>.jsondiffpatch-value,.jsondiffpatch-unchanged{transition:all .5s;-webkit-transition:all .5s;overflow-y:hidden}.jsondiffpatch-unchanged-showing .jsondiffpatch-movedestination>.jsondiffpatch-value,.jsondiffpatch-unchanged-showing .jsondiffpatch-unchanged{max-height:100px}.jsondiffpatch-unchanged-hidden .jsondiffpatch-movedestination>.jsondiffpatch-value,.jsondiffpatch-unchanged-hidden .jsondiffpatch-unchanged{max-height:0}.jsondiffpatch-unchanged-hidden .jsondiffpatch-movedestination>.jsondiffpatch-value,.jsondiffpatch-unchanged-hiding .jsondiffpatch-movedestination>.jsondiffpatch-value{display:block}.jsondiffpatch-unchanged-visible .jsondiffpatch-movedestination>.jsondiffpatch-value,.jsondiffpatch-unchanged-visible .jsondiffpatch-unchanged{max-height:100px}.jsondiffpatch-unchanged-hiding .jsondiffpatch-movedestination>.jsondiffpatch-value,.jsondiffpatch-unchanged-hiding .jsondiffpatch-unchanged{max-height:0}.jsondiffpatch-unchanged-hiding .jsondiffpatch-arrow,.jsondiffpatch-unchanged-showing .jsondiffpatch-arrow{display:none}.jsondiffpatch-value{display:inline-block}.jsondiffpatch-property-name{display:inline-block;padding-right:5px;vertical-align:top}.jsondiffpatch-property-name:after{content:': '}.jsondiffpatch-child-node-type-array>.jsondiffpatch-property-name:after{content:': ['}.jsondiffpatch-child-node-type-array:after{content:'],'}div.jsondiffpatch-child-node-type-array:before{content:'['}div.jsondiffpatch-child-node-type-array:after{content:']'}.jsondiffpatch-child-node-type-object>.jsondiffpatch-property-name:after{content:': {'}.jsondiffpatch-child-node-type-object:after{content:'},'}div.jsondiffpatch-child-node-type-object:before{content:'{'}div.jsondiffpatch-child-node-type-object:after{content:'}'}.jsondiffpatch-value pre:after{content:','}.jsondiffpatch-modified>.jsondiffpatch-left-value pre:after,li:last-child>.jsondiffpatch-value pre:after{content:''}.jsondiffpatch-modified .jsondiffpatch-value{display:inline-block}.jsondiffpatch-modified .jsondiffpatch-right-value{margin-left:5px}.jsondiffpatch-moved .jsondiffpatch-value{display:none}.jsondiffpatch-moved .jsondiffpatch-moved-destination{display:inline-block;background:#ffb;color:#888}.jsondiffpatch-moved .jsondiffpatch-moved-destination:before{content:' => '}ul.jsondiffpatch-textdiff{padding:0}.jsondiffpatch-textdiff-location{color:#bbb;display:inline-block;min-width:60px}.jsondiffpatch-textdiff-line{display:inline-block}.jsondiffpatch-textdiff-line-number:after{content:','}.jsondiffpatch-error{background:red;color:#fff;font-weight:700}",""])},function(e,t){ace.define("ace/ext/static_highlight",["require","exports","module","ace/edit_session","ace/layer/text","ace/config","ace/lib/dom"],function(e,t,n){"use strict";var r=e("../edit_session").EditSession,i=e("../layer/text").Text,o=".ace_static_highlight {\tfont-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', 'Droid Sans Mono', monospace;\tfont-size: 12px;\twhite-space: pre-wrap\t}\t.ace_static_highlight .ace_gutter {\twidth: 2em;\ttext-align: right;\tpadding: 0 3px 0 0;\tmargin-right: 3px;\t}\t.ace_static_highlight.ace_show_gutter .ace_line {\tpadding-left: 2.6em;\t}\t.ace_static_highlight .ace_line { position: relative; }\t.ace_static_highlight .ace_gutter-cell {\t-moz-user-select: -moz-none;\t-khtml-user-select: none;\t-webkit-user-select: none;\tuser-select: none;\ttop: 0;\tbottom: 0;\tleft: 0;\tposition: absolute;\t}\t.ace_static_highlight .ace_gutter-cell:before {\tcontent: counter(ace_line, decimal);\tcounter-increment: ace_line;\t}\t.ace_static_highlight {\tcounter-reset: ace_line;\t}\t",a=e("../config"),s=e("../lib/dom"),l=function(){this.config={}};l.prototype=i.prototype;var u=function(e,t,n){var r=e.className.match(/lang-(\w+)/),i=t.mode||r&&"ace/mode/"+r[1];if(!i)return!1;var o=t.theme||"ace/theme/textmate",a="",l=[];if(e.firstElementChild)for(var c=0,d=0;d<e.childNodes.length;d++){var f=e.childNodes[d];3==f.nodeType?(c+=f.data.length,a+=f.data):l.push(c,f)}else a=s.getInnerText(e),t.trim&&(a=a.trim());u.render(a,i,o,t.firstLineNumber,!t.showGutter,function(t){s.importCssString(t.css,"ace_highlight"),e.innerHTML=t.html;for(var r=e.firstChild.firstChild,i=0;i<l.length;i+=2){var o=t.session.doc.indexToPosition(l[i]),a=l[i+1],u=r.children[o.row];u&&u.appendChild(a)}n&&n()})};u.render=function(e,t,n,i,o,s){function l(){var r=u.renderSync(e,t,n,i,o);return s?s(r):r}var c=1,d=r.prototype.$modes;"string"==typeof n&&(c++,a.loadModule(["theme",n],function(e){n=e,--c||l()}));var f;return t&&"object"==typeof t&&!t.getTokenizer&&(f=t,t=f.path),"string"==typeof t&&(c++,a.loadModule(["mode",t],function(e){d[t]&&!f||(d[t]=new e.Mode(f)),t=d[t],--c||l()})),--c||l()},u.renderSync=function(e,t,n,i,a){i=parseInt(i||1,10);var s=new r("");s.setUseWorker(!1),s.setMode(t);var u=new l;u.setSession(s),s.setValue(e);for(var c=[],d=s.getLength(),f=0;f<d;f++)c.push("<div class='ace_line'>"),a||c.push("<span class='ace_gutter ace_gutter-cell' unselectable='on'></span>"),u.$renderLine(c,f,!0,!1),c.push("\n</div>");var p="<div class='"+n.cssClass+"'><div class='ace_static_highlight"+(a?"":" ace_show_gutter")+"' style='counter-reset:ace_line "+(i-1)+"'>"+c.join("")+"</div></div>";return u.destroy(),{css:o+n.cssText,html:p,session:s}},n.exports=u,n.exports.highlight=u}),function(){ace.acequire(["ace/ext/static_highlight"],function(){})}()},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(84),o=(r(i),n(99)),a=r(o),s=n(556),l=(r(s),n(692)),u=r(l),c=n(671),d=r(c),f=n(706),p=r(f),h=n(704),g=r(h),m=n(668),v=r(m),b=n(291),y=(r(b),n(697)),w=r(y),x=n(695),_=r(x),E=n(720),C=r(E),k=n(721),S=r(k),A=n(722),T=r(A),D=n(723),N=(r(D),n(700)),F=r(N),M=n(712),O=r(M),L=u["default"].extend({layout:"with_tabs_sidebar",routes:{"database/:database/new_view":{route:"createView",roles:["fx_loggedIn"]},"database/:database/new_view/:designDoc":{route:"createView",roles:["fx_loggedIn"]},"database/:database/_design/:ddoc/_view/:view":{route:"showView",roles:["fx_loggedIn"]},"database/:database/_design/:ddoc/_view/:view/edit":{route:"editView",roles:["fx_loggedIn"]}},initialize:function(e,t,n){var r=n[0];this.databaseName=r,this.database=new v["default"].Model({id:r}),this.allDatabases=new v["default"].List,this.createDesignDocsCollection(),this.addLeftHeader(),this.addSidebar(),this.setComponent("#right-header",O["default"],{database:this.database})},establish:function(){return[this.designDocs.fetch({reset:!0}),this.allDatabases.fetchOnce()]},showView:function(e,t,n){var r=this.createParams(),i=r.urlParams,o=r.docParams,s=decodeURIComponent(t);n=n.replace(/\?.*$/,""),this.setComponent("#footer",S["default"].Footer),this.indexedDocs=new d["default"].IndexCollection(null,{database:this.database,design:s,view:n,params:o,paging:{pageSize:w["default"].indexResultsStore.getPerPage()}}),g["default"].clearIndex(),_["default"].newResultsList({collection:this.indexedDocs,bulkCollection:new d["default"].BulkDeleteDocCollection([],{databaseId:this.database.safeID()})}),g["default"].fetchDesignDocsBeforeEdit({viewName:n,newView:!1,database:this.database,designDocs:this.designDocs,designDocId:"_design/"+s}),F["default"].selectNavItem("designDoc",{designDocName:t,designDocSection:"Views",indexName:n}),this.setComponent("#react-headerbar",T["default"].BulkDocumentHeaderController,{showIncludeAllDocs:!0}),this.setComponent("#dashboard-lower-content",C["default"].List),this.apiUrl=function(){return[this.indexedDocs.urlRef("apiurl"),a["default"].constants.DOC_URLS.GENERAL]},this.showQueryOptions(i,t,n)},createView:function(e,t){var n=!0,r="new-doc";t&&(r="_design/"+t,n=!1),g["default"].fetchDesignDocsBeforeEdit({viewName:"new-view",newView:!0,database:this.database,designDocs:this.designDocs,designDocId:r,newDesignDoc:n}),this.removeComponent("#react-headerbar"),this.removeComponent("#footer"),this.setComponent("#dashboard-lower-content",p["default"].EditorController),F["default"].selectNavItem("")},editView:function(e,t,n){g["default"].fetchDesignDocsBeforeEdit({viewName:n,newView:!1,database:this.database,designDocs:this.designDocs,designDocId:"_design/"+t}),F["default"].selectNavItem("designDoc",{designDocName:t,designDocSection:"Views",indexName:n}),this.apiUrl=function(){return[a["default"].urls("view","apiurl",e,t,n),a["default"].constants.DOC_URLS.GENERAL]},this.removeView("#right-header"),this.removeComponent("#react-headerbar"),this.removeComponent("#footer"),this.setComponent("#dashboard-lower-content",p["default"].EditorController);
}});t["default"]=L},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(84),o=r(i),a=n(99),s=r(a),l=n(556),u=(r(l),n(692)),c=(r(u),n(670)),d=r(c),f=n(291),p=(r(f),n(671)),h=r(p),g=n(695),m=r(g),v=n(697),b=r(v),y=n(722),w=r(y),x=n(723),_=(r(x),n(721)),E=r(_),C=n(796),k=r(C),S=n(799),A=r(S),T=n(797),D=(r(T),n(720)),N=r(D),F=n(700),M=r(F),O=n(712),L=(r(O),s["default"].RouteObject.extend({layout:"two_pane",routes:{"database/:database/_index":{route:"createIndex",roles:["fx_loggedIn"]},"database/:database/_find":{route:"findUsingIndex",roles:["fx_loggedIn"]}},disableLoader:!0,initialize:function(e,t,n){var r=n[0];this.databaseName=r,this.database=new d["default"].Model({id:r}),A["default"].setDatabase({database:this.database})},findUsingIndex:function(e){var t=new h["default"].MangoDocumentCollection(null,{database:this.database,paging:{pageSize:b["default"].indexResultsStore.getPerPage()}}),n=new h["default"].MangoIndexCollection(null,{database:this.database,params:null,paging:{pageSize:b["default"].indexResultsStore.getPerPage()}});M["default"].selectNavItem("mango-query"),this.setComponent("#react-headerbar",w["default"].BulkDocumentHeaderController,{showIncludeAllDocs:!1}),this.setComponent("#footer",E["default"].Footer),m["default"].newMangoResultsList({collection:t,textEmptyIndex:"No Results",bulkCollection:new h["default"].BulkDeleteDocCollection([],{databaseId:this.database.safeID()})}),A["default"].getIndexList({indexList:n}),this.setComponent("#left-content",k["default"].MangoQueryEditorController,{description:o["default"].i18n.en_US["mango-descripton"],editorTitle:o["default"].i18n.en_US["mango-title-editor"],additionalIndexesText:o["default"].i18n.en_US["mango-additional-indexes-heading"]}),this.setComponent("#dashboard-lower-content",N["default"].List),this.apiUrl=function(){return[t.urlRef("query-apiurl",""),s["default"].constants.DOC_URLS.MANGO_SEARCH]};var r=s["default"].urls("allDocs","app",this.database.safeID(),"?limit="+s["default"].constants.DATABASES.DOCUMENT_LIMIT);this.crumbs=[{name:e,link:r},{name:o["default"].i18n.en_US["mango-title-editor"]}]},createIndex:function(e){var t=new h["default"].MangoIndexCollection(null,{database:this.database,params:null,paging:{pageSize:b["default"].indexResultsStore.getPerPage()}});m["default"].newResultsList({collection:t,bulkCollection:new h["default"].MangoBulkDeleteDocCollection([],{databaseId:this.database.safeID()}),typeOfIndex:"mango"}),this.setComponent("#react-headerbar",w["default"].BulkDocumentHeaderController,{showIncludeAllDocs:!1}),this.setComponent("#footer",E["default"].Footer),this.setComponent("#dashboard-lower-content",N["default"].List),this.setComponent("#left-content",k["default"].MangoIndexEditorController,{description:o["default"].i18n.en_US["mango-descripton-index-editor"]}),this.apiUrl=function(){return[t.urlRef("index-apiurl",""),s["default"].constants.DOC_URLS.MANGO_INDEX]};var n=s["default"].urls("allDocs","app",this.database.safeID(),"?limit="+s["default"].constants.DATABASES.DOCUMENT_LIMIT);this.crumbs=[{name:e,link:n},{name:o["default"].i18n.en_US["mango-indexeditor-title"]}]}}));t["default"]={MangoIndexEditorAndQueryEditor:L}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(84),o=r(i),a=n(99),s=r(a),l=n(106),u=r(l),c=n(797),d=r(c),f=n(799),p=r(f),h=n(293),g=r(h),m=n(695),v=r(m),b=n(699),y=r(b);n(708);var w=d["default"].mangoStore,x=o["default"].helpers.getDocUrl,_=g["default"].PaddedBorderedBox,E=g["default"].CodeEditorPanel,C=g["default"].ConfirmButton,k=u["default"].createClass({displayName:"MangoQueryEditorController",getInitialState:function(){return this.getStoreState()},getStoreState:function(){return{queryCode:w.getQueryFindCode(),database:w.getDatabase(),changedQuery:w.getQueryFindCodeChanged(),availableIndexes:w.getAvailableQueryIndexes(),additionalIndexes:w.getAvailableAdditionalIndexes(),isLoading:w.getLoadingIndexes()}},onChange:function(){this.setState(this.getStoreState())},componentDidUpdate:function(){prettyPrint()},componentDidMount:function(){prettyPrint(),w.on("change",this.onChange,this)},componentWillUnmount:function(){w.off("change",this.onChange)},getMangoEditor:function(){return this.refs.mangoEditor},render:function(){return this.state.isLoading?u["default"].createElement("div",{className:"mango-editor-wrapper"},u["default"].createElement(g["default"].LoadLines,null)):u["default"].createElement(S,{ref:"mangoEditor",description:this.props.description,dbName:this.state.database.id,onSubmit:this.runQuery,title:this.props.editorTitle,additionalIndexesText:this.props.additionalIndexesText,docs:x("MANGO_SEARCH"),exampleCode:this.state.queryCode,changedQuery:this.state.changedQuery,availableIndexes:this.state.availableIndexes,additionalIndexes:this.state.additionalIndexes,confirmbuttonText:"Run Query"})},runQuery:function(e){return e.preventDefault(),this.getMangoEditor().hasErrors()?void s["default"].addNotification({msg:"Please fix the Javascript errors and try again.",type:"error",clear:!0}):void v["default"].runMangoFindQuery({database:this.state.database,queryCode:this.getMangoEditor().getEditorValue()})}}),S=u["default"].createClass({displayName:"MangoEditor",getDefaultProps:function(){return{changedQuery:null,availableIndexes:null,additionalIndexes:null}},render:function(){var e="#/"+s["default"].urls("allDocs","app",this.props.dbName,"");return u["default"].createElement("div",{className:"mango-editor-wrapper"},u["default"].createElement(_,null,u["default"].createElement("div",{dangerouslySetInnerHTML:{__html:this.props.description},className:"editor-description"})),u["default"].createElement(_,null,u["default"].createElement("strong",null,"Database"),u["default"].createElement("div",{className:"db-title"},u["default"].createElement("a",{href:e},this.props.dbName))),u["default"].createElement("form",{className:"form-horizontal",onSubmit:this.props.onSubmit},u["default"].createElement(_,null,u["default"].createElement(E,{id:"query-field",ref:"field",title:this.props.title,docLink:this.props.docs,defaultCode:this.props.exampleCode}),this.getChangedQueryText()),this.getIndexBox(),u["default"].createElement("div",{className:"padded-box"},u["default"].createElement("div",{className:"control-group"},u["default"].createElement(C,{text:this.props.confirmbuttonText,id:"create-index-btn",showIcon:!1})))))},getChangedQueryText:function(){return this.props.changedQuery?u["default"].createElement("div",{className:"info-changed-query"},u["default"].createElement("strong",null,"Info:"),u["default"].createElement("div",null,"We changed the default query based on the last Index you created.")):null},getIndexBox:function(){return this.props.availableIndexes?u["default"].createElement(_,null,u["default"].createElement("strong",null,"Your available Indexes:"),u["default"].createElement("a",{className:"edit-link",href:"#"+s["default"].urls("mango","index-app",this.props.dbName)},"edit"),u["default"].createElement("pre",{className:"mango-available-indexes"},this.getIndexes("index",this.props.availableIndexes),this.getIndexes("additonal",this.props.additionalIndexes))):null},getIndexes:function(e,t){if(t)return t.map(function(t,n){var r=y["default"].getIndexName(t);return u["default"].createElement("div",{key:e+n},r)})},getEditorValue:function(){return this.refs.field.getValue()},getEditor:function(){return this.refs.field.getEditor()},hasErrors:function(){return this.getEditor().hasErrors()}}),A=u["default"].createClass({displayName:"MangoIndexEditorController",getInitialState:function(){return this.getStoreState()},getStoreState:function(){return{queryIndexCode:w.getQueryIndexCode(),database:w.getDatabase()}},onChange:function(){this.setState(this.getStoreState())},componentDidMount:function(){w.on("change",this.onChange,this)},componentWillUnmount:function(){w.off("change",this.onChange)},getMangoEditor:function(){return this.refs.mangoEditor},render:function(){return u["default"].createElement(S,{ref:"mangoEditor",description:this.props.description,dbName:this.state.database.id,onSubmit:this.saveQuery,title:"Index",docs:x("MANGO_INDEX"),exampleCode:this.state.queryIndexCode,confirmbuttonText:"Create Index"})},saveQuery:function(e){return e.preventDefault(),this.getMangoEditor().hasErrors()?void s["default"].addNotification({msg:"Please fix the Javascript errors and try again.",type:"error",clear:!0}):void p["default"].saveQuery({database:this.state.database,queryCode:this.getMangoEditor().getEditorValue()})}}),T={MangoIndexEditorController:A,MangoQueryEditorController:k};t["default"]=T},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(99),o=r(i),a=n(798),s=r(a),l={index:{fields:["_id"]},type:"json"},u={selector:{_id:{$gt:null}}},c={};c.MangoStore=o["default"].Store.extend({initialize:function(){this._queryFindCode=u,this._queryIndexCode=l,this._queryFindCodeChanged=!1,this._availableIndexes=[],this._getLoadingIndexes=!0},getQueryIndexCode:function(){return this.formatCode(this._queryIndexCode)},setQueryIndexCode:function(e){this._queryIndexCode=e.code},getQueryFindCode:function(){return this.formatCode(this._queryFindCode)},setQueryFindCode:function(e){this._queryFindCode=e.code},getLoadingIndexes:function(){return this._getLoadingIndexes},setLoadingIndexes:function(e){this._getLoadingIndexes=e.isLoading},formatCode:function(e){return JSON.stringify(e,null,"  ")},newQueryFindCodeFromFields:function(e){var t,n=e.fields,r=JSON.parse(JSON.stringify(this._queryFindCode));n&&(t=n.reduce(function(e,t){return e[t]={$gt:null},e},{}),r.selector=t,this._queryFindCode=r,this._queryFindCodeChanged=!0)},getQueryFindCodeChanged:function(){return this._queryFindCodeChanged},setDatabase:function(e){this._database=e.database},getDatabase:function(){return this._database},setAvailableIndexes:function(e){this._availableIndexes=e.indexList},getAvailableQueryIndexes:function(){return this._availableIndexes.filter(function(e){return["json","special"].indexOf(e.get("type"))!==-1})},getAvailableAdditionalIndexes:function(){var e=o["default"].getExtensions("mango:additionalIndexes")[0];if(e)return this._availableIndexes.filter(function(t){return t.get("type").indexOf(e.type)!==-1})},dispatch:function(e){switch(e.type){case s["default"].MANGO_SET_DB:this.setDatabase(e.options);break;case s["default"].MANGO_NEW_QUERY_CREATE_INDEX_CODE:this.setQueryIndexCode(e.options);break;case s["default"].MANGO_NEW_QUERY_FIND_CODE_FROM_FIELDS:this.newQueryFindCodeFromFields(e.options);break;case s["default"].MANGO_NEW_QUERY_FIND_CODE:this.setQueryFindCode(e.options);break;case s["default"].MANGO_NEW_AVAILABLE_INDEXES:this.setAvailableIndexes(e.options);break;case s["default"].MANGO_RESET:this.setLoadingIndexes(e.options)}this.triggerChange()}}),c.mangoStore=new c.MangoStore,c.mangoStore.dispatchToken=o["default"].dispatcher.register(c.mangoStore.dispatch),t["default"]=c},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]={MANGO_SET_DB:"MANGO_SET_DB",MANGO_NEW_QUERY_FIND_CODE_FROM_FIELDS:"MANGO_NEW_QUERY_FIND_CODE_FROM_FIELDS",MANGO_NEW_QUERY_FIND_CODE:"MANGO_NEW_QUERY_FIND_CODE",MANGO_NEW_QUERY_CREATE_INDEX_CODE:"MANGO_NEW_QUERY_CREATE_INDEX_CODE",MANGO_NEW_AVAILABLE_INDEXES:"MANGO_NEW_AVAILABLE_INDEXES",MANGO_RESET:"MANGO_RESET"}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(84),o=(r(i),n(99)),a=r(o),s=n(671),l=r(s),u=n(798),c=r(u),d=n(797),f=r(d),p=n(697),h=r(p),g=n(695),m=r(g);f["default"].mangoStore;t["default"]={setDatabase:function(e){a["default"].dispatch({type:c["default"].MANGO_SET_DB,options:e})},newQueryFindCode:function(e){a["default"].dispatch({type:c["default"].MANGO_NEW_QUERY_FIND_CODE,options:e})},newQueryCreateIndexCode:function(e){a["default"].dispatch({type:c["default"].MANGO_NEW_QUERY_CREATE_INDEX_CODE,options:e})},saveQuery:function(e){var t=JSON.parse(e.queryCode),n=new l["default"].MangoIndex(t,{database:e.database});a["default"].addNotification({msg:"Saving Index for Query...",type:"info",clear:!0}),n.save().then(function(n){var r="#"+a["default"].urls("mango","query-app",e.database.safeID());a["default"].dispatch({type:c["default"].MANGO_NEW_QUERY_FIND_CODE_FROM_FIELDS,options:{fields:t.index.fields}});var i=new l["default"].MangoIndexCollection(null,{database:e.database,params:null,paging:{pageSize:h["default"].indexResultsStore.getPerPage()}});this.getIndexList({indexList:i}).then(function(){m["default"].reloadResultsList(),a["default"].addNotification({msg:'Index is ready for querying. <a href="'+r+'">Run a Query.</a>',type:"success",clear:!0,escape:!1})}.bind(this))}.bind(this)).fail(function(e){a["default"].addNotification({msg:e.responseJSON.reason,type:"error",clear:!0})})},mangoResetIndexList:function(e){a["default"].dispatch({type:c["default"].MANGO_RESET,options:e})},getIndexList:function(e){return a["default"].dispatch({type:c["default"].MANGO_NEW_AVAILABLE_INDEXES,options:e}),e.indexList.fetch({reset:!0}).then(function(){this.mangoResetIndexList({isLoading:!1})}.bind(this),function(){a["default"].addNotification({msg:"Bad request!",type:"error",clear:!0})})}}},function(e,t,n){var r=n(801);"string"==typeof r&&(r=[[e.id,r,""]]);n(288)(r,{});r.locals&&(e.exports=r.locals)},function(e,t,n){t=e.exports=n(275)(),t.push([e.id,'.clearfix{*zoom:1}.clearfix:after,.clearfix:before{display:table;content:"";line-height:0}.clearfix:after{clear:both}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.input-block-level{display:block;width:100%;min-height:30px;box-sizing:border-box}.tray-appear,.tray-enter{opacity:.01;animation:slidefadeIn .2s ease-in;-webkit-animation:slidefadeIn .2s ease-in}.tray-appear.tray-appear-active,.tray-enter.tray-enter-active{opacity:1}@keyframes slidefadeIn{0%{opacity:.01;top:30px}to{opacity:1;top:55px}}@keyframes slidefadeOut{0%{opacity:1;top:55px}to{opacity:.01;top:30px}}.tray-leave{opacity:1;animation:slidefadeOut .2s ease-out;-webkit-animation:slidefadeOut .2s ease-out}.tray-leave.tray-leave-active{opacity:0}#query-options-tray:before{right:180px}#query-options-tray{width:490px;padding-top:6px}#query-options-tray .query-group:first-child{margin-top:0;padding-top:0}#query-options-tray .icon-question-sign{margin-left:3px;font-size:17.5px}#query-options-tray .query-group{padding:20px;border-bottom:1px solid #555}#query-options-tray .query-group:last-child{border-bottom:none}#query-options-tray .controls-group,#query-options-tray .controls-group:last-child{margin:0}#query-options-tray form{overflow:auto;margin-bottom:0}#query-options-tray form .dropdown.inline{display:inline-block}#query-options-tray form #keys-input{resize:none}#query-options-tray form #qoGroupLevelGroup{width:34%}#query-options-tray form .input-small{width:74px;margin-left:5px}#query-options-tray form .checkbox{padding:0;margin:0}#query-options-tray form .btn-success{border-radius:5px}#query-options-tray form .btn-cancel,#query-options-tray form .btn-cancel:active{background:none;border:none;box-shadow:none;color:#9d261d;line-height:1em}#query-options-tray form select{margin-top:-4px;margin-bottom:0}#query-options-tray form .include-end-key-row{line-height:20px;margin-left:8px}#query-options-tray .toggle-btns .btn{padding:5px 12px;background:#727a82;color:#fff;font-size:12px;border:none}#query-options-tray .toggle-btns .btn.active{background:#fff;color:#005580;box-shadow:inset 2px 2px 0 rgba(0,0,0,.25),2px 2px 2px rgba(0,0,0,.15)}#query-options-tray .toggle-btns label:first-child{border-radius:5px 0 0 5px}#query-options-tray .toggle-btns label:last-child{border-radius:0 5px 5px 0;margin-left:1px}#query-options-tray label{margin-right:0;font-size:13px;-webkit-user-select:none}#query-options-tray label.disabled{color:#777}#query-options-tray div.controls-group.well{height:156px;background:none;border:none;padding:10px 0}#query-options-tray .row-fluid.fieldsets .inline{width:32%}#query-options-tray .row-fluid.fieldsets .inline:nth-child(3){text-align:right;width:34%}#query-options-tray .qo-main-fields-row .row-fluid.fieldsets .inline:nth-child(2){width:30%}#query-options-tray .qo-main-fields-row .row-fluid.fieldsets .inline:nth-child(3){text-align:right;width:36%}#query-options-tray .row-fluid.fieldsets{margin-bottom:5px}#query-options-tray .row-fluid.fieldsets :last-child{margin-bottom:2px}#query-options-tray #skipRows{margin-left:5px}#query-options-tray .add-on{height:28px}#query-options-tray .hide{display:none}#query-options-tray .icon-question-sign:hover{color:#005580}#query-options-tray .additionalParams{margin-bottom:2px}.define-view{padding:15px}.define-view .help-link{margin-left:4px}.define-view .design-doc-group #new-ddoc-section{margin-top:24px}.define-view .design-doc-group #new-ddoc-section label{padding-top:12px}.mango-editor-wrapper label{font-size:16px;margin-right:0}.mango-editor-wrapper .bordered-box{border-bottom:1px solid #ccc}.mango-editor-wrapper .padded-box{margin:25px 30px}.mango-editor-wrapper .db-title{color:#9d261d;line-height:30px}.mango-editor-wrapper #index-name{height:46px;width:200px}.mango-editor-wrapper .new-ddoc-input{margin-top:25px;height:46px}.mango-editor-wrapper pre.prettyprint-left{padding:5px}.mango-editor-wrapper form{padding-bottom:50px}.mango-editor-wrapper a.edit-link{float:right}.mango-editor-wrapper .help-link{margin-left:4px}.row-fluid{width:100%;*zoom:1}.row-fluid:after,.row-fluid:before{display:table;content:"";line-height:0}.row-fluid:after{clear:both}.row-fluid [class*=span]{display:block;width:100%;min-height:30px;box-sizing:border-box;float:left;margin-left:0;*margin-left:-.05319149%}.row-fluid .controls-row [class*=span]+[class*=span],.row-fluid [class*=span]:first-child{margin-left:0}.row-fluid .span12{width:100%;*width:99.94680851%}.row-fluid .span11{width:91.66666667%;*width:91.61347518%}.row-fluid .span10{width:83.33333333%;*width:83.28014184%}.row-fluid .span9{width:75%;*width:74.94680851%}.row-fluid .span8{width:66.66666667%;*width:66.61347518%}.row-fluid .span7{width:58.33333333%;*width:58.28014184%}.row-fluid .span6{width:50%;*width:49.94680851%}.row-fluid .span5{width:41.66666667%;*width:41.61347518%}.row-fluid .span4{width:33.33333333%;*width:33.28014184%}.row-fluid .span3{width:25%;*width:24.94680851%}.row-fluid .span2{width:16.66666667%;*width:16.61347518%}.row-fluid .span1{width:8.33333333%;*width:8.28014184%}.row-fluid .offset12,.row-fluid .offset12:first-child{margin-left:100%;*margin-left:99.89361702%}.row-fluid .offset11,.row-fluid .offset11:first-child{margin-left:91.66666667%;*margin-left:91.56028369%}.row-fluid .offset10,.row-fluid .offset10:first-child{margin-left:83.33333333%;*margin-left:83.22695035%}.row-fluid .offset9,.row-fluid .offset9:first-child{margin-left:75%;*margin-left:74.89361702%}.row-fluid .offset8,.row-fluid .offset8:first-child{margin-left:66.66666667%;*margin-left:66.56028369%}.row-fluid .offset7,.row-fluid .offset7:first-child{margin-left:58.33333333%;*margin-left:58.22695035%}.row-fluid .offset6,.row-fluid .offset6:first-child{margin-left:50%;*margin-left:49.89361702%}.row-fluid .offset5,.row-fluid .offset5:first-child{margin-left:41.66666667%;*margin-left:41.56028369%}.row-fluid .offset4,.row-fluid .offset4:first-child{margin-left:33.33333333%;*margin-left:33.22695035%}.row-fluid .offset3,.row-fluid .offset3:first-child{margin-left:25%;*margin-left:24.89361702%}.row-fluid .offset2,.row-fluid .offset2:first-child{margin-left:16.66666667%;*margin-left:16.56028369%}.row-fluid .offset1,.row-fluid .offset1:first-child{margin-left:8.33333333%;*margin-left:8.22695035%}.index-cancel-link{margin-left:10px;font-size:14px}.fade{transition:opacity .25s ease-in-out;-moz-transition:opacity .25s ease-in-out;-webkit-transition:opacity .25s ease-in-out}.fadeIn{opacity:1}.fadeOut{opacity:0}@-webkit-keyframes errorBlinkBG{0%{background:#9d261d}to{background:#fff}}@keyframes errorBlinkBG{0%{background:#9d261d}to{background:#fff}}@-webkit-keyframes slideDown{0%{opacity:0;max-height:0}to{opacity:1;max-height:1000px}}@keyframes slideDown{0%{opacity:0;max-height:0}to{opacity:1;max-height:1000px}}@-webkit-keyframes slideUp{0%{max-height:1000px;opacity:1}to{max-height:0;opacity:0}}@keyframes slideUp{0%{max-height:1000px;opacity:1}to{max-height:0;opacity:0}}.highlight{-webkit-animation:highlight-element 2.5s 1;-moz-animation:highlight-element 2.5s 1}@-webkit-keyframes highlight-element{0%{background-color:#bbb}to{background-color:#f1f1f1}}.change-box{margin:0 20px 20px}.change-wrapper{margin-top:20px;border-bottom:1px solid #ddd}.change-wrapper:last-child{border-bottom:none}.change-wrapper .row-fluid{padding:4px 0}.change-wrapper .row-fluid:first{padding:0 0 4px}.change-wrapper a:hover.js-copy{text-decoration:none}.change-wrapper .js-json-container{display:none}.change-wrapper .span2{font-weight:700}.change-wrapper .clipboard-copy-element{color:#666}.changes-header{text-align:center;padding:26px 20px 0;border-bottom:1px solid #999}.changes-header .label{float:left;margin-right:5px}.changes-header fieldset{text-align:left;display:inline-block;position:relative}.changes-header fieldset .btn-info{padding:12px}.changes-header .fonticon-filter{position:absolute;left:-25px;top:10px;color:#777;font-size:20px}.changes-header form{margin:0}.changes-header .help-block{margin-bottom:0;padding-bottom:0}.changes-header .component-badgelist li{margin:20px 0}.changes-header .remove-filter{text-shadow:none;background-color:transparent;font-size:20px;margin-top:-3px;padding-left:0;margin-right:8px}.changes-header .remove-filter:hover{color:#111}.changes-tab-content{padding-top:70px}#dashboard-upper-content .changes-header-section .tab-content{padding:0;overflow:hidden}@-webkit-keyframes slideDownChangesFilter{0%{opacity:0;height:0}to{opacity:1;height:160px}}@keyframes slideDownChangesFilter{0%{opacity:0;height:0}to{opacity:1;height:160px}}@-webkit-keyframes slideUpChangesFilter{0%{opacity:1;height:160px}to{opacity:0;height:0}}@keyframes slideUpChangesFilter{0%{opacity:1;height:160px}to{opacity:0;height:0}}.toggle-changes-filter-enter{-webkit-animation:slideDownChangesFilter 1s both;animation:slideDownChangesFilter 1s both}.toggle-changes-filter-leave{-webkit-animation:slideUpChangesFilter 1s both;animation:slideUpChangesFilter 1s both}.toggle-changes-code-enter{-webkit-animation:slideDown .6s both;animation:slideDown .6s both}.toggle-changes-code-leave{-webkit-animation:slideUp .6s both;animation:slideUp .6s both}.changes-result-limit{margin-left:20px}.new-change-row{-webkit-animation:slideDown 1.5s both,highlight-element 2s 1}.no-doc-changes{padding:30px 0}#sidebar-content .loading-lines{margin-top:20px}.sidenav a{text-decoration:none}.sidenav .nav-list .active>a{text-shadow:none;background-color:#f1f0f1;color:#af2d24}.sidenav .nav-list .active>a:hover{color:#fff}.sidenav .dropdown-toggle:hover{color:#08c}.sidenav .accordion-list-item:hover+div.add-dropdown .dropdown-toggle,.sidenav .accordion-list-item:hover+span.index-menu-toggle,.sidenav .nav-list>li a:hover+div.add-dropdown .dropdown-toggle,.sidenav .nav-list>li a:hover+span.index-menu-toggle{color:#fff}.sidenav li{position:relative}.sidenav li a{text-shadow:none}.sidenav .design-doc-section{border-bottom:1px solid #d3d7db}.sidenav .design-doc-section .accordion-list-item:hover .fonticon-play,.sidenav .design-doc-section .accordion-list-item:hover p{color:#fff}.sidenav .design-doc-section .accordion-list-item:hover p{background-color:#af2d24}.sidenav .design-doc-section .accordion-list-item p{-webkit-transition:all .25s linear;transition:all .25s linear}.sidenav .design-doc-section .fonticon-play{font-size:12px;top:12px;left:12px}.sidenav .design-doc-section.down .fonticon-play{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.sidenav .design-doc-section .add-dropdown{right:15px}.sidenav li.nav-header .index-list li a{padding-left:46px}.sidenav li.nav-header{margin-top:0;position:relative}.sidenav li.nav-header .design-doc-body.in{border-bottom:1px solid #d3d7db}.sidenav li.nav-header .accordion-body{color:#eee;margin-left:0}.sidenav li.nav-header .accordion-body li{cursor:pointer}.sidenav li.nav-header .accordion-body li.active>a{background-color:#f1f0f1}.sidenav li.nav-header .accordion-body li>a.down .fonticon-play{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.sidenav li.nav-header .accordion-body li:hover .fonticon-play{color:#ddd}.sidenav li.nav-header .accordion-body li a{font-size:14px;background-color:rgba(0,0,0,.02);border-top:none}.sidenav li.nav-header .accordion-body li a:hover{color:#fff;text-decoration:none;background-color:#af2d24}.sidenav li.nav-header .accordion-body li a.accordion-header{padding:8px 5px 8px 36px}.sidenav li.nav-header .toggle-view{padding:4px 5px 4px 36px}.sidenav li.nav-header .fonticon-play{font-size:8px;top:11px;left:15px;color:#767f89;position:absolute;display:block;vertical-align:bottom;-webkit-transition:all .25s linear;transition:all .25s linear}.sidenav li.nav-header .fonticon:before{margin-right:6px;font-size:20px;top:3px;position:relative}.sidenav li.nav-header .accordion-header:hover .fonticon-play{color:#fff}.sidenav .design-doc-name{cursor:pointer;margin:0;color:#222}.sidenav .design-doc-name span{width:300px;display:block;padding:10px 13px 10px 36px;text-overflow:ellipsis;overflow:hidden}.sidenav .index-group-header{font-weight:700}.sidenav li.nav-header .index-menu-toggle.fonticon{position:absolute;top:0;right:0;color:#767f89;height:30px;width:40px;padding-top:2px;padding-left:4px;-webkit-transition:all .25s linear;transition:all .25s linear}.sidenav li.nav-header .index-menu-toggle.fonticon:hover{color:#08c}.sidenav li.nav-header .index-menu-toggle.fonticon:before{font-size:17px;margin-right:0}#index-menu-component-popover{border-radius:0;box-shadow:2px 2px rgba(0,0,0,.2);background-color:#000;color:#ddd;font-size:12px;padding:0;margin-left:-7px;margin-top:5px}#index-menu-component-popover ul{list-style-type:none;margin:0}#index-menu-component-popover li{padding:10px;background-color:#202326;margin-bottom:2px;cursor:pointer;-webkit-transition:all .25s linear;transition:all .25s linear}#index-menu-component-popover li:hover{background-color:#af2d24}#index-menu-component-popover li:last-child{margin-bottom:0}#index-menu-component-popover .arrow:after{border-bottom-color:#000;border-top-color:#000}#index-menu-component-popover .fonticon{margin-right:7px}#index-menu-component-popover .popover-content{padding:0}.clone-index-modal .modal-body{padding:20px}.clone-index-modal .btn-success,.clone-index-modal .modal-title,.clone-index-modal .new-index-title-label{text-transform:capitalize}.clone-index-modal .styled-select,.clone-index-modal select{width:230px}.clone-index-modal .row{margin:0;padding-top:10px}.clone-index-modal .row #new-ddoc-section{width:262px}.clone-index-modal .row #new-ddoc-section label{width:40px;margin-top:27px;float:left}.clone-index-modal .row #new-ddoc-section div.controls{margin-left:0;float:right;margin-top:15px}.document-result-screen .bulk-action-component{padding-bottom:15px}.document-result-screen .loading-lines-wrapper{margin-left:auto;margin-right:auto;width:80px}.document-result-screen .loading-lines{position:absolute}.no-results-screen{position:absolute;margin:-15px;top:50%;margin-top:-125px;width:100%}.no-results-screen h3{border-top:1px solid #ccc;height:45px;font-size:20px;font-weight:400;width:400px;text-align:center;padding-top:8px;margin:0 auto}.watermark-logo{background:transparent url('+n(802)+") no-repeat 50% 50%;height:205px;text-align:center;margin:0 20%}.watermark-logo .preview{margin:0 10px}.table-view-docs{position:absolute;margin-top:30px}.table-view-docs .bulk-action-component{padding-bottom:0;min-height:0}.table-view-docs .bulk-action-component-panel input{width:auto}.table-view-docs .tableview-data-cell-id a{color:#08c}.table-view-docs .tableview-data-cell-id div:first-of-type{font-weight:700}.table-view-docs .tableview-data-cell-id div{text-overflow:ellipsis;overflow:hidden}.table-view-docs td,.table-view-docs td a,.table-view-docs th{vertical-align:middle;line-height:20px;font-size:14px}.table-view-docs td{height:49px}.table-view-docs td,.table-view-docs th{color:#333;max-width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.table-view-docs td.tableview-checkbox-cell,.table-view-docs th.tableview-header-el-checkbox{width:68px}.table-view-docs .tableview-conflict{color:red}.table-view-docs .icon-code-fork{padding-right:2px;color:red}.table-view-docs .tableview-el-last{width:75px}.table-view-docs .tableview-el-copy{width:35px}.table-view-docs thead input{max-width:138px;width:100%;overflow:visible}.table-view-docs .table-dropdown-item{padding:2px 6px;cursor:pointer;background:#2b2f33;color:#fff;margin:0 2px}.table-view-docs .table-dropdown-item-highlight{background:#e23632}.table-view-docs .icon.icon-filter{position:absolute;right:6px;top:6px;pointer-events:none;color:#999}.table-view-docs .table-container-autocomplete{position:relative;width:128px;height:29px}.table-view-docs th{overflow:visible}.table-view-docs .table-container-autocomplete .table-select-wrapper{width:inherit;overflow:visible;min-height:300px}.document-result-screen .table-bulkselector-section{width:300px}.document-result-screen .table-bulkselector-section .bulk-action-component{float:left}#dashboard.doc-editor-page{background-color:#4d4d4d}#dashboard.doc-editor-page #dashboard-content{padding-bottom:0;top:0}#editor-container,#editor-container>div:not(.loading-lines),#editor-container>div>div{height:100%}.doc-editor-page{border-left:none}.doc-editor-page .loading-lines{margin-top:30px}.doc-editor-page .loading-lines div{background-color:#fff}.doc-editor-page #breadcrumbs{white-space:nowrap}.doc-editor-page #doc-editor-actions-panel{position:absolute;top:64px;right:0;left:0;width:100%;background-color:#f1f1f1;height:61px}.doc-editor-page#dashboard>header{z-index:2}.doc-editor-page#dashboard>header>div{box-shadow:none}.doc-editor-page #editor-container{margin-top:0;font-size:13px}.doc-editor-page #editor-container .ace_editor{line-height:22px}.doc-editor-page .doc-actions-left{float:left;padding:9px 0}.doc-editor-page .doc-actions-left button{margin:0 10px 0 30px}.doc-editor-page .doc-actions-left div{display:inline-block}.doc-editor-page .cancel-button{font-size:14px}.doc-editor-page .bgEditorGutter{width:49px;position:absolute;top:0;bottom:0;background-color:#3b3b3b}.doc-editor-page .panel-button{border:0;background-color:#f1f1f1;padding:11px;color:#555}.doc-editor-page .panel-button span:first-of-type{margin-left:4px}.doc-editor-page .panel-button .icon{font-size:18px}.doc-editor-page .panel-button .button-text{padding-right:5px}.doc-editor-page .panel-section{border-left:1px solid #ccc;text-align:center;padding:9px 0;display:inline-block}.doc-editor-page .panel-section.open .dropdown-toggle,.doc-editor-page .panel-section:active{box-shadow:none;background-color:inherit}.doc-editor-page .alignRight{text-align:right;font-size:0}.doc-editor-page .row-fluid.content-area{background-color:#4d4d4d}.doc-editor-page .ace_gutter-cell,.doc-editor-page .ace_gutter-layer{min-width:49px}.doc-editor-page .ace_marker-layer .ace_bracket{margin:0;border:1px solid #999}@media screen and (max-width:1000px){.doc-editor-page .panel-button span{display:none}}@media screen and (max-width:835px){.doc-editor-page #api-navbar{display:none}}.doc-editor-page #dashboard-content .code-region{overflow-y:hidden;position:absolute;top:125px;height:auto;width:100%;padding:0;left:0;right:0;bottom:0}.upload-file-modal input[type=file]{margin-top:10px;height:inherit;line-height:inherit}.view-attachments-section .dropdown-menu{max-width:540px;text-align:left;overflow:hidden}#editor-container div.string-editor-modal{height:inherit;max-height:600px}.attachment-delimiter{color:#999;margin:0 4px}#react-headerbar .control-toggle-include-docs{border-right:1px solid #ccc}#react-headerbar .control-toggle-include-docs .icon-check:before{margin:6px 6px 0 0}#react-headerbar .control-toggle-include-docs .icon-check-empty:before{margin:6px 9px 0 0}div#dashboard-content div.revision-wrapper{padding:0 0 15px;margin-top:60px}div#dashboard-content div.revision-wrapper .rev-subtree-selector{font-family:monospace;margin-bottom:20px}div#dashboard-content div.revision-wrapper .left-area{text-align:center}div#dashboard-content div.revision-wrapper .ours-rev{font-size:16px;color:#fff;text-align:center;margin-top:15px}div#dashboard-content div.revision-wrapper .revision-browser-controls{color:#fff;margin:30px 0}div#dashboard-content div.revision-wrapper .revision-browser-controls .Select .Select-control{border-radius:inherit;border-color:#ccc}div#dashboard-content div.revision-wrapper .revision-browser-controls .Select .is-focused:not(.is-open)>.Select-control{box-shadow:transparent;border-color:#ccc}div#dashboard-content div.revision-wrapper .revision-browser-controls .Select .Select-menu-outer{border-radius:inherit}div#dashboard-content div.revision-wrapper .revision-browser-controls .Select div.Select-placeholder{color:#9d261d}div#dashboard-content div.revision-wrapper .revision-view-controls{border-top:1px solid grey;text-align:center}div#dashboard-content div.revision-wrapper .revision-split-area{padding:20px 15px;display:-ms-flexbox;display:flex;color:#fff}div#dashboard-content div.revision-wrapper .conflicting-revs-dropdown{max-width:370px;display:-ms-flexbox;display:flex;margin-left:-17px}div#dashboard-content div.revision-wrapper .revision-split-area pre{border:none;background-color:transparent}div#dashboard-content div.revision-wrapper .revision-diff-area{color:#fff;margin-left:60px}div#dashboard-content div.revision-wrapper .revision-diff-area .jsondiffpatch-unchanged,div#dashboard-content div.revision-wrapper .revision-diff-area .jsondiffpatch-unchanged pre{color:#fff;background-color:transparent;border:none}div#dashboard-content div.revision-wrapper .revision-diff-area .jsondiffpatch-added,div#dashboard-content div.revision-wrapper .revision-diff-area .jsondiffpatch-deleted{color:#000}div#dashboard-content div.revision-wrapper .jsondiffpatch-deleted .jsondiffpatch-property-name,div#dashboard-content div.revision-wrapper .jsondiffpatch-deleted pre,div#dashboard-content div.revision-wrapper .jsondiffpatch-textdiff-deleted,div#dashboard-content div.revision-wrapper .revision-diff-area .jsondiffpatch-modified .jsondiffpatch-left-value pre{text-decoration:none}div#dashboard-content div.revision-wrapper .two-sides-toggle-button{z-index:0}button.beautify{margin-top:20px}.toggle-btns label{margin-right:0}#per-page{float:right}#per-page #select-per-page{margin-top:10px;width:60px}#query div.controls-group.well{height:180px;margin-right:17px}.design-doc-group .span3{margin:0}.design-doc-group #new-ddoc-section{margin-top:10px;width:325px}.design-doc-group #new-ddoc-section label{width:100px}.design-doc-group #new-ddoc-section .controls{margin-left:100px}#map-function,#reduce-function{width:100%;font-size:13px;line-height:22px}.metadata-page{font-size:14px;padding:20px}.metadata-page .preheading{font-size:14px}.metadata-page h2{margin:5px 0 15px}.metadata-page h3{font-size:22px;margin-top:12px}.metadata-page header{border-bottom:1px solid #ccc;padding-bottom:10px}.metadata-page .icon-question-sign{margin-left:4px}.metadata-page section{line-height:21px;width:100%}.metadata-page section ul{list-style-type:none;margin:0 0 15px;padding:0}.metadata-page section .item-title{margin-right:6px}button.delete{margin-left:4px}button.string-edit{position:absolute;padding:0;z-index:1000;width:20px;left:22px}button.string-edit i.icon{margin-right:0}button.string-edit[disabled]{display:none}#string-edit-modal div.modal{overflow-x:visible;width:auto;min-width:560px}#string-editor-wrapper{height:500px;width:100%}#string-editor-wrapper>div{height:100%}#keys-input{width:100%}#keys-error{display:inline-block}.change-sequence{word-wrap:break-word}#dashboard-upper-content .js-query-keys-wrapper{padding-top:0}#dashboard-upper-content .custom-inputs .row-fluid{padding-top:20px}#dashboard-upper-content .custom-inputs .row-fluid .checkbox,#dashboard-upper-content .custom-inputs .row-fluid .radio{padding-left:0}#dashboard-upper-content .custom-inputs .row-fluid #skipRows,#dashboard-upper-content .custom-inputs .row-fluid .checkbox.inline{margin-bottom:0;padding:6px}.nav-list{border-top:none}.end-of-results{margin-bottom:30px}.end-of-results .muted{margin-bottom:0}body #dashboard #react-headerbar{float:left;overflow:hidden}.doc-editor-extension-icons{display:inline-block}.pagination-footer .footer-table-control label{margin:0;padding:0;line-height:normal}.pagination-footer .footer-table-control{float:right;display:inline-block;margin:17px 40px 17px 20px}.pagination-footer .footer-table-control input{margin:0 5px 0 15px}.pagination-footer .footer-doc-control-prioritized-wrapper{margin-right:18px}.pagination-footer .page-controls{border-right:1px solid #ccc}",""]);
},function(e,t,n){e.exports=n.p+"dashboard.assets/img/couch-watermark.png"},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(84),o=(r(i),n(99)),a=r(o),s=n(804),l=r(s);n(815),l["default"].initialize=function(){a["default"].addHeaderLink({title:"Setup",href:"#setup",icon:"fonticon-wrench"})},t["default"]=l["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(84),o=r(i),a=n(99),s=r(a),l=n(805),u=r(l),c=n(806),d=r(c),f=n(807),p=r(f),h=n(813),g=r(h),m=s["default"].RouteObject.extend({layout:"one_pane",roles:["_admin"],routes:{setup:"setupInitView","setup/finish":"finishView","setup/singlenode":"setupSingleNode","setup/multinode":"setupMultiNode"},crumbs:[{name:"Setup "+o["default"].i18n.en_US["couchdb-productname"]}],apiUrl:function(){return[this.setupModel.url("apiurl"),this.setupModel.documentation]},initialize:function(){this.setupModel=new u["default"].Model},setupInitView:function(){g["default"].fetchNodes(),p["default"].getClusterStateFromCouch(),this.setComponent("#dashboard-content",d["default"].SetupFirstStepController)},setupSingleNode:function(){g["default"].fetchNodes(),this.setComponent("#dashboard-content",d["default"].SetupSingleNodeController)},setupMultiNode:function(){g["default"].fetchNodes(),this.setComponent("#dashboard-content",d["default"].SetupMultipleNodesController)},finishView:function(){this.setComponent("#dashboard-content",d["default"].ClusterConfiguredScreen)}});u["default"].RouteObjects=[m],t["default"]=u["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(84),o=r(i),a=n(99),s=r(a),l=s["default"].addon();l.Model=Backbone.Model.extend({documentation:o["default"].host+"/_utils/docs",url:function(e){return"apiurl"===e?window.location.origin+"/_cluster_setup":"/_cluster_setup"},validate:function(e){return e.username?e.password?e.bind_address&&"127.0.0.1"===e.bind_address?"Bind address can not be 127.0.0.1":e.port&&_.isNaN(+e.port)?"Bind port must be a number":void 0:"Admin password is required":"Admin name is required"}}),t["default"]=l},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(84),o=r(i),a=n(99),s=r(a),l=n(106),u=r(l),c=n(293),d=r(c),f=n(807),p=r(f),h=n(812),g=r(h),m=g["default"].setupStore,v=d["default"].ConfirmButton,b=u["default"].createClass({displayName:"ClusterConfiguredScreen",render:function(){return u["default"].createElement("div",{className:"setup-screen"},o["default"].i18n.en_US["couchdb-productname"]," is configured for production usage!",u["default"].createElement("br",null),u["default"].createElement("br",null),"Do you want to ",u["default"].createElement("a",{href:"#replication"},"replicate data"),"?")}}),y=u["default"].createClass({displayName:"SetupCurrentAdminPassword",render:function(){var e="Your current Admin Username & Password";return this.props.adminParty&&(e="Admin Username & Password that you want to use"),u["default"].createElement("div",{className:"setup-creds"},u["default"].createElement("div",null,u["default"].createElement("h2",null,"Specify Credentials"),e),u["default"].createElement("input",{className:"setup-username",onChange:this.props.onAlterUsername,placeholder:"Admin Username",type:"text"}),u["default"].createElement("input",{className:"setup-password",onChange:this.props.onAlterPassword,placeholder:"Admin Password",type:"password"}))}}),w=u["default"].createClass({displayName:"SetupOptionalSettings",getInitialState:function(){return{ipValue:this.props.ipInitialValue,portValue:this.props.portValue}},handleIpChange:function(e){this.props.onAlterBindAddress(e),this.setState({ipValue:e.target.value})},handlePortChange:function(e){this.props.onAlterPort(e),this.setState({portValue:e.target.value})},render:function(){return u["default"].createElement("div",{className:"setup-opt-settings"},u["default"].createElement("h2",null,"IP"),"Bind address to listen on",u["default"].createElement("br",null),u["default"].createElement("input",{className:"setup-input-ip",value:this.state.ipValue,onChange:this.handleIpChange,defaultValue:"0.0.0.0",type:"text"}),u["default"].createElement("div",{className:"setup-port"},u["default"].createElement("h2",null,"Port"),"Port that the Node uses ",u["default"].createElement("br",null),u["default"].createElement("input",{className:"setup-input-port",value:this.state.portValue,onChange:this.handlePortChange,defaultValue:"5984",type:"text"})))}}),x=u["default"].createClass({displayName:"SetupMultipleNodesController",getInitialState:function(){return this.getStoreState()},getStoreState:function(){return{nodeList:m.getNodeList(),isAdminParty:m.getIsAdminParty(),remoteAddress:m.getAdditionalNode().remoteAddress}},componentDidMount:function(){this.isAdminParty=m.getIsAdminParty(),m.on("change",this.onChange,this)},componentWillUnmount:function(){m.off("change",this.onChange)},onChange:function(){this.isMounted()&&this.setState(this.getStoreState())},getNodeList:function(){return this.state.nodeList.map(function(e,t){return u["default"].createElement("div",{key:t,className:"node-item"},e.remoteAddress,":",e.port)},this)},addNode:function(){p["default"].addNode(this.isAdminParty)},alterPortAdditionalNode:function(e){p["default"].alterPortAdditionalNode(e.target.value)},alterBindAddressAdditionalNode:function(e){p["default"].alterBindAddressAdditionalNode(e.target.value)},alterRemoteAddressAdditionalNode:function(e){p["default"].alterRemoteAddressAdditionalNode(e.target.value)},alterUsername:function(e){p["default"].setUsername(e.target.value)},alterPassword:function(e){p["default"].setPassword(e.target.value)},alterBindAddressSetupNode:function(e){p["default"].setBindAddressForSetupNode(e.target.value)},alterPortSetupNode:function(e){p["default"].setPortForSetupNode(e.target.value)},finishClusterSetup:function(){p["default"].finishClusterSetup("CouchDB Cluster set up!")},render:function(){return u["default"].createElement("div",{className:"setup-nodes"},"Setup your initial base-node, afterwards add the other nodes that you want to add",u["default"].createElement("div",{className:"setup-setupnode-section"},u["default"].createElement(y,{onAlterUsername:this.alterUsername,onAlterPassword:this.alterPassword,adminParty:this.state.isAdminParty}),u["default"].createElement(w,{onAlterPort:this.alterPortSetupNode,onAlterBindAddress:this.alterBindAddressSetupNode})),u["default"].createElement("hr",null),u["default"].createElement("div",{className:"setup-add-nodes-section"},u["default"].createElement("h2",null,"Add Nodes"),"Remote host ",u["default"].createElement("br",null),u["default"].createElement("input",{value:this.state.remoteAddress,onChange:this.alterRemoteAddressAdditionalNode,className:"input-remote-node",type:"text",placeholder:"127.0.0.1"}),u["default"].createElement(w,{onAlterPort:this.alterPortAdditionalNode,onAlterBindAddress:this.alterBindAddressAdditionalNode}),u["default"].createElement("div",{className:"setup-add-button"},u["default"].createElement(v,{onClick:this.addNode,showIcon:!1,id:"setup-btn-no-thanks",text:"Add Node"}))),u["default"].createElement("div",{className:"setup-nodelist"},this.getNodeList()),u["default"].createElement("div",{className:"centered setup-finish"},u["default"].createElement(v,{onClick:this.finishClusterSetup,showIcon:!1,text:"Configure Cluster"})))}}),_=u["default"].createClass({displayName:"SetupSingleNodeController",getInitialState:function(){return this.getStoreState()},getStoreState:function(){return{isAdminParty:m.getIsAdminParty()}},componentDidMount:function(){m.on("change",this.onChange,this)},componentWillUnmount:function(){m.off("change",this.onChange)},onChange:function(){this.isMounted()&&this.setState(this.getStoreState())},alterUsername:function(e){p["default"].setUsername(e.target.value)},alterPassword:function(e){p["default"].setPassword(e.target.value)},alterBindAddress:function(e){p["default"].setBindAddressForSetupNode(e.target.value)},alterPort:function(e){p["default"].setPortForSetupNode(e.target.value)},render:function(){return u["default"].createElement("div",{className:"setup-nodes"},u["default"].createElement("div",{className:"setup-setupnode-section"},u["default"].createElement(y,{onAlterUsername:this.alterUsername,onAlterPassword:this.alterPassword,adminParty:this.state.isAdminParty}),u["default"].createElement(w,{onAlterPort:this.alterPort,onAlterBindAddress:this.alterBindAddress}),u["default"].createElement(v,{onClick:this.finishSingleNode,text:"Configure Node"})))},finishSingleNode:function(e){e.preventDefault(),p["default"].setupSingleNode()}}),E=u["default"].createClass({displayName:"SetupFirstStepController",getInitialState:function(){return this.getStoreState()},getStoreState:function(){return{clusterState:m.getClusterState()}},componentDidMount:function(){m.on("change",this.onChange,this)},componentWillUnmount:function(){m.off("change",this.onChange)},onChange:function(){this.isMounted()&&this.setState(this.getStoreState())},render:function(){return"cluster_finished"===this.state.clusterState?u["default"].createElement(b,null):u["default"].createElement("div",{className:"setup-screen"},u["default"].createElement("h2",null,"Welcome to ",o["default"].i18n.en_US["couchdb-productname"],"!"),u["default"].createElement("p",null,"The recommended way to run the wizard is directly on your node (e.g without a Loadbalancer) in front of it."),u["default"].createElement("p",null,"Do you want to setup a cluster with multiple nodes or just a single node CouchDB installation?"),u["default"].createElement("div",null,u["default"].createElement(v,{onClick:this.redirectToMultiNodeSetup,showIcon:!1,text:"Configure\tCluster"}),u["default"].createElement(v,{onClick:this.redirectToSingleNodeSetup,showIcon:!1,id:"setup-btn-no-thanks",text:"Configure\tSingle\tNode"})))},redirectToSingleNodeSetup:function(e){e.preventDefault(),s["default"].navigate("#setup/singlenode")},redirectToMultiNodeSetup:function(e){e.preventDefault(),s["default"].navigate("#setup/multinode")}});t["default"]={SetupMultipleNodesController:x,SetupFirstStepController:E,ClusterConfiguredScreen:b,SetupSingleNodeController:_,SetupOptionalSettings:w}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(99),o=r(i),a=n(808),s=(r(a),n(805)),l=r(s),u=n(809),c=r(u),d=n(810),f=r(d),p=n(812),h=r(p),g=f["default"].nodesStore,m=h["default"].setupStore;t["default"]={getClusterStateFromCouch:function(){var e=new l["default"].Model;e.fetch().then(function(){o["default"].dispatch({type:c["default"].SETUP_SET_CLUSTERSTATUS,options:{state:e.get("state")}})})},finishClusterSetup:function(e){$.ajax({type:"POST",url:"/_cluster_setup",contentType:"application/json",dataType:"json",data:JSON.stringify({action:"finish_cluster"})}).success(function(t){o["default"].addNotification({msg:e,type:"success",fade:!1,clear:!0}),o["default"].navigate("#setup/finish")}).fail(function(){o["default"].addNotification({msg:"There was an error. Please check your setup and try again.",type:"error",fade:!1,clear:!0})})},setupSingleNode:function(){var e=(g.getNodes(),m.getIsAdminParty(),m.getUsername()),t=m.getPassword(),n=new l["default"].Model({action:"enable_cluster",username:e,password:t,bind_address:m.getBindAdressForSetupNode(),port:m.getPortForSetupNode()});n.on("invalid",function(e,t){o["default"].addNotification({msg:t,type:"error",fade:!1,clear:!0})}),n.save().then(function(){return o["default"].session.login(e,t)}).then(function(){return this.finishClusterSetup("CouchDB is set up!")}.bind(this))},addNode:function(e){function t(){var e=new l["default"].Model({action:"add_node",username:n,password:r,host:u,port:d});h.save().then(function(){return e.save()}).then(function(){o["default"].dispatch({type:c["default"].SETUP_ADD_NODE_TO_LIST,options:{value:{port:d,remoteAddress:u}}}),o["default"].addNotification({msg:"Added node",type:"success",fade:!1,clear:!0})}).fail(function(e){var t=JSON.parse(e.responseText).reason;o["default"].addNotification({msg:"Adding node failed: "+t,type:"error",fade:!1,clear:!0})})}var n=m.getUsername(),r=m.getPassword(),i=m.getPortForSetupNode(),a=m.getBindAdressForSetupNode(),s=m.getAdditionalNode().bindAddress,u=m.getAdditionalNode().remoteAddress,d=m.getAdditionalNode().port,f=new l["default"].Model({action:"enable_cluster",username:n,password:r,bind_address:a,port:i});f.on("invalid",function(e,t){o["default"].addNotification({msg:t,type:"error",fade:!1,clear:!0})});var p={action:"enable_cluster",username:n,password:r,bind_address:s,port:d,remote_node:u,remote_current_user:n,remote_current_password:r};e&&(delete p.remote_current_user,delete p.remote_current_password);var h=new l["default"].Model(p);h.on("invalid",function(e,t){o["default"].addNotification({msg:t,type:"error",fade:!1,clear:!0})}),f.save().always(function(){o["default"].session.login(n,r).then(function(){t()})})},resetAddtionalNodeForm:function(){o["default"].dispatch({type:c["default"].SETUP_RESET_ADDITIONAL_NODE})},alterPortAdditionalNode:function(e){o["default"].dispatch({type:c["default"].SETUP_PORT_ADDITIONAL_NODE,options:{value:e}})},alterRemoteAddressAdditionalNode:function(e){o["default"].dispatch({type:c["default"].SETUP_REMOTE_ADDRESS_ADDITIONAL_NODE,options:{value:e}})},alterBindAddressAdditionalNode:function(e){o["default"].dispatch({type:c["default"].SETUP_BIND_ADDRESS_ADDITIONAL_NODE,options:{value:e}})},setUsername:function(e){o["default"].dispatch({type:c["default"].SETUP_SET_USERNAME,options:{value:e}})},setPassword:function(e){o["default"].dispatch({type:c["default"].SETUP_SET_PASSWORD,options:{value:e}})},setPortForSetupNode:function(e){o["default"].dispatch({type:c["default"].SETUP_PORT_FOR_SINGLE_NODE,options:{value:e}})},setBindAddressForSetupNode:function(e){o["default"].dispatch({type:c["default"].SETUP_BIND_ADDRESS_FOR_SINGLE_NODE,options:{value:e}})}}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(84),o=r(i),a=n(99),s=r(a),l=s["default"].addon();l.OptionModel=Backbone.Model.extend({documentation:s["default"].constants.DOC_URLS.CONFIG,initialize:function(e,t){this.node=t.node},url:function(){if(!this.node)throw new Error("no node set");return o["default"].host+"/_node/"+this.node+"/_config/"+this.get("section")+"/"+encodeURIComponent(this.get("name"))},isNew:function(){return!1},sync:function(e,t,n){var r={url:t.url(),contentType:"application/json",dataType:"json",data:JSON.stringify(t.get("value"))};return"delete"===e?r.type="DELETE":r.type="PUT",$.ajax(r)}}),l.Model=Backbone.Model.extend({}),l.Collection=Backbone.Collection.extend({model:l.Model,documentation:s["default"].constants.DOC_URLS.CONFIG,initialize:function(e,t){this.node=t.node},comparator:function(e){if(e.get("section"))return e.get("section")},url:function(){if(!this.node)throw new Error("no node set");return o["default"].host+"/_node/"+this.node+"/_config"},findEntryInSection:function(e,t){var n,r=_.findWhere(this.toJSON(),{section:e});return!!r&&(n=_.findWhere(r.options,{name:t}))},parse:function(e){return _.map(e,function(e,t){return{section:t,options:_.map(e,function(e,t){return{name:t,value:e}})}})}}),t["default"]=l},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]={SETUP_SET_CLUSTERSTATUS:"SETUP_SET_CLUSTERSTATUS",SETUP_SET_USERNAME:"SETUP_SET_USERNAME",SETUP_SET_PASSWORD:"SETUP_SET_PASSWORD",SETUP_BIND_ADDRESS_FOR_SINGLE_NODE:"SETUP_BIND_ADDRESS_FOR_SINGLE_NODE",SETUP_PORT_FOR_SINGLE_NODE:"SETUP_PORT_FOR_SINGLE_NODE",SETUP_PORT_ADDITIONAL_NODE:"SETUP_PORT_ADDITIONAL_NODE",SETUP_BIND_ADDRESS_ADDITIONAL_NODE:"SETUP_BIND_ADDRESS_ADDITIONAL_NODE",SETUP_REMOTE_ADDRESS_ADDITIONAL_NODE:"SETUP_REMOTE_ADDRESS_ADDITIONAL_NODE",SETUP_RESET_ADDITIONAL_NODE:"SETUP_RESET_ADDITIONAL_NODE",SETUP_ADD_NODE_TO_LIST:"SETUP_ADD_NODE_TO_LIST"}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(99),o=r(i),a=n(811),s=r(a),l=o["default"].Store.extend({initialize:function(){this.reset()},reset:function(){this._nodes=[]},setNodes:function(e){this._nodes=e.nodes},getNodes:function(){return this._nodes},dispatch:function(e){switch(e.type){case s["default"].CLUSTER_FETCH_NODES:this.setNodes(e.options);break;default:return}this.triggerChange()}}),u=new l;u.dispatchToken=o["default"].dispatcher.register(u.dispatch.bind(u)),t["default"]={nodesStore:u}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]={CLUSTER_FETCH_NODES:"CLUSTER_FETCH_NODES"}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(99),o=r(i),a=n(809),s=r(a),l=o["default"].Store.extend({initialize:function(){this.reset()},reset:function(){this._clusterState=[],this._username="",this._password="",this._setupNode={bindAddress:"0.0.0.0",port:5984},this.resetAddtionalNode(),this._nodeList=[]},resetAddtionalNode:function(){this._additionalNode={bindAddress:"0.0.0.0",port:5984,remoteAddress:"127.0.0.1"}},setClusterState:function(e){this._clusterState=e.state},getClusterState:function(){return this._clusterState},getNodeList:function(){return this._nodeList},getIsAdminParty:function(){return o["default"].session.isAdminParty()},setUsername:function(e){this._username=e.value},setPassword:function(e){this._password=e.value},getUsername:function(){return this._username},getPassword:function(){return this._password},setBindAdressForSetupNode:function(e){this._setupNode.bindAddress=e.value},setPortForSetupNode:function(e){this._setupNode.port=e.value},getPortForSetupNode:function(){return this._setupNode.port},getBindAdressForSetupNode:function(){return this._setupNode.bindAddress},setBindAdressForAdditionalNode:function(e){this._additionalNode.bindAddress=e.value},setPortForAdditionalNode:function(e){this._additionalNode.port=e.value},setRemoteAddressForAdditionalNode:function(e){this._additionalNode.remoteAddress=e.value},getAdditionalNode:function(){return this._additionalNode},addNodeToList:function(e){this._nodeList.push(e.value),this.resetAddtionalNode()},getHostForSetupNode:function(){return"127.0.0.1"},dispatch:function(e){switch(e.type){case s["default"].SETUP_SET_CLUSTERSTATUS:this.setClusterState(e.options);break;case s["default"].SETUP_SET_USERNAME:this.setUsername(e.options);break;case s["default"].SETUP_SET_PASSWORD:this.setPassword(e.options);break;case s["default"].SETUP_BIND_ADDRESS_FOR_SINGLE_NODE:this.setBindAdressForSetupNode(e.options);break;case s["default"].SETUP_PORT_FOR_SINGLE_NODE:this.setPortForSetupNode(e.options);break;case s["default"].SETUP_PORT_ADDITIONAL_NODE:this.setPortForAdditionalNode(e.options);break;case s["default"].SETUP_BIND_ADDRESS_ADDITIONAL_NODE:this.setBindAdressForAdditionalNode(e.options);break;case s["default"].SETUP_REMOTE_ADDRESS_ADDITIONAL_NODE:this.setRemoteAddressForAdditionalNode(e.options);break;case s["default"].SETUP_ADD_NODE_TO_LIST:this.addNodeToList(e.options);break;case s["default"].SETUP_RESET_ADDITIONAL_NODE:this.resetAddtionalNode();break;default:return}this.triggerChange()}}),u=new l;u.dispatchToken=o["default"].dispatcher.register(u.dispatch.bind(u)),t["default"]={setupStore:u,SetupStore:l}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(99),o=r(i),a=n(814),s=r(a),l=n(811),u=r(l);t["default"]={fetchNodes:function(){var e=new s["default"].ClusterNodes;e.fetch().then(function(){this.updateNodes({nodes:e.get("nodes_mapped")})}.bind(this))},updateNodes:function(e){o["default"].dispatch({type:u["default"].CLUSTER_FETCH_NODES,options:e})},navigateToNodeBasedOnNodeCount:function(e){var t=new s["default"].ClusterNodes;t.fetch().then(function(){var n=t.get("all_nodes");return 1===n.length?o["default"].navigate(e+n[0]):o["default"].navigate("/cluster/disabled",{trigger:!0})})}}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(84),o=r(i),a=n(99),s=r(a),l=s["default"].addon();l.ClusterNodes=Backbone.Model.extend({url:function(e){return"apiurl"===e?window.location.origin+"/_membership":o["default"].host+"/_membership"},parse:function(e){var t;return t=e.all_nodes.reduce(function(t,n){var r=e.cluster_nodes.indexOf(n)!==-1;return t.push({node:n,isInCluster:r}),t},[]),e.nodes_mapped=t,e}}),t["default"]=l},function(e,t,n){var r=n(816);"string"==typeof r&&(r=[[e.id,r,""]]);n(288)(r,{});r.locals&&(e.exports=r.locals)},function(e,t,n){t=e.exports=n(275)(),t.push([e.id,".setup-screen{padding:20px}.setup-screen button{margin-top:20px}.setup-screen #setup-btn-no-thanks{margin-left:30px}.setup-nodes input{margin-right:15px}.setup-nodes h2{font-size:16px;line-height:normal;margin:0;text-transform:uppercase}.setup-nodes .node-item{width:400px}.setup-nodes .node-item a{margin-left:10px}.setup-nodes .input-remote-node{width:50%}.setup-nodes .centered{text-align:center}.setup-nodes .setup-add-button,.setup-nodes .setup-creds,.setup-nodes .setup-finish,.setup-nodes .setup-nodelist,.setup-nodes .setup-opt-settings,.setup-nodes .setup-port{margin-top:30px}.setup-nodes .setup-finish{padding-bottom:40px}",""])},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(84),o=(r(i),n(99)),a=r(o),s=n(818),l=r(s);n(824),l["default"].initialize=function(){a["default"].addHeaderLink({title:"Active Tasks",icon:"fonticon-activetasks",href:"#/activetasks"})},t["default"]=l["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(84),o=(r(i),n(99)),a=r(o),s=n(819),l=r(s),u=n(822),c=r(u),d=n(820),f=r(d),p=a["default"].RouteObject.extend({selectedHeader:"Active Tasks",layout:"one_pane",disableLoader:!0,routes:{"activetasks/:id":"showActiveTasks",activetasks:"showActiveTasks"},crumbs:[{name:"Active Tasks"}],apiUrl:function(){var e=window.location.origin+"/_active_tasks";return[e,a["default"].constants.DOC_URLS.ACTIVE_TASKS]},roles:["_admin"],initialize:function(){this.allTasks=new l["default"].AllTasks},showActiveTasks:function(){f["default"].init(this.allTasks),this.setComponent("#dashboard-content",c["default"].ActiveTasksController),this.setComponent("#right-header",c["default"].ActiveTasksPollingWidgetController)}});l["default"].RouteObjects=[p],t["default"]=l["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(84),o=r(i),a=n(99),s=(r(a),n(820)),l=r(s),u={};u.AllTasks=Backbone.Collection.extend({url:function(){return o["default"].host+"/_active_tasks"},pollingFetch:function(){return this.fetch({reset:!0,parse:!0}),l["default"].setActiveTaskIsLoading(!0),this},parse:function(e){l["default"].setActiveTaskIsLoading(!1);var t=[];return _.each(e,function(e){t.push(e)}),this.table=t,e},table:[]}),t["default"]=u},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(99),o=r(i),a=n(821),s=r(a);t["default"]={init:function(e){this.fetchAndSetActiveTasks(e.table,e),o["default"].when(e.fetch()).then(function(){this.fetchAndSetActiveTasks(e.table,e),this.setActiveTaskIsLoading(!1)}.bind(this))},fetchAndSetActiveTasks:function(e,t){o["default"].dispatch({type:s["default"].ACTIVE_TASKS_FETCH_AND_SET,options:{collectionTable:e,backboneCollection:t}})},changePollingInterval:function(e){o["default"].dispatch({type:s["default"].ACTIVE_TASKS_CHANGE_POLLING_INTERVAL,options:e})},switchTab:function(e){o["default"].dispatch({type:s["default"].ACTIVE_TASKS_SWITCH_TAB,options:e})},setCollection:function(e){o["default"].dispatch({type:s["default"].ACTIVE_TASKS_SET_COLLECTION,options:e})},setSearchTerm:function(e){o["default"].dispatch({type:s["default"].ACTIVE_TASKS_SET_SEARCH_TERM,options:e})},sortByColumnHeader:function(e){o["default"].dispatch({type:s["default"].ACTIVE_TASKS_SORT_BY_COLUMN_HEADER,options:{columnName:e}})},setActiveTaskIsLoading:function(e){o["default"].dispatch({type:s["default"].ACTIVE_TASKS_SET_IS_LOADING,options:e})}}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]={ACTIVE_TASKS_CHANGE_POLLING_INTERVAL:"ACTIVE_TASKS_CHANGE_POLLING_INTERVAL",ACTIVE_TASKS_SWITCH_TAB:"ACTIVE_TASKS_SWITCH_TAB",ACTIVE_TASKS_SET_COLLECTION:"ACTIVE_TASKS_SET_COLLECTION",ACTIVE_TASKS_SET_SEARCH_TERM:"ACTIVE_TASKS_SET_SEARCH_TERM",ACTIVE_TASKS_SORT_BY_COLUMN_HEADER:"ACTIVE_TASKS_SORT_BY_COLUMN_HEADER",ACTIVE_TASKS_FETCH_AND_SET:"ACTIVE_TASKS_FETCH_AND_SET",ACTIVE_TASKS_SET_IS_LOADING:"ACTIVE_TASKS_SET_IS_LOADING"}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(84),o=r(i),a=n(99),s=(r(a),n(106)),l=r(s),u=n(137),c=r(u),d=n(823),f=r(d),p=n(819),h=(r(p),n(820)),g=r(h),m=n(293),v=r(m),b=n(297),y=r(b),w=n(558),x=(r(w),v["default"].TabElementWrapper),E=v["default"].TabElement,C=f["default"].activeTasksStore,k=l["default"].createClass({displayName:"ActiveTasksController",getStoreState:function(){return{collection:C.getCollection(),searchTerm:C.getSearchTerm(),selectedRadio:C.getSelectedRadio(),sortByHeader:C.getSortByHeader(),headerIsAscending:C.getHeaderIsAscending(),setPolling:C.setPolling,clearPolling:C.clearPolling}},getInitialState:function(){return this.getStoreState()},componentDidMount:function(){this.state.setPolling(),C.on("change",this.onChange,this)},componentWillUnmount:function(){this.state.clearPolling(),C.off("change",this.onChange,this)},onChange:function(){this.setState(this.getStoreState())},setNewSearchTerm:function(e){g["default"].setSearchTerm(e)},switchTab:function(e){g["default"].switchTab(e)},tableHeaderOnClick:function(e){g["default"].sortByColumnHeader(e)},render:function(){var e=this.state.collection,t=this.state.searchTerm,n=this.state.selectedRadio,r=this.state.sortByHeader,i=this.state.headerIsAscending,o=this.setNewSearchTerm,a=this.tableHeaderOnClick;return l["default"].createElement("div",{id:"active-tasks-page",className:"scrollable"},l["default"].createElement("div",{className:"inner"},l["default"].createElement(S,{searchTerm:t,selectedRadio:n,onSearch:o,onRadioClick:this.switchTab}),l["default"].createElement(A,{collection:e,searchTerm:t,selectedRadio:n,onTableHeaderClick:a,sortByHeader:r,headerIsAscending:i})))}}),S=l["default"].createClass({displayName:"ActiveTasksFilterTabs",getDefaultProps:function(){return{radioNames:["All Tasks","Replication","Database Compaction","Indexer","View Compaction"]}},checked:function(e){return this.props.selectedRadio===e},onRadioClick:function(e){var t=e.target.value;this.props.onRadioClick(t)},createFilterTabs:function(){var e=this;return this.props.radioNames.map(function(t,n){var r=e.checked(t);return l["default"].createElement(E,{key:n,selected:r,text:t,onChange:e.onRadioClick})})},searchTermChange:function(e){var t=e.target.value;this.props.onSearch(t)},render:function(){var e=this.createFilterTabs();return l["default"].createElement(x,null,e,l["default"].createElement("li",{className:"component-tab-list-element"},l["default"].createElement("input",{id:"active-tasks-search-box",className:"searchbox",type:"text",name:"search",placeholder:"Search for databases...",value:this.props.searchTerm,onChange:this.searchTermChange})))}}),A=l["default"].createClass({displayName:"ActiveTaskTable",render:function(){var e=this.props.collection,t=this.props.selectedRadio,n=this.props.searchTerm,r=this.props.sortByHeader,i=this.props.onTableHeaderClick,o=this.props.headerIsAscending;return l["default"].createElement("div",{id:"dashboard-lower-content"},l["default"].createElement("table",{id:"active-tasks-table",className:"table table-bordered table-striped active-tasks"},l["default"].createElement(T,{onTableHeaderClick:i,sortByHeader:r,headerIsAscending:o}),l["default"].createElement(N,{collection:e,selectedRadio:t,searchTerm:n})))}}),T=l["default"].createClass({displayName:"ActiveTasksTableHeader",getDefaultProps:function(){return{headerNames:[["type","Type"],["database","Database"],["started-on","Started on"],["updated-on","Updated on"],["pid","PID"],["progress","Status"]]}},createTableHeadingFields:function(){var e=this.props.onTableHeaderClick,t=this.props.sortByHeader,n=this.props.headerIsAscending;return this.props.headerNames.map(function(r){return l["default"].createElement(D,{headerName:r[0],displayName:r[1],key:r[0],onTableHeaderClick:e,sortByHeader:t,headerIsAscending:n})})},render:function(){return l["default"].createElement("thead",null,l["default"].createElement("tr",null,this.createTableHeadingFields()))}}),D=l["default"].createClass({displayName:"TableHeader",arrow:function P(){var e=this.props.sortByHeader,t=this.props.headerName,n=this.props.headerIsAscending,P=n?"icon icon-caret-up":"icon icon-caret-down";if(e===t)return l["default"].createElement("i",{className:P})},onTableHeaderClick:function(e){var t=e.target.value;this.props.onTableHeaderClick(t)},render:function(){var e=this.arrow(),t="header-field "+this.props.headerName;return l["default"].createElement("td",{className:t+" tableheader",value:this.props.headerName},l["default"].createElement("input",{type:"radio",name:"header-field",id:this.props.headerName,value:this.props.headerName,className:"header-field radio",onChange:this.onTableHeaderClick}),l["default"].createElement("label",{className:"header-field label-text active-tasks-header noselect",htmlFor:this.props.headerName},this.props.displayName," ",e))}}),N=l["default"].createClass({displayName:"ActiveTasksTableBody",getStoreState:function(){return{filteredTable:C.getFilteredTable(this.props.collection)}},getInitialState:function(){return this.getStoreState()},componentWillReceiveProps:function(e){this.setState({filteredTable:C.getFilteredTable(this.props.collection)})},createRows:function(){var e=""===this.props.searchTerm.trim();return 0===this.state.filteredTable.length?e?this.noActiveTasks():this.noActiveTasksMatchFilter():_.map(this.state.filteredTable,function(e,t){return l["default"].createElement(F,{key:t,item:e})})},noActiveTasks:function(){var e=this.props.selectedRadio;return"All Tasks"===e&&(e=""),l["default"].createElement("tr",{className:"no-matching-database-on-search"},l["default"].createElement("td",{colSpan:"6"},"No active ",e," tasks."))},noActiveTasksMatchFilter:function(){var e=this.props.selectedRadio;return"All Tasks"===e&&(e=""),l["default"].createElement("tr",{className:"no-matching-database-on-search"},l["default"].createElement("td",{colSpan:"6"},"No active ",e,' tasks match with filter: "',this.props.searchTerm,'"'))},render:function(){return l["default"].createElement("tbody",{className:"js-tasks-go-here"},this.createRows())}}),F=l["default"].createClass({displayName:"ActiveTaskTableBodyContents",getInfo:function(e){return{type:e.type,objectField:L.getDatabaseFieldMessage(e),started_on:L.getTimeInfo(e.started_on),updated_on:L.getTimeInfo(e.updated_on),pid:e.pid.replace(/[<>]/g,""),progress:L.getProgressMessage(e)}},multilineMessage:function(e,t){t||(t="");var n="multiline-active-tasks-message "+t;return e.map(function(e,t){return l["default"].createElement("p",{key:t,className:n},e)})},render:function(){var e=this.getInfo(this.props.item),t=this.multilineMessage(e.objectField,"to-from-database"),n=this.multilineMessage(e.started_on,"time"),r=this.multilineMessage(e.updated_on,"time"),i=this.multilineMessage(e.progress);return l["default"].createElement("tr",null,l["default"].createElement("td",null,e.type),l["default"].createElement("td",null,t),l["default"].createElement("td",null,n),l["default"].createElement("td",null,r),l["default"].createElement("td",null,e.pid),l["default"].createElement("td",null,i,l["default"].createElement(M,{
item:this.props.item})))}}),M=l["default"].createClass({displayName:"ActiveTasksViewSourceSequence",onTrayToggle:function(e){e.preventDefault(),this.refs.view_source_sequence_btn.toggle(function(e){e&&c["default"].findDOMNode(this.refs.view_source_sequence_btn).focus()}.bind(this))},sequences:function(e){return _.isNumber(e)||_.isString(e)?l["default"].createElement(y["default"].ClipboardWithTextField,{textToCopy:e,uniqueKey:e}):_.isArray(e)?_.map(e,function(e,t){return l["default"].createElement(y["default"].ClipboardWithTextField,{textToCopy:e,uniqueKey:t+Math.random(100),key:t})}):l["default"].createElement(y["default"].ClipboardWithTextField,{textToCopy:"???",uniqueKey:"unknownRevision"})},render:function(){if(_.has(this.props.item,"source_seq")){var e=this.sequences(this.props.item.source_seq);return l["default"].createElement("div",null,"Current source sequence:",l["default"].createElement("a",{href:"#",className:"view-source-sequence-btn",onClick:this.onTrayToggle,"data-bypass":"true"},"View"),l["default"].createElement(y["default"].Tray,{ref:"view_source_sequence_btn",className:"view-source-sequence-tray"},l["default"].createElement("span",{className:"add-on"},"Source Sequence"),e))}return null}}),O=l["default"].createClass({displayName:"ActiveTasksPollingWidgetController",getStoreState:function(){return{pollingInterval:C.getPollingInterval(),isLoading:C.isLoading()}},getInitialState:function(){return this.getStoreState()},componentDidMount:function(){C.on("change",this.onChange,this)},onChange:function(){this.isMounted()&&this.setState(this.getStoreState())},pollingIntervalChange:function(e){g["default"].changePollingInterval(e.target.value)},getPluralForLabel:function(){return"1"===this.state.pollingInterval?"":"s"},createPollingWidget:function(){var e=this.state.pollingInterval,t=this.getPluralForLabel(),n=this.pollingIntervalChange;return l["default"].createElement("ul",{className:"polling-interval-widget"},l["default"].createElement("li",{className:"polling-interval-name"},"Polling interval",l["default"].createElement("label",{className:"polling-interval-time-label",htmlFor:"polling-range"},l["default"].createElement("span",null,e)," second",t)),l["default"].createElement("li",null,l["default"].createElement("input",{id:"polling-range",type:"range",min:"1",max:"30",step:"1",value:e,onChange:n})))},render:function(){var e=this.createPollingWidget(),t=null;return(this.state.isLoading||"1"===this.state.pollingInterval)&&(t=l["default"].createElement(v["default"].LoadLines,null)),l["default"].createElement("div",{className:"active-tasks-loading-lines-container"},l["default"].createElement("span",{className:"active-tasks-loading-lines"},t),e)}}),L={getTimeInfo:function(e){var t=[o["default"].helpers.formatDate(e),o["default"].helpers.getDateFromNow(e)];return t},getDatabaseFieldMessage:function(e){var t=e.type,n=[];return"replication"===t?(n.push("From: "+e.source),n.push("To: "+e.target)):"indexer"===t?(n.push(e.database),n.push("(View: "+e.design_document+")")):n.push(e.database),n},getProgressMessage:function(e){var t=[],n=e.type;return _.has(e,"progress")&&t.push("Progress: "+e.progress+"%"),"indexer"===n?t.push("Processed "+e.changes_done+" of "+e.total_changes+" changes."):"replication"===n&&(t.push(e.docs_written+" docs written."),_.has(e,"changes_pending")&&t.push(e.changes_pending+" pending changes.")),_.has(e,"changes_done")&&t.push(e.changes_done+" Changes done."),t},getSourceSequence:function(e){return e.source_seq}};t["default"]={ActiveTasksController:k,ActiveTasksFilterTabs:S,ActiveTaskTable:A,ActiveTasksTableHeader:T,TableHeader:D,ActiveTasksTableBody:N,ActiveTaskTableBodyContents:F,ActiveTasksViewSourceSequence:M,ActiveTasksPollingWidgetController:O}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(84),o=(r(i),n(99)),a=r(o),s=n(821),l=r(s),u=a["default"].Store.extend({initAfterFetching:function(e,t){this._prevSortbyHeader="started-on",this._headerIsAscending=!0,this._selectedRadio="All Tasks",this._sortByHeader="started-on",this._searchTerm="",this._collection=e,this._pollingIntervalSeconds=5,this.sortCollectionByColumnHeader(this._sortByHeader),this._backboneCollection=t,this.setIsLoading(!0,new Date)},isLoading:function(){return this._isLoading},setIsLoading:function(e,t){if(e)this._startTimeForLoading=t,this._isLoading=!0;else{var n=t,r=n-this._startTimeForLoading;r<800?setTimeout(function(){this._isLoading=!1,this.triggerChange()}.bind(this),800):this._isLoading=!1}},getSelectedRadio:function(){return this._selectedRadio},setSelectedRadio:function(e){this._selectedRadio=e},getPollingInterval:function(){return this._pollingIntervalSeconds},setPollingInterval:function(e){this._pollingIntervalSeconds=e},setPolling:function(){this.clearPolling();var e=setInterval(function(){this._backboneCollection.pollingFetch(),this.setCollection(this._backboneCollection.table),this.sortCollectionByColumnHeader(this._prevSortbyHeader,!1),this.triggerChange()}.bind(this),1e3*this.getPollingInterval());this.setIntervalID(e)},clearPolling:function(){clearInterval(this.getIntervalID())},getIntervalID:function(){return this._intervalID},setIntervalID:function(e){this._intervalID=e},setCollection:function(e){this._collection=e},getCollection:function(){return this._collection},setSearchTerm:function(e){this._searchTerm=e},getSearchTerm:function(){return this._searchTerm},getSortByHeader:function(){return this._sortByHeader},setSortByHeader:function(e){this._sortByHeader=e},getHeaderIsAscending:function(){return this._headerIsAscending},toggleHeaderIsAscending:function(){this._prevSortbyHeader===this._sortByHeader&&(this._headerIsAscending=!this._headerIsAscending)},sortCollectionByColumnHeader:function(e){var t=this._collection,n=_.sortBy(t,function(t){var n=e;return _.isUndefined(t[n])&&(n="source"),t[n]});this._prevSortbyHeader=e,this._collection=n},getFilteredTable:function(e){var t=[];return this.sortCollectionByColumnHeader(this._sortByHeader),this._collection.map(function(e){var n=this.passesRadioFilter(e),r=this.passesSearchFilter(e);n&&r&&t.push(e)}.bind(this)),this._headerIsAscending||t.reverse(),t},passesSearchFilter:function(e){var t=this._searchTerm,n=new RegExp(t,"g"),r="";return _.has(e,"database")&&(r+=e.database),_.has(e,"source")&&(r+=e.source),_.has(e,"target")&&(r+=e.target),n.test(r)},passesRadioFilter:function(e){var t=this._selectedRadio.toLowerCase().replace(" ","_");return e.type===t||"all_tasks"===t},dispatch:function(e){switch(e.type){case l["default"].ACTIVE_TASKS_FETCH_AND_SET:this.initAfterFetching(e.options.collectionTable,e.options.backboneCollection);break;case l["default"].ACTIVE_TASKS_CHANGE_POLLING_INTERVAL:this.setPollingInterval(e.options),this.setPolling(),this.triggerChange();break;case l["default"].ACTIVE_TASKS_SWITCH_TAB:this.setSelectedRadio(e.options),this.triggerChange();break;case l["default"].ACTIVE_TASKS_SET_COLLECTION:this.setCollection(e.options),this.triggerChange();break;case l["default"].ACTIVE_TASKS_SET_SEARCH_TERM:this.setSearchTerm(e.options),this.triggerChange();break;case l["default"].ACTIVE_TASKS_SORT_BY_COLUMN_HEADER:this.toggleHeaderIsAscending(),this.setSortByHeader(e.options.columnName),this.sortCollectionByColumnHeader(e.options.columnName),this.triggerChange();break;case l["default"].ACTIVE_TASKS_SET_IS_LOADING:this.setIsLoading(e.options,new Date),this.triggerChange();break;default:return}}}),c=new u;c.dispatchToken=a["default"].dispatcher.register(c.dispatch.bind(c)),t["default"]={activeTasksStore:c}},function(e,t,n){var r=n(825);"string"==typeof r&&(r=[[e.id,r,""]]);n(288)(r,{});r.locals&&(e.exports=r.locals)},function(e,t,n){t=e.exports=n(275)(),t.push([e.id,'.clearfix{*zoom:1}.clearfix:after,.clearfix:before{display:table;content:"";line-height:0}.clearfix:after{clear:both}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.input-block-level{display:block;width:100%;min-height:30px;box-sizing:border-box}#active-tasks-page{overflow:auto}#active-tasks-page .inner{overflow:auto;height:100%}#active-tasks-page .active-tasks td.tableheader,#active-tasks-page .task-tabs li{cursor:pointer;padding-bottom:15px}#active-tasks-page .active-tasks td.tableheader.type,#active-tasks-page .task-tabs li.type{width:10%}#active-tasks-page .active-tasks td.tableheader.database,#active-tasks-page .task-tabs li.database{width:30%}#active-tasks-page .active-tasks td.tableheader.started-on,#active-tasks-page .active-tasks td.tableheader.updated-on,#active-tasks-page .task-tabs li.started-on,#active-tasks-page .task-tabs li.updated-on{width:13%}#active-tasks-page .active-tasks td.tableheader.pid,#active-tasks-page .task-tabs li.pid{width:10%}#active-tasks-page .active-tasks td.tableheader.progress,#active-tasks-page .task-tabs li.progress{width:23%}#active-tasks-page #active-tasks-table{min-width:725px}#active-tasks-page #active-tasks-table td.header-field{padding:0}#active-tasks-page #active-tasks-table p.multiline-active-tasks-message{margin:0;line-height:1.3;margin-bottom:3px}#active-tasks-page #active-tasks-table p.multiline-active-tasks-message.time:nth-child(2){color:#888}#active-tasks-page #active-tasks-table p.multiline-active-tasks-message.to-from-database{padding-bottom:15px}#active-tasks-page #active-tasks-table p.multiline-active-tasks-message.to-from-database:first-child{border-bottom:1px solid #ddd}#active-tasks-page .task-search-database{margin:20px}#active-tasks-page .active-tasks.dashboard-upper-menu{left:220px}.closeMenu #active-tasks-page .active-tasks.dashboard-upper-menu{left:64px}#active-tasks-page .component-tab-element-wrapper #active-tasks-search-box{display:inline;font-size:14px;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;height:51px;background-color:#eee;width:200px;margin:9px 0 0}#active-tasks-page .component-tab-element-wrapper #active-tasks-search-box:focus{background-color:#fff;outline-color:#fff}#active-tasks-page .dashboard-lower-menu{padding-top:90px;padding-left:20px}#active-tasks-page .header-field{background-color:#ccc}#active-tasks-page .header-field.radio{display:none}#active-tasks-page .header-field.label-text{display:block;font-weight:700;padding:10px;margin:0;height:50px;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.table td#active-tasks-page .header-field{padding:0;margin:0}#active-tasks-page .header-field .active-tasks-header{background-color:#ccc}#active-tasks-page .header-field .icon-caret-down,#active-tasks-page .header-field .icon-caret-up{color:#af2d24}#active-tasks-page .view-source-sequence-btn{background-color:#999;display:inline;border-radius:3px;padding:2px;margin:3px;color:#fff!important;white-space:nowrap}#active-tasks-page .view-source-sequence-tray{padding:16px 20px 28px;position:relative;min-width:365px;top:15px;float:right}#active-tasks-page .view-source-sequence-tray:before{right:20px}#active-tasks-page .view-source-sequence-tray input.input-xxlarge{margin-bottom:0;width:250px;border-radius:5px 0 0 5px}#active-tasks-page .view-source-sequence-tray a.btn{color:#fff;background-color:#e33f3b;margin-left:0;line-height:1.5em;border:0;padding:10px 10px 9px;font-size:14px;border-radius:0 5px 5px 0}#active-tasks-page .view-source-sequence-tray a.btn.copy-button.zeroclipboard-is-hover,#active-tasks-page .view-source-sequence-tray a.btn:hover{background-color:#cbcbcb;color:#fff}.nav.polling-interval li.nav-header{padding:9px 0 0 9px}.nav.polling-interval li{padding:0 15px 3px 9px;margin-left:0}.nav.polling-interval li input{width:100%}.nav.polling-interval li label span{font-weight:700}.polling-interval-widget{width:225px;margin:10px 30px 0 0;color:#666;float:right}.polling-interval-widget li{list-style-type:none}.polling-interval-widget .polling-interval-time-label{display:inline-block;float:right;margin-right:0;cursor:default}.polling-interval-widget #polling-range{width:225px}.active-tasks-loading-lines-container{width:355px}.active-tasks-loading-lines-container .active-tasks-loading-lines{border:0;position:relative;top:17px;float:left;padding-left:20px}.active-tasks-loading-lines-container .active-tasks-loading-lines #line1,.active-tasks-loading-lines-container .active-tasks-loading-lines #line2,.active-tasks-loading-lines-container .active-tasks-loading-lines #line3,.active-tasks-loading-lines-container .active-tasks-loading-lines #line4{background-color:#bbb}',""])},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(84),o=(r(i),n(99)),a=(r(o),n(827)),s=r(a);s["default"].initialize=function(){},t["default"]=s["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(84),o=(r(i),n(99)),a=r(o),s=n(814),l=r(s),u=n(828),c=r(u),d=n(813),f=r(d),p=a["default"].RouteObject.extend({layout:"one_pane",routes:{"cluster/disabled":"showDisabledFeatureScreen"},crumbs:[{name:"Config disabled"}],apiUrl:function(){return[this.memberships.url("apiurl"),this.memberships.documentation]},initialize:function(){this.memberships=new l["default"].ClusterNodes},showDisabledFeatureScreen:function(){f["default"].fetchNodes(),this.warning=this.setComponent("#dashboard-content",c["default"].DisabledConfigController)}});l["default"].RouteObjects=[p],t["default"]=l["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(84),o=(r(i),n(99)),a=(r(o),n(106)),s=r(a),l=n(810),u=r(l),c=u["default"].nodesStore,d=s["default"].createClass({displayName:"DisabledConfigController",getStoreState:function(){return{nodes:c.getNodes()}},getInitialState:function(){return this.getStoreState()},componentDidMount:function(){c.on("change",this.onChange,this)},componentWillUnmount:function(){c.off("change",this.onChange)},onChange:function(){this.setState(this.getStoreState())},render:function(){return s["default"].createElement("div",{className:"config-warning-cluster-wrapper"},s["default"].createElement("div",{className:"config-warning-cluster-container"},s["default"].createElement("div",null,s["default"].createElement("div",{className:"config-warning-icon-container pull-left"},s["default"].createElement("i",{className:"fonticon-attention-circled"})),"It seems that you are running a cluster with ",this.state.nodes.length," nodes. For CouchDB 2.0 we recommend using a configuration management tools like Chef, Ansible, Puppet or Salt (in no particular order) to configure your nodes in a cluster.",s["default"].createElement("br",null),s["default"].createElement("br",null),s["default"].createElement("div",{className:"config-warning-other-text"},"We highly recommend against configuring nodes in your cluster using the HTTP API and suggest using a configuration management tool for all configurations."))))}}),f={DisabledConfigController:d};t["default"]=f},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(84),o=(r(i),n(99)),a=r(o),s=n(830),l=r(s);n(837),l["default"].initialize=function(){a["default"].addHeaderLink({title:"Configuration",href:"#_config",icon:"fonticon-cog",className:"config"})},t["default"]=l["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(84),o=(r(i),n(99)),a=r(o),s=n(808),l=r(s),u=n(831),c=r(u),d=n(832),f=r(d),p=n(836),h=r(p),g=n(813),m=r(g),v=a["default"].RouteObject.extend({layout:"one_pane",routes:{_config:"checkNodes"},crumbs:[{name:"Config disabled"}],checkNodes:function(){m["default"].navigateToNodeBasedOnNodeCount("/_config/")}}),b=a["default"].RouteObject.extend({layout:"with_tabs_sidebar",roles:["_admin"],selectedHeader:"Config",crumbs:[{name:"Config"}],apiUrl:function(){return[this.configs.url(),this.configs.documentation]},routes:{"_config/:node":"configForNode","_config/:node/cors":"configCorsForNode"},initialize:function(e,t,n){var r=n[0];this.configs=new l["default"].Collection(null,{node:r}),this.sidebar=this.setView("#sidebar-content",new c["default"].Tabs({sidebarItems:[{title:"Main config",typeSelect:"main",link:"_config/"+r},{title:"CORS",typeSelect:"cors",link:"_config/"+r+"/cors"}]}))},configForNode:function(){this.newSection=this.setView("#right-header",new c["default"].ConfigHeader({collection:this.configs})),this.setView("#dashboard-lower-content",new c["default"].Table({collection:this.configs})),this.sidebar.setSelectedTab("main")},configCorsForNode:function(e){this.removeView("#right-header"),this.newSection=this.setComponent("#dashboard-content",f["default"].CORSController),h["default"].fetchAndEditCors(e),this.sidebar.setSelectedTab("cors")}});l["default"].RouteObjects=[b,v],t["default"]=l["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(84),o=(r(i),n(99)),a=r(o),s=n(808),l=r(s),u=n(291),c=r(u),d={};d.TableRow=a["default"].View.extend({tagName:"tr",className:"config-item",template:"addons/config/templates/item",events:{"dblclick .js-edit-value":"editValue","click .js-delete-value":"deleteValue","click .js-cancel-value":"cancelEdit","click .js-save-value":"saveAndRender","keyup .js-value-input":"processKeyEvents"},deleteValue:function(){var e=this.collection,t=confirm("Are you sure you want to delete this configuration value?");t&&(this.model.destroy().done(function(){e.fetch({reset:!0}).done(function(){a["default"].Events.trigger("config:rerender")})}),this.remove())},editValue:function(e){this.$(e.currentTarget).find(".js-show-value").addClass("js-hidden"),this.$(e.currentTarget).find(".js-edit-value-form").removeClass("js-hidden"),this.$(e.currentTarget).find(".js-value-input").focus()},processKeyEvents:function(e){return 13===e.keyCode?this.saveAndRender(e):27===e.keyCode?this.discardValue(e):void 0},discardValue:function(e){this.$(e.currentTarget).parents("td").find(".js-edit-value-form").addClass("js-hidden"),this.$(e.currentTarget).parents("td").find(".js-show-value").removeClass("js-hidden")},cancelEdit:function(e){this.discardValue(e)},serialize:function(){return{option:this.model.toJSON()}},saveAndRender:function(e){var t,n,r={},i=this.$(e.currentTarget).parents("td").find(".js-value-input");if(r[i.attr("name")]=i.val(),"name"===i.attr("name"))if(t=this.model.get("section"),n=this.collection.findEntryInSection(t,i.val()))a["default"].addNotification({msg:"This config already exists, enter a unique name",type:"error",clear:!0});else{var o=this.model.clone();o.save(r),this.model.destroy(),this.model=o,this.render()}else this.model.save(r),this.render()}}),d.Table=a["default"].View.extend({template:"addons/config/templates/dashboard",initialize:function(){this.listenTo(a["default"].Events,"config:newSection",this.render),this.listenTo(a["default"].Events,"config:rerender",this.render)},beforeRender:function(){var e=this.collection;this.collection.each(function(t){_.each(t.get("options"),function(n,r){this.insertView("table.config tbody",new d.TableRow({collection:e,model:new l["default"].OptionModel({section:t.get("section"),name:n.name,value:n.value,index:r},{node:this.collection.node})}))},this)},this)},establish:function(){return[this.collection.fetch()]}}),d.ConfigHeader=a["default"].View.extend({template:"addons/config/templates/header",className:"header-right",initialize:function(){this.rightHeader=this.setView("#add-section-button",new d.AddConfigOptionsButton({collection:this.collection}))}}),d.AddConfigOptionsButton=c["default"].Tray.extend({template:"addons/config/templates/add_config_option",events:{"click #js-create-config-section":"createConfigOption"},initialize:function(){this.initTray({toggleTrayBtnSelector:"#add-new-section"})},processKey:function(e){13===e.which&&(e.preventDefault(),this.createConfigOption())},afterRender:function(){this.sectionNames=_.map(this.collection.toJSON(),function(e){return e.section}),this.sectionTypeAhead=new c["default"].Typeahead({source:this.sectionNames,el:'input[name="section"]'}),this.sectionTypeAhead.render()},createConfigOption:function(e){e&&e.preventDefault();var t=this.$('input[name="section"]').val(),n=this.$('input[name="name"]').val(),r=this.$('input[name="value"]').val(),i=this.collection;t?n?this.isUniqueEntryInSection(i)?this.showError("The option have a unique name."):r?this.submitForm():this.showError("Please add a value."):this.showError("Please add an option name."):this.showError("Please enter or select a section.")},submitForm:function(){var e=new l["default"].OptionModel({section:this.$('input[name="section"]').val(),name:this.$('input[name="name"]').val(),value:this.$('input[name="value"]').val()},{node:this.collection.node});e.save();var t=this.collection.find(function(t){return t.get("section")===e.get("section")});t?t.get("options").push(e.attributes):this.collection.add({section:e.get("section"),options:[e.attributes]}),this.hideTray(),a["default"].Events.trigger("config:newSection")},isUniqueEntryInSection:function(e){var t=this.$('input[name="section"]').val(),n=this.$('input[name="name"]').val();return e.findEntryInSection(t,n)},showError:function(e){a["default"].addNotification({msg:e,type:"error",clear:!0})}}),d.Tabs=a["default"].View.extend({className:"sidenav",tagName:"nav",template:"addons/config/templates/sidebartabs",initialize:function(e){this.sidebarItems=e.sidebarItems},setSelectedTab:function(e){this.selectedTab=e,this.$("li").removeClass("active"),this.$('a[data-type-select="'+this.selectedTab+'"]').parent("li").addClass("active")},afterRender:function(){this.setSelectedTab(this.selectedTab)},serialize:function(){return{sidebarItems:this.sidebarItems}}}),t["default"]=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(84),o=r(i),a=n(99),s=r(a),l=n(106),u=r(l),c=n(833),d=r(c),f=n(835),p=r(f),h=n(836),g=r(h),m=n(293),v=r(m),b=n(297),y=r(b),w=v["default"].LoadLines,x=y["default"].ConfirmationModal,E=d["default"].corsStore,C=function(e){return!!p["default"].validateCORSDomain(e)||(s["default"].addNotification({msg:"Please enter a valid domain, starting with http/https.",type:"error",clear:!0}),!1)},k=u["default"].createClass({displayName:"OriginRow",getInitialState:function(){return{edit:!1,updatedOrigin:this.props.origin}},editOrigin:function(e){e.preventDefault(),this.setState({edit:!this.state.edit})},updateOrigin:function(e){e.preventDefault(),C(this.state.updatedOrigin)&&(this.props.updateOrigin(this.state.updatedOrigin,this.props.origin),this.setState({edit:!1}))},deleteOrigin:function(e){e.preventDefault(),g["default"].showDeleteDomainModal(this.props.origin)},onInputChange:function(e){this.setState({updatedOrigin:e.target.value})},onKeyUp:function(e){if(13===e.keyCode)return this.updateOrigin(e)},createOriginDisplay:function(){return this.state.edit?u["default"].createElement("div",{className:"input-append edit-domain-section"},u["default"].createElement("input",{type:"text",name:"update_origin_domain",onChange:this.onInputChange,onKeyUp:this.onKeyUp,value:this.state.updatedOrigin}),u["default"].createElement("button",{onClick:this.updateOrigin,className:"btn btn-primary update-origin"}," Update ")):u["default"].createElement("div",{className:"js-url url-display"},this.props.origin)},render:function(){var e=this.createOriginDisplay();return u["default"].createElement("tr",null,u["default"].createElement("td",null,e),u["default"].createElement("td",{width:"30"},u["default"].createElement("span",null,u["default"].createElement("a",{className:"fonticon-pencil",onClick:this.editOrigin,title:"Click to edit"}))),u["default"].createElement("td",{width:"30"},u["default"].createElement("span",null,u["default"].createElement("a",{href:"#","data-bypass":"true",className:"fonticon-trash",onClick:this.deleteOrigin,title:"Click to delete"}))))}}),S=u["default"].createClass({displayName:"OriginTable",createRows:function(){return _.map(this.props.origins,function(e,t){return u["default"].createElement(k,{updateOrigin:this.props.updateOrigin,key:t,origin:e})},this)},render:function(){if(!this.props.origins)return null;if(!this.props.isVisible||0===this.props.origins.length)return null;var e=this.createRows();return u["default"].createElement("table",{id:"origin-domain-table",className:"table table-striped"},u["default"].createElement("tbody",null,e))}}),A=u["default"].createClass({displayName:"OriginInput",getInitialState:function(){return{origin:""}},onInputChange:function(e){this.setState({origin:e.target.value})},addOrigin:function(e){if(e.preventDefault(),C(this.state.origin)){var t=p["default"].normalizeUrls(this.state.origin);this.props.addOrigin(t),this.setState({origin:""})}},onKeyUp:function(e){if(13==e.keyCode)return this.addOrigin(e)},render:function(){return this.props.isVisible?u["default"].createElement("div",{id:"origin-domains-container"},u["default"].createElement("div",{className:"origin-domains"},u["default"].createElement("div",{className:"input-append"},u["default"].createElement("input",{type:"text",name:"new_origin_domain",onChange:this.onInputChange,onKeyUp:this.onKeyUp,value:this.state.origin,placeholder:"e.g., https://site.com"}),u["default"].createElement("button",{onClick:this.addOrigin,className:"btn btn-primary add-domain"}," Add ")))):null}}),T=u["default"].createClass({displayName:"Origins",onOriginChange:function(e){"all"===e.target.value&&this.props.isAllOrigins||("selected"!==e.target.value||this.props.isAllOrigins)&&this.props.originChange("all"===e.target.value)},render:function(){return this.props.corsEnabled?u["default"].createElement("div",null,u["default"].createElement("p",null,u["default"].createElement("strong",null," Origin Domains ")," "),u["default"].createElement("p",null,"Databases will accept requests from these domains: "),u["default"].createElement("label",{className:"radio"},u["default"].createElement("input",{type:"radio",checked:this.props.isAllOrigins,value:"all",onChange:this.onOriginChange,name:"all-domains"})," All domains ( * )"),u["default"].createElement("label",{className:"radio"},u["default"].createElement("input",{type:"radio",checked:!this.props.isAllOrigins,value:"selected",onChange:this.onOriginChange,name:"selected-domains"})," Restrict to specific domains")):null}}),D=u["default"].createClass({displayName:"CORSController",getStoreState:function(){return{corsEnabled:E.isEnabled(),origins:E.getOrigins(),isAllOrigins:E.isAllOrigins(),configChanged:E.hasConfigChanged(),shouldSaveChange:E.shouldSaveChange(),node:E.getNode(),isLoading:E.getIsLoading(),deleteDomainModalVisible:E.isDeleteDomainModalVisible(),domainToDelete:E.getDomainToDelete()}},getInitialState:function(){return this.getStoreState()},componentDidMount:function(){E.on("change",this.onChange,this)},componentWillUnmount:function(){E.off("change",this.onChange)},componentDidUpdate:function(){this.state.shouldSaveChange&&this.save()},onChange:function(){this.setState(this.getStoreState())},enableCorsChange:function(){if(this.state.corsEnabled&&!_.isEmpty(this.state.origins)){var e=window.confirm(o["default"].i18n.en_US["cors-disable-cors-prompt"]);if(!e)return}g["default"].toggleEnableCors()},save:function(){g["default"].saveCors({enableCors:this.state.corsEnabled,origins:this.state.origins,node:this.state.node})},originChange:function(e){if(e&&!_.isEmpty(this.state.origins)){var t=window.confirm("Are you sure? Switching to all origin domains will overwrite your specific origin domains.");if(!t)return}g["default"].originChange(e)},addOrigin:function(e){g["default"].addOrigin(e)},updateOrigin:function(e,t){g["default"].updateOrigin(e,t)},methodChange:function(e){g["default"].methodChange(e)},deleteOrigin:function(){g["default"].deleteOrigin(this.state.domainToDelete)},render:function(){var e=_.all([this.state.corsEnabled,!this.state.isAllOrigins]),t=u["default"].createElement("div",{id:this.state.corsEnabled?"collapsing-container":""},u["default"].createElement(T,{corsEnabled:this.state.corsEnabled,originChange:this.originChange,isAllOrigins:this.state.isAllOrigins}),u["default"].createElement(S,{updateOrigin:this.updateOrigin,isVisible:e,origins:this.state.origins}),u["default"].createElement(A,{addOrigin:this.addOrigin,isVisible:e}));this.state.isLoading&&(t=u["default"].createElement(w,null));var n=u["default"].createElement("span",null,"Are you sure you want to delete ",u["default"].createElement("code",null,_.escape(this.state.domainToDelete)),"?");return u["default"].createElement("div",{className:"cors-page flex-body"},u["default"].createElement("header",{id:"cors-header"},u["default"].createElement("p",null,o["default"].i18n.en_US["cors-notice"])),u["default"].createElement("form",{id:"corsForm",onSubmit:this.save},u["default"].createElement("div",{className:"cors-enable"},this.state.corsEnabled?"Cors is currently enabled.":"Cors is currently disabled.",u["default"].createElement("br",null),u["default"].createElement("button",{type:"button",className:"enable-disable btn btn-success",onClick:this.enableCorsChange,disabled:this.state.isLoading?"disabled":null},this.state.corsEnabled?"Disable CORS":"Enable CORS")),t),u["default"].createElement(x,{title:"Confirm Deletion",visible:this.state.deleteDomainModalVisible,text:n,buttonClass:"btn-danger",onClose:g["default"].hideDeleteDomainModal,onSubmit:this.deleteOrigin,successButtonLabel:"Delete Domain"}))}});t["default"]={CORSController:D,OriginInput:A,Origins:T,OriginTable:S,OriginRow:k}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(99),o=r(i),a=n(834),s=r(a),l=o["default"].Store.extend({initialize:function(){this.reset()},reset:function(){this._deleteDomainModalVisible=!1,this._domainToDelete=""},editCors:function(e){this._isEnabled=e.isEnabled,this._origins=e.origins,this._configChanged=!1,this._shouldSaveChange=!1,this._node=e.node,this._isLoading=!1},shouldSaveChange:function(){return this._shouldSaveChange},hasConfigChanged:function(){return this._configChanged},setConfigChanged:function(){this._configChanged=!0},setConfigSaved:function(){this._configChanged=!1},setIsLoading:function(e){this._isLoading=e,this._shouldSaveChange=!1},getIsLoading:function(){return this._isLoading},isEnabled:function(){return this._isEnabled},addOrigin:function(e){this._origins.push(e)},deleteOrigin:function(e){var t=_.indexOf(this._origins,e);t!==-1&&this._origins.splice(t,1)},originChange:function(e){return e?void(this._origins=["*"]):void(this._origins=[])},getOrigins:function(){return this._origins},getNode:function(){return this._node},isAllOrigins:function(){var e=this.getOrigins();return _.include(e,"*")},toggleEnableCors:function(){this._isEnabled=!this._isEnabled},updateOrigin:function(e,t){this.deleteOrigin(t),this.addOrigin(e)},showDeleteDomainModal:function(e){this._domainToDelete=e,this._deleteDomainModalVisible=!0,this._shouldSaveChange=!1},hideDeleteDomainModal:function(){this._deleteDomainModalVisible=!1,this._shouldSaveChange=!1},isDeleteDomainModalVisible:function(){return this._deleteDomainModalVisible},getDomainToDelete:function(){return this._domainToDelete},dispatch:function(e){switch(this._shouldSaveChange=!0,e.type){case s["default"].EDIT_CORS:this.editCors(e.options);break;case s["default"].TOGGLE_ENABLE_CORS:this.toggleEnableCors(),this.setConfigChanged();break;case s["default"].CORS_ADD_ORIGIN:this.addOrigin(e.origin),this.setConfigChanged();break;case s["default"].CORS_IS_ALL_ORIGINS:this.originChange(e.isAllOrigins),this.setConfigChanged();break;case s["default"].CORS_DELETE_ORIGIN:this.deleteOrigin(e.origin),this.setConfigChanged();break;case s["default"].CORS_UPDATE_ORIGIN:this.updateOrigin(e.updatedOrigin,e.originalOrigin),
this.setConfigChanged();break;case s["default"].CORS_SET_IS_LOADING:this.setIsLoading(e.isLoading);break;case s["default"].CORS_SHOW_DELETE_DOMAIN_MODAL:this.showDeleteDomainModal(e.options.domain);break;case s["default"].CORS_HIDE_DELETE_DOMAIN_MODAL:this.hideDeleteDomainModal();break;default:return}this.triggerChange()}}),u=new l;u.dispatchToken=o["default"].dispatcher.register(u.dispatch.bind(u)),t["default"]={corsStore:u}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]={TOGGLE_ENABLE_CORS:"TOGGLE_ENABLE_CORS",EDIT_CORS:"EDIT_CORS",CORS_ADD_ORIGIN:"CORS_ADD_ORIGIN",CORS_IS_ALL_ORIGINS:"CORS_IS_ALL_ORIGINS",CORS_DELETE_ORIGIN:"CORS_DELETE_ORIGIN",CORS_UPDATE_ORIGIN:"CORS_UPDATE_ORIGIN",CORS_METHOD_CHANGE:"CORS_METHOD_CHANGE",CORS_SET_IS_LOADING:"CORS_SET_IS_LOADING",CORS_SHOW_DELETE_DOMAIN_MODAL:"CORS_SHOW_DELETE_DOMAIN_MODAL",CORS_HIDE_DELETE_DOMAIN_MODAL:"CORS_HIDE_DELETE_DOMAIN_MODAL"}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(84),o=r(i),a=n(99),s=r(a),l=s["default"].addon();l.Config=s["default"].Model.extend({url:function(){if(!this.get("node"))throw new Error("node not set");return window.location.origin+"/_node/"+this.get("node")+"/_config/cors"},parse:function(e){var t=e.origins?e.origins.split(","):[];return{origins:t,methods:e.methods,credentials:e.credentials,headers:e.headers}}}),l.Httpd=s["default"].Model.extend({url:function(){if(!this.get("node"))throw new Error("node not set");return window.location.origin+"/_node/"+this.get("node")+"/_config/httpd"},corsEnabled:function(){var e=this.get("enable_cors");return!_.isUndefined(e)&&"true"===e}}),l.ConfigModel=Backbone.Model.extend({documentation:"cors",url:function(){if(!this.get("node"))throw new Error("node not set");return o["default"].host+"/_node/"+this.get("node")+"/_config/"+encodeURIComponent(this.get("section"))+"/"+encodeURIComponent(this.get("attribute"))},isNew:function(){return!1},sync:function(e,t,n){var r={url:t.url(),contentType:"application/json",dataType:"json",data:JSON.stringify(t.get("value"))};return"delete"===e?r.type="DELETE":r.type="PUT",$.ajax(r)}}),l.validateCORSDomain=function(e){return/^https?:\/\/(.*)(:\d{2,5})?$/.test(e)},l.normalizeUrls=function(e){var t=document.createElement("a");return t.href=e,/:/.test(e)?t.protocol+"//"+t.host:t.protocol+"//"+t.hostname},t["default"]=l},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(99),o=r(i),a=n(834),s=r(a),l=n(835),u=r(l);t["default"]={fetchAndEditCors:function(e){var t=new u["default"].Config({node:e}),n=new u["default"].Httpd({node:e});o["default"].when([t.fetch(),n.fetch()]).then(function(){this.editCors({origins:t.get("origins"),isEnabled:n.corsEnabled(),node:e})}.bind(this))},editCors:function(e){o["default"].dispatch({type:s["default"].EDIT_CORS,options:e})},toggleEnableCors:function(){o["default"].dispatch({type:s["default"].TOGGLE_ENABLE_CORS})},addOrigin:function(e){o["default"].dispatch({type:s["default"].CORS_ADD_ORIGIN,origin:e})},originChange:function(e){o["default"].dispatch({type:s["default"].CORS_IS_ALL_ORIGINS,isAllOrigins:e})},deleteOrigin:function(e){o["default"].dispatch({type:s["default"].CORS_DELETE_ORIGIN,origin:e})},updateOrigin:function(e,t){o["default"].dispatch({type:s["default"].CORS_UPDATE_ORIGIN,updatedOrigin:e,originalOrigin:t})},methodChange:function(e){o["default"].dispatch({type:s["default"].CORS_METHOD_CHANGE,httpMethod:e})},saveEnableCorsToHttpd:function(e,t){var n=new u["default"].ConfigModel({section:"httpd",attribute:"enable_cors",value:e.toString(),node:t});return n.save()},saveCorsOrigins:function(e,t){var n=new u["default"].ConfigModel({section:"cors",attribute:"origins",value:e,node:t});return n.save()},saveCorsCredentials:function(e){var t=new u["default"].ConfigModel({section:"cors",attribute:"credentials",value:"true",node:e});return t.save()},saveCorsHeaders:function(e){var t=new u["default"].ConfigModel({section:"cors",attribute:"headers",value:"accept, authorization, content-type, origin, referer",node:e});return t.save()},saveCorsMethods:function(e){var t=new u["default"].ConfigModel({section:"cors",attribute:"methods",value:"GET, PUT, POST, HEAD, DELETE",node:e});return t.save()},sanitizeOrigins:function(e){return _.isEmpty(e)?"":e.join(",")},toggleLoadingBarsToEnabled:function(e){o["default"].dispatch({type:s["default"].CORS_SET_IS_LOADING,isLoading:e})},saveCors:function(e){this.toggleLoadingBarsToEnabled(!0);var t=[];t.push(this.saveEnableCorsToHttpd(e.enableCors,e.node)),e.enableCors&&(t.push(this.saveCorsOrigins(this.sanitizeOrigins(e.origins),e.node)),t.push(this.saveCorsCredentials(e.node)),t.push(this.saveCorsHeaders(e.node)),t.push(this.saveCorsMethods(e.node))),o["default"].when(t).then(function(){o["default"].addNotification({msg:"Cors settings updated.",type:"success",clear:!0}),this.hideDeleteDomainModal(),this.toggleLoadingBarsToEnabled(!1)}.bind(this),function(){o["default"].addNotification({msg:"Error! Could not save your CORS settings. Please try again.",type:"error",clear:!0}),this.toggleLoadingBarsToEnabled(!1)}.bind(this))},showDeleteDomainModal:function(e){o["default"].dispatch({type:s["default"].CORS_SHOW_DELETE_DOMAIN_MODAL,options:{domain:e}})},hideDeleteDomainModal:function(){o["default"].dispatch({type:s["default"].CORS_HIDE_DELETE_DOMAIN_MODAL})}}},function(e,t,n){var r=n(838);"string"==typeof r&&(r=[[e.id,r,""]]);n(288)(r,{});r.locals&&(e.exports=r.locals)},function(e,t,n){t=e.exports=n(275)(),t.push([e.id,'.clearfix{*zoom:1}.clearfix:after,.clearfix:before{display:table;content:"";line-height:0}.clearfix:after{clear:both}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.input-block-level{display:block;width:100%;min-height:30px;box-sizing:border-box}.config-item{height:65px}.config-item .js-value-input{width:80%;margin:0}.config-item .js-delete-value,.config-item .js-show-value{cursor:pointer}.config-item .js-hidden{display:none}.config-item .text-center{text-align:center}.config-item button{width:7%}#config-trash{width:5%}table.config thead th{border-left:none;border-bottom:2px solid #999}table.config tr td,table.config tr th{vertical-align:middle}table.config tr td .btn.btn-small,table.config tr th .btn.btn-small{padding:10px 3px}#add-new-section{line-height:40px;cursor:pointer}#add-new-section:hover{transition:none;text-decoration:none;color:#af2d24}#add-section-button{border-left:1px solid #ccc;padding:12px 14px}.add-section-tray{padding:20px;width:300px}.add-section-tray:before{right:138px}.add-section-tray input{width:100%}.add-section-tray form{margin-bottom:0}.add-section-tray a.btn{color:#fff;background-color:#e33f3b;line-height:1.5em;border:0;padding:10px 10px 9px;font-size:14px;border-radius:5px}.add-section-tray a.btn:hover{background-color:#cbcbcb;color:#fff}.add-section-tray .typeahead{width:260px;margin-top:0}.add-section-tray .typeahead a{color:#fff}.config-warning-cluster-wrapper{margin:40px auto;width:70%}.config-warning-cluster-wrapper .config-warning-cluster-container{margin-left:-50px}.config-warning-cluster-wrapper .fonticon-attention-circled{font-size:40px}.config-warning-cluster-wrapper .config-warning-icon-container{width:50px;margin-top:-5px}.config-warning-cluster-wrapper .config-warning-other-text{margin-left:50px}',""])},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(84),o=(r(i),n(99)),a=r(o),s=n(840),l=r(s);n(843),l["default"].initialize=function(){a["default"].addHeaderLink({title:"Replication",href:"#/replication",icon:"fonticon-replicate"})},a["default"].registerUrls("replication",{app:function(e){return"#/replication/"+e}}),t["default"]=l["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(84),o=(r(i),n(99)),a=r(o),s=n(841),l=r(s),u=n(842),c=r(u),d=a["default"].RouteObject.extend({layout:"one_pane",routes:{replication:"defaultView","replication/:dbname":"defaultView"},selectedHeader:"Replication",apiUrl:function(){return[this.replication.url(),this.replication.documentation]},crumbs:[{name:"Replicate changes from: "}],defaultView:function(e){var t=a["default"].session.isAdmin();return this.tasks=[],this.databases=new l["default"].DBList({}),this.replication=new l["default"].Replicate({}),t?(this.tasks=new l["default"].Tasks({id:"ReplicationTasks"}),void this.setView("#dashboard-content",new c["default"].ReplicationFormForAdmins({selectedDB:e||"",collection:this.databases,status:this.tasks}))):void this.setView("#dashboard-content",new c["default"].ReplicationForm({selectedDB:e||"",collection:this.databases,status:this.tasks}))}});l["default"].RouteObjects=[d],t["default"]=l["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(84),o=r(i),a=n(99),s=r(a),l={};l.DBModel=Backbone.Model.extend({label:function(){return this.get("name")}}),l.DBList=Backbone.Collection.extend({model:l.DBModel,url:function(){return o["default"].host+"/_all_dbs"},parse:function(e){return _.map(e,function(e){return{id:e,name:e}})}}),l.Task=Backbone.Model.extend({}),l.Tasks=Backbone.Collection.extend({model:l.Task,url:function(){return o["default"].host+"/_active_tasks"},parse:function(e){return _.filter(e,function(e){return"replication"===e.type})}}),l.Replicate=Backbone.Model.extend({documentation:s["default"].constants.DOC_URLS.REPLICATION,url:function(){return window.location.origin+"/_replicate"}}),t["default"]=l},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(84),o=(r(i),n(99)),a=r(o),s=n(291),l=r(s),u=n(841),c=r(u),d={},f={},p={rate:5,intervalId:null};_.extend(f,Backbone.Events),d.ReplicationFormForAdmins=a["default"].View.extend({template:"addons/replication/templates/form",events:{"submit #replication":"validate","click .btn-group .btn":"showFields","click .swap":"swapFields","click .options":"toggleAdvancedOptions"},initialize:function(e){this.status=e.status,this.selectedDB=e.selectedDB,this.newRepModel=new c["default"].Replicate({})},afterRender:function(){this.dbSearchTypeahead=new l["default"].DbSearchTypeahead({dbLimit:30,el:"input#to_name"}),this.dbSearchTypeahead.render()},beforeRender:function(){this.insertView("#replicationStatus",new d.ReplicationListForAdmins({collection:this.status}))},cleanup:function(){clearInterval(p.intervalId)},enableFields:function(){this.$el.find("input","select").attr("disabled",!1)},disableFields:function(){this.$el.find("input:hidden","select:hidden").attr("disabled",!0)},showFields:function(e){var t=this.$(e.currentTarget),n=t.val();return"local"===n?void t.parents(".form_set").addClass("local"):void t.parents(".form_set").removeClass("local")},establish:function(){return[this.collection.fetch(),this.status.fetch()]},validate:function(e){if(e.preventDefault(),this.formValidation())return void a["default"].addNotification({msg:"Please enter every field.",type:"error",clear:!0});if(this.$("input#to_name").is(":visible")&&!this.$("input[name=create_target]").is(":checked")){var t=this.collection.where({name:this.$("input#to_name").val()});if(0===t.length)return void a["default"].addNotification({msg:"This database doesn't exist. Check create target if you want to create it.",type:"error",clear:!0})}this.submit(e)},formValidation:function(){var e=this.$el.find("input:visible"),t=!1;return _.each(e,function(e){"http://"!==e.value&&""!==e.value||(t=!0)}),t},serialize:function(){return{databases:this.collection.toJSON(),selectedDB:this.selectedDB}},startReplication:function(e){var t=this;this.newRepModel.save(e,{success:function(e){a["default"].addNotification({msg:"Replication from "+e.get("source")+" to "+e.get("target")+" has begun.",type:"success",clear:!0}),t.updateButtonText(!1),f.trigger("update:tasks")},error:function(e,n,r){var i=JSON.parse(n.responseText);a["default"].addNotification({msg:i.reason,type:"error",clear:!0}),t.updateButtonText(!1)}}),this.enableFields()},updateButtonText:function(e){var t=this.$("#replication button[type=submit]");e?t.text("Starting replication...").attr("disabled",!0):t.text("Replication").attr("disabled",!1)},submit:function(e){this.disableFields();var t={};_.map(this.$(e.currentTarget).serializeArray(),function(e){""!==e.value&&(t[e.name]="true"===e.value||e.value.replace(/\s/g,"").toLowerCase())}),this.updateButtonText(!0),this.startReplication(t)},swapFields:function(e){var t=this.$("#from_name"),n=this.$("#to_name"),r=this.$("#to_url"),i=this.$("#from_url"),o=t.val(),a=i.val(),s=n.val(),l=r.val();return t.val(s),n.val(o),i.val(l),r.val(a),!1}}),d.ReplicationForm=d.ReplicationFormForAdmins.extend({template:"addons/replication/templates/form",events:{"submit #replication":"validate","click .btn-group .btn":"showFields","click .swap":"swapFields","click .options":"toggleAdvancedOptions"},initialize:function(e){this.selectedDB=e.selectedDB,this.newRepModel=new c["default"].Replicate({})},beforeRender:function(){},establish:function(){return[this.collection.fetch()]}}),d.ReplicationListForAdmins=a["default"].View.extend({tagName:"ul",initialize:function(){f.bind("update:tasks",this.establish,this),this.listenTo(this.collection,"reset",this.render),this.$el.prepend('<li class="header"><h4>Active Replication Tasks</h4></li>')},establish:function(){return[this.collection.fetch({reset:!0})]},setPolling:function(){var e=this;this.cleanup(),p.intervalId=setInterval(function(){e.establish()},1e3*p.rate)},cleanup:function(){f.unbind("update:tasks"),clearInterval(p.intervalId)},beforeRender:function(){this.collection.forEach(function(e){this.insertView(new d.replicationItem({model:e}))},this)},showHeader:function(){this.$el.parent().toggleClass("showHeader",this.collection.length>0)},afterRender:function(){this.showHeader(),this.setPolling()}}),d.replicationItem=a["default"].View.extend({tagName:"li",className:"row",template:"addons/replication/templates/progress",events:{"click .cancel":"cancelReplication"},initialize:function(){this.newRepModel=new c["default"].Replicate({})},establish:function(){return[this.model.fetch()]},cancelReplication:function(e){var t=this.$(e.currentTarget),n=t.attr("data-rep-id");this.newRepModel.save({replication_id:n,cancel:!0},{success:function(e,t,n){a["default"].addNotification({msg:"Replication stopped.",type:"success",clear:!0})},error:function(e,t,n){var r=JSON.parse(t.responseText);a["default"].addNotification({msg:r.reason,type:"error",clear:!0})}})},afterRender:function(){this.model.get("continuous")&&this.$el.addClass("continuous")},serialize:function(){return{progress:this.model.get("progress"),target:this.model.get("target"),source:this.model.get("source"),continuous:this.model.get("continuous"),repid:this.model.get("replication_id")}}}),t["default"]=d},function(e,t,n){var r=n(844);"string"==typeof r&&(r=[[e.id,r,""]]);n(288)(r,{});r.locals&&(e.exports=r.locals)},function(e,t,n){t=e.exports=n(275)(),t.push([e.id,"#replication{position:relative;max-width:none;width:auto}#replication .form_set{width:350px;display:inline-block;border:1px solid #a59d9d;padding:15px 10px 0;margin-bottom:20px}#replication .form_set.middle{width:100px;border:none;position:relative;height:100px;margin:0}#replication .form_set input,#replication .form_set select{margin:0 0 16px 5px;height:40px;width:318px}#replication .form_set .btn-group{margin:0 0 16px 5px}#replication .form_set .btn-group .btn{padding:10px 57px}#replication .form_set.local .local_option{display:block}#replication .form_set.local .remote_option{display:none}#replication .form_set.local .local-btn{background-color:#e33f3b;color:#fff}#replication .form_set.local .remote-btn{background-color:#f5f5f5;color:gray}#replication .form_set .local_option{display:none}#replication .form_set .remote-btn{background-color:#e33f3b;color:#fff}#replication .options{position:relative}#replication .options:after{border-bottom:5px solid #000;border-top:none}#replication .options.off:after,#replication .options:after{content:'';display:block;position:absolute;right:-16px;top:9px;width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent}#replication .options.off:after{border-bottom:none;border-top:5px solid #000}#replication .control-group label{float:left;min-height:30px;vertical-align:top;padding-right:5px;min-width:130px;padding-left:0}#replication .control-group input[type=checkbox],#replication .control-group input[type=radio]{margin:0 0 2px}#replication .circle{z-index:0;position:absolute;top:20px;left:15px}#replication .circle:after{width:70px;height:70px;content:'';display:block;position:relative;margin:0 auto;border:1px solid #a59d9d;border-radius:40px}#replication .swap{text-decoration:none;z-index:30;cursor:pointer;position:absolute;font-size:40px;width:27px;height:12px;top:31px;left:30px}#replication .swap:hover{color:#a59d9d}#replicationStatus.showHeader li.header{display:block;border:none}#replicationStatus.showHeader ul{border:1px solid #a59d9d}#replicationStatus li.header{display:none}#replicationStatus ul{margin:0}#replicationStatus ul li{padding:10px;margin:0;list-style:none;border-top:1px solid #a59d9d}#replicationStatus ul li .progress,#replicationStatus ul li p{margin:0;vertical-align:bottom}#replicationStatus ul li .progress.break,#replicationStatus ul li p.break{-ms-word-break:break-all;word-break:break-all;word-break:break-word;-webkit-hyphens:auto;hyphens:auto}#replicationStatus ul li div.bar{font-size:16px;line-height:30px}.task-cancel-button{padding:4px 12px;margin-bottom:3px}",""])},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(84),o=(r(i),n(99)),a=r(o);n(846);var s=a["default"].addon();s.initialize=function(){},t["default"]=s},function(e,t,n){var r=n(847);"string"==typeof r&&(r=[[e.id,r,""]]);n(288)(r,{});r.locals&&(e.exports=r.locals)},function(e,t,n){t=e.exports=n(275)(),t.push([e.id,'.clearfix{*zoom:1}.clearfix:after,.clearfix:before{display:table;content:"";line-height:0}.clearfix:after{clear:both}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.input-block-level{display:block;width:100%;min-height:30px;box-sizing:border-box}.cors-page .loading-lines{margin-top:20px}.cors-page .enable-disable.btn{margin-top:10px}#cors-header{margin:18px 30px 0}#corsForm{margin:0}#corsForm .checkbox{font-size:16px}#corsForm .checkbox input[type=checkbox]{margin-top:4px}#corsForm .radio{font-size:16px}#corsForm .radio input[type=radio]{margin-top:4px}#corsForm .cors-enable{padding:10px 30px 18px;border-bottom:1px solid #ccc}#corsForm #origin-domains-container button.add-domain{height:46px}#corsForm #collapsing-container{border-top:1px solid #fff;border-bottom:1px solid #ccc;padding:18px 30px}#corsForm .origin-domains{margin:0;padding:18px 0}#corsForm .origin-domains p{line-height:36px}#corsForm .origin-domains .controls{margin-top:18px}#corsForm .localhost-tip{padding:18px 30px;border-top:1px solid #fff;border-bottom:1px solid #ccc}#corsForm .form-actions{padding:18px 30px;margin-top:0;border-top:1px solid #fff}#corsForm .input-append{width:90%}#corsForm input[type=text]{width:100%}#corsForm .input-append.edit-domain-section{width:100%;margin-bottom:0}#corsForm .input-append.edit-domain-section input{width:calc(100% - 82px)}#origin-domain-table td{padding:8px 2px}#origin-domain-table span{cursor:pointer;color:#e33f3b;display:inline-block;padding-top:9px}#origin-domain-table tr a{text-decoration:none;color:#767f89}#origin-domain-table tr a:hover{color:#e33f3b}#origin-domain-table .edit-domain-section .btn{height:46px}#origin-domain-table .url-display{padding:10px}#origin-domain-table .update-domain-btn{position:absolute;right:-2px;top:0;padding:9px;border-radius:0 6px 6px 0}',""])},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(84),o=(r(i),n(99)),a=(r(o),n(849)),s=r(a);n(855),s["default"].initialize=function(){},t["default"]=s["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(84),o=r(i),a=n(99),s=(r(a),n(668)),l=r(s),u=n(850),c=r(u),d=n(851),f=r(d),p=n(854),h=r(p),g=n(692),m=r(g),v=m["default"].extend({roles:["fx_loggedIn"],routes:{"database/:database/permissions":"permissions"},initialize:function(e,t,n){var r=o["default"].getParams();r.include_docs=!0,this.initViews(n[0])},initViews:function(e){this.database=new l["default"].Model({id:e}),this.security=new c["default"].Security(null,{database:this.database}),this.allDatabases=new l["default"].List,this.createDesignDocsCollection(),this.addLeftHeader(),this.addSidebar("permissions")},apiUrl:function(){return[this.security.url("apiurl"),this.security.documentation]},establish:function(){return[this.designDocs.fetch({reset:!0}),this.allDatabases.fetchOnce()]},permissions:function(){f["default"].fetchPermissions(this.database,this.security),this.setComponent("#dashboard-content",h["default"].PermissionsController)},crumbs:function(){return[{name:this.database.id,link:l["default"].databaseUrl(this.database)},{name:"Permissions"}]},cleanup:function(){this.leftheader&&this.removeView("#breadcrumbs"),this.removeComponent("#sidebar-content")}});h["default"].RouteObjects=[v],t["default"]=h["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(84),o=(r(i),n(99)),a=r(o),s=a["default"].addon();s.Security=Backbone.Model.extend({defaults:{admins:{names:[],roles:[]},members:{names:[],roles:[]}},isNew:function(){return!1},initialize:function(e,t){this.database=t.database},url:function(){return window.location.origin+"/"+this.database.safeID()+"/_security"},documentation:a["default"].constants.DOC_URLS.DB_PERMISSION,addItem:function(e,t,n){var r=this.get(n),i=this.canAddItem(e,t,n);return i.error?i:(r[t].push(e),this.set(n,r))},canAddItem:function(e,t,n){var r=this.get(n);return r&&r[t]?r[t].indexOf(e)>-1?{error:!0,msg:"Role/Name has already been added"}:{error:!1}:{error:!0,msg:"Section "+n+" does not exist"}},removeItem:function(e,t,n){var r=this.get(n),i=r[t],o=_.indexOf(i,e);if(o!==-1)return i.splice(o,1),r[t]=i,this.set(n,r)}}),t["default"]=s},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(99),o=r(i),a=n(852),s=r(a),l=n(853),u=r(l),c=u["default"].permissionsStore;t["default"]={fetchPermissions:function(e,t){o["default"].dispatch({type:s["default"].PERMISSIONS_FETCHING,database:e,security:t}),o["default"].when([e.fetch(),t.fetch()]).then(function(){this.editPermissions(e,t)}.bind(this))},editPermissions:function(e,t){o["default"].dispatch({type:s["default"].PERMISSIONS_EDIT,database:e,security:t})},addItem:function(e){var t=c.getSecurity().canAddItem(e.value,e.type,e.section);return t.error?void o["default"].addNotification({msg:t.msg,type:"error"}):(o["default"].dispatch({type:s["default"].PERMISSIONS_ADD_ITEM,options:e}),void this.savePermissions())},removeItem:function(e){o["default"].dispatch({type:s["default"].PERMISSIONS_REMOVE_ITEM,options:e}),this.savePermissions()},savePermissions:function(){c.getSecurity().save().then(function(){o["default"].addNotification({msg:"Database permissions has been updated."})},function(e){(e||e.responseJSON)&&o["default"].addNotification({msg:"Could not update permissions - reason: "+e.responseJSON.reason,type:"error"})})}}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]={PERMISSIONS_EDIT:"PERMISSIONS_EDIT",PERMISSIONS_FETCHING:"PERMISSIONS_FETCHING",PERMISSIONS_ADD_ITEM:"PERMISSIONS_ADD_ITEM",PERMISSIONS_REMOVE_ITEM:"PERMISSIONS_REMOVE_ITEM"}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(99),o=r(i),a=n(852),s=r(a),l={};l.PermissionsStore=o["default"].Store.extend({initialize:function(){this._isLoading=!0},isLoading:function(){return this._isLoading},editPermissions:function(e,t){this._database=e,this._security=t,this._isLoading=!1},getItem:function(e,t){return this._isLoading?[]:this._security.get(e)[t]},getDatabase:function(){return this._database},getSecurity:function(){return this._security},getAdminRoles:function(){return this.getItem("admins","roles")},getAdminNames:function(){return this.getItem("admins","names")},getMemberNames:function(){return this.getItem("members","names")},getMemberRoles:function(){return this.getItem("members","roles")},addItem:function(e){this._security.addItem(e.value,e.type,e.section)},removeItem:function(e){this._security.removeItem(e.value,e.type,e.section)},dispatch:function(e){switch(e.type){case s["default"].PERMISSIONS_FETCHING:this._isLoading=!0,this.triggerChange();break;case s["default"].PERMISSIONS_EDIT:this.editPermissions(e.database,e.security),this.triggerChange();break;case s["default"].PERMISSIONS_ADD_ITEM:this.addItem(e.options),this.triggerChange();break;case s["default"].PERMISSIONS_REMOVE_ITEM:this.removeItem(e.options),this.triggerChange();break;default:return}}}),l.permissionsStore=new l.PermissionsStore,l.permissionsStore.dispatchToken=o["default"].dispatcher.register(l.permissionsStore.dispatch),t["default"]=l},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(84),o=r(i),a=n(99),s=r(a),l=n(106),u=r(l),c=n(293),d=r(c),f=n(853),p=r(f),h=n(851),g=r(h),m=d["default"].LoadLines,v=p["default"].permissionsStore,b=o["default"].helpers.getDocUrl,y=u["default"].createClass({displayName:"PermissionsItem",removeItem:function(e){this.props.removeItem({value:this.props.item,type:this.props.type,section:this.props.section})},render:function(){return u["default"].createElement("li",null,u["default"].createElement("span",null,this.props.item),u["default"].createElement("button",{onClick:this.removeItem,type:"button",className:"pull-right close"},"×"))}}),w=u["default"].createClass({displayName:"PermissionsSection",getInitialState:function(){return{newRole:"",newName:""}},getHelp:function(){return"admins"===this.props.section,"Database members can access the database. If no members are defined, the database is public. "},isEmptyValue:function(e,t){return!!_.isEmpty(e)&&(s["default"].addNotification({msg:"Cannot add an empty value for "+t+".",type:"warning"}),!0)},addNames:function(e){e.preventDefault(),this.isEmptyValue(this.state.newName,"names")||(this.props.addItem({type:"names",section:this.props.section,value:this.state.newName}),this.setState({newName:""}))},addRoles:function(e){e.preventDefault(),this.isEmptyValue(this.state.newRole,"roles")||(this.props.addItem({type:"roles",section:this.props.section,value:this.state.newRole}),this.setState({newRole:""}))},getItems:function(e,t){return _.map(e,function(e,n){return u["default"].createElement(y,{key:n,item:e,section:this.props.section,type:t,removeItem:this.props.removeItem})},this)},getNames:function(){return this.getItems(this.props.names,"names")},getRoles:function(){return this.getItems(this.props.roles,"roles")},nameChange:function(e){this.setState({newName:e.target.value})},roleChange:function(e){this.setState({newRole:e.target.value})},render:function(){return u["default"].createElement("div",null,u["default"].createElement("header",{className:"page-header"},u["default"].createElement("h3",null,this.props.section),u["default"].createElement("p",{className:"help"},this.getHelp(),u["default"].createElement("a",{className:"help-link","data-bypass":"true",href:b("DB_PERMISSION"),target:"_blank"},u["default"].createElement("i",{className:"icon-question-sign"})))),u["default"].createElement("div",{className:"row-fluid"},u["default"].createElement("div",{className:"span6"},u["default"].createElement("header",null,u["default"].createElement("h4",null,"Users"),u["default"].createElement("p",null,"Specify users who will have ",this.props.section," access to this database.")),u["default"].createElement("form",{onSubmit:this.addNames,className:"permission-item-form form-inline"},u["default"].createElement("input",{onChange:this.nameChange,value:this.state.newName,type:"text",className:"item input-small",placeholder:"Add User"}),u["default"].createElement("button",{type:"submit",className:"btn btn-success"},u["default"].createElement("i",{className:"icon fonticon-plus-circled"})," Add User")),u["default"].createElement("ul",{className:"clearfix unstyled permission-items span10"},this.getNames())),u["default"].createElement("div",{className:"span6"},u["default"].createElement("header",null,u["default"].createElement("h4",null,"Roles"),u["default"].createElement("p",null,"Users with any of the following role(s) will have ",this.props.section," access.")),u["default"].createElement("form",{onSubmit:this.addRoles,className:"permission-item-form form-inline"},u["default"].createElement("input",{onChange:this.roleChange,value:this.state.newRole,type:"text",className:"item input-small",placeholder:"Add Role"}),u["default"].createElement("button",{type:"submit",className:"btn btn-success"},u["default"].createElement("i",{className:"icon fonticon-plus-circled"})," Add Role")),u["default"].createElement("ul",{className:"unstyled permission-items span10"},this.getRoles()))))}}),x=u["default"].createClass({displayName:"PermissionsController",getStoreState:function(){return{isLoading:v.isLoading(),adminRoles:v.getAdminRoles(),adminNames:v.getAdminNames(),memberRoles:v.getMemberRoles(),memberNames:v.getMemberNames()}},getInitialState:function(){return this.getStoreState()},componentDidMount:function(){v.on("change",this.onChange,this)},componentWillUnmount:function(){v.off("change",this.onChange)},onChange:function(){this.setState(this.getStoreState())},addItem:function(e){g["default"].addItem(e)},removeItem:function(e){g["default"].removeItem(e)},render:function(){return this.state.isLoading?u["default"].createElement(m,null):u["default"].createElement("div",{className:"permissions-page flex-body"},u["default"].createElement("div",{id:"sections"},u["default"].createElement(w,{roles:this.state.adminRoles,names:this.state.adminNames,addItem:this.addItem,removeItem:this.removeItem,section:"admins"}),u["default"].createElement(w,{roles:this.state.memberRoles,names:this.state.memberNames,addItem:this.addItem,removeItem:this.removeItem,section:"members"})))}});t["default"]={PermissionsController:x,PermissionsSection:w,PermissionsItem:y}},function(e,t,n){var r=n(856);"string"==typeof r&&(r=[[e.id,r,""]]);n(288)(r,{});r.locals&&(e.exports=r.locals)},function(e,t,n){t=e.exports=n(275)(),t.push([e.id,".permission-items.unstyled{margin-left:0}.permission-items.unstyled li{padding:5px;border-bottom:1px solid #e3e3e3;border-right:1px solid #e3e3e3;border-left:3px solid #e3e3e3}.permission-items.unstyled li:first-child{border-top:1px solid #e3e3e3}.permission-items.unstyled li:nth-child(odd){border-left:3px solid red}#dashboard #dashboard-content div.permissions-page{padding:5px 15px}",""])},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(84),o=r(i),a=n(99),s=r(a),l=n(858),u=r(l);n(864),u["default"].session=new u["default"].Session,s["default"].setSession(u["default"].session),o["default"].session=u["default"].session,u["default"].initialize=function(){s["default"].addHeaderLink({id:"auth",title:"Login",href:"#login",icon:"fonticon-user",bottomNav:!0}),u["default"].session.on("change",function(){
var e=u["default"].session,t={};e.isAdminParty()?t={id:"auth",title:"Admin Party!",href:"#createAdmin",icon:"fonticon-user",bottomNav:!0}:e.isLoggedIn()?(t={id:"auth",title:e.user().name,href:"#changePassword",icon:"fonticon-user",bottomNav:!0},s["default"].removeHeaderLink({id:"logout",footerNav:!0}),s["default"].addHeaderLink({id:"logout",footerNav:!0,href:"#logout",title:"Logout",icon:"",className:"logout"})):(t={id:"auth",title:"Login",href:"#login",icon:"fonticon-user",bottomNav:!0},s["default"].removeHeaderLink({id:"logout",footerNav:!0})),s["default"].updateHeaderLink(t)}),u["default"].session.fetchUser().then(function(){u["default"].session.trigger("change")});var e=function(e,t){var n=$.Deferred();return e.isAdminParty()?(e.trigger("authenticated"),n.resolve()):e.matchesRoles(t)?(e.trigger("authenticated"),n.resolve()):n.reject(),[n]},t=function(){var e=window.location.hash.replace("#",""),t=/login\?urlback=/g;t.test(e)&&(e=e.replace("login?urlback=","")),s["default"].navigate("/login?urlback="+e,{replace:!0})};s["default"].auth.registerAuth(e),s["default"].auth.registerAuthDenied(t)},t["default"]=u["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(84),o=r(i),a=n(99),s=r(a),l=n(859),u=r(l),c=n(860),d=r(c),f=n(862),p=r(f),h=n(813),g=r(h),m=s["default"].RouteObject.extend({layout:"one_pane",routes:{"login?*extra":"login",login:"login",logout:"logout",createAdmin:"checkNodes","createAdmin/:node":"createAdminForNode"},disableLoader:!0,hideNotificationCenter:!0,checkNodes:function(){g["default"].navigateToNodeBasedOnNodeCount("/createAdmin/")},login:function(){this.crumbs=[{name:"Log In to CouchDB"}],this.setComponent("#dashboard-content",p["default"].LoginForm,{urlBack:o["default"].getParams().urlback})},logout:function(){s["default"].addNotification({msg:"You have been logged out."}),s["default"].session.logout().then(function(){s["default"].navigate("/")})},createAdminForNode:function(){g["default"].fetchNodes(),this.crumbs=[{name:"Create Admin"}],this.setComponent("#dashboard-content",p["default"].CreateAdminForm,{loginAfter:!0})}}),v=s["default"].RouteObject.extend({layout:"with_sidebar",routes:{changePassword:{route:"checkNodesForPasswordChange",roles:["fx_loggedIn"]},"changePassword/:node":{route:"changePassword",roles:["fx_loggedIn"]},addAdmin:{route:"checkNodesForAddAdmin",roles:["_admin"]},"addAdmin/:node":{route:"addAdmin",roles:["_admin"]}},checkNodesForPasswordChange:function(){g["default"].navigateToNodeBasedOnNodeCount("/changePassword/")},checkNodesForAddAdmin:function(){g["default"].navigateToNodeBasedOnNodeCount("/addAdmin/")},selectedHeader:function(){return s["default"].session.user().name},initialize:function(){this.setComponent("#sidebar-content",p["default"].CreateAdminSidebar)},changePassword:function(){g["default"].fetchNodes(),d["default"].selectPage("changePassword"),this.setComponent("#dashboard-content",p["default"].ChangePasswordForm)},addAdmin:function(){g["default"].fetchNodes(),d["default"].selectPage("addAdmin"),this.setComponent("#dashboard-content",p["default"].CreateAdminForm,{loginAfter:!1})},crumbs:[{name:"User Management"}]});u["default"].RouteObjects=[m,v],t["default"]=u["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(84),o=r(i),a=n(99),s=r(a),l=n(272),u=r(l),c=new s["default"].addon,d=Backbone.Model.extend({initialize:function(e,t){this.node=t.node},url:function(){if(!this.node)throw new Error("no node set");return o["default"].host+"/_node/"+this.node+"/_config/admins/"+this.get("name")},isNew:function(){return!1},sync:function(e,t,n){var r={url:t.url(),contentType:"application/json",dataType:"json",data:JSON.stringify(t.get("value"))};return"delete"===e?r.type="DELETE":r.type="PUT",$.ajax(r)}});c.Session=u["default"].Session.extend({url:o["default"].host+"/_session",initialize:function(e){e||(e={}),_.bindAll(this),this.messages=_.extend({},{missingCredentials:"Username or password cannot be blank.",loggedIn:"You have been logged in.",adminCreated:"CouchDB admin created",changePassword:"Your password has been updated.",adminCreationFailedPrefix:"Could not create admin."},e.messages)},isAdminParty:function(){var e=this.get("userCtx");return!e.name&&e.roles.indexOf("_admin")>-1},isLoggedIn:function(){var e=this.get("userCtx");return!!e&&!!e.name},userRoles:function(){var e=this.user();return e&&e.roles?(e.roles.indexOf("fx_loggedIn")===-1&&e.roles.push("fx_loggedIn"),e.roles):[]},matchesRoles:function(e){if(0===e.length)return!0;var t=_.intersection(this.userRoles(),e).length;return t>0},validateUser:function(e,t,n){if(_.isEmpty(e)||_.isEmpty(t)){var r=s["default"].Deferred();return r.rejectWith(this,[n]),r}},validatePasswords:function(e,t,n){if(_.isEmpty(e)||_.isEmpty(t)||e!==t){var r=s["default"].Deferred();return r.rejectWith(this,[n]),r}},createAdmin:function(e,t,n,r){var i=this.validateUser(e,t,this.messages.missingCredentials);if(i)return i;var o=new d({name:e,value:t},{node:r});return o.save().then(function(){return n?this.login(e,t):this.fetchUser({forceFetch:!0})}.bind(this))},login:function(e,t){var n=this.validateUser(e,t,this.messages.missingCredentials);return n?n:$.ajax({cache:!1,type:"POST",url:o["default"].host+"/_session",dataType:"json",data:{name:e,password:t}}).then(function(){return this.fetchUser({forceFetch:!0})}.bind(this))},logout:function(){var e=this;return $.ajax({type:"DELETE",url:o["default"].host+"/_session",dataType:"json",username:"_",password:"_"}).then(function(){return e.fetchUser({forceFetch:!0})})},changePassword:function(e,t,n){var r="Passwords do not match.",i=this.validatePasswords(e,t,r);if(i)return i;var o=this.get("userCtx").name,a=new d({name:o,value:e},{node:n});return a.save().then(function(){return this.login(o,e)}.bind(this))}}),t["default"]=c},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(99),o=r(i),a=n(861),s=r(a),l=n(810),u=r(l),c=u["default"].nodesStore,d=function(e,t,n){n=e,3===arguments.length&&(n=e.responseJSON.reason),o["default"].addNotification({msg:n,type:"error"})};t["default"]={login:function(e,t,n){var r=o["default"].session.login(e,t);r.then(function(){return o["default"].addNotification({msg:o["default"].session.messages.loggedIn}),n?o["default"].navigate(n):void o["default"].navigate("/")}),r.fail(d)},changePassword:function(e,t){var n=c.getNodes(),r=o["default"].session.changePassword(e,t,n[0].node);r.done(function(){o["default"].addNotification({msg:o["default"].session.messages.changePassword}),o["default"].dispatch({type:s["default"].AUTH_CLEAR_CHANGE_PWD_FIELDS})}),r.fail(d)},updateChangePasswordField:function(e){o["default"].dispatch({type:s["default"].AUTH_UPDATE_CHANGE_PWD_FIELD,value:e})},updateChangePasswordConfirmField:function(e){o["default"].dispatch({type:s["default"].AUTH_UPDATE_CHANGE_PWD_CONFIRM_FIELD,value:e})},createAdmin:function(e,t,n){var r=c.getNodes(),i=o["default"].session.createAdmin(e,t,n,r[0].node);i.then(function(){o["default"].addNotification({msg:o["default"].session.messages.adminCreated}),n?o["default"].navigate("/"):o["default"].dispatch({type:s["default"].AUTH_CLEAR_CREATE_ADMIN_FIELDS})}),i.fail(function(e,t,n){n=e,3===arguments.length&&(n=e.responseJSON.reason),d(o["default"].session.messages.adminCreationFailedPrefix+" "+n)})},updateCreateAdminUsername:function(e){o["default"].dispatch({type:s["default"].AUTH_UPDATE_CREATE_ADMIN_USERNAME_FIELD,value:e})},updateCreateAdminPassword:function(e){o["default"].dispatch({type:s["default"].AUTH_UPDATE_CREATE_ADMIN_PWD_FIELD,value:e})},selectPage:function(e){o["default"].dispatch({type:s["default"].AUTH_SELECT_PAGE,page:e})}}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]={AUTH_CLEAR_CHANGE_PWD_FIELDS:"AUTH_CLEAR_CHANGE_PWD_FIELDS",AUTH_UPDATE_CHANGE_PWD_FIELD:"AUTH_UPDATE_CHANGE_PWD_FIELD",AUTH_UPDATE_CHANGE_PWD_CONFIRM_FIELD:"AUTH_UPDATE_CHANGE_PWD_CONFIRM_FIELD",AUTH_CLEAR_CREATE_ADMIN_FIELDS:"AUTH_CLEAR_CREATE_ADMIN_FIELDS",AUTH_UPDATE_CREATE_ADMIN_USERNAME_FIELD:"AUTH_UPDATE_CREATE_ADMIN_USERNAME_FIELD",AUTH_UPDATE_CREATE_ADMIN_PWD_FIELD:"AUTH_UPDATE_CREATE_ADMIN_PWD_FIELD",AUTH_SELECT_PAGE:"AUTH_SELECT_PAGE"}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(84),o=(r(i),n(99)),a=r(o),s=n(106),l=r(s),u=n(137),c=r(u),d=n(863),f=r(d),p=n(860),h=r(p),g=f["default"].changePasswordStore,m=f["default"].createAdminStore,v=f["default"].createAdminSidebarStore,b=l["default"].createClass({displayName:"LoginForm",propTypes:{urlBack:l["default"].PropTypes.string.isRequired},getInitialState:function(){return{username:"",password:""}},getDefaultProps:function(){return{urlBack:"",testBlankUsername:null,testBlankPassword:null}},onInputChange:function(e){var t="name"===e.target.name?{username:e.target.value}:{password:e.target.value};this.setState(t)},submit:function(e){e.preventDefault(),this.checkUnrecognizedAutoFill()||this.login(this.state.username,this.state.password)},checkUnrecognizedAutoFill:function(){if(""!==this.state.username||""!==this.state.password)return!1;var e=this.props.testBlankUsername?this.props.testBlankUsername:c["default"].findDOMNode(this.refs.username).value,t=this.props.testBlankPassword?this.props.testBlankPassword:c["default"].findDOMNode(this.refs.password).value;return this.setState({username:e,password:t}),this.login(e,t),!0},login:function(e,t){h["default"].login(e,t,this.props.urlBack)},componentDidMount:function(){c["default"].findDOMNode(this.refs.username).focus()},render:function(){return l["default"].createElement("div",{className:"couch-login-wrapper"},l["default"].createElement("div",{className:"row-fluid"},l["default"].createElement("div",{className:"span12"},l["default"].createElement("form",{id:"login",onSubmit:this.submit},l["default"].createElement("p",{className:"help-block"},"Enter your username and password."),l["default"].createElement("input",{id:"username",type:"text",name:"name",ref:"username",placeholder:"Username",size:"24",onChange:this.onInputChange,value:this.state.username}),l["default"].createElement("br",null),l["default"].createElement("input",{id:"password",type:"password",name:"password",ref:"password",placeholder:"Password",size:"24",onChange:this.onInputChange,value:this.state.password}),l["default"].createElement("br",null),l["default"].createElement("button",{id:"submit",className:"btn btn-success",type:"submit"},"Log In")))))}}),y=l["default"].createClass({displayName:"ChangePasswordForm",getInitialState:function(){return this.getStoreState()},getStoreState:function(){return{password:g.getChangePassword(),passwordConfirm:g.getChangePasswordConfirm()}},onChange:function(){this.setState(this.getStoreState())},onChangePassword:function(e){h["default"].updateChangePasswordField(e.target.value)},onChangePasswordConfirm:function(e){h["default"].updateChangePasswordConfirmField(e.target.value)},componentDidMount:function(){c["default"].findDOMNode(this.refs.password).focus(),g.on("change",this.onChange,this)},componentWillUnmount:function(){g.off("change",this.onChange)},changePassword:function(e){e.preventDefault(),h["default"].changePassword(this.state.password,this.state.passwordConfirm)},render:function(){return l["default"].createElement("div",{className:"auth-page"},l["default"].createElement("h3",null,"Change Password"),l["default"].createElement("form",{id:"change-password",onSubmit:this.changePassword},l["default"].createElement("p",null,"Enter your new password."),l["default"].createElement("input",{id:"password",type:"password",ref:"password",name:"password",placeholder:"Password",size:"24",onChange:this.onChangePassword,value:this.state.password}),l["default"].createElement("br",null),l["default"].createElement("input",{id:"password-confirm",type:"password",name:"password_confirm",placeholder:"Verify Password",size:"24",onChange:this.onChangePasswordConfirm,value:this.state.passwordConfirm}),l["default"].createElement("br",null),l["default"].createElement("p",null,l["default"].createElement("button",{type:"submit",className:"btn btn-primary"},"Change"))))}}),w=l["default"].createClass({displayName:"CreateAdminForm",propTypes:{loginAfter:l["default"].PropTypes.bool.isRequired},getInitialState:function(){return this.getStoreState()},getStoreState:function(){return{username:m.getUsername(),password:m.getPassword()}},onChange:function(){this.setState(this.getStoreState())},getDefaultProps:function(){return{loginAfter:""}},onChangeUsername:function(e){h["default"].updateCreateAdminUsername(e.target.value)},onChangePassword:function(e){h["default"].updateCreateAdminPassword(e.target.value)},componentDidMount:function(){c["default"].findDOMNode(this.refs.username).focus(),m.on("change",this.onChange,this)},componentWillUnmount:function(){m.off("change",this.onChange)},createAdmin:function(e){e.preventDefault(),h["default"].createAdmin(this.state.username,this.state.password,this.props.loginAfter)},render:function(){return l["default"].createElement("div",{className:"auth-page"},l["default"].createElement("h3",null,"Create Admins"),l["default"].createElement("p",null,"Before a server admin is configured, all clients have admin privileges. This is fine when HTTP access is restricted to trusted users. ",l["default"].createElement("strong",null,"If end-users will be accessing this CouchDB, you must create an admin account to prevent accidental (or malicious) data loss.")),l["default"].createElement("p",null,"Server admins can create and destroy databases, install and update _design documents, run the test suite, and edit all aspects of CouchDB configuration."),l["default"].createElement("form",{id:"create-admin-form",onSubmit:this.createAdmin},l["default"].createElement("input",{id:"username",type:"text",ref:"username",name:"name",placeholder:"Username",size:"24",onChange:this.onChangeUsername}),l["default"].createElement("br",null),l["default"].createElement("input",{id:"password",type:"password",name:"password",placeholder:"Password",size:"24",onChange:this.onChangePassword}),l["default"].createElement("p",null,"Non-admin users have read and write access to all databases, which are controlled by validation functions. CouchDB can be configured to block all access to anonymous users."),l["default"].createElement("button",{type:"submit",id:"create-admin",className:"btn btn-primary"},"Create Admin")))}}),x=l["default"].createClass({displayName:"CreateAdminSidebar",getInitialState:function(){return this.getStoreState()},getStoreState:function(){return{selectedPage:v.getSelectedPage()}},onChange:function(){this.setState(this.getStoreState())},componentDidMount:function(){v.on("change",this.onChange,this)},componentWillUnmount:function(){v.off("change",this.onChange)},selectPage:function(e){var t=e.target.href.split("#")[1];h["default"].selectPage(t)},render:function(){var e=a["default"].session.user(),t=_.isNull(e)?"":a["default"].session.user().name;return l["default"].createElement("div",{className:"sidenav"},l["default"].createElement("header",{className:"row-fluid"},l["default"].createElement("h3",null,t)),l["default"].createElement("ul",{className:"nav nav-list",onClick:this.selectPage},l["default"].createElement("li",{className:"changePassword"===this.state.selectedPage?"active":"","data-page":"changePassword"},l["default"].createElement("a",{href:"#changePassword"},"Change Password")),l["default"].createElement("li",{className:"addAdmin"===this.state.selectedPage?"active":"","data-page":"addAdmin"},l["default"].createElement("a",{href:"#addAdmin"},"Create Admins"))))}});t["default"]={LoginForm:b,ChangePasswordForm:y,CreateAdminForm:w,CreateAdminSidebar:x}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(84),o=(r(i),n(99)),a=r(o),s=n(861),l=r(s),u=a["default"].Store.extend({initialize:function(){this.reset()},reset:function(){this._changePassword="",this._changePasswordConfirm=""},getChangePassword:function(){return this._changePassword},getChangePasswordConfirm:function(){return this._changePasswordConfirm},setChangePassword:function(e){this._changePassword=e},setChangePasswordConfirm:function(e){this._changePasswordConfirm=e},dispatch:function(e){switch(e.type){case l["default"].AUTH_CLEAR_CHANGE_PWD_FIELDS:this.reset(),this.triggerChange();break;case l["default"].AUTH_UPDATE_CHANGE_PWD_FIELD:this.setChangePassword(e.value),this.triggerChange();break;case l["default"].AUTH_UPDATE_CHANGE_PWD_CONFIRM_FIELD:this.setChangePasswordConfirm(e.value),this.triggerChange();break;default:return}}}),c=new u;c.dispatchToken=a["default"].dispatcher.register(c.dispatch.bind(c));var d=a["default"].Store.extend({initialize:function(){this.reset()},reset:function(){this._username="",this._password=""},getUsername:function(){return this._username},getPassword:function(){return this._password},setUsername:function(e){this._username=e},setPassword:function(e){this._password=e},dispatch:function(e){switch(e.type){case l["default"].AUTH_CLEAR_CREATE_ADMIN_FIELDS:this.reset(),this.triggerChange();break;case l["default"].AUTH_UPDATE_CREATE_ADMIN_USERNAME_FIELD:this.setUsername(e.value),this.triggerChange();break;case l["default"].AUTH_UPDATE_CREATE_ADMIN_PWD_FIELD:this.setPassword(e.value),this.triggerChange();break;default:return}}}),f=new d;f.dispatchToken=a["default"].dispatcher.register(f.dispatch.bind(f));var p=a["default"].Store.extend({initialize:function(){this.reset()},reset:function(){this._selectedPage="changePassword"},getSelectedPage:function(){return this._selectedPage},setSelectedPage:function(e){this._selectedPage=e},dispatch:function(e){switch(e.type){case l["default"].AUTH_SELECT_PAGE:this.setSelectedPage(e.page),this.triggerChange();break;default:return}}}),h=new p;h.dispatchToken=a["default"].dispatcher.register(h.dispatch.bind(h)),t["default"]={changePasswordStore:c,createAdminStore:f,createAdminSidebarStore:h}},function(e,t,n){var r=n(865);"string"==typeof r&&(r=[[e.id,r,""]]);n(288)(r,{});r.locals&&(e.exports=r.locals)},function(e,t,n){t=e.exports=n(275)(),t.push([e.id,".sidenav header{padding-left:24px}.sidenav header h3{margin:8px 0 4px}#dashboard-content .auth-page{padding:20px}#dashboard-content .auth-page h3{margin-top:0}",""])},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(84),o=(r(i),n(99)),a=r(o),s=n(867),l=r(s);n(874),l["default"].initialize=function(){a["default"].addHeaderLink({title:"Verify",href:"#verifyinstall",icon:"fonticon-ok-circled",bottomNav:!0})},t["default"]=l["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(84),o=(r(i),n(99)),a=r(o),s=n(868),l=r(s),u=n(869),c=r(u),d=n(872),f=r(d),p=a["default"].RouteObject.extend({layout:"one_pane",routes:{verifyinstall:"verifyInstall"},selectedHeader:"Verify",verifyInstall:function(){c["default"].resetStore(),this.setComponent("#dashboard-content",f["default"].VerifyInstallController)},crumbs:[{name:"Verify CouchDB Installation"}]});l["default"].RouteObjects=[p],t["default"]=l["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i,o,a=n(84),s=r(a),l=n(99),u=r(l),c=n(670),d=r(c),f=n(671),p=r(f),h=u["default"].addon(),g=new d["default"].Model({id:"verifytestdb",name:"verifytestdb"}),m=new d["default"].Model({id:"verifytestdb_replicate",name:"verifytestdb_replicate"});h.testProcess={saveDoc:function(){return i=new p["default"].Doc({_id:"test_doc_1",a:1},{database:g}),i.save()},destroyDoc:function(){return i.destroy()},updateDoc:function(){return i.set({b:"hello"}),i.save()},saveDB:function(){return g.save()},setupDB:function(e){var t=u["default"].Deferred();return e.fetch().then(function(){return e.destroy()},function(e){t.resolve()}).then(function(){t.resolve()},function(e,n,r){"Unauthorized"===r&&t.reject(e,n,r)}),t},setup:function(){return u["default"].when([this.setupDB(g),this.setupDB(m)])},testView:function(){var e=u["default"].Deferred(),t=$.get(o.url()+"/_view/testview");return t.then(function(t){t=_.isString(t)?JSON.parse(t):t;var n=t.rows[0];if(6===n.value)return e.resolve();var r={reason:"Values expect 6, got "+n.value};e.reject({responseText:JSON.stringify(r)})},e.reject),e},setupView:function(){var e=new p["default"].Doc({_id:"test_doc_10",a:1},{database:g}),t=new p["default"].Doc({_id:"test_doc_20",a:2},{database:g}),n=new p["default"].Doc({_id:"test_doc_30",a:3},{database:g});return o=new p["default"].Doc({_id:"_design/view_check",views:{testview:{map:"function (doc) { emit(doc._id, doc.a); }",reduce:"_sum"}}},{database:g}),u["default"].when([e.save(),t.save(),n.save(),o.save()])},setupReplicate:function(){return $.ajax({url:s["default"].host+"/_replicate",contentType:"application/json",type:"POST",dataType:"json",processData:!1,data:JSON.stringify({create_target:!0,source:"verifytestdb",target:"verifytestdb_replicate"})})},testReplicate:function(){var e=u["default"].Deferred(),t=m.fetch();return t.then(function(){var t=m.get("doc_count");if(4===t)return void e.resolve();var n={reason:"Replication Failed, expected 4 docs got "+t};e.reject({responseText:JSON.stringify(n)})},e.reject),e},removeDBs:function(){m.destroy(),g.destroy()}},t["default"]=h},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(84),o=(r(i),n(99)),a=r(o),s=n(870),l=r(s),u=n(868),c=r(u),d=n(871),f=r(d),p=function(e){a["default"].dispatch({type:f["default"].VERIFY_INSTALL_SINGLE_TEST_COMPLETE,test:e,success:!0})},h=function(e){return function(t,n){t&&(a["default"].dispatch({type:f["default"].VERIFY_INSTALL_SINGLE_TEST_COMPLETE,test:e,success:!1}),a["default"].addNotification({msg:"Error: "+JSON.parse(t.responseText).reason,type:"error"}))}};t["default"]={resetStore:function(){a["default"].dispatch({type:f["default"].VERIFY_INSTALL_RESET})},startVerification:function(){a["default"].dispatch({type:f["default"].VERIFY_INSTALL_START});var e=c["default"].testProcess;e.setup().then(function(){return e.saveDB()},h(l["default"].TESTS.CREATE_DATABASE)).then(function(){return p(l["default"].TESTS.CREATE_DATABASE),e.saveDoc()},h(l["default"].TESTS.CREATE_DOCUMENT)).then(function(){return p(l["default"].TESTS.CREATE_DOCUMENT),e.updateDoc()},h(l["default"].TESTS.UPDATE_DOCUMENT)).then(function(){return p(l["default"].TESTS.UPDATE_DOCUMENT),e.destroyDoc()},h(l["default"].TESTS.DELETE_DOCUMENT)).then(function(){return p(l["default"].TESTS.DELETE_DOCUMENT),e.setupView()},h(l["default"].TESTS.CREATE_VIEW)).then(function(){return e.testView()},h(l["default"].TESTS.CREATE_VIEW)).then(function(){return p(l["default"].TESTS.CREATE_VIEW),e.setupReplicate()},h(l["default"].TESTS.CREATE_VIEW)).then(function(){return e.testReplicate()},h(l["default"].TESTS.REPLICATION)).then(function(){p(l["default"].TESTS.REPLICATION),a["default"].dispatch({type:f["default"].VERIFY_INSTALL_ALL_TESTS_COMPLETE}),a["default"].addNotification({msg:"Success! Your CouchDB installation is working. Time to Relax.",type:"success"}),e.removeDBs()},h(l["default"].TESTS.REPLICATION))}}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={TESTS:{CREATE_DATABASE:"TEST_CREATE_DATABASE",CREATE_DOCUMENT:"TEST_CREATE_DOCUMENT",UPDATE_DOCUMENT:"TEST_UPDATE_DOCUMENT",DELETE_DOCUMENT:"TEST_DELETE_DOCUMENT",CREATE_VIEW:"TEST_CREATE_VIEW",REPLICATION:"TEST_REPLICATION"}};t["default"]=n},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]={VERIFY_INSTALL_START:"VERIFY_INSTALL_START",VERIFY_INSTALL_RESET:"VERIFY_INSTALL_RESET",VERIFY_INSTALL_SINGLE_TEST_COMPLETE:"VERIFY_INSTALL_SINGLE_TEST_COMPLETE",VERIFY_INSTALL_ALL_TESTS_COMPLETE:"VERIFY_INSTALL_ALL_TESTS_COMPLETE"}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(84),o=(r(i),n(99)),a=(r(o),n(106)),s=r(a),l=n(870),u=r(l),c=n(868),d=(r(c),n(869)),f=r(d),p=n(873),h=r(p),g=h["default"].verifyInstallStore,m=s["default"].createClass({displayName:"VerifyInstallController",getInitialState:function(){return this.getStoreState()},getStoreState:function(){return{isVerifying:g.checkIsVerifying(),testResults:g.getTestResults()}},startVerification:function(){f["default"].startVerification()},onChange:function(){this.setState(this.getStoreState())},componentDidMount:function(){g.on("change",this.onChange,this)},componentWillUnmount:function(){g.off("change",this.onChange)},render:function(){return s["default"].createElement("div",null,s["default"].createElement(v,{verify:this.startVerification,isVerifying:this.state.isVerifying}),s["default"].createElement(b,{testResults:this.state.testResults}))}}),v=s["default"].createClass({displayName:"VerifyInstallButton",propTypes:{verify:s["default"].PropTypes.func.isRequired,isVerifying:s["default"].PropTypes.bool.isRequired},render:function(){return s["default"].createElement("button",{id:"start",className:"btn btn-success",onClick:this.props.verify,disabled:this.props.isVerifying},this.props.isVerifying?"Verifying":"Verify Installation")}}),b=s["default"].createClass({displayName:"VerifyInstallResults",propTypes:{testResults:s["default"].PropTypes.object.isRequired},showTestResult:function(e){return this.props.testResults[e].complete?this.props.testResults[e].success?s["default"].createElement("span",null,"✓"):s["default"].createElement("span",null,"✗"):""},render:function(){return s["default"].createElement("table",{className:"table table-striped table-bordered"},s["default"].createElement("thead",null,s["default"].createElement("tr",null,s["default"].createElement("th",null,"Test"),s["default"].createElement("th",null,"Status"))),s["default"].createElement("tbody",null,s["default"].createElement("tr",null,s["default"].createElement("td",null,"Create Database"),s["default"].createElement("td",{id:"js-test-create-db"},this.showTestResult(u["default"].TESTS.CREATE_DATABASE))),s["default"].createElement("tr",null,s["default"].createElement("td",null,"Create Document"),s["default"].createElement("td",{id:"js-test-create-doc"},this.showTestResult(u["default"].TESTS.CREATE_DOCUMENT))),s["default"].createElement("tr",null,s["default"].createElement("td",null,"Update Document"),s["default"].createElement("td",{id:"js-test-update-doc"},this.showTestResult(u["default"].TESTS.UPDATE_DOCUMENT))),s["default"].createElement("tr",null,s["default"].createElement("td",null,"Delete Document"),s["default"].createElement("td",{id:"js-test-delete-doc"},this.showTestResult(u["default"].TESTS.DELETE_DOCUMENT))),s["default"].createElement("tr",null,s["default"].createElement("td",null,"Create View"),s["default"].createElement("td",{id:"js-test-create-view"},this.showTestResult(u["default"].TESTS.CREATE_VIEW))),s["default"].createElement("tr",null,s["default"].createElement("td",null,"Replication"),s["default"].createElement("td",{id:"js-test-replication"},this.showTestResult(u["default"].TESTS.REPLICATION)))))}});t["default"]={VerifyInstallController:m,VerifyInstallButton:v,VerifyInstallResults:b}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(99),o=r(i),a=n(870),s=r(a),l=n(871),u=r(l),c=o["default"].Store.extend({initialize:function(){this.reset()},reset:function(){this._isVerifying=!1,this._tests={},_.each(Object.keys(s["default"].TESTS),function(e){this._tests[s["default"].TESTS[e]]={complete:!1}},this)},startVerification:function(){this._isVerifying=!0},stopVerification:function(){this._isVerifying=!1},checkIsVerifying:function(){return this._isVerifying},updateTestStatus:function(e,t){if(!_.has(this._tests,e))throw new Error("Invalid test name passed to updateTestStatus()");this._tests[e]={complete:!0,success:t}},getTestResults:function(){return this._tests},dispatch:function(e){switch(e.type){case u["default"].VERIFY_INSTALL_START:this.startVerification(),this.triggerChange();break;case u["default"].VERIFY_INSTALL_RESET:this.reset(),this.triggerChange();break;case u["default"].VERIFY_INSTALL_SINGLE_TEST_COMPLETE:this.updateTestStatus(e.test,e.success),this.triggerChange();break;case u["default"].VERIFY_INSTALL_ALL_TESTS_COMPLETE:this.stopVerification(),this.triggerChange();break;default:return}}}),d={};d.verifyInstallStore=new c,d.verifyInstallStore.dispatchToken=o["default"].dispatcher.register(d.verifyInstallStore.dispatch),t["default"]=d},function(e,t,n){var r=n(875);"string"==typeof r&&(r=[[e.id,r,""]]);n(288)(r,{});r.locals&&(e.exports=r.locals)},function(e,t,n){t=e.exports=n(275)(),t.push([e.id,"#start{margin-bottom:20px}",""])},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(84),o=(r(i),n(99)),a=r(o),s=n(877),l=r(s);n(880),l["default"].initialize=function(){a["default"].addHeaderLink({id:"Documentation",title:"Documentation",icon:"fonticon-bookmark",href:"/documentation",bottomNav:!0,top:!0})},t["default"]=l["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(84),o=(r(i),n(99)),a=r(o),s=n(878),l=r(s),u=a["default"].RouteObject.extend({selectedHeader:"Documentation",layout:"one_pane",disableLoader:!1,routes:{documentation:"documentation"},crumbs:[{name:"Documentation"}],roles:["fx_loggedIn"],documentation:function(){this.setComponent("#dashboard-content",l["default"].DocumentationController)}});u.RouteObjects=[u],t["default"]=u},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(84),o=(r(i),n(99)),a=(r(o),n(106)),s=r(a),l=n(879),u=r(l),c=u["default"].documentationStore,d=s["default"].createClass({displayName:"DocumentationController",getStoreState:function(){return{links:c.getLinks()}},getInitialState:function(){return this.getStoreState()},createLinkRows:function(){return this.state.links.map(function(e){return s["default"].createElement("tr",{key:e.title},s["default"].createElement("td",{className:"icons-container"},s["default"].createElement("div",{className:"icon "+e.iconClassName}," ")),s["default"].createElement("td",null,s["default"].createElement("a",{href:e.link,target:"_blank","data-bypass":"true"},e.title)))})},render:function(){return s["default"].createElement("div",{id:"documentation-page",className:"scrollable"},s["default"].createElement("div",{className:"links"},s["default"].createElement("table",null,s["default"].createElement("tbody",null,this.createLinkRows()))))}});t["default"]={DocumentationController:d}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(84),o=(r(i),n(99)),a=r(o),s=a["default"].Store.extend({getLinks:function(){return[{title:"CouchDB Official Documentation — Online",link:"http://docs.couchdb.org/en/latest/",iconClassName:"couchdb-icon"},{title:"CouchDB Official Documentation — Offline",link:"/_utils/docs/contents.html",iconClassName:"couchdb-icon"},{title:"CouchDB Weekly News",link:"http://blog.couchdb.org/",iconClassName:"couchdb-icon"},{title:"CouchDB Homepage",link:"https://couchdb.apache.org/",iconClassName:"couchdb-icon"},{title:"CouchDB on GitHub",link:"https://github.com/apache/couchdb",iconClassName:"github-icon"},{title:"Fauxton on GitHub",link:"https://github.com/apache/couchdb-fauxton",iconClassName:"github-icon"},{title:"Fauxton Visual Guide",link:"https://couchdb.apache.org/fauxton-visual-guide/index.html",
iconClassName:"couchdb-icon"},{title:"The Apache Software Foundation",link:"http://www.apache.org/",iconClassName:"asf-feather-icon"},{title:"Follow CouchDB on Twitter",link:"https://twitter.com/couchdb",iconClassName:"twitter-icon"},{title:"Follow CouchDB on Google Plus",link:"https://plus.google.com/+CouchDB",iconClassName:"google-plus-icon"},{title:"Follow CouchDB on LinkedIn",link:"https://www.linkedin.com/company/apache-couchdb",iconClassName:"linkedin-icon"}]}}),l=new s;t["default"]={documentationStore:l}},function(e,t,n){var r=n(881);"string"==typeof r&&(r=[[e.id,r,""]]);n(288)(r,{});r.locals&&(e.exports=r.locals)},function(e,t,n){t=e.exports=n(275)(),t.push([e.id,"#documentation-page table{margin:50px}#documentation-page table .icons-container{width:80px;height:80px;max-width:200px;max-height:100px;padding-right:20px}#documentation-page table .couchdb-icon{background:transparent url("+n(287)+") no-repeat 50% 50%;height:60px;width:60px;background-size:60px auto}#documentation-page table .github-icon{background:transparent url("+n(882)+") no-repeat 50% 50%;height:40px;width:40px;background-size:40px auto}#documentation-page table .asf-feather-icon{background:transparent url("+n(883)+") no-repeat 50% 50%;height:70px;width:100px;background-size:70px}#documentation-page table .linkedin-icon{background:transparent url("+n(884)+") no-repeat 50% 50%;height:40px;width:40px;background-size:40px auto}#documentation-page table .google-plus-icon{background:transparent url("+n(885)+") no-repeat 50% 50%;height:40px;width:40px;background-size:40px auto}#documentation-page table .twitter-icon{background:transparent url("+n(886)+") no-repeat 50% 50%;height:50px;width:50px;background-size:60px}#documentation-page table .icon{margin:auto}",""])},function(e,t,n){e.exports=n.p+"dashboard.assets/img/github.png"},function(e,t,n){e.exports=n.p+"dashboard.assets/img/asf-feather-logo.png"},function(e,t,n){e.exports=n.p+"dashboard.assets/img/linkedin.png"},function(e,t,n){e.exports=n.p+"dashboard.assets/img/googleplus.png"},function(e,t,n){e.exports=n.p+"dashboard.assets/img/twitter.png"},function(e,t,n,r,i){var o=n(r),a=n(i),s=a(o);e.exports=s},function(e,t,n,r,i){function o(e,t){return a(e,t,s)}var a=n(r),s=n(i);e.exports=o},function(e,t,n,r){var i=n(r),o=i();e.exports=o},function(e,t,n,r){function i(e){return function(t,n,r){for(var i=o(t),a=r(t),s=a.length,l=e?s:-1;e?l--:++l<s;){var u=a[l];if(n(i[u],u,i)===!1)break}return t}}var o=n(r);e.exports=i},function(e,t,n,r){function i(e,t){var n=null==e?void 0:e[t];return o(n)?n:void 0}var o=n(r);e.exports=i},function(e,t,n,r){function i(e){return o(e)&&l.call(e)==a}var o=n(r),a="[object Function]",s=Object.prototype,l=s.toString;e.exports=i},function(e,t,n,r,i){function o(e){return null!=e&&s(a(e))}var a=n(r),s=n(i);e.exports=o},function(e,t,n,r){var i=n(r),o=i("length");e.exports=o},function(e,t,n,r,i){function o(e){return s(e)&&a(e)&&u.call(e,"callee")&&!c.call(e,"callee")}var a=n(r),s=n(i),l=Object.prototype,u=l.hasOwnProperty,c=l.propertyIsEnumerable;e.exports=o},function(e,t,n,r,i,o){var a=n(r),s=n(i),l=n(o),u="[object Array]",c=Object.prototype,d=c.toString,f=a(Array,"isArray"),p=f||function(e){return l(e)&&s(e.length)&&d.call(e)==u};e.exports=p},function(e,t,n,r,i,o){function a(e,t){return function(n,r){var i=n?s(n):0;if(!l(i))return e(n,r);for(var o=t?i:-1,a=u(n);(t?o--:++o<i)&&r(a[o],o,a)!==!1;);return n}}var s=n(r),l=n(i),u=n(o);e.exports=a},function(e,t,n,r,i,o,a,s){function l(e,t,n){var r=typeof e;return"function"==r?void 0===t?e:d(e,t,n):null==e?f:"object"==r?u(e):void 0===t?p(e):c(e,t)}var u=n(r),c=n(i),d=n(o),f=n(a),p=n(s);e.exports=l},function(e,t,n,r,i){function o(e,t,n){var r=t.length,i=r,o=!n;if(null==e)return!i;for(e=s(e);r--;){var l=t[r];if(o&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++r<i;){l=t[r];var u=l[0],c=e[u],d=l[1];if(o&&l[2]){if(void 0===c&&!(u in e))return!1}else{var f=n?n(c,d,u):void 0;if(!(void 0===f?a(d,c,n,!0):f))return!1}}return!0}var a=n(r),s=n(i);e.exports=o},function(e,t,n,r,i,o){function a(e,t,n,r,i,o){return e===t||(null==e||null==t||!l(e)&&!u(t)?e!==e&&t!==t:s(e,t,a,n,r,i,o))}var s=n(r),l=n(i),u=n(o);e.exports=a},function(e,t,n,r){function i(e,t,n,r,i,a,s){var l=-1,u=e.length,c=t.length;if(u!=c&&!(i&&c>u))return!1;for(;++l<u;){var d=e[l],f=t[l],p=r?r(i?f:d,i?d:f,l):void 0;if(void 0!==p){if(p)continue;return!1}if(i){if(!o(t,function(e){return d===e||n(d,e,r,i,a,s)}))return!1}else if(d!==f&&!n(d,f,r,i,a,s))return!1}return!0}var o=n(r);e.exports=i},function(e,t,n,r){function i(e,t,n,r,i,a,l){var u=o(e),c=u.length,d=o(t),f=d.length;if(c!=f&&!i)return!1;for(var p=c;p--;){var h=u[p];if(!(i?h in t:s.call(t,h)))return!1}for(var g=i;++p<c;){h=u[p];var m=e[h],v=t[h],b=r?r(i?v:m,i?m:v,h):void 0;if(!(void 0===b?n(m,v,r,i,a,l):b))return!1;g||(g="constructor"==h)}if(!g){var y=e.constructor,w=t.constructor;if(y!=w&&"constructor"in e&&"constructor"in t&&!("function"==typeof y&&y instanceof y&&"function"==typeof w&&w instanceof w))return!1}return!0}var o=n(r),a=Object.prototype,s=a.hasOwnProperty;e.exports=i},function(e,t,n,r,i){function o(e){return s(e)&&a(e.length)&&!!F[O.call(e)]}var a=n(r),s=n(i),l="[object Arguments]",u="[object Array]",c="[object Boolean]",d="[object Date]",f="[object Error]",p="[object Function]",h="[object Map]",g="[object Number]",m="[object Object]",v="[object RegExp]",b="[object Set]",y="[object String]",w="[object WeakMap]",x="[object ArrayBuffer]",_="[object Float32Array]",E="[object Float64Array]",C="[object Int8Array]",k="[object Int16Array]",S="[object Int32Array]",A="[object Uint8Array]",T="[object Uint8ClampedArray]",D="[object Uint16Array]",N="[object Uint32Array]",F={};F[_]=F[E]=F[C]=F[k]=F[S]=F[A]=F[T]=F[D]=F[N]=!0,F[l]=F[u]=F[x]=F[c]=F[d]=F[f]=F[p]=F[h]=F[g]=F[m]=F[v]=F[b]=F[y]=F[w]=!1;var M=Object.prototype,O=M.toString;e.exports=o},function(e,t,n,r,i){function o(e){for(var t=s(e),n=t.length;n--;)t[n][2]=a(t[n][1]);return t}var a=n(r),s=n(i);e.exports=o},function(e,t,n,r){function i(e){return e===e&&!o(e)}var o=n(r);e.exports=i},function(e,t,n,r,i){function o(e){e=s(e);for(var t=-1,n=a(e),r=n.length,i=Array(r);++t<r;){var o=n[t];i[t]=[o,e[o]]}return i}var a=n(r),s=n(i);e.exports=o},function(e,t,n,r,i,o,a,s,l,u,c,d){function f(e,t){var n=m(e),r=v(e)&&b(t),i=e+"";return e=x(e),function(o){if(null==o)return!1;var a=i;if(o=w(o),(n||!r)&&!(a in o)){if(o=1==e.length?o:p(o,g(e,0,-1)),null==o)return!1;a=y(e),o=w(o)}return o[a]===t?void 0!==t||a in o:h(t,o[a],void 0,!0)}}var p=n(r),h=n(i),g=n(o),m=n(a),v=n(s),b=n(l),y=n(u),w=n(c),x=n(d);e.exports=f},function(e,t,n,r,i){function o(e,t){var n=typeof e;if("string"==n&&u.test(e)||"number"==n)return!0;if(a(e))return!1;var r=!l.test(e);return r||null!=t&&e in s(t)}var a=n(r),s=n(i),l=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,u=/^\w*$/;e.exports=o},function(e,t,n,r,i){function o(e){if(s(e))return e;var t=[];return a(e).replace(l,function(e,n,r,i){t.push(r?i.replace(u,"$1"):n||e)}),t}var a=n(r),s=n(i),l=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g,u=/\\(\\)?/g;e.exports=o},function(e,t,n,r){function i(e,t,n){if("function"!=typeof e)return o;if(void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 3:return function(n,r,i){return e.call(t,n,r,i)};case 4:return function(n,r,i,o){return e.call(t,n,r,i,o)};case 5:return function(n,r,i,o,a){return e.call(t,n,r,i,o,a)}}return function(){return e.apply(t,arguments)}}var o=n(r);e.exports=i},function(e,t,n,r,i,o){function a(e){return u(e)?s(e):l(e)}var s=n(r),l=n(i),u=n(o);e.exports=a},function(e,t,n,r,i){function o(e){var t=e+"";return e=s(e),function(n){return a(n,e,t)}}var a=n(r),s=n(i);e.exports=o},function(e,t,n,r,i,o,a,s,l,u,c){var d=n(r),f=n(i),p=n(o),h=n(a),g=n(s),m=n(l),v=n(u),b=n(c),y=b(function(e,t){if(null==e)return{};if("function"!=typeof t[0]){var t=d(p(t),String);return m(e,f(g(e),t))}var n=h(t[0],t[1],3);return v(e,function(e,t,r){return!n(e,t,r)})});e.exports=y},function(e,t,n,r,i,o){function a(e,t){var n=e?e.length:0,r=[];if(!n)return r;var i=-1,o=s,a=!0,d=a&&t.length>=c?u(t):null,f=t.length;d&&(o=l,a=!1,t=d);e:for(;++i<n;){var p=e[i];if(a&&p===p){for(var h=f;h--;)if(t[h]===p)continue e;r.push(p)}else o(t,p,0)<0&&r.push(p)}return r}var s=n(r),l=n(i),u=n(o),c=200;e.exports=a},function(e,t,n,r){function i(e,t,n){if(t!==t)return o(e,n);for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}var o=n(r);e.exports=i},function(e,t,n,r){function i(e,t){var n=e.data,r="string"==typeof t||o(t)?n.set.has(t):n.hash[t];return r?0:-1}var o=n(r);e.exports=i},function(e,t,n,r,i){(function(t){function o(e){return u&&l?new a(e):null}var a=n(r),s=n(i),l=s(t,"Set"),u=s(Object,"create");e.exports=o}).call(t,function(){return this}())},function(e,t,n,r,i){(function(t){function o(e){var t=e?e.length:0;for(this.data={hash:u(null),set:new l};t--;)this.push(e[t])}var a=n(r),s=n(i),l=s(t,"Set"),u=s(Object,"create");o.prototype.push=a,e.exports=o}).call(t,function(){return this}())},function(e,t,n,r){function i(e){var t=this.data;"string"==typeof e||o(e)?t.set.add(e):t.hash[e]=!0}var o=n(r);e.exports=i},function(e,t,n,r,i,o,a,s){function l(e,t,n,r){r||(r=[]);for(var i=-1,o=e.length;++i<o;){var a=e[i];p(a)&&f(a)&&(n||d(a)||c(a))?t?l(a,t,n,r):u(r,a):n||(r[r.length]=a)}return r}var u=n(r),c=n(i),d=n(o),f=n(a),p=n(s);e.exports=l},function(e,t,n,r){function i(e,t){e=o(e);for(var n=-1,r=t.length,i={};++n<r;){var a=t[n];a in e&&(i[a]=e[a])}return i}var o=n(r);e.exports=i},function(e,t,n,r){function i(e,t){var n={};return o(e,function(e,r,i){t(e,r,i)&&(n[r]=e)}),n}var o=n(r);e.exports=i},function(e,t,n,r,i){function o(e,t){return a(e,t,s)}var a=n(r),s=n(i);e.exports=o}]));
//# sourceMappingURL=bundle.js.map